Ticket #2360 (closed defect: fixed)

Opened 10 years ago

Last modified 9 years ago

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

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


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
  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

comment:1 Changed 10 years ago by jkeil

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:

comment:2 Changed 10 years ago by constantin

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 Changed 9 years ago by jkeil

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



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 Changed 9 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in 2.2.0.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use