Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Brian Jackson <iggy@theiggy.com>
To: Jon Fairbairn <jon.fairbairn@cl.cam.ac.uk>
Cc: kvm@vger.kernel.org
Subject: Re: Poor network performance with cable modem assigned to guest
Date: Fri, 28 Aug 2009 13:35:13 -0500	[thread overview]
Message-ID: <200908281335.13684.iggy@theiggy.com> (raw)
In-Reply-To: <wf7hwnst4d.fsf@calligramme.charmers>

On Friday 28 August 2009 01:14:42 pm Jon Fairbairn wrote:
> I'm experimenting with a virtual router. I did this a few years ago with
> 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,


This is probably your problem here. KVM only emulates a usb1.1 controller, and 
from all reports, it doesn't really do that very well. There have been 
numerous reports of poor performance even for a usb1.1 device. You should 
check the archives to see if there was ever any kind of tips or resolution to 
some of those problems.


> 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.
>
> From the host to the guest I get about 12MB/s using scp, from the guest
> 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 ibm
> 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=C PATH=/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=/[wherever]/livecd-fedora-monogramme.iso,\
> if=ide,media=cdrom,index=2 \
>  -net nic,macaddr=54:52:00:14:4f:18,vlan=0 \
>  -net tap,fd=11,vlan=0 -serial pty -parallel none -usb -vnc 127.0.0.1:0 \
>  -k en-gb \
>  -usbdevice host:0bb2:6098
>
> 0bb2:6098 = Ambit Microsystems Corp. USB Cable Modem (a usb 1.1 device)
>
> Selinux is on on both machines.
>
> I can't think of anything else relevant at the moment.

  reply	other threads:[~2009-08-28 18:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-28 18:14 Poor network performance with cable modem assigned to guest Jon Fairbairn
2009-08-28 18:35 ` Brian Jackson [this message]
2009-08-29  9:24   ` Jon Fairbairn
2009-08-29 17:03     ` Jim Paris
2009-09-12  7:51       ` Jon Fairbairn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200908281335.13684.iggy@theiggy.com \
    --to=iggy@theiggy.com \
    --cc=jon.fairbairn@cl.cam.ac.uk \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox