Files
supervisor/rootfs/etc
a0a40c6c7f Replace preloaded jemalloc with PYTHONMALLOC=mimalloc (#7056)
Switch the Supervisor container from preloading jemalloc process-wide to
selecting mimalloc as CPython's object allocator via PYTHONMALLOC, matching
the same change in Home Assistant Core (home-assistant/core#175604).

mimalloc is bundled in CPython 3.13+, so no LD_PRELOAD and no external
allocator library are needed. Benchmarks on the Core image (same Python
3.14/musl base) showed jemalloc has no measurable CPU advantage over the
default allocator while retaining substantially more memory, and
PYTHONMALLOC=mimalloc gave the best combined result (~27% lower peak RSS
than jemalloc at CPU parity). jemalloc also bakes the page size in at
build time and aborts on aarch64 kernels with 16K/64K pages, whereas
mimalloc queries the page size at runtime.

PYTHONMALLOC is only defaulted, not forced, so users can still override
the allocator, e.g. PYTHONMALLOC=pymalloc for CPython's default.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-18 18:50:14 +02:00
..
2020-11-03 09:54:31 +01:00