Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Ionice is a standard linux command that allows to set the io priority for a process:

Do children processes inherit ionice priorities from their parents? How do you check the io priority of a running process?

share|improve this question
up vote 8 down vote accepted

Yes. I tested it. IO priority is inherited just like CPU niceness. This is probably what you want. If it isn't, you can explicitly specify the IO priority of child processes with the ionice command.

share|improve this answer

From the man page (man ionice):

# ionice -p 89 91
Prints the class and priority of the processes with PID 89 and 91.
share|improve this answer
+1 for you since you answered the other half of the question. – Ryan Thompson Nov 1 '09 at 11:39

Any processes that are forked inherit the io class and priority of their parent, however an important fact to keep in mind is that if you alter the io class and/or priority of a running process it doesn't change the io class/priority of any current child processes of that process. That said, once you have adjusted the class and/or priority of a running process, any child processes that are forked going forward will inherit the new io class and priority.

share|improve this answer

Yes and this is how I tested it

Create two files

# ==> <==
echo $$


# ==> <==
echo $$
echo -n Before change:

echo Change to best-effort
ionice -c best-effort -p $$

echo After changed

echo Subprocess
echo $x

Then, run it:

$ bash 
Before change:idle
Change to best-effort
After changed
best-effort: prio 4
2555 best-effort: prio 4
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .