I recently deleted about 25k entries in a specific OU. Since, the memory usage of the slapd process has consistently stayed at 70%-75% cpu usage:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 29911 openldap 18 0 12.6g 10g 4.1g S 0 69.6 1003:25 slapd
I have also noticed that the DB files have stayed the same size - specifically one is 4gigs:
-rw------- 1 openldap openldap 4.0G Nov 30 21:18 __db.003
On a slave to this box, the file size is drastically lower:
-rw------- 1 openldap openldap 321M Dec 16 05:02 __db.003
I am assuming that the reason the CPU and memory usage is so high due to trying to keep the entire directory structure in memroy.
Is this normal behavior? Is there a way to purge the database files?
One other thing that happened was the slaves that are syncing to this server did not update the OU described above.
Any help would be great. Thanks.
--On Thursday, December 16, 2010 7:00 PM +0000 "Rowley, Mathew" Mathew_Rowley@cable.comcast.com wrote:
I recently deleted about 25k entries in a specific OU. Since, the memory usage of the slapd process has consistently stayed at 70%-75% cpu usage: Is this normal behavior? Is there a way to purge the database files?
Yes, this is normal. Like most database software, when you delete data, it writes it with empty space so that it can re-use it when you create new data. If believe that data is forever gone, I suggest slapcat then slapadd to resize the DB.
You don't say what OpenLDAP version or replication method you are using, so the rest of your question about syncing is rather difficult to have an opinion on.
--Quanah
--
Quanah Gibson-Mount Sr. Member of Technical Staff Zimbra, Inc A Division of VMware, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration
Thanks. We are using 2.4.21, and the sync is
Master<->nway<->Master `-slave `-slave
`-slave `-slave
Where the slaves are syncing from the masters via refreshAndPersist, and the masters are mirrorMode and refreshAndPersist
On 12/16/10 3:11 PM, "Quanah Gibson-Mount" quanah@zimbra.com wrote:
--On Thursday, December 16, 2010 7:00 PM +0000 "Rowley, Mathew" Mathew_Rowley@cable.comcast.com wrote:
I recently deleted about 25k entries in a specific OU. Since, the memory usage of the slapd process has consistently stayed at 70%-75% cpu usage: Is this normal behavior? Is there a way to purge the database files?
Yes, this is normal. Like most database software, when you delete data, it writes it with empty space so that it can re-use it when you create new data. If believe that data is forever gone, I suggest slapcat then slapadd to resize the DB.
You don't say what OpenLDAP version or replication method you are using, so the rest of your question about syncing is rather difficult to have an opinion on.
--Quanah
--
Quanah Gibson-Mount Sr. Member of Technical Staff Zimbra, Inc A Division of VMware, Inc.
Zimbra :: the leader in open source messaging and collaboration
--On Thursday, December 16, 2010 10:19 PM +0000 "Rowley, Mathew" Mathew_Rowley@cable.comcast.com wrote:
Thanks. We are using 2.4.21, and the sync is
Master<->nway<->Master `-slave `-slave
`-slave `-slave
Where the slaves are syncing from the masters via refreshAndPersist, and the masters are mirrorMode and refreshAndPersist
Well, there are numerous bug fixes going into 2.4.24 for replication issues with syncrepl. Fortunately I don't encounter them with delta-syncrepl. Unfortunately, it does not yet support multi-master.
--Quanah
--
Quanah Gibson-Mount Sr. Member of Technical Staff Zimbra, Inc A Division of VMware, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration
openldap-technical@openldap.org