@cryptotaxi247 / infra / commits / b91415a3

* Increase PostgreSQL shared buffers from 8 MB to 4 GB. (The PostgreSQL docs suggest 25% of total RAM as a good starting value, so 0.0081% was a bit small...) Also increase working memory to 16 MB to allow more sorts to be done in memory.

* Increase PostgreSQL shared buffers from 8 MB to 4 GB. (The PostgreSQL docs suggest 25% of total RAM as a good starting value, so 0.0081% was a bit small...) Also increase working memory to 16 MB to allow more sorts to be done in memory. svn path=/configurations/trunk/tud/; revision=34643

Eelco Dolstra committed Nov 5, 2012 at 17:08 UTC b91415a385d4c97d54d3d4239d79126efdf2e171
1 file changed +9
wendy.nix
+9
@@ -82,6 +82,8 @@
82 log_duration = off
83 log_statement = 'none'
84 max_connections = 250
85 + work_mem = 16MB
86 + shared_buffers = 4GB
87 '';
88 authentication = ''
89 host all all 192.168.1.25/32 md5
@@ -92,6 +94,13 @@
94 '';
95 };
96
97 + # Bump kernel.shmmax for PostgreSQL. FIXME: this should be a NixOS
98 + # option around systemd-sysctl.
99 + system.activationScripts.setShmMax =
100 + ''
101 + ${pkgs.procps}/sbin/sysctl -q -w kernel.shmmax=$((6 * 1024**3))
102 + '';
103 +
104 nixpkgs.config.packageOverrides = pkgs: { postgresql = pkgs.postgresql91; };
105
106 services.zabbixAgent.extraConfig = ''