Queue Profiles
A queue is a set of FIFO buffers that buffer packets on the data path. QoS associates queues with a traffic class/interface pair. For example, if you create 4,000 IP interfaces and configure each interface with four traffic classes, then 16,000 queues are created.
The E-series router dynamically manages the shared memory on egress line modules to provide a good balance between sharing the memory among queues and protecting an individual queue's claim on its fair share of the egress memory.
When egress packet memory is in high demand and aggregate utilization of the 32-MB memory is high, queue lengths are set to lengths that strictly partition egress memory into per-queue memory sections. This conservative buffer-management strategy reserves a fair share of buffers for each queue, so that high bandwidth consumers cannot starve out moderate traffic consumers by allocating all the shared memory resource for themselves.
When egress packet memory is in low demand, a more liberal buffer management strategy is used to provide active queues with more access to the shared memory resource.
The router dynamically varies queue lengths for all queues as the real-time demand on the egress packet memory changes. You can configure limits to prevent the router from setting queue lengths too low or too high.
Static Oversubscription
Static oversubscription lets the router vary queue thresholds based on the number of queues currently configured, which is relatively static. Static oversubscription is based on the assumption that, when a few queues are configured, it is likely that many of the queues will be active at the same time; and when a large number of queues are configured, it is likely that fewer queues will be active at the same time.
When few queues are configured, buffer memory is strictly partitioned between queues to ensure that buffers are available for all queues. As the number of configured queues increases, buffer memory is increasingly oversubscribed to allow more buffer sharing. It is unnecessary and wasteful to reserve buffer space for all queues when many are expected to be idle.
Dynamic Oversubscription
Dynamic oversubscription lets the router vary queue thresholds based on the amount of egress buffer memory in use. The router divides egress buffer memory into eight regions of 4 MB each. When buffer memory is in low demand, queues are given large amounts of buffer memory. As the demand for buffer memory increases, queues are given progressively smaller amounts of buffer memory.
Overriding Default Queue Allocation
To prevent the router from setting queue thresholds too low or too high, you can specify minimum and maximum queue thresholds. You can also specify the conformed length and exceeded length as percentages of the committed length.
You may want to limit latency of your multicast traffic by bounding the queue length. The following example configures the multicast queues so that the committed threshold never exceeds 20 KB, even when the egress memory is lightly loaded. The forfeited buffers are allocated to other queues.
host1(config)#queue-profile multicasthost1(config-queue)#committed-length 0 20000host1(config-queue)#exitYou can also set the buffer weight to ensure that some sets of queues get higher thresholds than others. Buffer weight is analogous to weight in a scheduler profile. It directs the router to set the queue thresholds proportionately.
For example, suppose a line module with 4000 IP interfaces is configured with four queues per IP interface, corresponding to four traffic classes. Suppose that queues in two of the traffic classes are configured with a buffer weight of 24 to increase burst tolerance. The following example configures the video queue:
host1(config)#queue-profile videohost1(config-queue)#buffer-weight 24host1(config-queue)#exithost1(config)#When the egress memory is fully loaded, dynamic oversubscription is 0 percent, and the 8000 queues with the default buffer weight strictly partition 25 percent of the 32-MB memory, leaving 75 percent of the memory for the queues weighted 24 (corresponding to the ratio 75 percent:25 percent, or 24:8). Therefore, these queues have committed thresholds of 1 KB each, and queues with the buffer weight of 24 have committed thresholds of 3 KB each. As the egress memory becomes progressively less loaded, all the queue thresholds increase proportionally, based on dynamic oversubscription, but the queues with buffer weight 24 are always set with thresholds three times larger than the default thresholds.
If the queue thresholds are constrained by committed or conformed threshold settings, any unused memory is redistributed to queues whose thresholds are not constrained. This use of thresholds is analogous to the way that shaping rates constrain bandwidth and cause bandwidth redistribution to unconstrained queues.
JUNOSe software uses 128-byte buffers. When setting very small queue thresholds, keep the following guidelines in mind:
- Specifying a maximum queue length of 0 bytes disables queuing of packets on the queue.
- Specifying a maximum queue length of 1-128 bytes creates a single 128-byte buffer for the queue.
- Specifying a maximum queue length of 129-256 bytes creates two 128-byte buffers for the queue.
- Packets and cells consume at least one buffer.
For example, a 64-byte packet consumes a single 128-byte buffer. If you specify a maximum queue length of 256 bytes, then either two packets of 64-128 bytes in length or a single packet of 129-256 bytes can be queued.
Color-Based Thresholding
Packets within the router are tagged with a drop precedence:
When the queue fills above the exceeded threshold, the router drops red packets, but still queues yellow and green packets. When the queue fills above the conformed drop threshold, the router queues only green packets.
NOTE: All color-based thresholds vary in proportion to the dynamic queue length.
Configuring Queue Profiles
A queue profile controls the buffering and dropping behavior of a set of egress queues by letting you set the buffer weight of the queue, the drop thresholds, and the constraints on queue lengths.
Set the queue lengths as follows:
- To oversubscribe buffer memory, set a minimum queue length.
NOTE: If the sum of the queue minimum lengths is greater than the amount of egress buffer memory, then the egress buffer memory is oversubscribed.
- To guarantee a minimum level of buffering, set a maximum queue length.
- To limit the buffering in queues, set a maximum queue length.
If you do not set the queue lengths, the router varies the queue length dynamically between 1 KB and 7 MB.
- Create a queue profile and enter Queue Configuration mode.
host1(config)#queue-profile videohost1(config-queue)#- (Optional) Set the buffer weight of the queue.
host1(config-queue)#buffer-weight 16- (Optional) Set a minimum or maximum queue length for committed packets.
host1(config-queue)#committed-length 11000 15000- (Optional) Set a minimum or maximum queue length for conformed packets.
host1(config-queue)#conformed-length 10000 14000- (Optional) Set a minimum or maximum queue length for exceeded packets.
host1(config-queue)#exceeded-length 9000 10000- (Optional) Set the conformed drop threshold as a percentage of the committed threshold.
host1(config-queue)#conformed-fraction 60- (Optional) Set the exceeded drop threshold as a percentage of the committed threshold.
host1(config-queue)#exceeded-fraction 40buffer-weight
- Use to set the buffer weight of the queue. Queues with a buffer weight of 16 are twice as long as queues with a buffer weight of 8.
- The range is 1-63; the default is 8.
- Example
host1(config-queue)#buffer-weight 16Use the no version to return the buffer weight to the default, 8. committed-length
conformed-length
exceeded-length
- Use to set minimum or maximum constraints on queue lengths for committed, conformed, or exceeded packets.
- You can set minimum and maximum constraints. For both, the range of lengths is 0-1 GB. By default, there is no minimum or maximum length.
- The committed-length command sets a minimum or maximum queue length for committed packets. The color for committed packets is green.
- The conformed-length command sets a minimum or maximum queue length for conformed packets. The color for conformed packets is yellow.
- The exceeded-length command sets a minimum or maximum queue length for exceeded packets. The color for exceeded packets is red.
- Example
host1(config-queue)#committed-length 8000 10000Use the no version to remove constraints on the queue length. conformed-fraction
exceeded-fractionhost1(config-queue)#exceeded-fraction 30Use the no version to return the fraction to its default setting. queue-profile
- Use to configure a queue profile and enter Queue Configuration mode.
- You can configure 16 queue profiles on a router.
- Example
host1(config)#queue-profilevideohost1(config-queue)#exithost1(config)#queue-profilemulticasthost1(config-queue)#exithost1(config)#queue-profileinternethost1(config-queue)#Use the no version to remove the queue profile.