@ -109,6 +109,10 @@ function summarize_result {
test_name = $2
test_name = $2
bench_name = $3
bench_name = $3
# Note that this function assumes that the benchmark executes long enough so
# that "Compaction Stats" is written to stdout at least once. If it won't
# happen then empty output from grep when searching for "Sum" will cause
# syntax errors.
uptime = $( grep ^Uptime\( secs $test_out | tail -1 | awk '{ printf "%.0f", $2 }' )
uptime = $( grep ^Uptime\( secs $test_out | tail -1 | awk '{ printf "%.0f", $2 }' )
stall_time = $( grep "^Cumulative stall" $test_out | tail -1 | awk '{ print $3 }' )
stall_time = $( grep "^Cumulative stall" $test_out | tail -1 | awk '{ print $3 }' )
stall_pct = $( grep "^Cumulative stall" $test_out | tail -1 | awk '{ print $5 }' )
stall_pct = $( grep "^Cumulative stall" $test_out | tail -1 | awk '{ print $5 }' )
@ -159,8 +163,22 @@ function run_bulkload {
}
}
function run_fillseq {
function run_fillseq {
# This runs with a vector memtable and the WAL disabled to load faster. It is still crash safe and the
# This runs with a vector memtable. WAL can be either disabled or enabled
# client can discover where to restart a load after a crash. I think this is a good way to load.
# depending on the input parameter (1 for disabled, 0 for enabled). The main
# benefit behind disabling WAL is to make loading faster. It is still crash
# safe and the client can discover where to restart a load after a crash. I
# think this is a good way to load.
# Make sure that we'll have unique names for all the files so that data won't
# be overwritten.
if [ $1 = = 1 ] ; then
log_file_name = $output_dir /benchmark_fillseq.wal_disabled.v${ value_size } .log
test_name = fillseq.wal_disabled.v${ value_size }
else
log_file_name = $output_dir /benchmark_fillseq.wal_enabled.v${ value_size } .log
test_name = fillseq.wal_enabled.v${ value_size }
fi
echo " Loading $num_keys keys sequentially "
echo " Loading $num_keys keys sequentially "
cmd = " ./db_bench --benchmarks=fillseq \
cmd = " ./db_bench --benchmarks=fillseq \
--use_existing_db= 0 \
--use_existing_db= 0 \
@ -169,12 +187,14 @@ function run_fillseq {
--min_level_to_compress= 0 \
--min_level_to_compress= 0 \
--threads= 1 \
--threads= 1 \
--memtablerep= vector \
--memtablerep= vector \
--disable_wal= 1 \
--disable_wal= $ 1 \
--seed= $( date +%s ) \
--seed= $( date +%s ) \
2>& 1 | tee -a $output_dir /benchmark_fillseq.v${ value_size } .log "
2>& 1 | tee -a $log_file_name "
echo $cmd | tee $output_dir /benchmark_fillseq.v${ value_size } .log
echo $cmd | tee $log_file_name
eval $cmd
eval $cmd
summarize_result $output_dir /benchmark_fillseq.v${ value_size } .log fillseq.v${ value_size } fillseq
# The constant "fillseq" which we pass to db_bench is the benchmark name.
summarize_result $log_file_name $test_name fillseq
}
}
function run_change {
function run_change {
@ -310,8 +330,10 @@ for job in ${jobs[@]}; do
start = $( now)
start = $( now)
if [ $job = bulkload ] ; then
if [ $job = bulkload ] ; then
run_bulkload
run_bulkload
elif [ $job = fillseq ] ; then
elif [ $job = fillseq_disable_wal ] ; then
run_fillseq
run_fillseq 1
elif [ $job = fillseq_enable_wal ] ; then
run_fillseq 0
elif [ $job = overwrite ] ; then
elif [ $job = overwrite ] ; then
run_change overwrite
run_change overwrite
elif [ $job = updaterandom ] ; then
elif [ $job = updaterandom ] ; then