mirror of https://github.com/Icinga/icinga2.git
Create new threads more aggressively right after program start.
Refs #5050
This commit is contained in:
parent
9a93cc83b3
commit
979df4e110
|
@ -54,7 +54,8 @@ start() {
|
|||
fi
|
||||
|
||||
echo "Starting Icinga 2: "
|
||||
ulimit -n 8192
|
||||
ulimit -n 32768
|
||||
ulimit -s 512
|
||||
$DAEMON -c $ICINGA2_CONFIG_FILE -d -e $ICINGA2_ERROR_LOG -u $ICINGA2_USER -g $ICINGA2_GROUP
|
||||
|
||||
echo "Done"
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "base/debug.h"
|
||||
#include "base/utility.h"
|
||||
#include "base/scriptvariable.h"
|
||||
#include "base/application.h"
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <boost/bind.hpp>
|
||||
|
@ -254,7 +255,7 @@ void ThreadPool::ManagerThreadProc(void)
|
|||
|
||||
/* Spawn more workers if there are outstanding work items. */
|
||||
if (tthreads > 0 && pending > 0)
|
||||
tthreads = 8;
|
||||
tthreads = (Utility::GetTime() - Application::GetStartTime() < 300) ? 128 : 8;
|
||||
|
||||
std::ostringstream msgbuf;
|
||||
msgbuf << "Thread pool; current: " << alive << "; adjustment: " << tthreads;
|
||||
|
|
|
@ -73,7 +73,7 @@ private:
|
|||
static int m_NextID;
|
||||
|
||||
boost::thread_group m_Threads;
|
||||
ThreadStats m_ThreadStats[512];
|
||||
ThreadStats m_ThreadStats[4096];
|
||||
|
||||
double m_WaitTime;
|
||||
double m_ServiceTime;
|
||||
|
|
Loading…
Reference in New Issue