From nobody Sun Jun 19 19:42:30 2022 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0800B86C519 for ; Sun, 19 Jun 2022 19:42:42 +0000 (UTC) (envelope-from jonc@chen.org.nz) Received: from egress.chen.org.nz (egress.chen.org.nz [170.75.172.82]) by mx1.freebsd.org (Postfix) with ESMTP id 4LR38c6sxcz4RCY for ; Sun, 19 Jun 2022 19:42:40 +0000 (UTC) (envelope-from jonc@chen.org.nz) Received: from mail.chen.org.nz (unknown [210.54.37.164]) by egress.chen.org.nz (Postfix) with ESMTP id 085CCEAE10 for ; Mon, 20 Jun 2022 07:42:32 +1200 (NZST) Received: from mail.chen.org.nz (localhost [127.0.0.1]) by filter.inside.chen.org.nz (Postfix) with ESMTP id D7C2C32 for ; Mon, 20 Jun 2022 07:42:30 +1200 (NZST) X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on ametrine.inside.chen.org.nz X-Spam-Level: * X-Spam-Status: No, score=1.5 required=5.0 tests=ALL_TRUSTED,TO_NO_BRKTS_PCNT, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.5 Received: from [127.0.0.1] (jade.inside.chen.org.nz [192.168.1.10]) by mail.chen.org.nz (Postfix) with ESMTP id CAD82203 for ; Mon, 20 Jun 2022 07:42:30 +1200 (NZST) Message-ID: <6a28fd74-3b7c-f671-e15c-5fa6733f5c5b@chen.org.nz> Date: Mon, 20 Jun 2022 07:42:30 +1200 List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Content-Language: en-US To: freebsd-ports@freebsd.org From: Jonathan Chen Subject: ccache max-size and on-disk disparity Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4LR38c6sxcz4RCY X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jonc@chen.org.nz designates 170.75.172.82 as permitted sender) smtp.mailfrom=jonc@chen.org.nz X-Spamd-Result: default: False [-3.16 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.97)[-0.965]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+a:egress.chen.org.nz]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ports@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-0.999]; RCVD_COUNT_THREE(0.00)[4]; DMARC_NA(0.00)[chen.org.nz]; NEURAL_HAM_SHORT(-1.00)[-0.996]; MLMMJ_DEST(0.00)[freebsd-ports]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:174, ipnet:170.75.160.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Hi, I use devel/ccache for (internal) ports building, and noticed that the reported disk usage didn't quite match what was configured. I had a max-cache size of 10Gb, but the on-disk usage was reporting 130+Gb. I assumed that I had a corrupted cache, and cleared out the cache (rm -r /var/cache/ccache). However, after rebuilding some ports, I see the following: jade:~,7:36am# ccache -s cache directory /var/cache/ccache primary config /var/cache/ccache/ccache.conf secondary config (readonly) /usr/local/etc/ccache.conf stats updated Mon Jun 20 03:19:11 2022 cache hit (direct) 228 cache hit (preprocessed) 7 cache miss 37023 cache hit rate 0.63 % called for link 318 called for preprocessing 3 compile failed 1 preprocessor error 5 no input file 1 cleanups performed 0 files in cache 111739 cache size 1.7 MB max cache size 10.0 GB However, the on-disk usage is quite different: jade:~,7:37am# du -hs /var/cache/ccache 3.0G /var/cache/ccache Are any other users of devel/ccache seeing this? Cheers. -- Jonathan Chen