[10.6] Disabling Virtual Memory

bwana

MyBroadband
Super Moderator
Joined
Feb 23, 2005
Messages
97,645
Reaction score
37,758
Location
Plz
http://hints.macworld.com/article.php?story=201106020948369

I did this a couple weeks ago and the speed boost was noticeable. Not for the faint hearted because if you run out of physical memory your machine will freeze - it's only happened to me once but I will be getting more RAM (currently have 4GB).

I'm not sure if the boost was so noticeable because I'm using a hybrid drive so if anyone else tries it (or has tried it) it would be interesting to know if they received a similar boost.
 
That's just crazy!
Maybe . . . but it worked.

I've got iStat menu displaying my memory usage at any given time so at least I know when I might be heading into troubled waters.
 
Does this not indicate OS X has inefficient swap usage?

With 4GB ram in linux my swap file does not get used as far as I'm aware by looking at system stats. More ram would obviously help with this.
 
Does this not indicate OS X has inefficient swap usage?
It could be that, or it could be something to do with the hybrid drive I use. If I had a spare 500gb 7200 drive lying around I could clone it and see for myself but unfortunately all I have ATM is a 500gb 5400.
 
It could be that, or it could be something to do with the hybrid drive I use. If I had a spare 500gb 7200 drive lying around I could clone it and see for myself but unfortunately all I have ATM is a 500gb 5400.

Prior to trying this at what point (normal memory usage) did the use of virtual memory kick in?

I can't really see how your hybrid drive would affect it as it looks like a normal drive to the OS, the smart caching etc is handled by the drives logic and is transparent to the OS.

I always considered disabling my swap but never bothered as it never gets used (in linux anyway).
 
ponder;6367261[B said:
]Prior to trying this at what point (normal memory usage) did the use of virtual memory kick in?[/B]

I can't really see how your hybrid drive would affect it as it looks like a normal drive to the OS, the smart caching etc is handled by the drives logic and is transparent to the OS.

I always considered disabling my swap but never bothered as it never gets used (in linux anyway).
No idea, nor would I know how to monitor it to that degree.
 
I have done this before. Unfortunately, disabling virtual memory also disables suspend-to-disc, which I rely on since I have full disc encryption :(

I don't quite know what the triggers are, but OSX swaps things out to disc on a pre-emptive basis, presumably to always have a given percentage of physical memory available. Unfortunately, with memory-hungry applications, this can become a problem.

The linux kernel has a "swappiness" value that you can set - I really wish OSX had something like this.
 
I did a bit of googling and there seems to be a lot of complaints about the swap file behaviour.
One example, https://discussions.apple.com/thread/2156286?start=0&tstart=0
Many people reckon the OS X dynamic pager is a piece of horse manure.

Maybe someone here would like to do an experiment. Apparently you can setup OS X to use a swap partition instead of swap files. Maybe try setting up a swap partition 1.5x physical ram size and use that instead of swap files and see how it behaves. OS X seems to create multiple swap files so if it's hunting for data between them maybe that is slower than a dedicated swap partition? It's worth a try anyway.

Keep an eye on your activity monitor for swap usage, page ins & page outs.

This dude hacked his own custom pager from the apple source code http://cestdelamerde.com/archives/22-Killing-Mac-OS-X-Swapping-How-To-Disable-dynamic_pager.html from 2008 though.
 
Last edited:
I'd just stay away from it. Its all unnecessary tweaking that will eventually crash OSX, for small amounts of speed gains. How much extra speed do you really need? 2secs faster?. Why not add more Ram, get a faster HDD (SSD or Hybrid), etc etc.
 
I'd just stay away from it. Its all unnecessary tweaking that will eventually crash OSX, for small amounts of speed gains. How much extra speed do you really need? 2secs faster?. Why not add more Ram, get a faster HDD (SSD or Hybrid), etc etc.
The increase, especially with Aperture and Photoshop, was considerable. As covered in my previous posts I am using a hybrid and I am looking to get more RAM. In the weeks that I've been running this way I've had one crash.
 
Some are saying that dedicating a small partition for V Memory is better. Have you tried this and whats your opinion?
 
I'd just stay away from it. Its all unnecessary tweaking that will eventually crash OSX, for small amounts of speed gains. How much extra speed do you really need? 2secs faster?. Why not add more Ram, get a faster HDD (SSD or Hybrid), etc etc.
Yip. Get an SSD and 8gb RAM or even 16gb!
 
Some are saying that dedicating a small partition for V Memory is better. Have you tried this and whats your opinion?
I haven't, but if I can find some simple to follow instructions I may well give it a shot.
 
Top
Sign up to the MyBroadband newsletter
X