basho/leveldb — pull request #132 by matthewvon (2014-05-07 19:12:07+00:00)
Title: Mv write sizing

All types of memory mapped files previously shared the same mapping size of 20Mbytes. This is wasteful for many files, especially the smaller files created by Riak's AAE feature. The waste is in two forms. First the full 20Mbytes is always reserved by leveldb's flexcache. This could lead to 2.5Gbytes of available memory being set aside unnecessarily for a node with 64 databases/vnodes/partitions. The second waste is in physical writes to disk. The entire 20Mbyte mapping is written to disk, then the file is resized smaller. Again, this is a heavy burden for small files.