On Mon, 18 Nov 2024, 13:10 Johannes Schauer Marin Rodrigues, < jo...@debian.org> wrote:
> Hi Richard, > > thank you for following up. > > Quoting Richard Lewis (2024-11-18 09:55:08) > > > 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. > > > > > 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). > > But 5-8 second unpack time do not explain the 30 second difference. > > Are there more packages than the variant buildd installed in your schroot > directory? > it seems there are some differences. intentionally. the schroot sems to have gcc13 installed and usr-is-merged (both seem to be post usr-merge,the schroot one is not newly genrated but is up-to-datw) > Can you compare build logs between your schroot build and the unshare > build to > figure out where the extra time is spent? i did a redirect of the output and then a diff. the main new differences (apart from the untar) are - unshare installs fakeroot and libfakeroot along with sbuild-build-depends-main-dummy - schroot uses eatmydata by setting LD_LIBRARY_PATH=/usr/lib/libeatmydata a d LD_PRELOAD=libeatmydata.so, whereas unshare calls "eatmydata dpkg-buildpackage..." --- i guess this may be the main reason because the eatmydata speedup is applying to more things: if there is a way to set these variables in unshare it might just work, i will check that next Maybe run sbuild --verbose under > annotate-output? > i didnt do this yet! the end has a c15 sec difference in Package-Time. 2s in BUILD-TIME and 4s in Install-time