Bug 577294 - 10-20 Simulatenous users accessing a page with leftnav causes huge memory usage
Summary: 10-20 Simulatenous users accessing a page with leftnav causes huge memory usage
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Core Server
Version: 1.3.1
Hardware: All
OS: All
high
high
Target Milestone: ---
: ---
Assignee: Lukas Krejci
QA Contact: Corey Welton
URL:
Whiteboard:
: 572342 574025 (view as bug list)
Depends On:
Blocks: jon-sprint11-bugs
TreeView+ depends on / blocked
 
Reported: 2010-03-26 16:13 UTC by Lukas Krejci
Modified: 2018-10-27 16:15 UTC (History)
3 users (show)

Fixed In Version: 2.4
Clone Of:
Environment:
Last Closed: 2010-08-12 16:46:19 UTC
Embargoed:


Attachments (Terms of Use)

Description Lukas Krejci 2010-03-26 16:13:20 UTC
Description of problem:

see summary.

How reproducible:

always

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

With enough users (20 or so) accessing such pages, the server runs out of memory.

Expected results:

This should work without problems.

Additional info:

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.

Comment 1 Lukas Krejci 2010-03-26 16:14:27 UTC
Bug 572342 is related to and possibly obsoleted by this bug.

Comment 2 Lukas Krejci 2010-04-01 12:07:10 UTC
*** Bug 572342 has been marked as a duplicate of this bug. ***

Comment 3 Lukas Krejci 2010-04-01 12:21:03 UTC
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.

Comment 4 Lukas Krejci 2010-04-09 12:11:59 UTC
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).

Comment 5 Charles Crouch 2010-04-23 15:23:39 UTC
*** Bug 574025 has been marked as a duplicate of this bug. ***

Comment 6 Charles Crouch 2010-06-03 14:44:57 UTC
Lukas, did you test master with your UI load testing framework?

Comment 7 Lukas Krejci 2010-06-03 16:18:30 UTC
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.

Comment 8 Charles Crouch 2010-06-03 16:24:41 UTC
Setting to VERIFIED based on lukas' description

Comment 9 Corey Welton 2010-08-12 16:46:19 UTC
Mass-closure of verified bugs against JON.


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