Re: [PATCH 0/1] cover-letter/lz4: Implement lz4 with dynamic offset length.
From: Maninder Singh
Date: Thu Mar 29 2018 - 08:10:35 EST
HelloÂNick/Sergey,
Â
AnyÂsuggestionÂorÂcomments,ÂsoÂthatÂweÂcanÂchangeÂcodeÂandÂresendÂtheÂpatch?
Â
>ÂHiÂNickÂ/ÂSergey,
>Â
>Â
>ÂWeÂhaveÂcomparedÂLZ4ÂDynÂwithÂOriginalÂLZ4ÂusingÂsomeÂsamplesÂofÂrealtimeÂapplicationÂdata(4Kb)
>Âcompressed/decompressedÂbyÂZRAM.ÂForÂcomparisonÂweÂhaveÂusedÂlzbenchÂ(https://github.com/inikep/lzbench)
>ÂweÂhaveÂimplementedÂdedicatedÂLZ4ÂDynÂAPIÂ&ÂkeptÂlastÂliteralÂlengthÂasÂ6ÂtoÂavoidÂoverheadÂ
>ÂofÂchecks.ÂItÂseemsÂinÂaverageÂcaseÂthereÂisÂaÂsavingÂofÂ3~4%ÂinÂcompressionÂratioÂwithÂalmostÂsameÂcompression
>ÂspeedÂandÂminorÂlossÂinÂdecompressionÂspeedÂ(~50MB/s)ÂwhenÂcomparedÂwithÂLZ4.
>Â
>ÂComparisonÂofÂLz4ÂDynÂwithÂLZO1xÂisÂalsoÂdoneÂasÂLZO1xÂisÂdefaultÂcompressorÂofÂZRAM.
>Â
>ÂOriginalÂLZ4:
>Âsh-3.2#Â./lzbenchÂÂ-rÂÂ-elz4ÂÂdata/
>ÂlzbenchÂ1.7.3Â(32-bitÂLinux)ÂÂÂAssembledÂbyÂP.Skibinski
>ÂCompressorÂnameÂÂÂÂÂÂÂÂÂCompress.ÂDecompress.ÂCompr.ÂsizeÂÂRatioÂFilename
>ÂmemcpyÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ2205ÂMB/sÂÂ2217ÂMB/sÂÂÂÂÂÂÂÂ4096Â100.00Âdata//data_1
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ216ÂMB/sÂÂÂ761ÂMB/sÂÂÂÂÂÂÂÂ2433ÂÂ59.40Âdata//data_1
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ269ÂMB/sÂÂÂ877ÂMB/sÂÂÂÂÂÂÂÂ1873ÂÂ45.73Âdata//data_2
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ238ÂMB/sÂÂÂ575ÂMB/sÂÂÂÂÂÂÂÂ2060ÂÂ50.29Âdata//data_3
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ321ÂMB/sÂÂ1015ÂMB/sÂÂÂÂÂÂÂÂ1464ÂÂ35.74Âdata//data_4
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ464ÂMB/sÂÂ1090ÂMB/sÂÂÂÂÂÂÂÂÂ713ÂÂ17.41Âdata//data_5
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ296ÂMB/sÂÂÂ956ÂMB/sÂÂÂÂÂÂÂÂ1597ÂÂ38.99Âdata//data_6
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ338ÂMB/sÂÂÂ994ÂMB/sÂÂÂÂÂÂÂÂ2238ÂÂ54.64Âdata//data_7
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ705ÂMB/sÂÂ1172ÂMB/sÂÂÂÂÂÂÂÂÂ193ÂÂÂ4.71Âdata//data_8
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ404ÂMB/sÂÂ1150ÂMB/sÂÂÂÂÂÂÂÂ1097ÂÂ26.78Âdata//data_9
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ216ÂMB/sÂÂÂ921ÂMB/sÂÂÂÂÂÂÂÂ3183ÂÂ77.71Âdata//data_10
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ456ÂMB/sÂÂ1101ÂMB/sÂÂÂÂÂÂÂÂ1011ÂÂ24.68Âdata//data_11
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ867ÂMB/sÂÂ1202ÂMB/sÂÂÂÂÂÂÂÂÂÂ37ÂÂÂ0.90Âdata//data_12
>Â
>Â
>ÂLZ4ÂDynamicÂOffet:ÂÂ
>Âsh-3.2#Â./lzbenchÂÂ-rÂÂ-elz4_dynÂÂdata/
>ÂlzbenchÂ1.7.3Â(32-bitÂLinux)ÂÂÂAssembledÂbyÂP.Skibinski
>ÂCompressorÂnameÂÂÂÂÂÂÂÂÂCompress.ÂDecompress.ÂCompr.ÂsizeÂÂRatioÂFilename
>ÂmemcpyÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ2203ÂMB/sÂÂ2218ÂMB/sÂÂÂÂÂÂÂÂ4096Â100.00Âdata//data_1
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ218ÂMB/sÂÂÂ693ÂMB/sÂÂÂÂÂÂÂÂ2228ÂÂ54.39Âdata//data_1
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ273ÂMB/sÂÂÂ851ÂMB/sÂÂÂÂÂÂÂÂ1739ÂÂ42.46Âdata//data_2
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ230ÂMB/sÂÂÂ526ÂMB/sÂÂÂÂÂÂÂÂ1800ÂÂ43.95Âdata//data_3
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ321ÂMB/sÂÂÂ952ÂMB/sÂÂÂÂÂÂÂÂ1357ÂÂ33.13Âdata//data_4
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ470ÂMB/sÂÂ1075ÂMB/sÂÂÂÂÂÂÂÂÂ664ÂÂ16.21Âdata//data_5
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ303ÂMB/sÂÂÂ964ÂMB/sÂÂÂÂÂÂÂÂ1455ÂÂ35.52Âdata//data_6
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ345ÂMB/sÂÂÂ951ÂMB/sÂÂÂÂÂÂÂÂ2126ÂÂ51.90Âdata//data_7
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ744ÂMB/sÂÂ1163ÂMB/sÂÂÂÂÂÂÂÂÂ177ÂÂÂ4.32Âdata//data_8
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ409ÂMB/sÂÂ1257ÂMB/sÂÂÂÂÂÂÂÂ1033ÂÂ25.22Âdata//data_9
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ220ÂMB/sÂÂÂ857ÂMB/sÂÂÂÂÂÂÂÂ3049ÂÂ74.44Âdata//data_10
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ464ÂMB/sÂÂ1105ÂMB/sÂÂÂÂÂÂÂÂÂ934ÂÂ22.80Âdata//data_11
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ874ÂMB/sÂÂ1194ÂMB/sÂÂÂÂÂÂÂÂÂÂ36ÂÂÂ0.88Âdata//data_12
>Â
>Â
>ÂLZ4ÂDynamicÂOffsetÂwithÂ32KÂdata:
>Âsh-3.2#Â./lzbenchÂ-elz4_dynÂdata/data32k
>ÂlzbenchÂ1.7.3Â(32-bitÂLinux)ÂÂÂAssembledÂbyÂP.Skibinski
>ÂCompressorÂnameÂÂÂÂÂÂÂÂÂCompress.ÂDecompress.ÂCompr.ÂsizeÂÂRatioÂFilename
>ÂmemcpyÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ5285ÂMB/sÂÂ5283ÂMB/sÂÂÂÂÂÂÂ32768Â100.00Âdata/data32k
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ274ÂMB/sÂÂÂ995ÂMB/sÂÂÂÂÂÂÂ13435ÂÂ41.00Âdata/data32k
>Âdone...Â(cIters=1ÂdIters=1ÂcTime=1.0ÂdTime=2.0ÂchunkSize=1706MBÂcSpeed=0MB)
>Â
>ÂOriginalÂLZ4ÂwithÂ32KÂdata:
>Âsh-3.2#Â./lzbench_origÂ-elz4Âdata/data32k
>ÂlzbenchÂ1.7.3Â(32-bitÂLinux)ÂÂÂAssembledÂbyÂP.Skibinski
>ÂCompressorÂnameÂÂÂÂÂÂÂÂÂCompress.ÂDecompress.ÂCompr.ÂsizeÂÂRatioÂFilename
>ÂmemcpyÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ4918ÂMB/sÂÂ5108ÂMB/sÂÂÂÂÂÂÂ32768Â100.00Âdata/data32k
>Âlz4Â1.8.0ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ276ÂMB/sÂÂ1045ÂMB/sÂÂÂÂÂÂÂ14492ÂÂ44.23Âdata/data32k
>Â
>ÂLZO1xÂwithÂ32KÂdataÂ(DefaultÂCompressorÂforÂZRAM):Â
>Âsh-3.2#Â./lzbenchÂ-elzo1x,1Âdata/data32k
>ÂlzbenchÂ1.7.3Â(32-bitÂLinux)ÂÂÂAssembledÂbyÂP.Skibinski
>ÂCompressorÂnameÂÂÂÂÂÂÂÂÂCompress.ÂDecompress.ÂCompr.ÂsizeÂÂRatioÂFilename
>ÂmemcpyÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ5273ÂMB/sÂÂ5320ÂMB/sÂÂÂÂÂÂÂ32768Â100.00Âdata/data32k
>Âlzo1xÂ2.09Â-1ÂÂÂÂÂÂÂÂÂÂÂÂÂ283ÂMB/sÂÂÂ465ÂMB/sÂÂÂÂÂÂÂ14292ÂÂ43.62Âdata/data32k
>Â
>ÂRegards,
>ÂVaneetÂNarang
Â
Thanks.
Â