[Date Prev][Date Next]
Re: OpenLdap DB size difference after slapcat and slapadd.
--On Wednesday, July 05, 2006 7:49 AM -0700 Tech Guy
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.
Can someone explain the reduction in size? Also, is
the slapcat and slapadd a recommended maintenance
practice to improve performance in OpenLDAP?
I think your explanation above makes sense.
I'd note that LDBM is not recommended for use, and if you are in the
process of upgrading (hopefully to 2.3.24), then you should really consider
updating your database backend to BDB or HDB. I've not seen database
fragmentation be an issue with those backends, either.
Principal Software Developer
ITS/Shared Application Services
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html