To disable secure virtual memory in 10.7, one does the following:

sudo defaults write /Library/Preferences/com.apple.virtualMemory DisableEncryptedSwap -boolean yes

However, are there any benefits to disabling secure system memory? I'm not concerned with security as much as I 'm concerned about system speed.


According to MacWorld, the advantage of disabling encrypted swaps should be “just a slightly less overhead on the page in & out process”.

So yes, there is a minor performance gain, but it won’t be a huge performance boost. To me, it’s not worth the security risk (of potentially having unencrypted passwords and other sensitive data in swap memory).

You’d get a much bigger performance boost if you’d disable virtual memory completely:

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist

To re-enable it:

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist
  • Thanks for your answer! I was hoping for some statistics, but I guess that's not feasible. – sudo rm -rf Mar 24 '12 at 18:06
  • 3
    Technically: you can't disable virtual memory – with OS X, there's more to VM than external swap files. Unloading the dynamic_pager daemon can boost performance but it's not without risks: see answers to Disable Mac's dynamic_pager? and to Why would I disable swap file in Mac OS X? – Graham Perrin Apr 27 '13 at 12:13
  • Of course, if you're using FileVault 2 on all volume(s) holding your swap file(s), the only security risk to disabling secure VM should be that you might one day stop using FileVault but forget to re-enable secure VM. – Terry N Aug 28 '14 at 1:40
  • Well, maybe not the only security risk, but that's what replaces the primary one. It still creates an additional, easier route by which someone with administrative access could harvest sensitive info like passwords from your live system. – Terry N Aug 28 '14 at 1:47
  • @TerryN: Urh, someone with root privilege can just read memory directly. Reading the disk swap file is actually more hassle. – Siyuan Ren Oct 21 '14 at 7:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .