how to compiel kernel and world to maxium optimization

Jeremy Chadwick koitsu at FreeBSD.org
Fri Oct 12 03:21:30 PDT 2007


On Fri, Oct 12, 2007 at 02:02:09PM +0400, Artem Kuchin wrote:
> The point is that if i have Xeon HT cpus (not very new, but
> definitelly not Pentium PRO :) i can build kernel and world
> using insttructions for this CPU and optimization for it, so
> i would get myself a speedy system and less memory hungry, right?

Not necessarily.  This assumption is often driven by what I like to
call the "Gentoo mentality".  Throwing on optimisations and assuming
the system will "magically be more efficient" is not how you gain
efficiency; I grow tired of seeing programs mindlessly set -O3 and
other insanities, based purely on assumptions.

> The only option known to me which is related to the isee is cpu
> setting in kernel config file. Anything else?

By using CPUTYPE in /etc/make.conf.  /usr/share/examples/etc/make.conf
lists value values.  For a Xeon, you should probably use "nocona",
assuming the Xeon model you have supports SSE3 instructions.  Other-
wise, use "prescott".

Also, very important: use CPUTYPE?=value and not CPUTYPE=value.

There's a thread on the values (focusing around amd64, but the same
applies to i386) below; see the post from Mike Meyer.

http://groups.google.com/group/lucky.freebsd.amd64/browse_thread/thread/79b9b9664cc87ae5/6eb86b7ede208173?lnk=st&q=freebsd+cputype+xeon#6eb86b7ede208173

-- 
| Jeremy Chadwick                                    jdc at parodius.com |
| Parodius Networking                           http://www.parodius.com/ |
| UNIX Systems Administrator                      Mountain View, CA, USA |
| Making life hard for others since 1977.                  PGP: 4BD6C0CB |



More information about the freebsd-stable mailing list