-
Notifications
You must be signed in to change notification settings - Fork 923
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
Memory usage regression compared to Windows heap allocator #1042
Comments
Ah, that is not great -- I'll look into it. However, in the past months there has been a lot of development on mimalloc v3 (the Would it easy for you to try |
It does appear that v3 fixes the memory regression. I did also do a quick performance check of v2.2.2 (Before) and v3 (After) is slower. Is there a change regrading committed memory that's reducing performance? I see that's significantly reduced.
|
Ha, that is good to see! In some of our services v3 reduces memory usage by a lot, but on many small benchmarks the difference is usually less pronounced. On my benchmarks v3 is about as fast as v2 -- maybe we can tune it better to eeck out that last 1.23% ; can you try with |
If you want to do a local build you'd need my mimalloc branch of rustc. You need to enable mimalloc with a
The last commit in the branch points to a local checkout of https://github.com/purpleprotocol/mimalloc_rust. That contains a mimalloc submodule which will be used. You can then build the compiler with To benchmark the compiler I'm using https://github.com/Zoxc/rcb, see the readme on how to set it up. The run above is Note that mimalloc is only used for Rust allocations, not for C allocations. In non-check builds LLVM does a few of those. |
v3 with (After) and without (Before) MIMALLOC_PURGE_DELAY=-1:
|
Testing out mimalloc (v2.2.2) in the Rust compiler shows some large regressions in physical memory use in some scenarios.
I don't observe these regressions in my Rust port and I suspect it is because I walk the entire list of abandoned segments instead of exiting early. I wonder if a flag to do the same in mimalloc could be added.
The text was updated successfully, but these errors were encountered: