Share identical files, and compress Proton prefixes #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dedupe-and-prefixes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two ideas from the roadmap:
ogc dedupe, and compressing Proton prefixes. Command line and timer only; the desktopapp gets them later.
ogc dedupeLets identical files of games and Proton prefixes keep their data once on btrfs, like duperemove on whole files.
FIDEDUPERANGEcompares them byte by byte with both locked.No file is written; markers, times and modes stay (checked on a real kernel). The owner may share into read-only
files without write permission.
again. Identical files that are not compressed yet are reported with the advice to compress them first.
compressed copy becomes the source; a copy whose data a snapshot or a file outside the selection keeps anyway is
preferred, and is never used as a destination (that would free nothing). A copy that agrees with the source only
at the start is tried against the others.
ENOSPC/EROFSend the run, other errors (a checksum error, an immutable or swap file) skip one file; a filesystemwith less than 256 MiB free is left out. Needs Linux 5.10, refuses alongside bees or btdu.
--dry-runcompares inuser space and changes nothing.
Behaviour change: a compression at another level, or with
--force, now leaves files whose compressed data ismostly shared as they are (without a marker), so it does not undo the sharing.
--unsharerewrites them anyway.Shared data that is not compressed yet (snapshots of old installs, Proton's copies in its prefixes, converted
extents) is compressed as before.
Proton prefixes
--prefixesadds the prefix of each selected game (steamapps/compatdata/<appid>, once Proton has set it up) tocompress,analyzeanddedupe. A prefix is in use while a process has it inSTEAM_COMPAT_DATA_PATH, which alsocatches wineserver;
ogc autowaits while any such process runs, including games from outside Steam. Compressedprefixes are recorded in
prefixes.tsvwith a stamp of the files Wine rewrites when the prefix is used.Timer
ogc timer enable --include-prefixes --dedupe: changed prefixes are compressed, and identical files are shared after acompression or once a week (a failed run counts too, so it is not repeated hourly). Both are off unless chosen; the
desktop app keeps them when it rewrites the unit.
Checked
a read-only destination works without write permission, nothing changes in a dry run, files that are not compressed
yet are left out, a new level keeps shared files until their copy is gone, sharing after a partial match, and
sharing onto data that something outside the selection keeps; each safeguard was removed once and a test failed
space(prefix compressed and recorded, dry run, sharing confirmed bybtrfs filesystem du, anew level keeps the shared copies, the timer,
btrfs scrub, remount, checksums); all six scenarios pass with KVMogc compress --prefixes,ogc dedupeandogc auto --include-prefixes --dedupeon a made-up library ina throwaway home folder
kept snapshotted and converted data uncompressed, a checksum error that stopped every timer run, a nearly full drive
that stopped deduplication everywhere, prefixes of two installs of one game recompressed hourly, and the "game
running" check missing Proton games from outside Steam)
Not checked here
How much this saves on a real library is not measured.
ogc dedupe --all --prefixes --dry-runshows it withoutchanging anything. The DLLs Proton places in its prefixes share their data with the Proton installation until either
is compressed; afterwards
ogc dedupehas to share the compressed copies again.