Skip to Main Content

Berkeley DB Family

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Controlling the Background threads

kiwicliveMay 28 2014 — edited May 29 2014

Hi Guys,

I'm trying to limit the running of the background threads in BerkeleyDB JE 6.0.10.

When I open a database/environment for writing, apart from my application thread, I see one compressor thread, one cleaner thread and one checkpointer thread. So for each DB, that is 4 threads.

For 1000+ databases, this is rapidly spiraling up to 4000+ threads and although it is possible to configure the OS to cater for this, I would like to have finer grain control over these housekeeping threads and run them at a time that I am in control of to even out the thread-load.

Reading through the documentation, I understand that the checkpointer thread must always run for db consistency. Fair enough.

My understanding is that the cleaner thread compacts the je logfiles and that the compressor thread is used for trimming the B-Tree during deletions.

What I don't understand, is that I run many insertions (well, to be honest, they are updates), I get all three threads running. I don't understand why I see compressor threads unless the update is being treated as a delete and then insert.

What I would really like to do is stop the cleaner and compressor threads running automatically and live with the fact that the database is not optimal.

Then what I would really like to do is ask the database "do you need cleaning/compressing?" and if so, then open->housekeep->close.

I find in the GSG documentation this piece of information:

"Note that you can prevent a background thread from running by using the appropriate je.properties parameter, but this is not recommended for production use and those parameters are not described here. "


The GSG tells me this about the compressor thread:

"There is no need for you to manage the compressor and so it is not described further in this manual. "


This implies it may be possible but we won't tell you how :-)  Is that the case  - I realize this is all at my own risk here!! ?


When it comes to the cleaner thread, the GSG says there are a couple of properties I can control, one being

je.cleaner.minUtilization


It may be possible to set this to zero to prevent cleaning and then at a later time increase the value ?


So I guess I'm saying, although its not recommended, I would like to stop one or more of the background threads from running automatically on a db write. I understand this may lead to disk bloat and may slow down query but I'm in the game of reducing instantaneous threadcount and then come back and tidyup at a more convenient time. Is this something that is considered feasible with BerkeleyDB JE and if so, what are these 'properties that are not recommended' ? I'd like to try it out as this is going to be my bottleneck, rather than RAM or diskspace.


Thanks for taking the time to read my rambling if you get this far, I look forward to any response !!


Clive


This post has been answered by Greybird-Oracle on May 28 2014
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 26 2014
Added on May 28 2014
2 comments
1,537 views