This discussion is archived
2 Replies Latest reply: Aug 17, 2012 5:04 PM by 931337 RSS

Slow startup during modification

931337 Newbie
Currently Being Moderated
Hi,

I'm experiencing a slow environment initialization and trying to figure out if there is a way to make if faster.

I have a single bdb environment (5.0.58) about half a terabyte in size, and I can open a read-only bdb process instantly when there is no other bdb write process running.

But when there is another bdb process doing deferred writes and cleaning logs, the read-only bdb process seems to wait until the the write process finishes modifying the database, which could take hours to finish in my case. Is this an expected behavior, or am I missing something?

Attached below are couple of thread dumps from the stuck read-only bdb process.

-- Dump 1 --
java.lang.Thread.State: RUNNABLE
     at com.sleepycat.je.cleaner.TrackedFileSummary.trackObsolete(TrackedFileSummary.java:110)
     at com.sleepycat.je.cleaner.BaseUtilizationTracker.countObsolete(BaseUtilizationTracker.java:159)
     at com.sleepycat.je.cleaner.RecoveryUtilizationTracker.countObsoleteIfUncounted(RecoveryUtilizationTracker.java:114)
     at com.sleepycat.je.recovery.RecoveryManager.redoUtilizationInfo(RecoveryManager.java:2519)
     at com.sleepycat.je.recovery.RecoveryManager.redoLNs(RecoveryManager.java:1325)
     at com.sleepycat.je.recovery.RecoveryManager.buildTree(RecoveryManager.java:602)
     at com.sleepycat.je.recovery.RecoveryManager.recover(RecoveryManager.java:198)
     at com.sleepycat.je.dbi.EnvironmentImpl.finishInit(EnvironmentImpl.java:610)
     - locked <4ed20b72> (a com.sleepycat.je.dbi.EnvironmentImpl)
     at com.sleepycat.je.dbi.DbEnvPool.getEnvironment(DbEnvPool.java:210)
     at com.sleepycat.je.Environment.makeEnvironmentImpl(Environment.java:246)
     at com.sleepycat.je.Environment.<init>(Environment.java:227)
     at com.sleepycat.je.Environment.<init>(Environment.java:170)


-- Dump 2 --
java.lang.Thread.State: RUNNABLE
     at java.io.RandomAccessFile.readBytes(Native Method)
     at java.io.RandomAccessFile.read(RandomAccessFile.java:355)
     at com.sleepycat.je.log.FileManager.readFromFileInternal(FileManager.java:1926)
     - locked <4a5f5b44> (a com.sleepycat.je.log.FileManager$6)
     at com.sleepycat.je.log.FileManager.readFromFile(FileManager.java:1877)
     at com.sleepycat.je.log.FileManager.readFromFile(FileManager.java:1815)
     at com.sleepycat.je.log.FileSource.getBytes(FileSource.java:56)
     at com.sleepycat.je.log.LogManager.getLogEntryFromLogSource(LogManager.java:882)
     at com.sleepycat.je.log.LogManager.getLogEntry(LogManager.java:811)
     at com.sleepycat.je.log.LogManager.getLogEntryAllowInvisibleAtRecovery(LogManager.java:772)
     at com.sleepycat.je.tree.IN.fetchTarget(IN.java:1412)
     at com.sleepycat.je.tree.Tree.searchSubTreeUntilSplit(Tree.java:1786)
     at com.sleepycat.je.tree.Tree.searchSubTreeSplitsAllowed(Tree.java:1729)
     at com.sleepycat.je.tree.Tree.searchSplitsAllowed(Tree.java:1296)
     at com.sleepycat.je.tree.Tree.getParentBINForChildLN(Tree.java:859)
     at com.sleepycat.je.recovery.RecoveryManager.redo(RecoveryManager.java:1959)
     at com.sleepycat.je.recovery.RecoveryManager.redoOneLN(RecoveryManager.java:1518)
     at com.sleepycat.je.recovery.RecoveryManager.redoLNs(RecoveryManager.java:1318)
     at com.sleepycat.je.recovery.RecoveryManager.buildTree(RecoveryManager.java:602)
     at com.sleepycat.je.recovery.RecoveryManager.recover(RecoveryManager.java:198)
     at com.sleepycat.je.dbi.EnvironmentImpl.finishInit(EnvironmentImpl.java:610)
     - locked <4ed20b72> (a com.sleepycat.je.dbi.EnvironmentImpl)
     at com.sleepycat.je.dbi.DbEnvPool.getEnvironment(DbEnvPool.java:210)
     at com.sleepycat.je.Environment.makeEnvironmentImpl(Environment.java:246)
     at com.sleepycat.je.Environment.<init>(Environment.java:227)
     at com.sleepycat.je.Environment.<init>(Environment.java:170)

--

Regards,
Taka

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points