[Solved] 30-60% cpu load on ubuntu 18.04 host, win10 idle guest

Discussions related to using VirtualBox on Linux hosts.
Locked
Phil970
Posts: 7
Joined: 2. Sep 2019, 18:51

[Solved] 30-60% cpu load on ubuntu 18.04 host, win10 idle guest

Post by Phil970 »

hello,

i'm a little new using virtualbox on linux, please excuse if i ask stupid questions, or this is an already a resolved thing, i did not find a solution here in the forum.

i've searched the bugtracker and found a ticket regarding a very similiar topic (ticket #18810: Linux Host: High CPU usage with idle Windows 10 guest - sorry, i am not allowed to post urls as a new member here) but i am not using kubuntu, and my cpu-load is not that high (137%).

so i am wondering if it is possible to resolve this by changing some configuration settings of the win 10 guest, or the linux host (which is an i7 8th gen hp probook hardware, 16 gb ram).

the win10 (professional 64bit) was set up with the default settings, except for ram memory, 4gb instead of 2gb.
i installed the guest additions, which made it worse (before it peaked to 35% only).

any help would be very appreciated.

thanks,
phil
Last edited by Phil970 on 8. Sep 2019, 19:11, edited 2 times in total.
Phil970
Posts: 7
Joined: 2. Sep 2019, 18:51

Re: 30-60% cpu load on ubuntu 18.04 host, win10 idle guest

Post by Phil970 »

i forgot to mention that VTx and VTd options are enabled in the UEFI-bios, secure boot is disabled, i don't know if that's good/bad/important in this scope.
version of virtualbox installed: 6.0.10 r132072 (Qt5.9.5)
regards,
phil
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: 30-60% cpu load on ubuntu 18.04 host, win10 idle guest

Post by socratis »

We need to see a complete VBox.log, from a complete VM run, where the problem occurs:
  • Start the VM from cold-boot (not from a paused or saved state) / Observe problem / Shutdown the VM (force close it if you have to).
  • With the VM completely shut down (not paused or saved), right-click on the VM in the VirtualBox Manager and select "Show Log".
  • Save only the first "VBox.log", ZIP it and attach it to your response. See the "Upload attachment" tab below the reply form.
Image
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Phil970
Posts: 7
Joined: 2. Sep 2019, 18:51

Re: 30-60% cpu load on ubuntu 18.04 host, win10 idle guest

Post by Phil970 »

thank you for your reply!

i have done like requested, powered on win10 and waited for the desktop to show up.
did not start any applikation/program, not even the taskmanager (last time there was 3-5% cpu shown, while the host was 30% and higher)
then waited for some cpu-peaks, monitoring on a terminal of the host, i have included one output in the zip.

after about 10 minutes, where top showed mostly 30-35% cpu (and never went below) i powered down the vm.

regards,
phil
Attachments
VBox-log.zip
(30.34 KiB) Downloaded 19 times
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: 30-60% cpu load on ubuntu 18.04 host, win10 idle guest

Post by mpack »

One core for a Win10-64bit VM? That isn't very practical. Assigning two cores might loosen things up.
Phil970
Posts: 7
Joined: 2. Sep 2019, 18:51

Re: 30-60% cpu load on ubuntu 18.04 host, win10 idle guest

Post by Phil970 »

thanks for the hint, but no, i tried that before. things get worse, so i kept it on single for simplifying troubleshooting.
as mentioned, the win 10 is always idle, 2-3% cpu-load, 3-5% when windows is doing little things because of having to be windows.

if i set the win vm to two cores, the ubuntu cpu-load rises to 50-60% all the time instead of 30-35%, regardless of 2 or more cores, only the peaks go up to 130 (2 cores) - 170% (4 cores), and occur a more often.
Phil970
Posts: 7
Joined: 2. Sep 2019, 18:51

Re: 30-60% cpu load on ubuntu 18.04 host, win10 idle guest

Post by Phil970 »

i have searched on the net, look's like there is a fix pointing at somewhat 'hpet' setting, but i don't know where to find the corresponding xml: https://forum.proxmox.com/threads/high- ... 531/page-2

others also refer to this post: https://askubuntu.com/questions/1033985 ... 03/1047397
Last edited by socratis on 10. Sep 2019, 10:54, edited 1 time in total.
Reason: Fixed obfuscated URLs.
Phil970
Posts: 7
Joined: 2. Sep 2019, 18:51

[Solved]Re: 30-60% cpu load on ubuntu 18.04 host, win10 idle guest

Post by Phil970 »

good news!

in a terminal window

Code: Select all

VBoxManage modifyvm "<VM name>" --hpet on
did the trick, cpu load is now a lot better, 7-8%

however, thanks for your support socratis and mpack, very appeciated!
Last edited by socratis on 10. Sep 2019, 10:56, edited 1 time in total.
Reason: Enclosed the information in [code] tag for better readability
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: 30-60% cpu load on ubuntu 18.04 host, win10 idle guest

Post by mpack »

That's the opposite from the effect I would have expected! I would have expected simulating a high precision timer to need more CPU resources than simulating a normal precision one.
Phil970
Posts: 7
Joined: 2. Sep 2019, 18:51

Re: 30-60% cpu load on ubuntu 18.04 host, win10 idle guest

Post by Phil970 »

sounds conclusive. i can't tell if the performance improved on the vm, it's fresh install with no software on it.
but beside lower cpu load the system-fan is pretty quiet now, so there has to be a real impact.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: [Solved] 30-60% cpu load on ubuntu 18.04 host, win10 idle guest

Post by socratis »

Just for completion, the '<HPET enabled="true"/>' setting is the default for all OSX guests in the template defaults.

However, besides my OSX guests that have it 'on', I have it on a couple of other VMs as well: "LiveEFI" (a boot-test only), ChromeOS (I think it was imported), Whonix Gateway/Workstation (definitely imported OVAs). Can't say that it is an often used setting as a solution, but I'm glad it helped.

Thank you for the feedback and the solution, hope someone finds it useful in the future. And thank you for marking the topic as [Solved]... ;)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Marcel Veldhuizen
Posts: 3
Joined: 13. Oct 2012, 10:40

Re: [Solved]Re: 30-60% cpu load on ubuntu 18.04 host, win10 idle guest

Post by Marcel Veldhuizen »

Turning on HPET also did the trick for me, years later.

Host:
Debian 11 (Bullseye)
VirtualBox 6.1
i7-7700T (4 cores, 8 threads)
16 GB RAM

Guest:
Windows 2019 Core
2 CPUs
3 GB RAM

With HPET off, it idles at 50% host CPU. With HPET on, this drops to below 10%.
Doubledown00
Posts: 1
Joined: 12. Oct 2022, 15:05

Re: [Solved] 30-60% cpu load on ubuntu 18.04 host, win10 idle guest

Post by Doubledown00 »

Confirmed, worked for me as well.

Ubuntu running Virtualbox 7 with Windows 10 64bit guest.
Before host CPU utilization was around 36 percent even when guest was 0 - 3 percent.
After the setting, host CPU is 5 - 10 percent at idle.
Locked