-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrun_benchmark.sh
executable file
·82 lines (71 loc) · 2.42 KB
/
run_benchmark.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/bin/bash
# +-----------------------------------------------------------------------------+
# | Cluster/Async I/O Benchmark Version 2.0.0 |
# +------------------------------------------------+----------------------------+
# | Copyright 2014, Synthetic Semantics LLC | http://synsem.com/ |
# | Copyright 2015-2017, Jace A Mogill | [email protected] |
# | Released under the Revised BSD License | [email protected] |
# +------------------------------------------------+----------------------------+
configFilename="config.json"
dataPath="/tmp/Data/"
readsPerWrite=30
value="This is text that is appended to the file"
sortSplitString="This is text that is"
nFiles=30
nOperations=200000
serverHostname="localhost"
serverPort=8100
function init_experiment() {
killall node
mkdir -p ${dataPath}
rm -f ${configFilename} ${dataPath}/*
cat > ${configFilename} <<EOF
{
"dataPath" : "${dataPath}",
"readsPerWrite" : ${readsPerWrite},
"value" : "${value}",
"sortSplitString" : "${sortSplitString}",
"nFiles" : ${nFiles},
"nOperations": ${nOperations},
"nServers" : ${nServers},
"nClients" : ${nClients},
"serverHostname" : "${serverHostname}",
"serverPort" : ${serverPort}
}
EOF
}
#################################################
# Loop Through Experiments
#
# Order of experiments is chosen to reduce risk of running out of sockets.
#
rm -f runlog.*
for nClients in 32 1 8 16 4 2 ; do
# Synchronous Cluster Servers
for nServers in 24 1 2 16 4 8 ; do
init_experiment
node serverSyncCluster.js ${nServers} &
sleep .3
(time node client) 2>&1 | tee runlog.syncCluster.nServers.${nServers}.nClients.${nClients}
done
# Synchronous Single Server
nServers=1
init_experiment
node serverSync.js ${nServers} &
sleep .3
(time node client) 2>&1 | tee runlog.sync.nServers.${nServers}.nClients.${nClients}
# Asynchronous Cluster Servers
for nServers in 24 1 2 16 4 8 ; do
init_experiment
node serverAsyncCluster.js ${nServers} &
sleep .3
(time node client) 2>&1 | tee runlog.asyncCluster.nServers.${nServers}.nClients.${nClients}
done
# Asynchronous Single Server
nServers=1
init_experiment
node serverAsync.js &
sleep .3
(time node client) 2>&1 | tee runlog.async.nServers.${nServers}.nClients.${nClients}
done
killall node