About monitoring index entry limits
Index keys that have reached their limit require indexes to be rebuilt before they can use a new limit. To avoid a potentially costly rebuild, there are several ways to monitor index limits.
In certain cases, it’s acceptable for index keys to exceed the index entry limit. For example, the objectClass
attribute type should be indexed for equality because the server needs to use it to find all group entries when bringing a backend online, and applications frequently need to find entries of a specific type. However, the top objectClass key doesn’t need to be indexed because it appears in every entry in the server.
Select an index entry limit value that is high enough to ensure that all of the right keys are indexed, but keys that occur too frequently are not. The --listKeysNearestIndexEntryLimt
argument of the verify-index
tool lists a specified number of keys that are closest to the limit without having exceeded it. Make the index entry limit larger than the number of entries matching the largest key to remain indexed, with enough overhead to account for future growth. Use this command regularly to determine if you need to adjust the index entry limit needs to be adjusted.
The --listKeysExceedingIndexEntryLimit
argument of the verify-index
tool lists all keys for which the value has exceeded the index entry limit and the number of entries in which they appear. If there are keys for which the limit has been exceeded that need to be maintained, adjust the index entry limit to be higher than the number of entries that contain that key, with additional room for future growth. Then, run the rebuild-index
tool or export to LDIF and re-import.
The server provides other methods for determining if index keys have exceeded or are close to exceeding the index entry limit, including:
-
When performing an LDIF import, the tool includes an Index Summary Statistics section that provides usage information for each index, including:
-
The number of keys for which the index entry limit has been exceeded.
-
The number of keys for which the number of matching entries falls within several predefined buckets, such as 1–4 entries, 5–9 entries, 10–99 entries, and 100–999 entries.
-
-
During a search operation, if the server accesses one or more index keys whose values have exceeded the index entry limit, the access log message for that operation includes an
indexesWithKeysAccessedExceedingEntryLimit
field containing a comma-delimited list of the appropriate indexes. The same access log field can appear in log messages for add, delete, modify, and modify DN operations in which the server wrote to, or tried to write to, at least one index key whose value exceeded the index entry limit. -
During a search operation, if the server accesses one or more index keys whose values have not yet exceeded the index entry limit but are greater than 80 percent of it, the access log message for that operation includes an
indexesWithKeysAccessedNearEntryLimit
field containing a comma-delimited list of the appropriate indexes. The same access log field can appear in log messages for add, delete, modify, and modify DN operations in which the server wrote to at least one index key whose value was within 80%of the index entry limit. -
If a search operation request includes either the
debugsearchindex
attribute or the matching entry count request control with debugging enabled, the debug information includes any indexes accessed that have exceeded the index entry limit or that are within 80% of the configured index entry limit. -
The monitor entry for each configured index includes attributes that provide information about the number of index keys that have been encountered since the backend was brought online, or since the index entry limit was changed in several different categories. These monitor attributes include:
ds-index-exceeded-entry-limit-count-since-db-open
-
The number of index keys for which the number of matching entries has crossed the index entry limit because of a write operation.
ds-index-unique-keys-near-entry-limit-accessed-by-search-since-db-open
-
The number of unique index keys that have been accessed by a search operation for which the number of matching entries is within 80% of the index entry limit.
ds-index-unique-keys-exceeding-entry-limit-accessed-by-search-since-db-open
-
The number of unique index keys that have been accessed by a search operation for which the number of matching entries has exceeded the index entry limit at some point since the index was last built.
ds-index-unique-keys-near-entry-limit-accessed-by-write-since-db-open
-
The number of unique index keys that have been accessed by a write operation for which the number of matching entries is within 80% of the index entry limit.
ds-index-unique-keys-exceeding-entry-limit-accessed-by-write-since-db-open
-
The number of unique index keys that have been accessed by a write operation for which the number of matching entries has exceeded the index entry limit at some point since the index was last built.