Description of problem:
Steps to Reproduce:
1. Have a large inventory (cca 1000 resources per platform)
2. Login as a number of different users.
3. Browse through the pages containing the left navigation tree.
With enough users (20 or so) accessing such pages, the server runs out of memory.
This should work without problems.
This problem is possibly caused by the ResourceManagerBean.findResourcesByAgent() method which returns all the resources on given platform each time the resource tree is rendered where the instances have unnecessarily initialized fields.
Bug 572342 is related to and possibly obsoleted by this bug.
*** Bug 572342 has been marked as a duplicate of this bug. ***
The solution offered in the bug 572342 is only the first step in solving this because with big inventories (>2000 resources per platform) the tree is approx. 10MB in size (per user). So with 20 users simultaneously browsing the nav tree pages, we need 200MB just for storing the tree in session.
The second step is to optimize the datastructure that stores the tree in session. Because only limited subset of data is needed for the display purposes, we can be quite aggressive in this and achieve cca 8-fold improvement.
We need both fixes in place to a) reduce the memory consumption and b) not runaway with storing too much unnecessary data in the session.
Fixed in RHQ_1_3_1_GA_CP SVN branch in revision 5305 and in git by commit b547a54 (as of now, this is in a separate branch in git).
*** Bug 574025 has been marked as a duplicate of this bug. ***
Lukas, did you test master with your UI load testing framework?
I've tested this before I merged it into master, so technically I didn't test master but practically it should be ok since the code in question was tested elsewhere.
Setting to VERIFIED based on lukas' description
Mass-closure of verified bugs against JON.