-
Notifications
You must be signed in to change notification settings - Fork 581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't run UpdateObjectAuthority for Comments and Downtimes #6885
Conversation
More detailed test protocol: script used:
Cropped output (it's a lot of text)
For comparison, without this patch scheduling those downtimes takes 12 minutes |
Thanks. It is ugly in this case, but larger rewrites in this region are TBD.
|
@Crunsher thanks! Running test with 29,000 services on our QA system. Been running for 10 min. under 2.10.2 already. Will check final times tomorrow and then test a master snapshot. |
Before patch result is: command used: BTW, same command with |
@Crunsher including your patch using build |
ref/IP/9235 |
This is awesome. >60k downtimes in 7 minutes instead of 1-2 hours. Thanks @Crunsher! |
This patch does not run UpdateObjectAuthority when creating Downtimes or Comments via the API. UOA takes up most of the time when creating a new object as it enumerates all objects. Downtimes are especially heavy as you often create multiple of them at a time.
In my tests creating downtimes for 15.000 Services took over 7 minutes (UOA runs 15.000 times, going over all ~30.000 objects), when not running UOA this went down to 50 seconds.
To make sure Downtimes still work without UOA, I ran the following test:
About the implementation:
I am using type->GetName and compare Strings. This may seem ugly but is necessary in this case as type comparison would require libremote to link libicinga which means a dependency circle.