Re: tar x cpu bound

Christoph Badura <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel
Message-ID <[email protected]>
On Tue, May 13, 2025 at 10:06:16PM +0000, RVP wrote:
> qemu$ cd /tmp
> 
> qemu$ (pax -h; tar -h; xzcat ~/pkgsrc-HEAD.tar.xz) >/dev/null 2>&1

Is that so that the pax and tar executables are paged in entirely?

> qemu$ time -p xzcat ~/pkgsrc-HEAD.tar.xz | tar -xf -; rm -rf pkgsrc
> qemu$ time -p xzcat ~/pkgsrc-HEAD.tar.xz | pax -r 2>/dev/null; rm -rf pkgsrc

That times xzcat(1) not pax(1) or tar(1), doesn't it?  Don't you want:

xzcat ~/pkgsrc-HEAD.tar.xz | time -p tar -xf -; rm -rf pkgsrc
xzcat ~/pkgsrc-HEAD.tar.xz | time -p pax -r 2>/dev/null; rm -rf pkgsrc

--chris
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.