Tuesday, January 12, 2016

Quantifying traffic policer rate with Burst-Size value - test method and calculation

Quality Of Service (QoS) dictates how a packet or flow is handled in networking world. Task is not as simple as the sound of this magic three letter word. Many functionalities of QOS work together to accomplishes this trivial task.  QoS complexity is dictated by number of modifications performed to return intended result, QOS  concepts are hard to perceive for many networking professionals.

Let's add one of QoS functionality "POLICING/RATE-LIMITING"

Traffic policing is one of the commonly used QoS feature. Policer/rate-limiter helps to allow only defined packet rate for interested flow. Various other sub-tasks like set queue.no or mark  a specific bit in packet for violated and conformed actions are also possible.

Typical traffic policing configuration looks similar to.
 Police cir 100 mbps bc 200ms pir 200 mbs bc 20 ms conform transmit exceed set-dscp 3 violated drop

above config allows traffic rate  of 100kbs, sets dscp value 3 for flow between 100mbps to 200 mbps and drop any further traffic.

Most networking engineers don't really know that traffic is not actually policed at 100 mbbs, there is more to it, BC helps to define it.

What does "BC - Burst Count" do?
Why my actual policer rate is more than defined rate?
How does it helps on practical traffic flows?

Let's find answer here.

Burst count helps to adjust policer rate to absorb traffic burst. Real world traffic flow is bursty in nature. Handling burst help to have handle on policer rate without increasing the traffic drop point.
 very rare to see a constant rate of data flow, even if you observe high traffic rate, it is definitely constituted by several mice flows than one giant elephant flow.

BC in time representation translates to Bytes based on port speed.

for a 100mbps policer rate  200 ms BC
Policer bandwidth in Bytes is,

(100 x  1000 x 1000 )  bps x 0.2 Sec  = 2500 KBytes
--------------------------------------------
  8 bits in a byte

On a 10gbps port speed this translates  (2500 KB / 10gbps)to, 2msec of burst duration.

Bandwidth rate in 2msec on 100mbps link becomes 0.2mbps. Effective policer rate is 100.2 Mbps


Typical BC metrics are either in time (ms/micro-sec/sec) or in Bytes. Now that you know the conversion. effective policer rate can be easily determined. 

No comments:

Post a Comment

Thanks for your comment. I will moderate your comment as soon as i get a chance.