Speed up VirtualBox enormously with this simple tweak

VirtualBox is a great application for running various operating systems in a window on the desktop. However, the performance is sometimes not so good. In fact, it’s rotten. Why? Here is one solution you may not have considered.

Boost the speed of your PC and get more performance

If you want to try Linux or Windows 10 on your PC, but you do not want to replace the current operating system, it can be installed into a VirtualBox virtual machine.

This application (available for Windows, Mac and Linux) is a bit like an emulator or simulator for a retro computer, and it runs the operating system in a window on the desktop like a regular application.

If you have not yet discovered VirtualBox, you should try it. You can run old operating systems, so if you have a program that only works in Windows XP, you can install XP in a virtual machine and run it. You can even make the window full screen so it looks like you are really running the guest operating system.

A moderately powerful processor is required, but it does not need to be the top of the range. The main requirement is for lots of memory and it is a struggle with just 4GB of RAM, but it can be done. It is best if you have at least 8GB though.

A problem arose when Ubuntu 15.04 was installed in VirtualBox and the performance was terrible. It was like wading through treacle navigating menus, windows and applications. It was almost unusable.

That was strange because various versions of Windows running in virtual machines, were a little slow, but not that bad. Linux Mint 17 was really slow too and it seemed that it was mainly Linux that was running very slowly in a virtual machine, especially Ubuntu 15.04.

It seemed like Ubuntu was working hard and when Ubuntu's System Monitor was run, the CPU usage was a lot higher than it should be at around 60% when no programs were being run.

When Windows Task manager was run (Ubuntu was running in a window on the Windows desktop), and the Performance tab selected, the CPU was idling.

 Ubuntu in VirtualBox

After some thought and experimentation, it was discovered that the Windows power plan was having a serious effect on the performance of the OS in the virtual machine.

The host computer running VirtualBox was a laptop and the power plan was set to Power saver.

Switch power plans to boost performance

In Power Options in the Control Panel there are at least two power plans – Power saver and High performance. With both of these, there are separate settings for when the computer is running on battery power and when it is plugged into the mains supply.

In the Power saver plan I had set the mains power options all to the maximum, with the idea being that when plugged in the laptop would run at full speed, but when on batteries it would use optimal power-saving settings.

Despite setting the battery and mains power settings correctly, or what I thought was correct, the performance of the OS in a virtual machine was still being affected. The CPU was idling at around 0.77GHz and the performance of Ubuntu reflected this.

Normally when extra processing power is required, the CPU speeds up, but it wasn’t doing this and rarely budged from 0.77GHz

When the High performance power plan was selected in the Control Panel, the CPU ran close to its maximum speed and hovered around of 3.29GHz most of the time. Ubuntu in the virtual machine was then able to run at a normal speed and was fast and responsive.

This is obviously the solution to the virtual machine performance problem.

 ubuntu-power2s

You can actually see when I switched from the Power saver to the High performance plan in the Ubuntu System Monitor window and the CPU usage falls rapidly. Instead of working a 0.77GHz CPU really hard, Ubuntu now has access to a 3.29GHz CPU and doesn’t need to work as hard.

So it turned out to be a simple problem, partly caused by selecting the wrong power plan. Make sure that the High power plan is selected when running virtual machines VirtualBox.

I originally thought that this was a bug in VirtualBox, but maybe not. I think it could be VirtualBox respecting the power plans. So if you select a power saver plan then VirtualBox tries to save power by limiting the performance of the virtual machine, which is useful if you are running a laptop on the battery. If you choose a high power plan then it runs it at maximum speed. It makes sense.

Increase the CPU speed

After some more experiments, I found that by raising the minimum processor speed when running on mains power raised the CPU speed. Setting it to 80% made the minimum speed 2GHz on mains power, which was fine for running the virtual machine.

To do this, go to Power Options in the Control Panel and next to the Power saver plan, click Change plan settings.

On the next screen, click Change advanced power settings. Expand Processor power management, Minimum processor state, and set Plugged in to 80% or whatever value gives reasonable performance in the virtual machine.


notepad Save 50% on RAWinfopages online courses! Get 50 Shares A Day - PDF with 50 places to promote your blog/website daily!
Join our FREE newsletter!

 


 

10 Comments on Speed up VirtualBox enormously with this simple tweak

  1. omar david // 2015/07/01 at 20:06 //

    Nice! Worked perfect on my machine with exactly the same specs you mention in your article. Thanks!

  2. Cool! Works the other way round too

  3. Thanks, I have tried this and seems to have improved performance slightly

  4. Seems I cannot see these options (the minimum or maximum fields) in Windows 10.
    Is it possible the options has been changed?

    • In Windows 10, right click the power/battery icon at the right side of the taskbar and select Power Options. If you cannot see all the power plans, click Show additional plans. Select the High Performance power plan.

      In Task Manager on the Performance tab I see the CPU speed and Maximum speed. This may depend on the CPU and its capabilities though. I don’t have access to every computer with every processor. Modern CPUs, especially in laptops, constantly change their speed depending on the work load, whereas years ago a CPU ran at the same speed all the time.

  5. WOW! Greatest tip ever!

  6. Dug through lots of VBox forums, and this post was exactly my issue. Thanks!

  7. Speed up my virtual Debian system with factor 4.

  8. srinivas // 2016/11/05 at 01:33 //

    Running VBox Linux VM on Windows 7. I have 3d acceleration turned on, 8G of memory allocated (its using only a quarter of that), I am on the High Performance plan on the host, but Linux is still dog slow at updating the screen when I ALT-TAB between apps

Comments are closed.