Problem in VB 5.1.22: high CPU load in Win7

Discussions related to using VirtualBox on Linux hosts.
Post Reply
RockT
Posts: 18
Joined: 15. Aug 2012, 08:15
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: RHEL, Win7

Problem in VB 5.1.22: high CPU load in Win7

Post by RockT »

Hi all,
I see high cpu load with a Win7 guest on an Ubuntu 17.04 host, all patches to Host, Guest, Virtualbox are applied.
My impression is, this problem appeared in VB 5.1.20 or 5.1.22

top head output from Ubuntu host:

Code: Select all

top - 10:38:18 up 1 day, 15:55,  1 user,  load average: 0,12, 0,41, 1,10
Tasks: 277 gesamt,   1 laufend, 276 schlafend,   0 gestoppt,   0 Zombie
%CPU(s):  1,9 be,  3,9 sy,  0,0 ni, 93,9 un,  0,0 wa,  0,0 hi,  0,4 si,  0,0 st
KiB Spch : 16093048 gesamt,   240324 frei,  9000324 belegt,  6852400 Puff/Cache
KiB Swap: 16776700 gesamt, 16776700 frei,        0 belegt.  6289556 verfü Spch 

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     ZEIT+ BEFEHL                                                                                                  
31662 rtraut    20   0 8626440 5,354g 5,229g S  16,9 34,9  28:16.34 VirtualBox                                                                                              
 1166 rtraut    20   0  910016 148428 105996 S   2,3  0,9   0:24.51 chrome                                                                                                  
 1774 rtraut    20   0 4529348 1,240g 1,161g S   2,3  8,1   1:18.71 VirtualBox             
First Virtualbox task is an idle Win7 64 VM, second Virtualbox task is an idle Ubuntu 17.04 guest.

vmstat output:

Code: Select all

vmstat 2
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   frei   buff  Cache   si   so    bi    bo   in   cs US SY ID WA st
 1  0      0 164772   1328 6925496    0    0    42     8   38   14  0  0 99  1  0
 2  0      0 168008   1328 6917900    0    0     0     0 2765 9233  1  4 95  0  0
 2  0      0 167556   1328 6917896    0    0     0     0 2195 14000  2  5 94  0  0
 0  0      0 167652   1328 6917756    0    0     0  7134 2431 12667  2  5 94  0  0
 0  0      0 167608   1328 6917964    0    0     0   166 2657 12267  2  5 94  0  0
 0  0      0 171528   1328 6917964    0    0     0     0 1995 10830  2  4 94  0  0
 0  0      0 167876   1328 6917700    0    0     0     0 1697 12227  2  4 94  0  0
 0  0      0 171612   1328 6917988    0    0     0     0 2099 11900  2  5 94  0  0
 0  0      0 171684   1328 6918044    0    0     0     0 2232 13070  1  5 94  0  0
 2  0      0 167520   1328 6917848    0    0     0     0 2442 7472  2  3 95  1  0

Excessive amount of sw interrupts and context switches of the idle Win7 guest.

And I have attached a screenshot of the idle resource monitor of the Win7 guest.

Anybody can confirm?

Thx
Rainer
Attachments
2017-05-04 10_48_27-Ressourcenmonitor.gif
2017-05-04 10_48_27-Ressourcenmonitor.gif (66.63 KiB) Viewed 2632 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Problem in VB 5.1.22: high CPU load in Win7

Post by mpack »

Look, there's no magic here. If you have a high CPU load then some task is using it - so open the task manager and look for it. VirtualBox has no control over how much CPU a guest process requires.

(But it will be Windows Update).
RockT
Posts: 18
Joined: 15. Aug 2012, 08:15
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: RHEL, Win7

Re: Problem in VB 5.1.22: high CPU load in Win7

Post by RockT »

Thx for your answer.
The high cpu load is caused by the virtualbox process id 31662 which is the idle win7 guest.
(No running windows update involved as you can see in the attached screenshot)
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Problem in VB 5.1.22: high CPU load in Win7

Post by mpack »

Obviously, any CPU use by a guest app will appear on the host as VirtualBox use. Look in the guest task list what the real culprits are. If it's a VirtualBox guest process showing high CPU then show me.
RockT
Posts: 18
Joined: 15. Aug 2012, 08:15
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: RHEL, Win7

Re: Problem in VB 5.1.22: high CPU load in Win7

Post by RockT »

Ok... win7 vm has PID 9519 now:

Code: Select all

root@pc1624lx:~# ps uax|grep Virt
rtraut    1774  2.9 10.0 4590708 1614764 ?     Sl   10:12   6:59 /usr/lib/virtualbox/VirtualBox --comment Mate VPN Host --startvm 5c32c568-68f9-4c9c-90b3-e91ad00a7e27 --no-startvm-errormsgbox
rtraut    9493  0.2  0.5 1309432 85316 ?       Sl   13:51   0:02 /usr/lib/virtualbox/VirtualBox
rtraut    9519 33.5 34.8 8609904 5606636 ?     Sl   13:51   6:08 /usr/lib/virtualbox/VirtualBox --comment win7-pc1624 --startvm fb52c616-e3d8-4d01-8523-c9f9a0a53355 --no-startvm-errormsgbox
root     11565  0.0  0.0  15804   976 pts/5    S+   14:10   0:00 grep --color=auto Virt
rtraut   31219  0.1  0.5 1451680 89652 ?       Sl   09:28   0:21 /usr/lib/virtualbox/VirtualBox]
top of PID 9519 (cpu 20%):

Code: Select all

root@pc1624lx:~# top -p 9519

top - 14:11:33 up 1 day, 19:28,  2 users,  load average: 0,26, 0,43, 0,45
Tasks:   1 gesamt,   0 laufend,   1 schlafend,   0 gestoppt,   0 Zombie
%CPU(s):  0,3 be,  0,5 sy,  0,0 ni, 98,4 un,  0,8 wa,  0,0 hi,  0,0 si,  0,0 st
KiB Spch : 16093048 gesamt,   169328 frei,  9578076 belegt,  6345644 Puff/Cache
KiB Swap: 16776700 gesamt, 16776700 frei,        0 belegt.  5644036 verfü Spch 

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     ZEIT+ BEFEHL                                                                                                  
 9519 rtraut    20   0 8609840 5,347g 5,229g S  20,0 34,8   6:13.97 VirtualBox 
I have attached a screenshot of taskmanager of the idle win7 vm.

PS:
This reminds me of the first experience with VirtualBox about 2 years ago.
I was bitten by this:

Code: Select all

VirtualBox 5.0.2 (released 2015-08-13)

This is a maintenance release. The following items were fixed and/or added:

VMM: fixed an issue causing artifically high load averages on Linux hosts
Attachments
2017-05-04 14_09_34-Windows Task-Manager.gif
2017-05-04 14_09_34-Windows Task-Manager.gif (45.07 KiB) Viewed 2605 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Problem in VB 5.1.22: high CPU load in Win7

Post by mpack »

You still aren't showing me anything of interest: what I want to see is the process list inside the guest, ideally sorted in descending CPU order so I can see who the top CPU users are. A graphic representation of total CPU use tells me nothing.

Or are you simply drawing my attention to the almost 0 CPU load at the time this picture was taken?

As I said above, there is no magic here. CPU time is like energy: it always gets used by something, it can't just disappear. If the guest isn't using it then something on the host is. I'm still looking for your evidence that any VirtualBox process is responsible.

Also: if you are talking about a host problem then "Windows Guests" is not a good choice for the discussion. You need somewhere with Linux hosts expertise, so I'm going to move this topic to the "Linux Hosts" forum.
The Raven
Posts: 82
Joined: 18. Aug 2016, 20:43

Re: Problem in VB 5.1.22: high CPU load in Win7

Post by The Raven »

Do you have any baseline figures when you were running an earlier
release of VirtualBox ? This would be an easy way to see whether
those particular performance figures have changed.
If not, would be possible to revert back to earlier release to compare ?

Can you provide details of both the hardware (cpu model etc.) and
the Linux Host being used ?

Looking at the overall CPU busy from TOP and the task busy for the
Windows Guest, it appears as if it's Quad core machine, so the
Windows 7 Guest is actually consuming about 5% of the overall machine.
Is that correct ?
RockT
Posts: 18
Joined: 15. Aug 2012, 08:15
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: RHEL, Win7

Re: Problem in VB 5.1.22: high CPU load in Win7

Post by RockT »

First, thx for your answer.
mpack wrote: Or are you simply drawing my attention to the almost 0 CPU load at the time this picture was taken?
I have shown you a picture of a graph which is a diagram of cpu load over a period of time. So your assumption this is a picture of "at the time this picture was taken" is wrong.
My top and vmstat output falls well inside this period of time.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Problem in VB 5.1.22: high CPU load in Win7

Post by socratis »

Try to run Process Explorer (from former SysInternals, current Microsoft) in the guest. Get a complete understanding on what's going on in the guest. CPU cycles don't go in aether. If the process on your host (VirtualBox) is eating your CPU, then it's your guest that's doing that. That's all we're saying...
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.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Problem in VB 5.1.22: high CPU load in Win7

Post by mpack »

I'll just add a note to look at I/O, not just CPU. Windows Update is the usual culprit, but in fact it's not so much that it uses a lot of CPU, it's the fact that seems to hogs the network and blocks a lot.
Post Reply