-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Compare jemalloc performance #6897
Comments
|
By the way, to check peak memory usage on Linux: (assuming
and then when it finishes:
You can do this with |
Numbers for core-map benchmark on windows 8: https://gist.github.com/cmr/fdec972a739b893671d0 Additionally on linux, max memory usages:
However, I'm not sure these numbers mean anything. Watching htop as they run shows periodic spikes where res doesn't go above 100M and then a huge spike up to the max. jemalloc definitely has the lowest overall RES over time, about half that of glibc. tcmalloc hits the max and it looks like it never frees anything. @pcwalton Recalling a discussion from IRC, @thestinger did some benchs of jemalloc vs tcmalloc and found the performance was near identical. jemalloc was chosen for better runtime reporting and such. |
Using the benchmark from https://www.citi.umich.edu/u/cel/linux-scalability/reports/malloc.html, I get the following: glibc
jemalloc
tcmalloc
When bumping it up to 8 threads, jemalloc performs a bit worse than tcmalloc: jemalloc
tcmalloc
But, for much smaller allocations, jemalloc way outperforms tcmalloc: jemalloc
tcmalloc
This is only a cursory overview of runtime performance, but it seems like jemalloc is the better choice overall. |
Building rustc like
jemalloc is tuned via |
@cmr: is that VIRT or RES? |
@thestinger as measured with cgroups, memory.max_usage_in_bytes |
Oh, so that's the true physical memory usage then. |
On linux, bench/msgsend-pipes with the before:
after:
The mean time changed from 13.1s to 7.7s |
This landed as 5d2cadb. |
#6895 converts Rust to jemalloc. This is a big change and we should really capture some performance numbers to have an idea of the effect this has.
I am thinking just a few workloads:
For each collect the running time and max memory used, both before and after jemalloc, on linux, mac and win.
The text was updated successfully, but these errors were encountered: