Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#16518 - [man-db] and mlocate (package) 's cron job could use use ionice

Attached to Project: Arch Linux
Opened by solsTiCe (zebul666) - Thursday, 08 October 2009, 11:42 GMT
Last edited by Andreas Radke (AndyRTR) - Monday, 15 March 2010, 12:01 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Andreas Radke (AndyRTR)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Feature request!
i have seen a interesting idea in bug  FS#14467 .

use ionice in cron job of man-db and mlocate. I have always found annoying those cronjob that hammer my harddisk just after i powered up my PC and had something more important to do than to wait for whatever apps you run to open because those cronjob take all the ressource on disk

it's a desktop situtation with fcron (or cron+anacron) but i doubt a server need all ressource be taken to such a task at 00:00 either.

so please use
"nice -n 19 ionice -c 3"
before man-db and mlocate (updatedb) in their cronjob
like this
# regenerate man database
nice -n 19 ionice -c 3 /usr/bin/mandb --quiet

packages : man-db mlocate

may be it could benefit to other cron job too.
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Monday, 15 March 2010, 12:01 GMT
Reason for closing:  Implemented
Comment by Roman Kyrylych (Romashka) - Thursday, 08 October 2009, 11:54 GMT
Doesn't this apply to any cronjob?
How about making it globally tunable:
* add conf.d/cron with NICE variable to all cron packages (dcron in Core, few others in Community)
* user can set NICE in conf.d/cron to something like "nice -n 19 ionice -c 3"
* source it from man-db, mlocate, etc. cron files
* run the required command from cron files with $NICE prepended
Comment by Allan McRae (Allan) - Thursday, 08 October 2009, 12:14 GMT
For mlocate, this is a duplicate of  FS#15613 . As I said there, the cron job is in the backup array for mlocate so you are free to modify it yourself.
Comment by solsTiCe (zebul666) - Thursday, 08 October 2009, 17:08 GMT
to allan:
what backup array are you talking about ? in which file do you modify that ?

please elaborate
Comment by solsTiCe (zebul666) - Friday, 09 October 2009, 09:16 GMT
ah ok
you mean the cron job file is in the backup array of the package so it is backed up by pacman before any upgrade of the package and i will not loose my change ?

thanks. i already made the change.
Comment by Allan McRae (Allan) - Thursday, 22 October 2009, 13:58 GMT
nice/ionice added to mlocate cron job in 0.22.2-2
Comment by solsTiCe (zebul666) - Friday, 30 October 2009, 10:31 GMT
i found IONICE_CLASS=2 was not enough and was hammering too much my disk
so i change it to 3 (IONICE_CLASS=3)
but then i got this line added to the email from cron about cron.daily

ionice: ignoring given class data for idle class

harmless but ...
dealing with that means removing the -n flags of ionice if IONICE_CLASS is different than 1 or 2.
Comment by solsTiCe (zebul666) - Saturday, 07 November 2009, 12:00 GMT
why do not Keep It Simple Stupid ? aka. KISS
nice -n 19 ionice -c 3
or
ionice -c 3 nice --n 19

?
Comment by Paul Mattal (paul) - Saturday, 06 March 2010, 20:23 GMT
Do the man-db maintainers think we should go the same way Allan did for mlocate? His crontab for mlocate looks like a good model.
Comment by Andreas Radke (AndyRTR) - Monday, 08 March 2010, 21:00 GMT
implemented the same nice/ionice support into man-db cron.daily file. please test man-db 2.5.7 in testing.

Loading...