erthink / libmdbx

One of the fastest embeddable key-value ACID database without WAL. libmdbx surpasses the legendary LMDB in terms of reliability, features and performance.
https://erthink.github.io/libmdbx/
Other
1.16k stars 111 forks source link

In-memory-like behavior on micro datasets #181

Closed AskAlexSharov closed 3 years ago

AskAlexSharov commented 3 years ago

We using LMDB with NoMetaSync|NoSync options - to run small app tests which need small (<64Mb) fast db (0 safety requirements).

LMDB in this configuration doesn't really touching disk much (probably until OS doesn't start evicting page cache).

Same tests on mdbx with mdbx.NoMetaSync | mdbx.UtterlyNoSync and 64Mb growth step geometry - 10 times slower than same tests on lmdb.

I think it happening because more intensive/earlier disk touches or because geometry taking place immediately.

( this issue is absolutely less important than https://github.com/erthink/libmdbx/issues/164 )

erthink commented 3 years ago

When you define a geometry, the engine has no other way besides to apply it by following the appropriate steps (i.e. create a 64 Mb database file).

So I can advise advise such options:

AskAlexSharov commented 3 years ago

Make sense - will try you mr advises next week.