Embodiment
The embodiment of the invention proposes a kind of service traffics scheduling mechanism based on Priority Queues, this scheduling mechanism can be applicable to have on the equipment (as router) of service traffics forwarding capability, by on router, using the embodiment of the invention, can rationally utilize link bandwidth resource.
Below in conjunction with accompanying drawing the embodiment of the invention is described in detail.
In the service traffics scheduling mechanism based on Priority Queues of prior art, corresponding service traffics priority is respectively arranged with the corresponding priority level formation, wherein, except that lowest priority queue, other priority query all is provided with the qualification bandwidth separately, the bandwidth of lowest priority queue is not done concrete restriction, and its maximum bandwidth deducts the already used bandwidth of other priority query for the link total bandwidth.Its service traffics scheduling process comprises: for the service traffics of other each priority of removing lowest priority, limit this priority service flow scheduling of bandwidth in this correspondence priority query with being no more than corresponding priority query, for the lowest priority service traffics, the lowest priority service traffics that bandwidth are no more than the link remaining bandwidth are dispatched in the lowest priority queue.The embodiment of the invention is improved on this basis, as shown in Figure 4, comprising:
Step 401, service traffics for other each priority of removing lowest priority, limit this priority service flow scheduling of bandwidth in this correspondence priority query with being no more than corresponding priority query, for the lowest priority service traffics, the lowest priority service traffics that bandwidth are no more than the link remaining bandwidth are dispatched in the lowest priority queue.This step is identical with existing implementation.
Step 402 judges whether current link has remaining bandwidth, if having, then changes step 403 over to; Otherwise end is dispatched to service traffics the process of priority query.
Step 403 judges whether that service traffics are not scheduled in the priority query in addition, if having, then changes step 404 over to; Otherwise end is dispatched to service traffics the process of priority query.
In this step, if current also have service traffics not to be scheduled in the priority query and current remaining bandwidth in addition, then the priority of these service traffics necessarily is higher than lowest priority.
Step 404, service traffics with limit priority in the service traffics of not scheduling, be dispatched to priority and be lower than these service traffics and current also not reaching in the non-lowest priority queue that limits bandwidth, or be dispatched to the lowest priority queue that does not also reach maximum bandwidth, change step 402 then over to.
In this step, not if current not reaching in the priority query that limits bandwidth, there is the priority of a plurality of priority queries all to be lower than the service traffics of limit priority in these service traffics of not dispatching, then when select target priority query, can from these priority queries, select the highest formation of priority, also can select remaining bandwidth to be enough to hold the formation of these service traffics that need dispatch.Certainly, when these service traffics of also dispatching of scheduling arrive the target priority formation, should not surpass the qualification bandwidth (for non-lowest priority queue) or the maximum bandwidth (for lowest priority queue) of this target priority formation.
Further, after service traffics being dispatched to priority query, just can carrying out service traffics and transmit based on priority query according to above-mentioned flow process, that is, and according to the service traffics in each priority query of priority sequential scheduling from high to low.Especially, if the service traffics of different priorities are arranged in certain priority query, the service traffics of then first dispatching priority corresponding with the priority of this formation (promptly identical) are dispatched the service traffics of other priority again according to the sequencing that enters this formation.
By above flow process as can be seen, after the service traffics that will be no more than priority query's qualification bandwidth are dispatched to the corresponding priorities formation, if link bandwidth still has residue, and service traffics that are not scheduled in addition, then the service traffics that this is not scheduled are lower than in the formation of this service traffics priority to priority, thereby under the prerequisite of the bandwidth constraints that guarantees each priority service flow, the bandwidth of each priority service flow can flexible allocation, big limit shared bandwidth, utilize bandwidth, improved bandwidth availability ratio.
Be example with situation below, the above-mentioned flow process of the embodiment of the invention is described in detail with 3 priority queries.
In the present embodiment, the service traffics in the operation system have 3 priority: high, in and low priority.The division of service traffics priority can be carried out according to Different Strategies, the priority of the service traffics that for example, the priority of the service traffics of accessing video conference system is the highest, the office resource system is taken second place, visited to the priority of the service traffics of access service control system is minimum; Again for example, destination address is that the priority of the service traffics that priority priority the highest, that destination address is the service traffics of IP2 is taken second place, destination address is IP3 of service traffics of IP1 is minimum.
At first, priority according to service traffics in the operation system, physical link at egress router is provided with 3 formation (queue_1, queue_2 queue_3), is respectively high, medium and low 3 priority of each queue assignment, wherein, the priority of queue_1 is the highest, and queue_2 takes second place, and queue_3 is minimum.Be respectively queue_1 and queue_2 the qualification bandwidth is set, for queue_3 the qualification bandwidth is not set, the maximum bandwidth of queue_3 is that current link total bandwidth deducts the bandwidth that queue_1 and queue_2 have used.
When the subscriber equipment in the branch need be visited the subsystem of total portion mechanism, can send service traffics at this subsystem, service traffics are on the equipment between subscriber equipment and the egress router (as switch, router etc.), can be set up priority level sign (being provided with) as subsystem according to visit, therefore, egress router can receive the service traffics of having carried the priority level sign, and can carry out the service traffics scheduling based on above-mentioned priority query.Its scheduling process comprises: at first, service traffics are dispatched in the priority query (specifically can shown in Fig. 5 A or Fig. 5 B flow process), according to priority order from high to low, the service traffics in each priority query are transmitted processing then.
Referring to Fig. 5 A, a kind of service traffics are dispatched to the schematic flow sheet of priority query for what the embodiment of the invention provided, as shown in the figure, this flow process can comprise:
Step 510 will be no more than the high-priority service flow scheduling of qualification bandwidth of queue_1 in queue_1.
Exceed at the high-priority service flow bandwidth under the situation of queue_1 qualification bandwidth, the service traffics bandwidth that is dispatched in this step among the queue_1 equals this qualification bandwidth, and the high-priority service flow that exceeds queue_1 qualification bandwidth is scheduled among the queue_3.
Step 511 is dispatched to the medium priority service traffics that are no more than the qualification bandwidth of queue_2 among the queue_2.
Exceed in medium priority service traffics bandwidth under the situation of queue_2 qualification bandwidth, the service traffics bandwidth that is dispatched in this step among the queue_2 equals this qualification bandwidth, and the medium priority service traffics that exceed queue_2 qualification bandwidth are scheduled among the queue_3.
Step 512, according to current link remaining bandwidth, with the low priority traffice flow scheduling in queue_3.
In this step, when the schedules low priority service traffics, need at first calculate current link remaining bandwidth, if current link remaining bandwidth is not less than the low priority traffice flow bandwidth, then with the low priority traffice flow scheduling in queue_3.If current link remaining bandwidth is less than the low level service traffics earlier of disturbing, and high priority or medium priority service traffics in queue_3, have been dispatched, high priority that then will be wherein or the partial discharge in the medium priority service traffics or all flow from queue_3, remove, so that hold the low priority traffice flow, the bandwidth of the service traffics that removed is current link remaining bandwidth (if this difference, then removes whole high priorities and low priority traffice flow greater than high priority that exists among the queue_3 and low priority traffice flow bandwidth) for the low priority traffice bandwidth deducts.If current link remaining bandwidth is less than the low priority traffice flow, and do not have high priority or low priority traffice flow in queue_3, the low priority traffice flow scheduling that then will be no more than current link remaining bandwidth is in queue_3.In this step, if the queue_3 queue full then carries out packet loss according to the principle of tail drop and handles.
Wherein, the remaining bandwidth of physical link can calculate according to following formula:
The remaining bandwidth of physical link=physical link bandwidth-queue_1 is dedicated bandwidth-queue_2 dedicated bandwidth-queue_3 dedicated bandwidth.
In the above-mentioned flow process, low Priority Queues is if queue full then carries out packet loss according to the principle of tail drop and handles.
In order to simplify implementation procedure, the embodiment of the invention is further improved on the basis of flow process shown in Fig. 5 A, obtains the flow process shown in Fig. 5 B, and as shown in the figure, this flow process can comprise:
Step 520 will be no more than the high-priority service flow scheduling of qualification bandwidth of queue_1 in queue_1.Exceed at the high-priority service flow bandwidth under the situation of queue_1 qualification bandwidth, the service traffics bandwidth that is dispatched in this step among the queue_1 equals this qualification bandwidth.
Step 521 is dispatched to the medium priority service traffics that are no more than the qualification bandwidth of queue_2 among the queue_2.Exceed in medium priority service traffics bandwidth under the situation of queue_2 qualification bandwidth, the service traffics bandwidth that is dispatched in this step among the queue_2 equals this qualification bandwidth.
Step 522 will be no more than the low priority traffice flow scheduling of current link remaining bandwidth in queue_3.Exceed at the priority service flow bandwidth under the situation of current link remaining bandwidth, the service traffics bandwidth that is dispatched in this step among the queue_3 equals this link remaining bandwidth.
Step 523 is judged the current link remaining bandwidth that whether also has, and whether is also had the not high-priority service flow of scheduling, if then change step 524 over to; Otherwise change step 525 over to.
Step 524, with not the scheduling the high-priority service flow scheduling to queue_3.Wherein, the total bandwidth that is dispatched to the service traffics among the queue_3 should not surpass the maximum bandwidth (being that the total bandwidth of current link deducts the bandwidth that queue_1 and queue_2 have used) of this formation.
Step 525 is judged the current link remaining bandwidth that whether also has, and whether is also had the not medium priority service traffics of scheduling, if then change step 526 over to; Otherwise process ends.
Step 526 is dispatched to queue_3 with the medium priority service traffics of not dispatching.Wherein, the total bandwidth that is dispatched to the service traffics among the queue_3 should not surpass the maximum bandwidth (being that the total bandwidth of current link deducts the bandwidth that queue_1 and queue_2 have used) of this formation.
In the above-mentioned flow process,, dispatch in the process of the service traffics in each priority query and (promptly transmit the service traffics among the queue_1 earlier, transmit the service traffics among the queue_2 again, transmit the service traffics among the queue_3 at last) according to priority order from high to low.If except the low priority traffice flow is arranged, also have the higher priority service traffics among the queue_3, then at first send the low priority traffice flow among the queue_3, again according to the order that enters the queue_3 formation, send the service traffics of other priority.
In order more clearly to set forth technical scheme provided by the invention, be further detailed below in conjunction with concrete application.
For example, to have other service traffics of high priority be 1M, have other service traffics of medium priority is 0.8M, have other service traffics of low priority is that to allow utilized bandwidth be that to allow utilized bandwidth be that 1M, port total bandwidth are that to allow utilized bandwidth be remaining bandwidth (being the employed bandwidth of other service traffics of port total bandwidth-high priority other service traffics of employed bandwidth-medium priority) for 2M, low Priority Queues for 0.5M, middle Priority Queues for 0.2M, high Priority Queues.
By adopting technical scheme provided by the invention, it is 0.5M that high Priority Queues allows utilized bandwidth, and then having in other service traffics of high priority has 0.5M to be injected into high Priority Queues, and the 0.5M of overage is downgraded in the low Priority Queues; It is 1M that middle Priority Queues allows utilized bandwidth, and all have other service traffics of medium priority 0.8M and are injected into middle Priority Queues; It is 0.7M (0.8M that other service traffics of 0.5M-medium priority that other service traffics of 2M-high priority take take) that low Priority Queues allows utilized bandwidth, all have other service traffics of low priority 0.2M and are injected into low Priority Queues, still remain 0.5M in the low Priority Queues this moment, 0.5M distributed to other service traffics of 0.5M high priority that are downgraded to low Priority Queues.
Further, the high Priority Queues 0.5M of egress router priority scheduling, this moment, link bandwidth remained 1.5M; Priority Queues 0.8M in dispatching again, this moment, link bandwidth remained 0.7M; The low Priority Queues 0.7M of scheduling at last, this moment, the link remaining bandwidth was 0, bandwidth is utilized fully.As shown in Figure 5, for adopting the resultant effect schematic diagram after the technical scheme provided by the invention.
Based on identical technical conceive, the embodiment of the invention also provides a kind of service traffics dispatching device based on priority query.
Referring to Fig. 7, the structural representation that provides for the embodiment of the invention based on the service traffics dispatching device of priority query.The communication equipment of (as transmitting) function that this device can be applicable to have the service traffics scheduling is as router.Corresponding service traffics priority was provided with priority first, second and the 3rd priority query from high to low during this was provided with, and wherein, first and second priority queries are respectively arranged with the qualification bandwidth, and are concrete, and this device can comprise:
First scheduler module 701, be used for that bandwidth is no more than first priority query and limit the first priority service flow scheduling of bandwidth to first priority query, bandwidth is no more than the second priority service flow scheduling that second priority query limits bandwidth in second priority query, bandwidth is no more than in the 3rd priority service flow scheduling to the three priority queries of link remaining bandwidth;
Second scheduler module 702 is used for still having the link remaining bandwidth and also having under the situation that the first priority service flow is not scheduled, and will be no more than this remaining bandwidth and also not in the first priority service flow scheduling to the, three priority queries of scheduling; Afterwards, still have the link remaining bandwidth and also having under the situation that the second priority service flow is not scheduled, will be no more than this remaining bandwidth and also not in the second priority service flow scheduling to the, three priority queries of scheduling.
Said apparatus also can comprise the 3rd scheduler module 703, is used for according to priority order from high to low, and service traffics are wherein transmitted in formation one by one.Further, the 3rd scheduler module 703 can be according to priority order from high to low, formation is transmitted in the process of service traffics wherein one by one, when the service traffics in forwarding the 3rd priority query, at first transmit the 3rd priority service flow wherein, after the 3rd priority service flow is finished in forwarding, if also have other priority service flow in the 3rd priority query, then, transmit described other priority service flow according to the sequencing that enters the 3rd priority query.
In the said apparatus, second scheduler module 702 also can be used for: do not had remaining bandwidth at current link, but still had service traffics not to be dispatched under the situation in the priority query, abandoned the service traffics that also are not dispatched in the priority query.
In the said apparatus, first scheduler module 701 and second scheduler module 702 can be determined the link remaining bandwidth in such a way: deduct first priority query, second priority query and the 3rd priority query dedicated bandwidth respectively from the physical link total bandwidth, obtain the link remaining bandwidth.
Wherein, each module of apparatus of the present invention can be integrated in one, and also can separate deployment.Above-mentioned module can be merged into a module, also can further split into a plurality of submodules.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize by hardware, also can realize by the mode that software adds necessary general hardware platform.Based on such understanding, technical scheme of the present invention can embody with the form of software product, it (can be CD-ROM that this software product can be stored in a non-volatile memory medium, USB flash disk, portable hard drive etc.) in, comprise some instructions with so that computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
It will be appreciated by those skilled in the art that accompanying drawing is the schematic diagram of a preferred embodiment, module in the accompanying drawing or flow process might not be that enforcement the present invention is necessary.
It will be appreciated by those skilled in the art that the module in the device among the embodiment can be distributed in the device of embodiment according to the embodiment description, also can carry out respective change and be arranged in the one or more devices that are different from present embodiment.The module of the foregoing description can be merged into a module, also can further split into a plurality of submodules.
The invention described above sequence number is not represented the quality of embodiment just to description.
More than disclosed only be several specific embodiment of the present invention, still, the present invention is not limited thereto, any those skilled in the art can think variation all should fall into protection scope of the present invention.