Summary
Back in the ancient days we considered different allocators #2523
jemalloc eventually won thanks to slightly smaller peak RSS during a snapshot import to ParityDb (which we don't really do anymore that much thanks to CarDB). Now, the benchmarks presented at this talk at EuroRust 2024 suggest that mimalloc should theoretically outperform jemalloc. Practically this need to be measured on our use case to make an informed decision.
To make the switch we need a compelling reason from some numbers. Things to compare:
- compilation time - @hanabi1224 reported
mimalloc compilation is/was faster than jemalloc's. To be measured.
- performance tests (time and peak RSS) - we have some existing benchmarks we could use to compare the performance, perhaps some parallel state computation, calling A LOT of RPC methods. We don't really have a strict suite here so use your best judgement.
Note that eventual switch to mimalloc as default doesn't mean we should get rid of jemalloc completely - the latter has excellent profiling features.
Completion Criteria
Additional Links & Resources
Summary
Back in the ancient days we considered different allocators #2523
jemalloceventually won thanks to slightly smaller peak RSS during a snapshot import to ParityDb (which we don't really do anymore that much thanks to CarDB). Now, the benchmarks presented at this talk at EuroRust 2024 suggest thatmimallocshould theoretically outperformjemalloc. Practically this need to be measured on our use case to make an informed decision.To make the switch we need a compelling reason from some numbers. Things to compare:
mimalloccompilation is/was faster thanjemalloc's. To be measured.Note that eventual switch to
mimallocas default doesn't mean we should get rid ofjemalloccompletely - the latter has excellent profiling features.Completion Criteria
mimallocproves to be consistently faster in our tested use-cases, make the switch.Additional Links & Resources