Brian
Brian

Reputation: 8811

Debian, make-kpkg, and Linux kernel development

Debian's make-kpkg utility can build many of the kernel pieces concurrently. Setting CONCURRENCY_LEVEL=cores+1 is the general rule of thumb for best performance. It's not a bad guess.

I scripted this for various integers. Here's the kernel compile times on an eight-core Xeon. The kernel config is default for Debian's kernel 3.12 package.

CONCURRENCY_LEVEL=1 real    57m17.953s
CONCURRENCY_LEVEL=2 real    30m26.084s
CONCURRENCY_LEVEL=3 real    21m39.387s
CONCURRENCY_LEVEL=4 real    17m13.022s
CONCURRENCY_LEVEL=5 real    14m41.180s
CONCURRENCY_LEVEL=6 real    13m8.875s
CONCURRENCY_LEVEL=7 real    12m8.646s
CONCURRENCY_LEVEL=8 real    11m55.420s
CONCURRENCY_LEVEL=9 real    13m27.034s
CONCURRENCY_LEVEL=10 real    14m17.753s
CONCURRENCY_LEVEL=11 real    14m45.664s
CONCURRENCY_LEVEL=12 real    15m1.784s
CONCURRENCY_LEVEL=13 real    15m10.595s
CONCURRENCY_LEVEL=14 real    15m19.862s
CONCURRENCY_LEVEL=15 real    15m24.915s

make-kpkg also generates a deb package file that can be installed trivially. In contrast, at least one official Fedora doc goes through an extensive process of building an RPM by hand for the same goal I think - automated dependency resolution. It was painful. I suspect Gentoo would be stripped of any concern for packages heh.

So I have a few questions for experience kernel devs. Is the concurrent kernel build a big win and do any other distros offer it? And is compiling with package management in mind a big win?

Thanks in advance.

Upvotes: 0

Views: 1089

Answers (1)

Michael Hampton
Michael Hampton

Reputation: 10000

The value of CONCURRENCY_LEVEL is just passed to the -j option of make. There is nothing special about Debian's kernel build process here; the upstream kernel source code has supported this for many years.

Upvotes: 1

Related Questions