Thanks, sorry if you misunderstood me.
My question was specifically about this:
" Also inspecting the nodes will point to their model identities."
I wanted to know if I have an automatic way to know from a heap dump, the 
distribution of the model identities, and by that understand what is leaking. 

-----Original Message-----
From: Robert Varga [mailto:n...@hq.sk] 
Sent: Wednesday, January 11, 2017 4:24 PM
To: Sela, Guy <guy.s...@hpe.com>; Tom Pantelis <tompante...@gmail.com>
Cc: controller-dev@lists.opendaylight.org; odl netvirt dev 
<netvirt-...@lists.opendaylight.org>
Subject: Re: [controller-dev] [mdsal-dev] Netvirt Scale tests: OutOfMemory from 
datastore

On 01/11/2017 07:29 AM, Sela, Guy wrote:
> If I'll have a heap dump, how can you find out what are the types of the 
> nodes that are saved there?
> This is an example of a histogram I took in a different run:
>    1:      32272719      774545256  
> org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableLeafNodeBuilder$ImmutableLeafNode

32M leaves

>    2:      24618033      590832792  
> org.opendaylight.yangtools.util.SharedSingletonMap$Unordered
>    3:      15800515      512288528  [Ljava.lang.Object;

That is a lot of plain Objects. Who is holding on to them?

>    4:      16921694      406120656  
> org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableContainerNodeBuilder$ImmutableContainerNode

17M containers

>    5:      15114335      362744040  
> org.opendaylight.yangtools.util.ImmutableOffsetMap$Unordered
>    6:       2565625      306451360  [C

2.5M Strings, averaging at ~50 characters. What are they?

>    7:       7655438      244974016  
> org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier$NodeIdentifierWithPredicates
>    8:       5640289      225611560  java.math.BigInteger

5M BigIntegers ... uint64s, I wonder what their cardinality is.

>    9:       7645644      183495456  
> org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableMapEntryNodeBuilder$ImmutableMapEntryNode
>   10:       7492069      179809656  
> org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableChoiceNodeBuilder$ImmutableChoiceNode

7.5M list entries and about the same number of choices.

yangtools.util maps are used in 4,7,9,10 so their number are kind of expected.

> The types are already normalized to YANG Nodes instead of Flow,Interface,etc.
> So if I'll have an actual heap dump, how can I extract from that the real 
> entities?

Loading it up into YourKit is the best option I know of -- then you can run 
duplicate object analysis and see what crops up.

Also inspecting the nodes will point to their model identities.

Bye,
Robert

_______________________________________________
controller-dev mailing list
controller-dev@lists.opendaylight.org
https://lists.opendaylight.org/mailman/listinfo/controller-dev

Reply via email to