From Fedora Project Wiki
m (Unbreak the parsing scripts)
Line 16: Line 16:
* Targeted release: [https://fedoraproject.org/w/index.php?title=Releases/34&action=edit&redlink=1 Fedora 34]
* Targeted release: [https://fedoraproject.org/w/index.php?title=Releases/34&action=edit&redlink=1 Fedora 34]
* Last updated: <!-- this is an automatic macro — you don't need to change this line -->  {{REVISIONYEAR}}-{{REVISIONMONTH}}-{{REVISIONDAY2}}
* Last updated: <!-- this is an automatic macro — you don't need to change this line -->  {{REVISIONYEAR}}-{{REVISIONMONTH}}-{{REVISIONDAY2}}
* Release notes tracker: tbd
* FESCo issue: <will be assigned by Wrangler>
* Tracker bug: <will be assigned by Wrangler>
* Release notes tracker: <will be assed by Wrangler>


== Detailed description ==
== Detailed description ==

Revision as of 19:35, 30 December 2020

Enable btrfs transparent zstd compression by default

Summary

On variants using btrfs as the default filesystem, enable transparent compression using zstd. Compression saves space and can significantly increase the lifespan of flash-based media by reducing write amplification. It can also increase read and write performance.

Owners

Current status

  • Targeted release: Fedora 34
  • Last updated: 2020-12-30
  • FESCo issue: <will be assigned by Wrangler>
  • Tracker bug: <will be assigned by Wrangler>
  • Release notes tracker: <will be assed by Wrangler>

Detailed description

Transparent compression is a btrfs feature that allows a btrfs filesystem to apply compression on a per-file basis. Of the three supported algorithms, zstd is the one with the best compression speed and ratio. Enabling compression saves space, but it also reduces write amplification, which is important for SSDs. Depending on the workload and the hardware, compression can also result in an increase in read and write performance.

See https://pagure.io/fedora-btrfs/project/issue/5 for details. This was originally scoped as an optimization for https://fedoraproject.org/wiki/Changes/BtrfsByDefault during Fedora 33.

Feedback

(pending initial discussion)

Benefit to Fedora

Better disk space usage, reduction of write amplification, which in turn helps increase lifespan and performance on SSDs and other flash-based media. It can also increase read and write performance.

Scope

Upgrade/compatibility impact

This Change only applies to newly installed systems. Existing systems on upgrade will be unaffected, but can be converted manually with btrfs filesystem defrag -czstd -r, updating /etc/fstab and remounting.

How to test

Existing systems can be converted to use compression manually with btrfs filesystem defrag -czstd -r, updating /etc/fstab and remounting.

User experience

Compression will result in file sizes (e.g. as reported by du) not matching the actual space occupied on disk. The compsize utility can be used to examine the compression type, effective compression ration and actual size.

Dependencies

Anaconda will need to be updated to perform the installation using mount -o compress=zstd:1

Contingency plan

  • Contingency mechanism: will not include PR patches if not merged upstream and will not enable
  • Contingency deadline: Final freeze
  • Blocks release? No
  • Blocks product? No

Documentation

https://btrfs.wiki.kernel.org/index.php/Compression

Release Notes

Transparent compression of the filesystem using zstd is now enabled by default. Use the compsize utility to find out the actual size on disk of a given file.