From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Furniss Date: Thu, 09 May 2013 10:17:05 +0000 Subject: Re: Poor performance of ingress filter for separate VMs Message-Id: <518B77A1.5020803@gmail.com> List-Id: References: <000f01ce4c17$76dfa490$649eedb0$@JAMMConsulting.com> In-Reply-To: <000f01ce4c17$76dfa490$649eedb0$@JAMMConsulting.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org Neil Aggarwal wrote: > Hello everyone: > > I have a CentOS server running two virtual machines using KVM. > Each machine has its own virtual device since I am using bridged > networking. > > I am trying to allocate bandwidth to each virtual machine using tc. > > I have these rules set up: > > /sbin/tc qdisc add dev v1262 ingress handle ffff: > /sbin/tc filter add dev v1262 parent ffff: protocol ip prio 50 u32 match ip > src 0.0.0.0/0 police rate 5mbit burst 500k mtu 3100 drop flowid :1 > > /sbin/tc qdisc add dev v1263 ingress handle ffff: > /sbin/tc filter add dev v1263 parent ffff: protocol ip prio 50 u32 match ip > src 0.0.0.0/0 police rate 5mbit burst 500k mtu 3100 drop flowid :1 > > You can see them when I do a qdisc ls: > > qdisc ingress ffff: dev v1262 parent ffff:fff1 ---------------- > qdisc ingress ffff: dev v1263 parent ffff:fff1 ---------------- > > The problem is when v1262 is doing a large upload, v1263 gets starved. > If I remove the ingress qdisc, v1263 runs at full speed regardless of what > v1262 is doing. > Its as if the two devices are using the same queue. I did not think that > would happen since > they are totally separate devices. > > Any ideas what is happening here? I've never tested with a virtual machine so don't know. I have suggested mtu 3100 in the past as it happened to work on a quick test on a real 100m nic - maybe for vm you need to go higher, or just turn off any sort of offload for the virtual device with ethtool and see if that helps. ethtool -k to see what the settings are and eg. ethtool -K gro off