Fix Memory & Resource Issues

Fully integrated, fast and automatic

Ever hunt a creeping memory or resource leak that's crashing your app or leading to errors? Too much effort to hunt leaks in production? Memory management causes too many stalls affecting end-user experience negatively? dynaTrace memory & resource diagnostics capabilities have been built for distributed enterprise & cloud environments, overcoming limitations in scale, reliability, automation and the overhead of classic tools, while maintaining the ease-of use of desktop tools. dynaTrace comes with deep, automated high-speed memory diagnostics, as well as special runtime memory and resource diagnostics capabilities.

Automated and Powerful Memory Diagnostics

Memory problems are the most common application problems, right after performance and scalability problems. Often their symptoms show up only in load test and production environments. That’s when a lightweight and automated memory diagnostics capability is required the most.

dynaTrace Memory Diagnostics Architecture has been built with the ease of use of desktop profilers, and the power for large test environments and production. For performing a full memory analysis, the ultra lightweight dynaTrace smart agent pipes deep memory information directly to the dynaTrace Server for analysis. Only this architecture provides the shortest possible application stalls of sub-seconds to minutes, depending on the heap size and configuration. There is no need for large dump files that could swamp your production disk space, or to copy dump files around. The dynaTrace Memory Analysis Server, an optional component for production and test environments, speeds up deep memory information making it the fastest known system supporting very large heaps of up to 64GB.

The selective memory diagnostics will not stall the application at any time; it runs always-on and traces memory data structures, object allocation and deallocation in context of transactions with the PurePath Technology®. With transaction context, it is easy to find the root-cause of memory and resource leaks, and it avoids scanning the entire source code to find who did not release an object or resource.

dynaTrace automates taking, analyzing and managing memory diagnostics information. A built in scheduler allows fully automated deep memory analysis, to capture deep memory information at intervals. Events may trigger taking memory snapshots, such as when memory utilization reaches a 90% threshold or when an out-of-memory situation occurs. Memory snapshots are stored and correlated with transactional PurePath information as well as JVM and CLR telemetry information. In multi-server environments, dynaTrace automatically transfers to and stores all memory snapshots in the central dynaTrace Performance Warehouse for easy access and collaboration.

Read more: Typical java memory problems

Memory Leak Diagnostics

The vast majority of memory leaks are related to objects not removed from collections such as HashMap and HashTable. dynaTrace automatically learns about an application's data structures allowing it to provide the top memory leak suspects. dynaTrace finds additional memory leaks, using the hot-spots analyzer.

The scheduled, automated memory leak detection is ideal for smaller, very slow leaks, such as those taking over 4 weeks in production to surface.

When a memory leak is detected, it is not in all cases clear how to fix it, because only certain use cases cause the leak. Here is where the PurePath tracing of memory objects is uniquely equipped to get down to the root cause of the leak, for example, when only a certain application flow forgets to remove an allocated object from a collection.

Read more: Finding memory leaks

Memory Hot-Spots

Hardware is thought by many to be cheap, so why bother about memory consumption? But scalability is not cheap at all. 64-bit enables larger heaps, but the larger the heaps the slower the garbage collection process. Thus optimizing memory consumption is important, and can't be done by "throwing hardware at it".

The automatic Memory Hotspot analyzer pinpoints the biggest heap consumptions, showing where the biggest potentials are to reduce heap utilization.

The String Duplicates hotspot analyzer unveils strong memory reduction potentials as well, since many strings can be interned (deduplicated) so they occur only once in the heap.

When applications face growing user numbers, the HTTP session size can become a limiting factor for scalability. Thus dynaTrace comes with a specialized HTTP session analyzer as well.

Memory Management Tuning

Garbage collectors are boon and bane at once. While drastically improving application reliability and reducing programming efforts, they come at a cost of memory management overhead.

Whether Java or .NET, it is important to monitor the garbage collector (GC) activity, as it can become a severe resource hog and can completely stall the application for up to minutes. dynaTrace makes it easy to monitor GC utilization and provides deep diagnostics capabilities to understand how GCs affect application performance. The suspension time information captured with PurePath allows you to identify the GC as a reason for an outlier so to not skew performance analysis by GC stalls. For tuning the garbage collection, whether by reducing object churn rates, increasing heap size to avoid low free heap conditions, or changing garbage collection type, all can be analyzed and visualized. Alerting helps further to detect memory problems before applications crash.

Resource Diagnostics

Not all symptoms show up within the boundaries of the virtual machine. Database connection leaks cause application stalls, GUI handle leaks on clients cause unresponsiveness, and file and socket handle leaks cause crashes hitting the 32-bit address space for example.

Correlating operating system metrics, process metrics and virtual machine metrics that dynaTrace captures with PurePath transaction traces provides diagnostics capabilities to the aforementioned problems. For instance, when a database connection is not properly released to its connection pool by a request handler, dynaTrace tells you about this resource leak suspect. When too many sockets or file handlers are opened, dynaTrace witnesses a growth of process memory allocations as well as operating system handle counts.

Thread Diagnostics

Worker thread pools and background threads often make up hundreds of threads per application instance. To keep an overview about what’s running, which thread consumes most CPU time, and to diagnose problems if a thread is stuck, dynaTrace provides deep thread diagnostics to access stack traces and analyze synchronization problems such as deadlocks.