• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

TCP - TIME WAIT Sockets

Kvetch

Junior Member
I was tweaking one of our linux web servers and started messing around with tuning TCP and got a little confused.
I had been monitoring (netstat- ant) our tcp connections and would roughly see about an average of 620 connections. Usually about 450-500ish were in the TIME_WAIT state. I have read a few times that reusing and enabling fast recycling of the TW sockets improves performance. Enabling reuse and recycling definitely reduce the number of total number of sockets I have but don't see how that can improve performance. After I changed the kernel settings (sysctl -w net.ipv4.tcp_tw_reuse=1 & sysctl -w net.ipv4.tcp_tw_recycle=1) I am seeing about a 150 connections (netstat -ant|wc) and about an average of 55 stuck in the TIME_WAIT socket.

Since the TIME_WAIT socket is the state after the server's FIN and user's last ACK what performance can this give. Doesn't this just give me the possibility of handling more connections? Since the socket is suppose to stay in TIME_WAIT for twice the Maximum Segment Lifetime or 240secs, what does setting the reuse and recycling end up setting the 2MSL time to? Zero? Couldn't this mean that the user might not get all the data they requested or their data could be mixed up with another request?

Sorry for all the questions but my head hurts trying to figure this out and see if this is actually improving my TCP performance.
Thanks,
Nick -- This is just my Beta Sig. Testers Wanted.
 
Back
Top