You make it sound like Debian is obviously superior to Alpine. Alpine Linux is just fine for server tasks. It is nice that is it lightweight, but that isn’t the only thing it has going for it.
Comment on [deleted]
ekky@sopuli.xyz 1 day agoHuh? I don’t think you need anything near as memory efficient as Alpine for something which has 4GB of RAM, unless you’re doing it for the sole purpose of pushing the machine and yourself to the limit.
I only ever consider dropping Debian and/or Systemd when going below 512MB RAM. I’ve run most of my public-facing homelab stuff on a 1GB VPS till recently, including multiple webservers such as FoundryVTT, and Docker containers such as a Wireguard server, Jenkins, Searxng, etc… It rarely used more than ~60% of the RAM, but I obviously couldn’t run Immich or any heavy services on it.
486@lemmy.world 1 day ago
Badabinski@kbin.earth 1 day ago
Debian is superior for server tasks. musl is designed to optimize for smaller binaries on disk. Memory is a secondary goal, and cpu time is a non-goal. musl isn't meant to be fast, it's meant to be small and easily embedded. Those are great things if you need to run in a network/disk constrained environment, but for a server? Why waste CPU cycles using a libc that is, by design, less time efficient?
486@lemmy.world 16 hours ago
Debian is superior for server tasks. musl is designed to optimize for smaller binaries on disk. Memory is a secondary goal, and cpu time is a non-goal. musl isn’t meant to be fast, it’s meant to be small and easily embedded.
I’ve used Alpine on servers a lot and didn’t notice any performance difference when compared to glibc in the vast majority of cases. This performance comparison even suggests that musl is quite a bit faster in some cases and in most instances at least as fast as glibc, which matches my experience.
ekky@sopuli.xyz 1 day ago
I’m not entirely sure how “… don’t need anything near as memory efficient as Alpine” became “Debian is obviously superior to Alpine”.
… I was referencing systemd and familiarity of use in regard to OP. Debian just happened to be mentioned, it comes per default with systemd, and it’s my personal first choice for servers. Though, taking context into account, OP did say they originally came from Ubuntu and made it sound like they were trying to optimize their system since it “only” had 4(8)GB memory in total.
I do believe Debian with systemd is more similar to Ubuntu than Alpine is to Ubuntu. My point was not so much about Debian vs Alpine in general as it was specific to efficiency in regard to memory usage, with the sole reason to change to Alpine over Debian (or any OS which uses systemd, really) purely for memory savings being rather weak when systemd only uses some <50MB in memory, the computer has 4GB+ of it, and the user already is familiar with Debian-based flavors which use systemd.
So no, Debian is obviously not “obviously superior to Alpine”, just as systemd isn’t too heavy to run on computers with 4GB of RAM - unless you’re trying to push the computer to its limits.
486@lemmy.world 16 hours ago
Okay, thanks for the explanation!
non_burglar@lemmy.world 1 day ago
Alpine is a fair amount lighter in memory consumption than Debian.
Badabinski@kbin.earth 1 day ago
Is it? I thought the thing that musl optimized for was disk usage, not memory usage or CPU time. It's been my experience that alpine containers are worse than their glibc counterparts because glibc is damn good. It's definitely faster in many cases. I think this is fixed now, but I remember when musl made the python interpreter run like 50-100x slower.
non_burglar@lemmy.world 1 day ago
Glibc matters on desktop, but the speed advantage doesn’t really matter to services running in cgroup2 containers borrowing the host’s kernel and namespaces.
For op’s purposes, memory density is important, and alpine base images will need about 10x less memory than their Debian counterparts, mostly due to a very pared-down service layout.
There’s a reason a huge portion of docker images are alpine-based.
Badabinski@kbin.earth 1 day ago
Do you have any sources for the 10x memory thing? I've seen people who have made memory usage claims, but I haven't seen benchmarks demonstrating this.