15.8. Monitoring Database Activity
nsslapd-counters attribute enabled the Directory Server to use 64-bit values for counter numbers, even on 32-bit systems. This enables long term statistics gathering for high-traffic systems.
- entrycachehits
- entrycachetries
- currententrycachesize
- maxentrycachesize
Note
15.8.1. Monitoring Database Activity from the Directory Server Console
- In the Directory Server Console, select the Status tab.
- In the navigation tree, expand the Performance Counters folder, and select the database to monitor.The tab displays current information about database activity. If the server is currently not running, this tab will not provide performance monitoring information.

- Click to refresh the currently displayed information. For the directory to continuously update the displayed information, select the Continuous check box, and then click .
Table 15.8. General Information (Database)
| Field | Description |
|---|---|
| Database | Identifies the type of database being monitored. |
| Configuration DN | Identifies the distinguished name that must be used as a search base to obtain these results using the ldapsearch command-line utility. |
Table 15.9. Summary Information
Table 15.10. Database Cache Information
| Performance Metric | Current Total |
|---|---|
| Hits | The number of times the database cache successfully supplied a requested page. |
| Tries | The number of times the database cache was asked for a page. |
| Hit Ratio |
The ratio of database cache hits to database cache tries. The closer this value is to 100%, the better. Whenever a directory operation attempts to find a portion of the database that is not present in the database cache, the directory has to perform a disk access to obtain the appropriate database page. Thus, as this ratio drops towards zero, the number of disk accesses increases, and directory performance drops.
To improve this ratio, increase the amount of data that the directory maintains in the database cache by increasing the value of the
nsslapd-dbcachesize attribute. This is the Maximum Cache Size database setting in the Directory Server Console.
|
| Pages Read In | The number of pages read from disk into the database cache. |
| Pages Written Out | The number of pages written from the cache back to disk. A database page is written to disk whenever a read-write page has been modified and then subsequently deleted from the cache. Pages are deleted from the database cache when the cache is full and a directory operation requires a database page that is not currently stored in cache. |
| Read-Only Page Evicts | The number of read-only pages discarded from the cache to make room for new pages. |
| Read-Write Page Evicts | The number of read-write pages discarded from the cache to make room for new pages. This value differs from Pages Written Out in that these are discarded read-write pages that have not been modified. |
Table 15.11. Database File-Specific
| Performance Metric | Current Total |
|---|---|
| Cache Hits | The number of times that a search result resulted in a cache hit on this specific file. That is, a client performs a search that requires data from this file, and the directory obtains the required data from the cache. |
| Cache Misses | The number of times that a search result failed to hit the cache on this specific file. That is, a search that required data from this file was performed, and the required data could not be found in the cache. |
| Pages Read In | The number of pages brought to the cache from this file. |
| Pages Written Out | The number of pages for this file written from cache to disk. |
15.8.2. Monitoring Databases from the Command Line
ldapsearch. The search targets the monitoring subtree of the LDBM database entry, cn=monitor,cn=database_name,cn=ldbm database,cn=plugins,cn=config. This contains all of the monitoring attributes for the that specific database instance.
ldapsearch -D "cn=directory manager" -w secret -p 389 -h server.example.com -x -s base -b "cn=monitor,cn=database_name,cn=ldbm database,cn=plugins,cn=config" "(objectclass=*)"
Table 15.12. Database Monitoring Attributes
| Attribute | Description |
|---|---|
| database | Identifies the type of database currently being monitored. |
| readonly | Indicates whether the database is in read-only mode; 0 means that the server is not in read-only mode, 1 means that it is in read-only mode. |
| entrycachehits | The total number of successful entry cache lookups. That is, the total number of times the server could process a search request by obtaining data from the cache rather than by going to disk. |
| entrycachetries | The total number of entry cache lookups since the directory was last started. That is, the total number of search operations performed against the server since server startup. |
| entrycachehitratio |
Ratio that indicates the number of entry cache tries to successful entry cache lookups. This number is based on the total lookups and hits since the directory was last started. The closer this value is to 100%, the better. Whenever a search operation attempts to find an entry that is not present in the entry cache, the directory has to perform a disk access to obtain the entry. Thus, as this ratio drops towards zero, the number of disk accesses increases, and directory search performance drops.
To improve this ratio, increase the size of the entry cache by increasing the value of the
nsslapd-cachememsize attribute in the cn=database_name, cn=ldbm database,cn=plugins,cn=config entry for the database. In the Directory Server Console, this is set in the Memory available for cache field in the database settings.
|
| currententrycachesize |
The total size, in bytes, of directory entries currently present in the entry cache.
To increase the size of the entries which can be present in the cache, increase the value of the
nsslapd-cachememsize attribute in the cn=database_name, cn=ldbm database,cn=plugins,cn=config entry for the database. In the Directory Server Console, this is set in the Memory available for cache field in the database settings.
|
| maxentrycachesize |
The maximum size, in bytes, of directory entries that can be maintained in the entry cache.
To increase the size of the entries which can be present in the cache, increase the value of the
nsslapd-cachememsize attribute in the cn=database_name, cn=ldbm database,cn=plugins,cn=config entry for the database. In the Directory Server Console, this is set in the Memory available for cache field in the database settings.
|
| dbcachehits | The number of times the server could process a request by obtaining data from the cache rather than by going to the disk. |
| dbcachetries | The total number of database accesses since server startup. |
| dbcachehitratio | The ratio of cache tries to successful cache hits. The closer this number is to 100%, the better. |
| dbcachepagein | The number of pages read from disk into the cache. |
| dbcachepageout | The number of pages written from the cache back to disk. |
| dbcacheroevict | The number of read-only pages discarded from the cache to make room for new pages. Pages discarded from the cache have to be written to disk, possibly affecting server performance. The lower the number of page evicts the better. |
| dbcacherwevict | The number of read-write pages discarded from the cache to make room for new pages. This value differs from Pages Written Out in that these are discarded read-write pages that have not been modified. Pages discarded from the cache have to be written to disk, possibly affecting server performance. The lower the number of page evicts the better. |
| dbfilename-number | The name of the file. number provides a sequential integer identifier (starting at 0) for the file. All associated statistics for the file are given this same numerical identifier. |
| dbfilecachehit-number | The number of times that a search result resulted in a cache hit on this specific file. That is, a client performs a search that requires data from this file, and the directory obtains the required data from the cache. |
| dbfilecachemiss-number | The number of times that a search result failed to hit the cache on this specific file. That is, a search that required data from this file was performed, and the required data could not be found in the cache. |
| dbfilepagein-number | The number of pages brought to the cache from this file. |
| dbfilepageout-number | The number of pages for this file written from cache to disk. |
| currentdncachesize |
The total size, in bytes, of DNs currently present in the DN cache.
To increase the size of the entries which can be present in the DN cache, increase the value of the
nsslapd-dncachememsize attribute in the cn=database_name, cn=ldbm database,cn=plugins,cn=config entry for the database.
|
| maxdncachesize |
The maximum size, in bytes, of DNs that can be maintained in the DN cache.
To increase the size of the entries which can be present in the cache, increase the value of the
nsslapd-dncachememsize attribute in the cn=database_name, cn=ldbm database,cn=plugins,cn=config entry for the database.
|
| currentdncachecount | The number of DNs currently present in the DN cache. |

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.