[ccache] useful test package to use with ccache at the outset in Gentoo.....

Scott Bennett bennett at sdf.org
Fri Dec 8 01:35:23 UTC 2017


Michael Fothergill via ccache <ccache at lists.samba.org> wrote:

> I have an amd64 kaveri box with 8GB RAM and run Gentoo stable on it.
>
> I have just installed ccache with 2GB memory allocated to it.

     By that, I assume you have allocated some kind of memory-based device
for the cache.  Is that a correct understanding?
>
> I have tried some repeat compilations to see if there would be any speed
> increase.
>
> So far I have not seen much change but I am not skilled enough to improve
> things yet.

     Your statistics show that slightly more than 45% of your total
compiler invocations (hits/(hits+misses)) were avoided.  Did that not
make a dent in your timings?
>
> I tried compiling gcc, glibc and imagemagick but did not see much
> improvement.

     If you run the full build process for gcc, I would not expect
to see much improvement because most of it involves the use of either
a) a temporarily built compiler in a temporary location or b) the
newly built compiler being used for testing, but not yet installed
into the production location on your system.
     ImageMagick and GraphicsMagick both should provide useful timings
and ccache statistics.  glibc probably would, too, though it's not
nearly as big.  I don't know what sort of build procedures Gentoo uses,
but from the FreeBSD ports tree, here are some other good examples of
test cases:  math/octave, www/webkit-gtk2, www/webkit-gtk3,
www/webkit2-gtk3, devel/llvm40.  Be prepared to wait a long time for
the first compilation of each of the webkits.  They are big and slow
to compile and, in the past, have shown instabilities in their build
procedures when parallel make runs were used.  YMMV on another OS.
     One big savings for me was in running "make buildworld" and "make
buildkernel".  buildworld, on my last machine, was taking about six
hours elapsed time for a first run.  When running it later after
updating the source tree, the elapsed time was reduced by 2/3 to 3/4,
depending upon the number and sizes of source modules affected by the
updates.  Note that ccache and some other things need a slightly
different setup in order to build FreeBSD.  Your OS may also need some
special provision, so be sure to read the ccache installation
instructions for Gentoo carefully.


                                  Scott Bennett, Comm. ASMELG, CFIAG
**********************************************************************
* Internet:   bennett at sdf.org   *xor*   bennett at freeshell.org  *
*--------------------------------------------------------------------*
* "A well regulated and disciplined militia, is at all times a good  *
* objection to the introduction of that bane of all free governments *
* -- a standing army."                                               *
*    -- Gov. John Hancock, New York Journal, 28 January 1790         *
**********************************************************************



More information about the ccache mailing list