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 | |
parent | Update from server (diff) | |
download | Rory-Open-Architecture-98768a3c592475aac0db405cf460bf0cc961e0b8.tar.xz |
Postgres buffering, maybe?
-rwxr-xr-x | host/Rory-nginx/services/postgres.nix | 17 | ||||
-rw-r--r-- | modules/software-templates/dotnet.nix | 2 |
2 files changed, 17 insertions, 2 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"; + }; }; diff --git a/modules/software-templates/dotnet.nix b/modules/software-templates/dotnet.nix index 8a8c1b5..9abe797 100644 --- a/modules/software-templates/dotnet.nix +++ b/modules/software-templates/dotnet.nix @@ -8,4 +8,4 @@ DOTNET_CLI_TELEMETRY_OPTOUT = "1"; DOTNET_ROOT = "${(callPackage ../packages/dotnet-pack.nix { inherit pkgs; })}"; }; -}e \ No newline at end of file +} \ No newline at end of file |