+debian-live

On 05/08/2024 09:17, Thore Sommer wrote:
while updating our distro for ARM from bookworm to trixie, I noticed that our builds using qemu user-mode are now extremely slow. A debootstrap went from 5min for bookworm to 38min for trixie.

I'll assume that you use the git version of live-build.

I'm currently investigating why this happens, but before I start profiling QEMU, I thought I ask you where to look, as you might have seen the same phenomenon. Was there an change in trixie that might affect emulation performance (i.e. new security features by enabled default)?

There has indeed been a change: https://salsa.debian.org/live-team/live-build/-/commit/2f1acabc41414a596b5e7552166a4082f738d0e2 changed the logic to detect whether the bootstrap phase would need to run with the architecture of the host, or under QEMU. The file `scripts/build/bootstrap_debootstrap` now checks whether LB_BOOTSTRAP_QEMU_ARCHITECTURE is set to any value (i.e. if `--bootstrap-qemu-arch` is used in `lb config`), and if set, will use a 2-stage bootstrap, which is much slower.

However, if you only changed the `--distribution` commandline option, there should be no significant difference.

Can you post your `lb config` line?

I already tried with a variety QEMU versions (5.2, 8.1, latest git snapshot), distros (bookworm, trixie) and kernel combinations, with no effect and because the bookworm builds are still way faster, I assume something has changed in how trixie is build that makes emulation slower.

I've recently posted a break-down of the execution times of a cross-build for the GNOME image (trixie):
https://lists.debian.org/debian-cd/2024/08/msg00001.html

That also takes about 30 minutes for the bootstrap.

These are my current timings:
lb config --distribution bookworm --architecture arm64 --bootstrap-qemu-arch arm64 --bootstrap-qemu-static /usr/bin/qemu-aarch64-static
lb bootstrap

bookworm: 6 minutes
trixie: 38 minutes
I guess that the main cause will be debootstrap.

You might want to try a pending MR as well.
https://salsa.debian.org/live-team/live-build/-/merge_requests/343

With kind regards,
Roland Clobus

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to