You are not logged in.

#1 2009-05-18 22:49:16

Dethredic
Member
Registered: 2009-01-24
Posts: 361
Website

Compiling Custom Kernel / Pacakages - Worth it?

So, I am just beginning to look at this stuff because I feel I have learned enough to be able to tackle it, and I had some free time this afternoon.

Is compiling stuff worth it in terms of performance? If so what do you compile?

Offline

#2 2009-05-18 23:25:37

pharcyde
Member
From: Connecticut
Registered: 2009-03-13
Posts: 88

Re: Compiling Custom Kernel / Pacakages - Worth it?

It really depends on the hardware you're running, on modern hardware you probaly wouldn't notice much difference - as far as performance goes in my opinion. It also depends on how well you strip it to. But there are other reasons to compile your own kernel other than just performance. I used to compile my own from zen-sources but I just use stock arch kernel now.

Last edited by pharcyde (2009-05-18 23:26:53)

Offline

#3 2009-05-18 23:26:46

dolby
Member
From: 1992
Registered: 2006-08-08
Posts: 1,581

Re: Compiling Custom Kernel / Pacakages - Worth it?

I guess you are talking about Arch. Not Linux in general. Its not worth it.
I compile all the packages i wanna have control of, or dont like the way they're built, from all repos.


There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums.  That is why we avoid it. -- ewaller (arch linux forum moderator)

Offline

#4 2009-05-18 23:28:55

Aprz
Member
From: Newark
Registered: 2008-05-28
Posts: 277

Re: Compiling Custom Kernel / Pacakages - Worth it?

For different packages, nah. Arch is already geared towards i686/x86_64 hence why it is often noticeably smoother and faster than other distributions. If done right, compiling the kernel is definitely worth it though.

Last edited by Aprz (2009-05-18 23:29:11)

Offline

#5 2009-05-18 23:31:38

Lexion
Member
Registered: 2008-03-23
Posts: 510

Re: Compiling Custom Kernel / Pacakages - Worth it?

I have very few packages that I compile myself.  Among them X11, xmonad, and pm-utils mainly so I can have my system without HAL.
Recompiling your kernel isn't worth it on modern hardware.  I haven't tried it on old stuff though.


urxvtc / wmii / zsh / configs / onebluecat.net
Arch will not hold your hand

Offline

#6 2009-05-19 02:35:41

Dethredic
Member
Registered: 2009-01-24
Posts: 361
Website

Re: Compiling Custom Kernel / Pacakages - Worth it?

ok, sweet

Offline

#7 2009-05-19 07:50:40

klixon
Member
From: Nederland
Registered: 2007-01-17
Posts: 525

Re: Compiling Custom Kernel / Pacakages - Worth it?

It might still be worth it for the learning experience though. Besides, it can be fun as well. Be sure to have a backup kernel around for when you're not able to boot though big_smile


Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!

Offline

#8 2009-05-19 17:21:30

Themaister
Member
From: Trondheim, Norway
Registered: 2008-07-21
Posts: 652
Website

Re: Compiling Custom Kernel / Pacakages - Worth it?

I compile my own kernel so I don't need initrd, some small speed boosts with optimization for architecture and getting rid of some uneeded modules. I like it old style, so I compile it manually smile I usually don't make custom packages, but I have my own "perfect" mplayer package. I often compile svn-versions from aur though. I think mastering compiling kernel by hand is useful knowledge at least.

Last edited by Themaister (2009-05-19 17:22:30)

Offline

#9 2009-05-19 17:33:49

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: Compiling Custom Kernel / Pacakages - Worth it?

dolby wrote:

I guess you are talking about Arch. Not Linux in general. Its not worth it.
I compile all the packages i wanna have control of, or dont like the way they're built, from all repos.

What he said.
Also, it has the potential for educational value...

Offline

#10 2009-05-19 19:21:03

tomd123
Developer
Registered: 2008-08-12
Posts: 565

Re: Compiling Custom Kernel / Pacakages - Worth it?

The reason I do recompile my own kernel is because I can get rid of a lot of things.. unneeded parts (anyone still using isdn? tongue) and I can add custom configurations (mainly optimizations and some stuff that isn't in the generic kernel). As someone stated earlier, on a newer machine, you probably wont notice a difference, the only things I have actually noticed are slightly decreased boot times...

Offline

#11 2009-05-20 06:59:48

olovram
Member
Registered: 2008-10-10
Posts: 110

Re: Compiling Custom Kernel / Pacakages - Worth it?

Well, it is fun, and if you dont use
an initramfs, boot speed can increase smile

Offline

#12 2009-05-20 23:12:55

tkdfighter
Member
From: Switzerland
Registered: 2009-01-28
Posts: 126

Re: Compiling Custom Kernel / Pacakages - Worth it?

You might want to have a look at this before you start compiling your own kernel: http://xkcd.com/456/
Take this as a warning! smile

Offline

#13 2009-05-21 13:52:08

ataylor
Member
Registered: 2008-04-10
Posts: 54

Re: Compiling Custom Kernel / Pacakages - Worth it?

When I first got into Arch I dabbled in compiling my own kernel to try and speed up boot, but the time it takes to configure/compile a kernel in return for minimal gains makes it not really worthwhile (on my hardware anyway). Nowadays I just use the vanilla Arch kernels.

I did find it interesting and educational though smile

Offline

#14 2009-05-21 14:40:48

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Compiling Custom Kernel / Pacakages - Worth it?

I build my own kernel(s) because a) I think it keeps my Linux knowledge sharp and b) because I do 'need' some custom stuff (like loop-AES) that can be built externally against a kernel too but is soo much more convenient to build along with the kernel.

The stripping of your kernel setup is a one-time thing, that can be recycled over and over. It takes a lot of time, but if done well it's a one-time operation.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#15 2010-05-30 12:01:47

sandstorm
Member
From: Zurich [CH] & Mannheim [DE]
Registered: 2005-08-13
Posts: 171

Re: Compiling Custom Kernel / Pacakages - Worth it?

Will compiling the kernel and applying CPU optimizations (e.g. AMD Phenom) have any influence on the performance. Please note: when I talk about performance I mean the theory. I am rendering 3D graphics (Blender, Luxrender and Yafaray) and transcoding cable TV streams to x264 (avidemux). Of course I compiled the packages on my machine. I assume that the combination of various optimization and custom compiled packages will have an impact on performance.

So my question is:
If I compile an optimized Kernel and compile it on my machine, will it have some kind of impact on the overall performance?

Best regards
Martin

Offline

#16 2010-08-26 16:35:27

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,408

Re: Compiling Custom Kernel / Pacakages - Worth it?

What happens when you recompile your own kernel and then a new kernel update comes in from update?  Do you lose your kernel for the new one?


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#17 2010-08-26 16:47:30

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Compiling Custom Kernel / Pacakages - Worth it?

nomorewindows wrote:

What happens when you recompile your own kernel and then a new kernel update comes in from update?  Do you lose your kernel for the new one?

If you name your kernel differently - no, you don't lose it.
kernel26-i915.img
kernel26-neo.img

You can also add kernel26 to IgnorePkg in pacman.conf.

Offline

#18 2010-08-26 17:23:26

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 859
Website

Re: Compiling Custom Kernel / Pacakages - Worth it?

sandstorm wrote:

Will compiling the kernel and applying CPU optimizations (e.g. AMD Phenom) have any influence on the performance. Please note: when I talk about performance I mean the theory. I am rendering 3D graphics (Blender, Luxrender and Yafaray) and transcoding cable TV streams to x264 (avidemux). Of course I compiled the packages on my machine. I assume that the combination of various optimization and custom compiled packages will have an impact on performance.

So my question is:
If I compile an optimized Kernel and compile it on my machine, will it have some kind of impact on the overall performance?

Best regards
Martin

If all you do is compile a vanilla kernel, it's unlikely to be measurably faster than the Arch kernel.  Also note that time spent in kernel space is extremely negligible compared to time spent in userspace for applications like that.

HOWEVER, there are some interesting patches that you can apply to the kernel that WILL help performance.  The ones I'm interested in now are Nick Piggin's VFS scalability patches, BFS, and BFQ.

On a side note, I compile my own kernel simply because the default Arch config only supports 16 cores, and I have 8 more than that.  I haven't actually tried any of the patches linked above.  Con Kolivas says that BFS should perform well up to 16 cores, so I'm not sure I'd get anything out of BFS.

Offline

#19 2010-08-26 17:34:23

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,408

Re: Compiling Custom Kernel / Pacakages - Worth it?

How does the kernel options I apply affect a new kernel or would I have to reconfigure the new kernel and recompile it then?


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#20 2010-08-26 17:38:29

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 859
Website

Re: Compiling Custom Kernel / Pacakages - Worth it?

nomorewindows wrote:

How does the kernel options I apply affect a new kernel or would I have to reconfigure the new kernel and recompile it then?

If by "kernel options" you mean boot parameters you pass, then the new kernel will support them too, unless you disable the relevant feature or module.

It sounds like you should read up on kernels and compiling them; some of these results will probably be useful.

Offline

#21 2010-08-26 17:52:08

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,408

Re: Compiling Custom Kernel / Pacakages - Worth it?

Kernel config/make config
mkcpio doesn't recompile the kernel if I've customized it when the new kernel comes in. 
That's not the same thing (kvm?) that recomplies the modules for say virtualbox everytime there's a virtualbox update.

Or the possibility to have the same kernel config when the new kernel comes in.

Last edited by nomorewindows (2010-08-26 19:35:28)


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

Board footer

Powered by FluxBB