speeding up buildworld/kernel

Maxim Khitrov mkhitrov at gmail.com
Fri Jan 25 16:36:43 PST 2008


On Jan 25, 2008 1:50 AM, Brian <bri at 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


More information about the freebsd-questions mailing list