That does help, thank you. Apparently I had the right idea.
Is there a way to know what apps were causing the problem when it goes yellow or red? For example if I opened my activity monitor and saw what is shown in their screenshot - it would mean that most recently, memory pressure is fine, but it wasn't before then. How would I know which apps caused it to go yellow or red after the fact?
I'd also still like to understand "Swap used" and everything on the right side.
Starting form the left side:
Physical Memory - Self explanatory: This is how much physical memory you have installed.
Memory Used - This is the portion of physical memory that mapped to a virtual memory object. A virtual memory object could be memory allocated by applications or memory-mapped files.
Virtual Memory - This is the sum of Physical Memory and Swap. Activity Monitor used to present this as the size of the Virtual Address Space, but that statistic really isn't useful for typical users.
Swap Used - This is the amount of space occupied in the swap file on disk. Note that the size of the swap file and this number need not agree; swap files are typically allocated in growing powers of two with portions of the file being 'filled' with swapped out data
Right side:
App Memory - This is memory which was directly allocated by an application; buffers, structures, etc. This is contrasted with the File Cache.
File Cache - This is memory which has been mapped to files on disk. Contrasted from App Memory. Note that even if an application un-maps a file, the file remains resident in memory. This takes advantage of temporal locality: The same data is typically accessed at times which are closer together rather than far apart. Keeping the file mapped in memory makes re-accessing it much faster.
Wired Memory - This is memory which has been 'wired-down' by the kernel and cannot be compressed or swapped out to disk. Applications themselves are discouraged from directly wiring memory, but their activities and calls to the kernel can cause additional memory to be wired-down as a side effect.
Compressed - This is the amount of memory residing in the new Page Compressor. Mavericks treats App Memory preferentially. As demand for memory increases, it will discard memory-mapped files from the File Cache before filling the compressor with App Memory. Since some mapped-files may currently be in use, the File Cache will not be completely drained before compression takes place. As demand further increases, compressed memory is written to swap in its compressed form.
You can watch all of this happen in real-time by running the command:
Code:
sudo memory_pressure -l critical
in a Terminal. This will allocate memory to simulate a critical memory pressure situation. Watch the numbers and the memory pressure graph to see how the system responds to high memory demands. Hit ctrl-C in the terminal to stop the simulation and relieve the pressure.