Most of the Fedora RPMS are provided as i386. These can easily be recompiled as:
rpmbuild --target i686 --rebuild package.src.rpm
a. Is it worth it? In other words, is there really a performance gain in packages like - say - KDE?
b. Assuming that I installed the RPM sources and built from the spec file, as long as I am at it, could I also benefit by changing some of the FLAGS?
For example: CHOST="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"
Am Do, den 26.08.2004 schrieb David Cary Hart um 18:26:
Most of the Fedora RPMS are provided as i386. These can easily be recompiled as:
rpmbuild --target i686 --rebuild package.src.rpm
a. Is it worth it? In other words, is there really a performance gain in packages like - say - KDE?
Mostly not.
This is an alway returning question, asked time by time. The RPMs of Fedora Core are build for arch i386 with optimization enabled for P4 CPU. So they are able to run on all i386 platform and will use special instructions on newer CPUs.
If you count the time to proceed the custom compilation it is not worth the efforts.
b. Assuming that I installed the RPM sources and built from the spec file, as long as I am at it, could I also benefit by changing some of the FLAGS?
For example: CHOST="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"
This is the "Gentoo geek factor". The compilation for P4 architecture does not increase anything significantly but makes packages incompatible to other CPUs. The -O3 flags does not mean better optimization than -O2 and thus better performance in general. -O3 does not mean better, but can make things worse.
If you have too much time, then I suggest you spent it to help in development making Fedora even better ;)
Alexander
El Jueves, 26 de Agosto de 2004 12:40 PM, Alexander Dalloz escribió:
This is an alway returning question, asked time by time. The RPMs of Fedora Core are build for arch i386 with optimization enabled for P4 CPU. So they are able to run on all i386 platform and will use special instructions on newer CPUs.
Sorry, but the optimization technique isnt "reorganize" instructions for better execution in Pentium processors? I think that including special instructions would make code incompatible, or am I wrong?
On Thursday 26 August 2004 11:40 am, Alexander Dalloz wrote: [snip]
This is an alway returning question, asked time by time. The RPMs of Fedora Core are build for arch i386 with optimization enabled for P4 CPU. So they are able to run on all i386 platform and will use special instructions on newer CPUs.
Yes, this comes up all the time. Unless they changed tp P4 optimization in FC3, though, the build flags are what they've aleays been:
--march=i386 -mcpu=i686
That is, 386-compatible, but instruction organization optimized for a Pentium Pro/II/II.
How much improvement you'd see by building with "-march=pentium4" is left as an exercise for the reader.
Also, I wonder about the quality of the P4 GCC optimizations in general. Back when the current version was 3.2.x I read on the GCC mailing list that the P4 optimization probably wouldn't be fully realized until v3.4. As the default compile for FC2 is v3.3.3, I wonder if the P4-specific handling is completely baked.
On Thu, Aug 26, 2004 at 12:26:15PM -0400, David Cary Hart wrote:
Most of the Fedora RPMS are provided as i386. These can easily be recompiled as:
rpmbuild --target i686 --rebuild package.src.rpm
a. Is it worth it? In other words, is there really a performance gain in packages like - say - KDE?
b. Assuming that I installed the RPM sources and built from the spec file, as long as I am at it, could I also benefit by changing some of the FLAGS?
For example: CHOST="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"
You will only know for sure if you try it.
However I look at the activity on my system and it is mostly idle or when sluggish disk I/O bound. This tells me that CPU specific optimizations are not critical for my use.
In my opinion the most productive place for code optimizations is library functions not common application space.
A productive operational trick that feels like an optimization is a little readahead script that keeps my commonly used bits (applications and libraries) in DRAM. See /etc/init.d/readahead
David Cary Hart wrote:
Most of the Fedora RPMS are provided as i386. These can easily be recompiled as:
rpmbuild --target i686 --rebuild package.src.rpm
a. Is it worth it? In other words, is there really a performance gain in packages like - say - KDE?
The common wisdom is that it won't make a huge difference, but when you build new packages from source you may as well use them.
Personally, I wouldn't bother recompiling everything; just new stuff that I'm building from source anyway.
On Wed, 2004-09-01 at 10:24, John Thompson wrote:
David Cary Hart wrote:
Personally, I wouldn't bother recompiling everything; just new stuff that I'm building from source anyway.
That's what I have been doing. For example, I removed the pilot support from Eudora and built all of the KDE 3.3 RPMs. One of these days I will figure out a pragmatic test and build several versions of something.
--
-John (john@os2.dhs.org)