Thursday, 31 October 2019

Disable compressed memory in Mac OS 10.9 Mavericks?


Is there any way to disable memory compression in Mavericks? Ever since I upgraded, my Minecraft server has been using ludicrous amounts of CPU time and choking. I'd like to test without compressed memory to see if that might be the culprit.



Answer



vm/vm_pageout.h defines the modes for the vm_compressor boot argument, which defaults to VM_PAGER_COMPRESSOR_WITH_SWAP (per vm/vm_compressor.c). For OS X 10.9, 10.10, and 10.11, you can disable compression by changing the vm_compressor_mode argument to 1 (VM_PAGER_DEFAULT). That is:


sudo nvram boot-args="vm_compressor=1"

Then reboot. You can verify the change was successful by running:


sysctl -a vm.compressor_mode

Starting with macOS 10.12 Sierra, the old VM_PAGER_DEFAULT is no longer supported and vm_compressor=1 is converted to vm_compressor=4 inside the kernel.


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...