LinuxQuestions.org
Have you heard the LinuxQuestions.org Podcast?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Thread Tools
Old 10-05-2009, 05:46 PM   #16
Ahmed
Member
 
Registered: May 2005
Location: München, Germany
Distribution: Slackware
Posts: 336
Thanked: 4

[Log in to get rid of this advertisement]
With a custom kernel I managed to reduce the kernel image size by 50%, but bootup time wasn't faster than with the stock kernel except by a few seconds only. At 35 seconds from hitting enter in grub to a login screen on a 4 year-old laptop, I can't really complain Probably editing init scripts would help more in that respect..

-A
linuxslackware Ahmed is offline     Reply With Quote
Old 10-05-2009, 10:09 PM   #17
BrZ
Member
 
Registered: Apr 2009
Distribution: Slackware
Posts: 210
Thanked: 15
Some day I will build one of those tickless low latency beasts just out of curiosity =]
linux BrZ is offline     Reply With Quote
Old 10-05-2009, 10:10 PM   #18
mudangel
Member
 
Registered: May 2008
Location: Ohio
Distribution: Slackware
Posts: 123
Thanked: 8
I love tickling low latency beasts!
linuxslackware mudangel is offline     Reply With Quote
Old 10-05-2009, 11:45 PM   #19
amiga32
Member
 
Registered: Mar 2009
Location: Illinois
Posts: 85
Thanked: 9
Surely there's no reason not to. In most linux distributions and even FreeBSD, there are some caveats to using to a custom kernel over a stock one, but Slackware was more or less tailored to trim down and customize your system the way you want.

Last edited by amiga32; 10-05-2009 at 11:49 PM..
windows_xp_2003 amiga32 is offline     Reply With Quote
Old 10-06-2009, 04:01 AM   #20
bennethos
Member
 
Registered: Aug 2003
Location: Belgium
Distribution: -- Slackware for servers -- Debian for desktops --
Posts: 113
Thanked: 0
I also recompiled my kernel to 2.6.31.1 , removed all the crap I didn't need.

- efficiency
- less problems that "could" arise
- bootup is a lot faster (I only have the modules I need)
- less prone to exploits vs a kernel that has everything included.

...
linux bennethos is offline     Reply With Quote
Old 10-06-2009, 04:02 AM   #21
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 6,744
Blog Entries: 2
Thanked: 216
Quote:
Originally Posted by BrZ View Post
Some day I will build one of those tickless low latency beasts just out of curiosity =]
I usually enable tickless anyway, but latency does not concern me.
linuxslackware H_TeXMeX_H is offline     Reply With Quote
Old 10-06-2009, 04:19 PM   #22
Ilgar
Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 13.0, Pardus 2009
Posts: 661
Thanked: 33
I'm using custom kernel, indeed I have to. The stock one causes random lockups. I suspect they are related to disk drivers, I can prevent them with the "noapic" boot option. I couldn't figure out which module or feature in the kernel causes the problem but I don't really bother, since my simplified custom kernel works pretty well.
linux Ilgar is offline     Reply With Quote
Old 10-06-2009, 04:30 PM   #23
linuxpokernut
Member
 
Registered: Jul 2007
Location: Pikksburgh PA
Distribution: Slackware 12.2
Posts: 156
Blog Entries: 6
Thanked: 11
things vary from distro to distro. I noticed the debian user said how much faster it made his system etc etc. I never used debian but when I had ubuntu 9.04 with a custom kernel the same system was still slower than what I'm using now, which is booting off of the slackware install disk. I've never had a need to install a custom kernel in slackware, but maybe you do. I vote for "if it aint broke don't fix it".
linux linuxpokernut is offline     Reply With Quote
Old 10-07-2009, 01:15 AM   #24
TwinReverb
Member
 
Registered: Sep 2008
Location: Kunsan Air Base, South Korea
Distribution: Slackware
Posts: 126
Thanked: 3
Quote:
Originally Posted by bennethos View Post
I also recompiled my kernel to 2.6.31.1 , removed all the crap I didn't need.

- efficiency
- less problems that "could" arise
- bootup is a lot faster (I only have the modules I need)
- less prone to exploits vs a kernel that has everything included.

...
I vote the same: efficiency. This is important to people such as laptop users (more efficient with power usually means longer battery life).

As for bootup being faster, I can see that to a point. I would think that more modules (<M>) doesn't really matter to boot up speed since they're not "in" the bzImage, but I could be wrong.

Less problems that "could" arise? I don't see that except from a statistical basis (same logic as "the longer you leave your computer online, the more likely you are to be hacked").

Less prone to kernel exploits? I don't know if I buy that except (again) from a statistical basis, but you'd see a kernel update come out to fix the said exploit, so I don't see this being much of an issue.

This has been said before, but I'll repeat it: the huge and generic kernels are made so that they run on as many computers as possible, which is their goal, and they do it well. However, efficiency and speed can sometimes be found in tailoring the kernel for your machine (especially if you compile a kernel, which I would think everyone does when an update to the kernel comes out). Since you're already going to compile a kernel if an update comes out, might as well take a few seconds to do good. Even something as simple as specifying your CPU and disabling Generic X86 results in a smaller kernel image, which should translate into better performance.

Does anyone know of a way to test this theory, however? I'm thinking benchmarks, but what benchmarks would you think would prove or disprove efficiency theories?

As for efficiency, I can already tell you in terms of battery life that generic-smp gets about 2 hours 30 minutes out my battery, while my slap/slap64 configs get about 2 hours 40 minutes. Using hdparm to get the hard drive to spin down results in 3 hours battery life in conjunction with my slap/slap64 configs.
linux TwinReverb is offline     Reply With Quote
Old 10-07-2009, 01:38 AM   #25
Daedra
Member
 
Registered: Dec 2005
Location: Long Beach, CA
Distribution: Slackware32/64 13.0
Posts: 494
Thanked: 25
How small have you guys got your kernels? My current is 1645kb.
linux Daedra is offline     Reply With Quote
Old 10-07-2009, 02:05 AM   #26
TwinReverb
Member
 
Registered: Sep 2008
Location: Kunsan Air Base, South Korea
Distribution: Slackware
Posts: 126
Thanked: 3
Quote:
Originally Posted by Daedra View Post
How small have you guys got your kernels? My current is 1645kb.
I'm at 2MB but that's my "works on everything" slap config (at least everything 586 or higher).
linux TwinReverb is offline     Reply With Quote
Old 10-07-2009, 07:35 AM   #27
tommcd
Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Ubuntu, Slackware
Posts: 747
Thanked: 58
Quote:
Originally Posted by rob.rice View Post
the newer kernels have a make option that matches the kernel to the hardware it's running on
" i386_defconfig 32bit system or x86_64_defconfig 64bit system " you will still need to run menuconfig
to move things to modules ,add support for usb devices,setup file systems and other non hardware things...
That sounds interesting. I have only limited experience compiling kernels, but this seems like a cool option to use.
So how does this work exactly? Do you first run "i386_defconfig" or "x86_64_defconfig" and then run "make menuconfig" or "make xconfig"?
Does this automagically compile a kernel specific for your hardware?

Last edited by tommcd; 10-07-2009 at 07:47 AM..
linux tommcd is offline     Reply With Quote
Old 10-09-2009, 04:55 AM   #28
Josh000
Member
 
Registered: Aug 2009
Posts: 138
Thanked: 4
Quote:
Originally Posted by TwinReverb View Post
As for bootup being faster, I can see that to a point. I would think that more modules (<M>) doesn't really matter to boot up speed since they're not "in" the bzImage, but I could be wrong.
Without compiling modules, and with only have the actual drivers I actually need, I now bootup in less than half the time than with the generic. If nothing else, boottime will be significantly improved.

Quote:
Less problems that "could" arise? I don't see that except from a statistical basis (same logic as "the longer you leave your computer online, the more likely you are to be hacked").
If you have additional features enabled, that you don'T need, that are unstable or have a bug, they could cause a problem. It is not the same logic as the more you are online the more likely you are to be hacked, but rather the same logic as it is good practice not to runs ervices you don't need.

Quote:
Less prone to kernel exploits? I don't know if I buy that except (again) from a statistical basis, but you'd see a kernel update come out to fix the said exploit, so I don't see this being much of an issue.
Most kernel exploits have not been specific to any drivers, and would effect anyone. Still, by removing everything you don'T need, you are reduice the attack area.

Quote:
However, efficiency and speed can sometimes be found in tailoring the kernel for your machine (especially if you compile a kernel, which I would think everyone does when an update to the kernel comes out).
You may be understating the benefits here. The huge generic kernel runs on most computers, which is its goal. It does this by sacrificing speed and efficieny. A tailered kernel will definitly result in noticably better speed and performance, in my experience.
linuxdebian Josh000 is offline     Reply With Quote
Old 10-09-2009, 05:12 AM   #29
slackd
Member
 
Registered: Sep 2009
Location: Kolkata, India
Distribution: Slackware 13 x64-Current (2.6.32-rc7) MLiB, Windows 7 x64
Posts: 185
Blog Entries: 1
Thanked: 38
Quote:
Originally Posted by Daedra View Post
How small have you guys got your kernels? My current is 1645kb.
mine stands @ 2.4MB, its a work in progress though. it takes ~25 seconds to startup.
linuxslackware slackd is offline     Reply With Quote
Old 10-09-2009, 08:40 AM   #30
TwinReverb
Member
 
Registered: Sep 2008
Location: Kunsan Air Base, South Korea
Distribution: Slackware
Posts: 126
Thanked: 3
Quote:
Originally Posted by Josh000 View Post
If you have additional features enabled, that you don'T need, that are unstable or have a bug, they could cause a problem. It is not the same logic as the more you are online the more likely you are to be hacked, but rather the same logic as it is good practice not to runs ervices you don't need.

Most kernel exploits have not been specific to any drivers, and would effect anyone. Still, by removing everything you don'T need, you are reduice the attack area.

You may be understating the benefits here. The huge generic kernel runs on most computers, which is its goal. It does this by sacrificing speed and efficieny. A tailered kernel will definitly result in noticably better speed and performance, in my experience.
Well it's not the same logic because modules don't respond over the internet unless that's their design. You can have those services on the machine and not running, which to me sounds like it's the same as compiling as modules but not loading them.

If most kernel exploits have not been specific to any drivers and would affect everyone, I don't see how the attack area decreased.

Still, it's your machine, have fun 8-)
linux TwinReverb is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
Can't build any modules for custom kernel jittys Linux - General 1 02-16-2007 02:53 PM
Fresh Slack 11 install + 2.6 custom build bgeddy Slackware 6 10-20-2006 08:38 AM
Custom kernel image on custom slack build using CUSS nykey Slackware 2 07-15-2006 04:05 AM
New FAQ topic: Should I edit my kernel configuration?/Should I build a custom kernel? chort *BSD 10 09-11-2004 12:15 AM
What do i need to build custom kernel!! no noob_slacker Slackware 20 11-20-2003 08:57 PM


All times are GMT -5. The time now is 03:27 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration