WO2018113472A1 - 资源的调度方法和服务器 - Google Patents

资源的调度方法和服务器 Download PDF

Info

Publication number
WO2018113472A1
WO2018113472A1 PCT/CN2017/112522 CN2017112522W WO2018113472A1 WO 2018113472 A1 WO2018113472 A1 WO 2018113472A1 CN 2017112522 W CN2017112522 W CN 2017112522W WO 2018113472 A1 WO2018113472 A1 WO 2018113472A1
Authority
WO
WIPO (PCT)
Prior art keywords
resource
terminal
resources
scheduling
terminals
Prior art date
Application number
PCT/CN2017/112522
Other languages
English (en)
French (fr)
Inventor
王佳
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2018113472A1 publication Critical patent/WO2018113472A1/zh
Priority to US16/355,091 priority Critical patent/US10772115B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/16Central resource management; Negotiation of resources or communication parameters, e.g. negotiating bandwidth or QoS [Quality of Service]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/12Wireless traffic scheduling
    • H04W72/121Wireless traffic scheduling for groups of terminals or users
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/50Allocation or scheduling criteria for wireless resources
    • H04W72/56Allocation or scheduling criteria for wireless resources based on priority criteria
    • H04W72/566Allocation or scheduling criteria for wireless resources based on priority criteria of the information or information source or recipient
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/20Control channels or signalling for resource management
    • H04W72/23Control channels or signalling for resource management in the downlink direction of a wireless link, i.e. towards a terminal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/50Allocation or scheduling criteria for wireless resources
    • H04W72/52Allocation or scheduling criteria for wireless resources based on load

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to resource scheduling techniques.
  • the computer can provide various resources such as memory space, disk space, interface bandwidth, network bandwidth, etc., and various resources of the computer can be respectively used by terminals of different users.
  • resources are allocated by quantity, that is, static resource scheduling.
  • the number of resources that each terminal can use is defined before scheduling, and the scheduling system completes the static allocation of resources according to the definition.
  • the change of resource allocation only comes from the definition update of the terminal, including new users, user logout and user expansion, and capacity reduction.
  • the scheme using such scheduling method includes MEMCG (Memory CGroup) memory control group and network bandwidth control (Traffic Control). , TC) traffic isolation and so on.
  • resources are allocated on time, and another form of resources is statically allocated.
  • the time slice length of resources that each terminal can use is defined before scheduling, and the terminal monopolizes resources within the time slice.
  • the scheduling system does not care about the resource utilization rate in the terminal time slice, and only performs resource isolation by limiting the corresponding usage time to different terminals.
  • Schemes using such scheduling methods include Complete Fair Queue (CFQ) and the like.
  • the entire scheduling process does not consider the actual resource usage of the terminal, and the real-time adjustment of the allocation ratio cannot be performed to meet the continuously changing needs of the user, and may also cause some terminals to idle the resources and reduce the resources. Resource sharing efficiency.
  • the terminal is allowed to use resources on demand in a predefined time slice.
  • the resource exclusive behavior of the terminal in a certain time also brings waste of resources, and the waste is even more serious than the resource allocation scheme, and a larger number of resources will be idle in part of the time slice.
  • the embodiment of the invention provides a resource scheduling method and a server, which are used to improve resource allocation efficiency and usage efficiency.
  • the embodiment of the present invention provides the following technical solutions:
  • the embodiment of the invention provides a resource scheduling method, including:
  • the resource application request includes: a quantity of resource requirements of the first terminal and a resource level requested by the first terminal;
  • the first terminal belongs to a terminal in the scheduling domain;
  • the embodiment of the invention further provides a resource scheduling server, including:
  • the request receiving module is configured to receive a resource application request sent by the first terminal, where the resource request request includes: a quantity of resource requirements of the first terminal and a resource level requested by the first terminal;
  • An initial allocation module configured to determine, according to the quantity requirement of the resource, an initial resource configuration quantity of the first terminal
  • a scheduling redistribution module configured to perform resource scheduling reallocation according to a total number of available resources in the scheduling domain, an initial resource configuration quantity of all terminals in the scheduling domain, and a resource level of all terminals in the scheduling domain, to obtain the first terminal a quantity of resource reconfiguration, where the first terminal belongs to a terminal in the scheduling domain;
  • a resource allocation module configured to allocate resources to the first terminal according to the resource reconfiguration quantity of the first terminal.
  • the embodiment of the invention further provides a server, including:
  • the memory is configured to store program code and transmit the program code to the processor
  • the processor is configured to execute a scheduling method of the foregoing resource according to an instruction in the program code.
  • An embodiment of the present invention further provides a storage medium for storing program code, where the program code is used to execute a scheduling method of the foregoing resource.
  • Embodiments of the present invention also provide a computer program product comprising instructions that, when executed on a computer, cause the computer to perform a scheduling method of the above resources.
  • the embodiment of the invention further provides a resource scheduling method, including:
  • the resource scheduling server receives the resource request request sent by the first terminal, where the resource request request includes: the resource requirement quantity of the first terminal and the resource level requested by the first terminal;
  • the scheduling server of the resource determines the initial resource configuration quantity of the first terminal according to the quantity of the resource requirement
  • the scheduling server of the resource performs resource scheduling reallocation according to the total number of available resources in the scheduling domain, the initial resource configuration quantity of all terminals in the scheduling domain, and the resource levels of all terminals in the scheduling domain, to obtain resource reconfiguration of the first terminal.
  • the number of the first terminal belongs to a terminal in the scheduling domain;
  • the scheduling server of the resource allocates resources to the first terminal according to the resource reconfiguration number of the first terminal.
  • the initial resource configuration quantity of the first terminal is first determined, and then the scheduling redistribution is performed between all terminals in the scheduling domain according to the total number of available resources, the initial resource configuration quantity of each terminal, and the resource level of each terminal.
  • the resource is not statically allocated, but the initial allocation is performed according to the resource requirement of the first terminal, and then the scheduling redistribution is performed according to the resource distribution in the scheduling domain, thereby performing initial allocation and scheduling redistribution. Only afterwards can the amount of resources actually allocated to the first terminal be determined. Therefore, dynamic resource allocation according to the user's demand for resources and actual use conditions can maximize the overall utilization of resources while ensuring high quality use of resources by users. Reduce the cost of unit resources.
  • FIG. 1a is a schematic structural diagram of a resource scheduling server according to an embodiment of the present invention.
  • FIG. 1b is a flowchart of a resource scheduling method according to an embodiment of the present invention.
  • FIG. 2a is a schematic structural diagram of a configuration of a resource scheduling server according to an embodiment of the present invention
  • 2b is a schematic structural diagram of a scheduling redistribution module according to an embodiment of the present invention.
  • 2c is a schematic diagram showing the structure of a redistribution determination module according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram showing the structure of a server according to an embodiment of the present invention.
  • the embodiment of the invention provides a resource scheduling method and a server, which are used to improve resource allocation efficiency and usage efficiency.
  • the resource is statically allocated.
  • the resource utilization is insufficient in the whole scheduling process, which reduces the resource sharing efficiency.
  • flexible scheduling based on resource grading can be implemented, and the defined resource requirements include the resource level and the number of resource requirements, and meet the requirements of various types of scheduling scenarios.
  • the resource requirement quantity definition of the terminal is only one input of the scheduling process.
  • the actual number of resources available in the entire scheduling domain that is, the resource level definition of other terminals at the same time and the number of resource requirements, etc. Flexible allocation of resources to completely solve the problem of resource waste while meeting the definition of resource requirements of the terminal.
  • the resource scheduling method provided by the embodiment of the present invention is implemented by a resource-based scheduling server.
  • a resource scheduling server which has data storage, data processing functions, and the like.
  • Processing device see FIG. 1a
  • FIG. 1a shows a resource scheduling according to an embodiment of the present invention.
  • a schematic diagram of the structure of the server, as shown in FIG. 1a, the scheduling server of the resource may include:
  • the processor 110 the memory 120, the communication interface 130, the input and output interface 140, and the communication bus 150.
  • the processor 110, the memory 120, the communication interface 130, and the input/output interface 140 complete communication with each other through the communication bus 150.
  • the memory 120 can be used to store software programs and modules, and the processor 110 executes various functional applications and data processing of the resource scheduling server by running software programs and modules stored in the memory 120.
  • the memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function, and the like.
  • memory 120 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the communication interface 130 can be used for data exchange between the server and an external device.
  • the input/output interface 140 is configured to receive information such as the number of resource requirements requested by the terminal and the resource level requested by the terminal, and generate key signal input related to user setting and function control of the scheduling server of the resource, and then input the request according to the terminal resource input. Processing, outputting the allocated resources to the terminal, and generating a key signal output related to user setting and function control of the resource scheduling server.
  • the processor 110 loads the executable file corresponding to the process of one or more application programs into the memory 120 according to the following instructions, and is executed by the processor 110 to be stored in the memory 120.
  • the resource scheduling method provided by the embodiment of the present application is implemented.
  • a resource scheduling method provided by an embodiment of the present application may include the following steps:
  • the scheduling domain is a dividing unit for the resource set in the scheduling range, and all terminals in the scheduling domain may request to allocate all the resources in the resource set in the scheduling domain.
  • the resource scheduling process of a terminal in the scheduling domain is taken as an example.
  • the terminal that needs resource allocation is defined as a “first terminal”, and a resource allocation manner of other terminals in the scheduling domain is performed.
  • resource scheduling of the first terminal in the embodiment of the present invention reference may be made.
  • the resources described in the embodiments of the present invention may specifically refer to multiple types of resources, as illustrated by the following: a central processing unit (CPU) time slice provided by a computer, a memory space, a disk space and a bandwidth, a network bandwidth, and the like.
  • Resources specific resource implementation methods are not limited, depending on the user's needs and the type of resources managed by the scheduling server.
  • the user when the user initiates a resource request request to the resource scheduling server by using the first terminal, the user needs to select the resource requirement quantity of the user, that is, the number of resources required by the user, and the user also needs to select the required resource.
  • a resource level where the resource level may also be referred to as a resource priority or a resource quality, wherein the higher the resource level, the more resources are allocated by the first terminal, and the higher the resource level, the higher the quality of the resource used by the user.
  • the resource level can be divided into two different levels.
  • the resource level can be divided into two or more different levels.
  • the user can select the resource level that he needs. For example, the resource level can be divided into high.
  • the level and the low level can also be divided into three levels: high level, medium level, low level, and the resource level can also be divided into five levels: level 0, level 1, level 2, level 3, level 4, Each level can be configured with specific resource quality and resource quantity. For details, refer to the examples in the subsequent embodiments.
  • the resource level includes at least one of the following level information: resource exclusive, resource sharing, resource quota, resource quota, and resource borrowing.
  • the first terminal may carry the corresponding level information in the resource application request according to the user selection.
  • the resource exclusive refers to the resource occupancy level of the exclusive level.
  • the resource share obtained by the terminal cannot be less than the minimum resource required by the resource exclusive level. This level needs to exclude the use of other terminals.
  • the share of the resource is the level of resource occupation at the sharing level.
  • the resource share obtained by the terminal cannot be less than the minimum amount of resources required by the resource exclusive level. This level can share some resources with other terminals.
  • the resource quota (Static) is the resource occupancy level of the specified quantity level.
  • the resource share that the terminal can obtain is equal to the resource share defined by the resource quota level, and the resource share enjoyed by the terminal remains unchanged.
  • the resource limit (Limited) refers to the resource level of the quota level.
  • the resource share that the terminal can obtain does not exceed the resource share required by the resource limit level. This level needs to give up part of the resource quantity to the high-level terminal.
  • Resource borrowing (Loan) refers to the level of resource occupancy at the borrowing level.
  • the resource share that the terminal can obtain does not exceed the resource share required by the resource quota level. The difference from the quota level is that the resource share owned by the terminal is based on the needs of other terminals. Being taken away at any time.
  • the resource scheduling server needs to consider the resource sharing efficiency when managing resources, which is a core performance indicator of the server.
  • the efficiency of resource sharing is mainly reflected in the satisfaction of the needs of individual users and the utilization of the overall resources.
  • the degree of satisfaction of the individual user requirements emphasizes the resource isolation capability of the scheduling system, that is, the resource is guaranteed to comply with the user's expectations according to the user's expectations; the utilization of the overall resource emphasizes the resource sharing of the scheduling system. Capability, that is, to ensure that resources are fully shared by all users, minimizing the waste of resources.
  • the resource scheduling server can implement flexible resource allocation, that is, non-static resource allocation, and can adjust the resource allocation according to the resource requirement quantity definition and the resource level dynamic.
  • flexible resource allocation that is, non-static resource allocation
  • the user when the user applies for a resource, the user needs to input the required resource requirement quantity and resource level.
  • the scheduling server of the resource after receiving the resource application request sent by the user through the first terminal, the scheduling server of the resource first performs initial allocation of resources according to the quantity of resource requirements, that is, first determines to allocate to the first
  • the initial resource configuration quantity of the terminal the initial resource configuration quantity is determined by the number of resource requirements requested by the user, and the initial resource configuration quantity determined by the resource scheduling server is an initial allocation, and the initial resource configuration quantity is not finally allocated to the first terminal.
  • the number of resources needs to perform the scheduling redistribution process of step 103.
  • the initial allocation of resources is performed on the first terminal in step 102, and other terminals in the scheduling domain may also perform initial allocation of resources to other terminals according to the manner in step 102, for example,
  • the second terminal and the third terminal may exist in the scheduling domain, and the resource scheduling server may perform initial resource allocation on the second terminal and the third terminal according to the initial allocation mode of resources of the first terminal. Both the second terminal and the third terminal can determine the corresponding initial resource configuration quantity.
  • the initial resource configuration quantity of all terminals in the scheduling domain can be obtained, and the initial resource configuration quantity and the corresponding resource level for each terminal in the scheduling domain, the resource The scheduling server can schedule all terminals in the domain according to the total number of available resources in the scheduling domain.
  • the resource allocation re-allocation is performed by the initial resource configuration quantity and the resource level of all terminals in the scheduling domain, and the resource reconfiguration quantity of the first terminal is obtained.
  • the resource levels of all terminals in the scheduling domain may not be exactly the same, and there may be some high levels and some low levels. For example, different resource levels correspond to different prices, and the user selects the resource level definitions that he needs, which means that the pair is clear.
  • the unqualified limited preemption capability of the terminal of the high-level user to the terminal of the low-level user can be provided according to the definition, and the resource share occupied by the terminal of the high-level user in a single scheduling period can take the maximum available resource quantity and resource requirement.
  • the elastic scheduling of resources can calculate the initial resource allocation quantity under different resource levels, the minimum resource quantity, the resource quantity fluctuation range and other factors can affect the final scheduling result, as long as the elastic adjustment of the quantity of resources in the scheduling domain makes different
  • the resource level terminal can enjoy the number of resources of the corresponding level.
  • resource allocation re-allocation can be used for specific requirements of resource levels.
  • the scheduling server of the resource may further determine, according to the relationship between the allocated resource share of the first terminal and the actual resource requirement of the first terminal, the resource usage status of the first terminal, specifically, the resource.
  • the usage status includes: a busy status corresponding to the amount of allocated resources being less than the actual resource requirement of the terminal, and an idle state corresponding to the number of allocated resources being greater than the actual resource requirement of the terminal.
  • Step 103 Perform resource scheduling reallocation according to the total number of available resources in the scheduling domain, the initial resource configuration quantity of all terminals in the scheduling domain, and the resource levels of all terminals in the scheduling domain, including:
  • A1 Obtain a resource usage state of all terminals in the scheduling domain, where the resource usage state includes: a busy state corresponding to the allocated resource quantity being less than the actual resource requirement of the terminal, and an idle state corresponding to the allocated resource quantity being greater than the actual resource requirement of the terminal;
  • A2 according to the resource usage status and resource level of all terminals in the scheduling domain, and the initial resource configuration quantity of all terminals in the scheduling domain, determine the total number of busy minimum resources required when all terminals in the scheduling domain are busy, wherein different resources are used.
  • the number of resources to which the terminals of the status and/or different resource levels are assigned is different;
  • A3. Determine, according to the total number of minimum resources in the busy state and the total number of available resources in the scheduling domain, the number of reassignable resources of all terminals in the scheduling domain;
  • A4. Determine, according to the number of reassignable resources of all terminals in the scheduling domain, the number of resource reconfigurations of the first terminal.
  • the resource scheduling server determines the resource usage status of all terminals in the scheduling domain, and the resource usage status includes: a busy state (Busy) corresponding to the allocated resource quantity being smaller than the actual resource requirement of the terminal, and corresponding to the actual resource requirement of the terminal corresponding to the actual resource requirement of the terminal.
  • Idle state For example, the busy state means that the current resource allocation of the terminal cannot meet the needs of the user, and more allocation is needed.
  • the idle state means that the current resource allocation of the terminal exceeds the actual usage of the user.
  • the total number of minimum resources in the busy state required for all terminals in the scheduling domain to be busy is determined, and the resource usage status is different.
  • the number of resources allocated to the terminals of different resource levels is different.
  • the minimum number of resources in the busy state of the terminal needs to be counted, and the total is obtained. The total number of minimum resources required for busy state when the terminal is busy.
  • the number of reassignable resources of all terminals in the scheduling domain is determined, and the number of reassignable resources of all terminals in the scheduling domain refers to the basics of all terminals in the scheduling domain.
  • the amount of resources that can be dynamically adjusted under demand is performed.
  • resource scheduling re-allocation is performed according to the number of re-allocable resources of all terminals in the scheduling domain, and the resource reconfiguration quantity of the first terminal is determined according to the result of resource reallocation.
  • the first resource allocation quantity of the first terminal may be re-allocated according to the specific value of the number of re-allocable resources of all the terminals in the scheduling domain and the resource level of the first terminal, for example, all terminals in the scheduling domain may be configured.
  • the larger the number of redistributed resources the larger the number of resources that can be scheduled to the first terminal. If the number of redistributable resources of all terminals in the scheduling domain is small, the number of resources scheduled to the first terminal is smaller.
  • step A3 determines, according to the total number of minimum resources in the busy state and the total number of available resources in the scheduling domain, the number of reassignable resources of all terminals in the scheduling domain, including:
  • A31 Calculate the difference between the total number of available resources in the scheduling domain and the total number of minimum resources in the busy state, and obtain the number of redistributable resources of all terminals in the scheduling domain.
  • the difference between the total number of available resources in the scheduling domain and the total number of minimum resources in the busy state is obtained, and the number of redistributable resources of all terminals in the scheduling domain is obtained.
  • the calculation process of the number of re-allocable resources of all terminals in the scheduling domain may also be obtained by performing a difference calculation between the total number of available resources in the scheduling domain and the total number of resources in the busy state, for example, according to all terminals in the scheduling domain.
  • the sum of the resource levels determines an adjustment ratio, and the adjustment ratio is multiplied by the difference calculation result to obtain the number of redistributable resources of all terminals in the scheduling domain.
  • step A4 determines the number of resource reconfigurations of the first terminal according to the number of reassignable resources of all terminals in the scheduling domain, including:
  • A41 Determine whether the number of reassignable resources of all terminals in the scheduling domain is equal to 0.
  • A42 If the number of reassignable resources of all the terminals in the scheduling domain is not equal to 0, determine the location according to the resource usage state and the resource level of the first terminal, and the resource usage status and resource level of the terminal other than the first terminal in the scheduling domain.
  • the number of resource reconfigurations of the first terminal is equal to a sum of the initial resource configuration quantity of the first terminal and the reassignable resource quantity of the first terminal;
  • the number of re-allocable resources of all the terminals in the scheduling domain is not equal to 0, it indicates that the number of initial resource allocations of all terminals in the scheduling domain needs to be re-allocated to change the number of resources corresponding to the terminals in different resource levels in the scheduling domain. For example, determining, according to the resource usage status and the resource level of the first terminal, the resource usage status and the resource level of the terminal other than the first terminal in the scheduling domain, the number of resource reconfigurations of the first terminal is equal to the first terminal.
  • the sum of the initial resource configuration quantity and the number of re-allocable resources of the first terminal, the resource level and resource usage status of each terminal in the scheduling domain all affect the specific manner of scheduling redistribution.
  • the current resource allocation mode of all the terminals in the scheduling domain just meets the resource requirement of the corresponding resource level, and the number of resource reconfigurations of the first terminal can be determined. It is equal to the initial resource configuration quantity of the first terminal.
  • step A42 is based on resource usage status and resources of the first terminal.
  • Level, the resource usage status and the resource level of the terminal other than the first terminal in the scheduling domain, determining that the resource reconfiguration quantity of the first terminal is equal to the initial resource configuration quantity of the first terminal and the first terminal The sum of the number of redistributed resources, including:
  • the number of re-allocable resources of all terminals in the scheduling domain is greater than 0, the number of re-allocable resources of the first terminal is that all terminals in the domain are scheduled according to resource usage states and resource levels of all terminals in the scheduling domain. The number of resources allocated for the first terminal when the resource allocation is redistributed;
  • the number of reassignable resources of all terminals in the scheduling domain is less than 0, the number of re-allocable resources of the first terminal is according to resource usage states and resource levels of all terminals in the scheduling domain, and is from the first partial terminal set.
  • a specific number of resources are allocated, and a specific number of resources are reallocated to the second partial terminal set, and the number of resources schedulable by the first terminal is determined according to the set to which the first terminal belongs and a specific number of resources.
  • the number of re-allocable resources of all the terminals in the scheduling domain is greater than 0, the total number of available resources in the scheduling domain is still remaining, and all the terminals in the domain may be scheduled according to the resource usage state and resource level of all terminals in the scheduling domain.
  • the number of redistributed resources is redistributed. If the first terminal allocates the number of relocatable resources according to the resource usage state and the resource level, the initial resource configuration quantity of the first terminal is used by the number of reassignable resources of the first terminal. By superimposing, an additional increase of resources of the first terminal is implemented, and the first terminal can configure more resources than the number of resource requirements required by the user, thereby improving the quality of the user enjoying the resource.
  • the resource usage state and the resource level are divided into a first partial terminal set and a second partial terminal set.
  • the first partial terminal set is a terminal set that needs to take out resources
  • the second partial terminal set is a terminal set that can further increase resource allocation, which is understandable. Yes, the first partial terminal set has a lower resource level terminal than the second partial terminal set.
  • the first terminal may belong to the first partial terminal set, or the first terminal may belong to the second partial terminal set.
  • the resource scheduling method provided by the embodiment of the present invention may further include the following steps:
  • the resource scheduling server re-allocates the number of redistributable resources of all terminals in the scheduling domain according to the resource usage state and resource level of all terminals in the scheduling domain, and if there is still a part of the redistributable resources remaining, The resource over-selling can be realized, and the resource scheduling server can add a new terminal in the scheduling domain, and then allocate a part of the redistributable resources to the new terminal, thereby improving resource utilization.
  • the scheduling re-allocation process of the first terminal may be performed to determine the first terminal.
  • the resource reconfiguration quantity, the resource scheduling server may allocate the actually available resource share to the first terminal according to the resource reconfiguration quantity of the first terminal, and the resource reconfiguration quantity obtained after the scheduling reassignment is to finally allocate resources to the first terminal.
  • the first terminal can enjoy the resource share that meets the resource level selected by the user, so that the first terminal can use the actually available resource share allocated by the scheduling server of the resource to provide the resource service for the user, for example,
  • the user obtains the storage space resource from the scheduling server of the resource by using the first terminal, and the scheduling server of the resource may allocate the storage space resource share to the first terminal after initial allocation and scheduling redistribution, and the user may use the storage space resource according to the storage space resource share. .
  • the resource scheduling server can allocate the resource share applicable to the resource level to the terminal, and perform dynamic resource allocation according to the user's demand for the resource and the actual use situation, thereby ensuring high quality use of the user. Resources maximize the overall utilization of resources and reduce the cost per unit of resources.
  • the initial resource configuration quantity of the first terminal may be determined first, and then the total number of available resources and the initial resource configuration of each terminal among all terminals in the scheduling domain.
  • the quantity and the resource level of each terminal are scheduled to be re-allocated, and the number of resource reconfigurations of the first terminal is obtained, and the resource allocation of the first terminal is performed by using the resource reconfiguration quantity of the first terminal, that is, the quantity of resources finally allocated by the first terminal.
  • the number of resource reconfigurations of the first terminal is determined.
  • the resource is not statically allocated, but the initial allocation is performed according to the resource requirement of the terminal, and then the scheduling redistribution is performed according to the resource distribution in the scheduling domain. Therefore, after the initial allocation and the scheduling re-allocation, the quantity of resources actually allocated to the first terminal can be determined. Therefore, the resource utilization rate and the quality of the resource can be improved, and the dynamic resource allocation is performed according to the user's demand for the resource and the actual use situation. Can guarantee the high quality of resources for users , To maximize the overall utilization of resources, reduce the cost per unit of resources.
  • the embodiment of the invention provides an elastic scheduling scheme based on resource grading, which allows the defined resource requirements to include both the resource requirement quantity and the resource level, and meets the requirements of various types of scheduling scenarios.
  • the resource share definition of the terminal is only one input of the scheduling process.
  • the scheduling system also flexibly allocates resources according to the busyness level of the resources, that is, the resource level definition of other terminals at the same time and the quantity demand of resources, and completely solves the problem of resource waste. At the same time, meet the definition of the resource requirements of the terminal.
  • the embodiment of the present invention can provide the unfair limited preemptive capability of the terminal of the high-level user to the terminal of the low-level user according to the definition.
  • the share occupied by the terminal of the high-level user in a single scheduling period takes a smaller value of the maximum number of available resources and the number of resource requirements, that is, the terminal may completely occupy the available resources in the period, and the terminal of the low-level user needs to wait. Allocation in subsequent cycles.
  • the scheduling domain in the embodiment of the present invention is a collection of resources and a division unit of the scheduling range.
  • the flexible scheduling allocation in the embodiment of the present invention refers to a non-static resource allocation, and dynamically adjusts the scheduling mode of resource allocation according to definitions and usage conditions.
  • Resource Priority Level refers to the quality/level guarantee of resources used by the terminal. The highest level is resource exclusive, the exclusive resource is no longer allocated to other users' terminals, even if the resource is idle; the lowest level is resource borrowing, and the borrowed resources are returned at any time, even if the terminal is using the resource.
  • Resource share (Quota) refers to the amount of resources currently allocated to the terminal.
  • the resource resilient scheduling scheme is suitable for cloud computing as an example, for example, for resources such as cloud storage and cloud networking.
  • the platform for enjoying/selling, the scheduling efficiency of resources directly determines the cost of the resources sold by the platform, and belongs to the core technology of the platform to maintain competitive advantage and establish the threshold.
  • Cloud platform users are most concerned about the price and quality of resources.
  • the core is to reduce resource costs by increasing resource utilization, increasing resource sharing/selling rate or even overselling rate; to ensure resource quality, it is necessary to honor the commitment to the availability of users, according to the definition of the terminal. Provide sufficient resources.
  • the flexible scheduling provided by the embodiment of the present invention can ensure the maximum resource utilization.
  • the resource allocation according to the definition of the resource level can ensure the quality of the resources obtained by the terminal to the greatest extent.
  • the embodiments of the present invention can meet the requirements of users for different levels of resources, and can implement resource usage including resource exclusive, resource sharing, resource quota, resource quota, and resource borrowing.
  • resource usage including resource exclusive, resource sharing, resource quota, resource quota, and resource borrowing.
  • the user When applying for a resource, the user must input the quantity and level of the required resources.
  • the flexible scheduling system calculates the initial resource quantity of the terminal, the minimum resource quantity, the fluctuation range of the resource quantity, etc., and completes the resource according to the current total resource amount and other terminal usage scenarios. Match and assignment.
  • Different resource levels correspond to different prices, and the user's definition of the resource level that he or she needs to complete means that his or her expectations for resource quality are clear.
  • the use of the embodiment of the invention can also effectively increase the sales rate/overselling rate of resources, and the flexible scheduling of resources can be used to secondly allocate the allocated unused resources without violating the definition of resource levels, and sell the resources to The terminal of the new user forms an oversold of resources.
  • Busy The current resource quantity allocation cannot meet the user's needs, and more allocation is needed.
  • Idle The current resource allocation exceeds the number actually used by the user. As shown in Table 1 below:
  • X is the initial resource allocation data allocated to the terminal under different resource levels
  • MIN refers to the minimum resource allocation unit
  • MAX refers to the maximum available resource quantity
  • Quota refers to the resource share allocated to the terminal.
  • Exclusive is the mutual exclusion level: no matter how busy or busy, the terminal can not get less than the defined resource share.
  • Share is a sharing level: the terminal can give up resources when it is idle, and more than the defined resource share when it is busy.
  • Static is the quantitative level: the resources that the terminal can obtain are equal to the defined shares, regardless of busy and idle.
  • Limited is the quota level: the resources that can be obtained when the terminal is busy do not exceed the defined share, and the terminal can give up resources when it is idle.
  • Loan is a borrowing level: the difference from the quota level is that even if the terminal is currently busy, the resources owned can be taken away by other terminals.
  • the guarantee of resource quality is to meet the minimum resource requirement of the terminal in the free/busy state.
  • the resource allocation process in the embodiment of the present invention includes whether the allocation can be determined. The judgment is based on the sum of the minimum resource quantity requirements of the busy state of all terminals is less than or equal to the total available resources.
  • the current number of resources is X Busy(RT-) Idle(RT+) 0,Exclusive 0 X-Quota 1,Share Quota-X (X ⁇ Quota) X-MIN 2, Static 0 0 3, Limited Quota-X (X ⁇ Quota) X-MIN 4, Loan X-MIN X-MIN
  • the sum of the number of resources that can be reallocated by all terminals is expressed by RT.
  • the terminal can release resources.
  • the terminal of the mutual exclusion level transits from the busy state to the idle state, in some cases, the terminal needs more resources, such as when the terminal of the sharing level is turned from the idle state to the busy state. Therefore, the calculated RT may be positive, negative, or zero.
  • the remaining resources can be allocated to the terminal of the high-priority user for resource expansion.
  • the terminal in the busy state is preferentially selected, and the priority is from high to low; if there is still resource remaining after the allocation is completed, the terminal in the idle state is selected, and the priority is also from high to low.
  • the total allocation order is: mutual exclusion (busy) > shared (busy) > loan (busy) > shared (free) > restricted (free) > loan (free).
  • RT ⁇ 0 it means that the terminal's demand for resources exceeds the available resources.
  • a second round of resource reallocation needs to be performed, and the resource allocation quantity of some terminals is squeezed. Only the mutual exclusion level and sharing level are allowed for the second round of reassignment. Contrary to the former resource expansion situation, the order of resource squeezing is from low to high priority, that is, the terminal of the user at the sharing level is squeezed first, and then the terminal of the user of the mutually exclusive level is squeezed, and the minimum resource requirement is squeezed. , that is, the terminal's resource share Quota. If the recalculated RT after squeezing is still less than 0, a terminal migration is required.
  • the resources may be oversold, and whether the overselling of resources is performed according to the total number of resources actually used by all terminals in the scheduling domain. If the total number of resources actually used is always less than the total amount of available resources, then the overselling of the resources can be performed, and the terminal of the new user is allocated to the scheduling domain.
  • the embodiment of the invention provides a resource scheduling system based on resource level and resource quantity definition, which performs dynamic resource allocation according to user demand for resources and actual use situation, and can maximize the overall utilization of resources while ensuring high quality use of resources by users. Rate, reduce the cost of unit resources.
  • the scheduling method provided by the embodiment of the present invention the overall sales rate of the resource sharing/sales system such as the cloud platform can be improved, the sales revenue of the system can be increased, and the technical/commercial competitiveness of the system can be improved.
  • the flexible resource scheduling method provided by the present invention allocates resource elasticity to all terminals, and maximizes resource utilization efficiency while ensuring that each user can use resources according to definition and security, thereby achieving high resource sharing efficiency.
  • an elastic resource scheduling solution is described, and the type of the resource is not restricted.
  • the cloud computing platform and the like are only examples of the service scenario in which the resource scheduling solution is applied.
  • the definitions of the five resource levels, such as mutual exclusion and sharing, which are described in the embodiments of the present invention are only defined as a resource level, or an implementation manner of the resource quality definition, and other resource classification manners, or different resource quality definitions are also described in the embodiment of the present invention.
  • the scope of elastic scheduling is defined based on the resource level and the number of resources.
  • the embodiment of the present invention further provides a resource scheduling server, which is explained below in conjunction with FIG. 2a.
  • FIG. 2a is a schematic structural diagram of a resource scheduling server according to an embodiment of the present invention.
  • the server includes:
  • the request receiving module 201 is configured to receive a resource application request sent by the first terminal, where the resource request request includes: a quantity requirement of the first terminal and a resource level requested by the first terminal;
  • the initial allocation module 202 is configured to determine an initial resource configuration quantity of the first terminal according to the resource requirement quantity;
  • the scheduling redistribution module 203 is configured to perform resource scheduling reallocation according to the total number of available resources in the scheduling domain, the initial resource configuration quantity of all terminals in the scheduling domain, and the resource levels of all terminals in the scheduling domain, to obtain the first terminal.
  • the resource allocation module 204 is configured to allocate resources to the first terminal according to the resource reconfiguration quantity of the first terminal.
  • the scheduling redistribution module 203 includes:
  • the state obtaining module 2031 is configured to acquire a resource usage state of all the terminals in the scheduling domain, where the resource usage state includes: a busy state corresponding to the allocated resource quantity being smaller than the actual resource requirement of the terminal, and corresponding to the allocated resource quantity being greater than the actual terminal.
  • the busy state resource requirement determining module 2032 is configured to determine, according to a resource usage state and a resource level of all terminals in the scheduling domain, and an initial resource configuration quantity of all terminals in the scheduling domain, that all terminals in the scheduling domain are in a busy state.
  • the total number of minimum resources in the busy state, wherein the number of resources to which the terminals having different resource usage states and/or different resource levels are allocated is different;
  • the realistributable resource determining module 2033 is configured to determine, according to the total number of minimum resources in the busy state and the total number of available resources in the scheduling domain, a quantity of reassignable resources of all terminals in the scheduling domain;
  • the redistribution determination module 2034 is configured to determine a resource reconfiguration quantity of the first terminal according to the reassignable resource quantity of all terminals in the scheduling domain.
  • the re-allocable resource determining module 2033 is specifically configured to calculate a difference between a total number of available resources in the scheduling domain and a total number of minimum resources in the busy state, to obtain the The number of reassignable resources for all terminals in the scheduling domain.
  • the redistribution determination module 2034 includes:
  • the re-allocable resource quantity determining module 20341 is configured to determine whether the number of re-allocable resources of all terminals in the scheduling domain is equal to 0;
  • the first redistribution module 20342 is configured to: if the number of re-allocable resources of all terminals in the scheduling domain is not equal to 0, according to the resource usage state and resource level of the first terminal, and the first in the scheduling domain Determining, by the resource usage status and the resource level of the terminal other than the terminal, that the number of resource reconfigurations of the first terminal is equal to the sum of the initial resource configuration quantity of the first terminal and the reassignable resource quantity of the first terminal value;
  • the second redistribution module 20343 is configured to determine that the resource reconfiguration quantity of the first terminal is equal to the initial resource configuration quantity of the first terminal, if the number of reassignable resources of all terminals in the scheduling domain is equal to 0.
  • the number of reassignable resources of the first terminal is determined by:
  • the number of re-allocable resources of the first terminal is the scheduling according to resource usage states and resource levels of all terminals in the scheduling domain.
  • the allocated resource quantity is a specific number of resources divided from the first partial terminal set according to resource usage states and resource levels of all terminals in the scheduling domain, and a specific number of resources are reallocated to the second partial terminal set, according to the first The set to which the terminal belongs and the specified number of resources determine the number of resources that the first terminal can schedule.
  • the resource allocation module 204 is further configured to: the first redistribution module has a reassignable resource quantity greater than 0 in all terminals in the scheduling domain, and the resource scheduling The server re-allocates the number of re-allocable resources of all the terminals in the scheduling domain according to the resource usage state and the resource level of all the terminals in the scheduling domain, and the remaining number of re-allocable resources remains in the scheduling domain. Adding a new terminal; allocating the partially redistributable resource amount to the new terminal.
  • the resource level includes at least one of the following level information: resource exclusive, resource sharing, resource quota, resource quota, and resource borrowing.
  • the initial resource configuration quantity of the first terminal may be determined first, and then the total number of available resources and the initial resource configuration of each terminal among all terminals in the scheduling domain.
  • the quantity and the resource level of each terminal are scheduled to be re-allocated, and the number of resource reconfigurations of the first terminal is obtained, and the resource allocation of the first terminal is performed by using the resource reconfiguration quantity of the first terminal, that is, the quantity of resources finally allocated by the first terminal.
  • the number of resource reconfigurations of the first terminal is determined.
  • the resource is not statically allocated, but the initial allocation is performed according to the resource requirement of the terminal, and then the scheduling redistribution is performed according to the resource distribution in the scheduling domain. Therefore, after the initial allocation and the scheduling re-allocation, the quantity of resources actually allocated to the first terminal can be determined. Therefore, the resource utilization rate and the quality of the resource can be improved, and the dynamic resource allocation is performed according to the user's demand for the resource and the actual use situation. Can guarantee the high quality of resources for users , To maximize the overall utilization of resources, reduce the cost per unit of resources.
  • the server includes:
  • the memory is configured to store program code and transmit the program code to the processor
  • the processor is configured to execute a scheduling method of the foregoing resource according to an instruction in the program code.
  • FIG. 3 is a schematic structural diagram of a server according to an embodiment of the present invention.
  • the server 1100 may have a large difference due to different configurations or performances, and may include one or more.
  • Central processing units (CPU) 1122 eg, one or more processors
  • memory 1132 e.g., one or more storage media 1130 storing application 1142 or data 1144 (eg, one or one storage device in Shanghai) .
  • the memory 1132 and the storage medium 1130 may be short-term storage or persistent storage.
  • the program stored on storage medium 1130 may include one or more modules (not shown), each of which may include a series of instruction operations in the server.
  • central processor 1122 can be configured to communicate with storage medium 1130, executing a series of instruction operations in storage medium 1130 on server 1100.
  • Server 1100 may also include one or more power sources 1126, one or more wired or wireless network interfaces 1150, one or more input and output interfaces 1158, and/or one or more operating systems 1141, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM and more.
  • operating systems 1141 such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM and more.
  • the scheduling method steps of the resources executed by the server in the above embodiment may be based on the server structure shown in FIG.
  • an embodiment of the present invention further provides a storage medium for storing program code, where the program code is used to execute a scheduling method of any one of the foregoing resources.
  • embodiments of the present invention also provide a computer program product comprising instructions that, when run on a computer, cause the computer to perform the scheduling method of the resources.
  • the embodiment of the present invention further provides a resource scheduling method, including:
  • the resource scheduling server receives the resource request request sent by the first terminal, where the resource request request includes: the resource requirement quantity of the first terminal and the resource level requested by the first terminal;
  • the scheduling server of the resource determines the initial resource configuration quantity of the first terminal according to the quantity of the resource requirement
  • the scheduling server of the resource performs resource scheduling reallocation according to the total number of available resources in the scheduling domain, the initial resource configuration quantity of all terminals in the scheduling domain, and the resource levels of all terminals in the scheduling domain, to obtain resource reconfiguration of the first terminal.
  • the number of the first terminal belongs to a terminal in the scheduling domain;
  • the scheduling server of the resource allocates resources to the first terminal according to the resource reconfiguration number of the first terminal.
  • the scheduling server of the resource performs resource scheduling redistribution according to the total number of available resources in the scheduling domain, the initial resource configuration quantity of all terminals in the scheduling domain, and the resource levels of all terminals in the scheduling domain, to obtain the The number of resource reconfigurations of the first terminal, including:
  • the resource scheduling server acquires the resource usage status of all the terminals in the scheduling domain, where the resource usage status includes: a busy status corresponding to the allocated resource quantity being smaller than the actual resource requirement of the terminal, and corresponding to the actual resource requirement of the terminal corresponding to the actual resource requirement of the terminal. Idle state
  • the scheduling server of the resource determines, according to the resource usage status and resource level of all terminals in the scheduling domain, and the initial resource configuration quantity of all terminals in the scheduling domain, the total number of minimum resources required for busy state in all the terminals in the scheduling domain. , wherein the number of resources to which the terminals having different resource usage states and/or different resource levels are allocated is different;
  • the scheduling server of the resource according to the total number of minimum resources in the busy state and the total number of available resources in the scheduling domain Determining a number of redistributable resources of all terminals in the scheduling domain;
  • the scheduling server of the resource determines the resource reconfiguration quantity of the first terminal according to the number of reassignable resources of all terminals in the scheduling domain.
  • the scheduling server of the resource determines the number of redistributable resources of all terminals in the scheduling domain according to the total number of the minimum resources in the busy state and the total number of available resources in the scheduling domain, including:
  • the scheduling server of the resource calculates a difference between the total number of available resources in the scheduling domain and the total number of minimum resources in the busy state, and obtains the number of redistributable resources of all terminals in the scheduling domain.
  • the scheduling server of the resource determines the resource reconfiguration quantity of the first terminal according to the number of re-allocable resources of all the terminals in the scheduling domain, including:
  • the scheduling server of the resource determines whether the number of redistributable resources of all terminals in the scheduling domain is equal to 0;
  • the scheduling server of the resource is based on the resource usage state and the resource level of the first terminal, and other terminals in the scheduling domain except the first terminal. Determining, by the resource usage state and the resource level, that the number of resource reconfigurations of the first terminal is equal to a sum of an initial resource configuration quantity of the first terminal and a reassignable resource quantity of the first terminal;
  • the scheduling server of the resource determines that the quantity of resource reconfiguration of the first terminal is equal to the initial resource configuration quantity of the first terminal.
  • the quantity of the redistributable resources of the first terminal is determined by:
  • the number of re-allocable resources of all the terminals in the scheduling domain is greater than 0, the number of re-allocable resources of the first terminal is a resource scheduling state according to resource usage states and resource levels of all terminals in the scheduling domain.
  • the number of resources allocated to the first terminal when the number of re-allocable resources of all the terminals in the scheduling domain is redistributed by the resource;
  • the number of re-allocable resources of all terminals in the scheduling domain is less than 0, the number of re-allocable resources of the first terminal is a resource scheduling state according to resource usage states and resource levels of all terminals in the scheduling domain. Demarcating a specific number of resources from the first partial terminal set, and reallocating a specific number of resources to the second partial terminal set, where the resource scheduling server determines according to the set to which the first terminal belongs and the specific quantity of resources. The number of resources that the first terminal can schedule.
  • the method further includes:
  • the resource scheduling server allocates reassignable resources of all terminals in the scheduling domain. After the quantity is reassigned, there is still a part of the number of redistributable resources remaining, and a new terminal is added in the scheduling domain;
  • a scheduling server of resources allocates the partially redistributable amount of resources to the new terminal.
  • the resource level includes at least one of the following level information: resource exclusive, resource sharing, resource quota, resource quota, and resource borrowing.
  • the resource scheduling server may first determine the initial of the first terminal.
  • the number of resources is configured, and then all the terminals in the scheduling domain perform scheduling redistribution according to the total number of available resources, the initial resource configuration number of each terminal, and the resource level of each terminal, and obtain the resource reconfiguration quantity of the first terminal.
  • the resource reconfiguration quantity of a terminal allocates resources to the first terminal, that is, the number of resources finally allocated by the first terminal is determined by the number of resource reconfigurations of the first terminal, and therefore, the static allocation resource is not in the embodiment of the present invention.
  • the resource scheduling server first performs initial allocation according to the resource requirements of the terminal, and then performs scheduling re-allocation according to the resource distribution in the scheduling domain, so that the initial allocation and scheduling redistribution can determine the actual number of resources allocated to the first terminal. Therefore, the resource utilization rate and the quality of the resource can be improved, and the dynamic resource allocation can be performed according to the user's demand for the resource and the actual use situation, and the overall utilization rate of the resource can be maximized while the user is guaranteed to use the resource with high quality.
  • the cost of resources is used.
  • the device embodiments described above and the last embodiment of the method with an execution body are merely illustrative, wherein the units described as separate components may or may not be physically separate.
  • the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units.
  • Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • the connection relationship between the modules indicates that there is a communication connection between them, and specifically, one or more communication buses or signal lines can be realized.
  • the present invention can be implemented by means of software plus necessary general hardware, and of course, dedicated hardware, dedicated CPU, dedicated memory, dedicated memory, Special components and so on.
  • functions performed by computer programs can be easily implemented with the corresponding hardware, and the specific hardware structure used to implement the same function can be various, such as analog circuits, digital circuits, or dedicated circuits. Circuits, etc.
  • software program implementation is a better implementation in more cases.
  • the technical solution of the present invention which is essential or contributes to the prior art, can be embodied in the form of a software product stored in a readable storage medium, such as a floppy disk of a computer.
  • U disk mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., including a number of instructions to make a computer device (may be A personal computer, server, or network device, etc.) performs the methods described in various embodiments of the present invention.
  • a computer device may be A personal computer, server, or network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明公开了一种资源的调度方法和服务器,其中方法包括:根据第一终端的资源需求数量确定第一终端的初始资源配置数量,再根据调度域内的可用资源数量和资源等级进行资源调度重分配,得到第一终端的资源重配置数量,根据第一终端的资源重配置数量向第一终端分配资源。利用该方法能够依据用户对资源的需求和资源实际使用情形进行动态资源分配,能够在保证用户高质量使用资源的同时最大化资源的整体利用率,降低单位资源的成本。

Description

资源的调度方法和服务器
本申请要求于2016年12月22日提交中国专利局、申请号为201611199533.2、申请名称为“一种资源的调度方法和服务器”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及计算机技术领域,尤其涉及资源调度技术。
背景技术
计算机可以提供内存空间、磁盘空间、接口带宽、网络带宽等各种资源,计算机的各种资源可以分别给不同用户的终端使用。
目前,资源的调度领域存在一种资源的调度方法:资源按量分配,即,静态资源调度。在调度之前定义好每个终端可使用的资源数量,调度系统按照定义完成资源静态分配。资源分配的变更仅来源于终端的定义更新,包括新增用户,用户注销和用户扩容、缩容等,使用此类调度方法的方案包括MEMCG(Memory CGroup)内存控制组,网络带宽控制(Traffic Control,TC)流量隔离等。
目前,资源的调度领域还存在另一种资源的调度方法:资源按时分配,属于另一种形式的资源静态分配。在调度之前定义好每个终端可使用资源的时间片长度,终端在该时间片内独占资源。调度系统不关心终端时间片内的资源利用率,仅通过对不同的终端限制相应的使用时间来做资源隔离。使用此类调度方法的方案包括完全公平队列(Complete Fair Queue,CFQ)等。
在上述资源按量分配的技术方案中,整个调度过程未考虑终端的实际资源使用情形,做不到实时调整分配比例,以满足用户持续变化的需求,还可能造成部分终端对资源的闲置,降低了资源共享效率。
在上述资源按时分配的技术方案中,虽然解决了资源按量分配方案中面临的资源所需数量定义困难引发的分配边界问题,允许终端在预先定义好的时间片内按需使用资源。但是在某个时间片内终端的资源独占行为同样也带来了资源的浪费,其浪费程度甚至比资源按量分配方案更加严重,数量更多的资源会在部分时间片内被闲置。
发明内容
本发明实施例提供了一种资源的调度方法和服务器,用于提高资源的分配效率和使用效率。
为解决上述技术问题,本发明实施例提供以下技术方案:
本发明实施例提供一种资源的调度方法,包括:
接收第一终端发送的资源申请请求,所述资源申请请求包括:所述第一终端的资源需求数量和所述第一终端请求的资源等级;
根据所述资源需求数量确定所述第一终端的初始资源配置数量;
根据调度域内的可用资源总数量、所述调度域内所有终端的初始资源配置数量和所述调度域内所有终端的资源等级进行资源调度重分配,得到所述第一终端的资源重配置数量,所述第一终端属于所述调度域内的终端;
根据所述第一终端的资源重配置数量向所述第一终端分配资源。
本发明实施例还提供一种资源的调度服务器,包括:
请求接收模块,用于接收第一终端发送的资源申请请求,所述资源申请请求包括:所述第一终端的资源需求数量和所述第一终端请求的资源等级;
初始分配模块,用于根据所述资源需求数量确定所述第一终端的初始资源配置数量;
调度重分配模块,用于根据调度域内的可用资源总数量、所述调度域内所有终端的初始资源配置数量和所述调度域内所有终端的资源等级进行资源调度重分配,得到所述第一终端的资源重配置数量,所述第一终端属于所述调度域内的终端;
资源分配模块,用于根据所述第一终端的资源重配置数量向所述第一终端分配资源。
本发明实施例还提供一种服务器,包括:
处理器以及存储器;
所述存储器,用于存储程序代码,并将所述程序代码传输给所述处理器;
所述处理器,用于根据所述程序代码中的指令执行上述资源的调度方法。
本发明实施例还提供一种存储介质,该存储介质用于存储程序代码,所述程序代码用于执行上述资源的调度方法。
本发明实施例还提供一种包括指令的计算机程序产品,当其在计算机上运行时,使得所述计算机执行上述资源的调度方法。
本发明实施例还提供一种资源的调度方法,包括:
资源的调度服务器接收第一终端发送的资源申请请求,所述资源申请请求包括:所述第一终端的资源需求数量和所述第一终端请求的资源等级;
资源的调度服务器根据所述资源需求数量确定所述第一终端的初始资源配置数量;
资源的调度服务器根据调度域内的可用资源总数量、所述调度域内所有终端的初始资源配置数量和所述调度域内所有终端的资源等级进行资源调度重分配,得到所述第一终端的资源重配置数量,所述第一终端属于所述调度域内的终端;
资源的调度服务器根据所述第一终端的资源重配置数量向所述第一终端分配资源。
本发明实施例中先确定第一终端的初始资源配置数量,然后在调度域内所有终端之间根据可用资源总数量、每个终端的初始资源配置数量以及每个终端的资源等级进行调度重分配,得到第一终端的资源重配置数量,利用该第一终端的资源重配置数量向第一终端分配资源,即第一终端最终分配到的资源数量由第一终端的资源重配置数量来决 定,因此本发明实施例中并不是静态的分配资源,而是先根据第一终端的资源需求进行初始分配,然后再根据调度域内的资源分布进行调度重分配,从而经过初始分配和调度重分配后才能够确定向第一终端实际分配的资源数量,因此,依据用户对资源的需求和实际使用情形进行动态资源分配,能够在保证用户高质量使用资源的同时,最大化资源的整体利用率,降低单位资源的成本。
附图说明
图1a所示为根据本发明实施例的一种资源的调度服务器的结构示意图;
图1b所示为根据本发明实施例的一种资源的调度方法的流程图;
图2a所示为根据本发明实施例的一种资源的调度服务器的组成结构示意图;
图2b所示为根据本发明实施例的一种调度重分配模块的组成结构示意图;
图2c所示为根据本发明实施例的一种重分配确定模块的组成结构示意图;
图3所示为根据本发明实施例的一种服务器的组成结构示意图。
具体实施方式
本发明实施例提供了一种资源的调度方法和服务器,用于提高资源的分配效率和使用效率。
为使得本发明的发明目的、特征、优点能够更加的明显和易懂,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,下面所描述的实施例仅仅是本发明一部分实施例,而非全部实施例。基于本发明中的实施例,本领域的技术人员所获得的所有其他实施例,都属于本发明保护的范围。
本发明的说明书和权利要求书及上述附图中的术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,以便包含一系列单元的过程、方法、系统、产品或设备不必限于那些单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它单元。
以下分别进行详细说明。
目前,资源的调度领域中无论资源按量分配还是资源按时分配都属于资源静态分配的方式,整个调度过程中对资源的利用都不够充分,降低了资源共享效率。本发明实施例中可以实现基于资源分级的弹性调度,允许定义的资源需求包括资源等级和资源需求数量两方面,满足各种类型调度场景的需求。终端的资源需求数量定义只是调度过程的其中一个输入,本发明实施例在实际调度资源时还会依据整个调度域内的可用资源总数量、即同一时刻其他终端的资源等级定义和资源需求数量等来弹性分配资源,彻底解决资源浪费问题的同时满足终端的资源需求定义。
本发明实施例提供的资源的调度方法是基于资源的调度服务器实现的,在介绍本发明的资源的调度方法之前,首先介绍一下资源的调度服务器,该服务器是指具有数据存储、数据处理功能等处理设备,参见图1a,图1a所示为根据本发明实施例中一种资源的调度 服务器的结构示意图,如图1a所示,该资源的调度服务器可以包括:
处理器110,存储器120,通信接口130,输入输出接口140,通信总线150。
其中,处理器110,存储器120,通信接口130,输入输出接口140通过通信总线150完成相互间的通信。
存储器120可用于存储软件程序以及模块,处理器110通过运行存储在存储器120的软件程序以及模块,从而执行资源的调度服务器的各种功能应用以及数据处理。存储器120可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等。此外,存储器120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。通信接口130可用于服务器与外部设备进行数据交换。输入输出接口140用于接收终端输入请求的资源需求数量和终端请求的资源等级等信息,以及产生与资源的调度服务器的用户设置和功能控制有关的键信号输入,再根据对终端资源输入请求的处理,向终端输出分配的资源,以及产生与资源的调度服务器的用户设置和功能控制有关的键信号输出。
具体在本实施例中,处理器110会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行文件加载到存储器120中,并由处理器110来运行存储在存储器120中用于实现本申请实施例提供的资源调度方法。
接下来,结合图1b对本申请实施例提供的一种资源的调度方法进行解释说明。请参阅图1b,本发明实施例提供的一种资源的调度方法,可以包括如下步骤:
101、接收第一终端发送的资源申请请求,资源申请请求包括:第一终端的资源需求数量和第一终端请求的资源等级。
在本发明实施例中,在调度域内有多个用户的终端,调度域是针对资源集合在调度范围的划分单位,调度域内的所有终端可以请求分配该调度域内的资源集合中所有资源。本发明实施例中以调度域内的某个终端的资源调度过程为例进行说明,为便于描述,将需要资源分配的该终端定义为“第一终端”,调度域内的其它终端的资源分配方式,都可以参阅本发明实施例中对第一终端的资源调度的说明。本发明实施例中描述的资源具体可以指的是多种类型的资源,举例说明如下:计算机提供的中央处理器(Central Processing Unit,CPU)时间片,内存空间,磁盘空间及带宽,网络带宽等资源,具体的资源实现方式不做限定,取决于用户的需求和调度服务器管理的资源类型。
在本发明实施例中,用户通过第一终端向资源的调度服务器发起资源申请请求时,用户需要选择该用户的资源需求数量,即用户需求的资源数量是多少,另外用户还需要选择所需求的资源等级,其中,资源等级也可以称为资源优先级或者资源质量,其中,资源等级越高则第一终端分配到的资源数量也越多,资源等级越高则用户使用的资源质量也越高。对于资源等级的划分方式可以有多种实现方式,资源等级可以划分为两种以上的不同等级,用户通过第一终端发送资源申请请求时可以选择自己需要的资源等级,例如资源等级可以分为高等级、低等级,也可以分为三个等级:高等级、中等级、低等级,又如资源等级还可以划分为五个等级分别为等级0、等级1、等级2、等级3、等级4,则每个等级可以配置具体的资源质量和资源数量,详见后续实施例中的举例说明。
举例说明如下,在本发明的一些实施例中,资源等级包括如下等级信息中的至少一种:资源独占、资源共享、资源定额、资源限额、资源借用。则第一终端可以根据用户选择在资源申请请求中携带对应的等级信息。举例说明如下,资源独占是指互斥级别(Exclusive)的资源占用等级,终端获得的资源份额不能少于资源独占等级所要求的最小资源数量,该等级需要排除其他终端的使用。资源共享(Share)是指共享级别的资源占用等级,终端获得的资源份额不能少于资源独占等级所要求的最小资源数量,该等级可以和其他终端共同享用部分资源数量。资源定额(Static)是指定量级别的资源占用等级,终端能获得的资源份额等于资源定额等级所定义的资源份额,终端享用的资源份额保持不变。资源限额(Limited)是指限额级别的资源占用等级,终端能获得的资源份额不超过资源限额等级所要求的资源份额,该等级需要让出部分资源数量给高等级的终端。资源借用(Loan)是指借用级别的资源占用等级,终端能获得的资源份额不超过资源限额等级所要求的资源份额,与限额级别的差异在于,终端所拥有的资源份额会根据其他终端的需求被随时抢走。
在本发明实施例中,资源的调度服务器在管理资源时需要考虑资源的共享效率,这是服务器的核心性能指标。资源共享的效率主要体现在对单个用户需求的满足程度和对整体资源的利用率两个方面。其中,对单个用户需求的满足程度强调的是调度系统的资源隔离能力,即保证资源对个体用户的可用性遵守预先的定义,符合用户的预期;整体资源的利用率强调的是调度系统的资源共享能力,即保证资源被所有用户充分共享使用,最小化资源的浪费。在本发明实施例中,资源的调度服务器可以实现弹性的资源分配,即非静态的资源分配,可以依据资源需求数量定义及资源等级动态的调整资源分配。本发明实施例中用户在申请资源时要输入所需要的资源需求数量及资源等级。
102、根据资源需求数量确定第一终端的初始资源配置数量。
在本发明实施例中,资源的调度服务器在接收到用户通过第一终端发送的资源申请请求之后,该资源的调度服务器会先根据资源需求数量进行资源的初始分配,即先确定分配给第一终端的初始资源配置数量,该初始资源配置数量是由用户请求的资源需求数量来确定,资源的调度服务器确定的初始资源配置数量是初始分配,初始资源配置数量并不是最终分配给第一终端的资源数量,需要执行步骤103的调度重分配过程。
需要说明的是,本发明实施例中步骤102中对第一终端进行了资源的初始分配,在调度域内的其它终端也可以按照步骤102中的方式对其它终端分别进行资源的初始分配,例如在调度域内除了第一终端,还可以存在第二终端和第三终端等,则资源的调度服务器都可以按照对第一终端的资源初始分配方式对第二终端和第三终端进行资源初始分配,则第二终端和第三终端都可以确定出对应的初始资源配置数量。
103、根据调度域内的可用资源总数量、调度域内所有终端的初始资源配置数量和调度域内所有终端的资源等级进行资源调度重分配,得到第一终端的资源重配置数量,第一终端属于调度域内的终端。
在本发明实施例中,调度域内的所有终端都完成初始分配之后可以得到调度域内所有终端的初始资源配置数量,则对于调度域内的每一个终端都初始资源配置数量以及对应的资源等级,资源的调度服务器可以根据调度域内的可用资源总数量、调度域内所有终端的 初始资源配置数量和调度域内所有终端的资源等级进行资源调度重分配,得到第一终端的资源重配置数量。在调度域内所有终端的资源等级可能不完全相同,必然存在有的等级高,有的等级低,例如,不同资源等级对应不同的价格,用户选择自己需要的资源等级定义即意味着已明确其对资源质量的预期。本发明实施例中可按照定义提供高级别用户的终端对低级别用户的终端的非公平有限抢占能力,高级别用户的终端在单个调度周期内占用的资源份额可以取最大可用资源数量和资源需求数量两者的较小值,即用户的终端可能在该调度周期内完全占用可用资源,此时低级别用户的终端需要等待后续调度周期中的分配。若调度域内所有用户的终端的资源等级定义相同时,所有用户的终端实现资源的公平调度。
需要说明的是,在本发明实施例中,根据调度域内的可用资源总数量、调度域内所有终端的初始资源配置数量和调度域内所有终端的资源等级进行资源调度重分配可以有多种实现方式,资源的弹性调度可以计算出不同资源等级下的初始资源配置数量,最小资源数量,资源数量波动范围等因素都可以影响到最终的调度结果,只要在该调度域内进行资源数量的弹性调整,使得不同资源等级的终端能够享用到对应等级的资源数量。在实际应用中,针对资源等级的具体要求都可以使用具体等级下的资源调度重分配。
在本发明的一些实施例中,资源的调度服务器还可以根据第一终端的已分配资源份额与该第一终端实际资源需求之间的关系确定第一终端的资源使用状态,具体的,该资源使用状态包括:对应于已分配资源数量小于终端实际资源需求的忙状态和对应于已分配资源数量大于终端实际资源需求的闲状态。
步骤103根据调度域内的可用资源总数量、调度域内所有终端的初始资源配置数量和调度域内所有终端的资源等级进行资源调度重分配,包括:
A1、获取调度域内所有终端的资源使用状态,资源使用状态包括:对应于已分配资源数量小于终端实际资源需求的忙状态和对应于已分配资源数量大于终端实际资源需求的闲状态;
A2、根据调度域内所有终端的资源使用状态和资源等级、调度域内所有终端的初始资源配置数量,确定调度域内所有终端处于忙状态时所需求的忙状态最小资源总数量,其中,具有不同资源使用状态和/或不同资源等级的终端被分配到的资源数量不相同;
A3、根据忙状态最小资源总数量和调度域内的可用资源总数量确定调度域内所有终端的可重分配的资源数量;
A4、根据调度域内所有终端的可重分配的资源数量确定第一终端的资源重配置数量。
其中,资源的调度服务器确定调度域内所有终端的资源使用状态,资源使用状态包括:对应于已分配资源数量小于终端实际资源需求的忙状态(Busy)和对应于已分配资源数量大于终端实际资源需求的闲状态(Idle)。例如,忙状态是指终端当前的资源数量分配不能满足用户的需求,需要更多分配。闲状态是指终端当前的资源分配超过用户实际使用的数量。接下来根据调度域内所有终端的资源使用状态和资源等级、调度域内所有终端的初始资源配置数量,确定调度域内所有终端处于忙状态时所需求的忙状态最小资源总数量,具有不同资源使用状态和/或不同资源等级的终端被分配到的资源数量不相同,对于调度域内每一个终端都需要统计该终端在忙状态下的最小资源数量,进行累计,得到调度域内所有 终端处于忙状态时所需求的忙状态最小资源总数量。接下来根据忙状态最小资源总数量和调度域内的可用资源总数量确定调度域内所有终端的可重分配的资源数量,调度域内所有终端的可重分配的资源数量指在满足调度域内所有终端的基本需求下还能够进行动态调整的资源数量。最后再根据调度域内所有终端的可重分配的资源数量进行资源调度重分配,根据资源重分配的结果从而确定第一终端的资源重配置数量。具体的,可以根据调度域内所有终端的可重分配的资源数量的具体取值和该第一终端的资源等级可以对第一终端的初始资源配置数量进行调度重分配,例如调度域内所有终端的可重分配的资源数量越大,能够向第一终端调度的资源数量就越大,若调度域内所有终端的可重分配的资源数量很少,则向第一终端调度的资源数量就越少。
在本发明的一些实施例中,步骤A3根据忙状态最小资源总数量和调度域内的可用资源总数量确定调度域内所有终端的可重分配的资源数量,具体包括:
A31、计算调度域内的可用资源总数量与忙状态最小资源总数量之差,得到调度域内所有终端的可重分配的资源数量。
其中,通过调度域内的可用资源总数量与忙状态最小资源总数量进行差值计算,得到调度域内所有终端的可重分配的资源数量。调度域内所有终端的可重分配的资源数量的计算过程还可以将调度域内的可用资源总数量与忙状态最小资源总数量进行差值计算后再进行修正的方式得到,例如,根据调度域内所有终端的资源等级之和确定一个调整比例,将调整比例与差值计算结果进行相乘得到调度域内所有终端的可重分配的资源数量。
在本发明的一些实施例中,步骤A4根据调度域内所有终端的可重分配的资源数量确定第一终端的资源重配置数量,包括:
A41、判断调度域内所有终端的可重分配的资源数量是否等于0;
A42、若调度域内所有终端的可重分配的资源数量不等于0,根据第一终端的资源使用状态和资源等级、调度域内除第一终端以外的其它终端的资源使用状态和资源等级,确定所述第一终端的资源重配置数量等于所述第一终端的初始资源配置数量与所述第一终端的可重分配的资源数量的和值;
A43、若调度域内所有终端的可重分配的资源数量等于0,确定所述第一终端的资源重配置数量等于所述第一终端的初始资源配置数量。
其中,若调度域内所有终端的可重分配的资源数量不等于0,则说明需要对调度域内所有终端的初始资源配置数量进行调度重分配,以改变调度域内不同资源等级下的终端对应的资源数量,例如,根据第一终端的资源使用状态和资源等级、调度域内除第一终端以外的其它终端的资源使用状态和资源等级,确定所述第一终端的资源重配置数量等于所述第一终端的初始资源配置数量与所述第一终端的可重分配的资源数量的和值,则调度域内的每个终端的资源等级、资源使用状态都会影响到调度重分配的具体方式。若调度域内所有终端的可重分配的资源数量等于0,则说明当前对调度域内所有终端的资源分配方式刚好满足对应资源等级的资源数量需求,此时就可以确定第一终端的资源重配置数量等于第一终端的初始资源配置数量。
进一步的,在本发明的一些实施例中,步骤A42根据第一终端的资源使用状态和资源 等级、调度域内除第一终端以外的其它终端的资源使用状态和资源等级,确定所述第一终端的资源重配置数量等于所述第一终端的初始资源配置数量与所述第一终端的可重分配的资源数量的和值,包括:
A421、若调度域内所有终端的可重分配的资源数量大于0,则所述第一终端的可重分配的资源数量是按照调度域内所有终端的资源使用状态和资源等级将调度域内所有终端的可重分配的资源数量进行资源调度重分配时,为所述第一终端分配的资源数量;
A422、若调度域内所有终端的可重分配的资源数量小于0,则所述第一终端的可重分配的资源数量是按照调度域内所有终端的资源使用状态和资源等级,从第一部分终端集合中划分出特定数量的资源,将特定数量的资源重新分配给第二部分终端集合,根据所述第一终端所归属的集合和特定数量的资源,确定的所述第一终端可调度的资源数量。
具体的,若调度域内所有终端的可重分配的资源数量大于0,说明该调度域内可用资源总数量仍有剩余,则按照调度域内所有终端的资源使用状态和资源等级将调度域内所有终端的可重分配的资源数量进行重新分配,若第一终端按照资源使用状态和资源等级被分配了可重分配的资源数量,使用第一终端的可重分配的资源数量对第一终端的初始资源配置数量进行叠加,实现了第一终端的资源额外增加,为该第一终端可以配置除用户需求的资源需求数量之外更多的资源,提高用户享用资源的质量。
若调度域内所有终端的可重分配的资源数量小于0,说明该调度域内可用资源总数量仍不能满足该调度域内所有终端的需求,为了满足高资源等级的终端的资源需求,调度域内所有终端按照资源使用状态和资源等级分为第一部分终端集合和第二部分终端集合,第一部分终端集合为需要拿出资源的终端集合,第二部分终端集合为可以再增加资源分配的终端集合,可以理解的是,第一部分终端集合相比于第二部分终端集合,具有资源等级低的终端。就需要在初始分配过的资源数量中再次进行调度域内的资源分配,按照调度域内所有终端的资源使用状态和资源等级从第一部分终端集合中划分出特定数量的资源,将特定数量的资源重新分配给第二部分终端集合。其中,该第一终端可以属于第一部分终端集合,或者第一终端也可以属于第二部分终端集合。
进一步的,在前述执行步骤A421的实现场景下,本发明实施例提供的资源的调度方法还可以包括如下步骤:
B1、若调度域内所有终端的可重分配的资源数量大于0,且按照调度域内所有终端的资源使用状态和资源等级,将调度域内所有终端的可重分配的资源数量进行重新分配之后还剩余有部分可重分配的资源数量,在调度域内增加新的终端;
B2、将部分可重分配的资源数量分配给新的终端。
其中,资源的调度服务器按照调度域内所有终端的资源使用状态和资源等级将调度域内所有终端的可重分配的资源数量进行重新分配之后,若还剩余有部分可重分配的资源数量,此时就可以实现资源的超卖,资源的调度服务器可以在调度域内增加新的终端,然后将部分可重分配的资源数量分配给新的终端,从而可以提高资源的利用率。
104、根据第一终端的资源重配置数量向第一终端分配资源。
在本发明实施例中,经过步骤103对第一终端的调度重分配过程可以确定出第一终端 的资源重配置数量,资源的调度服务器可以根据第一终端的资源重配置数量向第一终端分配实际可用的资源份额,经过调度重分配之后得到的资源重配置数量是最终向第一终端分配资源份额的依据,通过调度重分配,第一终端能够享用到符合用户选择的资源等级的资源份额,从而第一终端可以使用资源的调度服务器分配给的实际可用的资源份额为用户提供资源服务,例如用户通过第一终端从资源的调度服务器获取存储空间资源,则资源的调度服务器经过初始分配和调度重分配可以向第一终端分配存储空间资源份额,用户可以按照该存储空间资源份额使用存储空间资源。用户在申请资源时选择了资源等级,则资源的调度服务器可以向终端分配与其资源等级相适用的资源份额,依据用户对资源的需求和实际使用情形进行动态资源分配,能够在保证用户高质量使用资源的同时最大化资源的整体利用率,降低单位资源的成本。
通过以上实施例对本发明实施例的描述可知,本发明实施例中可以先确定第一终端的初始资源配置数量,然后在调度域内所有终端之间根据可用资源总数量、每个终端的初始资源配置数量以及每个终端的资源等级进行调度重分配,得到第一终端的资源重配置数量,利用第一终端的资源重配置数量对第一终端进行资源分配,即第一终端最终分配到的资源数量由第一终端的资源重配置数量来决定,因此本发明实施例中并不是静态的分配资源,而是先根据终端的资源需求进行初始分配,然后再根据调度域内的资源分布进行调度重分配,从而经过初始分配和调度重分配后才能够确定向第一终端实际分配的资源数量,因此,可以提升资源利用率和保证资源的质量,依据用户对资源的需求和实际使用情形进行动态资源分配,能够在保证用户高质量使用资源的同时,最大化资源的整体利用率,降低单位资源的成本。
为便于更好的理解和实施本发明实施例的上述方案,下面举出相应的应用场景示例进行具体说明。
本发明实施例提供基于资源分级的弹性调度方案,允许定义的资源需求包括资源需求数量和资源等级两方面,满足各种类型调度场景的需求。终端的资源份额定义只是调度过程的其中一个输入,调度系统还会依据资源的忙闲程度,即同一时刻其他终端的资源等级定义和对资源的数量需求等来弹性分配资源,彻底解决资源浪费问题的同时,满足终端的资源需求定义。本发明实施例可按照定义提供高级别用户的终端对低级别用户的终端的非公平有限抢占能力。高级别用户的终端在单个调度周期内占用的份额取最大可用资源数量和资源需求数量两者的较小值,即终端可能在该周期内完全占用可用资源,此时低级别用户的终端需要等待后续周期中的分配。
本发明实施例中的调度域是资源的集合,调度范围的划分单位。本发明实施例中的弹性调度分配是指非静态资源分配,依据定义及使用情况等动态调整资源分配的调度方式。资源等级(Resource Priority Level,RPL)是指对终端使用资源的质量/等级保证。最高等级为资源独占,被独占的资源不再分配给其他用户的终端,即便资源处于空闲状态;最低等级为资源借用,被借用的资源要随时归还,即便终端正在使用该资源。资源份额(Quota)是指当前分配给终端的资源数量。
接下来以资源弹性调度方案适合于云计算为例,例如应用于云存储和云网络等资源共 享/售卖的平台,资源的调度效率直接决定平台所售卖资源的成本,属于平台保持竞争优势,建立门槛的核心技术。云平台用户最关注的是资源的价格和质量。要降低资源价格,核心的就是通过提升资源利用率,增加资源共享/售卖率甚至超卖率来降低资源成本;要保证资源质量,就是要兑现对用户使用资源的可用性的承诺,按照终端的定义提供足够的资源。
本发明实施例提供的弹性调度能保证资源利用率的最大化,同时,按照资源等级的定义完成资源分配可以最大程度上保证终端所得资源的质量。使用本发明实施例可以满足用户对资源不同等级的需求,可以实现包括资源独占,资源共享,资源定额,资源限额,资源借用等资源使用方式。用户在申请资源时要输入所需要资源的数量及等级,弹性调度系统会计算出终端的初始资源数量,最小资源数量,资源数量波动范围等,并根据当前的资源总量和其他终端使用情形完成资源的匹配和分配。不同资源等级对应不同的价格,用户完成自己需要的资源等级定义即意味着已明确其对资源质量的预期。使用本发明实施例还可以有效提升资源的售卖率/超卖率,利用资源的弹性调度可以在不违背资源等级定义的基础上将已分配未使用的资源进行二次分配,将这些资源售卖至新用户的终端即形成资源的超卖。
首先,对本发明实施例涉及的资源等级进行举例说明,Busy(忙碌):当前的资源数量分配不能满足用户的需求,需要更多分配。Idle(闲置):当前的资源分配超过用户实际使用的数量。如下表1所示:
资源等级 Busy Idle
0,Exclusive Quota<=X<=MAX X==Quota
1,Share Quota<=X<=MAX MIN<=X<Quota
2,Static X==Quota X==Quota
3,Limited X==Quota MIN<=X<Quota
4,Loan MIN<=X<=Quota MIN<=X<Quota
其中,X是不同资源等级下分配给终端的初始资源配置数据,MIN是指最小资源分配单位,MAX是指最大可用资源数量,Quota是指分配给终端的资源份额。Exclusive是互斥级别:无论忙闲,终端获得的资源份额不能少于定义的资源份额。Share是共享级别:终端闲时可以让出资源,而忙时则可以获得多于定义的资源份额。Static是定量级别:终端能获得的资源等于定义的份额,无论忙闲均不变。Limited是限额级别:终端忙时能获得的资源不超过定义的份额,终端闲时可以让出资源。Loan是借用级别:与限额级别的差异在于,即使终端当前处于忙的状态,所拥有的资源也可以被其他终端抢走。
对资源质量的保证就是满足终端在忙/闲的状态下的最小资源数量需求。本发明实施例中的资源分配过程包含是否能进行分配的判断,其判断的依据就是所有终端的忙状态最小资源数量需求之和小于等于可用资源总量。
接下来对资源的弹性调度过程进行示例说明:
首先,在每个调度周期开始时刻进行资源重分配的计算,各等级可重分配的资源数量为:
当前资源数量为X Busy(RT-) Idle(RT+)
0,Exclusive 0 X-Quota
1,Share Quota-X(X<Quota) X-MIN
2,Static 0 0
3,Limited Quota-X(X<Quota) X-MIN
4,Loan X-MIN X-MIN
其中,计算所有终端可重分配的资源数量之和用RT表示。有的情形中终端可以释放资源,如互斥级别的终端由忙状态转闲状态的时候,有的情形中终端需要更多资源,如共享级别的终端由闲状态转忙状态的时候。因此,计算出来的RT可能为正值,也可能为负值,还可能为0。
若RT>0,意味着满足最小资源需求后仍有可用资源剩余,此时可将剩余的资源分配给高优先级用户的终端,进行资源膨胀。剩余资源的分配中,优先选择处于忙状态的终端,优先级从高到低;分配完毕仍然有资源剩余,则选择闲状态的终端,同样优先级从高到低。例如总的分配顺序为:互斥(忙)>共享(忙)>借出(忙)>共享(闲)>受限(闲)>借出(闲)。
若RT<0,意味着终端对资源的需求超过了可用资源数量,此时需要进行第二轮的资源重分配,挤压部分终端的资源分配数量。允许进行第二轮重分配的只有互斥级别和共享级别。与前一种资源膨胀情况相反,资源挤压的顺序为优先级从低到高,即先挤压共享级别的用户的终端,再挤压互斥级别用户的终端,挤压至最小资源数量需求,即终端的资源份额Quota。如果挤压后重新计算的RT仍然小于0,那么就要进行终端迁移。
若RT=0,不需要进行资源膨胀和挤压。
若RT>0时进行重分配之后还有剩余的资源,则可以进行资源的超卖,依据调度域中所有终端实际使用的资源总数量来决定是否进行资源的超卖。如果实际使用的资源总数量总是小于可用资源总量,那么就可以进行资源的超卖,分配新的用户的终端至该调度域。
本发明实施例提供一种基于资源等级和资源数量定义,依据用户对资源的需求和实际使用情形进行动态资源分配的资源调度系统,能够在保证用户高质量使用资源的同时最大化资源的整体利用率,降低单位资源的成本。使用本发明实施例提供的调度方法,可以提升云平台等资源共享/售卖系统的整体售卖率,增加系统的售卖收益,提升系统的技术/商业竞争力。本发明提供的弹性资源调度方法,将资源弹性分配至所有终端,在保证每个用户能按照定义且安全地使用资源的同时,最大化资源的利用率,从而达到较高的资源共享效率。
需要说明的是,本发明实施例描述的是一种弹性资源调度方案,对资源的类型没有做出约束,所提到的云计算等平台仅是应用该资源调度方案的业务场景举例。本发明实施例描述的互斥,共享等五种资源级别的定义只是界定资源等级,或者资源质量定义的一种实现方式,其他资源分级方式,或者不同资源质量定义亦在本发明实施例描述的基于资源等级和资源数量定义进行弹性调度的范围之内。本发明实施例描述的资源重分配,资源膨胀和挤压等调度步骤仅是实现资源弹性调度的一种方式,其他依据用户需求和使用情形定义来形成资源份额动态调整的方法,或者不同的调度/重分配的策略均在本发明实施例的范围 内。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。
为便于更好的实施本发明实施例的上述方案,本发明实施例还提供了一种资源的调度服务器,下面结合图2a对该服务器进行解释说明。
请参阅图2a,图2a为本发明实施例公开的一种资源的调度服务器的组成结构示意图,如图2a所示,该服务器包括:
请求接收模块201,用于接收第一终端发送的资源申请请求,所述资源申请请求包括:所述第一终端的资源需求数量和所述第一终端请求的资源等级;
初始分配模块202,用于根据所述资源需求数量确定所述第一终端的初始资源配置数量;
调度重分配模块203,用于根据调度域内的可用资源总数量、所述调度域内所有终端的初始资源配置数量和所述调度域内所有终端的资源等级进行资源调度重分配,得到所述第一终端的资源重配置数量,所述第一终端属于所述调度域内的终端;
资源分配模块204,用于根据所述第一终端的资源重配置数量向所述第一终端分配资源。
在本发明的一些实施例中,请参阅图2b,所述调度重分配模块203,包括:
状态获取模块2031,用于获取所述调度域内所有终端的资源使用状态,所述资源使用状态包括:对应于已分配资源数量小于终端实际资源需求的忙状态和对应于已分配资源数量大于终端实际资源需求的闲状态;
忙状态资源需求确定模块2032,用于根据所述调度域内所有终端的资源使用状态和资源等级、所述调度域内所有终端的初始资源配置数量,确定所述调度域内所有终端处于忙状态时所需求的忙状态最小资源总数量,其中,具有不同资源使用状态和/或不同资源等级的终端被分配到的资源数量不相同;
可重分配资源确定模块2033,用于根据所述忙状态最小资源总数量和所述调度域内的可用资源总数量确定所述调度域内所有终端的可重分配的资源数量;
重分配确定模块2034,用于根据所述调度域内所有终端的可重分配的资源数量确定所述第一终端的资源重配置数量。
进一步的,在本发明的一些实施例中,所述可重分配资源确定模块2033,具体用于计算所述调度域内的可用资源总数量与所述忙状态最小资源总数量之差,得到所述调度域内所有终端的可重分配的资源数量。
在本发明的一些实施例中,请参阅图2c,所述重分配确定模块2034,包括:
可重分配资源数量判断模块20341,用于判断所述调度域内所有终端的可重分配的资源数量是否等于0;
第一重分配模块20342,用于若所述调度域内所有终端的可重分配的资源数量不等于0,根据所述第一终端的资源使用状态和资源等级、所述调度域内除所述第一终端以外的其它终端的资源使用状态和资源等级,确定所述第一终端的资源重配置数量等于所述第一终端的初始资源配置数量与所述第一终端的可重分配的资源数量的和值;
第二重分配模块20343,用于若所述调度域内所有终端的可重分配的资源数量等于0,确定所述第一终端的资源重配置数量等于所述第一终端的初始资源配置数量。
进一步的,在本发明的一些实施例中,所述第一终端的可重分配资源数量通过以下方式确定:
具体用于若所述调度域内所有终端的可重分配的资源数量大于0,则第一终端的可重分配的资源数量是按照所述调度域内所有终端的资源使用状态和资源等级将所述调度域内所有终端的可重分配的资源数量进行资源调度重分配时,为第一终端分配的资源数量;若所述调度域内所有终端的可重分配的资源数量小于0,则第一终端的可重分配的资源数量是按照所述调度域内所有终端的资源使用状态和资源等级,从第一部分终端集合中划分出特定数量的资源,将特定数量的资源重新分配给第二部分终端集合,根据第一终端所归属的集合和所述特定数量的资源,确定的第一终端可调度的资源数量。
进一步的,在本发明的一些实施例中,所述资源分配模块204,还用于所述第一重分配模块在所述调度域内所有终端的可重分配的资源数量大于0,且资源的调度服务器按照所述调度域内所有终端的资源使用状态和资源等级,将所述调度域内所有终端的可重分配的资源数量进行重新分配之后还剩余有部分可重分配的资源数量,在所述调度域内增加新的终端;将所述部分可重分配的资源数量分配给所述新的终端。
在本发明的一些实施例中,所述资源等级包括如下等级信息中的至少一种:资源独占、资源共享、资源定额、资源限额、资源借用。
通过以上实施例对本发明实施例的描述可知,本发明实施例中可以先确定第一终端的初始资源配置数量,然后在调度域内所有终端之间根据可用资源总数量、每个终端的初始资源配置数量以及每个终端的资源等级进行调度重分配,得到第一终端的资源重配置数量,利用第一终端的资源重配置数量对第一终端进行资源分配,即第一终端最终分配到的资源数量由第一终端的资源重配置数量来决定,因此本发明实施例中并不是静态的分配资源,而是先根据终端的资源需求进行初始分配,然后再根据调度域内的资源分布进行调度重分配,从而经过初始分配和调度重分配后才能够确定向第一终端实际分配的资源数量,因此,可以提升资源利用率和保证资源的质量,依据用户对资源的需求和实际使用情形进行动态资源分配,能够在保证用户高质量使用资源的同时,最大化资源的整体利用率,降低单位资源的成本。
为便于更好的实施本发明实施例的上述方案,下面为本发明实施例提供的一种服务器进行解释说明,该服务器包括:
处理器以及存储器;
所述存储器,用于存储程序代码,并将所述程序代码传输给所述处理器;
所述处理器,用于根据所述程序代码中的指令执行上述资源的调度方法。
请参阅图3,图3是本发明实施例提供的一种服务器的组成结构示意图,如图3所示,该服务器1100可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(central processing units,CPU)1122(例如,一个或一个以上处理器)和存储器1132,一个或一个以上存储应用程序1142或数据1144的存储介质1130(例如一个或一个以上海量存储设备)。其中,存储器1132和存储介质1130可以是短暂存储或持久存储。存储在存储介质1130的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对服务器中的一系列指令操作。更进一步地,中央处理器1122可以设置为与存储介质1130通信,在服务器1100上执行存储介质1130中的一系列指令操作。
服务器1100还可以包括一个或一个以上电源1126,一个或一个以上有线或无线网络接口1150,一个或一个以上输入输出接口1158,和/或,一个或一个以上操作系统1141,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。
上述实施例中由服务器所执行的资源的调度方法步骤可以基于该图3所示的服务器结构。
此外,本发明实施例还提供了一种存储介质,该存储介质用于存储程序代码,所述程序代码用于执行任意一项上述的资源的调度方法。
另一方面,本发明实施例还提供了一种包括指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述资源的调度方法。
再一方面,本发明实施例还提供了一种资源的调度方法,包括:
资源的调度服务器接收第一终端发送的资源申请请求,所述资源申请请求包括:所述第一终端的资源需求数量和所述第一终端请求的资源等级;
资源的调度服务器根据所述资源需求数量确定所述第一终端的初始资源配置数量;
资源的调度服务器根据调度域内的可用资源总数量、所述调度域内所有终端的初始资源配置数量和所述调度域内所有终端的资源等级进行资源调度重分配,得到所述第一终端的资源重配置数量,所述第一终端属于所述调度域内的终端;
资源的调度服务器根据所述第一终端的资源重配置数量向所述第一终端分配资源。
在具体实现时,所述资源的调度服务器根据调度域内的可用资源总数量、所述调度域内所有终端的初始资源配置数量和所述调度域内所有终端的资源等级进行资源调度重分配,得到所述第一终端的资源重配置数量,包括:
资源的调度服务器获取所述调度域内所有终端的资源使用状态,所述资源使用状态包括:对应于已分配资源数量小于终端实际资源需求的忙状态和对应于已分配资源数量大于终端实际资源需求的闲状态;
资源的调度服务器根据所述调度域内所有终端的资源使用状态和资源等级、所述调度域内所有终端的初始资源配置数量确定所述调度域内所有终端处于忙状态时所需求的忙状态最小资源总数量,其中,具有不同资源使用状态和/或不同资源等级的终端被分配到的资源数量不相同;
资源的调度服务器根据所述忙状态最小资源总数量和所述调度域内的可用资源总数量 确定所述调度域内所有终端的可重分配的资源数量;
资源的调度服务器根据所述调度域内所有终端的可重分配的资源数量确定所述第一终端的资源重配置数量。
在具体实现时,所述资源的调度服务器根据所述忙状态最小资源总数量和所述调度域内的可用资源总数量确定所述调度域内所有终端的可重分配的资源数量,包括:
资源的调度服务器计算所述调度域内的可用资源总数量与所述忙状态最小资源总数量之差,得到所述调度域内所有终端的可重分配的资源数量。
在具体实现时,所述资源的调度服务器根据所述调度域内所有终端的可重分配的资源数量确定所述第一终端的资源重配置数量,包括:
资源的调度服务器判断所述调度域内所有终端的可重分配的资源数量是否等于0;
若所述调度域内所有终端的可重分配的资源数量不等于0,资源的调度服务器根据所述第一终端的资源使用状态和资源等级、所述调度域内除所述第一终端以外的其它终端的资源使用状态和资源等级,确定所述第一终端的资源重配置数量等于所述第一终端的初始资源配置数量与所述第一终端的可重分配的资源数量的和值;
若所述调度域内所有终端的可重分配的资源数量等于0,资源的调度服务器确定所述第一终端的资源重配置数量等于所述第一终端的初始资源配置数量。
在具体实现时,所述第一终端的可重分配资源数量通过以下方式确定:
若所述调度域内所有终端的可重分配的资源数量大于0,则所述第一终端的可重分配的资源数量是按照所述调度域内所有终端的资源使用状态和资源等级,资源的调度服务器将所述调度域内所有终端的可重分配的资源数量进行资源调度重分配时,为所述第一终端分配的资源数量;
若所述调度域内所有终端的可重分配的资源数量小于0,则所述第一终端的可重分配的资源数量是按照所述调度域内所有终端的资源使用状态和资源等级,资源的调度服务器从第一部分终端集合中划分出特定数量的资源,将特定数量的资源重新分配给第二部分终端集合,资源的调度服务器根据所述第一终端所归属的集合和所述特定数量的资源,确定的所述第一终端可调度的资源数量。
在具体实现时,所述方法还包括:
若所述调度域内所有终端的可重分配的资源数量大于0,且按照所述调度域内所有终端的资源使用状态和资源等级,资源的调度服务器将所述调度域内所有终端的可重分配的资源数量进行重新分配之后还剩余有部分可重分配的资源数量,在所述调度域内增加新的终端;
资源的调度服务器将所述部分可重分配的资源数量分配给所述新的终端。
在具体实现时,所述资源等级包括如下等级信息中的至少一种:资源独占、资源共享、资源定额、资源限额、资源借用。
本发明实施例提供的资源的调度方法,资源的调度服务器可以先确定第一终端的初始 资源配置数量,然后在调度域内所有终端之间根据可用资源总数量、每个终端的初始资源配置数量以及每个终端的资源等级进行调度重分配,得到第一终端的资源重配置数量,利用第一终端的资源重配置数量对第一终端进行资源分配,即第一终端最终分配到的资源数量由第一终端的资源重配置数量来决定,因此本发明实施例中并不是静态的分配资源,而是资源的调度服务器先根据终端的资源需求进行初始分配,然后再根据调度域内的资源分布进行调度重分配,从而经过初始分配和调度重分配后才能够确定向第一终端实际分配的资源数量,因此,可以提升资源利用率和保证资源的质量,依据用户对资源的需求和实际使用情形进行动态资源分配,能够在保证用户高质量使用资源的同时,最大化资源的整体利用率,降低单位资源的成本。
另外需说明的是,以上所描述的装置实施例和最后一个带有执行主体的方法实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。另外,本发明提供的装置实施例附图中,模块之间的连接关系表示它们之间具有通信连接,具体可以实现为一条或多条通信总线或信号线。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本发明可借助软件加必需的通用硬件的方式来实现,当然也可以通过专用硬件包括专用集成电路、专用CPU、专用存储器、专用元器件等来实现。一般情况下,凡由计算机程序完成的功能都可以很容易地用相应的硬件来实现,而且,用来实现同一功能的具体硬件结构也可以是多种多样的,例如模拟电路、数字电路或专用电路等。但是,对本发明而言更多情况下软件程序实现是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在可读取的存储介质中,如计算机的软盘、U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。
综上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照上述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对上述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims (24)

  1. 一种资源的调度方法,包括:
    接收第一终端发送的资源申请请求,所述资源申请请求包括:所述第一终端的资源需求数量和所述第一终端请求的资源等级;
    根据所述资源需求数量确定所述第一终端的初始资源配置数量;
    根据调度域内的可用资源总数量、所述调度域内所有终端的初始资源配置数量和所述调度域内所有终端的资源等级进行资源调度重分配,得到所述第一终端的资源重配置数量,所述第一终端属于所述调度域内的终端;
    根据所述第一终端的资源重配置数量向所述第一终端分配资源。
  2. 根据权利要求1所述的方法,所述根据调度域内的可用资源总数量、所述调度域内所有终端的初始资源配置数量和所述调度域内所有终端的资源等级进行资源调度重分配,得到所述第一终端的资源重配置数量,包括:
    获取所述调度域内所有终端的资源使用状态,所述资源使用状态包括:对应于已分配资源数量小于终端实际资源需求的忙状态和对应于已分配资源数量大于终端实际资源需求的闲状态;
    根据所述调度域内所有终端的资源使用状态和资源等级、所述调度域内所有终端的初始资源配置数量,确定所述调度域内所有终端处于忙状态时所需求的忙状态最小资源总数量,其中,具有不同资源使用状态和/或不同资源等级的终端被分配到的资源数量不相同;
    根据所述忙状态最小资源总数量和所述调度域内的可用资源总数量确定所述调度域内所有终端的可重分配的资源数量;
    根据所述调度域内所有终端的可重分配的资源数量确定所述第一终端的资源重配置数量。
  3. 根据权利要求2所述的方法,所述根据所述忙状态最小资源总数量和所述调度域内的可用资源总数量确定所述调度域内所有终端的可重分配的资源数量,包括:
    计算所述调度域内的可用资源总数量与所述忙状态最小资源总数量之差,得到所述调度域内所有终端的可重分配的资源数量。
  4. 根据权利要求2所述的方法,所述根据所述调度域内所有终端的可重分配的资源数量确定所述第一终端的资源重配置数量,包括:
    判断所述调度域内所有终端的可重分配的资源数量是否等于0;
    若所述调度域内所有终端的可重分配的资源数量不等于0,根据所述第一终端的资源使用状态和资源等级、所述调度域内除所述第一终端以外的其它终端的资源使用状态和资源等级,确定所述第一终端的资源重配置数量等于所述第一终端的初始资源配置数量与所述第一终端的可重分配的资源数量的和值;
    若所述调度域内所有终端的可重分配的资源数量等于0,确定所述第一终端的资源重配置数量等于所述第一终端的初始资源配置数量。
  5. 根据权利要求4所述的方法,所述第一终端的可重分配资源数量通过以下方式确定:
    若所述调度域内所有终端的可重分配的资源数量大于0,则所述第一终端的可重分配的资源数量是按照所述调度域内所有终端的资源使用状态和资源等级将所述调度域内所有终端的可重分配的资源数量进行资源调度重分配时,为所述第一终端分配的资源数量;
    若所述调度域内所有终端的可重分配的资源数量小于0,则所述第一终端的可重分配的资源数量是按照所述调度域内所有终端的资源使用状态和资源等级,从第一部分终端集合中划分出特定数量的资源,将特定数量的资源重新分配给第二部分终端集合,根据所述第一终端所归属的集合和所述特定数量的资源,确定的所述第一终端可调度的资源数量。
  6. 根据权利要求5所述的方法,所述方法还包括:
    若所述调度域内所有终端的可重分配的资源数量大于0,且按照所述调度域内所有终端的资源使用状态和资源等级,将所述调度域内所有终端的可重分配的资源数量进行重新分配之后还剩余有部分可重分配的资源数量,在所述调度域内增加新的终端;
    将所述部分可重分配的资源数量分配给所述新的终端。
  7. 根据权利要求1至6中任一项所述的方法,所述资源等级包括如下等级信息中的至少一种:资源独占、资源共享、资源定额、资源限额、资源借用。
  8. 一种资源的调度服务器,包括:
    请求接收模块,用于接收第一终端发送的资源申请请求,所述资源申请请求包括:所述第一终端的资源需求数量和所述第一终端请求的资源等级;
    初始分配模块,用于根据所述资源需求数量确定所述第一终端的初始资源配置数量;
    调度重分配模块,用于根据调度域内的可用资源总数量、所述调度域内所有终端的初始资源配置数量和所述调度域内所有终端的资源等级进行资源调度重分配,得到所述第一终端的资源重配置数量,所述第一终端属于所述调度域内的终端;
    资源分配模块,用于根据所述第一终端的资源重配置数量向所述第一终端分配资源。
  9. 根据权利要求8所述的服务器,所述调度重分配模块,包括:
    状态获取模块,用于获取所述调度域内所有终端的资源使用状态,所述资源使用状态包括:对应于已分配资源数量小于终端实际资源需求的忙状态和对应于已分配资源数量大于终端实际资源需求的闲状态;
    忙状态资源需求确定模块,用于根据所述调度域内所有终端的资源使用状态和资源等级、所述调度域内所有终端的初始资源配置数量,确定所述调度域内所有终端处于忙状态时所需求的忙状态最小资源总数量,其中,具有不同资源使用状态和/或不同资源等级的终端被分配到的资源数量不相同;
    可重分配资源确定模块,用于根据所述忙状态最小资源总数量和所述调度域内的可用资源总数量确定所述调度域内所有终端的可重分配的资源数量;
    重分配确定模块,用于根据所述调度域内所有终端的可重分配的资源数量确定所述第一终端的资源重配置数量。
  10. 根据权利要求9所述的服务器,所述可重分配资源确定模块,具体用于计算所述调度域内的可用资源总数量与所述忙状态最小资源总数量之差,得到所述调度域内所有终端的可重分配的资源数量。
  11. 根据权利要求9所述的服务器,所述重分配确定模块,包括:
    可重分配资源数量判断模块,用于判断所述调度域内所有终端的可重分配的资源数量是否等于0;
    第一重分配模块,用于若所述调度域内所有终端的可重分配的资源数量不等于0,根据所述第一终端的资源使用状态和资源等级、所述调度域内除所述第一终端以外的其它终端的资源使用状态和资源等级,确定所述第一终端的资源重配置数量等于所述第一终端的初始资源配置数量与所述第一终端的可重分配的资源数量的和值;
    第二重分配模块,用于若所述调度域内所有终端的可重分配的资源数量等于0,确定所述第一终端的资源重配置数量等于所述第一终端的初始资源配置数量。
  12. 根据权利要求11所述的服务器,所述第一终端的可重分配资源数量通过以下方式确定:
    具体用于若所述调度域内所有终端的可重分配的资源数量大于0,则所述第一终端的可重分配的资源数量是按照所述调度域内所有终端的资源使用状态和资源等级将所述调度域内所有终端的可重分配的资源数量进行资源调度重分配时,为所述第一终端分配的资源数量;若所述调度域内所有终端的可重分配的资源数量小于0,则所述第一终端的可重分配的资源数量是按照所述调度域内所有终端的资源使用状态和资源等级,从第一部分终端集合中划分出特定数量的资源,将特定数量的资源重新分配给第二部分终端集合,根据所述第一终端所归属的集合和所述特定数量的资源,确定的所述第一终端可调度的资源数量。
  13. 根据权利要求12所述的服务器,所述资源分配模块,还用于所述第一重分配模块在所述调度域内所有终端的可重分配的资源数量大于0,且按照所述调度域内所有终端的资源使用状态和资源等级,将所述调度域内所有终端的可重分配的资源数量进行重新分配之后还剩余有部分可重分配的资源数量,在所述调度域内增加新的终端;将所述部分可重分配的资源数量分配给所述新的终端。
  14. 根据权利要求8至13中任一项所述的服务器,所述资源等级包括如下等级信息中的至少一种:资源独占、资源共享、资源定额、资源限额、资源借用。
  15. 一种服务器,包括:
    处理器以及存储器;
    所述存储器,用于存储程序代码,并将所述程序代码传输给所述处理器;
    所述处理器,用于根据所述程序代码中的指令执行权利要求1-7任意一项所述的资源的调度方法。
  16. 一种存储介质,所述存储介质用于存储程序代码,所述程序代码用于执行权利要求1-7任意一项所述的资源的调度方法。
  17. 一种包括指令的计算机程序产品,当其在计算机上运行时,使得所述计算机执行权利要求1-7任意一项所述的资源的调度方法。
  18. 一种资源的调度方法,包括:
    资源的调度服务器接收第一终端发送的资源申请请求,所述资源申请请求包括:所述第一终端的资源需求数量和所述第一终端请求的资源等级;
    资源的调度服务器根据所述资源需求数量确定所述第一终端的初始资源配置数量;
    资源的调度服务器根据调度域内的可用资源总数量、所述调度域内所有终端的初始资源配置数量和所述调度域内所有终端的资源等级进行资源调度重分配,得到所述第一终端的资源重配置数量,所述第一终端属于所述调度域内的终端;
    资源的调度服务器根据所述第一终端的资源重配置数量向所述第一终端分配资源。
  19. 根据权利要求18所述的方法,所述资源的调度服务器根据调度域内的可用资源总数量、所述调度域内所有终端的初始资源配置数量和所述调度域内所有终端的资源等级进行资源调度重分配,得到所述第一终端的资源重配置数量,包括:
    资源的调度服务器获取所述调度域内所有终端的资源使用状态,所述资源使用状态包括:对应于已分配资源数量小于终端实际资源需求的忙状态和对应于已分配资源数量大于终端实际资源需求的闲状态;
    资源的调度服务器根据所述调度域内所有终端的资源使用状态和资源等级、所述调度域内所有终端的初始资源配置数量,确定所述调度域内所有终端处于忙状态时所需求的忙状态最小资源总数量,其中,具有不同资源使用状态和/或不同资源等级的终端被分配到的资源数量不相同;
    资源的调度服务器根据所述忙状态最小资源总数量和所述调度域内的可用资源总数量确定所述调度域内所有终端的可重分配的资源数量;
    资源的调度服务器根据所述调度域内所有终端的可重分配的资源数量确定所述第一终端的资源重配置数量。
  20. 根据权利要求19所述的方法,所述资源的调度服务器根据所述忙状态最小资源总数量和所述调度域内的可用资源总数量确定所述调度域内所有终端的可重分配的资源数量,包括:
    资源的调度服务器计算所述调度域内的可用资源总数量与所述忙状态最小资源总数量之差,得到所述调度域内所有终端的可重分配的资源数量。
  21. 根据权利要求19所述的方法,所述资源的调度服务器根据所述调度域内所有终端的可重分配的资源数量确定所述第一终端的资源重配置数量,包括:
    资源的调度服务器判断所述调度域内所有终端的可重分配的资源数量是否等于0;
    若所述调度域内所有终端的可重分配的资源数量不等于0,资源的调度服务器根据所述第一终端的资源使用状态和资源等级、所述调度域内除所述第一终端以外的其它终端的资源使用状态和资源等级,确定所述第一终端的资源重配置数量等于所述第一终端的初始 资源配置数量与所述第一终端的可重分配的资源数量的和值;
    若所述调度域内所有终端的可重分配的资源数量等于0,资源的调度服务器确定所述第一终端的资源重配置数量等于所述第一终端的初始资源配置数量。
  22. 根据权利要求21所述的方法,所述第一终端的可重分配资源数量通过以下方式确定:
    若所述调度域内所有终端的可重分配的资源数量大于0,则所述第一终端的可重分配的资源数量是按照所述调度域内所有终端的资源使用状态和资源等级,资源的调度服务器将所述调度域内所有终端的可重分配的资源数量进行资源调度重分配时,为所述第一终端分配的资源数量;
    若所述调度域内所有终端的可重分配的资源数量小于0,则所述第一终端的可重分配的资源数量是按照所述调度域内所有终端的资源使用状态和资源等级,资源的调度服务器从第一部分终端集合中划分出特定数量的资源,将特定数量的资源重新分配给第二部分终端集合,资源的调度服务器根据所述第一终端所归属的集合和所述特定数量的资源,确定的所述第一终端可调度的资源数量。
  23. 根据权利要求22所述的方法,所述方法还包括:
    若所述调度域内所有终端的可重分配的资源数量大于0,且按照所述调度域内所有终端的资源使用状态和资源等级,资源的调度服务器将所述调度域内所有终端的可重分配的资源数量进行重新分配之后还剩余有部分可重分配的资源数量,在所述调度域内增加新的终端;
    资源的调度服务器将所述部分可重分配的资源数量分配给所述新的终端。
  24. 根据权利要求18至23中任一项所述的方法,所述资源等级包括如下等级信息中的至少一种:资源独占、资源共享、资源定额、资源限额、资源借用。
PCT/CN2017/112522 2016-12-22 2017-11-23 资源的调度方法和服务器 WO2018113472A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/355,091 US10772115B2 (en) 2016-12-22 2019-03-15 Resource scheduling method and server

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611199533.2A CN108234581B (zh) 2016-12-22 2016-12-22 一种资源的调度方法和服务器
CN201611199533.2 2016-12-22

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/355,091 Continuation US10772115B2 (en) 2016-12-22 2019-03-15 Resource scheduling method and server

Publications (1)

Publication Number Publication Date
WO2018113472A1 true WO2018113472A1 (zh) 2018-06-28

Family

ID=62624421

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/112522 WO2018113472A1 (zh) 2016-12-22 2017-11-23 资源的调度方法和服务器

Country Status (3)

Country Link
US (1) US10772115B2 (zh)
CN (1) CN108234581B (zh)
WO (1) WO2018113472A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113475041A (zh) * 2019-03-06 2021-10-01 罗伯特·博世有限公司 用于运行tsn通信系统的方法和设备
WO2022253230A1 (zh) * 2021-05-31 2022-12-08 中兴通讯股份有限公司 业务处理方法及装置、网络设备、电子设备和可读存储介质

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109600414B (zh) * 2018-08-13 2020-04-10 北京字节跳动网络技术有限公司 一种资源分配方法、装置、设备及存储介质
CN110858161B (zh) * 2018-08-24 2023-05-12 阿里巴巴集团控股有限公司 资源分配方法、装置、系统、设备和介质
CN110968416A (zh) * 2018-09-29 2020-04-07 中兴通讯股份有限公司 资源分配方法、装置、设备以及计算机可读存储介质
CN109783237B (zh) * 2019-01-16 2023-03-14 腾讯科技(深圳)有限公司 一种资源配置方法及装置
CN109995862B (zh) * 2019-03-29 2021-10-15 北京百度网讯科技有限公司 一种资源调度方法及终端
CN112019454A (zh) * 2019-05-29 2020-12-01 潘仲光 资源处理方法、设备及存储介质
CN110543352B (zh) * 2019-08-16 2022-06-07 浙江大华技术股份有限公司 调度系统的任务分配方法及其相关的装置
CN110515737A (zh) * 2019-09-02 2019-11-29 北京明略软件系统有限公司 数据治理任务运行方法及装置
CN112887228B (zh) * 2019-11-29 2024-02-02 阿里巴巴集团控股有限公司 云资源管理方法、装置、电子设备及计算机可读存储介质
CN111160710B (zh) * 2019-12-05 2022-04-22 国网浙江省电力有限公司温州供电公司 多目标资源调度自动化管控方法及装置
US10860381B1 (en) 2020-05-14 2020-12-08 Snowflake Inc. Flexible computing
CN112261596B (zh) * 2020-09-30 2022-07-15 汉海信息技术(上海)有限公司 短信通道资源的调配方法、装置、设备及存储介质
CN114760313B (zh) * 2020-12-29 2023-11-24 中国联合网络通信集团有限公司 业务调度方法和业务调度装置
CN115328666B (zh) * 2022-10-14 2023-07-14 浪潮电子信息产业股份有限公司 设备调度方法、系统、电子设备及计算机可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002069665A2 (en) * 2000-10-31 2002-09-06 Nortel Networks Limited Cdma multi-carrier traffic management to provide capacity on demand
US20070171932A1 (en) * 2006-01-20 2007-07-26 General Dynamics C4 Systems, Inc. System and method for dynamic allocation and routing of resources
CN103188685A (zh) * 2011-12-27 2013-07-03 华为技术有限公司 无线资源分配方法和设备
CN104244414A (zh) * 2013-06-09 2014-12-24 中国移动通信集团广东有限公司 基于终端的共享网络带宽的分配方法、装置与终端
CN106332088A (zh) * 2015-06-28 2017-01-11 上海无线通信研究中心 不同运营商间基于用户公平性的频谱共享方法

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7748005B2 (en) * 2000-01-28 2010-06-29 Hewlett-Packard Development Company, L.P. System and method for allocating a plurality of resources between a plurality of computing domains
US8856798B2 (en) * 2010-10-21 2014-10-07 Qualcomm Incorporated Mobile computing device activity manager
JP5959831B2 (ja) * 2011-11-24 2016-08-02 株式会社Nttドコモ 無線通信システム、無線基地局装置及び無線通信方法
CN105578474B (zh) * 2014-10-22 2021-03-05 索尼公司 频谱管理装置和方法、用于无线通信的装置和方法
CN106162885B (zh) * 2015-03-30 2021-08-13 索尼公司 无线通信的装置和方法、基站、用户设备侧的装置
WO2017177224A1 (en) * 2016-04-08 2017-10-12 Altiostar Networks, Inc. Wireless data priority services

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002069665A2 (en) * 2000-10-31 2002-09-06 Nortel Networks Limited Cdma multi-carrier traffic management to provide capacity on demand
US20070171932A1 (en) * 2006-01-20 2007-07-26 General Dynamics C4 Systems, Inc. System and method for dynamic allocation and routing of resources
CN103188685A (zh) * 2011-12-27 2013-07-03 华为技术有限公司 无线资源分配方法和设备
CN104244414A (zh) * 2013-06-09 2014-12-24 中国移动通信集团广东有限公司 基于终端的共享网络带宽的分配方法、装置与终端
CN106332088A (zh) * 2015-06-28 2017-01-11 上海无线通信研究中心 不同运营商间基于用户公平性的频谱共享方法

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113475041A (zh) * 2019-03-06 2021-10-01 罗伯特·博世有限公司 用于运行tsn通信系统的方法和设备
US11916737B2 (en) 2019-03-06 2024-02-27 Robert Bosch Gmbh Method and unit for operating a TSN communication system
CN113475041B (zh) * 2019-03-06 2024-04-05 罗伯特·博世有限公司 用于运行tsn通信系统的方法和设备
WO2022253230A1 (zh) * 2021-05-31 2022-12-08 中兴通讯股份有限公司 业务处理方法及装置、网络设备、电子设备和可读存储介质

Also Published As

Publication number Publication date
CN108234581A (zh) 2018-06-29
US10772115B2 (en) 2020-09-08
CN108234581B (zh) 2020-10-09
US20190215846A1 (en) 2019-07-11

Similar Documents

Publication Publication Date Title
WO2018113472A1 (zh) 资源的调度方法和服务器
US10810045B2 (en) Method and apparatus for allocating central processing unit (CPU) resources in a default resource pool
US20190324819A1 (en) Distributed-system task assignment method and apparatus
CN110858161B (zh) 资源分配方法、装置、系统、设备和介质
Wang et al. Dominant resource fairness in cloud computing systems with heterogeneous servers
CN108667748B (zh) 一种控制带宽的方法、装置、设备和存储介质
CN108667867B (zh) 数据存储方法及装置
WO2018120991A1 (zh) 一种资源调度方法及装置
US9442763B2 (en) Resource allocation method and resource management platform
CN107688492B (zh) 资源的控制方法、装置和集群资源管理系统
WO2016078178A1 (zh) 一种虚拟cpu调度方法
CN105718316A (zh) 一种作业调度的方法及装置
CN107295090B (zh) 一种资源调度的方法和装置
JP2015525397A (ja) リソースプーリングを利用した、要求ベースによるストレージの分散型クオリティ・オブ・サービス管理
WO2016041446A1 (zh) 一种资源分配方法、装置及设备
US7225223B1 (en) Method and system for scaling of resource allocation subject to maximum limits
CN110221920B (zh) 部署方法、装置、存储介质及系统
CN111798113A (zh) 资源分配方法、装置、存储介质和电子设备
CN115934362B (zh) 面向深度学习的服务器无感知计算集群调度方法及产品
CN107203256B (zh) 一种网络功能虚拟化场景下的节能分配方法与装置
Yang et al. Multi-policy-aware MapReduce resource allocation and scheduling for smart computing cluster
Ali et al. A comprehensive utility function for resource allocation in mobile edge computing
KR20190056624A (ko) 분산환경에서의 cda 프로토콜을 활용한 자원할당방법 및 이를 적용한 기록매체 및 분산처리장치
JP2006195985A (ja) リソース利用率を制御する方法およびコンピュータシステム
WO2017133421A1 (zh) 一种多租户资源共享的方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17884476

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17884476

Country of ref document: EP

Kind code of ref document: A1