One of the many tasks performed by the networking stack is TCP segmentation
- turning a large chunk of data sent by an application into a series of
packets small enough to fit within the maximum transfer size. The
segmentation task involves performing checksums, making headers to match
each segment, perhaps copying the data to assemble the packet, and
transfering that packet to the network controller. This work is a
significant part of the overhead of sending data over a network.
Some modern controllers, though, have the ability to do segmentation
internally. In this case, the operating system passes in a set of template
headers and a single, large chunk of data; the adaptor handles the rest.
Much of the segmentation work goes away, and a number of smaller I/O
operations turn into one big, fast transfer.
As of 2.5.33, the Linux kernel understands segmentation offloading, and the
e1000 driver supports it; the work was done mostly by Alexey Kuznetsov and
Chris Leech. Some results posted by Scott
Feldman show what this change buys. In general, transfers do not go any
faster, for a simple reason: the Linux network stack was already able to
drive the interface at the speed of the wire. On a send of a long file,
however, CPU usage dropped from 40% to 19%. This seems like an
optimization worth having.
to post comments)