High Performance PostgreSQL, Tuning and Optimization Guide
Ibrar Ahmed Senior Software Engineer @ Percona LLC PostgreSQL Consultant
High Performance PostgreSQL, Tuning and Optimization Guide Ibrar - - PowerPoint PPT Presentation
High Performance PostgreSQL, Tuning and Optimization Guide Ibrar Ahmed Senior Software Engineer @ Percona LLC PostgreSQL Consultant PostgreSQL Why? One of the finest open source relational Support? database which has some
High Performance PostgreSQL, Tuning and Optimization Guide
Ibrar Ahmed Senior Software Engineer @ Percona LLC PostgreSQL Consultant
PostgreSQL
2
Why?
database which has some object-oriented features. Object-Relational database management system (RDBMS)
2008.
Isolation and Durability) Complaint.
Who? Licence?
PostgreSQL: Released under the PostgreSQL
Support?
There are many companies providing professional support for PostgreSQL.
PostgreSQL Architecture
3
Database Performance
4
5
PostgreSQL Tuning - Configuration Parameter
6
PostgreSQL Tuning - shared_buffer
7
postgresql=# SHOW shared_buffers; shared_buffers
(1 row)
The proper size for the POSTGRESQL shared buffer cache is the largest useful size that does not adversely affect other activity. —Bruce Momjian
PostgreSQL Tuning - shared_buffer
8
PostgreSQL Tuning - wal_buffer
flushed to disk.
9
PostgreSQL Tuning - effective_cache_size
avoid swap.
10
PostgreSQL Tuning - work_mem
11
12
PostgreSQL Tuning - synchronous_commit
success status to the client.
13
PostgreSQL Tuning - checkpoint_timeout
files.
14
15
Linux Tuning - Huge Pages
16
Linux Tuning - vm.swappiness
This is another kernel parameter that can affect the performance of the database.
17
Linux Tuning / vm.overcommit_memory and vm.overcommit_ratio
invoke the OOM killer. 1.Heuristic overcommit, Do it intelligently (default); based kernel heuristics 2.Allow overcommit anyway 3.Don’t over commit beyond the overcommit ratio.
18
Linux Tuning - vm.dirty_background_ratio / vm.dirty_background_bytes
to be flushed to disk.
The value of this parameter ranges from 0 to 100;
19
Linux Tuning - vm.dirty_ratio / vm.dirty_bytes
to disk.
The value of this parameter ranges from 0 to 100;
20
Blogs
Tuning PostgreSQL Database Parameters to Optimise Performance.
https://www.percona.com/blog/2018/08/31/tuning-postgresql-database- parameters-to-optimize-performance/
Tune Linux Kernel Parameters For PostgreSQL Optimisation
https://www.percona.com/blog/2018/08/29/tune-linux-kernel-parameters-for- postgresql-optimization/
21