On 2016-10-10,
lawren...@gmail.com <
lawren...@gmail.com> wrote:
> Why is the recommendation for running builds as fast as possible to use
>
> make -j$(($(nproc) + 1))
>
> rather than
>
> make -j$(nproc)
>
> ?
This is because make jobs can become I/O bound.
You are not ray-tracing or cracking passwords.
If you have a mixture of I/O and computation, the mix can benefit from
the use of multiple processes.
Suppose you have only one processor, and you run the build steps as one
process. When that process blocks on I/O, nothing happens until it
unblocks. An opportunity is possibly missed to be compiling something.
This generalizes to muliple processors.
That opportunity is not *great* because the build doesn't involve that
many different storage devices (often just one). That's why it's not
"nproc + 15" or "nproc * 2". Just + 1.