in reply to Caching DBM hash tie

You mention that you are having scaling problems, but you don't give us any indication of the numbers. This makes it hard to give suggestions since we have no idea how serious the issue is.

30 seconds to perform a write to a DBM file is insane. How much are you writing? How long is the DBM opened for write access? Are you opening the DBM for write, reading data, performing some calculations and then writing? Do you have more writers than readers? How much data are you talking about? Are the same values consistantly being changed or are changes spread out across your dataset (row level locking won't improve concurency if everyone wants to change the same value).

Unless you are getting really high hit rates, I would guess that you could optimize your code to remove some of these delays that you are observing. I would definately look into MLDBM::Sync if you are not already using it right now. It may allow you to minimize the time needed for your DBM to be open for writing.

In other words, I would look at optimizing your code before looking into delayed writes.

And if all else fails, you could always throw more hardware at your problem...

- Cees