cvs commit: src/sys/netinet tcp_subr.c tcp_timer.h

Garance A Drosehn gad at
Wed Aug 1 18:58:00 UTC 2007

At 10:11 PM +0000 7/31/07, Peter Wemm wrote:
>   The old behavior (with hz=100) caused the connection to typically
>   drop between 90 and 110 seconds of getting no response.
>   Now boot with kern.hz=1000 (default).  The same test causes the
>   ssh session to drop after just 9-10 seconds.  This is a big deal
>   on a wifi connection.
>   With kern.hz=1000, change sysctl net.inet.tcp.rexmit_min from 3
>   to 30.  Note how it behaves the same as when HZ was 100.  Also,
>   note that when booting with hz=100, net.inet.tcp.rexmit_min
>   *used* to be 30.

>   As a workaround, to avoid rebooting or rebuilding a kernel, you
>   can run "sysctl net.inet.tcp.rexmit_min=30" and add
>   "net.inet.tcp.rexmit_min=30" to /etc/sysctl.conf.  This is safe
>   to run from 6.0 onwards.

Oh man, this is extremely excellent.  I have a chat server I run,
and when I tried to upgrade that machine from 4.x to 6.x last year,
it started seeing a lot of dropped connections.  At the time I did
a panic fallback to running 5.x instead, which worked okay enough.
I just made a second attempt at upgrading to the latest 6.x on last
Monday (9 days ago), and once again the server has been dropping
connections much more often than it should.  But still, it only
drops about 50 connections a day (out of maybe a thousand), and I
didn't have the slightest idea how I could track the problem down.

Checking sysctls, the old server does have tcp.rexmit_min=30 while
the new one has it at 3.  If changing that back to 30 will solve
the problem with dropped connections, it will be great!  I really
don't want to be forced back to 5.x yet again!

Garance Alistair Drosehn     =               drosehn at
Senior Systems Programmer               or   gad at
Rensselaer Polytechnic Institute;             Troy, NY;  USA

More information about the cvs-src mailing list