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 Image may be NSFW.
Clik here to view.
#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.