DB performance troubleshooting guide
Modified on: Sat, 18 Nov 2023 9:10 AM2023-06-22
!!Please kindly note that the following article encompasses a comprehensive set of PostgreSQL database administration checks and is not exclusively tailored to the CloudBlue platform.
The provided steps aim to offer valuable guidance and insights into general PostgreSQL database administration practices. We sincerely appreciate your understanding and hope that you find this information beneficial in managing your PostgreSQL databases effectively.
Check disk IO throughput
Make sure block device at "/var/lib/pgsql" can deliver 1k iops both for read and write:
Check pgbench database tps, should be above 1k
Choose appropriate DB size through scale-factor: https://www.cybertec-postgresql.com/en/a-formula-to-calculate-pgbench-scaling-factor-for-target-db-size/. Choose scale-factor to get double of available system memory, to make sure disk is involved.
Check shared buffer sizes adequate to workset
heap_ratio, idx_ratio should be above 0.99. Shared buffers of 3840MB is not enough for this dataset.
Check database bloat
https://cbportal.freshservice.com/support/solutions/articles/23000097177