LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 02-04-2002, 06:08 AM   #1
Steave
Member
 
Registered: Jul 2001
Location: Braunschweig, Germany
Distribution: Suse 7.2
Posts: 184

Rep: Reputation: 30
Recommendations on a fast Kernel??


Hi People!

I just started on my LFS-System and I'm pretty much down to where it comes to actually compiling the Kernel.

I compiled a custom Kernel from the sources of www.kernel.org on my SuSE once and it turned out to be terribly slow...

I am now thinking about compiling from the SuSE sources. Any other recommendations/ hints on how to get a fast Kernel?

Any patches I should have a look at?

Thanx all, Steave.
 
Old 02-04-2002, 08:32 AM   #2
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
Well the kernel is really something you have to figure out yourself which components you need. There is no recipe for a fast kernel. Just try to read the descriptions of each component and then decide whether you need it or not. Compiling a lot of things as modules will often help. Especially things you only need once in a while. Usually if you haven't done it before and you don't know every piece of hardware in your computer it could take several compiles to get it right. But eventually it should at least be faster then a kernel which gets shipped along with those standard distributions.
 
Old 02-04-2002, 01:57 PM   #3
Steave
Member
 
Registered: Jul 2001
Location: Braunschweig, Germany
Distribution: Suse 7.2
Posts: 184

Original Poster
Rep: Reputation: 30
OK, I'll do some reading...

Also: to everybody who knows something about gcc:

Which flags should I use to compile on my Athlon TB? I know about -O3 and -march=i686 other CFLAGS or stuff I could use, so my gcc will produce better code??
 
Old 02-04-2002, 08:03 PM   #4
isajera
Senior Member
 
Registered: Jun 2001
Posts: 1,635

Rep: Reputation: 45
i'd recommend the mjc3 patch against the 2.4.17 standard kernel - it's the fastest kernel i've had for desktop purposes - it's got pretty much every performance patch out there on it. haven't crashed it yet, but it's probably not stable yet for heavy db or server use.

off the top of my head, i think it includes robert love's preemption patch, ingo's modular scheduler, and van riel's reverse mapping vm... it'd be interesting to see the aa vm with the patches.

Last edited by isajera; 02-04-2002 at 08:08 PM.
 
Old 02-05-2002, 02:56 AM   #5
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
If you want high optimization you could try some of the following:

-s
linker option which removes all symbol table and relocation information from the binary

-O3
sets the highest optimization level

-fomit-frame-pointer
tells the compiler not to keep the frame pointer in a register for functions that don't need one

-march=i686
defines the instructions set to use when compiling

-malign-functions=4
aligns the start of functions to a 2 raised to 4 byte boundary

-funroll-loops
performs the optimization of loop unrolling

-fexpensive-optimizations
performs a number of minor optimizations which are relatively expensive

-malign-double
controls whether gcc aligns some variables on a two word boundary or a one word boundary

-fschedule-insns2
similar to `-fschedule-insns', but requests an additional pass of instruction scheduling after register allocation has been done

-mwide-multiply
control whether GCC uses the mul and imul that produce 64-bit results in eax:edx from 32-bit operands to do long long multiplies and 32-bit division by constants

-ffast-math
compiles in faster floating point math routines

You could also try specifying athlon instead of i686 for the architecture. But if the software causes any problems then there is a great chance it's because of the optimizations.

I tried looking for the patches isajera mentioned but I couldn't really find them. Probably could find more if I looked in the kernel mailing archives. I found a linux kernel patches website though:
http://linux-patches.rock-projects.com
 
Old 02-05-2002, 01:14 PM   #6
Steave
Member
 
Registered: Jul 2001
Location: Braunschweig, Germany
Distribution: Suse 7.2
Posts: 184

Original Poster
Rep: Reputation: 30
Talking

Thank you!

This really gets me further on the way!

I'll be around...
Steav.e
 
Old 02-05-2002, 03:11 PM   #7
isajera
Senior Member
 
Registered: Jun 2001
Posts: 1,635

Rep: Reputation: 45
http://www.kernel.org/pub/linux/kern...-mjc3.patch.gz

there's a bunch of patches on the kernel.org ftp where some kernel hackers keep copies of their main patches or trees. i mentioned this one because it was patched together specifically for speed in the desktop enviroment.
 
Old 02-06-2002, 05:48 PM   #8
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
I'm surprised no one voiced skepticism over the Suse kernel re-compile slowing down your machine. I mean technically it could, but that's usually one big error that keeps sucking down resources... like the SCSI card constantly probing for devices because the driver in the kernel tree is kazoo... but that even that stuff is pretty rare. Are you sure it wasn't SuSe acting funny because way too much of it is built against having a very specific set of kernel resources?

All of the resources that are eaten up these days go into the 70-80 processes that distros now have running by default. LFS starts with what? 9? As far as the kernel goes, pristine 2.4.17 source with no support for any hardware you don't have is going to be un-noticeably slower than a well patched kernel, especially in the case of something as ridiculously fast as a 1Ghz+ T-bird. All of the speed is going to go away depending on what packages you install next and how many things you end up with running in 'top'.

Sorry, my 2 cents. As far as special kernel patching goes, I recommend the NSA patch set, but that's just because I think security is fun to play with.

Luck,

Finegan
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
FAST (Mega fast Mirror) SUSE 10 beta 4 download 1kyle SUSE / openSUSE 2 09-07-2005 10:13 AM
FC3/Kernel 2.6 and Fast Switching swoolley Linux - Networking 0 05-18-2005 12:43 PM
How P IV system work fast with Red Hat Linux 8, I recompile the kernel also. benoy4007 Red Hat 2 06-12-2004 03:49 AM
Fast user switching and USB Kernel Panic daphantom Mandriva 2 10-20-2003 01:19 PM
Any helpfull advice on building a fast kernel? DarkXtar Linux - Newbie 6 05-29-2003 11:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 12:04 PM.

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