Skip to content

[CaseStudy] MAX_GRO_SKBS #20

@zhongjiechen

Description

@zhongjiechen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions