Forum Stats

  • 3,769,977 Users
  • 2,253,041 Discussions
  • 7,875,257 Comments

Discussions

How to set the Berkeley-DB JE je.log.fileMax parameter programmatically?

3311305
3311305 Member Posts: 1
edited Sep 12, 2016 5:13AM in Berkeley DB Java Edition

up vvotefavorit

I'm trying to maximise BDB's performance. As I read here, setting the environment variable je.log.fileMax to its allowed maximum increases performance. I am using an EntityStoreand setup the Environment accordingly (see my code line 72)

<span class="pln" style="color: #303336;">envConfig</span><span class="pun" style="color: #303336;">.</span><span class="pln" style="color: #303336;">setConfigParam</span><span class="pun" style="color: #303336;">(</span><span class="str" style="color: #7d2727;">"je.log.fileMax"</span><span class="pun" style="color: #303336;">,</span><span class="pln" style="color: #303336;"> </span><span class="str" style="color: #7d2727;">"1073741824"</span><span class="pun" style="color: #303336;">);</span>

However, when I run a unit-test the default value appears to be used (see my test line 27)

<span class="com" style="color: #858c93;">// gives the default of 10MB:</span><span class="pln" style="color: #303336;"> assertEquals</span><span class="pun" style="color: #303336;">(</span><span class="lit" style="color: #7d2727;">1073741824</span><span class="pun" style="color: #303336;">,</span><span class="pln" style="color: #303336;"> mutableConfig</span><span class="pun" style="color: #303336;">.</span><span class="pln" style="color: #303336;">getConfigParam</span><span class="pun" style="color: #303336;">(</span><span class="str" style="color: #7d2727;">"je.log.fileMax"</span><span class="pun" style="color: #303336;">));</span><span class="pln" style="color: #303336;"> </span>

I am not using a je.properties file. What am I missing? And would I really increase performance with this setting?

Thank you very much and Cheers!

See original post here:
java - How to set the Berkeley-DB JE je.log.fileMax parameter programmatically? - Stack Overflow

This discussion has been closed.