Hi John,

On Sun, Apr 05, 2026 at 01:56:58PM -0400, John Haman wrote:
> Hello Guix users, 
> 
> Assuming i have a 4 core (8 thread) cpu, how do i set —cores and —max-jobs to 
> optimize for reconfiguration time? Does the cores argument specify the 
> numbers of cores per job or across all jobs? Interested in hearing of there 
> are best practices in using these arguments.
(...)

The --max-jobs=N option sets the number of simultaneous builds that the Guix 
Daemon will attempt.

The --cores=N option sets the number of cores that EACH build job will use. Not 
the total number of cores that you're making available for building. The 
default is to use all cores, so by setting --cores you're limiting the amount 
that a build will use. The use-case for setting it is to ensure your system 
doesn't get bogged down with the builder taking everything.

In many cases setting --max-jobs=N is what you want. The challenge here is that 
parralelising builds may or may-not help depending on the situation. For me I 
don't set it to build the Rust toolchain for example, parallelising won't help 
me because the individual Rust builds are so big. Equally, building a bunch of 
Ruby packages is worth parallelising as they are all pretty small.

If we ran --max-jobs=2 and --cores=3, each build will use 3 cores meaning a 
total of 6 cores will be used. Imagine I'm building the `cbonsai' package:

   $ guix build cbonsai --max-jobs=2 --cores=3

Hope that explains it.

Steve / Futurile



Reply via email to