{"id":8089,"date":"2019-01-12T21:08:32","date_gmt":"2019-01-12T21:08:32","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw92\/?p=8089"},"modified":"2019-01-23T23:06:07","modified_gmt":"2019-01-23T23:06:07","slug":"linux-today-best-linux-multi-core-compression-tools","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/01\/12\/linux-today-best-linux-multi-core-compression-tools\/","title":{"rendered":"Linux Today &#8211; Best Linux Multi-Core Compression Tools"},"content":{"rendered":"<p>Data compression is the process of storing data in a format that uses less space than the original representation would use. Compressing data can be very useful particularly in the field of communications as it enables devices to transmit or store data in fewer bits. Besides reducing transmission bandwidth, compression increases the amount of information that can be stored on a hard disk drive or other storage device.<\/p>\n<p>There are two main types of compression. Lossy compression is a data encoding method which reduces a file by discarding certain information. When the file is uncompressed, not all of the original information will be recovered. Lossy compression is typically used to compress video, audio and images, as well as internet telephony. The fact that information is lost during compression will often be unnoticeable to most users. Lossy compression techniques are used in all DVDs, Blu-ray discs, and most multimedia available on the internet.<\/p>\n<p>However, lossy compression is unsuitable where the original and the decompression data must be identical. In this situation, the user will need to use lossless compression. This type of compression is employed in compressing software applications, files, and text articles. Loseless compression is also popular in archiving music. This article focuses on lossless compression tools.<\/p>\n<p>Popular lossless compression tools include gzip, bzip2, and xz. When compressing and decompressing files these tools use a single core. But these days, most people run machines with multi-core processors. You won\u2019t see the speed advantage modern processors offer with the traditional tools. Step forward modern compression tools that use all the cores present on your system when compressing files, offering massive speed advantages.<\/p>\n<p>Some of the tools covered in this article don\u2019t provide significant acceleration when decompressing compressed files. The ones that do offer significant improvement, using multiple cores, when decompressing files are pbzip2, lbzip2, plzip, and lrzip.<\/p>\n<p>Let\u2019s check out the multi-core compression tools. See our time and size charts. And at the end of each page, there\u2019s a table with links to a dedicated page for each of the multi-core tools setting out, in detail, their respective features.<\/p>\n<p>Learn more about the features offered by the multi-core compression tool. We\u2019ve compiled a dedicated page for each tool explaining, in detail, the features they offer.<\/p>\n<table id=\"tablepress-525\" class=\"tablepress tablepress-id-525\">\n<thead>\n<tr class=\"row-1 odd\">\n<th class=\"column-1\" colspan=\"2\"><strong>Multi-Core Compression Tools<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr class=\"row-2 even\">\n<td class=\"column-1\"><strong><a href=\"https:\/\/www.linuxlinks.com\/pigz-parallel-implementation-gzip\/\">pigz<\/a><\/strong><\/td>\n<td class=\"column-2\">Parallel implementation of gzip. It&#8217;s a fully functional replacement for gzip<\/td>\n<\/tr>\n<tr class=\"row-3 odd\">\n<td class=\"column-1\"><strong><a href=\"https:\/\/www.linuxlinks.com\/pbzip2-parallel-implementation-bzip2-block-sorting-file-compressor\/\">PBZIP2<\/a><\/strong><\/td>\n<td class=\"column-2\">Parallel implementation of the bzip2 block-sorting file compressor<\/td>\n<\/tr>\n<tr class=\"row-4 even\">\n<td class=\"column-1\"><strong><a href=\"https:\/\/www.linuxlinks.com\/pxz-parallel-lzma-compressor-liblzma\/\">PXZ<\/a><\/strong><\/td>\n<td class=\"column-2\">Runs LZMA compression on multiple cores and processors<\/td>\n<\/tr>\n<tr class=\"row-5 odd\">\n<td class=\"column-1\"><strong><a href=\"https:\/\/www.linuxlinks.com\/lbzip2\/\">lbzip2<\/a><\/strong><\/td>\n<td class=\"column-2\">Parallel bzip2 compression utility, suited for serial and parallel processing<\/td>\n<\/tr>\n<tr class=\"row-6 even\">\n<td class=\"column-1\"><strong><a href=\"https:\/\/www.linuxlinks.com\/plzip-massively-parallel-lossless-data-compressor-lzlib\/\">plzip<\/a><\/strong><\/td>\n<td class=\"column-2\">Massively parallel (multi-threaded) lossless data compressor based on lzlib<\/td>\n<\/tr>\n<tr class=\"row-7 odd\">\n<td class=\"column-1\"><strong><a href=\"https:\/\/www.linuxlinks.com\/lrzip\/\">lrzip<\/a><\/strong><\/td>\n<td class=\"column-2\">Compression utility that excels at compressing large files<\/td>\n<\/tr>\n<tr class=\"row-8 even\">\n<td class=\"column-1\"><strong><a href=\"https:\/\/www.linuxlinks.com\/pixz-parallel-indexed-xz-compressor\/\">pixz<\/a><\/strong><\/td>\n<td class=\"column-2\">Parallel indexing XZ compression, fully compatible with XZ. LZMA and LZMA2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>With Default Compression<\/h3>\n<p>Default compression refers to running the compression tool without any compression flag being applied.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-medium wp-image-26277 jetpack-lazy-image jetpack-lazy-image--handled\" src=\"https:\/\/i0.wp.com\/www.linuxlinks.com\/wp-content\/uploads\/2018\/12\/Compression-Disk-Default-Time.png?resize=700%2C462&amp;ssl=1\" alt=\"Multi-core compression\" width=\"700\" height=\"462\" data-recalc-dims=\"1\" data-lazy-loaded=\"1\" \/><\/p>\n<p>pigz compressed our 537MB tarball on our quad-core machine in the quickest time of all the tools, completing the test in a swift 4 seconds. To put the result into some context, we also ran the same test using gzip, which compressed the file in 14.7 seconds. pigz therefore fell a bit short of being 4x quicker.<\/p>\n<p>You\u2019ll notice lbzip2 and pbzip2 bars are colored red. This is because these tools use the best compression as their default.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-26276 alignnone jetpack-lazy-image jetpack-lazy-image--handled\" src=\"https:\/\/i2.wp.com\/www.linuxlinks.com\/wp-content\/uploads\/2018\/12\/Compression-Disk-Default-Size.png?resize=700%2C462&amp;ssl=1\" alt=\"Multi-core compression\" width=\"700\" height=\"462\" data-recalc-dims=\"1\" data-lazy-loaded=\"1\" \/><\/p>\n<p>pigz compressed the 537MB tarball down to 110MB. lrzip offers the best compression ratio for the tarball, squeezing it down to a frugal 64MB, although there isn\u2019t much difference between lrzip, pxz, pixz, or plzip.<\/p>\n<p>Again lbzip2 and pbzip2 bars are colored red. This is because these tools use the best compression as their default.<\/p>\n<p><strong>Methodology used for the tests<\/strong><\/p>\n<p>We took a 537MB tarball of a popular source package. The tarball was copied to RAM (\/dev\/shm), and the tests ran in RAM on a quad-core CPU without hyper-threading (Core i5-2500K), with no X server running, and under negligible load.<\/p>\n<p>Each test was run three times with the latest version (at the time of writing) of each multi-core compression tool. The average results are recorded in the charts above. The tests show the relative difference between the multi-core compression tools. They are for indicative purposes only.<\/p>\n<h3>With Fastest Compression<\/h3>\n<p>Most of the tools provide a flag to set the level of compression on a scale from 1 to 9. pxz and plzip and pixz scale from 0 to 9. This test uses the lowest available compression option.<\/p>\n<p>All of the multi-core tools made fairly light work of compressing the tarball with their fastest compression option.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-26280 alignnone jetpack-lazy-image jetpack-lazy-image--handled\" src=\"https:\/\/i0.wp.com\/www.linuxlinks.com\/wp-content\/uploads\/2018\/12\/Compression-Disk-Fastest-Time.png?resize=700%2C462&amp;ssl=1\" alt=\"Multi-core compression\" width=\"700\" height=\"462\" data-recalc-dims=\"1\" data-lazy-loaded=\"1\" \/><\/p>\n<p>If you need to compress large files on a machine with a low powered multi-core machine, the fastest compression might be suitable. pigz compressed the 537MB tarball to 134MB in a whisker under 1.7 seconds. Most of the other tools shaved the tarball to around 100MB, and lrzip compressed the file to a mere 90MB.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-26278 alignnone jetpack-lazy-image jetpack-lazy-image--handled\" src=\"https:\/\/i1.wp.com\/www.linuxlinks.com\/wp-content\/uploads\/2018\/12\/Compression-Disk-Fastest-Size.png?resize=700%2C462&amp;ssl=1\" alt=\"Multi-core compression\" width=\"700\" height=\"462\" data-recalc-dims=\"1\" data-lazy-loaded=\"1\" \/><\/p>\n<p><strong>Methodology used for the tests<\/strong><\/p>\n<p>We took a 537MB tarball of a popular source package. The tarball was copied to RAM (\/dev\/shm), and the tests ran in RAM on a quad-core CPU without hyper-threading (Core i5-2500K), with no X server running, and under negligible load.<\/p>\n<p>Each test was run three times with the latest version (at the time of writing) of each multi-core compression tool. The average results are recorded in the charts above. The tests show the relative difference between the multi-core compression tools. They are for indicative purposes only.<\/p>\n<h3>With Best Compression<\/h3>\n<p>The time taken to complete this test using the best compression option varies significantly within our group of tools. The fastest software is lbzip2 and pigz, both completing the task in under 9 seconds.<\/p>\n<p>plzip is the slowest of the group taking nearly 100 seconds.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-26275 alignnone jetpack-lazy-image jetpack-lazy-image--handled\" src=\"https:\/\/i2.wp.com\/www.linuxlinks.com\/wp-content\/uploads\/2018\/12\/Compression-Disk-Slowest-Time.png?resize=700%2C462&amp;ssl=1\" alt=\"Multi-core compression\" width=\"700\" height=\"462\" data-recalc-dims=\"1\" data-lazy-loaded=\"1\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-26274 jetpack-lazy-image jetpack-lazy-image--handled\" src=\"https:\/\/i0.wp.com\/www.linuxlinks.com\/wp-content\/uploads\/2018\/12\/Compression-Disk-Slowest-Size.png?resize=700%2C462&amp;ssl=1\" alt=\"Multi-core compression\" width=\"700\" height=\"462\" data-recalc-dims=\"1\" data-lazy-loaded=\"1\" \/><\/p>\n<p>If space is paramount, pxz, plzip, pixz and lrzip offer impressive compression ratios. But pxz and pixz are quicker to complete.<\/p>\n<p>Recent versions of pigz include the Zopfli engine which achieves higher compression than other zlib implementations but takes much longer to complete the compression. pigz uses Zopfli with the -11 flag.<\/p>\n<p>Using Zopfli, pigz takes a whopping 14 minutes 25 seconds to complete the test. And while the compression ratio is better, the compressed file weights in at 104MB (as opposed to 109MB with the -9 flag). That\u2019s still larger than the output from most of the multi-core tools with their fastest compression option.<\/p>\n<p>pxz also has an extreme option which is triggered with the -e flag. Using the extreme option is designed to improve the compression ratio by using more CPU time. But compression ratio wasn\u2019t improved in our tests. With the -9 flag, the tarball is 62MB. Yet, using the -e flag, the tarball was 65MB. We\u2019ll need to run more tests to determine if this is just an anomaly.<\/p>\n<p><strong>Methodology used for the tests<\/strong><\/p>\n<p>We took a 537MB tarball of a popular source package. The tarball was copied to RAM (\/dev\/shm), and the tests ran in RAM on a quad-core CPU without hyper-threading (Core i5-2500K), with no X server running, and under negligible load.<\/p>\n<p>Each test was run three times with the latest version (at the time of writing) of each multi-core compression tool. The average results are recorded in the charts above. The tests show the relative difference between the multi-core compression tools. They are for indicative purposes only.<\/p>\n<h3>Long Range Zip (Lrzip)<\/h3>\n<p>Lrzip uses an extended version of rzip, which does a first pass long distance redundancy reduction. It uniquely offers a good range of compression methods:<\/p>\n<ul>\n<li>LZMA (the default algorithm) \u2013 this is the Lempel\u2013Ziv\u2013Markov chain algorithm.<\/li>\n<li>ZPAQ \u2013 designed for user-level backups.<\/li>\n<li>LZO \u2013 Lempel\u2013Ziv\u2013Oberhume.<\/li>\n<li>gzip \u2013 based on the DEFLATE algorithm, which is a combination of LZ77 and Huffman coding.<\/li>\n<li>bzip2 \u2013 compression program that uses the Burrows\u2013Wheeler algorithm.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-26281 alignnone jetpack-lazy-image jetpack-lazy-image--handled\" src=\"https:\/\/i1.wp.com\/www.linuxlinks.com\/wp-content\/uploads\/2018\/12\/lrzip-Default-Time.png?resize=700%2C462&amp;ssl=1\" alt=\"Multi-core compression\" width=\"700\" height=\"462\" data-recalc-dims=\"1\" data-lazy-loaded=\"1\" \/><\/p>\n<p>When it comes to the size of the compressed tarball, zpaq offers the best compression.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-medium wp-image-26279 jetpack-lazy-image jetpack-lazy-image--handled\" src=\"https:\/\/i0.wp.com\/www.linuxlinks.com\/wp-content\/uploads\/2018\/12\/lrzip-Default-Size.png?resize=700%2C462&amp;ssl=1\" alt=\"Multi-core compression\" width=\"700\" height=\"462\" data-recalc-dims=\"1\" data-lazy-loaded=\"1\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Methodology used for the tests<\/strong><\/p>\n<p>We took a 537MB tarball of a popular source package. The tarball was copied to RAM (\/dev\/shm), and the tests ran in RAM on a quad-core CPU without hyper-threading (Core i5-2500K), with no X server running, and under negligible load.<\/p>\n<p>Each test was run three times with the latest version (at the time of writing) of each multi-core compression tool. The average results are recorded in the charts above. The tests show the relative difference between the multi-core compression tools. They are for indicative purposes only.<\/p>\n<p><a href=\"http:\/\/www.linuxtoday.com\/storage\/best-linux-multi-core-compression-tools-190109043511.html\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Data compression is the process of storing data in a format that uses less space than the original representation would use. Compressing data can be very useful particularly in the field of communications as it enables devices to transmit or store data in fewer bits. Besides reducing transmission bandwidth, compression increases the amount of information &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/01\/12\/linux-today-best-linux-multi-core-compression-tools\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Linux Today &#8211; Best Linux Multi-Core Compression Tools&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-8089","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/8089","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=8089"}],"version-history":[{"count":2,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/8089\/revisions"}],"predecessor-version":[{"id":8567,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/8089\/revisions\/8567"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=8089"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=8089"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=8089"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}