Skip to content

chore: increase RocksDB background threads#3155

Merged
halfprice merged 2 commits intomainfrom
zhewu/tune-storage-node
Mar 19, 2026
Merged

chore: increase RocksDB background threads#3155
halfprice merged 2 commits intomainfrom
zhewu/tune-storage-node

Conversation

@halfprice
Copy link
Collaborator

@halfprice halfprice commented Mar 19, 2026

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

  • Storage node: Increases the number of RocksDB background threads from 2 (RocksDB default) to 16. Can be configured through the config file.

@github-actions
Copy link
Contributor

Warning: This PR modifies one of the example config files. Please consider the
following:

  • Make sure the changes are backwards compatible with the current configuration.
  • Make sure any added parameters follow the conventions of the existing parameters; in
    particular, durations should take seconds or milliseconds using the naming convention
    _secs or _millis, respectively.
  • If there are added optional parameter sections, it should be possible to specify them
    partially. A useful pattern there is to implement Default for the struct and derive
    #[serde(default)] on it, see BlobRecoveryConfig as an example.
  • You may need to update the documentation to reflect the changes.

Copy link
Contributor

@mlegner mlegner left a comment

Choose a reason for hiding this comment

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

Looks reasonable and didn't cause any (additional) issues on our node. 👍

@halfprice halfprice marked this pull request as ready for review March 19, 2026 16:49
Copilot AI review requested due to automatic review settings March 19, 2026 16:49
@halfprice halfprice merged commit 1b3a925 into main Mar 19, 2026
26 of 27 checks passed
@halfprice halfprice deleted the zhewu/tune-storage-node branch March 19, 2026 16:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_jobs to GlobalDatabaseOptions (default 16) and apply it via Options::set_max_background_jobs.
  • Update the sample node config (node_config_example.yaml) to include max_background_jobs: 16.
  • (Also included) Flip enable_statistics defaults/example to true.

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.

Comment on lines +249 to 251
max_background_jobs: Some(16),
enable_statistics: true,
use_optimistic_transaction_db: true,
Comment on lines +11 to 13
max_background_jobs: 16
enable_statistics: true
use_optimistic_transaction_db: true
Comment on lines +288 to +290
if let Some(max_background_jobs) = value.max_background_jobs {
options.set_max_background_jobs(max_background_jobs);
}
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.

3 participants