Date: Mon, 15 Jan 2007 12:34:22 -0800 From: Chuck Swiger <cswiger@mac.com> To: daniel.tourde@spray.se Cc: freebsd-questions@freebsd.org Subject: Re: FreeBSD 6.2, rebuild the system with CPUTYPE=prescott? Message-ID: <7D469528-BB7A-4D9D-A308-B85D73114AB9@mac.com> In-Reply-To: <200701152042.35724.daniel.tourde@spray.se> References: <200701152042.35724.daniel.tourde@spray.se>
next in thread | previous in thread | raw e-mail | index | archive | help
On Jan 15, 2007, at 11:42 AM, Daniel Tourde wrote: > So now, I am trying to rebuild my FreeBSD 6.2 system playing a bit > with the > parameters in the make.conf file (see /usr/share/examples/etc/ > make.conf) to > get the best out of my machine (double processor, MMX, SSE[1-3] and > co...) > #CPUTYPE?=pentium3 > #NO_CPU_CFLAGS= # Don't add -march=<cpu> to CFLAGS > automatically > #NO_CPU_COPTFLAGS= # Don't add -march=<cpu> to COPTFLAGS > automatically > > So far, the only thing I did was to set CPUTYPE to pentium4 but I > am pretty > sure, it can be done in a better way. The question being 'how?' > > So, can anyone guide me? Some. If you actually look at /usr/share/examples/etc/make.conf, you'll find that: # Currently the following CPU types are recognized: # Intel x86 architecture: # (AMD CPUs) opteron athlon64 athlon-mp athlon-xp athlon-4 # athlon-tbird athlon k8 k6-3 k6-2 k6 k5 # (Intel CPUs) nocona pentium4[m] prescott pentium3[m] pentium-m # pentium2 pentiumpro pentium-mmx pentium i486 i386 ..."prescott" is a recognized architecture name to tune for, so you could set CPUTYPE to that value and recompile. Since you've got a dual-core CPU, you should recompile your kernel (see under /usr/src/ sys/i386/conf) to enable SMP. You might want to consult the find documentation in the Handbook, and heed some of the caveats about making sweeping changes without testing them. However, there have also been some bugs with the GCC optimizer for some of the fancier Pentium-derived architecture variants (ie, "nocona"/"prescott"/"pentium4"), which hopefully have been fixed, and there have been issues where turning such tuning has broken critical aspects of the boot loader (by generating code which took more room and wouldn't fit into the boot blocks), so there is some wisdom to being cautious. I tune all of my machines to just "pentium", which has not given me any problems, and is likely to include most of the performance benefits from claiming to not be an ancient 386/486-grade system that you might obtain from tuning for the latest P3/P4/Core variants. It's unlikely that you'd be able to benchmark a significant difference between "pentium" and "prescott", as the FreeBSD kernel does not use SSE{1-3}... -- -Chuck
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7D469528-BB7A-4D9D-A308-B85D73114AB9>