[Date Prev][Date Next]
Re: OpenLdap DB size difference after slapcat and slapadd.
On 7/5/06, Tech Guy <email@example.com> wrote:
We recently ran into the OpenLDAP(v2.1.12) index
corruption issue on a production system. I understand
that there is a fix for this in later versions and we
are in the process of upgrading our systems.
My question was related to the back-end database size
reduction we saw as a result of the steps we took to
recover from the issue.
Slapcat the database to an LDIF file
SlapAdd'ed the database back.
We noticed a reduction of size of ~200Mb and the ldbm
directory changed from 1000Mb to 800Mb after the
Approximate distribution of size changes
id2entry.dbb - Reduction of 163Mb
dn2id.dbb - Reduction of 54Mb
index dbb - Reduction of 11 Mb
My only explanation was the database storage was
fragmented before the slapcat and the slapadd resulted
in an optimized storing of records.
Probably, LDBM doesn't do very aggressive checking.
Also, when entries are deleted from a berkeleydb environment, the
space is not necessarily all recovered. Since slapcat/slapadd only
adds, I think having a size difference can be expected.
Can someone explain the reduction in size? Also, is
the slapcat and slapadd a recommended maintenance
practice to improve performance in OpenLDAP?
If you can stomach the downtime, I don't think it hurts anything.