VMware Communities
linutic
Contributor
Contributor

VMWare workstation in a fistfight with Linux Memory Compactor kcompact

I run VMWare Workstation Pro 16.2.9 on a AMD 3900X with 64 GB memory, and an SSD running Ubuntu Linux 5.11.0-38-generic.

Starting about 1 year ago VMWare has been fighting with the Linux memory compactor kcompct.  When hostilities begin (Windows 10 with 4 cores at 16 GB configured) VMWare freezes with its 4 cores at 100% while kcopact runs 100% CPU.  After a few seconds, the combatants restrain themselves for about 30 seconds, then begin again.  This doesn't happen every day, but when it does happen the two combatants never seem to tire of this annoying behavior.  A Linux reboot clears up the problem, for a time.

This behavior has been mentioned on a number of forums, but I have not seen a discussion on VMWare.  (which is why I am here)   Initially the problem could be resolved by turning off Transparent Hugepages.   Then after a time, this was no longer necessary, and the two behaved themselves.  About 3 months ago, hostilities resumed, but now turning off Transparent Hugepages has little or no effect.

I'm guessing that VMWare has it's own algorithms to collect 4K pages into hugepages, which is otherwise the job of kcompact.   Possibly the two are squabbling over a futex or other exclusive resource, or maybe a pair of them.

Any chance VMWare guys could look at this problem and break up the fight?

24 Replies
Rondo85
Contributor
Contributor

This does not work for me

0 Kudos
Rondo85
Contributor
Contributor

This does not work for me. 4k Monitor, Guest with 4GB

It freeze....

0 Kudos
morebikethanman
Contributor
Contributor

I switched from Ubuntu to Arch hoping this problem would go away but it did not.  As I mentioned in an earlier post, I have tried all the suggestions and inevitably after a few days kcompactd0 has the system pegged and I have to reboot in order to use my virtual machine.  My system info is:

  • Host:
    • 17.0.1 build-21139696
    • Arch Linux 6.2.12-arch1-1
    • 16 GB RAM
    • Intel Core i7-10700 CPU @ 2.90GHz
  • Guest:
    • Windows 11 Pro 22H2
    • 4 GB Ram

Do we know if VMWare is looking into this at all?

0 Kudos
philadev
Contributor
Contributor

Same issue, hours of lost time fighting this until I came across the trick to disable kcompact. I was ready to give up on VMWare on Linux.

It seems that this could be better advertised, ideally have an advanced setting to let you fix it from VM config UI (with the appropriate warnings).

0 Kudos
goldeneye_007
Enthusiast
Enthusiast

As this toipic was begun in 2021, the answer is apparently, 'No'.

0 Kudos