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: Superboy on Jun 08, '11 08:37:46AM

This is quite a 'dangerous' hint, in regards to system stability.

If the system needs to increase the "wired" memory, and runs out of active, free and inactive memory, it WILL crash. Normally the "wired" memory is quite small, it holds things things like the contents of a text document, the current page in Safari and so on. It's data that can't be re-loaded from disk. Active and inactive memory can be re-created from the files on disk (temporary store for the UI images, etc), so the system can purge the active and inactive pages, and reload from disk later.

This is all find and dandy, until you start a virtual machine. Virtual machines are very foreign to the UNIX system, and so it can't intelligently read the virtual machine's RAM and decide what can be purged. So, it makes all the virtual machine's RAM non-purgable wired memory instead. This means that all of a sudden, the virtual machine's RAM has been mapped into wired memory, hugely increasing the size of this non-purgeable RAM type. Consequently, it means the system now has significantly less memory it can purge when the wired RAM size needs to grow further. If the system runs out of wired or active memory, it'll just purge old parts of the inactive and active types of memory to make space. If the system has no inactive or active memory left to purge and it requires more wired memory, it will crash. The system will lock up, and a hard reset will be the only option.

I disabled virtual memory on my 2006 Mac Pro when I got a SSD, but it's got 8gb RAM so has plenty to play with. I wouldn't recommend disabling virtual memory with less than 6gb, as the system can quite easily swallow up 4gb of wired memory, especially with Photoshop and Win7 in a virtual machine. If you've only got 4gb, and the system uses it all for wired memory, it'll lock up. I keep an eye on the memory usage (with iStat menus) so this doesn't happen.



[ Reply to This | # ]
10.6: Completely Disable Virtual Memory in Snow Leopard
Authored by: prijker on Jun 08, '11 11:27:46AM

I agree it's dangerous and at the begining I was expecting for some kernel panic as soon as all memory would be filled.
In fact, it's now almost 2 weeks, and still no KPs and the like, even when the 4Gb RAM limit is close.
Will keep swap file definitively off, but may be I'll go for 8 GB RAM soon.



[ Reply to This | # ]
10.6: Completely Disable Virtual Memory in Snow Leopard
Authored by: Superboy on Jun 08, '11 11:33:12AM

I have had one or two complete lockups since I turned VM off about a year ago, which I attributed to the system running out of RAM. No kernel panic, just a complete freeze when I had lots going on. It does speed things up significantly though, and as long as you don't go overboard on the number of apps running, you should be fine :)



[ Reply to This | # ]
10.6: Completely Disable Virtual Memory in Snow Leopard
Authored by: beanzos on Jun 08, '11 12:06:00PM

I had to turn it back on. was wasting too much time tracking memory usage which started interrupting real work that needed to be done. As a web developer, I keep at least 3 browsers open, many many tabs, Fusion, etc. It just piled up real quick and began slowing down eventually. The speed increase was not worth the time loss in the end.



[ Reply to This | # ]