-
Notifications
You must be signed in to change notification settings - Fork 640
Feature/adjust rocksdb config by memory #9000
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
Conversation
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.
Pull Request Overview
This pull request implements dynamic RocksDB configuration optimization based on available system memory and pruning mode. The changes enable automatic adjustment of database settings to improve performance when sufficient memory is available (>32GB) or when running in archive mode, reducing write amplification and increasing write buffer sizes.
Key changes include:
- Introduction of a
RocksDbConfigFactorythat dynamically adjusts database configurations based on hardware capabilities - Automatic optimization for high-memory systems (>32GB) and archive mode configurations
- Increased default CodeDB write buffer size from 4MB to 16MB
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
PruningTrieStateFactory.cs |
Refactored to move config advice logic to MainPruningTrieStoreFactory and updated dependency injection |
RocksDbConfigFactory.cs |
New factory class implementing dynamic RocksDB configuration based on memory and pruning mode |
DbConfig.cs |
Added new configuration options for large memory and archive mode optimizations |
IRocksDbConfig.cs |
New interface abstracting RocksDB configuration properties |
HardwareInfo.cs |
New service providing system memory information using GC memory APIs |
| Test files | Updated to accommodate new factory pattern and dependency injection changes |
Comments suppressed due to low confidence (2)
| #endregion | ||
|
|
||
| #region read-write options | ||
| // TODO: These are not applied to column family |
Copilot
AI
Jul 18, 2025
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.
This TODO comment indicates incomplete functionality where options are not applied to column families. This should be addressed or properly documented with a plan for resolution.
src/Nethermind/Nethermind.Db.Rocks/Config/RocksDbConfigFactory.cs
Outdated
Show resolved
Hide resolved
|
Please update with master |
2797111 to
c20f57a
Compare
|
Rebased |
Require #8997
Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing