Christian Jaeger wrote:
> Yes, it uses a separate file for each variable. This way also locking
> is solved, each variable has it's own file lock.

You should take a look at DeWitt Clinton's Cache::FileCache module,
announced on this list.  It might make sense to merge your work into
that module, which is the next generation of the popular File::Cache
module.

> It's a bit difficult to write a realworld benchmark.

It certainly is.  Benchmarking all of the options is something that I've
always wanted to do and never find enough time for.

> I've tried to
> use DB_File before but it was very slow when doing a sync after every
> write as is recommended in various documentation to make it
> multiprocess safe. What do you mean with BerkeleyDB, something
> different than DB_File?

BerkeleyDB.pm is an interface to later versions of the Berkeley DB
library.  It has a shared memory cache, and does not require syncing or
opening and closing of files on every access.  It has built-in locking,
which can be configured to work at a page level, allowing mutiple
simultaneous writers.

> Currently I don't use Mmap (are there no cross platform issues using
> that?), that might speed it up a bit more.

That would be a nice option.  Take a look at Cache::Mmap before you
start.

- Perrin

Reply via email to