-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use mimalloc
Memory Allocator & Extend Benchmarks with Different Memory Allocators
#2122
base: master
Are you sure you want to change the base?
Conversation
Here are notes and the commands to run the benchmarks: Commands to run the benchmarks:Please make sure you have the latest version ob the build CLI tool installed # Mimalloc Benchmarks
cargo chipmunk bench core mocks_once_producer -r 5
cargo chipmunk bench core mocks_multi_producer -r 5
# Jemalloc Benchmarks
cargo chipmunk bench core mocks_once_producer_jemalloc -r 5
cargo chipmunk bench core mocks_multi_producer_jemalloc -r 5
# Standard Allocator Benchmarks
cargo chipmunk bench core mocks_once_producer_sysalloc -r 5
cargo chipmunk bench core mocks_multi_producer_sysalloc -r 5 Running in Chipmunk:I've already added code to print the time it'll take to parse a DLT file. I used a file with the size 500 MB
|
Update: Jemalloc allocator isn't fully supported on Windows yet |
011441e
to
82dbcc2
Compare
Update: I've removed it as dev dependency and deleted its benchmarks |
82dbcc2
to
fc56fb0
Compare
* `mimalloc` provided better performance on both benchmarks and in while the app is running (Performance gain is about 9%) * Allocator can be set in one place only for the app, therefore we set it rs-bindings for chipmunk and set it for each benchmark separately
* Creates a macro to run the mock once benchmarks with the given allocator * jemalloc allocator dependency added. * Add extra benchmarks for jemalloc and standard allocators along side with the currently used mimalloc allocator * Adjustment for bench file in Build CLI Tool * Documentation
* Creates a macro to run the mock multi benchmarks with the given allocator * Add extra benchmarks for jemalloc and standard allocators along side with the currently used mimalloc allocator * Adjustment for bench file in Build CLI Tool * Documentation
* Add basic benchmarks to run while Chipmunk App is parsing a DLT file to measure the changes on different platform * This commit must be dropped before merging the PR
`jemalloc` support on windows is not stable yet.
fc56fb0
to
413672b
Compare
This PR closes #2117
This PR changes the used memory allocator in Rust to mimalloc memory allocator because it's provided performance gain about 9% in the producer loop.
rs-bindings
crates + in each existing benchmarks.jemallocandmimalloc
).Update:
jemalloc
allocator support on Windows is still unstable, which makes it unrelevant for our use-case.Currently we still need to test the changes on variety of environment to make sure that we are not getting regression on any of them.
Platforms to test:
Benchmarks Results:
Linux x86:
Windows x86: