Quick Linux Tip #37:
Try: ionice -c 3 -p $$
Info: ionice sets I/O priority. Class 3 (idle) only allows disk access when no other process needs it.
Examples:
- $ ionice -c 3 nice -n 19 rsync -av /src /dst # Throttles CPU + I/O
- $ ionice -c 2 -n 7 tar -czf backup.tar.gz /data # Best-effort, low priority
- $ sudo ionice -c 1 -n 4 -p 1234 # Real-time priority (root only)
Note: Classes: 1=Real-time (root only), 2=Best-effort (default), 3=Idle. Combine ionice with nice for complete system throttling.
Leave a Reply