VMware workstation challenges

I am having a problem with vmware workstation I am struggling to understand.

Starting a few months ago, my vmware environment began displaying some significant performance issues. Basically, what happens is that after some period of time the VM starts consuming massive amounts of CPU on the host and slows to a crawl. This time window can be anywhere from 30 seconds to 24 hours. There is nothing of significance in the journal when this happens. The VMs are often idle or close to idle. It happens in both Arch and Fedora which I dual-boot. It doesn’t seem to matter what the guest OS is. It happens both Linux and Windows VMs.

What I have tried so far:

  • Giving the VMs more cores. When I do this the VM just consumes more load on the host. Even when given 12 cores it just crushes all 12.
  • Uninstalling vmware deleting all the config and re-installing.
  • Pre-allocating the disk images.

Unfortunately, vmware is the only virtualization solution that has all the features I need so switching to a different technology is not an option.

Does anyone have any other ideas? I am not even sure what to check at this point.

Also, it doesn’t seem like other people are having this problem so it must be something with my setup in particular.

I run vmware and I don’t know that i have any issues with it as I know you use it differently. How exactly do you install it and set it up? I’m curious because i just install vmware, vmware tools, xf86-video-vmware, xf86-video-vmmouse. I only set the networking.

/etc/systemd/system/vmware-networks-server.service

[Unit]
Description=VMware Networks
Wants=vmware-networks-configuration.service
After=vmware-networks-configuration.service

[Service]
Type=forking
ExecStartPre=-/sbin/modprobe vmnet
ExecStart=/usr/bin/vmware-networks --start
ExecStop=/usr/bin/vmware-networks --stop

[Install]
WantedBy=multi-user.target

I’m sure you have a lot more set up than this?

Edit: I’m assuming when this issue happens you are running multiple vm’s?

I install the AUR package and follow the instructions there. Lets not get sidetracked on that in this topic though.

It happens even when a single VM is running.

I assume you have checked some obvious things like

  • VM has enough free disk space
  • VM has enough RAM
  • VM has swap or not?

I’m not using vmware, so I don’t have any specific insight about it.

Yes. The VMs see to get randomly CPU constrained even though they shouldn’t be doing anything CPU intensive.

If e.g. virtualbox works without such issues, and all operating systems have the same issue with vmware, then it really sounds like a vmware problem.

Maybe vmware forum could provide answers?

Except that it only impacts me.

Yep, they will provide me the answer that I am not running on a supported platform.

BTW and FWIW, in a vmware VM, EndeavourOS (chrooted_cleaner_script.sh) seems to assume the following packages should be installed:

  • open-vm-tools
  • xf86-input-vmmouse
  • xf86-video-vmware

and other virtual machine related packages will be removed.

I guess you have these, but wanted to clarify what our chrooted_cleaner_script thinks. :wink:

Hmm…I am currently testing disabling

/proc/sys/vm/compaction_proactiveness

EDIT: This seems to have resolved the issue.

For future reference, here is how you do this.

To test it temporarily you can use:

sudo bash -c "echo 0 > /proc/sys/vm/compaction_proactiveness"

To make it permanent, use a sysctl drop-in

sudo bash -c "echo vm.compaction_proactiveness=0 > /etc/sysctl.d/vmware.conf"
2 Likes

One idea that you may have tried already: try different kernels.

Found this: https://bbs.archlinux.org/viewtopic.php?id=267648
It has been marked as solved already, but different kernels behave differently…

If the process kcompactd0 is the one that’s spiking, then you should be good now. I used that fix and ran without issues afterwards.

Just an idea - I am thinking outside the box - so to speak.

The dirt easy way of setting of a system is to allocate swap inside the virtual disk.

You are using btrfs - a very experienced user I might add - thinking outside the box - if you are indeed using btrfs could the choice of filesystem be a factor here?

I mention it because my first couple of experience with btrfs was accompanied by a complete lack of knowledge and understanding packed with - and at the time - no patience for learning how maintain btrfs.

This caused by system to slow to a crawl - much like you describe in your topic.

It seem like setting vm.compaction_proactiveness to 0 did solve the issue.

Thanks for the ideas everyone!

3 Likes

What does this do?

It basically stops memory compaction from occurring. Memory compaction makes it so that available memory is available in large contiguous areas.

This isn’t something that you would generally need to change. It solves a specific issue with vmware.

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.