YourKit Operations: Difference between revisions
Line 7: | Line 7: | ||
The log files are created in ~/.yjp/log. | The log files are created in ~/.yjp/log. | ||
=<span id='Memory_Snapshot_Comparison'> | =<span id='Memory_Snapshot_Comparison'><span id='Finding_a_Memory_Leak'></span>Diagnosing a Memory Leak= | ||
A [[Java_Memory_Concepts#Memory_Leak|memory leak]] represents an unwanted accumulation of object instances on the heap. Memory leak diagnosis consists of: | |||
* determining there is a memory leak | |||
* identifying the object instances that leak | |||
* identifying the reason the leaked object instances are held in memory | |||
For concepts used in memory leak diagnosis, see [[YourKit_Concepts#Memory_Profiling|YourKit Concepts for Memory Profiling]]. | For concepts used in memory leak diagnosis, see [[YourKit_Concepts#Memory_Profiling|YourKit Concepts for Memory Profiling]]. | ||
<font color=darkgray> | <font color=darkgray> |
Revision as of 18:34, 12 June 2018
Internal
Logging
The log files are created in ~/.yjp/log.
Diagnosing a Memory Leak
A memory leak represents an unwanted accumulation of object instances on the heap. Memory leak diagnosis consists of:
- determining there is a memory leak
- identifying the object instances that leak
- identifying the reason the leaked object instances are held in memory
For concepts used in memory leak diagnosis, see YourKit Concepts for Memory Profiling.
TODO:
- http://localhost:9627/personal/Wiki.jsp?page=YourKitProcedures
- https://www.yourkit.com/docs/java/help/compare_snapshots.jsp
Objects (+/-) displays the difference in object count for instances of the specified class. A positive value means that snapshot 2 (the later memory state) has more objects.
Size (+/-) displays the difference in shallow size associated with the specified class instances. A positive value means that the corresponding instances in snapshot 2 (the later memory state) have a larger shallow memory footprint.
The percentage associated with the change in size is calculated relative to the total size of all objects in the old snapshot: 100% of size corresponds to the total size of all objects in the old snapshot.
TODO - factor in dominators.
Diagnosing Excessive Garbage Collection
For concepts used in diagnosing excessive garbage collection, see YourKit Concepts for Memory Profiling.
Procedure:
Manually Configure Target JVM for Remote Profiling
Connect to a Remote Instrumented JVM via SSH
Before attempting to connect, the remote JVM should be instrumented as described in Manually Configure Target JVM for Remote Profiling.
Profile remote Java EE server or application ... -> Main Tab
Connection name: usually named after the host name.
Host IP or address: Address of the machine where Java processes run.
Application discovery method -> Advanced -> SSH user.
For "Authentication settings" the password or the private key can be used.
The connection can then be tested with "Test Connection".
Connect to a Remote Instrumented JVM via an SSH Tunnel
TODO.
Maven and YourKit
TODO: http://localhost:9627/personal/Wiki.jsp?page=MavenAndYourKit