3 ms·
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 cl
by xrd 2y ago
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.
- nicksbg 2y agoExactly. 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.
- YorickPeterse 2y agoMy `~/.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`: 1.3 MB Flatseal 2.9 MB Extension Manager 47.7 MB Celluloid 604.6 MB Freedesktop Platform 680.0 MB Freedesktop Platform 533.8 MB Mesa 533.8 MB Mesa (Extra) 469.8 MB Mesa 469.8 MB Mesa (Extra) 46.9 MB Intel VAAPI driver 50.9 MB Intel VAAPI driver 20.3 MB FFmpeg extension with extra codecs 790.0 kB openh264 763.9 kB openh264 243.7 MB GNU Image Manipulation Program 7.7 MB HEIC 17.6 MB Characters 14.2 MB Connections 25.4 MB Image Viewer 946.7 kB HEIC 25.5 MB Sushi 39.8 MB Papers 941.3 MB GNOME Application Platform version 46 1.0 GB GNOME Application Platform version 47 794.1 kB Fonts 137.7 MB gThumb Image Viewer 1.1 MB adw-gtk3 Gtk Theme 269.6 MB Firefox 482.3 MB Signal Desktop 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.
- nicksbg 2y agoFair, 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.
- trissi1996 2y agoI just set up systemd-timers to nix-gc/docker-prune daily. Still a bit of an annoyance, but one I don't notice once it's set up.
- xrd 2y agoGreat idea. I don't know why I didn't think of that.
- ChocolateGod 2y agoDocker 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).