[libvirt] is it possible to set txqueuelen on vnetX devices automatically

Hello, We have been tuning our libvirt hosts and discovered that setting the txqueuelen on vnetX devices to 2500 we can increase the network throughput by a factor of almost 10. On an eth device it can be set by hand/rc.local with the following instructions http://www.cyberciti.biz/faq/gentoo-centos-rhel-debian-fedora-increasing-txq... . Because vnetX devices are named on a 'first free' basis and they come and go with the guests the rc.local method is not going to work. I think this needs to be done via libvirt or possibly udev, maybe with some kind of hook. Ideally I would like to be able to set this automatically for all vnetX devices when they are created or even better, on a per guest basis. Tim Hughes mailto:thughes@thegoldfish.org

On Mon, Apr 02, 2012 at 05:15:55PM +0100, Tim Hughes wrote:
Hello,
We have been tuning our libvirt hosts and discovered that setting the txqueuelen on vnetX devices to 2500 we can increase the network throughput by a factor of almost 10. On an eth device it can be set by hand/rc.local with the following instructions http://www.cyberciti.biz/faq/gentoo-centos-rhel-debian-fedora-increasing-txq... . Because vnetX devices are named on a 'first free' basis and they come and go with the guests the rc.local method is not going to work. I think this needs to be done via libvirt or possibly udev, maybe with some kind of hook. Ideally I would like to be able to set this automatically for all vnetX devices when they are created or even better, on a per guest basis.
You can probably do this with a hook script: http://libvirt.org/hooks.html Please also file a BZ requesting that this tunable be directly supported by libvirt. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

Thankyou , I should be able to do it with the hooks. I have raised a feature request at BZ809172 Tim Hughes mailto:thughes@thegoldfish.org On 2 April 2012 17:22, Daniel P. Berrange <berrange@redhat.com> wrote:
Hello,
We have been tuning our libvirt hosts and discovered that setting the txqueuelen on vnetX devices to 2500 we can increase the network
On Mon, Apr 02, 2012 at 05:15:55PM +0100, Tim Hughes wrote: throughput
by a factor of almost 10. On an eth device it can be set by hand/rc.local with the following instructions
http://www.cyberciti.biz/faq/gentoo-centos-rhel-debian-fedora-increasing-txq...
. Because vnetX devices are named on a 'first free' basis and they come and go with the guests the rc.local method is not going to work. I think this needs to be done via libvirt or possibly udev, maybe with some kind of hook. Ideally I would like to be able to set this automatically for all vnetX devices when they are created or even better, on a per guest basis.
You can probably do this with a hook script:
Please also file a BZ requesting that this tunable be directly supported by libvirt.
Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/:| |: http://libvirt.org -o- http://virt-manager.org:| |: http://autobuild.org -o- http://search.cpan.org/~danberr/:| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc:|

For anyone interested I have managed to get this working using a udev rule /etc/udev/rules.d/60-vnet.rules KERNEL=="vnet[0-9]", RUN+="/sbin/ifconfig %k txqueuelen 2500" On 2 April 2012 18:03, Tim Hughes <thughes@thegoldfish.org> wrote:
Thankyou , I should be able to do it with the hooks. I have raised a feature request at BZ809172
Tim Hughes mailto:thughes@thegoldfish.org
On 2 April 2012 17:22, Daniel P. Berrange <berrange@redhat.com> wrote:
Hello,
We have been tuning our libvirt hosts and discovered that setting the txqueuelen on vnetX devices to 2500 we can increase the network
On Mon, Apr 02, 2012 at 05:15:55PM +0100, Tim Hughes wrote: throughput
by a factor of almost 10. On an eth device it can be set by hand/rc.local with the following instructions
http://www.cyberciti.biz/faq/gentoo-centos-rhel-debian-fedora-increasing-txq...
. Because vnetX devices are named on a 'first free' basis and they come and go with the guests the rc.local method is not going to work. I think this needs to be done via libvirt or possibly udev, maybe with some kind of hook. Ideally I would like to be able to set this automatically for all vnetX devices when they are created or even better, on a per guest basis.
You can probably do this with a hook script:
Please also file a BZ requesting that this tunable be directly supported by libvirt.
Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
participants (2)
-
Daniel P. Berrange
-
Tim Hughes