Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jan 2008 19:36:42 -0500
From:      "Maxim Khitrov" <mkhitrov@gmail.com>
To:        Brian <bri@brianwhalen.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: speeding up buildworld/kernel
Message-ID:  <26ddd1750801251636s1cfb7897pdc570d54af744a9d@mail.gmail.com>
In-Reply-To: <479986B2.7090902@brianwhalen.net>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Jan 25, 2008 1:50 AM, Brian <bri@brianwhalen.net> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?26ddd1750801251636s1cfb7897pdc570d54af744a9d>