Each connection stays in FINWAIT for quite a long time (240 seconds if you adhere closely to the standard). Linux waits 30 seconds. I find that a shorter wait is fine, especially on an endpoint machine on a LAN.
For Kyu, I adjusted the TCPTV_MSL value (for TIME_WAIT) from 60 seconds down to 8 seconds. There is a much longer FIN_WAIT_2 value in the BSD code (10 minutes plus 75 seconds). I have yet to see sockets sitting in this state, so I have left this alone.
Kyu / [email protected]