Snaps vs, apt

working mainly mainly with “embedded” system where it’s all about trimming down.
whats the deal with snaps, call me an old fart and all that but i simply haven’t had the time to get acquainted with them yet.
But i see ubuntu switching toward snaps and so on, to a point where ubuntu core doesn’t even use apt anymore.
I can understand the idea behind “mounting” different small file systems, both security wise and so on, but isn’t a gross amount of overhead?, and for something as complex as a realtime system fx. gps, canbus systems etc. is it really that good?
And the hardware i am working with isn’t exactly 32 core threadrippers, but rather as low as 2 core 100 yo atoms, 1-4gb memory, 8-32gb storage etc. And looking from this vantage point i am having a really hard time defending the overhead, versus just having my own private apt repo to deploy some .deb packages, and deal with some package dependencies.
Am i missunderstanding something? please enlighten me.

It is a lot of overhead, yes, particularly in terms of disk space. CPU usage is basically the same as a native package. Memory is a bit higher because snaps include all dependencies so you are likely loading multiple copies of various libraries.

I like the idea behind distribution-independent application packages, but they are all immature at this time. Between snaps, flatpak, and appimage my feeling is flatpak is currently the best, but it has major problems too. For example, it can’t run services.

Snaps would be my pick for best but the disk space overhead is just ridiculous. Talking hundreds of megabytes higher than flatpack or appimage.

1 Like

problem is we use ubuntu core (pre removal of apt luckily), to run the systems, and i just barely persuaded my boss to use apt rather then some rediculessly constructed installation method where you download scripts, and they run self produced programs, and i cannot figure out heads or tails when some dumb arse decided to dump 5 different installations into a single script.
And with apt it is just rediculessly easy to port the software, if they need a library i just add it to the control file, if they need some setup i add it as a post script etc etc.
I litterally managed to port our whole gps system with a mqtt implementation, and all the needed external libraries today in a hour.
but this is only because i know ubuntu’s got my back with their repos, but they really are moving quite hard towards snaps.

The other day I downloaded a colorpicker (gcolor3) via flatpack. First time using it.

It was 299 megabytes.

Yeah, and I assure you, silly as 299MB is, a snap would have been much larger.

I completely believe you.
But now I really have to see this for myself.

How hard is snap crafting?
with apt it is litterally “copy” the file system location and add some dependencies, maybe a script or two e.g. pre post.
from what i understand it is like create a package containing ALL files needed on the “virtual” filesystem.
Which i get enough of on yocto, where something as stupid as installing mumble can take days.

Pretty much, and the snapcraft program takes care of building it for you. You just fill out the YAML files. It isn’t a huge deal.

Slightly off topic. But it’s for the forums.

Someone should make a written tutorial for us l1 users.

So do the dependencies have scope to a certain directory?

Dependencies are included in the snap package, the idea is they’re completely portable and can run on any OS with the snap framework installed. You just list them in the YAML file and snapcraft takes care of bundling them in there.

Re tutorials, this stuff is all extensively documented and tutorialized already. That surfaces from a google search.