Jump to content

Kernel Compile Question


Recommended Posts

Hi, I just done a kernel compile (Mandriva 2007.0), the only thing I changed was the system timer, from 250HZ to 1000HZ for Rosegarden/Midi, everything went well, (not exactly hard I know, I have done it before), anyway, there is a ton of stuff in there which is not needed, example, I know I will never need any support for any ISDN devices, so I could basically just remove that, right? I could also do this for a heap of other stuff that I know I will never need, If I did this, and stripped the kernel of all the unnecessary (to me) stuff, would I actually see any real improvement in performance in things like apps/games etc, not just in things like boot up times and the like.

Link to comment
Share on other sites

I'd say go for it. There's not much you can gain by recompiling a vanilla kernel, but the Mandy ones are stuffed with things which are largely unneeded.

The difference will be small, but noticeable.

Kubuntu kernels are lighter, but you can still play with them.

Edited by scarecrow
Link to comment
Share on other sites

A lot of the stuff in Mandy kernels are compiled as modules (modular). If you actually compile the kernel with just the stuff you need, and build it into the kernel (monolithic), then it will be faster. However, the size of the kernel will be bigger.

 

Modular kernels are slightly slower, because it has to load each module that it requires for your hardware, which can take a bit of time. However, the size of the kernel is smaller because of this.

 

When I build kernels on Gentoo, because it's just for my hardware, I just compile what I need, and make the kernel monolithic.

Link to comment
Share on other sites

For me, the speed I gained by recompiling kernels was so minimal in any distro I used that I consider recompiling kernel a "waste of time" - unless it is unavoidable in order to fix some issues.

Link to comment
Share on other sites

A lot of the stuff in Mandy kernels are compiled as modules (modular). If you actually compile the kernel with just the stuff you need, and build it into the kernel (monolithic), then it will be faster. However, the size of the kernel will be bigger.

 

Modular kernels are slightly slower, because it has to load each module that it requires for your hardware, which can take a bit of time. However, the size of the kernel is smaller because of this.

 

Yes, and no.

 

There's no *performance* hit in loading modules.

 

The computer will just take longer at the loading modules stage of boot, but if you compile them all in, the computer just takes longer at the kernel initialisation early in the boot. There's only a second or two the difference, if any.

 

Apart from that, unless you actually patch the kernel to be different, you won't see a difference between the new and the old kernel. Most people believe they see a difference, but that's usually placebo, or because the new booted system has more ram to play with and less running.

 

James

Link to comment
Share on other sites

Thank you for the replies, I think I will give it a whirl and just see, and I basically compile the Kernel anyway to change the System Timer to 1000HZ, so next time I'll flick all the stuff that I don't require and see how it roles.

 

(monolithic)

 

Is that when things are not compiled as modules, or a non-modular kernel?

 

 

For me, the speed I gained by recompiling kernels was so minimal in any distro I used that I consider recompiling kernel a "waste of time"

 

That's what I wasn't sure about, and if it does turn out like that for me, I'll probably not worry about it again, but seeing as I got to do it for the timer thing anyway, I may as well give it a try and see.

 

I'd say go for it

 

That's nice and positive :D , and I'll be doing just that before the release of 2007.1 to see how it goes.

 

Thanks all.

Link to comment
Share on other sites

(monolithic)

 

Is that when things are not compiled as modules, or a non-modular kernel?

No it's a different thing. It's related with priorities. There are different prioroties for different processes e.g if the kernel needs data from a disk controller has a bigger priority than if you paste something from the clipboard into your spreadsheet application. In monolithic kernel a lot of things are built into the kernel and they are all communicating with each other with top priorities. While in a micro kernel only a few basic tasks are in the kernel (like memory handling) everything else is in user space. That makes micro kernels safer but slower. But a monolithic kernel can be modular too.

 

I have a question too. Does compiling the kernel to a newer arch (i686, athlonxp etc) make it faster?

Edited by dexter11
Link to comment
Share on other sites

No, monolithic vs micro kernel is entirely different.

 

microkernel has drivers split off into userland, and the drivers communicate with the very basic kernel via IPC of some sort.

 

monolithic, like the linux kernel, is where it all runs as one big kernel within the address space. Modules are still 'monolithic' as they're just added into the kernel's operation.

 

The important difference is how the microkernel is layed out, with drivers in userspace, whereas with a monolithic, they're all in kernel space.

 

James

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...