Skip to content

Commit 5316a57

Browse files
author
Ludo Galabru
committed
feat: tweak mmap / page_size values
1 parent 6574008 commit 5316a57

File tree

1 file changed

+6
-0
lines changed
  • components/chainhook-event-observer/src/hord/db

1 file changed

+6
-0
lines changed

components/chainhook-event-observer/src/hord/db/mod.rs

+6
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,14 @@ fn create_or_open_readwrite_db(cache_path: &PathBuf, ctx: &Context) -> Connectio
119119
};
120120
// db.profile(Some(trace_profile));
121121
// db.busy_handler(Some(tx_busy_handler))?;
122+
123+
let mmap_size: i64 = 256 * 1024 * 1024;
124+
let page_size: i64 = 32768;
125+
conn.pragma_update(None, "mmap_size", mmap_size).unwrap();
126+
conn.pragma_update(None, "page_size", page_size).unwrap();
122127
conn.pragma_update(None, "journal_mode", &"WAL").unwrap();
123128
conn.pragma_update(None, "synchronous", &"NORMAL").unwrap();
129+
124130
conn
125131
}
126132

0 commit comments

Comments
 (0)