Files
papers/lux-gchain-graphql/sections/14-appendix-b-badgerdb-configuration.tex
zeekay 4a753bb639 papers: reorganize into per-paper dirs, add Antje Worring as co-author
Restructured from flat .tex/.pdf files into per-paper subdirectories.
Added Antje Worring as co-author on all papers.
Synced PDFs to pdfs/ for download site.
2026-04-18 21:50:07 -07:00

20 lines
777 B
TeX

\section{Appendix B: BadgerDB Configuration}
\begin{lstlisting}[language=Go, basicstyle=\footnotesize\ttfamily]
// Optimized BadgerDB configuration for G-Chain
opts := badger.DefaultOptions(dataDir).
WithValueLogFileSize(256 << 20). // 256 MB value logs
WithMemTableSize(64 << 20). // 64 MB memtable
WithNumMemtables(3). // 3 memtables
WithNumLevelZeroTables(5). // 5 L0 tables
WithNumLevelZeroTablesStall(10). // Stall at 10 L0
WithNumCompactors(4). // 4 compaction workers
WithCompression(options.Snappy). // Snappy compression
WithBlockCacheSize(256 << 20). // 256 MB block cache
WithIndexCacheSize(128 << 20) // 128 MB index cache
db, err := badger.Open(opts)
\end{lstlisting}