Is there an upper limit to mdb_env_set_maxdbs()? And what's the overhead for adding additional DBs? Can I change this number once it's set if I close and reopen the env?
Ben Johnson ben@skylandlabs.com
Ben Johnson wrote:
Is there an upper limit to mdb_env_set_maxdbs()? And what's the overhead for adding additional DBs? Can I change this number once it's set if I close and reopen the env?
The upper limit is the upper limit of an unsigned int. The overhead is about 96 bytes per DB on a 64 bit machine. Yes, you can change the number if you close and reopen the env, it's not persisted on disk. It's just sizing an array in your MDB_env.
Ben Johnson ben@skylandlabs.com mailto:ben@skylandlabs.com
Ben Johnson writes:
Is there an upper limit to mdb_env_set_maxdbs()?
In theory INT_MAX or memory limits (see below), not that it'd be a good idea to go that high.
And what's the overhead for adding additional DBs?
Around 60 bytes malloc & init overhead per DB for each txn and env, or half that on a 32-bit machine. Also time to scan some of that memory now and then.
Can I change this number once it's set if I close and reopen the env?
Yes. It only affects the MDB_env structure, not the database.
openldap-technical@openldap.org