mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-30 00:54:30 +02:00
Increase minimum number of threads.
This commit is contained in:
parent
eff505e27f
commit
52b645ed17
@ -253,7 +253,7 @@ void ThreadPool::ManagerThreadProc(void)
|
|||||||
else
|
else
|
||||||
avg_latency = 0;
|
avg_latency = 0;
|
||||||
|
|
||||||
if (utilization < 60 || utilization > 80 || alive < 2) {
|
if (utilization < 60 || utilization > 80 || alive < 8) {
|
||||||
double wthreads = ceil((utilization * alive) / 80.0);
|
double wthreads = ceil((utilization * alive) / 80.0);
|
||||||
|
|
||||||
if (!finite(wthreads))
|
if (!finite(wthreads))
|
||||||
@ -261,9 +261,9 @@ void ThreadPool::ManagerThreadProc(void)
|
|||||||
|
|
||||||
int tthreads = wthreads - alive;
|
int tthreads = wthreads - alive;
|
||||||
|
|
||||||
/* Don't ever kill the last 2 threads. */
|
/* Don't ever kill the last 8 threads. */
|
||||||
if (alive + tthreads < 2)
|
if (alive + tthreads < 8)
|
||||||
tthreads = 2 - alive;
|
tthreads = 8 - alive;
|
||||||
|
|
||||||
/* Spawn more workers if there are outstanding work items. */
|
/* Spawn more workers if there are outstanding work items. */
|
||||||
if (tthreads > 0 && pending > 0)
|
if (tthreads > 0 && pending > 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user