LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 08-20-2005, 02:07 PM   #1
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,509

Rep: Reputation: 46
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!
 
Old 08-20-2005, 03:09 PM   #2
McCloud
Member
 
Registered: Sep 2004
Distribution: Debian Etch
Posts: 179

Rep: Reputation: 30
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.
 
Old 08-21-2005, 12:51 PM   #3
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,509

Original Poster
Rep: Reputation: 46
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!
 
Old 08-21-2005, 03:36 PM   #4
saman007uk
Member
 
Registered: Dec 2003
Location: ~root
Distribution: Debian
Posts: 364

Rep: Reputation: 33
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.
 
Old 08-22-2005, 04:22 PM   #5
basileus
Member
 
Registered: Nov 2004
Location: Turku, Finland
Distribution: Debian, Ubuntu, Gentoo
Posts: 388

Rep: Reputation: 30
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 .
 
Old 08-22-2005, 04:22 PM   #6
basileus
Member
 
Registered: Nov 2004
Location: Turku, Finland
Distribution: Debian, Ubuntu, Gentoo
Posts: 388

Rep: Reputation: 30
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 .
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linux or unix kernel optimization guide, anyone? grupoapunte Linux - General 1 06-21-2005 11:35 PM
optimization flags and kernel compiling kpachopoulos Linux - Newbie 2 08-26-2004 08:29 AM
Where Is Kernel Directory In Rh9(kernel 2.4.20-8), For Compiling HSP56 MR(pctel) Mode rudy3107 Linux - Software 1 07-25-2004 05:17 AM
Kernel Optimization Quirks Moltag Slackware 5 07-15-2003 03:58 PM
Kernel compiling and module compiling tarballed Linux - General 1 12-22-2002 06:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 02:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration