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’.