Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make use of multiple CPU cores and/or generally profile the build #731

Open
jeffmakes opened this issue Nov 28, 2023 · 0 comments
Open

Make use of multiple CPU cores and/or generally profile the build #731

jeffmakes opened this issue Nov 28, 2023 · 0 comments

Comments

@jeffmakes
Copy link

Hi,

I'm trying to develop a custom RPi image, and it's going to take a large number of build-test cycles to get everything working right. Building a stage 2 image from a clean state takes about 40 minutes on a Github Actions runner (2 cores, 7GB RAM), an AWS t3.2xlarge (8 cores, 32GB) and a c5a.8xlarge (32 cores 64GB RAM).

Looking in htop I can see that, when the build is maxing out a whole core it is almost always just one. Most of the time it's using much less. What's really strange is that some steps take a really long time, like "update-initramfs: Generating /boot/initrd.img-6.1.0-rpi6-rpi-v8", but hardly use any CPU, memory, network or disk bandwidth. What is it doing for all this time?

It would be really great if you could do some profiling and see if there are some things that could be run in parallel. I'm sure the Pi Foundation developers would benefit from a quicker build as much as the customers.

Running a build without CLEAN takes about 11 minutes, so that's a big improvement. I'm currently working to get Github Actions to cache the /work folder between runs so I can get an 11 minute build every time.

It would be really great to be able to rent a ludicrously powerful cloud compute instance for a week or two while I work on my build, but there's no point at present - no matter how much resource you throw at it, pi-gen takes 40 minutes.

Cheers
Jeff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant