Java is a great language for programmers because it hides the complexity required for good memory management. JVM manages memory pools and Garbage Collection algorithms. On the other hand, it requires a good approach to avoid memory waste that can limit application performance.

SpyGlass Tracer is able to monitor memory from a JVM point of view (Memory Spaces, Garbage Collectors, Process Memory) and from an application point of view (Memory per transaction).

Using SpyGlass Tracer you can identify most consuming memory components and calls.

In the same way, you can monitor CPU usage and identify transactions and method related to most CPU usage.

JVM Memory Management

SpyGlass Tracer collects most useful information from JVM including memory pools and garbage collection metrics:

You have also detail for any single memory space:

You can also see the allocation rate: in this chart, you can see how many MBs of memory are used by the application.

And long term locked memory size:

If the red line continues to increase you’ll have probably a memory leak. You can set alarm on the Locked Memory metric.

Trace Level Memory Usage

SpyGlass Tracer collects information about memory consumption also for each request detailing also on a specific period base.

Take a look at memory column in the Trace panel:

And System Usage information in the Trace Detail:

You can also set alarm based on trace memory consumption.

Memory Map

SpyGlass Tracer collects information on heap contents:

This table is very useful to understand the memory footprint of your system and memory leaks.

Garbage Collectors Activity

In the same way, SpyGlass Tracer collects information on Garbage Collectors activity:

SpyGlass tracer collects also information on Full Garbage Collection causes and performances:

CPU Usage

SpyGlass Tracer collects information related to JVM Process CPU usage:

SpyGlass Tracer also collects information on single thread CPU usage contribution: