GRO (Generic Receive Offload) is a mechanism in the kernel network stack, located at the driver layer, which aggregates multiple packets from the network into a large packet and then passes it to the network stack for processing. GRO can significantly reduce CPU overhead and improve long flow throughput.
MAX_GRO_SBS is used to limit the maximum number of different flows that the GRO layer can process.
The goal of MAX_GRO_SKBS is to balance throughput and latency. The default value is 8. For example, if MAX_GRO_SKBS=8, the GRO layer is currently processing 6 different flows. When a packet from the 7th flow arrives, the GRO layer buffers it and attempts to aggregate it. When a packet from the 8th flow arrives, the GRO layer sends all packets from the oldest flow to the upper network stack. This works somewhat like LRU.
A larger value of MAX_GRO_SKBS will probably improve the throughput as it gives more opportunity to merge packets, while at the cost of latency inflation. A smaller value of MAX_GRO_SKBS will reduce the latency but sacrifice the throughput.
GRO (Generic Receive Offload) is a mechanism in the kernel network stack, located at the driver layer, which aggregates multiple packets from the network into a large packet and then passes it to the network stack for processing. GRO can significantly reduce CPU overhead and improve long flow throughput.
MAX_GRO_SBSis used to limit the maximum number of different flows that the GRO layer can process.The goal of
MAX_GRO_SKBSis to balance throughput and latency. The default value is 8. For example, ifMAX_GRO_SKBS=8, the GRO layer is currently processing 6 different flows. When a packet from the 7th flow arrives, the GRO layer buffers it and attempts to aggregate it. When a packet from the 8th flow arrives, the GRO layer sends all packets from the oldest flow to the upper network stack. This works somewhat like LRU.A larger value of
MAX_GRO_SKBSwill probably improve the throughput as it gives more opportunity to merge packets, while at the cost of latency inflation. A smaller value ofMAX_GRO_SKBSwill reduce the latency but sacrifice the throughput.