TSO, UFO, GSO, LRO, GRO and RSS introduction

http://blog.chinaunix.net/uid-20639775-id-3529535.html

Original: Reprinted from:http://www.bsdmap.com/2012/02/22/to tso, ufo, gso, lro, gro and rss introduction/


ethtool -k , ethtool –show-offload , or you can see The offload features of many network interfaces, for example:

$ sudo 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: on
large-receive-offload: off

These offload features are for Improve network receiving/sending performance. TSO, UFO, and GSO correspond to network transmission, and in the receiving direction correspond to LRO and GRO.

TSO

TSO(TCP Segmentation Offload) is a kind of use The network card fragments TCP packets to reduce the CPU load. It is sometimes called LSO (Large segment offload). TSO is for TCP and UFO is for UDP. If the hardware supports the TSO function, the TCP check calculation and the Scatter Gather function supported by the hardware are also required.

GSO

GSO(Generic Segmentation Offload), which is more than TSO General purpose, the basic idea is to postpone data fragmentation as much as possible until it is sent to the network card driver. At this time, it will check whether the network card supports the fragmentation function (such as TSO, UFO), if it supports sending directly to the network card, if it does not support, it will fragment Then send it to the network card. In this way, large data packets only need to go through the protocol stack once, instead of being divided into several data packets to go separately, which improves efficiency.

LRO

LRO(Large Receive Offload), through receiving The multiple TCP data is aggregated into a large data packet, and then passed to the network protocol stack for processing, in order to reduce the processing overhead of the upper layer protocol stack, and improve the system’s ability to receive TCP data packets.

GRO

GRO(Generic Receive Offload), the basic idea and LRO Similarly, it overcomes some shortcomings of LRO and is more versatile. Subsequent drivers use the GRO interface instead of LRO.

RSS

RSS (Receive Side Scaling), is a network card The new feature, commonly known as multi-queue. A network card with multiple RSS queues can divide different network streams into different queues, and then allocate these queues to multiple CPU cores for processing, thereby distributing the load and making full use of the capabilities of multi-core processors.

You can use the following command to close the corresponding parameter:

/usr/ sbin/ethtool-K eth1 gro off /usr/sbin/ethtool-K eth1 lro off /usr/sbin/ethtool-K eth1 tso off

/usr/sbin/ethtool-K eth1 gro off /usr/sbin/ethtool-K eth1 lro off /usr/sbin/ethtool-K eth1 tso off

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 1813 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.