December 28, 2022

BSD TCP/IP for Kyu - FINWAIT and connection limitations

What people like to talk about is the maximum rate of making short lived connections. The maximum number of connections is simply limited by the size of the TCB table. The rate is limited by the size of the table and the finwait timing.

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.


Have any comments? Questions? Drop me a line!

Kyu / [email protected]