tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
ccache 4: severe bloat, bulk builds?
We have two versions of ccache:
3: old, lean
4: current, seriously bloated (needs 4 language implementations
including rust!).
My question to the list is:
Is anyone using ccache with bulk builds (bob or pbulk)? If so, which
ccache version?
How do people feel about the concept? It seems one often starts over,
and it's good to reuse compilation output, if the inputs matched.
Has anyone used sccache instead? That also needs rust, but I haven't
figured out if it's "just rust" or also everything else.
There are larger "what should we do next" questions, which I'll leave
for later.
We have support in pkgsrc for building ccache3 when ccache is in
PKGSRC_COMPILER, by excluding dependencies from using ccache. The list
is longer than I show because, I think, it includes packages needed on
non-NetBSD platforms (i.e., which are resolved as builtin on NetBSD,
eg. tnftp).
Here's the history for building ccache 3 on NetBSD 11:
TIMESTAMP PKGNAME OUTCOME MAKE_JOBS WRKOBJDIR DISK_USAGE DURATION
2026-06-25 07:43:40 ccache-3.7.12nb2 success 16 tmpfs 4.1M 11.6s
2026-06-25 07:43:19 gmake-4.4.1 success 16 tmpfs 15.2M 21.3s
2026-06-25 07:43:14 checkperms-1.12 success 16 tmpfs 724.0K 4.8s
2026-06-25 07:43:05 digest-20220214 success 16 tmpfs 2.0M 9.4s
2026-06-25 07:43:01 mktools-20250213 success 16 tmpfs 676.0K 4.2s
2026-06-25 07:42:48 cwrappers-20220403 success 16 tmpfs 2.5M 12.8s
2026-06-25 07:42:21 libnbcompat-20251029 success 16 tmpfs 3.8M 26.7s
which is quick (didn't save the build output, but you can see there are
7, and rough adding is 95s), biggest working directory 15M, and 6
dependency packages. This is feasible on 1G RPI3 (those of you doing
retrocomputing can stop laughing at that being a small machine now, but
if you can't build gmake your package set is very limited). I am pretty
sure that with "PKGSRC_COMPILER=ccache gcc", using ccache works in bob
(after you set a place to store the cache and add that to the sandbox
setup).
I have been using ccache4 on new/big machines. I built it either while
ccache3 was intalled, or not, and only when it was built did I enable
ccache in PKGSRC_COMPILER (my mk.conf used to have an if on seeing the
binary in /usr/pkg/bin). That works, but it's not compatible with bulk
builds.
I contemplated adding a variable to select which ccache version to use,
which would require a separate list of dependencies, and added a few but
it seemed many. So I did a fresh build of just devel/ccache (which is
4).
The results are horrifying: ruby, perl, python, cmake, and rust are
needed. 47 dependency packages.
I don't think we should support automatic depends on ccache(4) -- there
are two many things, and I think it's going to be too unstable. The
total size of binary packages (as tarballs not installed) is 540M.
Here's the build log for ccache4 on NetBSD 11:
# time bob build
Found 48 cached package paths
All 48 package paths already scanned
Resolving dependencies... done (0.0s)
Calculating package build status... done (0.0s)
Creating 6 sandboxes... done (0.8s)
Building packages...
Built libnbcompat-20251029 (26s)
Built cwrappers-20220403 (12s)
Built mktools-20250213 (4s)
Built digest-20220214 (9s)
Built checkperms-1.12 (4s)
Built xmlcatmgr-2.2nb1 (17s)
Built patchelf-0.18.0nb1 (20s)
Built gmake-4.4.1 (31s)
Built mpdecimal-4.0.1 (16s)
Built m4-1.4.21 (1m 29s)
Built libtool-base-2.4.7nb1 (22s)
Built lz4-1.10.0 (17s)
Built pkgconf-2.5.1 (23s)
Built libxml2-2.15.1 (45s)
Built libffi-3.6.0 (26s)
Built perl-5.42.2nb3 (3m 0s)
Built sqlite3-3.53.2 (59s)
Built p5-gettext-1.07nb10 (14s)
Built nghttp2-1.69.0 (40s)
Built zstd-1.5.7 (37s)
Built help2man-1.49.3 (20s)
Built rhash-1.4.6 (21s)
Built autoconf-2.73 (15s)
Built readline-8.3nb1 (41s)
Built expat-2.8.1 (36s)
Built libyaml-0.2.5 (28s)
Built xxhash-0.8.3 (14s)
Built automake-1.18.1 (40s)
Built libuuid-2.40.2 (1m 29s)
Built libuv-1.52.1 (31s)
Built libunistring-1.4.2 (4m 20s)
Built gettext-lib-0.22.5 (4m 47s)
Built libidn2-2.3.7 (46s)
Built python313-3.13.14 (2m 55s)
Built curl-8.20.0nb2 (1m 46s)
Built gettext-tools-0.22.5nb1 (6m 16s)
Built bison-3.8.2nb1 (1m 13s)
Built cmake-4.3.4 (6m 22s)
Built bash-5.3.15 (1m 2s)
Built rust-bin-1.96.0 (1m 59s)
Built re2c-4.5.1 (2m 18s)
Built ninja-build-1.13.2 (43s)
Built hiredis-1.4.0 (9s)
Built fmtlib-12.2.0 (1m 9s)
Built ruby33-3.3.11nb2 (7m 42s)
Built ruby33-manpages-0.7.0 (8s)
Built ruby33-asciidoctor-2.0.26 (11s)
Built ccache-4.13.6 (36s)
Built 48 in 26m 53s (48 succeeded, 0 cached, 0 failed, 0 skipped)
Destroying 6 sandboxes... done (0.8s)
Generating pkg_summary... done (0.0s)
real 27m0.490s
user 70m8.073s
sys 48m37.949s
and the history:
TIMESTAMP PKGNAME OUTCOME MAKE_JOBS WRKOBJDIR DISK_USAGE DURATION
2026-06-25 08:13:18 ccache-4.13.6 success 16 tmpfs 23.0M 36.4s
2026-06-25 08:13:06 ruby33-asciidoctor-2.0.26 success 16 tmpfs 18.0M 11.8s
2026-06-25 08:12:58 ruby33-manpages-0.7.0 success 16 tmpfs 2.7M 8.1s
2026-06-25 08:06:13 fmtlib-12.2.0 success 4 tmpfs 44.5M 1m09s
2026-06-25 08:06:13 hiredis-1.4.0 success 3 tmpfs 2.7M 9.8s
2026-06-25 08:05:30 ninja-build-1.13.2 success 4 tmpfs 61.9M 43.4s
2026-06-25 08:05:16 ruby33-3.3.11nb2 success 1 tmpfs 582.5M 7m42s
2026-06-25 08:03:16 rust-bin-1.96.0 success - disk 3.0G 1m59s
2026-06-25 08:03:11 re2c-4.5.1 success 5 tmpfs 128.3M 2m18s
2026-06-25 08:02:13 bash-5.3.15 success 4 tmpfs 65.8M 1m02s
2026-06-25 08:01:00 bison-3.8.2nb1 success 4 tmpfs 52.9M 1m13s
2026-06-25 07:56:49 cmake-4.3.4 success 5 tmpfs 484.5M 6m22s
2026-06-25 07:55:02 curl-8.20.0nb2 success 5 tmpfs 70.6M 1m46s
2026-06-25 07:54:43 gettext-tools-0.22.5nb1 success 5 tmpfs 215.9M 6m16s
2026-06-25 07:54:16 libidn2-2.3.7 success 4 tmpfs 24.3M 46.1s
2026-06-25 07:52:42 python313-3.13.14 success 4 tmpfs 393.5M 2m55s
2026-06-25 07:52:35 libuv-1.52.1 success 4 tmpfs 23.7M 31.9s
2026-06-25 07:52:19 xxhash-0.8.3 success 3 tmpfs 7.4M 14.4s
2026-06-25 07:52:05 libyaml-0.2.5 success 4 tmpfs 6.1M 28.5s
2026-06-25 07:51:55 automake-1.18.1 success 3 tmpfs 17.1M 40.1s
2026-06-25 07:51:43 expat-2.8.1 success 3 tmpfs 7.6M 36.1s
2026-06-25 07:51:39 autoconf-2.73 success 3 tmpfs 13.8M 16.0s
2026-06-25 07:51:23 readline-8.3nb1 success 4 tmpfs 15.4M 41.9s
2026-06-25 07:51:22 rhash-1.4.6 success 4 tmpfs 5.8M 21.4s
2026-06-25 07:51:18 help2man-1.49.3 success 2 tmpfs 4.4M 20.6s
2026-06-25 07:51:12 libuuid-2.40.2 success 4 tmpfs 94.8M 1m29s
2026-06-25 07:51:04 p5-gettext-1.07nb10 success 3 tmpfs 1.4M 14.6s
2026-06-25 07:50:46 zstd-1.5.7 success 4 tmpfs 24.6M 37.1s
2026-06-25 07:50:42 nghttp2-1.69.0 success 4 tmpfs 21.3M 40.1s
2026-06-25 07:50:19 libffi-3.6.0 success 3 tmpfs 10.0M 26.5s
2026-06-25 07:50:13 sqlite3-3.53.2 success 4 tmpfs 29.9M 59.1s
2026-06-25 07:49:56 gettext-lib-0.22.5 success 4 tmpfs 167.4M 4m47s
2026-06-25 07:49:56 libunistring-1.4.2 success 5 tmpfs 71.4M 4m20s
2026-06-25 07:49:56 libxml2-2.15.1 success 4 tmpfs 49.0M 46.0s
2026-06-25 07:49:56 pkgconf-2.5.1 success 3 tmpfs 5.1M 23.8s
2026-06-25 07:49:56 lz4-1.10.0 success 3 tmpfs 5.3M 17.6s
2026-06-25 07:49:33 libtool-base-2.4.7nb1 success 3 tmpfs 14.8M 22.3s
2026-06-25 07:48:35 mpdecimal-4.0.1 success 3 tmpfs 5.2M 17.0s
2026-06-25 07:48:03 perl-5.42.2nb3 success 4 tmpfs 338.8M 3m00s
2026-06-25 07:48:03 m4-1.4.21 success 4 tmpfs 33.9M 1m29s
2026-06-25 07:48:03 gmake-4.4.1 success 3 tmpfs 15.2M 31.4s
2026-06-25 07:48:03 patchelf-0.18.0nb1 success 3 tmpfs 4.8M 20.5s
2026-06-25 07:48:03 xmlcatmgr-2.2nb1 success 3 tmpfs 1.9M 17.7s
2026-06-25 07:47:59 checkperms-1.12 success 16 tmpfs 724.0K 4.7s
2026-06-25 07:47:49 digest-20220214 success 16 tmpfs 2.0M 9.5s
2026-06-25 07:47:45 mktools-20250213 success 16 tmpfs 676.0K 4.0s
2026-06-25 07:47:32 cwrappers-20220403 success 16 tmpfs 2.5M 12.6s
2026-06-25 07:47:06 libnbcompat-20251029 success 16 tmpfs 3.8M 26.4s
Home |
Main Index |
Thread Index |
Old Index