vmstat
If you post a question to the pgsql-performance mailing list that suggests your system might be overloaded, the first thing you'll be asked for is a snapshot of vmstat
data. It's the most valuable quick summary of what your system is doing. Because it displays a full system snapshot per line, it's even possible to extract short-term trends from staring at a screen full of data.
Since the output from vmstat
is a bit too wide to fit on the page at once, it's broken up into a left and right side for now; later examples will include just the interesting columns. Here's the left side showing a few seconds of heavy memory-limited pgbench
work shown next:
$ vmstat 1 procs -----------memory------------- ---swap-- r b swpd free buff cache si so 8 0 0 2542248 386604 3999148 0 0 3 0 0 2517448 386668 4023252 0 0 1 0 0 2494880 386732 4043064 0 0 7 1 0 2476404 386792 4060776 0 0
The explanations...