performance
Performance measurement and tuning
-
free
Tested free examples: which column to read, why free memory is small on a healthy machine, units, swap and commit, and why a container sees its host.
-
top
Tested top examples: the summary lines, the process columns, sorting and filtering in batch mode, threads, and reading a process's memory and CPU.
-
Time how long something takes
What real, user and sys actually measure, why the time you type is not /usr/bin/time, and how to capture a timing into a file instead of the terminal.
-
Why is this process using so much CPU?
The machine is slow and one process is at the top of top. Find it, check whether the figure means what it seems to, see what it is doing, and make it give way.
-
Why is this process using so much memory?
A process looks huge in top, or free shows almost nothing free. Check whether memory is really short, which of RSS, VSZ and PSS to believe, and how to limit it.