Tombuntu

Should you Enable Intel's VT-x in Virtualbox?

Intel VT-x is a set of processor enhancements to improve virtualization performance. In theory, VT-x should allow for near-native speed in a virtual machine. VirtualBox, a popular open source virtualization program, recently added a check box to turn on VT-x or AMD’s AMD-V equivalent. But VirtualBox’s site warns that enabling it may reduce the performance of a virtual machine:

However, we do not make use of these features by default. The reason is very simple: our x86 virtualization is very sophisticated and in most cases it provides significantly better performance than when relying on VT-x. Virtualization products that rely on VT-x are usually much less sophisticated and tuned.

They say there is one benefit to using VT-x, reliability:

In general, with VT-x enabled much less virtualization code from VirtualBox has to be executed which can result in a more reliable system in case there are problems. So if you run into an issue, we recommend to compare the results to a VT-x enabled VM.

Is Intel’s VT-x really slower than VirtualBox’s own software virtualization? I decided to run a few tests to find the answer.

If you want to use VT-x you will need a compatible CPU, look up your own and see if it has VT-x or AMD-V support. The first step is to enable it in your BIOS. In most computers it is disabled in the factory. Dell had disabled this feature on my Dimension 9200, I enabled it in the BIOS setup.

Next, you need to tell VirtualBox to use VT-x. Open the settings windows for your virtual machine and switch to the Advanced tab. Then check the box for VT-x. Intel’s virtualization will now be used to run your virtual machine. You shouldn’t have to worry about flipping it on and off, doing this to my test virtual machine did not cause any trouble.

VirtualBox and VT-x

Now, to the benchmarks. I used VirtualBox 1.5.0 on my Ubuntu 7.04 system. The guest OS was Ubuntu 7.10 Beta with the VirtualBox add-ons installed. I ran each of these tests a couple times to try to get the best possible result with and without VT-x enabled. Here are the results:

Extracting a 400MB Gzipped archive:

glxgears framerate:

Boot up, from Grub to GDM:

In conclusion, it looks like the VirtualBox developers are correct in saying that Intel VT-x is slower than their own software virtualization. Two of my three test resulted in VT-x being slightly faster, but the lead is insignificantly small. VirtualBox without VT-x was much faster booting Ubuntu, and this is probably the most important of the tests.

My recommendation for now would be to leave VT-x off. Turning it on may slightly impact negatively on the performance your virtual machine. But if you have stability problems with VirtualBox, you may want to try enabling it and see if it helps.

Archived Comments

herion

I’d like to see evidence that the virtualization is actually on in the VT tests. With tests results being so close to each other I begin to wonder if VirtualBox is really using Inte’s VT…

Ross

I did a comparison of my own after reading this article to figure out which option is best for backing up DVD’s. I have the Intel Core 2 Quad Q6600 with 4GB RAM and I just did a quick test using DVD Shrink. With the extensions ON, I got a framerate of about 23 fps. With the extensions OFF, I got between 150-220 fps. That’s a huge difference. I thought the whole “our virtualization is so sophisticated it results in better performance than VT-x” thing was just a load of crap, but it’s really true!

Charlie

It would be interesting to get numbers for not only kentsfield, but also for yorkfield with its imporved VT-x support.

varkala

Before using VT-x You must enable it in your bios settings

imi

I was installed a WinXP with that option enabled, and now I recreated my virtual machine, but I cannot check it, as the checkbox is disabled. how can I enable it from the xml config?

Rascal

You guys ever tried installed 64 bit guest on 64 bit host? If you did, you will know what VT is all about.

If you talk about x86, there may or may not be a big difference.

But if you talk about x64, the story is totally reverse. You aint able to install at all.

Mike

If you can install a 32 bit guest on a 64 bit host that’s just fine. I highly doubt anyone needs to run 64 bit guests.
It’d be nice if the host can dole out all that memory beyond 4GB to the guests though, and I bet that that is no problem whatsoever.

Another thing to keep in mind is that VirtualBox is not SMP. The guests apparently only occupy 1 cpu core, no matter how many processes and threads you run inside the guest.
This in my opinion sucks. I can’t for instance run a video converter inside my guest, because although the conversion software is multithreaded, it only saturates one single core.

Vadim

Is this still the case with performance?

zap1206

Since version 2.2.0, the VT-x/AMD-V feature is enabled by default on newly created VMs. This may indicate some progress, but I haven’t made any benchmark.

dgoldsfo

The VirtualBox 2.2 User Manual states:

”… with version 2.2. … the hardware has significantly
improved with the latest Intel and AMD processors, and VirtualBox has also fine-tuned its hardware virtualization support to a degree that it is now faster than software virtualization in many situations.

Given that thius article is the first article that comes up on the Google search “vbox vt-x,” perhaps the author would consider modifying it to state that the text is true only for older versions of VirtualBox.

darthanubis

http://www.virtualbox.org/ticket/4179

VT is not stable in Vbox me thinks?

Frontware

Running Ubuntu 10.04 x64 as guest on Windows 7 x64 host, I can confirm that guest OS is much faster when enabling Intel VT. We use VirtualBox 3.2.8

Dave

Have you done a comparison with a machine using the Nahalem processors? The statement is true with Core2 and older processors. However, Intel has done significant improvements with the Nahalem generation that it is no longer true. If you have core2 duo processor than stick with software virtualization. However if you have a Core i3/i5/i7, then by all means turn the Intel VT on.

stedantai

“The first step is to enable it in your BIOS. In most computers it is disabled in the factory. Dell had disabled this feature on my Dimension 9200, I enabled it in the BIOS setup.”
How much is it possible?

Respond via email