in reply to Re^2: Increasing CPU Usage/Decreasing Run Time
in thread Increasing CPU Usage/Decreasing Run Time

I've used DB_File rather than BerkeleyDB::Hash, but I assume that the options available are similar. They are mentioned for the different DB types here as a part of the DB_File docs. I would assume that you are using what DB_File refers to as a DB_File::HASHINFO. The parameters you probably need to consider varying are the cachesize, bsize & ffactor.

However, the DB_File docs gives no information on how to vary these options for performance. Eg. An ever bigger cache does not always render better performance.

Optimising the options requires a fairly keen understanding of the nature of your data and the usage patterns of your application.

I did find that the documentation here, particularly section 2, was useful, but be prepared for doing a lot of experimentation.

The best guide I found to performance tuning was this page. Unfortunately, much of the advice relies upon your having access to one or more of the Berkeley DB utilities, which I never located for Win32. None the less, the information on that page proved very useful as a guide to some trial & error testing.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.