Poor VirtualBox guest performance with Intel VT-X on Ubuntu 9.10

Since upgrading to Ubuntu 9.10 I’ve noticed poor performance of VirtualBox guests with Intel VT-X hardware virtualisation enabled. This has been noted in a few places, but I didn’t enable VT-x until recently so I can’t be sure that the problem began with Karmic. I can be sure that it is happening to me now.

At the time of this writing, my host OS is Ubuntu 9.10 Karmic 64-bit (actually an Intel Core 2 Duo 2.0 MHZ), with VirtualBox 3.0.10 PUEL edition. I run several 32-bit clients: Ubuntu 6.06 LTS (just in case, we still encounter them at some customer sites), Ubuntu 8.04 LTS, Xubuntu 9.10, and Windows XP SP3 (my actual legal copy that came with the laptop).

I left the Windows XP VM running but idle, and noticed that my keyboard and mouse occasionally skipped, and my CPU worked harder than expected. So I ran a few tests with top in batch mode:

top -b -d 10 -n 10

I then redirected that to a file, waited the 10*10 seconds to finish, and grepped the results. This is with VT-x enabled, and shows only the relevant VM (not the GUI or other VMs):

Here is the same data, after rebooting the guest and disabling VT-x:

Two conclusions:

  1. Software virtualisation uses more RAM. The guest is configured with 1 GB of RAM. With VT-x, this uses 1020 M. Without, it uses 1027 M. Whether that represents a memory overhead of 7M per VM or 0.7% of total RAM per VM, I don’t care. It’s small enough.
  2. Software virtualisation, under these conditions, is more efficient than using VT-x. The average CPU usage with VT-x was 9.2%. Without, it was 6.7%.

Engineering and science students will recall that all experimenters must note potential flaws and sources of error.

  1. This tests only a guest which is completely idle. However, my general impression when doing actual work in the guest VM supports the idle observation.
  2. top isn’t the best measure of performance, but it is indicative.
  3. I only tested a 64-bit Intel host with a 32-bit Windows guest. As always, more data is better.

I also note that my keyboard and mouse no longer skip when the guest OS is busy. Clearly something is up with VT-x and Ubuntu 9.10 hosts. The right thing to do is to perform more tests confirm the initial observations, but I’m not going to spend any more time on this. Software virtualisation, so far, has been plenty fast for me. I’ll just disable VT-x on all guests, and test again after the next upgrade for VirtualBox or the host kernel.

Tags: , , ,

  1. IceTNet’s avatar

    Boom!
    Thanks. I was on the 32-bit architecture prior to 9.04 which is when I switched to 64-bit. I have been having issues with VirtualBox since. I could almost swear that it was related to the USB implementation, however, the issues were completely intermittent. I didn’t even think about the VT-x stuff, I mean It’s tested hardware right… Thanks, I disabled VT-x and the VM flies again.

    There is something with USB and VT-x, though. In my tests, copying 9GB of information to an NTFS thumb drive, Karmic would consistently pause every application (only when a VM was running) and my transfer rate for USB2.0 would drop down to mere 400kbps. Now that I’ve disabled VT-x, no problems yet.

    Thanks again.

    Reply

Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">