2 Replies Latest reply: Sep 12, 2010 4:12 PM by BobHarris
ron App Level 1 Level 1 (15 points)
If I understand correctly, "Inactive" memory is supposed to be available to applications, just like "Free" memory. That appears not to be the case.

After quitting applications that use lots of memory (like Parallels for example), there is almost no "free" memory available and immediate launching of other applications cause swapping.
This kind of memory management seems questionable.

Interesting, there was a version of Leopard (could be 10.5.6 or 10.5.7) which did not use "Inactive" memory so extensively and therefore was much faster, as there was always "Free" memory available.

MBP i5 2.53GHz, Mac OS X (10.6.4)
  • Kappy Level 10 Level 10 (255,780 points)
    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.
  • BobHarris Level 6 Level 6 (15,605 points)
    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