From 8b5239404b8ab6d9dbeb83ca4c0ad6e33ff2b40f Mon Sep 17 00:00:00 2001 From: emily Date: Fri, 18 Oct 2024 15:15:00 +0200 Subject: [PATCH] seras: Increase postgresql limits --- config/hosts/seras/configuration.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/config/hosts/seras/configuration.nix b/config/hosts/seras/configuration.nix index 9d4b4af..b4e062b 100644 --- a/config/hosts/seras/configuration.nix +++ b/config/hosts/seras/configuration.nix @@ -21,6 +21,26 @@ ]; }; + services.postgresql.settings = { + max_connections = 200; + shared_buffers = "24GB"; + effective_cache_size = "72GB"; + maintenance_work_mem = "2GB"; + checkpoint_completion_target = 0.9; + wal_buffers = "16MB"; + default_statistics_target = 100; + random_page_cost = 1.1; + effective_io_concurrency = 200; + work_mem = "31457kB"; + huge_pages = "try"; + min_wal_size = "1GB"; + max_wal_size = "4GB"; + max_worker_processes = 32; + max_parallel_workers_per_gather = 4; + max_parallel_workers = 32; + max_parallel_maintenance_workers = 4; + }; + kyouma.ooklaserver = { enable = true; openFirewall = true;