chore: increase RocksDB background threads#3155
Conversation
|
Warning: This PR modifies one of the example config files. Please consider the
|
mlegner
left a comment
There was a problem hiding this comment.
Looks reasonable and didn't cause any (additional) issues on our node. 👍
There was a problem hiding this comment.
Pull request overview
This PR updates Walrus storage-node RocksDB configuration to increase background compaction/flush concurrency by introducing a configurable max_background_jobs option (defaulting to 16) and wiring it into the RocksDB Options used when opening the DB.
Changes:
- Add
global.max_background_jobstoGlobalDatabaseOptions(default16) and apply it viaOptions::set_max_background_jobs. - Update the sample node config (
node_config_example.yaml) to includemax_background_jobs: 16. - (Also included) Flip
enable_statisticsdefaults/example totrue.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
crates/walrus-service/src/node/storage/database_config.rs |
Adds a new global RocksDB option for max background jobs and applies it when building rocksdb::Options; also changes enable_statistics default. |
crates/walrus-service/node_config_example.yaml |
Documents the new max_background_jobs setting in the example config; also changes enable_statistics example value. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| max_background_jobs: Some(16), | ||
| enable_statistics: true, | ||
| use_optimistic_transaction_db: true, |
| max_background_jobs: 16 | ||
| enable_statistics: true | ||
| use_optimistic_transaction_db: true |
| if let Some(max_background_jobs) = value.max_background_jobs { | ||
| options.set_max_background_jobs(max_background_jobs); | ||
| } |
Description
Increases the number of RocksDB background threads from 2 (RocksDB default) to 16. Can be configured through the config file.
Test plan
Deployment to ML storage nodes.
Release notes