Mailinglist Archive: opensuse-factory (808 mails)

< Previous Next >
Re: [opensuse-factory] RFC: Replacing default gzip and bzip2 command line tools
  • From: Anders Johansson <ajh@xxxxxxxx>
  • Date: Tue, 30 Aug 2011 01:20:35 +0200
  • Message-id: <3507541.BpkSzzm7YN@carolin>
On Tuesday 30 August 2011 00:44:21 Rüdiger Meier wrote:
Here it doesn't:

rudi@quant:/tmp> time ~/tmp/pigz-2.1.6/pigz -c hist.csv |md5sum
95311648cd2813bfd2d9a2a265b9c9de -

real 0m8.839s
user 0m34.222s
sys 0m0.987s

rudi@quant:/tmp> time gzip -c hist.csv |md5sum
736ed650389ca836c6f7aec93c071eb3 -

real 0m29.950s
user 0m29.797s
sys 0m0.359s
BTW you can see that user time is 15% higher with pigz so compression
per core cycle is worse.

No, the elapsed time is 8.839 seconds from start to finish with pigz, it is
29.950 seconds with gzip.

The user time is higher yes, but that is the sum of the running time of all
child processes, and since they typically run concurrently, the sum of those
times isn't very interesting. You can have a process with 100 threads running
on 100 CPUs at the same time, each thread running for a second. The "user"
time then would be 100 seconds, but it would still only take a second to run
the program.

I read those outputs as saying that pigz uses multithreading to achieve speed,
while gzip looks single-threaded

The elapsed time (real) tells you how much time the command actually took to
complete, and that dropped to less than a third

To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-factory+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups