LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Is having a large kernel bad? (https://www.linuxquestions.org/questions/linux-software-2/is-having-a-large-kernel-bad-72192/)

MRK 07-12-2003 04:45 PM

Is having a large kernel bad?
 
I have a question. Is haveing a large kernel bad? If i compile everything possible into the kernel, will that make it slow or unstable? What if i compile on the necisary things into the kernel and then modularize everything else. Will that make it slow or unstable? Thanks for your advice!

-Mr.K

andrew001 07-12-2003 04:59 PM

Having an unecessarily large kernel is probably a bad thing. A large kernel will increase your reboot time, and will most likely be less stable (there will just be more places for things to get messed up!).

Compiling everything possible into a kernel is also a bad idea for security reasons. At least for me, its nice to know exactly what my machine can and cannot support, so I know exactly what the security risks are.

If you're interested in compiling a kernel (definitely a good idea), you should support all of the hardware you have in your computer, and compile things as modules that you think you'll use, or that are related to hardware you might remove frequently (like a wireless usb adapter or something).

As far as compiling almost everything as a module goes, I don't think its really necessary because on the off chance that you need a module you don't have, you can just compile it into /lib/modules without recompiling the kernel.

~Andrew

savix 07-13-2003 08:56 AM

Also, having an excessively large kernel is bad because you can't put it on a floppy and boot it in case you ever need to. But that's only if it's bigger than 1.44 MB

andrew001 07-13-2003 09:10 AM

Good point. : )

savix 07-13-2003 07:06 PM

Don't worry about your kernel being *too* big. The average kernel size is a little more than a megabyte. Almost always, you'll want things in the kernel (if possible) rather than to load modules -- it's almost always faster. Although, you should take out anything unnecessary:

--If you don't have FireWire, disable the firewire... if you aren't running any scsi devices, disable scsi. If you're not running a bus mouse, then don't bother including it in the kernel.

This will make your linux box boot up faster, and i believe also run faster, too.

Things to ALWAYS ALWAYS ALWAYS ALWAYS do when recompiling:

-- make sure that you're compiling for the correct processor (i.e. Pentium 1, 2, 3, Athlon, etc.)

-- make sure you allow support for the filesystems you're planning on using (ESPECIALLY ext3 and ISO9960 (or whatever the heck the CD one is)

there's more, but i'm not gonna list the whole doc for you. Though i'm sure you probably already have it, check out the Linux Kernel HOWTO. It's got all the information you'll need for compiling the kernel and what to do afterwards.


All times are GMT -5. The time now is 04:40 AM.