The Inactive RAM / Memory Management Thread
It's time to get to the bottom of this "inactive RAM" issue. I've heard lots of complaints about it, and I have suffered from it myself. Sometimes, it chews up all the free RAM and leaves my system crawling and paging out a lot. This often happens when I open VMWare Fusion, but it can also be caused by certain third-party background programs like Little Snitch.
Many have said that it's essentially free RAM because it can be immediately used when needed, and others have also said that having lots of used or inactive RAM isn't necessarily bad because it means that the system is optimizing. This isn't really true. When the problem with inactive RAM occurs, the system refuses to use it and instead starts paging. This causes a massive slowdown. So, first of all, the inactive RAM is NOT free, and secondly, the system's memory optimization is going horribly wrong when this occurs.
Apple really should fix this, and if you experience it, you should leave them feedback... Mavericks still seems to have the problem. But for now, I'll list the partial solutions to this. Hopefully others will reply with more information:
- Try downloading EtreCheck to check for third-party launch items so you can go in and remove them. It's a preventative solution that worked for my friend. But if you use VMWare Fusion, which is known to cause issues...
- The "purge" command will free up all the inactive RAM, but it only works in Lion and earlier.
- FreeMemory frees up inactive RAM but takes longer than purge. Unfortunately, it's only available on the App Store (at least it's free), and I can't download it anymore for some reason. I went to it on my App Store, and the window strobed black and white for 30 seconds then gave me an error.
- Someone found the source code of Apple's pager, edited it, compiled it, and installed it on his system. Uh, nobody wants to do that, but if you're nobody, check it out. Seriously though, I don't recommend this, especially since it's a really old article.
- You can disable paging, which will force the system to use the inactive RAM, thanks to this answer! Though it has the weird side-effect of making a large fraction of your RAM appear as "wired", it seems to speed up the system and seems to be the best fix. It passed the VMWare Fusion test. If you dare, run "sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist" (no quotes) in Terminal, then reboot. You can undo this using "sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist" (no quotes) then rebooting.
Now that I've disabled the paging, I'll reply if there are any updates.