Skip to content

Instantly share code, notes, and snippets.

View stuartbain's full-sized avatar

Stuart Bain stuartbain

View GitHub Profile
@stuartbain
stuartbain / je_tuning.md
Created May 19, 2021 16:39 — forked from gbehrmann/je_tuning.md
Berkeley DB pool tuning instructions

First a little background info. The Berkeley DB Java Edition library used by the pools (if so configured) uses a log structured file format. What this means is that the files of the database (called log segments) are only ever appended to. Once they reach a certain size (10 MB by default), a new log segment is created and the previous log segments are never modified. If existing data is modified or deleted, this leaves unused fragments in these these database files. Once the utilization (amount of data still in use) falls under a certain level, remaining data is copied to the end of the last segment and the original segment is deleted (this is all text book log structured database).

Berkeley DB uses a btree structure, i.e. it is structured as a tree, with the actual data at the leafs and the internal nodes allowing fast search of the data.

Berkeley DB internally maintains a cache of the files. The default in dCache is to use 20% of the maximum heap size as a cache for Berkeley DB. It is a recommendation fr

@stuartbain
stuartbain / setup.md
Created May 8, 2022 18:14 — forked from mkontani/setup.md
softhsm x crypki (HSM signer) on Mac brew

setup softhsm

install tools

brew install softhsm opensc

softhsm configs