Do I really need to know how to compile the Linux kernel?

0

Most lists of things we do to learn Linux ignore the bits you don’t really need to do. Here is one I can suggest you skip as not being worth the time you might invest.

Compiling the kernel

Don’t bother. This might be a nice exercise if you are a developer, or trying to get the last bit of CPU efficiency in a supercomputer and really want to do massive kernel mods but most SysAdmins will never need to do this. You might also want to do this if the certification you are working on requires it but other than that you are pretty much wasting your time to do this.

The fact is that the kernel is compiled with a really good set of options for the vast majority of today’s desktop and server needs. If you are having performance issues you would be better off to determine whether the culprit really is the CPU and if it is, install a bigger and faster CPU. Sometimes faster memory will help rather than a faster CPU. You just need to research it and figure out what the real problem is.

If changes to the kernel are required, altering one or more of the kernel tuning parameters in the /proc filesystem will most likely be the best way to resolve the problem.

I can point to one interesting example of why most SysAdmins will never need to compile the kernel. When installing VirtualBox on a Linux host I also needed to install some Linux development tools. The reason those tools were required is that VirtualBox compiles its own kernel module on the system on which it is installed. It does this the first time it starts on that system and it also checks to see whether the kernel has been updated in which case it recompiles its kernel modules again. The VirtualBox developers have automated that necessary task so that users do not need to know how to do it.

Of course if you are just curious …

Leave a Reply