LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-05-2009, 04:46 PM   #16
Ahmed
Member
 
Registered: May 2005
Location: München, Germany
Distribution: Slackware, Arch
Posts: 386

Rep: Reputation: 41

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
 
Old 10-05-2009, 09:09 PM   #17
BrZ
Member
 
Registered: Apr 2009
Distribution: Slackware
Posts: 543

Rep: Reputation: 121Reputation: 121
Some day I will build one of those tickless low latency beasts just out of curiosity =]
 
Old 10-05-2009, 09:10 PM   #18
mudangel
Member
 
Registered: May 2008
Location: Ohio
Distribution: Slackware
Posts: 267

Rep: Reputation: 56
I love tickling low latency beasts!
 
Old 10-05-2009, 10:45 PM   #19
amiga32
Member
 
Registered: Mar 2009
Location: Illinois
Distribution: slackware bro
Posts: 161

Rep: Reputation: 38
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 10:49 PM.
 
Old 10-06-2009, 03:01 AM   #20
bennethos
Member
 
Registered: Aug 2003
Location: Belgium
Distribution: -- Slackware for servers -- Debian for desktops --
Posts: 124

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

...
 
Old 10-06-2009, 03:02 AM   #21
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 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.
 
Old 10-06-2009, 03:19 PM   #22
Ilgar
Senior Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 15.0, Slackwarearm 14.2
Posts: 1,157

Rep: Reputation: 237Reputation: 237Reputation: 237
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.
 
Old 10-06-2009, 03:30 PM   #23
linuxpokernut
Member
 
Registered: Jul 2007
Distribution: Slackware 14
Posts: 237
Blog Entries: 8

Rep: Reputation: 59
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".
 
Old 10-07-2009, 12:15 AM   #24
TwinReverb
Member
 
Registered: Sep 2008
Location: Misawa AB, Japan
Distribution: Slackware
Posts: 191
Blog Entries: 2

Rep: Reputation: 40
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.
 
Old 10-07-2009, 12:38 AM   #25
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,683

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
How small have you guys got your kernels? My current is 1645kb.
 
Old 10-07-2009, 01:05 AM   #26
TwinReverb
Member
 
Registered: Sep 2008
Location: Misawa AB, Japan
Distribution: Slackware
Posts: 191
Blog Entries: 2

Rep: Reputation: 40
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).
 
Old 10-07-2009, 06:35 AM   #27
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
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 06:47 AM.
 
Old 10-09-2009, 03:55 AM   #28
Josh000
Member
 
Registered: Aug 2009
Distribution: Slackware 13 64bit
Posts: 534

Rep: Reputation: 35
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.
 
Old 10-09-2009, 04:12 AM   #29
slackd
Member
 
Registered: Sep 2009
Location: Bangalore, India
Distribution: Fedora, Slackware, Arch Linux
Posts: 260
Blog Entries: 1

Rep: Reputation: 60
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.
 
Old 10-09-2009, 07:40 AM   #30
TwinReverb
Member
 
Registered: Sep 2008
Location: Misawa AB, Japan
Distribution: Slackware
Posts: 191
Blog Entries: 2

Rep: Reputation: 40
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-)
 
  


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

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

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