PostgreSQL stuff
Eelco Dolstra committed
Jun 20, 2013 at 23:09 UTC
3c4d10fa8b05a37231857120691df3d25c85e357
1 file changed
+5
-3
delft/wendy.nix
+5
-3
@@ -72,7 +72,7 @@ in
72
package = pkgs.postgresql92;
73
dataDir = "/data/postgresql";
74
extraConfig = ''
75
- log_min_duration_statement = 1000
75
+ log_min_duration_statement = 5000
76
log_duration = off
77
log_statement = 'none'
78
max_connections = 250
@@ -82,12 +82,13 @@ in
82
checkpoint_segments = 16
83
# We can risk losing some transactions.
84
synchronous_commit = off
85
+ effective_cache_size = 24GB
86
'';
87
authentication = ''
88
host all all 192.168.1.25/32 md5
89
host hydra hydra 192.168.1.26/32 md5
90
host hydra_test hydra 192.168.1.26/32 md5
90
- host zabbix zabbix 192.168.1.5/32 md5
91
+ host zabbix zabbix 192.168.1.26/32 md5
92
'';
93
};
94
@@ -99,6 +100,7 @@ in
100
'';
101
102
services.zabbixAgent.extraConfig = ''
103
+ UserParameter=hydra.evaluations.timesincelast,${pkgs.postgresql}/bin/psql hydra -At -c 'select round(EXTRACT(EPOCH FROM now()) - timestamp) from jobsetevals order by id desc limit 1'
104
UserParameter=hydra.queue.total,${pkgs.postgresql}/bin/psql hydra -At -c 'select count(*) from builds where finished = 0'
105
UserParameter=hydra.queue.building,${pkgs.postgresql}/bin/psql hydra -At -c 'select count(*) from builds where finished = 0 and busy = 1'
106
UserParameter=hydra.queue.buildsteps,${pkgs.postgresql}/bin/psql hydra -At -c 'select count(*) from BuildSteps s join Builds i on s.build = i.id where i.finished = 0 and i.busy = 1 and s.busy = 1'
@@ -227,7 +229,7 @@ in
229
230
# Needed for the Nixpkgs mirror script.
231
environment.pathsToLink = [ "/libexec" ];
230
- environment.systemPackages = [ pkgs.dnsmasq pkgs.duplicity ];
232
+ environment.systemPackages = [ pkgs.dnsmasq pkgs.duplicity pkgs.db4 ];
233
234
# Use cgroups to limit Apache's resources.
235
systemd.services.httpd.serviceConfig.CPUShares = 1000;