Skip to content

Use rootfs compression hints also for OVA, LZMA-compress large binaries - #4973

Merged
sairon merged 1 commit into
devfrom
pc-erofs-binary-compression
Aug 20, 2026
Merged

sairon merged 1 commit into
devfrom
pc-erofs-binary-compression

Conversation

@sairon

@sairon sairon commented Aug 20, 2026 •

Copy link
Copy Markdown
Member

Some recent features (e.g. #4809, #4816, #4837) increased the rootfs bloat between 18.0 and 18.1, bringing the rootfs size on OVA and generic-x86-64 just 0.5 MiB below the 256 MiB cap, blocking us from adding new features that require space in the rootfs. To gain some space, also start compressing large daemon binaries using the LZMA algorithm. The selected binaries are normally invoked only once per boot, so the runtime cost of the more expensive decompression is minimal.

The same compression hints are now used for OVA, where it brings us around 45 MiB in the rootfs partition image

Summary by CodeRabbit

  • Performance
    • Improved filesystem image compression for PC and OVA builds using optimized LZ4HC and LZMA settings.
    • Applied stronger compression to firmware, kernel modules, and selected long-running container services.
    • Increased compression block sizes for applicable workloads to improve storage efficiency.

Some recent features (e.g. #4809, #4816, #4837) increased the rootfs
bloat between 18.0 and 18.1, bringing the rootfs size on OVA and
generic-x86-64 just 0.5 MiB below the 256 MiB cap, blocking us from
adding new features that require space in the rootfs. To gain some
space, also start compressing large daemon binaries using the LZMA
algorithm. The selected binaries are normally invoked only once per
boot, so the runtime cost of the more expensive decompression is
minimal.

The same compression hints are now used for OVA, where it brings us
around 45 MiB in the rootfs partition image
@sairon
sairon requested a review from agners August 20, 2026 13:42
@sairon sairon added board/ova Open Virtual Appliance (Virtual Machine) board/generic-x86-64 Generic x86-64 Boards (like Intel NUC) labels Aug 20, 2026
@coderabbitai

coderabbitai Bot commented Aug 20, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2079f02f-977a-418f-9aae-e1bcf62f4226

📥 Commits

Reviewing files that changed from the base of the PR and between 9f8af50 and 2049df3.

📒 Files selected for processing (4)
  • buildroot-external/board/pc/erofs-compress-hints.txt
  • buildroot-external/board/pc/generic-x86-64/erofs-compress-hints.txt
  • buildroot-external/configs/generic_x86_64_defconfig
  • buildroot-external/configs/ova_defconfig
💤 Files with no reviewable changes (1)
  • buildroot-external/board/pc/generic-x86-64/erofs-compress-hints.txt

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The change adds shared EROFS compression hints for PC images. It configures LZ4HC and LZMA compression for OVA builds and updates the generic x86-64 hints path.

Changes

EROFS compression configuration

Layer / File(s) Summary
Configure compression profile
buildroot-external/configs/ova_defconfig
OVA builds now use custom LZ4HC and LZMA compression with an external hints file.
Apply shared PC compression hints
buildroot-external/board/pc/erofs-compress-hints.txt, buildroot-external/board/pc/generic-x86-64/erofs-compress-hints.txt, buildroot-external/configs/generic_x86_64_defconfig
Shared PC hints define LZMA rules for firmware, kernel modules, and selected container daemons. The generic x86-64 configuration now references the shared hints file, and its previous hints file is removed.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 2049d

The PR changes build-time compression hints to reduce rootfs image size and add LZMA compression for selected large binaries; no actionable merge-blocking risk remains, so it is merge-ready after normal checks.

Suggested reviewers: agners, pvizeli

Poem

I’m a rabbit with hints in a row,
Packing EROFS blocks just so.
LZ4HC hops,
LZMA stops,
Firmware and daemons compress as they go.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes applying rootfs compression hints to OVA and using LZMA for large binaries.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pc-erofs-binary-compression

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@agners agners left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sairon
sairon merged commit 6705258 into dev Aug 20, 2026
3 checks passed
@sairon
sairon deleted the pc-erofs-binary-compression branch August 20, 2026 14:10
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

board/generic-x86-64 Generic x86-64 Boards (like Intel NUC) board/ova Open Virtual Appliance (Virtual Machine) cla-signed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants