Repository navigation
Description
Even with very large layer counts, the packing algorithm sometimes results in merging components that don't make sense while keeping other components completely isolated. I don't mean that the packing isn't working as intended, but that I think the way packing is designed needs a bit more nuanced of an approach. I mean this not in the academic case of suboptimal packing with the greedy algorithm, but in the real-world user experience use case of handling chunking of builds in a way that provides close-to-optimal chunking strategies and prevents larger layers from changing due to trivial changes.
The following dive screenshots are from a 256-layer chunking of an image designed for running Steam Big Picture mode as a graphical session in gamescope:
This single layer is almost half of the image size, containing large files (which were not installed via RPM, but were given xattrs and therefore marked as their own component and not picked up by the big file repo) alongside rpm-ostree objects, a few random fonts, some sideloaded ungrouped files like scripts and a wallpaper PNG, and some seemingly random, unrelated RPM content like libraries from mesa-freeworld RPMs installed from rpmfusion.
This layer contains the kernel in the build, installed from an RPM in a COPR repo, a few related RPM content like kernel-modules-extra and also the perf RPM. This looks like a good chunking to me, but there maybe were a few kernel-related RPMs that could have made it in here as well as the initrd.
This layer has just botocore, which considering its size makes some amount of sense to me.
This layer just has subscription-manager (I built this from my base GUI-less image which includes a bunch of developer tooling for my day job, including the ability to do entitled builds), which considering its relative stability and small size does not make sense to me. Having this package in its own layer does mean that the maybe-biweekly releases will have a minimal diff on update, with a single layer changed, but because the layer is so small the impact on the real world update is not as useful as having the kernel and kernel-related packages in a single layer is.
I think that, right now, the algorithm used tends to reward mixing very-large components with very-small components, maximizing their "expected value." Multiple very-large components packed together also produce an outsized impact on those very-small components. This means that trivial changes are now bundled alongside very large files, resulting in what tends to be one very-large layer, with the rest of the components spread relatively well throughout other layers, with a tendency towards pretty-small layers for 99% of an image alongside that one massive layer.
I'm not sure what the right solution here is. The scoring algorithms taking into account relative size differences of components and trying to spread them out? More intelligence in the RpmRepo component to try to identify and group related packages into a single component, even if not built from a single srpm, which is work that would need to go into every Repo component for other package managers? A stronger tendency to have unclaimed components not merge with any other components? Maybe all of those?
For now, I'm opening the issue and happy to discuss and experiment with some other strategies.
Activity
travier commentedon Mar 31, 2026
I have that issue as well when I use chunkah on an Atomic Desktop image (here Kinoite) and a lot of RPMs get packed into a single 1.3GB layer (with 128 max layers):
travier commentedon Mar 31, 2026
Reproducer:
Full log
``` [1/3] STEP 1/1: FROM quay.io/fedora-ostree-desktops/kinoite:44.20260330.0 AS rootfs --> bfe57b5f464d [2/3] STEP 1/2: FROM quay.io/coreos/chunkah AS chunkah [2/3] STEP 2/2: RUN --mount=from=rootfs,src=/,target=/chunkah,ro --mount=type=bind,target=/run/src,rw chunkah build -v --max-layers 128 --prune /ostree --prune /sysroot/ostree > /run/src/out.ociarchive DEBUG starting chunkah version="0.3.2" INFO starting build rootfs=/chunkah DEBUG using default config DEBUG using current time as source date epoch epoch=1774955377 DEBUG target architecture architecture="amd64" DEBUG prune paths configured paths=[Exact("/ostree"), Exact("/sysroot/ostree")] DEBUG pruning path path=/ostree DEBUG pruning path path=/sysroot/ostree INFO scan complete files=185799 size=6.5 GiB DEBUG canonicalizing package paths packages=1750 DEBUG loaded rpm database packages=1750 components=1109 paths=201016 DEBUG built orphan digest index index_size=861 unique_sizes=824 ambiguous_excluded=0 INFO loaded repo repo="rpm" DEBUG loaded bigfiles components components=597 paths=601 INFO loaded repo repo="bigfiles" INFO repo summary repo="rpm" components=1108 size=6.1 GiB INFO repo summary repo="bigfiles" components=4 size=429.4 MiB INFO unclaimed files files=1239 size=2.4 MiB DEBUG computed fallback stability min_stability=0.0060605217248167675 fallback=0.0030302608624083838 INFO components assigned components=1113 DEBUG starting packing components=1113 max_layers=128 DEBUG packing merges performed merges=985 INFO packing complete layers=128 INFO writing to stdout INFO writing layers threads=8 layers=128 DEBUG creating tar layer component="rpm/google-noto-sans-cjk-vf-fonts" DEBUG creating tar layer component="rpm/google-noto-serif-cjk-vf-fonts" DEBUG creating tar layer component="rpm/unicode-ucd" DEBUG creating tar layer component="rpm/icu" DEBUG creating tar layer component="rpm/gutenprint rpm/openblas" DEBUG creating tar layer component="rpm/flite rpm/lpcnetfreedv" DEBUG creating tar layer component="rpm/libpinyin" DEBUG creating tar layer component="rpm/poppler-data rpm/urw-base35-fonts" DEBUG creating tar layer component="rpm/espeak-ng" DEBUG creating tar layer component="rpm/speech-dispatcher" DEBUG creating tar layer component="rpm/ghostscript" DEBUG creating tar layer component="rpm/adobe-mappings-cmap rpm/docbook-style-xsl" DEBUG creating tar layer component="rpm/anthy-unicode" DEBUG creating tar layer component="rpm/cracklib rpm/openconnect rpm/paktype-naskh-basic-fonts" DEBUG creating tar layer component="rpm/intel-mediasdk rpm/iso-codes" DEBUG creating tar layer component="rpm/exiv2 rpm/microcode_ctl" DEBUG creating tar layer component="rpm/fftw rpm/google-droid-fonts rpm/libqmi rpm/openexr" DEBUG creating tar layer component="rpm/bind rpm/fedora-workstation-backgrounds rpm/gtkmm3.0 rpm/words" DEBUG creating tar layer component="rpm/cldr-emoji-annotation" DEBUG creating tar layer component="rpm/gtk3" DEBUG creating tar layer component="rpm/NetworkManager" DEBUG creating tar layer component="rpm/liberation-fonts rpm/nvme-cli rpm/tesseract-tessdata" DEBUG creating tar layer component="rpm/rpm-ostree" DEBUG creating tar layer component="rpm/git" DEBUG creating tar layer component="rpm/bash rpm/f44-backgrounds" DEBUG creating tar layer component="rpm/google-noto-fonts" DEBUG creating tar layer component="rpm/kf6-ki18n" DEBUG creating tar layer component="rpm/kf6-ktexteditor" DEBUG creating tar layer component="rpm/coreutils" DEBUG creating tar layer component="rpm/linux-firmware" DEBUG creating tar layer component="rpm/cups" DEBUG creating tar layer component="rpm/hplip" DEBUG creating tar layer component="rpm/libhangul rpm/python-rapidfuzz rpm/svt-av1" DEBUG creating tar layer component="rpm/flashrom rpm/sane-backends rpm/stix-fonts rpm/tcl" DEBUG creating tar layer component="rpm/intel-media-driver-free rpm/shared-mime-info rpm/unar" DEBUG creating tar layer component="rpm/alsa-sof-firmware rpm/liblouis" DEBUG creating tar layer component="rpm/flexiblas rpm/qt6-qttranslations" DEBUG creating tar layer component="rpm/qt6-qtbase" DEBUG creating tar layer component="rpm/qt6-qtdeclarative" DEBUG creating tar layer component="rpm/qt6-qtwebengine" DEBUG creating tar layer component="rpm/libgphoto2 rpm/toolbox rpm/wpa_supplicant" DEBUG creating tar layer component="rpm/kf6-breeze-icons" DEBUG creating tar layer component="rpm/adobe-mappings-pdf rpm/adwaita-fonts rpm/cryfs" DEBUG creating tar layer component="rpm/firewalld rpm/rust-podman-sequoia" DEBUG creating tar layer component="rpm/skopeo" DEBUG creating tar layer component="rpm/poppler rpm/source-highlight rpm/tar" DEBUG creating tar layer component="rpm/ModemManager rpm/kf6-kirigami-addons" DEBUG creating tar layer component="rpm/capstone rpm/docbook-dtds rpm/gnustep-base" DEBUG creating tar layer component="rpm/ImageMagick rpm/xkeyboard-config" DEBUG creating tar layer component="rpm/file rpm/openssl" DEBUG creating tar layer component="rpm/gdb" DEBUG creating tar layer component="rpm/fwupd" DEBUG creating tar layer component="rpm/brltty rpm/gnupg2" DEBUG creating tar layer component="rpm/gocryptfs rpm/open-sans-fonts rpm/rust-prefixdevname rpm/tcl8" DEBUG creating tar layer component="rpm/fedora-logos rpm/hfsutils rpm/hunspell-en rpm/jomolhari-fonts rpm/netavark rpm/zeromq" DEBUG creating tar layer component="rpm/glibmm2.4 rpm/highway rpm/intel-vpl-gpu-rt rpm/libexif" DEBUG creating tar layer component="rpm/e2fsprogs rpm/qt6-qtquick3d rpm/shim" DEBUG creating tar layer component="rpm/kf6-kio" DEBUG creating tar layer component="rpm/python3.14" DEBUG creating tar layer component="rpm/ffmpeg" DEBUG creating tar layer component="rpm/akonadi-server" DEBUG creating tar layer component="rpm/hunspell rpm/phonon rpm/qt6-qtshadertools rpm/tzdata" DEBUG creating tar layer component="rpm/google-noto-emoji-fonts rpm/hwdata rpm/sudo" DEBUG creating tar layer component="rpm/bootc" DEBUG creating tar layer component="rpm/findutils rpm/libunistring rpm/opensc rpm/rust-bootupd" DEBUG creating tar layer component="rpm/jfsutils rpm/libglvnd rpm/libmbim rpm/libsamplerate rpm/libtraceevent rpm/rit-rachana-fonts rpm/slang rpm/tpm2-tools" DEBUG creating tar layer component="rpm/sos rpm/spirv-tools" DEBUG creating tar layer component="rpm/kbd rpm/libqalculate rpm/m17n-db rpm/tpm2-tss" DEBUG creating tar layer component="rpm/glib2" DEBUG creating tar layer component="rpm/mariadb11.8" DEBUG creating tar layer component="rpm/buildah" DEBUG creating tar layer component="rpm/groff rpm/libchewing rpm/open-vm-tools" DEBUG creating tar layer component="rpm/gtk4" DEBUG creating tar layer component="rpm/colord rpm/pulseaudio rpm/sssd" DEBUG creating tar layer component="rpm/vlc" DEBUG creating tar layer component="rpm/podman" DEBUG creating tar layer component="rpm/glycin" DEBUG creating tar layer component="rpm/lame rpm/man-pages rpm/nano rpm/rust-rav1e rpm/zxing-cpp" DEBUG creating tar layer component="rpm/gstreamer1-plugins-base rpm/lvm2" DEBUG creating tar layer component="rpm/adwaita-icon-theme rpm/gawk rpm/gdouros-symbola-fonts rpm/system-config-printer" DEBUG creating tar layer component="rpm/grub2" DEBUG creating tar layer component="rpm/ibus" DEBUG creating tar layer component="rpm/orca" DEBUG creating tar layer component="rpm/gstreamer1-plugins-bad-free" DEBUG creating tar layer component="rpm/dolphin" DEBUG creating tar layer component="rpm/plasma-breeze" DEBUG creating tar layer component="rpm/plasma-nm" DEBUG creating tar layer component="rpm/plasma-workspace-wallpapers" DEBUG creating tar layer component="rpm/appstream rpm/elfutils rpm/ibus-anthy" DEBUG creating tar layer component="rpm/assimp rpm/shaderc rpm/virtualbox-guest-additions" DEBUG creating tar layer component="rpm/pipewire" DEBUG creating tar layer component="rpm/kdeplasma-addons" DEBUG creating tar layer component="rpm/gettext rpm/ibus-libpinyin rpm/tesseract rpm/udev-hid-bpf" DEBUG creating tar layer component="rpm/cairo rpm/libuser rpm/policycoreutils rpm/xfsprogs" DEBUG creating tar layer component="rpm/mesa" DEBUG creating tar layer component="rpm/gstreamer1 rpm/kf6-kwidgetsaddons" DEBUG creating tar layer component="rpm/flatpak rpm/jpegxl rpm/udisks2" DEBUG creating tar layer component="rpm/plasma-desktop" DEBUG creating tar layer component="rpm/device-mapper-persistent-data rpm/openssh rpm/sil-padauk-fonts rpm/wget2" DEBUG creating tar layer component="rpm/NetworkManager-openconnect rpm/kf6-kunitconversion rpm/libvpx rpm/qt6-qtvirtualkeyboard" DEBUG creating tar layer component="rpm/adwaita-icon-theme-legacy rpm/khelpcenter rpm/libwnck3 rpm/parted rpm/qca" DEBUG creating tar layer component="rpm/codec2 rpm/dymo-cups-drivers rpm/nss rpm/qpdf" DEBUG creating tar layer component="rpm/binutils" DEBUG creating tar layer component="rpm/btrfs-progs rpm/liblerc rpm/openal-soft rpm/qt6-qtlocation rpm/redhat-menus" DEBUG creating tar layer component="rpm/ca-certificates rpm/cyrus-sasl rpm/gnustep-make rpm/libevent rpm/man-db rpm/ocfs2-tools rpm/qt6-qtmultimedia" DEBUG creating tar layer component="rpm/plasma-workspace" DEBUG creating tar layer component="rpm/diffutils rpm/ntfs-3g rpm/setools rpm/util-linux" DEBUG creating tar layer component="rpm/selinux-policy" DEBUG creating tar layer component="rpm/kwin" DEBUG creating tar layer component="rpm/bash-completion rpm/gsettings-desktop-schemas rpm/libppd rpm/oniguruma rpm/orc rpm/zip rpm/zstd" DEBUG creating tar layer component="rpm/avahi rpm/cryptsetup rpm/gstreamer1-plugins-good rpm/ppp rpm/spandsp" DEBUG creating tar layer component="rpm/samba" DEBUG creating tar layer component="rpm/freerdp rpm/ipp-usb" DEBUG creating tar layer component="rpm/grep rpm/iproute rpm/konsole rpm/libxcb rpm/pcre2 rpm/signon rpm/zvbi" DEBUG creating tar layer component="rpm/gmp rpm/leptonica rpm/libgcrypt rpm/libvorbis rpm/mesa-demos rpm/mpfr rpm/nettle rpm/psmisc rpm/vmaf rpm/xmlsec1 rpm/xz" DEBUG creating tar layer component="rpm/7zip rpm/SDL3 rpm/kde-partitionmanager" DEBUG creating tar layer component="rpm/glibc" DEBUG creating tar layer component="rpm/dav1d rpm/kio-extras rpm/kyotocabinet rpm/mdadm rpm/ncurses rpm/xapian-core" DEBUG creating tar layer component="rpm/gcc" DEBUG creating tar layer component="rpm/qemu" DEBUG creating tar layer component="rpm/aom rpm/opencv rpm/rust-rpm-sequoia rpm/smartmontools" DEBUG creating tar layer component="rpm/kde-connect rpm/libcupsfilters rpm/libxml2 rpm/qt6-qtwayland" DEBUG creating tar layer component="rpm/LibRaw rpm/aardvark-dns rpm/ddcutil rpm/libX11 rpm/librsvg2 rpm/python-pillow" DEBUG creating tar layer component="rpm/firefox" DEBUG creating tar layer component="rpm/dnf5 rpm/plasma5support" DEBUG creating tar layer component="rpm/llvm" DEBUG creating tar layer component="rpm/systemd" DEBUG creating tar layer component="bigfiles/initramfs.img bigfiles/policy.kern bigfiles/policy.linked bigfiles/rpmdb.sqlite chunkah/unclaimed rpm/NetworkManager-openvpn rpm/NetworkManager-vpnc rpm/OpenCL-ICD-Loader rpm/PackageKit-Qt rpm/PyYAML rpm/SDL3_image rpm/SDL3_ttf rpm/a52dec rpm/abattis-cantarell-fonts rpm/abseil-cpp rpm/accounts-qml-module rpm/accountsservice rpm/acl rpm/aha rpm/alsa-lib rpm/alsa-utils rpm/antiword rpm/aribb24 rpm/ark rpm/at-spi2-core rpm/atkmm rpm/attr rpm/audiocd-kio rpm/audit rpm/aurorae rpm/authselect rpm/b43-fwcutter rpm/b43-openfwwf rpm/babeltrace rpm/baloo-widgets rpm/bc rpm/bluedevil rpm/bluez rpm/bolt rpm/boost rpm/braille-printer-app rpm/breeze-gtk rpm/brotli rpm/bubblewrap rpm/bzip2 rpm/c-ares rpm/c2esp rpm/cairomm rpm/catatonit rpm/catdoc rpm/cdparanoia rpm/checkpolicy rpm/chkconfig rpm/chromaprint rpm/chrony rpm/cifs-utils rpm/cjson rpm/clinfo rpm/cmake rpm/color-filesystem rpm/colord-kde rpm/composefs rpm/compsize rpm/conmon rpm/container-selinux rpm/containers-common rpm/corosync rpm/cpio rpm/criu rpm/crun rpm/crypto-policies rpm/ctags rpm/cups-browsed rpm/cups-filters rpm/curl rpm/dbus rpm/dbus-broker rpm/dbus-python rpm/dconf rpm/desktop-backgrounds rpm/desktop-file-utils rpm/device-mapper-multipath rpm/ding-libs rpm/distribution-gpg-keys rpm/dlm rpm/dmidecode rpm/dns-root-data rpm/dnsmasq rpm/dolphin-plugins rpm/dosfstools rpm/dotconf rpm/double-conversion rpm/dracut rpm/duktape rpm/ebook-tools rpm/editorconfig rpm/efibootmgr rpm/efivar rpm/emacs-filesystem rpm/enchant2 rpm/ethtool rpm/exfatprogs rpm/expat rpm/f2fs-tools rpm/faad2 rpm/fatresize rpm/fdk-aac-free rpm/fedora-appstream-metadata rpm/fedora-bookmarks rpm/fedora-chromium-config rpm/fedora-flathub-remote rpm/fedora-release rpm/fedora-repos rpm/fedora-third-party rpm/fedora-workstation-repositories rpm/ffmpegthumbs rpm/filelight rpm/filesystem rpm/flac rpm/flatpak-kcm rpm/fmt rpm/fontconfig rpm/fonts-rpm-macros rpm/fpaste rpm/fprintd rpm/freeglut rpm/freetype rpm/fribidi rpm/fstrm rpm/fsverity-utils rpm/fuse rpm/fuse-overlayfs rpm/fuse-sshfs rpm/fuse3 rpm/fwupd-efi rpm/game-music-emu rpm/gamemode rpm/gd rpm/gdbm rpm/gdk-pixbuf2 rpm/geoclue2 rpm/giflib rpm/glib-networking rpm/gnulib-l10n rpm/gnutls rpm/gobject-introspection rpm/gpgme rpm/gpsd rpm/graphene rpm/graphite2 rpm/graphviz rpm/gsm rpm/gssdp rpm/gssproxy rpm/gstreamer1-plugin-libav rpm/gstreamer1-plugins-ugly-free rpm/gupnp rpm/gupnp-igd rpm/gzip rpm/harfbuzz rpm/hdparm rpm/hfsplus-tools rpm/hicolor-icon-theme rpm/hiredis rpm/hostname rpm/hyperv-daemons rpm/i2c-tools rpm/ibus-chewing rpm/ibus-hangul rpm/ibus-m17n rpm/ibus-typing-booster rpm/iio-sensor-proxy rpm/ilbc rpm/ima-evm-utils rpm/imath rpm/inih rpm/initscripts rpm/intel-gmmlib rpm/intel-lpmd rpm/ipset rpm/iptables rpm/iptstate rpm/iputils rpm/iw rpm/jansson rpm/jasper rpm/jbig2dec rpm/jbigkit rpm/jq rpm/json-c rpm/json-glib rpm/jsoncpp rpm/jxrlib rpm/kaccounts-integration rpm/kaccounts-providers rpm/kactivitymanagerd rpm/kamera rpm/kasumi rpm/kate rpm/kcharselect rpm/kde-cli-tools rpm/kde-filesystem rpm/kde-gtk-config rpm/kde-inotify-survey rpm/kde-settings rpm/kdebugsettings rpm/kdecoration rpm/kdegraphics-mobipocket rpm/kdegraphics-thumbnailers rpm/kdenetwork-filesharing rpm/kdialog rpm/kdnssd rpm/kdsoap rpm/kdsoap-ws-discovery-client rpm/keditbookmarks rpm/kernel rpm/keyutils rpm/kf6 rpm/kf6-attica rpm/kf6-baloo rpm/kf6-bluez-qt rpm/kf6-frameworkintegration rpm/kf6-karchive rpm/kf6-kauth rpm/kf6-kbookmarks rpm/kf6-kcalendarcore rpm/kf6-kcmutils rpm/kf6-kcodecs rpm/kf6-kcolorscheme rpm/kf6-kcompletion rpm/kf6-kconfig rpm/kf6-kconfigwidgets rpm/kf6-kcontacts rpm/kf6-kcoreaddons rpm/kf6-kcrash rpm/kf6-kdbusaddons rpm/kf6-kdeclarative rpm/kf6-kded rpm/kf6-kdesu rpm/kf6-kdnssd rpm/kf6-kdoctools rpm/kf6-kfilemetadata rpm/kf6-kglobalaccel rpm/kf6-kguiaddons rpm/kf6-kholidays rpm/kf6-kiconthemes rpm/kf6-kidletime rpm/kf6-kimageformats rpm/kf6-kirigami rpm/kf6-kitemmodels rpm/kf6-kitemviews rpm/kf6-kjobwidgets rpm/kf6-knewstuff rpm/kf6-knotifications rpm/kf6-knotifyconfig rpm/kf6-kpackage rpm/kf6-kparts rpm/kf6-kpeople rpm/kf6-kpty rpm/kf6-kquickcharts rpm/kf6-krunner rpm/kf6-kservice rpm/kf6-kstatusnotifieritem rpm/kf6-ksvg rpm/kf6-ktexttemplate rpm/kf6-ktextwidgets rpm/kf6-kuserfeedback rpm/kf6-kwallet rpm/kf6-kwindowsystem rpm/kf6-kxmlgui rpm/kf6-modemmanager-qt rpm/kf6-networkmanager-qt rpm/kf6-prison rpm/kf6-purpose rpm/kf6-qqc2-desktop-style rpm/kf6-solid rpm/kf6-sonnet rpm/kf6-syndication rpm/kf6-syntax-highlighting rpm/kfind rpm/kglobalacceld rpm/kinfocenter rpm/kio-admin rpm/kio-fuse rpm/kio-gdrive rpm/kjournald rpm/kmenuedit rpm/kmod rpm/knighttime rpm/kpipewire rpm/kpmcore rpm/kquickimageeditor rpm/krb5 rpm/krdp rpm/krfb rpm/kscreen rpm/kscreenlocker rpm/ksystemstats rpm/kunifiedpush rpm/kwalletmanager5 rpm/kwayland rpm/kwrited rpm/langpacks rpm/langtable rpm/layer-shell-qt rpm/lcms2 rpm/less rpm/libICE rpm/libSM rpm/libXScrnSaver rpm/libXau rpm/libXaw rpm/libXcomposite rpm/libXcursor rpm/libXdamage rpm/libXdmcp rpm/libXext rpm/libXfixes rpm/libXfont2 rpm/libXft rpm/libXi rpm/libXinerama rpm/libXmu rpm/libXpm rpm/libXrandr rpm/libXrender rpm/libXres rpm/libXt rpm/libXtst rpm/libXv rpm/libXxf86dga rpm/libXxf86vm rpm/libaccounts-glib rpm/libaccounts-qt rpm/libadwaita rpm/libaio rpm/libao rpm/libappindicator rpm/libarchive rpm/libaribcaption rpm/libass rpm/libassuan rpm/libasyncns rpm/libatasmart rpm/libavc1394 rpm/libavif rpm/libb2 rpm/libblockdev rpm/libbluray rpm/libbpf rpm/libbs2b rpm/libbsd rpm/libbytesize rpm/libcaca rpm/libcamera rpm/libcanberra rpm/libcap rpm/libcap-ng rpm/libcbor rpm/libcdio rpm/libcdio-paranoia rpm/libcloudproviders rpm/libdaemon rpm/libdatrie rpm/libdbusmenu rpm/libdc1394 rpm/libdecor rpm/libdeflate rpm/libdisplay-info rpm/libdmtx rpm/libdrm rpm/libdvdnav rpm/libdvdread rpm/libebur128 rpm/libeconf rpm/libedit rpm/libei rpm/libepoxy rpm/libev rpm/libevdev rpm/libfakekey rpm/libffi rpm/libfido2 rpm/libfontenc rpm/libfprint rpm/libftdi rpm/libfyaml rpm/libgpg-error rpm/libgudev rpm/libgusb rpm/libheif rpm/libical rpm/libidn2 rpm/libiec61883 rpm/libieee1284 rpm/libijs rpm/libimobiledevice rpm/libimobiledevice-glue rpm/libinput rpm/libipt rpm/libjaylink rpm/libjcat rpm/libjpeg-turbo rpm/libkcapi rpm/libkcddb rpm/libkcompactdisc rpm/libkdcraw rpm/libkexiv2 rpm/libkgapi rpm/libksba rpm/libkscreen rpm/libksysguard rpm/liblc3 rpm/libldac rpm/liblouisutdml rpm/liblqr-1 rpm/libmaxminddb rpm/libmd rpm/libmng rpm/libmnl rpm/libmodplug rpm/libmodulemd rpm/libmpc rpm/libmpeg2 rpm/libmspack rpm/libmtp rpm/libmusicbrainz5 rpm/libmysofa rpm/libndp rpm/libnet rpm/libnetfilter_conntrack rpm/libnfnetlink rpm/libnftnl rpm/libnice rpm/libnl3 rpm/libnotify rpm/libnsl2 rpm/libnvme rpm/libogg rpm/libopenmpt rpm/libopusenc rpm/libpaper rpm/libpcap rpm/libpciaccess rpm/libpfm rpm/libpipeline rpm/libplacebo rpm/libplasma rpm/libplist rpm/libpng rpm/libproxy rpm/libpsl rpm/libpwquality rpm/libqb rpm/libqrtr-glib rpm/librabbitmq rpm/libraqm rpm/libraw1394 rpm/librepo rpm/libreport rpm/librist rpm/libseccomp rpm/libsecret rpm/libselinux rpm/libsemanage rpm/libsepol rpm/libshout rpm/libsigc++20 rpm/libslirp rpm/libsndfile rpm/libsodium rpm/libsolv rpm/libsoup3 rpm/libsrtp rpm/libssh rpm/libtalloc rpm/libtasn1 rpm/libtdb rpm/libtevent rpm/libthai rpm/libtheora rpm/libtiff rpm/libtirpc rpm/libtommath rpm/libtool rpm/libudfread rpm/libultrahdr rpm/libunibreak rpm/libunwind rpm/liburing rpm/libusb1 rpm/libusbmuxd rpm/libutempter rpm/libuv rpm/libva rpm/libvdpau rpm/libverto rpm/libvisual rpm/libvncserver rpm/libvpl rpm/libwacom rpm/libwebp rpm/libwmf rpm/libxcrypt rpm/libxcvt rpm/libxkbcommon rpm/libxkbfile rpm/libxmlb rpm/libxshmfence rpm/libxslt rpm/libyaml rpm/libyuv rpm/libzip rpm/lilv rpm/linux-atm rpm/lm_sensors rpm/lmdb rpm/lockdev rpm/logrotate rpm/lrzsz rpm/lsb_release rpm/lsof rpm/lttng-ust rpm/lua rpm/lz4 rpm/lzo rpm/m17n-lib rpm/madan-fonts rpm/mailcap rpm/malcontent rpm/mariadb-connector-c rpm/mcelog rpm/media-player-info rpm/memstrack rpm/mesa-libGLU rpm/minizip-ng rpm/mobile-broadband-provider-info rpm/mokutil rpm/mozilla-filesystem rpm/mpage rpm/mpdecimal rpm/mpg123 rpm/mtdev rpm/mtr rpm/mysql-selinux rpm/neon rpm/net-snmp rpm/net-tools rpm/nfs-utils rpm/nftables rpm/nghttp2 rpm/ngtcp2 rpm/nilfs-utils rpm/noopenh264 rpm/npth rpm/nss-altfiles rpm/nss-mdns rpm/ntfs-3g-system-compression rpm/numactl rpm/oath-toolkit rpm/ocean-sound-theme rpm/openapv rpm/opencore-amr rpm/openjpeg rpm/openjph rpm/openldap rpm/openpace rpm/openpgm rpm/openvpn rpm/openxr rpm/opus rpm/opus-tools rpm/opusfile rpm/os-prober rpm/ostree rpm/p11-kit rpm/pam rpm/pam-kwallet rpm/pam_afs_session rpm/pango rpm/pangomm rpm/paps rpm/passim rpm/passt rpm/passwdqc rpm/pcaudiolib rpm/pciutils rpm/pcsc-lite rpm/pcsc-lite-ccid rpm/phodav rpm/phonon-backend-vlc rpm/pinentry rpm/pinfo rpm/pixman rpm/pkcs11-helper rpm/pkcs11-provider rpm/pkgconf rpm/plasma-activities rpm/plasma-activities-stats rpm/plasma-browser-integration rpm/plasma-discover rpm/plasma-disks rpm/plasma-drkonqi rpm/plasma-integration rpm/plasma-keyboard rpm/plasma-login-manager rpm/plasma-milou rpm/plasma-pa rpm/plasma-print-manager rpm/plasma-setup rpm/plasma-systemmonitor rpm/plasma-systemsettings rpm/plasma-thunderbolt rpm/plasma-vault rpm/plasma-welcome rpm/plasma-welcome-fedora rpm/plutosvg rpm/plutovg rpm/plymouth rpm/polkit rpm/polkit-kde rpm/polkit-qt-1 rpm/poly2tri rpm/popt rpm/portaudio rpm/powerdevil rpm/printer-driver-brlaser rpm/procps-ng rpm/protobuf-c rpm/ptouch-driver rpm/publicsuffix-list rpm/pugixml rpm/pulseaudio-qt rpm/pyatspi rpm/pyaudio rpm/pycairo rpm/pygobject3 rpm/python-anyio rpm/python-boto3 rpm/python-botocore rpm/python-certifi rpm/python-charset-normalizer rpm/python-click rpm/python-cups rpm/python-dasbus rpm/python-dateutil rpm/python-distro rpm/python-enchant rpm/python-h11 rpm/python-html2text rpm/python-httpcore rpm/python-httpx rpm/python-idna rpm/python-inotify rpm/python-jmespath rpm/python-linux-procfs rpm/python-olefile rpm/python-packaging rpm/python-pexpect rpm/python-pip rpm/python-psutil rpm/python-ptyprocess rpm/python-pygdbmi rpm/python-pysocks rpm/python-pyudev rpm/python-regex rpm/python-requests rpm/python-s3transfer rpm/python-sentry-sdk rpm/python-six rpm/python-urllib3 rpm/pyxdg rpm/qaccessibilityclient rpm/qcoro rpm/qqc2-breeze-style rpm/qrencode rpm/qt6 rpm/qt6-qt5compat rpm/qt6-qtconnectivity rpm/qt6-qtimageformats rpm/qt6-qtpositioning rpm/qt6-qtquicktimeline rpm/qt6-qtserialport rpm/qt6-qtspeech rpm/qt6-qtsvg rpm/qt6-qttools rpm/qt6-qtwebchannel rpm/qt6-qtwebsockets rpm/qt6-qtwebview rpm/qtkeychain rpm/quota rpm/rdma-core rpm/re2 rpm/readline rpm/realmd rpm/rit-meera-new-fonts rpm/rootfiles rpm/rpcbind rpm/rpm rpm/rsync rpm/rtkit rpm/rubberband rpm/rust-dolby_vision rpm/rust-gst-plugin-dav1d rpm/rust-imagequant-sys rpm/sane-airscan rpm/sbc rpm/sdbus-cpp rpm/sdl2-compat rpm/sed rpm/serd rpm/setup rpm/setxkbmap rpm/sgml-common rpm/shadow-utils rpm/shell-color-prompt rpm/signon-kwallet-extension rpm/signon-plugin-oauth2 rpm/signon-ui rpm/slirp4netns rpm/snappy rpm/snowball rpm/socat rpm/sord rpm/sound-theme-freedesktop rpm/soundtouch rpm/soxr rpm/spdlog rpm/spectacle rpm/speex rpm/spice-vdagent rpm/splix rpm/sqlite rpm/sratom rpm/srt rpm/startup-notification rpm/stoken rpm/switcheroo-control rpm/taglib rpm/tbb rpm/thermald rpm/time rpm/tinysparql rpm/tree-pkg rpm/tslib rpm/tuned rpm/twolame rpm/udftools rpm/unbound rpm/unity-gtk-module rpm/unzip rpm/upower rpm/uresourced rpm/uriparser rpm/usb_modeswitch rpm/usb_modeswitch-data rpm/usbmuxd rpm/usbutils rpm/usermode rpm/userspace-rcu rpm/v4l-utils rpm/vazirmatn-fonts rpm/vid.stab rpm/vim rpm/virt-what rpm/vlc-plugin-pipewire rpm/vo-amrwbenc rpm/volume_key rpm/vpnc rpm/vpnc-script rpm/vulkan-loader rpm/vulkan-tools rpm/wavpack rpm/wayland rpm/wayland-utils rpm/webrtc-audio-processing rpm/which rpm/whois rpm/wireguard-tools rpm/wireless-regdb rpm/wireplumber rpm/wl-clipboard rpm/xcb-util rpm/xcb-util-cursor rpm/xcb-util-image rpm/xcb-util-keysyms rpm/xcb-util-renderutil rpm/xcb-util-wm rpm/xdg-dbus-proxy rpm/xdg-desktop-portal rpm/xdg-desktop-portal-gtk rpm/xdg-desktop-portal-kde rpm/xdg-user-dirs rpm/xdg-utils rpm/xdpyinfo rpm/xdriinfo rpm/xevd rpm/xeve rpm/xhost rpm/xkbcomp rpm/xmessage rpm/xmodmap rpm/xorg-x11-server-Xwayland rpm/xorg-x11-xauth rpm/xorg-x11-xinit rpm/xprop rpm/xrandr rpm/xrdb rpm/xsettingsd rpm/xvidcore rpm/xwaylandvideobridge rpm/xxhash rpm/yajl rpm/zchunk rpm/zimg rpm/zix rpm/zlib-ng rpm/zram-generator" INFO writing OCI archive compressed=false INFO build complete --> 15fbce132544 [3/3] STEP 1/6: FROM oci-archive:out.ociarchive AS rootfs-clean Getting image source signatures ... Writing manifest to image destination [3/3] STEP 2/6: LABEL containers.bootc 1 --> 1bb9996ad0a0 [3/3] STEP 3/6: LABEL ostree.bootable 1 --> b71682f5cb2c [3/3] STEP 4/6: ENV container=oci --> 26ff06b2cde4 [3/3] STEP 5/6: STOPSIGNAL SIGRTMIN+3 --> 79fa12a71012 [3/3] STEP 6/6: CMD ["/sbin/init"] [3/3] COMMIT chunkah-test --> 7a5089b25d38 Successfully tagged localhost/chunkah-test:latest 7a5089b25d389b147b1c68634e1f03de7b4f661c33ea041187c700a9d0b9f70c ```cgwalters commentedon Mar 31, 2026
Looking at this, I think this issue kind snowballs into a general "rework chunkah algorithm". One thing I was also surprised by here is that chunkah doesn't support passing a previous build to use as a basis. We discussed this extensively when introducing the ostree-based chunking because otherwise it's easy to hit the "cascading changes" problem when one small package is added and that just ends up changing the majority of layers. EDIT: nevermind that's already tracked at #39
Another thing that I think is helpful here is to have some notion of layer ordering - roughly, I think it would make sense to have
[generic base image][specific atomic desktop]and similar.Or if I'm deriving from fedora-bootc and just adding a few things, it's just going to work way better in general if I don't change the structure of that base image by default.
https://grahamc.com/blog/nix-and-layered-docker-images/ does something like this implicitly by reusing dependencies, which could also make sense here.
solacelost commentedon Mar 31, 2026
I can think of three main "goals" of rechunking that I think should be considered, in probably this order:
I think that the first of those goals is really what is most required in general for good UX for consumers of bootc based systems, and to facilitate mass fleet deployment of bootc based systems. I think that the second is more for maintiners/central teams. I think that the third is a thing that feels implied to people used to container images as a possibility, but that doesn't really directly serve either of the first two goals explicitly.
jlebon commentedon Mar 31, 2026
First, thanks for filing this with details (and getting a discussion going!).
There's a lot of related things here that need to be teased apart and possibly filed as separate issues.
I also noticed in your screenshots that the history entry is missing the comment field. E.g. the output of
podman historywould help show the actual component breakdown. You can also use this script which breaks it down more nicely.Wait, I see a red flag here: there's a symlink to a file in
sysroot/ostree/objects. Note that chunkah is not at all ostree aware (by design) and produces plain OCI images. You'll want to prune the sysroot repo. See https://github.com/coreos/chunkah?tab=readme-ov-file#compatibility-with-bootable-bootc-images. (Note plain OCI images on SELinux-enabled systems will currently causes more storage consumption on the bootc side, this will be fixed in the next version of bootc.)There are two things going on here.
First, an emergent behaviour of the greedy algorithm is the catch-all bucket. See #16 (comment). This is also what you're seeing @travier. It may not look pretty, but it works. The proof is that last I tried, chunkah gave slightly better delta updates for FCOS than FCOS' current layering (which uses rpm-ostree's rechunker). :) See also the scripts in this directory if you want to try it out.
But the main gap you're hitting is basically this TODO. I.e. right now, xattr components are all considered to have little stability which makes them prone to fall in the catch-all when we run out of room.
Fixing that is not hard and should give better packing. The reason I punted on this was that at the time I just wasn't sure on the UX. Anyway, filed that properly now as #98.
The initrd churns faster than the kernel so ideally it'd be in its own layer. But you're right there's probably a missed opportunity here for "preferring" the kernel layer when packing beyond a certain threshold. (Related: #65).
What other kernel-related RPMs are you referring to? All RPMs are grouped by SRPM. An RPM may be "kernel-related" in theme, but have a completely different update cadence that makes it suboptimal to group together.
I think you're describing the catch-all bucket here too. But again the main problem in your case IMO is the lack of stability information for xattr components.
Let me address #98 and then you can try it out.
jlebon commentedon Mar 31, 2026
Right yeah, definitely on the roadmap! The reason that hasn't been a priority for me is that most users I think don't have clear update/build cadances like FCOS/OCP does so the focus is on optimizing for good deltas in general. But yes, the "single package" addition corner case is an interesting one. I'll need to check how chunkah behaves there today.
Right, I touched on this in #39 (comment). As mentioned there, I could imagine a mode where we "rechunk" just top layers, but for the common case where you're not adding much on top of the base, the best is actually to not rechunk at all.
I think at some point, once you've added enough on top of the base, it does make sense to rechunk of course to get good splitting of your own content. Your build environment can still benefit from layer dedupes of the base image you're building
FROM, and client systems don't care at all that your build systems have reshuffled everything and care just about good diffing of the final image they pull.jlebon commentedon Mar 31, 2026
How are you installing the non-RPM stuff? Can you share your Containerfile? I see gamescope is available in Fedora but I suspect you're not installing it that way?
jlebon commentedon Mar 31, 2026
A crucial thing I want to stress here is that any changes to the packing algorithm must be accompanied with clear proof that it actually improves things. Otherwise we're just shooting in the dark.
There's tools in this repo for doing this type of analysis (specifically https://github.com/coreos/chunkah/blob/main/tools/chunk-image-series.py and https://github.com/coreos/chunkah/blob/main/tools/analyze-layer-reuse.py). And we shouldn't be afraid of developing those tools further/add more tools if it helps with analysis.
So far I'm not necessarily seeing a need to change the packing algorithm itself, but rather just give it more/better information (which is what #98 is about).
cgwalters commentedon Mar 31, 2026
While I get the purity of not knowing about it at all, I think it will result in a lot of wasted user and developer time, so how about some minimal awareness? ➡️ #99
build: Warn when rootfs contains unpruned ostree sysroot
build: Warn when rootfs contains unpruned ostree sysroot
travier commentedon Apr 1, 2026
OK, thanks for all the details, this is really interesting. I'll look at setting up some xattrs for the KDE/KF6 packages and hopefully that should split those into a distinct layer which would mostly solve this. Thanks!
jlebon commentedon Apr 2, 2026
The
user.update-intervalxattr is now a thing and soon shipping onquay.io/coreos/chunkah:dev! See the updated docs at https://github.com/coreos/chunkah?tab=readme-ov-file#customizing-the-layers covering it.For example, as an experiment I added a blob on top of my workstation bootc image and then resplit the final image with 128 layers. You can see in this table the effect that different sizes and update intervals have on packing:
daily2(days)weeklyquarterlyrpm/gnome-disk-utilityyearlyrpm/geolite2rpm/vosk-api(
gnome-disk-utility,geolite2, andvosk-apiare extremely low churn RPMs)The default interval if not provided is now
weeklywhich I think reflects better user intent than the previous default (but it would still be much better if update intervals are explicitly provided!).solacelost commentedon Apr 3, 2026
Dive just doesn't show that field. It's definitely there in
podman inspectoutput.Yeah, I've started pruning those layers after confirming that them showing up in the Fedora bootc base images was a bug and not intended behavior.
I don't think that it's meeting intent for more images than FCOS, even if it's working well for FCOS, which is a deliberately sparse image in general. More to follow in this comment.
I'm hitting way more than the xattrs landing in the catch-all layer. Way more. Again, more to follow...
That's only really true, that it churns faster, if you're changing kernel modules, LUKS configuration (e.g. adding tang/clevis or something), or boot configs, yes? It's somewhat higher churn than the kernel, but probably not meaningfully so for most cases.
Yeah, I think for most trivial cases simply not rechunking works best. When it makes sense to rechunk, perhaps a dynamic chunk size capability makes sense but I think this radically widens the scope beyond any rechunking implementation today.
Yeah, I think this is fine. Considering initrd to be lower stability than the kernel itself, but at least close in stability, makes sense to me.
I was referring mostly to
linux-firmware, I think, which has an update cadence related to thekernelandkernel-modules-extrapackage which are built from the same SRPM. I don't know if it makes sense for there to be a way for a given Repo impl to provide rules to match components to be related separate from their implicit defaults (e.g. SRPM matching in the RPM Repo to be able to use regexes to identify related components that don't share an SRPM explicitly?) and then let that be implementation-specific.The catch-all bucket is, I think, too large and a side-effect of the algorithm rather than a desirable outcome. The stability of xattr components definitely isn't the only thing at play, as evidenced by @travier 's problem with Silverblue images that have relatively minimal additional components...
My image is... complicated. Here's the link to the repo. I can provide a consolidated post-preprocessing copy of either of the main Containerfiles if it would be useful. Happy to hop on a call or something to go over what I'm seeing. I see you're on CET/CEST. I'm in EST/EDT, so later your time and early my time would be fine to discuss and go over stuff if you're able and willing.
I'm going to try using these tools for my own images to provide the evidence for what I'm seeing empirically and see if I can provide you better proof. I agree that we shouldn't change the packing algorithm without a clear benefit, and measuring that benefit is part of it. I may need to tweak those scripts to really highlight what I'm seeing - this will be a long project on my end, I suppose, since I've taken optimal chunking as a personal pet peeve of mine with bootc images and I've been daily driving them on my main workstation for over a year now...
Tyfys, @cgwalters 🫡
This will be useful to me, even if it doesn't 100% solve my issue! Thanks! 😄
Okay, so, here's what I'm seeing right now (the image is public and you should be able to pull exactly the same tag to reproduce the results, though my upload is maybe not optimal...):
So that's 134 layers with 1 component and 1 layer with 445 components, with the next-most component layer having only 22.
That means that one layer is currently consisting of 74% of the components (SRPM-derived, xattr-derived, etc., it doesn't matter) while it makes up 0.38% of the total layer count.
Running
diveon this image shows that this single layer is now 1.4GB, on a 9.4 GB image:This layer is a disproportionately small one, considering the component count, which might sound like a win except that it includes components that are very volatile like the aforementioned initramfs alongside some xattr-tagged fonts like
inconsolataand also, separately, some dnf-installed fonts like those from themscore-fontspackage:I'm going to spend some time this weekend exploring different chunking tools and how they group this image, including using some of your tool scripts (maybe with some modifications I'll post...) but I suspect that the "catch-all layer" emergent behavior is not a case of unintuitive optimization but of misaligned rewards for component grouping. I don't think that maximizing merge impact is fundamentally aligned with the goals that a chunking algorithm should have which is why this catch-all layer exists, which in sufficiently complex images results in this much higher churn than
rpm-ostree build-chunked-oci.Anecdotally, I'm positive that I'm having a much worse experience than I did with that method - which is why I opened this issue in the first place. It seemed radically outsized.
jlebon commentedon Apr 7, 2026
Just to update this ticket: I tested performance against the Fedora Silverblue images (the main blocker there is lack of historical data; I ended up just scrapping the last 10 pungi composes), and I can confirm that we currently perform noticeably worse than rpm-ostree there in terms of delta updates (55% average data reuse vs 71% for the rpm-ostree baseline).
So yeah, it does seem like the chunkah's current algorithm works slightly better than rpm-ostree's when there's less packing pressure (e.g. FCOS) but performs much worse when packing pressure is high (which roughly translates to "larger images" like desktop bootable containers).
In investigating this, two major flaws I see in the current algorithm are:
Anyway, now playing around with a bucket-based strategy similar to rpm-ostree's but also definitely exploring what other interesting approaches are out there (this is a variant of the set partitioning problem, and there's a bunch of approximation methods that could apply to us as well). (Related to all this: a major difference from when rpm-ostree was written is that AI coding agents now exist which means it's now feasible to easily contrast different approaches, or e.g. do large sweeps for algorithm parameters, etc...)
solacelost commentedon Apr 7, 2026
Appreciate that. I got really sick this weekend instead of having time to dabble and systematize my measurements.
Happy to chip in and just be a dumb user to compare/contrast as you & the clanker prototype approaches.
jlebon commentedon Apr 11, 2026
Some progress on this in #107 with nice results. Wanted to land the algo rework before cutting the next release, but don't think that's gonna happen. That said, @solacelost if you're interested in trying it out, Packit CI on that PR will spit out an RPM you should be able to
dnf installin your quay.io/coreos/chunkah stage.solacelost commentedon Apr 11, 2026
I'm about to update to an image that was chunked with that PR, but I've already been poking around the layers to see what it looks like to me. Some anecdotal feedback:
At the same time, a bunch of my desktop's layers didn't change, indicating that the chunking probably does a good job of keeping some amount of layer/component pairings stable.
None of my layers are now over 1GB like they were before, and every large-ish (hundreds of MB) layer appears to have been well crafted to maximize reuse, byte for byte.
I'll chime back in sometime mid week when I do another update to make sure the over-time updates feel smaller as I'm sure you're able to empirically test already.
solacelost commentedon Apr 15, 2026
I made a couple of smallish tweaks throughout the week and today pushed a README tweak just to generate a new commit, since I'm tagging with short hashes and it's the easiest way to preserve tagged manifest references.
Bravo!
jlebon commentedon Apr 24, 2026
@solacelost Thanks for the feedback! I've cut a release now so will try to polish #107 soon.
jlebon commentedon Apr 30, 2026
Considering this fixed by #107. Thanks all!