[icinga-checkins] icinga.org: icinga2/master: Improve IDO performance

git at icinga.org git at icinga.org
Wed Jul 13 14:58:44 CEST 2016


Module: icinga2
Branch: master
Commit: 1bd235b9fb02db300f1da2d3a372b25c51e3487c
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=1bd235b9fb02db300f1da2d3a372b25c51e3487c

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Wed Jul 13 14:44:53 2016 +0200

Improve IDO performance

refs #12147

---

 lib/db_ido_mysql/idomysqlconnection.cpp |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/db_ido_mysql/idomysqlconnection.cpp b/lib/db_ido_mysql/idomysqlconnection.cpp
index 40f720b..d002682 100644
--- a/lib/db_ido_mysql/idomysqlconnection.cpp
+++ b/lib/db_ido_mysql/idomysqlconnection.cpp
@@ -39,7 +39,7 @@ REGISTER_TYPE(IdoMysqlConnection);
 REGISTER_STATSFUNCTION(IdoMysqlConnection, &IdoMysqlConnection::StatsFunc);
 
 IdoMysqlConnection::IdoMysqlConnection(void)
-	: m_QueryQueue(1000000)
+	: m_QueryQueue(10000000)
 { }
 
 void IdoMysqlConnection::OnConfigLoaded(void)
@@ -453,6 +453,11 @@ void IdoMysqlConnection::AsyncQuery(const String& query, const boost::function<v
 	aq.Query = query;
 	aq.Callback = callback;
 	m_AsyncQueries.push_back(aq);
+
+	if (m_AsyncQueries.size() > 25000) {
+		FinishAsyncQueries();
+		InternalNewTransaction();
+	}
 }
 
 void IdoMysqlConnection::FinishAsyncQueries(void)



More information about the icinga-checkins mailing list