directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@d-haven.org>
Subject Re: [mina] Performance issues
Date Thu, 24 Mar 2005 14:20:53 GMT
Trustin Lee wrote:

>>I'm expecting that MINA should be able to take 100K connections on the
>>server.  It cant go over 65K for the client due to lack of available
>>port numbers.
> 
> 
> Can we accept more than 64K connections on the server side?
> 

Thats a good point!  If I recall correctly, you would be limited to 64k 
- 1 connections.  The details are fuzzy on this one as its been a while 
since I been familiar with papers on Berkley sockets.  Nevertheless the 
ServerSocket will listen on the port its bound to.  When the server 
accepts the socket connection a new Socket is created to communicate 
over an aliased port.  In other words, the listening can be happening on 
port 80, but the actual communication might happen on port 30231.

One of the challenges I faced with creating the denial service on the 
SEDANG project was that the server was listening on port 6666 or 
whatever, but the created SocketChannel was on a completely different 
port.  I got around that, but nevertheless it is how sockets work in Java.

With 30k connections we may be at the practical limits of what the OS 
will allow.  I can guarantee this much, on a properly locked down box, 
you will have a hard time having any socket under the 1k mark.  That 
means you would be limited to at most 63K connections.  Not to mention 
we would start competing with other network bound services on our 
Unix/Windows boxes.  RPC is considered bad to have running, but it is 
there by default on Windows and necessary for NFS mounted shares.

Keep in mind that even the original SEDA project with the experimental 
Haboob HTTP server was targeting 1000 simultaneous connections.  We have 
far acceeded that with no load.  Pretty soon we will have to see how the 
system responds with load, but you've already alluded to that.

Mime
View raw message