On Wed, 2003-04-02 at 11:29, Robert Crawford wrote:
> Kwan,
> I would think that since that doc was written in Sept. 2001 before the new gcc 
> was in use, that trying to optimize newer cpus with an outdated gcc lacking 
> the options those cpus offer would not make much difference- thus the 
> negative opinion. Apparently, cpu development outpaces versions of gcc. From 
> what I've been reading, and by personal experience with gcc 3.2.2, it is 
> making a difference. Of course, others strongly disagree, and maintain 
> optimizing is a waste of time. As for myself, I'm a big fan of trying to get 
> all I can from my hardware.
> 

Hi Robert,
Sure, I'm a big fan of pushing machines to the limits of their
performance. In fact, I've been rebuilding kernels for years and still
get quite a few hits to my kernel rebuild guide (enough so that
searching on 'linux kernel rebuild' on Google still has it in the top
five). The main argument is that CPUs have gotten a lot faster in the
past couple years so that the contribution that the kernel makes to
overall performance is less and less.

I'm not saying that changes to the feature set of the kernel won't make
a difference. Clearly some of the scheduling and latency patches make
noticeable performance gains. However, there's little to be gained from
say, not building all loadable modules or even just rebuilding for a
particular CPU. In the case of modules, the module loader is very smart
about freeing resources so there's negligible overhead in the
loading/unloading of modules. The extra few K of memory used for the
module loader itself is insignificant on today's machines. Even without
the fact the major distributions build processor specific kernels,
optimizing for Athlon vs i686 will still not gain any real-world
improvements. It would be better to rebuild the most used libraries than
the kernel.

Of course, this changes in low memory or low performance machines. I've
built dozens of kernels for embedded systems and some optimizations will
make great differences. But then we're talking about 50MhZ MIPS or
PowerPC machines here, not the run-of-the-mill 1.53GhZ Athlons.

It also comes down to time and money. If, for the sake of argument, we
say that a kernel rebuild will give an all around 5% boost to processing
speed,then we can say that a 1.575GhZ optimized processor will be
equivalent to a 1.5GhZ unoptimized processor. This is about equivalent
between two models of an Athlon XP as far as percentage change. The
difference in cost between these two speeds is about $5. So in a real
world situation it would be better to just upgrade the CPU and this is
assuming a generous 5% overall speedup. In most cases the differences
will be about 1% or less. 

Of course, rebuilding for the pure joy of pushing your machine to the
limits is very worthwhile and satisfying. :D This is often my reason for
some of the weirder things I've tried, including all my recent kernel
rebuilds.

All said, I'm sincerely interested in any benchmarks you may have to
bolster the argument for rebuilds. I'd be glad to either link to it or
incorporate your findings (with all due credit, of course).

Looking forward to hearing more,
Kwan


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to