How can we keep the historic profile data for weeks etc (at

Questions about YourKit Java Profiler
Post Reply
ypnsf
Posts: 10
Joined: Thu Aug 07, 2014 1:29 pm

How can we keep the historic profile data for weeks etc (at

Post by ypnsf »

How can we keep the historic profile data for weeks etc (at least 30 days), like CPU and heap usage for a J2EE application PID. NOTE: this J2EE application JVM may be restarted daily in the mid-night because of the new release of codes to be deployed.

In other words, when our J2EE application hits performance problem, we need to track the historic data to see when this issue (like high CPU usage or memory usage) problem was started?
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: How can we keep the historic profile data for weeks etc

Post by Anton Katilin »

Telemetry is remembered for 1 hour by default. You can extend the time frame with startup option "telemetrylimit":
http://www.yourkit.com/docs/java/help/s ... ptions.jsp

However, storing telemetry for 30 days would need too much memory in the JVM process address space. To keep the memory usage moderate, I would recommend to slightly extend the time frame (e.g. to 5 hours) AND periodically capture snapshots at higher rate (e.g. each 4.5 hours) to ensure they overlap:
http://www.yourkit.com/docs/java/help/periodic.jsp

Snapshots are stored on disk, whose capacity is a much cheaper resource than the in-process memory used for the telemetry buffer.

The sequence of snapshots on disk will represent the historical data. You can delete oldest snapshots as necessary.
ypnsf
Posts: 10
Joined: Thu Aug 07, 2014 1:29 pm

Re: How can we keep the historic profile data for weeks etc

Post by ypnsf »

Thank you for the quick answer. I thought we can keep the historic performance data in a local database.
Two questions:
1) For the snapshots, can we schedule to make the snapshots hourly, instead of human interactively make the snapshots? I would like to see the historic data over night by the scheduled jobs.
2) For the Telemetry is remembered for 1 hour by default. If the JVM has been restarted in the last 20 min, in which the PID was changed. Can the Telemetry remember the Performance data from the Previous PID JVM?
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: How can we keep the historic profile data for weeks etc

Post by Anton Katilin »

1) Yes. Please see "How to trigger the snapshots from the start" section:
http://www.yourkit.com/docs/java/help/periodic.jsp
2) No. It's stored in process memory. If process exits, it's memory is gone.
However, you can instruct the profiler agent to capture snapshot on JVM exit to ensure that the recent telemetry is saved too. To do this, use the startup option "onexit=snapshot":
http://www.yourkit.com/docs/java/help/s ... t_snapshot
ypnsf
Posts: 10
Joined: Thu Aug 07, 2014 1:29 pm

Re: How can we keep the historic profile data for weeks etc

Post by ypnsf »

Thank you, the scheduled snapshot jobs will be run ONLY when the yjp GUI is running on my Server. If yjp GUI is not started, can the scheduled jobs be run in the background?
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: How can we keep the historic profile data for weeks etc

Post by Anton Katilin »

Yes, they will work automatically, without the UI.

Please read the help topics I suggested. You are supposed to use startup options. They are specified on start and do not depend on UI.
ypnsf
Posts: 10
Joined: Thu Aug 07, 2014 1:29 pm

Re: How can we keep the historic profile data for weeks etc

Post by ypnsf »

Anton Katilin wrote:Yes, they will work automatically, without the UI.

Please read the help topics I suggested. You are supposed to use startup options. They are specified on start and do not depend on UI.
Do you mean to startup yjp with options or startup JVM with options? Sorry, we are new to this tool, just try and pilot it.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: How can we keep the historic profile data for weeks etc

Post by Anton Katilin »

I mean http://www.yourkit.com/docs/java/help/s ... ptions.jsp

Do you ever read what I answer? My answers contain direct and exact links.
Post Reply