Wednesday, March 11, 2009

Improving ESX performance by unloading USB

Many systems have shared interrupts between the USB controller and other components. In order to reduce any performance impact due to the shared interrupts, we can configure the ESX to avoid loading the USB drivers.

  1. Configure the USB controller setting in BIOS to enable USB, so that the system supports USB devices both during and after ESX boot process even if USB drivers are not loaded by the ESX software.

  2. Remove the following USB modules aliases from /etc/modules.conf

  3. alias usb-controller usb-uhci

    alias usb-controller1 ehci-hcd

  4. Save /etc/modules.conf and restart the system
This VMware KB 1290 has more detail information
on how you can tell if your system has shared interrupts.

2 comments:

Andrew Sullivan said...

You don't need to restart the system, just do a "rmmod usb-uhci; rmmod ehci-hcd".

Also, keep in mind that this isn't always necessary, and has the potential for inadvertent side effects...e.g. some KVMs use USB for their connections, so if you disable it, then obviously it's not going to work very well.

If this happens to you, then you would need to ssh into the system and issue "modload usb-uhci; modload ehci-hcd" to cause the kernel to use those modules again (and remove them from /etc/modules.conf). Things get more drastic if you can't ssh into the system...

Byron Zhao said...

Good point. Nowadays, most of the servers don't come with PS/2 ports anymore.