From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: bridge with a bonded device - slow rate in the guest machine Date: Fri, 20 May 2011 07:51:28 -0600 Message-ID: <4DD671E0.80801@cisco.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org To: =?KOI8-R?Q?=E1=CC=C5=CB=D3=C5=CA_=EB=C1=DB=C9=CE?= Return-path: Received: from sj-iport-3.cisco.com ([171.71.176.72]:43228 "EHLO sj-iport-3.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932916Ab1ETNv3 (ORCPT ); Fri, 20 May 2011 09:51:29 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 05/20/11 03:12, =E1=CC=C5=CB=D3=C5=CA =EB=C1=DB=C9=CE wrote: > Hi. > Server with two gigabit NIC's. I'm trying to setup a bridge with a > bonded device (2 links,balance-rr). > host# cat /etc/network/interfaces > auto lo > iface lo inet loopback >=20 > auto bond0 > iface bond0 inet manual > slaves eth0 eth1 > bond_mode balance-rr > bond_miimon 100 > bond_updelay 200 > bond_downdelay 200 >=20 > auto br0 > iface br0 inet static > address > netmask > gateway > bridge_ports bond0 > bridge_stp off > bridge_fd 0 > bridge_maxwait 0 >=20 > host# cat /etc/modprobe.d/bonding.conf > alias bond0 bonding >=20 > On this host I've created few kvm virtual machines. It's created with > next options. >=20 > host# virt-install \ > --name=3D"name" \ > --ram=3D512 \ > --arch=3Dx86_64 \ > --vcpus=3D1 \ > --cpuset=3D0 \ > --os-type=3Dlinux \ > --os-variant=3D"debiansqueeze" \ > --hvm \ > --virt-type kvm \ > --accelerate \ > --cdrom=3D/iso/debian-6.0.1a-amd64-netinst.iso \ > --disk path=3D/dev/vg00/name,bus=3Dvirtio,cache=3Dnone,format= =3Draw,sparse=3Dfalse > \ > --network bridge=3Dbr0,model=3Dvirtio \ > --autostart >=20 > When I try to download a file I can see that the rate is very low: >=20 > guest# wget http://mirror.yandex.ru/archlinux/iso/2010.05/archlinux-2= 010.05-core-dual.iso > --2011-05-20 12:47:16-- > http://mirror.yandex.ru/archlinux/iso/2010.05/archlinux-2010.05-core-= dual.iso > Resolving mirror.yandex.ru... 213.180.204.183, 2a02:6b8:0:201::1 > Connecting to mirror.yandex.ru|213.180.204.183|:80... connected. > HTTP request sent, awaiting response... 200 OK > Length: 691011584 (659M) [application/x-iso9660-image] > Saving to: =E2-=9Carchlinux-2010.05-core-dual.iso=E2-? >=20 > 0% [ > ] 79,686 7.97K/s eta 20h 24m >=20 > But, if i try to get this file from host machine, I can see that the > rate is normal: >=20 > host# wget http://mirror.yandex.ru/archlinux/iso/2010.05/archlinux-20= 10.05-core-dual.iso > --2011-05-20 08:56:35-- > http://mirror.yandex.ru/archlinux/iso/2010.05/archlinux-2010.05-core-= dual.iso > Resolving mirror.yandex.ru... 213.180.204.183, 2a02:6b8:0:201::1 > Connecting to mirror.yandex.ru|213.180.204.183|:80... connected. > HTTP request sent, awaiting response... 200 OK > Length: 691011584 (659M) [application/x-iso9660-image] > Saving to: =E2-=9Carchlinux-2010.05-core-dual.iso=E2-? >=20 > 21% [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D> > ] 150,837,182 26.5M/s eta 24s >=20 >=20 > If I broke bonding in the host machine and try to setup bridging on > device eth0 without bonding, the rate in both host and virtual machin= e > is normal. Have you tried active-backup mode instead of balanced-rr for the bondin= g device? I have used that setup in the past and did not see any performance issues with it. David >=20 > Host machine: > CPU: model name : Intel(R) Xeon(R) CPU E5504 @ 2.00GH= z > KVM: > # dpkg -l | grep kvm > ii qemu-kvm 0.12.5+dfsg-5+squeeze1 > Full virtualization on x86 hardware > Kernel: > # uname -a > Linux unixmon 2.6.32-5-amd64 #1 SMP Mon Mar 7 21:35:22 UTC 2011 x86_6= 4 GNU/Linux > Guests: > All guest - GNU/Debian 6.0.1a amd64 with 2.6.32-5-amd64 #1 SMP Mon Ma= r > 7 21:35:22 UTC 2011 x86_64 GNU/Linux kernel > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >=20