tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: tar x cpu bound
On Wed, 14 May 2025, Christoph Badura wrote:
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?
A rather feeble and superfluous attempt, yes. (Didn't make much of a difference,
frankly.)
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?
Ah, that was bash, where the built-in time understands pipelines:
```
$ time -p echo hello | sleep 5
real 5.00
user 0.00
sys 0.00
$ /usr/bin/time -p echo hello | sleep 5
real 0.00
user 0.00
sys 0.00
$
```
-RVP
Home |
Main Index |
Thread Index |
Old Index