Ramblings of Linux openstack & ceph

Windows Guest - Tap Interface Drops Packets

| Comments

When using qemu-KVM in openstack to support a Windows Guest I noticed On highload hypervisor tap interface of net-highload guest drops many TX packets. The below shows an example of what this looks like from the hypervisor.

1
2
3
4
5
6
7
8
# ifconfig tap27cae737-31
tap27cae737-31 Link encap:Ethernet  HWaddr fe:16:3e:e4:f7:3d
          inet6 addr: fe80::fc16:3eff:fee4:f73d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:9000  Metric:1
	  RX packets:78141166 errors:0 dropped: 0 overruns:0 frame:0
          TX packets:1796 errors:0 dropped:6486 overruns:0 frame:0
          collisions:0 txqueuelen:500
          RX bytes:135844 (135.8 KB)  TX bytes:124682 (124.6 KB)

This was causing the guest to have high jitter and stability problems, after some investigation it was clear that increasing the the txqueuelen on the tap interface resolved the dropped packets problem and the jitter and stability problems in the guest. This was then added to udev using the below so that new created interfaces and existing interfaces would get an increased txqueuelen.

1
2
3
4
5
6
7
8
9
10
11
# cat /etc/udev/rules.d/60-tap.rules
KERNEL=="tap*", RUN+="/sbin/ip link set %k txqueuelen 10000"
#

I used the below to reload udev

udevadm control --reload-rules

I then used the below to apply the rules to already created interfaces:

udevadm trigger --attr-match=subsystem=net

Comments