This week you will install RocksDB and run DB_Bench on your own system.
Follow the guide below. If you have any questions, don't hesitate to contact me via email (Mijin An / [email protected])
NOTE: This lab is based on the Linux environment. If you don't have a Linux machine, use VirturalBox. (Recommend Ubuntu 18.04)
Linux - Ubuntu
- Upgrade gcc version at least 4.8
- gflags:
sudo apt-get install libgflags-dev
If this doesn't work, here's a nice tutorial: (http://askubuntu.com/questions/312173/installing-gflags-12-04) - snappy:
sudo apt-get install libsnappy-dev
- zlib:
sudo apt-get install zlib1g-dev
- bzip2:
sudo apt-get install libbz2-dev
$ git clone https://github.com/facebook/rocksdb
$ cd rocksdb
$ make
$ make check
$ ./db_bench
You can see options of db_bench
using below command (Details):
$ ./db_bench --help
For the report, run the below command and measure the performance of RocksDB on your system:
Update
-db="/path/to/datadir"
path according to your experimetal environment
$ ./db_bench --benchmarks="readrandomwriterandom" \
-db="/path/to/datadir" \
-use_direct_io_for_flush_and_compaction=true \
-use_direct_reads=true \
-duration=600 \
-statistics \
-stats_interval_seconds=10 2>&1 | tee result.txt
At the end of the benchmark, you can see the below result:
...
readrandomwriterandom : 53.084 micros/op 18838 ops/sec; ( reads:10172700 writes:1130299 total:1000000 found:4076910)
...
micros/op
: Microseconds spent processing one operationops/sec
: Processed operations per second
Show all of the above results in your report.
- Run DB_Bench to benchmark RocksDB on your system
- Present the experimental results
Organize the results into a single report and submit it. Follow the submission guide for your report.