Q&A: Pointless purges

Q Although my Mac has 6 GB of memory, I have had to use the purge command with depressing frequency since OS X 10.6, before quitting anything, particularly Safari. Despite often seeing that I have over 2 GB of memory inactive, apps perform poorly. Why is this?

A Seek a different cause for poor performance, and avoid using Activity Monitor or other tools to help you try to manage memory better than OS X: you will not succeed.

The purge command in Terminal’s command line has very little to do with memory management, but forces the disk cache to be flushed and emptied. Its main use is to bring the disk and its buffer cache back to conditions similar to those at startup, prior to undertaking performance analysis.

Unfortunately Activity Monitor and similar apps give you only limited insight into memory management and its potential faults, as those tools necessarily alter the system that they are observing, impose a significant overhead, and report memory metrics which can mislead the unwary.

Activity Monitor can alert you to memory shortage, but do not overinterpret the data: remember that OS X tries to use as much RAM as it can.
Activity Monitor can alert you to memory shortage, but do not overinterpret the data: remember that OS X tries to use as much RAM as it can.

Newer versions, such as that in Yosemite, provide a Memory Pressure indicator which is a useful indicator of whether your Mac is getting low on physical memory.

You will improve performance by giving OS X ample contiguous free disk space on its startup disk, closing or removing memory and performance monitors, and letting OS X get on with the job itself.

Comments Further information about memory and its management is here and here.

Updated from the original, which was first published in MacUser volume 29 issue 09, 2013.