Bug 1033505 - Consider changing the algorithm for org.rhq.core.pc.plugin.CanonicalResourceKey#ancestorKeyTypePlugins
Summary: Consider changing the algorithm for org.rhq.core.pc.plugin.CanonicalResourceK...
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: Performance, Plugin Container
Version: 4.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: ---
: RHQ 4.13
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-22 09:31 UTC by Heiko W. Rupp
Modified: 2022-03-31 04:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description Heiko W. Rupp 2013-11-22 09:31:01 UTC
The org.rhq.core.pc.plugin.CanonicalResourceKey#ancestorKeyTypePlugins is computed
by doing 

while (parent != null) {
     KeyTypePlugin ktp = new KeyTypePlugin(parent.getResourceKey(),
            parent.getResourceType());
     this.ancestorKeyTypePlugins.add(ktp);
     parent = parent.getParentResource();
}


This will create a new KeyTypePlugin object for every parent, which by itself is not
problematic. 
Unfortunately when you have 

platform->server->service->services1..10

You will end up with 3 KTP for p/s/s for each of the services1..10 even if they are effectively the same for all of the services 1..10.

For a case with 30k resources on an agent this can easily add up to 100k KTP objects where 30k of them repeatedly describe the platform.
33k CanonicalResourceKey objects currently (without making KTP a static inner class) allocate 7MB heap, where the KTPs take 4MB out of that.

Comment 1 Heiko W. Rupp 2014-05-08 14:42:49 UTC
Bump the target version now that 4.11 is out.


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