Skip to content

Commit

Permalink
feat: tweak mmap / page_size values
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludo Galabru committed Mar 28, 2023
1 parent 6574008 commit 5316a57
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/chainhook-event-observer/src/hord/db/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,14 @@ fn create_or_open_readwrite_db(cache_path: &PathBuf, ctx: &Context) -> Connectio
};
// db.profile(Some(trace_profile));
// db.busy_handler(Some(tx_busy_handler))?;

let mmap_size: i64 = 256 * 1024 * 1024;
let page_size: i64 = 32768;
conn.pragma_update(None, "mmap_size", mmap_size).unwrap();
conn.pragma_update(None, "page_size", page_size).unwrap();
conn.pragma_update(None, "journal_mode", &"WAL").unwrap();
conn.pragma_update(None, "synchronous", &"NORMAL").unwrap();

conn
}

Expand Down

0 comments on commit 5316a57

Please sign in to comment.