Hi Petter, On Sun, 2008-06-08 at 19:08 +0200, Petter Reinholdtsen wrote: > [Franklin Piat] > > popularity-contest's cronjob (/etc/cron.daily/popularity-contest) > > should use ionice...
> I suspect adding something like this to the script is less intrusive: > > ionice -c2 -p $$ > /dev/null 2>&1 || true Yep, it's less intrusive, however, "ionice -p" doesn't seems to be propagated to existing child process : $ su -s /bin/sh -c "dd if=/dev/zero of=/dev/zero" nobody $ ionice -c2 -p$! -n7 17056 pts/13 S 0:00 \_ su -s /bin/sh -c dd if=/dev/zero ... 17058 pts/13 S 0:00 | \_ sh -c dd if=/dev/zero of=/dev/zero 17059 pts/13 R 0:03 | \_ dd if /dev/zero of /dev/zero 17060 pts/13 R+ 0:00 \_ ps xaf $ ionice -p17059 none: prio 4 $ ionice -p17058 none: prio 4 $ ionice -p17056 best-effort: prio 7 > It change the nice level on the script process. Btw, why did you > choose class 2 (best-effort) instead of class 3 (idle)? The class 3 (idle) can lead to deadlocks[1]. (I think there were some improvements in recent kernels). > I thought class 2 was the default, thus making the operation a no-op? You are right... I usually run "nice ionice -c2 foobar" (which works). Maybe we should do that... or use "ionice -c2 -n7" Franklin [1] http://article.gmane.org/gmane.linux.utilities.util-linux-ng/784 [2] /usr/share/doc/linux-doc-2.6.25/Documentation/block/ioprio.txt.gz -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]