Browse Source

Make Load Exponent Configurable

pull/5251/head
miqrogroove 4 years ago committed by GitHub
parent
commit
9cde4aa109
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/Core/Worker.php

7
src/Core/Worker.php

@ -625,12 +625,7 @@ class Worker
if ($load) {
$maxsysload = intval(Config::get("system", "maxloadavg", 50));
if (Config::get('system', 'worker_linear_load', false)) {
$exponent = 1;
} else {
$exponent = 3;
}
$exponent = intval(Config::get('system', 'worker_load_exponent', 3));
$slope = pow(max(0, $maxsysload - $load) / $maxsysload, $exponent);
$queues = intval(ceil($slope * $maxqueues));

Loading…
Cancel
Save