09-04-2014 12:59 AM - edited 03-04-2019 11:41 PM
Hi everybody !
As far as I know the purpose of combining the two, shaping and CBWFQ, is because the latter requires congestion to engage, the former can create congestion sooner than the physical interface.
My question is, when the congestion from the shaper takes place and the scheduler of the CBWFQ begins to fill appropriate queues?
Is it when the transmission speed > CIR?
Or
When the shaping buffer(queue) overflows?
By the way, what is the shaping queue (buffer) in this case? Is it a “standalone” queue or it simply consists of the class-based queues ?
By the interrogation of the Policy-Map on the wan-interface we can see, that a queue for the class-default (Shaper) was created with the limit 16250 packets? What is the purpose of the queue? I think , it has nothing to do with shaping-queue.
Extraction from sh policy-map int Gi2/0/0:
Service-policy output: shape-dxt<->dxtt
Counters last updated 00:00:03 ago
Class-map: class-default (match-any)
153103779 packets, 16570964644 bytes
30 second offered rate 54000 bps, drop rate 0 bps
Match: any
Queueing
queue limit 16250 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 153103522/16570934386
shape (average) cir 65000000, bc 260000, be 260000
target shape rate 65000000
Extraction from the running-file:
policy-map qos-dxt<->dxtt
class mgmt-cs0-2
bandwidth percent 5
random-detect
random-detect precedence 0 240 480
class as-nem-cs1-afx
bandwidth percent 16
random-detect
random-detect precedence 1 500 1000
class gn-gi-af2x
bandwidth percent 26
queue-limit 1200 packets
class ls2-af41
bandwidth percent 14
queue-limit 720 packets
class ls3-af42-cs4
bandwidth percent 15
queue-limit 920 packets
class mgmt-cs2
bandwidth percent 5
queue-limit 320 packets
class routing-cs6
bandwidth percent 5
queue-limit 320 packets
policy-map shape-dxt<->dxtt
class class-default
shape average 65000000
service-policy qos-dxt<->dxtt
interface Gi2/0/0
service policy output shape-dxt<->dxtt
09-04-2014 07:28 AM
Hi,
As per explanation i have read in cisco books, interaction between parent shaper and child CBWFQ works as below
"Shaper decides whether packet needs to be put into shaping queue or not and when to take packet from the shaping queue. But between this, queuing scheduler comes into picture and decides which packet needs to service next from the shaping queue."
So each class queue of child policy-map will be a shaping queue. When routing decision confirms that packet will go out of the interface where service-policy is applied, it first checks whether shaping is active or not, Shaping becomes active when single packet exceeds the traffic contract. If shaping is not active traffic can directly be put to hw tx ring.
Once shaping is active and packets are getting queued, shaper will when to dequeue one packet based on rate configured in the shaper but which packet to be dequeued will be decided by Scheduler as per preference given in child policy-map.
Here i think, queue length will be limited for each class by queue-limit of that class or WRED max threshold (WRED max threshold can not exceed queue-limit of the class) and shaper queue length is more than sum of queue-limit of each child class, it will not play any role.
I just tried to configure a parent-child service-policy and buffer-limit on shaper is calculated as sum of max buffer defined in the child policy-map
R21_7206#show policy-map parent
Policy Map parent
Class class-default
Traffic Shaping
Average Rate Traffic Shaping
CIR 65000000 (bps) Max. Buffers Limit 1000 (Packets) <<<<<<<<<<
Bandwidth 200 (kbps) Max Threshold 800 (packets)
service-policy child
R21_7206#
R21_7206#sh policy-map child
Policy Map child
Class EF
Bandwidth 50 (%) Max Threshold 500 (packets) <<<
Class AF
Bandwidth 50 (%) Max Threshold 500 (packets) <<<<
R21_7206#
-- Pls dont forget to rate the helpful posts --
Regards,
Akash
09-05-2014 03:20 AM
Hi guys,
thanks for your responds and help. They acknowledged what I had assumed, so now I can sleep well :)
Best regards.
09-04-2014 08:40 AM
Disclaimer
The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.
Liability Disclaimer
In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.
Posting
My question is, when the congestion from the shaper takes place and the scheduler of the CBWFQ begins to fill appropriate queues?
Is it when the transmission speed > CIR?
Or
When the shaping buffer(queue) overflows?
By the way, what is the shaping queue (buffer) in this case? Is it a “standalone” queue or it simply consists of the class-based queues ?
In theory, shaped queuing should work with directly with class queues, but from my experience, I suspect, at least on some platforms and IOS versions, that there might be a shaper queue too. I've haven't seen/found public Cisco documentation for actual implementation details.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: