Skip to content

Commit

Permalink
feat: tune PGSQL on sectracker.nixpkgs.lahfa.xyz
Browse files Browse the repository at this point in the history
According to the specs of the VM.
  • Loading branch information
RaitoBezarius authored and alejandrosame committed Jul 18, 2024
1 parent 6cb5243 commit 4192cc0
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions staging/sectracker.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,35 @@ in
recommendedGzipSettings = true;
recommendedOptimisation = true;
};
services.postgresql = {
enableJIT = true;
settings = {
# DB Version: 15
# OS Type: linux
# DB Type: dw
# Total Memory (RAM): 16 GB
# CPUs num: 8
# Data Storage: hdd

max_connections = 40;
shared_buffers = "4GB";
effective_cache_size = "12GB";
maintenance_work_mem = "2GB";
checkpoint_completion_target = "0.9";
wal_buffers = "16MB";
default_statistics_target = "500";
random_page_cost = "4";
effective_io_concurrency = "2";
work_mem = "13107kB";
huge_pages = "off";
min_wal_size = "4GB";
max_wal_size = "16GB";
max_worker_processes = "8";
max_parallel_workers_per_gather = "4";
max_parallel_workers = "8";
max_parallel_maintenance_workers = "4";
};
};
security.acme.acceptTerms = true;
security.acme.defaults.email = obfuscate "zyx.afhal@emca-cilbup";
networking.firewall.allowedTCPPorts = [
Expand Down

0 comments on commit 4192cc0

Please sign in to comment.