* Poor performance of ingress filter for separate VMs
@ 2013-05-08 18:11 Neil Aggarwal
2013-05-09 10:17 ` Andy Furniss
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Neil Aggarwal @ 2013-05-08 18:11 UTC (permalink / raw)
To: lartc
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?
Thanks,
Neil
--
Neil Aggarwal, (972)834-1565, http://UnmeteredVPS.net/centos
Virtual private server with CentOS 6 preinstalled
Unmetered bandwidth = no overage charges
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Poor performance of ingress filter for separate VMs
2013-05-08 18:11 Poor performance of ingress filter for separate VMs Neil Aggarwal
@ 2013-05-09 10:17 ` Andy Furniss
2013-05-09 11:00 ` Andy Furniss
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Andy Furniss @ 2013-05-09 10:17 UTC (permalink / raw)
To: lartc
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 <devname>
to see what the settings are and eg.
ethtool -K <devname> gro off
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Poor performance of ingress filter for separate VMs
2013-05-08 18:11 Poor performance of ingress filter for separate VMs Neil Aggarwal
2013-05-09 10:17 ` Andy Furniss
@ 2013-05-09 11:00 ` Andy Furniss
2013-05-10 16:45 ` Neil Aggarwal
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Andy Furniss @ 2013-05-09 11:00 UTC (permalink / raw)
To: lartc
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 <devname>
to see what the settings are and eg.
ethtool -K <devname> gro off
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: Poor performance of ingress filter for separate VMs
2013-05-08 18:11 Poor performance of ingress filter for separate VMs Neil Aggarwal
2013-05-09 10:17 ` Andy Furniss
2013-05-09 11:00 ` Andy Furniss
@ 2013-05-10 16:45 ` Neil Aggarwal
2013-05-10 20:37 ` Andy Furniss
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Neil Aggarwal @ 2013-05-10 16:45 UTC (permalink / raw)
To: lartc
Andy:
> turn off any sort of offload for the virtual device with ethtool and see
> if that helps.
When I go to the host and type:
ethtool -k v1262
It gives me this output:
Offload parameters for v1262:
rx-checksumming: on
tx-checksumming: on
scatter-gather: on
tcp-segmentation-offload: on
udp-fragmentation-offload: on
generic-segmentation-offload: off
generic-receive-offload: off
large-receive-offload: off
The generic-receive-offload is already off.
The v1263 device also has the same result.
Any other ideas?
Thanks,
Neil
--
Neil Aggarwal, (972)834-1565, http://UnmeteredVPS.net/centos
Virtual private server with CentOS 6 preinstalled
Unmetered bandwidth = no overage charges
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Poor performance of ingress filter for separate VMs
2013-05-08 18:11 Poor performance of ingress filter for separate VMs Neil Aggarwal
` (2 preceding siblings ...)
2013-05-10 16:45 ` Neil Aggarwal
@ 2013-05-10 20:37 ` Andy Furniss
2013-05-10 23:40 ` Neil Aggarwal
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Andy Furniss @ 2013-05-10 20:37 UTC (permalink / raw)
To: lartc
Neil Aggarwal wrote:
> Andy:
>
>> turn off any sort of offload for the virtual device with ethtool and see
>> if that helps.
>
> When I go to the host and type:
> ethtool -k v1262
>
> It gives me this output:
>
> Offload parameters for v1262:
> rx-checksumming: on
> tx-checksumming: on
> scatter-gather: on
> tcp-segmentation-offload: on
> Any other ideas?
Ahh, tso will also need to be turned off if you want to see normal/real
sized packets.
I don't know if it will help your specific problem, but generally now I
see it's on for virtual devices I think turning off will be better than
using a large mtu with policers just to to avoid dropping too much at once.
If it doesn't help then see what's going on with tcpdump.
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: Poor performance of ingress filter for separate VMs
2013-05-08 18:11 Poor performance of ingress filter for separate VMs Neil Aggarwal
` (3 preceding siblings ...)
2013-05-10 20:37 ` Andy Furniss
@ 2013-05-10 23:40 ` Neil Aggarwal
2013-05-11 11:41 ` Andy Furniss
2013-05-11 14:59 ` Neil Aggarwal
6 siblings, 0 replies; 8+ messages in thread
From: Neil Aggarwal @ 2013-05-10 23:40 UTC (permalink / raw)
To: lartc
Andy:
> Ahh, tso will also need to be turned off if you want to see normal/real
> sized packets.
I tried this:
ethtool -K v1262 tso off
I get back this reponse:
Cannot set device tcp segmentation offload settings: Operation not supported
I guess I can't change the settings for a virtual device.
Neil
--
To unsubscribe from this list: send the line "unsubscribe lartc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Poor performance of ingress filter for separate VMs
2013-05-08 18:11 Poor performance of ingress filter for separate VMs Neil Aggarwal
` (4 preceding siblings ...)
2013-05-10 23:40 ` Neil Aggarwal
@ 2013-05-11 11:41 ` Andy Furniss
2013-05-11 14:59 ` Neil Aggarwal
6 siblings, 0 replies; 8+ messages in thread
From: Andy Furniss @ 2013-05-11 11:41 UTC (permalink / raw)
To: lartc
Neil Aggarwal wrote:
> Andy:
>
>> Ahh, tso will also need to be turned off if you want to see normal/real
>> sized packets.
>
> I tried this:
> ethtool -K v1262 tso off
>
> I get back this reponse:
> Cannot set device tcp segmentation offload settings: Operation not supported
>
> I guess I can't change the settings for a virtual device.
Strange, maybe a KVM/whatever virtual driver issue - I guess there are
places you can ask.
FWIW I just noticed lo has tso enabled and it turns off OK, so it
doesn't have to be a real nic.
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: Poor performance of ingress filter for separate VMs
2013-05-08 18:11 Poor performance of ingress filter for separate VMs Neil Aggarwal
` (5 preceding siblings ...)
2013-05-11 11:41 ` Andy Furniss
@ 2013-05-11 14:59 ` Neil Aggarwal
6 siblings, 0 replies; 8+ messages in thread
From: Neil Aggarwal @ 2013-05-11 14:59 UTC (permalink / raw)
To: lartc
Andy:
> Strange, maybe a KVM/whatever virtual driver issue - I guess there are
> places you can ask.
I just figured out libvirt has bandwidth controls in the guest machine's
configuration. I tried it and it worked. Looking at the qdisc ls report,
it apparently uses tc to achieve the limiting so I am not sure why my
manual commands did not work.
Thanks for your help,
Neil
--
Neil Aggarwal, (972)834-1565, http://UnmeteredVPS.net/centos
Virtual private server with CentOS 6 preinstalled
Unmetered bandwidth = no overage charges
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-05-11 14:59 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-08 18:11 Poor performance of ingress filter for separate VMs Neil Aggarwal
2013-05-09 10:17 ` Andy Furniss
2013-05-09 11:00 ` Andy Furniss
2013-05-10 16:45 ` Neil Aggarwal
2013-05-10 20:37 ` Andy Furniss
2013-05-10 23:40 ` Neil Aggarwal
2013-05-11 11:41 ` Andy Furniss
2013-05-11 14:59 ` Neil Aggarwal
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.