Make ShredStorageType::RocksLevel public (#23272)
#### Summary of Changes This PR adds two hidden arguments to the validator that allow users to use RocksDB's FIFO compaction for storing shreds. --shred-storage <SHRED_STORAGE> EXPERIMENTAL: Controls how RocksDB compacts shreds. *WARNING*: You will lose your ledger data when you switch between options. Possible values are: 'level': stores shreds using RocksDB's default (level) compaction. 'fifo': stores shreds under RocksDB's FIFO compaction. This option is more efficient on disk-write-bytes of the ledger store. [default: level] [possible values: level, fifo] --shred-storage-size <SHRED_STORAGE_SIZE_BYTES> The shred storage size in bytes. The suggested value is 50% of your ledger storage size in bytes. [default: 268435456000]
This commit is contained in:
committed by
GitHub
parent
8d53ea81e9
commit
62d2a4cd88
@ -35,6 +35,11 @@ use {
|
||||
thiserror::Error,
|
||||
};
|
||||
|
||||
// The default storage size for storing shreds when `rocksdb-shred-compaction`
|
||||
// is set to `fifo` in the validator arguments. This amount of storage size
|
||||
// in bytes will equally allocated to both data shreds and coding shreds.
|
||||
pub const DEFAULT_ROCKS_FIFO_SHRED_STORAGE_SIZE_BYTES: u64 = 250 * 1024 * 1024 * 1024;
|
||||
|
||||
const MAX_WRITE_BUFFER_SIZE: u64 = 256 * 1024 * 1024; // 256MB
|
||||
const FIFO_WRITE_BUFFER_SIZE: u64 = 2 * MAX_WRITE_BUFFER_SIZE;
|
||||
// Maximum size of cf::DataShred. Used when `shred_storage_type`
|
||||
|
Reference in New Issue
Block a user