#197 rhds82 rfe - BDB backend - clear free page files to reduce changelog size
Closed: wontfix None Opened 12 years ago by rmeggins.

https://bugzilla.redhat.com/show_bug.cgi?id=672945

Description of problem:

RFE for RHDS BDB backend to possibly reduce a changelog size
"
clear Berkeley DB free page files that does not compromise usage for Directory,
thereby reducing the size of the changelog file after reseeding?
"


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

batch update moving tickets to future

set default ticket origin to Community

Added initial screened field value.

Bug description: Even if entries in the database and changes in the
changelog database are deleted/trimmed, the unused pages of the data-
bases were not returned to the filesystem.

Fix description: This patch calls the compact API that Berkeley DB
provides, which compacts the database.

2 config parameters are introduced to specify the interval of the
compact calls.
Primary DBs (id2entry):
dn: cn=config,cn=ldbm database,cn=plugins,cn=config
nsslapd-db-compactdb-interval: <seconds>
Changelog DBs:
dn: cn=changelog5,cn=config
nsslapd-changelogcompactdb-interval: <seconds>
By default, 2592000 seconds (30 days)

Reviewed by Rich (Thank you!!)

Pushed to master:
e6fd70b..d01155c master -> master
commit d01155c

Steps:
Set up MMR.
Set following config parameters some reasonable values, e.g., 240 (seconds) on one master. Please note that unless you set nsslapd-changelogmaxage in cn=changelog5 as well as nsds5ReplicaPurgeDelay and nsds5ReplicaTombstonePurgeInterval in the replica entry, the changelogs as well as the deleted entries won't be really removed from the dbs.
Primary DBs (id2entry):
dn: cn=config,cn=ldbm database,cn=plugins,cn=config
nsslapd-db-compactdb-interval: 240

Changelog DBs:
  dn: cn=changelog5,cn=config
  nsslapd-changelogcompactdb-interval: 240
  nsslapd-changelogmaxage: 200

  dn: cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config
  nsds5ReplicaPurgeDelay: 10
  nsds5ReplicaTombstonePurgeInterval: 240

Run series of adds and deletes monitoring the size of id2entry and changelog db. If the size is reduced at the interval timing, the fix is verified.

ls -l /var/lib/dirsrv/slapd-M0/changelogdb/b9fd337e-092711e3-a8ce8123-6a055cd2_5212ab4f000000010000.db /var/lib/dirsrv/slapd-M0/db/userRoot/id2entry.db

-rw-------. 1 nobody nobody 4186112 8/21 15:35 /var/lib/dirsrv/slapd-M0/changelogdb/b9fd337e-092711e3-a8ce8123-6a055cd2_5212ab4f000000010000.db
-rw-------. 1 nobody nobody 15302656 8/21 15:35 /var/lib/dirsrv/slapd-M0/db/userRoot/id2entry.db

ls -l /var/lib/dirsrv/slapd-M0/changelogdb/b9fd337e-092711e3-a8ce8123-6a055cd2_5212ab4f000000010000.db /var/lib/dirsrv/slapd-M0/db/userRoot/id2entry.db

-rw-------. 1 nobody nobody 49152 8/21 15:42 /var/lib/dirsrv/slapd-M0/changelogdb/b9fd337e-092711e3-a8ce8123-6a055cd2_5212ab4f000000010000.db
-rw-------. 1 nobody nobody 1400832 8/21 15:44 /var/lib/dirsrv/slapd-M0/db/userRoot/id2entry.db

Note: nsslapd-db-compactdb-interval & nsslapd-changelogcompactdb-interval need to be doc'ed in "Configuration Command and File Reference".

Metadata Update from @nhosoi:
- Issue assigned to nhosoi
- Issue set to the milestone: 1.3.2 - 08/13 (August)

7 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/197

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

3 years ago

Login to comment on this ticket.

Metadata