On "Wasting disk space"

One of the criticisms people have with containerizing their desktop apps is the "insane amount of space for their environment" that people think it requires. That's a direct quote from a reddit post on the topic from today.

Let's have a look

Today I'll compare two desktops, one will be Fedora Workstation 36, a traditional desktop distribution. And in the other corner we'll put Fedora Silverblue 36.

Let's start off with the easy one, installation on first boot.

Fresh install, followed by an rpm-ostree update on Fedora Silverblue, and then a dnf update on the Workstation 36. I am measuring the root filesystem,  so ignoring /boot, we're mostly interested in how much space the operating system partition takes up

  • Silverblue - 6.8G
  • Workstation - 3.0G

Aha! OMG I knew it! Things aren't looking good for Team Anti-Hysteris.

However no one uses just what comes out of the box and I want to compare what a real desktop installation looks like, so I decided to pick some applications that users want to install. I wanted to pick enough variety to be a reasonable comparison, but I also don't have all day to install the universe.

Both already come with Firefox so I decided to install the following applications: LibreOffice, OBS, Steam, Blender, Thunderbird, Krita, Kdenlive, VLC, GIMP, and Discord. Note that LibreOffice came preinstalled with Workstation (but not Silverblue). On Silverblue I did this by enabling Flathub, and on Workstation I enabled RPMFusion. Originally I had vscode, Element, and Slack on this list as I was attempting to recreate all the apps I use on the regular but they weren't available in RPMFusion afaict and I didn't want to go messing with more repos, ten apps isn't a bad place to start and we can always add more later to see where we stand.

  • Silverblue - 8.3G
  • Workstation - 7.1G

First of all, if you're unaware the filesystem is the same on both, btrfs with zstd compression (level 1) enabled by default. I was really impressed with how much shit you can ship in an OS and stay under 10GB! Here's the df for both, default partition layout on a 40GB virtual disk:

Silverblue 36

Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        4.0M     0  4.0M   0% /dev
tmpfs           3.9G     0  3.9G   0% /dev/shm
tmpfs           1.6G  1.5M  1.6G   1% /run
/dev/vda2        39G  8.3G   30G  22% /sysroot
tmpfs           3.9G   16K  3.9G   1% /tmp
/dev/vda2        39G  8.3G   30G  22% /var
/dev/vda2        39G  8.3G   30G  22% /var/home
/dev/vda1       974M  172M  735M  19% /boot

Workstation 36

Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        4.0M     0  4.0M   0% /dev
tmpfs           3.9G     0  3.9G   0% /dev/shm
tmpfs           1.6G  1.5M  1.6G   1% /run
/dev/vda2        39G  7.1G   32G  19% /
tmpfs           3.9G   16K  3.9G   1% /tmp
/dev/vda2        39G  7.1G   32G  19% /home
/dev/vda1       974M  221M  686M  25% /boot
tmpfs           794M  128K  794M   1% /run/user/1000

"But you're still larger than the traditional OS!"

Let's use powpingdone's awesome flatpak-ostree-dedup-stats.py to see how ostree's deduplication is working on the Silverblue side:

no dedupe: 6.3 GB (6763322389 B)
dedupe:    5.1 GB (5453891829 B)
singlelet: 4.5 GB (4823250678 B)
orphan:    3.4 MB (3605611 B)

deduplicated size ratio: 80.64
singlelet space usage:   88.44
singlelet file ratio:    73.05
orphan space usage:      0.07
orphan file ratio:       0.63

Let's get a second opinion from TheEvilSkeleton's flatpak-dedup-checker:

Directories                 /var/lib/flatpak/{runtime,app}
Size without deduplication: 6.76 GB
Size with deduplication:    5.45 GB (80% of 6.76 GB)
Size with compression:      3.04 GB (44% of 6.76 GB; 55% of 5.45 GB)

Thanks to the the deduplication of ostree, we're within ~1.3GB of the traditional desktop, and having that transparent zstd compression just available everywhere is a nice thing to have. This is also with the KDE, GNOME, and Freedesktop runtimes installed on Silverblue, which means subsequent applications that use those runtimes will just reuse them. Big pile o' Electron apps probably cost the same on both space wise, but we already know that. Will Thompson has a blog post on flatpak disk usage and deduplication that is good reading.

Now I know some people will spend X amount of comments arguing about how that's still too big of a delta. Features cost resources, and in the age of 100GB video games this is probably one of the cheapest tradeoffs I've had to make resource wise for what you get.

Conclusions and Follow on stuff

  • If Workstation started off so small I wonder where a Workstation/Flathub setup would sit? You'd think it'd sit somewhere in the middle?
  • Normal openSUSE Tumbleweed v. MicroOS would be an interesting thing to check out, someone please do that!
  • I purposely didn't do a "pure GNOME" or "pure KDE" setup since in the wild people use apps that they need, it would be an interesting comparison though.

My conclusion is this. Yes, they take up more room, but it's not by much, and unless you're on an extremely size-restrained system (like say a 64GB Chromebook you are repurposing) then for most systems it's a wash. In return you get immutable upgrades and all the benefits of an image based system. And of course, since this is a cloud native desktop, you can keep all the traditional packaging stuff you're used to, it's just in a container.  

If you're interested in image based desktops, check out my awesome-immutable list for some resources, and of course go check it out and play for yourself!


Got a close-enough comparison from Frederic Crozat at openSUSE which looks pretty similar but with a larger delta:

Will Thompson has also chimed in with a lengthy blog post talking about how EndlessOS works on getting onto smaller disks.

Show Comments