This discussion is archived
2 Replies Latest reply: Jun 20, 2012 7:56 AM by greybird RSS

Random fetch from slows down non-linearly

944569 Newbie
Currently Being Moderated
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:
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 slows down non-linearly
    Charles Lamb Pro
    Currently Being Moderated

    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 slows down non-linearly
    greybird Expert
    Currently Being Moderated
    Also see:



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