Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Im still farely new to linux, and was wondering if it was really worth compiling a custom kernel performance wise. This led me to ask:
- When you install a distribution, does it use a preconfigured kernel with all options, drivers in it, or does it create a kernel containing only your specific hardware information?
It is a preconfigured kernel basically, not with all the options I guess, but most of them. something like an rpm installation to a ./configure,make,make install method, if you know what I mean.
custom kernel for ME would be good when I am talking about security. Otherwise it wouldnt make a diff.
Yep...Most distros have preconfigured kernels. The nice thing about that is a preconfigured kernel is more likely to have all the drivers for your hardware. A less nice thing is that it will have a ton of drivers for hardware you don't have. Which may or may not be a big deal depending on the situation.
If you want to compile your own kernel IMHO a source distro is the way to go. I recommend Gentoo, but I believe Slackware is mostly source based too.
That's fair question for a newbie-I remember asking myself the same thing when learning to understand how it all worked together.
No it doesn't. The developers precompile the kernel so that it will hopefully fit a wide range of users.
Is it worth compiling yourself? If you want to understand how the kernel works with linux yes. If you want performance or loading increases-usually. If you need something that you know the kernel provides but is not compiled into the shipped kernel-most definitely.
BTW Greg Kroah-Hartman, a kernel developer, has made his book The Linux Kernel in a Nutshell available at http://www.kroah.com/lkn/ under the creative commons license. I highly recommend downloading and reading it. It's very easy to understand and follow.
Are the unused portions of the kernel still loaded and running when I am running the OS? Or are they loaded on demand (like Windows services set as manual)?
What I would like to try is compile my own kernel, then add the software I need 1 at a time to see what's the total disk space used and what type of performance I can get (I'll probably use a Debian kernel for apt-get, and WindowMaker for the GUI). I tried Kubuntu and Ubuntu and really disliked the responsiveness of the GUI's (Gnome and KDE).
Would such an experiment be worth it or is Ubuntu already tweaked for good responsiveness under a GUI (maybe the responsiveness cannot be as fast as Server 2003)? I do not need a fancy interface, just one that allows me to multi task and is efficient performance/ressource wise.
BTW Greg Kroah-Hartman, a kernel developer, has made his book The Linux Kernel in a Nutshell available at http://www.kroah.com/lkn/ under the creative commons license. I highly recommend downloading and reading it. It's very easy to understand and follow.
I tried Kubuntu and Ubuntu and really disliked the responsiveness of the GUI's (Gnome and KDE).
Don't expect miracles, when I first recompiled a kernel I saw a huge difference in boot up speed, but not an amazing increase in general performance. However once you have a nice small, fast kernel, you may want to recompile kde entirely with a few optimisations here and there and see if you notice the difference. (hehehe a warning: once you start down this path...)
BLFS has some good basic instructions for kde here
Strip out all the components you don't want (this seems to make the biggest difference actually) and make sure you can actually build it normally first before you start messing with compiler settings.
One of the advantages of the huge default kernels most distros give you is that the majority of the parts of that kernel are modules. A module is something that is in the kernel, but isn't up and running unless modprobbed.
For example, probably every 10/100 network card has a module for running it. The huge kernel will include every one of those modules, but when it boots, it will just check and see what is needed, and insert it. So your machine could run with any NIC, but it only fully loads the one needed for your hardware.
With that in mind, you can trim all the unneeded modules out of the kernel, and instead of having the important ones be modules, you can defualt include them.
The thing is, the modules take so little space, you'll save maybe 20 Mb of space by not including them. It only becomes important on tiny tiny systems. Any desktop system has ample space for all of the modules in existance.
You can tune a kernel to do just the minimum that's needed, and it will be faster, but not in some breathtaking way. You won't double your speed. It's like the difference between doing 100 km/h and 110 km/h. Yes 110 is faster, but not all that different.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.