Index: common.scm ================================================================== --- common.scm +++ common.scm @@ -2119,14 +2119,15 @@ 0 next))) ;; we will force a conservative calculation any time next is large. (first-next-avg (/ (+ first next) 2)) ;; add some randomness to the time to break any alignment ;; where netbatch dumps many jobs to machines simultaneously - (adjwait (min (+ 300 (random 10)) (abs (* (+ (random 10) - (/ (- 1000 count) 10) - waitdelay) - (- first adjmaxload) )) ))) + (adjwait (min (+ 300 (random 10)) (abs (* (+ (random 10) + (/ (- 1000 count) 10) + waitdelay) + (- first adjmaxload) )))) + (load-jump-limit (configf:lookup-number *configdat* "setup" "load-jump-limit"))) ;; let's let the user know once in a long while that load checking ;; is happening but not constantly report it (if (common:low-noise-print 30 (conc "cpuload" (or remote-host "localhost"))) ;; (> (random 100) 75) ;; about 25% of the time (debug:print-info 1 *default-log-port* "Checking cpuload on " (or remote-host "localhost") ", maxload: " maxload ", load: " first ", adjmaxload: " adjmaxload ", loadjmp: " loadjmp)) @@ -2146,12 +2147,13 @@ " on server " (or remote-host (get-host-name)) " (normalized load-limit: " maxload ") " (if msg msg "")) (thread-sleep! adjwait) (common:wait-for-cpuload maxload numcpus waitdelay count: (- count 1) msg: msg remote-host: remote-host)) ((and (> loadjmp (cond - ((> numcpus 8)(/ numcpus 4)) - ((> numcpus 4)(/ numcpus 2)) + (load-jump-limit load-jump-limit) + ((> numcpus 8)(/ numcpus 2)) + ((> numcpus 4)(/ numcpus 1.2)) (else 0.5))) (> count 0)) (debug:print-info 0 *default-log-port* "waiting " adjwait " seconds due to possible load jump " loadjmp ". " (if msg msg "")) (thread-sleep! adjwait) Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -3132,12 +3132,13 @@ (lambda (db) (sqlite3:execute db "UPDATE tests SET state='DELETED',status='n/a',comment='' WHERE id=?;" test-id)))) ;; (define (db:delete-old-deleted-test-records dbstruct) - (let (;; (run-ids (db:get-all-run-ids dbstruct)) - (targtime (- (current-seconds)(* 30 24 60 60)))) ;; one month in the past + (let ((targtime (- (current-seconds) + (or (configf:lookup-number *configdat* "setup" "keep-deleted-records") + (* 30 24 60 60))))) ;; one month in the past (db:with-db dbstruct 0 #t (lambda (db)