brpc icon indicating copy to clipboard operation
brpc copied to clipboard

Implement streaming lz4 compession

Open zhwufd opened this issue 4 years ago • 4 comments

Compress method Compress size(B) Compress time(us) Decompress time(us) Compress throughput(MB/s) Decompress throughput(MB/s) Compress ratio Snappy 128 0.630420 0.676840 193.633312 180.353278 37.500000% Gzip 128 4.886340 0.804860 24.981952 151.666517 47.656250% Zlib 128 4.376520 0.665340 27.892095 183.470575 38.281250% Lz4 128 0.614140 0.359200 198.766263 339.839400 58.115935%

          Snappy                1024            0.690060            0.697920                   1415.184911                   1399.247048                     8.789062%
            Gzip                1024            7.144860            1.752040                    136.680425                    557.385962                     6.640625%
            Zlib                1024            6.703100            1.304000                    145.688189                    748.897623                     5.468750%
             Lz4                1024            0.781000            0.520440                   1250.400128                   1876.417070                     7.810039%

          Snappy               16384            4.155420            4.253955                   3760.149466                   3673.052421                     4.962158%
            Gzip               16384           55.165820           19.621680                    283.236974                    796.313070                     0.781250%
            Zlib               16384           48.379395           13.014209                    322.968077                   1200.610811                     0.708008%
             Lz4               16384            3.494336            3.105762                   4471.521994                   5030.971921                     1.227403%

          Snappy               32768            7.633301            8.515039                   4093.903921                   3669.977292                     4.824829%
            Gzip               32768          105.522363           37.225879                    296.145756                    839.469770                     0.537109%
            Zlib               32768           92.468164           24.807813                    337.954152                   1259.683819                     0.500488%
             Lz4               32768            6.346191            4.902539                   4924.213280                   6374.248038                     1.037690%

          Snappy              524288          121.535938          143.765625                   4114.009488                   3477.882839                     4.747772%
            Gzip              524288         2128.425000          564.970312                    234.915489                    885.002254                     0.305939%
            Zlib              524288         1917.210938          367.104688                    260.795508                   1362.009304                     0.303650%
             Lz4              524288          105.067188           66.967187                   4758.859658                   7466.343125                     0.857538%

LZ4 compress/decompress throughput outperform snappy, gzip and zlib.

zhwufd avatar Nov 20 '21 18:11 zhwufd

本地Makefile编译没问题,travis-ci编译不过。

zhwufd avatar Nov 25 '21 04:11 zhwufd

这个PR有考虑继续跟进吗?

ehds avatar Nov 15 '23 08:11 ehds

这个PR有考虑继续跟进吗?

我这周再优化下。

zhwufd avatar Nov 16 '23 00:11 zhwufd

这个PR有考虑继续跟进吗?

wanghenshui avatar Jul 19 '24 03:07 wanghenshui