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 Anders -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org