Matt Connolly's Blog

my brain dumps here…

Tag Archives: how to

Mac OS X free memory

A while back, I was having some trouble with the Mac OS not freeing up enough memory. The result was that many programs were running really slow. Essentially, the CPU was sitting there doing nothing while virtual memory was giving the poor hard disk a flogging.

After a bit more reading on the topic, I found this¬†Apple Tech Note, which explains that inactive memory will be paged out to disk. That doesn’t make sense to me, at least for cached files on disk – why duplicate the data off disk? Surely there’s got to be a difference between inactive, as in not been used for a while, and inactive, as in unnecessary. It seems to me that there’s no distinction, and a lot of time is wasted by paging out inactive memory.

I tried iFreeMem¬†which seemed to improve the situation. And then someone followed up on a forum post, which I thought was interesting: to use the Terminal command “purge“.

I gave that a go – pretty fast and easy – and poof! All the inactive memory is gone, and it’s all now free memory. No more spinning beach balls, and programs are running faster! Yay!

Advertisements