ezrosent / allocators-rs

Allocators in Rust
Apache License 2.0
311 stars 28 forks source link

Reproducing performance benchmarks in elfmalloc-performance.md #193

Closed mjansson closed 5 years ago

mjansson commented 5 years ago

I'm the author of rpmalloc and I was looking at the elfmalloc-performance.md document. However, it doesn't go into details on how you measure the peak memory usage. I would like to reproduce some of your results to see why rpmalloc shows those excessive memory usage numbers seen in your graphs.

Could you expand the doc a bit with more details on how the memory usage is measured?

ezrosent commented 5 years ago

My recollection is that some benchmark scripts used ps to get the RSS for a particular process (e.g. https://github.com/cksystemsgroup/scalloc-artifact/blob/master/run/shbench-single.sh#L32)

But others did not (and for whatever reason, it was difficult to adapt them to that purpose). For the latter, I simply eye-balled peak heap size based on task manager, taking an average over the runs that I observed.

Needless to say, if you have trouble reproducing these numbers for rpmalloc I'm happy to remove them, or replace the graph with better numbers. It is quite possible that these memory blowups were due to some aspect of Windows Subsystem for Linux memory management at the time, or some other peculiarity of my setup.

mjansson commented 5 years ago

I'll do some tests on my own and see what numbers that gives me, no need to replace your graphs as I was mostly interested in tracking the root cause of the memory bloat if rpmalloc did blow up like the graphs indicated.