Re: Safety of -j N when building kernels?

Samuel Flory
2002-05-22T18:35:56Z

The only major issue I've seen is the build may fail if you run out
of file handles, or other resources. The build will fail with an
"unable to fork" error. When I was at VA Linux I often compiled kernel
for use with a make -j 16, or -j 8. I seem to remember having to play
with ulimit, and /proc/?/file-max to get enough file handles.

PS- You should also consider logging the output of your compile to a
file. As your other jobs will continue for sometime before the make
fails. Often preventing you from easily finding the actual compile error.

Eric Weigle wrote:
> Ok, stupid question of the moment-
>
> I always read about the kernel compilation benchmarks people run on the
> ultra-snazzy new machines, but do people actually run the kernels thus
> generated?
>
> I have visions of a process being backgrounded to generate some files, and
> not completing before the one of the old files gets linked into the kernel
> (because not all files were listed as dependencies, for example).
>
> So are the kernel's current Makefiles really SMP safe -- can one really
> run multiple jobs when building Linux kernels? Any horror stories, or am
> I just paranoid?
>
>
> Thanks
> -Eric
>