Bug 829553 - man-db's daily cron, excessive disk activity
man-db's daily cron, excessive disk activity
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: man-db (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Peter Schiffer
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-06 22:41 EDT by Hin-Tak Leung
Modified: 2012-07-20 22:54 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-20 22:54:26 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
here it is, tar'gzed (409.46 KB, application/octet-stream)
2012-07-11 09:03 EDT, Hin-Tak Leung
no flags Details

  None (edit)
Description Hin-Tak Leung 2012-06-06 22:41:23 EDT
Description of problem:
/etc/cron.daily/man-db.cron seems to run everyday around 3 am local time, and it takes about half an hour full of disk activity. Is there any reason for this? I think it should be conditional on having new packages installed/removed since the last time it was run.

The reason why I am filing this bug is that occasionally I cross time zones and do not change the clock on my computer. 3am the computer's clock time may be day time where I am and need to get some work done. With man-db going crazy for half an hour and engaging the disk, it also affects virtual memory/swap and responsiveness to more important and interactive activities.   

Version-Release number of selected component (if applicable):
/etc/cron.daily/man-db.cron

How reproducible:
Always

Steps to Reproduce:
1. Just try manually running /etc/cron.daily/man-db.cron and see your productivity dropping and the responsiveness of the system dropping.
2.
3.
  
Actual results:


Expected results:


Additional info:
There should be no reason for updating the man database more frequently than package installation. i.e. it should be conditional to timestamps of /var/lib/rpm or something, since the last time it was run.
Comment 1 Peter Schiffer 2012-07-11 08:44:24 EDT
Hello,

I can't reproduce this issue. Please, attach following files:
/etc/cron.daily/man-db.cron
/etc/sysconfig/man-db

and output of:
# mandb -d

Thanks,

peter
Comment 2 Hin-Tak Leung 2012-07-11 09:03:43 EDT
Created attachment 597569 [details]
here it is, tar'gzed

Made with:

mandb -d 2>&1 | gzip > /tmp/mandb-d.gz
tar -czpvf /tmp/mandebug.gz /etc/cron.daily/man-db.cron /etc/sysconfig/man-db  /tmp/mandb-d.gz
Comment 3 Peter Schiffer 2012-07-11 09:34:22 EDT
Thanks. Please, run and attach output of:
# mandb -cd

and then run and attach output of:
# time mandb -d

Did you see any improvement when you ran the second command now and before?
Comment 4 Hin-Tak Leung 2012-07-11 12:01:02 EDT
That appears to improves a lot.

# time mandb -cd >& /dev/null

real	16m47.778s
user	2m4.905s
sys	9m25.565s
# time mandb -d >& /dev/null

real	0m14.615s
user	0m3.097s
sys	0m1.136s
Comment 5 Peter Schiffer 2012-07-11 12:30:20 EDT
It looks like you had somehow corrupted man pages database. With command "mandb -c" you've recreated it and now it seems that the issue is gone. Could you observe some next cron job to confirm the problem is fixed?
Comment 6 Hin-Tak Leung 2012-07-11 13:08:08 EDT
(In reply to comment #5)
> It looks like you had somehow corrupted man pages database. With command
> "mandb -c" you've recreated it and now it seems that the issue is gone.
> Could you observe some next cron job to confirm the problem is fixed?

Quite possibly - I have had the same system for a while - upgraded for about 4 years. I only noticed the issue when I worked in a different time zone (where the old early morning is the middle of the new afternoon).

Interestingly I have the index.db from January (system backup), and its file magic is different from the newly rebuilt ones:
old/var/cache/man/index.db:  GNU dbm 1.x or ndbm database, little endian
new/var/cache/man/index.db:  \0 "ϚW\023"

Possibly an enhancement to wipe the database during the usual half-yearly upgrade?
Comment 7 Peter Schiffer 2012-07-11 13:26:17 EDT
Yeah, that's it - the database definitely changed in some update.

And yes, I am considering to recreate the database with every man-db package upgrade.

Thanks for your help!

peter
Comment 8 Peter Schiffer 2012-07-12 11:23:19 EDT
fixed in:
man-db-2.6.2-2.fc18
http://koji.fedoraproject.org/koji/buildinfo?buildID=330275
Comment 9 Fedora Update System 2012-07-12 12:26:59 EDT
man-db-2.6.0.2-7.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/man-db-2.6.0.2-7.fc17
Comment 10 Fedora Update System 2012-07-14 17:58:19 EDT
Package man-db-2.6.0.2-7.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing man-db-2.6.0.2-7.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-10644/man-db-2.6.0.2-7.fc17
then log in and leave karma (feedback).
Comment 11 Fedora Update System 2012-07-20 22:54:26 EDT
man-db-2.6.0.2-7.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.