Scheduler Profiles
The egress line module scheduler is an HRR scheduler. Figure 10 is an example of a QoS scheduler's hierarchy.
![]()
As shown in Figure 10, the queues feeding a physical port are organized in a hierarchy. At each level in the hierarchy, the scheduler uses shaping rates, hierarchical or assured rates, and relative weights to determine the allocated bandwidth:
- The scheduler selects a first-level node based on the allocated bandwidth.
- The scheduler then selects a second-level node from the group of nodes that are stacked above the selected first-level node. This selection is also based on the allocated bandwidth.
- Finally, the scheduler selects a queue from the group of queues stacked above the second-level node.
The scheduler supports hierarchical and static assured rates, relative weights, and shaping rates on all three levels of the hierarchy: first-level node, second-level node, and queue. The bandwidth delivered from a given node or queue is a function of the shaping rate and either the assured rate or relative weight:
- When the scheduler is not congested, the shaping rates determine which node or queue can claim the bandwidth. The shaping rate specifies the maximum bandwidth to the node or queue.
- When the scheduler is congested, either the hierarchical or static assured rate or the weight specifies the minimum bandwidth.
- If the scheduler is configured to use a static assured rate and the assured rate is other than none (the default), it is used to determine the allocated bandwidth, and the weight setting is ignored. If the assured rate is zero, the weight setting is used to determine the bandwidth.
The static assured rate specifies the desired bandwidth. This rate is guaranteed until the bandwidth becomes oversubscribed.
- If the scheduler is configured to use hierarchical assured rate, the scheduler dynamically adjusts the amount of allocated bandwidth for service delivery based on the sum of the assured rates of all child nodes and queues. For a description of hierarchical assured rate (HAR), see Hierarchical Assured Rate.
- The assured rate also specifies that if bandwidth is over- or undersubscribed, all adjustments are made in proportion to the original assured-rate specification.
For example, if Node A is configured to receive 40 Mbps and Node B receives 20 Mbps, any available bandwidth above the subscribed total of 60 Mbps would be allocated to the two nodes at the same 2-to-1 ratio. Similarly, if the bandwidth were oversubscribed and only 30 Mbps were available, this amount would also be allocated to the two nodes at the 2-to-1 ratio, with Node A getting 20 Mbps and Node B getting 10 Mbps.
NOTE: For E-series ASIC modules, strict priority is supported only for a single first-level scheduler node.
Hierarchical Assured Rate
The JUNOSe hierarchical assured rate (HAR) feature provides a more powerful and efficient method of configuring assured rates than static assured rates.
When you use static assured rates, a queue is guaranteed to receive its assured rate only when its parent node is configured with an assured rate that equals the sum of all its child assured rates. Therefore, to ensure that a queue receives its specified assured rate, you must frequently recalculate the assured rates on all parent nodes in the queue's hierarchy. This recalculation is necessary because of the number of scheduler nodes and queues that may be dynamically created or deleted through applications such as bandwidth-on-demand. Eventually, this complicated manual recalculation process becomes unreasonable and virtually impossible.
HAR replaces the manual recalculation process by directing the router to dynamically calculate the assured rate for a scheduler node based on the sum of the assured rates of all its child nodes and queues. For example, you might use HAR to increase the effective weight of an ATM-VC scheduler node when a video queue is created, and to later restore the effective rate of the node when the video queue is deleted.
HAR is applicable only to level 1 and level 2 scheduler nodes, and is not applicable to queues or ports. When you configure HAR, the changes take place immediately. When you disable HAR, the scheduler node's previous weight is restored.
Figure 11 shows an application of HAR for VC nodes. In the example, VCs, which are configured for HAR, are stacked over virtual path (VP) nodes. The VP nodes are in turn stacked over an OC-3 ATM port. Each VC has a best-effort data queue, which currently has an assured rate of 20 Kbps. The VCs share equal portions of their parent VP's bandwidth. However, when the video queue is added to VC2, HAR enables VC2's share of the VP bandwidth to increase in proportion to the 1-Mbps video queue that was created. The bandwidth of sibling VC nodes, which have only a data queue, is decreased in equal proportions.
![]()
Configuring Scheduler Profiles
To configure a scheduler profile, perform the following steps:
- Create a scheduler profile, and enter Scheduler Profile Configuration mode.
host1(config)#scheduler-profile sp-1mbshost1(config-scheduler-profile)#- (Optional) Set the shaping rate of the scheduler node or queue in bits per second.
host1(config-scheduler-profile)#shaping-rate 128000- (Optional) Set the effective weight of the scheduler node or queue; you can set the HRR weight, a static assured rate, or an HAR.
host1(config-scheduler-profile)#assured-rate 56000- (Optional) Set strict-priority scheduling.
host1(config-scheduler-profile)#strict-priorityassured-rate
- Use to set the assured rate of the scheduler node or queue. If the assured rate setting is other than none (the default), then the assured rate is used instead of the HRR weight setting for the scheduler node or queue.
- Use the hierarchical keyword to specify that the HAR is used for scheduler nodes (HAR is not used for queues or ports). HAR dynamically adjusts the available bandwidth for a scheduler node based on the creation and deletion of other scheduler nodes.
- Example
host1(config-scheduler-profile)#assured-rate hierarchicalFor a static assured rate, specify the bits per second value in the range 25000-1000000000 bps (25 Kbps to 1 Gbps); the default is none (no assured rate). Example host1(config-scheduler-profile)#assured-rate 128000Use the no version to delete the assured rate and revert to using the HRR weight specification. scheduler-profile
- Use to configure a scheduler profile and enter Scheduler Profile Configuration mode.
- The router supports up to 1,000 scheduler profiles.
- Example
host1(config)#scheduler-profile sp-1mbshost1(config-scheduler-profile)#Use the no version to remove the scheduler profile. shaping-rate
- Use to set the shaping rate of the scheduler node or queue in bits per second.
- Shaping rate range is 64000-1000000000 bps (64 Kbps to 1 Gbps); default is no shaping rate. The router rounds the rate to the next higher 8 Kbps.
- Burst is the catch-up number associated with the shaper; the range is 0-522240. Specifying 0 enables the router to select an applicable default value.
- Example
host1(config-scheduler-profile)#shaping-rate 128000 burst 32767Use the no version to delete the shaping rate. strict-priority
host1(config-scheduler-profile)#strict-priorityUse the no version to delete the strict-priority setting. weight
- Use to set the HRR weight of the scheduler node or queue.
- The weight value is in the range 0-4080. Weight 0 (zero) is a special weight used for relative strict-priority scheduling, which is discussed in Relative Strict-Priority Scheduling. The weight value is used when there is no assured rate set.
- Example
host1(config-scheduler-profile)#weight 8Use the no version to return to the default weight, 8.