Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.6: Completely Disable Virtual Memory in Snow Leopard' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.6: Completely Disable Virtual Memory in Snow Leopard
Authored by: aubreyapple on Jun 08, '11 08:13:32PM

Many of the comments about how dangerous it is to disable virtual memory suggest that it is impossible to run out of memory with VM on. This is certainly untrue as the real memory + swap can also run out depending on how much space you have on your disk. So, while it is less likely to crash due to running out of memory, it is FAR from impossible. If one can monitor carefully his usage and keep it well under the amount of real memory, this hint is very rational. If you do not wish to do that monitoring, then you should not disable VM (as other commenters suggest as well). The comments about a minimum of 6G is probably about right, but YMMV.

What DOES surprise me is that the system is faster when you do this. If the system is swapping when there is plenty of real memory it seems like there is a serious kernel bug. In my experience with linux this does not seem to be an issue... in fact we usually keep very little swap space because we do not really ever want to spill over into swap anyway. Note that on the old Solaris systems, you needed at least as much swap as real memory or you could not use the real memory. That was a real bummer but long since fixed in modern linux look alikes such as MacOS.



[ Reply to This | # ]
10.6: Completely Disable Virtual Memory in Snow Leopard
Authored by: patpro on Jun 09, '11 12:35:41AM

I've used this hint on my Mac Pro (12 GB RAM), and I see absolutely no speed gain. Running a large windows VM, re-computing some Bridge CS3 thumbnail, and other intensive task was as fast as usual.
That would be nice to provide a way to actually benchmark the effect of disabling dynamic_pager on Mac OS X.

---
http://www.patpro.net/



[ Reply to This | # ]
10.6: Completely Disable Virtual Memory in Snow Leopard
Authored by: dr3do on Jun 09, '11 01:24:22AM

Well on several of my systems (servers and also clients) I see a huge difference using this tweak…

With activated "vm-swap" it looks like this:
http://cl.ly/3y0G0B1r2o1n0B2y2D41

With deativated "vm-swap" it looks like this:
http://cl.ly/1S3o0x0J1j3b3t1b141C

I already use very fast system, but even on a dual SSD system Safari used a lot of jumps in the dock - OK, compared to HD it's like no jump ;) - while starting up. Also Office 2011 took some jumps. But with this tweak they cant finish the first... peng open.

And yes, like some mentioned before. Memory management of OS X (a least 10.6) has a huge kernel bug and do not work very efficient. And also yes, inactive memory != free memory - at lest under OS X.

That's my experience, which hopefully HTH someone.



[ Reply to This | # ]
10.6: Completely Disable Virtual Memory in Snow Leopard
Authored by: patpro on Jun 11, '11 01:01:45AM

I'm a bit skeptical about the measurement of memory when pager is disabled. I fact I don't understand the result: why is active memory stays low when I'm running big software?

Take a look at these graphs:

http://patpro.net/~patpro/pager_memory_all-day.png
http://patpro.net/~patpro/pager_memory_all-week.png

First one shows memory usage for a day, after pager has been deactivated, on a Mac Pro, 12 GB RAM. The spikes of memory consumption are due to Left 4 Dead 2 (around Fri 8:00, Fri 23:00). Active memory stays about the same value.

Second one shows memory usage for a week: from 3rd to 8th of June, pager is active, after, pager is deactivated. Before deactivation, you can see the effect of playing Left 4 Dead 2 (every memory spikes). It clearly shows that playing L4D2 increases active memory usage by approximatively 2 GB when pager is active, and by nothing when pager is inactive. Note that on the 8th of June, uptime of the system was around 50 days, so active memory being so high is ok.

---
http://www.patpro.net/


[ Reply to This | # ]