VMware Communities
fuvimos
Contributor
Contributor

Only 30 FPS in guest OS (slow/laggy UI)

I like VMware Fusion (and VMware Workstation) but what dampens the experience is the following:

The visible frame rate  in the (Linux) guest OS seems to be always exactly 30 FPS (and not the 60 FPS of the host OS). It gets apparant as soon as the mouse pointer gets captured by the guest OS - the mouse movement immediately becomes less fluid than in the host OS.

I did some tests and played various animations in the guest OS and the visible frame rate seems to be always exactly 30 FPS. In other words, it is not sometimes slower and sometimes faster, it is always the same 30 FPS.

I even recorded a screen capture in the host OS that included a windowed guest OS. After recording, I played back the recording in ultra slow motion and determined that the guest OS gets refreshed 30 times per second.

I also used testufo.com: in the Linux guest, the 30 FPS UFO looks exactly the same as the 60 FPS UFO (boot look like 30 FPS), whereas when playing the same animation in the host OS, the 60 FPS UFO actually looks like 60 FPS.

I searched a lot for this phenomenon online and couldn't find a solution. Among the things I tried are:

  • Tried both VMware Fusion 12.2.1 (on macOS as host OS) and VMWare Workstation 16.2.1 (on Windows 10 as host OS)
  • Tested different Linux distributions (Linux Mint, Zorin OS and MX Linux, as stated above)
  • Tried with and without the "Tools" installed
  • Tested full screen and windowed mode
  • Tried high and low guest OS resolutions
  • Tested opening Fusion both normally and in macOS's low resolution mode (right click - "Open in Low Resolution")
  • Tried with and without 3D acceleration enabled
  • Tested both generous and stingy VM ressources (from 1 CPU to 8 CPU, from 1 GB RAM to 16 GB RAM, from 1 GB VRAM to 8 GB VRAM, etc.)

The host PC is a 2020 iMac with: 8 core / 16 thread i7 CPU, 64 GB DDR4 RAM, 512 GB NVME SSD, AMD Radeon Pro 5500 XT 8 GB

I also used Activity Monitor on the macOS host to monitor the CPU activity while using the guest OS - the CPU is about 95% idle.

I would greatly appreciate any help!

 

0 Kudos
10 Replies
fuvimos
Contributor
Contributor

In the meantime, I connected an external monitor to my iMac because I thought its integrated 5k display could be a factor in the problem. Unfortunately, it didn't change anything and the guest OS is still rendered in 30 FPS.

Am I correct in assuming that Fusion / Workstation should be able to render the guest OS in 60 FPS and that the bevaviour I describe is unexpected?

0 Kudos
fuvimos
Contributor
Contributor

After a longer hiatus, I tried again with the latest version of VMWare Fusion (12.2.4) and Linux Mint (21) and did some benchmarks with a browser-based graphics benchmark (https://www.wirple.com/bmark). Based on these, the  following VM settings seem to work well:

  • 8 "processor cores" (my iMac has 8 physical and 16 logical cores)
  • 32 GB RAM (of my iMac's 64 GB)
  • "Shared graphics memory": 8 GB VRAM (i.e. the entirety of my iMac's 8 GB - VMWare Fusion actually recommends this setting)
  • "Accelerate 3D Graphics": enabled
  • "Use full resolution for Retina display": disabled
  • "Enable hypervisor applications in this virtual machine": enabled

Now the guest OS seems to be rendered mostly in 60 FPS. With the settings above, the benchmark score in the Linux guest OS was about 80% of the macOS host score, which I find impressive.

0 Kudos
ColoradoMarmot
Champion
Champion

Just an FYI - never give more than N-1 physical cores to any individual guest on an intel machine (logical cores don't count).  Otherwise you risk starving the host for cycles.  N-2 is a safer bet with more recent OS versions.  It may work, but depending on the load in the guest, the whole thing can come to a grinding halt.

FWIW, I believe (and someone can jump in here if I'm wrong), that the shared graphics memory is letting Fusion use 8 of the 32 you gave the guest as graphics memory, not that it actually gives real VRAM to the guest.

0 Kudos
fuvimos
Contributor
Contributor

Thank you for your advice. While I have not yet noticed problems, what you wrote makes sense. It is also supported by the offical documentation:

"Assigning all processors on the Mac to the virtual machine results in extremely poor performance. macOS must continue to perform background tasks even if no Mac applications are running. If you assign all processors to a virtual machine, this prevents important Mac tasks from being completed."

Set the Number of Virtual Processors 

0 Kudos
fuvimos
Contributor
Contributor

PS: I just looked at the dropdown titled "Processors" again. I can choose up to "16 processor cores", i.e. the selection. seems to refer to virtual cores since my CPU has 16 virtual cores but "only" 8 physical cores. Thus, assigning half of the virtual cores to the guest OS seems reasonable.

0 Kudos
Technogeezer
Immortal
Immortal

The rule of thumb for Intel Macs is to assign no more than n-1 physical cores to a VM. You may not get as much performance out of subscribing more than this number as you'd think because a hyper-threaded core is not a true CPU core.

From Virtualization and Cloud Review https://virtualizationreview.com/articles/2016/12/08/should-you-use-hyperthreading-with-vmware.aspx

So with that said, here is the reason why admins must be careful about using hyperthreading. Although hyperthreading does allow two threads to run simultaneously, most of the socket's (or core's) resources (such as cache memory) are shared between the two threads. If you were to simultaneously run two CPU intensive workloads on a hyperthreaded core, performance would likely suffer. The performance benefits derived from hyperthreading are based on the idea that shared CPU resources may not be in constant use. As such, two threads can safely share resources that would otherwise be underused. In the case of CPU-intensive threads however, the two threads would probably each use about half of the core's total capacity.

 

- Paul (Technogeezer)
Editor of the Unofficial Fusion Companion Guides
0 Kudos
ColoradoMarmot
Champion
Champion

No, it's not.  Virtual cores don't count - never have.  Fusion lets you do it, but it's not a good idea.  Sometimes it's fine.  Most of the time (particularly on more recent OS versions) it's not.  On your machine I wouldn't give more than 6 to any individual guest (note that you can give multiple guests cores that total more than the machine actually has - it's that no individual guest should ever be able to lock up the entire CPU).  With great power comes great responsibility.  Or to put it another way, you can put a whole bottle of tabasco on your scrambled eggs, but that doesn't mean there aren't consequences 🙂

Note that we don't have guidance for M1 machines yet...I don't even have a feel for it because I've yet to overload it even with multiple VM's running.

0 Kudos
fuvimos
Contributor
Contributor

Thanks for your replies. However, this topic is still confusing to me. Since the "processor cores" (as they are called in the UI) seem to be virtual cores and since each of my CPU's 8 physical cores has 2 virtual cores (due to hyperthreading), that means if I assign 8 out of the 16 "processor cores" / virtual cores to the guest, I only assign 4 out of the 8 physical cores. Consequently, both the host OS and the guest OS should each have 4 physical cores and 8 virtual cores.

Thus, it makes sense to me that Fusion only starts to show the warning "The virtual machine is configured to use too many of the processor cores available on your Mac. [...]" if I assign 9 or more out of the 16 virtual cores, i.e. more than half.

0 Kudos
ColoradoMarmot
Champion
Champion

No, that's not how it works.   The issue is that the guest assumes physical cores and can lock those for its exclusive use (hyperthreading does not stop that!). When that happens, the host is starved for cycles and grinds to a halt.  Fusions warning messages are set to a higher threshold than best practice (i.e. it's going to explode vs it's a really bad idea).

For some people assigning the full number of physical cores works.  For a while.  Then bad things happen.  For others, it never works from the get go.  On Big Sur and Monterey it's definitely a bigger issue - people who were fine with 1-1 on High Sierra and Mojave now have a machine that quickly grinds to a halt.

Feel free to ignore the best practices found since Version 1 in 2006 - some people do and it works fine, until it doesn't.  In the worst case, the machine totally locks up, and you can end up having to force power off which risks corrupting the virtual machine beyond recovery.

The hard won guidance is never more than N-1 physical cores for any VM, and on later OS's N-2 is recommended.

0 Kudos
fuvimos
Contributor
Contributor

Okay, now I understand it. I will change it to N-2, as you recommend. Thank you for your detailed replies.

0 Kudos