sudo yum install boost-devel
Setup YCSB & MapKeeper to benchmark LevelDB
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.
- Install Java & Maven
-
sudo yum install java-1.7.0-openjdk-devel wget http://www-eu.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz 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/maven.sh -- to setup environment variable export M2_HOME=/opt/maven export PATH=${M2_HOME}/bin:${PATH}
-
- source /etc/profile.d/maven.sh
- mvn -version -- to make sure maven is installed with the right version
- Install Libevent
-
wget http://monkey.org/~provos/libevent-2.0.12-stable.tar.gz 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
- Boost 1.48.0
-
wget http://superb-sea2.dl.sourceforge.net/project/boost/boost/1.48.0/boost_1_48_0.tar.gz tar xfvz boost_1_48_0.tar.gz cd boost_1_48_0 ./bootstrap.sh --prefix=/usr/local sudo ./b2 install
-
- Boost 1.53
-
- Boost 1.48.0
- Install Thrift
- Steps
-
wget http://archive.apache.org/dist/thrift/0.8.0/thrift-0.8.0.tar.gz tar xfvz thrift-0.8.0.tar.gz cd thrift-0.8.0 ./configure --prefix=/usr/local
-
- Make sure that
-
Building C++ Library ......... : yes Building TNonblockingServer .. : yes
-
Bug report:make && sudo make install
- Include patch: https://issues.apache.org/jira/browse/THRIFT-2367
-
Modified /usr/local/include/thrift/protocol/TProtocol.h and /usr/local/include/thrift/TApplicationException.h to include <stdint.h>
- Include patch: https://svn.boost.org/trac/boost/attachment/ticket/6165/libstdcpp3.hpp.patch
-
- Steps
- Install YCSB in MapKeeper
-
cd $MKROOT/ycsb git clone git://github.com/brianfrankcooper/YCSB.git cd YCSB mvn clean package
-
./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 https://github.com/google/leveldb.git cd leveldb && make sudo cp include/leveldb /usr/local/include -rf sudo cp out-shared/libleveldb.* /usr/local/lib * sudo vi /etc/ld.so.conf.d/usrlocallib.conf -- let bash know you lib are here by adding the following lines /usr/local/lib sudo /sbin/ldconfig –v -- flush the settings ./db_bench to see if LevelDB works
- Run the benchmark in MapKeeper
- cd mapkeeper/leveldb && make
- possible bug 1: libstdcpp3.hpp
- solution: add this patch into the .hpp file: https://svn.boost.org/trac/boost/attachment/ticket/6165/libstdcpp3.hpp.patch
- possible bug 2: TIME_UTC is not correct
- solution: change all TIME_UTC into TIME_UTC_ in that .xtime file
- possible bug 3: lboost-thread not found
- solution: install a boost with version higher than 1.48.0
- possible bug 1: libstdcpp3.hpp
- ./bin/ycsb load mapkeeper -P ./workloads/workloada
- I haven't done it yet without bugs so hope anyone could help? :)
- cd mapkeeper/leveldb && make
Good Enough? Maybe
Comments