Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Building custom kernel?
New Posts  All Forums:Forum Nav:

Building custom kernel?

post #1 of 9
Thread Starter 
I've been wondering; what's the pros/cons about building a customized kernel? And is it necessary? Would it be difficult? Would it gain any performance?
Also, is it possible to preconfigure the kernel if i were to re-install/upgrade to, let's say Ubuntu 11.04?

Help a noob out

BTW, i'm currently using Ubuntu 10.10
Canterlot
(20 items)
 
Luna
(13 items)
 
 
CPUMotherboardGraphicsRAM
Ryzen 7 1800X ASUS ROG Crosshair VI Hero ASUS Radeon R9 290X Corsair Vengeance LPX DDR4 
RAMHard DriveHard DriveHard Drive
Corsair Vengeance LPX DDR4 Samsung 960 Pro Samsung 840 EVO Samsung  
Optical DriveCoolingCoolingOS
Samsung External DVDRW Cooler Master Hyper TX3 Evo Fractal Design (2x140mm) Windows 10 
MonitorMonitorKeyboardPower
ASUS VG245H LG 24EA53VQ-P Cooler Master Storm Quickfire XT XFX Pro Series Black Edition 850W 
CaseMouseAudio
Fractal Design Define R3 Logitech G502 Proteus Spectrum Onkyo AVX 380 
CPUMotherboardGraphicsRAM
AMD Athlon II X4 645 ASUS M5A97 ASUS Radeon HD 6670 Corsair Vengeance 16GB 
Hard DriveHard DriveHard DriveOS
Crucial M4 Western Digital Black Samsung Spinpoint Windows 7 Ultimate 
MonitorKeyboardPowerCase
Philips PFL7655/H12 Logitech K360 Corsair CX600 Thermaltake Versa H22 
Mouse
Cheap Random Thing 
  hide details  
Reply
Canterlot
(20 items)
 
Luna
(13 items)
 
 
CPUMotherboardGraphicsRAM
Ryzen 7 1800X ASUS ROG Crosshair VI Hero ASUS Radeon R9 290X Corsair Vengeance LPX DDR4 
RAMHard DriveHard DriveHard Drive
Corsair Vengeance LPX DDR4 Samsung 960 Pro Samsung 840 EVO Samsung  
Optical DriveCoolingCoolingOS
Samsung External DVDRW Cooler Master Hyper TX3 Evo Fractal Design (2x140mm) Windows 10 
MonitorMonitorKeyboardPower
ASUS VG245H LG 24EA53VQ-P Cooler Master Storm Quickfire XT XFX Pro Series Black Edition 850W 
CaseMouseAudio
Fractal Design Define R3 Logitech G502 Proteus Spectrum Onkyo AVX 380 
CPUMotherboardGraphicsRAM
AMD Athlon II X4 645 ASUS M5A97 ASUS Radeon HD 6670 Corsair Vengeance 16GB 
Hard DriveHard DriveHard DriveOS
Crucial M4 Western Digital Black Samsung Spinpoint Windows 7 Ultimate 
MonitorKeyboardPowerCase
Philips PFL7655/H12 Logitech K360 Corsair CX600 Thermaltake Versa H22 
Mouse
Cheap Random Thing 
  hide details  
Reply
post #2 of 9
Don't use Ubuntu but this should help you out: https://help.ubuntu.com/community/Kernel/Compile

Have fun!

EDIT: Performance? Maybe, I guess by removing things from the kernel you won't use. Judging by your sig rig, maybe you can get a bit more performance. There's a link on the bottom of the page on upgrading custom kernels.
post #3 of 9
Greetz
There are no cons to building a custom kernel as long as you protect yourself by not removing your working kernel until you test the new one. With your distro that is a simple as "update-grub" which will add your new kernel so that you have four entries in your menu, 2 for each kernel, one standard and one recovery.

There are numerous performance gains to be had because as is the case with much of software, it is designed to not be overly aggressive so that it will run on older or lesser quality hardware. Processor type, clock timings and such are indisputable tweak advantages in most cases.

I probably need to update my information to see how much it still matters to overall performance but I am used to and still prefer a streamlined kernel. I take out everything I don't need or think I may need in near future. Just seems like good procedure to me.
NewMain
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 - 3550 Asrock Z77 Extreme4 Gigabyte GTX 760  4x2GB Corsair Vengeance 
Hard DriveOptical DriveCoolingOS
Seagate SATA 2TB x 2  Plextor PX-891SAW CM-Hyper N520 Slackware 14, Studio KUbuntu, OpenSuSe 12.3, Wi... 
MonitorKeyboardPowerCase
32" Vizio HDTV + DLP Logitech Wireless Corsair HX-850 Antec Sonata I 
MouseMouse PadAudioOther
Razer DeathAdder 2013 dual ESI Juli@ CoolGear ExtSata Enclosure w/ Optical and 3TB S... 
  hide details  
Reply
NewMain
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 - 3550 Asrock Z77 Extreme4 Gigabyte GTX 760  4x2GB Corsair Vengeance 
Hard DriveOptical DriveCoolingOS
Seagate SATA 2TB x 2  Plextor PX-891SAW CM-Hyper N520 Slackware 14, Studio KUbuntu, OpenSuSe 12.3, Wi... 
MonitorKeyboardPowerCase
32" Vizio HDTV + DLP Logitech Wireless Corsair HX-850 Antec Sonata I 
MouseMouse PadAudioOther
Razer DeathAdder 2013 dual ESI Juli@ CoolGear ExtSata Enclosure w/ Optical and 3TB S... 
  hide details  
Reply
post #4 of 9
You have to do it. It's just a rite of Linux passage.
ThermoChilled
(13 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X6 1100T ASUS Crosshair IV Extreme EVGA GTX 580 SuperClocked STT WX200UB2G7 
Hard DriveOptical DriveOSMonitor
VelociRaptor WD6000HLHX Sony Optiarc AD-7260S Arch Linux x86_64 + JWM NEC MultiSync PA241W-BK 
KeyboardPowerCaseMouse
Topre Realforce 87UKB Corsair CMPSU-850AX Lian Li Tyr PC-X500FX Logitech G9x 
Mouse Pad
ZOWIE GEAR P-TF 
  hide details  
Reply
ThermoChilled
(13 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X6 1100T ASUS Crosshair IV Extreme EVGA GTX 580 SuperClocked STT WX200UB2G7 
Hard DriveOptical DriveOSMonitor
VelociRaptor WD6000HLHX Sony Optiarc AD-7260S Arch Linux x86_64 + JWM NEC MultiSync PA241W-BK 
KeyboardPowerCaseMouse
Topre Realforce 87UKB Corsair CMPSU-850AX Lian Li Tyr PC-X500FX Logitech G9x 
Mouse Pad
ZOWIE GEAR P-TF 
  hide details  
Reply
post #5 of 9
Quote:
Originally Posted by enorbet2 View Post
Greetz
There are no cons to building a custom kernel as long as you protect yourself by not removing your working kernel until you test the new one. With your distro that is a simple as "update-grub" which will add your new kernel so that you have four entries in your menu, 2 for each kernel, one standard and one recovery.

There are numerous performance gains to be had because as is the case with much of software, it is designed to not be overly aggressive so that it will run on older or lesser quality hardware. Processor type, clock timings and such are indisputable tweak advantages in most cases.

I probably need to update my information to see how much it still matters to overall performance but I am used to and still prefer a streamlined kernel. I take out everything I don't need or think I may need in near future. Just seems like good procedure to me.
As I've said before, with modular kernels this is highly debatable. The performance you gain from building your own kernel really is very minimal. What you do get to have is your own set of patches, which can effect the kernel performance. Modules (drivers) are for the most part only loaded when you specify (or the system) for them to be. You might shave off a small amount of time in a streamlined kernel, but nothing that's going to make you go "woah!".

With that said, now that we have the ability to build a kernel in 5 minutes (or less) there really isn't any reason not to build your own. You can streamline it for the extra work, I don't, but you won't waste any more time building it. Well, you might save a minute... What you do save with streamlined kernels is the space in the /lib/modules/<kern name> folder (or something like that). You might save 100-150MB or so, but IMO that's nothing.

[enorbet2] I'm not saying you are wrong for doing so, just merely pointing out that for performance it's not going to do much. The kernel is done so well these days that most distro's ship with incredibly decent kernels. It's the rest of the crap that gets in the way.
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
post #6 of 9
Quote:
Originally Posted by mushroomboy View Post
As I've said before, with modular kernels this is highly debatable. The performance you gain from building your own kernel really is very minimal. What you do get to have is your own set of patches, which can effect the kernel performance. Modules (drivers) are for the most part only loaded when you specify (or the system) for them to be. You might shave off a small amount of time in a streamlined kernel, but nothing that's going to make you go "woah!".

With that said, now that we have the ability to build a kernel in 5 minutes (or less) there really isn't any reason not to build your own. You can streamline it for the extra work, I don't, but you won't waste any more time building it. Well, you might save a minute... What you do save with streamlined kernels is the space in the /lib/modules/<kern name> folder (or something like that). You might save 100-150MB or so, but IMO that's nothing.

[enorbet2] I'm not saying you are wrong for doing so, just merely pointing out that for performance it's not going to do much. The kernel is done so well these days that most distro's ship with incredibly decent kernels. It's the rest of the crap that gets in the way.
Listen to this man, he may be on shrooms, but he knows some good stuff. Personally, I would do it to get a taste of it, but I haven't experienced a wow factor, unless, like I said, it was built for a slow system, you get me?
post #7 of 9
Quote:
Originally Posted by cubanresourceful View Post
Listen to this man, he may be on shrooms, but he knows some good stuff. Personally, I would do it to get a taste of it, but I haven't experienced a wow factor, unless, like I said, it was built for a slow system, you get me?
Thanks, I left that out. I'm talking about most systems people will be using today. Anything with a Dual-Core and 2G+ ram shouldn't notice any difference. Especially with the new kernel advancements that should be in the 2.6.38 kernel for the CFS scheduler. I'll probably still be using the CFS/BFQ stuff just because it's worked really well on my system.

[edit] BFS/BFQ, *** was I thinking?
Edited by mushroomboy - 1/21/11 at 10:13am
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
post #8 of 9
Thread Starter 
Then i'll let it be for now. Might do it later to gain experience.
Canterlot
(20 items)
 
Luna
(13 items)
 
 
CPUMotherboardGraphicsRAM
Ryzen 7 1800X ASUS ROG Crosshair VI Hero ASUS Radeon R9 290X Corsair Vengeance LPX DDR4 
RAMHard DriveHard DriveHard Drive
Corsair Vengeance LPX DDR4 Samsung 960 Pro Samsung 840 EVO Samsung  
Optical DriveCoolingCoolingOS
Samsung External DVDRW Cooler Master Hyper TX3 Evo Fractal Design (2x140mm) Windows 10 
MonitorMonitorKeyboardPower
ASUS VG245H LG 24EA53VQ-P Cooler Master Storm Quickfire XT XFX Pro Series Black Edition 850W 
CaseMouseAudio
Fractal Design Define R3 Logitech G502 Proteus Spectrum Onkyo AVX 380 
CPUMotherboardGraphicsRAM
AMD Athlon II X4 645 ASUS M5A97 ASUS Radeon HD 6670 Corsair Vengeance 16GB 
Hard DriveHard DriveHard DriveOS
Crucial M4 Western Digital Black Samsung Spinpoint Windows 7 Ultimate 
MonitorKeyboardPowerCase
Philips PFL7655/H12 Logitech K360 Corsair CX600 Thermaltake Versa H22 
Mouse
Cheap Random Thing 
  hide details  
Reply
Canterlot
(20 items)
 
Luna
(13 items)
 
 
CPUMotherboardGraphicsRAM
Ryzen 7 1800X ASUS ROG Crosshair VI Hero ASUS Radeon R9 290X Corsair Vengeance LPX DDR4 
RAMHard DriveHard DriveHard Drive
Corsair Vengeance LPX DDR4 Samsung 960 Pro Samsung 840 EVO Samsung  
Optical DriveCoolingCoolingOS
Samsung External DVDRW Cooler Master Hyper TX3 Evo Fractal Design (2x140mm) Windows 10 
MonitorMonitorKeyboardPower
ASUS VG245H LG 24EA53VQ-P Cooler Master Storm Quickfire XT XFX Pro Series Black Edition 850W 
CaseMouseAudio
Fractal Design Define R3 Logitech G502 Proteus Spectrum Onkyo AVX 380 
CPUMotherboardGraphicsRAM
AMD Athlon II X4 645 ASUS M5A97 ASUS Radeon HD 6670 Corsair Vengeance 16GB 
Hard DriveHard DriveHard DriveOS
Crucial M4 Western Digital Black Samsung Spinpoint Windows 7 Ultimate 
MonitorKeyboardPowerCase
Philips PFL7655/H12 Logitech K360 Corsair CX600 Thermaltake Versa H22 
Mouse
Cheap Random Thing 
  hide details  
Reply
post #9 of 9
Quote:
Originally Posted by Kongslien View Post
Then i'll let it be for now. Might do it later to gain experience.
Greetz
I've been talking with some kernel heavies and they confirm that settings having to do with scheduling and timing make the obvious big difference but that streamlining only improves boot time since the entire kernel is loaded into ram and stays there. This means it is still an issue for those who have little ram but that is rare anymore. There is stlll some controversy about initrd or not but seems mostly a matter of simplicity or not and preference.

If you want experience you needn't start out doing the whole job. You can read about kernel options in books and online docs but a great way is to simply setup to run "make xconfig" just so you can get the tri-window view s you can see the header, the options and the specific help file for each option without any commitment or change to your system. It is enlightening.
NewMain
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 - 3550 Asrock Z77 Extreme4 Gigabyte GTX 760  4x2GB Corsair Vengeance 
Hard DriveOptical DriveCoolingOS
Seagate SATA 2TB x 2  Plextor PX-891SAW CM-Hyper N520 Slackware 14, Studio KUbuntu, OpenSuSe 12.3, Wi... 
MonitorKeyboardPowerCase
32" Vizio HDTV + DLP Logitech Wireless Corsair HX-850 Antec Sonata I 
MouseMouse PadAudioOther
Razer DeathAdder 2013 dual ESI Juli@ CoolGear ExtSata Enclosure w/ Optical and 3TB S... 
  hide details  
Reply
NewMain
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 - 3550 Asrock Z77 Extreme4 Gigabyte GTX 760  4x2GB Corsair Vengeance 
Hard DriveOptical DriveCoolingOS
Seagate SATA 2TB x 2  Plextor PX-891SAW CM-Hyper N520 Slackware 14, Studio KUbuntu, OpenSuSe 12.3, Wi... 
MonitorKeyboardPowerCase
32" Vizio HDTV + DLP Logitech Wireless Corsair HX-850 Antec Sonata I 
MouseMouse PadAudioOther
Razer DeathAdder 2013 dual ESI Juli@ CoolGear ExtSata Enclosure w/ Optical and 3TB S... 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Building custom kernel?