From owner-freebsd-questions@FreeBSD.ORG Sat Jan 26 00:36:43 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 CF13516A41B for ; Sat, 26 Jan 2008 00:36:43 +0000 (UTC) (envelope-from mkhitrov@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.251]) by mx1.freebsd.org (Postfix) with ESMTP id 8105813C4E1 for ; Sat, 26 Jan 2008 00:36:43 +0000 (UTC) (envelope-from mkhitrov@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so239573anc.13 for ; Fri, 25 Jan 2008 16:36:43 -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:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=DJyhZNWPzmJVxL/6sHCyFJEpAp7JDX6Gr60nDk9xyGM=; b=P/AkGcR2ROi0maMrRZ+ouWi2AeVVyDC27cX9rqppM1490Jy+85MfWvXN+iZHcsVxrqBGjlJjEBiM05AqFg/EnatntZyHB3ux3bG8L0lmLNAL5R4foBU8h4i1foXsEtN6sL1sIXmAaMqd9FJ6nFIiv74XtqQ4peDMEMTXatP5XZI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=W3yHMur3QD7wnAwVOrdOtYFcYNOuX5pRHmbNLfoUCclDLpJ6nHkfjOpO7MlriNFFmEJCAUeRPQBdnI8e6IMfK+BdVe36Bwr6hpjjiDc0O1L1MUIZq0OuWvi/fu28WejH7FJ/VfnZwN26blswhdH7tLj5V/LIxsxXOBdXiBt1ROk= Received: by 10.100.128.20 with SMTP id a20mr5488315and.109.1201307802924; Fri, 25 Jan 2008 16:36:42 -0800 (PST) Received: by 10.100.254.9 with HTTP; Fri, 25 Jan 2008 16:36:42 -0800 (PST) Message-ID: <26ddd1750801251636s1cfb7897pdc570d54af744a9d@mail.gmail.com> Date: Fri, 25 Jan 2008 19:36:42 -0500 From: "Maxim Khitrov" To: Brian In-Reply-To: <479986B2.7090902@brianwhalen.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4798F1D0.3090009@gmail.com> <26ddd1750801241232l51792bf3ydc02e17e4be49d6e@mail.gmail.com> <20080124210539.GA50047@owl.midgard.homeip.net> <26ddd1750801241408w7b776c87g14b94cfa1433616a@mail.gmail.com> <47995F19.7050905@gmail.com> <26ddd1750801242035j3b3cea5ek281fe7e00afbf217@mail.gmail.com> <47997BE0.5020203@gmail.com> <479986B2.7090902@brianwhalen.net> Cc: freebsd-questions@freebsd.org 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: Sat, 26 Jan 2008 00:36:43 -0000 On Jan 25, 2008 1:50 AM, Brian wrote: > Hmm, 2 queries here. > > 1-wonder how much more gain would be gotten by using a speedy flash > drive for the ccache folder. Actually you get the opposite. Here are my results with a USB 2.0 flash drive: cache directory /mnt/.ccache cache hit 12106 cache miss 12 called for link 461 multiple source files 1 not a C/C++ file 1228 unsupported compiler option 7 files in cache 122144 cache size 820.2 Mbytes max cache size 2.0 Gbytes 2h7m4.56s real 31m36.79s user 15m31.80s sys For reference, I've again rebuilt world and kernel. Ccache stats were the same as for the flash drive, but here's the time: 47m26.34s real 27m16.22s user 13m45.71s sys Flash drive is better than nothing at all, but much worse than using a hard drive. > 2-I'm wondering about dependencies, like a change in x requires a > recompile of y, but y doesnt look any different, is this smart enough to > rebuild based on the dependency? > > Brian What do you mean by "y doesn't look any different"? If recompiling y results in the same object file, then there is no need to recompile it. That's all that ccache does. It considers all the variables that can possibly affect the contents of an object file. If those variables are the same as from a previously-cached run, then it returns the precompiled version of the file. More info is available at the ccache website: http://ccache.samba.org/ - Max