experchange > mac.system

Alan Browne (08-06-15, 05:33 PM)
On 2015-08-06 11:25, Alan Browne wrote:
> On 2015-08-06 00:02, JF Mezei wrote:
> No. When I boot there is no swapfile at all. Swap use usually appears
> days after a reboot. Possibly when I have something like Windows under
> Fusion, + Phototshop with several large phots loaded + ram disk with a
> gig or so in it as well as "the usual" apps (Mail, Messages, Contacts,
> Chrome, Calendar, etc.). Even then, there would be 10+ GB of free ram -
> yet a swap file is setup for a few hundred measly MB.


Clarification: no "swap used" is shown in the Monitor Memory display.
ydroscratchin (09-22-15, 03:23 AM)
El viernes, 31 de julio de 2015, 17:26:14 (UTC+2), John Albert escribió:
[..]
> I don't require a lecture on why I shouldn't do this, it's for
> experimental purposes only on a drive volume that is not my "main drive"....
> Thanks...


First disable SIP. For that, go to Recovery Partition with 'Alt' at boot. Then go to terminal.app on Recovery Partition. Type:

csrutil disable

Second. Reboot and type your command:
sudo launchctl unload -wF /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist

Enjoy.
ydroscratchin (09-22-15, 03:32 AM)
I forgot these two additional steps:

Third. Type the next command to check the virtual memory current status:

sysctl vm.swapusage

Fourth. rm -rf /var/vm/sleepimage. Mine was about 4.3 GB.
ydroscratchin (09-22-15, 04:12 AM)
1st disable SIP. For that, go to Recovery Partition with 'Alt' at boot. Then go to terminal.app on Recovery Partition. Type:

csrutil disable

2nd Reboot and type your command:
sudo launchctl unload -wF /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist

3rd. Type the next command to check the virtual memory current status:

sysctl vm.swapusage

and you will see this output...
vm.swapusage: total = 0,00M used = 0,00M free = 0,00M (encrypted)

4th. Remove old 'sleepimage' file:
rm -rf /var/vm/sleepimage. (Mine was about 4.3 GB. I have 8GB RAM)

5th.1. On 10.6 disable secure virtual memory/encrypted swap by typing:
sudo defaults write /Library/Preferences/com.apple.virtualMemory UseEncryptedSwap -boolean NO

Then reboot.

5th.2. On 10.7/10.8 it changes to:
sudo defaults write /Library/Preferences/com.apple.virtualMemory DisableEncryptedSwap -boolean yes

Then reboot.

5th.3. On 10.9/10.10/10.11 disable it by typing:
sudo nvram boot-args="vm_compressor=1", and then reboot.

6th. Type next command to check compressor_mode:
sysctl -a vm.compressor_mode

7th. Type again 3th command to check encrypted swap disabled status:
sysctl vm.swapusage
---------------------------------------------------------------------------



FOR COMPRESSOR MODES INFO.
ydroscratchin (09-22-15, 04:52 AM)
Recommended "vm_compressor=2" or "vm_compressor=4". Compressor mode 4 (VM compressed + swap) and all the steps between 1st-4th descripted before, is equal than compressor mode 2 (VM compressed/encrypted without swap).

In compressor mode 1, if you disable swap, system is always 100% memory pressure, and if memory is full at some point, the system will freeze. So i recommended mode 2 or 4 with steps to disable swap applied.

Similar Threads