Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Goodbye jemalloc #38820

Closed
wants to merge 2 commits into from
Closed

Conversation

japaric
Copy link
Member

@japaric japaric commented Jan 4, 2017

Out of free version (for testing purposes): https://github.com/japaric/alloc-jemalloc

Minimally tested on x86_64 Linux. Still haven't fixed/updated the in-tree tests

cc @alexcrichton @brson

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @eddyb (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@@ -44,7 +44,7 @@ pub fn opts() -> TargetOptions {
dll_suffix: ".dylib".to_string(),
archive_format: "bsd".to_string(),
pre_link_args: Vec::new(),
exe_allocation_crate: super::maybe_jemalloc(),
exe_allocation_crate: "alloc_system".to_owned(),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I wonder if we can remove this now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(the exe_allocation_crate field and logic related to it)

@eddyb
Copy link
Member

eddyb commented Jan 4, 2017

r? @alexcrichton

cc @Mark-Simulacrum @nikomatsakis @nnethercote on rustc perf

@rust-highfive rust-highfive assigned alexcrichton and unassigned eddyb Jan 4, 2017
@steveklabnik
Copy link
Member

I had asked @alexcrichton and @brson about this the other day; they said we couldn't do this before we made the interface stable. Maybe this will change their minds?

@sfackler
Copy link
Member

sfackler commented Jan 4, 2017

The interface stabilization issue is still there: https://github.com/japaric/alloc-jemalloc/blob/master/src/lib.rs#L13

@alexcrichton
Copy link
Member

Thanks for the PR @japaric! I definitely sympathize with how much of a maintenance burden jemalloc is at this time.

Unfortunately though I don't think we're in a position to accept this PR at this time. As you've found out it's technically quite easy to remove jemalloc, but as a stable feature of Rust today this would be a breaking change with an unacceptable path forward I think.

We've had jemalloc as the default allocator since 1.0, and it objectively performs better than any other allocator in a variety of workloads. Programs may or may not be relying on this performance. I know that the compiler, at least, has historically performed better under jemalloc than the system allocator.

If we were to remove jemalloc from in tree then there is no transition path for stable users using jemalloc. They'd all be forced to switch to nightly to regain perf losses, which would be an unacceptable transition in my opinion.

Dealing with jemalloc is a very high priority amongst the libs team. It's slated to be the next point of discussion after we've sorted through the stories of scenarios and SIMD.

@arthurprs
Copy link
Contributor

If we were to remove jemalloc from in tree then there is no transition path for stable users using jemalloc. They'd all be forced to switch to nightly to regain perf losses, which would be an unacceptable transition in my opinion.

👍

@japaric
Copy link
Member Author

japaric commented Jan 4, 2017

@alexcrichton Fair enough. Closing until the libs team gets to talk about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants