Can zstd replace SquashFs for Snap

I see ZStd fastest compress and decompress library and it faster then SquashFs
Maybe it fix the startup issue on Snap

There’s a lengthy thread on this topic.

In short, changing the compression algorithm used may help some snaps in some situations. It’s not a magic bullet that makes all snaps faster, however. We’re looking at it though.

2 Likes

I wonder if the store could do some compression testing on uploaded snaps as part of the validation and chooses the best compression ratio and speed combination automatically? i.e. any particular random snap might be compressed differently to others on your system if the store determines it can get a better compression or speed by changing the mechanism of compression…

4 Likes

Note also that squashfs is not a compression algorithm, but rather a file system format. It can make use of a number of compression algorithms.

So the comparison would be “squashfs with xz compression” vs. “squashfs with zstd compression”.

4 Likes

Seems to be supported since version 4.4, just if anyone is wondering :slight_smile:.

there are still a lot of open questions like “is it supported in all the distro kernels that snapd can be installed on”, can xdelta3 work with it to generate the downloadable deltas, is it supported on all architectures you can install snapd on and is it mostly bug-free in all these situations …

3 Likes