Synchronous Test
After installing the KAELz4 library, perform operations described in this section to test its synchronous functions and performance using test scripts of the open source compression algorithm in /KAE/KAELz4/open_source/lz4-1.9.4/test.
- Install KAELz4.
- Test the functions of the LZ4 compression library.
1 2 3
cd /KAE/KAELz4/open_source/lz4-1.9.4/tests make ./fullbench datagen
- Test the performance.
- Set the environment variable LD_LIBRARY_PATH and enable the LZ4 library.
1export LD_LIBRARY_PATH=/usr/local/kaelz4/lib:$LD_LIBRARY_PATH
- 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.
- Go to the lzbench-master-raw directory 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)
- Go to the 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)
- Set the environment variable LD_LIBRARY_PATH and enable the LZ4 library.
- Test the bandwidth.
- Set the environment variable LD_LIBRARY_PATH and enable the LZ4 library.
1export LD_LIBRARY_PATH=/usr/local/kaelz4/lib:$LD_LIBRARY_PATH
- Compile the bandwidth test tool in the /KAE/KAELz4/test/perftest directory.
1 2
cd KAE/KAELz4/test/perftest make
- 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
- Set the environment variable LD_LIBRARY_PATH and enable the LZ4 library.
Parent topic: Testing the KAELz4 Library