Unable to run Microbenchmark

62 views
Skip to first unread message

pranav shenoy

unread,
Nov 12, 2022, 10:38:18 PM11/12/22
to rocksdb
Hi,
I am trying to run the microbenchmark on Ubuntu 20.04

I ran 
make static_lib
make simple_example (just for testing if the library is build)
DEBUG_LEVEL=0 make run_microbench

Error:
microbench/db_basic_bench.o: In function `rocksdb::DBPut(benchmark::State&)':
/home/admin/pranav/rocksdb/./util/cast_util.h:21: undefined reference to `typeinfo for rocksdb::DBImpl'
/home/admin/pranav/rocksdb/./util/cast_util.h:21: undefined reference to `typeinfo for rocksdb::DB'

I have attached the screenshot with the error.

Thank you for the help.
Screen Shot 2022-11-12 at 8.36.25 PM.png

Dan Carfas

unread,
Nov 13, 2022, 5:31:59 AM11/13/22
to pranav shenoy, rocksdb
Hi Pranav,

Here is the buzz from the Speedb hive:
"I have just tried doing what you did on latest rocksdb I cloned from the GitHub repo and all was well.
Maybe (again, just to be on the safe side) run 'make clean' before 'make static_lib' "
What version are you working with?

To join the discussion about your question:  https://discord.com/channels/1001437353312796782/1041230519918141470

--
You received this message because you are subscribed to the Google Groups "rocksdb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rocksdb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rocksdb/59f65256-7293-4715-afe1-65fd069c20efn%40googlegroups.com.

Dan Carfas

unread,
Nov 13, 2022, 5:37:27 AM11/13/22
to pranav shenoy, rocksdb
also received this input from the hive:
"works for me as well, 
cd rocksdb
git checkout v7.7.3
make clean; make static lib
DEBUG_LEVEL=0 make run_microbench "

Adam Retter

unread,
Nov 15, 2022, 11:38:37 AM11/15/22
to rocksdb
I just attempted to reproduce this on a clean Ubuntu 20.04.
I am using the `HEAD` of the `main` branch.

The following works fine:
make static_lib

However `make run_microbench` fails with the error:

microbench/ribbon_bench.cc:8:10 benchmark/benchmark.h: No such file or directory

Pranav, can you confirm which branch, tag, or version you are using please?

jay.z...@yahoo.com

unread,
Nov 15, 2022, 12:01:33 PM11/15/22
to rocksdb, Adam Retter
1. you need to install googlebenchmark 1.6.0+
I think Ubuntu 20.04 apt-get may still using the pre-1.6.0+ version
Here is the steps rocksdb uses for setup their ubuntu 20.04:
```
RUN git clone --depth 1 --branch v1.7.0 https://github.com/google/benchmark.git ~/benchmark
RUN cd ~/benchmark && mkdir build && cd build && cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DBENCHMARK_ENABLE_GTEST_TESTS=0 && ninja && ninja install
```

2. You could also try using the cmake with option -DWITH_BENCHMARK=1, then run the same target make run_microbench:

--
You received this message because you are subscribed to the Google Groups "rocksdb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rocksdb+u...@googlegroups.com.
To view this discussion on the web visit

Alan Paxton

unread,
Mar 7, 2023, 7:16:18 AM3/7/23
to rocksdb
Hi, I just wanted to confirm that for me this works on a Clean Ubuntu 20.04 once I install googlebenchmark according to Jay's instructions.

I've encoded it in a minimal Dockerfile, which installs enough to build the microbenchmarks on HEAD.
Assuming you have docker installed, you can save the Dockerfile in a directory, cd there, and run:

$ docker build -t alanpaxton/rocksdb-focal-microbench:1.0 .
$ docker run -id docker.io/alanpaxton/rocksdb-focal-microbench:1.0 --name=rocksdb_microbench
$ docker exec -it rocksdb_microbench /bin/bash
# cd ~/rocksdb
# DEBUG_LEVEL=0 make run_microbench

Hope that helps

--Alan

Dockerfile
Reply all
Reply to author
Forward
0 new messages