Ludovic Courtès <[email protected]> writes:
> Sergio Pastor Pérez <[email protected]> writes:
>>
>> I like this idea. It would be nice to have user preferences. For
>> example, most of the times I want to run Guix commands with:
>> `-c $(nproc) -M 10`.
>
> You can configure guix-daemon to default to these (in that case there’s
> a risk of overcommitting since you could build 10 derivations
> concurrently, each of which would use all the CPU cores).

Oh, I did not think that `-c` is a configuration option that applies per
derivation. It would be nice to have an option to assign a pool of CPUs
that the daemon can assign to any of the, in this case, 10 concurrent
derivations, that would alleviate the CPU core context switching, right?

I'm guessing that doing `-c $(nproc)` alone would not always be faster,
since there are operations done while building a derivation that are not
particularly heavy on CPU, such as fetching sources or writing to disk.

Do you think we could implement this kind of feature? Or perhaps is
there a better way to balance the load of derivation building? The
`-c $(nproc) -M 10` has quite a major speed up in my experience.


Regards,
Sergio

Reply via email to