Linux serverlinux web serverNETWORK ADMINISTRATIONS

Snaps vs Flatpaks vs Appimages vs Packages: benchmarks, missing features & differences

Try Proton VPN, my pick for a secure and private VPN: https://protonvpn.com/TheLinuxEXP

Grab a brand new laptop or desktop running Linux: https://www.tuxedocomputers.com/en#

SUPPORT THE CHANNEL:
Get access to a weekly podcast, vote on the next topics I cover, and get your name in the credits:

YouTube: https://www.youtube.com/@thelinuxexp/join
Patreon: https://www.patreon.com/thelinuxexperiment
Liberapay: https://liberapay.com/TheLinuxExperiment/

Or, you can donate whatever you want: https://paypal.me/thelinuxexp

👕 GET TLE MERCH
Support the channel AND get cool new gear: https://the-linux-experiment.creator-spring.com/

🎙️ LINUX AND OPEN SOURCE NEWS PODCAST:
Listen to the latest Linux and open source news, with more in depth coverage, and ad-free! https://podcast.thelinuxexp.com

🏆 FOLLOW ME ELSEWHERE:
Website: https://thelinuxexp.com
Mastodon: https://mastodon.social/web/@thelinuxEXP
Pixelfed: https://pixelfed.social/TLENick
PeerTube: https://tilvids.com/c/thelinuxexperiment_channel/videos
Discord: https://discord.gg/mdnHftjkja

#Linux #Flatpak #Snap #AppImage

00:00 Intro
00:47 Sponsor: Proton VPN
02:17 Quick summary of formats
05:52 Performance benchmarks
08:52 Sandboxing
11:41 Missing Features
15:24 Parting Thoughts
16:59 Sponsor: Get a PC made to run Linux
18:00 Support the channel

So, what we call “packages” are debs, for Debian and Ubuntu based distros, and RPMs for Red Hat and SUSE based distros. These packages can contain libraries, or apps, and all libraries are shared between applications.

We then have Flatpaks, which are distro-agnostic. Flatpaks are sandboxed, and while they share a lot of libraries through runtimes, they can use more space over time.

Snaps are basically the same concept as flatpaks, made by Ubuntu. There are a few technical differences with flatpaks, the big one being that Snaps are suitable for graphical apps, and for command line programs.

AppImages are a more portable format: the whole app is shipped inside a single file, with most, if not all of its libraries. This means you can copy/paste apps from a system to another, and they run on any distro that has access to FUSE2.

Now, let’s look at some performance comparison between different packaging formats.
I ran all these tests on the same Ubuntu 23.04 VM, with 16 gigs of RAM, 4 cores of my 13th gen i7 13700h.

Judging from the results, we can see that all packaging formats take longer to start than basic deb packages. It’s especially visible with heavy apps that need to do some setup when they first open, like LibreOffice or GIMP. But we also notice that on subsequent openings of an app, all packaging formats are pretty close.

I ran the Speedometer test in all 4 versions of Firefox: the snap performs worse for jetstream, but much better for Speedometer, while flatpak performs on par for SPeedometer, but worse for jetstream. Deb packages perform well for jetstream, but worse for speedometer., and the Appimage is generally just a good performer.

A sandboxed application runs in its own environment, with very few ways to access things outside of that sandbox. This is similar to how web browsers run each tab in a separate process.

Regular packages aren’t sandboxed by default: basically it means that you should only install these packages from sources you trust: either your distro’s repos, or well vetted third party repos.

As per Flatpaks, they’re all sandboxed. The sandbox isn’t 100% bulletproof, nothing is, but it does limit what the app can access. This is all managed through app permissions, much like what you’d find in Android or iOS apps.

Snaps can be sandboxed, but the sandbox isn’t mandatory: developers can decide to not use it, although this triggers a manual review of the snap app when it’s uploaded to the Snap Store, to check if it does anything weird. As per AppImages, they don’t have a sandbox natively.

Now let’s see what’s missing in terms of features. Regular packages can access everything, so there are no missing features there.

Flatpaks and snaps have more restrictions. The main missing piece is native messaging support: this is what lets an app communicate with another, and one main use case is for password managers: currently, no web browser packaged as flatpak or snap can interact with a third party password manager reliably.

Support for the system theme is also not perfect for snaps and flatpaks, or for AppImages.

As per various problems with these packaging formats, you also have the size of packages: while Snaps and Flatpaks do share libraries between apps, they don’t share as much as regular packages, which means they can take up more space.

Snaps also have the added problem that they mount each app in its own virtual filesystem, that is decompressed on the fly: this can clutter your mount points, which can be annoying if you need to manage these regularly. The Snap Store backend is also proprietary, and it’s centralized.

source

by The Linux Experiment

linux web server

30 thoughts on “Snaps vs Flatpaks vs Appimages vs Packages: benchmarks, missing features & differences

  • As a Fedora packager, I am afraid of what you will say about RPM/DNF.

  • Microsoft are involved with Canonical and they are pushing snap packages which are not open source, they are propitiatory. I don't trust them and will not use them.
    I use Linux to get far away from that spyware OS.

  • Regarding load times of images – that's because there's bloat being avoided loading libraries before launching – the reason they're larger. If they launched faster it'd be because their dependencies were already loaded even if you didn't need them they'd be there. You avoid bloat by loading as needed ergo, a second or two to load the first time. I can't imagine that not being everyone's ideal for guaranteed stability and optimal hardware acceleration. The cost of duplicated libraries amounts to MB or a few gigs across a whole system. Hard drives are sooooo cheap these days, it's absurd to sacrifice cross platform functionality and hardware just to save 280kb on a simple redundant specific library it depends on. Especially if it's version specific!!! Appimage should be all we need, and enhance its features rather than spreading everything across package managers which only half speak to one another at the worst of times. Appimage do nothing at all but take up space and carry a one-time load cost of 3 seconds. It's absurd to say 3 seconds isn't worth perfecting sandbixing and compatibility across the board.

  • The way I see it, choosing Flatpak is a good idea when running a proprietary application. I want the most sandboxing to keep my data safe in such a case. I also don't want to deal with dependency issues which could arise when the community can't recompile for newer library versions.

  • AppImage basically has no wayland support and the creator rejects patches to improve the situation because of an idealogical opposition to wayland, meaning appimage apps (at least qt ones) can only run on xwayland meaning no hidpi support and thus blurry fonts. Also, missing host libraries preventing appimages from working is really really common outside of ubuntu.

  • Flatpak has my vote, I run Debian and in the past there were things I could only get with a PPA, and Debian doesn't allow those. I'm finding everything I need with Flatpak.
    Snaps can just go away, I don't want anything from Cannonical/Ubuntu.

  • Flatpak has already won. It won't matter if people waste energy into the other formats because they are already irrelevant.

  • I just use what the developer recommend me to use

  • On my Hdd with ubuntu it took almost 7 minutes to boot and its horrendous

    Switched to Linux Mint and Install mostly same softwares with Flatpaks instead on Snaps my boot time was cut down to 2 minutes

    I don't care about politics, I want Canonical to make money and it is a REAL PROBLEM the way snaps are.

  • I'm using Flatpaks whenever I can, partly because Gnome Software makes it really easy (I don't have to touch the terminal). On Debian 12 it also allows me to get the latest versions of apps.
    I just wish that all software was packaged with the limitations in mind and maybe even don't package software that won't work in a sandbox. I've had a lot of issues mainly with IDEs not having access to tools and sometimes I could install a runtime but then I can't really use that outside Flatpak so I also have to install it regularly…
    On the flipside, Bottles (apart from its notable list of really annoying bugs…) works flawlessly in Flatpak, while I still couldn't set up a fully working Wine prefix natively (to test, once again, limitations of Flatpak).
    But portals are really annoying, or rather that apps are not prepared to run in a sandbox… One bad issue I had with Logseq was that I selected a directory that the app didn't have access to and thus it was writing everything in a temporary folder… I had zero feedback that this was happening, though I realized shortly after that this is probably the case so I didn't lose too much stuff.

  • Recently switched to Ubuntu. In my experience, I've had better luck with Flatpaks and DEBs, and honestly Flatpak works the best most of the times. Some of the Snap versions of software either don't work, or don't work properly. You also have to be careful where the app is coming from. The original Steam client from Valve works better than Canonical's snapped version. With the snapped version, it was a 50/50 shot if the game would play.

  • This is a (real life) virus behaviour: we get more disk space, we start consuming more space .

  • I’m care very little about package sizes. Storage is so cheap so whatever. I think almost 80% of the packages I have installed are completely ununsed as Of yet.
    I just did a ent groupinstall and call it done.

  • The unfortunate truth is that none of the formats are good.

    – Flatpak is the best so far, but needs support for command line tools. It also needs to support non-sandboxed mode.
    – AppImage is not as well supported, and it seems it's only there because the other two aren't complete.
    – Snaps can go snap themselves out of existence and make everyone much happier. They are absolute garbage.

    Overall, I think Flatpak is the closest but missing CLI support alone is a deal breaker. We do not want Snaps to become the standard. So Flatpak, please do what's necessary to make CLI applications work.

  • Any particular reason your videos are 50 FPS instead of 60/30?

  • Even though it probably would be a very technical thing: I would like to know in what way dep and rpm packages are different. Could you convert one to the other or not? And how is it that flatpack seems to work for many distros as compile-only-once-solution?

  • I was using Flatpaks extensively on Arch, but after switching to NixOS I dropped flatpak for good. Only system packages!!

  • To be honest, I feel like snaps get a bad rap. There are some apps I use which don't have a deb format and only offer snap for the best experience or appimage. I haven't really had any issues with Snap packages myself and find it incredibly easy to just install a snap and be done with it on my personal computer. It installs every library needed to run it so it almost always runs flawlessly. That being said I use a lot of flatpaks too and haven't had any trouble with simultaneously running any side by side. I think the takeaway is that it really just depends on what you feel most comfortable using.

  • Dynamic linking is best linking.

  • Best packaging format for linux: NIX, change my mind.

  • flatpacks are updated more recently than snaps, I find the same software on both but flatpacks have more recent versions.

  • Whatever the developer forced me to use > Native pkg > AppImage > (Flatpak == Snap)

  • I won't touch snaps not only because they are not open source but mainly because of the snap daemon constantly running on the background. Even after you close all your snaps the snap-daemon continues running on the background consuming a significant amount of your resources. It feels kinda invasive and I like my system light so snaps are not an option.
    I personally like Flatpaks since those have always worked fine for me. AppImages are usually not my favorite solution but they are reliable.

  • Appimages are great for example for games. Games often are created and not maintined later, so getting package that works with all of the original dependencies is good I guess.

  • Now that I've upgraded to Slackware 15 I can finally use FlatPaks and the complaints were right. They have an abnormally slow startup time. For most programs that's still perfectly fine, because I'll be using them for possibly hours, but I'm definitely going to build my own copy of mpv because I just need it to start up fast. Also, I love those framed photos of old consoles behind you. At the time when it was popular, the Game Gear really was the best handheld.

  • I think that If nix packages will ever get easy management tool (basically using nix packages like apt or dnf, with automanagement (If I am not wrong nix stores old versions of apps for their rollback feature by default), then it could also be easy alternative option.
    Besides nix packagemanager there is also distrobox as alternative way to get pckages independent of host distro.

Comments are closed.