CN115622952A - Resource scheduling method, device, equipment and computer readable storage medium - Google Patents

Resource scheduling method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN115622952A
CN115622952A CN202110785712.9A CN202110785712A CN115622952A CN 115622952 A CN115622952 A CN 115622952A CN 202110785712 A CN202110785712 A CN 202110785712A CN 115622952 A CN115622952 A CN 115622952A
Authority
CN
China
Prior art keywords
service
queue
scheduling
queues
proportion
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202110785712.9A
Other languages
Chinese (zh)
Inventor
晏思宇
郑晓龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202110785712.9A priority Critical patent/CN115622952A/en
Publication of CN115622952A publication Critical patent/CN115622952A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/15Interconnection of switching modules
    • H04L49/1515Non-blocking multistage, e.g. Clos
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/622Queue service order
    • H04L47/6225Fixed service order, e.g. Round Robin
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/622Queue service order
    • H04L47/623Weighted service order

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a resource scheduling method, a resource scheduling device and a computer readable storage medium, and relates to the technical field of communication. The method is applied to the resource scheduling equipment and comprises the following steps: distributing a plurality of received service messages to N queues according to service types, wherein N is more than or equal to 2; identifying a traffic characteristic of each of the N queues for indicating resource demand; and determining the scheduling proportion of the N queues according to the service characteristics of the N queues, and allocating resources for the N queues according to the scheduling proportion. The method enables the determined scheduling proportion to be self-adaptively adjusted according to the service characteristics, and the service characteristics can indicate the resource requirements corresponding to the queues, so that the determined scheduling proportion can better meet the resource requirements of the service, and the resources distributed for the N queues according to the scheduling proportion are fairer and more reasonable.

Description

Resource scheduling method, device, equipment and computer readable storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a resource scheduling method, apparatus, device, and computer readable storage medium.
Background
In a data communication network, there are service packets of multiple service types, for example, throughput-sensitive service packets and delay-sensitive service packets, and since the multiple service packets share an egress port bandwidth of the same switch, it is necessary to perform resource scheduling such as reasonable bandwidth on the multiple service packets, so as to avoid congestion caused by the service packets of multiple service types in the network, and ensure quality of service (QoS) of different services.
In the related art, the resource scheduling method includes Weighted Round Robin (WRR), deficit Round Robin (DRR), or Priority Queue (PQ). The WRR and the DRR set the scheduling proportion of each flow according to the static weight, and schedule each service flow in turn based on the scheduling proportion, but the static weight cannot represent the real bandwidth requirement, so that the set scheduling proportion is not matched with the real bandwidth requirement of the service flow, and further unfairness of broadband resource scheduling is caused; for the PQ scheduling method, service messages with high priority are scheduled preferentially, when the service messages with high priority exist continuously, the service messages in a low priority queue have difficulty in scheduling opportunities, and the QoS of the services in the low priority queue is affected. Therefore, none of the resource scheduling methods in the related art can satisfy the bandwidth scheduling requirement.
Disclosure of Invention
The application provides a resource scheduling method, a resource scheduling device and a computer readable storage medium, which are used for adaptively adjusting the scheduling proportion of a queue through the service characteristics of the queue, so that the determined scheduling proportion can better meet the resource requirement of a service, and further, the allocated resources are more fair and reasonable.
In a first aspect, a resource scheduling method is provided, and the method is applicable to a resource scheduling device, and the method includes: distributing a plurality of received service messages to N queues according to service types, wherein N is more than or equal to 2; identifying the service characteristics of each queue in the N queues to obtain N service characteristics, wherein each service characteristic in the N service characteristics is used for indicating the resource requirement of the corresponding queue; and determining the scheduling proportion of the N queues according to the service characteristics of the N queues, and allocating resources for the N queues according to the scheduling proportion.
The scheduling proportion of the N queues is determined according to the service characteristics of the N queues, so that the determined scheduling proportion can be adjusted in a self-adaptive mode according to the service characteristics, and the service characteristics can indicate the resource requirements of the corresponding queues, so that the determined scheduling proportion can meet the resource requirements of the service, and the resources distributed for the N queues according to the scheduling proportion are fair and reasonable.
In a possible implementation, determining the scheduling proportion of the N queues according to the N traffic characteristics includes: when the first service characteristic indicates that the burst flow exists, setting the scheduling proportion of a first queue corresponding to the first service characteristic to be higher than the scheduling proportion of other queues, wherein the first queue is any one of the N queues.
When the first service characteristic indicates that the burst flow exists, the transmission performance of the service message in the first queue can be improved by setting the scheduling proportion of the first queue corresponding to the first service characteristic to be higher than the scheduling proportions of other queues.
In one possible implementation, identifying traffic characteristics for each of the N queues includes: for a first queue, detecting the occupation condition of a service message in the first queue to a cache; and identifying the service characteristics of the first queue according to the occupation condition of the service messages in the first queue to the cache.
And identifying the service characteristics of the N queues according to the occupation condition of the cache, so that the identified service characteristics are more accurate, and the resource requirements reflected and indicated by the service characteristics are more in line with the actual condition.
In a possible implementation manner, identifying the service characteristics of the first queue according to the occupancy of the service packet in the first queue to the buffer includes: and when the change of the cache occupation proportion or the total cache occupation amount of the service messages in the first queue exceeds a set threshold value, determining the service characteristics of the first queue as first service characteristics.
And identifying the service characteristics of the N queues according to the change condition of the occupation proportion or the total occupation amount of the cache, thereby improving the accuracy of identifying the service characteristics.
In a possible implementation manner, when a change of a cache occupancy ratio or a total cache occupancy amount of the service packets in the first queue exceeds a set threshold, determining the service characteristic of the first queue as a first service characteristic includes: acquiring the jump times of the cache occupation proportion or the total cache occupation amount of a first queue in a reference period, wherein the jump times are times that the change amplitude of the cache occupation proportion or the total cache occupation amount is larger than a set threshold value; and determining the service characteristic of the first queue as a first service characteristic in response to the number of hops being less than the reference number.
And identifying the service characteristics of the N queues according to the buffer occupation proportion or the jump times of the total buffer occupation in a certain time, thereby further improving the accuracy of identifying the service characteristics.
In a possible implementation, determining the scheduling proportion of the N queues according to the N traffic characteristics includes: and when the N service characteristics are the same, determining the scheduling proportion of the N queues based on the ratio of the input rates of the N queues.
And for N queues with the same service characteristics, corresponding resource scheduling is allocated according to the ratio of the input rates of the N queues, so that the fairness of resource scheduling is further improved.
In a possible implementation manner, before determining the scheduling proportion of the N queues according to the N traffic characteristics, the method further includes: determining the input rate of the N queues according to the rate of the service message entering each of the N queues; alternatively, the input rate for each of the N queues is obtained by adjusting a round-robin (RR) schedule, the RR schedule including a WRR or a DRR.
The input rate of the service message of each queue in the N queues or the input rate obtained by regulating RR scheduling represents the real resource requirement, and the fairness of resource scheduling is further improved.
In a possible implementation manner, allocating the received multiple service packets to N queues according to service types includes: acquiring the service types of the plurality of service messages according to the protocol type fields in the plurality of service messages; and distributing the plurality of service messages to queues corresponding to respective service types.
The service type of the service message is identified according to the protocol type field in the service message, so that the identified service type is more accurate, and a plurality of service messages can be accurately distributed to the queues corresponding to the respective service types.
In a possible implementation manner, after determining the scheduling proportions of the N queues according to the service features of the N queues, the method further includes: and sending the scheduling proportion of the N queues to the upstream equipment.
After the scheduling proportion is confirmed locally, the scheduling proportion is sent to the upstream equipment, so that the upstream equipment can set the same scheduling strategy, and the resource scheduling efficiency is improved.
In one possible implementation, the resources allocated for the N queues include at least one of bandwidth resources and cache resources. The distributed resource types are various, so that the method provided by the application has stronger adaptability and wider application range.
In a second aspect, an apparatus for resource scheduling is provided, where the apparatus is applied to a resource scheduling device, and the apparatus includes:
the distribution module is used for distributing the received service messages to N queues according to service types, wherein N is more than or equal to 2;
an identifying module, configured to identify a service feature of each of the N queues to obtain N service features, where each of the N service features is used to indicate a resource requirement of a corresponding queue;
and the scheduling module is used for determining the scheduling proportion of the N queues according to the N service characteristics and allocating resources to the N queues according to the scheduling proportion.
In a possible implementation manner, the scheduling module is configured to set, when a first service characteristic indicates that a burst exists, a scheduling ratio of a first queue corresponding to the first service characteristic to be higher than scheduling ratios of other queues, where the first queue is any one of the N queues.
In a possible implementation manner, the identifying module is configured to detect, for the first queue, an occupation condition of the service packets in the first queue to a cache; and identifying the service characteristics of the first queue according to the occupation condition of the service messages in the first queue to the cache.
In a possible implementation manner, the identification module is configured to determine that the service feature of the first queue is the first service feature when a change of a cache occupancy proportion or a cache occupancy total amount of the service packets in the first queue exceeds a set threshold.
In a possible implementation manner, the identifying module is configured to obtain a number of transitions of a cache occupancy proportion or a total cache occupancy amount of the first queue in a reference period, where the number of transitions is a number of times that a variation amplitude of the cache occupancy proportion or the total cache occupancy amount is greater than a set threshold; and determining the service characteristic of the first queue as a first service characteristic in response to the number of hopping times being smaller than a reference number.
In a possible implementation manner, the scheduling module is configured to determine the scheduling ratio of the N queues based on a ratio of input rates of the N queues when the N traffic characteristics are the same.
In one possible implementation, the apparatus further includes:
a determining module, configured to determine input rates of the N queues according to rates at which service messages enter each of the N queues; or, the input rate of each queue in the N queues is obtained by adjusting polling RR scheduling, wherein the RR scheduling comprises weighted circular scheduling WRR or differential circular scheduling DRR.
In a possible implementation manner, the allocation module is configured to obtain the service types of the multiple service messages according to protocol type fields in the multiple service messages; and distributing the plurality of service messages to queues corresponding to respective service types.
In one possible implementation, the apparatus further includes: and the sending module is used for sending the scheduling proportions of the N queues to upstream equipment.
In a possible implementation manner, the resources allocated to the N queues include at least one of bandwidth resources and cache resources.
In a third aspect, a resource scheduling apparatus is provided, and the resource scheduling apparatus includes: a processor, coupled to a memory, where at least one program instruction or code is stored, where the at least one program instruction or code is loaded by and executed by the processor, so as to enable the resource scheduling apparatus to implement the resource scheduling method in the first aspect or any one of the possible implementation manners of the first aspect.
The processor(s) and the memory(s) are one or more of an exemplary embodiment.
As an example embodiment, the memory may be integrated with the processor or provided separately from the processor.
In a specific implementation process, the memory may be a non-transitory (non-transitory) memory, such as a read-only memory (ROM), which may be integrated on the same chip as the processor, or may be separately disposed on different chips, and the embodiment of the present application does not limit the type of the memory and the arrangement manner of the memory and the processor.
In a fourth aspect, a communication apparatus is provided, the apparatus comprising: a transceiver, a memory, and a processor. Wherein the transceiver, the memory and the processor are in communication with each other via an internal connection path, the memory is configured to store instructions, and the processor is configured to execute the instructions stored by the memory to control the transceiver to receive signals and control the transceiver to transmit signals, and when the processor executes the instructions stored by the memory, to cause the communication device to perform the resource scheduling method as described above in any one of the possible implementations of the first aspect or the first aspect.
In a fifth aspect, there is provided a computer-readable storage medium, having at least one instruction stored therein, where the instruction is loaded and executed by a processor, so as to enable a computer to implement the resource scheduling method according to any one of the foregoing first aspect or any one of the possible implementation manners of the first aspect.
In a sixth aspect, a computer program (product) is provided, the computer program (product) comprising: computer program code for causing a computer to perform a method of resource scheduling as described above in the first aspect or any one of the possible embodiments of the first aspect when the computer program code is run by the computer.
In a seventh aspect, a chip is provided, which includes a processor, and is configured to invoke and execute instructions stored in a memory, so that a communication device in which the chip is installed executes the resource scheduling method according to any one of the foregoing first aspect or any one of the possible implementations of the first aspect.
In an eighth aspect, another chip is provided, which includes: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected by an internal connection path, the processor is configured to execute codes in the memory, and when the codes are executed, the processor is configured to execute the resource scheduling method according to any one of the foregoing first aspect or any one of the possible implementations of the first aspect.
It should be understood that, for the technical effects achieved by the technical solution of the second aspect and the corresponding possible implementation manner of the embodiment of the present application, reference may be made to the technical effects of the first aspect and the corresponding possible implementation manner, and details are not described here.
Drawings
Fig. 1 is a schematic diagram of a network structure according to an embodiment of the present application;
fig. 2 is a schematic diagram of a process of a spine switch transmitting a service in the network structure shown in fig. 1;
fig. 3 is a schematic diagram of another network structure provided in the embodiment of the present application;
fig. 4 is a flowchart of a resource scheduling method according to an embodiment of the present application;
fig. 5 is a flowchart of another resource scheduling method according to an embodiment of the present application;
fig. 6 is a flowchart illustrating a method for identifying service features of a queue according to an embodiment of the present disclosure;
fig. 7 is a schematic diagram of a scheduling result according to an embodiment of the present application;
fig. 8 is a schematic diagram of another scheduling result provided in the embodiment of the present application;
fig. 9 is a schematic diagram of another scheduling result provided in an embodiment of the present application;
fig. 10 is a schematic structural diagram of a resource scheduling apparatus according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of another resource scheduling apparatus according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a network device according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of another network device according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
The embodiment of the application provides a resource scheduling method, which can be applied to resource scheduling equipment. The embodiment of the application does not limit the product form of the resource scheduling device, and the resource scheduling device may be a network device such as a switch or a server. Taking the example of applying the method to the data center 2-level CLOS network structure shown in fig. 1, the network structure includes a plurality of servers (servers), a plurality of leaf switches (leaf) and a plurality of backbone switches (spine). Illustratively, the resource scheduling device may be a spine switch under the network architecture shown in fig. 1. Leaf switches are also known as top-of-rack (TOR) switches.
The downstream port of each spine switch is connected with a leaf switch, the leaf switch is connected with a server, and the leaf switch is connected with all spine switches. And the service messages of servers connected under different leaf switches are all transmitted to the spine switch. Because the server can process different service types, the network architecture shown in fig. 1 can be used for packet transmission in a multi-service hybrid scenario, and thus, the resource scheduling device can be used for resource scheduling in a multi-service hybrid scenario.
In a multi-service mixed scene, the service types processed by the server include multiple types, so that the spine switch receives service messages of different service types. For example, the service types processed by the server include a traditional Transmission Control Protocol (TCP) service and a Remote Direct Memory Access (RDMA) service, and therefore, the spine switch may receive a TCP service packet and an RDMA service packet. The RDMA service includes, but is not limited to, a distributed machine learning training service, a High Performance Computing (HPC) service, a distributed storage service, and the like.
The services of the same type can be further distinguished, and exemplarily, in a multi-service mixed scenario, the service types processed by the server can be further distinguished according to mixed services with high throughput and low time delay. For example, traffic packets of the same protocol, such as TCP traffic packets, can be classified into throughput-sensitive traffic and delay-sensitive traffic. The throughput sensitivity service includes but is not limited to batch processing and data mining services, and the delay sensitivity service includes but is not limited to query service and interactive analysis service.
No matter the multi-service mixed scene is the mixing of two services of TCP and RDMA, or the mixing of throughput sensitivity service and delay sensitivity service, the mixed multi-type service messages can share resources such as an outlet port bandwidth and the like in the same switch. As shown in fig. 2, taking the mixture of TCP and RDMA services as an example, the upstream port (output port) of spine divides the TCP service and RDMA service into two queues for transmission. Because the service messages of different queues share the same output port bandwidth of the spine switch or share the same cache space of the spine switch, how to carry out reasonable resource scheduling is a key factor influencing service performance.
According to the resource scheduling method provided by the embodiment of the application, the service characteristics of different queues, which can reflect resource requirements, are identified, and the scheduling proportion of the queues is determined according to the service characteristics, so that the determined scheduling proportion can be adaptively adjusted according to the service characteristics, the resource requirements of services are better met, the optimal scheduling under multi-service mixing is realized, and the resources allocated to each queue are more fair and reasonable.
It should be noted that the above-mentioned 2-level CLOS network architecture is only one exemplary network structure applied in the embodiment of the present application. The method provided by the embodiment of the application can also be applied to a 3-level CLOS network structure. Referring to fig. 3, compared with the 2-level CLOS network architecture, the 3-level CLOS network architecture has an additional Aggregation (AGG) switch, a downstream port of the AGG switch is connected to a leaf switch, an upstream port of the AGG is connected to a spine switch, and the 3-level CLOS network architecture can expand the network size. During actual deployment, the number of servers, leaf switches, AGG switches and spine switches can be flexibly adjusted according to factors such as network scale, application type and the like. In addition, the embodiment of the present application may also be applied to a mesh network, a torus network, and a non-data center network, and the embodiment of the present application does not limit a network structure to which the method is applied.
The resource scheduling method provided in this embodiment is described with reference to the network structure shown in fig. 1 or fig. 3, by taking the resource scheduling device that executes the method as a spine switch as an example. Referring to fig. 4, the method includes the following steps 401 to 404.
Step 401, distributing the received multiple service messages to N queues according to service types, where N is greater than or equal to 2.
In a multi-service mixed scene, the resource scheduling device may continuously receive a plurality of service messages of different types. The service packet in the multi-service mixed scenario includes but is not limited to: service messages under different protocols; or service messages with different service requirements under the same protocol. The service requirement refers to requirements for services such as bandwidth, delay jitter, packet loss rate, and the like, for example, throughput-sensitive service packets (such as batch processing and data mining services) require a large bandwidth, and delay-sensitive services (such as query and interactive analysis services) require a very small delay.
Generally, in a multi-service mixed scenario, after receiving multiple service messages of different types, a resource scheduling device allocates the service messages to different queues for transmission according to the service types at an output port of the resource scheduling device, so as to reasonably schedule resources to the different queues. The embodiment of the application does not limit the dividing mode of the N queues, as long as the mixed service message can be distributed to the N queues according to the service type according to the fixed rule.
In a possible implementation manner, allocating a plurality of received service packets to N queues according to service types includes: acquiring the service types of the plurality of service messages according to the protocol type fields in the plurality of service messages; and distributing the plurality of service messages to queues corresponding to respective service types. The embodiment of the application does not limit the format content of the service messages, each service message can carry a corresponding protocol type field, the protocol type field is used for indicating the protocol type of the service message, and the service type to which the service message belongs can be determined through the protocol type, so that after the resource scheduling equipment receives a plurality of service messages, the protocol type field of each service message can be analyzed, and the service types of the service messages are determined based on the protocol type field.
For example, taking the service type of the service packet as an example, including a TCP service packet and an RDMA service packet, both the TCP service packet and the RDMA service packet belong to a persistent service. And determining whether the protocol type of the service message belongs to a TCP (transmission control protocol) protocol or an RDMA (remote direct memory access) protocol by analyzing the protocol type field of the service message, and further determining whether the service message is the TCP service message or the RDMA service message.
After the service type of each service message is determined, the resource scheduling device can allocate the received service messages to the corresponding queues according to the service types. For example, one queue corresponds to one service type, and thus a plurality of service messages can be allocated to the queues corresponding to the respective service types.
Step 402, identifying a service characteristic of each of the N queues to obtain N service characteristics, each of the service characteristics being used to indicate a resource requirement of the corresponding queue.
After distributing a plurality of received service messages to N queues according to service types, even if the service messages distributed to the same queue belong to the same service type, the resource requirements of the service messages in the same queue are different, and taking the example of indicating the resource requirements of corresponding queues through service characteristics, the service characteristics of different queues may be the same or different. For example, a queue containing a TCP service packet may have the same service characteristics as a queue containing an RDMA service packet, or may have different service characteristics. In addition, in the process of continuously receiving the service packet, the service characteristics of each queue may also be changed, that is, the service characteristics of the same queue at different times may be the same or different.
In any case, since the N queues share the resource of the same resource scheduling device, such as the bandwidth of the egress port, how the resource scheduling device reasonably schedules the resource to each queue is a key that affects the performance of the service. For example, service packets with different service characteristics have different resource requirements, a larger proportion of resources should be scheduled for a service packet whose resource requirements are to be completed quickly to ensure the service performance of the service packet, and corresponding resources should be scheduled for a service packet which is transmitted stably for a long time according to the actual requirements. Therefore, in order to satisfy the service performance of the service packet with different service characteristics, the service characteristics of each of the N queues need to be identified first.
In one possible implementation, the traffic characteristics of the queue may be identified based on the occupancy of the buffer. In one possible embodiment, identifying the traffic characteristics of each of the N queues includes: and for each queue in the N queues, detecting the occupation condition of the service messages in the queue to the buffer, and identifying the service characteristics of the queue according to the occupation condition of the service messages in the queue to the buffer.
The traffic characteristic of the queue may be a first traffic characteristic. The first service characteristic indicates that a burst (burst) flow exists in the queue, where the burst flow refers to a service flow which occurs suddenly and has a large flow demand but is often short in duration, that is, a service flow which needs a large broadband in a short time, for example, a flow generated by a distributed machine learning training service. In the embodiment of the present application, the first service feature is also referred to as a burst service feature.
The traffic characteristic of the queue may also be a second traffic characteristic. And the second service characteristic indicates that long steady flow exists in the queue, wherein the long steady flow refers to a service message stably transmitted for a long time. In the embodiment of the present application, the second service feature is also referred to as a long steady flow service feature.
When a service message with a service characteristic of a first service characteristic appears, the buffer occupation situation is greatly changed (for example, the change of the buffer occupation proportion or the total buffer occupation amount exceeds a set threshold), and when a service message with a service characteristic of a second service characteristic appears, the buffer occupation situation is not greatly changed. Optionally, identifying the service characteristics of the first queue according to the occupancy of the buffer by the service packet in the first queue includes: and when the change of the proportion of occupied buffers or the total quantity of occupied buffers of the service messages in the first queue exceeds a set threshold value, determining the service characteristics of the first queue as first service characteristics. That is, once the change of the buffer occupancy proportion or the total buffer occupancy of the first queue exceeds the set threshold, the traffic characteristic of the first queue may be determined as the first traffic characteristic, and the scheduling proportion is determined for each queue based on the condition that the traffic characteristic is the first traffic characteristic.
The embodiment of the application does not limit the condition that the change of the proportion or the total amount of the buffer occupancy exceeds the set threshold. For example, the change of the buffer occupancy ratio exceeding the set threshold may be that a ratio difference between before and after the change of the buffer occupancy ratio is greater than a first threshold, and the first threshold may be set empirically or flexibly adjusted according to an application scenario, and exemplarily, the first threshold is 20%; for another example, the change of the buffer occupancy ratio exceeding the set threshold may be that a ratio of the changed buffer occupancy ratio to the buffer occupancy ratio before the change is greater than a second threshold, and the second threshold may be set empirically or flexibly adjusted according to an application scenario, and exemplarily, the second threshold is 2. The change of the total buffer occupancy amount exceeding the set threshold may be, for example, that a difference between the total buffer occupancy amount after the change and the total buffer occupancy amount before the change is greater than a third threshold, which is 100 mbits for example. The change of the total buffer occupancy amount exceeds the set threshold may also be that a ratio of the total buffer occupancy amount after the change to the total buffer occupancy amount before the change is greater than a fourth threshold, and exemplarily, the fourth threshold is 3.
In a possible implementation manner, when a change of a buffer occupancy proportion or a buffer occupancy total amount of service messages in the first queue exceeds a set threshold, determining a service characteristic of the first queue as a first service characteristic includes: acquiring the hop frequency of the buffer occupation proportion or the buffer occupation total quantity of a first queue in a reference period, wherein the hop frequency is the frequency that the change amplitude of the buffer occupation proportion or the buffer occupation total quantity is larger than a set threshold value; and determining the service characteristic of the first queue as a first service characteristic in response to the number of hops being less than the reference number. The reference period may be set empirically or flexibly adjusted according to an application scenario, for example, the reference period may be 5 scheduling policy adjustment periods; the reference times can be set according to experience or flexibly adjusted according to application scenes, for example, the reference times can be 3 times; the set threshold may be set empirically or flexibly adjusted according to application scenarios, for example, the set threshold may be 20% when the variation range is a difference value, and the set threshold may be 2 when the variation range is a multiple value. And identifying the service characteristics of each queue according to the buffer occupation proportion or the jump times of the total buffer occupation in a certain time, thereby further improving the accuracy of identifying the service characteristics.
In a possible implementation manner, when the number of hops of the buffer occupation proportion or the total buffer occupation amount of the first queue is greater than the reference number, further judgment can be made through the average bandwidth of the first queue in the reference period to identify the service characteristics of the first queue more accurately.
Exemplarily, the number of transitions of the cache occupancy proportion or the total cache occupancy of the first queue in the reference period is obtained; and in response to the hopping times being larger than the reference times and the average bandwidth of the first queue in the reference period not being larger than the reference threshold, determining the traffic characteristic of the first queue as a first traffic characteristic. Alternatively, the reference threshold may be set empirically or flexibly adjusted according to the application scenario, for example, the reference threshold is 50%.
In one possible embodiment, the method further comprises: acquiring the buffer occupation proportion or the jump times of the total buffer occupation of the first queue in a reference period; and in response to the hopping times being larger than the reference times and the average bandwidth of the first queue in the reference period being larger than the reference threshold, determining the traffic characteristic of the first queue as a second traffic characteristic.
Optionally, when the change of the cache occupancy ratio or the total cache occupancy exceeds a set threshold, after determining that the service characteristic of the first queue is the first service characteristic, determining a scheduling ratio for each queue based on a condition that the service characteristic is the first service characteristic. And then, further judging the buffer occupation proportion of the first queue in the reference period or the jump times of the total buffer occupation, if the jump times are larger than the reference times and the average bandwidth of the first queue in the reference period is larger than a reference threshold value, determining that the service characteristic of the first queue is a second service characteristic, and adjusting the scheduling proportion of each queue again based on the condition that the service characteristic is the second service characteristic.
When the average bandwidth of the first queue in the reference period is further judged, if the average bandwidth of the first queue in the reference period is larger than the reference threshold, the service characteristics of the first queue in the reference period are stable and show burst characteristics, therefore, when the first queue shows the burst characteristics stably, no burst flow indicated by the first service characteristics exists in the first queue, and the service characteristics of the first queue can be identified as second service characteristics; if the average bandwidth of the first queue in the reference period is not greater than the reference threshold, it is indicated that the traffic characteristic of the first queue in the reference period does not stably represent a burst characteristic, and therefore, even if a jump occurs continuously, the change amplitude of the occupancy proportion of the buffer is greater than the set threshold, the jump does not represent a continuous burst characteristic, and the first queue always has a burst flow indicated by the first traffic characteristic, and at this time, the traffic characteristic of the first queue is still identified as the first traffic characteristic.
For the traffic signature identifying a first queue of the N queues, if it is determined that the traffic signature of the first queue is not the first traffic signature, it may be determined that the traffic signature of the first queue is the second traffic signature. Optionally, identifying the traffic characteristics of each of the N queues includes: for a first queue in the N queues, detecting the occupation condition of the service messages in the first queue to a buffer, wherein the first queue is any one of the N queues; and determining the service characteristics of the first queue as second service characteristics in response to the fact that the change of the cache occupation proportion or the cache occupation total amount of the service messages does not exceed a set threshold.
It should be noted that the above is only a case of determining the service characteristic of the first queue as the second service characteristic, but is not limited to other optional manners of the present application, that is, the method provided by the embodiment of the present application also supports using other manners to determine the service characteristic of the first queue as the second service characteristic.
In addition, in the embodiment of the present application, the manner in which the resource scheduling device identifies the service characteristics of each queue of the N queues is not limited, as long as the identified service characteristics can indicate the resource requirements of the corresponding queue. In addition to the above resource scheduling device identifying the service characteristics of each of the N queues based on the buffer occupancy, the resource scheduling device may also identify the service characteristics of each of the N queues based on the packet enqueue rate.
Optionally, the identifying, by the resource scheduling device, the service characteristic of each queue of the N queues based on the message queue entry rate includes: for a first queue in the N queues, detecting the message queue entering rate of the service messages in the first queue, wherein the first queue is any one of the N queues; identifying the service characteristic of the first queue as a first service characteristic in response to that the message queue entry rate of the service messages in the first queue is greater than or equal to a rate threshold; and identifying the service characteristic of the first queue as a second service characteristic in response to the message queue entry rate of the service messages in the first queue being less than a rate threshold. The rate threshold may be set empirically or flexibly adjusted according to an application scenario, for example, the rate threshold is 5 giga transmissions per second (GT/s), and GT/s is used to describe the rate of the physical layer communication protocol, i.e. the number of transmissions per second.
Step 403, determining the scheduling proportion of the N queues according to the service characteristics of the N queues, and allocating resources to the N queues according to the scheduling proportion.
Because the service characteristics can indicate the resource requirements of the corresponding queues, the service characteristics are different, and the resource requirements are also different, the method provided by the embodiment of the application determines the scheduling proportion of each queue based on the service characteristics of each queue after identifying the service characteristics of the queues, so that the scheduling proportion can meet the resource requirements of different queues.
For example, in a case that the service characteristic is the first service characteristic, since the first service characteristic indicates that a burst exists in the queue, the service packet with the first service characteristic is often a temporary service that appears suddenly and has a short occurrence time, and the transmission of the service packet needs to be completed as soon as possible in a short time. Therefore, if the resources are allocated to the queue of the first service feature according to the high-ratio scheduling proportion, the service performance of the service messages of the queue of the first service feature can be ensured, and because the service messages of the first service feature often appear in a short time, the performance of other services cannot be influenced by allocating the resources according to the high-ratio scheduling proportion in a short time.
For the case that the service feature is the second service feature, for example, the service packet in the queue of the second service feature is often a stable long-term service that continuously appears with a certain bandwidth ratio. Therefore, if the resources are allocated to the queue of the second service characteristic according to the real demand and the scheduling proportion of the fair proportion, the stable service performance of the service messages in the queue of the second service characteristic can be ensured under a long time.
The N queues are two queues, and the scheduling resource is the egress port bandwidth of 10 Gbps. A high-ratio scheduling ratio refers to a scheduling ratio allocated to one queue being much larger than a scheduling ratio of another queue, for example, a high-ratio scheduling ratio is 9:1. the scheduling proportion of fair allocation refers to a scheduling proportion which is allocated to two queues fairly according to the real required bandwidth, for example, the real bandwidth requirement of any one queue is 3Gbps, the real bandwidth requirement of the other queue is 9Gbps, and the scheduling proportion of fair allocation is 3:9. wherein Gbps is also called switching bandwidth, which is a unit for measuring the total data switching capacity of the switch, and 1Gbps represents a transmission speed of 1000 megabits per second.
In the embodiment of the present application, at least the following two situations exist when the scheduling ratio is determined according to the service characteristics of the N queues.
In case one, the traffic characteristics of each queue are different.
In this case, the service features of the queues are different, and the embodiments of the present application do not limit different manners, and the service features of each queue may be different from each other, or at least two queues may have different service features but have queues with the same service features. For example, each of the N queues has a service packet of the first service characteristic and a service packet of the second service characteristic at the same time. Because the service packet of the first service feature has a burst characteristic, the queue of the first service feature needs to be scheduled preferentially, that is, resources with high ratio are scheduled for the queue of the first service feature.
In a possible implementation, the service characteristics of the queues are different, and there is a queue with the service characteristic being the first service characteristic, and the scheduling proportion of the queue with the service characteristic being the first service characteristic is higher than that of the queue with the service characteristic being the non-first service characteristic.
In a possible implementation, determining the scheduling proportion of the N queues according to the N traffic characteristics includes: when the first service characteristic indicates that the burst flow exists, setting the scheduling proportion of a first queue corresponding to the first service characteristic to be higher than the scheduling proportion of other queues, wherein the first queue is any one of the N queues.
In a possible implementation manner, the manner of setting the scheduling proportion of the first queue corresponding to the first service characteristic to be higher than the scheduling proportions of the other queues may be: and setting the scheduling proportion value corresponding to the first queue as a first proportion, and setting the scheduling proportion values corresponding to other queues as a second proportion, wherein the first proportion is greater than the second proportion, and the other queues are queues except the first queue in the N queues.
Case two: the traffic characteristics of all queues are the same.
Illustratively, the traffic characteristics of all queues are either the first traffic characteristics or the second traffic characteristics. In this case, it is not necessary to perform priority scheduling on which queue, and resources may be allocated to the N queues according to a scheduling ratio of fair allocation. Optionally, determining the scheduling proportion of the N queues according to the service features of the N queues includes: and when the service characteristics of the queues are the same, determining the scheduling proportion of the N queues as a default proportion. The default ratio includes, but is not limited to, a scheduling ratio initially set for the resource scheduling device.
In a possible implementation manner, determining the scheduling ratio of the N queues according to the service characteristics of the N queues includes: and when the N service characteristics are the same, determining the scheduling proportion of the N queues based on the ratio of the input rates of the N queues. For example, the ratio of the input rates of the N queues is used as the scheduling proportion of the N queues.
In a possible implementation manner, in a manner that the traffic characteristics for each queue are the same, and the scheduling ratio of the N queues is determined based on a ratio of input rates of the N queues, before determining the scheduling ratio of the N queues according to the traffic characteristics of the N queues, the method further includes: determining the input rate of the N queues according to the rate of the service message entering each of the N queues; or, the input rate of each queue in the N queues is obtained by adjusting RR scheduling. The RR scheduling includes any scheduling method derived based on RR scheduling, such as WRR or DRR. Because the obtained input rate is the real bandwidth requirement, the determined scheduling proportion can be matched with the real bandwidth requirement, and the fairness of the scheduling proportion is improved.
In one possible implementation, obtaining the input rate of any one of the N queues by adjusting the WRR includes: performing initialization setting, wherein the lower limit value left =0, the upper limit value right =10, mid = (left + right)/2, and the scheduling proportion of the first queue is [ mid,10-mid ]; acquiring the total bandwidth and the input rate of the first queue, and measuring a broadband ratio B of the input rate of the first queue by the switch; setting left = mid if the wideband duty ratio value B is greater than or equal to mid/10, setting right = B and left = B if the wideband duty ratio value B is less than mid/10; and judging whether the values of left and right are equal, if so, determining the scheduling proportion value of the first queue to be mid, otherwise, recalculating mid = (left + right)/2, and repeating the calculation process.
In a possible implementation manner, after the scheduling ratio is determined, the method provided in the embodiment of the present application further supports real-time dynamic updating of the scheduling ratio according to a change of the service characteristic, that is, the scheduling ratio may be adaptively adjusted based on the service characteristic, so that the service performance of the service packet with different characteristics is satisfied in real time at a very small time scale. Optionally, the service characteristics of each of the N queues are periodically identified according to a scheduling policy adjustment period, and the scheduling ratio is updated in response to a change in the service characteristics of any one of the queues. The scheduling policy adjustment period may be set empirically or flexibly adjusted according to an application scenario, for example, the scheduling policy adjustment period may be 1 second.
In a possible implementation manner, the determining, by the resource scheduling device, the scheduling proportion of the N queues according to the service characteristics of the N queues periodically according to the scheduling policy adjustment period includes: and in each scheduling strategy adjusting period, responding to the change of the service characteristics of any queue in the N queues, and determining the scheduling proportion of the N queues according to the service characteristics of the N queues. That is to say, within one scheduling policy adjustment period, the service characteristics of an identified queue may change, and each time the service characteristics of the identified queue change, the resource scheduling device may adjust the scheduling proportions of the N queues according to the changed service characteristics of the N queues.
Optionally, after determining the scheduling ratio of each queue according to the service characteristics of the N queues, the method further includes: and sending the scheduling proportion of the N queues to the upstream equipment. After the resource scheduling device confirms the scheduling proportion locally, the scheduling proportion is sent to the upstream device, so that the upstream device can set the same scheduling strategy, and the resource scheduling efficiency is improved.
In one possible implementation, the resources allocated to the N queues include at least one of bandwidth resources and buffer resources. Due to the fact that the allocated resource types are various, the method provided by the application is high in adaptability and wide in application range.
Next, referring to fig. 5, a resource scheduling method provided in the embodiment of the present application is illustrated by taking service types including two service types of TCP and RDMA as an example, and taking scheduled resources as an example of an egress port bandwidth.
Step 501, distributing the received multiple service messages to a TCP queue or an RDMA queue.
In this embodiment, the output port of the resource scheduling device includes two queues, a service type corresponding to one queue is a TCP service type, the queue receives a service packet of a TCP protocol, and the queue is referred to as a TCP queue; the other queue corresponds to a service type of RDMA, and receives a service packet of an RDMA protocol, such as an RDMA over converged Ethernet (RoCE) packet of an aggregation Ethernet, and is referred to as an RDMA queue. The resource scheduling device continuously receives service messages comprising two service types of TCP and RDMA, and distributes the received service messages into the TCP queue and the RDMA queue in real time according to the service types. Optionally, the determining manner of the service type of the service packet is not limited in the embodiment of the present application, and the service type of the service packet may be determined by using a protocol type field in a TCP packet and a RoCE packet.
Step 502, identifying traffic characteristics of a TCP queue and an RDMA queue.
In the embodiment of the application, the resource scheduling device allocates a plurality of received service messages to the TCP queue and the RDMA queue, so that the TCP queue and the RDMA queue include corresponding service messages, and further, service characteristics are identified based on the service messages in the TCP queue and the RDMA queue. Alternatively, taking the scheduling policy adjustment period as T (T is a real number greater than 0, and is a unit of seconds), taking the identification of the traffic characteristics of the TCP queue based on the occupancy of the buffer as an example, as shown in fig. 6, the identification of the traffic characteristics of the TCP queue includes the following steps 5021 to 5025.
Step 5021, detecting whether a burst occurs in a TCP queue; if so, the following step 5022 is performed; if not, the following step 5024 is performed.
In a possible implementation manner, the scheduling policy adjustment period is T, burst is short bursty service, and this step 5021 is to detect whether a burst occurs in a service packet in a TCP queue within the scheduling policy adjustment period T. The detection scheduling policy adjustment period T may be set empirically or flexibly adjusted according to an application scenario. For example, T may be 30 seconds; the scheduling policy adjustment period is T, which means that the scheduling policy is adjusted once every T time, that is, the scheduling proportion is updated once every T time. Therefore, if the time range set by the scheduling policy adjustment period T is small enough, dynamic scheduling of resources such as bandwidth can be realized at a very small time scale according to the scheduling proportion obtained in real time, and the capacity of scheduling the occupation proportion of resources such as bandwidth at each moment between the TCP queue service and the RDMA queue service can be provided.
The embodiment of the present application does not limit the way of detecting whether burst occurs, including but not limited to: detecting the occupation condition of the traffic message in the TCP queue to the buffer in the scheduling policy adjustment period T, when the occupation proportion of the buffer or the change of the total occupied amount of the buffer exceeds a set threshold, considering that the burst occurs in the scheduling policy adjustment period T, indicating that the traffic feature in the TCP queue in the scheduling policy adjustment period T is the burst traffic, and temporarily marking the traffic feature as T b Executing 5022, and simultaneously executing 5025; otherwise, the scheduling strategy is considered to have no burst in the scheduling strategy adjusting period T, the service characteristic in the TCP queue in the scheduling strategy adjusting period T is indicated to be long steady flow service, and the mark is T nb The following step 5024 is performed.
The method and the device do not limit the situation that the change of the buffer occupancy proportion or the total buffer occupancy exceeds the set threshold. For example, the change of the buffer occupancy ratio exceeding the set threshold may be that a ratio difference between before and after the change of the buffer occupancy ratio is greater than a first threshold, and the first threshold may be set empirically or flexibly adjusted according to an application scenario, and exemplarily, the first threshold is 20%; for another example, the change of the buffer occupancy ratio exceeding the set threshold may be that a ratio of the changed buffer occupancy ratio to the buffer occupancy ratio before the change is greater than a second threshold, and the second threshold may be set empirically or flexibly adjusted according to an application scenario, and exemplarily, the second threshold is 2. The change of the total buffer occupancy amount exceeding the set threshold may be, for example, that a difference between the total buffer occupancy amount after the change and the total buffer occupancy amount before the change is greater than a third threshold, which is 100 mbits for example. The change of the total buffer occupancy amount exceeds the set threshold may also be that a ratio of the total buffer occupancy amount after the change to the total buffer occupancy amount before the change is greater than a fourth threshold, and exemplarily, the fourth threshold is 3.
It should be noted that, in determining that the traffic in the TCP queue is characterized as burst traffic, the traffic is temporarily marked as T b Then, before performing step 5022 described below, the traffic characteristic of the TCP queue has been temporarily determined to be burst traffic, and the resource scheduling device has adjusted the scheduling proportions for the TCP queue and the RDMA queue according to the condition that the traffic characteristic of the TCP queue is burst traffic. If the service characteristic of the TCP queue is judged to be the long steady-flow service again through the following steps, the resource scheduling equipment can adjust the scheduling proportion of the TCP queue and the RDMA queue again according to the condition that the service characteristic of the TCP queue is the long steady-flow service.
Step 5022, judging whether the burst frequency is greater than the reference frequency or not; if so, then the following step 5023 is performed; if not, the following step 5025 is performed.
The reference number may be set empirically or flexibly adjusted according to an application scenario, and is illustratively N (N is a positive integer greater than 1) times. And judging whether bursts occur in N continuous scheduling strategy adjustment periods, namely acquiring the marks of N-1 scheduling strategy adjustment periods before the scheduling strategy adjustment period T. In one possible implementation, the scheduling policy adjustment periods N-1 before the scheduling policy adjustment period T are denoted as T 1 、T 2 …T N-1 If the method in step 5021 detects that the scheduling policy adjustment period T is detected 1 、T 2 …T N-1 The corresponding marks are allIs T b Then, the following step 5023 is executed; otherwise, step 5025 is performed directly.
In a possible implementation mode, due to the occurrence of bursts within the continuous reference times, the continuous occurrence of burst traffic causes the TCP queue to occupy a large bandwidth scheduling proportion for a long time, and if the traffic characteristic of the TCP queue scheduling policy adjustment period T is still marked as T b Then, step 5025 is performed. Since the step 5025 adopts a high-ratio scheduling strategy, that is, most of the total bandwidth is scheduled to the TCP queue, the service packet in the RDMA queue cannot get the opportunity of broadband scheduling for a long time, and the service performance of the RDMA queue is seriously affected. Therefore, it is necessary to determine whether the number of consecutive bursts is greater than the reference number, so as to avoid the above-mentioned situation that affects the service performance of the RDMA queue.
Step 5023, judging whether the average bandwidth in the reference frequency is larger than a reference threshold value; if so, the following step 5024 is performed; if not, the following step 5025 is performed.
In step 5023, if the number of consecutive bursts is greater than the reference number, it is necessary to continuously determine whether the average bandwidth within the reference number is greater than the reference threshold. For the condition that the average bandwidth in the reference times is greater than the reference threshold, the service characteristic corresponding to the scheduling policy adjustment period T is considered as a long steady flow service, that is, the label corresponding to the scheduling policy adjustment period T is modified to be T nb . The reference threshold may be set empirically or flexibly adjusted according to an application scenario, and is exemplarily 50%.
Step 5024, the service features are long steady flow service.
In this step 5024, the traffic characteristics of the TCP queue in the scheduling policy adjustment period T are determined to be long steady-flow traffic. For long steady-flow service, the influence of the total average bandwidth on the service performance under a long time scale is large, and the influence of the fluctuation of the instantaneous bandwidth on the performance of the whole service is small. At this time, the bandwidth requirement of the source end of the TCP queue needs to be obtained to perform fair scheduling.
Step 5025, the service is characterized as burst service.
In this step 5025, the traffic characteristic of the TCP queue in the scheduling policy adjustment period T is determined to be burst traffic. The burst service message belongs to a transient burst service. For example, the distributed machine learning training service enables communication among the computing nodes to occur in intermittent iteration, each burst instantaneous bandwidth of the communication has a large influence on service performance, and the total average bandwidth ratio under a long time scale is small, namely, other service messages are not damaged by allocating large bandwidth in a short time. At this time, high-ratio scheduling needs to be performed, and a large bandwidth is allocated to the TCP queue, so that the performance and the completion speed of the burst service are greatly improved.
It should be noted that, in the foregoing step 5021 to step 5025, the reference number is greater than 1, which is taken as an example, to describe a manner of identifying the service characteristics of the TCP queue, and the embodiment of the present application is not limited thereto, and the reference number may also be 1. For the case that the reference number is 1, the service characteristics of the TCP queue can be identified only by executing step 5021. In addition, according to the manner of the above-mentioned step 5021 to step 5025, the service characteristics of the RDMA queue can be acquired as well, and then step 503 or step 505 is performed.
Step 503, in response to the service characteristics of the TCP queue and the RDMA queue being the same, obtaining the input rates of the TCP queue and the RDMA queue.
In one possible implementation, the traffic characteristics of the TCP queue and the RDMA queue are the same, including both burst traffic and both non-burst traffic, both of which are considered long-lived traffic. Under the condition, the respective real average throughputs of the TCP queue and the RDMA queue can be respectively detected, namely the input rates of the TCP queue and the RDMA queue are obtained, and the bandwidth scheduling proportion is matched according to the input rate proportion, so that the long-term broadband matching fairness is facilitated.
In a possible implementation manner, the embodiment of the present application does not limit the manner of obtaining the input rate, and may obtain the input rate by measuring a message queue entry rate of a queue, or by calculating an average throughput of a message within a scheduling policy adjustment period T. Optionally, the obtained input rates of the TCP queue and the RDMA queue are represented by D1 and D2, that is, the input rate of the TCP queue is D1, and the input rate of the RDMA queue is D2.
And step 504, acquiring the scheduling proportion of the fair ratio according to the input rates of the TCP queue and the RDMA queue.
In a possible implementation manner, the manner of obtaining the scheduling proportion of the fair ratio according to the input rates of the TCP queue and the RDMA queue is as follows: directly carrying out ratio operation on the acquired input rates D1 and D2 of the TCP queue and the RDMA queue, namely calculating D1: simplified form of D2, the ratio of the most simplified form obtained is S1: s2, the ratio of the simplest form S1: and S2 is the scheduling proportion of the TCP queue and the RDMA queue. The input rate proportion value of the TCP queue is S1, and the input rate proportion value of the RDMA queue is S2. Therefore, the scheduling proportion of the fair ratio of the TCP queue can be obtained, and is represented as S1: and S2.
In the embodiment of the present application, the manner of obtaining the input rates of the TCP queue and the RDMA queue is not limited, as long as the obtained input rates can reflect the real bandwidth requirements. Illustratively, the input rates of the TCP queue and the RDMA queue may be obtained separately by a binary recursive detection method. Next, taking a binary recursive detection method as an example, an example of obtaining the input rate of the TCP queue will be described.
First, initialization setting is performed, setting a lower limit value left =0, an upper limit value right =10, mid = (left + right)/2. Then the following steps are carried out, the first step: setting the proportion of the input rate of the TCP queue to be (mid, 10-mid), monitoring the outlet bandwidth value of the TCP queue, and further calculating the occupation ratio value B of the outlet bandwidth of the TCP queue; the second step is that: if the occupation ratio B of the egress bandwidth of the TCP queue is greater than or equal to mid/10, setting left = mid, if the occupation ratio B of the egress bandwidth of the TCP queue is less than mid/10, setting right = B, and left = B; step three, judging whether the values of left and right are equal, if so, entering the step four, otherwise, recalculating mid = (left + right)/2, and returning to the step one; the fourth step: the proportional value of the input rate of the TCP queue is S1= mid.
Similarly, according to the manner of obtaining the input rate S1 of the TCP queue, the input rate S2 of the RDMA queue can also be obtained. Therefore, the method can obtain the scheduling proportion of the fair ratio according to the input rates of the TCP queue and the RDMA queue, namely S1: and S2.
Exemplarily, in a case that the service characteristics of the TCP queue and the RDMA queue are the same, fig. 7 is a schematic diagram of a scheduling result of the resource scheduling method provided by the embodiment of the present application. The scheduling proportion value corresponding to the input rate of the TCP queue and the RDMA queue is S1: s2=3:7. at the moment, the total bandwidth of the output port of the resource scheduling equipment is 10Gbps, the service characteristics of a TCP queue and an RDMA queue are long and steady flow service, the real input rate of the TCP queue is 3Gbps, the real input rate of the RDMA queue is 7Gbps, and the fairness of bandwidth allocation among the queue services is guaranteed by scheduling the bandwidth according to the scheduling proportion.
It should be noted that, the above is only an exemplary description of obtaining the input rates of the TCP queue and the RDMA queue in response to that the service characteristics of the TCP queue and the RDMA queue are the same, and the embodiment of the present application is not limited to this, and in an exemplary embodiment, the default scheduling ratio of the TCP queue and the RDMA queue may also be directly used as the scheduling ratio of the fair ratio, for example, the default scheduling ratio of the WRR.
And 505, in response to the difference of the service characteristics of the TCP queue and the RDMA queue, acquiring a high-ratio scheduling proportion.
In this step 505, due to different service characteristics of the TCP queue and the RDMA queue, for example, the service packet of one of the queues is of a burst type, and the service packet of the other queue is of a non-burst type. Because the burst type service message is a burst type service and needs to be processed and completed as soon as possible, scheduling a larger bandwidth proportion for the burst service is beneficial to completing the burst service quickly, and the service performance of the burst service is improved. In addition, as the burst service is a transient service, a large bandwidth proportion only needs to be scheduled in a short time, and the service message of the RDMA queue cannot be damaged. Therefore, in this case, a high-ratio scheduling ratio needs to be obtained to meet the requirement of the burst service.
In a possible implementation manner, the embodiment of the present application does not limit a manner of obtaining the scheduling proportion of the high proportion, as long as the scheduling proportion of the bandwidth allocated to the burst service is larger. Exemplarily, taking the service characteristic of the TCP queue as burst service as an example, the manner of obtaining the scheduling proportion with high ratio may be: directly adopting a high-ratio scheduling proportion S1 of WRR: s2=9:1. in WRR, the weight value of the TCP queue is 9, and the weight value of the RDMA queue is 1, that is, after the TCP queue transmits 9 service messages, the RDMA queue transmits 1 service message. Therefore, the performance of burst service in the TCP queue is improved.
Exemplarily, in a case that service characteristics of a TCP queue and an RDMA queue are different, that is, in a case that only one of the TCP queue or the RDMA queue has a burst service, taking the service characteristics of the TCP queue as the burst service as an example, fig. 8 is a schematic diagram of another scheduling result before the method of the embodiment of the present application is adopted, and fig. 9 is a schematic diagram of another scheduling result after the method of the embodiment of the present application is adopted. As can be seen from fig. 8 and 9, the burst service completion speed of the TCP queue in fig. 9 is significantly faster than the packet service of the burst service in fig. 8, and the performance of the burst service of the TCP queue is effectively improved.
According to the resource scheduling method provided by the embodiment of the application, the scheduling proportion of the N queues is determined according to the service characteristics of the N queues, so that the determined scheduling proportion can be adjusted in a self-adaptive mode according to the service characteristics, the service characteristics can indicate the resource requirements corresponding to the queues, the determined scheduling proportion can meet the resource requirements of services, and the resources distributed to the N queues according to the scheduling proportion are fair and reasonable.
In the above, the resource scheduling method according to the embodiment of the present application is introduced, and corresponding to the above method, a resource scheduling apparatus is further provided in the embodiment of the present application, and fig. 10 and 11 are schematic structural diagrams of the resource scheduling apparatus provided in the embodiment of the present application. The resource scheduling apparatus shown in fig. 10 is capable of performing all or part of the operations performed by the resource scheduling device based on a plurality of modules shown in fig. 10. It should be understood that the apparatus may include more additional modules than those shown or omit a portion of the modules shown therein, which is not limited by the embodiments of the present application. As shown in fig. 10, the apparatus includes:
an allocating module 1001, configured to allocate a plurality of received service packets to N queues according to service types, where N is greater than or equal to 2;
an identifying module 1002, configured to identify a service feature of each of the N queues to obtain N service features, where each of the N service features is used to indicate a resource requirement of a corresponding queue;
and the scheduling module 1003 is configured to determine a scheduling ratio of the N queues according to the N service characteristics, and allocate resources to the N queues according to the scheduling ratio.
In a possible implementation manner, the scheduling module 1003 is configured to set, when the first service characteristic indicates that a burst exists, a scheduling ratio of a first queue corresponding to the first service characteristic to be higher than scheduling ratios of other queues, where the first queue is any one of the N queues.
In a possible implementation manner, the identifying module 1002 is configured to detect, for a first queue, an occupation situation of a service packet in the first queue to a buffer; and identifying the service characteristics of the first queue according to the occupation condition of the service messages in the first queue to the buffer.
In a possible implementation manner, the identifying module 1002 is configured to determine that the service feature of the first queue is the first service feature when a change of a cache occupancy proportion or a cache occupancy total amount of the service packets in the first queue exceeds a set threshold.
In a possible implementation manner, the identifying module 1002 is configured to obtain a number of hops of a cache occupancy ratio or a total cache occupancy amount of the first queue in a reference period, where the number of hops is a number of times that a variation range of the cache occupancy ratio or the total cache occupancy amount is greater than a set threshold; and determining the service characteristic of the first queue as a first service characteristic in response to the number of hops being less than the reference number.
In a possible implementation manner, the scheduling module 1003 is configured to determine a scheduling ratio of the N queues based on a ratio of input rates of the N queues when the N traffic characteristics are the same.
In one possible implementation, referring to fig. 11, the apparatus further includes:
a determining module 1004, configured to determine input rates of the N queues according to a rate at which the service packet enters each of the N queues; or, the input rate of each queue in the N queues is obtained by adjusting polling RR scheduling, wherein the RR scheduling comprises weighted circular scheduling WRR or differential circular scheduling DRR.
In a possible implementation manner, the allocating module 1001 is configured to obtain service types of multiple service messages according to protocol type fields in the multiple service messages; and distributing the plurality of service messages to queues corresponding to respective service types.
In one possible implementation, referring to fig. 11, the apparatus further includes: a sending module 1005, configured to send the scheduling ratio of each queue to an upstream device.
In one possible implementation, the resources allocated to the N queues include at least one of bandwidth resources and buffer resources.
According to the resource scheduling device provided by the embodiment of the application, the scheduling proportion of the N queues is determined according to the service characteristics of the N queues, so that the determined scheduling proportion can be adjusted in a self-adaptive manner according to the service characteristics, and the service characteristics can indicate the resource requirements corresponding to the queues, so that the determined scheduling proportion can meet the resource requirements of services, and the resources distributed to the N queues according to the scheduling proportion are fairer and more reasonable.
It should be understood that, when the apparatus provided in fig. 10 and fig. 11 implements its functions, it is only illustrated by the division of the above functional modules, and in practical applications, the above function distribution may be implemented by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules, so as to implement all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and specific implementation processes thereof are described in detail in the method embodiments, which are not described herein again.
Referring to fig. 12, fig. 12 is a schematic structural diagram of a network device 2000 according to an exemplary embodiment of the present application. The network device 2000 shown in fig. 12 is configured to perform the operations involved in the resource scheduling methods shown in fig. 4 and 5. The network device 2000 is, for example, a switch, a router, etc., and the network device 2000 may be implemented by a general bus architecture.
As shown in fig. 12, the network device 2000 includes at least one processor 2001, memory 2003, and at least one communication interface 2004.
The processor 2001 is, for example, a Central Processing Unit (CPU), a Digital Signal Processor (DSP), a Network Processor (NP), a Graphics Processing Unit (GPU), a neural-Network Processing Unit (NPU), a Data Processing Unit (DPU), a microprocessor, or one or more integrated circuits for implementing the solution of the present application. For example, the processor 2001 includes an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD) or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. PLDs are, for example, complex Programmable Logic Devices (CPLDs), field-programmable gate arrays (FPGAs), general Array Logic (GAL), or any combination thereof. Which may implement or execute the various logical blocks, modules, and circuits described in connection with the disclosure of embodiments of the invention. The processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs, and microprocessors, among others.
Optionally, the network device 2000 further comprises a bus. The bus is used to transfer information between the components of the network device 2000. The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 12, but this is not intended to represent only one bus or type of bus.
The Memory 2003 is, for example, but not limited to, a read-only Memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only Memory (EEPROM), a compact disk read-only Memory (CD-ROM) or other optical disk storage, optical disk storage (including compact disk, laser disk, optical disk, digital versatile disk, blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory 2003 is, for example, independent and connected to the processor 2001 via a bus. The memory 2003 may also be integrated with the processor 2001.
Communication interface 2004 may use any transceiver or the like for communicating with other devices or a communication network, such as an ethernet, radio Access Network (RAN), or Wireless Local Area Network (WLAN). The communication interface 2004 may include a wired communication interface and may also include a wireless communication interface. Specifically, the communication interface 2004 may be an Ethernet (Ethernet) interface, a Fast Ethernet (FE) interface, a Gigabit Ethernet (GE) interface, a Wireless Local Area Network (WLAN) interface, a cellular network communication interface, or a combination thereof. The ethernet interface may be an optical interface, an electrical interface, or a combination thereof. In an embodiment of the present application, communication interface 2004 may be used for network device 2000 to communicate with other devices.
In particular implementations, processor 2001 may include one or more CPUs, such as CPU0 and CPU1 shown in fig. 12, as one embodiment. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores that process data (e.g., computer program instructions).
In particular implementations, network device 2000 may include multiple processors, such as processor 2001 and processor 2005 shown in fig. 12, for one embodiment. Each of these processors may be a single-Core Processor (CPU) or a multi-Core Processor (CPU). A processor herein may refer to one or more devices, circuits, and/or processing cores that process data, such as computer program instructions.
In one embodiment, the network device 2000 may further include an output device and an input device. An output device is in communication with the processor 2001 and may display information in a variety of ways. For example, the output device may be a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display device, a Cathode Ray Tube (CRT) display device, a projector (projector), or the like. An input device is in communication with the processor 2001 and may receive input from a user in a variety of ways. For example, the input device may be a mouse, a keyboard, a touch screen device, a sensing device, or the like.
In some embodiments, the memory 2003 is used to store program code 2010 for performing aspects of the present application, and the processor 2001 may execute the program code 2010 stored in the memory 2003. That is, the network device 2000 may implement the resource scheduling method provided by the method embodiment through the processor 2001 and the program code 2010 in the memory 2003. One or more software modules may be included in program code 2010. Optionally, the processor 2001 itself may also store program code or instructions to perform aspects of the present application.
In a specific embodiment, the network device 2000 of the embodiment of the present application may correspond to the resource scheduling device in each of the above method embodiments, and the processor 2001 in the network device 2000 reads the instructions in the memory 2003, so that the network device 2000 shown in fig. 12 can perform all or part of the operations performed by the resource scheduling device.
Specifically, the processor 2001 is configured to allocate the received multiple service packets to N queues according to service types; identifying the service characteristics of each queue in the N queues to obtain N service characteristics; and determining the scheduling proportion of the N queues according to the N service characteristics, and allocating resources for the N queues according to the scheduling proportion.
Other alternative embodiments, for brevity, will not be described again.
The network device 2000 may also correspond to the resource scheduling apparatus shown in fig. 10 and fig. 11, and each functional module in the resource scheduling apparatus is implemented by software of the network device 2000. In other words, the resource scheduling apparatus includes functional modules that are generated by the processor 2001 of the network device 2000 reading the program code 2010 stored in the memory 2003.
The steps of the resource scheduling method shown in fig. 4 and fig. 5 are implemented by integrated logic circuits of hardware in a processor of the network device 2000 or instructions in the form of software. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in a processor. The software modules may be located in ram, flash, rom, prom, or eprom, registers, etc. as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and performs the steps of the above method in combination with hardware thereof, which are not described in detail herein to avoid repetition.
Referring to fig. 13, fig. 13 shows a schematic structural diagram of a network device 2100 according to another exemplary embodiment of the present application, where the network device 2100 shown in fig. 13 is configured to perform all or part of operations involved in the resource scheduling methods shown in fig. 4 and fig. 5. The network device 2100 is, for example, a switch, a router, etc., and the network device 2100 may be implemented by a general bus architecture.
As shown in fig. 13, the network device 2100 includes: a main control board 2110 and an interface board 2130.
The main control board is also called a Main Processing Unit (MPU) or a route processor card (route processor card), and the main control board 2110 is used for controlling and managing various components in the network device 2100, including routing computation, device management, device maintenance, and protocol processing functions. The main control board 2110 includes: a central processor 2111 and a memory 2112.
The interface board 2130 is also referred to as a Line Processing Unit (LPU), a line card (line card), or a service board. The interface board 2130 is used for providing various service interfaces and forwarding data packets. The service interfaces include, but are not limited to, ethernet interfaces, such as Flexible Ethernet services interfaces (FlexE Ethernet Clients), POS (Packet over SONET/SDH) interfaces, and the like. The interface board 2130 includes: the cpu 2131 includes a network processor 2132, a forwarding table entry memory 2134, and a Physical Interface Card (PIC) 2133.
The central processor 2131 on the interface board 2130 is used for controlling and managing the interface board 2130 and communicating with the central processor 2111 on the main control board 2110.
The network processor 2132 is configured to implement forwarding processing of the packet. The network processor 2132 may take the form of a forwarding chip. The forwarding chip may be a Network Processor (NP). In some embodiments, the forwarding chip may be implemented by an application-specific integrated circuit (ASIC) or a Field Programmable Gate Array (FPGA). Specifically, the network processor 2132 is configured to forward the received message based on a forwarding table stored in the forwarding table entry memory 2134, and if a destination address of the message is an address of the network device 2100, send the message to a CPU (e.g., the central processing unit 2131) for processing; if the destination address of the packet is not the address of the network device 2100, the next hop and the egress interface corresponding to the destination address are found from the forwarding table according to the destination address, and the packet is forwarded to the egress interface corresponding to the destination address. Wherein, the processing of the uplink message may include: processing a message input interface, and searching a forwarding table; the processing of the downlink message may include: forwarding table lookups, and the like. In some embodiments, the central processing unit may also perform the function of a forwarding chip, such as implementing software forwarding based on a general purpose CPU, so that no forwarding chip is needed in the interface board.
The physical interface card 2133 is used to implement the interfacing function of the physical layer, from which the original message enters the interface board 2130, and the processed message is sent out from the physical interface card 2133. The physical interface card 2133 is also called a daughter card, and may be installed on the interface board 2130, and is responsible for converting the photoelectric signal into a message, performing validity check on the message, and forwarding the message to the network processor 2132 for processing. In some embodiments, the central processor 2131 may also perform the functions of the network processor 2132, such as implementing software forwarding based on a general purpose CPU, so that the network processor 2132 is not required in the physical interface card 2133.
Optionally, the network device 2100 includes a plurality of interface boards, for example, the network device 2100 further includes an interface board 2140, and the interface board 2140 includes: a central processor 2141, a network processor 2142, a forwarding table entry memory 2144, and a physical interface card 2143. The functions and implementations of the components in the interface board 2140 are the same as or similar to those of the interface board 2130, and are not described herein again.
Optionally, network device 2100 also includes a switch board 2120. The switch board 2120 may also be called a Switch Fabric Unit (SFU). In the case of a network device having a plurality of interface boards, the switch board 2120 is used to complete data exchange between the interface boards. For example, the interface board 2130 and the interface board 2140 can communicate with each other via a switch board 2120.
The main control board 2110 is coupled to the interface board. For example. The main control board 2110, the interface board 2130, the interface board 2140, and the switch board 2120 are connected to the system backplane through the system bus to realize intercommunication. In a possible implementation manner, an inter-process communication (IPC) channel is established between the main control board 2110 and the interface board 2130 and the interface board 2140, and the main control board 2110 and the interface board 2130 and the interface board 2140 communicate with each other through the IPC channel.
Logically, the network device 2100 includes a control plane including a main control board 2110 and a central processor 2111, and a forwarding plane including various components performing forwarding, such as a forwarding entry memory 2134, a physical interface card 2133, and a network processor 2132. The control plane executes functions of a router, generation of a forwarding table, processing of signaling and protocol messages, configuration and maintenance of the state of the network device, and the like, issues the generated forwarding table to the forwarding plane, and on the forwarding plane, the network processor 2132 looks up a table for forwarding a message received by the physical interface card 2133 based on the forwarding table issued by the control plane. The forwarding table issued by the control plane may be stored in the forwarding table entry storage 2134. In some embodiments, the control plane and the forwarding plane may be completely separate and not on the same network device.
It should be noted that there may be one or more main control boards, and when there are more main control boards, the main control boards may include a main control board and a standby main control board. The interface board may have one or more blocks, and the stronger the data processing capability of the network device, the more interface boards are provided. There may also be one or more physical interface cards on an interface board. The exchange network board may not have, or may have one or more blocks, and when there are more blocks, the load sharing redundancy backup can be realized together. Under the centralized forwarding architecture, the network device does not need a switching network board, and the interface board undertakes the processing function of the service data of the whole system. Under the distributed forwarding architecture, the network device can have at least one switching network board, and the data exchange among a plurality of interface boards is realized through the switching network board, so that the high-capacity data exchange and processing capacity is provided. Therefore, the data access and processing capabilities of the network devices in the distributed architecture are greater than those of the network devices in the centralized architecture. Optionally, the form of the network device may also be that there is only one board card, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on the one board card, and at this time, the central processing unit on the interface board and the central processing unit on the main control board may be combined into one central processing unit on the one board card to perform the function after the two are superimposed, and the form of the network device has low data switching and processing capabilities (for example, a network device such as a low-end switch or a router, etc.). Which architecture is specifically adopted depends on the specific networking deployment scenario, and is not limited herein.
In a specific embodiment, the network device 2100 corresponds to the resource scheduling apparatus applied to the resource scheduling device shown in fig. 10 and fig. 11 described above. In some embodiments, the allocating module 1001, the identifying module 1002 and the scheduling module 1003 in the resource scheduling apparatus shown in fig. 10 correspond to the central processor 2111 or the network processor 2132 in the network device 2100.
An embodiment of the present application further provides a communication apparatus, including: a transceiver, a memory, and a processor. Wherein the transceiver, the memory and the processor are in communication with each other via an internal connection path, the memory is used for storing instructions, the processor is used for executing the instructions stored by the memory to control the transceiver to receive signals and control the transceiver to transmit signals, and when the processor executes the instructions stored by the memory, the processor is enabled to execute the method required by the resource scheduling device.
Fig. 14 is a schematic structural diagram of a server according to an embodiment of the present application, where the server 800 shown in fig. 14 is configured to perform operations related to the resource scheduling methods shown in fig. 4 and fig. 5. The server 800 may have a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 801 and one or more memories 802, where at least one computer program is stored in the one or more memories 802, and is loaded and executed by the one or more processors 801 to enable the server to implement the method for resource scheduling provided by the above method embodiments. Of course, the server 800 may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input and output, and the server 800 may also include other components for implementing the functions of the device, which are not described herein again.
An embodiment of the present application further provides a resource scheduling device, where the resource scheduling device includes: a processor coupled to the memory, wherein the memory stores at least one program instruction or code, and the at least one program instruction or code is loaded and executed by the processor to enable the source scheduling apparatus to implement the resource scheduling method as shown in fig. 4 and 5.
In one exemplary embodiment, the processor is one or more, and the memory is one or more.
As an example embodiment, the memory may be integrated with the processor, or may be provided separately from the processor.
It should be understood that the processor may be a CPU, other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or any conventional processor or the like. It is noted that the processor may be an advanced reduced instruction set machine (ARM) architecture supported processor.
Further, in an alternative embodiment, the memory may include both read-only memory and random access memory, and provide instructions and data to the processor. The memory may also include non-volatile random access memory. For example, the memory may also store device type information.
The memory may be volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash memory. Volatile memory can be Random Access Memory (RAM), which acts as external cache memory. By way of example, and not limitation, many forms of RAM are available. For example, static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate synchronous SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct memory bus RAM (DR RAM).
An embodiment of the present application further provides a computer-readable storage medium, where at least one instruction is stored in the storage medium, and the instruction is loaded and executed by a processor, so that a computer implements the resource scheduling method described in any one of the above.
Embodiments of the present application further provide a computer program (product), which, when executed by a computer, can cause the processor or the computer to execute the corresponding steps and/or processes in the foregoing method embodiments.
The embodiment of the present application further provides a chip, which includes a processor, and is configured to call and run an instruction stored in a memory, so that a resource scheduling device on which the chip is installed executes the resource scheduling method described above.
The embodiment of the present application further provides another chip, including: the resource scheduling method comprises an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected through an internal connection path, the processor is used for executing codes in the memory, and when the codes are executed, the processor is used for executing the resource scheduling method.
In the above embodiments, all or part of the implementation may be realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions described in accordance with the present application are generated, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk), among others.
Those of ordinary skill in the art will appreciate that the various method steps and modules described in connection with the embodiments disclosed herein can be implemented in software, hardware, firmware, or any combination thereof, and that the steps and components of the embodiments have been described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by hardware related to instructions of a program, and the program may be stored in a computer readable storage medium, where the above mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk.
When implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer program instructions. By way of example, the methods of embodiments of the present application may be described in the context of machine-executable instructions, such as those included in program modules, being executed in devices on target real or virtual processors. Generally, program modules include routines, programs, libraries, objects, classes, components, data structures, etc. that perform particular tasks or implement particular abstract data types. In various embodiments, the functionality of the program modules may be combined or split between program modules as described. Machine-executable instructions for program modules may be executed within local or distributed devices. In a distributed arrangement, program modules may be located in both local and remote memory storage media.
Computer program code for implementing the methods of embodiments of the present application may be written in one or more programming languages. These computer program code may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program code, when executed by the computer or other programmable data processing apparatus, causes the functions/acts specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the computer, partly on the computer, as a stand-alone software package, partly on the computer and partly on a remote computer or entirely on the remote computer or server.
In the context of embodiments of the present application, the computer program code or related data may be carried by any suitable carrier to enable a device, apparatus or processor to perform the various processes and operations described above. Examples of a carrier include a signal, computer readable medium, and the like.
Examples of signals may include electrical, optical, radio, acoustic, or other forms of propagated signals, such as carrier waves, infrared signals, and the like.
A machine-readable medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination thereof. More detailed examples of a machine-readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical storage device, a magnetic storage device, or any suitable combination thereof.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the device and the module described above may refer to corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the module is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. Further, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may also be an electrical, mechanical or other form of connection.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present application.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
In this application, the terms "first," "second," and the like are used for distinguishing identical or similar items with substantially identical functions and functionalities, and it should be understood that "first," "second," and "n" have no logical or temporal dependency, and no limitation on the number or execution order. It will be further understood that, although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first image may be referred to as a second image, and similarly, a second image may be referred to as a first image, without departing from the scope of the various described examples. Both the first image and the second image may be images, and in some cases, may be separate and distinct images.
It should also be understood that, in the embodiments of the present application, the size of the serial number of each process does not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
The term "at least one" in this application means one or more, and the term "plurality" in this application means two or more, for example, a plurality of second messages means two or more second messages. The terms "system" and "network" are often used interchangeably herein.
It is to be understood that the terminology used in the description of the various described examples herein is for the purpose of describing particular examples only and is not intended to be limiting. As used in the description of the various described examples and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. The term "and/or" is an associative relationship that describes an associated object, meaning that three relationships may exist, e.g., A and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" in the present application generally indicates that the former and latter related objects are in an "or" relationship.
It will be further understood that the terms "comprises," "comprising," "includes," and/or "including," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the terms "if" and "if" may be interpreted to mean "when" ("when" or "upon") or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined," or "if [ a stated condition or event ] is detected," may be interpreted to mean "upon determining," or "in response to determining," or "upon detecting [ a stated condition or event ], or" in response to detecting [ a stated condition or event ] ", depending on the context.
It should be understood that determining B from a does not mean determining B from a alone, but may also be determined from a and/or other information.
It should also be appreciated that reference throughout this specification to "one embodiment," "an embodiment," "one possible implementation" means that a particular feature, structure, or characteristic described in connection with the embodiment or implementation is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" or "one possible implementation" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

Claims (22)

1. A resource scheduling method is applied to a resource scheduling device, and comprises the following steps:
distributing a plurality of received service messages to N queues according to service types, wherein N is more than or equal to 2;
identifying a service characteristic of each of the N queues to obtain N service characteristics, each of the N service characteristics being used to indicate a resource requirement of a corresponding queue;
and determining the scheduling proportion of the N queues according to the N service characteristics, and allocating resources to the N queues according to the scheduling proportion.
2. The method of claim 1, wherein the determining the scheduling proportion of the N queues according to the N traffic characteristics comprises:
when the first service characteristic indicates that burst flow exists, setting the scheduling proportion of a first queue corresponding to the first service characteristic to be higher than the scheduling proportions of other queues, wherein the first queue is any one of the N queues.
3. The method of claim 2, wherein said identifying traffic characteristics for each of said N queues comprises:
for the first queue, detecting the occupation condition of the service messages in the first queue to the cache;
and identifying the service characteristics of the first queue according to the occupation condition of the service messages in the first queue to the cache.
4. The method according to claim 3, wherein the identifying the service characteristics of the first queue according to the occupancy of the buffer by the service packets in the first queue comprises:
and when the change of the cache occupation proportion or the total cache occupation amount of the service messages in the first queue exceeds a set threshold value, determining the service characteristic of the first queue as a first service characteristic.
5. The method according to claim 4, wherein the determining that the service feature of the first queue is the first service feature when the change of the cache occupancy proportion or the total cache occupancy amount of the service packets in the first queue exceeds a set threshold includes:
acquiring the hop frequency of the cache occupation proportion or the total cache occupation amount of the first queue in a reference period, wherein the hop frequency is the frequency that the variation amplitude of the cache occupation proportion or the total cache occupation amount is larger than the set threshold value;
and determining the service characteristic of the first queue as a first service characteristic in response to the number of hopping times being smaller than a reference number.
6. The method of claim 1, wherein the determining the scheduling proportion of the N queues according to the N traffic characteristics comprises:
and when the N service characteristics are the same, determining the scheduling proportion of the N queues based on the ratio of the input rates of the N queues.
7. The method of claim 6, wherein before determining the scheduling proportion of the N queues according to the N traffic characteristics, further comprising:
determining the input rate of the N queues according to the rate of the service message entering each of the N queues; or,
and acquiring the input rate of each queue in the N queues by adjusting polling RR scheduling, wherein the RR scheduling comprises weighted cyclic scheduling WRR or differential cyclic scheduling DRR.
8. The method according to any of claims 1-7, wherein said distributing the received plurality of service packets to N queues according to service type comprises:
acquiring the service types of the plurality of service messages according to the protocol type fields in the plurality of service messages;
and distributing the plurality of service messages to queues corresponding to respective service types.
9. The method according to any of claims 1-8, wherein after determining the scheduling ratios of the N queues according to the traffic characteristics of the N queues, the method further comprises:
and sending the scheduling proportions of the N queues to upstream equipment.
10. The method of any of claims 1-9, wherein the resources allocated for the N queues comprise at least one of bandwidth resources and cache resources.
11. A resource scheduling apparatus, the apparatus being applied to a resource scheduling device, the apparatus comprising:
the distribution module is used for distributing the received multiple service messages to N queues according to service types, wherein N is more than or equal to 2;
an identifying module, configured to identify a service feature of each of the N queues to obtain N service features, where each of the N service features is used to indicate a resource requirement of a corresponding queue;
and the scheduling module is used for determining the scheduling proportion of the N queues according to the N service characteristics and allocating resources to the N queues according to the scheduling proportion.
12. The apparatus according to claim 11, wherein the scheduling module is configured to, when a first service characteristic indicates that there is a burst, set a scheduling ratio of a first queue corresponding to the first service characteristic to be higher than scheduling ratios of other queues, where the first queue is any one of the N queues.
13. The apparatus according to claim 12, wherein the identifying module is configured to, for the first queue, detect an occupancy of a buffer by the service packet in the first queue; and identifying the service characteristics of the first queue according to the occupation condition of the service messages in the first queue to the cache.
14. The apparatus according to claim 13, wherein the identifying module is configured to determine the traffic characteristic of the first queue as the first traffic characteristic when a change in a cache occupancy ratio or a total cache occupancy amount of the traffic packets in the first queue exceeds a set threshold.
15. The apparatus according to claim 14, wherein the identifying module is configured to obtain a number of transitions of a buffer occupancy ratio or a total buffer occupancy of the first queue in a reference period, where the number of transitions is a number of times that a variation range of the buffer occupancy ratio or the total buffer occupancy is greater than the set threshold; and determining the service characteristic of the first queue as a first service characteristic in response to the number of hopping times being smaller than a reference number.
16. The apparatus of claim 11, wherein the scheduling module is configured to determine the scheduling ratio of the N queues based on a ratio of input rates of the N queues when the N traffic characteristics are the same.
17. The apparatus of claim 16, further comprising:
a determining module, configured to determine input rates of the N queues according to rates at which service messages enter each of the N queues; or, the input rate of each queue in the N queues is obtained by adjusting polling RR scheduling, where the RR scheduling includes weighted round-robin WRR or differential round-robin DRR.
18. The apparatus according to any one of claims 11 to 17, wherein the allocating module is configured to obtain the service types of the multiple service packets according to protocol type fields in the multiple service packets; and distributing the plurality of service messages to queues corresponding to respective service types.
19. The apparatus of any of claims 11-18, further comprising:
and the sending module is used for sending the scheduling proportions of the N queues to upstream equipment.
20. The apparatus of any of claims 11-19, wherein the resources allocated for the N queues comprise at least one of bandwidth resources and cache resources.
21. A resource scheduling apparatus, characterized in that the resource scheduling apparatus comprises: a processor coupled to a memory, the memory having stored therein at least one program instruction or code, the at least one program instruction or code being loaded and executed by the processor to cause the resource scheduling apparatus to implement the resource scheduling method of any one of claims 1-10.
22. A computer-readable storage medium having stored therein at least one instruction, which is loaded and executed by a processor, to cause a computer to implement the resource scheduling method of any one of claims 1-10.
CN202110785712.9A 2021-07-12 2021-07-12 Resource scheduling method, device, equipment and computer readable storage medium Pending CN115622952A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110785712.9A CN115622952A (en) 2021-07-12 2021-07-12 Resource scheduling method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110785712.9A CN115622952A (en) 2021-07-12 2021-07-12 Resource scheduling method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN115622952A true CN115622952A (en) 2023-01-17

Family

ID=84855685

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110785712.9A Pending CN115622952A (en) 2021-07-12 2021-07-12 Resource scheduling method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115622952A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116681219A (en) * 2023-02-03 2023-09-01 蜀道投资集团有限责任公司 Engineering equipment scheduling method, electronic equipment and computer readable medium
CN117579705A (en) * 2024-01-16 2024-02-20 四川并济科技有限公司 System and method for dynamically scheduling servers based on batch data requests
CN117858262A (en) * 2024-03-07 2024-04-09 成都爱瑞无线科技有限公司 Base station resource scheduling optimization method, device, base station, equipment, medium and product

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116681219A (en) * 2023-02-03 2023-09-01 蜀道投资集团有限责任公司 Engineering equipment scheduling method, electronic equipment and computer readable medium
CN116681219B (en) * 2023-02-03 2023-10-13 蜀道投资集团有限责任公司 Engineering equipment scheduling method, electronic equipment and computer readable medium
CN117579705A (en) * 2024-01-16 2024-02-20 四川并济科技有限公司 System and method for dynamically scheduling servers based on batch data requests
CN117579705B (en) * 2024-01-16 2024-04-02 四川并济科技有限公司 System and method for dynamically scheduling servers based on batch data requests
CN117858262A (en) * 2024-03-07 2024-04-09 成都爱瑞无线科技有限公司 Base station resource scheduling optimization method, device, base station, equipment, medium and product
CN117858262B (en) * 2024-03-07 2024-05-14 成都爱瑞无线科技有限公司 Base station resource scheduling optimization method, device, base station, equipment, medium and product

Similar Documents

Publication Publication Date Title
CN107196877B (en) Method for controlling network flow and network equipment thereof
CN115622952A (en) Resource scheduling method, device, equipment and computer readable storage medium
US9185047B2 (en) Hierarchical profiled scheduling and shaping
JP3898965B2 (en) Radio resource allocation method and base station
US7027457B1 (en) Method and apparatus for providing differentiated Quality-of-Service guarantees in scalable packet switches
CN113767598A (en) System and method for traffic-by-traffic classified routing
US20190199646A1 (en) Scalable traffic management for multiple levels of quality of service
US11785113B2 (en) Client service transmission method and apparatus
US9608927B2 (en) Packet exchanging device, transmission apparatus, and packet scheduling method
US8553708B2 (en) Bandwith allocation method and routing device
CN113676416B (en) Method for improving network service quality in high-speed network card/DPU
US11258717B2 (en) Method for sending service packet, network device, and system
WO2021148020A1 (en) Service class adjustment method, apparatus, device and storage medium
CN111131061B (en) Data transmission method and network equipment
CN110365580B (en) Service quality scheduling method and device, electronic equipment and computer readable storage medium
CN111740922A (en) Data transmission method, device, electronic equipment and medium
CN113765796B (en) Flow forwarding control method and device
CN114553792A (en) Method, device and equipment for adjusting scheduling parameters and computer readable storage medium
CN112804166B (en) Message receiving and sending method, device and storage medium
CN114448903A (en) Message processing method, device and communication equipment
CN116889024A (en) Data stream transmission method, device and network equipment
CN114884902B (en) Data stream transmission method, device, network equipment and storage medium
CN111224884A (en) Processing method for congestion control, message forwarding device and message receiving device
WO2022012204A1 (en) Queue scheduling method, device, and system
Liu et al. Deployment of Asynchronous Traffic Shapers in Data Center Networks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication