Live data from Hacker News

Alpine Linux: Brilliant Linux Distro

wiki.alpinelinux.org

71–80 of 98 posts

Re: Alpine Linux: Brilliant Linux Distro

#71

Earlier quoted context omitted.

I've tried alpine's gcc before and it was about 50% slower to compile a bunch of packages. That said, if you compile llvm with MinSize/-Os on glibc distro's it runs 50% slower too, so it's unclear if slowdown is due to musl libc or rather that they optimize for size instead of performance.

Compiling is CPU-bound and doesn't really bottleneck on anything that libc is involved with other than the allocator, so unless musl's allocator is comically slower than glib's, chances are it's just -Os.

I believe musl’s allocator is known for being pretty poor.

Re: Alpine Linux: Brilliant Linux Distro

#72
I'm typing this from an Alpine laptop. It still has a ways to go in terms of being as user-friendly as Slackware, but it's getting there. Some trouble at the moment is figuring out all the packages you need to install (and how to configure them) to get an actual working desktop as you'd expect it. There are also bugs in things like Bluetooth support and some other things. But overall it's quite usable, and very fast. You end up using Flatpak for any proprietary apps once dealing with glibc compatibility problems becomes too annoying. Some apps on Flatpak don't really work, like Slack (maybe it's possible to get it to work, but after a few days I gave up). Electron apps in general are a huge pain. I've gotten 1Password to work in Docker after over a week of futzing around. You really learn how much of a nightmare the Linux desktop today is. You also learn how much of the desktop (and non-desktop) apps actually require systemd to run at all, and how people have had to come up with fake systemd components. You definitely learn a lot about Linux!

Re: Alpine Linux: Brilliant Linux Distro

#73

I really want to like Alpine, but we (Fly.io) have seen so many DNS issues with customer images that we’re now recommending Ubuntu or Debian slim. The extra ~50mb is a worthwhile trade off to avoid hard to debug musl-libc issues. eg https://www.linkedin.com/pulse/musl-libc-alpines-greatest-we...

What about busybox? It still has a glibc version doesnt it?

Re: Alpine Linux: Brilliant Linux Distro

#74

I really want to like Alpine, but we (Fly.io) have seen so many DNS issues with customer images that we’re now recommending Ubuntu or Debian slim. The extra ~50mb is a worthwhile trade off to avoid hard to debug musl-libc issues. eg https://www.linkedin.com/pulse/musl-libc-alpines-greatest-we...

Yep. I had an (immutable) JVM ECS service that worked fine for a year, then started failing DNS in just one of several AWS AZs and for just one of various host names--one with something like 24 A records, a few but not an outrageous number. Occasionally forking a process to run 'dig' on the same name made it work for a little while.

AWS support's only advice was "don't use Alpine"; annoyingly, switching the containers to a Debian base cured it, even though this would appear to make absolutely no sense with respect to it failing in just one AZ.

Re: Alpine Linux: Brilliant Linux Distro

#75
post #39

> Keep in mind that today due to the great popularity of Docker, Alpine Linux is one of the most deployed operating systems currently in use, because within every other operating system that uses docker, the docker image it uses is almost always Alpine Linux. Isn't this a little overstated? I'm willing to accept it has a majority, especially once you get into custom images, but e.g. docker's library images are usuall…

Docker images used to be entirely Debian-based but have slowly become almost entirely Alpine based. A lot of Debian users have become Alpine users, and I've been mulling over if I should join as well (since I've used Debian for 20+ years but are friends with Alpine devs and users).

It was popular, but it has always been someone’s choice to start from someone else’s flat base.

Re: Alpine Linux: Brilliant Linux Distro

#76

Doesn't Alpine have a noticeable performance penalty due to being based on musl libc instead of glibc? This seems to be born out in multiple people's micro benchmarks though how much of an issue it is for larger applications probably depends on the workload. https://superuser.com/questions/1219609/why-is-the-alpine-do... https://nickjanetakis.com/blog/benchmarking-debian-vs-alpine...

I went from an Ubuntu to an Alpine desktop and it was like bolting on a turbo. You know that rush when the turbo spools up and then it just plants you in your seat and you rocket away? Like this wasn't just "I think it's faster", I was like laughing and shouting it was so much faster. It doesn't seem quite as fast now; I feel like I must have added on enough extra software and crap now that it's close to where it was before. But the feeling when bringing up the desktop for the first time was visceral.

Re: Alpine Linux: Brilliant Linux Distro

#77

I really want to like Alpine, but we (Fly.io) have seen so many DNS issues with customer images that we’re now recommending Ubuntu or Debian slim. The extra ~50mb is a worthwhile trade off to avoid hard to debug musl-libc issues. eg https://www.linkedin.com/pulse/musl-libc-alpines-greatest-we...

Interesting!

Thank you for sharing. Did you notice that some language are more affected than others?

For example Go vs. Node.js?

Re: Alpine Linux: Brilliant Linux Distro

#78
post #51
post #5

WARNING: Blatant self promotion follows :) I've recently switched to using Alpine on my laptop, and have written a bit about setting it up using ansible here: https://www.brianlane.com/post/alpine-laptop/ And when you can't find the apps you need in the distribution there's always podman: https://www.brianlane.com/post/prusa-slicer/

Instead of using podman directly, and potentially messing with X11 permissions, you could use x11docker (despite the name, it podman support). It attempts to safely share X11 into a container.

Tried using x11docker in Alpine, didn't work for the Electron apps I tried with it. Tried for several days; finally got the app running in Docker without x11docker.

Re: Alpine Linux: Brilliant Linux Distro

#80
post #33

Question, we're a long time Windows shop and just recently have been spinning up some linux containers (redis, rabbitmq). The decision fell to me and I went with Ubuntu. (I'm confident in our networking team that everything is firewalled well and not externally accessible so these are local LAN only.) Should I instead be using Alpine? If someone is isn't distro aficionado and is utilizing "mainstream" docker images,…

> just recently have been spinning up some linux containers (redis, rabbitmq)

Not sure if you're trying to make your own containers or not, but stick to the stock Docker Hub containers as much as possible. If there's an "official" Redis container, use that, regardless of the base image. Since it's supported, other people will be fixing bugs and upgrading things so you don't have to.

> If someone is isn't distro aficionado and is utilizing "mainstream" docker images, what's the recommendation?

For non-container stuff, CentOS is the "enterprisey" distro that's safest in case you one day have to support an app that only supports RHEL (and it's the base for Amazon Linux, in case you use AWS).

For container stuff, it's a toss-up between Ubuntu and Debian; I'd use Ubuntu for developer-oriented stuff, and Debian for anything else. You can of course use Alpine for containers, but there are some maintenance/development costs that come as well, so I only recommend Alpine if you really need to save space.

Post reply on HN