Ashish Krishnan Ashish Krishnan - 9 months ago 42
Linux Question

Spawning Multiple Jobs for building a kernel on Quad Core processor?

If my Kernel's Makefiles have correct dependency information,

To spawn mutliple jobs, I should use this

$make -jn

n = is the number of jobs to spawn

If I use Quad Core Machine like i7 4700MQ with 8 GB RAM, what should be the ideal and the maximum value of n ?

Answer Source
grep '^processor' /proc/cpuinfo | wc -l

It should give You number of CPU's in the system (as seen by OS). You can use this number. Also +1 to this number usualy won't hurt (it depends on project You are building, scheduler in use, etc.).