diff --git a/cicada/Makefile b/cicada/Makefile index ee3ecf52..af1197ea 100644 --- a/cicada/Makefile +++ b/cicada/Makefile @@ -5,17 +5,18 @@ REL := ../common/ include $(REL)Makefile CICADA_ALLSRC = $(CICADA_SRCS1) $(wildcard include/*.hh) -KEY_SIZE=8 -VAL_SIZE=4 ADD_ANALYSIS=1 BACK_OFF=0 -INLINE_VERSION_PROMOTION=1 INLINE_VERSION_OPT=1 +INLINE_VERSION_PROMOTION=1 MASSTREE_USE=1 -PARTITION_TABLE=1 +PARTITION_TABLE=0 REUSE_VERSION=1 SINGLE_EXEC=0 +KEY_SIZE=8 +VAL_SIZE=4 WRITE_LATEST_ONLY=0 +WORKER1_INSERT_DELAY_RPHASE=1 CC = g++ CFLAGS = -c -pipe -g -O3 -std=c++17 -march=native \ @@ -33,6 +34,7 @@ CFLAGS = -c -pipe -g -O3 -std=c++17 -march=native \ -DREUSE_VERSION=$(REUSE_VERSION) \ -DSINGLE_EXEC=$(SINGLE_EXEC) \ -DWRITE_LATEST_ONLY=$(WRITE_LATEST_ONLY) \ + -DWORKER1_INSERT_DELAY_RPHASE=$(WORKER1_INSERT_DELAY_RPHASE) \ # WRITE_LATEST_ONLY : for all write. # original model adapt write-latest-only-rule for RMW diff --git a/cicada/cicada.cc b/cicada/cicada.cc index ca2e4748..8af5837a 100644 --- a/cicada/cicada.cc +++ b/cicada/cicada.cc @@ -19,6 +19,7 @@ #include "../include/compiler.hh" #include "../include/cpu.hh" #include "../include/debug.hh" +#include "../include/delay.hh" #include "../include/int64byte.hh" #include "../include/procedure.hh" #include "../include/random.hh" @@ -98,10 +99,20 @@ void worker(size_t thid, char& ready, const bool& start, const bool& quit, if (trans.status_ == TransactionStatus::abort) { trans.earlyAbort(); +#if SINGLE_EXEC +#else + trans.mainte(); +#endif goto RETRY; } } +#if WORKER1_INSERT_DELAY_RPHASE + if (unlikely(thid == 1) && WORKER1_INSERT_DELAY_RPHASE_US != 0) { + clock_delay(WORKER1_INSERT_DELAY_RPHASE_US * CLOCKS_PER_US); + } +#endif + // read only tx doesn't collect read set and doesn't validate. // write phase execute logging and commit pending versions, but r-only tx // can skip it. @@ -111,6 +122,10 @@ void worker(size_t thid, char& ready, const bool& start, const bool& quit, // Validation phase if (!trans.validation()) { trans.abort(); +#if SINGLE_EXEC +#else + trans.mainte(); +#endif goto RETRY; } @@ -156,6 +171,7 @@ int main(int argc, char* argv[]) try { for (unsigned int i = 0; i < THREAD_NUM; ++i) { res[0].addLocalAllResult(res[i]); } + ShowOptParameters(); res[0].displayAllResult(CLOCKS_PER_US, EXTIME, THREAD_NUM); deleteDB(); diff --git a/cicada/include/common.hh b/cicada/include/common.hh index 286b4d6c..4b88c2f1 100644 --- a/cicada/include/common.hh +++ b/cicada/include/common.hh @@ -47,6 +47,10 @@ GLOBAL size_t IO_TIME_NS; // nano second GLOBAL size_t GROUP_COMMIT_TIMEOUT_US; // micro seconds GLOBAL size_t GC_INTER_US; // garbage collection interval GLOBAL size_t PRE_RESERVE_VERSION; +/** + * worker 1 insert delay in the end of read phase[us]. + */ +GLOBAL size_t WORKER1_INSERT_DELAY_RPHASE_US; GLOBAL size_t EXTIME; alignas(CACHE_LINE_SIZE) GLOBAL uint64_t_64byte *ThreadWtsArray; diff --git a/cicada/include/transaction.hh b/cicada/include/transaction.hh index 280d8e2b..49a73bf3 100644 --- a/cicada/include/transaction.hh +++ b/cicada/include/transaction.hh @@ -172,6 +172,9 @@ class TxExecutor { #if INLINE_VERSION_OPT if (tuple->getInlineVersionRight()) { tuple->inline_ver_.set(0, this->wts_.ts_); +#if ADD_ANALYSIS + ++cres_->local_version_reuse_; +#endif return &(tuple->inline_ver_); } #endif // if INLINE_VERSION_OPT diff --git a/cicada/include/util.hh b/cicada/include/util.hh index a30a062a..b18841ca 100644 --- a/cicada/include/util.hh +++ b/cicada/include/util.hh @@ -6,6 +6,8 @@ extern void chkArg(const int argc, char *argv[]); +extern void deleteDB(); + extern void displayDB(); extern void displayMinRts(); @@ -18,12 +20,12 @@ extern void displayThreadRtsArray(); extern void displaySLogSet(); -extern void partTableInit([[maybe_unused]] size_t thid, uint64_t initts, uint64_t start, uint64_t end); +extern void leaderWork([[maybe_unused]] Backoff &backoff, [[maybe_unused]] std::vector &res); -extern void partTableDelete([[maybe_unused]] size_t thid, uint64_t start, uint64_t end); +extern void makeDB(uint64_t *initial_wts); -extern void deleteDB(); +extern void partTableDelete([[maybe_unused]] size_t thid, uint64_t start, uint64_t end); -extern void makeDB(uint64_t *initial_wts); +extern void partTableInit([[maybe_unused]] size_t thid, uint64_t initts, uint64_t start, uint64_t end); -extern void leaderWork([[maybe_unused]] Backoff &backoff, [[maybe_unused]] std::vector &res); +extern void ShowOptParameters(); diff --git a/cicada/script/ycsb-xgci.sh b/cicada/script/ycsb-xgci.sh index 63348922..9dbbf76d 100755 --- a/cicada/script/ycsb-xgci.sh +++ b/cicada/script/ycsb-xgci.sh @@ -1,7 +1,7 @@ #ycsb-xrs.sh(cicada) -tuple=100000000 +tuple=1000000 maxope=10 -rratioary=(50 95 100) +rratioary=(50) rmw=off skew=0 ycsb=on @@ -10,10 +10,11 @@ group_commit=off cpu_mhz=2100 io_time_ns=5 group_commit_timeout_us=2 -gci=10 +gci=1 prv=0 -extime=3 -epoch=3 +w1idr=10000 # worker 1 insert delay in the end of read phase[us] +extime=5 +epoch=5 host=`hostname` chris41="chris41.omni.hpcc.jp" @@ -26,13 +27,13 @@ if test $host = $dbs11 ; then fi cd ../ -make clean; make -j KEY_SIZE=8 VAL_SIZE=4 +make clean; make -j cd script/ for rratio in "${rratioary[@]}" do if test $rratio = 50 ; then - result=result_cicada-part_ycsbA_tuple100m_gci10us_224th.dat + result=result_cicada_ycsbA_tuple1m_w1idr10ms_gci1us-1s.dat elif test $rratio = 95 ; then result=result_cicada-part_ycsbB_tuple100m_gci10us_224th.dat elif test $rratio = 100 ; then @@ -44,11 +45,14 @@ do rm $result echo "#tuple num, avg-tps, min-tps, max-tps, avg-ar, min-ar, max-ar, avg-camiss, min-camiss, max-camiss, avg-make_procedure_latency_rate, avg-read_latency_rate, avg-write_latency_rate, avg-vali_latency_rate, avg-gc_latency_rate avg-other_work_latency_rate avg-maxrss version_malloc version_reuse" >> $result - echo "#sudo perf stat -e cache-misses,cache-references -o ana.txt numactl --interleave=all ../cicada.exe $tuple $maxope $thread $rratio $rmw $skew $ycsb $wal $group_commit $cpu_mhz $io_time_ns $group_commit_timeout_us $gci $prv $extime" >> $result + echo "#sudo perf stat -e cache-misses,cache-references -o ana.txt numactl --interleave=all ../cicada.exe $tuple $maxope $thread $rratio $rmw $skew $ycsb $wal $group_commit $cpu_mhz $io_time_ns $group_commit_timeout_us $gci $prv $w1idr $extime" >> $result + ../cicada.exe > exp.txt + tmpStr=`grep ShowOptParameters ./exp.txt` + echo "#$tmpStr" >> $result - for ((gci=10; gci<=10; gci*=10)) + for ((gci=1; gci<=1000000; gci*=10)) do - echo "sudo perf stat -e cache-misses,cache-references -o ana.txt numactl --interleave=all ../cicada.exe $tuple $maxope $thread $rratio $rmw $skew $ycsb $wal $group_commit $cpu_mhz $io_time_ns $group_commit_timeout_us $gci $prv $extime" + echo "sudo perf stat -e cache-misses,cache-references -o ana.txt numactl --interleave=all ../cicada.exe $tuple $maxope $thread $rratio $rmw $skew $ycsb $wal $group_commit $cpu_mhz $io_time_ns $group_commit_timeout_us $gci $prv $w1idr $extime" echo "Thread number $thread" sumTH=0 @@ -72,10 +76,10 @@ do for ((i = 1; i <= epoch; ++i)) do if test $host = $dbs11 ; then - sudo perf stat -e cache-misses,cache-references -o ana.txt numactl --interleave=all ../cicada.exe $tuple $maxope $thread $rratio $rmw $skew $ycsb $wal $group_commit $cpu_mhz $io_time_ns $group_commit_timeout_us $gci $prv $extime > exp.txt + sudo perf stat -e cache-misses,cache-references -o ana.txt numactl --interleave=all ../cicada.exe $tuple $maxope $thread $rratio $rmw $skew $ycsb $wal $group_commit $cpu_mhz $io_time_ns $group_commit_timeout_us $gci $prv $w1idr $extime > exp.txt fi if test $host = $chris41 ; then - perf stat -e cache-misses,cache-references -o ana.txt numactl --interleave=all ../cicada.exe $tuple $maxope $thread $rratio $rmw $skew $ycsb $wal $group_commit $cpu_mhz $io_time_ns $group_commit_timeout_us $gci $prv $extime > exp.txt + perf stat -e cache-misses,cache-references -o ana.txt numactl --interleave=all ../cicada.exe $tuple $maxope $thread $rratio $rmw $skew $ycsb $wal $group_commit $cpu_mhz $io_time_ns $group_commit_timeout_us $gci $prv $w1idr $extime > exp.txt fi tmpTH=`grep throughput ./exp.txt | awk '{print $2}'` diff --git a/cicada/transaction.cc b/cicada/transaction.cc index f8f54daa..691335a1 100644 --- a/cicada/transaction.cc +++ b/cicada/transaction.cc @@ -597,8 +597,9 @@ void TxExecutor::mainte() { } this->gcstop_ = rdtscp(); - if (chkClkSpan(this->gcstart_, this->gcstop_, GC_INTER_US * CLOCKS_PER_US)) { - __atomic_store_n(&(GCFlag[thid_].obj_), 1, __ATOMIC_RELEASE); + if (chkClkSpan(this->gcstart_, this->gcstop_, GC_INTER_US * CLOCKS_PER_US) + && (loadAcquire(GCFlag[thid_].obj_) == 0)) { + storeRelease(GCFlag[thid_].obj_, 1); this->gcstart_ = this->gcstop_; } //----- diff --git a/cicada/util.cc b/cicada/util.cc index 673ece22..ae0d37ef 100644 --- a/cicada/util.cc +++ b/cicada/util.cc @@ -25,11 +25,12 @@ #include "include/time_stamp.hh" #include "include/transaction.hh" #include "include/tuple.hh" +#include "include/util.hh" using std::cout, std::endl; void chkArg(const int argc, char *argv[]) { - if (argc != 16) { + if (argc != 17) { cout << "usage: ./cicada.exe TUPLE_NUM MAX_OPE THREAD_NUM RRATIO RMW " "ZIPF_SKEW YCSB WAL GROUP_COMMIT CPU_MHZ IO_TIME_NS " "GROUP_COMMIT_TIMEOUT_US GC_INTER_US PRE_RESERVE_VERSION EXTIME" @@ -62,24 +63,9 @@ void chkArg(const int argc, char *argv[]) { cout << "GC_INTER_US: garbage collection interval [usec]" << endl; cout << "PRE_RESERVE_VERSION: pre-prepare memory for version generation." << endl; + cout << "WORKER1_INSERT_DELAY_RPHASE_US : worker 1 insert delay in the end of read phase[us]." << endl; cout << "EXTIME: execution time [sec]" << endl << endl; - - cout << "Tuple " << sizeof(Tuple) << endl; - cout << "Version " << sizeof(Version) << endl; - cout << "TimeStamp " << sizeof(TimeStamp) << endl; - cout << "Procedure " << sizeof(Procedure) << endl; - cout << "KEY_SIZE : " << KEY_SIZE << endl; - cout << "VAL_SIZE : " << VAL_SIZE << endl; - cout << "CACHE_LINE_SIZE - ((17 + KEY_SIZE + sizeof(Version)) % " - "(CACHE_LINE_SIZE)) : " - << CACHE_LINE_SIZE - - ((17 + KEY_SIZE + sizeof(Version)) % (CACHE_LINE_SIZE)) - << endl; - cout << "CACHE_LINE_SIZE - ((25 + VAL_SIZE) % (CACHE_LINE_SIZE)) : " - << CACHE_LINE_SIZE - ((25 + VAL_SIZE) % (CACHE_LINE_SIZE)) << endl; - cout << "MASSTREE_USE : " << MASSTREE_USE << endl; - cout << "Result:\t" << sizeof(Result) << endl; - cout << "uint64_t_64byte: " << sizeof(uint64_t_64byte) << endl; + ShowOptParameters(); exit(0); } @@ -108,7 +94,8 @@ void chkArg(const int argc, char *argv[]) { GROUP_COMMIT_TIMEOUT_US = atoi(argv[12]); GC_INTER_US = atoi(argv[13]); PRE_RESERVE_VERSION = atoi(argv[14]); - EXTIME = atoi(argv[15]); + WORKER1_INSERT_DELAY_RPHASE_US = atoi(argv[15]); + EXTIME = atoi(argv[16]); if (RRATIO > 100) { cout << "rratio [%%] must be 0 ~ 100)" << endl; @@ -436,3 +423,22 @@ void leaderWork([[maybe_unused]] Backoff &backoff, leaderBackoffWork(backoff, res); #endif } + +void +ShowOptParameters() +{ + cout << "ShowOptParameters()" + << ": ADD_ANALYSIS " << ADD_ANALYSIS + << ": BACK_OFF " << BACK_OFF + << ": INLINE_VERSION_OPT " << INLINE_VERSION_OPT + << ": INLINE_VERSION_PROMOTION " << INLINE_VERSION_PROMOTION + << ": MASSTREE_USE " << MASSTREE_USE + << ": PARTITION_TABLE " << PARTITION_TABLE + << ": REUSE_VERSION " << REUSE_VERSION + << ": SINGLE_EXEC " << SINGLE_EXEC + << ": KEY_SIZE " << KEY_SIZE + << ": VAL_SIZE " << VAL_SIZE + << ": WRITE_LATEST_ONLY " << WRITE_LATEST_ONLY + << ": WORKER1_INSERT_DELAY_RPHASE " << WORKER1_INSERT_DELAY_RPHASE + << endl; +} diff --git a/common/result.cc b/common/result.cc index fcac9312..b4922332 100644 --- a/common/result.cc +++ b/common/result.cc @@ -285,7 +285,6 @@ void Result::displayValidationFailureByWritelockRate() { } void Result::displayVersionMalloc() { - if (total_version_malloc_) cout << "version_malloc:\t" << total_version_malloc_ << endl; } diff --git a/include/delay.hh b/include/delay.hh new file mode 100644 index 00000000..7e5c1481 --- /dev/null +++ b/include/delay.hh @@ -0,0 +1,24 @@ +#pragma once + +#include + +#include + +#include "tsc.hh" + +using namespace std; + +[[maybe_unused]] static void +clock_delay(size_t clocks) +{ + std::size_t start(rdtscp()), stop; + + for (;;) { + stop = rdtscp(); + if (stop - start > clocks) { + break; + } else { + _mm_pause(); + } + } +} diff --git a/include/tsc.hh b/include/tsc.hh index a940149c..ef668d05 100644 --- a/include/tsc.hh +++ b/include/tsc.hh @@ -2,7 +2,9 @@ #include -[[maybe_unused]] static uint64_t rdtsc() { +[[maybe_unused]] static uint64_t +rdtsc() +{ uint64_t rax; uint64_t rdx; @@ -14,7 +16,9 @@ return (rdx << 32) | rax; } -[[maybe_unused]] static uint64_t rdtsc_serial() { +[[maybe_unused]] static uint64_t +rdtsc_serial() +{ uint64_t rax; uint64_t rdx; @@ -24,7 +28,9 @@ return (rdx << 32) | rax; } -[[maybe_unused]] static uint64_t rdtscp() { +[[maybe_unused]] static uint64_t +rdtscp() +{ uint64_t rax; uint64_t rdx; uint32_t aux; diff --git a/silo/Makefile b/silo/Makefile index da5208ae..022ddb95 100644 --- a/silo/Makefile +++ b/silo/Makefile @@ -16,9 +16,8 @@ MASSTREE_USE=1 NO_WAIT_LOCKING_IN_VALIDATION=1 PARTITION_TABLE=0 PROCEDURE_SORT=0 -WAL=1 - -SLEEP_READ_PHASE=0 # # of tics +WAL=0 +SLEEP_READ_PHASE=0 # of tics # end of initialization CC = g++ @@ -40,7 +39,6 @@ CFLAGS = -c -pipe -g -O3 -std=c++17 -march=native \ LDFLAGS = -L../third_party/mimalloc/out/release -L../third_party/mimalloc/out/debug -L/user/lib INCLUDE = -I/usr/include -#LDLIBS = -lpthread -lmimalloc LDLIBS = -lpthread -lboost_filesystem -lboost_system OBJS1 = $(SILO_SRCS1:.cc=.o) diff --git a/silo/include/util.hh b/silo/include/util.hh index cff56e9e..4ea22a59 100644 --- a/silo/include/util.hh +++ b/silo/include/util.hh @@ -15,3 +15,5 @@ extern void leaderWork(uint64_t &epoch_timer_start, uint64_t &epoch_timer_stop); extern void makeDB(); extern void partTableInit([[maybe_unused]] size_t thid, uint64_t start, uint64_t end); + +extern void ShowOptParameters(); diff --git a/silo/replayTest.cc b/silo/replayTest.cc index 58886e7f..dcd5b4c4 100644 --- a/silo/replayTest.cc +++ b/silo/replayTest.cc @@ -29,9 +29,9 @@ int main() { for (unsigned int i = 0; i < loadhd.logRecNum_; ++i) { loadfile.read((void *)&logrec, sizeof(LogRecord)); chkSum_ += logrec.computeChkSum(); - // cout << "tid : " << logrec.tid << endl; - // cout << "key : " << logrec.key << endl; - // cout << "val : " << logrec.val << endl << endl; + cout << "tid : " << logrec.tid_ << endl; + cout << "key : " << logrec.key_ << endl; + cout << "val : " << logrec.val_ << endl << endl; } cout << "computed chkSum_ : " << chkSum_ << endl; diff --git a/silo/script/ycsb-xskew.sh b/silo/script/ycsb-xskew.sh index bb9c1451..65735918 100755 --- a/silo/script/ycsb-xskew.sh +++ b/silo/script/ycsb-xskew.sh @@ -1,8 +1,8 @@ #ycsb-xrs.sh(silo) -tuple=10000000 -maxope=16 -rratioary=(50 95) -rmw=on +tuple=1000000 +maxope=10 +rratioary=(95) +rmw=off skew=0 ycsb=on cpumhz=2100 @@ -20,9 +20,8 @@ if test $host = $dbs11 ; then thread=224 fi -thread=28 cd ../ -make clean; make -j KEY_SIZE=8 VAL_SIZE=100 +make clean; make -j cd script/ for rratio in "${rratioary[@]}" @@ -30,7 +29,7 @@ do if test $rratio = 50; then result=result_silo_ycsbA_tuple10m_ope16_rmw_skew0-099_th28.dat elif test $rratio = 95; then - result=result_silo_ycsbB_tuple10m_ope16_rmw_skew0-099_th28.dat + result=result_silo+nowait_ycsbB_tuple1m_skew07-099.dat elif test $rratio = 100; then result=result_silo_ycsbC_tuple1k_skew0-099.dat else @@ -39,17 +38,18 @@ do fi rm $result - echo "#tuple num, avg-tps, min-tps, max-tps, avg-ar, min-ar, max-ar, avg-camiss, min-camiss, max-camiss" >> $result + echo "#tuple num, avg-tps, min-tps, max-tps, avg-ar, min-ar, max-ar, avg-camiss, min-camiss, max-camiss, avg-er, avg-rlr, avg-vlr" >> $result echo "#sudo perf stat -e cache-misses,cache-references -o ana.txt numactl --interleave=all ../silo.exe tuple $maxope $thread $rratio $rmw $skew $ycsb $cpumhz $epochtime $extime" >> $result + ../silo.exe > exp.txt + tmpStr=`grep ShowOptParameters ./exp.txt` + echo "#$tmpStr" >> $result - for ((tmpskew = 0; tmpskew <= 105; tmpskew += 10)) + for ((tmpskew = 70; tmpskew <= 100; tmpskew += 5)) do - if test $tmpskew = 100 ; then - tmpskew=95 - fi - if test $tmpskew = 105 ; then + if test $tmpskew -eq 100 ; then tmpskew=99 fi + skew=`echo "scale=3; $tmpskew / 100.0" | bc -l | xargs printf %.2f` echo "sudo perf stat -e cache-misses,cache-references -o ana.txt numactl --interleave=all ../silo.exe $tuple $maxope $thread $rratio $rmw $skew $ycsb $cpumhz $epochtime $extime" @@ -63,6 +63,9 @@ do minTH=0 minAR=0 minCA=0 + sumRLR=0 + sumVLR=0 + sumER=0 for ((i = 1; i <= epoch; ++i)) do if test $host = $dbs11 ; then @@ -75,9 +78,15 @@ do tmpTH=`grep throughput ./exp.txt | awk '{print $2}'` tmpAR=`grep abort_rate ./exp.txt | awk '{print $2}'` tmpCA=`grep cache-misses ./ana.txt | awk '{print $4}'` + tmpER=`grep extra_reads ./exp.txt | awk '{print $2}'` + tmpRLR=`grep read_latency_rate ./exp.txt | awk '{print $2}'` + tmpVLR=`grep vali_latency_rate ./exp.txt | awk '{print $2}'` sumTH=`echo "$sumTH + $tmpTH" | bc` sumAR=`echo "scale=4; $sumAR + $tmpAR" | bc | xargs printf %.4f` sumCA=`echo "$sumCA + $tmpCA" | bc` + sumER=`echo "$sumER + $tmpER" | bc` + sumRLR=`echo "scale=4; $sumRLR + $tmpRLR" | bc | xargs printf %.4f` + sumVLR=`echo "scale=4; $sumVLR + $tmpVLR" | bc | xargs printf %.4f` echo "tmpTH: $tmpTH, tmpAR: $tmpAR, tmpCA: $tmpCA" if test $i -eq 1 ; then @@ -119,11 +128,14 @@ do avgTH=`echo "$sumTH / $epoch" | bc` avgAR=`echo "scale=4; $sumAR / $epoch" | bc | xargs printf %.4f` avgCA=`echo "$sumCA / $epoch" | bc` + avgER=`echo "$sumER / $epoch" | bc` + avgRLR=`echo "scale=4; $sumRLR / $epoch" | bc | xargs printf %.4f` + avgVLR=`echo "scale=4; $sumVLR / $epoch" | bc | xargs printf %.4f` echo "sumTH: $sumTH, sumAR: $sumAR, sumCA: $sumCA" - echo "avgTH: $avgTH, avgAR: $avgAR, avgCA: $avgCA" + echo "avgTH: $avgTH, avgAR: $avgAR, avgCA: $avgCA, avgER: $avgER, avgRLR: $avgRLR, avgVLR: $avgVLR" echo "maxTH: $maxTH, maxAR: $maxAR, maxCA: $maxCA" echo "minTH: $minTH, minAR: $minAR, minCA: $minCA" echo "" - echo "$skew $avgTH $minTH $maxTH $avgAR $minAR $maxAR, $avgCA $minCA $maxCA" >> $result + echo "$skew $avgTH $minTH $maxTH $avgAR $minAR $maxAR $avgCA $minCA $maxCA $avgER $avgRLR $avgVLR" >> $result done done diff --git a/silo/script/ycsb-xslprp.sh b/silo/script/ycsb-xslprp.sh index 3ed28dc7..852976f5 100755 --- a/silo/script/ycsb-xslprp.sh +++ b/silo/script/ycsb-xslprp.sh @@ -1,9 +1,9 @@ #ycsb-xslprp.sh(silo) -tuple=100000000 +tuple=1000000 maxope=10 -rratioary=(50) +rratioary=(95) rmw=off -skew=0.9 +skew=0.99 ycsb=on epochtime=40 extime=3 @@ -32,7 +32,7 @@ do if test $rratio = 50; then result=result_silo+no-wait_ycsbA_tuple100m_skew09_slprp0-1000.dat elif test $rratio = 95; then - result=result_silo_ycsbB_tuple100m_skew09_val4-1k.dat + result=result_silo+nowait_ycsbB_tuple1m_skew099_slprp0-25000.dat elif test $rratio = 100; then result=result_silo_ycsbC_tuple100m_skew09_val4-1k.dat else @@ -41,8 +41,11 @@ do fi rm $result - echo "#tuple num, avg-tps, min-tps, max-tps, avg-ar, min-ar, max-ar, avg-camiss, min-camiss, max-camiss" >> $result + echo "#slpclks, avg-tps, min-tps, max-tps, avg-ar, min-ar, max-ar, avg-camiss, min-camiss, max-camiss, avg-er, avg-rlr, avg-vlr" >> $result echo "#sudo perf stat -e cache-misses,cache-references -o ana.txt numactl --interleave=all ../silo.exe tuple $maxope $thread $rratio $rmw $skew $ycsb $cpumhz $epochtime $extime" >> $result + ../silo.exe > exp.txt + tmpStr=`grep ShowOptParameters ./exp.txt` + echo "#$tmpStr" >> $result for ((slpclks = 0; slpclks <= 25000; slpclks += 500)) do diff --git a/silo/script/ycsb-xth.sh b/silo/script/ycsb-xth.sh index 3a159012..fada3287 100755 --- a/silo/script/ycsb-xth.sh +++ b/silo/script/ycsb-xth.sh @@ -1,9 +1,9 @@ #ycsb-xth.sh(silo) -tuple=10000000 -maxope=1 +tuple=1000000 +maxope=10 #rratioary=(50 95 100) rratioary=(95) -rmw=on +rmw=off skew=0.99 ycsb=on cpumhz=2100 @@ -22,7 +22,7 @@ thread=224 fi cd ../ -make clean; make -j KEY_SIZE=8 VAL_SIZE=100 +make clean; make -j cd script/ for rratio in "${rratioary[@]}" @@ -32,7 +32,7 @@ do elif test $rratio = 90 ; then result=result_silo_ycsbA_tuple1k-100m_val1k_skew09.dat elif test $rratio = 95 ; then - result=result_silo_ycsbB_tuple10m_ope1_rmw_skew099.dat + result=result_silo+nowait_ycsbB_tuple1m_skew099_th2-224.dat elif test $rratio = 100 ; then result=result_silo_ycsbC_tuple10m_ope1_skew099.dat maxope=1 @@ -42,10 +42,13 @@ do fi rm $result - echo "#tuple num, avg-tps, min-tps, max-tps, avg-ar, min-ar, max-ar, avg-camiss, min-camiss, max-camiss" >> $result + echo "#tuple num, avg-tps, min-tps, max-tps, avg-ar, min-ar, max-ar, avg-camiss, min-camiss, max-camiss, avg-er, avg-rlr, avg-vlr" >> $result echo "#sudo perf stat -e cache-misses,cache-references -o ana.txt numactl --interleave=all ../silo.exe tuple $maxope $thread $rratio $rmw $skew $ycsb $cpumhz $epochtime $extime" >> $result + ../silo.exe > exp.txt + tmpStr=`grep ShowOptParameters ./exp.txt` + echo "#$tmpStr" >> $result - for ((thread=1; thread<=28; thread+=4)) + for ((thread=14; thread<=224; thread+=14)) do echo "sudo perf stat -e cache-misses,cache-references -o ana.txt numactl --interleave=all ../silo.exe $tuple $maxope $thread $rratio $rmw $skew $ycsb $cpumhz $epochtime $extime" @@ -58,6 +61,9 @@ do minTH=0 minAR=0 minCA=0 + sumRLR=0 + sumVLR=0 + sumER=0 for ((i = 1; i <= epoch; ++i)) do if test $host = $dbs11 ; then @@ -70,9 +76,15 @@ do tmpTH=`grep throughput ./exp.txt | awk '{print $2}'` tmpAR=`grep abort_rate ./exp.txt | awk '{print $2}'` tmpCA=`grep cache-misses ./ana.txt | awk '{print $4}'` + tmpER=`grep extra_reads ./exp.txt | awk '{print $2}'` + tmpRLR=`grep read_latency_rate ./exp.txt | awk '{print $2}'` + tmpVLR=`grep vali_latency_rate ./exp.txt | awk '{print $2}'` sumTH=`echo "$sumTH + $tmpTH" | bc` sumAR=`echo "scale=4; $sumAR + $tmpAR" | bc | xargs printf %.4f` sumCA=`echo "$sumCA + $tmpCA" | bc` + sumER=`echo "$sumER + $tmpER" | bc` + sumRLR=`echo "scale=4; $sumRLR + $tmpRLR" | bc | xargs printf %.4f` + sumVLR=`echo "scale=4; $sumVLR + $tmpVLR" | bc | xargs printf %.4f` echo "tmpTH: $tmpTH, tmpAR: $tmpAR, tmpCA: $tmpCA" if test $i -eq 1 ; then @@ -114,11 +126,14 @@ do avgTH=`echo "$sumTH / $epoch" | bc` avgAR=`echo "scale=4; $sumAR / $epoch" | bc | xargs printf %.4f` avgCA=`echo "$sumCA / $epoch" | bc` + avgER=`echo "$sumER / $epoch" | bc` + avgRLR=`echo "scale=4; $sumRLR / $epoch" | bc | xargs printf %.4f` + avgVLR=`echo "scale=4; $sumVLR / $epoch" | bc | xargs printf %.4f` echo "sumTH: $sumTH, sumAR: $sumAR, sumCA: $sumCA" - echo "avgTH: $avgTH, avgAR: $avgAR, avgCA: $avgCA" + echo "avgTH: $avgTH, avgAR: $avgAR, avgCA: $avgCA, avgER: $avgER, avgRLR: $avgRLR, avgVLR: $avgVLR" echo "maxTH: $maxTH, maxAR: $maxAR, maxCA: $maxCA" echo "minTH: $minTH, minAR: $minAR, minCA: $minCA" echo "" - echo "$thread $avgTH $minTH $maxTH $avgAR $minAR $maxAR, $avgCA $minCA $maxCA" >> $result + echo "$thread $avgTH $minTH $maxTH $avgAR $minAR $maxAR $avgCA $minCA $maxCA $avgER $avgRLR $avgVLR" >> $result done done diff --git a/silo/script/ycsb-xval.sh b/silo/script/ycsb-xval.sh index 12328d80..90f5971a 100755 --- a/silo/script/ycsb-xval.sh +++ b/silo/script/ycsb-xval.sh @@ -3,7 +3,7 @@ tuple=1000000 maxope=10 rratioary=(95) rmw=off -skew=0 +skew=0.99 ycsb=on epochtime=40 extime=3 @@ -32,7 +32,7 @@ do if test $rratio = 50; then result=result_silo_ycsbA_tuple100m_skew09_val4-1k.dat elif test $rratio = 95; then - result=result_silo_ycsbB_tuple1m_val10-100k.dat + result=result_silo+nowait_ycsbB_tuple1m_skew099_val4-1k.dat elif test $rratio = 100; then result=result_silo_ycsbC_tuple100m_skew09_val4-1k.dat else @@ -41,16 +41,19 @@ do fi rm $result - echo "#tuple num, avg-tps, min-tps, max-tps, avg-ar, min-ar, max-ar, avg-camiss, min-camiss, max-camiss" >> $result + echo "#val, avg-tps, min-tps, max-tps, avg-ar, min-ar, max-ar, avg-camiss, min-camiss, max-camiss, avg-er, avg-rlr, avg-vlr" >> $result echo "#sudo perf stat -e cache-misses,cache-references -o ana.txt numactl --interleave=all ../silo.exe tuple $maxope $thread $rratio $rmw $skew $ycsb $cpumhz $epochtime $extime" >> $result + ../silo.exe > exp.txt + tmpStr=`grep ShowOptParameters ./exp.txt` + echo "#$tmpStr" >> $result - for ((val = 10; val <= 100000; val *= 10)) + for ((val = 4; val <= 1000; val += 100)) do if test $val = 104 ; then val=100 fi cd ../ - make clean; make -j10 VAL_SIZE=$val + make clean; make -j VAL_SIZE=$val cd script echo "sudo perf stat -e cache-misses,cache-references -o ana.txt numactl --interleave=all ../silo.exe $tuple $maxope $thread $rratio $rmw $skew $ycsb $cpumhz $epochtime $extime" diff --git a/silo/util.cc b/silo/util.cc index fce940df..8edafc6b 100644 --- a/silo/util.cc +++ b/silo/util.cc @@ -17,6 +17,7 @@ #include "include/common.hh" #include "include/transaction.hh" #include "include/tuple.hh" +#include "include/util.hh" #include "../include/cache_line_size.hh" #include "../include/check.hh" @@ -50,12 +51,7 @@ void chkArg(const int argc, char *argv[]) { cout << "CLOCKS_PER_US: CPU_MHZ" << endl; cout << "EPOCH_TIME(int)(ms): Ex. 40" << endl; cout << "EXTIME: execution time." << endl << endl; - cout << "Tuple " << sizeof(Tuple) << endl; - cout << "uint64_t_64byte " << sizeof(uint64_t_64byte) << endl; - cout << "Tidword " << sizeof(Tidword) << endl; - cout << "KEY_SIZE : " << KEY_SIZE << endl; - cout << "VAL_SIZE : " << VAL_SIZE << endl; - cout << "MASSTREE_USE : " << MASSTREE_USE << endl; + ShowOptParameters(); exit(0); } chkInt(argv[1]); @@ -208,3 +204,20 @@ void leaderWork(uint64_t &epoch_timer_start, uint64_t &epoch_timer_stop) { epoch_timer_start = epoch_timer_stop; } } + +void +ShowOptParameters() +{ + cout << "ShowOptParameters()" + << ": ADD_ANALYSIS " << ADD_ANALYSIS + << ": BACK_OFF " << BACK_OFF + << ": KEY_SIZE " << KEY_SIZE + << ": MASSTREE_USE " << MASSTREE_USE + << ": NO_WAIT_LOCKING_IN_VALIDATION " << NO_WAIT_LOCKING_IN_VALIDATION + << ": PARTITION_TABLE " << PARTITION_TABLE + << ": PROCEDURE_SORT " << PROCEDURE_SORT + << ": SLEEP_READ_PHASE " << SLEEP_READ_PHASE + << ": VAL_SIZE " << VAL_SIZE + << ": WAL " << WAL + << endl; +} diff --git a/tictoc/Makefile b/tictoc/Makefile index cc028349..867b0274 100644 --- a/tictoc/Makefile +++ b/tictoc/Makefile @@ -12,10 +12,9 @@ ADD_ANALYSIS=1 BACK_OFF=0 MASSTREE_USE=1 NO_WAIT_LOCKING_IN_VALIDATION=1 -PREEMPTIVE_ABORTS=1 +PREEMPTIVE_ABORTS=0 TIMESTAMP_HISTORY=1 - -SLEEP_READ_PHASE=0 # # of tics +SLEEP_READ_PHASE=0 # of tics #end of initialization CC = g++ @@ -33,8 +32,7 @@ CFLAGS = -c -pipe -g -O3 -std=c++17 -march=native \ -DSLEEP_READ_PHASE=$(SLEEP_READ_PHASE) LDFLAGS = -L../third_party/mimalloc/out/release -LIBS = -lpthread -lmimalloc -#LIBS = -lpthread +LIBS = -lpthread OBJS1 = $(TICTOC_SRCS1:.cc=.o) all: $(PROG1) diff --git a/tictoc/script/ycsb-xrs.sh b/tictoc/script/ycsb-xrs.sh index 9da1db25..46d53801 100755 --- a/tictoc/script/ycsb-xrs.sh +++ b/tictoc/script/ycsb-xrs.sh @@ -1,6 +1,7 @@ # ycsb-xrs.sh(tictoc) -maxope=10 -rratioary=(50 95 100) +maxope=2 +#rratioary=(50 95 100) +rratioary=(95) rmw=off skew=0.9 ycsb=on @@ -19,7 +20,7 @@ thread=224 fi cd ../ -make clean; make -j KEY_SIZE=8 VAL_SIZE=1000 +make clean; make -j cd script/ for rratio in "${rratioary[@]}" @@ -27,7 +28,7 @@ do if test $rratio = 50 ; then result=result_tictoc_ycsbA_tuple1k-100m_val1k_skew09.dat elif test $rratio = 95 ; then - result=result_tictoc_ycsbB_tuple1k-100m_val1k_skew09.dat + result=result_tictoc_ycsbB_tuple1k-1m_skew09_op2_th-.dat elif test $rratio = 100 ; then result=result_tictoc_ycsbC_tuple1k-100m_val1k_skew09.dat else @@ -38,8 +39,11 @@ do echo "#worker threads, avg-tps, min-tps, max-tps, avg-ar, min-ar, max-ar, avg-camiss, min-camiss, max-camiss" >> $result echo "#sudo perf stat -e cache-misses,cache-references -o ana.txt numactl --interleave=all ../tictoc.exe tuple $maxope $thread $rratio $rmw $skew $ycsb $cpumhz $extime" >> $result - - for ((tuple=1000; tuple<=100000000; tuple*=10)) + ../tictoc.exe > exp.txt + tmpStr=`grep ShowOptParameters ./exp.txt` + echo "#$tmpStr" >> $result + + for ((tuple=1000; tuple<=1000000; tuple*=10)) do echo "sudo perf stat -e cache-misses,cache-references -o ana.txt numactl --interleave=all ../tictoc.exe $tuple $maxope $thread $rratio $rmw $skew $ycsb $cpumhz $extime" echo "Thread number $thread" diff --git a/tictoc/script/ycsb-xskew.sh b/tictoc/script/ycsb-xskew.sh index 3da28ed5..e7b95041 100755 --- a/tictoc/script/ycsb-xskew.sh +++ b/tictoc/script/ycsb-xskew.sh @@ -1,8 +1,8 @@ # ycsb-xskew.sh(tictoc) -tuple=10000000 -maxope=16 -rratioary=(50 95) -rmw=on +tuple=1000000 +maxope=10 +rratioary=(95) +rmw=off skew=0 ycsb=on cpumhz=2100 @@ -19,9 +19,8 @@ if test $host = $dbs11 ; then thread=224 fi -thread=28 cd ../ -make clean; make -j KEY_SIZE=8 VAL_SIZE=100 +make clean; make -j cd script/ for rratio in "${rratioary[@]}" @@ -29,7 +28,7 @@ do if test $rratio = 50; then result=result_tictoc_ycsbA_tuple10m_ope16_rmw_skew0-099_th28.dat elif test $rratio = 95; then - result=result_tictoc_ycsbB_tuple10m_ope16_rmw_skew0-099_th28.dat + result=result_tictoc_ycsbB_tuple1m_skew07-099.dat elif test $rratio = 100; then result=result_tictoc_ycsbC_tuple1k_skew0-099.dat else @@ -38,17 +37,18 @@ do fi rm $result - echo "#worker threads, avg-tps, min-tps, max-tps, avg-ar, min-ar, max-ar, avg-camiss, min-camiss, max-camiss" >> $result + echo "#worker threads, avg-tps, min-tps, max-tps, avg-ar, min-ar, max-ar, avg-camiss, min-camiss, max-camiss, avg-er, avg-rlr, avg-vlr" >> $result echo "#sudo perf stat -e cache-misses,cache-references -o ana.txt numactl --interleave=all ../tictoc.exe tuple $maxope $thread $rratio $rmw $skew $ycsb $cpumhz $extime" >> $result + ../tictoc.exe > exp.txt + tmpStr=`grep ShowOptParameters ./exp.txt` + echo "#$tmpStr" >> $result - for ((tmpskew = 0; tmpskew <= 105; tmpskew += 10)) + for ((tmpskew = 70; tmpskew <= 100; tmpskew += 5)) do - if test $tmpskew = 100 ; then - tmpskew=95 - fi - if test $tmpskew = 105 ; then + if test $tmpskew -eq 100 ; then tmpskew=99 fi + skew=`echo "scale=3; $tmpskew / 100.0" | bc -l | xargs printf %.2f` echo "sudo perf stat -e cache-misses,cache-references -o ana.txt numactl --interleave=all ../tictoc.exe $tuple $maxope $thread $rratio $rmw $skew $ycsb $cpumhz $extime" @@ -63,6 +63,9 @@ do minTH=0 minAR=0 minCA=0 + sumRLR=0 + sumVLR=0 + sumER=0 for ((i = 1; i <= epoch; ++i)) do if test $host = $dbs11 ; then @@ -75,9 +78,15 @@ do tmpTH=`grep throughput ./exp.txt | awk '{print $2}'` tmpAR=`grep abort_rate ./exp.txt | awk '{print $2}'` tmpCA=`grep cache-misses ./ana.txt | awk '{print $4}'` + tmpER=`grep extra_reads ./exp.txt | awk '{print $2}'` + tmpRLR=`grep read_latency_rate ./exp.txt | awk '{print $2}'` + tmpVLR=`grep vali_latency_rate ./exp.txt | awk '{print $2}'` sumTH=`echo "$sumTH + $tmpTH" | bc` sumAR=`echo "scale=4; $sumAR + $tmpAR" | bc | xargs printf %.4f` sumCA=`echo "$sumCA + $tmpCA" | bc` + sumER=`echo "$sumER + $tmpER" | bc` + sumRLR=`echo "scale=4; $sumRLR + $tmpRLR" | bc | xargs printf %.4f` + sumVLR=`echo "scale=4; $sumVLR + $tmpVLR" | bc | xargs printf %.4f` echo "tmpTH: $tmpTH, tmpAR: $tmpAR, tmpCA: $tmpCA" if test $i -eq 1 ; then @@ -119,11 +128,14 @@ do avgTH=`echo "$sumTH / $epoch" | bc` avgAR=`echo "scale=4; $sumAR / $epoch" | bc | xargs printf %.4f` avgCA=`echo "$sumCA / $epoch" | bc` + avgER=`echo "$sumER / $epoch" | bc` + avgRLR=`echo "scale=4; $sumRLR / $epoch" | bc | xargs printf %.4f` + avgVLR=`echo "scale=4; $sumVLR / $epoch" | bc | xargs printf %.4f` echo "sumTH: $sumTH, sumAR: $sumAR, sumCA: $sumCA" - echo "avgTH: $avgTH, avgAR: $avgAR, avgCA: $avgCA" + echo "avgTH: $avgTH, avgAR: $avgAR, avgCA: $avgCA, avgER: $avgER, avgRLR: $avgRLR, avgVLR: $avgVLR" echo "maxTH: $maxTH, maxAR: $maxAR, maxCA: $maxCA" echo "minTH: $minTH, minAR: $minAR, minCA: $minCA" echo "" - echo "$skew $avgTH $minTH $maxTH $avgAR $minAR $maxAR, $avgCA $minCA $maxCA" >> $result + echo "$skew $avgTH $minTH $maxTH $avgAR $minAR $maxAR $avgCA $minCA $maxCA $avgER $avgRLR $avgVLR" >> $result done done diff --git a/tictoc/script/ycsb-xslprp.sh b/tictoc/script/ycsb-xslprp.sh index 2b014fe3..1dc8a027 100755 --- a/tictoc/script/ycsb-xslprp.sh +++ b/tictoc/script/ycsb-xslprp.sh @@ -1,12 +1,12 @@ # ycsb-xslprp.sh(tictoc) -tuple=100000000 +tuple=1000000 maxope=10 -rratioary=(50) +rratioary=(95) rmw=off -skew=0.9 +skew=0.99 ycsb=on -extime=5 -epoch=5 +extime=3 +epoch=3 host=`hostname` chris41="chris41.omni.hpcc.jp" @@ -30,7 +30,7 @@ do if test $rratio = 50; then result=result_tictoc_ycsbA_tuple100m_skew09_slprp0-1000.dat elif test $rratio = 95; then - result=result_tictoc_ycsbB_tuple100m_skew09_val4-1k.dat + result=result_tictoc_ycsbB_tuple1m_skew099_slprp0-25000.dat elif test $rratio = 100; then result=result_tictoc_ycsbC_tuple100m_skew09_val4-1k.dat else @@ -39,13 +39,16 @@ do fi rm $result - echo "#worker threads, avg-tps, min-tps, max-tps, avg-ar, min-ar, max-ar, avg-camiss, min-camiss, max-camiss" >> $result + echo "#slpclks, avg-tps, min-tps, max-tps, avg-ar, min-ar, max-ar, avg-camiss, min-camiss, max-camiss, avg-er, avg-rlr, avg-vlr" >> $result echo "#sudo perf stat -e cache-misses,cache-references -o ana.txt numactl --interleave=all ../tictoc.exe tuple $maxope $thread $rratio $rmw $skew $ycsb $cpumhz $extime" >> $result + ../tictoc.exe > exp.txt + tmpStr=`grep ShowOptParameters ./exp.txt` + echo "#$tmpStr" >> $result for ((slpclks = 0; slpclks <= 25000; slpclks += 500)) do cd ../ - make clean; make -j SLEEP_READ_PHASE=$slpclks VAL_SIZE=4 + make clean; make -j SLEEP_READ_PHASE=$slpclks cd script echo "sudo perf stat -e cache-misses,cache-references -o ana.txt numactl --interleave=all ../tictoc.exe $tuple $maxope $thread $rratio $rmw $skew $ycsb $cpumhz $extime" diff --git a/tictoc/script/ycsb-xth.sh b/tictoc/script/ycsb-xth.sh index 31c67bc9..2293714f 100755 --- a/tictoc/script/ycsb-xth.sh +++ b/tictoc/script/ycsb-xth.sh @@ -1,9 +1,9 @@ # ycsb-xth.sh(tictoc) -tuple=10000000 -maxope=1 +tuple=1000000 +maxope=10 #rratioary=(50 95 100) rratioary=(95) -rmw=on +rmw=off skew=0.99 ycsb=on cpumhz=2100 @@ -21,7 +21,7 @@ thread=224 fi cd ../ -make clean; make -j VAL_SIZE=100 +make clean; make -j cd script/ for rratio in "${rratioary[@]}" @@ -31,7 +31,7 @@ do elif test $rratio = 90 ; then result=result_tictoc_ycsb_tuple10m_skew08.dat elif test $rratio = 95 ; then - result=result_tictoc_ycsbB_tuple10m_ope1_rmw_skew099.dat + result=result_tictoc_ycsbB_tuple1m_skew099_th14-224.dat elif test $rratio = 100 ; then result=result_tictoc_ycsbC_tuple10m_ope1_skew099.dat maxope=1 @@ -41,10 +41,13 @@ do fi rm $result - echo "#worker threads, avg-tps, min-tps, max-tps, avg-ar, min-ar, max-ar, avg-camiss, min-camiss, max-camiss" >> $result + echo "#worker threads, avg-tps, min-tps, max-tps, avg-ar, min-ar, max-ar, avg-camiss, min-camiss, max-camiss, avg-er, avg-rlr, avg-vlr" >> $result echo "#sudo perf stat -e cache-misses,cache-references -o ana.txt numactl --interleave=all ../tictoc.exe tuple $maxope $thread $rratio $rmw $skew $ycsb $cpumhz $extime" >> $result + ../tictoc.exe > exp.txt + tmpStr=`grep ShowOptParameters ./exp.txt` + echo "#$tmpStr" >> $result - for ((thread=1; thread<=28; thread+=4)) + for ((thread=14; thread<=224; thread+=14)) do echo "sudo perf stat -e cache-misses,cache-references -o ana.txt numactl --interleave=all ../tictoc.exe $tuple $maxope $thread $rratio $rmw $skew $ycsb $cpumhz $extime" echo "Thread number $thread" @@ -58,6 +61,9 @@ do minTH=0 minAR=0 minCA=0 + sumRLR=0 + sumVLR=0 + sumER=0 for ((i = 1; i <= epoch; ++i)) do if test $host = $dbs11 ; then @@ -70,9 +76,15 @@ do tmpTH=`grep throughput ./exp.txt | awk '{print $2}'` tmpAR=`grep abort_rate ./exp.txt | awk '{print $2}'` tmpCA=`grep cache-misses ./ana.txt | awk '{print $4}'` + tmpER=`grep extra_reads ./exp.txt | awk '{print $2}'` + tmpRLR=`grep read_latency_rate ./exp.txt | awk '{print $2}'` + tmpVLR=`grep vali_latency_rate ./exp.txt | awk '{print $2}'` sumTH=`echo "$sumTH + $tmpTH" | bc` sumAR=`echo "scale=4; $sumAR + $tmpAR" | bc | xargs printf %.4f` sumCA=`echo "$sumCA + $tmpCA" | bc` + sumER=`echo "$sumER + $tmpER" | bc` + sumRLR=`echo "scale=4; $sumRLR + $tmpRLR" | bc | xargs printf %.4f` + sumVLR=`echo "scale=4; $sumVLR + $tmpVLR" | bc | xargs printf %.4f` echo "tmpTH: $tmpTH, tmpAR: $tmpAR, tmpCA: $tmpCA" if test $i -eq 1 ; then @@ -114,11 +126,14 @@ do avgTH=`echo "$sumTH / $epoch" | bc` avgAR=`echo "scale=4; $sumAR / $epoch" | bc | xargs printf %.4f` avgCA=`echo "$sumCA / $epoch" | bc` + avgER=`echo "$sumER / $epoch" | bc` + avgRLR=`echo "scale=4; $sumRLR / $epoch" | bc | xargs printf %.4f` + avgVLR=`echo "scale=4; $sumVLR / $epoch" | bc | xargs printf %.4f` echo "sumTH: $sumTH, sumAR: $sumAR, sumCA: $sumCA" - echo "avgTH: $avgTH, avgAR: $avgAR, avgCA: $avgCA" + echo "avgTH: $avgTH, avgAR: $avgAR, avgCA: $avgCA, avgER: $avgER, avgRLR: $avgRLR, avgVLR: $avgVLR" echo "maxTH: $maxTH, maxAR: $maxAR, maxCA: $maxCA" echo "minTH: $minTH, minAR: $minAR, minCA: $minCA" echo "" - echo "$thread $avgTH $minTH $maxTH $avgAR $minAR $maxAR, $avgCA $minCA $maxCA" >> $result + echo "$thread $avgTH $minTH $maxTH $avgAR $minAR $maxAR $avgCA $minCA $maxCA $avgER $avgRLR $avgVLR" >> $result done done diff --git a/tictoc/script/ycsb-xval.sh b/tictoc/script/ycsb-xval.sh index e5cca971..e2759c44 100755 --- a/tictoc/script/ycsb-xval.sh +++ b/tictoc/script/ycsb-xval.sh @@ -3,7 +3,7 @@ tuple=1000000 maxope=10 rratioary=(95) rmw=off -skew=0 +skew=0.99 ycsb=on extime=3 epoch=3 @@ -30,7 +30,7 @@ do if test $rratio = 50; then result=result_tictoc_ycsbA_tuple100m_skew09_val4-1k.dat elif test $rratio = 95; then - result=result_tictoc_ycsbB_tuple1m_val10-100k.dat + result=result_tictoc_ycsbB_tuple1m_skew099_val4-1k.dat elif test $rratio = 100; then result=result_tictoc_ycsbC_tuple100m_skew09_val4-1k.dat else @@ -39,10 +39,13 @@ do fi rm $result - echo "#worker threads, avg-tps, min-tps, max-tps, avg-ar, min-ar, max-ar, avg-camiss, min-camiss, max-camiss" >> $result + echo "#val, avg-tps, min-tps, max-tps, avg-ar, min-ar, max-ar, avg-camiss, min-camiss, max-camiss, avg-er, avg-rlr, avg-vlr" >> $result echo "#sudo perf stat -e cache-misses,cache-references -o ana.txt numactl --interleave=all ../tictoc.exe tuple $maxope $thread $rratio $rmw $skew $ycsb $cpumhz $extime" >> $result + ../tictoc.exe > exp.txt + tmpStr=`grep ShowOptParameters ./exp.txt` + echo "#$tmpStr" >> $result - for ((val = 10; val <= 100000; val *= 10)) + for ((val = 4; val <= 1000; val+=100)) do if test $val = 104 ; then val=100 diff --git a/tictoc/util.cc b/tictoc/util.cc index 9edab867..c2cc109c 100644 --- a/tictoc/util.cc +++ b/tictoc/util.cc @@ -138,6 +138,7 @@ ShowOptParameters() << ": NO_WAIT_LOCKING_IN_VALIDATION " << NO_WAIT_LOCKING_IN_VALIDATION << ": PREEMPTIVE_ABORTS " << PREEMPTIVE_ABORTS << ": TIMESTAMP_HISTORY " << TIMESTAMP_HISTORY + << ": SLEEP_READ_PHASE " << SLEEP_READ_PHASE << endl; }