How to change receive queue length of a network interface in Linux?

I finally found that the interface was dropping packets because the driver was configured with a too small Rx descriptor size, which, while working with interrupt coalescence, decides how many packets the driver can hold before it sends the kernel an interrupt. If this value (shown with ethtool -g <interface>) is too small, packets will be dropped before an interrupt can be raised. After I enlarged it with ethtool -G <interface> Rx <a some big value>, no droppings have arisen since.

Thank you everyone.


In the output of ethtool -g you will get the de "Pre-set maximums" and the "Current hardware settings" of your NIC. It should always be recommended to set your settings to the max allowed value to avoid packet drops but more specifically: rx errors or overruns(which can happen in case of burst for example).

Even in some cases, there are driver updates that can increase the "Pre-set maximums" values of the NIC, all depending of the model of course.