Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Sep 2010 06:27:04 -0400
From:      Maxim Khitrov <max@mxcrypt.com>
To:        Dmitry Krivenok <krivenok.dmitry@gmail.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: buildworld + ccache trouble
Message-ID:  <AANLkTim2uB4BVFu=J234vZX-WvFdfoQUbtu0BAP%2BxCqZ@mail.gmail.com>
In-Reply-To: <AANLkTi=wKc_6ppV83Yb68hRE_E8KO4a5YCzp50N6L64b@mail.gmail.com>
References:  <AANLkTimF79ZPE3MJeHQ=O1ismQCj916Q9kL23SBZOTL9@mail.gmail.com> <4C912926.6070409@FreeBSD.org> <AANLkTi=wKc_6ppV83Yb68hRE_E8KO4a5YCzp50N6L64b@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

On Mon, Sep 20, 2010 at 4:43 AM, Dmitry Krivenok
<krivenok.dmitry@gmail.com> wrote:
> Your patch works fine for me, thanks!
> However, I don't see any performance gain when using ccache:
>
> Number of cache hits is very low.
> I need to understand this...

Make sure you have the following environment variables set:

CCACHE_HASH_COMPILER=1       (2.4)
CCACHE_COMPILERCHECK=content (3.0+)

CCache will not use cached files if the compiler has changed. The
default way of detecting this change is by comparing compiler's size
and modification time. Since the modification time changes after each
installworld, you are effectively clearing the cache for all
subsequent compilations.

Setting the above variables will cause the "sameness" of the compiler
to be determined by hashing its contents, which should only change if
the compiler code was actually modified.

- Max


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTim2uB4BVFu=J234vZX-WvFdfoQUbtu0BAP%2BxCqZ>