[ccache] Temporary Files vs NFS

DATACOM - Samuel Lucas samuellucas at datacom.ind.br
Wed Apr 14 15:30:56 MDT 2010

>    [...] If we allow temporary files in local machine, would it create all
>    temporary files (.i, etc) locally and then transfer in the network only
>    the hash, speeding up the process?
> In ccache 2.4, CCACHE_TEMPDIR needs to be on the same file system as
> but in 3.0pre0 that requirement is relaxed. In fact, it just occurred
to me that
> CCACHE_TEMPDIR isn't needed anymore since it's only used to store
truly temporary
> files that aren't moved into the cache. Unless I find any problem, I
will remove the
> CCACHE_TEMPDIR setting and just use mkstemp(3) to create temporary files.
> Please try ccache 3.0pre0 and set CCACHE_TEMPDIR to some local
directory like /tmp
> and see if that improves performance.


3.0pre0 seems a lot better. Network usage now is about 1 Mb/s both in
direct and preprocessor modes.
I had to set CCACHE_TEMPDIR to achieve these results.

Results are:
- Disabled cache: 7min 25sec

Version 2.4
- Local cache: 3min 32sec
- NFS Shared cache: 6min 44sec

Version 3.0pre0
- Local cache, direct-mode: 1min 9sec
- Local cache, preprocessor: 3min 8sec
- NFS Shared, direct-mode: 1min 21sec
- NFS Shared, preprocessor: 3min 30sec

- Samuel

More information about the ccache mailing list