You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, index and filter blocks live on the heap where they may
never be evicted (~18 MB per SST file). Pass --cache-index-filter-blocks
to store them in the block cache instead, bounding memory at the cost
of possible eviction under cache pressure.
Copy file name to clipboardExpand all lines: src/config.rs
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,13 @@ pub struct Config {
70
70
/// Must stay within db_write_buffer_size_mb to avoid mid-batch flushes.
71
71
pubinitial_sync_batch_size:usize,
72
72
73
+
/// Store index and filter blocks inside the block cache (default: false).
74
+
/// When enabled, bounds memory but allows eviction under pressure.
75
+
/// When disabled (default), index/filter blocks stay on the heap and are
76
+
/// may never be evicted, giving better read performance at the cost of ~18 MB
77
+
/// per SST file of unbounded memory.
78
+
pubdb_cache_index_filter_blocks:bool,
79
+
73
80
#[cfg(feature = "liquid")]
74
81
pubparent_network:BNetwork,
75
82
#[cfg(feature = "liquid")]
@@ -256,6 +263,10 @@ impl Config {
256
263
.help("Number of blocks per batch during initial sync. Larger values keep more txo rows in the write buffer during indexing, improving lookup_txos cache hit rate for recently-created outputs.")
257
264
.takes_value(true)
258
265
.default_value("250")
266
+
).arg(
267
+
Arg::with_name("cache_index_filter_blocks")
268
+
.long("cache-index-filter-blocks")
269
+
.help("Store index/filter blocks in the block cache instead of on the heap. Bounds memory but allows eviction under cache pressure.")
0 commit comments