Searches for hosts against Red Hat Directory Server is slow if IP addresses are used instead of hostnames.

Solution Verified - Updated -

Issue

  • Searches for hosts against Red Hat Directory Server is slow if IP addresses are used instead of hostnames.

    # time ldapsearch -x -LLL '(&(objectClass=device)(cn=host))' -b "ou=Hosts,ou=host1,ou=nis,dc=analog,dc=com" -h host.example.com              dn: cn=host.example.com+ipHostNumber=xx.xxx.x.x,ou=Hosts,ou=example,ou=n
     is,dc=host,dc=com
    cn: host.example.com
    cn: host
    objectClass: device
    objectClass: ipHost
    objectClass: top
    ipHostNumber: XX.XXX.X.X
    
    dn: cn=host+ipHostNumber=XX.X.XXX.X,ou=Hosts,ou=host,ou=nis,dc=example,dc
     =com
    cn: host1
    cn: host1.example.com
    objectClass: device
    objectClass: ipHost
    objectClass: top
    ipHostNumber: XX.X.XXX.X
    
    0.000u 0.003s 0:00.00 0.0%      0+0k 0+0io 0pf+0w
    

However if add  ipHostNumber in the search filter instead of hostname, it takes an extremely long time to complete. Here it took 10 seconds, or sometimes upto 16
seconds too.

# time ldapsearch -x -LLL '(&(objectClass=device)(ipHostNumber=XX.X.XXX.X))' -b "ou=Hosts,ou=host1,ou=nis,dc=example,dc=com" -h host.example.com
dn: cn=host1.example.com+ipHostNumber=XX.XX.XXX.X,ou=Hosts,ou=host1,ou=n
 is,dc=example,dc=com
cn: host1.example.com
cn: host1
objectClass: device
objectClass: ipHost
objectClass: top
ipHostNumber: XX.X.XXX.X

dn: cn=host1+ipHostNumber=XX.X.XX.XXX,ou=Hosts,ou=host,ou=nis,dc=example,dc
 =com
cn: host1
cn: host1.example.com
objectClass: device
objectClass: ipHost
objectClass: top
ipHostNumber: XX.X.XXX.X

0.000u 0.003s 0:10.50 0.0%      0+0k 0+0io 0pf+0w

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Directory Server 8.2

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.