You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
deno run -A script.ts 17.60s user 3.11s system 110% cpu 18.808 total
DenoKV script - 100, 000 reads and 100, 000 writes
import{randomUUID}from'node:crypto';constdb=awaitDeno.openKv();for(leti=0;i<100000;i++){constkey=`key_${randomUUID()}`;awaitdb.set([key],{message: `Hello, World!`});const{ value }=awaitdb.get([key]);console.log(value);}
deno run -A --unstable-kv script.ts 17.91s user 7.44s system 34% cpu 1:12.75 total
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.0000
I understand there can be various reasons for these results, but from a high-level perspective, LevelDB is significantly faster at its tasks.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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:
I 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