Bug 1059412
Summary: | OOB calculation can take longer than an hour; either optimize it or have a way to disable it | ||||||
---|---|---|---|---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Elias Ross <genman> | ||||
Component: | Performance | Assignee: | John Sanda <jsanda> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 4.9 | CC: | hrupp | ||||
Target Milestone: | --- | ||||||
Target Release: | RHQ 4.10 | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | |||||||
: | 1063430 (view as bug list) | Environment: | |||||
Last Closed: | 2014-04-23 12:31:28 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1063430 | ||||||
Attachments: |
|
Description
Elias Ross
2014-01-29 19:56:58 UTC
It is possible to disable automatic baseline calculation by setting the frequency to 0. So here we could check that if baseline calculation is disabled, also no baselines are calculated, as they would need the baseline high/low as reference points. It is still possible to have baselines though (e.g. via REST-api) so we can't just completely switch off OOB computation if baselineFrequency == 0. One option could be to check in case baselineFrequency==0 for Baselines in the Baseline table and then only feed those metrics into org.rhq.enterprise.server.measurement.MeasurementOOBManagerBean#calculateOOB instead of all metrics (basically filtering the list passed in into org.rhq.enterprise.server.measurement.MeasurementOOBManagerBean#computeOOBsForLastHour ) Also it should be possible from #computeOOBsForLastHour to just get all existing baselines in one DB-roundtrip and then passing the relevant value into #calculateOOB instead of having all the EM calls inside #calculateOOB (and the query #calculateOOB should be a NamedQuery so that it can be prepared in advance) Created attachment 859504 [details]
Possible patch
The attached patch reduces the run time for me from
17:06:50,501 INFO [org.rhq.enterprise.server.measurement.MeasurementOOBManagerBean] (RHQScheduler_Worker-3) Finished calculating 1223 OOBs in 116039 ms
to
05:04:39,678 INFO [org.rhq.enterprise.server.measurement.MeasurementOOBManagerBean] (RHQScheduler_Worker-4) Finished calculating 1213 OOBs in 16359 ms
The patch probably needs a little more work with respect to the signature change detector.
The patch has been tested and applied to master. master commit hash: 3b9bbfd4355 Bulk closing of 4.10 issues. If an issue is not solved for you, please open a new BZ (or clone the existing one) with a version designator of 4.10. |