I'm not seeing any discussion about disk space when using immutable distros. I was running nix for a while and generally loved it. I know I can run nix-gc to clean up unused components. But, when I'm using docker I'm constantly running out of disk space. Again, I know how to use docker system prune, but it's an annoyance.
The discussion in the article talks about using containers and flatpak and snap and all those things bundle dependencies and really swell the disk usage requirements. Is there a good solution other than owning a massive SSD?
It isn't as big a problem for servers which don't change as often and where you need instant rollbacks, but I'm using immutable (or atomic distros like nixos) on my laptop and having trouble.
It makes me think I'm not using these systems correctly.
Docker and Flatpak use storage in different ways, despite both being implementations on top of Linux namespaces/cgroups.
Docker uses layered images, one on top of another for each step of the build process, to deduplicate in Docker, you try to reuse layers, but it's not perfect and having duplicate files is very very common.
Flatpak uses OStree, which has a content addressable file store, meaning files are stored and linked based on their checksum, so duplicate files only exist once and are linked into their respective locations.
There is work to make Docker use a system similar to Flatpak (see composefs).
Exactly. I think this is a massive problem, and also as someone that works on one of Ubuntu distributions, I always wonder how much strain it introduces together with flatpaks and snaps.
My `~/.var/app` directory is 14 GiB in size, 12 GiB of which is used by Signal
(which is mostly photos and videos) and 1.8 GiB by Firefox. All other programs
only take up a few MiB of space.
In terms of installation size it's not a problem either, as one can verify using
`flatpak list --columns=size,name`:
The duplicate entries is because certain Flatpaks may require different versions
of e.g. the Freedesktop platform (that being possible is one of its big selling
points).
In short, storage isn't a problem at all for any computer produced in the last
20 years.
Fair, but not strain in terms of storage space. More in terms of disk writes and how write intensive it could be, which can be a problem especially for SSDs.
The discussion in the article talks about using containers and flatpak and snap and all those things bundle dependencies and really swell the disk usage requirements. Is there a good solution other than owning a massive SSD?
It isn't as big a problem for servers which don't change as often and where you need instant rollbacks, but I'm using immutable (or atomic distros like nixos) on my laptop and having trouble.
It makes me think I'm not using these systems correctly.