this post was submitted on 20 Sep 2026
17 points (94.7% liked)

Rust

8322 readers
21 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 3 years ago
MODERATORS
 

While load testing one of our Rust services at work, we ran into something that took us way longer to figure out than we'd like to admit: memory that shoots up under load and just stays there.

Though glibc is the default allocator and works well for the majority of applications, it can retain significant allocator-owned memory for bursty workloads due to arena reuse, fragmentation, and cached free chunks.

Allocator switch, and this article was mentioned in Lemmy Release v0.19.20 - Reduced Memory Usage

This release significantly reduces memory usage for the Lemmy backend. Metrics on production instances show a reduction up to 10 times. Here you can see the statistics from a few different instances. Read on for a technical explanation below. Note that the change only affects x86, there is no difference on ARM (e.g. Raspberry Pi), see here for details.

top 2 comments
sorted by: hot top controversial new old

I've never thought about what swapping out allocators would do in an async environment like that. Very readable and interesting!

[–] Fizz@lemmy.nz 5 points 3 weeks ago

Great write up. thanks for posting it was an interesting read.