[ccache] explanation of ccache stats
stephanecharette at gmail.com
Thu Mar 17 20:29:41 UTC 2016
> Hmm, I looked at the code a bit and I don't think this will fly:
> find /home -maxdepth 3 -type f -name ccache.conf | sort
This started out as a plugin just for myself. I needed to come up with a
way to find the ccache directory without hard-coding my username into the
If there is a better way for root to find all the ccache directories
without hard-coding a value, please let me know! This was the best I could
come up with.
In an enterprise setting, this will cause a lot of thrashing
> only to come up with nothing since ccache isn't stored there.
Correct, if the ccache directories are not stored in the user's home
directories, then that line would have to be changed. I guess this limits
the plugin to people like myself using ccache on a system with "normal"
> This is reasonable, but misses those things not being reported:
> ccache_total=$((ccache_hit + ccache_miss))
> That is, if ccache fails for some other reason you won't see it.
Correct, I was just curious to see how "effective" ccache was in my
projects, in terms of hits versus misses. (I'm averaging 75%.) Also note
that the only stats I know about (since I've never dug into the ccache
source code) is the output of ccache --show-stats. Are there other stats
not reported in --show-stats? If so, where are they stored?
Otherwise, it is looking good! Especially like the "effectiveness".
> Not sure if 1-min or 5-min is best, guess it depends on volume...
Munin runs every 5 minutes. That I don't get to define. But unless the
ccache stats are being reset back down to zero more often than once every 5
minutes, this shouldn't be a problem. (
More information about the ccache