I am running a benchmark(Java) where I open 10K connections. I am hitting a limit where I cannot open more than ~8000 tcp connections to a server. Connecting to two servers, the limit seems to be somewhere between 8000 and 10000 connections. So I am fairly certain the problem has to be on the client side.
I tried the following settings on the client:
- setting the ephemeral ports:net.ipv4.ip_local_port_range = 32768 60999
- Setting the ulimit to 65535
But still my Java application can't open more than 8K outgoing connections.
Some experimenting showed that:
- Doing a little less than 8K in rapid succession is fine.
- Doing 8.1K requests causes a 30 delay before it continues with only little bursts.
- During the tests the machine never runs out of CPU or memory. During the delay it goes back to running at an idle 1-2%.
- No error or exception is being thrown.
How can I increase the limit to have more open connections?
ulimit -nsay for the user running the program?ping- are you stil interested?