2 Replies Latest reply: Jun 20, 2012 9:56 AM by Greybird-Oracle RSS

    Random fetch from com.sleepycat.je.Database slows down non-linearly

    944569
      Hello, friends!

      Testing BerkeleyDB JE I found strange thing: random fetching from collection of 100000 elements appears to be several times faster than from collection of 140000 elements.

      Since I first asked it on StackOverflow, I would not crosspost details, but will provide a link:
      http://stackoverflow.com/questions/11098085/berkeleydb-je-random-access-time-increases-non-linearly
      Here is my source code.

      If I skip the second test and start random fetching immediately after insertion, then the difference is even more significant - 8 seconds for 100000 elements and 3 minutes for 140000 elements. I am definitely missing something, but I could not find out what.

      (software versions: BerkeleyDB JE 5.0.48, Java 6)

      Edited by: 941566 on Jun 19, 2012 4:44 AM
        • 1. Re: Random fetch from com.sleepycat.je.Database slows down non-linearly
          Charles Lamb
          Hello,

          Your post does not say what cache size you are using. You should run DbCacheSize to calculate the correct cache size.

          Charles Lamb
          • 2. Re: Random fetch from com.sleepycat.je.Database slows down non-linearly
            Greybird-Oracle
            Also see:
            http://www.oracle.com/technetwork/database/berkeleydb/je-faq-096044.html#WhyshouldtheJEcachebelargeenoughtoholdtheBtreeinternalnodes

            --mark