Rate This Document
Findability
Accuracy
Completeness
Readability

Enabling KAEzip

This section describes how to enable KAEzip and verify the improved performance after enabling KAEzip in the Greenplum cluster. Perform the operations in this section on all nodes.

  1. Modify KAEzip.
    After KAEzip is installed, 256 instances are provided by default. To make adjustments based on actual requirements and hardware capabilities, use either of the following methods to modify KAEzip.
    • Method 1: Modify KAEzip temporarily. The temporary modification becomes invalid when the OS is restarted or the kernel module is reloaded.
      1. Uninstall the currently loaded module hisi_zip.
        rmmod hisi_zip
      2. Reload and specify the pf_q_num parameter (number of instances). It is recommended that the value be set to the maximum value 1024.
        modprobe hisi_zip pf_q_num=1024
    • Method 2: Modify KAEzip permanently. The permanent modification still takes effect when the OS is restarted or the kernel module is reloaded.
      1. Open the /etc/modprobe.d/hisi_zip.conf file.
        vim /etc/modprobe.d/hisi_zip.conf
      2. Press i to enter the insert mode and change the value of options hisi_zip pf_q_num to 1024. The maximum number of instances that can be set is 1024. Change it based on actual requirements.
        options hisi_zip pf_q_num=1024
      3. Press Esc, type :wq!, and press Enter to save the file and exit.
      4. The setting takes effect automatically when the OS is restarted or the kernel module is reloaded.
  2. Enable KAEzip.
    1. Configure the environment variable LD_LIBRARY_PATH for Greenplum to find and use the KAEzip library during running.
      export LD_LIBRARY_PATH=/usr/local/kaezip/lib:$LD_LIBRARY_PATH
    2. Optional: If KAE 2.0 is used, run the following command on all nodes:
      chown -R gpadmin:gpadmin /dev/hisi_zip*
  3. Verify whether KAEzip is in use.
    1. To ensure that the modification takes effect, restart Greenplum and run the expected SQL statement to check the performance improvement.
    2. When Greenplum is running, run the watch command to keep monitoring the number of available instances.
      • If KAE 1.0 is used, run the following command:
        watch -n 0.2 cat /sys/class/uacce/hisi_zip*/attrs/available_instances
      • If KAE 2.0 is used, run the following command:
        watch -n 0.2 cat /sys/class/uacce/hisi_zip*/available_instances
  4. Optional: Perform a TPC-H test to obtain the performance improvement effect after KAEzip is enabled. For details about the test procedure, see HammerDB Test Guide.
    After KAEzip is enabled, the decompression speed during query is accelerated. In scenarios where one request is processed at a time and the I/O ratio is high, the end-to-end performance is improved by 10%. Figure 1 shows the performance comparison before and after enabling KAE.
    Figure 1 Performance comparison before and after enabling KAE