input-output-hk / iodb

Multiversioned key-value database, especially useful for blockchain
Creative Commons Zero v1.0 Universal
95 stars 13 forks source link

Merge multiple Updates into single file #10

Closed jankotek closed 7 years ago

jankotek commented 7 years ago

IODB right now stored each Update in separate file. That leads to problem where file handles are exhausted and JVM crashes. Default maximal number of opened files is around 64K. It can be modified at OS level, but IODB should not require that.

This also reads to huge memory overhead, since each update consumes about 400 bytes of heap space for file handle, versionID etc.

So we need to change format, so that multiple Updates are stored within single file (and single file handle). Use linked-list of updates as outlined here: http://www.mapdb.org/blog/lsm_store_and_updates/

Changes:

jankotek commented 7 years ago

Fixed in 0.2 release