I'm compiling AOSP 8.1.0 source tree on my build server. I made a docker image with all packages needed from Ubuntu 16.04. I mount the source tree, ANDROID_OUT and ccache dir when starting docker image. The path in docker for these three directories is the same:
Sources: /home/builder/android_source/AOSP_8.1/
Out: /home/builder/android_out/AOSP_8.1/
ccache: /home/builder/ccache/
The question is that I don't understand how ccache behaves.
If I'm running watch ccache -s
while compiling android, I see something like:
files in cache: 10365
cache size: 931.9MB
And some seconds after these values can either increase or decrease. I've set max cache size to 30GB, ccache -s
tells me this correct max size, but cache size never comes over 1Gb. The maximum size I've seen after 5 builds run after each other is about 983MB.
What I tried?
1) chown -R builder:builder ~/ccache/
2) ccache -M 30G
in docker. Max sized sets to 30GB, behavior remains the same.
3) ccache -C
- cache clears, nothing gets better.
What is wrong with my ccache?
For some strange reason this situation was due to some incompatibility between system ccache and android ccache. After doing
ccache -M 50G
with ccache utility from android sources directory everything is working.