From owner-freebsd-questions@FreeBSD.ORG Thu Jan 24 21:12:46 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 DFAA316A417 for ; Thu, 24 Jan 2008 21:12:45 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.183]) by mx1.freebsd.org (Postfix) with ESMTP id 9682B13C467 for ; Thu, 24 Jan 2008 21:12:45 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: by py-out-1112.google.com with SMTP id u52so594327pyb.10 for ; Thu, 24 Jan 2008 13:12:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; bh=Bg3lrGbv0pc0lOWlxttuFhuWXtNTDD9OD9B0ETjtYCE=; b=eLycubJToeu0ytj6OM0fmzttnY+R/RERxS1Gf8bxWB/7kClo7JJsvDKz06uZCw4oOWVMS6Yml+srfm5razS/yoN3K+mScWU1yEGtJZ4YaGJ2wOVLBKkNYTKr1z3rH803Z2iig8/0sDXzvy7nRuWbXUOKN+71BnFs0KOi2AYDdMI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; b=A++uW1hqZdKOpKIasE84/48u6QFje7ND/wVeBg0VGVXFWLB2qOV3SFHlvsxzlneE/oZ7iR0xhuQpH1G45gjEshePZoVa+xY9mUKlINbaR+epbixQ6p5qdmXZQON7vHLTbcIXyBJgClXLDNhBjWQe/IHDfMrqcYtUE5+bDJ+VGtQ= Received: by 10.65.204.7 with SMTP id g7mr2468336qbq.73.1201209164593; Thu, 24 Jan 2008 13:12:44 -0800 (PST) Received: from flosoft.no-ip.biz ( [67.85.89.184]) by mx.google.com with ESMTPS id e19sm1040547qbe.6.2008.01.24.13.12.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 24 Jan 2008 13:12:44 -0800 (PST) Message-ID: <4798FF4A.2040602@gmail.com> Date: Thu, 24 Jan 2008 16:12:42 -0500 From: "Aryeh M. Friedman" User-Agent: Thunderbird 2.0.0.9 (X11/20080121) MIME-Version: 1.0 To: Maxim Khitrov , "Aryeh M. Friedman" , freebsd-questions@freebsd.org References: <4798F1D0.3090009@gmail.com> <26ddd1750801241232l51792bf3ydc02e17e4be49d6e@mail.gmail.com> <20080124210539.GA50047@owl.midgard.homeip.net> In-Reply-To: <20080124210539.GA50047@owl.midgard.homeip.net> X-Enigmail-Version: 0.95.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: Re: speeding up buildworld/kernel 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: Thu, 24 Jan 2008 21:12:46 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Erik Trulsson wrote: > On Thu, Jan 24, 2008 at 03:32:18PM -0500, Maxim Khitrov wrote: >> On Jan 24, 2008 3:15 PM, Aryeh M. Friedman >> wrote: >>> I update my sources at least once a day and do >>> buildworld/kernel just as often... It seems some stuff that >>> needs not be recompiled is on every single run for example gcc >>> and kerbos. I have NO_CLEAN in /etc/make.conf is there >>> anything else I can do to speed stuff up... for ref here is my >>> /etc/make.conf: >>> >>> CPUTYPE?=nocona KERNCONF=MONSTER NO_CLEAN= NO_LPR= # added by >>> use.perl 2008-01-17 11:48:48 PERL_VER=5.8.8 PERL_VERSION=5.8.8 >>> >>> - -- Aryeh M. Friedman FloSoft Systems, Java Tool Developers >>> Developer, not business, friendly >>> http://www.flosoft-systems.com >> I might be wrong, but NO_CLEAN seems like a bad idea except in >> special circumstances. Install ccache, but make sure you set >> CCACHE_HASH_COMPILER environment variable to 1. That will make >> sure that the cache stays valid if the compiler executable is >> overwritten by an identical copy (as it would be on >> installworld). When the compiler changes the cache will be >> repopulated on the next rebuild. > > You are indeed wrong. NO_CLEAN will work fine almost all the time > - except in special circumstances. The few times it does not work > one can always do a 'make clean' by hand first. (Or even faster: > 'rm -fr /usr/obj/*') If you set WRKDIRPREFIX to some useful value > you can do the same thing for the ports tree. Personally I always > compile with -DNO_CLEAN and use 'rm -fr' to clean. I have never had > problems originating with this. > > ccache is not very useful for buildworld, since among the first > thing buildworld does is to build the compiler and then use the > newly built compiler to compile the rest. I.e. the already > installed compiler (which is the one ccache will handle) will not > be used for most of the build thus removing almost all the > advantage of ccache. It is supposed to be possible to use ccache > for buildworld as well, but that would require a bit of hackery. > > > As for speeding up the build even more there a couple of things > that can be tried: > > You can add NO_PROFILE=true to make.conf if you do not need > profiling libraries. I thought most profiled libs had been removed in current but I will try this. I was also looking at NO_SHARED but my gut says this would cause a sigficant performence hit. > > Set CFLAGS/COPTFLAGS to -O instead of -O2. This should speed up the > compiler a bit since it will no have to do as much work. This > will make programs slightly less well optimized, but since the vast > majority of the system binaries are not really CPU-bound anyway it > is unlikely that any performance loss will be noticed. Do you have any numbers on this? > > If you have more than one CPU-core in your machine (and an > SMP-enabled kernel) you can use the -j flag to tell make to run > several jobs in parallell. Just be aware that building with -j > does get broken occasionaly and there is no promise that it will > always be fixed quickly. If you do run into problems when building > with -j, try without -j before sending any bug reports. Since I like to run it in the background (i.e. while doing stuff on a different X screen) I usually don't use -j unless I am doing a bare metal install and then I typically do core*4+2 for it's value. > > > > > - -- Aryeh M. Friedman FloSoft Systems, Java Tool Developers Developer, not business, friendly http://www.flosoft-systems.com "Free software != Free beer" Blog: http://www.flosoft-systems.com/flosoft_systems_community/blogs/aryeh/index.php -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHmP9KQi2hk2LEXBARAu7zAJ4/sGAzpMFCZOKkZBVx/s07KTRw9gCgwF1m 6ee/hiJIvj8gyieoq/ZxIz0= =tnVh -----END PGP SIGNATURE-----