]> granicus.if.org Git - icinga2/commitdiff
Increase minimum number of threads.
authorGunnar Beutner <gunnar.beutner@netways.de>
Thu, 29 Aug 2013 13:48:47 +0000 (15:48 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Thu, 29 Aug 2013 13:49:11 +0000 (15:49 +0200)
lib/base/threadpool.cpp

index 6adfc8242e12ac3032d4e206484ac0e1825db8e4..ef37df4269f4abfc798de100a7d326dacfbb9637 100644 (file)
@@ -253,7 +253,7 @@ void ThreadPool::ManagerThreadProc(void)
                        else
                                avg_latency = 0;
 
-                       if (utilization < 60 || utilization > 80 || alive < 2) {
+                       if (utilization < 60 || utilization > 80 || alive < 8) {
                                double wthreads = ceil((utilization * alive) / 80.0);
 
                                if (!finite(wthreads))
@@ -261,9 +261,9 @@ void ThreadPool::ManagerThreadProc(void)
 
                                int tthreads = wthreads - alive;
 
-                               /* Don't ever kill the last 2 threads. */
-                               if (alive + tthreads < 2)
-                                       tthreads = 2 - alive;
+                               /* Don't ever kill the last 8 threads. */
+                               if (alive + tthreads < 8)
+                                       tthreads = 8 - alive;
 
                                /* Spawn more workers if there are outstanding work items. */
                                if (tthreads > 0 && pending > 0)