Why choose SQLite for DenoKV over alternatives like LevelDB? #26106
thelovekesh
started this conversation in
General
Replies: 1 comment 2 replies
-
|
I believe there's more to consider than just raw performance. The LevelDB ecosystem isn't as robust, user-friendly, and established as SQLite. This makes SQLite a safer choice to avoid a lot of headaches. Finally, if you are really settled on the idea of using LevelDB (and you need to handle 50k writes/sec in a single box), you can implement a Deno KV backend using LevelDB. BTW: Deno KV uses a FoundationDB backend in Deno deployment. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
DenoKV utilizes SQLite for creating key-value stores and queues. Although SQLite is efficient, why not opt for a more native solution like LevelDB, which is specifically designed as a persistent key-value database?
Although I’m new to this area, I executed a script to read and write records using both DenoKV and LevelDB. Here are the results: I performed one million reads and writes with LevelDB, while I limited DenoKV to 100,000 due to significant slowdowns after 500,000 records.
LevelDB script - 1 million read and and 1 million writes
DenoKV script - 100, 000 reads and 100, 000 writes
The scripts were executed on a machine equipped with 64 GB of DDR5 memory and the following configuration:
Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 39 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 20 On-line CPU(s) list: 0-19 Vendor ID: GenuineIntel Model name: 12th Gen Intel(R) Core(TM) i7-12700H CPU family: 6 Model: 154 Thread(s) per core: 2 Core(s) per socket: 14 Socket(s): 1 Stepping: 3 CPU max MHz: 4700.0000 CPU min MHz: 400.0000I understand there can be various reasons for these results, but from a high-level perspective, LevelDB is significantly faster at its tasks.
Beta Was this translation helpful? Give feedback.
All reactions