dotMemory 2016.1 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

See Also

Last modified: 19 August 2016