Musl libc is a more preferable option if security and speed are important to you, compared to glibc, but is this currently the case? Do most applications still not work on musl? And how effective is gcompat?

  • apt_install_coffee@lemmy.ml
    link
    fedilink
    arrow-up
    10
    ·
    1 day ago

    Saying musl is preferable if speed is important is a bit…loaded. It’s not always untrue, but it often is.

    As a libc, musl has a much smaller footprint than glibc, so a computer which is short on memory capacity, memory bandwidth, or cache size could absolutely see a performance benefit. The flipside to this is that a lot of the ‘bloat’ in glibc are performance tricks including lots of architecture specific code.

    As others have mentioned, the malloc implementation is less than ideal and can slow down highly threaded & memory intensive applications.

    I work on a musl-based embedded distribution for my day-job, and also quite like using it personally for arm boards and my old ThinkPad. I wouldn’t really use it for my workstation though.

    As far as applications working with musl, it’s not uncommon to see glibc-specific code which would need to be patched out of some applications (systemd comes to mind).

    • MonkderVierte@lemmy.zip
      link
      fedilink
      arrow-up
      1
      ·
      17 hours ago

      Personally, i prefer a smaller general codebase with equal speed vs. a bigger one with specific hacks and workarounds.

      But honestly, at this level maybe for critical things like a high-security server (Alpine).