Git Product home page Git Product logo

Comments (5)

tim-janik avatar tim-janik commented on June 4, 2024

Hello @tim-janik, this is very interesting work.
Is there a proof-of-concept AppImage for download?

I'm mainly working on this for Anklang, and that still needs some work before I can put up release candidates.
But appimage-runtime-zstd works exactly like the AppImage runtime, so just concatenating any AppImage squashfs image will get you a PoC.

I'd be especially interested in how it works on FUSE3-only systems, where our current AppImage runtime seemingly refuses to run.

Yeah, that's because the current AppImage runtime has a dynamic library dependency on libfuse.
I just tried appimage-runtime-zstd inside a docker image of the latest Fedora:

docker run --rm -ti --device /dev/fuse --privileged -v /.../anklang/out/:/out fedora:35
# dnf install some-ui-libs...
# /out/anklang-0.0.1-alpha0-x64.AppImage --no-sandbox --help
Usage: anklang [OPTIONS] [--] [ProjectFiles...]
# find / -iname libfuse\*
#

The fedora:35 docker image has no libfuse version installed whatsoever.
So the statically linked libfuse in appimage-runtime-zstd simply uses the ioctl kernel interfaces.

Are you aware of https://github.com/mensinda/libRuntime? It seems to go into a similar direction.

Not yet, I'll take a look if that adds any significant improvements to the original AppImage runtime.

BTW, the reason there is a appimage-runtime-zstd in the first place is that I've run benchmarks with all the compression formats supported by mksquashfs. The bottom line is, unless you are happy with compression ratios much worse than gzip, there is no point in going for anything other than zstd. At any useful compression ratio (and zstd compresses better than gzip), zstd usually beats the other supported compression libraries in terms of speed, particularly for decompression which determines the AppImage execution performance.

from appimage-runtime.

probonopd avatar probonopd commented on June 4, 2024

Do you think the zstd runtime should become the default in AppImageKit? Do you see any significant downsides?

from appimage-runtime.

tim-janik avatar tim-janik commented on June 4, 2024

Do you think the zstd runtime should become the default in AppImageKit? Do you see any significant downsides?

I'd definitely make zstd the default, but:

  1. libzstd is significantly larger than libz. So for small squashfs AppImages, where size matters more than speed, using a different compression scheme can make sense. For reference, here are the sizes on my Ubuntu-20.04:
-rw-r--r-- 1 root root 107K Okt 15  2020 /lib/x86_64-linux-gnu/libz.so.1.2.11
-rw-r--r-- 1 root root 671K Mär  3  2021 /usr/lib/x86_64-linux-gnu/libzstd.so.1.4.4
  1. I haven't attempted to build libzstd on really old distributions like CentOS-6, I'm currently simply building on Ubuntu-20.04. On 2021-06-09 @TheAssassin and I had a brief discussion in #AppImage about this:

(22:55:10) TheAssassin: have you tried 18.04 tho?
(22:58:45) timj: i think 18.04 would be doable with a few more days, at least for the runtime. i think it was squashfs-dev or fuse-dev that was missing of the shelf compared to 20.04. so that'd involve building those libs yourself... Once you go down that route, it also makes sense to build zstd from scratch and disable as much mksquashfs+compression code as possible that way, so the runtime can be shrunk down to only include decompression code.

from appimage-runtime.

mgord9518 avatar mgord9518 commented on June 4, 2024

@tim-janik I agree, I did some tests recently and zstd is a much better default than gzip for any compatible system, effectively being able to replace both gzip and xz with much faster performance (albeit slightly bigger binaries than xz)

For small AppImages, maybe LZ4 should be used as default (automatic detection and switch at a certain threshold unless the user says otherwise)? I would still get near 50% compression in my tests, and the launch penalty was practically zero because of LZ4's low CPU cost. It's also an incredibly small library so it wouldn't bloat the runtime

from appimage-runtime.

tim-janik avatar tim-janik commented on June 4, 2024

Is there a proof-of-concept AppImage for download?

BTW, there is a pre-release of Anklang out now, that uses appimage-runtime-zstd:
https://github.com/tim-janik/anklang/releases/tag/v0.0.1-alpha1

from appimage-runtime.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.