nittanymountain (AT) gmail (DOT) com wrote:
Quote:
BDB's environment is counterpart of database in MySQL ( or RDBMS),
right? BDB's database is like a table in mysql. |
Yes, that is correct.
Quote:
I just wonder, how many bdb databases I can open in one environment
without slowing down the system significantly. I guess it will slow
down the system, if you open too many database. |
Having a large number of open databases should not affect the run-time
characteristics of the Berkeley DB system, with the single exception of
checkpoint operations, as checkpoint writes information about the set
of open databases into the log. Sleepycat Software has customer
applications that have 1000's of open databases, without run-time
performance problems.
That said, I would suggest building with the current 4.4 release --
there were fixes between the 4.3 and 4.4 releases to minimize the
impact of large numbers of open databases on the system (specifically,
transaction checkpoint and cache flush operations could hold mutexes
across file sync operations, and with enough open file descriptors,
that could be a problem).
Opening a database is a fairly heavy-weight operation in Berkeley DB,
however, so the initial opening of a large number of databases is
likely to take a fair amount of time in the application.
Regards,
--keith
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Keith Bostic bostic (AT) sleepycat (DOT) com
Sleepycat Software Inc. keithbosticim (Yahoo IM)
118 Tower Rd. +1-781-259-3139
Lincoln, MA 01773 http://www.sleepycat.com