qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Performance of USB2.0


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] Performance of USB2.0
Date: Tue, 01 Nov 2011 10:37:03 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110927 Red Hat/3.1.15-1.el6_1 Thunderbird/3.1.15

  Hi,

> This means that the likely cause is just that usb emulation / pass
> through causes quite a bit of overhead, which is not unexpected since
> both the usb protocol and the ehci controller interface are both quite
> hard to emulate.

I think the main issue here is that we don't do buffering / pipelining
for bulk transfers at the moment.  We grab a single transfer request
from the guest, pass it to the kernel, when it is done pass it back to
the guest, then look look for the next one.  Instead we could queue up
all transfer requests from the guest to the kernel, which would give a
noticable better throughput.  The qemu usb subsystem can't handle that
(yet).  Fixing that is one the TODO list though.

Additionally all bulk xfer processing is done in the 1000 Hz frame
timer, which combined with the above limits the number of packets to
1000 packets per second (and direction), i.e. with a MTU of 1500 you'll
get 1500 * 1000 = 1.5 MB/s max.  This you can expect to get with the
current code.

Add some protocol and other overhead to the 7 MBit/s you are actually
seeing and the numbers are pretty close, so there isn't much room to
improve things.  The only option I see is to operate the device with an
larger MTU if the usb device and your network setup can handle that.

HTH,
  Gerd



reply via email to

[Prev in Thread] Current Thread [Next in Thread]