Skip to content

Commit

Permalink
Run scripts for other CCs, just for saving
Browse files Browse the repository at this point in the history
The file paths are included relative to the repo roots
(except for
doppel)

Doppel's scripts can go anywhere, really
  • Loading branch information
wqian94 committed Jun 24, 2022
1 parent daa5bbe commit 59f7b26
Show file tree
Hide file tree
Showing 7 changed files with 226 additions and 0 deletions.
45 changes: 45 additions & 0 deletions other-cc/cicada/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash

cd DBx1000

SCRIPT=/home/ubuntu/cicada-exp-sigmod2017/cicada-engine/script/setup.sh

$SCRIPT 51200 51200

for w in 1 4 0
do
sed -i "s/^#define PART_CNT .*$/#define PART_CNT $w/g" config.h
sed -i "s/^#define NUM_WH .*$/#define NUM_WH $w/g" config.h
OUTFILE="c-${w}w-results.txt"
printf "# Threads" >> $OUTFILE
for k in {1..5}
do
printf ",Cicada (W$w) [T$k]" >> $OUTFILE
done
printf "\n" >> $OUTFILE
for i in 1 2 4 12 24 32 40 48 64
do
printf "$i" >> $OUTFILE
if [ $w -eq 0 ]; then
sed -i "s/^#define PART_CNT .*$/#define PART_CNT $i/g" config.h
sed -i "s/^#define NUM_WH .*$/#define NUM_WH $i/g" config.h
fi
sed -i "s/^#define THREAD_CNT .*$/#define THREAD_CNT $i/g" config.h
make clean > /dev/null 2>&1
make rundb -j40 > /dev/null 2>&1
for k in {1..5}
do
cicada=$(sudo ./rundb 2>/dev/null | grep '^committed:' | grep -oE '[0-9.]+ M/sec' | grep -oE '[0-9.]+')
#success=$(sudo ./rundb 2>/dev/null | grep '^committed:' | grep -oE '[0-9.]+% attempts' | grep -oE '[0-9.]+')
#cicada=$(echo "100-$success" | bc)
printf ",$cicada" >> $OUTFILE
sleep 1
done
printf "\n" >> $OUTFILE
done
done

$SCRIPT 0 0

python3 /home/ubuntu/send_email.py -e 'Cicada' c-*-results.txt
sudo shutdown -h +1
45 changes: 45 additions & 0 deletions other-cc/doppel/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash

shopt -s expand_aliases

alias go="$GOBIN/go1.6.4"

/home/ubuntu/sto/mount_hugepages.sh 102400

export PATH="$PATH:/home/ubuntu/doppel/list-cpus"

cd "$GOPATH/src/github.com/narula/ddtxn/benchmarks"

go install ./single
go install ./buy

cd "/home/ubuntu/doppel"

for p in 20 90 160
do
OUTFILE="d-${p}p-results.txt"
printf "# Threads" >> $OUTFILE
for k in {1..5}
do
printf ",Doppel ($p phases) [T$k]" >> $OUTFILE
done
printf "\n" >> $OUTFILE
for i in 1 2 4 12 24 32 40 48 64
do
printf "$i" >> $OUTFILE
for k in {1..5}
do
"$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
doppel=$(cat data.out | grep '^ total/sec:' | grep -oE '[0-9.e+]+$')
printf ",$doppel" >> $OUTFILE
rm -f data.out
sleep 1
done
printf "\n" >> $OUTFILE
done
done

/home/ubuntu/sto/mount_hugepages.sh 0

python3 /home/ubuntu/send_email.py -e 'Doppel' d-*-results.txt
sudo shutdown -h +1
28 changes: 28 additions & 0 deletions other-cc/ermia/benchmarks/run_script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

for w in 1 4 0
do
OUTFILE="e-${w}w-results.txt"
printf "# Threads" >> $OUTFILE
for k in {1..5}
do
printf ",ERMIA (W$w) [T$k]" >> $OUTFILE
done
printf "\n" >> $OUTFILE
for i in 1 2 4 12 24 32 40 48 64
do
printf "$i" >> $OUTFILE
for k in {1..5}
do
echo "running $w,$i,$k"
wh=$w
if [ $wh -eq 0 ]; then
wh=$i
fi
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.]+')
printf ",$ermia" >> $OUTFILE
sleep 1
done
printf "\n" >> $OUTFILE
done
done
15 changes: 15 additions & 0 deletions other-cc/ermia/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

if [ ! -d build ]; then
mkdir build
cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release
make -j
cd ..
fi

cd build
/home/ubuntu/sto/mount_hugepages.sh 102400
./run_script.sh
python3 /home/ubuntu/send_email.py -e 'Ermia' e-*-results.txt
sudo shutdown -h +1
17 changes: 17 additions & 0 deletions other-cc/foedus/experiments-core/src/foedus/tpcc/run_hcc_aws.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

loggers_per_node=2
volatile_pool_size=32
snapshot_pool_size=1
reducer_buffer_size=2
duration_micro=10000000
max_thread_per_node=32
sys_numa_nodes=2
log_buffer_mb=1024
machine_name="AWS EC2 m4.16xlarge Instance"
machine_shortname="aws"
. yihe_runs_hcc.sh

python3 /home/ubuntu/send_email.py --exp "FOEDUS-MOCC" mocc-1w-results.txt mocc-4w-results.txt mocc-0w-results.txt mocc_results.txt

sudo shutdown -h now
64 changes: 64 additions & 0 deletions other-cc/foedus/experiments-core/src/foedus/tpcc/yihe_runs_hcc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#!/bin/bash

echo "FOEDUS TPC-C experiments script with HCC for $machine_shortname ($machine_name)"
echo "loggers_per_node=$loggers_per_node, volatile_pool_size=$volatile_pool_size, duration_micro=$duration_micro."
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."

null_log_device=true # Without logging I/O
high_priority=false # To set this to true, you must add "yourname - rtprio 99" to limits.conf
fork_workers=true
hcc_policy=0

make clean
make -j

for whs in 1 4 0
do
OUTFILE="mocc-${whs}w-results.txt"
printf "# Threads" >> $OUTFILE
for rep in {1..5}
do
printf ",MOCC (W${whs}) [T${rep}]" >> $OUTFILE
done
for thr in 2 6 12 16 20 24 32
do
if [ $thr -eq 0 ]
then
thread_per_node=1
numa_nodes=1
else
thread_per_node=$thr
numa_nodes=$sys_numa_nodes
fi

total_threads=$(($thread_per_node * $numa_nodes))

if [ $whs -eq 0 ]
then
warehouses=$total_threads
else
warehouses=$whs
fi

printf "\n$total_threads" >> $OUTFILE

for rep in {1..5}
do
echo "hcc_policy=$hcc_policy, warehouses=$warehouses, threads=$total_threads, rep=$rep/5..."
# be careful.
rm -rf /dev/shm/foedus_tpcc/
rm -rf /tmp/libfoedus.*
sleep 5 # Linux's release of shared memory has a bit of timelag.
export CPUPROFILE_FREQUENCY=1 # https://code.google.com/p/gperftools/issues/detail?id=133
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"
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.]+')
#xput="${warehouses}.00"
printf ",$xput" >> $OUTFILE
done
done
printf "\n" >> $OUTFILE
done

join --header -t , -j 1 mocc-1w-results.txt mocc-4w-results.txt > out.txt
join --header -t , -j 1 out.txt mocc-0w-results.txt > mocc_results.txt
rm -f out.txt
12 changes: 12 additions & 0 deletions other-cc/mocc/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

if [ ! -d build ]; then
mkdir build
cd build
cmake ..
cd ..
fi

cd build/experiments-core/src/foedus/tpcc/
/home/ubuntu/sto/mount_hugepages.sh 102400
./run_hcc_aws.sh

0 comments on commit 59f7b26

Please sign in to comment.