Rate-limiting processes?
Linux xxx 2.4.26-linode31-1um #1 Thu Jul 8 18:24:02 EDT 2004 i686 UML User Mode Linux GNU/Linux
8 Replies
It is watching your system load & available io tokens and will stop and start services if they go too low/high and restart when systems have returned to normal.
You can modify it for your purposes as follows:
Put your start/stop commands to these files:
$startfile ="/etc/rc.d/start.sh";
$stopfile ="/etc/rc.d/stop.sh";
When to stop services (when load/tokens is at these levels):
$maxload = 3.0;
$l = 0.2; # <20% of max io_tokens
When to restart services (when load/tokens is back at these levels):
$minload = 1.1;
$u = 0.5; # >50% of max io_tokens
Cheers,
Risto
> $a2 = "\$a2";
$a3 = "\$a3";
$a4 = "\$a4";
$a5 = "\$a5";
$a6 = "\$a6";
I'm scared looking at that code lol
if($out =~ /^(iocount=)(\d+)(\s+)(iorate=)(\d+)(\s+)(iotokens=)(\d+)(\s+)(tokenrefill=)(\d+)(\s+)(token_max=)(\d+)$/){
$io_rate = $5;
$io_tokens = $8;
$token_refill = $11;
$token_max = $14;
}
else
{
print STDERR "Invalid /proc/io_status syntax\n";
exit(-1);
}
New version is available in the URL above, too.
Risto
In the end of that thread caker alludes to an ionice-type capability being available in the future. Anybody know if that's here yet?