Disable Paging in Mac OS X

Virtual memory, Paging or Swap used to be a way to pretend your computer had more memory than it actually had. It made it possible to run programs that would otherwise not run at all. But it was never fast. Nowadays when modern computers have at least 2Gb of RAM, swap is not very needed. In fact you rather want your OS to use memory to cache the contents of your hard drive, not the other way around. Linux handles this thing beautifully; give it swap it does not need and it will not touch it; give it more memory than needed and it will make use of it. Mac OS X however, does not use its swap (or paging) very nicely. I found a hack that disables paging entirely in Mac OS X. I like it. Try it if you have more memory than you need. Dont use all your memory 😉

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

#ON
sudo launchctl load -wF /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist

Works on 10.5, and probably more versions. You find your swap files in

/private/var/vm

and you can delete them after turning paging off.

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.