WO2016000326A1 - Method and apparatus for scheduling user queue and computer storage medium - Google Patents

Method and apparatus for scheduling user queue and computer storage medium Download PDF

Info

Publication number
WO2016000326A1
WO2016000326A1 PCT/CN2014/087134 CN2014087134W WO2016000326A1 WO 2016000326 A1 WO2016000326 A1 WO 2016000326A1 CN 2014087134 W CN2014087134 W CN 2014087134W WO 2016000326 A1 WO2016000326 A1 WO 2016000326A1
Authority
WO
WIPO (PCT)
Prior art keywords
scheduler
scheduling
user queue
user
queue
Prior art date
Application number
PCT/CN2014/087134
Other languages
French (fr)
Chinese (zh)
Inventor
李娟�
Original Assignee
深圳市中兴微电子技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市中兴微电子技术有限公司 filed Critical 深圳市中兴微电子技术有限公司
Publication of WO2016000326A1 publication Critical patent/WO2016000326A1/en

Links

Images

Definitions

  • the present invention relates to data communication technologies, and in particular, to a method, an apparatus, and a computer storage medium for user queue scheduling.
  • QOS Quality of Service
  • scheduling and shaping cooperate to satisfy QOS, scheduling ensures minimum bandwidth, and shaping limits the maximum bandwidth.
  • the different input service flows of the switching node are respectively scheduled and served according to the specified service rules, so that all the input service flows can share the output link bandwidth of the switching node in a predetermined manner, even if different services are used.
  • Different users and different priorities have agreed opportunities to get the corresponding services and use the public network. But when the network When it is loose, I hope that the users who need it can make full use of the network resources and maximize the benefits. At this time, I hope to give the users who are currently using the maximum traffic and enjoy better services, and the general implementation will be There is shaping to limit the traffic of each queue.
  • the embodiments of the present invention mainly provide a method, a device, and a computer storage medium for scheduling user queues.
  • An embodiment of the present invention provides a method for scheduling a user queue, where the method includes:
  • the first scheduler is connected to the second scheduler and the third scheduler, and the user queue is simultaneously connected to the second scheduler and the third scheduler;
  • the first scheduler determines whether the second scheduler allows scheduling, and when the second scheduler allows scheduling, scheduling the second scheduler, so that the second scheduler schedules the connected user queue through the corresponding shaper, in the second After the user queues connected to the scheduler are all scheduled, the first scheduler determines that the third scheduler allows scheduling, and schedules the third scheduler, so that the third scheduler schedules the hooks through the corresponding shaper.
  • the first scheduler determines that the third scheduler allows scheduling, and schedules the third scheduler, so that the third scheduler schedules the attached user queue through the corresponding shaper.
  • the first scheduler is connected to the second scheduler and the third scheduler, and the user queue is simultaneously connected to the second scheduler and the third scheduler, including:
  • the scheduling algorithm for configuring the second scheduler and the third scheduler to schedule the user queue is SP, or deficit weighted polling (DWRR), or DWRR+SP scheduling.
  • the first scheduler is connected to the second scheduler and the third scheduler, and the user queue is simultaneously connected to the second scheduler and the third scheduler, and further includes:
  • the first scheduler is connected to the second scheduler and the third scheduler, and the user queue is simultaneously connected to the second scheduler and the third scheduler, and further includes: setting corresponding to each user queue A deficit counter, the shaper determines a queue of users allowed to send packets based on the deficit counter.
  • the second scheduler is configured to provide a commitment rate to each user queue
  • the third scheduler is configured to provide an additional rate to each user queue
  • the determining, by the first scheduler, whether the second scheduler allows scheduling includes: the first scheduler determines, according to whether there is a user queue that needs to send a data packet and the current configuration rate is lower than a committed rate of the second scheduler. Whether the scheduler allows scheduling.
  • the first scheduler determines that the third scheduler allows the scheduling to include: the first scheduler sends the data packet according to the need and the current configuration rate is lower than the third scheduler's additional rate and the second scheduler's committed rate. The sum of the user queues determines that the third scheduler allows scheduling.
  • the embodiment of the invention further provides a device for scheduling a user queue, the device comprising: a first scheduler, a second scheduler, a third scheduler and one or more shapers; wherein
  • the first scheduler is connected to the second scheduler and the third scheduler, and the user queue is simultaneously connected to the second scheduler and the third scheduler;
  • the first scheduler is configured to determine whether the second scheduler allows scheduling, and when the second scheduler allows scheduling, scheduling the second scheduler, after the user queues connected under the second scheduler are all scheduled, determining The third scheduler allows scheduling and scheduling the third scheduler; when the second scheduler does not allow scheduling, determining that the third scheduler allows scheduling, and scheduling the third scheduler;
  • the second scheduler is configured to schedule the connected user queue by using a corresponding shaper, and notify the first scheduler after the connected user queues are all scheduled;
  • the third scheduler is configured to schedule a connected user queue by using a corresponding shaper
  • a shaper that determines the queue of users that send packets.
  • the second scheduler is configured to provide a commitment rate to each user queue
  • the third scheduler is configured to provide an additional rate to each user queue
  • the scheduling algorithm of the first scheduler scheduling the second scheduler and the third scheduler is an SP schedule, where scheduling the second scheduler has a higher priority than scheduling the third scheduler
  • the scheduling algorithm of the second scheduler and the third scheduler scheduling user queue is SP, or DWRR, or DWRR+SP scheduling.
  • the computer storage medium provided by the embodiment of the present invention stores a computer program for executing the method for scheduling the user queue.
  • the embodiment of the invention provides a method and a device for scheduling a user queue.
  • the first scheduler is connected to the second scheduler and the third scheduler, and the user queue is simultaneously connected to the second scheduler and the third scheduler.
  • a scheduler determines whether the second scheduler allows scheduling, and when the second scheduler allows scheduling, scheduling a second scheduler, the second scheduler scheduling the attached user queue by using a corresponding shaper, in the second scheduler
  • the first scheduler determines that the third scheduler allows scheduling, and schedules a third scheduler, and the third scheduler schedules the connected user queues by using the corresponding shaper;
  • the first scheduler determines that the third scheduler allows scheduling, and schedules a third scheduler, and the third scheduler schedules the connected user queue through the corresponding shaper; thus, the network load
  • it is relatively small for example, the device processing capacity is 1G, but the input traffic is less than 1G
  • the maximum bandwidth occupied by each user queue is limited
  • FIG. 1 is a schematic diagram of a single bucket scheduling in the prior art
  • FIG. 2 is a schematic diagram of dual bucket scheduling adopted by an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of a method for implementing user queue scheduling according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of an apparatus for implementing user queue scheduling according to an embodiment of the present invention.
  • Single-bucket scheduling is to configure only one rate for a user queue. The part of the user queue that is larger than the configured rate will not be scheduled. If the configured rate is smaller than the configured rate, it can be scheduled to implement the corresponding QOS. Dual-bucket scheduling configures two rates for the user queue, namely, CIR (Committed Information Rate) and Extra Rate (EIR).
  • CIR Committed Information Rate
  • EIR Extra Rate
  • the CIR is the rate that must be guaranteed regardless of whether the current network is congested.
  • the EIR is the extra rate that is allowed to be scheduled when the current network is not congested.
  • the existing single-bucket scheduling is shown in Figure 1.
  • the user queue is attached to the PQ scheduler, and the PQ scheduler is attached to the time slot (T-CONT) scheduler.
  • T-CONT time slot
  • Eight user queues are attached to one PQ scheduler.
  • Scheduler A and Scheduler B are attached to the T-CONT scheduler.
  • a queue is only attached to a scheduler and is limited by only one rate. This is called single-bucket scheduling.
  • the scheduling rate of the user queue 0 under the scheduler A is only one. If the rate of the user queue 0 is small and does not reach the limited rate, the scheduling can be continued. Once the limited speed is reached, the scheduling is limited and the scheduling cannot be continued. Even if the entire network is not congested and other user queues do not have a packet request, the user queue 0 is strictly limited and cannot exceed the limit rate.
  • the dual bucket scheduling adopted by the embodiment of the present invention is shown in FIG. 2.
  • the CIR scheduler is referred to as a C scheduler
  • the EIR scheduler is an E scheduler.
  • Each user queue is not only attached to the C scheduler, but also to the E scheduler.
  • a user queue is limited by two rates: committed rate and extra rate. First, taking user queue 0 as an example, user queue 0 must get the committed rate. If the network is congested and other user queues also require a large amount of traffic, user queue 0 uses the committed rate. If the network is not congested and other user queues have less traffic demand, user queue 0 can get extra rate and enjoy faster. Rate, get better extra services. It is very flexible without affecting other users and getting better service.
  • the scheduling model in FIG. 2 uses a DWRR scheduling algorithm and shaping to implement QOS, wherein the funnel pattern represents a shaper.
  • the first scheduler is connected to the second scheduler and the third scheduler, and the user queue is simultaneously connected to the second scheduler and the third scheduler, and the first scheduler determines whether the second scheduler allows Scheduling, when the second scheduler allows scheduling, scheduling the second scheduler, the second scheduler scheduling the connected user queue by using the corresponding shaper, after the user queues connected under the second scheduler are all scheduled
  • the first scheduler determines that the third scheduler allows scheduling, and schedules a third scheduler, where the third scheduler schedules the attached user queue by using a corresponding shaper; when the second scheduler does not allow scheduling, the first scheduler
  • the scheduler determines that the third scheduler allows scheduling, and schedules a third scheduler, which schedules the attached user queue through the corresponding shaper.
  • the first scheduler may be a T-CONT scheduler
  • the second scheduler may be a CIR scheduler
  • the third scheduler may be an EIR scheduler.
  • the embodiment of the invention implements a method for scheduling a user queue. As shown in FIG. 3, the method includes the following steps:
  • Step 301 The first scheduler is connected to the second scheduler and the third scheduler, and the user queue is simultaneously connected to the second scheduler and the third scheduler.
  • the scheduling manners of the first scheduler, the second scheduler, and the third scheduler are first configured, specifically: configuring the first scheduler to schedule the second scheduler and the third scheduler to be strict. Priority (SP, Strict-Priority) scheduling; wherein scheduling the second scheduler has a higher priority than scheduling the third scheduler, thereby ensuring that the second scheduling is scheduled first And scheduling the third scheduler; configuring the second scheduler and the third scheduler to schedule the user queues as SP, or DWRR, or DWRR+SP.
  • SP Priority
  • Strict-Priority scheduling scheduling the second scheduler has a higher priority than scheduling the third scheduler, thereby ensuring that the second scheduling is scheduled first
  • scheduling the third scheduler configuring the second scheduler and the third scheduler to schedule the user queues as SP, or DWRR, or DWRR+SP.
  • the shaping bucket filling rate and the leaking bucket capacity of the shaper corresponding to the first scheduler, the second scheduler, and the third scheduler are further configured; wherein the fill rate size indicates the allowed average traffic,
  • the leaky bucket capacity size indicates the allowed burst traffic.
  • the shaper's leaky bucket fill rate and leaky bucket capacity can be configured according to the number of bytes represented by each shaped token and the rate that needs to be limited.
  • the leaky bucket adopts a fixed-period filling technique, and adds a fixed number of shaping tokens to the leaky bucket according to the interval period.
  • the interval period and the number of bytes added each time the shaping token is added may be configured by the user. Different fill rates can be achieved by configuring different interval periods and padding bytes.
  • the formula is as follows:
  • the step further includes: setting a corresponding deficit counter for each user queue, and the shaper determines a user queue that allows the data packet to be sent according to the deficit counter, and the deficit counter is initialized to a fixed value. Specifically, when an active user queue is scheduled, if the corresponding deficit counter is less than 0, the service quantum of the user queue and the deficit counter are added, and the accumulated result is stored in the deficit counter, and the current scheduling is skipped; If the corresponding deficit counter is greater than 0, it is determined whether the user queue satisfies the allowable outbound condition, and when satisfied, the user queue is allowed to send a data packet, the deficit counter minus the packet length of the data packet, and the corresponding shaping token is also To reduce the amount.
  • the allowed outbound condition includes: a, the user queue is in an active state, that is, there is a packet to be scheduled and the shaping condition is satisfied; b, the user queue has sufficient credit.
  • Step 302 The first scheduler determines whether the second scheduler allows scheduling, when the second scheduler allows scheduling, step 303 is performed, and when the second scheduler does not allow scheduling, step 304 is performed;
  • the first scheduler determines, according to whether there is a user queue that needs to send a data packet and the current configuration rate is lower than the committed rate of the second scheduler, whether the second scheduler allows scheduling, and if yes, determines that the second scheduler allows scheduling. If not, it is determined that the second scheduler does not allow scheduling.
  • Step 303 scheduling the second scheduler, the second scheduler scheduling the connected user queue through the corresponding shaper, after the second queue is connected to the user queue is scheduled, step 302 is performed;
  • Step 304 The first scheduler determines whether the third scheduler allows scheduling. When allowed, step 305 is performed. When not allowed, the process ends.
  • the first scheduler determines, according to whether there is a user queue that needs to send a data packet and the current configuration rate is lower than a sum of the additional rate of the third scheduler and the committed rate of the second scheduler, whether the third scheduler allows scheduling, If so, it is determined that the third scheduler allows scheduling, and if not, it is determined that the third scheduler does not allow scheduling.
  • Step 305 The third scheduler is scheduled, and the third scheduler schedules the connected user queue by using a corresponding shaper. After the third scheduler schedules the process, step 302 is performed.
  • an embodiment of the present invention further provides a device for scheduling a user queue.
  • the device includes: a first scheduler 41, a second scheduler 42, a third scheduler 43, and one or more shapings. 44; wherein
  • the first scheduler 41 is connected to the second scheduler 42 and the third scheduler 43, and the user queue is simultaneously attached to the second scheduler 42 and the third scheduler 43;
  • the first scheduler 41 determines whether the second scheduler 42 allows scheduling, and when the second scheduler 42 allows scheduling, schedules the second scheduler 42 after the user queues attached to the second scheduler 42 are scheduled. Determining that the third scheduler 43 allows scheduling, and scheduling the third scheduler 43; when the second scheduler 42 does not allow scheduling, determining that the third scheduler 43 allows scheduling, and scheduling the third scheduler 43;
  • the second scheduler 42 schedules the connected user queue through the corresponding shaper 44, and after the hooked user queues are all scheduled, notify the first scheduler 41;
  • the third scheduler 43 schedules the connected user queue through the corresponding shaper 44;
  • a shaper 44 is configured to determine a user queue for transmitting data packets.
  • the first scheduler 41 is a T-CONT scheduler
  • the second scheduler 42 is a CIR scheduler, and is configured to provide a commitment rate to each user queue
  • the third scheduler 43 is an EIR scheduler. Used to provide additional rates to individual user queues.
  • the first scheduler 41 schedules the scheduling algorithms of the second scheduler 42 and the third scheduler 43 to be SP scheduling, wherein the scheduling second scheduler 42 has a higher priority than the scheduling third scheduler 43. Priority, in order to ensure that the second scheduler 42 is scheduled first, and then the third scheduler 43 is scheduled; the scheduling algorithm of the second scheduler and the third scheduler scheduling the user queue is SP, or DWRR, or DWRR+ SP.
  • the shaper 44 is specifically configured to determine a user queue that is allowed to send a data packet according to a deficit counter corresponding to each user queue.
  • the first scheduler 41 determines whether the second scheduler 42 allows scheduling according to whether there is a user queue that needs to send a data packet and the current configuration rate is lower than the committed rate of the second scheduler 42.
  • the first scheduler 41 determines the third scheduler according to a user queue that needs to send a data packet and the current configuration rate is lower than the sum of the additional rate of the third scheduler 43 and the committed rate of the second scheduler 42. 43 allows scheduling.
  • the first scheduler, the second scheduler, the third scheduler, and the one or more shapers may be configured by a central processing unit (CPU), or a digital signal processor (DSP), or a programmable gate.
  • Array FPGA, Field-Programmable Gate Array
  • the embodiment of the present invention uses dual-bucket scheduling to limit the maximum bandwidth occupied by each user queue by scheduling and shaping each user queue when the network load is relatively small, and when the network load is large, Through scheduling, the minimum bandwidth occupied by each user queue can be guaranteed.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative
  • the division of the unit is only a logical function division, and the actual implementation may have another division manner, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be Ignore, or not execute.
  • the coupling, or direct coupling, or communication connection of the components shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical, mechanical or other forms. of.
  • the units described above as separate components may or may not be physically separated, and the components displayed as the unit may or may not be physical units, that is, may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may be separately used as one unit, or two or more units may be integrated into one unit; the above integration
  • the unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed.
  • the foregoing storage device includes the following steps: the foregoing storage medium includes: a mobile storage device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
  • ROM read-only memory
  • RAM random access memory
  • magnetic disk or an optical disk.
  • optical disk A medium that can store program code.
  • an embodiment of the present invention further provides a computer storage medium, wherein a computer program is stored, and the computer program is used to execute a method for user queue scheduling according to an embodiment of the present invention.
  • the invention discloses a method and a device for scheduling a user queue and a computer storage medium.
  • the first scheduler can be connected to the second scheduler and the third scheduler, and the user queue is simultaneously connected to the second scheduler and the third scheduler.
  • the second scheduler is scheduled to schedule the connected user queue through the corresponding shaper
  • the third schedule is scheduled after the user queues attached to the second scheduler are all scheduled or when the second scheduler does not allow scheduling.
  • a user queue is limited by two rates.
  • the maximum bandwidth occupied by each user queue is limited by scheduling and shaping the user queues.
  • the minimum bandwidth occupied by each user queue can be ensured by scheduling.

Abstract

Disclosed are a method and apparatus for scheduling a user queue, wherein the method comprises: a first scheduler is articulated to a second scheduler and a third scheduler, and a user queue is simultaneously articulated to the second scheduler and the third scheduler; the first scheduler judges whether the second scheduler allows scheduling, and schedules the second scheduler when the second scheduler allows scheduling, so that the second scheduler schedules the articulated user queue via a corresponding shaper; after the user queue articulated under the second scheduler is completely scheduled, the first scheduler determines that the third scheduler allows scheduling, and schedules the third scheduler, so that the third scheduler schedules the articulated user queue via a corresponding shaper; and when the second scheduler does not allow scheduling, the first scheduler determines that the third scheduler allows scheduling, and schedules the third scheduler, so that the third scheduler schedules the articulated user queue via a corresponding shaper.

Description

一种用户队列调度的方法、装置及计算机存储介质Method, device and computer storage medium for user queue scheduling 技术领域Technical field
本发明涉及数据通信技术,尤其涉及一种用户队列调度的方法、装置及计算机存储介质。The present invention relates to data communication technologies, and in particular, to a method, an apparatus, and a computer storage medium for user queue scheduling.
背景技术Background technique
目前,随着网络通信技术的飞速发展和多媒体技术的日益深入及普及,对网络的服务质量、性能以及多样性灵活性提出了更高、更加差异化的要求。为了支持具有不同服务需求的业务或者用户,要求网络能够区分不同的通信,进而为之提供相应的服务,服务质量(QOS,Quality Of Service)技术的出现便致力于解决这个问题。At present, with the rapid development of network communication technology and the deepening and popularization of multimedia technology, higher and more differentiated requirements are put forward for the service quality, performance and diversity flexibility of the network. In order to support services or users with different service requirements, the network is required to distinguish different communications and provide corresponding services. The emergence of Quality of Service (QOS) technology is aimed at solving this problem.
QOS的调度算法有很多种,轮询调度(RR)最简单,即所有用户一个一个轮着来,大家的机会都是均等的,轮询调度适合于所有用户的重要性和允许的流量完全相同的情况。对于更高级更灵活的应用需要更加完美的调度算法来完成,比如:各个用户的权重不一样,或者允许的流量不相同,甚至各个用户内部支持不同优先级的队列。针对各种应用情况,出现了各种各样的调度算法。比如,针对各个用户权重不一样的情况,出现了加权轮询(WRR,Weighted Round Robin)调度算法、还有赤字加权轮询(DWRR,Deficit Weighted Round Robin)、修改的赤字加权轮询(MDRR,Modified Deficit Round Robin)、WRED,以及更加均衡的WFQ调度算法等等。There are many scheduling algorithms for QOS. The most simple polling schedule (RR) is that all users are on a turn-by-turn basis. Everyone has equal opportunities. The polling schedule is suitable for all users and the traffic is exactly the same. Case. For more advanced and flexible applications, a more perfect scheduling algorithm is needed. For example, each user's weight is different, or the allowed traffic is different, and even each user supports different priority queues. A variety of scheduling algorithms have emerged for various applications. For example, for different user weights, a weighted round Robin (WRR) scheduling algorithm, a Deficit Weighted Round Robin (DWRR), and a modified deficit weighted round robin (MDRR) are available. Modified Deficit Round Robin), WRED, and more balanced WFQ scheduling algorithms and more.
一般情况下调度和整形配合来满足QOS,调度保证最小带宽,整形来限制最高带宽。当网络出现拥堵时,按照指定的服务规则对交换节点的不同输入业务流分别进行调度和服务,使所有的输入业务流能按预定的方式共享交换节点的输出链路带宽,即使是不同的业务、不同的用户、不同的优先级,都有约定的机会获得相应的服务,使用公共的网络。但是当网络 比较宽松的时候,希望可以让需要的用户充分的利用网络资源,利益得到最大化,此时,希望可以给予现有在使用的用户最大的流量,享受更好的服务,而一般的实现方式都会有整形限制着各个队列的流量。In general, scheduling and shaping cooperate to satisfy QOS, scheduling ensures minimum bandwidth, and shaping limits the maximum bandwidth. When the network is congested, the different input service flows of the switching node are respectively scheduled and served according to the specified service rules, so that all the input service flows can share the output link bandwidth of the switching node in a predetermined manner, even if different services are used. Different users and different priorities have agreed opportunities to get the corresponding services and use the public network. But when the network When it is loose, I hope that the users who need it can make full use of the network resources and maximize the benefits. At this time, I hope to give the users who are currently using the maximum traffic and enjoy better services, and the general implementation will be There is shaping to limit the traffic of each queue.
发明内容Summary of the invention
为解决现有存在的技术问题,本发明实施例主要提供一种用户队列调度的方法、装置及计算机存储介质。In order to solve the existing technical problems, the embodiments of the present invention mainly provide a method, a device, and a computer storage medium for scheduling user queues.
本发明实施例的技术方案是这样实现的:The technical solution of the embodiment of the present invention is implemented as follows:
本发明实施例提供一种用户队列调度的方法,该方法包括:An embodiment of the present invention provides a method for scheduling a user queue, where the method includes:
第一调度器挂接第二调度器和第三调度器,用户队列同时挂接在第二调度器和第三调度器上;The first scheduler is connected to the second scheduler and the third scheduler, and the user queue is simultaneously connected to the second scheduler and the third scheduler;
第一调度器判断第二调度器是否允许调度,在第二调度器允许调度时,调度第二调度器,使得所述第二调度器通过对应的整形器调度挂接的用户队列,在第二调度器下挂接的用户队列都调度完之后,所述第一调度器确定第三调度器允许调度,并调度第三调度器,使得所述第三调度器通过对应的整形器调度挂接的用户队列;The first scheduler determines whether the second scheduler allows scheduling, and when the second scheduler allows scheduling, scheduling the second scheduler, so that the second scheduler schedules the connected user queue through the corresponding shaper, in the second After the user queues connected to the scheduler are all scheduled, the first scheduler determines that the third scheduler allows scheduling, and schedules the third scheduler, so that the third scheduler schedules the hooks through the corresponding shaper. User queue
在第二调度器不允许调度时,第一调度器确定第三调度器允许调度,并调度第三调度器,使得所述第三调度器通过对应的整形器调度挂接的用户队列。When the second scheduler does not allow scheduling, the first scheduler determines that the third scheduler allows scheduling, and schedules the third scheduler, so that the third scheduler schedules the attached user queue through the corresponding shaper.
上述方案中,所述第一调度器挂接第二调度器和第三调度器,用户队列同时挂接在第二调度器和第三调度器上,包括:In the above solution, the first scheduler is connected to the second scheduler and the third scheduler, and the user queue is simultaneously connected to the second scheduler and the third scheduler, including:
配置第一调度器调度第二调度器和第三调度器的调度算法为严格优先级(SP)调度,其中,调度第二调度器的优先级高于调度第三调度器的优先级;Configuring the first scheduler to schedule the scheduling algorithm of the second scheduler and the third scheduler to be strict priority (SP) scheduling, where scheduling the second scheduler has a higher priority than scheduling the third scheduler;
配置第二调度器和第三调度器调度用户队列的调度算法为SP、或赤字加权轮询(DWRR)、或DWRR+SP调度。 The scheduling algorithm for configuring the second scheduler and the third scheduler to schedule the user queue is SP, or deficit weighted polling (DWRR), or DWRR+SP scheduling.
上述方案中,所述第一调度器挂接第二调度器和第三调度器,用户队列同时挂接在第二调度器和第三调度器上,还包括:In the above solution, the first scheduler is connected to the second scheduler and the third scheduler, and the user queue is simultaneously connected to the second scheduler and the third scheduler, and further includes:
配置与第一调度器、第二调度器和第三调度器对应的整形器的整形漏桶填充速率和漏桶容量,其中,所述填充速率大小为允许的平均流量,所述漏桶容量大小为允许的突发流量。And configuring an shaping leaky bucket filling rate and a leaking bucket capacity of the shaper corresponding to the first scheduler, the second scheduler, and the third scheduler, wherein the fill rate size is an allowable average traffic, and the leaky bucket capacity is configured. For the allowed burst traffic.
上述方案中,所述第一调度器挂接第二调度器和第三调度器,用户队列同时挂接在第二调度器和第三调度器上,还包括:为每个用户队列设置对应的赤字计数器,整形器根据所述赤字计数器确定允许发送数据包的用户队列。In the above solution, the first scheduler is connected to the second scheduler and the third scheduler, and the user queue is simultaneously connected to the second scheduler and the third scheduler, and further includes: setting corresponding to each user queue A deficit counter, the shaper determines a queue of users allowed to send packets based on the deficit counter.
上述方案中,所述第二调度器用于向各用户队列提供承诺速率,所述第三调度器用于向各用户队列提供额外速率。In the above solution, the second scheduler is configured to provide a commitment rate to each user queue, and the third scheduler is configured to provide an additional rate to each user queue.
上述方案中,所述第一调度器判断第二调度器是否允许调度包括:第一调度器根据是否有需要发送数据包且当前配置速率低于第二调度器的承诺速率的用户队列判断第二调度器是否允许调度。In the foregoing solution, the determining, by the first scheduler, whether the second scheduler allows scheduling includes: the first scheduler determines, according to whether there is a user queue that needs to send a data packet and the current configuration rate is lower than a committed rate of the second scheduler. Whether the scheduler allows scheduling.
上述方案中,所述第一调度器确定第三调度器允许调度包括:第一调度器根据有需要发送数据包且当前配置速率低于第三调度器的额外速率与第二调度器的承诺速率之和的用户队列,确定第三调度器允许调度。In the above solution, the first scheduler determines that the third scheduler allows the scheduling to include: the first scheduler sends the data packet according to the need and the current configuration rate is lower than the third scheduler's additional rate and the second scheduler's committed rate. The sum of the user queues determines that the third scheduler allows scheduling.
本发明实施例还提供一种用户队列调度的装置,该装置包括:第一调度器、第二调度器、第三调度器和一个以上整形器;其中,The embodiment of the invention further provides a device for scheduling a user queue, the device comprising: a first scheduler, a second scheduler, a third scheduler and one or more shapers; wherein
第一调度器挂接第二调度器和第三调度器,用户队列同时挂接在第二调度器和第三调度器上;The first scheduler is connected to the second scheduler and the third scheduler, and the user queue is simultaneously connected to the second scheduler and the third scheduler;
所述第一调度器,用于判断第二调度器是否允许调度,在第二调度器允许调度时,调度第二调度器,在第二调度器下挂接的用户队列都调度完之后,确定第三调度器允许调度,并调度第三调度器;在第二调度器不允许调度时,确定第三调度器允许调度,并调度第三调度器; The first scheduler is configured to determine whether the second scheduler allows scheduling, and when the second scheduler allows scheduling, scheduling the second scheduler, after the user queues connected under the second scheduler are all scheduled, determining The third scheduler allows scheduling and scheduling the third scheduler; when the second scheduler does not allow scheduling, determining that the third scheduler allows scheduling, and scheduling the third scheduler;
所述第二调度器,用于通过对应的整形器调度挂接的用户队列,在挂接的用户队列都调度完之后,通知第一调度器;The second scheduler is configured to schedule the connected user queue by using a corresponding shaper, and notify the first scheduler after the connected user queues are all scheduled;
所述第三调度器,用于通过对应的整形器调度挂接的用户队列;The third scheduler is configured to schedule a connected user queue by using a corresponding shaper;
整形器,用于确定发送数据包的用户队列。A shaper that determines the queue of users that send packets.
上述方案中,所述第二调度器,用于向各用户队列提供承诺速率;所述第三调度器,用于向各用户队列提供额外速率。In the above solution, the second scheduler is configured to provide a commitment rate to each user queue, and the third scheduler is configured to provide an additional rate to each user queue.
上述方案中,所述第一调度器调度所述第二调度器和所述第三调度器的调度算法为SP调度,其中,调度第二调度器的优先级高于调度第三调度器的优先级;所述第二调度器和所述第三调度器调度用户队列的调度算法为SP、或DWRR、或DWRR+SP调度。In the above solution, the scheduling algorithm of the first scheduler scheduling the second scheduler and the third scheduler is an SP schedule, where scheduling the second scheduler has a higher priority than scheduling the third scheduler The scheduling algorithm of the second scheduler and the third scheduler scheduling user queue is SP, or DWRR, or DWRR+SP scheduling.
本发明实施例提供的计算机存储介质存储有计算机程序,该计算机程序用于执行上述用户队列调度的方法。The computer storage medium provided by the embodiment of the present invention stores a computer program for executing the method for scheduling the user queue.
本发明实施例提供了一种用户队列调度的方法和装置,第一调度器挂接第二调度器和第三调度器,用户队列同时挂接在第二调度器和第三调度器上,第一调度器判断第二调度器是否允许调度,在第二调度器允许调度时,调度第二调度器,所述第二调度器通过对应的整形器调度挂接的用户队列,在第二调度器下挂接的用户队列都调度完之后,第一调度器确定第三调度器允许调度,并调度第三调度器,所述第三调度器通过对应的整形器调度挂接的用户队列;在第二调度器不允许调度时,第一调度器确定第三调度器允许调度,并调度第三调度器,所述第三调度器通过对应的整形器调度挂接的用户队列;如此,在网络负荷比较小的时候(比如设备处理能力是1G,但是输入流量小于1G),通过对各用户队列的调度和整形来限制各用户队列占用的最大带宽,而在网络负荷较大的时候(比如设备处理能力是1G,但是输入流量大于1G),通过调度能够保证各用户队列占用的最小带宽。 The embodiment of the invention provides a method and a device for scheduling a user queue. The first scheduler is connected to the second scheduler and the third scheduler, and the user queue is simultaneously connected to the second scheduler and the third scheduler. A scheduler determines whether the second scheduler allows scheduling, and when the second scheduler allows scheduling, scheduling a second scheduler, the second scheduler scheduling the attached user queue by using a corresponding shaper, in the second scheduler After the downlinked user queues are all scheduled, the first scheduler determines that the third scheduler allows scheduling, and schedules a third scheduler, and the third scheduler schedules the connected user queues by using the corresponding shaper; When the second scheduler does not allow scheduling, the first scheduler determines that the third scheduler allows scheduling, and schedules a third scheduler, and the third scheduler schedules the connected user queue through the corresponding shaper; thus, the network load When it is relatively small (for example, the device processing capacity is 1G, but the input traffic is less than 1G), the maximum bandwidth occupied by each user queue is limited by scheduling and shaping each user queue. When the load is large (such as device processing capabilities are 1G, but the input flow is greater than 1G), by scheduling to ensure minimum bandwidth for each queue is occupied by the user.
附图说明DRAWINGS
图1为现有技术中的单桶调度示意图;1 is a schematic diagram of a single bucket scheduling in the prior art;
图2为本发明实施例采用的双桶调度示意图;2 is a schematic diagram of dual bucket scheduling adopted by an embodiment of the present invention;
图3为本发明实施例实现用户队列调度的方法的流程示意图;3 is a schematic flowchart of a method for implementing user queue scheduling according to an embodiment of the present invention;
图4为本发明实施例实现用户队列调度的装置的结构示意图。FIG. 4 is a schematic structural diagram of an apparatus for implementing user queue scheduling according to an embodiment of the present invention.
具体实施方式detailed description
单桶调度是针对一个用户队列只配置一个速率,所述用户队列大于所配置的速率的部分将得不到调度,小于所配置的速率的话才可以被调度,以实现相应的QOS。双桶调度是对用户队列配置两个速率,即承诺的速率(CIR,Committed Information Rate)和额外速率(EIR,Extre Information Rate)。CIR为无论当前网络是否拥塞,必须要保证的速率,EIR为当前网络不拥塞时,允许被调度的额外速率。Single-bucket scheduling is to configure only one rate for a user queue. The part of the user queue that is larger than the configured rate will not be scheduled. If the configured rate is smaller than the configured rate, it can be scheduled to implement the corresponding QOS. Dual-bucket scheduling configures two rates for the user queue, namely, CIR (Committed Information Rate) and Extra Rate (EIR). The CIR is the rate that must be guaranteed regardless of whether the current network is congested. The EIR is the extra rate that is allowed to be scheduled when the current network is not congested.
现有的单桶调度如图1所示,用户队列挂接在PQ调度器(scheduler)上,PQ调度器再挂接到时隙(T-CONT)调度器上。图中PQ调度器有两个,可以称之为调度器A和调度器B。8个用户队列挂接一个PQ调度器。调度器A和调度器B挂接在T-CONT调度器上。一个队列只挂接到一个调度器,只受一个速率的限制,这里称之为单桶调度。调度器A下边的用户队列0调度速率只有一个,在用户队列0速率小没有到达限定速率的情况下,可以继续调度,一旦到达限定速度,则会受到限制不能继续调度。即使整个网络不拥堵、其他用户队列都没有发包需求,用户队列0都会受到严格的限制,不能超过限制速率。The existing single-bucket scheduling is shown in Figure 1. The user queue is attached to the PQ scheduler, and the PQ scheduler is attached to the time slot (T-CONT) scheduler. There are two PQ schedulers in the figure, which can be called scheduler A and scheduler B. Eight user queues are attached to one PQ scheduler. Scheduler A and Scheduler B are attached to the T-CONT scheduler. A queue is only attached to a scheduler and is limited by only one rate. This is called single-bucket scheduling. The scheduling rate of the user queue 0 under the scheduler A is only one. If the rate of the user queue 0 is small and does not reach the limited rate, the scheduling can be continued. Once the limited speed is reached, the scheduling is limited and the scheduling cannot be continued. Even if the entire network is not congested and other user queues do not have a packet request, the user queue 0 is strictly limited and cannot exceed the limit rate.
本发明实施例采用的双桶调度如图2所示,下文我们称CIR调度器为C调度器,EIR调度器为E调度器。每个用户队列不但挂接到C调度器上,且会挂接到E调度器上。一个用户队列会受到两个速率的限制:承诺速率和额外速率。首先,以用户队列0为例,用户队列0一定会得到承诺速率。 如果网络比较拥堵,其他用户队列也都需要大量的流量时,用户队列0使用承诺速率,如果网络不拥堵,其他用户队列对于流量的需求比较少时,用户队列0可以得到额外速率,享受更快的速率,得到更好的额外的服务。既不影响其他用户,又可以得到更好的服务,非常灵活。The dual bucket scheduling adopted by the embodiment of the present invention is shown in FIG. 2. Hereinafter, the CIR scheduler is referred to as a C scheduler, and the EIR scheduler is an E scheduler. Each user queue is not only attached to the C scheduler, but also to the E scheduler. A user queue is limited by two rates: committed rate and extra rate. First, taking user queue 0 as an example, user queue 0 must get the committed rate. If the network is congested and other user queues also require a large amount of traffic, user queue 0 uses the committed rate. If the network is not congested and other user queues have less traffic demand, user queue 0 can get extra rate and enjoy faster. Rate, get better extra services. It is very flexible without affecting other users and getting better service.
图2中的调度模型是采用DWRR调度算法以及整形来配合实现QOS,其中,漏斗形图案表示整形器。The scheduling model in FIG. 2 uses a DWRR scheduling algorithm and shaping to implement QOS, wherein the funnel pattern represents a shaper.
本发明实施例中,第一调度器挂接第二调度器和第三调度器,用户队列同时挂接在第二调度器和第三调度器上,第一调度器判断第二调度器是否允许调度,在第二调度器允许调度时,调度第二调度器,所述第二调度器通过对应的整形器调度挂接的用户队列,在第二调度器下挂接的用户队列都调度完之后,第一调度器确定第三调度器允许调度,并调度第三调度器,所述第三调度器通过对应的整形器调度挂接的用户队列;在第二调度器不允许调度时,第一调度器确定第三调度器允许调度,并调度第三调度器,所述第三调度器通过对应的整形器调度挂接的用户队列。这里,所述第一调度器可以为T-CONT调度器,第二调度器可以为CIR调度器,第三调度器可以为EIR调度器。In the embodiment of the present invention, the first scheduler is connected to the second scheduler and the third scheduler, and the user queue is simultaneously connected to the second scheduler and the third scheduler, and the first scheduler determines whether the second scheduler allows Scheduling, when the second scheduler allows scheduling, scheduling the second scheduler, the second scheduler scheduling the connected user queue by using the corresponding shaper, after the user queues connected under the second scheduler are all scheduled The first scheduler determines that the third scheduler allows scheduling, and schedules a third scheduler, where the third scheduler schedules the attached user queue by using a corresponding shaper; when the second scheduler does not allow scheduling, the first scheduler The scheduler determines that the third scheduler allows scheduling, and schedules a third scheduler, which schedules the attached user queue through the corresponding shaper. Here, the first scheduler may be a T-CONT scheduler, the second scheduler may be a CIR scheduler, and the third scheduler may be an EIR scheduler.
下面通过附图及具体实施例对本发明做进一步的详细说明。The invention will be further described in detail below with reference to the drawings and specific embodiments.
本发明实施例实现一种用户队列调度的方法,如图3所示,该方法包括以下几个步骤:The embodiment of the invention implements a method for scheduling a user queue. As shown in FIG. 3, the method includes the following steps:
步骤301:第一调度器挂接第二调度器和第三调度器,用户队列同时挂接在第二调度器和第三调度器上;Step 301: The first scheduler is connected to the second scheduler and the third scheduler, and the user queue is simultaneously connected to the second scheduler and the third scheduler.
这里,执行步骤301之前首先需要配置第一调度器、第二调度器和第三调度器的调度方式,具体为:配置第一调度器调度第二调度器和第三调度器的调度算法为严格优先级(SP,Strict-Priority)调度;其中,调度第二调度器的优先级高于调度第三调度器的优先级,以此保证先调度第二调度 器,再调度第三调度器;配置第二调度器和第三调度器调度用户队列的调度算法为SP、或DWRR、或DWRR+SP。Here, before the step 301 is performed, the scheduling manners of the first scheduler, the second scheduler, and the third scheduler are first configured, specifically: configuring the first scheduler to schedule the second scheduler and the third scheduler to be strict. Priority (SP, Strict-Priority) scheduling; wherein scheduling the second scheduler has a higher priority than scheduling the third scheduler, thereby ensuring that the second scheduling is scheduled first And scheduling the third scheduler; configuring the second scheduler and the third scheduler to schedule the user queues as SP, or DWRR, or DWRR+SP.
执行步骤301之前还需要配置与第一调度器、第二调度器和第三调度器对应的整形器的整形漏桶填充速率和漏桶容量;其中,所述填充速率大小表示允许的平均流量,所述漏桶容量大小表示允许的突发流量。可以根据每个整形令牌代表的字节数,以及需要限制的速率,来配置整形器的漏桶填充速率和漏桶容量。本实施例中,漏桶采用固定周期填充技术,按照间隔周期向漏桶增加固定数量的整形令牌,间隔周期和每次增加整形令牌所增加的字节数可以由用户配置。通过配置不同的间隔周期和填充字节数,可以达到不同的填充速率,计算公式如下:Before performing step 301, the shaping bucket filling rate and the leaking bucket capacity of the shaper corresponding to the first scheduler, the second scheduler, and the third scheduler are further configured; wherein the fill rate size indicates the allowed average traffic, The leaky bucket capacity size indicates the allowed burst traffic. The shaper's leaky bucket fill rate and leaky bucket capacity can be configured according to the number of bytes represented by each shaped token and the rate that needs to be limited. In this embodiment, the leaky bucket adopts a fixed-period filling technique, and adds a fixed number of shaping tokens to the leaky bucket according to the interval period. The interval period and the number of bytes added each time the shaping token is added may be configured by the user. Different fill rates can be achieved by configuring different interval periods and padding bytes. The formula is as follows:
填充速率=(时钟频率/间隔周期)*填充字节数。Fill rate = (clock frequency / interval period) * padding bytes.
本步骤还包括:为每个用户队列设置对应的赤字计数器,整形器根据所述赤字计数器确定允许发送数据包的用户队列,所述赤字计数器初始化为一个固定值。具体的,当一个活动的用户队列被调度时,如果对应的赤字计数器小于0,则将所述用户队列的服务量子和赤字计数器相加,累加的结果存入赤字计数器,并跳出本次调度;如果对应的赤字计数器大于0,则确定用户队列是否满足允许出包条件,在满足时,允许所述用户队列发送一个数据包,赤字计数器减去所述数据包的包长,相应整形令牌也要减掉相应量。所述允许出包条件包括:a、用户队列处于活动状态,即有包要调度且满足整形条件;b、用户队列拥有足够的信用。The step further includes: setting a corresponding deficit counter for each user queue, and the shaper determines a user queue that allows the data packet to be sent according to the deficit counter, and the deficit counter is initialized to a fixed value. Specifically, when an active user queue is scheduled, if the corresponding deficit counter is less than 0, the service quantum of the user queue and the deficit counter are added, and the accumulated result is stored in the deficit counter, and the current scheduling is skipped; If the corresponding deficit counter is greater than 0, it is determined whether the user queue satisfies the allowable outbound condition, and when satisfied, the user queue is allowed to send a data packet, the deficit counter minus the packet length of the data packet, and the corresponding shaping token is also To reduce the amount. The allowed outbound condition includes: a, the user queue is in an active state, that is, there is a packet to be scheduled and the shaping condition is satisfied; b, the user queue has sufficient credit.
步骤302:第一调度器判断第二调度器是否允许调度,在第二调度器允许调度时,执行步骤303,在第二调度器不允许调度时,执行步骤304;Step 302: The first scheduler determines whether the second scheduler allows scheduling, when the second scheduler allows scheduling, step 303 is performed, and when the second scheduler does not allow scheduling, step 304 is performed;
具体的,第一调度器根据是否有需要发送数据包且当前配置速率低于第二调度器的承诺速率的用户队列判断第二调度器是否允许调度,如果有,则确定第二调度器允许调度,如果没有,则确定第二调度器不允许调度。 Specifically, the first scheduler determines, according to whether there is a user queue that needs to send a data packet and the current configuration rate is lower than the committed rate of the second scheduler, whether the second scheduler allows scheduling, and if yes, determines that the second scheduler allows scheduling. If not, it is determined that the second scheduler does not allow scheduling.
步骤303:调度第二调度器,所述第二调度器通过对应的整形器调度挂接的用户队列,在第二调度器下挂接的用户队列都调度完之后,执行步骤302;Step 303: scheduling the second scheduler, the second scheduler scheduling the connected user queue through the corresponding shaper, after the second queue is connected to the user queue is scheduled, step 302 is performed;
步骤304:第一调度器判断第三调度器是否允许调度,在允许时,执行步骤305,在不允许时,流程结束;Step 304: The first scheduler determines whether the third scheduler allows scheduling. When allowed, step 305 is performed. When not allowed, the process ends.
具体的,第一调度器根据是否有需要发送数据包且当前配置速率低于第三调度器的额外速率与第二调度器的承诺速率之和的用户队列,判断第三调度器是否允许调度,如果有,则确定第三调度器允许调度,如果没有,则确定第三调度器不允许调度。Specifically, the first scheduler determines, according to whether there is a user queue that needs to send a data packet and the current configuration rate is lower than a sum of the additional rate of the third scheduler and the committed rate of the second scheduler, whether the third scheduler allows scheduling, If so, it is determined that the third scheduler allows scheduling, and if not, it is determined that the third scheduler does not allow scheduling.
步骤305:调度第三调度器,所述第三调度器通过对应的整形器调度挂接的用户队列,在所述第三调度器调度一次后,执行步骤302。Step 305: The third scheduler is scheduled, and the third scheduler schedules the connected user queue by using a corresponding shaper. After the third scheduler schedules the process, step 302 is performed.
为了实现上述方法,本发明实施例还提供一种用户队列调度的装置,如图4所示,该装置包括:第一调度器41、第二调度器42、第三调度器43和一个以上整形器44;其中,In order to implement the foregoing method, an embodiment of the present invention further provides a device for scheduling a user queue. As shown in FIG. 4, the device includes: a first scheduler 41, a second scheduler 42, a third scheduler 43, and one or more shapings. 44; wherein
第一调度器41挂接第二调度器42和第三调度器43,用户队列同时挂接在第二调度器42和第三调度器43上;The first scheduler 41 is connected to the second scheduler 42 and the third scheduler 43, and the user queue is simultaneously attached to the second scheduler 42 and the third scheduler 43;
所述第一调度器41判断第二调度器42是否允许调度,在第二调度器42允许调度时,调度第二调度器42,在第二调度器42下挂接的用户队列都调度完之后,确定第三调度器43允许调度,并调度第三调度器43;在第二调度器42不允许调度时,确定第三调度器43允许调度,并调度第三调度器43;The first scheduler 41 determines whether the second scheduler 42 allows scheduling, and when the second scheduler 42 allows scheduling, schedules the second scheduler 42 after the user queues attached to the second scheduler 42 are scheduled. Determining that the third scheduler 43 allows scheduling, and scheduling the third scheduler 43; when the second scheduler 42 does not allow scheduling, determining that the third scheduler 43 allows scheduling, and scheduling the third scheduler 43;
所述第二调度器42通过对应的整形器44调度挂接的用户队列,在挂接的用户队列都调度完之后,通知第一调度器41;The second scheduler 42 schedules the connected user queue through the corresponding shaper 44, and after the hooked user queues are all scheduled, notify the first scheduler 41;
所述第三调度器43通过对应的整形器44调度挂接的用户队列;The third scheduler 43 schedules the connected user queue through the corresponding shaper 44;
整形器44,用于确定发送数据包的用户队列。 A shaper 44 is configured to determine a user queue for transmitting data packets.
其中,所述第一调度器41为T-CONT调度器,所述第二调度器42为CIR调度器,用于向各用户队列提供承诺速率,所述第三调度器43为EIR调度器,用于向各用户队列提供额外速率。The first scheduler 41 is a T-CONT scheduler, the second scheduler 42 is a CIR scheduler, and is configured to provide a commitment rate to each user queue, and the third scheduler 43 is an EIR scheduler. Used to provide additional rates to individual user queues.
所述第一调度器41调度所述第二调度器42和所述第三调度器43的调度算法为SP调度,其中,调度第二调度器42的优先级高于调度第三调度器43的优先级,以此保证先调度第二调度器42,再调度第三调度器43;所述第二调度器和所述第三调度器调度用户队列的调度算法为SP、或DWRR、或DWRR+SP。The first scheduler 41 schedules the scheduling algorithms of the second scheduler 42 and the third scheduler 43 to be SP scheduling, wherein the scheduling second scheduler 42 has a higher priority than the scheduling third scheduler 43. Priority, in order to ensure that the second scheduler 42 is scheduled first, and then the third scheduler 43 is scheduled; the scheduling algorithm of the second scheduler and the third scheduler scheduling the user queue is SP, or DWRR, or DWRR+ SP.
这里,所述整形器44具体用于根据每个用户队列对应的赤字计数器确定允许发送数据包的用户队列。Here, the shaper 44 is specifically configured to determine a user queue that is allowed to send a data packet according to a deficit counter corresponding to each user queue.
优选的,所述第一调度器41根据是否有需要发送数据包且当前配置速率低于第二调度器42的承诺速率的用户队列判断第二调度器42是否允许调度。Preferably, the first scheduler 41 determines whether the second scheduler 42 allows scheduling according to whether there is a user queue that needs to send a data packet and the current configuration rate is lower than the committed rate of the second scheduler 42.
优选的,所述第一调度器41根据有需要发送数据包且当前配置速率低于第三调度器43的额外速率与第二调度器42的承诺速率之和的用户队列,确定第三调度器43允许调度。Preferably, the first scheduler 41 determines the third scheduler according to a user queue that needs to send a data packet and the current configuration rate is lower than the sum of the additional rate of the third scheduler 43 and the committed rate of the second scheduler 42. 43 allows scheduling.
上述第一调度器、第二调度器、第三调度器和一个以上整形器可以由中央处理器(CPU,Central Processing Unit)、或数字信号处理器(DSP,Digital Signal Processor)、或可编程门阵列(FPGA,Field-Programmable Gate Array)实现。The first scheduler, the second scheduler, the third scheduler, and the one or more shapers may be configured by a central processing unit (CPU), or a digital signal processor (DSP), or a programmable gate. Array (FPGA, Field-Programmable Gate Array) implementation.
综上所述,本发明实施例通过双桶调度,在网络负荷比较小的时候,通过对各用户队列的调度和整形来限制各用户队列占用的最大带宽,而在网络负荷较大的时候,通过调度能够保证各用户队列占用的最小带宽。In summary, the embodiment of the present invention uses dual-bucket scheduling to limit the maximum bandwidth occupied by each user queue by scheduling and shaping each user queue when the network load is relatively small, and when the network load is large, Through scheduling, the minimum bandwidth occupied by each user queue can be guaranteed.
在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性 的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The device embodiments described above are merely illustrative For example, the division of the unit is only a logical function division, and the actual implementation may have another division manner, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be Ignore, or not execute. In addition, the coupling, or direct coupling, or communication connection of the components shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical, mechanical or other forms. of.
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元,即可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated, and the components displayed as the unit may or may not be physical units, that is, may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各实施例中的各功能单元可以全部集成在一个处理模块中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may be separately used as one unit, or two or more units may be integrated into one unit; the above integration The unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。A person skilled in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by using hardware related to the program instructions. The foregoing program may be stored in a computer readable storage medium, and the program is executed when executed. The foregoing storage device includes the following steps: the foregoing storage medium includes: a mobile storage device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. A medium that can store program code.
相应地,本发明实施例还提供一种计算机存储介质,其中存储有计算机程序,该计算机程序用于执行本发明实施例的用户队列调度的方法。Correspondingly, an embodiment of the present invention further provides a computer storage medium, wherein a computer program is stored, and the computer program is used to execute a method for user queue scheduling according to an embodiment of the present invention.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本 发明的保护范围应以所述权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention. It should be covered by the scope of the present invention. Therefore, this The scope of the invention should be determined by the scope of the appended claims.
工业实用性Industrial applicability
本发明公开了一种用户队列调度的方法、装置及计算机存储介质,能够第一调度器挂接第二调度器和第三调度器,用户队列同时挂接在第二调度器和第三调度器上;首先调度第二调度器通过对应的整形器调度挂接的用户队列,在第二调度器下挂接的用户队列都调度完之后或者在第二调度器不允许调度时,调度第三调度器,使得所述第三调度器通过对应的整形器调度挂接的用户队列。如此,通过这种双桶调度,使得一个用户队列会受到两种速率的限制。在网络负荷比较小的时候,通过对各用户队列的调度和整形来限制各用户队列占用的最大带宽,而在网络负荷较大的时候,通过调度能够保证各用户队列占用的最小带宽。 The invention discloses a method and a device for scheduling a user queue and a computer storage medium. The first scheduler can be connected to the second scheduler and the third scheduler, and the user queue is simultaneously connected to the second scheduler and the third scheduler. First, the second scheduler is scheduled to schedule the connected user queue through the corresponding shaper, and the third schedule is scheduled after the user queues attached to the second scheduler are all scheduled or when the second scheduler does not allow scheduling. And causing the third scheduler to schedule the connected user queue by using a corresponding shaper. As such, with this dual bucket scheduling, a user queue is limited by two rates. When the network load is relatively small, the maximum bandwidth occupied by each user queue is limited by scheduling and shaping the user queues. When the network load is large, the minimum bandwidth occupied by each user queue can be ensured by scheduling.

Claims (11)

  1. 一种用户队列调度的方法,该方法包括:A method for user queue scheduling, the method comprising:
    第一调度器挂接第二调度器和第三调度器,用户队列同时挂接在第二调度器和第三调度器上;The first scheduler is connected to the second scheduler and the third scheduler, and the user queue is simultaneously connected to the second scheduler and the third scheduler;
    第一调度器判断第二调度器是否允许调度,在第二调度器允许调度时,调度第二调度器,使得所述第二调度器通过对应的整形器调度挂接的用户队列,在第二调度器下挂接的用户队列都调度完之后,所述第一调度器确定第三调度器允许调度,并调度第三调度器,使得所述第三调度器通过对应的整形器调度挂接的用户队列;The first scheduler determines whether the second scheduler allows scheduling, and when the second scheduler allows scheduling, scheduling the second scheduler, so that the second scheduler schedules the connected user queue through the corresponding shaper, in the second After the user queues connected to the scheduler are all scheduled, the first scheduler determines that the third scheduler allows scheduling, and schedules the third scheduler, so that the third scheduler schedules the hooks through the corresponding shaper. User queue
    在第二调度器不允许调度时,第一调度器确定第三调度器允许调度,并调度第三调度器,使得所述第三调度器通过对应的整形器调度挂接的用户队列。When the second scheduler does not allow scheduling, the first scheduler determines that the third scheduler allows scheduling, and schedules the third scheduler, so that the third scheduler schedules the attached user queue through the corresponding shaper.
  2. 根据权利要求1所述的方法,其中,所述第一调度器挂接第二调度器和第三调度器,用户队列同时挂接在第二调度器和第三调度器上,包括:The method of claim 1, wherein the first scheduler is connected to the second scheduler and the third scheduler, and the user queue is simultaneously attached to the second scheduler and the third scheduler, including:
    配置第一调度器调度第二调度器和第三调度器的调度算法为优先级SP调度,其中,调度第二调度器的优先级高于调度第三调度器的优先级;The scheduling algorithm for configuring the first scheduler to schedule the second scheduler and the third scheduler is a priority SP scheduling, where scheduling the second scheduler has a higher priority than scheduling the third scheduler;
    配置第二调度器和第三调度器调度用户队列的调度算法为SP、或赤字加权轮询DWRR、或DWRR+SP调度。The scheduling algorithm for configuring the second scheduler and the third scheduler to schedule the user queue is SP, or a deficit weighted polling DWRR, or a DWRR+SP scheduling.
  3. 根据权利要求2所述的方法,其中,所述第一调度器挂接第二调度器和第三调度器,用户队列同时挂接在第二调度器和第三调度器上,还包括:The method of claim 2, wherein the first scheduler is connected to the second scheduler and the third scheduler, and the user queue is simultaneously attached to the second scheduler and the third scheduler, and further includes:
    配置与第一调度器、第二调度器和第三调度器对应的整形器的整形漏桶填充速率和漏桶容量,其中,所述填充速率大小为允许的平均流量,所述漏桶容量大小为允许的突发流量。And configuring an shaping leaky bucket filling rate and a leaking bucket capacity of the shaper corresponding to the first scheduler, the second scheduler, and the third scheduler, wherein the fill rate size is an allowable average traffic, and the leaky bucket capacity is configured. For the allowed burst traffic.
  4. 根据权利要求3所述的方法,其中,所述第一调度器挂接第二调度 器和第三调度器,用户队列同时挂接在第二调度器和第三调度器上,还包括:为每个用户队列设置对应的赤字计数器,整形器根据所述赤字计数器确定允许发送数据包的用户队列。The method of claim 3, wherein the first scheduler hooks up the second schedule And the third scheduler, the user queue is simultaneously connected to the second scheduler and the third scheduler, and further includes: setting a corresponding deficit counter for each user queue, and the shaper determines, according to the deficit counter, that the data packet is allowed to be sent. User queue.
  5. 根据权利要求1所述的方法,其中,所述第二调度器用于向各用户队列提供承诺速率,所述第三调度器用于向各用户队列提供额外速率。The method of claim 1 wherein said second scheduler is operative to provide a committed rate to each user queue, said third scheduler for providing an additional rate to each user queue.
  6. 根据权利要求5所述的方法,其中,所述第一调度器判断第二调度器是否允许调度包括:第一调度器根据是否有需要发送数据包且当前配置速率低于第二调度器的承诺速率的用户队列判断第二调度器是否允许调度。The method according to claim 5, wherein the determining, by the first scheduler, whether the second scheduler allows scheduling comprises: the first scheduler according to whether there is a need to send a data packet and the current configuration rate is lower than the commitment of the second scheduler The rate user queue determines if the second scheduler allows scheduling.
  7. 根据权利要求5所述的方法,其中,所述第一调度器确定第三调度器允许调度包括:第一调度器根据有需要发送数据包且当前配置速率低于第三调度器的额外速率与第二调度器的承诺速率之和的用户队列,确定第三调度器允许调度。The method of claim 5, wherein the first scheduler determines that the third scheduler allows scheduling comprises: the first scheduler transmitting a data packet according to need and the current configuration rate is lower than an additional rate of the third scheduler The user queue of the sum of the committed rates of the second scheduler determines that the third scheduler allows scheduling.
  8. 一种用户队列调度的装置,该装置包括:第一调度器、第二调度器、第三调度器和一个以上整形器;其中,An apparatus for scheduling a user queue, the apparatus comprising: a first scheduler, a second scheduler, a third scheduler, and one or more shapers; wherein
    第一调度器挂接第二调度器和第三调度器,用户队列同时挂接在第二调度器和第三调度器上;The first scheduler is connected to the second scheduler and the third scheduler, and the user queue is simultaneously connected to the second scheduler and the third scheduler;
    所述第一调度器,配置为判断第二调度器是否允许调度,在第二调度器允许调度时,调度第二调度器,在第二调度器下挂接的用户队列都调度完之后,确定第三调度器允许调度,并调度第三调度器;在第二调度器不允许调度时,确定第三调度器允许调度,并调度第三调度器;The first scheduler is configured to determine whether the second scheduler allows scheduling, and when the second scheduler allows scheduling, scheduling the second scheduler, after the user queues connected under the second scheduler are all scheduled, determining The third scheduler allows scheduling and scheduling the third scheduler; when the second scheduler does not allow scheduling, determining that the third scheduler allows scheduling, and scheduling the third scheduler;
    所述第二调度器,配置为通过对应的整形器调度挂接的用户队列,在挂接的用户队列都调度完之后,通知第一调度器;The second scheduler is configured to schedule the connected user queue by using a corresponding shaper, and notify the first scheduler after the connected user queues are all scheduled;
    所述第三调度器,配置为通过对应的整形器调度挂接的用户队列;The third scheduler is configured to schedule the connected user queue by using a corresponding shaper;
    整形器,配置为确定发送数据包的用户队列。 A shaper that is configured to determine the user queue that sent the packet.
  9. 根据权利要求8所述的装置,其中,所述第二调度器,配置为向各用户队列提供承诺速率;所述第三调度器,配置为向各用户队列提供额外速率。The apparatus of claim 8, wherein the second scheduler is configured to provide a committed rate to each user queue; the third scheduler is configured to provide an additional rate to each user queue.
  10. 根据权利要求8所述的装置,其中,所述第一调度器调度所述第二调度器和所述第三调度器的调度算法为SP调度,其中,调度第二调度器的优先级高于调度第三调度器的优先级;所述第二调度器和所述第三调度器调度用户队列的调度算法为SP、或DWRR、或DWRR+SP调度。The apparatus according to claim 8, wherein the scheduling algorithm of the first scheduler scheduling the second scheduler and the third scheduler is an SP schedule, wherein scheduling the second scheduler has a higher priority The priority of the third scheduler is scheduled; the scheduling algorithm of the second scheduler and the third scheduler scheduling the user queue is SP, or DWRR, or DWRR+SP scheduling.
  11. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行权利要求1至7任一项的用户队列调度的方法。 A computer storage medium having stored therein computer executable instructions for performing the method of user queue scheduling of any one of claims 1 to 7.
PCT/CN2014/087134 2014-06-30 2014-09-22 Method and apparatus for scheduling user queue and computer storage medium WO2016000326A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410307506.7A CN105323189A (en) 2014-06-30 2014-06-30 User queue dispatching method and device
CN201410307506.7 2014-06-30

Publications (1)

Publication Number Publication Date
WO2016000326A1 true WO2016000326A1 (en) 2016-01-07

Family

ID=55018363

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/087134 WO2016000326A1 (en) 2014-06-30 2014-09-22 Method and apparatus for scheduling user queue and computer storage medium

Country Status (2)

Country Link
CN (1) CN105323189A (en)
WO (1) WO2016000326A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107634917B (en) * 2017-09-21 2019-12-03 烽火通信科技股份有限公司 A kind of scheduling unit of priority scheduling, scheduling model and implementation method
CN108011844A (en) * 2017-12-14 2018-05-08 郑州云海信息技术有限公司 A kind of PWDRR methods applied to exchange chip

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7385987B1 (en) * 2003-02-04 2008-06-10 Cisco Technology, Inc. Scheduling system and method for multi-level class hierarchy
CN102185777A (en) * 2011-05-11 2011-09-14 烽火通信科技股份有限公司 Multi-stage hierarchical bandwidth management method
CN102368741A (en) * 2011-12-05 2012-03-07 盛科网络(苏州)有限公司 Method supporting hierarchical queue scheduling and flow shaping and apparatus thereof
CN103067302A (en) * 2013-01-11 2013-04-24 中兴通讯股份有限公司 Method and device for achieving double-rate leaky bucket model

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102802201B (en) * 2011-05-27 2017-03-15 上海贝尔股份有限公司 Communication means under Cellular Networks and WLAN UNE environment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7385987B1 (en) * 2003-02-04 2008-06-10 Cisco Technology, Inc. Scheduling system and method for multi-level class hierarchy
CN102185777A (en) * 2011-05-11 2011-09-14 烽火通信科技股份有限公司 Multi-stage hierarchical bandwidth management method
CN102368741A (en) * 2011-12-05 2012-03-07 盛科网络(苏州)有限公司 Method supporting hierarchical queue scheduling and flow shaping and apparatus thereof
CN103067302A (en) * 2013-01-11 2013-04-24 中兴通讯股份有限公司 Method and device for achieving double-rate leaky bucket model

Also Published As

Publication number Publication date
CN105323189A (en) 2016-02-10

Similar Documents

Publication Publication Date Title
CN106793133B (en) Scheduling method for guaranteeing multi-service QoS in electric power wireless communication system
US8767553B2 (en) Dynamic resource partitioning for long-term fairness to non-elastic traffic on a cellular basestation
US9258257B2 (en) Direct memory access rate limiting in a communication device
EP2466824B1 (en) Service scheduling method and device
CN101969409B (en) Queue scheduling method based on timer and MDRR
JP2017505065A (en) Method and apparatus for data traffic restriction
CN112805971B (en) Traffic shaping method and related equipment
US9940471B2 (en) Virtual output queue authorization management method and device, and computer storage medium
EP3089413A1 (en) Method and apparatus for adding token in traffic shaping
WO2018149228A1 (en) Packet transmission method and device
WO2016000326A1 (en) Method and apparatus for scheduling user queue and computer storage medium
CN101465794B (en) Method and apparatus for scheduling packet
WO2019109902A1 (en) Queue scheduling method and apparatus, communication device, and storage medium
WO2017032075A1 (en) Quality of service multiplexing method and device, and computer storage medium
US10044632B2 (en) Systems and methods for adaptive credit-based flow
US8467401B1 (en) Scheduling variable length packets
WO2017211287A1 (en) Method and device for constructing scheduling model
Tokmakov et al. A case for data centre traffic management on software programmable ethernet switches
Huang et al. Hybrid scheduling for quality of service guarantee in software defined networks to support multimedia cloud services
Rehman et al. Comparative Analysis of Scheduling Algorithms in IEEE 802.16 WiMAX
CN107888540B (en) Network anti-attack method and network equipment
US10742710B2 (en) Hierarchal maximum information rate enforcement
WO2017101476A1 (en) Data transmission method and multi-ssid router
Hong et al. Fair scheduling on parallel bonded channels with intersecting bonding groups
Huang et al. A Deterministic Switch with Perfect Resource Utilization and Guaranteed QoS

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: 14896635

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: 14896635

Country of ref document: EP

Kind code of ref document: A1