Information Technology Reference
In-Depth Information
Of course, growth rates change, usage patterns change, and application resource needs
change. We need to be able to detect these changes and alter our resource planning accord-
ingly. To detect changes in a trend, we use the moving average convergence/divergence
(MACD) metric. MACD measures the difference between a long-period (e.g., 3 months)
and a short-period (e.g., 1 month) moving average. However, a standard moving average
tends to mask recent changes in metrics. Since forecasting aims to provide early detection
for such changes, MACD uses an exponential moving average (EMA), which gives an av-
erage with a much heavier weighting for recent data and a very low weighting for old data.
An EMA is calculated as follows, where n is the number of samples:
To get started, the first EMA x -1 value (actually EMA n ) is just a straight average of the
first n data points.
To use MACD to give early warning of changes in behavior, you need to calculate and
plot some additional data, called the MACD signal line, on the same graph. The MACD
signal is an EMA of the MACD. When the MACD line crosses the MACD signal line, that
is an indication that the trend is changing. When the MACD line crosses from below the
signallinetoabovethesignalline,itindicatesanincrease.Forexample,foranengagement
metric, it would indicate an unexpected increase in engagement for a particular feature.
When the MACD line crosses from above the signal line to below it, it indicates a down-
ward trend. For example, in a memory usage graph, it might indicate that the most recent
release ismore memory efficient than the previous one.This may cause youtoreassess the
number of users a cluster can support.
The challenge in measuring and graphing MACD is to define the time scales to use for
the long and short periods. If the periods are too short, the MACD will indicate changes in
trendstoofrequentlytobeuseful,asin Figure18.5 .Thebarchartinthebackgroundofthis
figure is the 90th percentile data. The smoother graph line is the MACD signal line, and
the other line is the MACD.
Search WWH ::




Custom Search