Using Alpine and musl instead of GNU libc affect performance?

Background

Like many others we’re currently using Alpine images for our deployments. Specifically at the moment we rely on:
hexpm/elixir:1.15.4-erlang-26.0.2-alpine-3.17.4.

When looking around for a current unrelated issue i stumbled upon this issue Overrun stack and heap OTP-26.0 · Issue #7292 · erlang/otp · GitHub

which had this comment

This made me curious, and I didn’t want to pollute the issue with unrelated comments so I thought I would ask my question here instead.
Looking around in the forum and other places I can’t find any information stating that performance would be different depending on if your system is using GNU libc or musl and since Alpine images are very popular and by default rely on musl I felt it warranted a post.

Question

Is there any performance difference if I use a images such as Alpine that rely on musl rather than for example a Ubuntu image with libc for production deployments? and is any such difference jit related?

Thank you in advance.

Yes, there’s a significant loss in performance with musl. I made a PR for OTP 27 that will remove these differences, the comment describes things in a bit more detail:

7 Likes

Thanks for the insight!