LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-28-2009, 08:34 AM   #1
hkothari
Member
 
Registered: Jul 2009
Location: Lowell, Massachusetts
Distribution: Slackware
Posts: 70

Rep: Reputation: 17
Compiling Your Own Kernel


I guess this is the best place to ask, so:
What are the advantages and disadvantages to compiling your own kernel?

I'm assuming one advantage is it runs faster because it's customized for your hardware but it is a noticable amount faster? What are some disadvantages?
 
Old 08-28-2009, 09:11 AM   #2
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.2
Posts: 7,659
Blog Entries: 56

Rep: Reputation: Disabled
I've only tried it once (on Slackware 12.2), that was to enable the HIGHMEM64G (or whatever it's called) to guarantee using the full 4 GB RAM on a 32 bit system. But since I never did anything that needed anywhere near that much RAM, I didn't really see any advantage.
 
Old 08-28-2009, 09:29 AM   #3
lazy_troll
LQ Newbie
 
Registered: Aug 2009
Location: Russian Federation
Distribution: Xubuntu. At the time trying out some source-based distro
Posts: 1

Rep: Reputation: 0
hkothari
Advantage: Your system will boot up faster rather then run faster, imho. You'll won some seconds with booting (from x to xx), but loose hours for customizing your own kernel. Also you can build a monolithic kernel - it is more secured than modular. Usually user-friendly distros (but not only them) has a modular kernels.
brianL Agree.

Last edited by lazy_troll; 08-28-2009 at 09:35 AM.
 
Old 08-28-2009, 09:42 AM   #4
rn_
Member
 
Registered: Jun 2009
Location: Orlando, FL, USA
Distribution: Suse, Redhat
Posts: 127
Blog Entries: 1

Rep: Reputation: 25
I have also only compiled the kernel once.. a long long time ago when 2.6 had recently been released, and i was trying to turn on the hyper-threading option.

Quote:
Originally Posted by hkothari View Post
I'm assuming one advantage is it runs faster because it's customized for your hardware
Not necessarily. it's all relative .

Basically the main advantage is to preload (or prevent preload) modules which you may need. besides that, there are tons of options you can turn on or off depending on your need. so, if you were to preload a lot of modules or turn on some options that aren't on by default, you might actually make it slower.

how fast or how slow depends on the options and modules you select. also, if someone was to say it will shave off 10 microseconds per instruction, for instance, to a desktop user like myself that wouldn't mean much, but it would really be a huge deal for people using it in real-time envs. and simulations, etc.

i think no one can really quantify how fast or slow it would be unless they had in-depth knowledge of the hardware and the options you want to select.

you might have to run some stress tests to get exact figures.

in conclusion, for lay-people like me, the pre-built kernels are far too efficient already, and the time and effort required to compile it is just not worth it. But, you know your requirements best.

HTH.
-RN.
 
Old 08-28-2009, 11:16 AM   #5
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,899
Blog Entries: 27

Rep: Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186
Hi,

To compile your kernel to allow customization for hardware that may be unique to your needs or use is the primary reason for the task. As for time gains, minimal.

To trim for size is important when you need to minimize for systems that may be small footprints. Embedded systems are one example where you would want the smallest kernel possible. Systems of this type have the bare minimum hardware to support the system usage. So you would want to just have the necessary support for that same hardware.

Then you have architecture needs, if say you want to build a kernel for a different processors that is not resident on your machine. It is a lot faster to build a kernel on a modern system then it is to build one for another machine that may not have the same resources available.
 
Old 08-28-2009, 11:37 AM   #6
mushroomboy
Member
 
Registered: Jan 2006
Distribution: Debian Testing ALWAYS!!!
Posts: 363

Rep: Reputation: 43
The huge idea that compiling the kernel speeds up the system drastically isn't quite so drastic these days. For the time and energy you spend learning what everything means and configuring everything you really won't reap any benifits... I don't remember where I read it but some people did tests to see if compiling a system (such as gentoo/slack I believe) is very much faster than other distro's. What they found was minimal, due to the power of most technology today it doesn't matter as much. onebuck is right with building on other systems and embeded systems, and most of us will say on a modern desktop it's relatively pointless. =( The only other reason is if you wanted to build a brand new kernel, one that might not be released in your distro's repository. But then your open to it breaking....
 
Old 08-28-2009, 11:47 AM   #7
hkothari
Member
 
Registered: Jul 2009
Location: Lowell, Massachusetts
Distribution: Slackware
Posts: 70

Original Poster
Rep: Reputation: 17
Ok, thank you, looks like I learned something while downloading Slackware 13. Thanks all.
 
Old 08-28-2009, 01:07 PM   #8
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,899
Blog Entries: 27

Rep: Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186
Hi,

Quote:
Originally Posted by hkothari View Post
Ok, thank you, looks like I learned something while downloading Slackware 13. Thanks all.
I'm glad to see your getting a real OS.

Take a gander at my Sig for some useful links.
 
  


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
Good but sorta easy guide to Kernel compiling/Re-Compiling? linus72 Linux - General 1 07-13-2009 02:37 PM
Compiling a module separately without compiling entire kernel kushalkoolwal Linux - Kernel 8 08-06-2008 02:45 AM
compiling kernel problem --- Kernel panic: unable to mount root fs ........ anthonymts123 Linux - General 5 07-31-2006 03: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 compiling and module compiling tarballed Linux - General 1 12-22-2002 06:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:38 AM.

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