-
Notifications
You must be signed in to change notification settings - Fork 716
Open
Description
AFAIK, MyRocks doesn't run build/tools/build_detect_platform provided with RocksDB to detect which flags can be used at run time. CMakeLists.txt for storage/rocksdb tries to figure some of them out. But ones that matter for performance are missing. The easy way to stay current is to compile pure-RocksDB with 'make V=1 VERBOSE=1 release' to determine which flags are used, and then manually set them when running cmake.
I don't expect this to be fixed in FB MySQL. Anyone who wants to use MyRocks should get it from Percona or MariaDB. This is open as a reminder for people at Percona and MariaDB and for me too.
Important ones include:
- -DNDEBUG to disable debug code
- some of -DHAVE_SSE42, -DHAVE_CLMUL, -march=native -msse -msse4.2 -mpclmul to get fast CRC32
This is my current script for Ubuntu 16.04:
RXF=" -DROCKSDB_DEFAULT_TO_ADAPTIVE_MUTEX=1 -DROCKSDB_SUPPORT_THREAD_LOCAL"
RXF+=" -DHAVE_SSE42 -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_MALLOC_USABLE_SIZE"
RXF+=" -DHAVE_PCLMUL"
CXXF="-march=native -DNDEBUG"
CXXF+=" -msse -msse4.2 -mpclmul"
CXXF+=" $RXF"
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SSL=system -DWITH_ZLIB=bundled -DMYSQL_MAINTAINER_MODE=0 -DENABLED_LOCAL_INFILE=1 -DENABLE_DTRACE=0 -DCMAKE_CXX_FLAGS="$CXXF" -DCMAKE_INSTALL_PREFIX=$1 \
-DWITH_SNAPPY=/usr/lib/x86_64-linux-gnu \
-DWITH_LZ4=/usr/lib/x86_64-linux-gnu \
-DWITH_ZSTD=system
Metadata
Metadata
Assignees
Labels
No labels