Linux Guests Slow

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
jbhardman
Posts: 7
Joined: 14. May 2009, 07:54
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux

Linux Guests Slow

Post by jbhardman »

Have a Macbook Pro (Macos 12.5), core i9, 16gb ram. I have used Virtualbox for years in the past on various hosts. No problems. Now, every single guest that I install with a gui (Fedora, Ubuntu, etc.), it's unusably slow. Like the mouse stutters across the screen. Opening file manager takes 5-10 mins.

I end up having to kill the window on the host. Headless guests seem to work ok. I have given it plenty of resources. 10GB ram, 4 cores cpu, 128 MB gpu memory. No help. I have tried all of the graphics controller choices. No help.

Any other ideas what I can try?

- Version 6.1.36

- VT-x enabled

- Host extensions and Guest additions installed.

I tried using UTM (Qemu based emulation). Smooth as expected.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Linux Guests Slow

Post by scottgus1 »

Start the VM from full normal shutdown, not save-state. Run until you see the problem happen, then shut down the VM from within the VM's OS if possible. If not possible, close the Virtualbox window for the VM with the Power Off option set.

Right-click the VM in the main Virtualbox window's VM list, choose Show Log. Save the far left tab's log, zip it, and post the zip file, using the forum's Upload Attachment tab.
jbhardman
Posts: 7
Joined: 14. May 2009, 07:54
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux

Re: Linux Guests Slow

Post by jbhardman »

This was the best I could do. Slowness is apparent immediately. Password on login screen is like 10 seconds per character. As soon as I got in, I opened Firefox. It did open, then everything froze. I couldn't access any menu in the guest. I couldn't even click the close red X on the window from the host. Couldn't get any of the menu bar items to drop down (MacOS Menu) when I clicked on them. I had to force quit from MacOS. But here is the log.

Thanks!
Attachments
VBox.log.zip
(23.32 KiB) Downloaded 8 times
jbhardman
Posts: 7
Joined: 14. May 2009, 07:54
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux

Re: Linux Guests Slow

Post by jbhardman »

Here, I ssh'd in immediately upon boot. Then when it froze, I was able to issue shutdown from the terminal and it gracefully shutdown. Here is that log.
Attachments
VBox_shutdown.log.zip
(43.44 KiB) Downloaded 7 times
multiOS
Volunteer
Posts: 800
Joined: 14. Sep 2019, 16:51
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WIN11,10, 7, Linux (various)
Location: United Kingdom

Re: Linux Guests Slow

Post by multiOS »

Here is one issue the Logs:
00:00:01.157860 NumCPUs <integer> = 0x0000000000000008 (8)

00:00:01.244370 CPUM: Physical host cores: 8
You are allocating all of the Physical Cores to the Guest leaving none for the Host, which already appears to consuming considerable resources. Allocating more cores than a VM actually needs will also slow down a VMs performance, as the unused cores still have to be managed.

The first Log also shows the potential for total RAM to become overcommitted i.e.
00:00:01.207351 Host RAM: 16384MB (16.0GB) total, 6382MB (6.2GB) available

00:00:01.290972 RamSize <integer> = 0x0000000180000000 (6 442 450 944, 6 144 MB, 6.0 GB)
00:00:01.291225 VRamSize <integer> = 0x0000000004000000 (67 108 864, 64 MB)
I would suggest you try testing the VM's performance with:

CPU Cores: 2 (this is normally sufficient for a 64-bit VM to perform well, but possibly increase to 4 if the VM is to be heavily used)
RAM: 4 GB (4096 MB)
VRAM: 128 MB
jbhardman
Posts: 7
Joined: 14. May 2009, 07:54
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux

Re: Linux Guests Slow

Post by jbhardman »

Changes made, same problem. I don't normally run that maxed out on the vm. I just kept increasing to see if it would improve. Here's a screenshot of all of my Activity Monitor windows while the vm was frozen. I don't know why the VM says over 7gb, when the setting only grants it 4gb. The rest of the applications on my Mac see no adverse affect while this is going on.

Image

Apparently images don't work or something...

Code: Select all

https://i.ibb.co/7kvBvPQ/Screen-Shot-2022-08-16-at-4-18-50-PM.png
Last edited by jbhardman on 23. Aug 2022, 18:01, edited 1 time in total.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Linux Guests Slow

Post by scottgus1 »

[IMG] tags only work on images previously uploaded with the Upload Attachment tab. Please use that tab to post your picture.
jbhardman
Posts: 7
Joined: 14. May 2009, 07:54
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux

Re: Linux Guests Slow

Post by jbhardman »

Here is the image.
Attachments
resources-virtualbox.jpg
resources-virtualbox.jpg (111.04 KiB) Viewed 4248 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: Linux Guests Slow

Post by mpack »

I would say it's this:
00:00:01.158070 3DEnabled <integer> = 0x0000000000000000 (0)
00:00:01.158077 VRamSize <integer> = 0x0000000004000000 (67 108 864, 64 MB)
...
00:00:12.370397 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=0000000117632000 w=3640 h=1584 bpp=32 cbLine=0x38E0 flags=0x1 origin=0,0
4K display with only 64MB graphics RAM and no hardware acceleration? That isn't going to fly.

Of course, 3D acceleration will only work if the host provides an OpenGL API. AFAIK as a cross-platform app VirtualBox can't use that proprietary "Metal" framework, any more than it can use the proprietary Direct3D framework on Windows hosts. If 3D acceleration is not available then the only workaround would be to use a lower resolution inside the guest OS, and then use scaling to get a larger window. Switching to 2K graphics plus 200% scaling gives you the same size window, slight blurriness, and 4x performance boost.
jbhardman
Posts: 7
Joined: 14. May 2009, 07:54
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux

Re: Linux Guests Slow

Post by jbhardman »

Are you referring to the guest resolution or my host? I don't typically run the guest in 4k. I must have been moving it windows or something and it briefly resized to that. I typically run it at 1080 with the same performance issues.

Code: Select all

00:00:57.959791 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=000000010fb14000 w=1920 h=1080 bpp=32 cbLine=0x1E00 flags=0x1 origin=0,0
Post Reply