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

Question about delete past data

Moderators: Vladimir Kondratyev, Anton Katilin

Question about delete past data

Postby beckam » Sat Aug 26, 2017 7:46 am

Hello everyboydy.

I am doing a memory profiling of 10 Use Cases, one by one. I capture the snapshot for use case 1 and then would like to clear off the data for it and then start cleanly for the new snapshot. The snapshot size becomes huge otherwise, runs into gigs and thats what I am trying to avoid.

I suspect that it keeps adding the data and for all subsequent snapshots the size becomes bigger and bigger - so for e.g. I would get a snapshot of size 200 MB for the 1st Use Case and then 400 MB for the 2nd one and then 600 MB for 3rd one and so on - keeps increasing.

I don't want to restart the App Server everytime to start fresh profiling. Is there a way to do this - erase existing profiling captured data and then start freshly. The command line options do offer to clean alloc, cpu and monitor data - but its not really reducing the size of my snapshots.

Thank you very much!
beckam
 
Posts: 2
Joined: Sat Aug 26, 2017 7:40 am

Re: Question about delete past data

Postby Anton Katilin » Mon Aug 28, 2017 5:52 am

Memory snapshot size is mostly determined by the Java heap objects it describes.

Memory snapshot always contains information about all objects existing in the heap at the moment of capture. There is no way to filter objects at the moment of capture.

Please try capturing performance snapshots instead to see whether and how their size changes in time. Since memory snapshot contains heap information + a performance snapshot, you may check which part contributes to the size growth.

If as the result you see that the performance snapshot part is not responsible, there is no way to reduce the memory snapshot size except than to modify you application such that the heap contains fewer objects.

I can only suggest to explicitly force garbage collection several times in a row before capturing the memory snapshot to make the unreachable objects go away.
Anton Katilin
 
Posts: 5575
Joined: Wed Aug 11, 2004 8:37 am


Return to Java Profiler

Who is online

Users browsing this forum: Bing [Bot] and 9 guests