{"id":2997,"date":"2022-01-20T15:41:02","date_gmt":"2022-01-20T23:41:02","guid":{"rendered":"https:\/\/rglinuxtech.com\/?p=2997"},"modified":"2022-01-20T15:41:02","modified_gmt":"2022-01-20T23:41:02","slug":"vmware-convoluted-guest-freeze-fix","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=2997","title":{"rendered":"VMware &#8211; Convoluted Guest Freeze Fix&#8230;"},"content":{"rendered":"<p>I had been struggling for some considerable time with guest (Win10) performance issues with VMware &#8211; including application (Photoshop CS6) &#8216;freezing&#8217; for a time, and overall very sluggish responses..<\/p>\n<p>I had found several articles that suggested cause\/effect\/fix for this, but none really worked..<\/p>\n<p>I made changes to control khugepaged:<br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[root@rglinux820 ~]$ echo never | tee \/sys\/kernel\/mm\/transparent_hugepage\/defrag<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">never<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[root@rglinux820 ~]$ echo 0 | tee \/sys\/kernel\/mm\/transparent_hugepage\/khugepaged\/defrag<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">0<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[root@rglinux820 ~]$ cat \/sys\/kernel\/mm\/transparent_hugepage\/defrag<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">always defer defer+madvise madvise [never]<\/span><\/strong><\/p>\n<p>&#8211; and added &#8216; <span style=\"font-family: Courier New, Courier, monospace;\"><strong>transparent_hugepage=never<\/strong><\/span> &#8216; to the kernel command line..<\/p>\n<p>&#8211; but this only worked for a while after host reboot, and then the guest freezing started again.<\/p>\n<p>I then found another suggestion, regarding <strong>kcompactd0<\/strong>, and made the following changes (as root):<br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>$ echo 0 &gt; \/proc\/sys\/vm\/compaction_proactiveness<\/strong><\/span><br \/>\nand (for a permanent fix) added the following to <strong>\/etc\/sysctl.conf<\/strong>:<\/p>\n<p><span style=\"font-family: Courier New, Courier, monospace;\"><strong># Fix problem when vmware is affected by kcompactd0.<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>vm.compaction_proactiveness=0<\/strong><\/span><\/p>\n<p>After all these changes, the freezing problem seems to have &#8211; finally &#8211; disappeared..<\/p>\n<p>It should be mentioned that Win10 also may need &#8216;power\/performance&#8217; settings altered to prevent &#8216;disk sleep&#8217; issues etc., but that is outside the scope of a Linux article!..<\/p>\n<p>There may be other workarounds\/fixes, but these are the ones that worked for me..<\/p>\n<p>Acknowledgements&#8230;<br \/>\nThe original articles I found are here &#8211; and one has been updated to cover a potential Win11 guest issue:<br \/>\n<a href=\"https:\/\/unix.stackexchange.com\/questions\/458893\/vmware-on-linux-host-causes-regular-freezes\" target=\"_blank\" rel=\"noopener\">https:\/\/unix.stackexchange.com\/questions\/458893\/vmware-on-linux-host-causes-regular-freezes<\/a><br \/>\nand<br \/>\n<a href=\"https:\/\/gist.github.com\/2E0PGS\/2560d054819843d1e6da76ae57378989\" target=\"_blank\" rel=\"noopener\">https:\/\/gist.github.com\/2E0PGS\/2560d054819843d1e6da76ae57378989<\/a> (scroll down to the comments by <em>neves-0<\/em> and <em>gene-olsen<\/em> for the kcompactd0 fix..)<\/p>\n<p><em>Robert Gadsdon. January 20th, 2022.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had been struggling for some considerable time with guest (Win10) performance issues with VMware &#8211; including application (Photoshop CS6) &#8216;freezing&#8217; for a time, and overall very sluggish responses.. I had found several articles that suggested cause\/effect\/fix for this, but none really worked.. I made changes to control khugepaged: &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.. [root@rglinux820 ~]$ echo never | tee \/sys\/kernel\/mm\/transparent_hugepage\/defrag <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=2997\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[11,14,15,19,20,25],"tags":[163,2458,2460,2459,402],"class_list":["post-2997","post","type-post","status-publish","format-standard","hentry","category-hacks","category-kernel","category-linux-2","category-opinion","category-performance-2","category-vmware","tag-fixes","tag-guset-freeze","tag-kcompactd0","tag-transparent_hugepage","tag-vmware-2"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2997","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2997"}],"version-history":[{"count":1,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2997\/revisions"}],"predecessor-version":[{"id":2998,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2997\/revisions\/2998"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2997"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2997"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2997"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}