May 2018
Intermediate to advanced
576 pages
30h 25m
English
These issues are usually caused by suboptimal query plans, but sometimes, your computer is just not powerful enough.
In this case, top is your friend. For quick checks, run this from the command line:
user@host:~$ top
First, watch the percentage of idle CPU from top. If this is in low single digits for most of the time, you probably have problems with the CPU's power.
If you have a high load average with a lot of CPU idle left, you are probably out of disk bandwidth. In this case, you should also have lots of postgres processes in the D status, meaning that the process is in an uninterruptible state (usually waiting for I/O).