Spdk/test/blobfs/rocksdb/rocksdb.sh
Jim Harris 1edd9bf3e4 blobfs: Add a lightweight filesystem built on the blobstore
This is the initial commit for "blobfs", a lightweight
filesystem built on top of the SPDK blobstore.

Also included in this patch:

1) a shim for using SPDK bdevs as the backing store for
   SPDK blobstore/blobfs
2) documentation for using blobfs as the storage engine
   with RocksDB
3) scripts for running a set of workloads and collecting
   profiling data with RocksDB and blobfs

See doc/blobfs/getting_started.md included in this commit
for more details on blobfs, including some of the current
limitations.


Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2a6d3d4b87236730051228ed62c0c04e04c42c73
2017-03-24 14:15:45 -07:00

41 lines
982 B
Bash
Executable File

#!/usr/bin/env bash
testdir=$(readlink -f $(dirname $0))
rootdir=$testdir/../../..
source $rootdir/scripts/autotest_common.sh
DB_BENCH_DIR=/usr/src/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
$MAKE db_bench $MAKEFLAGS $MAKECONFIG DEBUG_LEVEL=0 SPDK_DIR=$rootdir DPDK_DIR=$DPDK_DIR
popd
timing_exit db_bench_build
cp $rootdir/etc/spdk/rocksdb.conf.in $ROCKSDB_CONF
$rootdir/scripts/gen_nvme.sh >> $ROCKSDB_CONF
$rootdir/test/lib/blobfs/mkfs/mkfs $ROCKSDB_CONF Nvme0n1
DURATION=30 NUM_KEYS=50000000 ROCKSDB_CONF=$ROCKSDB_CONF CACHE_SIZE=1024 $testdir/run_tests.sh $DB_BENCH
mkdir $output_dir/rocksdb
cp $testdir/results/last/* $output_dir/rocksdb
trap 'rm -f $ROCKSDB_CONF; exit 1' SIGINT SIGTERM EXIT
trap - SIGINT SIGTERM EXIT
rm -f $ROCKSDB_CONF
timing_exit rocksdb