[ccache] CCACHE_NLEVELS , locking and cache size

tal zilcer tal.zilcer at gmail.com
Wed Aug 21 18:18:22 MDT 2013


hi,

i recently started using ccache and i have a couple of questions.

1)i did a little experiment with different values of CCACHE_NLEVELS  and i
got the following build time results:
NLEVELS 2: 1m:33s
NLEVELS 4: 1m:45s
NLEVELS 6: 1m:50s
NLEVELS 8: 1m:59s
some info:
a) i always build the same projects from clean cache
b) rebuild of projects(only cache hits) resulted always in 30s build time
c) im using the cache on NFS
d) im using the latest ccache -  version 3.1.9

 according to the build time results it seems it is better to use low
NLEVELS value. when should this value be high?
i dont understand the true meaning of this variable and what is he good for.

2)when using the cache for multiple users(about 30 people) i noticed that i
get much slower compilation time because cache/NUMBER/stats.lock is locked
a lot.
is there an option to lock a more "deep" file(when using high NLEVELS
value)? for instance cache/NUMBER/NUMBER/NUMBER/stats.lock.
if not is there a solution to this problem?

3) my cache size is about 13G(his limit is 50G).
does caching become slower if cache size is big?
do you recommend cleaning it often?

thanks a lot,
tal


More information about the ccache mailing list