Press J to jump to the feed. Press question mark to learn the rest of the keyboard shortcuts
Found the internet!
Create an account to follow your favorite communities and start taking part in conversations.
r/linuxquestions
r/linuxquestions
12
Posted byu/[deleted]5 months ago
22 comments
level 1

Each snap package is delivered as a compressed SquashFS filesystem that contains all executables, shared libraries, scripts, etc needed by the package. It doesn't get unpacked as a permanent filesystem on disk. Instead, it's mounted as a virtual filesystem, uncompressed as needed. A lot more happens under the hood but that's the main gist of it.
If there are N snap packages, there will be at least N of these virtual mounts. Over time, as the number of snap packages in the system increases, and the burden on the system will become noticeable.
Although snaps can share common libraries (eg. libc, libstdc++) with other snap dependencies, they probably won't be sharing common libraries with the system. This means lots of copies of unshared routines distributed as part of each snap. A system with 16 Gb of RAM, 10th gen (or later) CPU, and M.2 NVMe SSD will probably not be negatively impacted, but ultimately, it will. The reason: because of the constant unpacking of snap virtual mounts and the bloated memory footprint of each package, there will be increasing strain on virtual memory, which means swapping to disk - not the best thing, even for an SSD.
Wait. There's more. Snaps were artificially crafted by Canonical for financial reasons. First, it relieves Canonical of the burden of vetting software on behalf of users. With snaps, the package writer is given that decision. The release coordination to optimize system-wide shared resource usage, package dependencies, etc goes out the window. If a snap package needs a certain version of libc, it simply gets packaged with the snap. With snap release timing left to the package author, snapd can update packages at any time during the day. It's not left to the user to decide this action. Unlike traditional .deb packages where there can be multiple repositories (including non-Ubuntu repos), Ubuntu snaps can only come from the snap store. They can't get updated from anywhere else, because: 1. snapd only looks at the snap store, and 2. snap packages were hard-coded internally to assume the snap store. Somehow it seems that Canonical is trying to emulate the Apple Store, but it's instead coming out with a lemon.
I'm writing this from experience. I have an aging i3 with 16Gb of RAM and a Seagate Barracuda HDD. At first, having Ubuntu with snap packages installed wasn't an issue. Gradually, the impact of snaps made my system run like molasses. I finally got sick of it all, dumped Ubuntu, installed Debian and never looked back. That was 6 months ago. Now the system runs like new. No delays or hangs. Everything runs. Best of all, when I look at system monitor, I see less than 20% memory use, and no swap spillover. The way it should be.

1