Garbage Collection Configuration Advanced Configurations

22-12 Oracle Fusion Middleware Performance and Tuning Guide

22.7 Optimizing Searches

This section contains these topics: ■ Section 22.7.1, Optimizing Searches for Large Group Entries ■ Section 22.7.2, Optimizing Searches for Skewed Attributes ■ Section 22.7.3, Optimizing Performance of Complex Search Filters

22.7.1 Optimizing Searches for Large Group Entries

Searches for group entries with several thousand attribute values for either the member or uniquemember attribute can have high latency. If you find the latency unacceptably high, there are steps you can take to reduce it. The simplest step is to reduce the number of attributes you are searching for. If you do not need to retrieve all the attributes of the group entry, specify required attributes in the search request to optimize the latency.

22.7.1.1 Entry Cache Enabled Configuration

If you still see unacceptable latency, even with required attributes specified, then you can try to cache the large group entry in the entry cache. To do this, increase the value of the orclEcacheMaxEntSize attribute in the instance-specific configuration entry: cn=componentname,cn=osdldapd,cn=subconfigsubentry This attribute controls the maximum size of a cache entry. The default value is 1M. If the size of the large group entry is greater than the value of orclEcacheMaxEntSize, change it to a large enough value to ensure that the large group entry is cached.

22.7.1.2 Entry Cache Disabled Configuration.

No action is required. This configuration is enabled by default.

22.7.2 Optimizing Searches for Skewed Attributes

To service a typical search request, the Directory Server sends a SQL statement to the Oracle Database. If a given attribute has very different response times depending on Table 22–6 Redo Log and Undo Tablespace Values Attribute Value Notes Redo Log 3 logs, 100MB each Many bulkdelete operations. Redo Log Total size 1000-15000MB Large number of write operations. Undo Tablespace At least 1GB total Many bulkdelete operations. Undo Tablespace 2-4 GB Large number of write operations. Note: If you expect frequent updates to large groups, then do not use this tuning methodology. Use the Entry Cache Disabled Configuration. Oracle Internet Directory Performance Tuning 22-13 its value, then the attribute is said to be skewed. For example, if searches for my_ attribute=value1 and my_attribute=value2 have very different response times, then my_attribute is said to be a skewed. You can uniform the response times for searches for such an attribute by adding it as a value of the orclskewedattribute attribute, which is in the DSA configuration entry. The DN of the DSA configuration entry is cn=dsaconfig,cn=configsets,cn=oracle internet directory By default, the objectclass attribute is listed as a value in the orclskewedattribute attribute. You can change the value of orclskewedattribute by using or ldapmodify. See Section 22.12.1, Modifying Instance-Specific Attributes by Using Fusion Middleware Control and Section 22.12.3, Modifying Attributes by Using ldapmodify .

22.7.3 Optimizing Performance of Complex Search Filters

When Oracle Internet Directory receives an LDAP search filter from a client application, it sends the filter to the Oracle Database as an SQL query. Sometimes client applications send filters that include terms that match a large number of entries in the directory. For example, consider the following filter: uid=msmithobjectclass=inetorgpersonorclisenabled=TRUE The terms objectclass=inetorgperson and orclisenabled=TRUE in that filter match nearly all entries. It would be very resource-intensive to execute that entire filter in the Oracle Database. To improve performance, you can specify that Oracle Internet Directory execute a portion of that filter in its own memory, rather than in the database. To do that, you use orclinmemfiltprocess, an attribute in the DSA configuration entry: cn=dsaconfig,cn=configsets,cn=oracle internet directory When orclinmemfiltprocess is configured, the following events occur each time Oracle Internet Directory receives an LDAP search: 1. Oracle Internet Directory removes all the terms that are configured in the orclinmemfiltprocess before forming the SQL query. 2. Oracle Internet Directory sends the SQL query to Oracle Database. 3. Oracle Database sends the entries resulting from the SQL query to Oracle Internet Directory. 4. Oracle Internet Directory applies the original filter sent by the client the terms in orclinmemfiltprocess to those entries in memory. 5. Oracle Internet Directory sends the entries that match that filter to the client. For example, suppose orclinmemfiltprocess is set to objectclass=inetorgpersonorclisenabled=TRUE. When Oracle Internet Directory receives the search uid=msmithobjectclass=inetorgpersonorclisenabled=TRUE, it sends a filter containing only the parameter uid=msmith to the database. After Oracle Internet Directory receives entries back from the database, Oracle Internet Directory itself applies the filter objectclass=inetorgperson orclisenabled=TRUE to those entries. By default, orclinmemfiltprocess is set to the following values: objectclass=inetorgperson