Skip to content

Tweak jemalloc configuration - #1204

Merged
KtorZ merged 1 commit into
mainfrom
tweak-jemalloc
Aug 14, 2026
Merged

Tweak jemalloc configuration#1204
KtorZ merged 1 commit into
mainfrom
tweak-jemalloc

Conversation

@KtorZ

@KtorZ KtorZ commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

This magic line is the result of multiple benchmarks evaluating different configurations for isolated mainnet runs over 10 epochs. This gives a good balance between allocation time and memory management overall:

vanilla

- RSS max: `1.29 GiB`
- RSS mean: `797.84 MiB`
- Heap live max: `621.30 MiB`
- Heap live mean: `251.98 MiB`
- Heap peak: `696.69 MiB`
- Mean epoch sync time: `557.035 s`
- Median epoch sync time: `588.252 s`
- P95 epoch sync time: `595.890 s`

background_thread:true,narenas:2,dirty_decay_ms:250,muzzy_decay_ms:0,tcache_max:512

- RSS max: `1.16 GiB`
- RSS mean: `717.63 MiB`
- Heap live max: `620.61 MiB`
- Heap live mean: `252.21 MiB`
- Heap peak: `664.54 MiB`
- Mean epoch sync time: `581.295 s`
- Median epoch sync time: `597.157 s`
- P95 epoch sync time: `627.741 s`

(note that some of sync time is recovered with #1203)

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@KtorZ, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 53 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 19d9a3ba-cc16-419e-8a18-804279798c10

📥 Commits

Reviewing files that changed from the base of the PR and between 14f6832 and 9f486bb.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • .github/workflows/release-begin.yml
  • Cargo.toml
  • crates/amaru-stores/Cargo.toml
  • crates/amaru/Cargo.toml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch tweak-jemalloc

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@KtorZ
KtorZ force-pushed the tweak-jemalloc branch 2 times, most recently from abad7db to 9ac6a87 Compare August 13, 2026 09:01
  This magic line is the result of multiple benchmarks evaluating different configurations for isolated mainnet runs over 10 epochs. This gives a good balance between allocation time and memory management overall.

  Also, this commit instructs RocksDB to use jemalloc as its allocator, which helps reduce its overall footprint.

No-changelog
Signed-off-by: KtorZ <matthias.benkort@gmail.com>
Comment thread Cargo.toml
test-case = "3.3.1"
thiserror = "2.0.19"
tikv-jemallocator = { version = "0.7.0" }
tikv-jemallocator = { version = "0.6.1" }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason not to use the latest version? Could we add a comment so that it's not updated by accident?

@KtorZ KtorZ Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's only a dependency issue. Rocksdb "jemalloc" feature only works with 0.6.1; and somehow the solver cannot resolve this and the build just throw an error stating the divergence. So no need for a comment I believe; we should update if we can, but that depends on the rocksdb dependency.

I've also inspected the changelog and there's not much we're missing from 0.7.* anyway.

@KtorZ
KtorZ merged commit f9ed7c9 into main Aug 14, 2026
22 checks passed
@KtorZ
KtorZ deleted the tweak-jemalloc branch August 14, 2026 12:51
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