Related Documentation
- QFX Series
- Understanding Junos CoS Components
- Understanding CoS Priority Group Scheduling
- Understanding CoS Hierarchical Port Scheduling (ETS)
- Understanding CoS Buffer Configuration
- Understanding CoS Scheduling Behavior and Configuration Considerations
- Example: Configuring CoS Hierarchical Port Scheduling (ETS)
- Example: Configuring Minimum Guaranteed Output Bandwidth
- Example: Configuring Maximum Output Bandwidth
- Example: Configuring Queue Scheduling Priority
- Example: Configuring Queue Schedulers
- Example: Configuring Traffic Control Profiles (Priority Group Scheduling)
- Example: Configuring Tail-Drop Profiles
- Example: Configuring Drop Profile Maps
Understanding CoS Output Queue Schedulers
Output queue scheduling defines the class-of-service (CoS) properties of output queues (priorities). Queue scheduling works with priority group scheduling to create a two-tier hierarchical scheduler. The hierarchical scheduler allocates bandwidth to a group of queues (priority group), and queue scheduling determines the portion of the priority group’s bandwidth that a particular queue can use.
Scheduler maps associate queue schedulers with forwarding classes (output queues). You can associate each scheduler map with a traffic control profile, and then associate each traffic control profile with a forwarding class set (priority group) and a port interface. In conjunction with the priority group scheduling configured in the traffic control profile, queue scheduling configures the output queues, packet schedulers, and tail-drop processes that operate according to this mapping.
![]() | Note: When you configure bandwidth for a queue or a priority group, the switch considers only the data as the configured bandwidth. The switch does not account for the bandwidth consumed by the preamble and the interframe gap (IFG). Therefore, when you calculate and configure the bandwidth requirements for a queue or for a priority group, consider the preamble and the IFG as well as the data in the calculations. |
Output Queue Scheduling Components
Table 1 provides a quick reference to the scheduler components you can configure to determine the bandwidth properties of output queues, and Table 2 provides a quick reference to some related scheduling configuration components.
Table 1: Output Queue Scheduler Components
Output Queue Scheduler Component | Description |
|---|---|
Priority | Sets the scheduling priority applied to the queue. |
Shaping rate | Sets the maximum bandwidth the queue can consume. |
Transmit rate | Sets the minimum guaranteed bandwidth for the queue. Extra bandwidth is shared among queues in proportion to the minimum guaranteed bandwidth of each queue. |
Drop profile | Sets the probability of dropping packets as the queue fills up. |
Loss priority | Sets the traffic loss priority to which a drop profile applies. |
Drop profile map | Maps a drop profile to a loss priority. |
Buffer size | Sets the size of the queue buffer. |
Table 2: Other Scheduling Components
Other Scheduling Components | Description |
|---|---|
Scheduler map | Maps schedulers to queues (forwarding classes, also called priorities). |
Forwarding class | Maps traffic to a queue (priority). |
Traffic control profile | Sets scheduling for the forwarding class set (priority group) and associates a scheduler map with the forwarding class set to apply queue scheduling to the forwarding classes in the forwarding class set. Extra port bandwidth is shared among forwarding class sets in proportion to the minimum guaranteed bandwidth of each forwarding class set. |
Forwarding class set | Name of a priority group. You map forwarding classes to priority groups. A forwarding class set consists of one or more forwarding classes. |
Default Schedulers
Each forwarding class requires an associated scheduler. The default configuration uses only four forwarding classes, unicast best-effort (queue 0), unicast network-control (queue 3), multicast best-effort (queue 8), and multicast network control (queue 11). You can use the default schedulers or you can define new schedulers for these four forwarding classes. For any other forwarding class, you must explicitly configure a scheduler.
Table 3 shows the default schedulers.
Table 3: Default Schedulers
Default Scheduler and Queue Number | Guaranteed Rate (Minimum Bandwidth) | Shaping Rate (Maximum Bandwidth) | Excess Bandwidth Sharing | Priority | Buffer Size |
|---|---|---|---|---|---|
Best-effort scheduler (queue 0) | 5% | None | 5% | Low | 5% |
FCoE scheduler (queue 3) | 35% | None | 35% | Low | 35% |
No-loss scheduler (queue 4) | 35% | None | 35% | Low | 35% |
Network-control scheduler (queue 7) | 5% | None | 5% | Low | 5% |
Multidestination scheduler (queue 8) | 20% | None | 20% | Low | 20% |
![]() | Note: The minimum guaranteed bandwidth rate also determines the amount of excess (extra) bandwidth that the queue can share. Extra bandwidth is allocated to queues in proportion to the minimum guaranteed bandwidth rate of each queue. |
There are no resources assigned by default to queues 1, 2, 5, 6, 9, 10, and 11. You can define new unicast forwarding classes to assign to queues 1, 2, 5, and 6, and new multidestination forwarding classes to assign to queues 9, 10, and 11, which do not have default mappings to a forwarding class. You can assign resources to these queues manually using schedulers. In addition, you can change the default forwarding-class-to-queue mappings and the default schedulers.
By default, each queue can exceed the assigned bandwidth if additional bandwidth is available from other queues in the forwarding class set. When a forwarding class does not fully use the allocated minimum transmission bandwidth (transmit rate), other forwarding classes in the forwarding class set can use the remaining bandwidth if those forwarding classes receive more traffic than their allocated bandwidth.
Transmit Rate (Minimum Guaranteed Bandwidth)
The transmit rate determines the minimum guaranteed bandwidth for each forwarding class. It also determines how much excess (extra) bandwidth each low-priority queue can share; each queue shares extra bandwidth in proportion to its transmit rate. You specify the rate in bits per second as a fixed value such as 1 Mbps or as a percentage of the total forwarding class set minimum guaranteed bandwidth (the guaranteed rate set in the traffic control profile). Either the default scheduler or a scheduler you configure allocates a portion of the outgoing interface bandwidth to each forwarding class.
![]() | Note: For transmit rates below 1 Gbps, we recommend that you configure the transmit rate as a percentage instead of as a fixed rate. This is because the system converts fixed rates into percentages and may round small fixed rates to a lower percentage. For example, a fixed rate of 350 Mbps is rounded down to 3 percent instead of 3.5 percent. |
You cannot configure a transmit rate for strict-high priority queues. Queues (forwarding classes) with a configured transmit rate cannot be included in a forwarding class set that has strict-high priority queues.
The allocated bandwidth can exceed the configured minimum rate if additional bandwidth is available from other queues in the forwarding class set. In case of congestion, the configured transmit rate is guaranteed for the queue. This property enables you to ensure that each queue receives the amount of bandwidth appropriate to its level of service.
![]() | Note: Configuring the minimum guaranteed bandwidth (transmit rate) for a forwarding class does not work unless you also configure the minimum guaranteed bandwidth (guaranteed rate) for the forwarding class set in the traffic control profile. Additionally, the sum of the transmit rates of the queues in a forwarding class set should not exceed the guaranteed rate for the forwarding class set. (You cannot guarantee a minimum bandwidth for the queues that is greater than the minimum bandwidth guaranteed for the entire set of queues.) |
Sharing Extra Bandwidth
Extra bandwidth is available to low-priority queues when the minimum guaranteed bandwidth of the queues does not use the full amount of forwarding class set bandwidth. This extra bandwidth is shared among the forwarding classes in the set based on the minimum guaranteed bandwidth of each queue.
For example, in a forwarding class set, Queue A has a transmit rate of 1 Gbps, Queue B has a transmit rate of 1 Gbps, and Queue C has a transmit rate of 2 Gbps. After servicing the minimum guaranteed bandwidth of these queues, the forwarding class set has an extra 2 Gbps of bandwidth available, and all three queues still have packets to forward. The queues receive the extra bandwidth in proportion to their transmit rates, so Queue A receives an extra 500 Mbps, Queue B receives an extra 500 Mbps, and Queue C receives an extra 1 Gbps.
Shaping Rate (Maximum Bandwidth)
The shaping rate determines the maximum bandwidth each forwarding class can consume. You specify the rate in bits per second as a fixed value such as 3 Mbps or as a percentage of the total forwarding class set maximum bandwidth (the shaping rate set in the traffic control profile).
The maximum bandwidth for a queue depends on the total bandwidth available to the forwarding class set to which the queue belongs and how much bandwidth the other queues in the forwarding class set consume.
![]() | Note: In QFabric systems, if any queue that contains outgoing packets does not transmit packets for 12 consecutive seconds, the port automatically resets. A strict-high priority queue (or several queues with higher priorities than the starved queue) can consume all of the port bandwidth and prevent another queue from transmitting packets. To prevent a queue from being starved for bandwidth, you can configure a shaping rate on the queue or queues to prevent them from consuming all of the port bandwidth. |
Scheduling Priority
Scheduling priority determines the order in which an output interface transmits traffic from the queues, thus ensuring that queues containing important traffic receive better access to the outgoing interface. The priority setting in the scheduler determines the priority for the queue.
Two levels of scheduling priority are supported:
- Low—Low-priority queues transmit traffic based on the weighted round robin (WRR) algorithm. The scheduler first determines if an individual queue is within its defined bandwidth profile. The scheduler then regularly reevaluates whether each individual queue is within its defined bandwidth profile and compares the amount of data the queue transmits to the amount of bandwidth the scheduler allocates to the queue. When the transmitted amount is less than the allocated amount, the queue is considered to be in profile. A queue is out of profile when its transmitted amount is larger than its allocated amount. Out of profile queue data is transmitted only if bandwidth is available. Otherwise, it is buffered if buffer space is available. If no buffer space is available, the traffic may be dropped.
- Strict-high—You can configure only one queue as strict-high priority. The other 11 queues are low priority.
The strict-high priority queue receives preferential treatment over the low-priority queues. The strict-high priority queue receives all of its configured bandwidth before low-priority queues are serviced. Low-priority queues do not transmit traffic until the strict-high priority queue is empty. Carefully consider how much bandwidth you want to allocate to the strict-high priority queue to avoid starving the low-priority queues.
If you configure a strict-high priority queue, you must observe the following rules:
- You must create a separate forwarding class set (priority group) for the strict-high priority queue.
- Only one forwarding class set can contain strict-high priority queues.
- Strict-high priority queues cannot belong to the same forwarding class set as queues that are not strict-high priority.
- A strict-high priority queue cannot belong to a multidestination forwarding class set.
- You cannot configure a minimum guaranteed bandwidth for a strict-high priority queue. (You cannot configure a transmit rate for a strict-high priority queue scheduler, and you cannot configure a guaranteed rate for a forwarding class set that has a strict-high priority queue.)
Junos OS performs priority queueing using the following steps:
- Services the strict-high priority queue before any other queues are served
- Services the minimum bandwidth (transmit rate) of low-priority queues until the minimum is met or the queues are empty
- Services all other low-priority queues and needs that exceed the minimum bandwidth
Scheduler Drop-Profile Maps
Drop-profile maps associate drop profiles with a scheduler. A drop-profile map sets the drop profile for a specific packet loss priority (PLP) and protocol type:
- PLP—Low, medium-high, high. You configure the PLP during classifier configuration. When you use a scheduler map to associate a forwarding class with a scheduler, you can use a drop-profile map to map different drop profiles to the forwarding class for different PLPs.
- Protocol type—Drop profiles match all protocol types.
Buffer Size
Most of the total system buffer space is divided into two buffer pools, shared buffers and dedicated buffers. Shared buffers are a global pool that the ports share dynamically as needed. Dedicated buffers are a reserved portion of the buffer pool that is distributed evenly to all of the ports. Each port receives an equal allocation of dedicated buffer space. The dedicated buffer allocation to ports is not configurable because it is reserved for the ports.
The queue buffers are allocated from the dedicated buffer pool assigned to the port. By default, ports divide their allocation of dedicated buffers among the egress queues in the same proportion as the default scheduler sets the minimum guaranteed transmission rates (transmit-rate) for traffic. Only the queues included in the default scheduler receive dedicated buffers.
If you do not use the default configuration, you can explicitly configure the queue buffer size in either of two ways:
- As a percentage—The queue receives the specified percentage of dedicated port buffers when the queue is mapped to the scheduler and the scheduler is mapped to a port.
- As a remainder—After the port services the queues that have an explicit percentage buffer size configuration, the remaining port dedicated buffer space is divided equally among the other queues to which a scheduler is attached. (No default or explicit scheduler means no dedicated buffer allocation for the queue.) If you configure a scheduler and you do not specify a buffer size as a percentage, remainder is the default setting.
![]() | Note: The total of all of the explicitly configured buffer size percentages for all of the queues on a port cannot exceed 100 percent. |
For a complete discussion about queue buffer configuration in the context of ingress and egress port buffer configuration, see Understanding CoS Buffer Configuration.
Scheduler Maps
A scheduler map associates a specified forwarding class with a scheduler configuration. After configuring a scheduler, you must include it in a scheduler map, associate the scheduler map with a traffic control profile, and then associate the traffic control profile with an interface and a forwarding class set.
You can associate up to four user-defined scheduler maps with traffic control profiles.
Related Documentation
- QFX Series
- Understanding Junos CoS Components
- Understanding CoS Priority Group Scheduling
- Understanding CoS Hierarchical Port Scheduling (ETS)
- Understanding CoS Buffer Configuration
- Understanding CoS Scheduling Behavior and Configuration Considerations
- Example: Configuring CoS Hierarchical Port Scheduling (ETS)
- Example: Configuring Minimum Guaranteed Output Bandwidth
- Example: Configuring Maximum Output Bandwidth
- Example: Configuring Queue Scheduling Priority
- Example: Configuring Queue Schedulers
- Example: Configuring Traffic Control Profiles (Priority Group Scheduling)
- Example: Configuring Tail-Drop Profiles
- Example: Configuring Drop Profile Maps


