Bug 8426

Summary: mlocate - cron should use idle i/o priority
Product: Mageia Reporter: Christian Lohmaier <lohmaier+mageia>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: luigiwalser, thierry.vignaud
Version: CauldronKeywords: Junior_job, PATCH
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: mlocate CVE:
Status comment:

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