This document summarizes a presentation about troubleshooting Postgres performance problems. It discusses how to determine if the issue is with the database, system resources, or the application. It provides examples of common problems like running out of CPU, memory, disk, or parallelism. It also recommends tools to diagnose issues like perf, gdb, iostat, iotop, htop, bwm-ng, and pg_stat_statements. Finally, it discusses setting boundaries around economics, workload, performance, and errors to avoid instability.
25. @leinweber
cpu mem disk parallelism
credentials wrong
networking broken
locking issue, check pg_locks
idle in transaction
26. @leinweber
cpu mem disk parallelism
application submitting backlogged workload
connection leak
pool sizes set too large
pg_lock issue + application backlog
27. @leinweber
cpu mem disk parallelism
workload skew causing thrashing
unusual sequential scan workload
failover or restart => no cache
pg_prewarm
28. @leinweber
cpu mem disk parallelism
same as just disk,
but also the application is piling on
29. @leinweber
cpu mem disk parallelism
large GROUP BYs
high disk latency due to unusual page
dispersion pattern in the workload
30. @leinweber
cpu mem disk parallelism
workload has high mem (GROUP BY)
+ app adding backlog
lock contention slowing mem release
60. @leinweber
flirting with disaster
Velocity NY 2013: Richard Cook
"Resilience In Complex Adaptive Systems”
Jens Rasmussen:
Risk management in a dynamic society: a
modeling problem
68. @leinweber
flirting with disaster
Velocity NY 2013: Richard Cook
"Resilience In Complex Adaptive Systems”
Jens Rasmussen:
Risk management in a dynamic society: a
modeling problem