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

Re: SlapD is using more CPU



Maucci, Cyrille wrote:
openldap gurus will sure help you.
That's out of my current knowledge area...

The log shows that somebody requested slapd to shutdown. You should first find out who is doing that and why. Next, it would seem that slapd is having trouble shutting down. You should attach to the slapd process with gdb while it's in this state and get a backtrace of all the threads so we can see what it's getting stuck on.

Also, 2.4.15 is pretty old now, the current release is 2.4.26. You should upgrade. It's a waste of time to track down bugs in old releases, most of them have already been fixed in a later release.

------------------------------------------------------------------------------
*From:* arun.sasi1@wipro.com [mailto:arun.sasi1@wipro.com]
*Sent:* Thursday, July 28, 2011 10:31 AM
*To:* Maucci, Cyrille; openldap-technical@openldap.org
*Subject:* RE: SlapD is using more CPU

Dear Cyrille,

Below are the logs which I received from the server…

Today again it happened…

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=3273 op=2 SEARCH RESULT
tag=101 err=32 nentries=0 text=

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=3276 fd=36 ACCEPT from
IP=134.32.44.37:60341 (IP=0.0.0.0:389)

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=3276 op=0 BIND
dn="cn=admin,dc=emb,dc=slb,dc=com" method=128

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=3276 op=0 BIND
dn="cn=admin,dc=emb,dc=slb,dc=com" mech=SIMPLE ssf=0

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=3276 op=0 RESULT tag=97
err=0 text=

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=3276 op=1 SRCH
base="dc=emb,dc=slb,dc=com" scope=2 deref=0
filter="(&(objectClass=posixAccount)(uidNumber=470649))"

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=3276 op=1 SRCH attr=uid
userPassword uidNumber gidNumber cn homeDirectory loginShell gecos description
objectClass

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=3276 op=1 SEARCH RESULT
tag=101 err=0 nentries=1 text=

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=3262 op=8 SRCH
base="ou=Groups,dc=emb,dc=slb,dc=com" scope=2 deref=0
filter="(&(objectClass=sambaGroupMapping)(sambaSID=s-1-1-0))"

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=3262 op=8 SRCH
attr=gidNumber sambaSID sambaGroupType sambaSIDList description displayName cn
objectClass

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=3262 op=8 SEARCH RESULT
tag=101 err=0 nentries=0 text=

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=3273 op=3 SRCH
base="ou=Groups,dc=emb,dc=slb,dc=com" scope=2 deref=0
filter="(&(objectClass=sambaGroupMapping)(gidNumber=65534))"

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=3273 op=3 SRCH
attr=gidNumber sambaSID sambaGroupType sambaSIDList description displayName cn
objectClass

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=3273 op=3 SEARCH RESULT
tag=101 err=0 nentries=0 text=

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=3260 op=3 SRCH
base="ou=Groups,dc=emb,dc=slb,dc=com" scope=2 deref=0
filter="(&(objectClass=sambaGroupMapping)(gidNumber=65534))"

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=3260 op=3 SRCH
attr=gidNumber sambaSID sambaGroupType sambaSIDList description displayName cn
objectClass

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=3260 op=3 SEARCH RESULT
tag=101 err=0 nentries=0 text=

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=3262 op=9 SRCH
base="ou=Groups,dc=emb,dc=slb,dc=com" scope=2 deref=0
filter="(&(objectClass=sambaGroupMapping)(sambaSID=s-1-5-2))"

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=3262 op=9 SRCH
attr=gidNumber sambaSID sambaGroupType sambaSIDList description displayName cn
objectClass

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=3262 op=9 SEARCH RESULT
tag=101 err=0 nentries=0 text=

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=3276 fd=36 closed
(connection lost)

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: daemon: shutdown requested and
initiated.

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=3173 fd=19 closed (slapd
shutdown)

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=4 fd=21 closed (slapd shutdown)

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=0 fd=22 closed (slapd shutdown)

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=1 fd=23 closed (slapd shutdown)

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=3230 fd=24 closed (slapd
shutdown)

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=6 fd=25 closed (slapd shutdown)

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=805 fd=26 closed (slapd
shutdown)

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=3223 fd=27 closed (slapd
shutdown)

Jul 28 08:05:02 gb0135embldap01 slapd[23254]: conn=3246 fd=28 closed (slapd
shutdown)

CPU usage

08:05:02 all 0.93 0.00 1.11 0.01 0.00 97.95

08:10:01 all 21.98 0.00 20.08 0.01 0.00 57.93

08:15:02 all 20.66 0.01 18.87 0.00 0.00 60.46

08:20:02 all 0.59 0.00 0.71 0.03 0.00 98.68

Thanks,

-Arun

*From:*Arun Sasi V (WI01 - Manage IT)
*Sent:* Monday, July 25, 2011 6:46 PM
*To:* 'Maucci, Cyrille'; openldap-technical@openldap.org
*Subject:* RE: SlapD is using more CPU

Dear Cyrille,

Yes my ldap process is getting disappear… I assume due to CPU/high search…
because only that days I can see the CPU are getting increased…

There is no crash information file for slapd

Thanks,

-Arun

*From:*Maucci, Cyrille [mailto:cyrille.maucci@hp.com]
*Sent:* Monday, July 25, 2011 6:19 PM
*To:* Arun Sasi V (WI01 - Manage IT); openldap-technical@openldap.org
*Subject:* RE: SlapD is using more CPU

Dear Arun,

> And also I just want to know why my ldap service are getting stopped….

What do you mean?

Do you mean the ldap unix process disappears ?

If so, did you enable core dumps to be written (ulimit -c) ?

Do you get a core file ?

I would not expect slapd to simply 'exit'.

Thanks

++Cyrille

------------------------------------------------------------------------------

*From:*arun.sasi1@wipro.com [mailto:arun.sasi1@wipro.com]
*Sent:* Monday, July 25, 2011 2:45 PM
*To:* Maucci, Cyrille; openldap-technical@openldap.org
*Subject:* RE: SlapD is using more CPU

Dear Cyrille,

I am using Ubuntu 9.04 OS (Configured in VM), and OpenLdap OpenLDAP: slapd 2.4.15…

I have configured Multi-Master setup here… i.e two location servers will act
as multimaster and remaining 7 locations are act as slave servers(read only copy).

Each location sync with master ldap and fetch the update from master Ldap
(syncrepl)…

My infra the number of users are accessing the LDAP more on Sundays hence Ldap
server is utilizing more cpu on those days and getting hang… Please find the
attached some report which I took from Ldap server.

I have increased my cache size.. will it cause to high CPU …?

And also I just want to know why my ldap service are getting stopped….

Thanks,

-Arun

*From:*Maucci, Cyrille [mailto:cyrille.maucci@hp.com]
*Sent:* Monday, July 25, 2011 5:59 PM
*To:* Arun Sasi V (WI01 - Manage IT); openldap-technical@openldap.org
*Subject:* RE: SlapD is using more CPU

Hello Arun Sasi,

are you saying you are surprised by the fact that the more LDAP search the
more CPU consumption ? ( ! ).

I must have misunderstood your statement.

Since slapd is multi-threaded, I've myself pushed slapd to much more than 100%
CPU.

So what do you mean by 'slapd is getting stopped' ?

Do you mean the process vanishes ?

Does it leave a baby core file around there ?

If so, you should probably send the back trace.

++Cyrille

------------------------------------------------------------------------------

*From:*openldap-technical-bounces@OpenLDAP.org
[mailto:openldap-technical-bounces@OpenLDAP.org] *On Behalf Of
*arun.sasi1@wipro.com
*Sent:* Monday, July 25, 2011 9:55 AM
*To:* openldap-technical@openldap.org
*Subject:* SlapD is using more CPU

Hello Team,

Whenever the number of search increase to the master server… slapd is
utilizing more about more than 100%... What could be the reason and also is
there any bench mark defined…

Whenver it goes 100% slapd server is getting stopped…

Thanks & Regards,

*Arun Sasi V*



--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/