No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

S12700 V200R013C00 Configuration Guide - QoS

This document describes the configurations of QoS functions, including MQC, priority mapping, traffic policing, traffic shaping, interface-based rate limiting, congestion avoidance, congestion management, packet filtering, redirection, traffic statistics, ACL-based simplified traffic policy, and HQoS.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Congestion Management

Congestion Management

As an increasing number of network services emerge and people demand higher network quality, bandwidth use also increases, which in turn causes congestion. This leads to delay and/or signal loss. Congestion management implements queuing and scheduling when sending packet flows to combat delay or signal loss. Congestion management is required when a network is congested intermittently and delay-sensitive services require higher QoS than delay-insensitive services. If congestion persists on the network after congestion management is configured, increase the bandwidth.

Based on queuing and scheduling policies, the switch supports Priority Queuing (PQ), Weighted Deficit Round Robin (WDRR), Weighted Round Robin (WRR), Weighted Fair Queuing (WFQ), PQ+WDRR, PQ+WRR, and PQ+WFQ for congestion management. Each scheduling algorithm schedules specific types of traffic, and affects bandwidth allocation, delay, and jitter.

The switch has eight queues on each interface in the outbound direction. The queues are identified by index numbers ranging from 0 to 7. The device sends classified packets to queues based on mappings between local priorities and queues. The packets are then scheduled using queue scheduling mechanisms:

  • PQ scheduling

    Designed for core services, PQ scheduling is applied to queues in descending order of priority. Low-priority queues are processed only after all high-priority queues are empty. Core services are assigned a high priority and are processed first. Non-core services are processed only at times when core services do not require bandwidth. Core services are placed into high-priority queues, and non-core services (such as email services) are placed into low-priority queues. PQ scheduling is valid for short-delay services.

    In Figure 5-3, data flow X is mapped to the queue with the highest priority on each node.

    When packets from data flow X reach a node, the data flow packets are processed first. Packets are processed according to priority. Queues are processed in descending order of priority:
    • Queue 7 packets are processed first.
    • Queue 6 packets are sent at the link rate when they need to be sent and queue 7 is empty.
    • Queue 5 packets are sent at the link rate when queues 6 and 7 are empty, and so on.

    However, the PQ scheduling mechanism may result in package starvation in low-priority queues. For example, if data flows mapped to queue 7 arrive at a 100% link rate in a given period, the scheduler does not process flows in queues 0 to 6.

    To prevent package starvation, upstream devices need to accurately define service characteristics of data flows, preventing service flows mapped to queue 7 from exceeding a certain percentage of link capacity. This prevents queue 7 from becoming full and allows the scheduler to process packets from low-priority queues.

    Figure 5-3  PQ scheduling

  • WRR scheduling

    WRR scheduling is an extension of Round Robin (RR) scheduling. Packets in each queue are scheduled in a polling manner based on the queue weight. RR scheduling equals WRR scheduling with the weight being 1.

    Figure 5-4 shows WRR scheduling.

    Figure 5-4  WRR scheduling

    In WRR scheduling, the device schedules packets in queues in a polling manner round by round based on the queue weight. After one round of scheduling, the weights of all queues are decreased by 1. The queue whose weight is decreased to 0 cannot be scheduled. When the weights of all the queues are decreased to 0, the next round of scheduling starts. For example, the weights of eight queues on an interface are set to 4, 2, 5, 3, 6, 4, 2, and 1. Table 5-1 lists the WRR scheduling results.

    Table 5-1  WRR scheduling results

    Queue Index

    Queue 7

    Queue 6

    Queue 5

    Queue 4

    Queue 3

    Queue 2

    Queue 1

    Queue 0

    Queue Weight

    4

    2

    5

    3

    6

    4

    2

    1

    Queue in the first round of scheduling

    Queue 7

    Queue 6

    Queue 5

    Queue 4

    Queue 3

    Queue 2

    Queue 1

    Queue 0

    Queue in the second round of scheduling

    Queue 7

    Queue 6

    Queue 5

    Queue 4

    Queue 3

    Queue 2

    Queue 1

    -

    Queue in the third round of scheduling

    Queue 7

    -

    Queue 5

    Queue 4

    Queue 3

    Queue 2

    - -

    Queue in the fourth round of scheduling

    Queue 7

    -

    Queue 5

    -

    Queue 3

    Queue 2

    - -

    Queue in the fifth round of scheduling

    - -

    Queue 5

    -

    Queue 3

    - - -

    Queue in the sixth round of scheduling

    - - - -

    Queue 3

    - - -

    Queue in the seventh round of scheduling

    Queue 7

    Queue 6

    Queue 5

    Queue 4

    Queue 3

    Queue 2

    Queue 1

    Queue 0

    Queue in the eighth round of scheduling

    Queue 7

    Queue 6

    Queue 5

    Queue 4

    Queue 3

    Queue 2

    Queue 1

    -

    Queue in the ninth round of scheduling

    Queue 7

    -

    Queue 5

    Queue 4

    Queue 3

    Queue 2

    - -

    Queue in the tenth round of scheduling

    Queue 7

    -

    Queue 5

    -

    Queue 3

    Queue 2

    - -

    Queue in the eleventh round of scheduling

    - -

    Queue 5

    -

    Queue 3

    - - -

    Queue in the twelfth round of scheduling

    - - - -

    Queue 3

    - - -

    The statistics show that the number of times packets are scheduled in each queue corresponds to the queue weight. A higher queue weight indicates a greater number of times packets in the queue are scheduled. The unit for WRR scheduling is packet; therefore, there is no fixed bandwidth for each queue. If packets are scheduled fairly, large-sized packets obtain more bandwidth than small-sized packets.

    WRR scheduling offsets the disadvantage of PQ scheduling in which packets in queues with lower priories may be not processed for a long period of time if congestion occurs. In addition, WRR can dynamically change the time of scheduling packets in queues. For example, if a queue is empty, WRR scheduling ignores this queue and starts to schedule the next queue. This ensures bandwidth usage. WRR scheduling, however, cannot schedule short-delay services in a timely manner.

  • WDRR scheduling

    WDRR is also based on RR. WDRR solves the WRR problem. In WRR scheduling, a large-sized packet obtains higher bandwidth than a small-sized packet. WDRR schedules packets considering the packet length, ensuring that packets are scheduled equally.

    Deficit indicates the bandwidth deficit of each queue. The initial value is 0. The system allocates bandwidth to each queue based on the weight and calculates the deficit. If the deficit of a queue is greater than 0, the queue participates in scheduling. The device sends a packet and calculates the deficit based on the length of the sent packet. If the deficit of a queue is smaller than 0, the queue does not participate in scheduling. The current deficit is used as the basis for the next round of scheduling.

    Figure 5-5  Queue weights

    In Figure 5-5, the weights of Q7, Q6, Q5, Q4, Q3, Q2, Q1, and Q0 are set to 40, 30, 20, 10, 40, 30, 20, and 10 respectively. During scheduling, Q7, Q6, Q5, Q4, Q3, Q2, Q1, and Q0 obtain 20%, 15%, 10%, 5%, 20%, 15%, 10%, and 5% of the bandwidth respectively. Q7 and Q6 are used as examples to describe WDRR scheduling. Assume that Q7 obtains 400 bytes/s bandwidth and Q6 obtains 300 bytes/s bandwidth.

    • First round of scheduling

      Deficit[7][1] = 0 + 400 = 400

      Deficit[6][1] = 0 + 300 = 300

      After packets of 900 bytes in Q7 and packets of 400 bytes in Q6 are sent, the values are as follows:

      Deficit[7][1] = 400 - 900 =-500

      Deficit[6][1] = 300 - 400 =-100

    • Second round of scheduling

      Deficit [7][2] = -500 + 400 = -100

      Deficit [6][2] = -100 + 300 = 200

      Packets in Q7 are not scheduled because the deficit of Q7 is negative. After packets of 300 bytes in Q6 are sent, the value is as follows:

      Deficit [6][2] = 200 - 300 = -100

    • Third round of scheduling

      Deficit[7][3] = -100 + 400 = 300

      Deficit[6][3] = -100 + 300 = 200

      After packets of 600 bytes in Q7 and packets of 500 bytes in Q6 are sent, the values are as follows:

      Deficit[7][3] = 300 - 600 = -300

      Deficit[6][3] = 200 - 500 = -300

      Such a process is repeated and finally Q7 and Q6 respectively obtain 20% and 15% of the bandwidth. You can obtain the required bandwidth by setting the weights.

    In WDRR scheduling, short-delay services still cannot be scheduled in a timely manner.

  • WFQ scheduling

    Fair Queuing (FQ) scheduling equally allocates network resources to minimize delay and jitter of all flows. Packet allocation is as follows:
    • Packets in different queues are scheduled fairly, and the flow delays have slight differences.
    • Packets with different sizes are scheduled fairly. If many large and small packets in different queues need to be sent, small packets are scheduled first, reducing total packet jitter of each flow.

    Weighted Fair Queuing (WFQ) uses priorities to schedule packets. More packets with higher priorities are scheduled than packets with lower priorities.

    Prior to entering queues, WFQ classifies packets based on:
    • Session information

      Flows are classified according to session information, including the protocol type, source and destination TCP or UDP port numbers, source and destination IP addresses, and precedence in the ToS field.

      To minimize the delay, WFQ provides a large number of queues and evenly distributes flows into queues.

      When a flow leaves a queue, WFQ allocates the bandwidth on the outbound interface based on the precedence of the flow. A low precedence value receives little bandwidth while a high precedence value receives more bandwidth.

    • Priority

      Priority mapping marks local priorities for traffic.

      Each interface is allocated four or eight queues. Packets enter queues based on the queue number.

      By default, the queue weight is the same and interface bandwidth is evenly shared by queue traffic. Queue weight is customizable so that high-priority and low-priority packets are allocated bandwidth by weight percentage.

    Figure 5-6  WFQ scheduling

  • PQ+WRR scheduling

    PQ+WRR scheduling integrates the advantages and offsets the disadvantages of both PQ scheduling and WRR scheduling. Packets from queues with lower priorities can obtain the bandwidth by WRR scheduling and short-delay services can be scheduled first by PQ scheduling.

    On the device, you can set WRR parameters for queues. The eight queues on each interface are classified into two groups. One group includes queues 7, 6, and 5, and is scheduled in PQ mode; the other group includes queues 4, 3, 2, 1, and 0, and is scheduled in WRR mode. Only LAN-side interfaces on the device support PQ+WRR scheduling. Figure 5-7 shows PQ+WRR scheduling.

    Figure 5-7  PQ+WRR scheduling

    During scheduling, the device first schedules traffic in queues 7, 6, and 5 in PQ mode. The device schedules traffic in other queues in WRR mode only after the traffic in queues 7, 6, and 5 is scheduled. Queues 4, 3, 2, 1, and 0 have their own weights. Important protocol packets or short-delay service packets must be placed in queues using PQ scheduling so that they can be scheduled first. Other packets are placed in queues using WRR scheduling.

  • PQ+WDRR scheduling

    PQ+WDRR scheduling integrates the advantages and offsets the disadvantages of both PQ scheduling and WDRR scheduling. If only PQ scheduling is used, packets in queues with lower priorities cannot obtain bandwidth for a long period of time. If only WDRR scheduling is used, short-delay services such as voice services cannot be scheduled first. PQ+WDRR scheduling has advantages of both PQ and WDRR scheduling and offsets their disadvantages.

    Eight queues on the device interface are classified into two groups. You can specify PQ scheduling for certain queues and WDRR scheduling for other queues.

    Figure 5-8  PQ+WDRR scheduling

    In Figure 5-8, the device first schedules traffic in queues 7, 6, and 5 in PQ mode. After traffic in queues 7, 6, and 5 is scheduled, the device schedules traffic in queues 4, 3, 2, 1, and 0 in WDRR mode. Queues 4, 3, 2, 1, and 0 have their own weights.

    Important protocol packets or short-delay service packets must be placed in queues using PQ scheduling so that they can be scheduled first. Other packets are placed in queues using WDRR scheduling.

  • PQ+WFQ scheduling

    PQ+WFQ scheduling integrates the advantages and offsets the disadvantages of both PQ scheduling and WFQ scheduling.

    If only PQ scheduling is used, packets in low-priority queues cannot obtain bandwidth for an extended period of time. If only WFQ scheduling is used, delay-sensitive services, such as voice services, cannot be scheduled in a timely manner.

    Eight queues on the device interface are classified into two groups. You can specify PQ scheduling for certain groups and WFQ scheduling for other groups.

    Configuring PQ+WFQ scheduling solves the above problems.

    In Figure 5-9, there are eight queues on the device interface. They are classified into two groups, allowing for PQ scheduling for certain queues and WFQ scheduling for other queues.

    Figure 5-9  PQ+WFQ scheduling

    The device first schedules traffic from queues 7, 6, and 5 in PQ mode. After traffic scheduling is complete, traffic from queues 4, 3, 2, 1, and 0 is scheduled in WFQ mode. Queues 4, 3, 2, 1, and 0 have their own weights.

    Important protocol packets or short-delay service packets must be placed in queues using PQ scheduling so that they can be scheduled first. Other packets are placed in queues using WFQ scheduling.

Translation
Download
Updated: 2019-04-08

Document ID: EDOC1100065653

Views: 18703

Downloads: 45

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next