Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I noticed that my processors were, in total, in use only about 50% of the time while making a Linux kernel.

I usually make the kernel, then make the modules.

I have just started a make bzImage in one terminal and a make modules in another and see that both my processors are in full use. I expect the total compile time will be a lot quicker as I'm compiling in parallel instead of serial.

Are there any "gotya's" that make this unsafe?

share|improve this question
up vote 6 down vote accepted

Just use make -j 3 and it should compile in paralell, and will ensure any dependencies are properly handeled, this is the "official" way to do it.

share|improve this answer
on a two-core system (50% utilization suggests this) -j 2 would be a better idea. With -j 3, system constantly forced to context changes by enforcing 3 jobs on 2 processor threads. BTW the questioner's correct answer is "make -j 2 bzImage modules" – asdmin Sep 5 '09 at 7:27
@asdmin - Because of the way make does paralellism, with <= 4 cores it's better to do N+1, above that there's not as much benefit as IO becomes the bottleneck. – LapTop006 Sep 5 '09 at 11:36

And no, you should not start building two objects in the same directory that are likely to try and compile the same code at the same time.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.