Chapter 38. Monitoring and tuning the RX ring buffer
Receive (RX) ring buffers are shared buffers between the device driver and Network Interface Card (NIC), and store incoming packets until the device driver can process them.
You can increase the size of the Ethernet device RX ring buffer if the packet drop rate causes applications to report:
- a loss of data,
- cluster fence,
- slow performance,
- timeouts, and
- failed backups.
This section describes how to identify the number of dropped packets and increase the RX ring buffer to reduce a high packet drop rate.
38.1. Displaying the number of dropped packets
ethtool utility enables administrators to query, configure, or control network driver settings.
The exhaustion of the RX ring buffer causes an increment in the counters, such as "discard" or "drop" in the output of
ethtool -S interface_name. The discarded packets indicate that the available buffer is filling up faster than the kernel can process the packets.
This procedure describes how to display drop counters using
To display drop counters for the
$ ethtool -S enp1s0
38.2. Increasing the RX ring buffer to reduce a high packet drop rate
ethtool utility helps to increase the RX buffer to reduce a high packet drop rate.
To view the maximum RX ring buffer size:
# ethtool -g enp1s0 Ring parameters for enp1s0: Pre-set maximums: RX: 4080 RX Mini: 0 RX Jumbo: 16320 TX: 255 Current hardware settings: RX: 255 RX Mini: 0 RX Jumbo: 0 TX: 255
If the values in the
Pre-set maximumssection are higher than in the
Current hardware settingssection, increase RX ring buffer:
To temporary change the RX ring buffer of the
# ethtool -G enp1s0 rx 4080
To permanently change the RX ring buffer create a NetworkManager dispatcher script.
For details, see the How to make NIC ethtool settings persistent (apply automatically at boot) article and create a dispatcher script.
Depending on the driver your network interface card uses, changing in the ring buffer can shortly interrupt the network connection.
- For further information about statistics that cover more reasons for discards of unwanted packets, see the ifconfig and ip commands report packet drops in RHEL7 article.
- Should I be concerned about a 0.05% packet drop rate?