Fully featured low overhead profiler for Java EE and Java SE platforms.
Performance monitoring and profiling of Jenkins, TeamCity, Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

Retained size of objects > 100%

Moderators: Vladimir Kondratyev, Anton Katilin

Retained size of objects > 100%

Postby jocko » Thu Feb 13, 2020 9:38 am

I've memory profiled a Tomcat web application and I get a strange result, the retained size of memory used by the different packages comes to more than 100% (74% + 44% + 30%...). How can this be?

Image
jocko
 
Posts: 1
Joined: Thu Feb 13, 2020 9:24 am

Re: Retained size of objects > 100%

Postby Anton Katilin » Thu Feb 13, 2020 10:20 am

Retained size of different objects or object sets, unlike shallow size, must never be summed directly. This is because retained sets of different object sets (of different packages in your example) may intersect, i.e. include same objects, and if you try to directly sum retained sizes such objects will be accounted more than once, which is incorrect.

To see retained size of multiple packages select them (the table supports multiselection) then use Quick info (Ctrl+Q).

Please read more at https://www.yourkit.com/docs/java/help/sizes.jsp
Anton Katilin
 
Posts: 5947
Joined: Wed Aug 11, 2004 8:37 am


Return to Java Profiler

Who is online

Users browsing this forum: No registered users and 1 guest

cron

YourKit uses cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By browsing our website, you consent to our use of cookies and other tracking technologies in accordance with the Privacy Policy.