this post was submitted on 14 Dec 2023
87 points (92.2% liked)

Linux

48072 readers
1 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 6 years ago
MODERATORS
 

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
top 50 comments
sorted by: hot top controversial new old
[–] ace@lemmy.ananace.dev 38 points 2 years ago (2 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.

[–] Pantherina@feddit.de 14 points 2 years ago

Thanks! The same goes for ostree system versions and BTRFS snapshots probably.

I have a similar problem with virt-manager and I think that doesnt create dynamically allocated qcow2 containers?

[–] Iapar@feddit.de 5 points 2 years ago (1 children)

What does "ostree hardlinks data blobs internally" mean?

[–] ace@lemmy.ananace.dev 14 points 2 years ago* (last edited 2 years 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 6 points 2 years ago

Thank you for the explanation.

[–] Vilian@lemmy.ca 26 points 2 years ago (1 children)

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

here a script to compare the size without or with deduplication

[–] Pantherina@feddit.de 13 points 2 years ago* (last edited 2 years ago)

Thanks!

50GB without
31GB with deduplication
21,4GB with BTRFS compression

And I have to say I have many apps. Not as many anymore, and no EOL runtimes apart Onionshare anymore.

[–] Still@programming.dev 17 points 2 years ago

I think at one point I had like 2.5 tb of stuff stored on my 2 tb drive in my laptop, deduplication and btrfs compression is fun

[–] drwankingstein@lemmy.dbzer0.com 6 points 2 years ago* (last edited 2 years ago) (2 children)

Flatlack is weird. Sometimes it's really good, but then other times depending on what you install it really bloons up.

[–] Pantherina@feddit.de 2 points 2 years ago

Those are unmaintained apps and you probably shouldnt use them. Poorly this is not as obvious and cant be enforced.

[–] magikmw@lemm.ee 1 points 2 years ago

One gotcha is installing both as user and root, getting two sets of dependencies. I only found out after a year or so of consciously using flatpak.

I'm now taking care to make sure I only use flatpak as root. Maybe not the most secure.

[–] tanja@lemmy.blahaj.zone 6 points 2 years ago (2 children)

Removing /repo is not considered safe, but I just removed its contents anyways and then just ran a repair.

That actually resulted in more available disk space than after running the garbage collection.

And my flatpak apps still work 🤷‍♀️

[–] joyjoy@lemm.ee 14 points 2 years ago (1 children)

I can't tell if this is the new "Delete System32" or not.

[–] callyral@pawb.social 5 points 2 years ago (1 children)

no, that'd be deleting /boot, /usr or /var

[–] tgxn@lemmy.tgxn.net 2 points 2 years ago (1 children)
[–] callyral@pawb.social 2 points 2 years ago

because then it also deletes your personal files which is not equivalent to deleting System32

[–] Pantherina@feddit.de 1 points 2 years ago
[–] Frederic@beehaw.org 5 points 2 years ago (3 children)
[–] Pantherina@feddit.de 26 points 2 years ago (1 children)

Because its a modern package system that is free, focused on making every app run, has isolation, sandboxing and a permission system

[–] miss_brainfart@lemmy.ml 18 points 2 years ago

And brings the most recent version of something to any system. I'm astounded sometimes by how much a native package can lag behind

[–] MonkderZweite@feddit.ch 4 points 2 years ago

Convenient libraries/frameworks are fat. Because they are fat, they need frequent updates/security fixes, breaking codebase more often. With flatpack, developers can freeze lib versions at a convenient point, without caring for system dependencies.

load more comments (1 replies)
load more comments
view more: next ›