The Total Memory dashlet provides snapshot information about currently allocated objects, regardless of their connection to recorded PurePaths or to configured memory rules. Total memory snapshots belong to one of the following two types:
Memory Consumption Trending: These contain information about classes, instance counts and shallow sizes.
Deep Memory Leak Analysis: These contain information about classes, the individual instances, references between instances and the individual instances GC size.Note
Creating a leak analysis snapshot stalls the JVM or CLR. Your application will be unavailable for this time.
The dashlet shows information about all objects that exist in the virtual machine heap memory at the time AppMon creates the memory snapshot. See Memory Diagnostics for more information.
Select several snapshots to view memory usage trend.
The upper pane of the dashlet displays all snapshots of the corresponding system-profile, grouped by Agents. By default, the table contains the following information for each snapshot:
- Agent/Dump: Contains the name of the snapshot (it's creation time by default). Right-click and select Edit to change the snapshot name.
- Labels: Snapshots can have custom labels assigned. To attach information to a snapshot, right-click and select Edit to assign or delete labels.
- Locking State: Determines if you can delete the snapshot automatically if the server is running low on disk-space. Right-click and select Edit to change the locking state.
- Type: The type of the memory snapshot, either Leak Analysis or Trending.
- Status: The state of the snapshot, Finished, Finished (raw) or Not completed. A finished snapshot is ready for analysis, a raw-snapshot needs post-processing before you can analyze. A Not completed status indicates problems you discover while you create or post-process the memory snapshot.
- Used Memory: The amount of allocated memory at the time the snapshot is created.
Right-click on the table header for additional columns.
Additionally, the upper pane of the dashlet contains a Task tab, listing all Memory Snapshot tasks.
How to create a total memory snapshot?
This option only appears when an agent or nothing is selected in the upper table of the dashlet. If you select an existing snapshot, an overview of the snapshot appears. If you select multiple snapshots, a chart appears that compares the overview data.
- Click Create Memory Snapshot. The Create Memory Snapshot dialog box appears.
- Click Pick Agent, and select the required agent from the list.
- Select the memory snapshot type (see the previous description). For the Deep Memory Leak Analysis type you can configure the following options:
- Capture values of String objects: Select it to perform an automatic string duplicate analysis while it post-processes. If you capture the values of string, the time required to create the snapshot increases because string values have to be transferred. This option works only with Java VMs higher or equal to 6.0, and CLRs higher or equal 2.0.
- Capture values of primitive fields: If enabled, the values of primitives can be inspected in the Fields and Values dialog box for each instance. This options is only available for Java VMs higher or equal 6.0.
- If needed, select the Force Garbage Collection before creating snapshot to clean the memory up in prior to creating snapshot. This option is mandatory for .NET Agents.
- If needed, select the Automatically post-process memory snapshot.
- Click OK.
Memory Snapshots initiated by this dialog box are performed by tasks in the Tasks tab. Trending Snapshots can be paused or stopped there using the context-menu.
Snapshot overview tabs
If an existing snapshot (which is already post-processed) is selected in the upper pane, overview information of the corresponding snapshot is presented in the individual tabs in the lower pane as depicted in the following figures. When selecting a non-post-processed snapshot, a button in the lower-pane allows to post-process it.
This tab shows general information regarding the Heap usage at the time the snapshot was created, including maximum Heap size, currently used and committed memory, the number of Classes and (in case of an Leak-Analysis snapshot) the number of Objects and References.
CLick the Show Classes button to open the Memory Snapshot content, including all classes and instances. Click the Show Strings button to show all Strings contained in the snapshot. This is only available if enabled during snapshot creation.
In case the overview contains a message that a potential native memory leak has been detected as depicted in the image below, the process-memory of the application is higher than 120 % of the maximum heap size of your VM. This does not necessarily suggest a problem with native memory, but highlights the possibility of such a leak. Native memory leaks often occur when UI resources are not closed correctly or when a problem with native buffers exists.
The tab shows the potentially top interesting objects in the Memory Snapshot. A Hot Spot is an object that's difference between its own GC size and the maximum GC size of its child is high. A Hot Spot thus 'accumulates' a lot of other objects.
Hot Spots are not ordered by their GC size but by the difference of their size to maximum size of an objects children.
Left-click a Hot Spot to open the Shortest Path to Root By Keep Alive in a new dashlet, which displays how it is kept alive. For further HotSpot analysis such as the objects it keeps alive, right-click on it and select the corresponding drilldown.
The Top Collections/Maps tab shows the largest (by GC size) objects on the Heap that implement the Collection or Map interfaces.
Collections and Maps are shown in a separate tab since they are very frequently the root-cause of a memory leak. Similar to the other tabs, use the context-menu for further analysis of the individual objects.
This tab contains the largest (by GC size) HttpSession objects on the Heap. As for the other tabs, the context-menu allows to drill-down to further analysis dashlets.
Top duplicate strings
If capturing of Strings is enabled while snapshot creation, this tab shows the top duplicate Strings, ordered by their saving potential by String internalization. The saving potential is calculated by the size of a string multiplied by its duplicate-count. Use the context-menu to drill-down to further analysis dashlets.
Shows various extended information regarding the Application, JVM/CLR and the AppMon agent of the snapshot.
Content of a total memory snapshot
Click Show Classes in the overview or double-click on a Memory snapshot to open the corresponding snapshot in a new dashlet. See Total Memory Content dashlet for more information.
If String capturing was enabled while snapshot creation, the Show Strings button in the overview opens all String duplicates within in the snapshot. See Duplicate Strings Content dashlet for further details.
Comparing memory snapshots
When selecting multiple memory snapshots, the overview presents a Chart that shows Heap statistics over time as depicted below. Click the Compare button to compare the selected snapshots. See Total Memory Comparison dashlet for more information.
Within a Leak-Analysis snapshot the following drill-down analysis dashlets are available for individual objects and usually also aggregated for classes. An aggregated analysis means that the corresponding analysis is done for multiple (or all) instances of a class. Use the context-menu on a class or instance for the following analysis dashlets:
- Follow References - Direct
- Follow References - By Keep Alive
- Shortest Root Paths - Direct
- Shortest Root Paths - By Keep Alive
- Keep Alive Set dashlet
- Fields and Values
To create memory dumps, you need the Create Memory Dumps permission assigned to the System Profile role.
To export memory dumps, you need the Export Resource Dumps permission assigned to the Server Management role.
To delete memory dumps, you need the Delete Resource Dumps permission assigned to the Server Management role.