Setup YCSB & MapKeeper to benchmark LevelDB

1 minute read

LevelDB gets its own benchmark binary called “db_bench” under the directory “out-shared” after make. But there are other tools could benchmark LevelDB like MapKeeper. YCSB is a Yahoo! cloud service benchmark without the support for LevelDB. It is a possibility to constitute YCSB into MapKeeper to benchmark LevelDB. Here are my so far steps on doing so with an RHEL 7 on AWS.

  1. Install Java & Maven
    1. sudo yum install java-1.7.0-openjdk-devel
       sudo tar xzf apache-maven-3.3.9-bin.tar.gz & cd /opt
       sudo ln -s apache-maven-3.3.9 maven
       sudo vi /etc/profile.d/ -- to setup environment variable
       export M2_HOME=/opt/maven
       export PATH=${M2_HOME}/bin:${PATH}
  2. source /etc/profile.d/
  3. mvn -version -- to make sure maven is installed with the right version
  • Install Libevent
    1. wget
      tar xfvz libevent-2.0.12-stable.tar.gz
      cd libevent-2.0.12-stable
      ./configure --prefix=/usr/local
      make && sudo make install
  • Install Boost
    1. Boost 1.48.0
      1. wget
        tar xfvz boost_1_48_0.tar.gz
        cd boost_1_48_0
        ./ --prefix=/usr/local
        sudo ./b2 install 
    2. Boost 1.53
      1. sudo yum install boost-devel
  • Install Thrift
    1. Steps
      1. wget
        tar xfvz thrift-0.8.0.tar.gz
        cd thrift-0.8.0
        ./configure --prefix=/usr/local
    2. Make sure that
      1. Building C++ Library ......... : yes
        Building TNonblockingServer .. : yes
      2. make && sudo make install
        Bug report:
        1. Include patch:
        2. Modified /usr/local/include/thrift/protocol/TProtocol.h and
          /usr/local/include/thrift/TApplicationException.h to include <stdint.h>
        3. Include patch:
  • Install YCSB in MapKeeper
    1. cd $MKROOT/ycsb
      git clone git://
      cd YCSB
      mvn clean package
    2. ./bin/ycsb load mapkeeper -P ./workloads/workloada -- to see if it work
  • Install LevelDB on CentOS 7/RHEL 7 p.s. Libs work a little different on CentOS than it on Ubuntu or macOS
    git clone
     cd leveldb && make
     sudo cp include/leveldb /usr/local/include -rf
     sudo cp out-shared/libleveldb.* /usr/local/lib
     * sudo vi /etc/ -- let bash know you lib are here by adding the following lines
     sudo /sbin/ldconfig –v -- flush the settings
     ./db_bench to see if LevelDB works
  • Run the benchmark in MapKeeper
    1. cd mapkeeper/leveldb && make
      1. possible bug 1: libstdcpp3.hpp
        1. solution: add this patch into the .hpp file:
      2. possible bug 2: TIME_UTC is not correct
        1. solution: change all TIME_UTC into TIME_UTC_ in that .xtime file
      3. possible bug 3: lboost-thread not found
        1. solution: install a boost with version higher than 1.48.0
    2. ./bin/ycsb load mapkeeper -P ./workloads/workloada
      1. I haven't done it yet without bugs so hope anyone could help? :)

Good Enough? Maybe