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
Please describe complexity bounds of your DB. Are reads/writes bounded? Are they logarithmic?
A few minutes ago I rejected Ozon which is another Rust port of BoltDB, because it multiplies capacity by two, so using inefficiently at least disk space. Do you share with Ozon this "feature"?
P.S. I need a bounded or logarithmic for both reads and writes key/value store.
The text was updated successfully, but these errors were encountered:
Okay, let me explain how it works a little so you can decide if it will work for you.
So jammdb, like BoltDB itself (and I believe lmdb too), uses a copy-on-write B+ tree to store the data in order to provide MVCC. That means whatever pages were modified during a write transaction will be copied and a lot of the data may be duplicated (2x) although certainly not the entire database unless you are updating everything in the bucket. The old pages are not reclaimed until there are no open transactions using them. That means if you open a read-only transaction and make a ton of writes before closing it, you will see a big increase in disk usage (♾️x). This is not a problem if you do not have long-running transactions though, although what is a long-running transaction will depend on your application.
Additionally, in order to minimize systems calls to grow the file, we also grow the file by a constant value, so there will be some disk space inefficiency there too. I don't think that grow value is configurable, though it wouldn't be too hard a change to make.
In terms of time complexity, you're looking at logarithmic time for both reads and writes, but I hope this explained why answering that for disk usage isn't so simple and depends on how you use it.
Please describe complexity bounds of your DB. Are reads/writes bounded? Are they logarithmic?
A few minutes ago I rejected Ozon which is another Rust port of BoltDB, because it multiplies capacity by two, so using inefficiently at least disk space. Do you share with Ozon this "feature"?
P.S. I need a bounded or logarithmic for both reads and writes key/value store.
The text was updated successfully, but these errors were encountered: