From 8820e7a03476034417e4005f3a723bf059c99f2f Mon Sep 17 00:00:00 2001 From: Vitaliy Kukharik <37010174+vitabaks@users.noreply.github.com> Date: Tue, 26 Dec 2023 16:19:12 +0300 Subject: [PATCH] Optimize PostgreSQL parameters for SSD storage (#536) --- vars/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vars/main.yml b/vars/main.yml index 57d6a9a9e..581e32db6 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -202,8 +202,8 @@ postgresql_parameters: - { option: "wal_buffers", value: "32MB" } - { option: "default_statistics_target", value: "1000" } - { option: "seq_page_cost", value: "1" } - - { option: "random_page_cost", value: "4" } # "1.1" for SSD storage. Also, if your databases fits in shared_buffers - - { option: "effective_io_concurrency", value: "2" } # "200" for SSD storage + - { option: "random_page_cost", value: "1.1" } # or "4" for HDDs with slower random access + - { option: "effective_io_concurrency", value: "200" } # or "2" for traditional HDDs with lower I/O parallelism - { option: "synchronous_commit", value: "on" } # or 'off' if you can you lose single transactions in case of a crash - { option: "autovacuum", value: "on" } # never turn off the autovacuum! - { option: "autovacuum_max_workers", value: "5" }