How to calculate Burst value when you configure QoS policer

It’s hard to figure what is right value of burst traffic when you configure QoS policer. There is many different explanation on the Internet, but here is the most of reasonable formula.  

 

 The policer rate and burst values(bc) are configured in the following way:

    Burst = Sustained Rate bps × 0.00025 (Interval) + MTU kbps

 

Sustained Rate—Defines how many tokens are removed at each interval. This effectively sets the policing rate. All traffic below the rate is considered in-profile.

Interval—Defines how often tokens are removed from the bucket. The interval is fixed at 0.00025 seconds, so tokens are removed from the bucket 4,000 times per second. The interval cannot be changed.

Burst—Defines the maximum number of tokens that the bucket can hold at any one time. Burst should be no less than the rate times the interval in order to sustain the specified traffic rate. Another consideration is that the maximum-size packet must fit into the bucket.

For example, if you want a 40 Mbps policer and a maximum transmission unit (MTU) (on Ethernet) of 1518 bytes, then this is how the burst is calculated:

    burst = (40,000,000 bps × 0.00025) + (1518 × 0.008 kbps)
          = 10000 bps + 12.144 kbps
          = 22 kbps

 

Leave a Reply