dotMemory 2017.2 Help

Analyzing Memory Traffic

Traffic analysis is the main instrument for determining ineffective memory usage in your app. Excessive allocations and garbage collections may imply significant memory management overhead. For example, you have an array of objects which should be updated over time. You can update each object in two ways: by creating a new instance with required properties or by updating properties of the existing instance. From functionality perspective, both options are the same. But from the point of memory management workload, creating a new instance all the time is much less effective.

Use traffic analysis to understand what objects are created/collected most intensively in your app and what functions cause this memory traffic.

How to Get Traffic Data

Memory traffic information is collected by dotMemory along with other allocation data. After the data is collected, you proceed to the Analysis Overview page.

To begin the traffic analysis, you must first select the timeframe for the traffic data. There are three options:

  • Traffic between the start of a profiling session and the time of getting a particular snapshot
  • Traffic between a specific time point and the time of getting a particular snapshot
  • Traffic between two snapshots

Let's take a more detailed look on how you can get these traffic data.

Start of a profiling session - Snapshot

analyzing traffic 1

To get these data, you must turn on Start collecting allocation data immediately in the profiling options.

To view traffic data, click the Memory traffic link for the desired snapshot. After this, traffic data will be shown in the Memory Traffic view.

traffic start snapshot

Specific point in time - Snapshot

analyzing traffic 1 1

To get these data, you must turn off Start collecting allocation data immediately in the profiling options. During profiling, to indicate the time point from which you want to collect the data, click the Collect Allocations button.

To view traffic data, click the Memory traffic link for the desired snapshot. After this, traffic data will be shown in the Memory Traffic view.

Snapshot - Snapshot

analyzing traffic 2

Enable traffic data collection on the interval between snapshots. You can do this either with Start collecting allocation data immediately in the profiling options or using the Collect Allocations button during profiling.

To view traffic data, drag and drop the desired snapshots to the comparison area and click View memory traffic. After this, traffic data will be shown in the Memory Traffic view.

traffic snapshot snapshot
Last modified: 14 December 2017

See Also