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:
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.
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.