Why is fedora-ds on linux machine taking 100% of cpu utilization when I am running any search query on ldap server?

Posted by : Dr. Root | 29 September, 2009 | Published in

Many thanks, Shankar for your question. The answer is:

Un-indexed Searches on Directory Server cause performance degradation unfortunately.

Whenever you see the ‘notes=U’ message on a ‘RESULT’ line in an LDAP query, it means one or more of your search filters are on un-indexed attributes.

To solve this problem, find the ‘SRCH’ line that corresponds to the ‘RESULT’ line (by matching the ‘conn=’ and ‘op=’ numbers on each), and find the attributes mentioned as part of the search ‘filter’ (the part after the ‘filter=’ on the SRCH line).

If any of these attributes are not indexed in the Directory Server, create an index for them.

Searches will be much faster then, and will not take up 100% of CPU.

Log:

[25/Sep/2009:14:21:21 -0400] conn=672 op=14 SORT uid (1)
[25/Sep/2009:14:21:22 -0400] conn=672 op=14 RESULT err=0 tag=101 nentries=1 etime=1
[25/Sep/2009:14:21:24 -0400] conn=647 op=50 RESULT err=0 tag=101 nentries=1 etime=7 notes=U
[25/Sep/2009:14:21:24 -0400] conn=650 op=37 RESULT err=0 tag=101 nentries=1 etime=7 notes=U
[25/Sep/2009:14:21:25 -0400] conn=647 op=51 SRCH base="dc=answerthink,dc=com" scope=2 filter="(&(objectClass=portalInetOrgPerson)(&(uid=something@somewhere.com)(domain=ou=myclients)))" attrs="portalCreatedDate objectClass mobile c dn givenName address2 employer portalUID homePhone gender ou employeeNumber telephoneNumber businessCategory street uid postalCode mail l preferredLanguage sn cn facsimileTelephoneNumber domain middleName timeZone uniqueId dob st"


Good luck!

Dr. Root

Ask Dr. Root on Twitter: http://twitter.com/askdrroot

(0) Comments

Copyright 2005-2010, ask|dr.root, brought to you by Avnet Technology Solutions