Work out sysctl connection tuning instantly with clear inputs, formula shown and shareable results.
Every closed outbound connection holds its local port in TIME_WAIT for twice the maximum segment lifetime, so sockets in that state are connections per second times the TIME_WAIT duration. At 8,000 connections per second and 60 seconds, 480,000 sockets far exceed the default ephemeral range of about 28,000 — which is why high-rate proxies must widen the range and reuse connections.
TIME_WAIT accumulation
TIME_WAIT sockets = new connections per second x TIME_WAIT duration; port utilisation = sockets / ephemeral ports
No, it was removed because it breaks connections from behind NAT. Use tcp_tw_reuse for outbound connections, widen the port range, and above all use keep-alive.
Any host doing NAT or stateful filtering tracks each connection, and the table has its own limit. Exceeding it drops packets with a table full message in dmesg.