Utilizing multiple processor cores for faster TAR compressing on Linuxes.

From the forum http://www.linuxquestions.org/questions/linux-software-2/utilizing-multi-core-for-tar-gzip-bzip-compression-decompression-4175426075/

The gzip command itself is single threaded, but you can replace it on system with pigz, or provide extra arguments to the ‘tar’ command itself, which will give you a significant speed-up..

From the tar manpage:

Code:
-I, --use-compress-program PROG
      filter through PROG (must accept -d)

So, typical tar options to compress and extract files with tar plus pigz might be…

Code:
tar -I pigz -cf test.tar.gz *

tar -I pigz -xf test.tar.gz

Happy compressing!

Advertisements