Slow performance on Linux guests

Discussions about using Linux guests in VirtualBox.
jonesyp
Posts: 21
Joined: 9. Oct 2008, 22:05
Primary OS: MS Windows 10
VBox Version: OSE other
Guest OSses: Linux
Location: West Sussex

Slow performance on Linux guests

Post by jonesyp »

Hello,

I'm running VirtualBox 5.1.8 on Windows 10, and I'm getting really slow performance on Linux guests especially when playing video I get very jerky playback. (I have tried Ubuntu 16.04, Mint 18, and Manjaro).

My PC is quite a good specification and is running Windows 10. The PC has an Intel i7, 3770K with 16GB of RAM, along with an AMD Radeon HD7900.

I have looked at other posts and made sure Intel Visualisation is enabled by checking in the BIOS, and also in Windows 10 in the Task Manager and the Performance. I have also checked that Hyper-V is not enabled.

When setting up the VMs, I go for 4 GB Memory, and 64MB for Graphics, and enable 3D Graphics:

Image

When for instance I have installed Ubuntu I can go Fullscreen so I know the Guest Additions are installed, I have also tried installing them again from the CD. I have run various checks to see if everything is enabled and the seem to be as shown below:

Image

I have also checked the drivers are installed:

Image

Finally if I install Chromium I get this back block as shown. I saw a post some while ago which for an older version said disable 3D, but I assume that is now fixed? If I disable 3D I can launch Chromium fine, but the jerky video playback issue is still there.

Image

I think I have provided as much info as possible but if anything else is needed, please let me know.

Could anyone point out where I need to start looking to resolve this? I have been looking for a couple of days. Thank you in advance.

Update - I have tried disabling nested paging, updating the graphics memory to 128MB on the guest and going down to 1 CPU. I now get 100% CPU usage when playing video:

Image
Last edited by jonesyp on 30. Oct 2016, 17:25, edited 1 time in total.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Slow performance on Linux guests

Post by Perryg »

First you need to set your browser in the guest to not use the GPU by default. This is the leading cause of video issues since the guest can not connect direct to the adapter. Also full screen can be a huge issue with video playback. Does it also stutter when in a smaller window?
jonesyp
Posts: 21
Joined: 9. Oct 2008, 22:05
Primary OS: MS Windows 10
VBox Version: OSE other
Guest OSses: Linux
Location: West Sussex

Re: Slow performance on Linux guests

Post by jonesyp »

Thanks for the reply. I'm using VLC rather than a browser. I have tried exiting full screen and I still get the issue.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Slow performance on Linux guests

Post by Perryg »

VLC is another issue. Look for the video playback and see if selecting X11 or one of the other codecs make a difference. Sorry I don't remember the exact one, but one of them will allow it to play back properly.
jonesyp
Posts: 21
Joined: 9. Oct 2008, 22:05
Primary OS: MS Windows 10
VBox Version: OSE other
Guest OSses: Linux
Location: West Sussex

Re: Slow performance on Linux guests

Post by jonesyp »

Hi again. Just tried the built in Video play which I think is Totem and get the same result. Also BBC iplayer via Firefox is sliw and judders too. Thanks
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Slow performance on Linux guests

Post by Perryg »

All of them are designed for use on metal. Like I said you need to find the right settings in them to hit the sweet spot when used in a virtual machine.
jonesyp
Posts: 21
Joined: 9. Oct 2008, 22:05
Primary OS: MS Windows 10
VBox Version: OSE other
Guest OSses: Linux
Location: West Sussex

Re: Slow performance on Linux guests

Post by jonesyp »

Thank you for the replies what I struggle wifh is that I have an older Dell Inspiron laptop I7 with the Nvidia and Intel graphics combo with the same setup and everything works like a dream in that.
jonesyp
Posts: 21
Joined: 9. Oct 2008, 22:05
Primary OS: MS Windows 10
VBox Version: OSE other
Guest OSses: Linux
Location: West Sussex

Re: Slow performance on Linux guests

Post by jonesyp »

Hi again,

I just installed VMWare Player and everything works like a dream. Smoother playback from VLC Full Screen, and BBC iPlayer. The system seems faster and CPU usage is around 12%.

There must be a setting I'm missing in VirtualBox.
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: Slow performance on Linux guests

Post by mpack »

Without a VM log I doubt we can ever do much more than sympathize.
jonesyp
Posts: 21
Joined: 9. Oct 2008, 22:05
Primary OS: MS Windows 10
VBox Version: OSE other
Guest OSses: Linux
Location: West Sussex

Re: Slow performance on Linux guests

Post by jonesyp »

Hi, could you let me know how to get a log file and I will do tonight. Thank you.
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: Slow performance on Linux guests

Post by mpack »

With the VM fully shut down, right click it in the GUI. Select "Show Log" and save "VBox.log" (ONLY) to a zip file. Attach the zip here.
jonesyp
Posts: 21
Joined: 9. Oct 2008, 22:05
Primary OS: MS Windows 10
VBox Version: OSE other
Guest OSses: Linux
Location: West Sussex

Re: Slow performance on Linux guests

Post by jonesyp »

I enclose the log file as suggested.

Thanks
Attachments
Ubuntu 16.04 LTS Desktop-2016-10-31-19-47-07.zip
(25.16 KiB) Downloaded 22 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: Slow performance on Linux guests

Post by mpack »

Changes I would make:-
  • Does this VM really need 4GB? I would reduce to 2GB.
  • You only have one CPU core assigned, I would assign two (your host has 4).
  • You have the fork version of the GAs installed, i.e. the ones bundled with Ubuntu. These should be uninstalled.
  • I see you have the official GAs CD mounted, but you have not installed them.
  • There seems to be something weird going on with guest sound. I might try disabling audio in the VM settings to see what the effect is.
That seems to be as much as I can get, from a 3 minute session.
jonesyp
Posts: 21
Joined: 9. Oct 2008, 22:05
Primary OS: MS Windows 10
VBox Version: OSE other
Guest OSses: Linux
Location: West Sussex

Re: Slow performance on Linux guests

Post by jonesyp »

Hi,

Thanks for checking this out.

I did originally try 2 CPUS (see top of post) then went down to one. Did not seem to make any difference.

I did go through the install of Guest Additions and it did not error, but I assume from what you are saying I need to uninstall the Ubuntu ones first. I will try that tonight.

Finally, I had assumed the more memory the better, but happy to drop it down to 2GB. I have 16GB in my PC.
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: Slow performance on Linux guests

Post by mpack »

jonesyp wrote: I did go through the install of Guest Additions and it did not error ...
I don't think that is correct. I think all you did was use the "Insert GAs CD..." option, which will only error out if it can't find or insert the CD. This doesn't run the installer unless you have a guest OS which enables autorun (and in the modern era, that's usually not a good idea).
Post Reply