summary refs log tree commit diff
path: root/host/Rory-nginx/services/postgres.nix
diff options
context:
space:
mode:
Diffstat (limited to 'host/Rory-nginx/services/postgres.nix')
-rwxr-xr-xhost/Rory-nginx/services/postgres.nix22
1 files changed, 11 insertions, 11 deletions
diff --git a/host/Rory-nginx/services/postgres.nix b/host/Rory-nginx/services/postgres.nix
index c728151..d24b0b9 100755
--- a/host/Rory-nginx/services/postgres.nix
+++ b/host/Rory-nginx/services/postgres.nix
@@ -5,7 +5,7 @@
 
   services.postgresql = {
     enable = true;
-    package = pkgs.postgresql_16;
+    package = pkgs.postgresql_16_jit;
     enableTCPIP = true;
     authentication = pkgs.lib.mkOverride 10 ''
       # TYPE, DATABASE, USER, ADDRESS, METHOD
@@ -27,8 +27,8 @@
       max_connections = 2500;
       superuser_reserved_connections = 3;
 
-      shared_buffers = "32GB";
-      work_mem = "16GB";
+      shared_buffers = "64GB";
+      work_mem = "32GB";
       maintenance_work_mem = "8GB";
       huge_pages = "try";
       effective_cache_size = "64GB"; # was 22
@@ -44,17 +44,17 @@
 
       wal_level = "replica";
       max_wal_senders = 0;
-      synchronous_commit = "off"; # was ond3
+      synchronous_commit = "on"; # was ond3
 
       checkpoint_timeout = "15min";
       checkpoint_completion_target = "0.9";
       max_wal_size = "2GB";
       min_wal_size = "1GB";
 
-      wal_compression = "on";
+      wal_compression = "off";
       wal_buffers = "-1";
-      wal_writer_delay = "200ms";
-      wal_writer_flush_after = "1MB";
+      wal_writer_delay = "500ms"; #was 100
+      wal_writer_flush_after = "32MB"; # was 1
       #checkpoint_segments = "64"; # additional
       default_statistics_target = "250"; # additional
 
@@ -63,10 +63,10 @@
       bgwriter_lru_multiplier = "2.0";
       bgwriter_flush_after = "0";
 
-      max_worker_processes = "32"; # was 14
-      max_parallel_workers_per_gather = "16"; # was 7
-      max_parallel_maintenance_workers = "16"; # was 7
-      max_parallel_workers = "32"; # was 14
+      max_worker_processes = "64"; # was 14
+      max_parallel_workers_per_gather = "32"; # was 7
+      max_parallel_maintenance_workers = "32"; # was 7
+      max_parallel_workers = "64"; # was 14
       parallel_leader_participation = "on";
 
       enable_partitionwise_join = "on";