zram-size = min(ram, 8192) is Fedora's default since F34, where zram-fraction=1.0 with max-zram-size=8192 has run on desktops for five years. The previous min(ram / 2, 8192) halved that on every machine below 16G with nothing behind the fraction; at 16G and above the two already agree. A changed size only reaches a running device on the next boot, so the migration resizes an empty device now and asks for a reboot otherwise. It asks the generator what the config evaluates to rather than repeating the expression here, and does neither when the device already matches. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
20 lines
946 B
Plaintext
20 lines
946 B
Plaintext
# Compressed swap in RAM, sized the way Fedora has shipped it since F34: all of
|
|
# memory, capped at 8G. Fedora weighed the worry that incompressible pages would
|
|
# tie up RAM against five years of desktops reporting no trouble from it, which
|
|
# is more field evidence than we could gather on our own.
|
|
#
|
|
# The cap is what bounds the downside. A browser-heavy desktop can drive zstd
|
|
# down near 1.1:1, where the device backs far less than it advertises, and 8G
|
|
# keeps that bounded on any machine large enough to notice. The disk swapfile
|
|
# sits behind it at pri=0 for everything past that.
|
|
#
|
|
# Fedora spells this zram-fraction = 1.0 with max-zram-size = 8192; both keys
|
|
# are deprecated in favour of zram-size, which computes the same numbers.
|
|
[zram0]
|
|
zram-size = min(ram, 8192)
|
|
compression-algorithm = zstd
|
|
|
|
# Above the pri=0 that omarchy-hibernation-setup gives the disk swapfile, so
|
|
# zram absorbs everything until it's full.
|
|
swap-priority = 100
|