HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
hash-anu
snkv
C2026–2026
hash-anu / snkv

snkv

SNKV — a lightweight key-value store focused on simplicity, security and performance file based database , written using sqlite's b-tree directly. Now supports vector HNSW , Join the discussion: https://discord.gg/Wwe9dFy3P

3Distinct people
17Mentions
0Explicit recommenders
80GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

SNKV — a lightweight key-value store focused on simplicity, security and performance file based database , written using sqlite's b-tree directly. Now supports vector HNSW , Join the discussion: https://discord.gg/Wwe9dFy3P

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 9–Nov 16 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/16/2026, 3:59:04 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week17 dated mentions

Observed mentions: 2026-02-09 11:17:44 UTC to 2026-05-10 08:46:59 UTC. Weeks start Monday, UTC.

012342026-02-09 00:00:00 UTC to 2026-02-16 00:00:00 UTC (exclusive): 3 mentions; 3 submissions, 0 commentsFeb 92026-02-16 00:00:00 UTC to 2026-02-23 00:00:00 UTC (exclusive): 4 mentions; 3 submissions, 1 comments2026-02-23 00:00:00 UTC to 2026-03-02 00:00:00 UTC (exclusive): 4 mentions; 2 submissions, 2 comments2026-03-02 00:00:00 UTC to 2026-03-09 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-03-09 00:00:00 UTC to 2026-03-16 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-03-16 00:00:00 UTC to 2026-03-23 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-03-23 00:00:00 UTC to 2026-03-30 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 commentsMar 232026-03-30 00:00:00 UTC to 2026-04-06 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2026-04-06 00:00:00 UTC to 2026-04-13 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-04-13 00:00:00 UTC to 2026-04-20 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-04-20 00:00:00 UTC to 2026-04-27 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-04-27 00:00:00 UTC to 2026-05-04 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-05-04 00:00:00 UTC to 2026-05-11 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsMay 4

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Feb 92026-02-09 00:00:00 UTC2026-02-16 00:00:00 UTC330
Feb 162026-02-16 00:00:00 UTC2026-02-23 00:00:00 UTC431
Feb 232026-02-23 00:00:00 UTC2026-03-02 00:00:00 UTC422
Mar 22026-03-02 00:00:00 UTC2026-03-09 00:00:00 UTC000
Mar 92026-03-09 00:00:00 UTC2026-03-16 00:00:00 UTC000
Mar 162026-03-16 00:00:00 UTC2026-03-23 00:00:00 UTC101
Mar 232026-03-23 00:00:00 UTC2026-03-30 00:00:00 UTC303
Mar 302026-03-30 00:00:00 UTC2026-04-06 00:00:00 UTC110
Apr 62026-04-06 00:00:00 UTC2026-04-13 00:00:00 UTC000
Apr 132026-04-13 00:00:00 UTC2026-04-20 00:00:00 UTC000
Apr 202026-04-20 00:00:00 UTC2026-04-27 00:00:00 UTC000
Apr 272026-04-27 00:00:00 UTC2026-05-04 00:00:00 UTC000
May 42026-05-04 00:00:00 UTC2026-05-11 00:00:00 UTC110

What Hacker News says

4 sources

Show HN: SNKV – KV store on SQLite's B-tree with 11x less memory than RocksDB

While working with RocksDB, I noticed it consumed significantly more memory than expected for small workloads. On a 1M record benchmark, it peaked at ~121 MB RSS. That got me thinking: what if I skip the query layer entirely and use SQLite purely as a storage engine? So I started digging into SQLite internals — specifically the B-tree, pager, and OS layers — to understand how data is actually stored and managed under the hood. I documented what I learned along the way: B-tree operations: https://github.com/hash-anu/snkv/blob/master/internal/BTREE_... Pager operations: https://github.com/hash-anu/snkv/blob/master/internal/PAGER_... OS layer operations: https://github.com/hash-anu/snkv/blob/master/internal/OS_LAY... Once I understood the core pieces, I built a simple key-value store directly on top of SQLite's B-tree layer — reusing its sto
Read the rest
rage management, paging, and file I/O without touching the SQL engine at all. I then added column family support, WAL and journal modes, and transactions. For easier integration, I generated a single amalgamated header (similar to SQLite's approach): https://github.com/hash-anu/snkv Benchmarks (1M records, sync-on-commit enabled for both): RocksDB SNKV Sequential writes: 237K/s 181K/s Random reads: 95K/s 154K/s Sequential scan: 1.78M/s 5.95M/s Mixed workload: 51K/s 97K/s Peak memory (RSS): 121 MB 10.8 MB (~11x less) RocksDB's LSM-tree design gives it a clear write advantage, and with tuning (bloom filters, larger caches) its read numbers would improve too. The memory gap is structural though — RocksDB carries significantly more overhead even when constrained to a small footprint configuration. The full KV layer documentation is here: https://github.com/hash-anu/snkv/blob/master/internal/KVSTOR... Curious if others have hit the same memory wall with RocksDB on small workloads, or taken a different approach to this tradeoff.
3 points · Open discussion
I’ve been working on a key–value engine built directly on top of SQLite’s storage layer (without SQL). While doing that, I ended up reading ~150K lines of SQLite’s source code to understand how its B-Tree, pager, and storage layers actually work. This write-up focuses on the top-most layer: → how key–value operations map directly onto the B-Tree API Some of the interesting parts: - How inserts/reads bypass SQL and go straight to the B-Tree - Cursor mechanics and traversal - Page-level behavior during reads/writes - Why removing the SQL layer gives significant performance gains If you’re interested in deeper internals (b-tree, pager, WAL, OS layer), I’m planning to share those next. Would love feedback, especially from folks familiar with database internals. Project (SNKV): https://github.com/hash-anu/snkv/tree/master
In [dead]

Show HN: SnkvDB – Single-header ACID KV store using SQLite's B-Tree engine

I built *snkvDB* — a single-header, ACID-compliant key-value store with zero setup. https://github.com/hash-anu/snkv ### Why I built this I wanted something as simple as a hashmap, but: * persistent * crash-safe * no external dependencies * easy to drop into any C/C++ project Most KV stores are either: * too heavy (servers, background processes), or * too low-level (you manage everything) snkvDB tries to sit in between. --- ### What it is * Single-header KV store (just include and use) * ACID compliant (thanks to SQLite) * No server, no config, no build system required * Works like a simple embedded database --- ### Under the hood snkvDB is built on SQLite’s storage engine (B-Tree backend), so you get: * durability * transactions * mature, battle-tested storage But the API is simplified to a minimal KV interface. --- ### When to use it *
Read the rest
Embedding storage in CLI tools or small apps * Replacing ad-hoc file storage * Lightweight persistence without running a DB server --- ### Benchmarks I’ve compared it with RocksDB and LMDB here: https://github.com/hash-anu/snkv TL;DR: * Faster than RocksDB for small/medium workloads * Easier to use than LMDB * Balanced read/write performance --- ### Trade-offs * Not for write-heavy, high-throughput workloads (RocksDB is better there) * LMDB can be faster for pure reads * This prioritizes simplicity + safety over raw performance --- Would love feedback, especially on: * API design * performance * real-world use cases
5 points · Open discussion

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.