https://bugzilla.redhat.com/show_bug.cgi?id=603565
Description of problem: Even when there have been no logging activity, ns-slapd forces a checkpoint, generating unnecessary disk traffic. Version-Release number of selected component (if applicable): 1.2.5 How reproducible: Always Steps to Reproduce: 1.On a quiescent system do "pidstat -C ns-slapd -d 60" Actual results: Disk writes are reported Expected results: No disk writes Additional info: Also "ls -lrt /var/lib/dirsrv/slapd-<server>/db" shows the log file and the __ db.nnn files regularly being updated. This is apparently due to checkpoint being called (in db_layer.c:dblayer_txn_checkpoint()) with the DB_FORCE option. Is there any reason to force these checkpoints? I am using the server for user data (uid/gid etc) but not passwords (because I'm using kerberos for that). The ldap data hardly ever changes and I'd like to let the disks spindown in quiet times. An option, at least, to not force checkpoints would be nice.
batch move to milestone 1.3
git patch file (master) 0001-Trac-Ticket-84-389-Directory-Server-Unnecessary-Chec.patch
Fix description: txn_checkpoint was always called with DB_FORCE flag. This patch introduces db_force arg to dblayer_txn_checkpoint and DB_FORCE is passed only from dblayer_force_checkpoint.
Note: checkpoint_threadmain is one of the BDB housekeeping threads. It calls txn_checkpoint periodically. The interval is specified in the ldbm database config: dn: cn=config,cn=ldbm database,cn=plugins,cn=config nsslapd-db-checkpoint-interval: <second> Even if DB_FORCE is not set and there is no db modify activities, as long as checkpoint thread is functioning, some disk IO is observed due to updating the lock table and mempool to check if there is any data to flush.
Steps to verify: NO #84 patch>
01:46:32 PM PID kB_rd/s kB_wr/s kB_ccwr/s Command 01:47:32 PM 26830 0.00 1.13 0.00 ns-slapd 01:48:32 PM 26830 0.00 1.07 0.00 ns-slapd 01:49:32 PM 26830 0.00 1.13 0.00 ns-slapd [...]
With #84 patch> $ pidstat -C ns-slapd -d 60 02:18:29 PM PID kB_rd/s kB_wr/s kB_ccwr/s Command 02:19:29 PM 1739 0.00 0.27 0.00 ns-slapd 02:20:29 PM 1739 0.00 0.27 0.00 ns-slapd 02:21:29 PM 1739 0.00 0.27 0.00 ns-slapd [...] Write IO is less than "NO #84 patch".
Set high value to nsslapd-db-checkpoint-interval> $ pidstat -C ns-slapd -d 60 03:58:52 PM PID kB_rd/s kB_wr/s kB_ccwr/s Command 03:59:52 PM PID kB_rd/s kB_wr/s kB_ccwr/s Command 04:00:52 PM PID kB_rd/s kB_wr/s kB_ccwr/s Command [...] Unless checkpoint thread calls txn_checkpoint, there is no IO.
Reviewed by Rich (Thanks!!!)
Pushed to master.
$ git merge trac84 Updating d962cea..d419e1f Fast-forward ldap/servers/slapd/back-ldbm/dblayer.c | 26 ++++++++++++-------------- 1 files changed, 12 insertions(+), 14 deletions(-)
$ git push Counting objects: 13, done. Delta compression using up to 4 threads. Compressing objects: 100% (7/7), done. Writing objects: 100% (7/7), 1.18 KiB, done. Total 7 (delta 5), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git d962cea..d419e1f master -> master
Added initial screened field value.
Metadata Update from @nhosoi: - Issue assigned to nhosoi - Issue set to the milestone: 1.2.11.a1
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/84
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: Fixed)
Login to comment on this ticket.