When running a virtual machine in VMware (Ubuntu 16.04 host), both the guest system (Windows 10 at the moment) and the host system regularly become unresponsive for several seconds, e.g. when starting Atom or Visual Studio in the guest VM.

RAM usage reports look normal (16 GB total, 6.5 GB used by the VM as “shared memory”, some GB free), but while the system is unresponsive, IO tasks are either suspended or very slow, for example copy/paste of text takes several seconds.

Changing settings (virtualisation settings, VM’s RAM, …) in VMware does not have any effect.

  • Even though you've found the solution, I am surprised you are fine with 5GB of RAM used for your VM, as from my experience W10 allocates 5+ GB just when it starts, and VS 2017 takes about 500MB, so 5.5GB used under W10 on a physical host with 16GB RAM is a normality. Adding AV and other minor corporate stuff brings up initial RAM allocation on my current machine to 9.5 GB right after fresh start. – ajeh Jul 27 '18 at 17:28
  • You are right. The VM is configured with 6.5 GB currently. In free -h, the memory used by VMware does not show up in “used memory” but only in “shared” (for example, it shows 2 GB used and 3 GB free currently). Will update the question to clarify that :) – Simon A. Eugster Jul 30 '18 at 6:55

The solution is to disable khugepaged defragmenting:

echo never | sudo tee /sys/kernel/mm/transparent_hugepage/defrag
echo 0 | sudo tee /sys/kernel/mm/transparent_hugepage/khugepaged/defrag

See this answer from the question Arch Linux becomes unresponsive from khugepaged.

Also, it is probably a good idea to limit the amount of RAM which VMware can use for running VMs to reserve some for the host system (Edit > Preferences).

VMware settings for reserved memory

Note: I am re-posting this answer under this question because the answer is very hard to find – it literally took me years.

  • 1
    alternatively, you can add to the kernel options in grub transparent_hugepage=never – Rui F Ribeiro Jul 27 '18 at 16:48

I will leave this answer here in case it might help someone else.

I've experience frequent freezes and hangs both on host (Ubuntu 19) and guest (Centos 7) while using VMware. I do not know what is the problem and I did not find a solution on any forum. I am using a Dell Xps 9570.

The freezes stopped when I deactivated "Virtualization Engine" options. Go to "Virtual Machine Settings" > "Processors" and make sure there is no checkbox selected at "Virtualization Engine".

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.