QEMU USB performance problem

Windows (various versions) running under QEMU issues..

QEMU USB performance problem

Postby grahams1 on Tue Aug 01, 2006 1:41 am

Firstly I'd like to thank everyone who's made qemu such a great vm solution. I've been running a XP under Ubuntu 6.0.6 for things like netmeeting access and it work very well.

I recently tried using usb devices and I have it working but it is very, very slow. I wonder if this is to be expected with the current QEMU release 0.8.2 or am I doing something wrong.

Here is my setup

6.0.6 with a 2.6.15-26 kernel
qemu 0.8.2 with kqemu installed
Compaq n610c laptop
winxpsp2 guest
USB devices - Muvo MP3 player, Garmin Map60C GPS

starting qemu with -usb I can ctrl, alt, 2 and see the devices connected to the host with info usbhost. When I add the devices (usb_add host:xxxx:yyyy), the winxp guest can see them and detects the new hardward, all good so far.
When the usb device is being accessed the guest slows down dramatically taking hours rather thans minutes to add the device or then to access it. At the same time qemu CPU usage drops for ~80% to <1% on the host. If I turn off or disconnect the USB device the guest returns to normal performance. Interestingly the clock on the guest is now significantly out of sync with the host as though only minutes passed for the guest, when hours of real time passed.

The same happens with a MP3 player or a Garmin GPS. For the MP3 the easy fix is to tell qemu to see it as a disk drive using -hdc /dev/sda2 etc. but I have no alternative for the Garmin GPS.

Is there something I've missed or is this currently expected with 0.8.2?
grahams1
 
Posts: 5
Joined: Mon Jul 31, 2006 11:15 pm

Postby dignome on Tue Aug 01, 2006 2:27 am

i/o operations on host usb devices is synchronous at the moment. This means read/write ops block the execution of other code in qemu until data/status event arrives. This is also the case with disk i/o which is now being worked on.
User avatar
dignome
helper
 
Posts: 786
Joined: Thu Jan 12, 2006 5:09 am

Postby grahams1 on Tue Aug 01, 2006 3:11 am

Thanks for the reply.

async i/o will be very cool, but is that the cause of the slow usb performance? as accessing disks via qemu is much, much faster than accessing a usb device. If I access the same Muvo MP3 player via usb it shalls the guest, but if I access it by its host mount point (-hdc /dev/sdc1), the performance is quite good.
grahams1
 
Posts: 5
Joined: Mon Jul 31, 2006 11:15 pm

Postby dignome on Tue Aug 01, 2006 3:23 am

grahams1 wrote:async i/o will be very cool, but is that the cause of the slow usb performance?


Yes. Blocking a single-threaded application for up to 50 milliseconds is not good! qemu could be doing something useful during that time like executing guest code.
User avatar
dignome
helper
 
Posts: 786
Joined: Thu Jan 12, 2006 5:09 am

Postby grahams1 on Tue Aug 01, 2006 3:36 am

Thanks, do you know when qemu will support async i/o?

I'd imagine the performance should then be very close to vmplayer.
grahams1
 
Posts: 5
Joined: Mon Jul 31, 2006 11:15 pm

USB connect still useless in 0.9.0

Postby russellr on Tue Sep 25, 2007 7:03 am

Hi,

I have exactly this problem with WinXP under QEMU 0.9.0.

As soon as the USB device is connected (a PocketPC) the emulated machine is so slow as to be unusable.

Disconnect the USB, and it's back to normal.

If I can get this to work, I can switch off my old Windows computer!!!

What's the status of this? I'll glad donate/pay for a USB feature that works.

Otherwise, I guess I've got to go evaluate and buy VMWare.

(Unfortunately, no Linux PIM will sync properly with a PocketPC, so this is the only reason I need any Windows virtual machine.)

regards,
RR
russellr
 
Posts: 2
Joined: Tue Sep 25, 2007 6:57 am

Re: USB connect still useless in 0.9.0

Postby tDeContes on Mon Jun 30, 2008 4:31 pm

russellr wrote:What's the status of this? I'll glad donate/pay for a USB feature that works.


me too

what about this problem ? :-)
is there sth new, for a year ?
tDeContes
 
Posts: 0
Joined: Mon Jun 30, 2008 3:04 pm


Return to Windows under QEMU

Who is online

Users browsing this forum: No registered users and 1 guest