【spdk】isal加速库数据压缩测试

参考

https://www.intel.cn/content/www/cn/zh/developer/articles/guide/data-compression-tuning-guide-on-xeon-systems.html

https://github.com/intel/isa-l/blob/master/README.md

1.Installing Intel ISA-L

Some of the low-level core functions of Intel ISA-L are optimized using SIMD. Intel ISA-L also provides optimization functions for CPUs that do not support or support only a small number of SIMD instructions. It has been tuned in many details with CRC, DEFLATE, and Huffman coding optimizations for compression algorithms. It also supports multi-threading and offers great performance improvements over zlib*. The compression output of Intel ISA-L is completely compatible with the gzip* format, even if there is no change upon decompression.

The standard Linux installation from source code method is used for the compilation and installation of Intel ISA-L.

  1. Download source code from Github
  2. Compilation commands shown below. For detailed information, refer to the README file.
./autogen.sh

./configure

make

sudo make install

2.Using Intel ISA-L

Intel ISA-L provides the igzip executable program, which is used in a similar way to gzip. Intel ISA-L supports the RFC 1951 data compression algorithm and provides its own compression/decompression interfaces. It supports 4 levels (level [0,3]) of compression. The higher the level, the greater the compression ratio, with 3 being the highest.

$ igzip -h

Usage: igzip [options] [infiles]

Options:

-h, --help help, print this message

-# use compression level # with 0 <= # <= 3

-o <file> output file

-c, --stdout write to stdout

-d, --decompress decompress file

-z, --compress compress file (default)

Intel ISA-L provides a performance test program. The “make other” command can be used to generate an igzip/igzip_perf performance test program which can test Zlib’s and Intel ISA-L’s compression performance respectively. To use the igzip_perf for testing, the basic command is “igzip_perf -l 1 file”, where the “-z” parameter is used to test the zlib performance…

/igzip_perf -h

Usage: igzip_perf [options] <infile>

-h help, print this message

The options -l, -f, -z may be used up to 32 times

-l <level> isa-l stateless deflate level to test (0-3)

-f <level> isa-l stateful deflate level to test (0-3)

-z <level> zlib deflate level to test

-d <time> approx time in seconds for deflate (at least 0)

-i <time> approx time in seconds for inflate (at least 0)

-s performance test isa-l stateful inflate

-t performance test isa-l stateless inflate

-u performance test zlib inflate

…

3.Examples


 ./spdk-23.09/isa-l/igzip/igzip_perf  -l 1 ./isal_file
igzip_perf-> compress level: 1 flush_type: 0 block_size: 0
  file info-> name: ./isal_file file_size: 1073741824 compress_size: 1040465 ratio: 0.10%

    isal_stateless_deflate-> runtime =    3061146 usecs, bandwidth 30064 MB in 3.0611 sec = 9821.41 MB/s

    isal_stateless_inflate-> runtime =    3132379 usecs, bandwidth 15032 MB in 3.1324 sec = 4799.03 MB/s
    
./spdk-23.09/isa-l/igzip/igzip_perf  -z 1 ./isal_file
igzip_perf-> compress level: 1 flush_type: 0 block_size: 0
  file info-> name: ./isal_file file_size: 1073741824 compress_size: 4683744 ratio: 0.44%

    zlib_deflate->           runtime =    4435214 usecs, bandwidth 3221 MB in 4.4352 sec = 726.28 MB/s

    isal_stateless_inflate-> runtime =    3004605 usecs, bandwidth 27917 MB in 3.0046 sec = 9291.50 MB/s
    
./spdk-23.09/isa-l/igzip/igzip_perf  -z 1 -u ./isal_file
igzip_perf-> compress level: 1 flush_type: 0 block_size: 0
  file info-> name: ./isal_file file_size: 1073741824 compress_size: 4683744 ratio: 0.44%

    zlib_deflate->           runtime =    4238310 usecs, bandwidth 3221 MB in 4.2383 sec = 760.03 MB/s

    zlib_inflate->           runtime =    3013896 usecs, bandwidth 12884 MB in 3.0139 sec = 4275.16 MB/s
  • 19
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值