From owner-freebsd-questions@FreeBSD.ORG Mon Jan 15 20:34:24 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9081216A407 for ; Mon, 15 Jan 2007 20:34:24 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from mail-out4.apple.com (mail-out4.apple.com [17.254.13.23]) by mx1.freebsd.org (Postfix) with ESMTP id 6037213C457 for ; Mon, 15 Jan 2007 20:34:24 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from relay7.apple.com (relay7.apple.com [17.128.113.37]) by mail-out4.apple.com (8.13.8/8.13.8) with ESMTP id l0FKYNSr018574; Mon, 15 Jan 2007 12:34:24 -0800 (PST) Received: from relay7.apple.com (unknown [127.0.0.1]) by relay7.apple.com (Symantec Mail Security) with ESMTP id E4FFD30006; Mon, 15 Jan 2007 12:34:23 -0800 (PST) X-AuditID: 11807125-a5254bb000006e4c-08-45abe54ff7d1 Received: from [17.214.13.96] (unknown [17.214.13.96]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by relay7.apple.com (Apple SCV relay) with ESMTP id D1CC630030; Mon, 15 Jan 2007 12:34:23 -0800 (PST) In-Reply-To: <200701152042.35724.daniel.tourde@spray.se> References: <200701152042.35724.daniel.tourde@spray.se> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <7D469528-BB7A-4D9D-A308-B85D73114AB9@mac.com> Content-Transfer-Encoding: 7bit From: Chuck Swiger Date: Mon, 15 Jan 2007 12:34:22 -0800 To: daniel.tourde@spray.se X-Mailer: Apple Mail (2.752.2) X-Brightmail-Tracker: AAAAAA== Cc: freebsd-questions@freebsd.org Subject: Re: FreeBSD 6.2, rebuild the system with CPUTYPE=prescott? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jan 2007 20:34:24 -0000 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= to CFLAGS > automatically > #NO_CPU_COPTFLAGS= # Don't add -march= 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