summary refs log tree commit diff
path: root/host/Rory-nginx/services/postgres.nix
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-07-17 06:50:44 +0200
committerRory& <root@rory.gay>2024-07-17 06:50:44 +0200
commit6ad91ccabc83c2618160f2734e4ca5e90983baf4 (patch)
tree93cce578fe6579de81d8bfc2c3595ecedb4189c2 /host/Rory-nginx/services/postgres.nix
parentNode exproter changes (diff)
downloadRory-Open-Architecture-6ad91ccabc83c2618160f2734e4ca5e90983baf4.tar.xz
Changes
Diffstat (limited to 'host/Rory-nginx/services/postgres.nix')
-rwxr-xr-xhost/Rory-nginx/services/postgres.nix18
1 files changed, 9 insertions, 9 deletions
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";