Your problem is excessive swapping of data between physical memory and virtual memory.
That can happen for two reasons:
- You have a long-running process with a memory leak (i.e., a bug), or
- You don't have enough memory installed for your usage pattern.
Tracking down a memory leak can be difficult, and it may come down to a process of elimination.
In the Activity Monitor application, select All Processes from the menu in the toolbar, if not already selected. Click the heading of the Real Mem column in the process table twice to sort the table with the highest value at the top. If you don't see that column, select
View ▹ Columns ▹ Real Memory
from the menu bar.
If one process (excluding "kernel_task") is using much more memory than all the others, that could be an indication of a leak. A better indication would be a process that continually grabs more and more memory over time without ever releasing it.
The process named "Safari Web Content" renders web pages for Safari and other applications. It uses a lot of memory and may leak if certain Safari extensions or third-party web plugins are installed. Consider it a prime suspect.
If you don't have an obvious memory leak, your options are to install more memory (if possible) or to run fewer programs simultaneously.
The next suggestion is only for users familiar with the shell. For a more precise, but potentially misleading, test, run the following command:
sudo leaks -nocontext -nostacks process | grep total
where process is the name of a process you suspect of leaking memory. Almost every process will leak some memory; the question is how much, and especially how much the leak increases with time. I can’t be more specific. See the leaks(1) man page and the Apple developer documentation for details.