buildworld + ccache trouble

Maxim Khitrov max at mxcrypt.com
Mon Sep 20 10:27:25 UTC 2010


On Mon, Sep 20, 2010 at 4:43 AM, Dmitry Krivenok
<krivenok.dmitry at 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


More information about the freebsd-current mailing list