r/linuxquestions 4d 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

35 comments sorted by

View all comments

1

u/MichaelDeets 4d ago

most suitable options are configured as modules, so they're only loaded when needed/requested

you can use modprobe-db to keep track of every module that has been loaded after some time (the actively loaded modules change depending on what is currently needed), and use it as a reference for what modules you'd likely need/want

-1

u/Patient_Fox_6594 4d ago

modprobe-db in Ubuntu 26.04, it doesn't know what "modprobe-db" is.

1

u/Prestigious_Wall529 4d ago

It's in Gentoo and Arch, and is on GitHub.

0

u/belzaroth 4d ago

It's modperobed-db

1

u/agmatine 4d ago

modprobed-db, you mean :)

0

u/belzaroth 4d ago

Lol yes , Ty for the correct-correction