diff --git a/substrate/bin/node/testing/src/bench.rs b/substrate/bin/node/testing/src/bench.rs index 5dd0d012fb..2ca6428bed 100644 --- a/substrate/bin/node/testing/src/bench.rs +++ b/substrate/bin/node/testing/src/bench.rs @@ -186,7 +186,7 @@ impl BenchDb { pruning: PruningMode::ArchiveAll, source: sc_client_db::DatabaseSettingsSrc::Path { path: dir.into(), - cache_size: 128, + cache_size: 512, }, }; diff --git a/substrate/client/db/src/lib.rs b/substrate/client/db/src/lib.rs index e00d608a5f..70f666aebf 100644 --- a/substrate/client/db/src/lib.rs +++ b/substrate/client/db/src/lib.rs @@ -284,7 +284,7 @@ pub enum DatabaseSettingsSrc { Path { /// Path to the database. path: PathBuf, - /// Cache size in bytes. + /// Cache size in MiB. cache_size: usize, }, diff --git a/substrate/client/db/src/utils.rs b/substrate/client/db/src/utils.rs index e62c4f052b..16239a82c2 100644 --- a/substrate/client/db/src/utils.rs +++ b/substrate/client/db/src/utils.rs @@ -243,6 +243,15 @@ pub fn open_database( db_config.memory_budget = memory_budget; + log::trace!( + target: "db", + "Open database at {}, state column budget: {} MiB, others({}) column cache: {} MiB", + path, + state_col_budget, + NUM_COLUMNS, + other_col_budget, + ); + Arc::new(Database::open(&db_config, &path).map_err(db_err)?) }, #[cfg(not(any(feature = "kvdb-rocksdb", test)))]