The qos queue max-length command sets the maximum number of packets allowed in a queue.
The undo qos queue max-length command restores the default maximum number of packets allowed in a queue.
The qos queue green max-length command sets the maximum number of green packets allowed in a queue.
The undo qos queue green max-length command restores the default maximum number of green packets allowed in a queue.
By default, the maximum buffer size of all packets in a queue is 22 and the maximum buffer size of green packets in a queue is 11, in packets.
Only the S2720-EI, S5720I-SI, S5720-LI, S5720S-LI, S5720S-SI, S5720-SI, S5730S-EI, S5730-SI, S6720-LI, S6720S-LI, S6720S-SI, and S6720-SI support this command.
qos queue queue-index max-length packet-number [ green max-length packet-number ]
undo qos queue queue-index max-length [ packet-number green max-length packet-number | green max-length ]
qos queue queue-index green max-length packet-number
undo qos queue queue-index green max-length
Parameter |
Description |
Value |
---|---|---|
queue queue-index |
Specifies the index of a queue. |
The value is an integer that ranges from 0 to 7. |
max-length packet-number |
Specifies the maximum number of packets allowed in a queue. |
The value is an integer, in packets. The value range is as follows:
|
green max-length packet-number |
Specifies the maximum number of green packets to be cached in a queue. |
The value is an integer, in packets. The value range is as follows:
|
non-green max-length packet-number |
Specifies the maximum number of non-green packets to be cached in a queue. |
The value is an integer that ranges from 1280 to 3000, in packets. |
Usage Scenario
When congestion occurs, the switch uses the tail drop method. When the queue length reaches the upper limit, excess packets (buffered at the queue tail) are discarded until congestion is removed. You can run the qos queue max-length command to set the maximum number of packets to be cached in a specified queue on an interface so that the queue has sufficient buffer, preventing packet loss.
Prerequisites
A tail drop profile has been created using the qos tail-drop-profile (system view) command.
Precautions
You can also run the qos queue max-buffer command to set the maximum number of bytes in all packets to be cached in a queue. If the maximum number of bytes or packets is reached, the device considers that congestion occurs and will discard subsequent packets.