Advantages of trimmed kernel?
wmoran at collaborativefusion.com
Sun Dec 10 08:59:34 PST 2006
Kirk Strauser <kirk at strauser.com> wrote:
> On Sunday 10 December 2006 09:19, Lane wrote:
> > You say that you can't afford to take a production machine down, but
> > consider this: What if you trimmed all of the "fat" from the kernel on a
> > server, and then the server's nic goes bad.
> Well, that's an example of the kind of thing that makes me not want to hack
> GENERIC too much. Also, accidentally removing some critical driver is
> another drawback. So, with all the disadvantages, are there any real
> advantages to doing this? Saving half a meg of memory on a four gig machine
> isn't worth the aggravation. Squeezing an extra 10% performance out of the
> same hardware would be, though.
It's interesting that I've never seen any performance tests regarding
this sort of thing.
Theoretically, the kernel should be faster with less stuff in it, but
whether that theory bears out in practice, and whether it's enough to
make it worthwhile -- I don't know.
The tough thing would be effectively testing it. It's quite possible
that only certain functions of the kernel would speed up, in which case,
it could be difficult to determine whether there's any gain or not.
Additionally, different drivers might provide different advantages/
disadvantages from being loaded/unloaded. I.e., compiling without a
particular SCSI adapter might provide a benefit, while compiling
without a particular NIC driver might do nothing.
One has to wonder whether it's even worth going to all the work to
quantify it? I mean, take the following in to account:
1) Recompiling a kernel in FreeBSD is damn easy.
2) Loading a driver from a kld if you forget it is easy.
3) Most (all?) settings that are set at kernel compile time can be
adjusted via sysctl without recompiling.
4) There's obviously no _huge_ benefit to building a custom kernel,
or someone would have made mention of it.
More information about the freebsd-questions