Linkerd2: proxy: Measure allocator differences in Rust 1.32

Created on 16 Feb 2019  路  3Comments  路  Source: linkerd/linkerd2

There are reports that rust 1.32 introduced a substantial memory allocation change by adopting jemalloc. We should compare builds of the proxy between 1.31 and 1.32 and measure the impact of the change on our base case, at least.

areproxy good first issue help wanted

Most helpful comment

Rust 1.32 switched to system allocator (glibc on Linux) from jemalloc for produced executables. On recent systems (glibc 2.26+ IIRC) it improves performance and reduces memory usage for most of the typical cases. You can return to jemalloc with this crate: https://crates.io/crates/jemallocator

All 3 comments

AFAICT based on the linked issue above, it looks like the performance issues in 1.32 may be caused not by the use of jemalloc in general, but by a bug in the specific way jemalloc is linked or exposed to Rust. So, if we find that we're affected by these issues, we may want to consider re-assessing jemalloc later if/when the performance issues on 1.32 are resolved.

Rust 1.32 switched to system allocator (glibc on Linux) from jemalloc for produced executables. On recent systems (glibc 2.26+ IIRC) it improves performance and reduces memory usage for most of the typical cases. You can return to jemalloc with this crate: https://crates.io/crates/jemallocator

@hawkw I'm a newbie to linkerd and I'd like to work on this issue. I noticed that the issue was created a long time ago and version 1.46 is now the latest version of Rust. Is this issue still relevant?

Was this page helpful?
0 / 5 - 0 ratings