<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>Autarchy of the Private Cave &#187; test</title> <atom:link href="https://bogdan.org.ua/tags/test/feed" rel="self" type="application/rss+xml" /><link>https://bogdan.org.ua</link> <description>Tiny bits of bioinformatics, [web-]programming etc</description> <lastBuildDate>Wed, 28 Dec 2022 16:09:04 +0000</lastBuildDate> <language>en-US</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>https://wordpress.org/?v=3.8.27</generator> <item><title>Compressors galore: pbzip2, lbzip2, plzip, xz, and lrzip tested on a FASTQ file</title><link>https://bogdan.org.ua/2015/03/28/compressors-galore-pbzip2-lbzip2-plzip-xz-and-lrzip-tested-on-a-fastq-file.html</link> <comments>https://bogdan.org.ua/2015/03/28/compressors-galore-pbzip2-lbzip2-plzip-xz-and-lrzip-tested-on-a-fastq-file.html#comments</comments> <pubDate>Fri, 27 Mar 2015 23:34:14 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Comparison]]></category> <category><![CDATA[Links]]></category> <category><![CDATA[Misc]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[benchmark]]></category> <category><![CDATA[bzip2]]></category> <category><![CDATA[fastq]]></category> <category><![CDATA[lbzip2]]></category> <category><![CDATA[lrzip]]></category> <category><![CDATA[pbzip2]]></category> <category><![CDATA[plzip]]></category> <category><![CDATA[test]]></category> <category><![CDATA[xz]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=2257</guid> <description><![CDATA[About 2 years ago I had already reviewed some parallel (and not) compressing utilities, settling at that time on pbzip2 &#8211; it scales quasi-linearly with the number of CPUs/cores, stores compressed data in relatively small 900k blocks, is fast, and has good compression ratio. pbzip2 was (and still is) a very good choice. Yesterday I [&#8230;]]]></description> <content:encoded><![CDATA[<p>About 2 years ago I had already <a
href="http://bogdan.org.ua/2013/10/17/favourite-file-compressor-gzip-bzip2-7z.html">reviewed some parallel (and not) compressing utilities</a>, settling at that time on <strong>pbzip2</strong> &#8211; it scales quasi-linearly with the number of CPUs/cores, stores compressed data in relatively small 900k blocks, is fast, and has good compression ratio. <strong>pbzip2</strong> was (and still is) a very good choice.</p><p>Yesterday I got somewhat distracted, and thus found <strong>lbzip2</strong> -</p><blockquote><p>an independent, multi-threaded implementation of bzip2. It is commonly the fastest SMP (and uniprocessor) bzip2 compressor and decompressor</p></blockquote><p>- as it says in the Debian package description. Is it really &#8220;commonly the fastest&#8221; one? How does it compare to <strong>pbzip2</strong>? Should I use <strong>lbzip2</strong> instead of <strong>pbzip2</strong>?</p><p>This minor distraction had grown into a full-scale web-search and comparison, adding to the mix <strong>plzip</strong> (a parallel version of <strong>lzip</strong>), <strong>xz</strong>, and <strong>lrzip</strong>. After reading thousands of characters, all of these were put to a simple test: compressing an about 2 gigabyte FASTQ file with default options.</p><p>All the external links and benchmarks, as well as my own mini-benchmark results, are provided below.</p><p><strong>The conclusion is that</strong> out of all the tested compressors <strong>lbzip2 is indeed the best one</strong> (for my <em>practical</em> use). It is only slightly better than the trusty <strong>pbzip2</strong>, which takes the second place. All the other compressors performed so poorly, that they do not get any place in my <em>practical</em> rating&#8230;</p><p>So, let us first ask internet wisdom/foolishness, <strong>if lbzip2 or pbzip2 is faster/better?</strong><br
/> <span
id="more-2257"></span></p><ul><li>this <a
href="http://askubuntu.com/questions/63224/what-should-i-rely-on-lbzip2-or-pbzip2">askubuntu question</a> shows that <strong>lbzip2</strong> is compressing faster (1:43) than <strong>pbzip2</strong> (2:34)</li><li>this <a
href="http://vbtechsupport.com/1614/">nice benchmark</a> also confirms that <strong>lbzip2</strong> is indeed faster at compressing; <strong>lbzip2</strong> also appears to use less RAM and a little bit less CPU during compression; during decompression, <strong>lbzip2</strong> (reportedly) uses much more RAM. <strong>lbzip2</strong> achieved at least as good (and even marginally better) compression ratios as <strong>pbzip2</strong>.</li><li><a
href="https://github.com/kjn/lbzip2">lbzip2 github</a> page and also <a
href="http://fibrevillage.com/sysadmin/81-parallel-compression-utilities-on-linux-lbzip2-pbzip2-and-pigz" class="broken_link" rel="nofollow">this unrelated page</a> both say that <strong>lbzip2</strong> is fully cross-compatible with <strong>bzip2</strong></li><li>probably most importantly, lbzip2 github readme says that even <strong>bzip2</strong>-compressed archives get a decompression speedup (which is definitely not the case with <strong>pbzip2</strong>)</li><li><strong>lbzip2</strong> also uses 100-900k blocks (900k by default)</li><li>it is not clear if <strong>lbzip2</strong> is somewhat less widely tested than <strong>pbzip2</strong></li><li><strong>lbzip2</strong>&#8216;s author has <a
href="https://lists.debian.org/debian-mentors/2009/02/msg00135.html">performed some testing</a> (back in 2009, mind you!), and these were the most important results:</li><ul><li><strong>lbzip2</strong> is better when decompressing from a pipe, no matter the producer, and also when the compressed input coming from a regular file is single stream</li><li><strong>pbzip2</strong> beats <strong>lbzip2</strong> when the compressed input is coming from a regular file and is multi-stream (yes, pbzip2 can decompress even lbzip2&#8242;s compressed output faster than lbzip2 itself, when it&#8217;s coming from a regular file) <em>note: if you check the vbsupport benchmark above, you&#8217;ll see that lbzip2 had probably fixed slight lagging behind pbzip2 for regular multi-stream files; this improvement is also confirmed by my testing</em></li></ul></ul><p>So, at least in theory <strong>lbzip2</strong> is indeed better than <strong>pbzip2</strong>, even if only at faster decompression of <strong>bzip2</strong>-compressed files.</p><p>While looking for benchmarks, I&#8217;ve found <a
href="https://aliver.wordpress.com/2010/06/22/huge-unix-file-compresser-shootout-with-tons-of-datagraphs/">this one</a> (old but good), which highly praises <strong>lzop</strong> compressor. Apparently, <strong>lzop</strong> is noticeably faster than even <strong>gzip</strong>, and compresses only a little bit worse. However, I am not really interested in a faster gzip: I need something with much better compression, but still fast enough for multi-gigabyte files.</p><p>Next, I have stumbled upon <a
href="http://www.nongnu.org/lzip/lzip.html">lzip</a> and <a
href="http://www.nongnu.org/lzip/plzip.html">plzip</a> (.lz). What are these compressors?</p><ul><li><strong>plzip</strong> is a parallel version of <strong>lzip</strong>, and fully lzip-compatible</li><li><strong>lzip</strong> is an LZMA compressor</li><li>reading the documentation leaves an impression that <strong>[p]lzip</strong> achieves better compression, is slower, and needs much more RAM than competing compressors</li><li>there is a special utility called <strong>lziprecover</strong>, which helps recover data from damaged lzip archives, by leveraging, on the one hand, CRC checksums of compressed blocks, and, on the other, multiple damaged copies of the archive (if available)</li><li>from the official website:<br
/><blockquote><p><strong>Lzip</strong> is a lossless data compressor with a user interface similar to the one of <strong>gzip</strong> or <strong>bzip2</strong>. <strong>Lzip</strong> is about as fast as <strong>gzip</strong>, compresses most files more than <strong>bzip2</strong>, and is better than both from a data recovery perspective.</p></blockquote></li><li>default &#8220;member&#8221; (compressed block/chunk) size is 4 <em>petabytes</em>, but can be set to a lower value (minimal 100kb), mimicking bzip2&#8242;s chunk size</li><li>supports multiple, independent volumes (loosing one volume will still allow recovering data from all other volumes)</li><li>with multiple cores, <strong>plzip</strong> creates multi-member files by default (but it is not clear, what is the size of these members? Default is said to be twice the dictionary size, but default for dictionary size is not specified in the manual &#8211; so lzip/plzip seem to require compression level -1&#8230;-9 specification)</li><li><a
href="https://aliver.wordpress.com/2010/06/22/huge-unix-file-compresser-shootout-with-tons-of-datagraphs/">here</a> <strong>lzip</strong> compresses a little bit better than <strong>xz</strong> without the <code>--extreme</code> option</li><li><strong>(l|p)bzip2</strong> should still be faster than either <strong>lzip</strong> or <strong>xz</strong></li><li>I started mentioning <strong>xz</strong>, because <strong>lzip</strong> and <strong>xz</strong> (at least historically) are competing LZMA-based compressors</li><li>a 1 year old <a
href="https://blogs.gentoo.org/mgorny/2014/02/22/a-few-words-on-lzip-compressor/">opinion</a> makes the following statements about lzip:</li><ul><li><strong>lzip</strong> is a marginal archiver with no real benefits since the appearance of <strong>xz</strong> (<em>note: <strong>xz</strong> is a successor of lzma-utils</em>)</li><li><strong>xz</strong> is more popular, more widely accepted</li><li><strong>xz</strong> has a community, while <strong>lzip</strong> has 1 author</li><li>performance of <strong>xz</strong> and <strong>lzip</strong> is comparable</li><li><strong>xz</strong> has more features</li><li>but <strong>lzip</strong> does indeed have a recovery utility that <strong>xz</strong> doesn&#8217;t</li></ul></ul><p>That doesn&#8217;t really tell us much on how <strong>plzip</strong>/<strong>lzip</strong> compare to, say, <strong>pbzip2</strong>. But before performance, let us pay some more attention to long-term storage features of <strong>lzip</strong>:</p><blockquote><p>The <strong>lzip</strong> file format is designed for data sharing and long-term archiving, taking into account both data integrity and decoder availability:</p><ul><li>The <strong>lzip</strong> format provides very safe integrity checking and some data recovery means. The <strong>lziprecover</strong> program can repair bit-flip errors (one of the most common forms of data corruption) in <strong>lzip</strong> files, and provides data recovery capabilities, including error-checked merging of damaged copies of a file.</li><li>The <strong>lzip</strong> format is as simple as possible (but not simpler). The <strong>lzip</strong> manual provides the code of a simple decompressor along with a detailed explanation of how it works, so that with the only help of the <strong>lzip</strong> manual it would be possible for a <em>digital archaeologist</em> to extract the data from a <strong>lzip</strong> file long after quantum computers eventually render LZMA obsolete.</li><li>Additionally, the <strong>lzip</strong> reference implementation is copylefted, which guarantees that it will remain free forever.</li></ul></blockquote><p>(I really liked the part about the <em>digital archaeologist</em>! And the copyleft, to a lesser extent.)</p><p>Looks really attractive! Because what I am using compressors for is, essentially, longer-term archiving, with unpredictable needs to sometimes decompress some of the files. And, of course, storage media will fail fully or partially, so recovering is important, too. But what is this <strong>xz</strong> compressor?.. I&#8217;ve seen it before, in the contexts with words &#8220;overtake the world&#8221; or similar&#8230;</p><p><strong>xz</strong></p><ul><li><strong>much</strong> more complex file format than <strong>lzip</strong>, but  maybe it has some benefits for client programs and/or recovery?</li><li>supports integrity checks and multiple compressed blocks</li><li>according to this <a
href="http://gcc.gnu.org/ml/gcc/2012-03/msg00549.html">post from 2012</a>, <strong>xz</strong> (single-threaded) both compressed and decompressed much faster than <strong>lzip</strong>&#8230; and <strong>lrzip</strong> (depends on settings, of course)</li><li><strong>lzip</strong> is older than <strong>xz</strong>, and was better than <strong>xz</strong> predecessor &#8211; <strong>lzma-utils</strong></li><li><strong>xz</strong> is adopted by some linux distributions and software projects for package compression</li><li><strong>xz</strong> does not seem to have an equivalent of <strong>lziprecover</strong></li><li><strong>tar</strong> supports both <code>--lzip</code> and <code>--xz</code>, also with <code>--auto-compress</code></li></ul><p>This hasn&#8217;t really added any clarity, has it? Moreover, we now have one more unknown &#8211; the <a
href="https://github.com/ckolivas/lrzip" title="long-range zip">lrzip</a> compressor. <strong>lrzip</strong> is a redundancy compressor with LZO, gzip, bzip2, ZPAQ and LZMA back-ends. It is highly efficient for highly redundant data, even if redundancies are separated with long stretches of other data. (FASTQ files are fairly redundant, though <strong>bzip2</strong> seems to utilize that fairly well already; can <strong>lrzip</strong> do better?)</p><p>However, what if a part of the archive is damaged? How much information is lost then? Is it at all possible to recover some of the data from damaged .lrz archives?<br
/> <a
href="http://ck.kolivas.org/apps/lrzip/README.benchmarks">Author&#8217;s benchmarks</a> showcase how good <strong>lrzip</strong> is at redundant data compression (although <strong>lrzip</strong> is multithreaded, so comparison in the benchmark to non-multithreaded algorithm implementations is not quite correct&#8230;). Damaged archive recovery concerns would have prevented me from using <strong>lrzip</strong> anyway, but I was really interested if a &#8220;long-range redundancy&#8221; compressor can do better than usual, &#8220;short-range redundancy&#8221; compressors.</p><p><strong>My testing setup</strong></p><blockquote><ul><li>Debian testing 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt7-1 (2015-03-01) x86_64 GNU/Linux</li><li>Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz (4 physical cores with HT enabled: 8 hardware threads)</li><li>16GiB RAM</li><li>test file name: test.fastq</li><li>test file size: 2 223 860 346 bytes (a little over 2 gigabytes)</li><li>test file was copied once to RAM-mounted /tmp, to exclude any I/O bottleneck effects on compression speeds</li><li>bzip2: 1.0.6</li><li>lbzip2: 2.5</li><li>pbzip2: 1.1.9</li><li>xz: 5.1.0alpha</li><li>plzip: 1.2</li><li>lrzip: 0.616</li><li>command execution time and maximal process RSS memory were measured with <code>/usr/bin/time -f '%C: %e s, %M Kb' compressor arguments</code> (note: this is <strong>not</strong> bash&#8217;s built-in <strong>time</strong>); please note that memory measurement can be incorrect for multithreaded compressors</li></ul></blockquote><p>Below come testing results. I have not put them into a single table, but I do comment the results in a few places. Entire testing followed this pattern:</p><ul><li>compress test.fastq, deleting the original</li><li>test compressed archive (<em>note: this was done only for some compressors, not all</em>)</li><li>decompress archive back to test.fastq, delete archive</li><li>if 3 previous steps are fast enough: repeat 1-2 more times (but only show the best result below); otherwise continue</li><li>repeat with the next compressor</li></ul><p><strong>bzip2: 309 159 275 bytes</strong><br
/> <strong>bzip2</strong> was used as a baseline, to highlight speed benefits of both <strong>lbzip2</strong> and <strong>pbzip2</strong>.</p><blockquote><p> test.fastq:  7.193:1,  1.112 bits/byte, 86.10% saved, 2223860346 in, 309159275 out.<br
/> <strong>bzip2</strong> -v test.fastq: <strong>190.63 s</strong>, 7608 Kb<br
/> <strong>bzip2</strong> -v -d test.fastq.bz2: <strong>51.58 s</strong>, 4620 Kb</p></blockquote><p><strong>Bzip2</strong> is neither particularly slow, nor particularly fast. It also seems to have modest memory requirements.</p><p><strong>pbzip2: 310 462 610 bytes</strong><br
/> <strong>pbzip2</strong> is the currently used reference. For any other compressor to become a successor of <strong>pbzip2</strong>, that other compressor must be either a little faster (while compressing as good as <strong>pbzip2</strong>), or a little better compressor (while being as fast as <strong>pbzip2</strong>), or both. Note that compressed file size is only a tiny bit larger than with <strong>bzip2</strong>.</p><blockquote><p> &#8220;test.fastq.bz2&#8243;: compression ratio is 1:7.163, space savings is 86.04%<br
/> <strong>pbzip2</strong> -v test.fastq: <strong>46.22 s</strong>, 67436 Kb<br
/> <strong>pbzip2</strong> -dv test.fastq.bz2: <strong>19.80 s</strong>, 46672 Kb</p></blockquote><p>Interestingly, <code>pbzip2 --test</code> uses 1 thread only (but also consumes only 6MB RAM), resulting in decompression times similar to those of <strong>bzip2</strong>. <strong>lbzip2</strong> uses all 8 threads also during testing.</p><p><strong>lbzip2: 311 040 543 bytes</strong></p><blockquote><p> lbzip2: compressing &#8220;test.fastq&#8221; to &#8220;test.fastq.bz2&#8243;<br
/> lbzip2: &#8220;test.fastq&#8221;: compression ratio is 1:7.150, space savings is 86.01%<br
/> <strong>lbzip2</strong> -v test.fastq: <strong>22.67 s</strong>, 49812 Kb</p><p>lbzip2: decompressing &#8220;test.fastq.bz2&#8243; to &#8220;test.fastq&#8221;<br
/> lbzip2: &#8220;test.fastq.bz2&#8243;: compression ratio is 1:7.150, space savings is 86.01%<br
/> <strong>lbzip2</strong> -vd test.fastq.bz2: <strong>18.86 s</strong>, 46652 Kb</p></blockquote><p>I repeated <strong>pbzip2</strong> and <strong>lbzip2</strong> tests several times, and it was always that <strong>lbzip2</strong> compressed this same file about twice as fast&#8230; Wow! Decompression speed is about the same, compressed file size is marginally larger than with <strong>pbzip2</strong>. Overall, <strong>lbzip2</strong> does look like a new drop-in replacement of <strong>bzip2</strong>/<strong>pbzip2</strong> for me.</p><p><strong>xz -0 &ndash;&ndash;threads=8: 517 967 372 bytes</strong><br
/> I would call this one <em>major test disappointment</em>. Default setting, -6, was way too slow (estimated 28 minutes to compress!!!). Even the fastest -0 setting was still too slow! And here&#8217;s one of the reasons, straight from the <strong>xz</strong> man page:</p><blockquote><p> Multithreaded compression and decompression are not implemented yet, so this option has no effect for now. As of writing (2010-09-27), it hasn&#8217;t been decided if threads will be used by default on multicore systems once support for threading has been implemented.</p></blockquote><p>Also, I forgot to use the <code>--block-size=900k</code> option, but that seems to be of no concern with such results:</p><blockquote><p> 100 %     492.5 MiB / 2,120.8 MiB = 0.232    18 MiB/s       1:59<br
/> <strong>xz</strong> -0 -v test.fastq: <strong>119.25 s</strong>, 4780 Kb<br
/> <strong>xz</strong> &ndash;&ndash;test &ndash;&ndash;verbose &ndash;&ndash;threads=8 test.fastq.xz: <strong>36.00 s</strong>, 2568 Kb<br
/> 100 %     492.5 MiB / 2,120.8 MiB = 0.232    58 MiB/s       0:36<br
/> <strong>xz</strong> -d -v test.fastq.xz: <strong>36.54 s</strong>, 2500 Kb</p></blockquote><p><strong>xz -0</strong> was both slower and had significantly worse compression when compared to <strong>lbzip2</strong> and <strong>pbzip2</strong>. <strong>xz -0</strong> was faster than good old <strong>bzip2</strong>, but had significantly worse compression&#8230; Really, <em>major test disappointment</em>.</p><p><strong>plzip: between 407 696 562 and 498 708 539 bytes</strong><br
/> One more <em>major test disappointment</em>. (Or am I somehow using these compressors in a wrong way?&#8230;) I haven&#8217;t found a way to set block/member size (for <strong>lzip</strong>, that would be the <code>-b</code> option). Default speed setting -6 was also way too slow, but settings -1 to -3 were comparable to <strong>pbzip2</strong>, so I did all three.</p><p><strong>plzip -1: 498 708 539 bytes</strong></p><blockquote><p> test.fastq:  4.459:1,  1.794 bits/byte, 77.57% saved, 2223860346 in, 498708539 out.<br
/> <strong>plzip</strong> -1 &ndash;&ndash;verbose &ndash;&ndash;threads=8 test.fastq: <strong>30.27 s</strong>, 126360 Kb (this seems to be per-thread memory&#8230;)<br
/> <strong>plzip</strong> &ndash;&ndash;test &ndash;&ndash;verbose &ndash;&ndash;threads=8 test.fastq.lz: <strong>6.86 s</strong>, 11640 Kb<br
/> <strong>plzip</strong> -d &ndash;&ndash;verbose &ndash;&ndash;threads=8 test.fastq.lz: <strong>7.24 s</strong>, 11644 Kb</p></blockquote><p>Compression speed and ratio: both worse than <strong>lbzip2</strong>. But the fastest testing and decompression so far.</p><p><strong>plzip -2: 456 301 558 bytes</strong></p><blockquote><p> test.fastq:  4.874:1,  1.641 bits/byte, 79.48% saved, 2223860346 in, 456301558 out.<br
/> <strong>plzip</strong> -2 &ndash;&ndash;verbose &ndash;&ndash;threads=8 test.fastq: <strong>38.81 s</strong>, 193416 Kb<br
/> <strong>plzip</strong> &ndash;&ndash;test &ndash;&ndash;verbose &ndash;&ndash;threads=8 test.fastq.lz: <strong>6.26 s</strong>, 14828 Kb<br
/> <strong>plzip</strong> -d &ndash;&ndash;verbose &ndash;&ndash;threads=8 test.fastq.lz: <strong>6.38 s</strong>, 14736 Kb</p></blockquote><p>Compression time worse than <strong>lbzip2</strong>, a little better than <strong>pbzip2</strong>, but compression ratio worse than any one of these. But even faster testing and decompression.</p><p><strong>plzip -3: 407 696 562 bytes</strong></p><blockquote><p> test.fastq:  5.455:1,  1.467 bits/byte, 81.67% saved, 2223860346 in, 407696562 out.<br
/> <strong>plzip</strong> -3 &ndash;&ndash;verbose &ndash;&ndash;threads=8 test.fastq: <strong>63.74 s</strong>, 245756 Kb<br
/> <strong>plzip</strong> &ndash;&ndash;test &ndash;&ndash;verbose &ndash;&ndash;threads=8 test.fastq.lz: <strong>5.82 s</strong>, 18936 Kb<br
/> <strong>plzip</strong> -d &ndash;&ndash;verbose &ndash;&ndash;threads=8 test.fastq.lz: <strong>6.10 s</strong>, 18944 Kb</p></blockquote><p>Even faster testing and decompression! But compression ratio and speed are still worse than <strong>lbzip2</strong> and <strong>pbzip2</strong>.</p><p>And the final contestant, <strong>lrzip</strong>! All 5 back-ends were tested: LZO, gzip, bzip2, LZMA, ZPAQ.</p><p><strong>lrzip</strong> has several peculiarities, which hinder its use as a drop-in replacement for, say, <strong>bzip2</strong>. Most importantly, when a file is compressed, it is not deleted, unless a <code>-D</code> options is specified. Unlike <strong>pbzip2</strong> and <strong>lbzip2</strong>, which use all available CPUs/cores by default, <strong>lrzip</strong> only uses 2 by default (<code>-p 8</code> in the results below requests use of 8 cores). Another unusual feature is that during testing a file is uncompressed to a storage medium, and then deleted; almost all the other compressors only verify the decompressed data stream, which is then immediately discarded and never written to storage medium. Related feature is a <code>-c</code> option, which performs file verification after decompression by reading the decompressed file from storage medium and comparing it to the decompressed stream. <strong>lrzip</strong> also stores MD5 hashes of data, and allows verifying these. <strong>lrzip</strong> comes with several helper scripts &#8211; for example, one which allows tarballing and lrzipping a chosen directory in a single command. Actually, <strong>lrzip</strong> is more of an archive utility, and not just a compressor.</p><p><strong>lrzip -D -p 8: 334 504 383 bytes</strong><br
/> In this default (LZMA) mode, <strong>lrzip</strong> starts with 1 thread, but eventually uses more and more cores (though never all 8, or I haven&#8217;t noticed this). Decompressing seems to use more threads, but that also depends on the back-end used (the slower it is &#8211; the more threads will be used, e.g. ZPAQ versus LZO).</p><blockquote><p> test.fastq &#8211; Compression Ratio: 6.648. Average Compression Speed:  3.113MB/s.<br
/> Total time: 00:11:21.85<br
/> <strong>lrzip</strong> -D -p 8 test.fastq: <strong>681.84 s</strong>, 3331080 Kb</p><p>Decompressing&#8230;<br
/> 100%    2120.84 /   2120.84 MB<br
/> Average DeCompression Speed: 124.706MB/s<br
/> [OK] &#8211; 2223860346 bytes<br
/> Total time: 00:00:17.13<br
/> <strong>lrzip</strong> -t -p 8 test.fastq.lrz: <strong>17.21 s</strong>, 2567608 Kb</p><p>Decompressing&#8230;<br
/> 100%    2120.84 /   2120.84 MB<br
/> Average DeCompression Speed: 117.778MB/s<br
/> Output filename is: test.fastq: [OK] &#8211; 2223860346 bytes<br
/> Total time: 00:00:17.59<br
/> <strong>lrzip</strong> -d -p 8 -D test.fastq.lrz: <strong>17.67 s</strong>, 2567664 Kb</p></blockquote><p>In the default LZMA mode, lrzip is significantly slower than even bzip2, and has somewhat worse compression ratio. Yes, this is the 3rd <em>major test disappointment</em>.</p><p><strong>gzip back-end: lrzip -g -L 9 -D -p 8: 430 013 769 bytes</strong><br
/> Despite specifying <code>-p 8</code>, <strong>lrzip</strong> mostly operates in 1 thread, and only sometimes in 2 (probably invokes <strong>gzip</strong> library). Testing is also done with 1 thread only, but is very fast (but slower than <strong>plzip</strong>). The <code>-L 9</code> option is supposed to be translated into -9 for gzip; as this normally has nearly no effect, it wasn&#8217;t used in the following <strong>lrzip</strong> tests.</p><blockquote><p> test.fastq &#8211; Compression Ratio: 5.172. Average Compression Speed:  0.704MB/s.<br
/> Total time: 00:50:11.34<br
/> <strong>lrzip</strong> -p 8 -g -L 9 -D test.fastq: <strong>3011.34 s</strong>, 2745520 Kb</p><p>100%    2120.84 /   2120.84 MB<br
/> Average DeCompression Speed: 163.077MB/s<br
/> [OK] &#8211; 2223860346 bytes<br
/> Total time: 00:00:12.71<br
/> <strong>lrzip</strong> -t -p 8 test.fastq.lrz: <strong>12.79 s</strong>, 2577632 Kb</p><p>Decompressing&#8230;<br
/> 100%    2120.84 /   2120.84 MB<br
/> Average DeCompression Speed: 163.077MB/s<br
/> Output filename is: test.fastq: [OK] &#8211; 2223860346 bytes<br
/> Total time: 00:00:12.88<br
/> <strong>lrzip</strong> -d -p 8 -D test.fastq.lrz: <strong>12.95 s</strong>, 2577728 Kb</p></blockquote><p>And again, compression speed <strong>and</strong> ratio are worse than for <strong>bzip2</strong>&#8230;</p><p><strong>LZO back-end: lrzip -l -D -p 8: 766 520 776 bytes</strong></p><blockquote><p> test.fastq &#8211; Compression Ratio: 2.901. Average Compression Speed:  4.690MB/s.<br
/> Total time: 00:07:32.89<br
/> <strong>lrzip</strong> -l -D -p 8 test.fastq: <strong>452.88 s</strong>, 2714452 Kb</p><p>Decompressing&#8230;<br
/> 100%    2120.84 /   2120.84 MB<br
/> Average DeCompression Speed: 212.000MB/s<br
/> [OK] &#8211; 2223860346 bytes<br
/> Total time: 00:00:10.58<br
/> <strong>lrzip</strong> -t -p 8 test.fastq.lrz: <strong>10.66 s</strong>, 2582516 Kb</p><p>Decompressing&#8230;<br
/> 100%    2120.84 /   2120.84 MB<br
/> Average DeCompression Speed: 192.727MB/s<br
/> Output filename is: test.fastq: [OK] &#8211; 2223860346 bytes<br
/> Total time: 00:00:11.32<br
/> <strong>lrzip</strong> -d -p 8 -D test.fastq.lrz: <strong>11.39 s</strong>, 2582504 Kb</p></blockquote><p>No comments.</p><p><strong>bzip2 back-end: lrzip -b -D -p 8: 353 473 476 bytes</strong></p><blockquote><p> test.fastq &#8211; Compression Ratio: 6.291. Average Compression Speed:  4.473MB/s.<br
/> Total time: 00:07:53.95<br
/> <strong>lrzip</strong> -b -D -p 8 test.fastq: <strong>473.94 s</strong>, 2781104 Kb</p><p>Decompressing&#8230;<br
/> 100%    2120.84 /   2120.84 MB<br
/> Average DeCompression Speed: 68.387MB/s<br
/> [OK] &#8211; 2223860346 bytes<br
/> Total time: 00:00:30.69<br
/> <strong>lrzip</strong> -t -p 8 test.fastq.lrz: <strong>30.77 s</strong>, 2583156 Kb</p><p>Decompressing&#8230;<br
/> 100%    2120.84 /   2120.84 MB<br
/> Average DeCompression Speed: 66.250MB/s<br
/> Output filename is: test.fastq: [OK] &#8211; 2223860346 bytes<br
/> Total time: 00:00:31.92<br
/> <strong>lrzip</strong> -d -p 8 -D test.fastq.lrz: <strong>32.00 s</strong>, 2583108 Kb</p></blockquote><p>Hadn&#8217;t I done all of these simple tests myself, by now I&#8217;d think that this test was <em>rigged</em> to show how good <strong>pbzip2</strong> and <strong>lbzip2</strong> are at compressing FASTQ files <img
src="https://bogdan.org.ua/wp-includes/images/smilies/icon_biggrin.gif" alt=":D" class="wp-smiley" /></p><p><strong>ZPAQ back-end: lrzip -z -D -p 8: 292 380 439 bytes</strong></p><blockquote><p> test.fastq &#8211; Compression Ratio: 7.606. Average Compression Speed:  2.804MB/s.%  7:100%<br
/> Total time: 00:12:36.51<br
/> <strong>lrzip</strong> -z -D -p 8 test.fastq: <strong>756.51 s</strong>, 3585740 Kb</p><p>Decompressing&#8230;<br
/> 100%    2120.84 /   2120.84 MB	1:100%  2:100%  3:100%  4:100%  5:100%  6:100%  7:100%<br
/> Average DeCompression Speed:  3.970MB/s<br
/> [OK] &#8211; 2223860346 bytes<br
/> Total time: 00:08:54.57<br
/> <strong>lrzip</strong> -t -p 8 test.fastq.lrz: <strong>534.65 s</strong>, 2583424 Kb</p><p>Decompressing&#8230;<br
/> 100%    2120.84 /   2120.84 MB	1:100%  2:100%  3:100%  4:100%  5:100%  6:100%  7:100%<br
/> Average DeCompression Speed:  3.759MB/s<br
/> Output filename is: test.fastq: [OK] &#8211; 2223860346 bytes<br
/> Total time: 00:09:24.27<br
/> <strong>lrzip</strong> -d -p 8 -D test.fastq.lrz: <strong>564.36 s</strong>, 2583460 Kb</p></blockquote><p><strong>Finally!!!</strong> We have compression better than <strong>bzip2</strong>! But it is also much slower than <strong>bzip2</strong> (and some 12 times slower than <strong>pbzip2</strong>), so not really an option. Alas. And decompression time is the worst in the test &#8211; almost <strong>10 minutes</strong> for what <strong>plzip</strong> does in under <strong>7 seconds</strong>! (I do realize that compression ratio is also different &#8211; but not <strong>that</strong> much.) I wonder if slow <strong>lrzip</strong> speeds have anything to do with test.fastq being effectively in RAM? I do not know if there are any performance penalties to <strong>mmap</strong>ing a file which is already on a RAM-mounted partition.</p><p>The test.fastq file that I&#8217;ve used was somehow really hard for the tested compressors to tackle as fast and as good as <strong>lbzip2</strong> and <strong>pbzip2</strong> could&#8230;</p><p>Questions? Comments? Improvements, including plots of these figures? Comment below.</p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2015%2F03%2F28%2Fcompressors-galore-pbzip2-lbzip2-plzip-xz-and-lrzip-tested-on-a-fastq-file.html&amp;linkname=Compressors%20galore%3A%20pbzip2%2C%20lbzip2%2C%20plzip%2C%20xz%2C%20and%20lrzip%20tested%20on%20a%20FASTQ%20file" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2015%2F03%2F28%2Fcompressors-galore-pbzip2-lbzip2-plzip-xz-and-lrzip-tested-on-a-fastq-file.html&amp;linkname=Compressors%20galore%3A%20pbzip2%2C%20lbzip2%2C%20plzip%2C%20xz%2C%20and%20lrzip%20tested%20on%20a%20FASTQ%20file" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2015%2F03%2F28%2Fcompressors-galore-pbzip2-lbzip2-plzip-xz-and-lrzip-tested-on-a-fastq-file.html&amp;linkname=Compressors%20galore%3A%20pbzip2%2C%20lbzip2%2C%20plzip%2C%20xz%2C%20and%20lrzip%20tested%20on%20a%20FASTQ%20file" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2015%2F03%2F28%2Fcompressors-galore-pbzip2-lbzip2-plzip-xz-and-lrzip-tested-on-a-fastq-file.html&amp;linkname=Compressors%20galore%3A%20pbzip2%2C%20lbzip2%2C%20plzip%2C%20xz%2C%20and%20lrzip%20tested%20on%20a%20FASTQ%20file" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2015%2F03%2F28%2Fcompressors-galore-pbzip2-lbzip2-plzip-xz-and-lrzip-tested-on-a-fastq-file.html&amp;linkname=Compressors%20galore%3A%20pbzip2%2C%20lbzip2%2C%20plzip%2C%20xz%2C%20and%20lrzip%20tested%20on%20a%20FASTQ%20file" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2015%2F03%2F28%2Fcompressors-galore-pbzip2-lbzip2-plzip-xz-and-lrzip-tested-on-a-fastq-file.html&#038;title=Compressors%20galore%3A%20pbzip2%2C%20lbzip2%2C%20plzip%2C%20xz%2C%20and%20lrzip%20tested%20on%20a%20FASTQ%20file" data-a2a-url="https://bogdan.org.ua/2015/03/28/compressors-galore-pbzip2-lbzip2-plzip-xz-and-lrzip-tested-on-a-fastq-file.html" data-a2a-title="Compressors galore: pbzip2, lbzip2, plzip, xz, and lrzip tested on a FASTQ file"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2015/03/28/compressors-galore-pbzip2-lbzip2-plzip-xz-and-lrzip-tested-on-a-fastq-file.html/feed</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>HospitalityClub.org and CouchSurfing.com</title><link>https://bogdan.org.ua/2008/09/04/hospitalityclub-org-and-couchsurfing-com.html</link> <comments>https://bogdan.org.ua/2008/09/04/hospitalityclub-org-and-couchsurfing-com.html#comments</comments> <pubDate>Wed, 03 Sep 2008 22:15:57 +0000</pubDate> <dc:creator><![CDATA[Bogdan]]></dc:creator> <category><![CDATA[Links]]></category> <category><![CDATA[Misc]]></category> <category><![CDATA[Society]]></category> <category><![CDATA[couch]]></category> <category><![CDATA[couchsurfing]]></category> <category><![CDATA[culture]]></category> <category><![CDATA[hospitality]]></category> <category><![CDATA[hospitalityclub]]></category> <category><![CDATA[knowledge]]></category> <category><![CDATA[nerd]]></category> <category><![CDATA[personality]]></category> <category><![CDATA[quiz]]></category> <category><![CDATA[test]]></category> <category><![CDATA[travel]]></category> <category><![CDATA[trust]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=361</guid> <description><![CDATA[These are the addresses for those who would like to travel lightly, meet new people, get new friends, hang out with interesting people, or just find a shelter for a night in the foreign country. I&#8217;m now registered in both systems (and getting &#8220;verified&#8221; in CS), and so far I stayed with three people (at [&#8230;]]]></description> <content:encoded><![CDATA[<p>These are the addresses for those who would like to travel lightly, meet new people, get new friends, hang out with interesting people, or just find a shelter for a night in the foreign country.</p><p>I&#8217;m now registered in both systems (and getting &#8220;verified&#8221; in <abbr
title="CouchSurfing">CS</abbr>), and so far I stayed with three people (at two places) found via HC and CS. Both experiences were highly positive. Actually, my world outlook changed quite a bit after my first stay: I heard from someone that</p><blockquote><p>it&#8217;s better to trust wrong person once, than always distrust all the people</p></blockquote><p>But building trust, despite being central to HC ans CS, is only one &#8211; basic &#8211; component. Cultural exchange and knowledge sharing are also important, though so far I was unable to comprehend these components sufficiently to write on them.</p><p>At the CouchSurfing.com website, it appears to be popular to put some test/quiz results into profiles. These are the tests:<br
/> <span
id="more-361"></span></p><table
width=350 align=center border=0 cellspacing=0 cellpadding=2><tr><td
bgcolor="#EEEEEE" align=center> <font
face="Georgia, Times New Roman, Times, serif" style='color:black; font-size: 14pt;'><br
/> <strong>Your Personality is Very Rare (INTP)</strong><br
/> </font></td></tr><tr><td
bgcolor="#FFFFFF"><center><img
src="http://www.blogthingsimages.com/howrareisyourpersonalityquiz/personality.jpg" height="100" width="100"></center><br
/> <font
color="#000000"><br
/> Your personality type is goofy, imaginative, relaxed, and brilliant.</p><p>Only about 4% of all people have your personality, including 2% of all women and 6% of all men<br
/> You are Introverted, Intuitive, Thinking, and Perceiving.<br
/> </font></td></tr></table><div
align="center"><a
href="http://www.blogthings.com/howrareisyourpersonalityquiz/" class="broken_link" rel="nofollow">How Rare Is Your Personality?</a></div><p>And two kinda funny Nerd Tests, version 1 and version 2:</p><p><a
href="http://www.nerdtests.com/ft_nq.php"><br
/> <img
src="http://www.nerdtests.com/images/badge/15caf543aee2d530.gif" alt="I am nerdier than 96% of all people. Are you a nerd? Click here to find out!"></a></p><p><a
href="http://www.nerdtests.com/ft_nt2.php"><br
/> <img
src="http://www.nerdtests.com/images/badge/nt2/b1c73856d9ae0784.png" alt="NerdTests.com says I'm an Uber Cool Nerd God.  What are you?  Click here!"><br
/> </a></p><p><a
class="a2a_button_citeulike" href="https://www.addtoany.com/add_to/citeulike?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F09%2F04%2Fhospitalityclub-org-and-couchsurfing-com.html&amp;linkname=HospitalityClub.org%20and%20CouchSurfing.com" title="CiteULike" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F09%2F04%2Fhospitalityclub-org-and-couchsurfing-com.html&amp;linkname=HospitalityClub.org%20and%20CouchSurfing.com" title="Pocket" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_kindle_it" href="https://www.addtoany.com/add_to/kindle_it?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F09%2F04%2Fhospitalityclub-org-and-couchsurfing-com.html&amp;linkname=HospitalityClub.org%20and%20CouchSurfing.com" title="Kindle It" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_evernote" href="https://www.addtoany.com/add_to/evernote?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F09%2F04%2Fhospitalityclub-org-and-couchsurfing-com.html&amp;linkname=HospitalityClub.org%20and%20CouchSurfing.com" title="Evernote" rel="nofollow noopener" target="_blank"></a><a
class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fbogdan.org.ua%2F2008%2F09%2F04%2Fhospitalityclub-org-and-couchsurfing-com.html&amp;linkname=HospitalityClub.org%20and%20CouchSurfing.com" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a
class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fbogdan.org.ua%2F2008%2F09%2F04%2Fhospitalityclub-org-and-couchsurfing-com.html&#038;title=HospitalityClub.org%20and%20CouchSurfing.com" data-a2a-url="https://bogdan.org.ua/2008/09/04/hospitalityclub-org-and-couchsurfing-com.html" data-a2a-title="HospitalityClub.org and CouchSurfing.com"><img
src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded> <wfw:commentRss>https://bogdan.org.ua/2008/09/04/hospitalityclub-org-and-couchsurfing-com.html/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>