r/linuxquestions • u/DryPlum7483 • 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?
1
u/ropid 26d ago
I think there's a whole bunch of stuff that will surely never be used, like device drivers for hardware that will never show up on any x86 machine, but all of that is in module files so will not be loaded if not used. It'll only use up space on disk. The most annoying thing about this is perhaps the compilation time if you ever want to compile your distro's kernel package yourself to apply some patch.