]> granicus.if.org Git - icinga2/commitdiff
Even more tuning.
authorGunnar Beutner <gunnar@beutner.name>
Sat, 23 Mar 2013 14:57:12 +0000 (15:57 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Sat, 23 Mar 2013 14:58:21 +0000 (15:58 +0100)
lib/base/eventqueue.cpp

index d9871ec1524ca9f26ca33b7b793573a82745cb80..86001e5071d0cd588c2231a417806408d6851ee8 100644 (file)
@@ -34,7 +34,7 @@ EventQueue::EventQueue(void)
        for (int i = 0; i < sizeof(m_ThreadStates) / sizeof(m_ThreadStates[0]); i++)
                m_ThreadStates[i] = ThreadDead;
 
-       for (int i = 0; i < 8; i++)
+       for (int i = 0; i < 2; i++)
                SpawnWorker();
 
        boost::thread reportThread(boost::bind(&EventQueue::ReportThreadProc, this));
@@ -215,7 +215,7 @@ void EventQueue::ReportThreadProc(void)
                                /* Spawn a few additional workers. */
                                for (int i = 0; i < 8; i++)
                                        SpawnWorker();
-                       } else {
+                       } else if (alive > busy + 2) {
                                KillWorker();
                        }
                }