Page 1 of 2

Slow linux guest

Posted: 26. Apr 2019, 10:04
by david_bcn
Hi,
I have installed arch linux on my imac (27 inch screen - Retina 5k ) using Vbox 6.0.6
I have also installed guest-additions using the iso file provided(6.0.6) and compiled modules for the kernel.
I have enabled 3d acceleration.

I have first used the cinnamon gui but i had software rendering problems. After searching for possible errors i decided to switch to KDE. Typing on the konsole is faster but the gui is still slow (e.g moving windows around)

I have attached the log file.

Thanks

SSD_LINUX-2019-04-26-09-45-52_no3D-used.log

Re: Slow linux guest

Posted: 26. Apr 2019, 10:37
by david_bcn
Sorry in the previous post i have attached the log without 3D accelaration.

I´m attaching here the log with 3d accelaration.

Re: Slow linux guest

Posted: 26. Apr 2019, 14:38
by mpack
Please ensure that all future logs are zipped.

Plenty to unpick in just a few lines:
00:00:01.579759 Guest OS type: 'Linux26_64'
00:00:01.582962 fHMForced=true - No raw-mode support in this build!
00:00:01.593583 File system of '/Users/david/VirtualBox VMs/SSD_LINUX/Snapshots' (snapshots) is apfs
00:00:01.593614 File system of '/Volumes/SSD_DRIVE/SSD_LINUX.vdi' is hfs
I rather doubt that your Arch Linux is based on a v2.6 kernel. Also, why on earth did you separate the VDI file from the VM folder? If you wanted to locate the VM on the SSD, why not just do that, rather than fiddle with the folder structure? Your new structure is a time bomb waiting to kill the VM, at the moment you discover that your backups are invalid because non of them are complete and consistent.

Then there is this:
00:00:01.625934 NumCPUs <integer> = 0x0000000000000004 (4)
...
00:00:01.830683 CPUM: Physical host cores: 4
It's hardly surprising IMO that performance inside a VM suffers when the host VM software has been starved of CPU. This VM should be using no more than 2 cores.

I also see that the host OpenGL API version is only 2.1, which is surprisingly ancient (published in 2006). One wonders how well it can work if it has been neglected for so long. Is it even hardware accelerated at all?

Re: Slow linux guest

Posted: 26. Apr 2019, 14:54
by david_bcn
Hi,
Thanks so much for taing the time to look into this.

1/ As for the reason the vdi file is on an external ssd disk was to have a dedicated SSD disk. I indeed moved the original vdi file to the ssd because when i try to create the folder in my external SSD disk i get a "Please check the parent really exists and that you have permissions"

2/ Current arch linux is Linux arch 5.0.9-arch1-1-ARCH . Have no idea where the Guest os type Linux26_64 comes from.

3/ I don´t a slowing machine because of cpus. I´m monitoring the cpu state with conky and don´t see any problem on this side.

4/ The openGL api 2.1 , how can this be updated ? My host an imac from iMac (Retina 5K, 27-inch, Late 2015 with $Ghz intel core i7, running macoOS Mojave 10.14.4 without any problem. I think this is replaced by metal in latest apple (for Gpus). 2.1 has never been upgrade on apple as far as i know. All the drivers are controlled by apple, there is not that much i can do about it

Thanks

Re: Slow linux guest

Posted: 26. Apr 2019, 15:24
by mpack
david_bcn wrote: 2/ Current arch linux is Linux arch 5.0.9-arch1-1-ARCH . Have no idea where the Guest os type Linux26_64 comes from.
It comes from choosing the "Other Linux (64bit)" template in VirtualBox, as opposed to the "Arch Linux (64bit)" template provided. Here is what the log should have contained :-
00:00:12.631028 Guest OS type: 'ArchLinux_64'
If you intend to reject definitely correct advice such as given about cores then I see no point in continuing this conversation.

Re: Slow linux guest

Posted: 26. Apr 2019, 15:37
by david_bcn
Hi,
Here is the latest log. I have moved the Vm to the SSD external disk so looks better.
I have reduced two 2 cpus and still the same problem. Also corrected the guest version. I´m attaching the log file.

The only thing that remain is the host opengl drive that i far as i know cannot be updated on macos host ??

Thanks for looking into that.

Re: Slow linux guest

Posted: 26. Apr 2019, 15:45
by david_bcn
Attached screenshot the graphics card from my macos host.

AMD radeon R9M390

Re: Slow linux guest

Posted: 26. Apr 2019, 15:48
by mpack
I'm sorry, but I have no knowledge of OpenGL options available on Mac hosts. ATI is a competitor for NVidia, so I'm surprised it can be so far behind the times. Perhaps the bureaucracy involved in developing drivers for OS X has something to do with it.

The screenshot you show seems to be describing the hardware. There ought to be a similar dialog showing the driver stack.

Could you perhaps resize (/2) screenshots before posting. I'm old enough to need reading glasses for small print, but I don't need print that large!

(I just replaced your screenshot by way of example).

Re: Slow linux guest

Posted: 26. Apr 2019, 16:09
by david_bcn
Here it is.....

Re: Slow linux guest

Posted: 26. Apr 2019, 16:27
by andyp73
Mac computers that use OpenCL and OpenGL graphics gives a list of the OpenGL version that is supported by the hardware. In my particular case (an iMac Retina 5K, 27-inch, 2017 version with a Radeon Pro 570 GPU) this is OpenGL 4.1.

However, this is only the case if you request a "core context" when setting up to call the OpenGL interface. XQuartz (X11 implementation) instead uses a legacy OpenGL context which Apple define as OpenGL 2.1. There is much more information on this available using your favourite search engine.

-Andy.

Re: Slow linux guest

Posted: 26. Apr 2019, 16:48
by david_bcn
Not familiar with openGl at all. Are you suggesting to upgrade openGl to 4.1 (current suported version for my os )
Xcode 10 is installed in my mac. How to use openGL 4.1 instead of 2.1 ???

Re: Slow linux guest

Posted: 26. Apr 2019, 17:11
by mpack
It seems to be a feature of Apple. I assume that VirtualBox asks for OpenGL compatibility mode on all hosts (i.e. use OpenGL using the legacy direct call API instead of shader scripts). Windows hosts are able to satisfy that request while providing the latest API, Apple hosts do something different.

I have a vague memory that this is a duplicate of a discussion from a few months ago: you might want to search for it, though I doubt it was possible to resolve.

Re: Slow linux guest

Posted: 26. Apr 2019, 19:58
by socratis
For those that have a Mac, download "OpenGL Extensions Viewer" from the Apple Store, free. For the Windows aficionados, see the website of realtech VR » OpenGL Extensions Viewer, free again...

That reports 100% 4.1 OpenGL compatibility for my low-power "Intel Iris Pro 5200", high-performance "AMD Radeon R9 M370X" and the "Apple Software Renderer", if in "Core Mode". All three available options, 100% 4.1 OpenGL.

But... it gives me only 100% 2.1 OpenGL compatibility (and nothing more), if I choose the "Compatibility Mode". That would explain what you see in the logs. I would completely ignore it, since VirtualBox doesn't support anything higher than OpenGL 2.1 in any event. That's a red-herring and in no way what causes your perceived slowness, stop worrying about that and don't bang your head on the wall trying to "solve" this...

So, let's take a closer look at your log, the last one posted. BTW, if a change is not proposed by a more experienced user, please don't change things randomly. Example:
[quote=""SSD_LINUX-2019-04-26-09-50-45.log""]
00:00:01.625932 EnablePAE <integer> = 0x0000000000000001 (1)
00:00:01.626001 NonRotationalMedium <integer> = 0x0000000000000001 (1)
00:00:01.626117 [/Devices/usb-xhci/0/Config/] (level 4)
[/quote]
[quote=""arch_linux-2019-04-26-15-33-54.log""]
00:00:01.570227 EnablePAE <integer> = 0x0000000000000000 (0)
00:00:01.570417 [/Devices/usb-ehci/0/Config/] (level 4)
[/quote]Keep in mind for example that there are special kernels that are compiled with or without the PAE option. Changing them after the OS is installed is not suggested. Same for the downgrade of the USB controller...
00:00:01.533767 File system of '/Volumes/SSD_DRIVE/VirtualBox VMs/arch_linux/Snapshots' (snapshots) is unknown
00:00:01.533779 File system of '/Volumes/SSD_DRIVE/SSD_LINUX.vdi' is hfs
The VDI is still separated from the VM and not in what would be their default state, but it doesn't affect your VM's response, we'll deal with it later...
00:00:01.570232 RamSize <integer> = 0x000000045e800000 (18 765 316 096, 17 896 MB, 17.4 GB)
Do you really need that much RAM for your guest? What are you doing? I think I know, based on an entry in the previous log, but I'd like you to confirm it:
00:00:01.625423 Per-VM extradata API settings:
00:00:01.625446   VBoxInternal2/SharedFoldersEnableSymlinksCreate/Genomic_drive="1"
00:00:01.625579   VBoxInternal2/SharedFoldersEnableSymlinksCreate/sf_Genomic_drive="1"
00:00:01.772871 Host path '/Users/david/Google Drive', map name 'Genomics_Drive', writable, automount=true, automntpnt=, create_symlinks=false, missing=false
Careful with that one, you have at least two extra processes that have read/write access to it. Three (3) if you include the Finder...
00:00:24.812540 VMMDev: SetVideoModeHint: Got a video mode hint (2560x1440x32)@(0x0),(1;0) at 0
This seems to be your problem, too many pixels to deal with.

Go to the VirtualBox Preferences » Display » Scale Factor: set that to 200% for all monitors that have a HiDPI. And then choose a smaller resolution for your Arch VM. I use 1280x1024x32 on most of my guests...



<Off-topic>
00:00:01.752865 NAT: DNS#0: 9.9.9.9
After Google's 8.8.8.8 and Cloudflare's 1.1.1.1, we're having "Quad9" with 9.9.9.9? What's next, every N.N.N.N is going to be a DNS server? :D

Re: Slow linux guest

Posted: 29. Apr 2019, 09:34
by david_bcn
Ok thanks for the update.

I have tried changing the resolution to 1280x1024 with a scaling factor of 200. It seems to improve a little bit but then the screen only used 3/4 of the screen. Guess there is not that much to do.


- I´m sharing some drives of my host so it´s normal to have many folders.
- Using it for genomics , that´s why high memory needed.

How do you out your dvi with VM ??

Re: Slow linux guest

Posted: 29. Apr 2019, 11:00
by socratis
david_bcn wrote:How do you out your dvi with VM ??
I'm not sure what that means, can you explain it a little bit further?