mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 10:27:59 +00:00
Give state_col 90% of memory budget and fix other col calculation (#4208)
* Give `state_col` 90% of memory budget and fix other col calculation * Set default db cache size to 1024
This commit is contained in:
committed by
Robert Habermeier
parent
fdbfd0b150
commit
9ead395bff
@@ -215,8 +215,8 @@ pub fn open_database(
|
||||
let mut db_config = DatabaseConfig::with_columns(Some(NUM_COLUMNS));
|
||||
|
||||
if let Some(cache_size) = cache_size {
|
||||
let state_col_budget = (*cache_size as f64 * 0.7) as usize;
|
||||
let other_col_budget = cache_size - state_col_budget;
|
||||
let state_col_budget = (*cache_size as f64 * 0.9) as usize;
|
||||
let other_col_budget = (cache_size - state_col_budget) / (NUM_COLUMNS as usize - 1);
|
||||
|
||||
let mut memory_budget = std::collections::HashMap::new();
|
||||
for i in 0..NUM_COLUMNS {
|
||||
|
||||
Reference in New Issue
Block a user