Conversation
jemalloc is currently compiled in as the global allocator only for x86_64-unknown-linux-gnu. On arm64 the proxy silently falls back to glibc malloc, which sizes its per-CPU arena budget from the host core count rather than the cgroup limit and in practice does not return freed memory to the OS. Proxy RSS on arm64 therefore ratchets up to peak load and stays there until the pod restarts. Measured against the release/v2.311.0 tag (shipped with edge-25.8.1), patched as in this commit and built natively on arm64, on a Graviton cluster with ~300 pooled HTTP/2 connections per pod: closing all connections released no RSS at all with glibc, and 211MB -> ~20MB (-91%) with jemalloc. Same proxy version, cluster and traffic in both arms; the allocator was the only variable. This was on jemalloc's stock settings -- tikv-jemalloc-sys builds with --with-jemalloc-prefix=_rjem_, so the allocator reads _RJEM_MALLOC_CONF and ignores unprefixed MALLOC_CONF. The x86_64-only gate dates to linkerd#1321, which restricted it to the only platform the then-current jemallocator readme listed as fully tested. tikv-jemallocator supports aarch64-unknown-linux-gnu, and deny.toml already audits that target, so widen the gate to cover it. Cargo.lock is unchanged. Verified on main for x86_64: builds, tests pass, and the binary still links jemalloc as its active allocator. An aarch64 cross-build in CI conditions is not verified here. Signed-off-by: ergdevops <115262164+ergdevops@users.noreply.github.com>
ergdevops
force-pushed
the
jemalloc-aarch64
branch
from
August 24, 2026 17:35
84c840a to
cb19d80
Compare
ergdevops
force-pushed
the
jemalloc-aarch64
branch
from
September 3, 2026 08:46
3f26ddb to
cb19d80
Compare
Author
|
hi @cratelyn applogies for the tag but i see you are assigned this issue: linkerd/linkerd2#15613 |
Contributor
|
hi, @ergdevops. per linkerd/linkerd2#15624, i am no longer an active maintainer. i should be unassigned from that issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
jemalloc is currently compiled in as the global allocator only for x86_64-unknown-linux-gnu. On arm64 the proxy silently falls back to glibc malloc, which sizes its per-CPU arena budget from the host core count rather than the cgroup limit and in practice does not return freed memory to the OS. Proxy RSS on arm64 therefore ratchets up with peak load and stays there until the pod restarts, and any MALLOC_CONF tuning users apply is a silent no-op.
Measured on an arm64 cluster with ~300 pooled HTTP/2 connections per pod: closing all connections released no RSS at all with glibc, and 211MB -> ~20MB (-91%) with jemalloc, same proxy version and traffic.
The x86_64-only gate dates to #1321, which restricted it to the only platform the then-current jemallocator readme listed as fully tested. tikv-jemallocator 0.6 supports aarch64-unknown-linux-gnu, so widen the gate to cover it. Cargo.lock is unchanged.