tcp sendspace conservation

Matthew Dillon dillon at
Thu Jul 29 22:29:15 PDT 2004

    I see the advantage of being able to adjust the send buffers.  This
    particular patch needs a bit of work though before we would be able
    to safely put it in the base system.  There are a couple of issues.
    First, the patch has no failsafe if network conditions suddenly
    cause latency to increase (something that can happen quite often, 
    especially for people running severs on slower connections).  This
    would result in a huge increase in the send windows for active tcp
    connections and could potentially destabilize the machine.  Second,
    the patch needs to be able to size a buffer down as well as up.  And,
    third, the patch needs some hysteresis and possibly even move the
    sbresize out of the tcp_output path.

    But I really do like the idea of it :-)

					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>

:Allow use of larger tcp send buffers with less concern for mbuf
:consumption.  Adjust send buffers in relation to the active send
:window of the tcp connection; use only the amount of buffer that
:is justified.  I've had very pleasing results with this code on
:heavily loaded production FreeBSD 4.x machines.
:adds the following sysctls:
:net.inet.tcp.sendspace_adjust_enable: Adjust send buffer in relation to active send window
:net.inet.tcp.sendspace_adjust_min: Minimum adjusted send buffer size
:net.inet.tcp.sendspace_adjust_max: Maximum adjusted send buffer size
:net.inet.tcp.sendspace_adjust_add: Additional bytes above the active send window

More information about the Submit mailing list