Doesn't a modern x86 machine benefit stronger from USE_PIGZGZIP=yes than from gzip -4? A fair question, and thanks for pointing out USE_PIGZGZIP=yes - I've been using netbsd-5 which doesn't have it and wasn't aware of this. I built pigz from pkgsrc, and on the dual-core machine ran a quick test. For high levels, pigz gets nearly 2x real speedup, dropping to 1.5 at -1, while showing little increase in user time in all cases. But, -4 vs -9 is enormous compared to pigz/gzip so probably these should be separate knobs (pigz -4 makes sense, too). Interestingly, pigz has smaller output than gzip for every level. #!/bin/sh cat comp.tgz > /dev/null for c in gzip pigz; do for i in 1 2 3 4 5 6 7 8 9; do \ echo -n "$c level $i " zcat comp.tgz | time sh -c "$c -$i > comp.$c.level$i.tgz" done done led to: gzip level 1 17.92 real 16.43 user 0.55 sys gzip level 2 20.69 real 18.16 user 0.39 sys gzip level 3 25.80 real 22.15 user 0.25 sys gzip level 4 27.64 real 24.85 user 0.39 sys gzip level 5 35.87 real 32.44 user 0.35 sys gzip level 6 52.08 real 49.38 user 0.29 sys gzip level 7 67.38 real 64.69 user 0.22 sys gzip level 8 148.82 real 144.17 user 0.42 sys gzip level 9 339.64 real 331.99 user 0.32 sys pigz level 1 13.90 real 17.58 user 0.70 sys pigz level 2 14.73 real 19.41 user 0.50 sys pigz level 3 17.24 real 23.11 user 0.67 sys pigz level 4 18.36 real 25.83 user 0.64 sys pigz level 5 22.94 real 33.66 user 0.35 sys pigz level 6 29.62 real 50.93 user 0.10 sys pigz level 7 36.66 real 66.12 user 0.12 sys pigz level 8 77.29 real 145.90 user 0.18 sys pigz level 9 172.83 real 333.35 user 0.28 sys -rw-r--r-- 1 gdt daytona 272351771 Mar 23 20:30 comp.gzip.level1.tgz -rw-r--r-- 1 gdt daytona 271672930 Mar 23 20:42 comp.pigz.level1.tgz -rw-r--r-- 1 gdt daytona 265232826 Mar 23 20:30 comp.gzip.level2.tgz -rw-r--r-- 1 gdt daytona 264487072 Mar 23 20:42 comp.pigz.level2.tgz -rw-r--r-- 1 gdt daytona 261022176 Mar 23 20:30 comp.gzip.level3.tgz -rw-r--r-- 1 gdt daytona 260158441 Mar 23 20:42 comp.pigz.level3.tgz -rw-r--r-- 1 gdt daytona 250575814 Mar 23 20:31 comp.gzip.level4.tgz -rw-r--r-- 1 gdt daytona 250350741 Mar 23 20:43 comp.pigz.level4.tgz -rw-r--r-- 1 gdt daytona 244110325 Mar 23 20:31 comp.gzip.level5.tgz -rw-r--r-- 1 gdt daytona 243854155 Mar 23 20:43 comp.pigz.level5.tgz -rw-r--r-- 1 gdt daytona 240865572 Mar 23 20:32 comp.gzip.level6.tgz -rw-r--r-- 1 gdt daytona 240618594 Mar 23 20:44 comp.pigz.level6.tgz -rw-r--r-- 1 gdt daytona 239815712 Mar 23 20:33 comp.gzip.level7.tgz -rw-r--r-- 1 gdt daytona 239573595 Mar 23 20:44 comp.pigz.level7.tgz -rw-r--r-- 1 gdt daytona 238954432 Mar 23 20:36 comp.gzip.level8.tgz -rw-r--r-- 1 gdt daytona 238707662 Mar 23 20:45 comp.pigz.level8.tgz -rw-r--r-- 1 gdt daytona 238479129 Mar 23 20:42 comp.gzip.level9.tgz -rw-r--r-- 1 gdt daytona 238224861 Mar 23 20:48 comp.pigz.level9.tgz
Attachment:
pgpOe3Vzpv9Np.pgp
Description: PGP signature