Skip to content

add mimalloc#212

Open
Shourya742 wants to merge 2 commits intostratum-mining:mainfrom
Shourya742:2026-01-24-add-mimalloc
Open

add mimalloc#212
Shourya742 wants to merge 2 commits intostratum-mining:mainfrom
Shourya742:2026-01-24-add-mimalloc

Conversation

@Shourya742
Copy link
Collaborator

This PR switches the binaries to use mimalloc instead of the default glibc allocator, which can exhibit higher fragmentation and contention under our workload.

@Shourya742 Shourya742 force-pushed the 2026-01-24-add-mimalloc branch from 300f7ff to 485b030 Compare January 24, 2026 08:01
@GitGab19
Copy link
Member

GitGab19 commented Feb 3, 2026

Why do we need this change?

Do we have some data which demonstrates how this change is improving performances of our apps?

@Shourya742
Copy link
Collaborator Author

Shourya742 commented Feb 3, 2026

Why do we need this change?

Do we have some data which demonstrates how this change is improving performances of our apps?

Yes, it’s a memory allocator that’s better suited to our use case: long-running processes with frequent allocations, high concurrency, and a need for consistent latency. The default global allocator isn’t ideal here, as it tends to increase fragmentation and introduce global locking during allocations. I will run benchmarks and share the results here.

@Shourya742 Shourya742 force-pushed the 2026-01-24-add-mimalloc branch from e2cd179 to fb6d404 Compare February 17, 2026 12:32
@Shourya742
Copy link
Collaborator Author

Global Allocator:
Screenshot from 2026-02-17 19-23-20

mimalloc:
Screenshot from 2026-02-17 18-46-18

Mimalloc does make us faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants