<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Player 16.2.4 Memory Management Failure: Guest Freezes for kcompactd0 Hugepages Defrag in VMware Workstation Player Discussions</title>
    <link>https://communities.vmware.com/t5/VMware-Workstation-Player/Player-16-2-4-Memory-Management-Failure-Guest-Freezes-for/m-p/2923918#M39295</link>
    <description>&lt;P&gt;Tested with vmware workstation 16.2.4, ubuntu 22.04 host, win10 guest on intel alder lake platform. The "intel_iommu=on" does NOT work.&lt;/P&gt;</description>
    <pubDate>Mon, 15 Aug 2022 14:09:00 GMT</pubDate>
    <dc:creator>jiaxinslee</dc:creator>
    <dc:date>2022-08-15T14:09:00Z</dc:date>
    <item>
      <title>Player 16.2.4 Memory Management Failure: Guest Freezes for kcompactd0 Hugepages Defrag</title>
      <link>https://communities.vmware.com/t5/VMware-Workstation-Player/Player-16-2-4-Memory-Management-Failure-Guest-Freezes-for/m-p/2922520#M39278</link>
      <description>&lt;P&gt;Adding to the Workstation/Player 16 woes, including a &lt;A href="https://communities.vmware.com/t5/VMware-Workstation-Player/VMware-Player-16-2-3-and-16-2-4-Linux-Host-Interceps-Keystrokes/m-p/2921547#M39251" target="_self"&gt;failure of Wayland support&lt;/A&gt;, a &lt;A href="https://communities.vmware.com/t5/VMware-Workstation-Pro/VMware-16-2-3-not-working-on-Ubuntu-22-04-LTS/m-p/2922479#M177047" target="_self"&gt;failure to compile&lt;/A&gt;, a &lt;A href="https://communities.vmware.com/t5/VMware-Workstation-Player/ubuntu-22-04-install-vm-workstation-error/m-p/2921632#M39254" target="_self"&gt;failure to start&lt;/A&gt;, and a &lt;A href="https://communities.vmware.com/t5/VMware-Workstation-Player/Player-16-2-4-on-Ubuntu-22-04-5-15-0-41-generic-Fails-to-Launch/m-p/2920507#M39233" target="_self"&gt;failure to launch any guest&lt;/A&gt;, we now can add a failure of memory management.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Specifically, on a Ubuntu 22.04 host, a Windows 10 guest freezes when, &lt;EM&gt;e.g.&lt;/EM&gt;, a database application (&lt;EM&gt;e.g.&lt;/EM&gt;, Microsoft Access .accdb) is opened or video is attempted to run in a browser (specifically, Firefox).&amp;nbsp; This behavior also will occur without either of the foregoiing, but with as few as seven tabs open in Firefox with static content.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Running # top on the host reveals that the process kcompactd is pinning one CPU core at 100% while the process vmware-vmx is running at 280%-290%.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is notwithstanding various configuration changes recommended in sundry posts across the Internet to address transparent hugepages, memory compaction, video demands, and guest behavior, including:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Disablilng transparent hugepages and defragging thereof for the host via kernel command line (transparent_hugepage=never), and startup script (echo never | tee /sys/kernel/mm/transparent_hugepage/enabled; echo never | tee /sys/kernel/mm/transparent_hugepage/defrag; echo 0 | tee /sys/kernel/mm/transparent_hugepage/khugepaged/defrag).&lt;/LI&gt;&lt;LI&gt;Disabling compaction proactiveness for the host in /etc/sysctl.conf (vm.compaction_proactiveness=0) and for the guest in its VMX file (vm.compaction_proactiveness=0).&lt;/LI&gt;&lt;LI&gt;Disabling HDD write caching in the guest's Virtual Machine Settings.&lt;/LI&gt;&lt;LI&gt;Launching vmplayer having set vblank_mode=0&lt;/LI&gt;&lt;LI&gt;Changing the Windows 10 guest's power options to prevent powering off its HDD.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again, notwithstanding all of the foregoing, which took a half day to implement, a Windows 10 guest nevertheless continues to freeze under trivial memory demands.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Windows 10 guests running in VirtualBox are reported not to exhibit this behavior.&amp;nbsp; I currently am evaluating this and a similar guest running in KVM myself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Windows 10 guests running in Player 15 did not exhibit this behavior, nor any of the above-mentioned other failures.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Clearly, the VMware devs have their work cut out for them to fix this flaw.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pending a bug fix, any suggestions of further configuration to eliminate this issue would be especially well received.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 18:19:39 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-Workstation-Player/Player-16-2-4-Memory-Management-Failure-Guest-Freezes-for/m-p/2922520#M39278</guid>
      <dc:creator>ebsf1</dc:creator>
      <dc:date>2022-08-05T18:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: Player 16.2.4 Memory Management Failure: Guest Freezes for kcompactd0 Hugepages Defrag</title>
      <link>https://communities.vmware.com/t5/VMware-Workstation-Player/Player-16-2-4-Memory-Management-Failure-Guest-Freezes-for/m-p/2923603#M39293</link>
      <description>&lt;P&gt;A solution seems to exist.&amp;nbsp; This turns out to be a host IOMMU issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Notwithstanding that Intel VT-x and VT-d are enabled in the host firmware, kernel version 5.15.0-46-generic disables IOMMU by default.&amp;nbsp; The kernel is configured with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CONFIG_INTEL_IOMMU=y&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # CONFIG_INTEL_IOMMU_DEFAULT_ON is not set&lt;/P&gt;&lt;P&gt;That is, intel_iommu is compiled into the kernel but not (or no longer is) enabled by default (note the octothorpe commenting out the second configuration option).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adding the following to the kernel command line fixes the guest freezes and kcompactd0 no longer pins its CPU core at 100%, at least thus far:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; intel_iommu=on&lt;/P&gt;&lt;P&gt;So, for GRUB, edit /etc/default/grub to add the above string to GRUB_CMDLINE_LINUX_DEFAULT, &lt;EM&gt;e.g.&lt;/EM&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on"&lt;/P&gt;&lt;P&gt;Save and close the file, then run:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # update-grub&lt;/P&gt;&lt;P&gt;Reboot to take effect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For systemd-boot, either (a) add the above string to a separate line in /etc/kernel/cmdline or (b) add the following to your boot entry .conf file in /loader/entries:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; options intel_iommu=on&lt;/P&gt;&lt;P&gt;Save and close the file, then reboot to take effect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2022 19:46:52 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-Workstation-Player/Player-16-2-4-Memory-Management-Failure-Guest-Freezes-for/m-p/2923603#M39293</guid>
      <dc:creator>ebsf1</dc:creator>
      <dc:date>2022-08-12T19:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: Player 16.2.4 Memory Management Failure: Guest Freezes for kcompactd0 Hugepages Defrag</title>
      <link>https://communities.vmware.com/t5/VMware-Workstation-Player/Player-16-2-4-Memory-Management-Failure-Guest-Freezes-for/m-p/2923918#M39295</link>
      <description>&lt;P&gt;Tested with vmware workstation 16.2.4, ubuntu 22.04 host, win10 guest on intel alder lake platform. The "intel_iommu=on" does NOT work.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 14:09:00 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-Workstation-Player/Player-16-2-4-Memory-Management-Failure-Guest-Freezes-for/m-p/2923918#M39295</guid>
      <dc:creator>jiaxinslee</dc:creator>
      <dc:date>2022-08-15T14:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: Player 16.2.4 Memory Management Failure: Guest Freezes for kcompactd0 Hugepages Defrag</title>
      <link>https://communities.vmware.com/t5/VMware-Workstation-Player/Player-16-2-4-Memory-Management-Failure-Guest-Freezes-for/m-p/2923958#M39296</link>
      <description>&lt;P&gt;&lt;a href="https://communities.vmware.com/t5/user/viewprofilepage/user-id/1193532"&gt;@jiaxinslee&lt;/a&gt;,&amp;nbsp; think you're right.&lt;BR /&gt;&lt;BR /&gt;This hack, like others that have been suggested in various posts to address this phenomenon, &lt;EM&gt;e.g.&lt;/EM&gt;, fiddling with vm.compaction_proactiveness and vm.swappiness, turns out not to have eliminated the phenomenon entirely.&lt;BR /&gt;&lt;BR /&gt;The hack did eliminate the phenomenon for a few days, and it also continues to improve performance.&amp;nbsp; Nevertheless, the behavior returned, with intermittent episodes of kcompactd0 pinning its CPU core at 100%, freezing the guest, albeit not the host.&amp;nbsp; The duration of the episodes is significantly less than before, however, perhaps only a minute or two instead of ten or twenty, or even hours.&lt;/P&gt;&lt;P&gt;One bit of memory jiu-jitsu I'm experimenting with is a host tmpfs share.&amp;nbsp; Specifically, I createe a tmpfs on a host mount point via fstab.&amp;nbsp; The host serves files via Samba, so the mount point is within an existing Samba share.&amp;nbsp; Then, on the Windows 10 guest, I created a directory symbolic link to the host's tmpfs share (mklink /d C:\tmp \\server\share\tmpfs-mount-point) and edited %TMP% and %TEMP% to refer to the symlink.&amp;nbsp; An alternative configuration would map a drive letter, &lt;EM&gt;e.g.&lt;/EM&gt;, T:\, to the tmpfs share and could be better for the purpose.&amp;nbsp; Either way, this effectively gives me a RAM mount for temp files on the Windows guest's filesystem.&amp;nbsp; It definitely has improved performance and responsiveness and we'll see whether it has any effect on the kcompactd0 behavior.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 16:43:01 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-Workstation-Player/Player-16-2-4-Memory-Management-Failure-Guest-Freezes-for/m-p/2923958#M39296</guid>
      <dc:creator>ebsf1</dc:creator>
      <dc:date>2022-08-15T16:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Player 16.2.4 Memory Management Failure: Guest Freezes for kcompactd0 Hugepages Defrag</title>
      <link>https://communities.vmware.com/t5/VMware-Workstation-Player/Player-16-2-4-Memory-Management-Failure-Guest-Freezes-for/m-p/2925871#M39338</link>
      <description>&lt;P&gt;Another few hacks that have improved and perhaps fixed this, at least so far.&lt;/P&gt;&lt;P&gt;Doubtless, this is a memory management issue requiring both guest and host tweaks.&lt;/P&gt;&lt;P&gt;I got a big improvement with two guest tweaks, first by manually defining pagefile.sys size in System Properties (it was system-managed and &amp;gt;10GB; I reduced it to ~2GB and min=max), and second, by reconfiguring superfetch on the Windows 10 guest for boot only, not boot and applications.&amp;nbsp; This prevents superfetch from loading all of one's commonly-used apps into memory in advance, substantially reducing dirty pages.&amp;nbsp; So:&lt;/P&gt;&lt;P&gt;[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters]&lt;BR /&gt;"EnableSuperfetch"=dword:00000002&lt;/P&gt;&lt;P&gt;Meanwhile, on the Linux host, and in addition to the foregoing IOMMU tweaks, I've set the following kernel parameters in sysctl.conf:&lt;/P&gt;&lt;P&gt;vm.compaction_proactiveness=0&lt;BR /&gt;vm.swappiness=1&lt;/P&gt;&lt;P&gt;These two parameter settings may be overkill in light of other kernel parameters that configure memory compaction and memory reclaim but (a) they work; and (b) I don't have time to figure out the other parameters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2022 19:11:55 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-Workstation-Player/Player-16-2-4-Memory-Management-Failure-Guest-Freezes-for/m-p/2925871#M39338</guid>
      <dc:creator>ebsf1</dc:creator>
      <dc:date>2022-08-25T19:11:55Z</dc:date>
    </item>
  </channel>
</rss>

