Use mimalloc allocator on all platforms for node and farmer #2105
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I noticed that without jemalloc farmer is using ridiculous amounts of memory on Linux. It looks like it leaks memory, but this is just system allocator behaving badly, when application stops it goes release the expected memory just fine.
I thought about switching to jemalloc again, but the crate is not working on Windows and https://github.com/microsoft/mimalloc while working there should also be one of the highest performing allocators out there. Let's use it on both node and farmer.
I was running farmer over night with milalloc and it plotted ~100 sectors with current memory usage of ~2G (goes up and down depending on what app is doing), with system allocator farmer was using over 10G of RAM after plotting just a few sectors.
Code contributor checklist: