Sample Header Ad - 728x90

How to change swap location on macOS versions like Mojave with SIP?

0 votes
0 answers
1270 views
I am using Mobile simulator and Virtual machines which are memory intensive. There are a few posts on internet about **how to change the location of Swap files on macOS versions with System Integrity Protection (SIP)**. The simplest solution without tinkering with OS internals seems to be running the below shell command after boot: sysctl vm.swapfileprefix=/Volumes/Swap/s (here /Volumes/Swap is the new swap directory) But unless SIP is disabled this command can't be executed. There should be a way to configure this on startup as I can't keep SIP disabled just to execute this command. Does setting this in */etc/sysctl.conf* work on macOS? Has anyone of you tried this? This solution is suggested in this post from 2015 for older versions of macOS when SIP didn't exist. https://apple.stackexchange.com/questions/1465/how-can-i-move-virtual-memory-swap-files-to-a-different-drive-or-partition **Open to any other alternative solutions.** Sorry for cross posting but I didn't get any constructive replies on Apple forum.
Asked by Amal (1 rep)
Apr 14, 2021, 10:20 AM
Last activity: Sep 6, 2024, 06:36 AM