Reset Search



KB44484 - Packet drops on KVM host interface

« Go Back


Last Modified Date5/22/2020 3:29 PM
When a vTM VA (or as software in a VM) or PCS VA is running on KVM, high load may result in packet drops on the KVM host.
Problem or Goal

To find the interface with drops, on the KVM host run this command several times:

 $ cat /proc/net/dev | awk '{print $1 " " $13}' | sort -n -k 2

(Note that depending on virtual machines' network config, any dead/unused virtual interfaces may drop all packets sent to them, which can be ignored)

(Note that the 13th column of /proc/net/dev is the same value as ifconfig's dropped value.)

Once the interface has been found, then increase the txqueuelen setting on the interface, which should stop the packets being dropped.  Check the current txqueuelen setting of the interface, assuming tap0 here:

$ ifconfig tap0
tap0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::ec4a:f7ff:fe48:e5ef  prefixlen 64  scopeid 0x20<link>
        ether ee:4a:f7:48:e5:ef  txqueuelen 1000  (Ethernet)
        RX packets 184347963  bytes 54684996334 (54.6 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 731572931  bytes 98286819441 (98.2 GB)
        TX errors 0  dropped 5947 overruns 0  carrier 0  collisions 0

Monitor the packet drop rate of increase, and increase the txqueuelen setting until it stops.  E.g. to set it to 4000, run this command as root:

# ifconfig tap0 txqueuelen 4000


# ip link set dev tap0 qlen 4000

This would need to be made persistent across reboots.

Related Links
Attachment 1 
Created ByLaurence Darby



Was this article helpful?



Please tell us how we can make this article more useful.

Characters Remaining: 255