[ccache] NFS cache

Anders Björklund anders at psqr.se
Mon Oct 17 19:02:16 UTC 2016

Mats Nilsson wrote:
> I'm experimenting with having a common NFS-disk as cacche for all build agents in TeamCity.

It works, but is kinda slow and full of issues (like cleaning, for 
instance). Using NFS only as secondary cache works (somewhat) better.

I wanted to focus on memcached, but people keep beating that poor old
dead horse. So maybe the "external" cache should be brought back... ?

It was also requested in: https://github.com/ccache/ccache/pull/139

Old code was at: https://github.com/afbjorklund/ccache/tree/external

> Should there be any form of semaphore/lock to support simultaneous access of the cache?

There is a lockfile. That's the only way on NFS, since all forms of 
flock/fcntl are broken (unfortunately). See lockfile.c for the code.

You will also want avoid the cache ever getting full, since that will
trigger a delete storm from all clients (at once). Including stat's.

Some more discussion in: https://github.com/ccache/ccache/issues/124

Not sure about all this NFS love. Better the devil you know, perhaps ?


More information about the ccache mailing list