LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Optimization Question (https://www.linuxquestions.org/questions/linux-from-scratch-13/optimization-question-373229/)

dr_dre 10-15-2005 02:46 AM

Optimization Question
 
Hi folks.

After compiling LFS on a pentium3 machine, I am planning to use CPIO to copy it across to a pentium2 box.

My temporary system does not have any optimizations, but I would like to optimize the final system with --march=pentium2.

From the book:

"The set +h command turns off bash's hash function. Normally hashing is a useful feature [...] However, we'd like the new tools to be used as soon as they are installed."

Does this mean that as I compile new binaries (--march=pentium2) they will not be able to be executed on the current pentium3 system?

Thanks in Advance :)

mr_demilord 10-15-2005 08:00 AM

I won't do optimizations with critical packages like binutils and gcc, they are known to fail and the speed boost is really minimum. Just follow the book and you'll have a fast system :)
You can do optimizations with BLFS wich is less critical like mozilla firefox or other packages. if the optimizations fails you can uninstall and use the standard settings.

currir55 11-13-2005 09:58 AM

I wouldn't recommend overly Optimizing your system, as you are porting over to a P2 I don't think that you would want 2 be recompiling brocken packages all the time so I wouldn't try optimizing everything. I would recommend optimizing smallish programs (less than 5SBU). When you do however CHECK THE BINARIES.

I would say NEVER optimize glibc. (coming from past experience here!) GCC responds better to optimizations but I would recommend compiling it with and without optimizations and comparing the checksuite results. This is very timely but i wouldn't reocommend 'blindly' optimzing a large or critical package.

I recommend just keeping the system with default optimizations generally as they gave me a screamingly fast system on my first (Duron 1.3Ghz and 256Mb RAM) (don't optimize X either if you follow BLFS).

Good luck I'm sure that if you follow the general advice in the book you should get a good system @ the end of all your working.
(If you build a complex system I recommend paco as a small and powerful package manager for tarball installations)

currir55 11-13-2005 10:16 AM

Oh just read your origional post again, well march=pentium2 just optimizes binaries for this type of processor. However the Pentium2 is a particular branch of the x86 processor family so Pentium2 optimized binaries will run on Pentium Family/ Athlon/ Duron, and x86_64 (64bit Athlon systems). The binary file will run 'faster' on Pentium depending on how succesfull the optimizations are, but still keeps x86 compatability, just probably runs slower on other systems

sundialsvcs 11-15-2005 10:15 AM

Mostly, my experience has been that CPU optimization tweaks are not the biggest component of "perceived system speed." Almost invariably, the most important variable is the hdparm configuration -- parameters controlling hard-disk I/O, which are set by an init-script at startup time.

Typically, "distros" (like your bootstrap-system) use very conservative settings for these parameters. Disk throughput is therefore "very reliable, but very slow." And since disk throughput affects just about everything, it slows the whole machine down.

There are oodles of existing documents on hdparm, both here and elsewhere on the net, so I won't repeat them here.


All times are GMT -5. The time now is 11:31 AM.