Or in other words, file compression. This is a very short stub of an article to explain why my laptop has transparent compression enabled on the filesystem. And kinda how I make it all work.
It starts with a little investigation into btrfs as I
was somewhat interested by its advanced features, such as reflink
copies, snapshots, and of course transparent compression.
Ok, so I might have dropped this draft a while ago. To cut it all short it makes sense to enable compression across my entire filesystem. Especially when combined with the ability to remove and combine duplicated extents across the filesystem (not that I can claim to fully understand exactly how it all works).
What I do know is what I did.
btrfs in the kernelbtrfs-convert to turn my ext4
filesystem into btrfs/etc/fstab file
zstd for the whole
filesystemWith that done the compression would automatically start to take
place, as and when files are accessed they would get automatically
compressed using zstd compression, chosen for its good
realtime performance.
The only thing I’ve done since then is attempted to make good use of the ability of btrfs to deduplicate shared extents. And no, I don’t really know exactly what that means, but the gist of it is files that are identical can exist as multiple references to the same file. But extents allow you to share parts of files, meaning files that are really similar but differ in only a small way can be part references to the same file, with unique bits added on top.