Index: tcp-transportmod.scm ================================================================== --- tcp-transportmod.scm +++ tcp-transportmod.scm @@ -231,12 +231,12 @@ ((busy) ;; result will be how long the server wants you to delay (debug:print 0 *default-log-port* "WARNING: server for "dbfname" is overloaded, will try again in "result" seconds.") (thread-sleep! (if (number? result) result 2)) (tt:handler ttdat cmd run-id params (+ attemptnum 1) area-dat areapath readonly-mode dbfname testsuite mtexe)) ((loaded) - (debug:print 0 *default-log-port* "WARNING: server for "dbfname" is loaded, will try again in a 1/4 second.") - (tt:backoff-incr (tt-host conn)(tt-port conn)) + (debug:print 0 *default-log-port* "WARNING: server for "dbfname" is loaded, slowing queries.") + (tt:backoff-incr (tt-conn-host conn)(tt-conn-port conn)) result) ;; (tt:handler ttdat cmd run-id params (+ attemptnum 1) area-dat areapath readonly-mode dbfname testsuite mtexe)) (else result))) (else ;; did not receive properly formated result (if (not res) ;; tt:handler is telling us that communication failed @@ -347,19 +347,20 @@ (if bkoff (let* ((wait-delay (tt:backoff-wait-delay bkoff)) (last-ioerr (tt:backoff-last-ioerr bkoff)) (last-adj-t (tt:backoff-last-adj-t bkoff)) (delta (- (current-seconds) last-adj-t)) - (adj (* delta 0.01)) ;; it takes ten seconds to recover from hitting an io err + (adj (* delta 0.001)) ;; it takes 100 seconds to recover from hitting an io err (new-wait (if (> wait-delay 0) (if (> adj wait-delay) 0 (- wait-delay adj)) 0))) (if (> new-wait 0) (begin - (debug:print-info 0 *default-log-port* "Server loaded, DelayWait: "new-wait) + (if (common:low-noise-print 10 "delay wait message") + (debug:print-info 0 *default-log-port* "Server loaded, DelayWait: "new-wait)) (tt:backoff-wait-delay-set! bkoff new-wait) (tt:backoff-last-adj-t-set! bkoff (current-seconds)) (thread-sleep! new-wait)) (hash-table-delete! *tt:backoff-smoothing* host-port)))))) @@ -401,11 +402,11 @@ #f) (exn (i/o net) (if ping-mode #f (if (>= tries-remaining 0) - (let* ((backoff-delay (* (- 26 tries-remaining) 0.5))) + (let* ((backoff-delay (* (- 26 tries-remaining) 0.1))) (debug:print 0 *default-log-port* "WARNING: TCP overload, trying again in "backoff-delay"s.") (thread-sleep! backoff-delay) (tt:backoff-incr host port) (retry)) (assert #f "FATAL: Too many retries in tt:send-receive-direct")))) Index: utils/load-the-db.scm ================================================================== --- utils/load-the-db.scm +++ utils/load-the-db.scm @@ -2,17 +2,22 @@ (define start-time (current-seconds)) (let loop ((last-print 0) (num-calls 0)) - (let ((all-run-ids (rmt:get-all-run-ids)) - (do-print (> (- (current-seconds) last-print) 2)) - (max-query 0)) + (let* ((all-run-ids (rmt:get-all-run-ids)) + (do-print (> (- (current-seconds) last-print) 2)) + (max-query 0) + (num-calls (+ num-calls + 1 ;; account for call above + (length all-run-ids) ;; account for the get-tests-for-run in the for-each below + ))) (for-each (lambda (run-id) ;; (rmt:get-tests-for-run run-id testpatt states statuses offset limit not-in sort-by sort-order qryvals last-update mode) (let* ((all-run-data (rmt:get-tests-for-run run-id "%" '() '() #f #f #f #f #f #f #f #f))) + (set! num-calls (+ num-calls (length all-run-data))) (for-each (lambda (testdat) (let* ((test-id (vector-ref testdat 0)) (start-at (current-milliseconds)) (testinfo (rmt:get-test-info-by-id run-id test-id)) @@ -19,12 +24,18 @@ (query-time (- (current-milliseconds) start-at))) (if (> query-time max-query) (set! max-query query-time)))) all-run-data) (if do-print - (print "Running "(- (current-seconds) start-time)"s, run "run-id" has "(length all-run-data)" tests, max query "max-query)))) + (let* ((run-time (- (current-seconds) start-time)) + (qry-rate (if (> run-time 0) + (inexact->exact (round (/ num-calls run-time))) + -1))) + (print "Running "run-time"s, run "run-id + " has "(length all-run-data)" tests, max query "max-query + "ms with avg query rate "qry-rate" qry/s"))))) all-run-ids) (loop (if do-print (current-seconds) last-print) - (+ num-calls (length all-run-ids))))) + num-calls)))