From: Aurelien Jarno Date: Fri, 28 Aug 2015 10:17:50 +0000 (+0200) Subject: buildds: kill aptitude after 10 minutes OR all RAM used X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=9c9905f69df974c1cbe123558ebc86e921d32f12;p=mirror%2Fdsa-puppet.git buildds: kill aptitude after 10 minutes OR all RAM used Instead of 10 minutes AND all RAM used. It takes ages to fill all the RAM on machines with 8GB or 32GB. --- diff --git a/modules/buildd/files/buildd-schroot-aptitude-kill b/modules/buildd/files/buildd-schroot-aptitude-kill index 5e90d77ec..fa7374642 100755 --- a/modules/buildd/files/buildd-schroot-aptitude-kill +++ b/modules/buildd/files/buildd-schroot-aptitude-kill @@ -54,10 +54,8 @@ for p in psutil.process_iter(): if not rootdir.startswith('/var/lib/schroot/mount'): continue # used = p.get_memory_info().vms - if used < total_mem: continue - # cputime = p.get_cpu_times().user - if cputime < cutoff_time: continue + if used < total_mem and cputime < cutoff_time: continue # p.kill() except psutil.NoSuchProcess: