< Home

qos queue max-length

Function

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.

Format

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

Parameters

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:
  • S2720-EI, S5720I-SI, S5720-LI, S5720S-LI, S5720S-SI, and S5720-SI: from 1 to 5134.
  • S5730-SI, S5730S-EI, S6720-LI, S6720S-LI, S6720-SI, and S6720S-SI: from 1 to 10000.

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:
  • S5730-SI, S5730S-EI, S6720-LI, S6720S-LI, S6720-SI, and S6720S-SI: from 1 to 10000.
  • Other models except the S5730-SI, S5730S-EI, S6720-LI, S6720S-LI, S6720-SI, and S6720S-SI: from 1 to 5134.

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.

Views

Tail drop profile view

Default Level

2: Configuration level

Usage Guidelines

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.

Example

# Create a global tail drop template named test and set the maximum number of packets to be cached in queue 0 for the global tail drop template to 200.

<HUAWEI> system-view
[HUAWEI] qos tail-drop-profile test
[HUAWEI-tail-drop-profile-test] qos queue 0 max-length 200
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >