Bug 1029267

Summary: [Performance] TCMS Reporting respond slowly and cause MySQL server high CPU usage
Product: [Other] TCMS Reporter: Xiong Zhi Ming <zxiong>
Component: ApplicationAssignee: Yuguang Wang <yuwang>
Status: CLOSED WONTFIX QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: DevelCC: aigao, azelinka, cqi, dli, fhuang, jianchen, junzhang, nli, ryang, tzhao, vchen, zxiong
Target Milestone: ---Keywords: Improvement, Performance
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-29 03:56:11 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:
Attachments:
Description Flags
MySQL Server CPU used% none

Description Xiong Zhi Ming 2013-11-12 02:47:17 UTC
Created attachment 822739 [details]
MySQL Server CPU used%

Description of problem:
TCMS Reporting(Overall, Custom,Testing Report) respond slowly and cause MySQL server high CPU usage

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

How reproducible:


Steps to Reproduce:

Set 1 virtual user, run 10 times to get the average processing time. Detail user scenarios:

1. From “REPORTING” menu, Click the “Product Name”
2. Click “Versions” to view the report sorted on product version
3. Click “Builds” to view the report sorted on product builds
4. Click “Component” to view the report
5. From the “REPORTING” tab, click “Custom”.
6. Enter the search details, click “Search”.
7. Click a record from the result
8. From the “REPORTING” tab, click “Testing Report”.
9. Select the product from the drop down box and either 1 or a range of versions,click “Generate Report”.
10. Select the product from the drop down box and either 1 or a range of versions,select "By Plan & Build",click “Generate Report”.


Actual results:
Page Name	                Page Elapsed Time(ms)  
--------------------------      --------------------
OR_Version	                47917
OR_ProductName	                22833
CR_Detail	                31919
TR_GenerateReport(byTester)	34004
TR_GenerateReport(byplan)	16248

Expected results:
less than 15 seconds

Additional info:
Test env:
Server	Function	OS	CPU	Memory	Software
dhcp-8-146.nay.redhat.com	DB Server	Red Hat Enterprise Linux Server release 6.3	1 CPU (4 Cores)	4G	MySQL 5.1.67
tcms-test.app.eng.nay.redhat.com	Web Server	Red Hat Enterprise Linux Server release 5.1	2VCPU	2GB	"Apache Http Server 2.2
Nitrate 3.8.5"
dhcp-8-145.nay.redhat.com	JMeter load generator	Red Hat Enterprise Linux Server release 6.3	1 CPU (8 Cores)	8G	JMeter 2.9

Comment 1 Tingting Zhao 2014-10-23 02:36:39 UTC
verify on qa server with 3.8.12
the CPU usage is very high when involving the REPORTING .