From owner-freebsd-questions@FreeBSD.ORG Thu Mar 13 10:34:10 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48DA31065737 for ; Thu, 13 Mar 2008 10:34:10 +0000 (UTC) (envelope-from krijg945@planet.nl) Received: from hpsmtp-eml15.kpnxchange.com (hpsmtp-eml15.kpnxchange.com [213.75.38.115]) by mx1.freebsd.org (Postfix) with ESMTP id D7D078FC14 for ; Thu, 13 Mar 2008 10:34:09 +0000 (UTC) (envelope-from krijg945@planet.nl) Received: from cpsmtp-eml105.kpnxchange.com ([213.75.84.105]) by hpsmtp-eml15.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 13 Mar 2008 11:22:06 +0100 Received: from [10.0.0.151] ([213.10.147.18]) by cpsmtp-eml105.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 13 Mar 2008 11:22:06 +0100 Message-ID: <47D9004D.5070407@planet.nl> Date: Thu, 13 Mar 2008 11:22:05 +0100 From: Marcin Koziuk User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.9) Gecko/20071122 SeaMonkey/1.1.6 MIME-Version: 1.0 To: Luca Presotto References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 13 Mar 2008 10:22:06.0291 (UTC) FILETIME=[1668C230:01C884F4] Cc: freebsd-questions@freebsd.org Subject: Re: Tuning make.conf X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: marcin.koziuk@planet.nl List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2008 10:34:10 -0000 Luca Presotto wrote: > Hi everyone! > I was starting to think to recompile everything for my pc to speed > up everything. I started googling and I found almost nothing about how to > change make.conf on bsd. Almost everything was about Gentoo, somehow not > unsurprisingly. > The first thing I noticed is that for linux all the instructions are about > doing CFLAGS=" value" while it seems from /etc/share/examples/make.conf > that in bsd I don't need ". Is it correct? > Second question: If I set MAKEOPTS= -j 3 will that be used when > portupgrading? (It's really to slow otherwise!) > Third question...The most difficult..Which are the best flags for my > machine? (freebsd 7.0-RELEASE with an intel centrino core2 duo) > I have seen in the ..../examples/etc/make.conf that one of the possible > "CPUTYPE" is core2 which looks to me as the right one but a geekier friend > of mine that lives inside gentoo-linux told me that this option is > unknown is gcc 4.2 and will be working from gcc4.3, so he told me to use > "prescott". > And what do I have to set to make gcc aware of the type of CPU I have? > CPUTYPE= cpu > and then CFLAGS= --O2 -pipe (etc..) > or should I not write the cputype and then do: > CLFAGS= -march=mycpu --O2 etc.... > Can someone give me some advice on how to configure this file? > Or can you provide me some documentation? > Thank you! > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > You're *really* wasting your time. The whole thing about those compiler optimizations is a myth. And most ports are already compiled with -O2 by default IIRC. But why would you spend two days compiling for a 0.1% speed increase? Your system is doing no cpu cycles at all for most of the time anyway. And I really wouldn't recommend aggressive optimizations for stuff like the kernel. Disabling unnecessary services or installing apps you often use without support for X and Y (like installing KDE or Gnome base, then the apps you *really* want on top of it) will give you much better performance than messing with CFLAGS and such. Also, makeopts and -pipe just make _compiling_ faster, not the applications themselves!!!. Please take a look at the following pages, they have a lot more information about this matter ;) http://funroll-loops.info/ http://bugs.gentoo.org/show_bug.cgi?id=74072 -- - Marcin