This section describes how to run YCSB on RocksDB running locally (within the same JVM). NOTE: RocksDB is an embedded database and so articles like How to run in parallel are not applicable here.
Clone the YCSB git repository and compile:
git clone https://github.com/brianfrankcooper/YCSB.git
cd YCSB
mvn -pl site.ycsb:rocksdb-binding -am clean package
Now you are ready to run! First, load the data:
./bin/ycsb load rocksdb -s -P workloads/workloada -p rocksdb.dir=/tmp/ycsb-rocksdb-data
Then, run the workload:
./bin/ycsb run rocksdb -s -P workloads/workloada -p rocksdb.dir=/tmp/ycsb-rocksdb-data
rocksdb.dir
- (required) A path to a folder to hold the RocksDB data files.- EX.
/tmp/ycsb-rocksdb-data
- EX.
rocksdb.optionsfile
- A path to a RocksDB options file.- EX.
ycsb-rocksdb-options.ini
- EX.
If rocksdb.optionsfile
is given, YCSB will apply all RocksDB options exactly as specified in the options file.
Otherwise, YCSB will try to set reasonable defaults.