36

I've tried all the solutions available on different forums. This is the configuration of my system:

  • Pentium Dual Core T230 (1.73 + 1.73), 2gb RAM
  • Oracle VM VirtualBox ver. 4.3.14 r95030

This is the configuration of my guest:

  • Windows 7 with 1gb of RAM assigned to it and 20gb of hdd

The task manager of my host shows 100% CPU activity even when the guest is idle.

I've also made a DOS machine which is suggested to do nothing and that reduces the CPU activity to about 56% but not as same as it should be when my host and guests are idle.

Another solution available to me was to set the affinity of VirtualBox to a single processor but I'm not able to do that, it denied the access. I'm logged in as administrator and have also checked "Show processes from all users".

1
  • are the guest additions installed on the VM? Are there any background processes that might be running that can cause issues? I have seen screen savers bring VM and their hosts to a halt.
    – Keltari
    Sep 9, 2014 at 19:40

8 Answers 8

13

I had this issue with 2D Video Acceleration enabled. Once I disabled it in the Virtualbox machine settings, the host high CPU usage was gone.

1
  • 5
    In my case, i've changed Graphics Controller to VBoxVGA to VBoxSVGA and disabled 3D Video Acceleration, and %100 cpu usage was gone.
    – sddk
    Oct 15, 2020 at 8:59
10

Also try this alternative where the guy disables "Nested Paging". It worked for me reducing 16% of CPU usage.

If you’re not familiar with this setting. Shut down your virtual machine so that you can edit the settings. Then go to the system tab, click on Acceleration and then uncheck the Enable Nested Paging checkbox. Click OK and start the virtual machine up and you should quickly notice some performance improvements.

5
  • 1
    That worked perfectly on my set-up. I wish your answer was more detailed, but I admit this is the working solution (on my set-up, at least).
    – Clément
    Jan 22, 2018 at 20:51
  • I've added a more detailed explanation from the source link Jan 23, 2018 at 21:44
  • 2
    Perfect, thanks! I went to occasional 100% CPU load while idle to no more than ~20%!
    – Clément
    Jan 24, 2018 at 15:31
  • 7
    Just a warning, this is hardware dependent. On my host, disabling nested paging made the guest totally unusable. Both assigned CPU cores were pinned to 100% just trying to render the login screen and it sat like that for 5min until I shut it down and re-enabled this setting. Apr 22, 2019 at 19:27
  • @theferrit32 Same here. I have Xeons (Silver 4216 × 2) and it was so slow! It took like 35 min. to boot and do some upgrades. Something that should have been 5 min. Sep 9, 2022 at 19:12
7

Your processor does not offer hardware-assisted virtualization so VirtualBox is using software-based techniques, which will use more CPU time and make everything slow.

Read more about it here.

5
  • 8
    even without virtualization support, it should not be using 100% of the processor
    – Keltari
    Sep 9, 2014 at 19:39
  • I presume the OP meant a T2300, which does actually have VT-x. It's not a great chip, tho, otherwise. ark.intel.com/products/27233/… Oct 31, 2016 at 4:00
  • This answer isn't so useful… It highlights a limitation, but does not offer a solution to this problem, even though solutions seem to exist.
    – Clément
    Jan 22, 2018 at 20:53
  • 1
    Please provide the exact pointer of your claim within the given reference. I don't see any backup to your claim.
    – itsafire
    Nov 12, 2020 at 16:02
4

None of the above worked for me with an old Acer laptop, 2 x86 CPU cores; 3 gigs of RAM, running Win XP SP3 Host, and Win 7 guest (on VirtualBox 5.0.24). My "Acceleration" tab is disabled, so "Nested Paging" is not enabled. Also "Remote Display" was by default disabled. The VirtualBox panel had automatically disabled selection of any number of CPU cores, and was stuck on 1 CPU (although my Host system tray clearly shows the involvement of both CPU cores). Also the Windows Update of the guest machine was already disabled.

However, my guest machine took up at least 50% of CPU even when idle.

My solution? The problem solved only when I enabled both the 2D and 3D accelerations in "Settings -> Display -> Screen" and then increased the "Video Memory" in the same tab ("Settings -> Display -> Screen") to the maximum 256 meg allowed.

Once the guest machine received a good deal of video memory from the RAM, the CPU usage dropped to a nice 10% to 20%.

1
  • Thank you! This worked great for me on Windows 10 on a Thinkpad X270. As with you, nested paging and turning off remote display, 3D acc (or ensuring VBoxSVGA) had no effect, but giving it 3D acc and upping video memory did :-) It's now using <¼ of what it did before when idling.
    – unhammer
    May 3, 2021 at 7:25
2

There seem to be many different causes for high CPU use on the host.

In my case, with a Win7 guest, the solution was to disable the "VirtualBox Remote Desktop Extension".

Either in Settings -> Display -> Remote Display: unselect "Enable Server".

Or by starting the machine with the -vrde off option.

1

If you've just set up the machine it's probably windows update. It can't be seen in the process list and is extremely CPU hungry. Had this problem multiple times.

Go to services, find windows update, stop it, see if it drops the CPU usage. If it does consider disabling it completely.

1
  • 2
    Agreed that windows update could be the culprit on a new machine but let it finish, don't disable updates. That is a terrible idea if you plan the VM to persist more than a few days.
    – cornasdf
    Jan 31, 2018 at 23:36
1

On recent versions of VirtualBox, it is possible to set a cap on the amount of CPU usage.

  1. Go to Settings -> System
  2. Click on Processor tab
  3. Use the slider beside Execution Cap to set around 50%, or your desired CPU usage
3
  • This solution is amazing! I had around 25% CPU usage for VirtualBox Headless Frontend for a long time, even though htop reported all four CPUs inside the VM at or near zero usage. And the fans were blowing noisily like an helicopter! I went into settings while the machine was still running and changed the slider from 100% to 12%. I ignored the invalid settings warning, because this is an Ubuntu server and I just use an SSH shell into it from Windows Terminal. Right away I saw the usage drop down below 5% and the fans calmed down. I had ignored this magic setting for a while. Thank you!
    – Nagev
    Oct 11, 2021 at 12:36
  • @Nagev You're welcome.
    – ObiHill
    Oct 15, 2021 at 8:51
  • One downside of this approach though, is that if Windows has other applications consuming a lot of CPU at the same time as other CPU intensive operations in the VM, the VM seems to go almost to a halt. I had to go increase the CPU slider to get a docker build to complete. The scheduler does not seem to do a good job of distributing CPU time evenly, so this is not a change once and leave it forever setting, but it's still great to have it.
    – Nagev
    Oct 15, 2021 at 10:52
1

I have had this issue several times. When I first reboot, the VMs seem to not take much time at all and at some point, they use between 50% and 100% of a host CPU.

All of the tricks mentioned in the existing answers had no positive effects in my case. Actually, some had very detrimental effects (i.e. removing some of the hardware support). Instead, my issue was with my network. I work on an embedded software which generates a stream of UDP packets which it broadcasts. In this case, that's heavy since I broadcast audio & video data. When I stop that software, things go back to their normal/expected levels.

I wanted to add this note here because it is not self evident. The UDP packets are broadcasted on a specific network (10.0.0.255/24) and my VMs are on a different network (192.68.0.0/24). Therefore, I was thinking that those packets would not make it to any of the VMs. However, VirtualBox probably cannot infer that. It probably has to forward all the packets to properly simulate the network.

1
  • 1
    Note: "mentioned above" is not a well-defined term here. Each user can independently choose their sorting of answers. Try it, the field is just below the question (at least in a fully-featured non-mobile web browser). If your answer gets upvoted enough then it may go up even in the default sorting. Linking to an answer is the only firm way to refer to it. Nov 8, 2022 at 14:17

You must log in to answer this question.