Re: make -j in Debian packages
Adam Borowski <email@example.com> writes:
> On Wed, Jun 28, 2006 at 07:50:50PM +0300, Lars Wirzenius wrote:
>> ke, 2006-06-28 kello 18:43 +0200, Adam Borowski kirjoitti:
>> > What do you think about going with Don Armstrong's suggestion
>> > ($CONCURRENCY_LEVEL), while handling the default (no env var) my
>> > way (decent memory => parallel, little memory => -j 1) instead of
>> > Ingo's (-j 1 unless explicitely set)?
>> I'm in favor of Ingo's approach. I don't think it is a good idea to
>> hardcode assumptions of what is sufficient memory size into rules files;
>> that's the kind of thing that is best done centrally.
> Still, the buildd admin has no way to estimate how much a sub-process
> of a package is going to use, the maintainer has at least a rough
> idea. Since the maintainer's action is needed anyway, he can as well
> provide this estimate.
> And then the buildd admin can set CONCURRENCY_LEVEL to 1 to centrally
> disable any parallelism of this kind.
One could patch make to use concurency when the ram permits. This
would involves checking the current ram usage and forking more builds
if there is enough as well as suspending submakes when swapping
starts. But i guess that would greatly complicate make itself.