[Date Prev][Date Next]
Re: Can slapd run with only one thread to operate (ITS#4842)
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
> What I want to do is to do operations in OpenLDAP server serially, not
> 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.
The lock subsystem can only be removed if you only permit read operations.
I've done a number of tests with the locks commented out of the backend;
certainly it is faster, by about 20% for single threaded operation. But
that's not much of a gain considering the reduction in utility.
Meanwhile, turning off threads means you cannot take advantage of
multiple-processor systems, which is definitely a loss. All in all there is
no benefit to pursuing this.
You can spend your time exploring as you wish, but none of us will spend any
of our time retreading ground that we've already studied extensively.
> 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 <firstname.lastname@example.org>:
>> 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
>> threads you can compile it --without-threads (not --without--threads like
>> If you could tell us what your real problem is with threads, maybe we
>> both waste time in this rather pointless issue.
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc
Chief Architect, OpenLDAP http://www.openldap.org/project/