Under Linux, by default, a process's IO priority is derived from its CPU priority according to the formula
io_priority = (cpu_nice + 20) / 5
IO priority ranges from 0 to 7 with 0 being the highest priority. CPU niceness ranges from -20 to 19 with -20 being the highest priority.
You can use the `ionice` command to change a process's IO priority. If you want that process to run only when the system isn't otherwise busy, make it run under the “idle” class rather than the default “best-effort” class:
ionice -c 3 -p $PID
ionice -c 3 mycommand --someoption
Even with the lowest priority, a disk-intensive process tends to slow the system down, if nothing else because it pollutes the cache.
See the `ionice` man page for more information.