Re: [PATCH 4/6] xfstest-bld: use parallel gzip if possible

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

 



On Fri, Aug 19, 2016 at 12:54:09AM +0400, Dmitry Monakhov wrote:
> diff --git a/kvm-xfstests/kvm-xfstests b/kvm-xfstests/kvm-xfstests
> index d608317..10782d0 100755
> --- a/kvm-xfstests/kvm-xfstests
> +++ b/kvm-xfstests/kvm-xfstests
> @@ -9,6 +9,7 @@ fi
>  . "$DIR/util/get-config"
>  
>  QUIET="quiet loglevel=0"
> +which pigz &>/dev/null && GZIP=pigz || GZIP=gzip
>  
>  . $DIR/util/parse_cli
>  
> @@ -71,7 +72,7 @@ then
>      fi
>      (cd "$DIR/test-appliance"; \
>       tar -X kvm-exclude-files -C files -cf - . | \
> -	 gzip -9n > "$TDIR/files.tar.gz")
> +	 $GZIP -9n > "$TDIR/files.tar.gz")
>      tar -r -f $VDH -C "$TDIR" files.tar.gz
>      rm -rf "$TDIR"
>  fi

There's no real point in using pigz for files.tar.gz, since the file
is so small.  In fact, it's slightly slower on my system:

% time gzip -9 < /tmp/files.tar  > /tmp/files.tar.gz

real   0m0.010s
user   0m0.000s
sys    0m0.000s

% time pigz -9 < /tmp/files.tar  > /tmp/files.tar.gz

real   0m0.012s
user   0m0.010s
sys    0m0.010s

For the xfstests.tar.gz file, it does make sense; it cuts down the
compression time form 3 seconds to half a second.  That's fair,
although at least in my workflow I'm not recreating the
xfstests.tar.gz file all that often.

Cheers,

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux