WO2013026324A1 - 队列调整方法及装置 - Google Patents
队列调整方法及装置 Download PDFInfo
- Publication number
- WO2013026324A1 WO2013026324A1 PCT/CN2012/077762 CN2012077762W WO2013026324A1 WO 2013026324 A1 WO2013026324 A1 WO 2013026324A1 CN 2012077762 W CN2012077762 W CN 2012077762W WO 2013026324 A1 WO2013026324 A1 WO 2013026324A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- queue
- threshold
- qos
- buffer
- borrowing
- Prior art date
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/30—Flow control; Congestion control in combination with information about buffer occupancy at either end or at transit nodes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
- H04L47/62—Queue scheduling characterised by scheduling criteria
- H04L47/6215—Individual queue per QOS, rate or priority
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/90—Buffering arrangements
- H04L49/9084—Reactions to storage capacity overflow
Definitions
- the present invention relates to the field of communications, and in particular to a method and apparatus for adjusting a queue of Quality of Service (QOS) out queues.
- QOS Quality of Service
- BACKGROUND OF THE INVENTION Quality of Service (QoS) refers to a collection of technologies that allow users to achieve predictable levels of service in terms of throughput, latency, jitter, packet loss, and the like.
- Q0S outbound queues the queue Q0S outbound queue length is achieved by average allocation.
- the switch allocates 8 queues of the same length for all ports.
- the Q0S dequeue technology is that when a Q0S queue is full, the packets placed in the queue are discarded. At this time, other Q0S queues may be idle.
- the Q0S out queue of other ports may also be idle or have few messages. It can be seen that in actual use, in most cases, a small number of queues are full, and most of the queues are idle or have few messages, and the queue resources cannot be fully utilized. Therefore, in the current Q0S dequeue technical solution, when a queue of a part of a port is lost due to a queue full, other QOS outbound queues may be idle or used at this time, so that the queue resources of the QOS out queue are The problem is not fully used as a whole.
- a queue adjustment method including: comparing a relationship between a reserved length of a memory space of a current quality of service QOS out queue and a set first threshold and a second threshold, wherein the first threshold and The second threshold is smaller than the length of the memory space of the current Q0S out queue, and the first threshold is smaller than the second threshold. If the occupied space of the current Q0S outbound queue is greater than the second threshold, the occupied length from other memory spaces is smaller than the first.
- the method for adjusting the queue further includes: if the occupied space of the current QOS out queue is less than the first threshold, setting the current QOS out queue as a borrowable queue, allowing the other QOS to be queued to supply its borrowing buffer.
- the queue adjustment method further includes: if the current memory space of the QOS out queue is less than or equal to the second threshold and greater than or equal to the first threshold, the current QOS queue determines whether the borrowing buffer is borrowed; if yes, Then, the borrowing buffer is reclaimed, and the borrowing buffer is re-allocated for the QOS outbound borrowing the borrowing buffer; if not, the current QOS outbound is set to be a non-borrowable queue, and the borrowing buffer is refused to be borrowed from other QOS queues.
- the queue adjustment method further includes: when the current memory space occupied by the QOS out queue is reduced from greater than a second threshold to less than or equal to a second threshold, the current QOS queues up the borrowed borrowing buffer.
- the queue adjustment method further includes: the system saves the correspondence between the current QOS out queue and the QOS out queue to which the borrowed buffer borrowed by the system belongs, and updates in real time.
- a queue adjustment apparatus including: a comparison module, configured to compare a relationship between a occupied space length of a current quality of service QOS out queue and a set first threshold and a second threshold, The first threshold and the second threshold are both smaller than the memory space of the current QOS out queue, and the first threshold is smaller than the second threshold.
- the first allocation module is configured to: when the comparison result of the comparison module is the current QOS queued memory space is When the occupation length is greater than the second threshold, a queue is selected from the QOS out queue whose other memory space is less than the first threshold, wherein the current QOS queue and other QOS queues are provided with a borrowing buffer;
- the borrowing buffer of the QOS outbound queue is borrowed to the end of the current QOS queue.
- the queue adjustment device further includes: a second allocation module, configured to: if the comparison result of the comparison module is that the memory space occupied by the current QOS out queue is less than the first threshold, setting the current QOS out queue as a borrowable queue, allowing The other QOS is queued to supply its borrowing buffer; and/or, the third allocation module is set to be compared if the comparison result of the comparison module is that the current QOS outbound memory space is occupied less than or equal to the second If the threshold is greater than or equal to the first threshold, the current Q0S queues whether the borrowing buffer is borrowed; if so, the borrowing buffer is reclaimed, and the borrowing buffer is re-allocated for the QOS outbound borrowing the borrowing buffer; No, the current QOS dequeue is set to be a non-borrowable queue, and the borrowing buffer is refused to be borrowed from other QOS queues.
- a second allocation module configured to: if the comparison result of the comparison module is that the memory space occupied by the current QOS out queue is less than
- the queue adjusting device further includes: a returning module, configured to: when the current QOS queued memory space occupied length is decreased from greater than a second threshold to less than or equal to a second threshold, the current QOS queues the borrowed borrowing buffer Area.
- a queue buffer that can be shared is allocated to all QOS out queues. When a QOS out queue is used beyond the second threshold, other QOSs whose queue length is less than the first threshold are queued.
- the queue buffer borrowing is added to the queue, so that the length of the queue is greater than the original initial allocation length, so that when the message in the QOS out queue exceeds the initial length of the QOS out queue, the message can still be cached in the QOS.
- FIG. 2 is a flow chart of steps of a queue adjustment method according to an embodiment of the present invention.
- a queue initial allocation map in a queue adjustment method FIG. 4 is a buffer queue management diagram in a queue adjustment method according to an embodiment of the present invention.
- EMBODIMENT OF THE INVENTION A queue-available length map in a queue adjustment method;
- FIG. 6 is a buffer queue recovery diagram in a queue adjustment method according to an embodiment of the present invention;
- FIG. 7 is a diagram according to the present invention.
- Embodiment 3 A buffer queue borrowing map in a queue adjustment method;
- FIG. 8 is a buffer queue returning diagram in a queue adjusting method according to Embodiment 3 of the present invention;
- FIG. 9 is a block diagram of a buffer queue borrowing management method in a queue adjusting method according to Embodiment 3 of the present invention
- FIG. 10 is a structural block diagram of a queue adjusting apparatus according to Embodiment 4 of the present invention.
- BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, the present invention will be described in detail with reference to the accompanying drawings. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
- Embodiment 1 Referring to FIG. 1, a flow chart of steps of a queue adjustment method according to a first embodiment of the present invention is shown.
- the method for adjusting the queue of the present embodiment includes the following steps: Step S102: Comparing the relationship between the occupied length of the memory space of the current QOS out queue and the set first threshold and the second threshold; wherein, the first threshold and the second threshold are both smaller than The current QOS queued memory space length, and the first threshold is less than the second threshold.
- all QOS outbound queues of a port are provided with a borrowing buffer. When a QOS out queue is idle or used very little, the borrowing buffer can be loaned out to other QOS outbounds; When the QOS queue is full, you can borrow other borrowable borrowing buffers to increase the queue length and expand the queue space.
- the queue space occupation length when the queue space occupation length is less than the first threshold, it indicates that the queue is idle, and more idle queue space can be used, and can be borrowed from other queues; when the queue occupation space length is greater than or equal to the first If the threshold is less than or equal to the second threshold, it indicates that the queue is busy, and the borrowing buffer cannot be borrowed from other queues, and the borrowing buffer that can be borrowed may be borrowed from other queues; when the queue occupation space length is greater than the second threshold When the queue is busy, the corresponding borrowing buffer needs to be borrowed from other queues that can borrow the buffer.
- Step S104 If the occupied space of the current QOS out queue is greater than the second threshold, select a queue from the QOS out queue whose other memory space is less than the first threshold; wherein, the current QOS queue and other QOS A borrowing buffer is set in the outbound queue, and the borrowing buffer is a shared buffer, which can be loaned out to other QOSs when necessary.
- Step S106 The borrowing buffer of the selected QOS outbound is borrowed to the tail of the current QOS out queue. By borrowing the borrowed buffer of the selected QOS outbound to the end of the current QOS out queue, the current QOS outbound buffer space can be expanded to facilitate buffering more packets.
- the manner of borrowing can be flexibly set by a person skilled in the art according to actual conditions, such as using a linked list method, or using a table recording method, etc., as long as the address of the provided borrowing buffer can be determined, so as to store the message data.
- the QOS dequeue technical solution when a queue of a part of a port is lost due to a queue full, other QOS out queues may be idle or used at this time, so that the QOS queued queue resources are Not fully used as a whole.
- a queue buffer that can be shared is allocated to all QOS out queues. When a QOS out queue is used beyond the second threshold, other QOSs whose queue length is less than the first threshold are queued.
- Embodiment 2 Referring to FIG. 2, a flow chart of steps of a queue adjustment method according to Embodiment 2 of the present invention is shown. In this embodiment, all QOS queues are divided into a queue buffer that can be shared.
- the queue adjustment method of this embodiment includes the following steps: Step S202: For each QOS out queue of each port, respectively set a minimum buffer return threshold (ie, a first threshold) and a maximum buffer borrowing threshold (ie, a second threshold). . Step S204: The queues whose queue lengths used in all QOS outbound queues do not exceed the minimum buffer return threshold are uniformly managed by the software; for the queues that have been borrowed, the relationship between borrowing and borrowing is recorded and managed by the software system.
- a minimum buffer return threshold ie, a first threshold
- a maximum buffer borrowing threshold ie, a second threshold
- the queues that are used in the queuing queues of the QOS queues that do not exceed the minimum buffer return threshold may be managed in a unified manner, or may be uniformly managed by using a form registration method. Of course, those skilled in the art may also adopt In other suitable manners, the invention is not limited thereto.
- QOS can be dequeued by the unified management of the queues used in all QOS out queues that do not exceed the minimum buffer return threshold.
- each QOS dequeue available for borrowing may be the remaining queue greater than the maximum buffer borrowing threshold.
- the length of each QOS dequeuable loanable can be composed of two parts, one part is the remaining queue larger than the maximum buffer borrowing threshold, and the other part is the difference between the maximum buffer borrowing threshold and the minimum buffer return threshold multiplied by The length of the space that can be configured as a percentage.
- Step S206 Perform corresponding queue adjustment processing according to the occupied length of the memory space of the current QOS out queue. Specifically, when the usage of the queue exceeds the minimum buffer return threshold, the borrow buffer of the queue is set to be unborable. If the borrow buffer of the queue has been borrowed, it needs to be reclaimed, and a borrow buffer of a queue can be reassigned from the system for use by the borrower.
- a borrow is found from the list of free buffer queues, increasing the length of the queue.
- the lookup of the idle buffer queue is preferred to the other queues on the port where the queue is borrowed. If other queues cannot be borrowed or have been borrowed, the queues of other ports are used for borrowing.
- the borrowed borrowing buffer is returned when the usage of the queue is changed from the maximum buffer borrowing threshold to less than the maximum buffer borrowing threshold.
- the borrow buffer of the queue is set to be borrowable.
- a minimum buffer return threshold also referred to herein as a minimum threshold
- a maximum buffer borrowing threshold is respectively set (this article Also referred to as the maximum threshold, and the portion of the queue that exceeds the maximum threshold and the partial queue between the minimum and maximum thresholds are collectively set to a borrowable queue (also referred to herein as a buffer queue).
- the reporting software indicates that the queue cannot borrow the buffer queue (defaults all Ports can be borrowed from the buffer queue).
- the software can detect which port's buffer queue can be borrowed.
- each queue can set a maximum threshold of a high position, a minimum threshold of a low position, when the queue length is increased from the minimum threshold to the maximum threshold, the high level is triggered, and the queue length is used by the maximum threshold. When the minimum threshold is reduced, the low bit is triggered.
- this embodiment dynamically adjusts the queue size by sharing some resources of the queue, so that the queue resource utilization is more fully utilized.
- Embodiment 3 a queuing queue of a QOS queue is used as an example to adjust the QOS queue adjustment method of the present invention.
- FIG. 3 a queue initial allocation diagram in a queue adjustment method according to Embodiment 3 of the present invention is shown. As shown in FIG.
- this embodiment divides each QOS out queue into three parts: a portion smaller than the minimum threshold (ie, the first threshold) (the vertical stripe portion in the figure), a minimum threshold, and a maximum threshold (ie, the first The portion between the two thresholds (the diagonal stripe portion in the figure) and the portion larger than the maximum threshold value (the remaining queue behind the diagonal stripe portion in the figure, that is, the cross-strip portion).
- the minimum threshold ie, the first threshold
- the maximum threshold ie, the first The portion between the two thresholds (the diagonal stripe portion in the figure) and the portion larger than the maximum threshold value (the remaining queue behind the diagonal stripe portion in the figure, that is, the cross-strip portion).
- the queue memory space when the queue memory space is occupied by less than the minimum threshold portion, that is, when the queue usage is less than the minimum threshold, the queue is set to a borrowable queue, allowing the cache to be borrowed from other QOS queues;
- the queue's memory space is occupied between the minimum threshold and the maximum threshold, that is, when the queue usage is between the minimum threshold and the maximum threshold, the queue is set to a non-borrowable queue. Refuse to lend its cache to other QOS queues; when the queue's memory space is occupied by the maximum threshold value, that is, when the queue usage is greater than the maximum threshold, the queue is used up to the maximum queue size. , so you need to borrow from another queue to increase the length of the queue available. Referring to FIG.
- FIG. 4 a buffer queue management diagram in a queue adjustment method according to Embodiment 3 of the present invention is shown.
- all idle queues that is, queues whose queue memory space occupation length is less than the minimum threshold
- the linked list only records the The queue uses a queue that is less than the minimum threshold.
- all the borrowing queues and the borrowed queues are linked into a linked list, and the borrowing situation and the borrowed condition of the linked list are recorded, which is convenient for borrowing and returning.
- FIG. 5 a queue borrowable length map in a queue adjustment method according to a third embodiment of the present invention is shown. As shown in FIG.
- this embodiment designs a queue length that can be borrowed to obtain a queue that can be borrowed.
- the length of the queue available for borrowing consists of two parts, one is the remaining queue larger than the maximum threshold, and the other is the maximum threshold and the minimum threshold difference multiplied by the configurable percentage, which can be configured according to the actual use. Adjustment.
- the position of the length available for borrowing is distributed forward from the tail of the queue, as in the horizontal stripe portion of the figure.
- the queue length queue length - maximum threshold + (maximum threshold - minimum threshold) * N% can be borrowed, wherein the size of N is an integer between 0 and 100, and can be flexibly configured according to actual needs. Referring to FIG.
- FIG. 6 a buffer queue recovery diagram in a queue adjustment method according to a third embodiment of the present invention is shown.
- the queue e.g., queue 1 of port 1
- the queue needs to be set to a non-borrowable queue. If the queue is not borrowed by another queue, that is, the queue is in the queue available for borrowing, the queue is taken out of the queue available for borrowing, that is, the queue can no longer be borrowed; if the queue has been borrowed by other queues, Then, the queue borrowed by the queue is forcibly reclaimed, deleted from the borrowed team list, and a borrowable queue is reassigned from the borrowable queue for the queue borrowing the queue.
- Step S602 Searching the queue from the borrowable queue, if found, indicating that the queue is not borrowed, deleting the queue from the borrowable queue, and not performing the following steps; if not found, executing Step S604.
- Step S604 The queue has been borrowed, the queue is searched from the borrowed relationship table, the borrower borrowing the queue is found, and the borrowing queue is reclaimed from the borrower.
- Step S606 The borrower borrowing the queue re-borrows a queue from the borrowable queue. If the borrowable queue is empty, the borrower will not borrow the queue. Referring to FIG. 7, a buffer queue borrowing diagram in a queue adjustment method according to a third embodiment of the present invention is shown.
- Step S702 Find a queue that can be borrowed from the borrowable queue (such as queue 6 of port 1 in the figure).
- Step S704 The borrowing queue (the queue 6 of the port 1 in the figure) is deleted from the available borrowing queue to prevent other queues from being borrowed. Of course, in actual operation, other ways, such as marking the borrowing queue, may be used to distinguish whether it is lent.
- Step S706 Add the borrowing queue (the queue 7 of the port 1 in the figure) and the borrowed queue (the queue 6 of the port 1 in the figure) to the borrowing queue relationship table.
- Step S708 Add the borrowed queue (such as queue 6 of port 1 in the figure) to the end of the borrowing queue (such as queue 7 of port 1 in the figure), and increase the length of the queue.
- FIG. 8 a buffer queue returning diagram in a queue adjustment method according to a third embodiment of the present invention is shown. As shown in Figure 8, when the memory space used by the queue (such as queue 7 of port 1 in the figure) is reduced from greater than the maximum threshold to less than the maximum threshold, the length of the queue is sufficient to return the other queues that have been borrowed.
- Update the queue borrowing relationship table includes the following steps: Step S802: Check the queue borrowing relationship table to find out whether the queue borrows records of other queues.
- Step S804 The borrowed queue (the queue 6 of the port 1 in the figure) is removed from the tail of the borrowing queue (the queue 7 of the port 1 in the figure), and is returned to the borrowed queue.
- Step S806 In the borrowing queue relationship table, the borrowing relationship between the borrowing queue and the borrowed queue is deleted.
- Step S808 Add the borrowed queue (such as queue 6 of port 1 in the figure) to the list of available borrowing queues, and other queues that need to borrow the queue can borrow the queue.
- FIG. 9 a buffer queue borrowing management diagram in a queue adjustment method according to a third embodiment of the present invention is shown.
- Embodiment 9 when the memory space used by the queue (such as queue 7 of port 1 in the figure) is reduced from the minimum threshold to less than the minimum threshold, the queue is used idle, and can be set to borrowable queues. Go to the linked list of borrowable queues.
- the resources of each QOS out queue are shared, and the queue size is dynamically adjusted to make the utilization of the queue resources more fully and improve the service quality.
- Embodiment 4 Referring to FIG. 10, a block diagram of a structure of a queue adjusting apparatus according to Embodiment 4 of the present invention is shown.
- the queue adjustment device of this embodiment includes: a comparison module 1002, configured to compare a relationship between a reserved length of a memory space of the current QOS out queue and a set first threshold and a second threshold, where the first threshold and the second threshold are both The first threshold is smaller than the second threshold; the first allocation module 1004 is coupled to the comparison module 1002, and is set to be the length of the memory space occupied by the current QOS out queue when the comparison result of the comparison module 1002 is When the value is greater than the second threshold, a queue is selected from the QOS out queue whose other memory space is less than the first threshold.
- the current QOS queue and other QOS queues are all provided with a borrowing buffer; the selected QOS will be selected.
- the outbound buffer of the outbound queue is borrowed to the end of the current QOS queue.
- the queue adjustment apparatus of this embodiment further includes: a second allocation module 1006, coupled to the comparison module 1002, configured to: if the comparison result of the comparison module 1002 is that the memory space occupied by the current QOS queue is less than the first threshold, Then, the current QOS queue is set as a borrowable queue, and the borrowing buffer is allowed to be sent out to other QOSs; and/or the third allocation module 1008 is coupled to the comparison module 1002, and is set to be the comparison result of the comparison module 1002.
- a second allocation module 1006 coupled to the comparison module 1002, configured to: if the comparison result of the comparison module 1002 is that the memory space occupied by the current QOS queue is less than the first threshold, Then, the current QOS queue is set as a borrowable queue, and the borrowing buffer is allowed to be sent out to other QOSs
- the third allocation module 1008 is coupled to the comparison module 1002, and is set to be the comparison result of the comparison module 1002.
- the current QOS queue determines whether the borrowing buffer is borrowed; if yes, the borrowing buffer is reclaimed, and the borrowing is borrowed Borrowing the QOS out queue of the buffer to re-allocate the borrowing buffer; if not, setting the current QOS out queue to a non-borrowable queue, and refusing to lend its borrowing buffer to other QOS queues.
- the queue adjusting apparatus of this embodiment further includes: a returning module, coupled to the comparing module 1002, configured to reduce the occupied length of the memory space of the current QOS out queue from being greater than a second threshold to being less than or equal to a second threshold, Then the current QOS queues up the borrowed borrowing buffer.
- the queue adjusting apparatus of this embodiment further includes: a saving module, configured to save the correspondence between the current QOS out queue and the QOS out queue to which the borrowed buffer borrowed by the system belongs, and update in real time.
- the method implemented in this embodiment can refer to the related description of the foregoing corresponding method embodiments, and has the beneficial effects of the foregoing embodiments, and details are not described herein again.
- the queue adjustment technical solution of the QOS out queue on the distributed switch dynamically adjusts according to the queue usage of the QOS out queue, and the queue is made by sharing some resources of the queue. More efficient use of resources.
- the usage of a queue exceeds the maximum threshold
- other buffer queues whose queue length is less than the minimum threshold are added to the queue, so that the length of the queue is greater than the original initial allocation length, and the packets in the queue exceed the queue.
- the message can still be cached in the queue without being discarded, thus improving the quality of service.
- modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
- the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps are fabricated as a single integrated circuit module.
- the invention is not limited to any specific combination of hardware and software.
- the above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明公开了一种队列调整方法及装置,其中,队列调整方法包括:比较当前服务质量QOS出队列的内存空间被占用长度与设定的第一阈值和第二阈值的关系,其中,第一阈值和第二阈值均小于当前QOS出队列的内存空间长度,第一阈值小于第二阈值;若当前QOS出队列的内存空间被占用长度大于第二阈值,则从其它的内存空间被占用长度小于第一阈值的QOS出队列中选择一个队列,其中,当前QOS出队列和其它QOS出队列中均设置有借用缓冲区;将选择的QOS出队列的借用缓冲区借用到当前QOS出队列的队尾。通过本发明,达到了充分利用QOS出队列整体资源,提高服务质量的效果。
Description
队列调整方法及装置 技术领域 本发明涉及通信领域, 具体而言, 涉及一种服务质量 (Quality Of Service, QOS) 出队列的队列调整方法及装置。 背景技术 服务质量 Q0S是指允许用户在吞吐量、延迟、 抖动、丢包率等方面获得可预期的 服务水平的一系列技术的集合。 对于 Q0S出队列, 端口 Q0S出队列长度是通过平均分配来实现的, 交换机为所 有端口各分配了 8个相同长度的队列。 目前, Q0S出队列技术是当一个 Q0S出队列 满时, 放入该队列的报文就会被丢弃, 而此时, 其他 Q0S出队列则可能是空闲的。 例 如, 当端口 1的某个队列 (例如队列 7)满时, 队列 7上的新增加的报文就会被丢弃, 这时, 该端口 1的其它队列则有可能是空闲的或者报文很少, 此外, 其它端口的 Q0S 出队列也可能是空闲的或者报文很少。 可见, 在实际的使用中, 大多数情况是一少部分的队列会满, 而大部分的队列空 闲或者报文很少, 队列资源不能充分利用。 由此,目前的 Q0S出队列技术方案中存在当部分端口的队列因队列满而导致丢包 时, 其它的 QOS出队列此时可能空闲或者使用的很少, 从而使得 QOS出队列的队列 资源在整体上没有被充分使用的问题。 发明内容 本发明提供了一种队列调整方法及装置,以至少解决上述现有 Q0S出队列的队列 资源在整体上没有被充分使用的问题。 根据本发明的一个方面,提供了一种队列调整方法,包括:比较当前服务质量 Q0S 出队列的内存空间被占用长度与设定的第一阈值和第二阈值的关系, 其中, 第一阈值 和第二阈值均小于当前 Q0S出队列的内存空间长度,第一阈值小于第二阈值; 若当前 Q0S出队列的内存空间被占用长度大于第二阈值, 则从其它的内存空间被占用长度小 于第一阈值的 Q0S出队列中选择一个队列,其中, 当前 Q0S出队列和其它 Q0S出队
列中均设置有借用缓冲区; 将选择的 QOS出队列的借用缓冲区借用到当前 QOS出队 列的队尾。 优选地, 借用缓冲区的长度为: 借用缓冲区的长度 =QOS 出队列长度 一 第二阈 值 十 (第二阈值 一 第一阈值) χΝ%, 其中, N为 0-100之间的整数。 优选地, 队列调整方法还包括: 若当前 QOS出队列的内存空间被占用长度小于第 一阈值, 则设置当前 QOS出队列为可借用队列, 允许向其它 QOS出队列供出其借用 缓冲区。 优选地, 队列调整方法还包括: 若当前 QOS出队列的内存空间被占用长度小于或 等于第二阈值且大于或等于第一阈值, 则当前 QOS 出队列判断其借用缓冲区是否借 出; 若是, 则收回其借用缓冲区, 并为借用其借用缓冲区的 QOS出队列重新分配借用 缓冲区; 若否, 则设置当前 QOS出队列为不可借用队列, 拒绝向其它 QOS队列借出 其借用缓冲区。 优选地, 队列调整方法还包括: 当当前 QOS出队列的内存空间被占用长度由大于 第二阈值减小到小于或等于第二阈值, 则当前 QOS出队列归还借用的借用缓冲区。 优选地, 队列调整方法还包括: 系统保存当前 QOS出队列和其借用的借用缓冲区 所属的 QOS出队列的对应关系, 并实时更新。 根据本发明的另一方面, 提供了一种队列调整装置, 包括: 比较模块, 设置为比 较当前服务质量 QOS 出队列的内存空间被占用长度与设定的第一阈值和第二阈值的 关系, 其中, 第一阈值和第二阈值均小于当前 QOS出队列的内存空间长度, 第一阈值 小于第二阈值; 第一分配模块, 设置为当比较模块的比较结果为当前 QOS出队列的内 存空间被占用长度大于第二阈值时, 从其它的内存空间被占用长度小于第一阈值的 QOS出队列中选择一个队列, 其中, 当前 QOS出队列和其它 QOS出队列中均设置有 借用缓冲区; 将选择的 QOS出队列的借用缓冲区借用到当前 QOS出队列的队尾。 优选地, 借用缓冲区的长度为: 借用缓冲区的长度 = QOS出队列长度 一 第二阈 值 十 (第二阈值 一 第一阈值) χΝ%, 其中, Ν为 0-100之间的整数。 优选地, 队列调整装置还包括: 第二分配模块, 设置为若比较模块的比较结果为 当前 QOS出队列的内存空间被占用长度小于第一阈值, 则设置当前 QOS出队列为可 借用队列, 允许向其它 QOS 出队列供出其借用缓冲区; 和 /或, 第三分配模块, 设置 为若比较模块的比较结果为当前 QOS 出队列的内存空间被占用长度小于或等于第二
阈值且大于或等于第一阈值, 则当前 Q0S出队列判断其借用缓冲区是否借出; 若是, 则收回其借用缓冲区, 并为借用其借用缓冲区的 QOS出队列重新分配借用缓冲区; 若 否, 则设置当前 QOS出队列为不可借用队列, 拒绝向其它 QOS队列借出其借用缓冲 区。 优选地, 队列调整装置还包括: 归还模块, 设置为当当前 QOS出队列的内存空间 被占用长度由大于第二阈值减小到小于或等于第二阈值,则当前 QOS出队列归还借用 的借用缓冲区。 通过本发明,采用对所有 QOS出队列都划分出一个可以共享的队列缓冲区, 当某 个 QOS出队列的使用超过第二阈值时, 将其它使用队列长度小于第一阈值的 QOS出 队列中的队列缓冲区借用增加到该队列,使得该队列的长度大于原先初始分配的长度, 从而使得当该 QOS出队列中的报文超过该 QOS出队列初始长度时, 报文仍可以缓存 在该 QOS出队列中, 而不会被丢弃, 从而解决了现有 QOS出队列的队列资源在整体 上没有被充分使用的问题,进而达到了充分利用 QOS出队列整体资源,提高服务质量 的效果。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部分, 本发 明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的不当限定。 在附图 中: 是根据本发明实施例一 '的-一种队列调整方法的步骤流程图; 图 2是根据本发明实施例二 .的-一种队列调整方法的步骤流程图; 图 3是根据本发明实施例三 .的-一种队列调整方法中的队列初始分配图; 图 4是根据本发明实施例三 .的-一种队列调整方法中的缓冲队列管理图; 图 5是根据本发明实施例三 .的-一种队列调整方法中的队列可借用长度图; 图 6是根据本发明实施例三 .的-一种队列调整方法中的缓冲队列回收图; 图 7是根据本发明实施例三 .的-一种队列调整方法中的缓冲队列借用图; 图 8是根据本发明实施例三 .的-一种队列调整方法中的缓冲队列归还图;
图 9是根据本发明实施例三的一种队列调整方法中的缓冲队列借用管理图; 图 10是根据本发明实施例四的一种队列调整装置的结构框图。 具体实施方式 下文中将参考附图并结合实施例来详细说明本发明。 需要说明的是, 在不冲突的 情况下, 本申请中的实施例及实施例中的特征可以相互组合。 实施例一 参照图 1, 示出了根据本发明实施例一的一种队列调整方法的步骤流程图。 本实施例的队列调整方法包括以下步骤: 步骤 S102: 比较当前 QOS出队列的内存空间被占用长度与设定的第一阈值和第 二阈值的关系; 其中, 第一阈值和第二阈值均小于当前 QOS出队列的内存空间长度, 并且, 第一 阈值小于第二阈值。 本实施例中, 一个端口的所有 QOS出队列中均设置有借用缓冲区, 当一个 QOS 出队列空闲或使用的很少时,其借用缓冲区可以借出给其它 QOS出队列使用; 相反当 一个 QOS出队列很满时, 则可以借用其它可借用的借用缓冲区来增加队列长度,扩展 队列空间。 在本实施例中, 当队列空间占用长度小于第一阈值时, 说明该队列较空闲, 还有 较多的空闲队列空间可被使用, 可以向其它队列借出; 当队列占用空间长度大于等于 第一阈值且小于等于第二阈值时, 说明该队列较忙, 不能向其它队列借出其借用缓冲 区, 且有可能向其它队列借用可借用的借用缓冲区; 当队列占用空间长度大于第二阈 值时, 则说明该队列很忙, 需要向其它可借出缓冲区的队列借用相应的借用缓冲区。 步骤 S104: 若当前 QOS出队列的内存空间被占用长度大于第二阈值, 则从其它 的内存空间被占用长度小于第一阈值的 QOS出队列中选择一个队列; 其中, 当前 QOS出队列和其它 QOS出队列中均设置有借用缓冲区, 该借用缓冲 区是一个共享缓冲区, 可以在必要时向其它 QOS出队列借出。 步骤 S106: 将选择的 QOS出队列的借用缓冲区借用到当前 QOS出队列的队尾。
通过将选择的 QOS出队列的借用缓冲区借用到当前 QOS出队列的队尾, 可以扩 展当前 QOS出队列的缓存空间, 以便于缓存更多的报文。借用的方式可以由本领域技 术人员根据实际情况灵活设置, 如使用链表方式, 或使用表格记录方式等等, 只要能 够确定提供的借用缓冲区的地址, 以便于存储报文数据即可。 相关技术中, QOS出队列技术方案中存在当部分端口的队列因队列满而导致丢包 时, 其它的 QOS出队列此时可能是空闲或者使用的很少, 从而使得 QOS出队列的队 列资源在整体上没有被充分使用。通过本实施例,采用对所有 QOS出队列都划分出一 个可以共享的队列缓冲区, 当某个 QOS出队列的使用超过第二阈值时,将其它使用队 列长度小于第一阈值的 QOS 出队列中的队列缓冲区借用增加到该队列, 使得该队列 的长度大于原先初始分配的长度, 从而使得当该 QOS出队列中的报文超过该 QOS出 队列初始长度时, 报文仍可以缓存在该 QOS出队列中, 而不会被丢弃, 从而解决了现 有 QOS出队列的队列资源在整体上没有被充分使用的问题,进而达到了充分利用 QOS 出队列整体资源, 提高服务质量的效果。 实施例二 参照图 2, 示出了根据本发明实施例二的一种队列调整方法的步骤流程图。 本实施例中,对所有 QOS出队列都划分出一个可以共享的队列缓冲区,在某个队 列满时, 借用其它的空闲队列来增加该队列的长度, 减少丢包数量, 提供更好的 QOS 服务。 本实施例的队列调整方法包括以下步骤: 步骤 S202: 针对每个端口的每个 QOS出队列, 分别设置最小缓冲归还阀值 (即 第一阈值) 和最大缓冲借用阀值 (即第二阈值)。 步骤 S204: 将所有 QOS出队列中使用的队列长度未超过最小缓冲归还阀值的队 列, 由软件统一管理; 对于已经借用的队列, 记录借用与被借用的关系, 由软件系统 统一管理。 其中,可以采用链表的方式对所有 QOS出队列中使用的队列长度未超过最小缓冲 归还阀值的队列进行统一管理, 也可以采用表格登记的方式进行统一管理, 当然, 本 领域技术人员也可以采用其它适当方式,本发明对此不作限制。通过对所有 QOS出队 列中使用的队列长度未超过最小缓冲归还阀值的队列的统一管理,可以在有 QOS出队
列需要借用其它队列的缓存空间时, 方便快捷地获取和提供可借出缓存空间的队列, 并且, 也便于实时了解和获取可借出缓存空间的队列的情况, 提高系统效率。 对于已经借用的队列, 借用缓存空间的队列和被借用缓存空间的队列之间存在一 一对应的关系, 及时记录该关系, 一方面可以及时了解队列中借用和被借用的情况, 另一方面, 在借用缓存空间的队列不再需要借用时, 可以及时有效地归还被借用的借 用缓冲区给相应的队列。 每个 QOS出队列可供借用的长度可以为大于最大缓冲借用阀值的剩余队列。优选 地, 每个 QOS出队列可供借用的长度可以由两部分组成, 一部分是大于最大缓冲借用 阀值的剩余队列, 另一部分是最大缓冲借用阀值与最小缓冲归还阀值的差值乘以可以 配置的百分比的空间长度。 步骤 S206: 根据当前 QOS出队列的内存空间被占用长度, 进行相应的队列调整 处理。 具体地, 当队列的使用超过最小缓冲归还阀值, 将该队列的借用缓冲区设置为不可借用。 如果该队列的借用缓冲区已经借出, 则需要收回, 可从系统中重新分配一个队列的借 用缓冲区给借用者使用。 当队列的使用由最小缓冲归还阀值变为超过最大缓冲借用阀值, 从空闲缓冲队列 列表中找出一个借用, 增加该队列的长度。 空闲缓冲队列的查找优先选用借用队列所 在端口的其它队列, 如果其它队列不能借出或者已经借出, 再选用其它端口的队列借 用。 当队列的使用由超过最大缓冲借用阀值变为小于最大缓冲借用阀值, 归还借用的 借用缓冲区。 当队列的使用由超过最小缓冲归还阀值变为小于最小缓冲归还阀值, 将该队列的 借用缓冲区设置为可借用。 通过本实施例提供的具有动态调整队列大小的方案, 针对每个端口的每个 QOS 出队列, 分别设置最小缓冲归还阀值 (本文中也简称为最小阀值) 和最大缓冲借用阀 值(本文中也简称为最大阀值), 并将超出最大阀值的那部分队列以及最小阀值和最大 阀值之间的部分队列共同设置为可以借用的队列(本文中也称之为缓冲队列), 当端口 的使用队列长度超过最小阀值, 则上报软件指明该队列不能借出缓冲队列 (默认所有
端口都是可以借出缓冲队列的)。当队列长度超过最大阀值, 软件可以检测还有哪些端 口的缓冲队列可以借用, 查到之后将空闲的缓冲队列借用到繁忙队列上, 增加该队列 的长度, 减少空闲队列长度, 一旦空闲队列的开始繁忙起来了, 即使用队列长度超过 最小阀值, 借用的缓冲要予以归还。 为了防止缓冲震荡, 每个队列可以设定了一个高 位的最大阀值, 一个低位的最小阀值, 使用队列长度由最小阀值增加到最大阀值时, 触发高位, 使用队列长度由最大阀值减小到最小阀值时, 触发低位。 与现有技术相比较, 本实施例通过共享队列的部分资源, 动态调整队列大小, 使 队列资源利用更充分。 当某个队列的使用超过最大阀值时, 将其它使用队列长度小于 最小阀值的缓冲队列增加到该队列, 使得该队列的长度大于原先初始分配的长度, 当 队列中的报文超过队列初始长度时, 报文仍可以缓存在该队列中, 而不会被丢弃, 从 而提高了服务质量。 实施例三 本实施例中, 以一个 QOS出队列的队列使用动态变化过程中的队列调整为例, 详 细说明本发明 QOS队列调整方法。 首先, 参照图 3, 示出了根据本发明实施例三的一种队列调整方法中的队列初始 分配图。 如图 3所示, 本实施例将每个 QOS出队列划分为三部分: 小于最小阀值(即 第一阈值) 的部分(图中竖条纹部分)、 最小阀值与最大阀值(即第二阈值)之间部分 (图中斜条纹部分) 和大于最大阀值部分 (图中斜条纹部分后面的剩余队列, 即十字 条纹部分)。 其中, 当队列的内存空间被占用长度位于小于最小阀值部分时, 即, 当队列的使 用小于最小阀值时, 将队列设置为可借用队列, 允许向其它 QOS出队列借出其缓存; 当队列的内存空间被占用长度位于最小阀值与最大阀值之间部分时, 即, 当队列的使 用介于最小阀值和最大阀值之间时, 该队列设置为不可借用队列, 此时, 拒绝向其它 QOS出队列借出其缓存;当队列的内存空间被占用长度位于大于最大阀值部分时,即, 当队列的使用大于最大阀值后, 说明该队列的使用快要达到队列的最大值, 因此需要 从别的队列借用, 来增加该队列可供使用的长度。 参照图 4, 示出了根据本发明实施例三的一种队列调整方法中的缓冲队列管理图。 如图 4所示, 本实施例在系统初始阶段, 将所有空闲队列 (即队列内存空间占用长度 小于最小阀值的队列) 都管理起来, 连成一个可供借用的链表, 该链表只记录该队列 使用小于最小阀值的队列。 同时, 将所有借用队列和被借用队列连成一个链表, 记录 链表的借用情况和被借用情况, 便于借用后归还。
参照图 5, 示出了根据本发明实施例三的一种队列调整方法中的队列可借用长度 图。 如图 5所示, 本实施例设计可供借用的队列长度的计算, 获取可供借用的队列。 队列可供借用的长度由两部分组成, 一部分是大于最大阀值的剩余队列, 另一部分是 最大阀值与最小阀值差值乘以可以配置的百分比, 该百分比可以配置, 根据实际使用 情况进行调节。可供借用的长度的位置从队列的尾部向前分配, 如图中的横条纹部分。 具体地, 可借用队列长度=队列长度-最大阀值 + (最大阀值 -最小阀值) *N%, 其 中, N的大小为 0-100之间的整数, 可以根据实际需要灵活配置。 参照图 6, 示出了根据本发明实施例三的一种队列调整方法中的缓冲队列回收图。 如图 6所示, 当队列 (例如端口 1的队列 7) 使用的内存空间由小于最小阀值增 加到大于最小阀值时, 需要将该队列设置为不可借用队列。 如果该队列没有被其它队 列借用, 即该队列在可供借用的队列中, 将该队列从可供借用的队列中取出, 即该队 列不能再被借用; 如果该队列已经被其它队列所借用, 则强行收回该队列借出的队列, 从已借用队列表中删除, 同时, 再为借用该队列的队列从可借用队列中重新分配一个 可借用队列。 具体地, 包括: 步骤 S602: 从可借用队列中, 查找该队列, 如果找到, 说明该队列没有被借用, 将该队列从可借用队列中删除,不再执行后面的步骤;如果没有找到,执行步骤 S604。 步骤 S604: 该队列已经被借用, 从已借用关系表中查找该队列, 找到借用该队列 的借用者, 从借用者收回该借用队列。 步骤 S606: 给借用本队列的借用者从可借用队列中重新借用一个队列, 如果可借 用队列为空, 借用者将借用不到队列。 参照图 7, 示出了根据本发明实施例三的一种队列调整方法中的缓冲队列借用图。 如图 7所示, 当队列 (如图中端口 1的队列 7) 使用的内存空间由小于最大阀值 到超过最大阀值后, 该队列的使用快要超过队列的最大值, 需要借用其它队列来增加 队列的大小, 从可借用队列中查找一个可供借用的队列 (如图中的端口 1的队列 6), 将借用的队列放入当前队列的尾部, 增加队列的长度, 同时减小借用队列的长度。 具体地, 包括:
步骤 S702:从可借用队列中找出一个可供借用的队列(如图中的端口 1的队列 6), 如果找不到可供借用的队列, 不做任何操作, 即下面的步骤不用执行; 如果找到可供 借用的队列, 进行步骤 S704。 步骤 S704: 将借用队列 (如图中的端口 1的队列 6) 从可供借用队列中删除, 防 止其它队列借用。 当然, 在实际操作中, 也可以通过其它方式, 如对该借用队列进行标记的方式, 以区别其是否被借出。 步骤 S706: 将借用队列 (如图中的端口 1的队列 7) 和被借用队列 (如图中的端 口 1的队列 6) 加入到借用队列关系表。 步骤 S708: 将被借用队列 (如图中端口 1的队列 6) 增加到借用队列 (如图中端 口 1的队列 7) 的尾部, 增加队列的长度。 参照图 8, 示出了根据本发明实施例三的一种队列调整方法中的缓冲队列归还图。 如图 8所示, 当队列 (如图中端口 1的队列 7) 使用的内存空间由大于最大阀值 降低到小于最大阀值后, 该队列的长度足够使用, 需要归还已借用的其它队列, 更新 队列借用关系表。 具体地, 包括: 步骤 S802: 检查队列借用关系表, 查找是否有该队列借用其它队列的记录, 如果 有, 执行步骤 S804; 如果没有, 不做任何操作, 即下面的步骤不用执行。 步骤 S804: 将被借用队列 (如图中的端口 1的队列 6) 从借用队列 (如图中的端 口 1的队列 7) 的尾部去掉, 归还给被借用队列。 步骤 S806: 将借用队列关系表中, 借用队列和被借用队列的借用关系删除。 步骤 S808: 将被借用队列(如图中端口 1的队列 6)增加到可供借用队列链表中, 需要借用队列的其它队列可以借用该队列。 参照图 9, 示出了根据本发明实施例三的一种队列调整方法中的缓冲队列借用管 理图。
如图 9所示, 当队列 (如图中端口 1的队列 7) 使用的内存空间由大于最小阀值 降低到小于最小阀值后, 该队列的使用比较空闲, 可设置为可借用队列, 增加到可借 用队列的链表中。 通过本实施例, 采用共享每个 QOS出队列的部分资源, 动态调整队列大小, 使队 列资源利用更充分, 提高了服务质量。 实施例四 参照图 10, 示出了根据本发明实施例四的一种队列调整装置的结构框图。 本实施例的队列调整装置包括: 比较模块 1002, 设置为比较当前 QOS出队列的 内存空间被占用长度与设定的第一阈值和第二阈值的关系, 其中, 第一阈值和第二阈 值均小于当前 QOS 出队列的内存空间长度, 第一阈值小于第二阈值; 第一分配模块 1004, 耦合至比较模块 1002, 设置为当比较模块 1002的比较结果为当前 QOS出队列 的内存空间被占用长度大于第二阈值时, 从其它的内存空间被占用长度小于第一阈值 的 QOS出队列中选择一个队列,其中, 当前 QOS出队列和其它 QOS出队列中均设置 有借用缓冲区; 将选择的 QOS出队列的借用缓冲区借用到当前 QOS出队列的队尾。 优选地, 借用缓冲区的长度为: 借用缓冲区的长度 = QOS出队列长度 一 所述第 二阈值 十 (所述第二阈值 一 所述第一阈值) xN%, 其中, N为 0-100之间的整数。 优选地, 本实施例的队列调整装置还包括: 第二分配模块 1006, 耦合至比较模块 1002, 设置为若比较模块 1002的比较结果为当前 QOS出队列的内存空间被占用长度 小于第一阈值, 则设置当前 QOS出队列为可借用队列, 允许向其它 QOS出队列供出 其借用缓冲区; 和 /或, 第三分配模块 1008, 耦合至比较模块 1002, 设置为若比较模 块 1002的比较结果为当前 QOS出队列的内存空间被占用长度小于或等于第二阈值且 大于或等于第一阈值, 则当前 QOS出队列判断其借用缓冲区是否借出; 若是, 则收回 其借用缓冲区, 并为借用其借用缓冲区的 QOS出队列重新分配借用缓冲区; 若否, 则 设置当前 QOS出队列为不可借用队列, 拒绝向其它 QOS队列借出其借用缓冲区。 优选地, 本实施例的队列调整装置还包括: 归还模块, 耦合至比较模块 1002, 设 置为当当前 QOS 出队列的内存空间被占用长度由大于第二阈值减小到小于或等于第 二阈值, 则当前 QOS出队列归还借用的借用缓冲区。 优选地, 本实施例的队列调整装置还包括: 保存模块, 设置为系统保存当前 QOS 出队列和其借用的借用缓冲区所属的 QOS出队列的对应关系, 并实时更新。
本实施例实现的方法可以参照前述相应方法实施例的相关描述, 并具有上述实施 例的有益效果, 在此不再赘述。 从以上的描述中,可以看出,本发明提供的 QOS出队列在分布式交换机上的队列 调整技术方案,根据 QOS出队列的队列使用情况进行动态的调整,通过共享队列的部 分资源, 使队列资源利用更充分。 尤其当某个队列的使用超过最大阀值时, 将其它使 用队列长度小于最小阀值的缓冲队列增加到该队列, 使得该队列的长度大于原先初始 分配的长度, 当队列中的报文超过队列初始长度时, 报文仍可以缓存在该队列中, 而 不会被丢弃, 从而提高了服务质量。 显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可以用通用 的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布在多个计算装置所 组成的网络上, 可选地, 它们可以用计算装置可执行的程序代码来实现, 从而, 可以 将它们存储在存储装置中由计算装置来执行, 并且在某些情况下, 可以以不同于此处 的顺序执行所示出或描述的步骤, 或者将它们分别制作成各个集成电路模块, 或者将 它们中的多个模块或步骤制作成单个集成电路模块来实现。 这样, 本发明不限制于任 何特定的硬件和软件结合。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本领域的技 术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和原则之内, 所作的 任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。
Claims
1. 一种队列调整方法, 包括:
比较当前服务质量 QOS 出队列的内存空间被占用长度与设定的第一阈值 和第二阈值的关系, 其中, 所述第一阈值和所述第二阈值均小于所述当前 QOS 出队列的内存空间长度, 所述第一阈值小于所述第二阈值;
若所述当前 QOS出队列的内存空间被占用长度大于所述第二阈值,则从其 它的内存空间被占用长度小于所述第一阈值的 QOS出队列中选择一个队列,其 中, 所述当前 QOS出队列和其它 QOS出队列中均设置有借用缓冲区;
将选择的所述 QOS出队列的所述借用缓冲区借用到所述当前 QOS出队列 的队尾。
2. 根据权利要求 1所述的方法, 其中, 所述借用缓冲区的长度为:
所述借用缓冲区的长度=0(½ 出队列长度 一 所述第二阈值 + (所述第 二阈值 一 所述第一阈值) xN%, 其中, N为 0-100之间的整数。
3. 根据权利要求 1或 2所述的方法, 还包括:
若所述当前 QOS出队列的内存空间被占用长度小于所述第一阈值,则设置 所述当前 QOS出队列为可借用队列, 允许向其它 QOS出队列供出其借用缓冲 区。
4. 根据权利要求 1或 2所述的方法, 还包括:
若所述当前 QOS 出队列的内存空间被占用长度小于或等于所述第二阈值 且大于或等于所述第一阈值,则所述当前 QOS出队列判断其借用缓冲区是否借 出; 若是, 则收回其借用缓冲区, 并为借用其借用缓冲区的 QOS出队列重新分 配借用缓冲区; 若否, 则设置所述当前 QOS出队列为不可借用队列, 拒绝向所 述其它 QOS队列借出其借用缓冲区。
5. 根据权利要求 1所述的方法, 还包括:
当所述当前 QOS 出队列的内存空间被占用长度由大于所述第二阈值减小 到小于或等于所述第二阈值,则所述当前 QOS出队列归还借用的所述借用缓冲 区。
根据权利要求 1所述的方法, 还包括:
系统保存所述当前 QOS出队列和其借用的所述借用缓冲区所属的 QOS出 队列的对应关系, 并实时更新。 一种队列调整装置, 包括:
比较模块,设置为比较当前服务质量 QOS出队列的内存空间被占用长度与 设定的第一阈值和第二阈值的关系, 其中, 所述第一阈值和所述第二阈值均小 于所述当前 QOS出队列的内存空间长度, 所述第一阈值小于所述第二阈值; 第一分配模块,设置为当所述比较模块的比较结果为所述当前 QOS出队列 的内存空间被占用长度大于所述第二阈值时, 从其它的内存空间被占用长度小 于所述第一阈值的 QOS出队列中选择一个队列, 其中, 所述当前 QOS出队列 和其它 QOS出队列中均设置有借用缓冲区; 将选择的所述 QOS出队列的所述 借用缓冲区借用到所述当前 QOS出队列的队尾。 根据权利要求 7所述的装置, 其中, 所述借用缓冲区的长度为:
所述借用缓冲区的长度= 0(½出队列长度 一 所述第二阈值 + (所述第 二阈值 一 所述第一阈值) xN%, 其中, Ν为 0-100之间的整数。 根据权利要求 7或 8所述的装置, 还包括:
第二分配模块,设置为若所述比较模块的比较结果为所述当前 QOS出队列 的内存空间被占用长度小于所述第一阈值,则设置所述当前 QOS出队列为可借 用队列, 允许向其它 QOS出队列供出其借用缓冲区;
和 /或,
第三分配模块,设置为若所述比较模块的比较结果为所述当前 QOS出队列 的内存空间被占用长度小于或等于所述第二阈值且大于或等于所述第一阈值, 则所述当前 QOS出队列判断其借用缓冲区是否借出;若是,则收回其借用缓冲 区, 并为借用其借用缓冲区的 QOS出队列重新分配借用缓冲区; 若否, 则设置 所述当前 QOS出队列为不可借用队列, 拒绝向所述其它 QOS队列借出其借用 缓冲区。 根据权利要求 7所述的装置, 还包括:
归还模块,设置为当所述当前 QOS出队列的内存空间被占用长度由大于所 述第二阈值减小到小于或等于所述第二阈值,则所述当前 QOS出队列归还借用 的所述借用缓冲区。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110240078.7 | 2011-08-19 | ||
CN201110240078.7A CN102263701B (zh) | 2011-08-19 | 2011-08-19 | 队列调整方法及装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2013026324A1 true WO2013026324A1 (zh) | 2013-02-28 |
Family
ID=45010167
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2012/077762 WO2013026324A1 (zh) | 2011-08-19 | 2012-06-28 | 队列调整方法及装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN102263701B (zh) |
WO (1) | WO2013026324A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
RU2641250C2 (ru) * | 2012-11-19 | 2018-01-16 | ЗэтТиИ Корпорейшн | Устройство и способ управления очередью |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102263701B (zh) * | 2011-08-19 | 2017-03-22 | 中兴通讯股份有限公司 | 队列调整方法及装置 |
CN103248583B (zh) * | 2012-02-09 | 2016-04-13 | 迈普通信技术股份有限公司 | 一种基于有限深度的先进先出报文队列管理方法及装置 |
CN104022971B (zh) * | 2014-05-26 | 2018-04-06 | 上海斐讯数据通信技术有限公司 | 优化交换机报文上送方法及其系统 |
CN107346265B (zh) * | 2016-05-05 | 2021-05-18 | 北京忆恒创源科技有限公司 | 实现QoS的方法与装置 |
CN106970827A (zh) * | 2017-03-27 | 2017-07-21 | 联想(北京)有限公司 | 信息处理方法、信息处理装置、电子设备 |
CN109947798A (zh) * | 2017-09-18 | 2019-06-28 | 中国移动通信有限公司研究院 | 一种流事件的处理方法及装置 |
CN108040019B (zh) * | 2017-12-21 | 2021-12-24 | 杭州迪普科技股份有限公司 | 报文转发的方法及装置 |
CN109495401B (zh) * | 2018-12-13 | 2022-06-24 | 迈普通信技术股份有限公司 | 缓存的管理方法及装置 |
CN114995748A (zh) * | 2022-05-09 | 2022-09-02 | 阿里巴巴(中国)有限公司 | 请求处理方法及装置 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101094181A (zh) * | 2007-07-25 | 2007-12-26 | 华为技术有限公司 | 报文入队和出队调度的装置及方法 |
CN101141399A (zh) * | 2007-10-16 | 2008-03-12 | 武汉烽火网络有限责任公司 | 共享存储交换支持组播的双门限端口队列控制方法 |
CN101521624A (zh) * | 2008-02-26 | 2009-09-02 | 大唐移动通信设备有限公司 | Iub口下行带宽分配方法与装置 |
US20100008228A1 (en) * | 2008-07-14 | 2010-01-14 | The Mitre Corporation | Network Cross-Domain Precedence and Service Quality Conflict Mitigation |
CN102263701A (zh) * | 2011-08-19 | 2011-11-30 | 中兴通讯股份有限公司 | 队列调整方法及装置 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100359489C (zh) * | 2004-07-13 | 2008-01-02 | 中兴通讯股份有限公司 | 一种嵌入式实时操作系统中内存分配的方法 |
CN101800699A (zh) * | 2010-02-09 | 2010-08-11 | 上海华为技术有限公司 | 一种丢弃报文的方法及装置 |
-
2011
- 2011-08-19 CN CN201110240078.7A patent/CN102263701B/zh active Active
-
2012
- 2012-06-28 WO PCT/CN2012/077762 patent/WO2013026324A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101094181A (zh) * | 2007-07-25 | 2007-12-26 | 华为技术有限公司 | 报文入队和出队调度的装置及方法 |
CN101141399A (zh) * | 2007-10-16 | 2008-03-12 | 武汉烽火网络有限责任公司 | 共享存储交换支持组播的双门限端口队列控制方法 |
CN101521624A (zh) * | 2008-02-26 | 2009-09-02 | 大唐移动通信设备有限公司 | Iub口下行带宽分配方法与装置 |
US20100008228A1 (en) * | 2008-07-14 | 2010-01-14 | The Mitre Corporation | Network Cross-Domain Precedence and Service Quality Conflict Mitigation |
CN102263701A (zh) * | 2011-08-19 | 2011-11-30 | 中兴通讯股份有限公司 | 队列调整方法及装置 |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
RU2641250C2 (ru) * | 2012-11-19 | 2018-01-16 | ЗэтТиИ Корпорейшн | Устройство и способ управления очередью |
Also Published As
Publication number | Publication date |
---|---|
CN102263701B (zh) | 2017-03-22 |
CN102263701A (zh) | 2011-11-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2013026324A1 (zh) | 队列调整方法及装置 | |
US10341260B2 (en) | Early queueing network device | |
TWI477127B (zh) | 用於排程封包傳輸的電腦實施方法、機器可讀媒體和客戶端裝置 | |
CN108476177B (zh) | 支持用于处理功能可扩展性的数据平面的装置及相关方法 | |
US9225668B2 (en) | Priority driven channel allocation for packet transferring | |
US20230145162A1 (en) | Queue protection using a shared global memory reserve | |
US10419370B2 (en) | Hierarchical packet buffer system | |
CN105991470B (zh) | 以太网设备缓存报文的方法及装置 | |
CN113037640A (zh) | 数据转发方法、数据缓存方法、装置和相关设备 | |
JP7487316B2 (ja) | サービスレベル構成方法および装置 | |
EP2670085A1 (en) | System for performing Data Cut-Through | |
CN111756586B (zh) | 一种数据中心网络中基于优先级队列的公平带宽分配方法、交换机及可读存储介质 | |
US20140269298A1 (en) | Network Processor and Method for Processing Packet Switching in Network Switching System | |
CN106294191B (zh) | 处理表的方法、访问表的方法和装置 | |
EP3758316A1 (en) | Output queueing with scalability for segmented traffic in a high-radix switch | |
US11936570B1 (en) | Modular switch and a method for scaling switches | |
Hu et al. | Dynamic queuing sharing mechanism for per-flow quality of service control | |
WO2018090573A1 (zh) | 缓存空间的管理方法和装置、电子设备和存储介质 | |
Escudero-Sahuquillo et al. | FBICM: Efficient congestion management for high-performance networks using distributed deterministic routing | |
CN110430146B (zh) | 基于CrossBar交换的信元重组方法及交换结构 | |
Yeh et al. | VIP: Joint traffic engineering and caching in Named Data Networks | |
EP3806411A1 (en) | Message control method and node device | |
WO2021026740A1 (zh) | 流量均衡方法、网络设备及电子设备 | |
CN108781170A (zh) | 一种配置装置及方法 | |
US20130247071A1 (en) | System and method for efficient shared buffer management |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 12825103 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 12825103 Country of ref document: EP Kind code of ref document: A1 |