Advantages of trimmed kernel?

Garrett Cooper youshi10 at u.washington.edu
Sun Dec 10 12:45:27 PST 2006


Robert Huff wrote:
> Eric Schuele writes:
>
>   
>>  FWIW... Its my understanding that
>>    - the memory saved would be negligible.
>>     
>
> 	How are we defining "negligible"?  I know I've seen a pruned
> kernel 25% smaller than GENERIC for the same release; I /think/ I've
> seen one 33% smaller.  Is that difference important?  DammifIkno.
> 	IF you're feeling paranoid, compile and install both.
> (Assuming I'm correct in believing they install clean to separate
> directories.)
>
>
> 				Robert Huff
> 				(running a custom kernel since 2.mumble)
>   
As others have mentioned, the pluses to running a kernel without many of 
the trimmings is the fact that it does take less memory and less time to 
boot up / probe. Although this really isn't much of an issue with newer 
machines, due to the amount of available RAM in the machine (typically 
512MB~1GB+), this does make a difference for some embedded systems and 
"limited resource architectures" (Pentium Pro, Pentium 2, etc), where 
RAM is a more of a luxury than on general purpose computers / servers.

One thing that I will note though, is that compile time is also a factor 
for having a smaller kernel. I can recompile my kernel faster when I do 
source upgrades than I could with a generic kernel and all of the 
modules ("NO_MODULES = *" in make.conf). However, doing this has bit me 
in the arse a few times, so ultimately I recommend compiling / removing 
whatever you need with caution.

My advice: heed what Lane said, but you can also trim down your kernel 
intelligently. You can save memory and disk space, as well as reduce 
recompile time in the long run by having a properly trimmed kernel.

-Garrett


More information about the freebsd-questions mailing list