-
Notifications
You must be signed in to change notification settings - Fork 2
Berkeley DB Java Engine Tuning Tips
Here are some useful tips for the java BDB engine for Voldemort.
1. First look at the mBean voldemort.store.stats.aggregate with jconsole
voldemort.store.stats.aggregate:type=aggregate-perf
This gives some great stats on performance and operations. You’ll want to pay attention to any operations that are taking a long time.
2. If you have a large JVM > 8G, try allocating about 60% to the BDB cache .
Modify parameter bdb.cache.size inside the server.properties.
This will significantly boost performance for operations by keeping more entries in memory. Obviously you will want to tune this depending on your workload.
For smaller JVM sizes, you might be more sensitive to garbage collection so might want to allocate less to the BDB cache.
3. Look underneath the covers at some JBDB cache miss / size statistics with JMX.
See mbean located at:
voldemort.store.bdb:type=bdbStorageConfiguration
Run operation getEnvStatsAsString:
and look at the javadocs for com.sleepycat.je.EnvironmentStats
Now if you are experiencing high read times, pay attention to the nCacheMiss number, this indicates that your data access patterns going to disk instead of hitting memory.
Example Output:
I/O: Log file opens, fsyncs, reads, writes, cache misses.
bufferBytes=3,145,728
endOfLog=0xa3/0×16b8e9b
nBytesReadFromWriteQueue=0
nBytesWrittenFromWriteQueue=0
nCacheMiss=0
nFSyncRequests=0
nFSyncTimeouts=0
nFSyncs=0
nFileOpens=0
nLogBuffers=3
nNotResident=0
nOpenFiles=3
nRandomReadBytes=0
nRandomReads=0
nRandomWriteBytes=0
nRandomWrites=0
nReadsFromWriteQueue=0
nRepeatFaultReads=0
nSequentialReadBytes=0
nSequentialReads=0
nSequentialWriteBytes=0
nSequentialWrites=0
nTempBufferWrites=0
nWriteQueueOverflow=0
nWriteQueueOverflowFailures=0
nWritesFromWriteQueue=0
Cache: Current size, allocations, and eviction activity.
adminBytes=4,743
cacheTotalBytes=3,225,039
dataBytes=74,250
lockBytes=318
nBINsStripped=0
nEvictPasses=0
…….
3. Visit the Oracle Berkeley DB Java Edition Forums:
http://forums.oracle.com/forums/forum.jspa?forumID=273&start=150