Skip to content

Re-consinder MiMalloc as the default allocator #7393

Description

@LesnyRumcajs

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

  • run and present benchmarks in a table
  • if mimalloc proves to be consistently faster in our tested use-cases, make the switch.

Additional Links & Resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: TaskDiscrete task to implement

    Type

    No type

    Projects

    Status
    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions