Megatest

Check-in [fc0f14e78b]
Login
Overview
Comment:Tweaked server throttle. Bumped version.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.65-cleanup | v1.6565
Files: files | file ages | folders
SHA1: fc0f14e78b3609ade6fbc36e4cecb924122f5a9d
User & Date: mrwellan on 2020-08-26 15:56:34
Other Links: branch diff | manifest | tags
Context
2020-08-26
16:10
Fixed genexample to fix call to simple-get-runs ==3.3/0.9/PASS/mars== check-in: 0dbbb70834 user: jmoon18 tags: v1.65-cleanup, v1.6565
15:56
Tweaked server throttle. Bumped version. check-in: fc0f14e78b user: mrwellan tags: v1.65-cleanup, v1.6565
2020-08-25
23:36
Reworked load handling and added fast gate on server starts check-in: 4556f5829a user: matt tags: v1.65-cleanup
Changes

Modified common.scm from [cbb700a53d] to [3098ddb7dd].

2140
2141
2142
2143
2144
2145
2146
2147

2148
2149
2150
2151
2152
2153
2154
2140
2141
2142
2143
2144
2145
2146

2147
2148
2149
2150
2151
2152
2153
2154







-
+







	 (effective-load    (common:get-intercept first next))
	 (recommended-delay (common:get-delay effective-load numcpus))
	 (effective-host    (or remote-host "localhost"))
	 (normalized-effective-load (/ effective-load numcpus))
	 (will-wait                 (> normalized-effective-load maxnormload)))
    (if (> recommended-delay 0)
	(let* ((actual-delay (min recommended-delay 30)))
	  (debug:print-info 0 *default-log-port* "Load is high, delaying " actual-delay " seconds.")
	  (debug:print-info 0 *default-log-port* "Load control, delaying " actual-delay " seconds to maintain safe load.")
	  (thread-sleep! actual-delay)))
    
    (cond
     ;; bad data, try again to get the data
     ((not will-wait)
      (if (common:low-noise-print 30 (conc (round normalized-effective-load) "-load-acceptable-" effective-host))
	  (debug:print 0 *default-log-port* "Effective load on " effective-host " is acceptable at " effective-load " continuing.")))

Modified megatest-version.scm from [12f02e86fc] to [9088e87581].

16
17
18
19
20
21
22
23

16
17
18
19
20
21
22

23







-
+
;;     along with Megatest.  If not, see <http://www.gnu.org/licenses/>.

;; Always use two or four digit decimal
;; 1.01, 1.02...1.10,1.11,1.1101 ... 1.99,2.00..

;; (declare (unit megatest-version))

(define megatest-version 1.6564)
(define megatest-version 1.6565)

Modified server.scm from [80f5c92415] to [ffdb74becc].

321
322
323
324
325
326
327
328
329
330







331
332
333
334
335
336
337
321
322
323
324
325
326
327



328
329
330
331
332
333
334
335
336
337
338
339
340
341







-
-
-
+
+
+
+
+
+
+







        *my-client-signature*)))

;; wait for server=start-last to be three seconds old
;;
(define (server:wait-for-server-start-last-flag areapath)
  (let* ((start-flag (conc areapath "/logs/server-start-last")))
    (if (file-exists? start-flag)
	(let* ((fmodtime (file-modification-time start-flag)))
	  (if (> (- (current-seconds) fmodtime) 3) ;; good enough
	      (system (conc "touch " start-flag)) ;; lazy but safe
	(let* ((fmodtime (file-modification-time start-flag))
	       (reftime  (+ 3 (random 5)))
	       (delta    (- (current-seconds) fmodtime)))
	  (if (> delta reftime) ;; good enough
	      (begin
		(debug:print-info 0 *default-log-port* "Ready to start server, last start: " fmodtime ", delta: " delta)
		(system (conc "touch " start-flag))) ;; lazy but safe
	      (begin
		(thread-sleep! 5)
		(server:wait-for-server-start-last-flag areapath))))
	(system (conc "touch " start-flag)))))
	      

;; kind start up of servers, wait 40 seconds before allowing another server for a given