On 20. jan. 2016 12:48, José Felix Torre Santos wrote:
I am using LMDB in an investigation project. It works perfectly with persistence and concurrent processes. But in some occasions I want to run an standalone process without persistence and as fast as possible. I could do it with other binary-tree libraries written in C, but I’d like not to rewrite mi code.
Remove the database file if present before mdb_env_open(), and after mdb_env_close() to clean up. Enable environment option MDB_NOSYNC. And maybe MDB_WRITEMAP, but note its documented disadvantages.
Is there any way to configure or modify LMDB code to work in main memory instead memory mapped files?
No such option, and a tweaking the code would be cumbersome in places. Use an in-memory filesystem, like tmpfs on Linux. (Not the same as /tmp, but sometimes /tmp uses tmpfs.) tmpfs still swaps to disk, though.