benchmark.sh won't run through all tests properly if one specifies wal_dir to be different than db directory.
Summary: A command line like this to run all the tests: source benchmark.config.sh && nohup ./benchmark.sh 'bulkload,fillseq,overwrite,filluniquerandom,readrandom,readwhilewriting' where benchmark.config.sh is: export DB_DIR=/data/mysql/rocksdata export WAL_DIR=/txlogs/rockswal export OUTPUT_DIR=/root/rocks_benchmarking/output Will fail for the tests that need a new DB . Also 1) set disable_data_sync=0 and 2) add debug mode to run through all the tests more quickly Test Plan: run ./benchmark.sh 'debug,bulkload,fillseq,overwrite,filluniquerandom,readrandom,readwhilewriting' and verify that there are no complaints about WAL dir not being empty. Reviewers: sdong, yhchiang, rven, igor Reviewed By: igor Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D30909
This commit is contained in:
parent
62ad0a9b19
commit
9d5bd411be
@ -1353,7 +1353,11 @@ class Benchmark {
|
||||
}
|
||||
}
|
||||
if (!FLAGS_use_existing_db) {
|
||||
DestroyDB(FLAGS_db, Options());
|
||||
Options options;
|
||||
if (!FLAGS_wal_dir.empty()) {
|
||||
options.wal_dir = FLAGS_wal_dir;
|
||||
}
|
||||
DestroyDB(FLAGS_db, options);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ function run_bulkload {
|
||||
--num=$num_keys \
|
||||
--disable_auto_compactions=1 \
|
||||
--sync=0 \
|
||||
--disable_data_sync=1 \
|
||||
--disable_data_sync=0 \
|
||||
--threads=1 2>&1 | tee $output_dir/benchmark_bulkload_fillrandom.log"
|
||||
echo $cmd | tee $output_dir/benchmark_bulkload_fillrandom.log
|
||||
eval $cmd
|
||||
@ -103,7 +103,7 @@ function run_bulkload {
|
||||
--num=$num_keys \
|
||||
--disable_auto_compactions=1 \
|
||||
--sync=0 \
|
||||
--disable_data_sync=1 \
|
||||
--disable_data_sync=0 \
|
||||
--threads=1 2>&1 | tee $output_dir/benchmark_bulkload_compact.log"
|
||||
echo $cmd | tee $output_dir/benchmark_bulkload_compact.log
|
||||
eval $cmd
|
||||
@ -197,7 +197,11 @@ echo "===== Benchmark ====="
|
||||
# Run!!!
|
||||
IFS=',' read -a jobs <<< $1
|
||||
for job in ${jobs[@]}; do
|
||||
echo "Start $job at `date`" | tee -a $report
|
||||
|
||||
if [ $job != debug ]; then
|
||||
echo "Start $job at `date`" | tee -a $report
|
||||
fi
|
||||
|
||||
start=$(now)
|
||||
if [ $job = bulkload ]; then
|
||||
run_bulkload
|
||||
@ -213,13 +217,19 @@ for job in ${jobs[@]}; do
|
||||
run_readwhilewriting
|
||||
elif [ $job = rangescanwhilewriting ]; then
|
||||
run_rangescanwhilewriting
|
||||
elif [ $job = debug ]; then
|
||||
num_keys=10000; # debug
|
||||
echo "Setting num_keys to $num_keys"
|
||||
else
|
||||
echo "unknown job $job"
|
||||
exit
|
||||
fi
|
||||
end=$(now)
|
||||
|
||||
echo "Complete $job in $((end-start)) seconds" | tee -a $report
|
||||
if [ $job != debug ]; then
|
||||
echo "Complete $job in $((end-start)) seconds" | tee -a $report
|
||||
fi
|
||||
|
||||
if [[ $job = readrandom || $job = readwhilewriting || $job == rangescanwhilewriting ]]; then
|
||||
lat=$(grep "micros\/op" "$output_dir/benchmark_$job.log" | grep "ops\/sec" | awk '{print $3}')
|
||||
qps=$(grep "micros\/op" "$output_dir/benchmark_$job.log" | grep "ops\/sec" | awk '{print $5}')
|
||||
|
Loading…
Reference in New Issue
Block a user