[ale] System Performance Tuning

Mike Kachline kachline at medept17.coon.gatech.edu
Wed Sep 8 18:53:29 EDT 1999


On Tue, 7 Sep 1999 JANINDRA at MS.NDCORP.COM wrote:


<snip>
> RH6.0. Also I am interested in compiling a few programs to have them
> optimized for my system. I have figured out how to type:
> 
> ./configure
> make
> make install
<snip>

	Randy,

	The easiest way to compile new packages with lots of optimizations
is to set your "CFLAGS" environment variables up... *before* running
./configure. For instance:


localhost$ export CFLAGS="-O4 -mpentiumpro"
localhost$ ./configure
localhost$ make
localhost$ make install

	...When "./configure" runs, it looks at the "CFLAGS" variable and
sets up your compiler to use these flags on compilation. If your "CFLAGS"
isn't set, then ./configure *usually* defaults to using "-g" for CFLAGS
which is not exactly optimized for speed, to say the least.

	Of course, what you specify as your CFLAGS should work with your
compiler. If you're using one of the newer (ie <= 1 year old)
gcc/egcs compilers, then they should support "-mpentiumpro" or
"-mpentium". Of course, gcc has been supporting "-m486" for quite some
time too. Use the greatest optimization for what machine you've got. Don't
forget "-O4", as these optimizations will probably yield more speed
enhancements than the -m's.
	One last thing, if you're compiling C++ stuff (which, IMHO really
*does* need these optimizations), do an 'export CXXFLAGS="-O4
-mpentiumpro"' before running ./configure.


							- Mike
====================================================================
Michael Kachline CS, Georgia Institute of Technlology
kachline at brightstar.gt.ed.net
http://brightstar.gt.ed.net/kachline
====================================================================






More information about the Ale mailing list