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

RE: FW: slapd threads on master pegs multiple CPU Sun running Solaris 8 (ITS#2302)



> -----Original Message-----
> From: Kurt D. Zeilenga [mailto:Kurt@OpenLDAP.org]

> At 04:48 PM 2/14/2003, Kurt D. Zeilenga wrote:
> >One possible approach is not to wrap the whole search operation
> >in a single transactions, but use many.  One for baseObject
> >finding, one for candidate determination, and one for each
> >candidate.  However, this would likely cost way more than 10%
> >(with logging).
>
> An alternative to using transactions to avoid deadlock would
> be to set DB_LOCK_NOWAIT and then do a release (of all locks)/retry
> upon DB_LOCK_NOTGRANTED.

Perhaps. I think this will have issues too... You can't set the NOWAIT flag
on individual BDB calls; you can set it for a transaction in which case it
affects all locks obtained in that transaction. If we had all of our
transactions behave this way, we would be guaranteed to avoid deadlocks in
the BDB lock subsystem. But we would still have the runaway CPU problem,
because we would be retrying modifies more frequently, and since they would
lose their place in the lock queues, the modifies would tend to starve.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support