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, matthew green wrote:

netbsd-8 uses pax-as-tar.  netbsd-9 and newer has bsdtar-as-tar.


Ah, never used 8.x, so I didn't know that...

is this the real difference?  how dos "pax -r" work where tar is fast?


Works about the same in -HEAD (using the pkgsrc tarball which expands to ~1.4 GB
and which contains _many_ small files):

```
qemu$ uname -a
NetBSD qemu.local 10.99.14 NetBSD 10.99.14 (GENERIC) #0: Sat May 10 18:58:53 UTC 2025  mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64

qemu$ cd /tmp

qemu$ (pax -h; tar -h; xzcat ~/pkgsrc-HEAD.tar.xz) >/dev/null 2>&1

qemu$ time -p xzcat ~/pkgsrc-HEAD.tar.xz | tar -xf -; rm -rf pkgsrc
real        23.43
user         5.87
sys          0.60

qemu$ time -p xzcat ~/pkgsrc-HEAD.tar.xz | pax -r 2>/dev/null; rm -rf pkgsrc
real        28.09
user         5.84
sys          0.40

qemu$
```

/tmp is a 2GB tmpfs (to remove any HW involvement).

-RVP


Home | Main Index | Thread Index | Old Index