Thursday, April 2, 2009

don't let network/disk hogs take over

Long-running or big I/O programs -- disk copies or network downloaders -- can make your system sluggish. To remedy this, tell the Linux kernel that those processes should only hit the disk if the system is idle, that is in scheduling class "3".

NOTE: this command, like most examples, is safe. It only prints out what would be done. To actually run this and other shell examples, remove the "echo" statement.

pgrep bash | xargs -i --no-run-if-empty echo ionice -c3 {}

No comments:

Post a Comment