Buffer allocation profile
QoS queue management features are configured using buffer allocation profiles and queue management profiles. These profiles are groups of configuration information that apply to a set of queues. On 7250 IXR systems, the controlled set of queues are VOQs; on 7220 IXR systems, the controlled set of queues are egress queues.
The maximum number of buffer allocation profiles and queue management profiles per system varies by platform. On 7250 IXR systems, the maximum is eight; on 7220 IXR systems, the maximum is 62.
A buffer allocation profile contains all configuration related to queue-depth parameters, including the following parameters:
-
The MBS of each queue: this defines the length of each queue. When the queue builds to the MBS level, further packets are dropped. Be aware that discards may occur before the queue reaches MBS (for example, resulting from shared buffer exhaustion, or from the effects of WRED slopes defined for the queue).
- Queue utilization threshold: when a router receives a burst of traffic, and the incoming rate exceeds the available transmission rate, the router queues the excess traffic. If the burst lasts long enough, or it is followed by additional bursts, the queues may overflow, resulting in traffic loss. To respond to onsets of congestion, you can subscribe to telemetry information that generates an event when specific queues exceed a specified occupancy level.
If a VOQ does not have a buffer allocation profile binding, it inherits the settings of the default buffer allocation profile. The default buffer allocation profile has a platform-specific MBS default value and no defined queue utilization threshold. You cannot display the default buffer allocation profile, but its effect is visible by reading the state of individual queues that lack a buffer allocation profile binding.
Configuring buffer allocation profiles
To create a buffer allocation profile, use the qos buffer-management buffer-allocation-profile command. You can then define the parameters for the profile as described in subsequent sections.
Create a buffer allocation profile
--{ + candidate shared default }--[ ]--
# info qos buffer-management buffer-allocation-profile
qos {
buffer-management {
buffer-allocation-profile mbs-high-threshold-1 {
}
}
}
Maximum burst size
In a buffer allocation profile, the maximum-burst-size parameter sets the maximum length of an egress queue or set of VOQs. The MBS is also known as the queue depth. You must set the maximum-burst-size parameter to a nonzero value to configure WRED slope and ECN slope parameters.
On the 7250 IXR systems, the maximum-burst-size parameter applies to a set of VOQs. If the parameter is not configured, the effective MBS of these VOQs is 256 MB.
On the 7220 IXR systems, the maximum-burst-size parameter applies to a set of egress queues. If the parameter is not configured or is set to 0, the effective MBS of these egress queues is calculated based on a fair allocation algorithm. You can assign a non-zero MBS value to multicast queues, but Nokia does not recommend this configuration (especially if multicast traffic is being shaped by configuring peak-rate-percent), because it can lead to a shortage of multicast-related buffering resources on 7220 IXR systems.
Configuring maximum burst size
To configure the MBS within a buffer allocation profile, set a value using the queue maximum-burst-size command.
The following example specifies a maximum-burst-size for queue test-unicast-0:
Configure MBS
--{ candidate shared default }--[ ]--
# info qos buffer-management buffer-allocation-profile test-buffer-profile queues queue unicast-0
qos {
buffer-management {
buffer-allocation-profile test-buffer-profile {
queues {
queue test-unicast-0
maximum-burst-size 31457280
}
}
}
}
}
Queue utilization thresholds
When a router receives a burst of traffic, and the incoming rate exceeds the available transmission rate, the router queues the excess traffic. If the burst lasts long enough, or it is followed by additional bursts, the queues may overflow, resulting in traffic loss.
To respond to onsets of congestion, you can subscribe to telemetry information that generates an event when specific queues exceed a specified occupancy level.
To assign a utilization threshold to a queue, you must apply a non-default buffer allocation profile to the queue, and that buffer allocation profile must specify a nonzero high-threshold-bytes value. When the utilization of the queue crosses the specified high-threshold-bytes value, a hardware interrupt is raised. The Nokia XDP records the current system time and clears the interrupt. In a scaled setup, XDP may take 10 to 15 ms to process and clear each interrupt, meaning multiple threshold crossings within a very short period of time across one or more queues using the same buffer allocation profile may appear as only a single event in the telemetry stream. When the high-threshold-bytes value is 0, the functionality is disabled and no threshold events are generated for the queues covered by the buffer allocation profile.
SR Linux supports queue utilization thresholds on 7250 IXR, 7220 IXR-D2/D2L and D3/D3L, and 7220 IXR-H2 and H3 systems; however, the behavior varies by system.
Configuring queue utilization thresholds (7250 IXR)
On a 7250 IXR system, bind a buffer allocation profile with a nonzero high-threshold-bytes value to an egress queue to assign that threshold value to all the VOQs that logically feed this egress queue.
You can configure each buffer allocation profile that the system supports with a different high-threshold-bytes value as needed.
Configuring high-threshold-bytes
The following example configures the high-threshold-bytes value to 256255. For the configured value to be committed, a maximum-burst-size value must also be defined.
--{ candidate shared default }--[ ]--
# info qos buffer-management buffer-allocation-profile test-buffer-profile queues queue unicast-0
qos {
buffer-management {
buffer-allocation-profile test-buffer-profile {
queues {
queue unicast-test-0 {
maximum-burst-size 1203200768
high-threshold-bytes 256255
}
}
}
}
}
Each configured threshold value is rounded up to the nearest multiple of 256 bytes, up to a maximum capped value of MBS. You can observe the rounding (on a per VOQ-set basis) using the info from state interface qos output queue-statistics queue <queue-name> virtual-output-queue queue-depth output. (A VOQ-set consists of the VOQ for core 0 and the VOQ for core 1.)
Rounding high-threshold-bytes
In the following example, the high-threshold-bytes value was configured to 256255, but is rounded to the lower 256000 value (that is, a multiple of 256 bytes):
--{ candidate shared default }--[ ]--
# info from state qos interfaces interface ethernet-1/35 output queues queue unicast-0 queue-statistics aggregate-statistics virtual-output-queue 1 queue-depth
qos {
interfaces {
interface ethernet-1/35 {
output {
queues {
queue unicast-0 {
queue-statistics {
aggregate-statistics {
virtual-output-queue 1 {
queue-depth {
high-threshold-bytes 256000
}
}
}
}
}
}
}
}
}
}
The state tree maintains the time of the last threshold crossing in the info from state qos interfaces interface <interface-name>output queues queue <queue-name>queue-depth last-high-threshold-time leaf. This value represents the last time when either VOQ in the VOQ-set (core0/core1) exceeded the operational threshold. The value of this leaf is not cleared when you delete or modify the buffer allocation profile that is bound to the queue/VOQs or the high-threshold-bytes configuration in the applied buffer allocation profile.
Configuring queue utilization thresholds (7220 IXR-D2/D2L/D3/D3L)
On 7220 IXR-D2/D2L and D3/D3L systems, bind a buffer allocation profile with a nonzero high-threshold-bytes value to an egress queue to assign that threshold value for that specific queue, as long as it is a unicast queue. The configuration of this leaf is ignored when this buffer allocation profile is attached to a multicast queue.
No more than seven different configured high-threshold-bytes values are allowed across all the buffer allocation profiles used. The management server rejects a commit that would leave more than seven different values after all adds, deletes, and modifies are processed.
Configuring high-threshold-bytes
The following example configures the high-threshold-bytes value to 2048999:
--{ candidate shared default }--[ ]--
# info qos buffer-management buffer-allocation-profile test-buffer-profile queues queue unicast-0
qos {
buffer-management {
buffer-allocation-profile test-buffer-profile {
queues {
queue unicast-test-0 {
maximum-burst-size 2049024
high-threshold-bytes 2048999
}
}
}
}
Each configured threshold value (that SR Linux accepts) is rounded up to the nearest multiple of 2048 bytes, up to a maximum capped value of MBS. For this reason, do not configure values that round to the same multiple of 2048 bytes. This configuration causes duplication among the high-threshold-bytes values, of which only seven are allowed. You can display the effect of this rounding using the info from state interface qos output unicast-queue queue-depth command.
Rounding high-threshold-bytes
In the following example, the high-threshold-bytes value was configured to 2048999, but is rounded to a lower 2048000 value (that is, a multiple of 2048 bytes):
--{ candidate shared default }--[ ]--
# info from state qos interfaces interface ethernet-1/1 output queues queue unicast-0 queue-depth
qos {
interfaces {
interface ethernet-1/1 {
output {
queues {
queue unicast-0 {
queue-depth {
maximum-burst-size 2049024
high-threshold-bytes 2048000
}
}
}
}
}
}
}
The state tree maintains the time of the last threshold crossing in the info from state qos interfaces interface <interface-name>output queues queue <queue-name>queue-depth last-high-threshold-time leaf. This value represents the last time the queue exceeded the operational threshold. The value of this leaf is not cleared when you delete or modify the buffer allocation profile that is bound to the queue or the high-threshold-bytes configuration in the applied buffer allocation profile.
Configuring queue utilization thresholds on (7220 IXR-H2/H3)
On 7220 IXR-H2 and H3 systems, bind a buffer allocation profile with a nonzero high-threshold-bytes value to an egress queue to assign that threshold value to be used by each ITM that serves the queue. For a high-threshold event, the queue utilization threshold must be exceeded on either ITM.
No more than seven different configured high-threshold-bytes values are allowed across all the buffer allocation profiles used. The management server rejects a commit that would leave more than seven different values after all adds, deletes, and modifies are processed.
Configuring high-threshold-bytes
The following example configures the high-threshold-bytes value to 254255:
--{ candidate shared default }--[ ]--
# info qos buffer-management buffer-allocation-profile test-buffer-profile queues queue unicast-0
qos {
buffer-management {
buffer-allocation-profile test-buffer-profile {
queues {
queue unicast-test-0 {
maximum-burst-size 2049024
high-threshold-bytes 254255
}
}
}
}
Each configured threshold value (that the management server accepts) is rounded up to the nearest multiple of 254 bytes, up to a maximum capped value of MBS. For this reason, do not configure values that round to the same multiple of 254 bytes. This configuration causes duplication among the high-threshold-bytes values, of which only seven are allowed. You can display the effect of this rounding using the info from state interface qos output unicast-queue queue-depth command.
Rounding high-threshold-bytes
In the following example, the high-threshold-bytes value was configured to 254255, but is rounded to a lower 254254 value (that is, a multiple of 254 bytes):
--{ candidate shared default }--[ ]--
# info from state qos interfaces interface ethernet-1/1 output queues queue unicast-0 queue-depth
qos {
interfaces {
interface ethernet-1/1 {
output {
queues {
queue unicast-0 {
queue-depth {
maximum-burst-size 2049272
high-threshold-bytes 254254
}
}
}
}
}
}
}
The state tree maintains the time of the last threshold crossing in the info from state qos interfaces interface <interface-name>output queues queue <queue-name>queue-depth last-high-threshold-time leaf. This value represents the last time when either ITM exceeded the operational threshold. The value of this leaf is not cleared when you modify or delete the buffer allocation profile that is bound to the queue or the high-threshold-bytes configuration in the applied buffer allocation profile.
Applying buffer allocation profiles to an interface
To apply a buffer allocation profile to an interface, use the qos interfaces interface output buffer-allocation-profile command.
Apply buffer allocation profile to an interface
--{ * candidate shared default }--[ ]--
# info qos interfaces interface ethernet-1/1
qos {
interfaces {
interface ethernet-1/1 {
interface-ref {
interface ethernet-1/1
}
output {
buffer-allocation-profile test-buffer-profile
}
}
}
}