Index keys that have reached their limit require indexes to be rebuilt
before they can be allowed to use a new limit. There are several ways to monitor index limits
to avoid a potentially costly rebuild. There are cases in which it is 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 also because applications frequently need to find entries of a
specific type. However, it doesn't make sense for the "top" objectClass key to be
indexed, because it appears in every entry in the server.
Choose 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 verify-index
tool --listKeysNearestIndexEntryLimt
argument lists a specified
number of keys that are closest to the limit without having exceeded it. The index entry
limit should be 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 the index entry limit needs to be adjusted.
The verify-index
tool also provides the --listKeysExceedingIndexEntryLimit
argument to list 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 already exceeded but 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) and run the rebuild-index
tool (or export to LDIF
and re-import).
- 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, and also the number of keys for which the number of matching entries falls within a number of predefined buckets (such as 1–4 entries, 5–9 entries, 10–99 entries, and 100–999 entries).
- If, during a search operation, the server accesses one or more index keys whose values
have exceeded the index entry limit, the access log message for that operation will
include an
indexesWithKeysAccessedExceedingEntryLimit
field containing a comma-delimited list of the appropriate indexes. The same access log field may 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. - If, during a search operation, the server accesses one or more index keys whose values
have not yet exceeded the index entry limit but are more than 80 percent to reaching
that limit, the access log message for that operation will include an
indexesWithKeysAccessedNearEntryLimit
field containing a comma-delimited list of the appropriate indexes. The same access log field may 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 percent of the index entry limit. - If a search operation requests either includes
the
debugsearchindex
attribute, or the matching entry count request control with debugging enabled, the debug information will include any indexes accessed that have exceeded the index entry limit, or that are within 80 percent 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
a number of 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 due to 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 percent 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 percent 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.
-