Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
[dev.icinga.com #8756] Improve DB IDO config dump performance #2767
This issue has been migrated from Redmine: https://dev.icinga.com/issues/8756
Created by TheSerapher on 2015-03-16 08:34:17 +00:00
We have been seeing issues with the initial configuration dump during server startups taking a very long time to complete a full wipe and re-fill of all tables. This interferes with masters when doing reload causing them to initiate a failover. It would be great if these dumps could somehow be changed to only update the tables when needed. Maybe a simple first step could be a config md5sum stored in a table that can be compared against, that way not every restart or reload causes this. Or go further and keep a sum over all files that have been loaded into DB and only reload those files, that have changed.
I don't know the inner workings of Icinga2 so I am not sure this is even doable, but it would greatly help in startup performance.
Updated by TheSerapher on 2015-03-16 12:30:41 +00:00
Here the WorkQueue during Master Startup. Once startup completes, this queue stays empty until checkers are added.
Updated by TheSerapher on 2015-03-16 12:49:02 +00:00
It seems that during reload the IDO connections are paused too:
If that is the case, the master would probably stop updating the status table until the reload completes?
Updated by TheSerapher on 2015-04-17 10:39:54 +00:00
Here an idea that could help to speed up cluster restarts if no config changes are required: Maybe store an overall configuration of checks MD5 sum in the database, once the master starts it can check against the current md5 sum of the current configuration and compare with what is on file in the DB. If those match, just start up and don't dump the configuration.
Would greatly improve restarting the core for Icinga2 changes that do not involve any check changes.
As for check updates, a proper way to improve performance is still required.
Updated by gbeutner on 2016-08-15 14:51:27 +00:00
Please re-test this with the latest master branch. Note that the initial config dump might take longer than before - but subsequent restarts should be noticibly faster.