1

I have written java server app, it can accept 3800-4000 network connections simultaneously and cpu/network load is low(<40%) But after this threshold it reject new connection or accept it by killing old one, so live connections count is about 3800-4000 (the number varies).

Can anyone give me at least a hint what can be a bottleneck here - my software itself, OS configuration or CPU/NAT(regardless of the fact that they says they are loaded less than 40%)?

CPU: 4-core (one core is loaded 50%, other 3 - 25%) Environment: Amazon EC2, Windows Server 2003 R2

Edit: memory usage is less than 500 Mb JRE is 32bit, 1.6.0_30 MaxUserPort is set to 65534

Rage
  • 121
  • 1
  • 6

1 Answers1

0

it reject new connection

Correct. Once the TCP backlog queue fills, no further connections will be accepted. Windows will issue an RST, other platforms will just ignore the incoming request. In the first case the client will get 'connection refused', in the second case the client will get 'connection timed out'.

or accept it by killing old one

I've never seen that in over 20 years of networking. What are the symptoms that led you to this conclusion?

user207421
  • 305,947
  • 44
  • 307
  • 483
  • I am doing stress test of my sever software and I run multiple processes on client machine (with hundreds connections to server inside of each of them). When total number of connections is about 3800 and I run new client process then the number of threads of old processes decreases. So I concluded server reset old connections (number of killed threads ~ number of newly created threads in new process). Yeah, possibly I was wrong here, because I haven't seen any connection related error, just threads count. – Rage Dec 23 '11 at 10:41
  • Actually I get 'Connection reset', not 'Connection refused'. – Rage Dec 23 '11 at 14:16