After running
ionice -c2 -n7 <PID> on an I/O-intensive process (VirtualBox VM) and checking the result with ionice -p <PID> it shows best-effort: prio 7 which is expected.

But when monitoring the overall disk I/O of all processes via iotop it shows in PRIO column a value of be/4 for that process, which I assume means best-effort and level (priority) 4, which is average priority and not expected.

Can somebody comment why there's a difference between what ionice and what iotop displays? And is there another way to verify the actual I/O priority of a given process other then with ionice -p ?

From what I understood, there's /proc/<pid>/io but it only displays bytes/characters read and written, but not the priority, cf. Know which process does I/O without iotop
Also How do I view the IO priority of a process? only lists ionice -p

For completeness sake, this is on RHEL 6.7 with iotop 0.3.2, and the scheduler is the default CFQ.


Seems I already found part of the answer. By default iotop shows all processes and threads, and I usually run it via iotop -o which only shows threads and processes doing I/O. The VirtualBox process shown as be/4 is actually a thread, and when I run iotop -p <pid> against the PID which I changed via ionice then it correctly displays be/7 which is expected.

Would still be interesting to know why one thread of that process has a different I/O class/priority, but my ionice does not have -P option to change the I/O class/priority of a process group. Would be nice if someone knows a workaround/solution for that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.