I'm running a type of perf test where I have a simple TCP server with 4 IP addresses that is listening on a port and getting connections from several other computers on the local network. Everything works fine up to just under 120,000 active connections, clients are able to get messages from client and create new connections. At just under 120,000, new connections just stop appearing. There is no log activity on server and clients start getting timeouts after a bit. There is no firewall that would be getting in the way. I have tweaked a bunch of settings already:
/etc/sysctl.conf
net.core.netdev_max_backlog = 1000000
net.core.netdev_budget = 50000
net.core.netdev_budget_usecs = 5000
net.core.somaxconn = 1024000
net.core.rmem_default = 1048576
net.core.rmem_max = 16777216
net.core.wmem_default = 1048576
net.core.wmem_max = 16777216
net.core.optmem_max = 65536
net.ipv4.tcp_rmem = 4096 1048576 2097152
net.ipv4.tcp_wmem = 4096 65536 16777216
net.ipv4.udp_rmem_min = 8192
net.ipv4.udp_wmem_min = 8192
net.ipv4.tcp_fastopen = 3
net.ipv4.tcp_max_syn_backlog = 3000000
net.ipv4.tcp_max_tw_buckets = 2000000
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_fin_timeout = 10
net.ipv4.tcp_slow_start_after_idle = 0
net.ipv4.tcp_keepalive_time = 60
net.ipv4.tcp_keepalive_intvl = 10
net.ipv4.tcp_keepalive_probes = 6
net.ipv4.tcp_mtu_probing = 1
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_rfc1337 = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
/etc/security/limits.conf
* soft nofile 6553600
* hard nofile 6553600
cat /proc/sys/fs/file-max
1621708
The limits are intentionally completely overkill because it's just a test. Are there some other settings I am missing that would enable more connections? Neither the CPU nor RAM is being stressed so I would like to keep pushing the hardware. Server and clients are all running on AWS EC2 t3a.xlarge instances, if that makes any difference.