I now some Linux-admins are already using nice on Linux for a long time
(I saw a lot who never heard of it even)
Now sins a while there is also ionice if you use cfq scheduler and have a kernel after 2.6.13
I'm sure there are less Linux-admins that heard of it then nice
Now what is the benefit of this tool (that comes withe util-Linux package)
(on ubuntu its included on intrepid, debian on lenny)
Did you complain when you launched a backup-script or a filesync that your system becomes unresponsive or very slow
Well you can now ionice and renice his process so that your production server still get the disk io he needed
#!/bin/bash
ionice -c3 -p$$
renice 20 -p$$
.....
There are 3 main options
-c1 Real Time: this class has get the first access to the disk
-c2 Best effort: gets the rest
-c3 idle: gets only disk time when no other program has asked for it
There is also for -c2 and -c1 8 prio's
0 is highest and 7 is lowest io prio
The default is Best effort prio 4
Watch out with the real-time option
if you give this to a very io intensive process it could take all your io and the system becomes very slow (even unresponsive)