Bugzilla – Bug 147944
beagle doesn't index with idle priority
Last modified: 2006-03-06 23:05:01 UTC
beagle eats considerable system performance because it isn't started with ionice -c3. contrary to that it is started with nice -19 which is superfluent because it is already the default (if it would be started correctly via /etc/cron.daily, see the other bugreport because of that).
Maybe it would be a good idea to just change cron to start all cronjobs with ionice
mmj what do you think?
I don#t think that works, because ionice isn't inherited to child processes (also related, ionice -c3 can't be set by non-root processes for unknown reasons)
It's not inherited? That sounds broken if really true. Jens?
Why did you change the needinfo?
because of comment #2 ?
ioprio is inherited, if it doesn't work then that's a bug.
Thanks. Jens, and you agree starting all cronjobs with ionice -c3 is a good idea, right?
Jens just said on irc that he suggests using ionice -c2, so since we already have a nice call, adding an extra ionice call is not necessary.
Let me fill in the explanation here as well... In general, idle io should only be used on resources that are not globally interesting as you can run into an idle io process holding a resource that someone else needs, but the idle process wont get to do io while someone else is performing io. That means the idle io process can postpone a higher priority process indefinitely, if you keep the disk busy. This is why idle io was made root only, as it needs to be used carefully to avoid a malicious user blocking access to eg /etc/passwd. So the cron worry is that a regular user could peturb eg updatedb to lock out an important file. I don't think it's a real worry, as the hold time would be short anyways. So lets just continue to use -c3, it has a lot less impact on the system than -c2 -n7.
I just tested, inheriting ionice seems to work fine with current kernel. so consider part one of comment #3 obsolete.
I've added a call to ionice in the beagle cron script. (In case other distros don't ionice by default.)
Beagle 0.2.2 submitted which calls ionice in beagle-crawl-system if it's available. Unfortunately, there's still no way to set the ionice on the per-user daemon because it's root only.