[73429] in North American Network Operators' Group

home help back first fref pref prev next nref lref last post

Re: Precise per GB traffic calculations.

daemon@ATHENA.MIT.EDU (Scott Weeks)
Mon Aug 23 10:33:49 2004

Date: Mon, 23 Aug 2004 04:31:30 -1000 (HST)
From: Scott Weeks <surfer@mauigateway.com>
To: nanog@merit.edu
In-Reply-To: <B1A483B6-F2EE-11D8-89A0-000A9578BB58@ianai.net>
Errors-To: owner-nanog-outgoing@merit.edu


On Fri, 20 Aug 2004, Patrick W Gilmore wrote:
: On Aug 20, 2004, at 5:06 PM, Drew Weaver wrote:
:
: > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Does anyone know of a solution that o=
ffers precise methods
: > of tracking bandwidth utilizations at the per Megabyte or Gigabyte
: > level and not at the rate of transfer level?
:
: I don't know of any equipment that does NOT measure per-byte
: transferred.  The Mbps is done by taking the bytes transferred
: (multiply by 8) and divide by the time involved, usually 5 minute
: periods.


I just want to point out that this is not a strict average over 5 minutes
in the case of cisco's output for the "show interface" bits per second.
It's an exponentially weighted average:

http://cisco.com/en/US/products/sw/iosswrel/ps1818/products_tech_note09186a=
0080191323.shtml

     Bits per second include all packet/frame overhead. It does not
     include stuffed zeros. The size of each frame is added to the total
     bytes of output. The rate is calculated by taking the difference
     every 5 seconds.  The algorithm for the five-minute moving average
     is:

     new average =3D ((average - interval) * exp (-t/C)) + interval

     where:
     - t is five seconds and C is 5 minutes. exp(-5/(60*5)) =3D=3D .983
     - newaverage =3D the value we are trying to compute
     - average =3D the "newaverage" value calculated from the previous
                 sample
     - interval =3D the value of the current sample
     - (.983) is the weighting factor

     What you are basically doing is taking the average from the last
     sample less what we gathered in this sample and weighting that down
     by a decay factor. This quantity can be referred to as an "historical
     average". To the weighted (decayed) historical average, we add our
     current sample and come up with a new weighted (decayed) average.

scott





home help back first fref pref prev next nref lref last post