From e408942bc0fd4cccc511e4a2d339edbba79c8968 Mon Sep 17 00:00:00 2001 From: lidj Date: Mon, 4 Sep 2023 17:12:34 +0800 Subject: [PATCH] ae: add comments and update estimated resources --- artificial_eval.md | 15 +++++ .../1-ckpt-restore-details/fig9.sh | 4 +- .../1-ckpt-restore-details/parse_mem_size.py | 0 .../1-ckpt-restore-details/table2.sh | 6 +- .../1-ckpt-restore-details/table3.sh | 5 ++ .../1-ckpt-restore-details/table4.sh | 7 +++ .../test_ckpt_details.sh | 7 ++- .../1-ckpt-restore-details/test_ckpt_size.exp | 2 +- .../test_restore_details.sh | 6 +- .../1-ckpt-restore-details/tool.exp | 16 +++--- .../2-hybrid-method/fig10.sh | 2 + .../2-hybrid-method/test_plus.sh | 2 + artificial_evaluation/3-ext-sync/fig12.sh | 3 + artificial_evaluation/3-ext-sync/test_base.sh | 2 + .../3-ext-sync/test_ext_sync.sh | 1 + artificial_evaluation/4-memcached/fig11.sh | 2 + .../4-memcached/test_memcached.sh | 2 + artificial_evaluation/5-redis-ycsb/fig13.sh | 2 + .../5-redis-ycsb/test_ycsb.sh | 8 ++- artificial_evaluation/6-rocksdb/fig14.sh | 4 +- .../6-rocksdb/test_rocksdb.sh | 6 +- .../applications/default.exp | 37 ++++++------- artificial_evaluation/applications/kmeans.exp | 44 +++++++-------- .../applications/leveldb.exp | 55 ++++++++----------- .../applications/memcached.exp | 46 +++++++--------- artificial_evaluation/applications/pca.exp | 44 +++++++-------- artificial_evaluation/applications/redis.exp | 42 ++++++-------- .../applications/rocksdb.exp | 41 ++++++-------- artificial_evaluation/applications/sqlite.exp | 42 +++++++------- artificial_evaluation/applications/tools.exp | 42 -------------- .../applications/word_count.exp | 42 +++++++------- artificial_evaluation/applications/ycsb.exp | 32 +++++------ artificial_evaluation/config.exp | 9 ++- .../linux-redis-ycsb/config.sh | 2 - .../linux-redis-ycsb/dax_config.sh | 8 --- .../linux-redis-ycsb/disk_config.sh | 6 -- .../linux-redis-ycsb/test_ycsb.sh | 37 ------------- 37 files changed, 277 insertions(+), 354 deletions(-) mode change 100644 => 100755 artificial_evaluation/1-ckpt-restore-details/parse_mem_size.py delete mode 100755 artificial_evaluation/applications/tools.exp delete mode 100755 artificial_evaluation/linux-redis-ycsb/config.sh delete mode 100755 artificial_evaluation/linux-redis-ycsb/dax_config.sh delete mode 100755 artificial_evaluation/linux-redis-ycsb/disk_config.sh delete mode 100755 artificial_evaluation/linux-redis-ycsb/test_ycsb.sh diff --git a/artificial_eval.md b/artificial_eval.md index 2ce4f38..3fbbb25 100755 --- a/artificial_eval.md +++ b/artificial_eval.md @@ -213,6 +213,21 @@ After all, run `./fig12.sh`. 3. copy logs of Aurora (by default, in `/aurora-data/`) to `artificial_evaluation/logs//rocksdb/` 3. run `./fig14.sh` +## Estimated Resources + +Space are consumed within the microkernel. + +| Test | Estimated Time | Details | +| -------------------------------------- | ---------------------- | ---------- | +| 1/test_ckpt_details.sh | ~24 min | ~3 min per workload, 8 workloads | | | +| 1/test_ckpt_size.sh | ~18 min | ~3 min per workload, 6 workloads | | | +| 1/test_restore_details.sh | ~21 min | ~3 min per workload, 7 workloads | +| 2/test_*.sh | ~1 hour (~12 min * 5 configurations) | ~3 minutes per workload, 4 workloads, 5 configurations | | +| 3/test_base.sh + test_ext_syn.sh | ~9 min (ext-sync) + 12 min (base) | ~3 min per workload, 3 configurations (ext-sync) + 4 configurations (base) | | +| 4/test_memcached.sh | ~15 min | ~3 min per test, 5 configurations | | +| 5/test_ycsb.sh | ~32 min | ~4 min per test, 4 * 2 configurations | +| 6/test_rocksdb.sh | ~6 min | ~3 min per test, 2 configurations | + ## Common Q&A Q. Changing the CPU number diff --git a/artificial_evaluation/1-ckpt-restore-details/fig9.sh b/artificial_evaluation/1-ckpt-restore-details/fig9.sh index 29eb326..a6bb165 100755 --- a/artificial_evaluation/1-ckpt-restore-details/fig9.sh +++ b/artificial_evaluation/1-ckpt-restore-details/fig9.sh @@ -3,6 +3,8 @@ source ../config.sh mkdir -p './result' +# draw fig9a and fig9b with logs in $logbasedir/ckpt-breakdown/ python draw_fig.py $logbasedir/ckpt-breakdown/ a python draw_fig.py $logbasedir/ckpt-breakdown/ b -echo "fig9a and fig9b is saved in ./result" \ No newline at end of file + +echo "fig9a and fig9b is saved in ./result" diff --git a/artificial_evaluation/1-ckpt-restore-details/parse_mem_size.py b/artificial_evaluation/1-ckpt-restore-details/parse_mem_size.py old mode 100644 new mode 100755 diff --git a/artificial_evaluation/1-ckpt-restore-details/table2.sh b/artificial_evaluation/1-ckpt-restore-details/table2.sh index 954c4fe..25bc6e4 100755 --- a/artificial_evaluation/1-ckpt-restore-details/table2.sh +++ b/artificial_evaluation/1-ckpt-restore-details/table2.sh @@ -3,8 +3,10 @@ source ../config.sh mkdir -p './result' -# Object Composition (Count) +# object composition (count) +# data is printed and saved in "result/table2-counts.csv" python break_down.py $logbasedir/ckpt-breakdown/ count -# Size (MB) +# size (MB) +# data is printed and saved in "result/table2-memsize.csv" python parse_mem_size.py $logbasedir/ckpt-size/ './result/table2-mem-size.csv' diff --git a/artificial_evaluation/1-ckpt-restore-details/table3.sh b/artificial_evaluation/1-ckpt-restore-details/table3.sh index dd523e9..3384fe5 100755 --- a/artificial_evaluation/1-ckpt-restore-details/table3.sh +++ b/artificial_evaluation/1-ckpt-restore-details/table3.sh @@ -3,5 +3,10 @@ source ../config.sh mkdir -p './result' +# incur and full checkpoint time +# data is printed and saved in "result/table3-full/incur-colum.csv" python break_down.py $logbasedir/ckpt-breakdown/ ckpt + +# restore time +# data is printed and saved in "result/table3-restore-column.csv" python break_down_restore.py $logbasedir/restore-breakdown/ restore diff --git a/artificial_evaluation/1-ckpt-restore-details/table4.sh b/artificial_evaluation/1-ckpt-restore-details/table4.sh index 7b101be..68bedc1 100755 --- a/artificial_evaluation/1-ckpt-restore-details/table4.sh +++ b/artificial_evaluation/1-ckpt-restore-details/table4.sh @@ -3,4 +3,11 @@ source ../config.sh mkdir -p './result' +# data is printed and saved in "result/table4.csv" +# data will have five rows: +# 1. # of runtime page faults +# 2. # of dirty cached pages +# 3. # of cached pages +# 4. Ratio of page faults eliminated +# 5. Dirty rate in cached pages python break_down.py $logbasedir/ckpt-breakdown/ extra diff --git a/artificial_evaluation/1-ckpt-restore-details/test_ckpt_details.sh b/artificial_evaluation/1-ckpt-restore-details/test_ckpt_details.sh index f393296..b6bddfa 100755 --- a/artificial_evaluation/1-ckpt-restore-details/test_ckpt_details.sh +++ b/artificial_evaluation/1-ckpt-restore-details/test_ckpt_details.sh @@ -6,12 +6,15 @@ logdir=$logbasedir/ckpt-breakdown loop=(0) mkdir -p $logdir +# Test each workloads with ckpt-log mode +# ckpt-log mode will take checkpoint with log reported while running for workload in default memcached redis sqlite leveldb kmeans word_count pca # run a subset of workload -# for workload in pca +# for workload in default do for run in ${loop[@]} do + echo "Test ckpt details with workload: $workload" if [ $workload == "redis" ]; then $appdir/$workload.exp ckpt-log set nopipe 1 3 2>&1 | tee $logdir/$workload.ckpt1ms.log3.$run.log else @@ -19,4 +22,4 @@ do fi sleep 5 done -done \ No newline at end of file +done diff --git a/artificial_evaluation/1-ckpt-restore-details/test_ckpt_size.exp b/artificial_evaluation/1-ckpt-restore-details/test_ckpt_size.exp index cd6c68f..7b1e0ee 100755 --- a/artificial_evaluation/1-ckpt-restore-details/test_ckpt_size.exp +++ b/artificial_evaluation/1-ckpt-restore-details/test_ckpt_size.exp @@ -6,10 +6,10 @@ set logdir $logbasedir/ckpt-size set timeout 180 -# set workloads {memcached redis sqlite leveldb kmeans word_count} set workloads {memcached redis sqlite leveldb kmeans word_count} spawn mkdir -p $logdir +# Test memory usage of each workload foreach workload $workloads { foreach flag {raw ckpt} { foreach i {0} { diff --git a/artificial_evaluation/1-ckpt-restore-details/test_restore_details.sh b/artificial_evaluation/1-ckpt-restore-details/test_restore_details.sh index 7625ac6..57b4c59 100755 --- a/artificial_evaluation/1-ckpt-restore-details/test_restore_details.sh +++ b/artificial_evaluation/1-ckpt-restore-details/test_restore_details.sh @@ -6,13 +6,15 @@ logdir=$logbasedir/restore-breakdown loop=(0) mkdir -p $logdir +# Test each workloads with restore-test mode +# restore-test mode will first take a checkpoint and then shutdown to restore for workload in default word_count sqlite leveldb kmeans redis memcached # run a subset of workload -# for workload in leveldb kmeans redis memcached +# for workload in default do for run in ${loop[@]} do - # $appdir/$workload.exp "restore-log" 500 4 2>&1 | tee $logdir/$workload.restore.$run.log + echo "Test restore details with workload: $workload" if [ $workload == "redis" ]; then $appdir/$workload.exp restore-test set nopipe 1000 0 2>&1 | tee $logdir/$workload.restore.$run.log elif [ $workload == "leveldb" ]; then diff --git a/artificial_evaluation/1-ckpt-restore-details/tool.exp b/artificial_evaluation/1-ckpt-restore-details/tool.exp index 981a3dc..d3e4913 100755 --- a/artificial_evaluation/1-ckpt-restore-details/tool.exp +++ b/artificial_evaluation/1-ckpt-restore-details/tool.exp @@ -1,13 +1,15 @@ +source ../config.exp + proc run_test {workload flag} { set thread 8 if {$flag == "ckpt"} { - send -- "checkpoint.bin -i %10 -l 0 -a 14 &\r" + send -- "checkpoint.bin -i %10 -l 0 -a 9 &\r" expect "Launching /checkpoint.bin" puts "${workload}" } switch $workload { "kmeans" { - send -- "kmeans.bin -p 500000 &\r" + send -- "kmeans.bin -p $kmeans_num &\r" expect "KMeans: MapReduce Completed" } "word_count" { @@ -18,16 +20,16 @@ proc run_test {workload flag} { puts "redis set test" send -- "redis-server --save \"\" -h 127.0.0.1 &\r" expect "poll fd server is not lwip" - send -- "redis-benchmark -t set -n 1000000 -d 1024 --threads $thread &\r" + send -- "redis-benchmark -t set -n $redis_num -d 1024 --threads $thread &\r" expect "requests per second" } "memcached" { - send -- "memcached -l 127.0.0.1 -p 123 & \r" + send -- "memcached -l 127.0.0.1 -p 123 -t $thread & \r" expect "poll fd server is not lwip" - send -- "memcachetest -h 127.0.0.1:123 -M 1024 -F -t $thread -i 1000000 &\r" + send -- "memcachetest -h 127.0.0.1:123 -M 1024 -F -t $thread -i $memcached_num &\r" expect "Launching /memcachetest" - # expect "Total gets:" + expect "Total gets:" expect "Total sets:" } "sqlite" { @@ -35,7 +37,7 @@ proc run_test {workload flag} { expect "sqlite_test done" } "leveldb" { - send -- "leveldb-dbbench &\r" + send -- "leveldb-dbbench --benchmarks=fillbatch --num=$leveldb_num &\r" expect "snappyuncomp" expect "Min" } diff --git a/artificial_evaluation/2-hybrid-method/fig10.sh b/artificial_evaluation/2-hybrid-method/fig10.sh index 06069a1..f3f5fb5 100755 --- a/artificial_evaluation/2-hybrid-method/fig10.sh +++ b/artificial_evaluation/2-hybrid-method/fig10.sh @@ -4,6 +4,8 @@ source ../config.sh mkdir -p ./result +# parse logs and save data in "./result/hybrid-mem.csv" python read_data.py $logbasedir/hybrid-mem +# draw fig10 with saved data python draw_fig10.py ./result/hybrid-mem.csv echo "fig10 is saved in ./result" diff --git a/artificial_evaluation/2-hybrid-method/test_plus.sh b/artificial_evaluation/2-hybrid-method/test_plus.sh index b1e0648..b1ddeb0 100755 --- a/artificial_evaluation/2-hybrid-method/test_plus.sh +++ b/artificial_evaluation/2-hybrid-method/test_plus.sh @@ -8,6 +8,8 @@ mode=$1 mkdir -p $logdir +# Test each workloads with ckpt mode +# ckpt mode will continuously doing checkpoint for workload in redis pca kmeans memcached do mkdir -p $logdir/$workload diff --git a/artificial_evaluation/3-ext-sync/fig12.sh b/artificial_evaluation/3-ext-sync/fig12.sh index 540263a..5e74673 100755 --- a/artificial_evaluation/3-ext-sync/fig12.sh +++ b/artificial_evaluation/3-ext-sync/fig12.sh @@ -3,7 +3,10 @@ source ../config.sh mkdir -p ./result +# parse logs in $logbasedir/ext-sync/base and ext +# save data in ./result/ext-sync-base.csv and ./result/ext-sync-ext.csv python read_data.py $logbasedir/ext-sync/base base python read_data.py $logbasedir/ext-sync/ext ext +# draw fig12 with saved data python draw_fig12.py ./result/ext-sync-base.csv ./result/ext-sync-ext.csv echo "fig12 is saved in ./result" diff --git a/artificial_evaluation/3-ext-sync/test_base.sh b/artificial_evaluation/3-ext-sync/test_base.sh index bddf5c1..d93cce4 100755 --- a/artificial_evaluation/3-ext-sync/test_base.sh +++ b/artificial_evaluation/3-ext-sync/test_base.sh @@ -8,11 +8,13 @@ mkdir -p $logdir loop=(0) intervals=(0 1 5 10) +# Test redis set benchmark with different checkpoint interval for freq in ${intervals[@]} do mkdir -p $logdir/$freq for run in ${loop[@]} do + # checkpoint interval == 0 means raw mode without checkpointing if [ $freq == 0 ]; then $appdir/redis.exp raw set 32 2>&1 | tee $logdir/ckpt0.pip32.$run.log else diff --git a/artificial_evaluation/3-ext-sync/test_ext_sync.sh b/artificial_evaluation/3-ext-sync/test_ext_sync.sh index 16cd490..dd7f3dd 100755 --- a/artificial_evaluation/3-ext-sync/test_ext_sync.sh +++ b/artificial_evaluation/3-ext-sync/test_ext_sync.sh @@ -8,6 +8,7 @@ mkdir -p $logdir loop=(0) intervals=(1 5 10) +# Test redis set benchmark with different checkpoint interval for freq in ${intervals[@]} do for run in ${loop[@]} diff --git a/artificial_evaluation/4-memcached/fig11.sh b/artificial_evaluation/4-memcached/fig11.sh index 4295d60..baaf2c3 100755 --- a/artificial_evaluation/4-memcached/fig11.sh +++ b/artificial_evaluation/4-memcached/fig11.sh @@ -3,6 +3,8 @@ source ../config.sh mkdir -p ./result +# parse logs and save data in "./result/memcached-GET/SET.csv" python read_memcached.py $logbasedir/memcached +# draw fig11 with saved data python draw_fig11.py './result/' echo "fig11 is saved in ./result" diff --git a/artificial_evaluation/4-memcached/test_memcached.sh b/artificial_evaluation/4-memcached/test_memcached.sh index 9f1b274..81a7aaf 100755 --- a/artificial_evaluation/4-memcached/test_memcached.sh +++ b/artificial_evaluation/4-memcached/test_memcached.sh @@ -8,11 +8,13 @@ mkdir -p $logdir loop=(0) intervals=(0 1 5 10 50) +# Test memcached benchmark with different checkpoint interval for freq in ${intervals[@]} do for run in ${loop[@]} do f=t8.$run.log + # checkpoint interval == 0 means raw mode without checkpointing if [ $freq == 0 ]; then $appdir/memcached.exp raw 2>&1 | tee $logdir/ckpt0.$f else diff --git a/artificial_evaluation/5-redis-ycsb/fig13.sh b/artificial_evaluation/5-redis-ycsb/fig13.sh index 51107a2..41aee04 100755 --- a/artificial_evaluation/5-redis-ycsb/fig13.sh +++ b/artificial_evaluation/5-redis-ycsb/fig13.sh @@ -3,6 +3,8 @@ source ../config.sh mkdir -p "./result" +# parse logs and save data in "./result/ycsb.csv" python read_ycsb.py $logbasedir/ycsb +# draw fig13 with saved data python draw_ycsb.py "./result/ycsb.csv" "./result/fig13.jpg" echo "fig13 is saved in ./result" diff --git a/artificial_evaluation/5-redis-ycsb/test_ycsb.sh b/artificial_evaluation/5-redis-ycsb/test_ycsb.sh index 6a37e55..906d08f 100755 --- a/artificial_evaluation/5-redis-ycsb/test_ycsb.sh +++ b/artificial_evaluation/5-redis-ycsb/test_ycsb.sh @@ -6,19 +6,21 @@ logdir=$logbasedir/ycsb loop=(0) threads=(1) -mkdir -p $logdir mkdir -p $logdir/chcore-baseline mkdir -p $logdir/chcore-ckpt1ms -for workload in a b c g +# Test ycsb benchmark with different workload +# workload configs are given in user/demos/YCSB-C/workloads/ +for workload in a b c h do for thread in ${threads[@]} do for run in ${loop[@]} do + # baseline $appdir/ycsb.exp raw $workload $thread 2>&1 | tee $logdir/chcore-baseline/$workload.chcore-raw.t$thread.$run.log sleep 10 - + # with checkpoint $appdir/ycsb.exp ckpt $workload $thread 2>&1 | tee $logdir/chcore-ckpt1ms/$workload.chcore-1msckpt.t$thread.$run.log sleep 10 done diff --git a/artificial_evaluation/6-rocksdb/fig14.sh b/artificial_evaluation/6-rocksdb/fig14.sh index 61bc8c0..4bee877 100755 --- a/artificial_evaluation/6-rocksdb/fig14.sh +++ b/artificial_evaluation/6-rocksdb/fig14.sh @@ -3,6 +3,8 @@ source ../config.sh mkdir -p ./result -python read_rocksdb.py $logbasedir/rocksdb +# parse logs and save data in "./result/rocksdb.csv" +python read_rocksdb.py $logbasedir/rocksdb/1/ +# draw fig14 with saved data python draw_rocksdb.py "./result/rocksdb.csv" echo "fig14(a,b,c,d) are saved in ./result" diff --git a/artificial_evaluation/6-rocksdb/test_rocksdb.sh b/artificial_evaluation/6-rocksdb/test_rocksdb.sh index 8ef7a7f..c529080 100755 --- a/artificial_evaluation/6-rocksdb/test_rocksdb.sh +++ b/artificial_evaluation/6-rocksdb/test_rocksdb.sh @@ -7,6 +7,7 @@ threads=(1) mkdir -p $logdir +# Test rocksdb benchmark with and without taking checkpoint for thread in ${threads[@]} do for run in ${loop[@]} @@ -16,11 +17,6 @@ do $appdir/rocksdb.exp raw $thread 2>&1 | tee $logdir/$thread/chcore-base/$run.out sleep 10 - # baseline with WAL - # mkdir -p $logdir/chcore-base-wal - # $appdir/rocksdb.exp wal 2>&1 | tee $logdir/chcore-base-wal/$run.out - # sleep 10 - # with ckpt mkdir -p $logdir/$thread/chcore-ckpt $appdir/rocksdb.exp ckpt $thread 1 0 2>&1 | tee $logdir/$thread/chcore-ckpt/$run.out diff --git a/artificial_evaluation/applications/default.exp b/artificial_evaluation/applications/default.exp index 57c2096..a3aced9 100755 --- a/artificial_evaluation/applications/default.exp +++ b/artificial_evaluation/applications/default.exp @@ -2,7 +2,7 @@ source ../config.exp -set timeout 20 +set timeout 120 set mode [lindex $argv 0] if {$test_mode == "QEMU"} { @@ -15,10 +15,18 @@ if {$test_mode == "QEMU"} { expect { "SOL Session operational" { puts "ipmi connected" - break + send -- "shutdown.bin \r" + expect { + "Welcome to ChCore shell!" { break } + "No such binary" { continue } + timeout { + spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol deactivate + continue + } + } } "SOL payload already active on another session" { - spawn spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol activate + spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol deactivate continue } timeout { @@ -27,53 +35,44 @@ if {$test_mode == "QEMU"} { } } } - - set timeout 300 - while {1} { - send -- "shutdown.bin \r" - expect { - "Welcome to ChCore shell!" { break } - "No such binary" { continue } - timeout { - puts "shutdown fail" - continue - } - } - } } else { puts "Currently, we only support IPMI and QEMU mode!" } set timeout 300 +# raw mode: just running default application if {$mode == "raw"} { puts "do nothing" } +# ckpt mode: taking checkpoint while running if {$mode == "ckpt"} { set freq [lindex $argv 1] set log [lindex $argv 2] puts "test default system with $freq ms checkpoint" - send -- "checkpoint.bin -i %$freq -l $log -a 14 &\r" + send -- "checkpoint.bin -i %$freq -l $log -a 9 &\r" expect "Launching /checkpoint.bin" } +# ckpt-log mode: taking $ckptlogtimes times of checkpoint with log if {$mode == "ckpt-log"} { set freq [lindex $argv 1] set log [lindex $argv 2] puts "test default system with $freq ms checkpoint\n" - send -- "checkpoint.bin -i %$freq -l $log -a 14 -t $ckptlogtimes &\n" + send -- "checkpoint.bin -i %$freq -l $log -a 9 -t $ckptlogtimes &\n" expect "Launching /checkpoint.bin" expect "Checkpoint finished" } +# restore mode: take a checkpoint and call shutdown to restore if {$mode == "restore-log" || $mode == "restore-test"} { set freq [lindex $argv 1] set log [lindex $argv 2] - send -- "checkpoint.bin -i %$freq -l $log -a 14 -t 4 &\r" + send -- "checkpoint.bin -i %$freq -l $log -a 9 -t 4 &\r" expect "Checkpoint finished" send -- "shutdown.bin 0 & \r" expect "restore from ckpt" diff --git a/artificial_evaluation/applications/kmeans.exp b/artificial_evaluation/applications/kmeans.exp index b88b3d9..999f996 100755 --- a/artificial_evaluation/applications/kmeans.exp +++ b/artificial_evaluation/applications/kmeans.exp @@ -2,7 +2,7 @@ source ../config.exp -set timeout 20 +set timeout 120 set mode [lindex $argv 0] if {$test_mode == "QEMU"} { @@ -15,10 +15,18 @@ if {$test_mode == "QEMU"} { expect { "SOL Session operational" { puts "ipmi connected" - break + send -- "shutdown.bin \r" + expect { + "Welcome to ChCore shell!" { break } + "No such binary" { continue } + timeout { + spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol deactivate + continue + } + } } "SOL payload already active on another session" { - spawn spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol activate + spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol deactivate continue } timeout { @@ -27,59 +35,47 @@ if {$test_mode == "QEMU"} { } } } - - set timeout 300 - while {1} { - send -- "shutdown.bin \r" - expect { - "Welcome to ChCore shell!" { break } - "No such binary" { continue } - timeout { - puts "shutdown fail" - continue - } - } - } } else { puts "Currently, we only support IPMI and QEMU mode!" } set timeout 300 -# Test 1 +# raw mode: just running default application if {$mode == "raw"} { puts "test raw kmeans" } -# Test 2 +# ckpt mode: taking checkpoint while running if {$mode == "ckpt"} { set freq [lindex $argv 1] set log [lindex $argv 2] puts "test kmeans with 1ms checkpoint" - send -- "checkpoint.bin -i %$freq -l 0 -a 14 &\r" + send -- "checkpoint.bin -i %$freq -l 0 -a 9 &\r" expect "Launching /checkpoint.bin" sleep 5 } -send -- "kmeans.bin -p 500000 &\r" +# Launch kmeans with $kmeans_num points +send -- "kmeans.bin -p $kmeans_num &\r" -# Test 3 +# ckpt-log mode: taking $ckptlogtimes times of checkpoint with log if {$mode == "ckpt-log"} { set freq [lindex $argv 1] set log [lindex $argv 2] - send -- "checkpoint.bin -i %$freq -l $log -a 14 -t $ckptlogtimes &\r" + send -- "checkpoint.bin -i %$freq -l $log -a 9 -t $ckptlogtimes &\r" expect "Launching /checkpoint.bin" expect "Checkpoint finished" } -# Test 4 +# restore mode: take a checkpoint and call shutdown to restore if {$mode == "restore-log" || $mode == "restore-test"} { set freq [lindex $argv 1] set log [lindex $argv 2] - send -- "checkpoint.bin -i %$freq -l $log -a 14 -t 4 &\r" + send -- "checkpoint.bin -i %$freq -l $log -a 9 -t 4 &\r" expect "Checkpoint finished" send -- "shutdown.bin 0 & \r" expect "restore from ckpt" diff --git a/artificial_evaluation/applications/leveldb.exp b/artificial_evaluation/applications/leveldb.exp index 7bec443..e86984e 100755 --- a/artificial_evaluation/applications/leveldb.exp +++ b/artificial_evaluation/applications/leveldb.exp @@ -2,7 +2,7 @@ source ../config.exp -set timeout 20 +set timeout 120 set mode [lindex $argv 0] if {$test_mode == "QEMU"} { @@ -15,10 +15,18 @@ if {$test_mode == "QEMU"} { expect { "SOL Session operational" { puts "ipmi connected" - break + send -- "shutdown.bin \r" + expect { + "Welcome to ChCore shell!" { break } + "No such binary" { continue } + timeout { + spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol deactivate + continue + } + } } "SOL payload already active on another session" { - spawn spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol activate + spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol deactivate continue } timeout { @@ -27,19 +35,6 @@ if {$test_mode == "QEMU"} { } } } - - set timeout 300 - while {1} { - send -- "shutdown.bin \r" - expect { - "Welcome to ChCore shell!" { break } - "No such binary" { continue } - timeout { - puts "shutdown fail" - continue - } - } - } } else { puts "Currently, we only support IPMI and QEMU mode!" } @@ -50,55 +45,53 @@ send -- "idle.bin &\r" expect "Launching /idle.bin" sleep 1 -# Test 1 +# raw mode: just running default application if {$mode == "raw"} { puts "test raw leveldb" - send -- "leveldb-dbbench --benchmarks=fillbatch --num=1000000 &\r" + send -- "leveldb-dbbench --benchmarks=fillbatch --num=$leveldb_num &\r" expect "Launching /leveldb-dbbench" } -# Test 2 +# ckpt mode: taking checkpoint while running if {$mode == "ckpt"} { set freq [lindex $argv 1] set log [lindex $argv 2] puts "test leveldb with $freq ms checkpoint" - send -- "leveldb-dbbench --benchmarks=fillbatch --num=1000000 &\r" + send -- "leveldb-dbbench --benchmarks=fillbatch --num=$leveldb_num &\r" expect "Launching /leveldb-dbbench" - send -- "checkpoint.bin -i %$freq -l $log -a 14 &\r" + send -- "checkpoint.bin -i %$freq -l $log -a 9 &\r" expect "Launching /checkpoint.bin" sleep 5 } - - -# Test 3 +# ckpt-log mode: taking $ckptlogtimes times of checkpoint with log if {$mode == "ckpt-log"} { set freq [lindex $argv 1] set log [lindex $argv 2] - send -- "leveldb-dbbench --benchmarks=fillbatch --num=1000000 &\r" + send -- "leveldb-dbbench --benchmarks=fillbatch --num=$leveldb_num &\r" expect "Launching /leveldb-dbbench" - send -- "checkpoint.bin -i %$freq -l $log -a 14 -t $ckptlogtimes &\r" + send -- "checkpoint.bin -i %$freq -l $log -a 9 -t $ckptlogtimes &\r" expect "Launching /checkpoint.bin" - expect "Checkpoint finished" + expect "Microseconds per op" } -# Test 4 +# restore mode: take a checkpoint and call shutdown to restore if {$mode == "restore-log" || $mode == "restore-test"} { set freq [lindex $argv 1] set log [lindex $argv 2] - send -- "leveldb-dbbench --benchmarks=fillbatch --num=5000000 &\r" + send -- "leveldb-dbbench --benchmarks=fillbatch --num=$leveldb_num &\r" expect "Launching /leveldb-dbbench" - send -- "checkpoint.bin -i %$freq -l $log -a 14 -t 4 &\r" + send -- "checkpoint.bin -i %$freq -l $log -a 9 -t 4 &\r" expect "Checkpoint finished" send -- "shutdown.bin 0 & \r" expect "restore from ckpt" } if {$mode != "ckpt-log" && $mode != "restore-log"} { - expect "file:/chos/kernel/object/recycle.c" + expect "Microseconds per op" } diff --git a/artificial_evaluation/applications/memcached.exp b/artificial_evaluation/applications/memcached.exp index ae9a3c9..1e5dfd2 100755 --- a/artificial_evaluation/applications/memcached.exp +++ b/artificial_evaluation/applications/memcached.exp @@ -2,7 +2,7 @@ source ../config.exp -set timeout 20 +set timeout 120 set mode [lindex $argv 0] if {$test_mode == "QEMU"} { @@ -15,10 +15,18 @@ if {$test_mode == "QEMU"} { expect { "SOL Session operational" { puts "ipmi connected" - break + send -- "shutdown.bin \r" + expect { + "Welcome to ChCore shell!" { break } + "No such binary" { continue } + timeout { + spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol deactivate + continue + } + } } "SOL payload already active on another session" { - spawn spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol activate + spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol deactivate continue } timeout { @@ -27,20 +35,6 @@ if {$test_mode == "QEMU"} { } } } - - set timeout 300 - while {1} { - send -- "\n" - send -- "shutdown.bin \r" - expect { - "Welcome to ChCore shell!" { break } - "No such binary" { continue } - timeout { - puts "shutdown fail" - continue - } - } - } } else { puts "Currently, we only support IPMI and QEMU mode!" } @@ -48,43 +42,45 @@ if {$test_mode == "QEMU"} { set timeout 1200 set thread 8 +# Launch memcached server ($thread threaded) send -- "memcached -l 127.0.0.1 -p 123 -t $thread & \r" expect "poll fd server is not lwip" -# Test 1 +# raw mode: just running default application if {$mode == "raw"} { puts "do nothing" } -# Test 2 +# ckpt mode: taking checkpoint while running if {$mode == "ckpt"} { set freq [lindex $argv 1] set log [lindex $argv 2] - send -- "checkpoint.bin -i %$freq -l $log -a 14 &\n" + send -- "checkpoint.bin -i %$freq -l $log -a 9 &\n" expect "Launching /checkpoint.bin" sleep 5 } -send -- "memcachetest -h 127.0.0.1:123 -M 1024 -F -t $thread -i 100000 &\r" +# Launch memcached client ($thread threaded) +send -- "memcachetest -h 127.0.0.1:123 -M 1024 -F -t $thread -i $memcached_num &\r" expect "Launching /memcachetest" -# Test 3 +# ckpt-log mode: taking $ckptlogtimes times of checkpoint with log if {$mode == "ckpt-log"} { set freq [lindex $argv 1] set log [lindex $argv 2] - send -- "checkpoint.bin -i %$freq -l $log -a 14 -t $ckptlogtimes &\r" + send -- "checkpoint.bin -i %$freq -l $log -a 9 -t $ckptlogtimes &\r" expect "Launching /checkpoint.bin" expect "Checkpoint finished" } -# Test 4 +# restore mode: take a checkpoint and call shutdown to restore if {$mode == "restore-log" || $mode == "restore-test"} { set freq [lindex $argv 1] set log [lindex $argv 2] - send -- "checkpoint.bin -i %$freq -l $log -a 14 -t 4 &\r" + send -- "checkpoint.bin -i %$freq -l $log -a 9 -t 4 &\r" expect "Checkpoint finished" send -- "shutdown.bin 0 & \r" diff --git a/artificial_evaluation/applications/pca.exp b/artificial_evaluation/applications/pca.exp index dac8125..9fcfb23 100755 --- a/artificial_evaluation/applications/pca.exp +++ b/artificial_evaluation/applications/pca.exp @@ -2,7 +2,7 @@ source ../config.exp -set timeout 20 +set timeout 120 set mode [lindex $argv 0] if {$test_mode == "QEMU"} { @@ -15,10 +15,18 @@ if {$test_mode == "QEMU"} { expect { "SOL Session operational" { puts "ipmi connected" - break + send -- "shutdown.bin \r" + expect { + "Welcome to ChCore shell!" { break } + "No such binary" { continue } + timeout { + spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol deactivate + continue + } + } } "SOL payload already active on another session" { - spawn spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol activate + spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol deactivate continue } timeout { @@ -27,45 +35,37 @@ if {$test_mode == "QEMU"} { } } } - - set timeout 300 - while {1} { - send -- "shutdown.bin \r" - expect { - "Welcome to ChCore shell!" { break } - "No such binary" { continue } - timeout { - puts "shutdown fail" - continue - } - } - } } else { puts "Currently, we only support IPMI and QEMU mode!" } set timeout 300 -# PCA -# Test 1 -# Test 2 +# raw mode: just running default application +if {$mode == "raw"} { + puts "do nothing" +} + +# ckpt mode: taking checkpoint while running if {$mode == "ckpt"} { set freq [lindex $argv 1] set log [lindex $argv 2] puts "test pca with $freq ms checkpoint" - send -- "checkpoint.bin -i %$freq -l $log -a 14 &\r" + send -- "checkpoint.bin -i %$freq -l $log -a 9 &\r" expect "Launching /checkpoint.bin" sleep 5 } -send -- "pca.bin -r 1000 -c 1000 &\r" +# Launch pca with $pca_num rows and $pca_num colums +send -- "pca.bin -r $pca_num -c $pca_num &\r" +# ckpt-log mode: taking $ckptlogtimes times of checkpoint with log if {$mode == "ckpt-log"} { set freq [lindex $argv 1] set log [lindex $argv 2] - send -- "checkpoint.bin -i %$freq -l $log -a 14 -t $ckptlogtimes &\r" + send -- "checkpoint.bin -i %$freq -l $log -a 9 -t $ckptlogtimes &\r" expect "Launching /checkpoint.bin" } diff --git a/artificial_evaluation/applications/redis.exp b/artificial_evaluation/applications/redis.exp index 7fa1a20..5f7d8c9 100755 --- a/artificial_evaluation/applications/redis.exp +++ b/artificial_evaluation/applications/redis.exp @@ -1,9 +1,8 @@ #!/usr/bin/expect -f - source ../config.exp -set timeout 20 +set timeout 120 set mode [lindex $argv 0] set workload [lindex $argv 1] set pipeline [lindex $argv 2] @@ -18,10 +17,18 @@ if {$test_mode == "QEMU"} { expect { "SOL Session operational" { puts "ipmi connected" - break + send -- "shutdown.bin \r" + expect { + "Welcome to ChCore shell!" { break } + "No such binary" { continue } + timeout { + spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol deactivate + continue + } + } } "SOL payload already active on another session" { - spawn spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol activate + spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol deactivate continue } timeout { @@ -30,19 +37,6 @@ if {$test_mode == "QEMU"} { } } } - - set timeout 60 - while {1} { - send -- "shutdown.bin \r" - expect { - "Welcome to ChCore shell!" { break } - "No such binary" { continue } - timeout { - puts "shutdown fail" - continue - } - } - } } else { puts "Currently, we only support IPMI and QEMU mode!" } @@ -58,17 +52,17 @@ if {$mode == "raw"} { send -- "redis-server --save \"\" -h 127.0.0.1 &\r" expect "poll fd server is not lwip" -# Test 2 +# ckpt mode: taking checkpoint while running if {$mode == "ckpt"} { set freq [lindex $argv 3] set log [lindex $argv 4] - send -- "checkpoint.bin -i %$freq -l $log -a 14 &\n" + send -- "checkpoint.bin -i %$freq -l $log -a 9 &\n" expect "Launching /checkpoint.bin" sleep 5 } +# Launch redis clients set thread 8 - if {$pipeline == "nopipe"} { # no pipeline mode send -- "redis-benchmark -t $workload -n 3000000 -d 1024 --threads $thread &\r" @@ -78,22 +72,22 @@ if {$pipeline == "nopipe"} { } expect "Launching /redis-benchmark" -# Test 3 +# ckpt-log mode: taking $ckptlogtimes times of checkpoint with log if {$mode == "ckpt-log"} { set freq [lindex $argv 3] set log [lindex $argv 4] - send -- "checkpoint.bin -i %$freq -l $log -a 14 -t $ckptlogtimes &\r" + send -- "checkpoint.bin -i %$freq -l $log -a 9 -t $ckptlogtimes &\r" expect "Launching /checkpoint.bin" expect "Checkpoint finished" } -# Test 4 +# restore mode: take a checkpoint and call shutdown to restore if {$mode == "restore-log" || $mode == "restore-test"} { set freq [lindex $argv 3] set log [lindex $argv 4] - send -- "checkpoint.bin -i %$freq -l $log -a 14 -t 4 &\r" + send -- "checkpoint.bin -i %$freq -l $log -a 9 -t 4 &\r" expect "Checkpoint finished" send -- "shutdown.bin 0 & \r" expect "restore from ckpt" diff --git a/artificial_evaluation/applications/rocksdb.exp b/artificial_evaluation/applications/rocksdb.exp index 292b40d..e4a443a 100755 --- a/artificial_evaluation/applications/rocksdb.exp +++ b/artificial_evaluation/applications/rocksdb.exp @@ -2,7 +2,7 @@ source ../config.exp -set timeout 20 +set timeout 120 set mode [lindex $argv 0] if {$test_mode == "QEMU"} { @@ -15,10 +15,18 @@ if {$test_mode == "QEMU"} { expect { "SOL Session operational" { puts "ipmi connected" - break + send -- "shutdown.bin \r" + expect { + "Welcome to ChCore shell!" { break } + "No such binary" { continue } + timeout { + spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol deactivate + continue + } + } } "SOL payload already active on another session" { - spawn spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol activate + spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol deactivate continue } timeout { @@ -27,43 +35,29 @@ if {$test_mode == "QEMU"} { } } } - - set timeout 60 - while {1} { - send -- "shutdown.bin \r" - expect { - "Welcome to ChCore shell!" { break } - "No such binary" { continue } - timeout { - puts "shutdown fail" - continue - } - } - } } else { puts "Currently, we only support IPMI and QEMU mode!" } set timeout 1200 -# Test 1 +# raw mode: just running default application if {$mode == "raw"} { puts "test raw prefix_dist" } -# Test 2 +# ckpt mode: taking checkpoint while running if {$mode == "ckpt"} { set freq [lindex $argv 2] set log [lindex $argv 3] puts "test prefix_dist with $freq ms checkpoint" - send -- "checkpoint.bin -i %$freq -l $log -a 14 &\r" + send -- "checkpoint.bin -i %$freq -l $log -a 9 &\r" expect "Launching /checkpoint.bin" sleep 5 } -set ROCKSDB_NUM 1000000 -set ROCKSDB_DUR 30 +# Launch rocksdb with benchmarks=fillbatch,mixgraph set thread [lindex $argv 1] set timeout 60 @@ -80,12 +74,11 @@ while 1 { --threads=$thread &\r" expect "Launching /rocksdb-dbbench" expect { - "DB path:" { break } + "Microseconds per seek" { break } timeout { continue } } } set timeout 1200 -expect "mixgraph" -expect "Microseconds per read:" +expect "Microseconds per read" expect "100.000%" diff --git a/artificial_evaluation/applications/sqlite.exp b/artificial_evaluation/applications/sqlite.exp index d9ba1c2..b7ab81f 100755 --- a/artificial_evaluation/applications/sqlite.exp +++ b/artificial_evaluation/applications/sqlite.exp @@ -2,7 +2,7 @@ source ../config.exp -set timeout 20 +set timeout 120 set mode [lindex $argv 0] if {$test_mode == "QEMU"} { @@ -15,10 +15,18 @@ if {$test_mode == "QEMU"} { expect { "SOL Session operational" { puts "ipmi connected" - break + send -- "shutdown.bin \r" + expect { + "Welcome to ChCore shell!" { break } + "No such binary" { continue } + timeout { + spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol deactivate + continue + } + } } "SOL payload already active on another session" { - spawn spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol activate + spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol deactivate continue } timeout { @@ -27,59 +35,47 @@ if {$test_mode == "QEMU"} { } } } - - set timeout 60 - while {1} { - send -- "shutdown.bin \r" - expect { - "Welcome to ChCore shell!" { break } - "No such binary" { continue } - timeout { - puts "shutdown fail" - continue - } - } - } } else { puts "Currently, we only support IPMI and QEMU mode!" } set timeout 300 -# Test 1 +# raw mode: just running default application if {$mode == "raw"} { puts "test raw sqlite3" } -# Test 2 +# ckpt mode: taking checkpoint while running if {$mode == "ckpt"} { set freq [lindex $argv 1] set log [lindex $argv 2] puts "test sqlite3 with 1ms checkpoint" - send -- "checkpoint.bin -i %$freq -l $log -a 14 &\r" + send -- "checkpoint.bin -i %$freq -l $log -a 9 &\r" expect "Launching /checkpoint.bin" sleep 5 } +# Launch sqlite send -- "test-sqlite3.bin tmpfs &\r" -# Test 3 +# ckpt-log mode: taking $ckptlogtimes times of checkpoint with log if {$mode == "ckpt-log"} { set freq [lindex $argv 1] set log [lindex $argv 2] - send -- "checkpoint.bin -i %$freq -l $log -a 14 -t $ckptlogtimes &\r" + send -- "checkpoint.bin -i %$freq -l $log -a 9 -t $ckptlogtimes &\r" expect "Launching /checkpoint.bin" expect "Checkpoint finished" } -# Test 4 +# restore mode: take a checkpoint and call shutdown to restore if {$mode == "restore-log" || $mode == "restore-test"} { set freq [lindex $argv 1] set log [lindex $argv 2] - send -- "checkpoint.bin -i %$freq -l $log -a 14 -t 4 &\r" + send -- "checkpoint.bin -i %$freq -l $log -a 9 -t 4 &\r" expect "Checkpoint finished" send -- "shutdown.bin 0 & \r" expect "restore from ckpt" diff --git a/artificial_evaluation/applications/tools.exp b/artificial_evaluation/applications/tools.exp deleted file mode 100755 index 36a117a..0000000 --- a/artificial_evaluation/applications/tools.exp +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/expect -f - -proc start_qemu {} { - source ../config.exp - spawn -noecho rm [exec sh -c {echo "/tmp/nvm-file-$USER"}] - spawn $basedir/build/simulate.sh - expect "Welcome to ChCore shell!" -} - -proc start_ipmi {} { - source ../config.exp - while {1} { - spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol activate - expect { - "SOL Session operational" { - puts "ipmi connected" - break - } - "SOL payload already active on another session" { - spawn spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol activate - continue - } - timeout { - puts "ipmitool failed" - exit - } - } - } - - set timeout 60 - while {1} { - send -- "shutdown.bin \r" - expect { - "Welcome to ChCore shell!" { break } - "No such binary" { continue } - timeout { - puts "shutdown fail" - continue - } - } - } -} diff --git a/artificial_evaluation/applications/word_count.exp b/artificial_evaluation/applications/word_count.exp index 8aab97a..ffd333d 100755 --- a/artificial_evaluation/applications/word_count.exp +++ b/artificial_evaluation/applications/word_count.exp @@ -2,7 +2,7 @@ source ../config.exp -set timeout 20 +set timeout 120 set mode [lindex $argv 0] if {$test_mode == "QEMU"} { @@ -15,10 +15,18 @@ if {$test_mode == "QEMU"} { expect { "SOL Session operational" { puts "ipmi connected" - break + send -- "shutdown.bin \r" + expect { + "Welcome to ChCore shell!" { break } + "No such binary" { continue } + timeout { + spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol deactivate + continue + } + } } "SOL payload already active on another session" { - spawn spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol activate + spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol deactivate continue } timeout { @@ -27,59 +35,47 @@ if {$test_mode == "QEMU"} { } } } - - set timeout 60 - while {1} { - send -- "shutdown.bin \r" - expect { - "Welcome to ChCore shell!" { break } - "No such binary" { continue } - timeout { - puts "shutdown fail" - continue - } - } - } } else { puts "Currently, we only support IPMI and QEMU mode!" } set timeout 1200 -# Test 1 +# raw mode: just running default application if {$mode == "raw"} { puts "test raw word count" } -# Test 2 +# ckpt mode: taking checkpoint while running if {$mode == "ckpt"} { set freq [lindex $argv 1] set log [lindex $argv 2] puts "test word count with 1ms checkpoint" - send -- "checkpoint.bin -i %$freq -l $log -a 14 -t 2000 &\r" + send -- "checkpoint.bin -i %$freq -l $log -a 9 -t 2000 &\r" expect "Launching /checkpoint.bin" sleep 5 } +# Launch word_count send -- "word_count.bin word_100MB.txt &\r" -# Test 3 +# ckpt-log mode: taking $ckptlogtimes times of checkpoint with log if {$mode == "ckpt-log"} { set freq [lindex $argv 1] set log [lindex $argv 2] - send -- "checkpoint.bin -i %$freq -l $log -a 14 -t $ckptlogtimes &\r" + send -- "checkpoint.bin -i %$freq -l $log -a 9 -t $ckptlogtimes &\r" expect "Launching /checkpoint.bin" expect "Checkpoint finished" } -# Test 4 +# restore mode: take a checkpoint and call shutdown to restore if {$mode == "restore-log" || $mode == "restore-test"} { set freq [lindex $argv 1] set log [lindex $argv 2] - send -- "checkpoint.bin -i %$freq -l $log -a 14 -t 4 &\r" + send -- "checkpoint.bin -i %$freq -l $log -a 9 -t 4 &\r" expect "Checkpoint finished" send -- "shutdown.bin 0 & \r" expect "restore from ckpt" diff --git a/artificial_evaluation/applications/ycsb.exp b/artificial_evaluation/applications/ycsb.exp index 25c143f..db3eacf 100755 --- a/artificial_evaluation/applications/ycsb.exp +++ b/artificial_evaluation/applications/ycsb.exp @@ -2,7 +2,7 @@ source ../config.exp -set timeout 20 +set timeout 120 set mode [lindex $argv 0] if {$test_mode == "QEMU"} { @@ -15,10 +15,18 @@ if {$test_mode == "QEMU"} { expect { "SOL Session operational" { puts "ipmi connected" - break + send -- "shutdown.bin \r" + expect { + "Welcome to ChCore shell!" { break } + "No such binary" { continue } + timeout { + spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol deactivate + continue + } + } } "SOL payload already active on another session" { - spawn spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol activate + spawn ipmitool -H $ipmi_ip -U $username -P $passwd -I lanplus sol deactivate continue } timeout { @@ -27,19 +35,6 @@ if {$test_mode == "QEMU"} { } } } - - set timeout 60 - while {1} { - send -- "shutdown.bin \r" - expect { - "Welcome to ChCore shell!" { break } - "No such binary" { continue } - timeout { - puts "shutdown fail" - continue - } - } - } } else { puts "Currently, we only support IPMI and QEMU mode!" } @@ -56,9 +51,9 @@ expect "poll fd server is not lwip" send -- "set_poll_loop_time.bin -n $threads &\r" expect "Launching /set_poll_loop_time.bin" -# Lauch checkpoint thread if needed +# ckpt mode: taking checkpoint while running if {$mode == "ckpt"} { - send -- "checkpoint.bin -i %1 -l 0 -a 7 &\r" + send -- "checkpoint.bin -i %1 -l 0 -a 9 &\r" expect "Launching /checkpoint.bin" } @@ -66,7 +61,6 @@ sleep 5 # Start the YCSB benchmark set timeout 1200 - send -- "ycsbc -db redis -threads $threads -P workload$workload.spec -host 127.0.0.1 -port 6379 -slaves 0 &\r" expect "Launching" diff --git a/artificial_evaluation/config.exp b/artificial_evaluation/config.exp index 52afaa7..fc99e61 100755 --- a/artificial_evaluation/config.exp +++ b/artificial_evaluation/config.exp @@ -15,7 +15,14 @@ set white_color "\033\[37m" set red_color "\033\[31m" # loop time for ckpt log -set ckptlogtimes 1000 +set ckptlogtimes 500 +set leveldb_num 10000 +set redis_num 10000 +set memcached_num 10000 +set kmeans_num 5000 +set pca_num 1000 +set ROCKSDB_NUM 1000 +set ROCKSDB_DUR 10 # ipmi ip, username and passwd set ipmi_ip "192.168.12.60" diff --git a/artificial_evaluation/linux-redis-ycsb/config.sh b/artificial_evaluation/linux-redis-ycsb/config.sh deleted file mode 100755 index 96f0cbd..0000000 --- a/artificial_evaluation/linux-redis-ycsb/config.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor diff --git a/artificial_evaluation/linux-redis-ycsb/dax_config.sh b/artificial_evaluation/linux-redis-ycsb/dax_config.sh deleted file mode 100755 index 54227fd..0000000 --- a/artificial_evaluation/linux-redis-ycsb/dax_config.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -pmem_dir=/mnt/treesls -pmem_dev=/dev/pmem0 -echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor -sudo rm -rf $pmem_dir/* -sudo umount $pmem_dir -sudo mkfs.ext4 -F -b 4096 $pmem_dev -sudo mount -o dax $pmme_dev $pmem_dir diff --git a/artificial_evaluation/linux-redis-ycsb/disk_config.sh b/artificial_evaluation/linux-redis-ycsb/disk_config.sh deleted file mode 100755 index f1e00cf..0000000 --- a/artificial_evaluation/linux-redis-ycsb/disk_config.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -disk_dir=/mnt/treesls -disk_dev=/dev/nvme0n1p1 -echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor -sudo umount $disk_dir -sudo mount $disk_dev $disk_dir diff --git a/artificial_evaluation/linux-redis-ycsb/test_ycsb.sh b/artificial_evaluation/linux-redis-ycsb/test_ycsb.sh deleted file mode 100755 index 0aeaff8..0000000 --- a/artificial_evaluation/linux-redis-ycsb/test_ycsb.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -loop=(0) -threads=(1) - -restart() -{ - mode=$1 - kill -9 $(pidof redis-server) - sleep 5 - if [ $mode = "nvm-log" ]; then - ./dax_config.sh - elif [ $mode = "disk-log" ]; then - ./disk_config.sh - else - ./config.sh - fi - sleep 5 -} - -for mode in "baseline" "nvm-log" "disk-log" -#for mode in "nvm-log" "disk-log" -do -for workload in a b c g -do - for thread in ${threads[@]} - do - for run in ${loop[@]} - do - restart $mode - ./run_redis_server.sh $mode > /dev/null - sleep 5 - ./run_ycsb.sh $workload $thread $run $mode - sleep 5 - done - done -done -done