LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-01-2009, 12:21 AM   #1
ninja master
Member
 
Registered: May 2008
Distribution: funtoo/gentoo amd64 xwrt
Posts: 412

Rep: Reputation: 31
best way to compile a kernel


is it better to compile everything into your kernel, and have a giant kernel, or is it better to run your kernel as modules, with initrd images? i currently have everything i have / use compiled in, and it seems to be slower and larger than the huge smp kernel i started with. im seeking to extract every ounce of performance out of this machine, and am open to tips and suggestions.

i did trim everything out of the kernel that i dont use, but switched everything that i do use to compiled in.
 
Old 02-01-2009, 11:01 AM   #2
dividingbyzero
Member
 
Registered: May 2008
Location: Earth
Distribution: Slackware 12.2
Posts: 52

Rep: Reputation: 16
I don' think it really matters. I don't think that attaching modules will give you a faster or slower kernel. The cpu, memory, and system bus are what gives you speed, the kernel, etc. are just a bunch of 1's and 0's. On old (really old) computers software things mattered more; today's computers are so fast that software issues such as optimization, etc. go mostly unnoticed.
 
Old 02-01-2009, 07:19 PM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
It really doesn't matter performance-wise.

Disabling the module support in your kernel however has other implications (for example, the fact that you are going to be invulnerable to rootkits that comes as kernel modules). But in modern desktops that's almost impossible, because you need it to install drivers like those for graphics cards, which most times have a closed source nature.
 
Old 02-02-2009, 08:04 AM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
It does matter in startup speed. Loading a larger kernel can in some cases mean a big difference in boot speed.

My theory is compile most things as modules. This is not only because it will be faster to boot, but also because it will cause less potential problems derived from driver conflicts. Still I would make sure to make the filesystem drivers built-in so you don't have to use an initrd. Most of the rest can all be modules.
 
Old 02-02-2009, 11:25 PM   #5
ninja master
Member
 
Registered: May 2008
Distribution: funtoo/gentoo amd64 xwrt
Posts: 412

Original Poster
Rep: Reputation: 31
i find myself agreeing with H_TeXMeX_H my coustom kernels i was compiling in the sound and other stuff. my hand compiled kernels would be larger than huge smp. almost 5 meg! i would like the thoughts of a few others on this though.
 
Old 02-03-2009, 12:26 AM   #6
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by ninja master View Post
i did trim everything out of the kernel that i dont use, but switched everything that i do use to compiled in.
Not sure if this is "the best way", but I prefer to take official slackware kernel configuration, then enable few additional things I need (optimize for cpu, larger timer frequency, etc).
 
Old 02-03-2009, 04:24 AM   #7
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Quote:
Originally Posted by ErV View Post
Not sure if this is "the best way", but I prefer to take official slackware kernel configuration, then enable few additional things I need (optimize for cpu, larger timer frequency, etc).
Yeah, I agree, I use the generic kernel config, then tweak it.
 
Old 02-03-2009, 09:16 AM   #8
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
Same here but I normally only compile in the eseentials along with my NIC and then add everything else as a module.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[Compile kernel] How to compile/install the modules ? frenchn00b Linux - General 1 09-06-2009 03:18 PM
Why can't I compile this kernel module? (kernel: 2.6.8-powerpc Debian sarge) Lannix Linux - Hardware 5 05-01-2007 12:29 PM
How to restore out-of-box kernel settings if my kernel compile fails? brgr88 Slackware 8 04-18-2006 06:51 AM
upgraded kernel, won't let me compile kernel once Suspend2 patches are applied microsoft/linux Linux - Laptop and Netbook 3 10-02-2005 02:37 PM
Kernel 2.4.23 compile causes kernel panics on ATA RAID-1 (mirror) array Raptor Ramjet Slackware 3 12-18-2003 01:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:24 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