diff --git a/ledger/src/blockstore_db.rs b/ledger/src/blockstore_db.rs index 71369d4ff..3a9fb3003 100644 --- a/ledger/src/blockstore_db.rs +++ b/ledger/src/blockstore_db.rs @@ -46,11 +46,6 @@ use { const BLOCKSTORE_METRICS_ERROR: i64 = -1; -// 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; diff --git a/ledger/src/blockstore_options.rs b/ledger/src/blockstore_options.rs index ae06459f8..ffeccad3d 100644 --- a/ledger/src/blockstore_options.rs +++ b/ledger/src/blockstore_options.rs @@ -155,24 +155,18 @@ pub struct BlockstoreRocksFifoOptions { pub shred_code_cf_size: u64, } -// Maximum size of cf::DataShred. Used when `shred_storage_type` -// is set to ShredStorageType::RocksFifo. The default value is set -// to 125GB, assuming 500GB total storage for ledger and 25% is -// used by data shreds. -const DEFAULT_FIFO_COMPACTION_DATA_CF_SIZE: u64 = 125 * 1024 * 1024 * 1024; -// Maximum size of cf::CodeShred. Used when `shred_storage_type` -// is set to ShredStorageType::RocksFifo. The default value is set -// to 100GB, assuming 500GB total storage for ledger and 20% is -// used by coding shreds. -const DEFAULT_FIFO_COMPACTION_CODING_CF_SIZE: u64 = 100 * 1024 * 1024 * 1024; +// 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; impl Default for BlockstoreRocksFifoOptions { fn default() -> Self { Self { // Maximum size of cf::ShredData. - shred_data_cf_size: DEFAULT_FIFO_COMPACTION_DATA_CF_SIZE, + shred_data_cf_size: DEFAULT_ROCKS_FIFO_SHRED_STORAGE_SIZE_BYTES / 2, // Maximum size of cf::ShredCode. - shred_code_cf_size: DEFAULT_FIFO_COMPACTION_CODING_CF_SIZE, + shred_code_cf_size: DEFAULT_ROCKS_FIFO_SHRED_STORAGE_SIZE_BYTES / 2, } } } diff --git a/validator/src/main.rs b/validator/src/main.rs index 8e6baf4bb..4f0cd24b4 100644 --- a/validator/src/main.rs +++ b/validator/src/main.rs @@ -30,12 +30,9 @@ use { validator::{is_snapshot_config_valid, Validator, ValidatorConfig, ValidatorStartProgress}, }, solana_gossip::{cluster_info::Node, contact_info::ContactInfo}, - solana_ledger::{ - blockstore_db::DEFAULT_ROCKS_FIFO_SHRED_STORAGE_SIZE_BYTES, - blockstore_options::{ - BlockstoreCompressionType, BlockstoreRecoveryMode, BlockstoreRocksFifoOptions, - LedgerColumnOptions, ShredStorageType, - }, + solana_ledger::blockstore_options::{ + BlockstoreCompressionType, BlockstoreRecoveryMode, BlockstoreRocksFifoOptions, + LedgerColumnOptions, ShredStorageType, DEFAULT_ROCKS_FIFO_SHRED_STORAGE_SIZE_BYTES, }, solana_net_utils::VALIDATOR_PORT_RANGE, solana_perf::recycler::enable_recycler_warming,