Ubigate iBG2016 Configuration Guide/Ed.00
© SAMSUNG Electronics Co., Ltd.
205
Average Queue Size Calculation for Interface Queues
The average queue size computation for interface is done for every packet sent
on the interface. Before deciding whether packet needs to be dropped or not,
the average queue size is calculated using the following formula and by
reading the current driver queue size and current average queue size.
Qaverage = (1 - weight) * Qa weight * Qcurrent
Where weight = 1/2ewf, and ewf is configured by the user.
It seems obviously that above expression involves more computation. To get
more efficiency from the implementation perspective the same formula is
regrouped and calculated as show below. The weight is restricted to be a
negative power of 2 so that a shift operation can be used instead of division to
make the calculation more efficient.
Qaverage = Qa (Qcurrent - Qaverage) << ewf
This Qaverage ‘average queue size’ is used as an indication of congestion by
RED and is compared against the ‘minth’ and ‘maxth’ to decide whether
packet need to be allowed, randomly dropped or dropped.
Average Queue Size Calculation for Traffic Classes
The average queue size calculation for traffic classes is little bit different than
for interfaces. The packet scheduler services the class queues every scheduling
interval Ts msec(5 msec). In a Ts msec interval, if the queues are serviced for
T ms, during the remaining time(Ts - T) msec, the packets are classified and
queued in to the respective queues. So, the queuing process runs for sometime
followed by the de-queuing process in a periodic manner.
Therefore, even if the incoming rate for a particular queue is less than its CR,
the queue builds up to N packets during the queuing phase and drops to 0
during the de-queuing phase. If the queue size is greater than 0 even after the
de-queuing process has happened, it indicates that the receive rate is greater
than the transmit rate for the queue which is what signals congestion.
Therefore, to get an accurate indication of congestion in the queue, we read
the queue size after the queue is serviced but before en-queuing process, for
every Ts msec. We call this the ‘pending queue size’. It is not very useful for
RED to use the ‘pending queue size’ as it is because it can be very fluctuating.
RED uses an Exponential Weighted Moving Average(EWMA) of this queue
which, simply put, is a smoothed out version of the instantaneous values.
Summary of Contents for Ubigate iBG2016
Page 1: ......
Page 16: ...INTRODUCTION XIV SAMSUNG Electronics Co Ltd This page is intentionally left blank ...
Page 34: ......
Page 62: ...CHAPTER 4 System Logging 28 SAMSUNG Electronics Co Ltd This page is intentionally left blank ...
Page 70: ......
Page 108: ......
Page 140: ...CHAPTER 4 RIP 104 SAMSUNG Electronics Co Ltd This page is intentionally left blank ...
Page 156: ...CHAPTER 6 BGP 120 SAMSUNG Electronics Co Ltd This page is intentionally left blank ...
Page 180: ...CHAPTER 8 VRRP 144 SAMSUNG Electronics Co Ltd This page is intentionally left blank ...
Page 264: ...CHAPTER 10 QoS 228 SAMSUNG Electronics Co Ltd This page is intentionally left blank ...
Page 272: ......
Page 298: ...CHAPTER 3 Firewall NAT 248 SAMSUNG Electronics Co Ltd This page is intentionally left blank ...
Page 356: ...CHAPTER 5 IPSEC 306 SAMSUNG Electronics Co Ltd This page is intentionally left blank ...
Page 358: ......
Page 744: ...EQBD 000071 Ed 00 ...