Compare commits

...

4 Commits

Author SHA1 Message Date
yongkangc
9a7d3be1fc docs: clarify RocksDB flags require explicit boolean values 2026-01-19 15:11:30 +00:00
yongkangc
961e232dea fix: use correct --rocksdb.* CLI flag names 2026-01-19 15:06:18 +00:00
yongkangc
0c0d12ac9a fix: correct RocksDB storage settings documentation
- Replace non-existent --storage.*-in-rocksdb CLI flags with correct
  reth db settings command usage
- Document actual commands: transaction_hash_numbers, storages_history,
  account_history via 'reth db settings set'
- Add section for viewing current settings with 'reth db settings get'
- Use consistent terminology (transaction hash table vs tx-hash)
2026-01-19 15:05:20 +00:00
yongkangc
62a97edbf1 docs: add documentation for --storage.*-in-rocksdb CLI flags
Documents the new storage CLI flags for RocksDB table routing:
- --storage.tx-hash-in-rocksdb
- --storage.storages-history-in-rocksdb
- --storage.account-history-in-rocksdb

These flags allow routing specific large tables to RocksDB for improved
performance on archive nodes and high-throughput workloads.
2026-01-19 14:56:12 +00:00
2 changed files with 95 additions and 0 deletions

View File

@@ -0,0 +1,91 @@
---
description: Configure RocksDB table routing for optimal performance.
---
# Storage Configuration
Reth uses a hybrid storage approach with MDBX as the primary database and optional RocksDB for specific tables. This page documents how to configure which tables are stored in RocksDB.
## Overview
By default, all tables are stored in MDBX. However, certain large tables can benefit from RocksDB's performance characteristics. Storage settings allow you to route specific tables to RocksDB for improved performance on high-throughput workloads.
:::warning
These settings can only be configured at genesis initialization. Once the node has been initialized, changing these settings requires a full re-sync from scratch.
:::
## RocksDB CLI Flags
All RocksDB flags require an explicit boolean value (`true` or `false`). They cannot be used as bare flags.
### `--rocksdb.tx-hash`
Route the transaction hash to number mapping table to RocksDB instead of MDBX.
```bash
reth node --rocksdb.tx-hash=true
```
**Default:** `false` (stored in MDBX)
**Use case:** This table maps transaction hashes to their sequential transaction IDs. Moving it to RocksDB can improve lookup performance for high-volume transaction queries.
### `--rocksdb.storages-history`
Route storage history tables to RocksDB instead of MDBX.
```bash
reth node --rocksdb.storages-history=true
```
**Default:** `false` (stored in MDBX)
**Use case:** Storage history tracks historical values of contract storage slots. This table can grow very large on archive nodes. RocksDB may provide better write performance for this workload.
### `--rocksdb.account-history`
Route account history tables to RocksDB instead of MDBX.
```bash
reth node --rocksdb.account-history=true
```
**Default:** `false` (stored in MDBX)
**Use case:** Account history tracks historical account states. Similar to storage history, this table grows significantly on archive nodes and may benefit from RocksDB's handling of large datasets.
## Example
```bash
reth node --rocksdb.tx-hash=true --rocksdb.storages-history=true --rocksdb.account-history=true
```
## RocksDB Data Directory
When using RocksDB tables, the data is stored in a separate directory. You can customize this location using the `--datadir.rocksdb` flag:
```bash
reth node --datadir.rocksdb /path/to/rocksdb
```
If not specified, RocksDB data is stored in a subdirectory of your main data directory.
## When to Use RocksDB Tables
Consider enabling RocksDB for specific tables when:
- Running an **archive node** with full historical data
- Experiencing **write performance bottlenecks** with large history tables
- Performing **high-volume transaction lookups** that stress the transaction hash table
For most use cases, the default MDBX configuration provides excellent performance. Only enable RocksDB tables if you have measured performance issues with specific workloads.
## Migration Notes
Since these settings are genesis-only:
1. **New nodes:** Configure storage settings before first sync
2. **Existing nodes:** Requires full re-sync to change storage settings
3. **Backup:** Always backup your data before re-syncing
The storage settings are persisted to ensure consistency across restarts. Attempting to start a node with different storage settings than what was used during initialization will result in an error.

View File

@@ -100,6 +100,10 @@ export const sidebar: SidebarItem[] = [
text: "Configuration",
link: "/run/configuration"
},
{
text: "Storage",
link: "/run/storage"
},
{
text: "Monitoring",
link: "/run/monitoring"