Rate This Document
Findability
Accuracy
Completeness
Readability

Testing the KAELz4 Library

After installing the KAELz4 library, perform operations described in this section to test its functions and performance using test scripts of the open source compression algorithm in /KAE/KAELz4/open_source/lz4-1.9.4/test.

  1. Install KAELz4.
  2. Test the functions of the LZ4 compression library.
    1
    2
    3
    cd /KAE/KAELz4/open_source/lz4-1.9.4/tests
    make
    ./fullbench datagen
    
  3. Test the performance.
    1. Set the environment variable LD_LIBRARY_PATH and enable the LZ4 library.
      1
      export LD_LIBRARY_PATH=/usr/local/kaelz4/lib:$LD_LIBRARY_PATH
      
    2. Compile the performance test tool in the /KAE/KAELz4/test/perftest directory.
      1
      2
      cd KAE/KAELz4/test/perftest
      sh lzbench_test.sh
      

      Two subdirectories are generated in the current directory: lzbench-master-raw and lzbench-master.

    3. Go to lzbench-master-raw and run the lzbench executable file to test the baseline performance.
      1
      2
      cd lzbench-master-raw
      numactl -C 1 ./lzbench -relz4 -b128 -i1 -j -m1024 ../../../../scripts/compressTestDataset/
      
      Command output:
      1
      2
      3
      4
      Compressor name         Compress. Decompress.  Orig. size  Compr. size  Ratio Filename
      memcpy                  19698 MB/s 19921 MB/s    99508529     99508529 100.00 7 files
      lz4 1.9.4                 496 MB/s  3086 MB/s    99508529     51171903  51.42 7 files
      done... (cIters=1 dIters=1 cTime=1.0 dTime=2.0 chunkSize=128KB cSpeed=0MB)
      
    4. Go to lzbench-master directory and run the lzbench executable file to test the performance of the KAELz4 library.
      1
      2
      cd lzbench-master
      numactl -C 1 ./lzbench -relz4 -b128 -i1 -j -m1024 ../../../../scripts/compressTestDataset/
      
      Command output:
      1
      2
      3
      4
      Compressor name         Compress. Decompress.  Orig. size  Compr. size  Ratio Filename
      memcpy                  20243 MB/s 18877 MB/s    99508529     99508529 100.00 7 files
      lz4 1.9.4                 822 MB/s  2817 MB/s    99508529     48176461  48.41 7 files
      done... (cIters=1 dIters=1 cTime=1.0 dTime=2.0 chunkSize=128KB cSpeed=0MB)
      
  4. Test the bandwidth.
    1. Set the environment variable LD_LIBRARY_PATH and enable the LZ4 library.
      1
      export LD_LIBRARY_PATH=/usr/local/kaelz4/lib:$LD_LIBRARY_PATH
      
    2. Compile the bandwidth test tool in the /KAE/KAELz4/test/perftest directory.
      1
      2
      cd KAE/KAELz4/test/perftest
      make
      
    3. Test the compression bandwidth of the LZ4 library.
      1
      ./kaelz4_perf -m 80 -b 32 -l 640000
      
      Command output:
      1
      2
      3
      kaelz4 perf parameter: multi process 64, stream length: 640000(KB), block size: 32(KB), compress level: 1, compress function: 0, loop times: 1, g_threadnum: 15, core sequence: 0 ~ 63
      kaelz4 compress perf result:
           time used: 82891615 us, speed = 7.069 GB/s