Bug 1868142

Summary: RFE: enable compression when images use btrfs as sysroot
Product: [Fedora] Fedora Reporter: Chris Murphy <bugzilla>
Component: appliance-toolsAssignee: Neal Gompa <ngompa13>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: agrimm, dhuff, ngompa13
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Chris Murphy 2020-08-11 19:37:42 UTC
Anaconda equivalent RFE has all the background:
https://bugzilla.redhat.com/show_bug.cgi?id=1851276

As it relates to appliance-tools, the variant that makes the most sense to me is:

1. Use 'mount -o compress-force=zstd:9' (or higher level as resources allow, up to 15) upon first mount when assembling prior to the installation. That way the install image itself is as highly compressed as possible/desired.

2. Set the /etc/fstab mount option to 'compress=zstd:1' which has a couple of optimizations. One, it's the least level of compression, thus faster. Two, it has uses Shannon entropy to cheaply estimate the benefit (or lack thereof) of compressing to do an early bail out, i.e. not attempt the compression at all, on a per block basis.

This is fairly conservative. As we learn more about the various tradeoffs, we might get more aggressive.

Facebook currently uses compress=zstd:1 across the board times millions of machines, there's no place they don't use it.