Feb. 23, 2020
12:18 p.m.
Pratyush Das <reikdas@gmail.com> writes:
Next time try make -j<number of cpu cores + 1 )
I thought it was limited by the number of processor threads? In this case, if each CPU core has just one thread, the +1 does not really serve a purpose?
It's not limited. And the processes will compete for more than just CPU resources, so it can make sense to run a few more than you have CPU cores. This gives the scheduler something to work with when some of the make processes are blocking on IO. Personally I often use twice the number of cores, including the hyperthreaded ones. So I run 'make -j16' on a 4 core CPU with HT. You won't see much improvement by overcommitting like this, but it doesn't harm either. Bjørn