Skip to content
Brokk·

🚨Musl's Allocator Issues Cause Performance Woes

Musl's allocator is a footgun for performance

TL;DR

Musl's allocator is suboptimal, leading to performance issues beyond high concurrency scenarios. Bifrost removes musl due to these issues, while mimalloc is added for simplicity, despite being slower than glibc.

Musl's allocator is causing performance issues for projects using the containerized system Bifrost. The allocator, known to be suboptimal in high concurrency scenarios, is now a problem in other contexts too. Bifrost is removing musl as a prebuilt option due to these performance hits. While mimalloc is being added for simplicity, it's 26% slower than glibc. The structural_clone_smells task, which barely allocates, is unaffected by the allocator. However, the scan_usages task sees some benefit from mimalloc. This is a significant issue for developers relying on musl for performance-critical applications.

Musl's Allocator Issues Cause Performance Woes — Brokk

Key Points

1

musl's allocator is suboptimal, causing performance issues in high concurrency and other scenarios.

2

Bifrost removes musl as a prebuilt option due to performance concerns.

3

mimalloc is being added to musl-only for simplicity, despite being 26% slower than glibc.

4

The scan_usages task sees some benefit from mimalloc, but structural_clone_smells is unaffected.

5

Several common memory routines in musl are slow, impacting performance-critical applications.

Why It Matters

Developers using Bifrost and musl for performance-critical applications should be wary of the allocator issues. The 26% performance hit from mimalloc compared to glibc is significant. Smaller projects where performance isn't critical can still use musl-only, but larger applications should consider alternatives.

muslallocatorperformanceBifrostmimalloc

Frequently Asked Questions

Why does this matter?

Developers using Bifrost and musl for performance-critical applications should be wary of the allocator issues. The 26% performance hit from mimalloc compared to glibc is significant. Smaller projects where performance isn't critical can still use musl-only, but larger applications should consider alternatives.

What happened?

Musl's allocator is suboptimal, leading to performance issues beyond high concurrency scenarios. Bifrost removes musl due to these issues, while mimalloc is added for simplicity, despite being slower than glibc.

Comments

Subscribe to join the conversation...

Be the first to comment

Enjoyed this article?

Get it daily. 7am. Free. Reads in 5 minutes.

Join 3,382 builders reading daily.

Also get