Re: ccache
- Reply: Bakul Shah : "Re: ccache"
- Reply: Craig Leres : "Re: ccache"
- In reply to: Bakul Shah : "ccache "
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 04 Apr 2023 01:48:30 UTC
On 4/3/23 17:09, Bakul Shah wrote: > Am I use ccache incorrectly or is there a bug? > > # CCACHE_DIR=/usr/obj/ccache ccache -s > cache directory /usr/obj/ccache > primary config /usr/obj/ccache/ccache.conf > secondary config (readonly) /usr/local/etc/ccache.conf > stats updated Mon Apr 3 16:54:31 2023 > ... > cleanups performed 507 > files in cache 2795230 > cache size 2.9 GB <=== > max cache size 15.0 GB > # find /usr/obj/ccache -type f |wc > 2795395 2795395 142222206 > # du -sh /usr/obj/ccache > 83G /usr/obj/ccache <=== > > I have > > WITH_CCACHE_BUILD=yes > CCACHE_DIR=/usr/obj/ccache > > in /etc/make.conf Thank you for bringing this up; I have the same issue and have never figured it out. But I think I've found another piece or two of the puzzle. Using my favorite ktrace trick we can see that by default it tries to open /usr/local/etc/ccache.conf: zinc 32 % cd /tmp && ktrace -di ccache -s > /dev/null zinc 33 % kdump | fgrep NAMI | fgrep ccache.conf 17418 ccache NAMI "/usr/local/etc/ccache.conf" 17418 ccache NAMI "/home/zinc/u0/leres/.ccache/ccache.conf" I suspect the trick here is when ccache runs inside a poudriere jail, ccache.conf is not present and/or not in the right location. On my build server I have /var/cache/ccache/ccache.conf which I believe works for some things but I still have 46 GB in /var/cache/ccache and /var/cache/ccache/ccache.conf is trying to limit use to 8 GB. If I start up a poudriere jail and look around I find /root/.ccache/ccache.conf is a copy of /var/cache/ccache/ccache.conf. So I don't get why it doesn't work. (Now I'll sit back and wait for something who knows more chimes in...) Craig