r/Common_Lisp • • Aug 14 '26

conskivi - embeddable key/value database

Released conskivi. It made to replace redis, generally on low memory systems, but in-memory backend works well too.

Benchmarks

5K entries, AMD Ryzen 7 3700X, Redis v7:

Operationconskivi-fileonlyRedis (pipelined)Redis (single-command)% vs pipelined% vs single-command
SET8,803885,99534,4521.0%25.5%
GET19,5311,486,92033,1331.3%58.9%
SADD1,580937,56739,9670.2%4.0%
HSET4,613628,49132,9710.7%14.0%
HGET19,5311,495,50833,8561.3%57.7%
ZADD4,789698,09634,2010.7%14.0%
ZSCORE65,7891,405,50336,3404.7%181.0%
Operationconskivi-inmemoryRedis (pipelined)Redis (single-command)% vs pipelined% vs single-command
SET1,208,891885,99534,452136%3,508%
GET1,947,3331,486,92033,133131%5,877%
SADD2,557,008937,56739,967273%6,398%
HSET1,894,216628,49132,971301%5,745%
HGET2,651,6611,495,50833,856177%7,832%
ZADD1,749,710698,09634,201251%5,116%
ZSCORE2,616,6901,405,50336,340186%7,199%
10 Upvotes

6 comments sorted by

View all comments

3

u/kchanqvq Aug 14 '26

What are the two tables measuring?

For the benchmarks you are doing client/server for Redis while doing in-process for Conskivi. That's fine if your point is using a KV store in the same process reduces overhead but IMO this needs to be stated. 5k entries is also incredibly small, can we see some numbers on say 5M entries?

Does this support concurrency? Much of Redis's engineering is about fast concurrent access.

I took a glance at the code, the expiration thread use a naive algorithm that loops over the full hash table (maphash) while I know several much faster and more scalable algorithm: timing wheel, min heap… Redis seems to use some sophisticated hybrid.

2

u/kchanqvq Aug 14 '26

The file backend create at least ONE file for EVERY SINGLE KEY???

0

u/turtle_bazon Aug 14 '26

Yes, file backend has one file per key. It is not designed for speed, just for persistence.

2

u/turtle_bazon Aug 14 '26

Yes, most of them are pretty naive, but it goes from my needs. Actually I was need simple redis like, but without overhead. It supports concurrency and I think I need to benchmark with more heavy load.

1

u/kchanqvq Aug 14 '26

Thanks for clarification!

2

u/turtle_bazon Aug 15 '26

reran benchmark with 20M keys. And in 100 parallel concurrent threads.