FreeBSD 6.2, rebuild the system with CPUTYPE=prescott?

Chuck Swiger cswiger at
Mon Jan 15 20:34:24 UTC 2007

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]  
#                       pentium2 pentiumpro pentium-mmx pentium i486  

..."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}...


More information about the freebsd-questions mailing list