Rate This Document
Findability
Accuracy
Completeness
Readability

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

  1. Check the default NIC queue depth. Assume that the current NIC name is enp131s0.
    1
    ethtool -g enp131s0
    

    Query the NIC name:

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