1

I am working on a LevelDB application in Java using fusesource/leveldbjni. And, I want to configure the maximum amount of memory obtained by LevelDB. Current configuration of the LevelDB is given below.

<levelDBStore class="org.leveldb.test.LevelDBStore">
    <property name = "blockSize">4096</property>
    <property name = "blockRestartInterval">16</property>
    <property name = "cacheSize">8</property>
    <property name = "maxOpenFiles">1000</property>
    <property name = "writeBufferSize">4</property>
</levelDBStore>

From this configuration, I thought that LevelDB would utilize maximum amount of 8MB as, the cache size is configured to 8MB. But it is turned out to be that, LevelDB still utilizes around 150MB of memory in certain cases and eventually leads to out of memory exceptions.

So, I want to know what parameters should be changed in order to set a maximum amount of memory to be utilized by LevelDB.

0 Answers0