-
Notifications
You must be signed in to change notification settings - Fork 677
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
chore: Use jemalloc
global allocator on supported platforms
#4367
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## next #4367 +/- ##
===========================================
- Coverage 83.22% 67.77% -15.46%
===========================================
Files 448 448
Lines 321363 321365 +2
===========================================
- Hits 267453 217794 -49659
- Misses 53910 103571 +49661 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM; looking forward to seeing how this shapes up
I tested this on a different block range (which makes far more use of Clarity VM) and there is a much more significant performance increase of around 12%: ❯ hyperfine -w 3 -r 10 "stacks-core/target/release/stacks-inspect.next replay-block /home/jbencin/data/next/ range 99990 100000" "stacks-core/target/release/stacks-inspect.jemalloc replay-block /home/jbencin/data/next/ range 99990 100000"
Benchmark 1: stacks-core/target/release/stacks-inspect.next replay-block /home/jbencin/data/next/ range 99990 100000
Time (mean ± σ): 12.140 s ± 0.031 s [User: 11.607 s, System: 0.489 s]
Range (min … max): 12.091 s … 12.207 s 10 runs
Benchmark 2: stacks-core/target/release/stacks-inspect.jemalloc replay-block /home/jbencin/data/next/ range 99990 100000
Time (mean ± σ): 10.842 s ± 0.015 s [User: 10.346 s, System: 0.442 s]
Range (min … max): 10.820 s … 10.863 s 10 runs
Summary
stacks-core/target/release/stacks-inspect.jemalloc replay-block /home/jbencin/data/next/ range 99990 100000 ran
1.12 ± 0.00 times faster than stacks-core/target/release/stacks-inspect.next replay-block /home/jbencin/data/next/ range 99990 100000 |
I tried using |
bc57f72
to
ad8ab51
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
ad8ab51
to
40939de
Compare
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
Use
jemalloc
allocator on supported platforms (non-Windows).jemalloc
is used by FreeBSD, and used to be the default in Rust, so it should be perfectly safe to useIn the
replay-block
benchmark, this results in a 3.3% performance improvement:Applicable issues
Additional info (benefits, drawbacks, caveats)
stacks-inspect
andstacks-node
. Should I do the other binaries also?Checklist
docs/rpc/openapi.yaml
andrpc-endpoints.md
for v2 endpoints,event-dispatcher.md
for new events)clarity-benchmarking
repobitcoin-tests.yml