Live data from Hacker News

pigz: A parallel implementation of gzip for multi-core machines

github.com

1–10 of 107 posts

Re: pigz: A parallel implementation of gzip for multi-core machines

#7
post #2

Any comparative benchmarks or a write-up on the approach (other than "uses zlib and pthreads" from the README)?

Single-threaded gzip can outperform pigz, or at least come very close, when used with GNU xargs on separate files with no dependencies.

https://www.linuxjournal.com/content/parallel-shells-xargs-u...

https://news.ycombinator.com/item?id=26178257

Re: pigz: A parallel implementation of gzip for multi-core machines

#8
If you really want to enable all cores for compression and decompression, give pbzip2 a try. pigz isn't as parallel as pbzip2

http://compression.ca/pbzip2/

*edit, as ac29 mentions below, just use zstdmt. In my quick testing it is approximately 8x faster than pbzip2 and gives better compression ratios. Wall clock time went from 41s to 3.5s for a 3.6GB tar of source, pdfs and images AND the resulting file was smaller.

    megs
    3781    test.tar
    3041    test.tar.zstd (default compression 3, 3.5s)
    3170    test.tar.bz2 (default compression, 8 threads, 40s)

Re: pigz: A parallel implementation of gzip for multi-core machines

#9
post #7
post #2

Any comparative benchmarks or a write-up on the approach (other than "uses zlib and pthreads" from the README)?

Single-threaded gzip can outperform pigz, or at least come very close, when used with GNU xargs on separate files with no dependencies. https://www.linuxjournal.com/content/parallel-shells-xargs-u... https://news.ycombinator.com/item?id=26178257

pigz is most useful on a single stream of data, vs. the more obviously parallel case of files without dependencies.
Post reply on HN