lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 17 Jan 2012 10:07:46 +0100
From:	David Sterba <dave@...os.cz>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	chris.mason@...cle.com, linux-kernel@...r.kernel.org,
	linux-btrfs@...r.kernel.org
Subject: Re: 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

http://fastcompression.blogspot.com/p/lz4.html (homepage)
http://code.google.com/p/lz4/ (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
compression:
* 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.

http://code.google.com/p/lz4hc/

Usecase:
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.


david
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ