nice

Run process with least cpu and IO priority

Below is command to run process with the least CPU and IO priority.

nice -n 19 ionice -c 3 <command>

You could also include the same in the beginning of the script:

#!/bin/bash
# Make process nice
renice +19 -p $$ >/dev/null 2>&1
ionice -c3 -p $$ >/dev/null 2>&1

References:

Syndicate content
Comment