Managing the Locking Subsystem

Whenever the BDB SQL interface reads from or writes to the database, the underlying Berkeley DB code must acquire locks. These locks represent a finite resource. For most installations, you should never have to worry about the locking resources available to Berkeley DB because the default values are appropriate for most applications.

However, if your application is using an extremely large number of threads that are all simultaneously accessing your data, then you might have to increase your locking resources. Similarly, if your database contains a very large number of tables that you are accessing using one or more simultaneous threads or processes, then you might also need to increase your locking resources.

On the other hand, if you are using the BDB SQL interface on devices with extremely limited resources, then you might want to reduce your locking resources.

All of these values must be configured before your environment is first created. To change these values after environment creation time, you must re-create the environment. See The DB_CONFIG File for more information.

The maximum locking values that you can manage, and the DB_CONFIG parameter that you use to manage that value, are:

Note that when you are using the BDB SQL interface, the default values provided in the previous list are different from the default values used by Berkeley DB in general. For Berkeley DB in general, the defaults for all these values are set to 1,000.