Bug 534911 (RHQ-1661) - change baseline calculations to fine-grained deletes and insertions
Summary: change baseline calculations to fine-grained deletes and insertions
Keywords:
Status: CLOSED NEXTRELEASE
Alias: RHQ-1661
Product: RHQ Project
Classification: Other
Component: No Component
Version: unspecified
Hardware: All
OS: All
high
medium
Target Milestone: ---
: ---
Assignee: Joseph Marques
QA Contact: Corey Welton
URL: http://jira.rhq-project.org/browse/RH...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-02-24 22:06 UTC by Charles Crouch
Modified: 2015-02-01 23:25 UTC (History)
1 user (show)

Fixed In Version: 1.2
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Charles Crouch 2009-02-24 22:06:00 UTC
By waiting 3 days between baseline calculations and then recomputing any that are stale, the amount of work that needs to be done might not complete in time.  as a result, we were seeing baselines timeout.

charles: "I was seeing call to this method
MeasurementBaselineManagerBean._calculateAutoBaselinesDELETE(long startTime, long endTime) throws Exception {
timeout as part of the DataPurge job in the perf job.  This method along with _calculateAutoBaselinesINSERT, _calculateAutoBaselinesDELETE_HQL and _calculateAutoBaselinesINSERT_HQL are using the default txn timeout (10mins?). They have a longer timeout commented out //@TransactionTimeout( 60 * 60 )"

this jira is to fix the baseline calculation job algo so that as soon as a baseline is stale it is purged and recalculated.  this will help amortize the performance profile by doing the work in as frequent and small chunks as possible.


Comment 1 Joseph Marques 2009-02-25 02:44:05 UTC
btw, _calculateAutoBaselinesDELETE_HQL and _calculateAutoBaselinesINSERT_HQL are not currently in use.  we wanted this to be a purely JPQL/HQL driven solution, but multiple attempts have been tried only to fall up short to due the inability for the syntax to support what we needed to do.

Comment 2 Joseph Marques 2009-02-25 02:46:36 UTC
rev3179 - change baseline calculation algorithm to recompute on a fine-grained basis, as soon as a baseline becomes "stale"

Comment 3 Joseph Marques 2009-04-07 02:55:27 UTC
reproduction steps:

step 1: reduce time necessary to see results
* go to server configuration under the administration section of the site
* change BOTH the baseline frequency and baseline dataset to 1 day

step 2: skew the import times of resources, this will skew the baseline calculation times
* start with an empty inventory @ time "t0"
* import SOME but not all resources from AD portlet, let's call the number of resources in inventory at this time A
* wait at least X hours, where X >= 2, let's call this "t1"
 *import the rest of the resources, let's call the number of resources imported by this B
* thus, A+B is the total number of resources in inventory, let's call this C

step 3: verify results
* 24 hours after t0 (or 24-X hours after t1), let's call this "t2", the first baselines will have been calculated
** go to /admin/test/sql.jsp and execute "select count(id) from rhq_measurement_bline"
** the count should be equal to A
* 24 hours after t1 (or after X more hours "t2"), the rest of the baselines will have been calculated
** go to /admin/test/sql.jsp and execute "select count(id) from rhq_measurement_bline"
** the count should be equal to C
** now execute "select bl_compute_time, count(id) from rhq_measurement_bline group by bl_compute_time"
** you should have two results, one count should be equal to A, one count should be equal to B

Comment 4 Corey Welton 2009-04-09 15:47:27 UTC
QA Verified (finally).

Comment 5 Red Hat Bugzilla 2009-11-10 20:37:44 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1661



Note You need to log in before you can comment on or make changes to this bug.