diff options
author | Rory& <root@rory.gay> | 2024-02-05 14:04:44 +0100 |
---|---|---|
committer | Rory& <root@rory.gay> | 2024-02-05 14:04:44 +0100 |
commit | 98768a3c592475aac0db405cf460bf0cc961e0b8 (patch) | |
tree | 6ae6bf2e05d810e324d5ef09f7e222cef990342e /host/Rory-nginx/services/postgres.nix | |
parent | Update from server (diff) | |
download | Rory-Open-Architecture-98768a3c592475aac0db405cf460bf0cc961e0b8.tar.xz |
Postgres buffering, maybe?
Diffstat (limited to 'host/Rory-nginx/services/postgres.nix')
-rwxr-xr-x | host/Rory-nginx/services/postgres.nix | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/host/Rory-nginx/services/postgres.nix b/host/Rory-nginx/services/postgres.nix index 26ceed7..8912542 100755 --- a/host/Rory-nginx/services/postgres.nix +++ b/host/Rory-nginx/services/postgres.nix @@ -24,9 +24,24 @@ dataDir = "/mnt/postgres/data"; settings = { "max_connections" = "100"; - "shared_buffers" = "128MB"; + "shared_buffers" = "512MB"; + "effective_cache_size" = "8192MB"; "max_wal_size" = "1GB"; "min_wal_size" = "80MB"; + "work_mem" = "16MB"; + "maintenance_work_mem" = "256MB"; + "checkpoint_segments" = "64"; + "default_statistics_target" = "250"; + + # 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"; + "pg_stat_statements.max" = "10000"; + "pg_stat_statements.track" = "all"; + + #we're on virtualised HDDs... + "random_page_cost" = "2.0"; + "synchronous_commit" = "off"; + }; }; |