## Download PDF

Download page Dynamic Baselines.

# Dynamic Baselines

This page describes how AppDynamics automatically calculates the baseline performance for your applications. Once it establishes these prevailing performance characteristics, it can detect anomalous conditions for your application. AppDynamics uses baselines to:

- Color the Flow Map.
- Show transaction score dashboards.
- Compare metrics in metric graphs and the metric browser.
- Evaluate health in health rules (see Health Rules).

## How Baselines Work

AppDynamics calculates baselines by using the underlying hourly data. A baseline can be calculated for every metric. Baselines have two main variables:

- The time over which accumulated data should be considered in calculating the baseline.
- Seasonality of the baseline.

## Baselines Help Identify Trends

Performance expectations can differ between hours of the day, days of the week, or even months of the year. For example:

- A retail application may experience heavier traffic on the weekend than the rest of the week.
- A payroll application may experience a higher load at the beginning and end of the month compared to the rest of the month.

To account for this variation, you can use a rolling time period as the baseline context. A rolling time period establishes the baseline against data from the current hour taken at a daily, weekly, or monthly interval over the course of the time period.

For example, you have a baseline that uses the weekly trend with the time period configured for 90 days; this is one of the default baseline configurations available in AppDynamics.

At a given day and time, the baseline in effect is one that considers only the data accumulated on the same hour and day of the week over the last 90 days. This is illustrated in the following diagram.

A monthly trend calculates the baseline from data accumulated at the same hour but only on the same day of the month. So, for example, on January 5th at 10:30 AM, the baseline is established based on data accumulated at the same hour on the 5th of each month for the prior 365 days:

Baselines are not available immediately upon startup. It takes time and application load for the AppDynamics platform to collect data and create its initial baselines. The time depends on the type of baseline being used, whether daily, weekly, monthly, or none. Using none requires several hours before a baseline is available, daily takes several days, weekly takes several weeks, and so on.

By default, baselines are not computed for metrics if there are fewer than 20 calls per minute. To configure the calls per minute threshold, contact your AppDynamics account representative.

## How Standard Deviations are Calculated

The following standard formula is used to calculate the standard deviation:

`standard deviation =`

`sqrt [(B - A^2/N)/N]`

where: `A`

= sum of the data values`B`

= sum of the squared data values`N`

= number of data values

The standard deviations calculations differ based on the type of metric used:

- If the time rollup type = Sum or Average
- If the cluster rollup type = Individual or Collective

The cluster roll-up type is applicable only at the tier or app level (node-level metrics will have the same calculations).

The following example shows a standard deviation using metric types of:

- Time rollup type = Average
- Cluster rollup type = Collective

`Metric - Calls Per Minute (Average, Collective)`

(Hourly Metric Table)

`Time` | `Sum` | `Count` | `Weight-Value` | `Weight-Value-Squared` |
---|---|---|---|---|

| `180` | `2` | `180` | `300` |

| `300` | `2` | `300` | `780` |

| `150` | `2` | `150` | `195` |

For these metric values, the baseline of `type = All Data`

lasts three hours (at 12:00) using the above values for calculations.

In the case of daily, weekly, or monthly seasonality, the data points considered are values for the same hour for all days, the same day of the week, or the same day of the month, respectively.

The baseline calculations, in this case, would be:

`Value`

= `(180+300+150)/360 = 1.75`

`Standard deviation`

= `sqrt(((300+780+195) - (((180+300+150)^2)/360))/360) = 0.69`

## View Baselines

A baseline deviation is the standard deviation from a baseline at a point in time, represented as an integer value. You can set health rule conditions based on baseline deviations. For example, you can configure a warning condition as two standard deviations from the baseline and a critical condition as four standard deviations from the baseline. You can view built-in baselines and add new ones by navigating to **Configuration > Baselines**.

The daily trend is the default baseline. This is the baseline used by health rules if another baseline is not specified during health rule creation.

You can choose another as the default by selecting the baseline in the baseline list and choosing **Set as Default**.

Changing the default baseline changes the actual baseline for all existing health rules that rely on this default and do not specify another baseline. Be aware of your existing baselines and health rule definitions before you select this option.

Configure the Time Period

When configuring a baseline, you set the trend time period and the trend. The base time period comes in two forms:

- Fixed
- Rolling