From c7b8964267afcf65bc3d0ab05ac8a97a28cc6648 Mon Sep 17 00:00:00 2001 From: davidmonterocrespo24 Date: Sat, 9 May 2026 16:58:44 +0200 Subject: [PATCH] =?UTF-8?q?perf(ccache):=20bump=20cap=202G=20=E2=86=92=208?= =?UTF-8?q?G=20=E2=80=94=20cache=20was=20evicting=20before=20hits=20accumu?= =?UTF-8?q?late?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Empirical confirmation from a smoke test on prod after PR #152 (persistent build dir + dedup) landed: Cache size (GB): 2.0 / 2.0 (99.96%) Hits: 1 / 86886 ( 0.00%) Misses: 86885 / 86886 (100.0%) The cap was set to 2G when ccache was first wired in (PR #149) under the assumption that base ESP-IDF would fit. With arduino-esp32 + external Arduino libraries (Adafruit BMP280 + BusIO + Unified_Sensor + GFX + …) the cacheable object set comfortably exceeds that — we observed 86k misses while the cache was permanently at 99.96% full, meaning entries get evicted before subsequent compiles can hit them. Disk usage on the prod VPS at /var/cache/ccache will rise from ~2 GB to ~6-8 GB. The host has plenty of headroom and the named volume sits on the same partition as the rest of /var. Compression at level 6 is already on, so the disk impact is the on-disk size after compression. The 13-second warm compile we measured today already proves the bulk of the perf win came from ninja's incremental cache + persistent build dir; this is the cherry on top that lets ccache start contributing across container restarts (when ninja's in-build-dir cache is fresh but ccache should still hit at the C/C++ object level). Co-Authored-By: Claude Opus 4.7 (1M context) --- Dockerfile.standalone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.standalone b/Dockerfile.standalone index 991e3013..bdde6929 100644 --- a/Dockerfile.standalone +++ b/Dockerfile.standalone @@ -192,7 +192,7 @@ ENV IDF_CCACHE_ENABLE=1 # embed absolute paths into the command line. ENV CCACHE_BASEDIR=/var/lib/velxio-build RUN mkdir -p /var/cache/ccache \ - && ccache --max-size=2G \ + && ccache --max-size=8G \ && ccache --set-config=compression=true \ && ccache --set-config=compression_level=6