High-throughput Linux production servers—such as reverse proxies, Kubernetes ingress controllers, streaming media endpoints, and distributed storage nodes—routinely process millions of network packets per second. When network traffic experiences sudden micro-bursts, servers frequently drop incoming packets despite exhibiting low CPU utilization and having ample physical memory headroom. System administrators often misdiagnose this issue as an upstream network switch or cable failure. In reality, the packet drops almost always occur inside the physical Network Interface Card (NIC) driver buffer queues. The network card utilizes circular memory arrays called ring buffers to hold raw packet frames before the kernel’s softirq subsystem can process them via NAPI. Paired with hardware offload features, the native ethtool utility provides total control over NIC hardware parameters. Mastering ethtool ensures your Linux server handles high-volume network bursts without packet loss.
Understanding NIC Ring Buffers and Hardware Offloading
When an incoming network packet arrives at a physical NIC port, the controller transfers the packet frame directly into host RAM via Direct Memory Access (DMA). The memory addresses holding these incoming frames are managed by the Receive (RX) Ring Buffer.
If incoming packet bursts arrive faster than the operating system can process interrupts and drain the ring buffer, the circular queue overflows. The NIC hardware drops incoming frames silently before the operating system kernel ever has an opportunity to inspect them. Expanding the RX ring buffer allocates larger memory queues, absorbing packet bursts during traffic spikes.
Complementing ring buffers are hardware offloads that transfer computational tasks from the host CPU directly to specialized network ASIC silicon:
- TCP Segmentation Offload (TSO) & Generic Segmentation Offload (GSO): Allows the kernel network stack to pass massive data chunks (up to 64 KB) to the network hardware, which slices them into standard MTU packets (1500 bytes), eliminating thousands of CPU context switches.
- Generic Receive Offload (GRO): Reassembles contiguous incoming MTU packets into single large packets before passing them up the TCP/IP stack.
- Checksum Offloading (RX/TX): Calculates and verifies TCP/UDP packet checksums directly in NIC hardware.
Auditing Network Dropped Packets and Interface Statistics
Before modifying buffer allocations, verify whether your network interface is actively experiencing hardware-level ring buffer discards.
- Open a terminal and identify your active network interface (e.g.
eth0,ens192, orenp3s0) usingip link. - Query the hardware driver statistics using
ethtool -S:sudo ethtool -S eth0 | grep -E "drop|discard|over|miss" - Inspect the output counters:
rx_dropped:Packets dropped due to buffer exhaustion.rx_missed_errors:Frames discarded because the NIC ran out of host buffer descriptors.rx_fifo_errors:Overflows occurring directly within the physical on-chip FIFO memory.
- If these metrics increment during peak traffic hours, expanding your RX ring buffer will immediately stabilize packet ingestion.
Inspecting Current and Maximum Ring Buffer Allocations
The -g flag reveals both the hardware capabilities of your network card and its active buffer assignments.
sudo ethtool -g eth0
The command outputs two structured blocks:
- Pre-set maximums: The maximum buffer queue depths supported by your NIC hardware and firmware (frequently
4096descriptors for enterprise 10GbE/25GbE adapters like Intel X540 or Mellanox ConnectX). - Current hardware settings: The buffer allocation currently active (often set to a conservative default such as
256or512).
Expanding RX and TX Ring Buffers Using ethtool -G
To prevent buffer overrun drops during traffic spikes, expand the active buffer allocation to the maximum supported hardware limit.
sudo ethtool -G eth0 rx 4096 tx 4096
Verify the new settings immediately by re-running sudo ethtool -g eth0. The current hardware settings should now reflect 4096. While larger buffers consume slightly more physical RAM (typically a few megabytes per queue), the expanded headroom prevents micro-burst packet loss.
Note: Modifying ring buffers causes a momentary interface reset (a fraction of a millisecond) as the driver resets memory allocations. Do not execute this command during high-volume production transactions.
Auditing and Configuring Hardware Offloading Features
The -k flag queries the active state of all hardware offloading features supported by your network controller.
sudo ethtool -k eth0 | grep -E "segmentation|generic-receive|scatter-gather"
To enable high-performance offloading features that may be disabled on conservative virtual machine templates, use the -K flag:
sudo ethtool -K eth0 tso on gso on gro on rx on tx on
Activating TSO and GRO reduces server CPU load significantly while increasing network throughput across gigabit and multi-gigabit connections.
Persisting ethtool Parameters Across System Reboots
By default, parameters configured via ethtool are volatile and reset upon system reboot. You must persist them via your distribution’s network configuration manager.
Persisting via systemd-networkd
If your distribution uses systemd-networkd, append buffer directives to your link file (e.g. /etc/systemd/network/10-eth0.link):
[Match]
OriginalName=eth0
[Link]
ReceiveBufferSize=4096
TransmitBufferSize=4096
Persisting via NetworkManager (nmcli)
On modern distributions running NetworkManager (RHEL, Rocky, Fedora, Ubuntu):
sudo nmcli connection modify "System eth0" ethtool.ring-rx 4096 ethtool.ring-tx 4096
sudo nmcli connection up "System eth0"
Optimising NIC ring buffers and offloads with ethtool eliminates silent packet discards, ensuring maximum network throughput and ultra-low latency across Linux server infrastructure.