Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Cocktail claims to be able to disable swap.

And it's a bad idea :p

If I'm sure I'd never run out of memory, is it still a bad idea? I'm doing this for security reasons because I'm paranoid somebody's going to steal my passport from the pagefiles.

Is there a way to do this without installing apps/hacks on my computer? I'd like to do it myself with Terminal or something if possible
 
You can have OS X encrypt your swap files. Under OS X 10.6:

Apple menu > System Preferences > Security > General tab > Checkbox for Use Secure Virtual Memory.​
 
And hey, if you like to live dangerously, you can take advantage of the fact the OS X won't replace a folder with a file. I don't "recommend" this and you should make a bootable clone of your system before trying it. The below will require authenticating with an Administrator password:

  1. Delete the swapfiles in private/var/vm.
  2. Create a folder on your Desktop and name it swapfile0.
  3. Move that folder into private/var/vm.
  4. Reboot.
  5. Activity Monitor verifies no page in/outs.
  6. Do Finder > Finder menu > Secure Empty Trash, since you are concerned about security of swap file contents.

You can also take this approach to disable hibernation by installing a folder where the sleepimage is located.
 
Last edited:
If I'm sure I'd never run out of memory, is it still a bad idea? I'm doing this for security reasons because I'm paranoid somebody's going to steal my passport from the pagefiles.

Is there a way to do this without installing apps/hacks on my computer? I'd like to do it myself with Terminal or something if possible

I have no idea what you mean by "steal your passport" but why not just use drive encryption? Not that I can imagine anybody going through the trouble of trying to steal data from a swap file.
 
I have no idea what you mean by "steal your passport" but why not just use drive encryption? Not that I can imagine anybody going through the trouble of trying to steal data from a swap file.

lol. I meant password, but I suppose passports would theoretically be an issue as well. :D

whole drive encryption bogs down performance, and constant decryption mades my idle speeds in the high 50C.



frankieboy: Thanks a lot. I will try your suggestion and report back
 
If I'm sure I'd never run out of memory, is it still a bad idea? I'm doing this for security reasons because I'm paranoid somebody's going to steal my passport from the pagefiles.

Is there a way to do this without installing apps/hacks on my computer? I'd like to do it myself with Terminal or something if possible

You should wear a tinfoil hat around so the gov't can't steal your thoughts too! What do you have that is password protected than anyone would want to have anyway?
 
I'm not sure you can disable swap anymore...

How much RAM do you have any way? I'd be surprised there is a MBP with enough RAM out there to fit everything in RAM. 16 gigs doesn't seem like nearly enough.

Also, disabling VM is basically disabling the crash protection on your computer. VM is used to enforce stability.

This is a bad bad idea. And as other posters said, you can just encrypt your swap anyway.
 
I'm not sure you can disable swap anymore...

How much RAM do you have any way? I'd be surprised there is a MBP with enough RAM out there to fit everything in RAM. 16 gigs doesn't seem like nearly enough. Heck, I'm on a Mini with 200 gigs worth of VM right now.

LOL What? Stuff gets swapped in and out of ram as it is needed. I have 8GB of ram, and never use more than 5.5GB. I disabled the swap file using the tutorial I pointed to above, and all is working flawlessly.

Granted if you have less than 8GB or you do ALOT simultaneously then disabling swap is a bad idea.
 
This is so dumb.

Encrypting your swap file (only), as mentioned by frankieboy, costs you nothing when you're not using the swap file.

But it allows you to run into your RAM limit (which a poorly written Flash object could do by itself) without bringing the entire OS down hard.

To avoid the possibility of having to use your processor to encrypt or decrypt some data, you're willing to live with the equally likely possibility of a data-destroying hard crash.

It's a free country -- if you like living with a loaded gun pointed at your head all the time, you can. There's just absolutely no point.
 
LOL What? Stuff gets swapped in and out of ram as it is needed. I have 8GB of ram, and never use more than 5.5GB. I disabled the swap file using the tutorial I pointed to above, and all is working flawlessly.

Granted if you have less than 8GB or you do ALOT simultaneously then disabling swap is a bad idea.

Right, but your swap file is usually at least a few times the amount you currently have in memory. The system doesn't just move stuff into swap when you run out of memory, it also moves stuff into swap when it thinks something is inactive. Swap isn't just "backup memory."

VM is also an important part of how memory protection works. Turning it off will decrease system stability.
 
Right, but your swap file is usually at least a few times the amount you currently have in memory. The system doesn't just move stuff into swap when you run out of memory, it also moves stuff into swap when it thinks something is inactive. Swap isn't just "backup memory."

VM is also an important part of how memory protection works. Turning it off will decrease system stability.

Good to know. I will keep this in mind. If I start to notice instability it is easy to revert. So far it is working just fine, but I also do not run flash. Not sure if that makes a difference. I uninstalled flash and use Chrome for the rare moments I need flash.
 
The 2.2 and 2.3GHz MBPs have decryption/encryption tools built into the processors which greatly reduce the time it takes to encrypt/decrypt so lag is not really as much an issue as it used to be.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.