Megatest

Check-in [7f96283a66]
Login
Overview
Comment:Bumped the default to four dbs and changed the droop curve to an exponential.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.80-dbperformance
Files: files | file ages | folders
SHA1: 7f96283a66878e4a8b9cc42c404cbb0926bd076c
User & Date: matt on 2023-02-03 18:48:20
Other Links: branch diff | manifest | tags
Context
2023-02-03
21:50
Cleanup droop curve a bit check-in: 07b36fe461 user: matt tags: v1.80-dbperformance
18:48
Bumped the default to four dbs and changed the droop curve to an exponential. check-in: 7f96283a66 user: matt tags: v1.80-dbperformance
17:29
control # of dbs with parameter num-run-dbs, default=2. check-in: cd56c55e6a user: matt tags: v1.80-dbperformance
Changes

Modified dbfile.scm from [e260d4fbd9] to [438bf2096a].

190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
;; 
(define (dbfile:run-id->path apath run-id)
  (conc apath"/"(dbfile:run-id->dbname run-id)))

(define (db:dbname->path apath dbname)
  (conc apath"/"dbname))

(define num-run-dbs (make-parameter 2))

(define (dbfile:run-id->dbnum run-id)
  (cond
   ((number? run-id)
    (modulo run-id (num-run-dbs)))
   ((not run-id) "main")   ;; 0 or main?
   (else run-id)))







|







190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
;; 
(define (dbfile:run-id->path apath run-id)
  (conc apath"/"(dbfile:run-id->dbname run-id)))

(define (db:dbname->path apath dbname)
  (conc apath"/"dbname))

(define num-run-dbs (make-parameter 4))

(define (dbfile:run-id->dbnum run-id)
  (cond
   ((number? run-id)
    (modulo run-id (num-run-dbs)))
   ((not run-id) "main")   ;; 0 or main?
   (else run-id)))
1013
1014
1015
1016
1017
1018
1019
1020







1021
1022
1023
1024
1025
1026
1027
    (set! *db-write-access* (not (dbr:dbdat-read-only dbdat)))
    ;; (mutex-unlock! *db-open-mutex*)
    dbdat))

(define dbfile:db-init-proc (make-parameter #f))

(define keep-age-param (make-parameter 10))
(define qif-slope      (make-parameter 100))








;; create a dropping near the db file in a qif dir
;; use count of such files to gate queries (queries in flight)
;;
(define (dbfile:wait-for-qif fname run-id params)
  (let* ((thedir  (pathname-directory fname))
	 (dbnum   (dbfile:run-id->dbnum run-id))







|
>
>
>
>
>
>
>







1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
    (set! *db-write-access* (not (dbr:dbdat-read-only dbdat)))
    ;; (mutex-unlock! *db-open-mutex*)
    dbdat))

(define dbfile:db-init-proc (make-parameter #f))

(define keep-age-param (make-parameter 10))

;; in xmaxima this gives a curve close to what I want:
;;    plot2d ((exp(x/1.2)-1)/300, [x, 0, 10])$
;;    plot2d ((exp(x/1.5)-1)/40, [x, 0, 10])$
;;    plot2d ((exp(x/5)-1)/40, [x, 0, 20])$
(define (dbfile:droop x)
  (/ (- (exp (/ x 5)) 1) 40))
  ;; (* numqrys (/ 1 (qif-slope))))

;; create a dropping near the db file in a qif dir
;; use count of such files to gate queries (queries in flight)
;;
(define (dbfile:wait-for-qif fname run-id params)
  (let* ((thedir  (pathname-directory fname))
	 (dbnum   (dbfile:run-id->dbnum run-id))
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
				      ;; (delete-file* f)
				      (handle-exceptions
					  exn
					#t
					(file-move f destf #t)))))
			      currlks))
			 1) ;; 50 and above => 1
			((> numqrys 10) (* numqrys (/ 1 (qif-slope)))) ;; slope of 1/100
			;; ((> numqrys 30) 0.50)
			;; ((> numqrys 25) 0.20)
			;; ((> numqrys 20) 0.10)
			;; ((> numqrys 15) 0.05)
			;; ((> numqrys 10) 0.01)
			(else #f))))
	(if (and delayval







|







1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
				      ;; (delete-file* f)
				      (handle-exceptions
					  exn
					#t
					(file-move f destf #t)))))
			      currlks))
			 1) ;; 50 and above => 1
			((> numqrys 10)  (dbfile:droop numqrys)) ;; slope of 1/100
			;; ((> numqrys 30) 0.50)
			;; ((> numqrys 25) 0.20)
			;; ((> numqrys 20) 0.10)
			;; ((> numqrys 15) 0.05)
			;; ((> numqrys 10) 0.01)
			(else #f))))
	(if (and delayval

Added ext-tests/sixtyfivek/run-four.sh version [ac96586fe3].



















>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
#!/bin/bash

baserunname=$(date +ww%U.%w)
for x in a b c d;do
  runname=$baserunname$x
  NBFAKE_LOG=$runname.log nbfake megatest -run -testpatt % -target mrdp/ip-xsc-2.0/fast -runname $runname -clean-cache
  sleep 5
done