Windows 10 VM CPU Usage


Recommended Posts

Decided to set up a Windows 10 VM last week. Linux with Libre Office just wasn't cutting it for my needs.

 

Installed the latest Windows 10 1803 configured with 4GB RAM and 4 cores. My system only has 16GB RAM so I'm a bit limited in that regard. I noticed right away that even when my VM is idle that according to top it seems to be using between 20-25% CPU constantly. Running on an i5 3470, so only 4 cores.

 

Any ideas what could be causing this?

Link to comment

I wonder if it is related to Spectre/Meltdown mitigation changes in windows.

 

i remember a link to a short presentation on a thread about Spectre was posted recently on one of the unRaid forums explaining why they can show up as increases in cpu usage even though the changes are not actually an increase in cpu usage but rather stalls accessing memory due to the more aggressive flushing of the memory caches.

 

update: this is the item I mean: 

 

Edited by remotevisitor
  • Like 1
Link to comment

I did some experimenting last night after upgrading unRAID to 6.5.2 and trying a clean install of Windows 10. Still see about 15%-20% CPU utilization...even though task manager within the VM shows nearly idle. 

What I did:

  • I downloaded a clean Windows 10 ISO, which included the 1803 update.
  • Basically used the default VM template setting with the exception of using SeaBIOS and using virtio 0.1.126

Seeing the same results... I checked and saw virtio stable is now up to 0.1.146, so I blew away the entire vm, reinstalled with 0.1.146 virtio (I have no idea is this could even cause the issue..) and still seeing the same 15%-20% CPU at idle.

 

Doing some googlefu I found a couple folks posting similar issues with KVM on Ubuntu Server...no resolution that I could find, just wanted to share. 

Link to comment
On 5/12/2018 at 11:39 AM, Taddeusz said:

 

What CPU are you running?

 

Xeon E3-1241 v3 4c/8t

 

On 5/16/2018 at 8:24 AM, Spatial Disorder said:

I did some experimenting last night after upgrading unRAID to 6.5.2 and trying a clean install of Windows 10. Still see about 15%-20% CPU utilization...even though task manager within the VM shows nearly idle. 

What I did:

  • I downloaded a clean Windows 10 ISO, which included the 1803 update.
  • Basically used the default VM template setting with the exception of using SeaBIOS and using virtio 0.1.126

Seeing the same results... I checked and saw virtio stable is now up to 0.1.146, so I blew away the entire vm, reinstalled with 0.1.146 virtio (I have no idea is this could even cause the issue..) and still seeing the same 15%-20% CPU at idle.

 

Doing some googlefu I found a couple folks posting similar issues with KVM on Ubuntu Server...no resolution that I could find, just wanted to share. 

 

That's odd because I'm using a new Win 10 VM on the 1803 update along with:

  • Bios: OVMF
  • Machine: i440fx-2.11
  • Drivers: virtio-win-0.1.146.iso

and at idle its not using more than 4%~5% cpu resources

Edited by MowMdown
Link to comment
On 5/19/2018 at 8:17 PM, MowMdown said:

 

Xeon E3-1241 v3 4c/8t

 

 

That's odd because I'm using a new Win 10 VM on the 1803 update along with:

  • Bios: OVMF
  • Machine: i440fx-2.11
  • Drivers: virtio-win-0.1.146.iso

and at idle its not using more than 4%~5% cpu resources

 

It may be because you have 8 threads. Your overall idle usage would be less on your 8 thread Xeon than on my 4 core 4 thread i5 because it would be averaged over 8 rather than 4 CPU's.

Link to comment
6 hours ago, Taddeusz said:

 

It may be because you have 8 threads. Your overall idle usage would be less on your 8 thread Xeon than on my 4 core 4 thread i5 because it would be averaged over 8 rather than 4 CPU's.

 

I only use 2c/4t for my VM - I should have specified that.

Edited by MowMdown
Link to comment
6 minutes ago, MowMdown said:

 

I only use 2c/4t for my VM - I should have specified that.

 

Doesn't matter. If you're looking at your CPU usage on the unRAID Dashboard the overall load is going to be averaged over all 8 threads. Try looking at top, the vm process for my Windows 10 VM shows a nearly constant 33% usage. Top is different. It calculates load based on a single CPU. So a single process on a quad core CPU can have up to 400% load.

Link to comment

HI,

 

Did anybody find out why this is happening?  I just upgraded from UnRaid 6.3.5 to 6.5.2 and have seen a huge increase in idle CPU % shown in the UnRaid GUI and 'top' while running my Win 10 With VM.

 

 

I just found this thread after posting my own - it reads;

 

Quote

 

Previously UnRaid 6.3.5 - Win 10 idle task manager reports ~3% -- UnRaid reports Avg. CPU load ~9-10%

Now UnRaid 6.5.2 - Win 10 idle task manager reports ~3% -- UnRaid reports Avg. CPU load ~21-23%

 

'top' command confirms high CPU usage in 'qemu-system-x86' which is equal to what the UnRaid GUI reports.

 

With VM off Unraid reports CPU usage of between 0-1% so it isn't anything running in the background.

 

 

 

Did anybody find out a reason for this?

 

Thanks, Jon

 

Link to comment
On 5/21/2018 at 3:59 PM, Taddeusz said:

 

Doesn't matter. If you're looking at your CPU usage on the unRAID Dashboard the overall load is going to be averaged over all 8 threads. Try looking at top, the vm process for my Windows 10 VM shows a nearly constant 33% usage. Top is different. It calculates load based on a single CPU. So a single process on a quad core CPU can have up to 400% load.

 

Oh, maybe I just misunderstood.

 

Hers what top shows when sitting idle

 

top - 19:52:49 up 44 min,  3 users,  load average: 1.34, 1.36, 1.58
Tasks: 412 total,   1 running, 263 sleeping,   0 stopped,   0 zombie
%Cpu(s): 10.6 us,  4.4 sy,  0.1 ni, 84.3 id,  0.5 wa,  0.0 hi,  0.1 si,  0.0 st
KiB Mem : 16421548 total,   257508 free, 10390760 used,  5773280 buff/cache
KiB Swap:        0 total,        0 free,        0 used.  4865928 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
16201 root      20   0 9346284 8.058g  18408 S  99.7 51.5  50:40.38 qemu-system-x86

 

Edited by MowMdown
Link to comment

I am noticing that with a Windows 10 vm idling, that my server power consumption jumps by 50-70 watts.  This is with a Intel 2600cp2 mb and dual e5-2670 cpu's.

 

Top reports lots of qemu cpu usage as above and htop reports cores 1, 13 and 15 being the most heavily used.  This doesn't match to the cores assigned to the vm (12,28,14,30) but maybe this isn't comparable.

Edited by tr0910
Link to comment
  • 3 weeks later...

Found a possible solution in the proxmox forum. Basically posted the same there, but since it took me a while to actually find it I'm duplicating it here.

https://forum.proxmox.com/threads/high-cpu-load-for-windows-10-guests-when-idle.44531/

 

The hpet setting seems to fix it for me. After setting it to yes, everything seems back to pre-1803 levels.

 

edit: fixed link

Edited by MrMKHR
Link to comment
55 minutes ago, MrMKHR said:

Found a possible solution in the proxmox forum. Basically posted the same there, but since it took me a while to actually find it I'm duplicating it here.

https://forum.proxmox.com/forums/proxmox-ve-installation-and-configuration.16/

 

The hpet setting seems to fix it for me. After setting it to yes, everything seems back to pre-1803 levels.

 

Wow, thank you! That fixed it right up. Now back to a low rumble when idle.

 

Just so people know. Go to the clock section and change hpet present to “yes”:

 

<timer name=‘hpet’ present=‘yes’/>

Link to comment
14 hours ago, Taddeusz said:

 

 

 

<timer name=‘hpet’ present=‘yes’/>

Can you post the link to the post discussing this please as I couldn't find it.  I'm giving it a go on my 3xW10 VMs anyway as I've been seeing a lot of high CPU use and I've also been getting a lot of crashes and freezes, which I hope are related.

 

 

Link to comment
4 hours ago, DZMM said:

Can you post the link to the post discussing this please as I couldn't find it.  I'm giving it a go on my 3xW10 VMs anyway as I've been seeing a lot of high CPU use and I've also been getting a lot of crashes and freezes, which I hope are related.

 

 

@DZMM I think it was this one: https://forum.proxmox.com/threads/high-cpu-load-for-windows-10-guests-when-idle.44531/

I'm testing right now to see if this resolves it for me...

  • Upvote 1
Link to comment
2 hours ago, Spatial Disorder said:

@DZMM I think it was this one: https://forum.proxmox.com/threads/high-cpu-load-for-windows-10-guests-when-idle.44531/

I'm testing right now to see if this resolves it for me...

 

Well, I've been using my PC now for 7 hours today and I've not had one crash and although I get the occasional freeze they're not as drastic as before - maybe a second at most.  Normally, I would have had 2-3.

 

Looking promising so far.  If I make it through a couple of days with no freezes (kids will be online as well soon, so will get more data) I think @limetech might need to look into this and/or change the W10 VM defaults

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.