↑ ↓ select, Enter open, Esc close

Run a command with low CPU and IO priority

Adjust the values, the command updates live
user@server
nice -n 19 ionice -c 3 du -sh /var/www/vhosts

nice -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

Related one-liners

All in Processes

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.