Bug 869210 - Custom report cause the db server to oom
Summary: Custom report cause the db server to oom
Keywords:
Status: VERIFIED
Alias: None
Product: TCMS
Classification: Other
Component: Database
Version: 3.8.1
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: ---
Assignee: Yang Ren
QA Contact: Nobody
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-23 09:43 UTC by jianchen
Modified: 2022-03-14 03:24 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description jianchen 2012-10-23 09:43:26 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. use customer report to create report (eg, create report for RHEL 7)
2. the custom report will load for quite a while with no response.
3. Others operation besides report unavailable too.
  
Actual results:
Custom report cause the db server to oom 

Expected results:


Additional info:

Comment 1 jianchen 2012-10-26 03:10:43 UTC
This bug was fixed in tcms 3.8.2.

Previously, tcms custom report raise complex SQL query statement stacked up and eventually caused the database server to oom. It's will only involve RHEL6/RHEL7 custom report because this products exist a large number testcaseruns. Query and statistical testcaserun to a high load on the database server.

Solutions:
Add property (eg. failed_case_run_num, passed_case_run_num) to testrun, each time change testcaserun's status will update relevent testrun's properties. The report will query testrun's properties directly and no need to queries testcaserun one by one which reduce database server pressure.

Comment 2 Xin Gao 2012-10-26 09:46:40 UTC
Verify 3.8.2 on tcms-test -->PASS

cpuinfo,
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 13
model name	: QEMU Virtual CPU version (cpu64-rhel6)
stepping	: 3
cpu MHz		: 2400.056
cache size	: 4096 KB

memory: 1002M

swap:      3148732

Verify steps:
1. use customer report to create RHEL 7 report. And at the same time, another user do advanced Search operation.
2. check the tcms-test env resources while tcms query data, such as, %CPU, %MEM.

Actual result:
after 15s, report generated successfully, And didn't effect advanced search.

But, actually tcms-test env cpu utilization rate reached 95.6% at the beginning of query. this means tcms performance is still not very well, and Query algorithm need to be improved in the future.


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