Perrin Harkins schrieb:
On Tue, Jan 20, 2009 at 4:19 PM, Michael Ludwig <m...@as-guides.com>
wrote:
On the other hand, performance isn't what you'd call great, as access
to the database is effectively serialized.

Are you sure about that?

I'm sure about the queries seeming *effectively* serialized, judging
from the timing using the ab tool to test with different concurrency
levels.

Berkeley DB doesn't work that way.  It has read and write locks which
can be set to work at a (memory) page level rather than a database
level.

I know. I don't think this is a limitation of Berkeley DB or DB XML at
all. I think it may stem from me being unable to set up the environment
properly in the mod_perl context.

The query in question uses an index and runs in a transaction flagged
DB_READ_COMMITTED. There aren't any concurrent writes, though.

I think a single-process, multi-threaded approach (as in Java) will
work best for Berkeley DB.

I don't know about dbXML, but Berkeley DB is designed for
multi-process use.  It uses shared memory and locks to coordinate.

Berkeley DB XML is built on top of Berkeley DB, so it is the same in
this regard, as can be seen on slides 12 through 17 (especially 14) of
this nice, new video tutorial:

http://www.oracle.com/technology/products/berkeley-db/tutorial-berkeleydb-ds.html

Michael Ludwig

Reply via email to