[lkml]   [2012]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Updated btrfs/crypto snappy interface ready for merging
    On Thu, Jan 12, 2012 at 04:28:47PM -0800, Andi Kleen wrote:
    > Here's a slightly updated version of the BTRFS snappy interface.
    > snappy is a faster compression algorithm that provides similar
    > compression as LZO, but generally better performance.

    Recently the LZ4 method showed up on the real-time compression scene (homepage) (source repo)

    it has comparable performance and compression ratio to snappy. Quoting
    from the source repo main page:

    Name Ratio C.speed D.speed
    LZ4 (r41) 2.08 319 1070
    LZO 2.05 1x_1 2.07 318 466
    Snappy 1.0.4 2.02 242 683

    My own benchmarking confirms that lz4 is has a bit faster decompression,
    but what is a big difference from snappy is it's memory consumption for
    * 32kb for unbounded chunksize
    * 16kb for chunksize < 64k (a tuned compression)

    No additional memory is needed for decompression in both snappy and lz4.
    With a minor tweak and chunksize < 4G the context size could be reduced
    to 16k as well.

    There is also LZ4HC, "high compression" mode, which maintains same
    binary format, but the compression ratio is better.

    There could be the fast version used transparently and the -hc version
    could be allowed for the 'fi defrag' command in order to recompress
    selected files.

    LZ4 is written in C and it's BSD, LZ4HC is L-GPL. There is some space
    for improvements in the code, but as it's good already as it stands now.


     \ /
      Last update: 2012-01-17 11:05    [W:0.033 / U:43.440 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site