You are not logged in.
Pages: 1
First I run `ionice` as a non-root user, it says 'none: prio 0'.
But then I `sudo -i` and run the command as root and it results in 'none: prio 4'!
After that, running `ionice` from a non-root account also results in 'none: prio 4'!
I tested this on my Debian machine, it acted normally, never saw prio 4.
According to the manuals, none doesn't even have prio 4.
How is this happening? Is it a bug?
Offline
Best-effort
This is the effective scheduling class for any process that has
not asked for a specific I/O priority. This class takes a pri‐
ority argument from 0-7, with a lower number being higher prior‐
ity. Programs running at the same best-effort priority are
served in a round-robin fashion.Note that before kernel 2.6.26 a process that has not asked for
an I/O priority formally uses "none" as scheduling class, but
the I/O scheduler will treat such processes as if it were in the
best-effort class. The priority within the best-effort class
will be dynamically derived from the CPU nice level of the
process: io_priority = (cpu_nice + 20) / 5.For kernels after 2.6.26 with the CFQ I/O scheduler, a process
that has not asked for an I/O priority inherits its CPU schedul‐
ing class. The I/O priority is derived from the CPU nice level
of the process (same as before kernel 2.6.26).
(0+20)/5=4. I can not explain the difference from Debian or why the output changes from 0 to 4 after being executed as root.
Offline
Just realized, the Debian difference was an error on my part. It acted the same as Arch Linux.
I see why 4 is generated, thanks.
It's still bemusing why running ionice on a machine as root would change it's value... .
Offline
Pages: 1