DbEnv::set_mp_mtxcount()

#include <db_cxx.h>

int
DbEnv::set_mp_mtxcount(u_int32_t mtxcount);

The DbEnv::set_mp_mtxcount() method overrides the default number of mutexes for the hash table in each memory pool cache. The defualt is one mutex per hash bucket. Setting it to a lower number decreases the number of mutexes used and the amount of memory needed to store them at the expense of concurrency in the memory pool. This can also improve startup time. Setting a number greater than the number size of the hash table will waste mutexes and space.

You must call this method only before the environment is opened.

Parameters

mtxcount

Specifies the number of mutexes allocated to the buffer pool hash table.

Class

DbEnv, DbMpoolFile

See Also

Memory Pools and Related Methods, DbEnv::get_mp_mtxcount()