-
-
Notifications
You must be signed in to change notification settings - Fork 9
Architecture & Tuning
Lukatrum edited this page May 13, 2026
·
2 revisions
Configure omni-json-db to perfectly balance I/O speed, RAM usage, and disk footprint based on your specific workload.
Determines how Keys and Values are serialized.
-
J+J: JSON Key + JSON Value (Fastest write, highly readable). -
J+S: JSON Key + MsgPack Value (Default, smallest size, faster read/write). -
S+M: MsgPack Key + Marshal Value (Fastest read speed). -
J+P: JSON Key + Pickle Value (Supports all Python types, but slower).
Mix serialization with advanced compression algorithms.
-
no: No compression (Default, extreme speed). -
lz: LZ4 (Fastest zip/unzip, worst compression ratio). -
zs/z1/z2: Zstandard (Perfect balance of ratio and speed). -
br: Brotli (Maximum compression ratio, ideal for read-heavy workloads).
# Example: Create an ultra-compressed, read-optimized database
jdb = JDb("archive.jdb", data_type="S+S", zip_type="zs")Adjust the internal Key Table data structure to save massive amounts of RAM.
no: Standard Python dict (Default, uses the most memory but fastest search).
bt: BTree indexing (Saves ~44% RAM compared to dict).
l0 - l5: LiteKeyTable modes (Saves 60% - 75% RAM, highly efficient for massive datasets).