Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005049TestLinkTest Plan (builds, milestones, test assign)public2012-06-04 11:402012-09-01 19:59
Reporterarmor.chen 
Assigned Tofman 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformDell poweredge r320OSLinuxOS Versionubuntu 10.04.2
Product Version1.9.3 (2011 Q3 - bug fixing) 
Fixed in Version1.9.4 (2012 Q3 - bug fixing) 
Summary0005049: memory consumption is large than 10G and TL can not show page in a large project when test assign
DescriptionI have a testlink (TL) on dell server (Xeon X3430 *2 / 8G memory / 8g swap).
Ubuntu 10.04.2 64bit is installed on the server.
TL has 4 projects. Each project has various testplans (10~30).
Total 150+ users.

One of project is for automated test execution.
It has 13000+ testcase in test specification.
In the project, one of testplans has 1600+ assigned testcase for execution.
There are 17 builds in the testplan.

When I want to add/remove testcase, the TL queries information from mysql. The apache requests 10G+ memory to query data. But the result is that TL cannot show testcase assignment page due to memory limit (10240M in php.ini)

Steps To Reproduce1. a project has 13000+ testcase
2. a testplan has 1600+ assigned testcases
3. total 150+ users
4. go to the testplan page, click Add / Remove Test Cases
5. click any testsute on the testcase tree
6. we expect the test assignment page but TL shows blank page on the right hand side.
TagsNo tags attached.
Database (MySQL,Postgres,etc)MySQL 5.1
BrowserChorme 19.0.1084.52 m
PHP VersionPHP 5
TestCaseID
QA Team - Task Workflow Status
Attached Files? file icon memory_consumption.TIF [^] (29,896 bytes) 2012-06-04 12:13

- Relationships

-  Notes
(0016830)
fman (administrator)
2012-06-04 13:47

If you can send us an export of your db we can test with new release
on 1.9.4 we have workd to solve this kind of issue, but without a sample db similar to offending db we can not act.

We warranty maximun confidentiality, we will destroy your db after tests.
send it to francisco.mancardi@gmail.com

before exporting it truncate EVENTS and TRANSACTIONS tables of TL DB
(0016836)
armor.chen (reporter)
2012-06-05 06:37

Hi fman,
After I consult with the administrator, due to IP law, I cannot provide DB to the 3rd-party. Sorry about that.

But I would like to share something related to SQL query that I saw on my system when I click testcase assignment.

I enabled the low query on mysql. There is a query which gets 1,637,706 return rows.

SELECT NHB.parent_id AS testsuite_id, NHA.parent_id AS tc_id, NHB.node_order AS z, NHB.name, T.platform_id, PLAT.name as platform_name ,T.id AS feature_id, T.tcversion_id AS tcversion_id, T.node_order AS execution_order, T.creation_ts AS linked_ts, T.author_id AS linked_by, TCV.version AS version, TCV.active, TCV.tc_external_id AS external_id, TCV.execution_type,TCV.importance, E.id AS exec_id, E.tcversion_number, E.tcversion_id AS executed, E.testplan_id AS exec_on_tplan, E.execution_type AS execution_run_type, E.testplan_id AS exec_on_tplan, E.execution_ts, E.tester_id, E.notes as execution_notes, E.build_id as exec_on_build, UA.build_id as assigned_build_id, UA.user_id,UA.type,UA.status,UA.assigner_id,T.urgency, COALESCE(E.status,'n') AS exec_status, (urgency * importance) AS priority FROM nodes_hierarchy NHA JOIN nodes_hierarchy NHB ON NHA.parent_id = NHB.id JOIN testplan_tcversions T ON NHA.id = T.tcversion_id JOIN tcversions TCV ON NHA.id = TCV.id LEFT OUTER JOIN executions E ON (NHA.id = E.tcversion_id AND E.platform_id=T.platform_id AND E.testplan_id=T.testplan_id ) LEFT OUTER JOIN platforms PLAT ON PLAT.id = T.platform_id LEFT OUTER JOIN user_assignments UA ON UA.feature_id = T.id WHERE T.testplan_id=52547 AND (UA.type=1 OR UA.type IS NULL) ORDER BY testsuite_id,NHB.node_order,tc_id,T.platform_id,E.id ASC;

The nodes_hierarchy table has 72,179 rows.
The testplan_tcversions table has 28,319 rows.
The executions table has 254,662 rows.

I tried to run the part of query

SELECT *
FROM nodes_hierarchy NHA
JOIN nodes_hierarchy NHB ON NHA.parent_id = NHB.id
JOIN testplan_tcversions T ON NHA.id = T.tcversion_id
JOIN tcversions TCV ON NHA.id = TCV.id
LEFT OUTER JOIN executions E ON ( NHA.id = E.tcversion_id
AND E.platform_id = T.platform_id
AND E.testplan_id = T.testplan_id )
LEFT OUTER JOIN platforms PLAT ON PLAT.id = T.platform_id

113,176 rows are returned.

If I let it left join user_assignments, it becomes a big results

SELECT *
FROM nodes_hierarchy NHA
JOIN nodes_hierarchy NHB ON NHA.parent_id = NHB.id
JOIN testplan_tcversions T ON NHA.id = T.tcversion_id
JOIN tcversions TCV ON NHA.id = TCV.id
LEFT OUTER JOIN executions E ON ( NHA.id = E.tcversion_id
AND E.platform_id = T.platform_id
AND E.testplan_id = T.testplan_id )
LEFT OUTER JOIN platforms PLAT ON PLAT.id = T.platform_id
LEFT OUTER JOIN user_assignments UA ON UA.feature_id = T.id
WHERE T.testplan_id =52547
AND (
UA.type =1
OR UA.type IS NULL
)

Total 1,637,706 rows are returned.
(0016837)
fman (administrator)
2012-06-05 07:40

You can get from gitoriuos 1.9.4 preview, that is not stable for production, but you can create a new db copy of yours and migrate it using scripts availables on install\alter tables.
Then point with 1.9.4 to this new db and see if perfomance improve.

Let us now results you get.

we can not do other actions on this situation
(0016838)
armor.chen (reporter)
2012-06-05 11:50

Hi fman,

Thanks for your information.
I have download and test 1.9.4 preview. The performance is improved.
The page response time is less than 10 sec. The memory consumption is less than 180 MB.
(0017342)
fman (administrator)
2012-09-01 19:59

1.9.4 released

- Issue History
Date Modified Username Field Change
2012-06-04 11:40 armor.chen New Issue
2012-06-04 12:13 armor.chen File Added: memory_consumption.TIF
2012-06-04 13:47 fman Note Added: 0016830
2012-06-05 06:37 armor.chen Note Added: 0016836
2012-06-05 07:40 fman Note Added: 0016837
2012-06-05 07:40 fman Assigned To => fman
2012-06-05 07:40 fman Status new => feedback
2012-06-05 11:50 armor.chen Note Added: 0016838
2012-06-05 11:50 armor.chen Status feedback => assigned
2012-06-05 18:32 fman Status assigned => resolved
2012-06-05 18:32 fman Fixed in Version => 1.9.4 (2012 Q3 - bug fixing)
2012-06-05 18:32 fman Resolution open => fixed
2012-09-01 19:59 fman Note Added: 0017342
2012-09-01 19:59 fman Status resolved => closed



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker