Make Load Exponent Configurable
This commit is contained in:
parent
97cabcecf2
commit
9cde4aa109
|
@ -625,12 +625,7 @@ class Worker
|
||||||
if ($load) {
|
if ($load) {
|
||||||
$maxsysload = intval(Config::get("system", "maxloadavg", 50));
|
$maxsysload = intval(Config::get("system", "maxloadavg", 50));
|
||||||
|
|
||||||
if (Config::get('system', 'worker_linear_load', false)) {
|
$exponent = intval(Config::get('system', 'worker_load_exponent', 3));
|
||||||
$exponent = 1;
|
|
||||||
} else {
|
|
||||||
$exponent = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
$slope = pow(max(0, $maxsysload - $load) / $maxsysload, $exponent);
|
$slope = pow(max(0, $maxsysload - $load) / $maxsysload, $exponent);
|
||||||
$queues = intval(ceil($slope * $maxqueues));
|
$queues = intval(ceil($slope * $maxqueues));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue