Skip to content

Commit d767570

Browse files
committed
Run scripts for other CCs, just for saving
The file paths are included relative to the repo roots (except for doppel) Doppel's scripts can go anywhere, really
1 parent daa5bbe commit d767570

7 files changed

Lines changed: 226 additions & 0 deletions

File tree

other-cc/cicada/run.sh

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/bin/bash
2+
3+
cd DBx1000
4+
5+
SCRIPT=/home/ubuntu/cicada-exp-sigmod2017/cicada-engine/script/setup.sh
6+
7+
$SCRIPT 51200 51200
8+
9+
for w in 1 4 0
10+
do
11+
sed -i "s/^#define PART_CNT .*$/#define PART_CNT $w/g" config.h
12+
sed -i "s/^#define NUM_WH .*$/#define NUM_WH $w/g" config.h
13+
OUTFILE="c-${w}w-results.txt"
14+
printf "# Threads" >> $OUTFILE
15+
for k in {1..5}
16+
do
17+
printf ",Cicada (W$w) [T$k]" >> $OUTFILE
18+
done
19+
printf "\n" >> $OUTFILE
20+
for i in 1 2 4 12 24 32 40 48 64
21+
do
22+
printf "$i" >> $OUTFILE
23+
if [ $w -eq 0 ]; then
24+
sed -i "s/^#define PART_CNT .*$/#define PART_CNT $i/g" config.h
25+
sed -i "s/^#define NUM_WH .*$/#define NUM_WH $i/g" config.h
26+
fi
27+
sed -i "s/^#define THREAD_CNT .*$/#define THREAD_CNT $i/g" config.h
28+
make clean > /dev/null 2>&1
29+
make rundb -j40 > /dev/null 2>&1
30+
for k in {1..5}
31+
do
32+
cicada=$(sudo ./rundb 2>/dev/null | grep '^committed:' | grep -oE '[0-9.]+ M/sec' | grep -oE '[0-9.]+')
33+
#success=$(sudo ./rundb 2>/dev/null | grep '^committed:' | grep -oE '[0-9.]+% attempts' | grep -oE '[0-9.]+')
34+
#cicada=$(echo "100-$success" | bc)
35+
printf ",$cicada" >> $OUTFILE
36+
sleep 1
37+
done
38+
printf "\n" >> $OUTFILE
39+
done
40+
done
41+
42+
$SCRIPT 0 0
43+
44+
python3 /home/ubuntu/send_email.py -e 'Cicada' c-*-results.txt
45+
sudo shutdown -h +1

other-cc/doppel/run.sh

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/bin/bash
2+
3+
shopt -s expand_aliases
4+
5+
alias go="$GOBIN/go1.6.4"
6+
7+
/home/ubuntu/sto/mount_hugepages.sh 102400
8+
9+
export PATH="$PATH:/home/ubuntu/doppel/list-cpus"
10+
11+
cd "$GOPATH/src/github.com/narula/ddtxn/benchmarks"
12+
13+
go install ./single
14+
go install ./buy
15+
16+
cd "/home/ubuntu/doppel"
17+
18+
for p in 20 90 160
19+
do
20+
OUTFILE="d-${p}p-results.txt"
21+
printf "# Threads" >> $OUTFILE
22+
for k in {1..5}
23+
do
24+
printf ",Doppel ($p phases) [T$k]" >> $OUTFILE
25+
done
26+
printf "\n" >> $OUTFILE
27+
for i in 1 2 4 12 24 32 40 48 64
28+
do
29+
printf "$i" >> $OUTFILE
30+
for k in {1..5}
31+
do
32+
"$GOBIN/buy" -nprocs=$i -ngo=$i -nw=$i -nsec=10 -contention=-1 -rr=10 -allocate=False -sys=0 -rlock=False -wr=2.0 -phase=$p -sr=500 -atomic=False -zipf=1.4 -out=data.out -ncrr=0 -cw=2.00 -rw=0.50 -split=False -latency=False -v=0
33+
doppel=$(cat data.out | grep '^ total/sec:' | grep -oe '[0-9.e+]+$')
34+
printf ",$doppel" >> $OUTFILE
35+
rm -f data.out
36+
sleep 1
37+
done
38+
printf "\n" >> $OUTFILE
39+
done
40+
done
41+
42+
/home/ubuntu/sto/mount_hugepages.sh 0
43+
44+
python3 /home/ubuntu/send_email.py -e 'Doppel' d-*-results.txt
45+
sudo shutdown -h +1
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
for w in 1 4 0
4+
do
5+
OUTFILE="e-${w}w-results.txt"
6+
printf "# Threads" >> $OUTFILE
7+
for k in {1..5}
8+
do
9+
printf ",ERMIA (W$w) [T$k]" >> $OUTFILE
10+
done
11+
printf "\n" >> $OUTFILE
12+
for i in 1 2 4 12 24 32 40 48 64
13+
do
14+
printf "$i" >> $OUTFILE
15+
for k in {1..5}
16+
do
17+
echo "running $w,$i,$k"
18+
wh=$w
19+
if [ $wh -eq 0 ]; then
20+
wh=$i
21+
fi
22+
ermia=$(./run.sh ./ermia_SI_SSN tpcc $wh $i 10 '-node_memory_gb=40 -null_log_device -enable_gc -phantom_prot --retry-aborted-transactions -persist-policy=async' '--new-order-fast-id-gen' 2>/dev/null | grep -oE '^[0-9.]+ commits/s' | grep -oE '[0-9.]+')
23+
printf ",$ermia" >> $OUTFILE
24+
sleep 1
25+
done
26+
printf "\n" >> $OUTFILE
27+
done
28+
done

other-cc/ermia/run.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
if [ ! -d build ]; then
4+
mkdir build
5+
cd build
6+
cmake ../ -DCMAKE_BUILD_TYPE=Release
7+
make -j
8+
cd ..
9+
fi
10+
11+
cd build
12+
/home/ubuntu/sto/mount_hugepages.sh 102400
13+
./run_script.sh
14+
python3 /home/ubuntu/send_email.py -e 'Ermia' e-*-results.txt
15+
sudo shutdown -h +1
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
loggers_per_node=2
4+
volatile_pool_size=32
5+
snapshot_pool_size=1
6+
reducer_buffer_size=2
7+
duration_micro=10000000
8+
max_thread_per_node=32
9+
sys_numa_nodes=2
10+
log_buffer_mb=1024
11+
machine_name="AWS EC2 m4.16xlarge Instance"
12+
machine_shortname="aws"
13+
. yihe_runs_hcc.sh
14+
15+
python3 /home/ubuntu/send_email.py --exp "FOEDUS-MOCC" mocc-1w-results.txt mocc-4w-results.txt mocc-0w-results.txt mocc_results.txt
16+
17+
sudo shutdown -h now
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#!/bin/bash
2+
3+
echo "FOEDUS TPC-C experiments script with HCC for $machine_shortname ($machine_name)"
4+
echo "loggers_per_node=$loggers_per_node, volatile_pool_size=$volatile_pool_size, duration_micro=$duration_micro."
5+
echo "thread_per_node=$max_thread_per_node, numa_nodes=$sys_numa_nodes, snapshot_pool_size=$snapshot_pool_size, reducer_buffer_size=$reducer_buffer_size."
6+
7+
null_log_device=true # Without logging I/O
8+
high_priority=false # To set this to true, you must add "yourname - rtprio 99" to limits.conf
9+
fork_workers=true
10+
hcc_policy=0
11+
12+
make clean
13+
make -j
14+
15+
for whs in 1 4 0
16+
do
17+
OUTFILE="mocc-${whs}w-results.txt"
18+
printf "# Threads" >> $OUTFILE
19+
for rep in {1..5}
20+
do
21+
printf ",MOCC (W${whs}) [T${rep}]" >> $OUTFILE
22+
done
23+
for thr in 2 6 12 16 20 24 32
24+
do
25+
if [ $thr -eq 0 ]
26+
then
27+
thread_per_node=1
28+
numa_nodes=1
29+
else
30+
thread_per_node=$thr
31+
numa_nodes=$sys_numa_nodes
32+
fi
33+
34+
total_threads=$(($thread_per_node * $numa_nodes))
35+
36+
if [ $whs -eq 0 ]
37+
then
38+
warehouses=$total_threads
39+
else
40+
warehouses=$whs
41+
fi
42+
43+
printf "\n$total_threads" >> $OUTFILE
44+
45+
for rep in {1..5}
46+
do
47+
echo "hcc_policy=$hcc_policy, warehouses=$warehouses, threads=$total_threads, rep=$rep/5..."
48+
# be careful.
49+
rm -rf /dev/shm/foedus_tpcc/
50+
rm -rf /tmp/libfoedus.*
51+
sleep 5 # Linux's release of shared memory has a bit of timelag.
52+
export CPUPROFILE_FREQUENCY=1 # https://code.google.com/p/gperftools/issues/detail?id=133
53+
echo "./tpcc -warehouses=$warehouses -fork_workers=$fork_workers -nvm_folder=/dev/shm -high_priority=$high_priority -null_log_device=$null_log_device -loggers_per_node=$loggers_per_node -thread_per_node=$thread_per_node -numa_nodes=$numa_nodes -log_buffer_mb=$log_buffer_mb -neworder_remote_percent=1 -payment_remote_percent=15 -volatile_pool_size=$volatile_pool_size -snapshot_pool_size=$snapshot_pool_size -reducer_buffer_size=$reducer_buffer_size -duration_micro=$duration_micro -hcc_policy=$hcc_policy"
54+
xput=$(env CPUPROFILE_FREQUENCY=1 ./tpcc -warehouses=$warehouses -take_snapshot=false -fork_workers=$fork_workers -nvm_folder=/dev/shm -high_priority=$high_priority -null_log_device=$null_log_device -loggers_per_node=$loggers_per_node -thread_per_node=$thread_per_node -numa_nodes=$numa_nodes -log_buffer_mb=$log_buffer_mb -neworder_remote_percent=1 -payment_remote_percent=15 -volatile_pool_size=$volatile_pool_size -snapshot_pool_size=$snapshot_pool_size -reducer_buffer_size=$reducer_buffer_size -duration_micro=$duration_micro -hcc_policy=$hcc_policy 2>&1 | grep 'final result:' | grep -oE '<MTPS>[0-9.]+</MTPS>' | grep -oE '[0-9.]+')
55+
#xput="${warehouses}.00"
56+
printf ",$xput" >> $OUTFILE
57+
done
58+
done
59+
printf "\n" >> $OUTFILE
60+
done
61+
62+
join --header -t , -j 1 mocc-1w-results.txt mocc-4w-results.txt > out.txt
63+
join --header -t , -j 1 out.txt mocc-0w-results.txt > mocc_results.txt
64+
rm -f out.txt

other-cc/mocc/run.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
if [ ! -d build ]; then
4+
mkdir build
5+
cd build
6+
cmake ..
7+
cd ..
8+
fi
9+
10+
cd build/experiments-core/src/foedus/tpcc/
11+
/home/ubuntu/sto/mount_hugepages.sh 102400
12+
./run_hcc_aws.sh

0 commit comments

Comments
 (0)