Installation Guide
This document provides guidance based on the Kunpeng server and the openEuler and Debian OSs. Before performing operations, ensure that your software and hardware meet the requirements.
| Item | Specifications |
|---|---|
| CPU |
|
| Item | Version |
|---|---|
| OS |
|
| RocksDB |
|
| Software Package | Description | How to Obtain |
|---|---|---|
| BoostKit-KSAL_1.10.0.zip | KSAL closed-source algorithm package, which is used to enable Kunpeng acceleration. | Kungpeng community |
| KAE-kae2.zip | KAE source package, which is used to install the KAE driver and KAEZstd (KAE 2.0 applies to openEuler kernel 5.1x and Debian kernel 5.15.x.) | Open-source community |
Kunpeng Storage Acceleration Library (KSAL) is a Huawei-developed closed-source library. Kunpeng Accelerator Engine (KAE) is a hardware acceleration solution available only on Kunpeng processors.
KSAL provides acceleration packages such as storage CRC, EC, and prefetch algorithms. It uses algorithms optimized for the Kunpeng platform to replace open-source algorithms, improving storage performance.
Hotspot functions, such as CRC and memcpy, exist in RocksDB read/write processes. Using the optimized algorithms can improve the read/write performance of RocksDB.
Obtain BoostKit-KSAL_1.10.0.zip by following Software Packages and save it to the
/homedirectory.Decompress BoostKit-KSAL_1.10.0.zip in the
/homedirectory.cd /home unzip BoostKit-KSAL_1.10.0.zipInstall the decompressed RPM package.
rpm -ivh /home/libksal-release-1.10.0.oe1.aarch64.rpmCheck the RPM installation result.
rpm -qi libksalThe command output is as follows:
Name : libksal Version : 1.10.0 Release : 1 Architecture: aarch64 Install Date: Wed 12 Feb 2025 03:25:39 PM CST Group : Unspecified Size : 808257 License : GPL Signature : (none) Source RPM : libksal-1.10.0-1.src.rpm Build Date : Mon 16 Dec 2024 02:50:00 PM CST Build Host : buildhost Summary : Kunpeng Storage Acceleration Library Description : Kunpeng Storage Acceleration Library Product Name: Kunpeng BoostKit Product Version: 24.0.0 Component Name: BoostKit-KSAL Component Version: 1.10.0 Component AppendInfo: kunpeng
openEuler
In RocksDB write scenarios, when a large amount of data is written, the background thread needs to compact the data. If the compaction is slow, data writing may be temporarily interrupted. During compaction, a compression algorithm is invoked to compress data. Optimizing the compression algorithm can effectively improve the compaction efficiency and RocksDB write performance.
KAE is a hardware acceleration solution based on the Kunpeng 920 processor. It includes KAE encryption and decryption, KAEZip, KAELz4, and KAEZstd. When RocksDB uses zstd as the compression algorithm during compaction, KAEZstd can be used to accelerate the process.
For details about how to apply for and install a license, see Huawei Server iBMC License User Guide.
Obtain KAE-kae2.zip by following Software Packages and save it to the
/homedirectory.Decompress KAE-kae2.zip in the
/homedirectory and go to the KAE source package directory.cd /home unzip KAE-kae2.zip cd KAE-kae2Install the dependency.
yum install -y numactl-devel pciutils openssl-devel automake m4 perl libtool zlib lzma lz4 make patch yum install -y kernel-devel-5.10.0-216.0.0.115.oe2203sp4.aarch64When installing kernel-devel, run
uname -rto query the current kernel version. The kernel-devel version must be the same as the current kernel version.In the KAE source package directory, perform the following operations to install KAE modules.
Install the kernel driver.
Run the following command:
sh build.sh driverCheck whether the accelerator engine file system exists.
ll /sys/class/uacce/The command output is as follows:
lrwxrwxrwx. 1 root root 0 Aug 22 17:14 hisi_hpre-2 -> ../../devices/pci0000:78/0000:78:00.0/0000:79:00.0/uacce/hisi_hpre-2 lrwxrwxrwx. 1 root root 0 Aug 22 17:14 hisi_hpre-3 -> ../../devices/pci0000:b8/0000:b8:00.0/0000:b9:00.0/uacce/hisi_hpre-3 lrwxrwxrwx. 1 root root 0 Aug 22 17:14 hisi_sec2-0 -> ../../devices/pci0000:74/0000:74:01.0/0000:76:00.0/uacce/hisi_sec2-0 lrwxrwxrwx. 1 root root 0 Aug 22 17:14 hisi_sec2-1 -> ../../devices/pci0000:b4/0000:b4:01.0/0000:b6:00.0/uacce/hisi_sec2-1 lrwxrwxrwx. 1 root root 0 Aug 22 17:14 hisi_zip-4 -> ../../devices/pci0000:74/0000:74:00.0/0000:75:00.0/uacce/hisi_zip-4 lrwxrwxrwx. 1 root root 0 Aug 22 17:14 hisi_zip-5 -> ../../devices/pci0000:b4/0000:b4:00.0/0000:b5:00.0/uacce/hisi_zip-5Check whether the driver is installed.
lsmod | grep uacceThe command output is as follows:
uacce 32768 3 hisi_sec2,hisi_qm,hisi_zip
Install the user-space driver.
Run the following command:
sh build.sh uadkCheck whether the installation is successful.
ll /usr/local/lib/libwd*The command output is as follows:
-rwxr-xr-x. 1 root root 961 Aug 22 17:23 /usr/local/lib/libwd_comp.la lrwxrwxrwx. 1 root root 19 Aug 22 17:23 /usr/local/lib/libwd_comp.so -> libwd_comp.so.2.6.0 lrwxrwxrwx. 1 root root 19 Aug 22 17:23 /usr/local/lib/libwd_comp.so.2 -> libwd_comp.so.2.6.0 -rwxr-xr-x. 1 root root 377872 Aug 22 17:23 /usr/local/lib/libwd_comp.so.2.6.0 -rwxr-xr-x. 1 root root 973 Aug 22 17:23 /usr/local/lib/libwd_crypto.la lrwxrwxrwx. 1 root root 21 Aug 22 17:23 /usr/local/lib/libwd_crypto.so -> libwd_crypto.so.2.6.0 lrwxrwxrwx. 1 root root 21 Aug 22 17:23 /usr/local/lib/libwd_crypto.so.2 -> libwd_crypto.so.2.6.0 -rwxr-xr-x. 1 root root 715616 Aug 22 17:23 /usr/local/lib/libwd_crypto.so.2.6.0 -rwxr-xr-x. 1 root root 907 Aug 22 17:23 /usr/local/lib/libwd.la lrwxrwxrwx. 1 root root 14 Aug 22 17:23 /usr/local/lib/libwd.so -> libwd.so.2.6.0 lrwxrwxrwx. 1 root root 14 Aug 22 17:23 /usr/local/lib/libwd.so.2 -> libwd.so.2.6.0 -rwxr-xr-x. 1 root root 1342080 Aug 22 17:23 /usr/local/lib/libwd.so.2.6.0
Compile and install KAEZstd.
Run the following command to install KAEZstd:
sh build.sh zstdCheck whether the installation is successful.
ll /usr/local/kaezstd/If the following information is displayed, the installation is successful:
drwxr-xr-x 2 root root 4096 Jun 11 22:29 bin drwxr-xr-x 2 root root 4096 Jun 11 22:29 include drwxr-xr-x 3 root root 4096 Jun 11 22:29 lib drwxr-xr-x 3 root root 4096 Jun 11 22:29 shareView generated files.
ll /usr/local/kaezstd/bin/The command output is as follows:
lrwxrwxrwx 1 root root 4 Jun 11 22:29 unzstd -> zstd -rwxr-xr-x 1 root root 986192 Jun 11 22:29 zstd lrwxrwxrwx 1 root root 4 Jun 11 22:29 zstdcat -> zstd -rwxr-xr-x 1 root root 3869 Jun 11 22:29 zstdgrep -rwxr-xr-x 1 root root 30 Jun 11 22:29 zstdless lrwxrwxrwx 1 root root 4 Jun 11 22:29 zstdmt -> zstd
Check the number of hardware device queues to determine whether the program has invoked KAE to accelerate the zstd algorithm. For example, run the following command to check the number of queues corresponding to the hisi_zip driver module. By default, the number is 256.
watch -n 0.2 cat /sys/class/uacce/hisi_zip-*/available_instancesThe command output is as follows:
Every 0.2s: cat /sys/class/uacce/hisi_zip-0/available_instances/sys/class/uacce/hisi_zip... localhost.localdomain: 256 256 256 256Start another window and perform operations in Function Test. If the number of queues changes, hardware-based KAE compression acceleration is enabled.
Every 0.2s: cat /sys/class/uacce/hisi_zip-0/available_instances/sys/class/uacce/hisi_zip... localhost.localdomain: 256 254 256 256
Debian
In RocksDB write scenarios, when a large amount of data is written, the background thread needs to compact the data. If the compaction is slow, data writing may be temporarily interrupted. During compaction, a compression algorithm is invoked to compress data. Optimizing the compression algorithm can effectively improve the compaction efficiency and RocksDB write performance.
KAE is a hardware acceleration solution based on the Kunpeng 920 processor. It includes KAE encryption and decryption, KAEZip, and KAEZstd. When RocksDB uses zstd as the compression algorithm during compaction, KAEZstd can be used to accelerate the process.
For details about how to apply for and install a license, see Huawei Server iBMC License User Guide.
Obtain KAE-kae2.zip by following Software Packages and save it to the
/homedirectory.Decompress KAE-kae2.zip in the
/homedirectory and go to the KAE source package directory.cd /home unzip KAE-kae2.zip cd KAE-kae2Install the dependency.
apt install -y autoconf automake libtool m4 pkg-config dh-autoreconf libnuma-dev cmake dracut make liblz4-devIn the KAE source package directory, perform the following operations to install KAE modules.
Install the kernel driver.
Run the following command:
bash build.sh driverIf an error is reported because the curve25519-related module is not enabled during kernel compilation, modify the configuration based on commit-eea16ad4.
Check whether the accelerator engine file system exists.
ll /sys/class/uacce/The command output is as follows:
lrwxrwxrwx. 1 root root 0 Aug 22 17:14 hisi_hpre-2 -> ../../devices/pci0000:78/0000:78:00.0/0000:79:00.0/uacce/hisi_hpre-2 lrwxrwxrwx. 1 root root 0 Aug 22 17:14 hisi_hpre-3 -> ../../devices/pci0000:b8/0000:b8:00.0/0000:b9:00.0/uacce/hisi_hpre-3 lrwxrwxrwx. 1 root root 0 Aug 22 17:14 hisi_sec2-0 -> ../../devices/pci0000:74/0000:74:01.0/0000:76:00.0/uacce/hisi_sec2-0 lrwxrwxrwx. 1 root root 0 Aug 22 17:14 hisi_sec2-1 -> ../../devices/pci0000:b4/0000:b4:01.0/0000:b6:00.0/uacce/hisi_sec2-1 lrwxrwxrwx. 1 root root 0 Aug 22 17:14 hisi_zip-4 -> ../../devices/pci0000:74/0000:74:00.0/0000:75:00.0/uacce/hisi_zip-4 lrwxrwxrwx. 1 root root 0 Aug 22 17:14 hisi_zip-5 -> ../../devices/pci0000:b4/0000:b4:00.0/0000:b5:00.0/uacce/hisi_zip-5Check whether the driver is installed.
lsmod | grep uacceThe command output is as follows:
uacce 32768 3 hisi_sec2,hisi_qm,hisi_zip
Install the user-space driver.
Run the following command:
bash build.sh uadkCheck whether the installation is successful.
ll /usr/local/lib/libwd*The command output is as follows:
-rwxr-xr-x. 1 root root 961 Aug 22 17:23 /usr/local/lib/libwd_comp.la lrwxrwxrwx. 1 root root 19 Aug 22 17:23 /usr/local/lib/libwd_comp.so -> libwd_comp.so.2.6.0 lrwxrwxrwx. 1 root root 19 Aug 22 17:23 /usr/local/lib/libwd_comp.so.2 -> libwd_comp.so.2.6.0 -rwxr-xr-x. 1 root root 377872 Aug 22 17:23 /usr/local/lib/libwd_comp.so.2.6.0 -rwxr-xr-x. 1 root root 973 Aug 22 17:23 /usr/local/lib/libwd_crypto.la lrwxrwxrwx. 1 root root 21 Aug 22 17:23 /usr/local/lib/libwd_crypto.so -> libwd_crypto.so.2.6.0 lrwxrwxrwx. 1 root root 21 Aug 22 17:23 /usr/local/lib/libwd_crypto.so.2 -> libwd_crypto.so.2.6.0 -rwxr-xr-x. 1 root root 715616 Aug 22 17:23 /usr/local/lib/libwd_crypto.so.2.6.0 -rwxr-xr-x. 1 root root 907 Aug 22 17:23 /usr/local/lib/libwd.la lrwxrwxrwx. 1 root root 14 Aug 22 17:23 /usr/local/lib/libwd.so -> libwd.so.2.6.0 lrwxrwxrwx. 1 root root 14 Aug 22 17:23 /usr/local/lib/libwd.so.2 -> libwd.so.2.6.0 -rwxr-xr-x. 1 root root 1342080 Aug 22 17:23 /usr/local/lib/libwd.so.2.6.0
Compile and install KAEZstd.
Run the following command to install KAEZstd:
bash build.sh zstdCheck whether the installation is successful.
ll /usr/local/kaezstd/If the following information is displayed, KAEZstd is installed:
drwxr-xr-x 2 root root 4096 Jun 11 22:29 bin drwxr-xr-x 2 root root 4096 Jun 11 22:29 include drwxr-xr-x 3 root root 4096 Jun 11 22:29 lib drwxr-xr-x 3 root root 4096 Jun 11 22:29 shareView generated files.
ll /usr/local/kaezstd/bin/The command output is as follows:
lrwxrwxrwx 1 root root 4 Jun 11 22:29 unzstd -> zstd -rwxr-xr-x 1 root root 986192 Jun 11 22:29 zstd lrwxrwxrwx 1 root root 4 Jun 11 22:29 zstdcat -> zstd -rwxr-xr-x 1 root root 3869 Jun 11 22:29 zstdgrep -rwxr-xr-x 1 root root 30 Jun 11 22:29 zstdless lrwxrwxrwx 1 root root 4 Jun 11 22:29 zstdmt -> zstd
Check the number of hardware device queues to determine whether the program has invoked KAE to accelerate the zstd algorithm. For example, run the following command to check the number of queues corresponding to the hisi_zip driver module. By default, the number is 256.
watch -n 0.2 cat /sys/class/uacce/hisi_zip-*/available_instancesThe command output is as follows:
Every 0.2s: cat /sys/class/uacce/hisi_zip-0/available_instances/sys/class/uacce/hisi_zip... localhost.localdomain: 256 256 256 256Start another window and perform operations in db_bench Function Test. If the number of queues changes, hardware-based KAE compression acceleration is enabled.
Every 0.2s: cat /sys/class/uacce/hisi_zip-0/available_instances/sys/class/uacce/hisi_zip... localhost.localdomain: 256 254 256 256
openEuler
This section describes how to compile and install RocksDB 6.1.2 and 8.3.3. RocksDB 8.3.3 is used as an example.
Install the dependency.
yum install -y cmake gcc gcc-c++ gflags-devel libstdc++-devel zstd-develObtain the RocksDB source code and apply the patch.
git clone https://github.com/facebook/rocksdb.git cd rocksdb git checkout 791a7fe4023ac795072a9e0cbfc679a3764a2ba0 wget https://gitcode.com/boostkit/rocksdb/raw/master/rocksdb-8.3.3-kae_zstd.patch git apply rocksdb-8.3.3-kae_zstd.patchPerform a unit test.
sh build.sh UTONLYThe test is successful if the following information is displayed.

Compile RocksDB in Release mode.
sh build.shBy default, the Release mode is used. You can specify the compilation mode to Debug, RelWithDebInfo, or Release as required.
sh build.sh ReleaseBy 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_KAEZSTDDISABLE_KSALindicates that KSAL is disabled.DISABLE_KAEZSTDindicates that KAEZstd is disabled.
After the compilation, run the following command to check whether required features are enabled:
ldd build/librocksdb.so.8.3.3KSAL has been enabled if the following information is displayed:

KAEZstd has been enabled if the following information is displayed:

Install RocksDB.
cd build make installTest the performance.
cd ../script sh test_perf_all.shAfter the execution is complete, you can view performance data in the
rocksdb/test_datadirectory.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. To change the path, edit the second line basedir in thetest_perf_all.shscript to the specified path. 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):
>```sh
>mkfs.ext4 /dev/nvme0n1
>mount /dev/nvme0n1 /mnt/rocksdb_data/test
>```Debian
This section describes how to compile and install RocksDB 6.1.2.
Install the dependency.
apt install -y libsnappy-dev libzstd-dev liblz4-dev libgflags-dev libbison-dev makeObtain the RocksDB source code and apply the patch.
git clone https://github.com/facebook/rocksdb.git cd rocksdb git checkout 2b38e2dd6602a17a2010308580fd5d8c91dea650 wget https://gitcode.com/boostkit/rocksdb/raw/master/6.1.2-optimization.patch git apply 6.1.2-optimization.patchCompile RocksDB in Release mode.
bash build.sh- During compilation, ensure that the GNU Assembler version is 2.41 or later.
- By default, the Release mode is used to compile build.sh. You can specify the compilation mode to Debug, RelWithDebInfo, or Release as required. For example, use the following command to specify the Release mode:
bash build.sh ReleaseEnable features.
After the compilation is complete, run the following command to enable KAEZstd:
export LD_LIBRARY_PATH=/usr/local/kaezstd/lib:/usr/local/lib:$LD_LIBRARY_PATHCheck whether the feature is enabled.
ldd librocksdb.soKAEZstd has been enabled if the following information is displayed:

Install RocksDB.
make installUse the test tool db_bench to test the functions.
./db_bench --compression_type=zstd
Change History
| Date | Description |
|---|---|
| 2025-12-30 | This is the third official release. Adapted RocksDB compilation and installation for Debian. |
| 2024-06-30 | This is the second official release. Supports RocksDB hardware offload. |
| 2025-12-30 | This is the first official release. |