Hello, I have to tune my ICS based server to handle 16.000 TCP permanent cnx (but very low transfert rate with less than 4KB blocks of datas to transfert to each client).
After taking attention to all guys here talking about TCP optimization, I have made a small resume of all what I grabbed around please correct me if I am wrong or add any information that could be usefull for anybody asking for such information time to time, but may be this kind of FAQ already exists ? ****************** ICS informations ****************** - Actually each socket uses one handle. - Multithreading to handle the sockets themselves is not necessary, but could be to start some database query. - If you use forms in your application, take care that if you have hudge activity your GUI interface may be slow or none responsive at all. It could be better to manage ICS in a new thread that will not slow down your GUI. - If you want to refresh GUI according to socket activity, do it thru a simple timer every second for example -> your socket thread could store informations in some TList that your timed procedure will access using thread-safe syntax and then display in your Form(s). **************************************************************** Advices about server with high cnx/dcnx rate with few datas to transfert each cnx **************************************************************** --- please add your comments. ************************************************************************ Adives for servers with low cnx/dcnx rate but large datas to transfert (or low speed bandwidth that will make server permanently send data) ************************************************************************ --- please add your comments. ************************** Windows TCP informations ************************** - Sockets cannot be allocated in swapped memory. - By default, non paged memory is 1/4 of physical memory with a max of 256MB on Win2K and 128MB on NT4. - Could the 1/4 max value be increased thru some registry key ??? - Each socket uses approx 10KB of non paged physical memory. ********************** Some registry tuning ********************** HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters TcpTimedWaitDelay = 30 (make TIME_WAIT sockets alive for 30 seconds only) MaxUserPort = 65534 MaxHashTableSize = 65536 default 512 MaxFreeTwTcbs = 2000 MaxFreeTcbs = 16000 default 1000 MaxUserPort = 65534 TcpWindowSize = 65535 default 8192 MaxHashTableSize = 512 TcpNumConnections = 1000 NumTcbTablePartitions = 32 default 4 All keys explained at but you could add you own comments : http://www.microsoft.com/resources/documentation/Windows/2000/server/reskit/en-us/regentry/33563.asp ************************* End of Information Note ************************* -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
