[Popcon-developers] Bug#483465: popularity-contest: cronjob should use ionice
Franklin PIAT
fpiat at bigfoot.com
Mon Jun 9 06:06:34 UTC 2008
Hello,
On Mon, 2008-06-09 at 07:33 +0200, Petter Reinholdtsen wrote:
> [Franklin PIAT]
> > Yep, it's less intrusive, however, "ionice -p" doesn't seems to be
> > propagated to existing child process :
>
> I know, and that is OK, as long as it is executed early in the script,
> before child processes are forked.
So you did meant "ionice -c2 -p $$" before invocation, not "ionice -c2
-p $!" after... I miss-understood that.
As you mentioned, it would be less intrusive, so it would be better.
> > The class 3 (idle) can lead to deadlocks[1]. (I think there were some
> > improvements in recent kernels).
>
> Ah, good to know.
>
> >> 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"
>
> If -c2 already is the default, it would be a no-op, and I see be no
> reason to call it for the popcon scripts.
Class 2 is the default class. But within that class there are many
priorities. The manpage says "This class takes a priority argument from
0-7, with lower number being higher priority".
ioprio.txt[1] states that "io_nice = (cpu_nice + 20) / 5" which means
the default is 4.
> The '-n7' argument might have some effect, but with -c2 it would raise the priority of the
> process, not lowering it, if I understand ionice correctly. Yet
> again, I fail to understand why you would like to use the arguments
> you propose. Care to elaborate?
You pointed out my mistake previously : "ionice -c2" should be run in
conjunction with "nice", or "ionice -c2 -nX" to actually have an
effect.
> Bill suggested this should be done in cron, and not in each cronjob.
> What is your view on this? Why should it be fixed here and not in
> crond?
I've just replied to his mail.
Short answer : "Why not if it can be in Lenny".
Long answer include : "...undesirables side effects..."
Franklin
More information about the Popcon-developers
mailing list