[Kolab-devel] Re: OpenLDAP performance issues

Martin Konold martin.konold at erfrakon.de
Thu May 26 00:41:13 CEST 2005


Am Mittwoch, 25. Mai 2005 21:20 schrieb Dieter Kluenter:

Hi Dieter,
Hi Bernhard,
Hi Steffen,

> I have never experienced such problems but it seems that openldap is
> compiled --without-threads, as no libpthread or any other posix thread
> is included as there is no appropriate library in /kolab/lib, could
> you please check this?

/lib/tls/libpthread.so.0 is part of the systems c library and therefore shall 
according to the OpenPKG docs be compiled dynamically using the system 
provided library.

Actually OpenLDAP is by default configured with

	--with-threads=pth

./configure help gives me  " --with-threads          with threads [auto]"

OpenLDAP will use GNU threads as default with OpenPKG though!

I just did an experiment:

kepler:/kolab/RPM/SRC/openldap/openldap-2.2.23 # ./configure ; make depend ; 
make
kepler:/kolab/RPM/SRC/openldap/openldap-2.2.23 # ldd servers/slapd/slapd
        linux-gate.so.1 =>  (0xffffe000)
        libdb-4.3.so => /usr/lib/tls/libdb-4.3.so (0x40019000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x400ff000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0x40112000)
        libc.so.6 => /lib/tls/libc.so.6 (0x40124000)
        /lib/ld-linux.so.2 (0x40000000)
kepler:/kolab/RPM/SRC/openldap/openldap-2.2.23 # LD_ASSUME_KERNEL=2.4.30 ldd 
servers/slapd/slapd
        linux-gate.so.1 =>  (0xffffe000)
        libdb-4.3.so => /usr/lib/libdb-4.3.so (0x40019000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x400ff000)
        libpthread.so.0 => /lib/i686/libpthread.so.0 (0x40112000)
        libc.so.6 => /lib/i686/libc.so.6 (0x40164000)
        /lib/ld-linux.so.2 (0x40000000)

So the OpenLDAP 2.2.23 package is normally using the glibc libpthread if not 
prevented by the "--with-threads=pth" switch.

I therefore assume that it is a good idea to also build with the OS/system 
provided  thread implementation as most developers and users don't use the 
GNU pth library.

As we all know there are subtle differences in semantics with regards to 
thread implementations.

Bernhard: Do you remember when I mentioned the LD_ASSUME_KERNEL environment 
variable at the "Mailserver Konferenz" in Magdeburg last week?

Check how the simple setting of this environment variable changes the behavior 
of the dynamic linker. Many applications are known to be sensitive with 
regards to the use of NPTL. I therefore assume that OpenLDAP/bdb is also 
sensitive to the choice of thread library implementation.

Steffen: I propose to remove "--with-threads=pth" as a first step.

Regards,
-- martin

-- 
"I am committed to helping Ohio deliver its electoral votes to the
President next year."  -- 2004, Wally O'Dell - CEO of Diebold, Inc. 
e r f r a k o n - Stuttgart, Germany
Erlewein, Frank, Konold & Partner - Beratende Ingenieure und Physiker




More information about the devel mailing list