Merge pull request #2516 from ethcore/canon-cache-size
Mostly configurable canonical cache size
This commit is contained in:
@@ -80,6 +80,7 @@ pruning = "auto"
|
||||
cache_size_db = 64
|
||||
cache_size_blocks = 8
|
||||
cache_size_queue = 50
|
||||
cache_size_state = 25
|
||||
cache_size = 128 # Overrides above caches with total size
|
||||
fast_and_loose = false
|
||||
db_compaction = "ssd"
|
||||
|
||||
@@ -49,6 +49,7 @@ pruning = "fast"
|
||||
cache_size_db = 128
|
||||
cache_size_blocks = 16
|
||||
cache_size_queue = 100
|
||||
cache_size_state = 25
|
||||
db_compaction = "ssd"
|
||||
fat_db = "off"
|
||||
|
||||
|
||||
@@ -213,6 +213,8 @@ usage! {
|
||||
or |c: &Config| otry!(c.footprint).cache_size_blocks.clone(),
|
||||
flag_cache_size_queue: u32 = 50u32,
|
||||
or |c: &Config| otry!(c.footprint).cache_size_queue.clone(),
|
||||
flag_cache_size_state: u32 = 25u32,
|
||||
or |c: &Config| otry!(c.footprint).cache_size_state.clone(),
|
||||
flag_cache_size: Option<u32> = None,
|
||||
or |c: &Config| otry!(c.footprint).cache_size.clone().map(Some),
|
||||
flag_fast_and_loose: bool = false,
|
||||
@@ -364,6 +366,7 @@ struct Footprint {
|
||||
cache_size_db: Option<u32>,
|
||||
cache_size_blocks: Option<u32>,
|
||||
cache_size_queue: Option<u32>,
|
||||
cache_size_state: Option<u32>,
|
||||
db_compaction: Option<String>,
|
||||
fat_db: Option<String>,
|
||||
}
|
||||
@@ -536,6 +539,7 @@ mod tests {
|
||||
flag_cache_size_db: 64u32,
|
||||
flag_cache_size_blocks: 8u32,
|
||||
flag_cache_size_queue: 50u32,
|
||||
flag_cache_size_state: 25u32,
|
||||
flag_cache_size: Some(128),
|
||||
flag_fast_and_loose: false,
|
||||
flag_db_compaction: "ssd".into(),
|
||||
@@ -691,6 +695,7 @@ mod tests {
|
||||
cache_size_db: Some(128),
|
||||
cache_size_blocks: Some(16),
|
||||
cache_size_queue: Some(100),
|
||||
cache_size_state: Some(25),
|
||||
db_compaction: Some("ssd".into()),
|
||||
fat_db: Some("off".into()),
|
||||
}),
|
||||
|
||||
@@ -214,6 +214,8 @@ Footprint Options:
|
||||
megabytes (default: {flag_cache_size_blocks}).
|
||||
--cache-size-queue MB Specify the maximum size of memory to use for block
|
||||
queue (default: {flag_cache_size_queue}).
|
||||
--cache-size-state MB Specify the maximum size of memory to use for
|
||||
the state cache (default: {flag_cache_size_state}).
|
||||
--cache-size MB Set total amount of discretionary memory to use for
|
||||
the entire system, overrides other cache and queue
|
||||
options.a (default: {flag_cache_size:?})
|
||||
|
||||
Reference in New Issue
Block a user