]> git.mxchange.org Git - friendica.git/commitdiff
Make Load Exponent Configurable
authormiqrogroove <miqrogroove@gmail.com>
Wed, 20 Jun 2018 10:22:53 +0000 (06:22 -0400)
committerGitHub <noreply@github.com>
Wed, 20 Jun 2018 10:22:53 +0000 (06:22 -0400)
src/Core/Worker.php

index bafe3711301c66b0074562be934dac9a231d1db6..3df20c5145c35a15d632005f4dafd4f4ca81919e 100644 (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));