Run a command with low CPU and IO priority
run backup without slowing down the server | run command with low priority | combine nice and ionice | tar running and websites get slow | nice | ionice | priority | backupnice -n 19 ionice -c 3 du -sh /var/www/vhostsnice -n 19 gives the command the lowest CPU priority, and ionice -c 3 puts its disk access into the idle class. This lets backups, compression or large find runs proceed without websites slowing down noticeably. In return, the command takes correspondingly longer under load.
Note: IO priority only takes effect with the BFQ or CFQ schedulers. On NVMe systems with the none scheduler, ionice has little effect; check with cat /sys/block/*/queue/scheduler.
Also searched as
- run backup without slowing down the server
- run command with low priority
- combine nice and ionice
- tar running and websites get slow