TCP offload engine or TOE is a technology used in network interface cards (NIC) to offload processing of the entire TCP/IP stack to the network controller. It is primarily used with high-speed network interfaces, such as gigabit Ethernet and 10 Gigabit Ethernet, where processing overhead of the network stack becomes significant.
The term, TOE, is often used to refer to the NIC itself, although circuit board engineers may use it to refer only to the integrated circuit included on the card which processes the TCP headers. TOEs are often suggested as a way to reduce the overhead associated with IP storage protocols such as iSCSI and NFS.
TCP offload engine – what does it do?
The objectives of the TOE are essentially two:
- Freed-up CPU cycles
- Reduction of PCI traffic
In linux you can configure the TOE siomply using the ethtool package.
if you ask the man page for the ethtool program you can find something intersting:
# man ethtool
ethtool(8) - Linux man page
Name
ethtool - Display or change ethernet card settings
.......
.......
Description
ethtool is used for querying settings of an ethernet device and changing them.
ethX is the name of the ethernet device on which ethtool should operate.
Options
ethtool with a single argument specifying the device name prints current settings of the specified device.
.......
.......
-k --show-offload
Queries the specified ethernet device for offload information.
-K --offload
Changes the offload parameters of the specified ethernet device.
rx on|off
Specifies whether RX checksumming should be enabled.
tx on|off
Specifies whether TX checksumming should be enabled.
sg on|off
Specifies whether scatter-gather should be enabled.
tso on|off
Specifies whether TCP segmentation offload should be enabled.
ufo on|off
Specifies whether UDP fragmentation offload should be enabled
gso on|off
Specifies whether generic segmentation offload should be enabled
gro on|off
Specifies whether generic receive offload should be enabled
lro on|off
Specifies whether large receive offload should be enabled
.......
.......
So, if your NIC (for example the eth0 device) supports the TOE you can see its configuration, issueing the following command:
# ethtool -k eth0
Offload parameters for eth0:
rx-checksumming: on
tx-checksumming: on
scatter-gather: on
tcp segmentation offload: on
udp fragmentation offload: off
generic segmentation offload: on
generic-receive-offload: off
To enable an offload, issue the following command:
# ethtool -K ethX <offload-option> on
For example, to enable the generic-receive-offload, run the following command:
# ethtool -K eth0 gro on
That's all
Hi, how are you?
I Have a question, what features is better to enable/disable, for a better network performance. How do i Know wich of this features is better disable, depends of my network ?
Thanks.