max sockets
I am writing a socket server which will hold persistent socket connections. The server's specs are: 1.7Ghz x86 processor, 1.75GB of RAM, 160GB of local disk, and 250Mb/s of network bandwidth. Is there any way to figure out what the maximum amount of connections will be?
I will not be running any other apps on the server. OS can be either Linux or BSD. I can use NIO or not.
Any help figuring this out would be greatly appreciated.
[454 byte] By [
dankantora] at [2007-10-3 10:23:40]

You'll have to try it and see. You'll need a number of client workstations. You will hit one or more of the following limits:
- maximum number of accepted sockets, probably limited by available fd's or socket buffer space
- maximum number of threads
- maximum JVM memory, probably related to the number of threads times the size of a thread stack
- whatever other resources each accepted client will consume.
Are you planning to use NIO, or a threaded blocking-mode server?
ejpa at 2007-7-15 5:45:26 >

Typically a standard business server will hold about 1000-2000 concurrent sockets then crash - badly.
Mid-class servers may reach to 10000 sockets.
High-end servers will die around 50000 sockets.
The best way to determine what your hardware and software can do is test it - create as many socket connections as possible at once.
Some kernel parameters (which might influence the sockets number) can be tuned either when recompiling the kernel or just configuration.
Some googling yields:
BSD
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-kernel-limits.html
Linux
http://people.redhat.com/alikins/system_tuning.html