News for hackers. Stuff that matters.
Re:Default musl allocator considered harmful to performance by flarecoder on Monday September 08, 2025 @04:40AM (#45165959)
For docker images, cgr.dev/chainguard/wolfi-base (https://images.chainguard.dev/directory/image/wolfi-base/ver...) is a great replacement for Alpine. Wolfi is glibc based. It's easy to switch from Alpine since Wolfi uses apk for package management with similar package names and also contains busybox like Alpine.
Re:Default musl allocator considered harmful to performance by dijit on Monday September 08, 2025 @06:13AM (#45166498)
I’d much rather go with distroless, if its a choice.

But I think you can tweak musl to perform well, and musl is closer to the spec than glibc so I would rather use it; even if its slower in the default case for multithreaded programmes.

Re:Default musl allocator considered harmful to performance by masklinn on Tuesday September 09, 2025 @03:56AM (#45178885)
> But I think you can tweak musl to perform well

You can not, its allocator does thread safety via a big lock and that’s that.

> musl is closer to the spec than glibc

Is it?

> even if its slower in the default case for multithreaded programmes.

That’s far from the only situation where it’s slower though.

Re:Default musl allocator considered harmful to performance by dijit on Tuesday September 09, 2025 @04:18AM (#45179066)
Yeah, the musl people tend to closely follow the spec, this doesn’t always win them friends: https://news.ycombinator.com/item?id=22682510

Swapping out jemalloc for the system allocator will net you huge performance wins if you link against musl, but you’ll still have issues with multithreading performance due to the slower implementations of necessary helpers.

Re:Default musl allocator considered harmful to performance by adgjlsfhk1 on Monday September 15, 2025 @12:23AM (#45246101)
Sometimes the spec sucks. A lot of the UNIX specs were written before anyone knew how to program multi-threaded systems, and thus are impossible to implement correctly (setenv is probably the most famous example)