LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Kernel compiling and optimization? (https://www.linuxquestions.org/questions/debian-26/kernel-compiling-and-optimization-355226/)

bruno buys 08-20-2005 01:07 PM

Kernel compiling and optimization?
 
Hi,
Yesterday I compiled a kernel following the guide from http://www.debian-administration.org/articles/202. It was painless, everything went smooth.
I opted for using the same conf file already in the system /boot/config-2.6.8-2-k7, which left me out of the long and detailed step when I'd remove non needed stuff.
It was nice for learning, but I achieved no optimization in the kernel.

Now I'd like to actually redo everything and get to this optimizing step. So, I'd like to ask for guidance, links, tutorials or anything that can help me figure out which stuff do I need on my kernel (the kernel menu is quite detailed).

And ask further: how much of performance can be increased by recompiling?
Has anyone compiled 2.6.12.5 and used it in debian?
An athlon system would benefit by a custom kernel?

thanks!

McCloud 08-20-2005 02:09 PM

You should use the Debian Kernel Source of 2.6.12. Debian applies specific patches to the kernel (I don't know what the patches actually are, but these kernels are supposed to work better on a Debian system then the kernels from kernel.org). The packages is called 'linux-source'.

As far as optimizing things. It's just a process of going through every kernel option in the 'make xconfig' menu. Read the description (the descriptions are quite good) and decide if you need it or not. There are some standard things you can do:

- When you don't know what a kernel option does, follow the advice given in the description (it will say something like: "If unsure say NO" or "If unsure say YES".)
- When you think that you don't need something, but you're not really sure, compile it as a module, so you can load it later when you need it.
- When you're sure you don't need it, don't compile it.
- When you're sure you need it, compile it into the kernel
- When you're sure you need it sometimes, but not all the time, compile it as a module, so you can load it when you need it.

As far as performance, I don't think you'll actually notice the improvement. Maybe the kernel will load faster because it is smaller.

Another thing you can do to improve speed and performance is to look at the daemons that are loaded and make sure that only the daemons you really need are loaded (so, if you don't need a webserver, disable the Apache daemon, or if you don't need Samba, disable the Samba daemon). A nice tool to configure which daemon loads at which runlevel is 'sysv-rc-conf'.

Good luck.

bruno buys 08-21-2005 11:51 AM

Hi,
I managed to compile and boot 2.6.12-5. The question is: I have lots of new modules loaded by default, that I can't simply rmmod. See:

(edited list)
Code:

siimage                12416  0 [permanent]
aec62xx                7616  0 [permanent]
trm290                  4228  0 [permanent]
alim15x3              12172  0 [permanent]
hpt34x                  5248  0 [permanent]
hpt366                19904  0 [permanent]
cmd64x                12060  0 [permanent]
piix                  10628  0 [permanent]
rz1000                  2560  0 [permanent]
slc90e66                6144  0 [permanent]

frank:/home/bruno# rmmod trm290
ERROR: Removing 'trm290': Device or resource busy

I'm positive I don't have this hardware. What am I missing here?
Thanks!

saman007uk 08-21-2005 02:36 PM

The error message explains it - the device/service which the module provides access to is busy, most likely you need these modules for your hardware (e.g. sound card, modem, ... ) to work.

basileus 08-22-2005 03:22 PM

At least some of your modules seem to be (unnecessary) motherboard bugfixes. To optimize the kernel further I'd remove all motherboard chipset fixes and enhanced support that is not directly related to your motherboard's chipset.

Run "lspci" and check what chipset / controllers you have and remove support for all others. Just make sure you leave the original, working kernel to the boot menu, just in case you mess up :).

basileus 08-22-2005 03:22 PM

At least some of your modules seem to be (unnecessary) motherboard bugfixes. To optimize the kernel further I'd remove all motherboard chipset fixes and enhanced support that is not directly related to your motherboard's chipset.

Run "lspci" and check what chipset / controllers you have and remove support for all others. Just make sure you leave the original, working kernel to the boot menu, just in case you mess up :).


All times are GMT -5. The time now is 01:28 AM.