mfrw / compcache

Automatically exported from code.google.com/p/compcache
0 stars 0 forks source link

Snappy compression support #99

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It may be an advantage for some systems to use snappy compression instead of 
LZO for zcache and zram.

http://code.google.com/p/snappy for source code

There is someone that already made a patch for Snappy support in zram: 
http://driverdev.linuxdriverproject.org/pipermail/devel/2011-April/015122.html

Quote from the page above: 

"Google's Snappy data compression library is a faster alternative to LZO,
optimized for x86-64. On compressible input it compresses ~2.5x faster than LZO
and decompresses ~1.5-2x faster than LZO. On incompressible input, it skips the
input at 100x faster than LZO and decompresses ~4x faster than LZO.
It is released under BSD license.
This is a kernel port from user space C++ code.
The current intended use is with zram (see next patch in series)."

Original issue reported on code.google.com by ande...@gmail.com on 28 Dec 2011 at 3:59

GoogleCodeExporter commented 9 years ago
With the release of LZO 2.05 (currently 2.06), the difference in decompression 
speeds is ~50% and compression speeds are almost identical**. Also, it's a lot 
of effort to get a compression algorithm to kernel mainline. So, I think better 
would be to pick optimizations done in newer LZO versions and port them to the 
kernel, instead of introducing a new and only marginally better compression 
scheme.

** http://permalink.gmane.org/gmane.linux.drivers.driver-project.devel/15608

Original comment by nitingupta910@gmail.com on 28 Dec 2011 at 4:43

GoogleCodeExporter commented 9 years ago
Thanks for your response! I did not know about the new versions of LZO, which 
do seem like good improvements. Perhaps this is indeed the better way to go.

How does LZO scale down on low-end systems compared to Snappy? I am thinking of 
mobile phones/tables and low-end router/gateways etc. Many benchmarks are on 
reasonably fast PCs, while most low-end systems already live with constraints 
of memory and cpu. 

It may not even be possible to update RAM or CPU on older PCs too.

Original comment by ande...@gmail.com on 28 Dec 2011 at 5:59

GoogleCodeExporter commented 9 years ago
Unfortunately, I do not have access to any such embedded-style (or plain old) 
systems but yes, I would surely be interesting to know how Snappy compares to 
LZO on such devices.

Original comment by nitingupta910@gmail.com on 28 Dec 2011 at 6:20

GoogleCodeExporter commented 9 years ago
LZO as in the kernel was recently refreshed to the latest version. Not sure if 
snappy still holds while still supporting all those archs.

Original comment by nitingupta910@gmail.com on 2 Oct 2012 at 10:11