3.4. Database Plug-in Attributes

3.4. Database Plug-in Attributes

The database plug-in is also organized in an information tree, as shown in Figure 3.1, “Database Plug-in”.

Database Plug-in
Figure 3.1. Database Plug-in

All plug-in technology used by the database instances is stored in the cn=ldbm database plug-in node. This section presents the additional attribute information for each of the nodes in bold in the cn=ldbm database, cn=plugins, cn=config information tree.

3.4.1. Database Attributes under cn=config, cn=ldbm database, cn=plugins, cn=config

This section covers global configuration attributes common to all instances are stored in the cn=config, cn=ldbm database, cn=plugins, cn=config tree node.

3.4.1.1. nsLookthroughLimit

This performance-related attribute specifies the maximum number of entries that the Directory Server will check when examining candidate entries in response to a search request. The Directory Manager DN, however, is, by default, unlimited and overrides any other settings specified here. It is worth noting that binder-based resource limits work for this limit, which means that if a value for the operational attribute nsLookThroughlimit is present in the entry as which a user binds, the default limit will be overridden. Attempting to set a value that is not a number or is too big for a 32-bit signed integer returns an LDAP_UNWILLING_TO_PERFORM error message with additional error information explaining the problem.

Parameter Description
Entry DN cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Range -1 to maximum 32-bit integer in entries (where -1 is unlimited)
Default Value 5000
Syntax Integer
Example nsLookthroughLimit: 5000

3.4.1.2. nsslapd-idlistscanlimit

This performance-related attribute, present by default, specifies the number of entry IDs that are searched during a search operation. Attempting to set a value that is not a number or is too big for a 32-bit signed integer returns an LDAP_UNWILLING_TO_PERFORM error message, with additional error information explaining the problem.

It is advisable to keep the default value to improve search performance. For a more detailed explanation of the effect of ID lists on search performance, refer to the "Managing Indexes" chapter in the Directory Server Administration Guide.

The server has to be restarted for changes to this attribute to go into effect.

Parameter Description
Entry DN cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Range 100 to the maximum 32-bit integer value (2147483647) entry IDs
Default Value 4000
Syntax Integer
Example nsslapd-idlistscanlimit: 4000

3.4.1.3. nsslapd-cache-autosize

This performance tuning-related attribute, which is turned off by default, specifies the percentage of free memory to use for all the combined caches. For example, if the value is set to 80, then 80 percent of the remaining free memory would be claimed for the cache. To run other servers on the machine, then set the value lower. Setting the value to 0 turns off the cache autosizing and uses the normal nsslapd-cachememsize and nsslapd-dbcachesize attributes.

NOTE

If the nsslapd-cache-autosize attribute and nsslapd-cache-autosize-split attribute are both set to high values, such as 100, then the Directory Server may fail to start and return an error message. To fix this issue, reset the nsslapd-cache-autosize and nsslapd-cache-autosize-split attributes to a more reasonable level. For example:

nsslapd-cache-autosize: 60
nsslapd-cache-autosize-split: 60

Parameter Description
Entry DN cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Range 0 (turns cache autosizing off) to 100
Default Value -1
Syntax Integer
Example nsslapd-cache-autosize: 80

3.4.1.4. nsslapd-cache-autosize-split

This performance tuning-related attribute specifies the percentage of cache space to allocate to the database cache. For example, setting this to 60 would give the database cache 60 percent of the cache space and split the remaining 40 percent between the backend entry caches. That is, if there were two databases, each of them would receive 20 percent. This attribute only applies when the nsslapd-cache-autosize attribute has a value of 0.

NOTE

If the nsslapd-cache-autosize attribute and nsslapd-cache-autosize-split attribute are both set to high values, such as 100, then the Directory Server may fail to start and return error message. To fix this issue, reset the nsslapd-cache-autosize and nsslapd-cache-autosize-split attributes to a more reasonable level. For example:

nsslapd-cache-autosize: 60
nsslapd-cache-autosize-split: 60

Parameter Description
Entry DN cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Range 0 to 99
Default Value 50 (This will not necessarily optimize operations.)
Syntax Integer
Example nsslapd-cache-autosize-split: 50

3.4.1.5. nsslapd-dbcachesize

This performance tuning-related attribute specifies the database index cache size, and is one of the most important values for controlling how much physical RAM the directory server uses.

This is not the entry cache. This is the amount of memory the Berkeley database backend will use to cache the indexes (the .db4 files) and other files. This value is passed to the Berkeley DB API function set_cachesize. If automatic cache resizing is activated, this attribute is overridden when the server replaces these values with its own guessed values at a later stage of the server startup. For more technical information on this attribute, see the cache size section of the Berkeley DB reference guide.

Attempting to set a value that is not a number or is too big for a 32-bit signed integer returns an LDAP_UNWILLING_TO_PERFORM error message with additional error information explaining the problem.

The server has to be restarted for changes to this attribute to go into effect.

Parameter Description
Entry DN cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Range 500 kilobytes to 4 gigabytes for 32-bit platforms and 500 kilobytes to 2^64-1 for 64-bit platforms
Default Value 10000000 bytes
Syntax Integer
Example nsslapd-dbcachesize: 10,000,000

NOTE

On Solaris, the nsslapd-dbcachesize attribute has no effect on performance because the disk/filesystem cache overrides it.

3.4.1.6. nsslapd-db-checkpoint-interval

This sets the amount of time in seconds after which the Directory Server sends a checkpoint entry to the database transaction log. The database transaction log contains a sequential listing of all recent database operations and is used for database recovery only. A checkpoint entry indicates which database operations have been physically written to the directory database. The checkpoint entries are used to determine where in the database transaction log to begin recovery after a system failure. The nsslapd-db-checkpoint-interval attribute is absent from dse.ldif. To change the checkpoint interval, add the attribute to dse.ldif. This attribute can be dynamically modified using ldapmodify. For further information on modifying this attribute, see the "Tuning Directory Server Performance" chapter in the Directory Server Administration Guide.

This attribute is provided only for system modification/diagnostics and should be changed only with the guidance of Red Hat technical support or Red Hat professional services. Inconsistent settings of this attribute and other configuration attributes may cause the Directory Server to be unstable.

For more information on database transaction logging, refer to the "Monitoring Server and Database Activity" chapter in the Directory Server Administration Guide.

Parameter Description
Entry DN cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Range 10 to 300 seconds
Default Value 60
Syntax Integer
Example nsslapd-db-checkpoint-interval: 120

3.4.1.7. nsslapd-db-circular-logging

This attribute specifies circular logging for the transaction log files. If this attribute is switched off, old transaction log files are not removed and are kept renamed as old log transaction files. Turning circular logging off can severely degrade server performance and, as such, should only be modified with the guidance of Red Hat Technical Support or Red Hat Professional Services.

Parameter Description
Entry DN cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Values on | off
Default Value on
Syntax DirectoryString
Example nsslapd-db-circular-logging: on

3.4.1.8. nsslapd-db-debug

This attribute specifies whether additional error information is to be reported to Directory Server. To report error information, set the parameter to on. This parameter is meant for troubleshooting; enabling the parameter may slow down the Directory Server.

Parameter Description
Entry DN cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Values on | off
Default Value off
Syntax DirectoryString
Example nsslapd-db-debug: off

3.4.1.9. nsslapd-db-durable-transactions

This attribute sets whether database transaction log entries are immediately written to the disk. The database transaction log contains a sequential listing of all recent database operations and is used for database recovery only. With durable transactions enabled, every directory change will always be physically recorded in the log file and, therefore, able to be recovered in the event of a system failure. However, the durable transactions feature may also slow the performance of the Directory Server. When durable transactions is disabled, all transactions are logically written to the database transaction log but may not be physically written to disk immediately. If there were a system failure before a directory change was physically written to disk, that change would not be recoverable. The nsslapd-db-durable-transactions attribute is absent from dse.ldif. To disable durable transactions, add the attribute to dse.ldif.

This attribute is provided only for system modification/diagnostics and should be changed only with the guidance of Red Hat Technical Support or Red Hat Professional Services. Inconsistent settings of this attribute and other configuration attributes may cause the Directory Server to be unstable.

For more information on database transaction logging, refer to the "Monitoring Server and Database Activity" chapter in the Directory Server Administration Guide.

Parameter Description
Entry DN cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Values on | off
Default Value on
Syntax DirectoryString
Example nsslapd-db-durable-transactions: on

3.4.1.10. nsslapd-db-home-directory

This is usually applicable to Solaris only, and is used to fix a situation in Solaris where the operating system endlessly flushes pages. This flushing can be so excessive that performance of the entire system is severely degraded.

For users of other systems, to move the database to another physical location for performance reasons, use this parameter to specify the home directory.

This situation will occur only for certain combinations of the database cache size, the size of physical memory, and kernel tuning attributes. In particular, this situation should not occur if the database cache size is less than 100 megabytes.

If the Solaris host seems excessively slow and the database cache size is around 100 megabytes or more, then use the iostat utility to diagnose the problem by monitoring the activity of the disk where the Directory Server's database files are stored. There are three conditions required before resetting the nsslapd-db-home-directory attribute:

  • The disk is heavily used (more than 1 megabyte per second of data transfer).

  • There is a long service time (more than 100ms).

  • There is mostly write activity.

If these are all true, use the nsslapd-db-home-directory attribute to specify a subdirectory of a tempfs type filesystem.

The directory referenced by the nsslapd-db-home-directory attribute must be a subdirectory of a filesystem of type tempfs (such as /tmp). However, Directory Server does not create the subdirectory referenced by this attribute. This directory must be created either manually or by using a script. Failure to create the directory referenced by the nsslapd-db-home-directory attribute will result in Directory Server being unable to start.

Also, if there are multiple Directory Servers on the same machine, their nsslapd-db-home-directory attributes must be configured with different directories. Failure to do so will result in the databases for both directories becoming corrupted.

The use of this attribute causes internal Directory Server database files to be moved to the directory referenced by the attribute. It is possible, but unlikely, that the server will no longer start after the files have been moved because not enough memory can be allocated. This is a symptom of an overly large database cache size being configured for the server. If this happens, reduce the size of the database cache size to a value where the server will start again.

Parameter Description
Entry DN cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Values Any valid directory name in a tempfs filesystem, such as /tmp
Default Value
Syntax DirectoryString
Example nsslapd-db-home-directory: /tmp/slapd-phonebook

3.4.1.11. nsslapd-db-idl-divisor

This attribute specifies the index block size in terms of the number of blocks per database page. The block size is calculated by dividing the database page size by the value of this attribute. A value of 1 makes the block size exactly equal to the page size. The default value of 0 sets the block size to the page size minus an estimated allowance for internal database overhead. For the majority of installations, the default value should not be changed unless there are specific tuning needs.

Before modifying the value of this attribute, export all databases using the db2ldif script. Once the modification has been made, reload the databases using the ldif2db script.

CAUTION

This parameter should only be used by very advanced users.

Parameter Description
Entry DN cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Range 0 to 8
Default Value 0
Syntax Integer
Example nsslapd-db-idl-divisor: 2

3.4.1.12. nsslapd-db-logbuf-size

This attribute specifies the log information buffer size. Log information is stored in memory until the buffer fills up or the transaction commit forces the buffer to be written to disk. Larger buffer sizes can significantly increase throughput in the presence of long running transactions, highly concurrent applications, or transactions producing large amounts of data. The log information buffer size is the transaction log size divided by four.

The nsslapd-db-logbuf-size attribute is only valid if the nsslapd-db-durable-transactions attribute is set to on.

Parameter Description
Entry DN cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Range 32K to maximum 32-bit integer (limited to the amount of memory available on the machine)
Default Value 32K
Syntax Integer
Example nsslapd-db-logbuf-size: 32K

3.4.1.13. nsslapd-db-logdirectory

This attribute specifies the path and directory name of the directory containing the database transaction log. The database transaction log contains a sequential listing of all recent database operations and is used for database recovery only. By default, the database transaction log is stored in the same directory as the directory entries themselves, /var/lib/dirsrv/slapd-instance_name/db. For fault-tolerance and performance reasons, move this log file to another physical disk. The nsslapd-db-logdirectory attribute is absent from dse.ldif. To change the location of the database transaction log, add the attribute to dse.ldif.

For more information on database transaction logging, refer to the "Monitoring Server and Database Activity" chapter in the Directory Server Administration Guide.

Parameter Description
Entry DN cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Values Any valid path and directory name
Default Value
Syntax DirectoryString
Example nsslapd-db-logdirectory: /logs/txnlog

3.4.1.14. nsslapd-db-logfile-size

This attribute specifies the maximum size of a single file in the log in bytes. By default, or if the value is set to 0, a maximum size of 10 megabytes is used. The maximum size is an unsigned 4-byte value.

Parameter Description
Entry DN cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Range 0 to unsigned 4-byte integer
Default Value 10MB
Syntax Integer
Example nsslapd-db-logfile-size: 10 MB

3.4.1.15. nsslapd-db-page-size

This attribute specifies the size of the pages used to hold items in the database in bytes. The minimum size is 512 bytes, and the maximum size is 64 kilobytes. If the page size is not explicitly set, Directory Server defaults to a page size of 8 kilobytes. Changing this default value can have a significant performance impact. If the page size is too small, it results in extensive page splitting and copying, whereas if the page size is too large it can waste disk space.

Before modifying the value of this attribute, export all databases using the db2ldif script. Once the modification has been made, reload the databases using the ldif2db script.

Parameter Description
Entry DN cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Range 512 bytes to 64 kilobytes
Default Value 8KB
Syntax Integer
Example nsslapd-db-page-size: 8KB

3.4.1.16. nsslapd-db-spin-count

This attribute specifies the number of times that test-and-set mutexes should spin without blocking.

CAUTION

Never touch this value unless you are very familiar with the inner workings of Berkeley DB or are specifically told to do so by Red Hat support.

Parameter Description
Entry DN cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Range 0 to 2^31-1
Default Value 0
Syntax Integer
Example nsslapd-db-spin-count: 0

3.4.1.17. nsslapd-db-transaction-batch-val

This attribute specifies how many transactions will be batched before being committed. This attribute can improve update performance when full transaction durability is not required. This attribute can be dynamically modified using ldapmodify. For further information on modifying this attribute, refer to the "Tuning Directory Server Performance" chapter in the Directory Server Administration Guide.

WARNING

Setting this value will reduce data consistency and may lead to loss of data. This is because if there is a power outage before the server can flush the batched transactions, those transactions in the batch will be lost.

Do not set this value unless specifically requested to do so by Red Hat support.

If this attribute is not defined or is set to a value of 0, transaction batching will be turned off, and it will be impossible to make remote modifications to this attribute via LDAP. However, setting this attribute to a value greater than 0 causes the server to delay committing transactions until the number of queued transactions is equal to the attribute value. A value greater than 0 also allows modififications to this attribute remotely via LDAP. A value of 1 for this attribute allows modifications to the attribute setting remotely via LDAP, but results in no batching behavior. A value of 1 at server startup is therefore useful for maintaining normal durability while also allowing transaction batching to be turned on and off remotely when desired. Remember that the value for this attribute may require modifying the nsslapd-db-logbuf-size attribute to ensure sufficient log buffer size for accommodating the batched transactions.

NOTE

The nsslapd-db-transaction-batch-val attribute is only valid if the nsslapd-db-durable-transaction attribute is set to on.

For more information on database transaction logging, refer to the "Monitoring Server and Database Activity" chapter in the Directory Server Administration Guide.

Parameter Description
Entry DN cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Range 0 to 30
Default Value 0 (or turned off)
Syntax Integer
Example nsslapd-db-transaction-batch-val: 5

3.4.1.18. nsslapd-db-trickle-percentage

This attribute sets that at least the specified percentage of pages in the shared-memory pool are clean by writing dirty pages to their backing files. This is to ensure that a page is always available for reading in new information without having to wait for a write.

Parameter Description
Entry DN cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Range 0 to 100
Default Value 40
Syntax Integer
Example nsslapd-db-trickle-percentage: 40

3.4.1.19. nsslapd-db-verbose

This attribute specifies whether to record additional informational and debugging messages when searching the log for checkpoints, doing deadlock detection, and performing recovery. This parameter is meant for troubleshooting, and enabling the parameter may slow down the Directory Server.

Parameter Description
Entry DN cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Values on | off
Default Value off
Syntax DirectoryString
Example nsslapd-db-verbose: off

3.4.1.20. nsslapd-dbncache

This attribute can split the LDBM cache into equally sized separate pieces of memory. It is possible to specify caches that are large enough so that they cannot be allocated contiguously on some architectures; for example, some releases of Solaris limit the amount of memory that may be allocated contiguously by a process. If nsslapd-dbncache is 0 or 1, the cache will be allocated contiguously in memory. If it is greater than 1, the cache will be broken up into ncache, equally sized separate pieces of memory.

To configure a dbcache size larger than 4 gigabytes, add the nsslapd-dbncache attribute to cn=config, cn=ldbm database, cn=plugins, cn=config between the nsslapd-dbcachesize and nsslapd-db-logdirectory attribute lines.

Set this value to an integer that is one-quarter (1/4) the amount of memory in gigabytes. For example, for a 12 gigabyte system, set the nsslapd-dbncache value to 3; for an 8 gigabyte system, set it to 2.

This attribute is provided only for system modification/diagnostics and should be changed only with the guidance of Red Hat technical support or Red Hat professional services. Inconsistent settings of this attribute and other configuration attributes may cause the Directory Server to be unstable.

The server has to be restarted for changes to this attribute to go into effect.

Parameter Description
Entry DN cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Values 1 to 4
Default Value 1
Syntax Integer
Example nsslapd-dbncache: 1

3.4.1.21. nsslapd-directory

This attribute specifies absolute path to database instance. If the database instance is manually created then this attribute must be included, something which is set by default (and modifiable) in the Directory Server Console. Once the database instance is created, do not modify this path as any changes risk preventing the server from accessing data.

Parameter Description
Entry DN cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Values Any valid absolute path to the database instance
Default Value
Syntax DirectoryString
Example nsslapd-directory: /var/lib/dirsrv/slapd-instance_name/db

3.4.1.22. nsslapd-import-cachesize

This performance tuning-related attribute determines the size of the database cache used in the bulk import process. Setting this attribute value so that the maximum available system physical memory is used for the database cache during bulk importing optimizes bulk import speed. Attempting to set a value that is not a number or is too big for a 32-bit signed integer returns an LDAP_UNWILLING_TO_PERFORM error message, with additional error information explaining the problem.

NOTE

A cache is created for each load that occurs. For example, if the user sets the nsslapd-import-cachesize attribute to 1 gigabyte, then 1 gigabyte is used when loading one database, 2 gigabytes is used when loading two databases, and so on. Ensure there is sufficient physical memory to prevent swapping from occurring, as this would result in performance degradation.

Parameter Description
Entry DN cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Range 500 kilobytes to 4 gigabytes for 32-bit platforms and 500 kilobytes to 2^64-1 for 64-bit platforms
Default Value 20 000 000
Syntax Integer
Example nsslapd-import-cachesize: 20 000 000

3.4.1.23. nsslapd-import-cache-autosize

This performance tuning-related attribute automatically sets the size of the import cache (importCache) to be used during the command-line-based import process of LDIF files to the database (the ldif2db operation).

In Directory Server, the import operation can be run as a server task or exclusively on the command-line. In the task mode, the import operation runs as a general Directory Server operation. The nsslapd-import-cache-autosize attribute enables the importCache to be set automatically to a predetermined size when the import operation is run on the command-line. The attribute can also be used by Directory Server during the task mode import for allocating a specified percentage of free memory for importCache.

By default, the nsslapd-import-cache-autosize attribute is enabled and is set to a value of -1. This value autosizes importCache for the ldif2db operation only, automatically allocating fifty percent (50%) of the free physical memory for importCache. The percentage value (50%) is hardcoded and cannot be changed.

Setting the attribute value to 50 (nsslapd-import-cache-autosize: 50) has the same effect on performance during an ldif2db operation. However, such a setting will have the same effect on performance when the import operation is run as a Directory Server task. The -1 value autosizes importCache just for the ldif2db operation and not for any, including import, general Directory Server tasks.

NOTE

The purpose of a -1 setting is to enable the ldif2db operation to benefit from free physical memory but, at the same time, not compete for valuable memory with entryCache, which is used for general operations of the Directory Server.

Setting the nsslapd-import-cache-autosize attribute value to 0 turns off the importCache autosizing feature - that is, no autosizing occurs during either mode of the import operation. Instead, Directory Server uses the Section 3.4.1.22, “nsslapd-import-cachesize” attribute for import cache size, with a default of 20,000,000.

There are three caches in the context of Directory Server: dbCache, entryCache, and importCache. importCache is only used during the import operation. The nsslapd-cache-autosize attribute, which is used for autosizing entryCache and dbCache, is used during the Directory Server operations only and not during the ldif2db command-line operation; the attribute value is the percentage of free physical memory to be allocated for entryCache and dbCache.

If both the autosizing attributes, nsslapd-cache-autosize and nsslapd-import-cache-autosize, are enabled, ensure that their sum is less than 100.

Parameter Description
Entry DN cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Range -1, 0 (turns import cache autosizing off) to 100
Default Value -1 (turns import cache autosizing on for ldif2db only and allocates 50% of the free physical memory to importCache)
Syntax Integer
Example nsslapd-import-cache-autosize: -1

3.4.1.24. nsslapd-mode

This attribute specifies the permissions used for newly created index files.

Parameter Description
Entry DN cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Values Any four-digit octal number. However, mode 0600 is recommended. This allows read and write access for the owner of the index files (which is the user as whom the ns-slapd runs) and no access for other users.
Default Value 600
Syntax Integer
Example nsslapd-mode: 0600

3.4.2. Database Attributes under cn=monitor, cn=ldbm database, cn=plugins, cn=config

Global read-only attributes containing database statistics for monitoring activity on the databases are stored in the cn=monitor, cn=ldbm database, cn=plugins, cn=config tree node. For more information on these entries, refer to the "Monitoring Server and Database Activity" chapter in the Directory Server Administration Guide.

dbcachehits

This attribute shows the requested pages found in the database.

dbcachetries

This attribute shows the total cache lookups.

dbcachehitratio

This attribute shows the percentage of requested pages found in the database cache (hits/tries).

dbcachepagein

This attribute shows the pages read into the database cache.

dbcachepageout

This attribute shows the pages written from the database cache to the backing file.

dbcacheroevict

This attribute shows the clean pages forced from the cache.

dbcacherwevict

This attribute shows the dirty pages forced from the cache.

3.4.3. Database Attributes under cn=NetscapeRoot, cn=ldbm database, cn=plugins, cn=config and cn=UserRoot, cn=ldbm database, cn=plugins, cn=config

The cn=NetscapeRoot and cn=UserRoot subtrees contain configuration data for, or the definition of, the databases containing the o=NetscapeRoot and o=UserRoot suffixes, respectively. The cn=NetscapeRoot subtree contains the configuration data used by the Administration Server for authentication and all actions that cannot be performed through LDAP (such as start/stop), and the cn=UserRoot subtree contains all the configuration data for the user-defined database.

The cn=UserRoot subtree is called userRoot by default. However, this is not hard-coded and, given the fact that there are going to be multiple database instances, this name is changed and defined by the user as and when new databases are added. The following attributes are common to both the cn=NetscapeRoot, cn=ldbm database, cn=plugins, cn=config and cn=userRoot, cn=ldbm database, cn=plugins, cn=config subtrees.

3.4.3.1. nsslapd-cachesize

This performance tuning-related attribute specifies the cache size in terms of the entries it can hold. However, it is simpler to limit by memory size only (as in Section 3.4.3.2, “nsslapd-cachememsize”). Attempting to set a value that is not a number or is too big for a 32-bit signed integer returns an LDAP_UNWILLING_TO_PERFORM error message with additional error information explaining the problem.

The server has to be restarted for changes to this attribute to go into effect.

Parameter Description
Entry DN cn=NetscapeRoot, cn=ldbm database, cn=plugins, cn=config or cn=UserRoot, cn=ldbm database, cn=plugins, cn=config
Valid Range 1 to 2,147,483,647 (or -1, which means limitless) entries
Default Value -1
Syntax Integer
Example nsslapd-cachesize: -1

3.4.3.2. nsslapd-cachememsize

This performance tuning-related attribute specifies the cache size in terms of available memory space. The simplest method is limiting cache size in terms of memory occupied. Activating automatic cache resizing overrides this attribute, replacing these values with its own guessed values at a later stage of the server startup. Attempting to set a value that is not a number or is too big for a 32-bit signed integer returns an LDAP_UNWILLING_TO_PERFORM error message with additional error information explaining the problem.

Parameter Description
Entry DN cn=NetscapeRoot, cn=ldbm database, cn=plugins, cn=config or cn=UserRoot, cn=ldbm database, cn=plugins, cn=config
Valid Range 500 kilobytes to 4 gigabytes for 32-bit platforms and 500 kilobytes to 2^64-1 for 64-bit platforms
Default Value 10,485,760 (10 megabytes)
Syntax Integer
Example nsslapd-cachememsize: 10485760

3.4.3.3. nsslapd-directory

This attribute specifies the path to the database instance. If it is a relative path, it starts from the path specified by nsslapd-directory in the global database entry cn=config, cn=ldbm database, cn=plugins, cn=config. The database instance directory is named after the instance name and located in the global database directory, by default. After the database instance has been created, do not modify this path, because any changes risk preventing the server from accessing data.

Parameter Description
Entry DN cn=instance name, cn=ldbm database, cn=plugins, cn=config
Valid Values Any valid path to the database instance
Default Value
Syntax DirectoryString
Example nsslapd-directory: /var/lib/dirsrv/slapd-instance_name/db/userRoot

3.4.3.4. nsslapd-readonly

This attribute specifies read-only mode for a single back-end instance. If this attribute has a value of off, then users have all read, write, and execute permissions allowed by their access permissions.

Parameter Description
Entry DN cn=NetscapeRoot, cn=ldbm database, cn=plugins, cn=config or cn=UserRoot, cn=ldbm database, cn=plugins, cn=config
Valid Values on | off
Default Value off
Syntax DirectoryString
Example nsslapd-readonly: off

3.4.3.5. nsslapd-require-index

When switched to on, this attribute allows one to refuse unindexed searches. This performance-related attribute avoids saturating the server with erroneous searches.

Parameter Description
Entry DN cn=NetscapeRoot, cn=ldbm database, cn=plugins, cn=config or cn=UserRoot, cn=ldbm database, cn=plugins, cn=config
Valid Values on | off
Default Value off
Syntax DirectoryString
Example nsslapd-require-index: off

3.4.3.6. nsslapd-suffix

This attribute specifies the suffix of the database link. This is a single-valued attribute because each database instance can have only one suffix. Previously, it was possible to have more than one suffix on a single database instance, but this is no longer the case. As a result, this attribute is single-valued to enforce the fact that each database instance can only have one suffix entry. Any changes made to this attribute after the entry has been created take effect only after the server containing the database link is restarted.

Parameter Description
Entry DN cn=NetscapeRoot, cn=ldbm database, cn=plugins, cn=config or cn=UserRoot, cn=ldbm database, cn=plugins, cn=config
Valid Values Any valid DN
Default Value
Syntax DirectoryString
Example nsslapd-suffix: o=NetscapeRoot

3.4.4. Database Attributes under cn=database, cn=monitor, cn=ldbm database, cn=plugins, cn=config

The attributes in this tree node entry are all read-only, database performance counters. All of the values for these attributes are 32-bit integers.

nsslapd-db-abort-rate

This attribute shows the number of transactions that have been aborted.

nsslapd-db-active-txns

This attribute shows the number of transactions that are currently active.

nsslapd-db-cache-hit

This attribute shows the requested pages found in the cache.

nsslapd-db-cache-try

This attribute shows the total cache lookups.

nsslapd-db-cache-region-wait-rate

This attribute shows the number of times that a thread of control was forced to wait before obtaining the region lock.

nsslapd-db-cache-size-bytes

This attribute shows the total cache size in bytes.

nsslapd-db-clean-pages

This attribute shows the clean pages currently in the cache.

nsslapd-db-commit-rate

This attribute shows the number of transactions that have been committed.

nsslapd-db-deadlock-rate

This attribute shows the number of deadlocks detected.

nsslapd-db-dirty-pages

This attribute shows the dirty pages currently in the cache.

nsslapd-db-hash-buckets

This attribute shows the number of hash buckets in buffer hash table.

nsslapd-db-hash-elements-examine-rate

This attribute shows the total number of hash elements traversed during hash table lookups.

nsslapd-db-hash-search-rate

This attribute shows the total number of buffer hash table lookups.

nsslapd-db-lock-conflicts

This attribute shows the total number of locks not immediately available due to conflicts.

nsslapd-db-lock-region-wait-rate

This attribute shows the number of times that a thread of control was forced to wait before obtaining the region lock.

nsslapd-db-lock-request-rate

This attribute shows the total number of locks requested.

nsslapd-db-lockers

This attribute shows the number of current lockers.

nsslapd-db-log-bytes-since-checkpoint

This attribute shows the number of bytes written to this log since the last checkpoint.

nsslapd-db-log-region-wait-rate

This attribute shows the number of times that a thread of control was forced to wait before obtaining the region lock.

nsslapd-db-log-write-rate

This attribute shows the number of megabytes and bytes written to this log.

nsslapd-db-longest-chain-length

This attribute shows the longest chain ever encountered in buffer hash table lookups.

nsslapd-db-page-create-rate

This attribute shows the pages created in the cache.

nsslapd-db-page-read-rate

This attribute shows the pages read into the cache.

nsslapd-db-page-ro-evict-rate

This attribute shows the clean pages forced from the cache.

nsslapd-db-page-rw-evict-rate

This attribute shows the dirty pages forced from the cache.

nsslapd-db-page-trickle-rate

This attribute shows the dirty pages written using the memp_trickle interface.

nsslapd-db-page-write-rate

This attribute shows the pages read into the cache.

nsslapd-db-pages-in-use

This attribute shows all pages, clean or dirty, currently in use.

nsslapd-db-txn-region-wait-rate

This attribute shows the number of times that a thread of control was force to wait before obtaining the region lock.

3.4.5. Database Attributes under cn=default indexes, cn=config, cn=ldbm database, cn=plugins, cn=config

The set of default indexes is stored here. Default indexes are configured per backend in order to optimize Directory Server functionality for the majority of setup scenarios. All indexes, except system-essential ones, can be removed, but care should be taken so as not to cause unnecessary disruptions. For further information on indexes, refer to the "Managing Indexes" chapter in the Directory Server Administration Guide.

3.4.5.1. nsSystemIndex

This mandatory attribute specifies whether the index is a system index, an index which is vital for Directory Server operations. If this attribute has a value of true, then it is system-essential. System indexes should not be removed, as this will seriously disrupt server functionality.

Parameter Description
Entry DN cn=default indexes, cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Values true | false
Default Value
Syntax DirectoryString
Example nssystemindex: true

3.4.5.2. nsIndexType

This optional, multi-valued attribute specifies the type of index for Directory Server operations and takes the values of the attributes to be indexed. Each desired index type has to be entered on a separate line.

Parameter Description
Entry DN cn=default indexes, cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Values
  • pres = presence index

  • eq = equality index

  • approx = approximate index

  • sub = substring index

  • matching rule = international index

  • index browse = browsing index

Default Value
Syntax DirectoryString
Example nsindextype: eq

3.4.5.3. nsMatchingRule

This optional, multi-valued attribute specifies the ordering matching rule name or OID used to match values and to generate index keys for the attribute. This is most commonly used to ensure that equality and range searches work correctly for languages other than English (7-bit ASCII).

This is also used to allow range searches to work correctly for integer syntax attributes that do not specify an ordering matching rule in their schema definition. uidNumber and gidNumber are two commonly used attributes that fall into this category.

For example, for a uidNumber that uses integer syntax, the rule attribute could be nsMatchingRule: integerOrderingMatch.

NOTE

Any change to this attribute will not take effect until the change is saved and the index is rebuilt using db2index, which is described in more detail in the "Managing Indexes" chapter of the Directory Server Administration Guide).

Parameter Description
Entry DN cn=default indexes, cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Values Any valid collation order object identifier (OID)
Default Value None
Syntax DirectoryString
Example nsMatchingRule: 2.16.840.1.113730.3.3.2.3.1 (For Bulgarian)

3.4.5.4. cn

This attribute provides the name of the attribute to index.

Parameter Description
Entry DN cn=default indexes, cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Values Any valid index cn
Default Value None
Syntax DirectoryString
Example cn: aci

3.4.5.5. description

This optional attribute provides a free-hand text description of what the index actually performs.

Parameter Description
Entry DN cn=default indexes, cn=config, cn=ldbm database, cn=plugins, cn=config
Valid Values
Default Value None
Syntax DirectoryString
Example description:substring index

3.4.6. Database Attributes under cn=monitor, cn=NetscapeRoot, cn=ldbm database, cn=plugins, cn=config

This section covers global, read-only entries for monitoring activity on the NetscapeRoot database. The attributes containing database statistics are given for each file that makes up the database. For further information, see the "Monitoring Server and Database Activity" chapter in the Directory Server Administration Guide.

dbfilenamenumber

This attribute gives the name of the file and provides a sequential integer identifier (starting at 0) for the file. All associated statistics for the file are given this same numerical identifier.

dbfilecachehit

This attribute gives the number of times that a search requiring data from this file was performed and that the data were successfully obtained from the cache.

dbfilecachemiss

This attribute gives the number of times that a search requiring data from this file was performed and that the data could not be obtained from the cache.

dbfilepagein

This attribute gives the number of pages brought to the cache from this file.

dbfilepageout

This attribute gives the number of pages for this file written from cache to disk.

3.4.7. Database Attributes under cn=index, cn=NetscapeRoot, cn=ldbm database, cn=plugins, cn=config and cn=index, cn=UserRoot, cn=ldbm database, cn=plugins, cn=config

In addition to the set of default indexes that are stored under cn=default indexes, cn=config, cn=ldbm database, cn=plugins, cn=config, custom indexes can be created for o=NetscapeRoot, o=UserRoot, and user-defined backend instances; these are stored under cn=index,cn=database_name,cn=ldbm database, cn=plugins, cn=config. Each indexed attribute represents a subentry under the cn=config information tree nodes, as shown in the following diagram:

Indexed Attribute Representing a Subentry
Figure 3.2. Indexed Attribute Representing a Subentry

For example, the index file for the aci attribute under o=UserRoot appears in the Directory Server as follows:

dn:cn=aci, cn=index, cn=UserRoot, cn=ldbm database, cn=plugins, cn=config
objectclass:top
objectclass:nsIndex
cn:aci
nssystemindex:true
nsindextype:pres

For details regarding the five possible indexing attributes, see the section Section 3.4.5, “Database Attributes under cn=default indexes, cn=config, cn=ldbm database, cn=plugins, cn=config”. For further information about indexes, refer to the "Managing Indexes" chapter in the Directory Server Administration Guide.

3.4.8. Database Attributes under cn=attributeName, cn=encrypted attributes, cn=database_name, cn=ldbm database, cn=plugins, cn=config

The nsAttributeEncryption object class allows selective encryption of attributes within a database. Extremely sensitive information such as credit card numbers and government identification numbers may not be protected enough by routine access control measures. Normally, these attribute values are stored in CLEAR within the database; encrypting them while they are stored adds another layer of protection. This object class has one attribute, nsEncryptionAlgorithm, which sets the encryption cipher used per attribute. Each encrypted attribute represents a subentry under the above cn=config information tree nodes, as shown in the following diagram:

Encrypted Attributes under the cn=config Node
Figure 3.3. Encrypted Attributes under the cn=config Node

For example, the database encryption file for the userPassword attribute under o=UserRoot appears in the Directory Server as follows:

dn:cn=userPassword, cn=encrypted attributes,o=UserRoot, cn=ldbm database,
cn=plugins, cn=config
objectclass:top
objectclass:nsAttributeEncryption
cn:userPassword
nsEncryptionAlgorithm:AES

To configure database encryption, see the "Database Encryption" section of the "Configuring Directory Databases" chapter in the Directory Server Administration Guide. For more information about indexes, refer to the "Managing Indexes" chapter in the Directory Server Administration Guide.

3.4.8.1. nsEncryptionAlgorithm

nsEncryptionAlgorithm selects the cipher used by nsAttributeEncryption. The algorithm can be set per encrypted attribute.

Parameter Description
Entry DN cn=attributeName, cn=encrypted attributes, cn=databaseName, cn=ldbm database, cn=plugins, cn=config
Valid Values The following are supported ciphers:
  • Advanced Encryption Standard Block Cipher (AES)

  • Triple Data Encryption Standard Block Cipher (3DES)

Default Value
Syntax DirectoryString
Example nsEncryptionAlgorithm: AES

Note: This documentation is provided {and copyrighted} by Red Hat®, Inc. and is released via the Open Publication License. The copyright holder has added the further requirement that Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. The CentOS project redistributes these original works (in their unmodified form) as a reference for CentOS-5 because CentOS-5 is built from publicly available, open source SRPMS. The documentation is unmodified to be compliant with upstream distribution policy. Neither CentOS-5 nor the CentOS Project are in any way affiliated with or sponsored by Red Hat®, Inc.