How to clear past profiling data for new snapshots
-
- Posts: 13
- Joined: Wed Jul 09, 2014 2:07 pm
How to clear past profiling data for new snapshots
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.
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: How to clear past profiling data for new snapshots
1. If you capture memory snapshots, the biggest contribution to the snapshot file size is the size of objects in Java heap. The snapshot reflects the heap, and you can reduce its size only by reducing your application's memory usage.
If you want to examine objects created inside particular "use case", please consider the Generations feature:
https://www.yourkit.com/docs/java/help/generations.jsp
Increase the generation between the "use cases", then capture a single memory snapshot after the last one.
2. If you observe the problem with performance snapshots, such huge size probably indicates you record too much. Please don't excessively activate profiling modes unless you need their results.
If you want to examine objects created inside particular "use case", please consider the Generations feature:
https://www.yourkit.com/docs/java/help/generations.jsp
Increase the generation between the "use cases", then capture a single memory snapshot after the last one.
2. If you observe the problem with performance snapshots, such huge size probably indicates you record too much. Please don't excessively activate profiling modes unless you need their results.