Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Mar 2007 15:27:52 +0100
From:      Andre Oppermann <andre@freebsd.org>
To:        freebsd-current@freebsd.org,  freebsd-net@freebsd.org
Cc:        gallatin@freebsd.org, rwatson@freebsd.org, kmacy@freebsd.org
Subject:   Large TCP send socket buffer optimizations
Message-ID:  <45E6E2E8.5060408@freebsd.org>

next in thread | raw e-mail | index | archive | help
With the TCP socket buffer autosizing and generally larger socket buffers
for high bandwidth and high delay connections tcp_output() has become
increasingly inefficient for sending segments.  For every segment sent it
is traversing the entire socket buffer mbuf chain until it finds the offset
to continue from.  Usually this is close to the end of the chain.  Once it
got past a few dozen mbufs it starts to bust the CPU caches and performance
starts to fall off.

This patch solves the problem by maintaining an offset pointer in the socket
buffer to give tcp_output() the closest mbuf right away avoiding the traversal
from the beginning.

With this patch we should be able to compete nicely for the Internet land
speed record again.

The patch is here:

  http://people.freebsd.org/~andre/sockbuf_sndptr-20070301.diff

Any testing, especially on 10Gig cards, and feedback appreciated.

-- 
Andre




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45E6E2E8.5060408>