VirtualBox

Opened 16 years ago

Closed 15 years ago

#2360 closed defect (fixed)

USB 2.0 support consumes 100% of a CPU even if guest is idle

Reported by: Constantin Gonzalez Owned by:
Component: USB Version: VirtualBox 2.0.2
Keywords: cpu idle usb consumption usage Cc:
Guest type: Solaris Host type: Mac OS X

Description

On a MacBook Pro running VirtualBox 2.0.2 with enabled USB support (including 2.0 EHCI support) and an OpenSolaris guest, the VirtualBox process on the MacOS X side always consumes close to 100% CPU time, even if the guest is idle.

After turning off 2.0 EHCI support while leaving on USB support and rebooting the VM, CPU usage drops to a minimum of about 33% of a CPU even if the guest is idle.

After turning off USB support completely, VirtualBox behaves as expected, with CPU usage in the range of 12% for an idle guest OS.

This behaviour should be easily reproducible, therefore I haven't attached a VBox.log file for the moment:

  1. Install VirtualBox 2.0.2 on a Mac OS X host.
  2. Set up an OpenSolaris virtual machine with USB support fully enabled.
  3. Boot up the OpenSolaris CD from opensolaris.org
  4. Wait until the desktop is loaded and the guest OS is idle (verify with vmstat in an OpenSolaris terminal).
  5. Observe VirtualBox's CPU consumption using the Mac OS X Activity Monitor Utility.

Let me know if you need more details or a VBox.log file after all.

Change History (4)

comment:1 by jkeil, 16 years ago

What build of opensolaris is that?

In the past, Solaris' ehci and uhci driver modules did poll the usb root hub controller every 30 milliseconds for port changes; with snv_95 (or newer) that was lowered to 256 milliseconds:

http://bugs.opensolaris.org/view_bug.do?bug_id=6723639 http://bugs.opensolaris.org/view_bug.do?bug_id=6723643

comment:2 by Constantin Gonzalez, 16 years ago

In my case, I saw the issue with an snv_98 build of OpenSolaris:

SunOS alice 5.11 snv_98 i86pc i386 i86pc Solaris

comment:3 by jkeil, 16 years ago

Almost the same happens with Windows XP as host. As soon as USB 2.0 is enabled for a Solaris guest the host os consumes almost 100% of one cpu core.

What I can't reproduce on a Windows XP host is the cpu usage by USB 1.x; I observe that the host is almost idle.

I've noticed that the Solaris guest is sharing the interrupt vector for the e1000g0 nic device with the USB 2.0 ehci controller. Check with:

echo ::interrupts | mdb -k

and

intrstat

I have the IOAPIC enabled, and e1000g_intr and ehci_intr are sharing vector 19.

I suspect that some (small?) amount of guest kernel cpu time could be saved if each device has it's own interrupt vector.

comment:4 by Frank Mehnert, 15 years ago

Resolution: fixed
Status: newclosed

Fixed in 2.2.0.

Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy