This signals which RocksDB commit should be checked out for the SPDK RocksDB tests. Also point the rocksdb.sh test script to point to where this version of RocksDB will be cloned. (Note: this is a modified version of what was merged to master.) Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I1ba0be00747a2642b359b1e0e0c8c2c6d99cc4f0 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451772 (master) Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452482 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
142 lines
3.9 KiB
Bash
Executable File
142 lines
3.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -ex
|
|
|
|
run_step() {
|
|
if [ -z "$1" ]; then
|
|
echo run_step called with no parameter
|
|
exit 1
|
|
fi
|
|
|
|
echo "--spdk=$ROCKSDB_CONF" >> "$1"_flags.txt
|
|
echo "--spdk_bdev=Nvme0n1" >> "$1"_flags.txt
|
|
echo "--spdk_cache_size=$CACHE_SIZE" >> "$1"_flags.txt
|
|
|
|
echo -n Start $1 test phase...
|
|
# ASAN has some bugs around thread_local variables. We have a destructor in place
|
|
# to free the thread contexts, but ASAN complains about the leak before those
|
|
# destructors have a chance to run. So suppress this one specific leak using
|
|
# LSAN_OPTIONS.
|
|
export LSAN_OPTIONS="suppressions=$testdir/lsan_suppressions.txt"
|
|
/usr/bin/time taskset 0xFF $DB_BENCH --flagfile="$1"_flags.txt &> "$1"_db_bench.txt
|
|
echo done.
|
|
}
|
|
|
|
run_bsdump() {
|
|
$rootdir/examples/blob/cli/blobcli -c $ROCKSDB_CONF -b Nvme0n1 -D &> bsdump.txt
|
|
}
|
|
|
|
testdir=$(readlink -f $(dirname $0))
|
|
rootdir=$(readlink -f $testdir/../../..)
|
|
source $rootdir/test/common/autotest_common.sh
|
|
|
|
# In the autotest job, we copy the rocksdb source to just outside the spdk directory.
|
|
DB_BENCH_DIR="$rootdir/../rocksdb"
|
|
DB_BENCH=$DB_BENCH_DIR/db_bench
|
|
ROCKSDB_CONF=$testdir/rocksdb.conf
|
|
|
|
if [ ! -e $DB_BENCH_DIR ]; then
|
|
echo $DB_BENCH_DIR does not exist, skipping rocksdb tests
|
|
exit 0
|
|
fi
|
|
|
|
timing_enter rocksdb
|
|
|
|
timing_enter db_bench_build
|
|
|
|
pushd $DB_BENCH_DIR
|
|
git clean -x -f -d
|
|
$MAKE db_bench $MAKEFLAGS $MAKECONFIG DEBUG_LEVEL=0 SPDK_DIR=$rootdir
|
|
popd
|
|
|
|
timing_exit db_bench_build
|
|
|
|
$rootdir/scripts/gen_nvme.sh > $ROCKSDB_CONF
|
|
|
|
trap 'run_bsdump; rm -f $ROCKSDB_CONF; exit 1' SIGINT SIGTERM EXIT
|
|
|
|
timing_enter mkfs
|
|
$rootdir/test/blobfs/mkfs/mkfs $ROCKSDB_CONF Nvme0n1
|
|
timing_exit mkfs
|
|
|
|
mkdir $output_dir/rocksdb
|
|
RESULTS_DIR=$output_dir/rocksdb
|
|
if [ $RUN_NIGHTLY -eq 1 ]; then
|
|
CACHE_SIZE=4096
|
|
DURATION=60
|
|
NUM_KEYS=100000000
|
|
else
|
|
CACHE_SIZE=2048
|
|
DURATION=20
|
|
NUM_KEYS=20000000
|
|
fi
|
|
|
|
cd $RESULTS_DIR
|
|
cp $testdir/common_flags.txt insert_flags.txt
|
|
echo "--benchmarks=fillseq" >> insert_flags.txt
|
|
echo "--threads=1" >> insert_flags.txt
|
|
echo "--disable_wal=1" >> insert_flags.txt
|
|
echo "--use_existing_db=0" >> insert_flags.txt
|
|
echo "--num=$NUM_KEYS" >> insert_flags.txt
|
|
|
|
cp $testdir/common_flags.txt randread_flags.txt
|
|
echo "--benchmarks=readrandom" >> randread_flags.txt
|
|
echo "--threads=16" >> randread_flags.txt
|
|
echo "--duration=$DURATION" >> randread_flags.txt
|
|
echo "--disable_wal=1" >> randread_flags.txt
|
|
echo "--use_existing_db=1" >> randread_flags.txt
|
|
echo "--num=$NUM_KEYS" >> randread_flags.txt
|
|
|
|
cp $testdir/common_flags.txt overwrite_flags.txt
|
|
echo "--benchmarks=overwrite" >> overwrite_flags.txt
|
|
echo "--threads=1" >> overwrite_flags.txt
|
|
echo "--duration=$DURATION" >> overwrite_flags.txt
|
|
echo "--disable_wal=1" >> overwrite_flags.txt
|
|
echo "--use_existing_db=1" >> overwrite_flags.txt
|
|
echo "--num=$NUM_KEYS" >> overwrite_flags.txt
|
|
|
|
cp $testdir/common_flags.txt readwrite_flags.txt
|
|
echo "--benchmarks=readwhilewriting" >> readwrite_flags.txt
|
|
echo "--threads=4" >> readwrite_flags.txt
|
|
echo "--duration=$DURATION" >> readwrite_flags.txt
|
|
echo "--disable_wal=1" >> readwrite_flags.txt
|
|
echo "--use_existing_db=1" >> readwrite_flags.txt
|
|
echo "--num=$NUM_KEYS" >> readwrite_flags.txt
|
|
|
|
cp $testdir/common_flags.txt writesync_flags.txt
|
|
echo "--benchmarks=overwrite" >> writesync_flags.txt
|
|
echo "--threads=1" >> writesync_flags.txt
|
|
echo "--duration=$DURATION" >> writesync_flags.txt
|
|
echo "--disable_wal=0" >> writesync_flags.txt
|
|
echo "--use_existing_db=1" >> writesync_flags.txt
|
|
echo "--sync=1" >> writesync_flags.txt
|
|
echo "--num=$NUM_KEYS" >> writesync_flags.txt
|
|
|
|
timing_enter rocksdb_insert
|
|
run_step insert
|
|
timing_exit rocksdb_insert
|
|
|
|
timing_enter rocksdb_overwrite
|
|
run_step overwrite
|
|
timing_exit rocksdb_overwrite
|
|
|
|
timing_enter rocksdb_readwrite
|
|
run_step readwrite
|
|
timing_exit rocksdb_readwrite
|
|
|
|
timing_enter rocksdb_writesync
|
|
run_step writesync
|
|
timing_exit rocksdb_writesync
|
|
|
|
timing_enter rocksdb_randread
|
|
run_step randread
|
|
timing_exit rocksdb_randread
|
|
|
|
trap - SIGINT SIGTERM EXIT
|
|
|
|
run_bsdump
|
|
rm -f $ROCKSDB_CONF
|
|
|
|
report_test_completion "blobfs"
|
|
timing_exit rocksdb
|