LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 08-17-2006, 01:45 AM   #1
s4006576
LQ Newbie
 
Registered: Dec 2003
Posts: 10

Rep: Reputation: 0
To Build into Kernel or to Modularise?


I'm trying to compile a 2.6.x kernel for my slack box. There is an option for building into the kernel or to modularise for almost every component. The general question is - what is the rule-of-thumb for deciding on which approach to take for each component? What are the pros and cons of each approach?

More specifically, I have a slow computer (Transmeta Crusoe on some VIA chipset [I think...] running on old-school SDRAMs with the on-board graphics accelerator leeching memory off it) and I want to optimise my slack, which mainly runs xfce on it.

* Bonus question: I can't figure out where the bottleneck for the sluggish performance is. Any benchmarking tool or some method that I can use to pinpoint the bottleneck?

Back to modules, any specific functions that I should modularise and any specific ones to build in to get the maximum performance from my box?
 
Old 08-17-2006, 11:30 AM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Unless you want to make an initrd image for boot, you're required to compile in your PCI controller and filesystem type. Mine for example are piix and ext3.

Beyond that, on my old machine I just compile everything I want in and then say "N" to everything I know I don't need (like the 57 sound cards that I know I don't have). Anything that is vague or I'm not exactly sure I need, I leave as a module. My machine works pretty quickly now (Debian Sarge with a minimal KDE on a Celeron 400MHz, 256MB Ram).
 
Old 08-18-2006, 01:15 AM   #3
ciotog
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 728
Blog Entries: 2

Rep: Reputation: 43
One advantage of using modules instead of compiling in is that if a module craps out it likely won't take the entire kernel with it. Of course with the stability of linux that doesn't seem to happen much anyway.

Another advantage of the modular approach is that you can upgrade modules (for example alsa) without a kernel recompile.
 
Old 08-18-2006, 12:28 PM   #4
soggycornflake
Member
 
Registered: May 2006
Location: England
Distribution: Slackware 10.2, Slamd64
Posts: 249

Rep: Reputation: 31
In terms of device drivers, personally, if it's on the motherboard, I build it in, if it's a PCI card etc, I make it a module (so if I remove the card, the driver is not wasting space). Exceptions are sound and network drivers, since I might want to juggle them (i.e. use an audigy instead of onboard sound, use a pci network card if the onboard exhibits any flakiness and so on).

Obviously, you need to compile in whatever you need to boot (framebuffer, root filesystem driver and so on). Other than the essentials for booting, I leave most stuff as modules, especially drivers that take parameters, as the only way to change the parameters for a builtin driver is to reboot. A module can just be reloaded.

There may be (I haven't benchmarked) a tiny performance overhead using modules, but this will be negligible. If your system is sluggish, it's extremely unlikely that the cause is too many modules!

First thing to check is if you have dma enabled (hdparm /dev/hda). You can use hdparm -tT /dev/hda for a quick memory/drive throughput test. Bonnie is also useful for testing hard drives.
 
Old 08-19-2006, 06:54 PM   #5
s4006576
LQ Newbie
 
Registered: Dec 2003
Posts: 10

Original Poster
Rep: Reputation: 0
dma is on
cached reads: 230 Mb/s
buffered disk reads: 30 Mb/s

is that good or bad?
 
Old 08-22-2006, 04:32 PM   #6
soggycornflake
Member
 
Registered: May 2006
Location: England
Distribution: Slackware 10.2, Slamd64
Posts: 249

Rep: Reputation: 31
That seems pretty reasonable for your hardware. On my Athlon 64 3200 box at home, I get ~2200 MB/s cached and 55-60 MB/s buffered. My old 2GHz Athlon 2800 got ~800/50 (dual channel). I'm currently using my mother's 1.4GHz Athlon XP, and I'm getting ~490/30 (single channel, motherboard isn't great). On my old PIII's I get 400/20 (1GHz, rambus) and 250/16 (600MHz, sdram).
 
  


Reply



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
10.1 install kernel and kernel-source different - build fails Feebles Mandriva 2 06-10-2005 06:58 PM
kernel-source-2.6.5-7.src.rpm requires kernel-dummy to build!? fizzdandantilus SUSE / openSUSE 5 12-02-2004 12:48 PM
New FAQ topic: Should I edit my kernel configuration?/Should I build a custom kernel? chort *BSD 10 09-10-2004 11:15 PM
Unable to build NVIDIA kernel module / determin kernel version Night Ink Fedora 2 05-31-2004 04:54 PM
Cant run X/KDM after new kernel build, even on old kernel bbska Slackware 2 02-25-2004 10:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 10:55 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
Open Source Consulting | Domain Registration