Index: common.scm ================================================================== --- common.scm +++ common.scm @@ -1765,11 +1765,21 @@ ;; inputs are: ;; - load-in, load as from uptime, NOT normalized ;; - numcpus, number of cpus, ideally use the real cpus, not threads ;; (define (common:get-delay load-in numcpus) - (max (/ (expt 5 (* 4 (/ load-in numcpus))) 10) 0)) + (let* ((ratio (/ load-in numcpus)) + (new-option (configf:lookup *configdat* "load" "new-load-method"))) + (if new-option + (begin + (cond ((and (>= ratio 0) (<= ratio .9)) + (* ratio (/ 5 .9))) + ((and (> ratio .9) (<= ratio 1.1)) + (+ 5 (* (- ratio .9) (/ 55 .2)))) + ((> ratio 1.1) + 60))) + (max (/ (expt 5 (* 4 ratio)) 10) 0)))) (define (get-cpu-load #!key (remote-host #f)) (car (common:get-cpu-load remote-host))) ;; (let* ((load-res (process:cmd-run->list "uptime"))