Skip to content
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

Create a new flag on RocksDB for high spec hardware to boost performance #4423

Merged
merged 4 commits into from
Sep 23, 2022

Conversation

ahamlat
Copy link
Contributor

@ahamlat ahamlat commented Sep 22, 2022

Signed-off-by: Ameziane H [email protected]

PR description

Create a new flag on RocksDB (--Xplugin-rocksdb-high-spec-enabled) for high spec hardware to boost performance.
With this first version, the impact is on memory usage, as we're tuning RocksDB block cache and Memtables size. By high spec here, we mean a VM or machine with more than 16 GiB. Other modifications in future may include other resources' requirements but for now, the only requirement is on RAM.

The results are promising on a 32 GiB AWS VM, as this new flag reduces 95 percentile block processing time by 30%.
image

Performance improvements may appear in a couple of hours because of cache warm up time, as we can notice with RocksDB block cache hit ratio and RocksDB get time :

image
image

Fixed Issue(s)

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if
    updates are required.

Changelog

…r high spec hardware to boost performance.

Signed-off-by: Ameziane H <[email protected]>
…r high spec hardware to boost performance.

Signed-off-by: Ameziane H <[email protected]>
Comment on lines +118 to +122
new DBOptions()
.setCreateIfMissing(true)
.setMaxOpenFiles(configuration.getMaxOpenFiles())
.setDbWriteBufferSize(ROCKSDB_MEMTABLE_SIZE_HIGH_SPEC)
.setMaxBackgroundCompactions(configuration.getMaxBackgroundCompactions())

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation

Invoking [DBOptions.setMaxBackgroundCompactions](1) should be avoided because it has been deprecated.
Comment on lines +130 to +133
new DBOptions()
.setCreateIfMissing(true)
.setMaxOpenFiles(configuration.getMaxOpenFiles())
.setMaxBackgroundCompactions(configuration.getMaxBackgroundCompactions())

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation

Invoking [DBOptions.setMaxBackgroundCompactions](1) should be avoided because it has been deprecated.
…r high spec hardware to boost performance.

Signed-off-by: Ameziane H <[email protected]>
@milesthedisch
Copy link

Minimum hardware requirements to run this flag?

@ahamlat
Copy link
Contributor Author

ahamlat commented Sep 22, 2022

I just update the description @milesthedisch, you must have at least 16 GiB RAM.

@ahamlat ahamlat marked this pull request as ready for review September 22, 2022 20:45
@garyschulte garyschulte enabled auto-merge (squash) September 23, 2022 03:45
@garyschulte garyschulte merged commit 8718fa6 into hyperledger:main Sep 23, 2022
@garyschulte
Copy link
Contributor

burned in on mainnet along with 4417 and 4425

eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
…nce (hyperledger#4423)

* Create a new flag on RocksDB (--Xplugin-rocksdb-high-spec-enabled) for high spec hardware to boost performance.
Signed-off-by: Ameziane H <[email protected]>
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.

4 participants