Bug 8426 - mlocate - cron should use idle i/o priority
Summary: mlocate - cron should use idle i/o priority
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords: Junior_job, PATCH
Depends on:
Blocks:
 
Reported: 2012-12-18 15:13 CET by Christian Lohmaier
Modified: 2013-01-03 15:57 CET (History)
2 users (show)

See Also:
Source RPM: mlocate
CVE:
Status comment:


Attachments

Description Christian Lohmaier 2012-12-18 15:13:48 CET
Description of problem:
mlocate's cron /etc/cron.daily/mlocate.cron sets nice-level to 19, but I/O priority only to best-effort with low priority 

The latter is pointless as that best-effort-low-priority is already accomplished by setting the nice level - io_priority = (cpu_nice + 20) / 5.

Furthermore the best-effort class doesn't really have that much of an impact. It should better use the IDLE class:

#!/bin/sh
nodevs=$(< /proc/filesystems awk '$1 == "nodev" && $2 != "rootfs" { print $2 }')
renice +19 -p $$ >/dev/null 2>&1
ionice -c3 -p $$ >/dev/null 2>&1
/usr/bin/updatedb -f "$nodevs"
Thierry Vignaud 2012-12-18 15:28:45 CET

Keywords: (none) => Junior_job, PATCH
CC: (none) => thierry.vignaud

Comment 1 David Walser 2012-12-18 23:09:32 CET
This sounds reasonable to me.  Maybe send a mail to the mageia-dev mailing list and see if anyone can think of any reason not to do this?  If no objections, I can make the change.

CC: (none) => luigiwalser

Comment 2 David Walser 2013-01-03 15:57:35 CET
Fixed in mlocate-0.26-2.mga3

Status: NEW => RESOLVED
Resolution: (none) => FIXED


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