[ccache] Temporary Files vs NFS
joel at rosdahl.net
Wed Apr 14 10:48:58 MDT 2010
On 2010-04-13 19:56, DATACOM - Samuel Lucas wrote:
> I'm considering using a shared cache over NFS, but I'm a bit concerned
> about creating the temporary files over NFS. Wouldn't the network become
> a performance bottleneck?
I haven't done any measurements of NFS-based caches myself, but it
sounds probable that it will affect performance.
> [...] 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
CCACHE_DIR, 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.
More information about the ccache