These averages give higher significance to more recent data without ever completely losing the impact of earlier data. The sliding-window methodology calculates an average over an interval of time instead of over the life of the connection. An interval is made up of a specified number of equal time periods. Use AVGSAMPMULTIPLIER to specify how many periods are in the interval. Use AVGSAMPPERIOD to specify the time length of a period. An interval should be long enough to have several data flows measured. Data collected during the period includes:
In addition, there are three sliding-window variables that represent the interval and are used to calculate the sliding-window average. These variables are updated at the end of each period. They are:
When the interval has moved one period, subtracting the oldest period of collected data from the total and adding the newest period is one method for determining the new interval averages. However, this simple method loses all impact of earlier periods on the averages. Instead of dropping the collected data from the oldest period in the interval and completely losing its effect on the average, an average period of data is subtracted from the sliding-window totals. With this method, even the oldest period data continues to have a declining effect on the latest average calculations. And, by using an average period amount, the unique data for each period does not need to be retained. Only a total for the entire interval needs to be saved. Average period data is determined based on the fact that a period is a fraction of the total interval time. A period of data is 1/n of the current sliding-window totals, where n is the number of periods in the interval. The sliding-window average is derived from the new sliding-window values. At the end of each period the following calculations occur:
avTX = swTX * (1/n)
avRT = swRT * (1/n)
avIP = swIP * (1/n)
swTX = swTX - avTX + pTX
swRT = swRT - avRT + pRT
swIP = swIP - avIP + pRT
sliding-window round-trip average = swRT/swTX
sliding-window IP average = swIP/swTX
sliding-window SNA average = (swRT-swIP)/swTX
After the calculations are done, the period variables are reset and the next period of data collection begins. At the end of that period, the sliding-window variables are updated again with new information. The cycle continues for the life of the connection.
AVGSAMPMULTIPLIER 1 is a special case where 100% of the existing interval data is subtracted before the new period data is added. The result is an average for just that interval and the effect of older data is completely ignored.
AVGSAMPMULTIPLIER 0 is a special case that tells Telnet to include all data equally. The result is a life-of-connection average that is already available. A very large multiplier will have a similar effect.
A sliding-window round-trip average example follows. Assume an interval is made up of 5 periods. Each period is 2 minutes. Specify AVGSAMPMULTIPLIER 5 and AVGSAMPPERIOD 120. For illustrative purposes in this example, the average response time starts low and then increases to a steady state value. The data collected for each period is the sum of all response times in milliseconds (ms) and the number of transactions (tx).
Period | Sum of response times (ms) | Number of transactions (tx) | Average response time (ms/tx) |
---|---|---|---|
1 | 1000 | 10 | 100 |
2 | 1650 | 15 | 110 |
3 | 2800 | 20 | 140 |
4 | 3500 | 25 | 140 |
5 | 4200 | 30 | 140 |
6 | 4900 | 35 | 140 |
7 | 5600 | 40 | 140 |
1000ms/10tx = 1000ms/10tx = 100 ms/tx
(1000-(1000*(1/5))+1650)ms/ (10-(10*(1/5))+15)tx = 2450ms/23tx = 106.5 ms/tx
(2450-(2450*(1/5))+2800)ms/ (23-(23*(1/5))+20)tx = 4760ms/38.4tx = 124.0 ms/tx
7308ms/55.7tx = 131.2 ms/tx
10046.4ms/74.6tx = 134.7 ms/tx
12937.1ms/94.7tx = 136.6 ms/tx
15949.7ms/115.7tx = 137.9 ms/tx
The sliding-window method continues to include the effects of the earlier response time averages. The greater the number of periods (AVGSAMPMULTIPLIER), the longer older data will continue to impact new average calculations. Decreasing the number of periods (AVGSAMPMULTIPLIER) gives less emphasis to older data. The AVGSAMPMULTIPLIER gives the system administrator control over the emphasis placed on old data.
Each of the last five periods in the example had average response times of 140 ms/tx. Different multiplier values give the following results after seven periods. It is clear that the greater the number of periods in the interval, the greater the impact of the older data.