Bug 147944

Summary: beagle doesn't index with idle priority
Product: [openSUSE] SUSE Linux 10.1 Reporter: Dirk Mueller <dmueller>
Component: GNOMEAssignee: E-mail List <gnome-bugs>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Beta 3   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Dirk Mueller 2006-02-03 11:10:05 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).
Comment 1 Andreas Kleen 2006-02-03 12:27:15 UTC
Maybe it would be a good idea to just change cron to start all cronjobs
with ionice
Comment 2 Andreas Kleen 2006-02-03 12:27:54 UTC
mmj what do you think?
Comment 3 Dirk Mueller 2006-02-03 12:33:13 UTC
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)

Comment 4 Andreas Kleen 2006-02-03 12:51:08 UTC
It's not inherited? That sounds broken if really true. Jens?
Comment 5 Andreas Kleen 2006-02-07 10:17:49 UTC
Why did you change the needinfo?
Comment 6 Dirk Mueller 2006-02-07 10:22:00 UTC
because of comment #2 ?

Comment 7 Jens Axboe 2006-02-07 10:24:50 UTC
ioprio is inherited, if it doesn't work then that's a bug.
Comment 8 Andreas Kleen 2006-02-07 10:35:50 UTC
Thanks. 
Jens, and you agree starting all cronjobs with ionice -c3 is a good idea, right?
Comment 9 Mads Martin Joergensen 2006-02-07 10:43:21 UTC
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.
Comment 10 Jens Axboe 2006-02-07 10:54:10 UTC
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.
Comment 11 Dirk Mueller 2006-02-07 11:02:06 UTC
I just tested, inheriting ionice seems to work fine with current kernel. so consider part one of comment #3 obsolete. 
Comment 12 Joe Shaw 2006-02-08 18:21:57 UTC
I've added a call to ionice in the beagle cron script.  (In case other distros don't ionice by default.)
Comment 13 Joe Shaw 2006-03-06 23:05:01 UTC
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.