3 ms·
Just use a deduplicating filesystem. Both btrfs and xfs can deduplicate identical files.
by nextaccountic 5y ago
Just use a deduplicating filesystem. Both btrfs and xfs can deduplicate identical files.
- sho_hn 5y agoThis is misleading. While btrfs and xfs have some dedup functionality, it must be invoked explicitly (e.g. by using `cp` with the `--reflink` argument). For application installation to benefit from this, business logic would have to pre-identify identical files and make such references. There have been some experiments in btrfs to enable inband dedup on arbitrary writes, but nothing that made it in there as yet. Note however that the discussion misses on the fact that Flatpak itself does perform dedup by using ostree for on-disk storage. ostree implements data structures and ideas very similar to git sans the version control.
- nextaccountic 5y agoDedup can be run periodically, with crontab or systemd timers. Here's an example of that: https://aur.archlinux.org/packages/duperemove-service https://aur.archlinux.org/packages/duperemove-service