cvs commit: src/sys/netinet in_pcb.c tcp_subr.c tcp_var.h

Mike Silbersack silby at silby.com
Fri Oct 31 23:36:32 PST 2003


Combined with the reduction of the number of timewait structures to 1/5th
of the total number of sockets, this commit signals the end of the need to
lower the msl on busy webservers.  An overabundance of TIME_WAIT sockets
should no longer be a problem.

Thanks go to apachebench and http_load for providing easy ways to create
the troublesome condition in question.

(These changes will not be backported to 4.x because they rely on jlemon's
neato timewait segregation code which hasn't been MFC'd.)

Mike "Silby" Silbersack

On Fri, 31 Oct 2003, Mike Silbersack wrote:

> silby       2003/10/31 23:30:08 PST
>
>   FreeBSD src repository
>
>   Modified files:
>     sys/netinet          in_pcb.c tcp_subr.c tcp_var.h
>   Log:
>   - Add a new function tcp_twrecycleable, which tells us if the ISN which
>   we will generate for a given ip/port tuple has advanced far enough
>   for the time_wait socket in question to be safely recycled.
>
>   - Have in_pcblookup_local use tcp_twrecycleable to determine if
>   time_Wait sockets which are hogging local ports can be safely
>   freed.
>
>   This change preserves proper TIME_WAIT behavior under normal
>   circumstances while allowing for safe and fast recycling whenever
>   ephemeral port space is scarce.
>
>   Revision  Changes    Path
>   1.125     +12 -0     src/sys/netinet/in_pcb.c
>   1.165     +19 -0     src/sys/netinet/tcp_subr.c
>   1.91      +2 -0      src/sys/netinet/tcp_var.h
>


More information about the cvs-src mailing list