Why is it that my Mac (running 10.8 Mountain Lion) would rather swap than clear inactive memory? I know people say that the Mac OS manages itself and whatever, but there is a serious performance dip when my MacBook starts swapping out, even though it would have over 1.5 GB of inactive memory that isn't being cleared out. I have a launcher for the purge command in my dock – thats how severe it is!
Note the 2.21 GB of inactive and the 127.1 MB of swap, which, through the use of all the programs in my workflow, (Photoshop + Illustrator + Dreamweaver + Publisher etc.) will grow rapidly unless I use the purge command, saving my computer from a slaughter fest of beach balls.
Best Answer
I recently answered a question like yours, so thought I'd restate the major points for you, in case this is still a problem.
Mac OS X allocates and uses RAM differently than most versions of MS Windows and can be confusing at times. Microsoft originally built Windows to keep as much memory free as possible. Apple's memory model follows a guideline that empty RAM is a wasted resource that could be better utilized to enhance performance.
Here is a quick and somewhat simplistic breakdown of how your RAM is currently being used:
The VM statistics are reset every time you reboot.
If your MacBook is capable of being upgraded beyond 4GB RAM, I'd definitely invest in a pair of 4GB SO-DIMMs for a total of 8GB installed. One other point to keep in mind concerning your MacBook is that typical notebook hard drives are slower than many of their desktop counterparts. I replaced my first generation unibody MacBook Pro's hard drive with a 256GB SSD. Performance incomparable with any "modern" MacBook Pro. The increase from hard drive to SSD was quite a bit more noticeable than my upgrade from 4GB to 8GB of RAM.