From f85fc71b508a01def23e5828f3e8f7f6f319c327 Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande Date: Wed, 7 Aug 2024 13:27:29 +0200 Subject: [PATCH] store-db add more appropriate db settings for current db hw Signed-off-by: Ivan Folgueira Bande --- ansible/group_vars/store-db.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ansible/group_vars/store-db.yml b/ansible/group_vars/store-db.yml index 5b2eb8f..5524f9b 100644 --- a/ansible/group_vars/store-db.yml +++ b/ansible/group_vars/store-db.yml @@ -32,6 +32,25 @@ postgres_ha_alter_system_settings: max_locks_per_transaction: '2160' autovacuum_work_mem: '{{ ((ansible_memtotal_mb * 0.1) * 1000) | int }}' # kB + ## The following are obtained from https://pgtune.leopard.in.ua/ (8GB RAM 4CPUs SSD PG version 15) + max_connections: '300' + shared_buffers: '2GB' + effective_cache_size: '6GB' + maintenance_work_mem: '512MB' + checkpoint_completion_target: '0.9' + wal_buffers: '16MB' + default_statistics_target: '100' + random_page_cost: '1.1' + effective_io_concurrency: '200' + work_mem: '3495kB' + huge_pages: 'off' + min_wal_size: '2GB' + max_wal_size: '8GB' + max_worker_processes: '4' + max_parallel_workers_per_gather: '2' + max_parallel_workers: '4' + max_parallel_maintenance_workers: '2' + # Open PostgreSQL Port open_ports_default_comment: '{{ postgres_ha_service_name }}' open_ports_default_chain: 'SERVICES'