openEuler
This section describes how to compile and install RocksDB 8.3.3. RocksDB 7.9.2 is also supported, and you can refer to the following steps to install it.
- Install the dependencies.
yum install -y cmake gcc gcc-c++ gflags-devel libstdc++-devel zstd-devel
- Obtain the RocksDB source package.
yum install git -y git config --global http.sslVerify false git clone https://gitcode.com/boostkit/rocksdb.git cd rocksdb git checkout rocksdb-8.3.3-kae_zstd
- Optional: Perform a unit test.
sh build.sh UTONLY
The test is successful if information shown in the following figure is displayed:

- Compile RocksDB in Release mode.
sh build.sh
- By default, the Release mode is used. You can specify the compilation mode to Debug, RelWithDebInfo, or Release as required.
sh build.sh Release
- By default, build.sh enables all Kunpeng acceleration features, including KSAL and KAEZstd. You can add options to disable unnecessary features.
sh build.sh Release DISABLE_KSAL DISABLE_KAEZSTD
- DISABLE_KSAL: disables KSAL algorithm acceleration.
- DISABLE_KAEZSTD: disables KAEZstd algorithm acceleration.
- By default, the Release mode is used. You can specify the compilation mode to Debug, RelWithDebInfo, or Release as required.
- After the compilation, run the following command to check whether required features are enabled:
ldd build/librocksdb.so.8.3.3
- Install RocksDB.
cd ../build make install
- Optional: Perform a performance test.
cd script sh test_perf_all.sh
After the execution is complete, you can view performance data in the rocksdb/test_data directory.
It takes about 10 hours to execute all test cases. You can change the key-value size in line 8 and the number of databases in line 13 to adjust execution time or modify test cases. The default read/write path is /mnt/rocksdb_data/test. You can change the path by specifying basedir in the second line of the test_perf_all.sh script. Before running the script, ensure that the path is available.
To mount a device to a specified path, run the following commands (replace nvme0n1 as required):
mkfs.ext4 /dev/nvme0n1 mount /dev/nvme0n1 /mnt/rocksdb_data/test

