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

RE: Unconsumed replog causes slapd to shoot to 100% cpu?



> -----Original Message-----
> From: owner-openldap-software@OpenLDAP.org
> [mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of Jeff Leung

> Does anyone know what the effect of an oversized replog is on
> a slapd? Is it
> possible that if the replog gets big enough, slapd spends too
> much time
> writing new data to the replog to service requests, or some
> other behavior
> that would cause load to shoot up to 100%?

Nothing will happen to slapd, it merely appends to the file and then
continues on its way. I suppose if the file hits 2GB or whatever the
filesystem limit happens to be on your filesystem, it will then start failing
to write, but that will not cause any particular difficulties for slapd
itself.

slurpd is a separate question - it consumes the replog that slapd produced,
copies it to its own log file, and also builds an in-memory copy of all the
log entries. If a slave is unreachable for a long time, this in-memory queue
will get too large, and that can cause your system to suffer, until slurpd
itself crashes. At that point, the memory will be freed and the system load
should fall back to normal.

When your slaves are going to be unreachable for a long time, it's best to
just kill slurpd and let slapd's replog grow. If it actually grows to the
filesystem limit, you'll just have to rotate it manually. When the slaves
return, run slurpd in one-shot mode on each of the log files one at a time
before letting it start up normally again.

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