From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jon Fairbairn Subject: Poor network performance with cable modem assigned to guest Date: Fri, 28 Aug 2009 19:14:42 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE To: kvm@vger.kernel.org Return-path: Received: from lo.gmane.org ([80.91.229.12]:35498 "EHLO lo.gmane.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751529AbZH1SUF (ORCPT ); Fri, 28 Aug 2009 14:20:05 -0400 Received: from list by lo.gmane.org with local (Exim 4.50) id 1Mh63P-0004M2-01 for kvm@vger.kernel.org; Fri, 28 Aug 2009 20:20:03 +0200 Received: from cpc1-cmbg9-0-0-cust9.cmbg.cable.ntl.com ([82.16.96.10]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 28 Aug 2009 20:20:02 +0200 Received: from jon.fairbairn by cpc1-cmbg9-0-0-cust9.cmbg.cable.ntl.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 28 Aug 2009 20:20:02 +0200 Sender: kvm-owner@vger.kernel.org List-ID: I'm experimenting with a virtual router. I did this a few years ago wit= h Xen and it worked well enough, but then fedora changed and it stopped working, so I gave up for a while. Now I have a machine that supports hardware virtualisation, I thought I'd try again. The setup was done through virt-manager. The network between the host and guest is a virtual bridge. What I've been trying to do is to assign a USB cable modem to the guest, and connect to the internet through that. I'd expect some degradation in performance, especially since there's a firewall on both the virtual router and on the host. Here's some figures wgetting a 12802500 byte file thrice from a nearby web server: Via hardware router: 1009K/s 1008K/s 1010K/s (12 or 13s) Cable modem on host: 1.00M/s 1.00M/s 1.00M/s (ditto) (wait for it) Via virtual router, assigned usb: 21.1K/s (9m 58s!) Now, as I said, I expected some performance hit doing it this way, but = a factor of fifty takes the biscuit. What can be wrong? * * * Details: "Cable modem on host" above just means that I attached the cable modem to the host and configured it as a network device in the usual way. =46rom the host to the guest I get about 12MB/s using scp, from the gue= st to the host (initiated from the host) I get 7MB/s. The host is AMD Athlon(tm) 64 X2 Dual Core Processor 4400+ with 6G of RAM of which 256M is assigned to the guest (the hardware version only has 188M) neither virtual nor hardware router has any swap. The hardware router is the same kernel and nearly (modulo IP addresses etc) the same configuration as the virtual router, running on an old ib= m pc (500MHz pentium III). kernel on host: 2.6.29.6-217.2.16.fc11.x86_64 kernel on routers: 2.6.29.6-217.2.8.fc11.i586 All running fedora 11 (though the routers are very much cut down installations). qemu-kvm-0.10.6 libvirt-0.6.2-15.1.fc11.x86_64 libvirt uses this command to start the virtual machine: LC_ALL=3DC PATH=3D/sbin:/usr/sbin:/bin:/usr/bin /usr/bin/qemu-kvm -S -M= pc \ -m 256 -smp 1 -name monogramme-virtual \ -uuid [redacted] -monitor pty \ -pidfile /var/run/libvirt/qemu//monogramme-virtual.pid \ -boot d \ -drive file=3D/[wherever]/livecd-fedora-monogramme.iso,\ if=3Dide,media=3Dcdrom,index=3D2 \ -net nic,macaddr=3D54:52:00:14:4f:18,vlan=3D0 \ -net tap,fd=3D11,vlan=3D0 -serial pty -parallel none -usb -vnc 127.0.0= =2E1:0 \ -k en-gb \ -usbdevice host:0bb2:6098=20 0bb2:6098 =3D Ambit Microsystems Corp. USB Cable Modem (a usb 1.1 devic= e) Selinux is on on both machines. I can't think of anything else relevant at the moment. --=20 J=C3=B3n Fairbairn Jon.Fairbairn@cl.cam= =2Eac.uk