-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance benchmarks and comparison to existing DBs #132
Comments
There is no official benchmarks. If you want to compare the same kind-of-workload (key-value store), doing sql insertion to sqlite will be a lot slower by design anyway. |
Let the numbers speak. Could you publish your measurements at least for the Redis vs 0-db comparison? Btw. I'm afraid key-value insertion into SQLite could be (much) faster than 0-db. So despite this comparison being apples to oranges, I'd like to know how it performs in an app running locally. I.e. answering the question "should I use local 0-db when deploying on ThreeFold appliances or rather use SQLite". This is a rather important decision IMHO. |
I'll write some test to compare with SQLite and will publish result I get. But I can already tell you on a MacBook Air M1 (which have nvme storage), zdb can handle 5 GB/s write burst (it depends on payload size obviously). SQLite with an index on the key will dramatically slow down with the amount of key increasing. But again it's not really easy to compare since in user-key mode, 0-db keep an index in memory, SQLite use on disk index. Speed is not the only numbers to take in account. |
I'm usually using create table if not exists memo (
rid integer primary key autoincrement not null, -- not superfluous as SQLite always has this column
key blob not null,
value blob not null,
unique ( key ) ); for key-value approximation in SQLite. The Btw. don't forget to set some hundreds of MBytes as cache ( |
I finally had time to implement the sqlite benchmark side (https://github.com/maxux/redis-benchmark/tree/master/compare) and I admit sqlite is quite fast. The current workflow compare zdb in network mode (client/server) and the network stack is obviously a bottleneck. I'll write a new test using zdb as library like sqlite to get a better overview of the real performance. Thus, when inserting 524,288 keys (4 KB payload each time), sqlite reach Reading speed is dramatically faster for sqlite ( I'll come back with a better rewrite of the benchmark to get rid of the network stack to get more real values. |
Nice, thanks! I think the numbers are a good start for zdb actually. Will stay tuned to see how it goes without the network stack. Btw. you might get some inspiration (or even use 1:1 the code) from the zero-copy capability of |
I wonder whether you made some performance benchmarks to compare 0-db to existing DBs. I couldn't find any.
Could you do some very rough benchmarking, comparing the results e.g. to SQLite (yes, it's apples to oranges, but SQLite is a very good baseline to understand the advantages of 0-db) and publish the results here in this repo?
The text was updated successfully, but these errors were encountered: