This post is part 8 of the "From the diary of AArch64 porter" series:
- From the diary of AArch64 porter — autoconf
- From the diary of AArch64 porter — rpm packaging
- From the diary of AArch64 porter — testsuites
- From the diary of AArch64 porter — POSIX.1 functionality
- From the diary of AArch64 porter — PAGE_SIZE
- From the diary of AArch64 porter — vfp precision
- From the diary of AArch64 porter — system calls
- From the diary of AArch64 porter — parallel builds
- From the diary of AArch64 porter — firefighting
- From the diary of AArch64 porter — drive-by coding
- From the diary of AArch64 porter — manylinux2014
- From the diary of AArch64 porter — handling big patches
- From the diary of AArch64 porter — Arm CPU features table
Imagine that you have a package to build. Sometimes it takes minutes. Other one takes hours. And then you run htop
and see that your machine is idle during such build… You may ask “Why?” and the answer would be simple: multiple cpu cores.
On x86-64 developers usually have from two to four cpu cores. Can be double of that due to HyperThreading. And that’s all. So for some weird reason they go for using make -jX
where X is half of their cores. Or completely forget to enable parallel builds.
And then I came with ARM64 system. With 8 or 24 or 32 or 48 or even 96 cpu cores. And have to wait and wait and wait for package to build…
So next step is usually similar — edit of debian/rules
file and adding --parallel
argument to dh
call. Or removal of --max-parallel
option. And then build makes use of all those shiny cpu cores. And it goes quickly…
UPDATE: Riku Voipio told me that Debhelper 10 does parallel builds by default. If you set ‘debian/compat’ value to at least ‘10’.