Make Load Exponent Configurable

This commit is contained in:
miqrogroove 2018-06-20 06:22:53 -04:00 committed by GitHub
parent 97cabcecf2
commit 9cde4aa109
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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));