Page 1 of 1

Process in guest consumes too much CPU

Posted: 21. Oct 2016, 10:48
by superkarl
I upgraded VirtualBox from 5.1.6 to 5.1.8. The guest I use is ubuntu 16.10 (gnome desktop, x86_64) with all upgrades. If I open the terminal, and press fn+F11 to enter the full screen mode, the gnome-shell process will consume about 56% CPU of guest constantly, even exit the full screen mode. Only reboot can fix that. If I do not enter full screen mode, it works normally.

Here are the information may help you inspect the problem:
Host info:
OS: macOS Sierra
MacBook Pro (Retina, 15-inch, Mid 2015)
CPU: 2.2 GHz Intel Core i7
Memory: 16GB DDR3 1600MHZ DDR3
Graphics: Intel Iris Pro 1536 MB

Guest info:
OS: Ubuntu 16.10 x86_64 gnome desktop with all updates till 10/21/2016.
Kernel: 4.8.0-26-generic.
Guest Addition: Installed.
CPU: 4 cores.
Memory: 4GB.
Video Memory: 128MB.
3D Acceleration: Enabled.

The steps to produce the log:
1. Delete all logs.
2. Start guest and login.
3. Open terminal and enter full screen mode.
4. Shutdown.
5. Zip it.

Re: Process in guest consumes too much CPU

Posted: 21. Oct 2016, 11:49
by mpack
This seems to be a post about the guest, not the host, hence it belongs in the guest forum, not the host forum.

Topic moved from "OS X Hosts" to "Linux Guests".

In fact you are probably better to provide 5.1.8 specific feedback in the 5.1.8 release feedback topic.

Re: Process in guest consumes too much CPU

Posted: 23. Nov 2016, 07:01
by socratis
@superkarl
I deleted the following message from the Discuss the 5.1.10 release topic:
The following issue is not fixed in this release:
viewtopic.php?f=3&t=80279
If we were to have a post about things not fixed in each release, there would be thousands of messages per thread. That is not the appropriate way to draw attention to your potential issue.

Re: Process in guest consumes too much CPU

Posted: 23. Nov 2016, 10:06
by socratis
superkarl wrote:If I open the terminal, and press fn+F11 to enter the full screen mode
I'm not sure what that means exactly.

Fn-F11? I take it that you do not have selected to "Use all F1, F2, etc. keys as standard function keys" in the keyboard preferences?

And what does having terminal open have anything to do with full screen? It doesn't happen if you don't have the terminal open? And you mean "Full Screen" as in VirtualBox, not maximize the terminal from within the guest, right?

And what does the CPU monitor app of your choice shows for the consumption on the guest? And on the host?

BTW, you have 4 CPUs on your host and you're assigning all of them to your guest, which is not a great idea.

Re: Process in guest consumes too much CPU

Posted: 23. Nov 2016, 13:52
by superkarl
Hi, thank you for replying back.
socratis wrote: Fn-F11? I take it that you do not have selected to "Use all F1, F2, etc. keys as standard function keys" in the keyboard preferences?
I use macbook pro, the "fn" is a real key which is laid at the left bottom of the keyboard. For example, if you want to press F1 for help, for a normal keyboard, just press F1. But for a macbook pro, you need to press fn key and F1 key together.
socratis wrote: And what does having terminal open have anything to do with full screen? It doesn't happen if you don't have the terminal open? And you mean "Full Screen" as in VirtualBox, not maximize the terminal from within the guest, right?
The "Full Screen" I mean is maximize the terminal within the guest (By click the "View" button on toolbar of gnome terminal, and then choose "Full screen" option. Or just press fn + F11, but the shutcut doesn't work in this virtualbox release, I don't know why).
socratis wrote: And what does the CPU monitor app of your choice shows for the consumption on the guest? And on the host?
The guest. And if I quit the full screen mode of terminal, and close the terminal, I can hardly do any other operations because the guest responses very very slowly.
socratis wrote: BTW, you have 4 CPUs on your host and you're assigning all of them to your guest, which is not a great idea.
The virtualbox shows that I have 8 cpu cores (4 real + 4 logic), so it's happy about it without any complain.

Re: Process in guest consumes too much CPU

Posted: 23. Nov 2016, 15:42
by socratis
  1. I use a MBP as well, that's why I knew exactly where to point you; Keyboard preferences, specific setting. Please check it out.
  2. I have an Ubuntu-64bit Mint 17 client, but it's not the same as the 16.04 as you have, so I can't readily test out your configuration. Still, I haven't heard any complaints on this front.
  3. I mentioned Full Screen, because it has a completely different meaning within VirtualBox.
  4. If the CPU is consumed on the guest, try to find out which process takes up the CPU. Search the Ubuntu forums for similar behaviors. With the VM shut down completely, toggle the 3D acceleration setting and see if it changes the situation.
  5. Yes, you only have 4 real CPUs. That's the only thing VirtualBox cares about, so the original suggestion still is valid; reduce them to a maximum of three. Two would be also absolutely fine, unless you're running CPU intensive tasks (numerical analysis) and you need the horse power.

Re: Process in guest consumes too much CPU

Posted: 24. Nov 2016, 03:13
by superkarl
Disable the 3D acceleration fixed the problem. Thank you.