tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: configurable gzip level?



Joerg Sonnenberger <joerg%britannica.bec.de@localhost> writes:

> Doesn't a modern x86 machine benefit stronger from USE_PIGZGZIP=yes than
> from gzip -4?

I really only meant semi-modern, with 2 cores.  The following, more or
less:

$ cat comp.tgz > /dev/null; for i in 1 2 3 4 5 6 7 8 9; do \
    echo -n "level $i\t\t"; \
    zcat comp.tgz | time sh -c "gzip -$i > comp.level$i.tgz"; \
  done

with the netbsd-5 comp.tgz (since it was large) led to:

level 1        19.67 real        16.68 user         0.29 sys
level 2        21.34 real        18.16 user         0.34 sys
level 3        24.69 real        22.03 user         0.35 sys
level 4        27.30 real        24.76 user         0.43 sys
level 5        35.93 real        32.28 user         0.46 sys
level 6        52.61 real        49.35 user         0.36 sys
level 7        68.28 real        64.46 user         0.43 sys
level 8       148.60 real       144.21 user         0.29 sys
level 9       340.09 real       331.89 user         0.36 sys
-rw-r--r--  1 gdt  users  272254860 Mar 18 15:09 comp.level1.tgz
-rw-r--r--  1 gdt  users  265125602 Mar 18 15:09 comp.level2.tgz
-rw-r--r--  1 gdt  users  260917250 Mar 18 15:09 comp.level3.tgz
-rw-r--r--  1 gdt  users  250486924 Mar 18 15:10 comp.level4.tgz
-rw-r--r--  1 gdt  users  244010440 Mar 18 15:10 comp.level5.tgz
-rw-r--r--  1 gdt  users  240770889 Mar 18 15:11 comp.level6.tgz
-rw-r--r--  1 gdt  users  239724088 Mar 18 15:13 comp.level7.tgz
-rw-r--r--  1 gdt  users  238854524 Mar 18 15:15 comp.level8.tgz
-rw-r--r--  1 gdt  users  238383900 Mar 18 15:21 comp.level9.tgz

So with perfect parallel speedup one needs 12.5 cores to win with pigz.

One could argue from the above that -9 never makes sense compared to -8,
except for official builds for downloading; 500K cost over 190 seconds.

The above was done on a machine running 5.1ish as amd64, 8G RAM and:

cpu0 at mainbus0 apid 0: Intel 686-class, 3166MHz, id 0x1067a
cpu1 at mainbus0 apid 1: Intel 686-class, 3166MHz, id 0x1067a

which to me is more or less modern.

It seems like pigz is only used in some places, rather than replacing
all invocations of gzip.  (That is probably a minor oversight and
irrelevangt to my query.)

Attachment: pgpG_wdx6Eyif.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index