Skip to main content
READY FEDROOM DIAGNOSTICS // VIOLET TRIAGE HUD TARGET: SYNAPSE OOM | STATE_GROUPS_STATE | JEMALLOC | CONDUIT RUST
SynapseVsConduit
SynapseVsConduit Partner Notice: Outbound /go/ links marked rel="sponsored" may earn a referral fee at zero checkout surcharge (Disclosures).
Error Triage Hub (9)

Missing jemalloc Causing glibc Arena Memory Retention

Without LD_PRELOAD=libjemalloc.so.2, glibc ptmalloc2 fragments Python Synapse heap arenas and holds 40-60% dead RAM permanently.

Heap Bloat: +40-65% RSS retention | Env: LD_PRELOAD libjemalloc

Missing jemalloc Causing glibc Arena Memory Retention
Telemetry verified 2026-11-16 by FedRoom Diagnostics.

Why glibc ptmalloc2 Never Shrinks Synapse RSS After Bursts

Synapse continuously allocates and evicts short-lived JSON event dictionaries and LRU cache slices. Under default Linux glibc malloc, fragmented free chunks sit pinned below the heap top or inside per-thread arenas, leaving resident RSS high long after a room sync storm finishes.

Verifying jemalloc Mapping Inside the Running Process

Execute grep jemalloc /proc/$(pgrep -f synapse.app.homeserver)/maps on the host or inside the container. If the command returns empty output, your Synapse process is running on glibc malloc and leaking usable headroom back to OOM.

Measured Thresholds & Configuration

Allocator ConfigurationPost-Sync Steady RSSHeap Fragmentation
Default glibc malloc2.3 - 3.6 GBHigh (40-65% unreturned)
LD_PRELOAD libjemalloc.so.21.2 - 1.9 GBLow (pages released quickly)
Continuwuity Rust (jemalloc/mimalloc)110 - 240 MBMinimal static binary footprint
Heap Bloat: +40-65% RSS retention | Env: LD_PRELOAD libjemalloc Deploy Vultr HF 4 GBHostinger KVM 1 ($4.99/mo)