You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Steven <xi...@126.com> on 2007/11/09 09:21:21 UTC

How many clients can be online at one time by using nio or MINA?

 
Hi all,
 
I am writing a server program now.
 
There will be lots clients connect to the server at one time, maybe 5000+.
 
The OS is windows 2003. I want to use MINA.
 
But someone tell me that nio's implementation in windows is using the winsock select model, and that make nio can only
maintain about 1024 connections at one time.
 
Is that true?
 
Or how many connections can be maintain by using nio or MINA ??
 
Thank you!
 
Steven

 
 
 
 

RE: How many clients can be online at one time by using nio or MINA?

Posted by Scott Peters <sp...@visto.com>.
We ran into the windows limitation regarding the number of open sockets.
Windows 2003 limits the range of port numbers an application can use to
1024-5000 by default.  Not sure why this is set.

This can be overwritten by a registry key though and the max user port
number can be changed to expand the number of ports.

Without this registry change you hit a wall and start getting errors
around 4,000 or so since it takes time for the sockets to get released
back into the pool after they are closed.

Merge this with the registry will fix it give you around 64,000 ports to
use.

<65k_MaxUserPort.reg>
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"MaxUserPort"=dword:0000fde8
<65k_MaxUserPort.reg>

See TechNet article:
http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/rege
ntry/58791.mspx?mfr=true

We have run a single java process that has about 10,000 always open
client connects and about 2,000-4,000 transient server connections on a
quad-proc windows 2003 64bit server.  Almost all the connections are SSL
encrypted.

-Scott



-----Original Message-----
From: Steven [mailto:xiaobin_snake@126.com] 
Sent: Friday, November 09, 2007 12:21 AM
To: MinaDev
Subject: How many clients can be online at one time by using nio or
MINA?

 
Hi all,
 
I am writing a server program now.
 
There will be lots clients connect to the server at one time, maybe
5000+.
 
The OS is windows 2003. I want to use MINA.
 
But someone tell me that nio's implementation in windows is using the
winsock select model, and that make nio can only
maintain about 1024 connections at one time.
 
Is that true?
 
Or how many connections can be maintain by using nio or MINA ??
 
Thank you!
 
Steven

 
 
 
 

Re: How many clients can be online at one time by using nio or MINA?

Posted by Marcin Waldowski <mw...@sulechow.net>.
Hello Steven,

I don't know how nio in Windows is implemented and I don't know winsock 
select model at all but meybe following articeles will help you:
http://publib.boulder.ibm.com/wasce/V1.0.1.1/en/Tasks/Tuning/Windows.html
http://tangentsoft.net/wskfaq/advanced.html

Steven wrote:
>  
> Hi all,
>  
> I am writing a server program now.
>  
> There will be lots clients connect to the server at one time, maybe 5000+.
>  
> The OS is windows 2003. I want to use MINA.
>  
> But someone tell me that nio's implementation in windows is using the winsock select model, and that make nio can only
> maintain about 1024 connections at one time.
>  
> Is that true?
>  
> Or how many connections can be maintain by using nio or MINA ??
>  
> Thank you!
>  
> Steven
> 



Re:RE: How many clients can be online at one time by using nio or MINA?

Posted by Steven <xi...@126.com>.
 To Gato , Scott  and Marcin,

Thank you very much!

 

在2007-11-10,"Gaston Dombiak" <ga...@jivesoftware.com> 写道:

Hey Steven,

When we tried Openfire (that uses MINA) on a Windows XP and Windows Server
2003, Standard Edition we were able to get 30K concurrent connections. We
had to change 2 properties in the registry so that windows would allow
more ports and connections. The number of connections used to fluctuate
sometimes it was 40K and sometimes 28K. That is why we recommend Linux
when you need to deal with lots of sockets connections. However, I would
say that for 5K-10K  Windows is fine.

Regards,

  -- Gato



RE: How many clients can be online at one time by using nio or MINA?

Posted by Gaston Dombiak <ga...@jivesoftware.com>.
Hey Steven,

When we tried Openfire (that uses MINA) on a Windows XP and Windows Server
2003, Standard Edition we were able to get 30K concurrent connections. We
had to change 2 properties in the registry so that windows would allow
more ports and connections. The number of connections used to fluctuate
sometimes it was 40K and sometimes 28K. That is why we recommend Linux
when you need to deal with lots of sockets connections. However, I would
say that for 5K-10K  Windows is fine.

Regards,

  -- Gato

-----Original Message-----
From: Steven [mailto:xiaobin_snake@126.com] 
Sent: Friday, November 09, 2007 12:21 AM
To: MinaDev
Subject: How many clients can be online at one time by using nio or MINA?

 
Hi all,
 
I am writing a server program now.
 
There will be lots clients connect to the server at one time, maybe 5000+.
 
The OS is windows 2003. I want to use MINA.
 
But someone tell me that nio's implementation in windows is using the
winsock select model, and that make nio can only maintain about 1024
connections at one time.
 
Is that true?
 
Or how many connections can be maintain by using nio or MINA ??
 
Thank you!
 
Steven