From 6ad91ccabc83c2618160f2734e4ca5e90983baf4 Mon Sep 17 00:00:00 2001 From: Rory& Date: Wed, 17 Jul 2024 06:50:44 +0200 Subject: Changes --- host/Rory-nginx/services/postgres.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'host/Rory-nginx/services/postgres.nix') diff --git a/host/Rory-nginx/services/postgres.nix b/host/Rory-nginx/services/postgres.nix index a05aa1e..b63e437 100755 --- a/host/Rory-nginx/services/postgres.nix +++ b/host/Rory-nginx/services/postgres.nix @@ -32,13 +32,13 @@ max_connections = 2500; superuser_reserved_connections = 3; - shared_buffers = "32565MB"; - work_mem = "512MB"; - maintenance_work_mem = "1024MB"; + shared_buffers = "32GB"; + work_mem = "1GB"; + maintenance_work_mem = "8GB"; huge_pages = "try"; - effective_cache_size = "60GB"; # was 22 - effective_io_concurrency = "8"; - random_page_cost = 4; + effective_cache_size = "64GB"; # was 22 + effective_io_concurrency = 100; + random_page_cost = 1.1; # can use this to view stats: SELECT query, total_time, calls, rows FROM pg_stat_statements ORDER BY total_time DESC LIMIT 10; shared_preload_libraries = "pg_stat_statements"; @@ -49,12 +49,12 @@ wal_level = "replica"; max_wal_senders = 0; - synchronous_commit = "off"; # was on + synchronous_commit = "off"; # was ond3 checkpoint_timeout = "15min"; checkpoint_completion_target = "0.9"; - max_wal_size = "1GB"; - min_wal_size = "512MB"; + max_wal_size = "2GB"; + min_wal_size = "1GB"; wal_compression = "on"; wal_buffers = "-1"; -- cgit 1.4.1