Hello,
I took a memory-snapshot of our Application. The snapshot shows 6.000 Objects similar to the following Screenshot.
So the "Retained Size" of a single "RemoteObjectBridgeImpl" seems to be 100k. But I don't get why.
The "Notifier" is shared among all Instances of "RemoteObjectBridgeImpl", so is the <class>.
Adding up the "Retained Size" of the remaining fields, I would expect the "Retained size" to be 2k at most.
Is this a bug or am i missing something?
Unexpected Retained Size
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Unexpected Retained Size
Hello Thorsten,
To see which objects constitute the retained size please use Memory | Retained Objects (Shift+F4) action.
http://www.yourkit.com/docs/java/help/sizes.jsp
Best regards,
Anton
To see which objects constitute the retained size please use Memory | Retained Objects (Shift+F4) action.
It's incorrect to add retained sizes of fields, or of any subset of individual objects. Instead, it's calculated for a set of objects as a whole:Adding up the "Retained Size" of the remaining fields
http://www.yourkit.com/docs/java/help/sizes.jsp
Best regards,
Anton
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Unexpected Retained Size
An update: the same topic has been discussed in the following thread:
http://forums.yourkit.com/viewtopic.php?f=3&t=3104
http://forums.yourkit.com/viewtopic.php?f=3&t=3104
-
- Posts: 13
- Joined: Mon Aug 27, 2012 8:58 am
Re: Unexpected Retained Size
Hello,
Thank you for helping. For future reference: A lot of big objects in our application are retained (or maybe i should say "are reachable" )
by two or more seperate fields of the same object, so they don't show show up in the retained size of of the respective fields.
Thank you for helping. For future reference: A lot of big objects in our application are retained (or maybe i should say "are reachable" )
by two or more seperate fields of the same object, so they don't show show up in the retained size of of the respective fields.
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Unexpected Retained Size
Object explorer by itself may not be the best place to start finding biggest objects and investigate where objects are retained from. Instead, please consider the following:
Individual big objects can be found with the help of the "Biggest objects (dominators)" view:
http://www.yourkit.com/docs/java/help/b ... bjects.jsp
Also, sorting Class list by retained size (either estimated or calculated exact) can help finding both individual big objects or classes with big number of instances, whose total size is big.
Paths and Merged Paths views will help to find where they are retained from.
Individual big objects can be found with the help of the "Biggest objects (dominators)" view:
http://www.yourkit.com/docs/java/help/b ... bjects.jsp
Also, sorting Class list by retained size (either estimated or calculated exact) can help finding both individual big objects or classes with big number of instances, whose total size is big.
Paths and Merged Paths views will help to find where they are retained from.