On Sun, 17 Nov 2024, 21:05 Johannes Schauer Marin Rodrigues, < jo...@debian.org> wrote:
> Hi Richard, > > Quoting Richard Lewis (2024-11-17 20:20:40) > > > I'm not familiar with eatmydata but as far as I understand the docs > you run > > > something under eatmydata by using the eatmydata wrapper program. So if > > > your chroot has eatmydata installed, maybe try adding this to your > > > ~/.sbuildrc: > > > > > > $build_env_cmnd = ['eatmydata']; > > > > > > Does that work? > > > > I assume no square brackets - i get some perl error with that, > > although it claimed to do something (the example in sbuild.conf doesnt > > have them) > > Oh you are right, the option is a string, not a list. Does eatmydata work > if > you run it like that? > > > I am running "gbp buildpackage --mode=unshare --no-run-lintian > > --no-run-piuparts --no-run-autopkgtest" some times are below. > > > > schroot (2nd run, in case of caching - directory and overlayfs): > > > > Build needed 00:00:16, 5352k disk space > > real 0m20.029s > > user 0m12.594s > > sys 0m6.416s > > > > > > unshare (2nd run, in case of caching, no use of eatmydata) > > Build needed 00:00:40, 5352k disk space > > real 0m49.898s > > user 0m26.677s > > sys 0m19.721s > > > > unshare with eatmydata (2nd run, in case of caching) > > Build needed 00:00:35, 5352k disk space > > real 0m44.809s > > user 0m24.927s > > sys 0m16.344s > > > > > > I suppose a lot of the difference is uncompressing the tarball - i didnt > try > > plain.tar yet > > Wow, this is wild. Your directory schroot with overlayfs is about half a > minute > faster. Would you mind helping me getting more to the bottom of this? > > My system is an ARM Cortex A73 with 3.6 GB of RAM. To give you an idea > about > how slow that system is: its CPU Mark score is about half of my 11 year old > Intel Core i5 Thinkpad. It takes 20 seconds before a video on youtube > starts > playing. On that system, a buildd chroot tarball extracts in under 2 > seconds. > So unless your own system is massively slower than mine (raspberry pi 1 > would > come to mind), the fact that unshare uses a tarball and you are using a > directory schroot, does not explain the difference of 30 seconds. > > Do you have an idea? > i think quite a bit (but not all - running unzstf takes ~5-8 secs, is unpacking the .tar.zstd ) is extracting the tarball vs being a directory. i tried with just a .tar and it saved about 5 seconds (about 1-2s unpacking). it's a vps so limited ram (1GB i think), a swap file and not proper hardware -- I dont know the details (and i dont think you can buy it this low-powered any more), nproc says 1 so that might be part of the issue? (i know nothing about hardware -- let me know if there are other commands that help). (a laptop would be faster, but not available everywhere!)