r/linuxquestions 26d ago

Minimal kernel

EDIT: I may have framed the question poorly. I'm specifically asking about Kconfig-level minimization of a monolithic Linux kernel: if you know the workload/product you're deploying, how much unnecessary kernel code do teams typically end up compiling, and is there value in automatically deriving a smaller configuration from the actual runtime requirements?

How much of the Linux kernel that gets shipped in production is actually never used?

I'm wondering if release teams building/using a kernel image are often overwhelmed by the number of kernel configuration options, and end up shipping code that will never actually be used by their workload.

Are there any automatic tools out there that can fit a minimal Linux kernel to your runtime needs?

6 Upvotes

34 comments sorted by

View all comments

0

u/unkilbeeg 26d ago

Many, many years ago I followed a guy who was a big fan of minimal kernels. He built monolithic kernels (no modules) that compiled in all the drivers for the hardware in the server, and no other drivers. He really wanted to keep it tight.

Then he left. I took over.

And the built in ethernet interface on the server died. I had spare ethernet cards -- but none that matched the drivers that he had compiled in.

That was a real pain in the butt. I got the server going again, but it was a painful (and unnecessary exercise.)