[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: How do I verify that Openldap is using multiple threads on Freebsd5.2

Pierangelo Masarati wrote:

James Saint-Rossy, Thomas wrote:

I am trying to verify that my server running "FreeBSD 5.2.1-RELEASE" is actually using multiple threads for Openldap. The system has dual p4's with hyper threading. I've been searching the web and archive with no luck. Any insight would be appreciated.

When I do ps -axH all I get back is one process:
73670 ?? SLs 0:04.19 /usr/local/libexec/slapd -h ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap:// -u ldap -g ldap

On my linux fedora core 2 this (ps -axH) returns each and every threads !
$ ps axH | grep slapd |wc -l

did you ask for multiple thread in slapd.conf, here's mine
$ grep thread /etc/openldap/slapd.conf
threads 22

Indeed monitor database can help:

$ ldapsearch -x -H ldap://:389 -b "cn=Threads,cn=Monitor" -D "cn=admin,dc=int-ev
ry,dc=fr" -W -LLL
Enter LDAP Password:
dn: cn=Threads,cn=Monitor
objectClass: top
objectClass: monitor
objectClass: extensibleObject
cn: Threads
description: max=22
description: backload=1

Top -H is similar and appears to only be using one of the processors at a time
70022 ldap 96 0 182M 62380K select 3 1:09 0.00% 0.00% slapd

The FreeBSD port seems to be passing "--with-threads=posix" to configure so I assume it's compiled with threads

Thanks, James Saint-Rossy.

Depending on the version of OpenLDAP, you can search for attribute "monitoredInfo" under "cn=Max,cn=Threads,cn=Monitor"; this should tell you how many threads slapd is configure to use at most. I don't know what it's supposed to return if compiled without threads, but on my test system HEAD returns

[masarati@ando tests]$ ../clients/tools/ldapsearch -x -H ldap://:9011 -b cn=max,cn=Threads,cn=monitor @extensibleobject
# extended LDIF
# LDAPv3
# base <cn=max,cn=Threads,cn=monitor> with scope subtree
# filter: (objectclass=*)
# requesting: @extensibleobject

# Max, Threads, Monitor
dn: cn=Max,cn=Threads,cn=Monitor
objectClass: monitoredObject
structuralObjectClass: monitoredObject
cn: Max
monitoredInfo: 16
creatorsName: cn=anonymous
modifiersName: cn=anonymous
createTimestamp: 20041008215245Z
modifyTimestamp: 20041008215245Z
entryDN: cn=Max,cn=Threads,cn=Monitor
subschemaSubentry: cn=Subschema
hasSubordinates: FALSE

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1


   SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497