On Sunday, November 24, 2024 7:06:06 PM MST Sean Whitton wrote: > On Sun 24 Nov 2024 at 07:53am +01, Johannes Schauer Marin Rodrigues wrote: > > Hi, > > > > Quoting Sean Whitton (2024-11-24 01:23:24) > > > >> This is interesting. One concern I have is speed -- isn't it always slower > >> to have to unpack a tarball before the build instead of having a chroot > >> under > >> /srv/chroot that's always unpacked? > > > > that is correct. Unpacking a tarball takes time. Having an already unpacked > > directory present will be faster. Lets look at how slow unpacking a buildd > > chroot tarball is in practice. My machine is an ARM Cortex A73 with 3.6 GB > > RAM. > > > > $ time sudo tar -C chroot -xf ~/.cache/sbuild/unstable-arm64.tar > > sudo tar -C chroot -xf ~/.cache/sbuild/unstable-arm64.tar 0.01s user 0.02s > > system 2% cpu 0.983 total > > > > This number will of course be different on your system. If your system is > > slower than mine or if your chroot tarballs contain a lot more pre-built > > packages, then unpack times will be longer than this. > > > > In principle, unshare mode can also work with directories. Helmut is working > > on something in that direction. But for me personally, one second of unpack > > time is not enough of a motivation for me to put time into > > directory+overlayfs support. But of course patches welcome! > > Yes, one second is not that bad at all. It takes longer than that on > the porterboxes, and that is my most recent experience, so I was > thinking of that. Thanks for the timings.
I haven’t had time to do any analysis myself, but there is some information posted on https://wiki.debian.org/sbuild: >You can use choose the compression algorithm for the tarball by specifying the extension (.tar.xz, .tar.gz or plain .tar, etc). As of May 2024, ZST seems to provide the best size/time ratio. It certainly is the fastest on a Dell Precision 3800M, 16GB RAM, on an SSD drive (a computer from early 2015): > >Format Tarball size Time > >.xz ~100MB 179,60s user 7,09s system 75% cpu 4:07,49 total >.gz ~150MB 38,51s user 6,13s system 83% cpu 53,423 total >.zst ~139MB 22,68s user 6,28s system 74% cpu 38,868 total So, more than 1 second, but 22 seconds with .zst doesn’t feel too bad. -- Soren Stoutner so...@debian.org
signature.asc
Description: This is a digitally signed message part.