Parallel Compression With pigz
Speed up gzip using multiple cores while keeping gzip compatibility.
Run pigz -k -p 8 archive.tar to compress it in parallel, keeping the original.
01Command
Command
$ pigz -k -p 8 archive.tar02What it does
gzip is single-threaded, so compressing a multi-gigabyte backup leaves cores idle; pigz splits the stream across threads and produces standard .gz output that gunzip reads. The -k flag keeps the input file, which is safer for backups.
03Risk
!Warning: Parallel compression uses more memory per core; reduce -p on memory-constrained machines.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- pigz.1.en.html manual page (Debian bookworm)Evidence: Documents pigz, a parallel implementation of gzip with a -p thread count.
Last verified: 2026-10-13 · Category: Developer
06Related solutions
Snapshot System Health with vmstat
vmstat gives a compact one-line-per-interval view of CPU usage, swap activity, and I/O waits that top doesn't summarize as clearly.
Split Large Files and Rejoin Them with split and cat
split cuts a file into size-bounded chunks; cat concatenated in order rebuilds the original byte-for-byte.