this post was submitted on 14 Dec 2023
94 points (92.7% liked)

Linux

48220 readers
554 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
94
submitted 11 months ago* (last edited 11 months ago) by Pantherina@feddit.de to c/linux@lemmy.ml
 

Disclaimer

Flatpak uses OSTree, like Fedora Atomic Desktops (Silverblue, Kinoite etc) and similar to BTRFS snapshots.

So many files are deduplicated and linked, not actually there

https://gitlab.com/TheEvilSkeleton/flatpak-dedup-checker

50GB without
31GB with deduplication
21,4GB with BTRFS compression
you are viewing a single comment's thread
view the rest of the comments
[–] ace@lemmy.ananace.dev 43 points 11 months ago (4 children)

A lot of that data doesn't actually exist, ostree hardlinks data blobs internally, so the actual size on disk is much smaller than most disk usage tools will show.

[–] Iapar@feddit.de 7 points 11 months ago (2 children)

What does "ostree hardlinks data blobs internally" mean?

[–] ace@lemmy.ananace.dev 17 points 11 months ago* (last edited 11 months ago) (1 children)

Flatpak uses OSTree - a git-like system for storing and transferring binary data (commonly referred to as 'blobs'), and that system works by addressing such blobs by hashes of their content, using Linux hardlinks (multiple inodes all referring to the same disk blocks) to refer to the same data everywhere it's used.

So basically, whenever Flatpak tells OSTree to download something, it will only ever store only copy of that same object (.so-file, binary, font, etc), regardless of how many times it's used by applications across the install.
Note that this only happens internally in the OSTree repo - i.e. /var/lib/flatpak or ~/.local/share/flatpak, so if you have multiple separate Flatpak installations on your system then they can't automagically de-duplicate data between each other.

[–] Iapar@feddit.de 7 points 11 months ago

Thank you for the explanation.

load more comments (1 replies)