Generic tips for using a directory server

You can optimize a directory server to improve the search and update performance of the server.

The following tips can help improve directory server performance.

  • Run searches on indexed attributes only. For instructions for defining and verifying indexes for directory server, see DB2 indexes.
  • Open a connection and reuse it for many operations if possible.
  • Minimize the number of searches by retrieving multiple attribute values in a single search.
  • Retrieve only the attributes that you need. Do not use ALL by default. For example, when you search for the groups a user belong to, ask for only the Distinguished Names (DNs) values, and not the entire group. Do not request the member or uniquemember attributes if possible.
  • Minimize and batch updates, such as add, modify, modrdn, or delete, when possible.
  • Use base-scoped searches whenever possible rather than one-level or subtree searches.
  • You must not use wildcard searches where the wildcard is in any position other than the leading character in a term, or a trailing character. Use wildcard searches that are similar to the following order. Leading character:
    sn=*term
    Trailing character:
    sn=term*
    Note: A filter such as sn=*term* is less efficient than the examples listed.
  • When you use nested groups, keep the depth of nesting to 50 groups or less. Greater nesting depths can result in increased processing times when you run add or delete operation that involves updates to the nested group hierarchy.
  • Set server search limits to prevent accidental long-running searches.
  • Use the ldap_modify interface to add members to or delete members from a group. Do not run search to retrieve all members, edit the returned list, then send the updated list as a modify-replace operation. This modify-replace scenario might not function correctly with large groups.
  • For a proxy server, do not set the value in the Connection pool size field to less than 5.