1207 Views 2 Replies Latest reply: Sep 12, 2010 4:12 PM by BobHarris
About OS X Memory Management and Usage
Reading system memory usage in Activity Monitor
Memory Management in Mac OS X
Performance Guidelines- Memory Management in Mac OS X
A detailed look at memory usage in OS X
Understanding top output in the Terminal
The amount of available RAM for applications is the sum of Free RAM and Inactive RAM. This will change as applications are opened and closed or change from active to inactive status. The Swap figure represents an estimate of the total amount of swap space required for VM if used, but does not necessarily indicate the actual size of the existing swap file. If you are really in need of more RAM that would be indicated by how frequently the system uses VM. If you open the Terminal and run the top command at the prompt you will find information reported on Pageins () and Pageouts (). Pageouts () is the important figure. If the value in the parentheses is 0 (zero) then OS X is not making instantaneous use of VM which means you have adequate physical RAM for the system with the applications you have loaded. If the figure in parentheses is running positive and your hard drive is constantly being used (thrashing) then you need more physical RAM.
Not all Inactive RAM is freely available to all applications. In some cases it still belongs to running applications which simply aren't using it at the moment.
In fact there's no benchmarks indicating that Leopard is faster than Snow Leopard.
Inactive RAM may contain cached file system data, which still needs to be pushed out to disk. If an application wants memory and it comes from Inactive RAM, that may trigger pageouts, NOT to the swap area, but to the file where the modified data belongs.
I personally like monitor pageout activity using
sar -g 60 100
which will tell you every minute the number of pageouts for 100 minutes.
I can start that running, then go do my normal work activity, and later come back to the Terminal and review how the work I was doing affected pageouts. Activity which is mostly zeros or a few minor spikes is good. If I have sustained pageout activity that indicates I'm pushing my memory. If I sustained high numbers of pageouts it indicates I either need more memory, or I have to go on a computing diet