Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Oct 2006 09:56:32 -0700
From:      "Kelly Hall" <khall@stbernard.com>
To:        <freebsd-hackers@freebsd.org>
Subject:   Re: "tar -c|gzip" faster than "tar -cz"?!?
Message-ID:  <00C5463E8A5F7C41A8396D701A6734B1601F29@mail01.stbernard.com>

next in thread | raw e-mail | index | archive | help


> From: Pieter de Goeje <pieter@degoeje.nl>
> Subject: Re: "tar -c|gzip" faster than "tar -cz"?!?
>
> The tar|gzip command uses 18% less CPU and is 10% faster. It 
> is clear the HDD is the bottleneck.

Now it's clear to me :)

This makes sense if tar is single-threaded: there's only one thread of
execution, and it can either be waiting on the disk, or compressing
data.  With two processes, gzip can compress while tar blocks on disk
IO.  Maybe the rest of you figured this out immediately, but it took my
coffee a while to take effect ;)

Kelly



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00C5463E8A5F7C41A8396D701A6734B1601F29>