Created
April 4, 2022 10:23
-
-
Save alexalouit/9d65c90ee022f00a508c66d64ab2505f to your computer and use it in GitHub Desktop.
macOS: reduce ram usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- disable SIP | |
# boot in recovery mode (Command + R) | |
# open utilities / terminal | |
$ csrutil disable | |
- disable Spotlight indexing | |
$ sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist | |
- change swapper default mode | |
vm_pageout.h: | |
#define VM_PAGER_DEFAULT 0x1 /* Use default pager. */ | |
#define VM_PAGER_COMPRESSOR_NO_SWAP 0x2 /* In-core compressor only. */ | |
#define VM_PAGER_COMPRESSOR_WITH_SWAP 0x4 /* In-core compressor + swap backend. */ | |
#define VM_PAGER_FREEZER_DEFAULT 0x8 /* Freezer backed by default pager.*/ | |
#define VM_PAGER_FREEZER_COMPRESSOR_NO_SWAP 0x10 /* Freezer backed by in-core compressor only i.e. frozen data remain in-core compressed.*/ | |
#define VM_PAGER_FREEZER_COMPRESSOR_WITH_SWAP 0x20 /* Freezer backed by in-core compressor with swap support too.*/ | |
$ sysctl -a vm.compressor_mode | |
vm.compressor_mode: 4 | |
$ sudo nvram boot-args="vm_compressor=2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment