From seuler.shi@gmail.com Wed Feb 14 02:02:29 2007 From: seuler.shi@gmail.com To: openldap-bugs@openldap.org Subject: Re: Can slapd run with only one thread to operate (ITS#4842) Date: Wed, 14 Feb 2007 02:02:28 +0000 Message-ID: <200702140202.l1E22Slg046029@boole.openldap.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1400323127169116039==" --===============1400323127169116039== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable ------=3D_Part_100396_21317226.1171418508303 Content-Type: text/plain; charset=3DISO-8859-1; format=3Dflowed Content-Transfer-Encoding: 7bit Content-Disposition: inline What I want to do is to do operations in OpenLDAP server serially, not concurrency in the server. If the back database is configured to load all data in memory, then overhead of executing a operation is approximately equal the overhead of lock relevant overhead in database. So if requests are serially handled in openldap server, the lock subsystem can be remove from backend database. I just want to compare difference on performance under these two strategy. Although I use ./configure --without-threads, there are still two work threads,(info thread in gdb: there are two pthread_cond_wait records.) Would you give me some suggestion to reach the goal, serially handle the received requests in openldap server? Thanks a lot! 2007/2/14, Pierangelo Masarati : > > Slapd by design needs at least 2 threads to work. That code is there > exactly to > avoid silly configurations with less than 2 threads. You're free to > modify it, > but then you shouldn't complain. Otherwise, if you don't want slapd to > use > threads you can compile it --without-threads (not --without--threads like > you > typed). > > If you could tell us what your real problem is with threads, maybe we > wouldn't > both waste time in this rather pointless issue. > > p. > ------=3D_Part_100396_21317226.1171418508303 Content-Type: text/html; charset=3DISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
What I want to do is to do operations in OpenLDAP server serially, not c= oncurrency
in the server. If the back database is configured to load all data in me= mory, then overhead
of executing a operation is approximately equal the overhead of lock rel= evant overhead in
database. So if requests are serially handled in openldap server, t= he lock subsystem can
be remove from backend database.
 
I just want to compare difference on performance under these two strateg= y.
 
Although I use ./configure --without-threads, there are still two work t= hreads,(info thread in
gdb: there are two pthread_cond_wait records.)
 
Would you give me some suggestion to reach the goal, serially handle the= received requests
in openldap server?
 
Thanks a lot!
 
2007/2/14, Pierangelo Masarati <openldap-its(a)openldap.org>:<= /span>
Slapd by design needs at least 2 thr= eads to work.  That code is there exactly to
avoid silly configu= rations with less than 2 threads.  You're free to modify it,
but then you shouldn't complain.  Otherwise, if you don'= ;t want slapd to use
threads you can compile it --without-threads (not --w= ithout--threads like you
typed).

If you could tell us what your rea= l problem is with threads, maybe we wouldn't
both waste time in this rather pointless issue.

p.

------=3D_Part_100396_21317226.1171418508303-- --===============1400323127169116039==--