Library Version 11.2.5.2

DB_ENV->set_mp_mtxcount()
Prev | Chapter 8. The DB_MPOOLFILE Handle | Next

## DB_ENV->set_mp_mtxcount()

    #include <db.h>

    int
    DB_ENV->set_mp_mtxcount(DB_ENV *dbenv, u_int32_t mtxcount);

The `DB_ENV->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

DB_ENV, DB_MPOOLFILE

### See Also

Memory Pools and Related Methods, DB_ENV->get_mp_mtxcount()

Prev | Up | Next
DB_ENV->set_mp_mmapsize() | Home | DB_ENV->set_mp_pagesize()