Adjusting the NIC Queue Depth
Purpose
The queue depth indicates the maximum number of data packets in a queue.
If the maximum number is set too small, the queue can easily fill up with data packets, undermining the sending and receiving performance. If set too large, the cache hit rate is affected and resources are wasted. Therefore, adjust the NIC queue depth to the actual service scenario to improve network performance.
Procedure
- Check the default NIC queue depth. Assume that the current NIC name is enp131s0.
1ethtool -g enp131s0

Query the NIC name:
ip a
- Set the NIC queue depth to 4096.
ethtool -G enp131s0 rx 4096 tx 4096
- Check whether the NIC queue depth is updated successfully.
1ethtool -g enp131s0

Parent topic: Hardware Tuning