Commit | Line | Data |
---|---|---|
9e31d0f0 MD |
1 | #!/bin/sh |
2 | ||
3 | #run all tests | |
4 | ||
5 | #set to number of active CPUS | |
6 | NUM_CPUS=8 | |
7 | ||
8 | #extra options, e.g. for setting affinity on even CPUs : | |
9 | #EXTRA_OPTS=$(for a in $(seq 0 2 63); do echo -n "-a ${a} "; done) | |
10 | ||
11 | ||
12 | #Vary update fraction | |
13 | #x: vary update fraction from 0 to 0.0001 | |
14 | #fix number of readers and reader C.S. length, vary delay between updates | |
15 | #y: ops/s | |
16 | ||
17 | echo Executing update fraction test | |
18 | ||
19 | NR_READERS=$((${NUM_CPUS} - 1)) | |
20 | NR_WRITERS=1 | |
21 | DURATION=10 | |
22 | WDELAY_ARRAY="0 1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 | |
23 | 65536 131072 262144 524288 1048576 2097152" | |
24 | ||
25 | rm -f update-fraction.log | |
26 | ||
27 | for WDELAY in ${WDELAY_ARRAY}; do | |
28 | ./runtests.sh ${NR_READERS} ${NR_WRITERS} ${DURATION} -d ${WDELAY} ${EXTRA_OPTS} | tee -a update-fraction.log | |
29 | done | |
30 | ||
31 | ||
32 | #Test scalability : | |
33 | # x: vary number of readers from 0 to num cpus | |
34 | # y: ops/s | |
35 | # 0 writer. | |
36 | ||
37 | echo Executing scalability test | |
38 | ||
39 | NR_WRITERS=0 | |
40 | DURATION=10 | |
41 | ||
42 | rm -f scalability.log | |
43 | ||
44 | for NR_READERS in $(seq 1 ${NUM_CPUS}); do | |
45 | ./runtests.sh ${NR_READERS} ${NR_WRITERS} ${DURATION} ${EXTRA_OPTS}| tee -a scalability.log | |
46 | done | |
47 | ||
48 | ||
49 | # x: Vary reader C.S. length from 0 to 100 us | |
50 | # y: ops/s | |
51 | # 8 readers | |
52 | # 0 writers | |
53 | ||
54 | echo Executing reader C.S. length test | |
55 | ||
56 | NR_READERS=8 | |
57 | NR_WRITERS=0 | |
58 | DURATION=10 | |
59 | #in loops. | |
60 | READERCSLEN_ARRAY="0 1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768" | |
61 | ||
62 | rm -f readercslen.log | |
63 | ||
64 | for READERCSLEN in ${READERCSLEN_ARRAY}; do | |
65 | ./runtests.sh ${NR_READERS} ${NR_WRITERS} ${DURATION} ${EXTRA_OPTS} -c ${READERCSLEN} | tee -a readercslen.log | |
66 | done |