WO2022247287A1 - Procédé et appareil de planification de ressources - Google Patents

Procédé et appareil de planification de ressources Download PDF

Info

Publication number
WO2022247287A1
WO2022247287A1 PCT/CN2021/143561 CN2021143561W WO2022247287A1 WO 2022247287 A1 WO2022247287 A1 WO 2022247287A1 CN 2021143561 W CN2021143561 W CN 2021143561W WO 2022247287 A1 WO2022247287 A1 WO 2022247287A1
Authority
WO
WIPO (PCT)
Prior art keywords
resource
resources
capability
allocatable
server
Prior art date
Application number
PCT/CN2021/143561
Other languages
English (en)
Chinese (zh)
Inventor
周文礼
苏利
赵鹏翔
杨纳川
Original Assignee
华为云计算技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为云计算技术有限公司 filed Critical 华为云计算技术有限公司
Publication of WO2022247287A1 publication Critical patent/WO2022247287A1/fr

Links

Images

Classifications

    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • 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/48Program initiating; Program switching, e.g. by interrupt
    • 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • 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]
    • 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/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45583Memory management, e.g. access or allocation
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Definitions

  • the present application relates to the field of cloud computing, and in particular to a resource scheduling method and device.
  • VM resource scheduling means that when a user needs to request a VM from the data center, the resource management system will receive the VM request, and the resource management system needs to allocate resources on the corresponding cluster and server for the VM request , for the user's VM.
  • VM Virtual Machine
  • VM requests for resources of various specifications may be received, but this may cause some resources of larger specifications to be difficult to be allocated, which is an urgent problem to be solved.
  • the present application provides a resource scheduling method and device, which are used to improve the ability to allocate resources with larger specifications.
  • the present application provides a resource scheduling method, which can be executed by the resource scheduling device provided in the present application, and the resource scheduling device can be the electronic device provided in the present application, and the method includes: receiving a first virtual machine VM request, The first VM request is used to request allocation of resources of a specified specification for the target VM; selecting a target server from the first set of candidate servers, and allocating resources of the specified specification among the allocatable resources of the target server to the target VM.
  • the change amount of the resource granting capability of the target server is not greater than the change amount of the resource granting capacity of any candidate server in the first candidate server set except the target server, and the resource granting capacity of any candidate server is
  • the capability variation is the variation between the first resource issuance capability and the second resource issuance capability of the candidate server, the first resource issuance capability of any candidate server indicates the first allocable resource of the candidate server, and the The first allocatable resource is the allocatable resource before the candidate server is pre-allocated the resource of the specified specification, the second resource issuance capability of any candidate server indicates the second allocatable resource of the candidate server, and the first The second allocatable resource is the allocatable resource after the candidate server is pre-allocated the resource of the specified specification, and the resource issuance capability is used to represent the ability of the allocatable resource to allocate resources of various specifications.
  • a target server after receiving the request from the first virtual machine VM, a target server may be selected from at least two servers, since the change in the resource provisioning capability of the target server is not greater than that of the first candidate server set except for the target server Therefore, the target server is one of the servers whose ability to allocate resources of various specifications decreases the least before and after allocating resources of a specified specification. Under the condition that the allocated resources remain unchanged, for the overall set of first candidate servers, the ability to allocate resources of various specifications can be reserved to the maximum extent. Therefore, the specified specifications in the allocated resources of the target server The resources allocated to the target VM can make it easier to allocate subsequent resources with larger specifications.
  • the first resource issuance capability may be obtained in the following manner:
  • the first resource distribution capability of the first allocable resource represents the comprehensive resource distribution capability of the first allocable resource for allocating resources of various specifications
  • both the first resource distribution capability and the second resource distribution capability are determined based on the resource distribution capability of a single specification that can be allocated to resources of each specification, so that resources of various specifications can be represented
  • the comprehensive resource issuance capability for allocation so it can more comprehensively and accurately characterize the resource issuance capability of allocatable resources.
  • the determining the first resource issuance capability of the first allocable resource according to the resource issuance capability of a single specification allocated to resources of each specification by the first allocable resource includes:
  • the determining the second resource issuance capability of the second allocatable resource according to the resource distribution capability of a single specification for allocating resources of each specification according to the second allocable resource includes:
  • the second resource issuance capability of the second allocable resource is obtained by accumulating or averaging the resource issuance capabilities of a single specification allocated by the second allocatable resources to resources of each specification.
  • the resource of the specified specification requested by the first VM request includes at least two types of resources
  • the separately determining the ability of the first allocatable resource to allocate resources of each specification with a single specification resource, according to the first allocable resource's resource allocation capability of a single specification to allocate resources of each specification, determine The first resource issuance capability of the first allocable resource includes:
  • the comprehensive resource allocation capability for the allocation of the same type of resources determines the first resource allocation capability of the first allocable resource, and the first resource allocation capability represents the pair of at least two types of resources in the first allocable resource Comprehensive resource distribution capabilities for allocating resources of various specifications;
  • the separately determining the single-standard resource distribution capability of the second allocable resources for allocating resources of each specification is determined according to the single-standard resource distribution capability of the second allocable resources for allocating resources of each specification.
  • the second resource issuance capability of the second allocatable resource includes:
  • the resource of the specified specification requested by the first VM request includes at least two types of resources
  • the comprehensive resource issuance capability of the allocatable resources so as to comprehensively consider the comprehensive resource issuance capabilities of each type of at least two types of resources, and can more comprehensively and accurately characterize the resource issuance capabilities of the allocatable resources.
  • the ability of the first allocatable resource to allocate resources of each specification for a single specification of resources includes: the maximum number of times the first allocatable resource allocates resources of any specification, or the The product of the maximum number of times the first allocatable resource allocates resources of any specification and the distribution capacity coefficient corresponding to the specification; the second allocatable resource allocates resources of each specification in a single specification resource issuance Capabilities, including: the maximum number of times the second allocatable resource allocates resources of any specification, or the maximum number of times the second allocatable resource allocates resources of any specification corresponds to any specification The product of the release capacity coefficients.
  • the provisioning capability coefficient is preset, or the provisioning capability coefficient is adjusted according to at least one second VM request, and the at least one second VM request includes a VM request for which resource allocation has been completed and /or VM requests that have completed resource reclamation.
  • the at least one second VM request since the at least one second VM request includes a VM request that has completed resource allocation and/or a VM request that has completed resource recovery, it can be set with reference to the resource allocation situation of the VM request, so that the setting of the issuance capacity coefficient is more accurate. It is reasonable, and the delivery capability coefficient is obtained through preset setting or at least one second VM request adjustment, so that the importance of different specifications can be expressed in different ways, and the flexibility of setting the delivery capability coefficient can be increased.
  • the method also includes:
  • the at least one second VM request Obtaining the at least one second VM request; according to the specifications of the resources requested to be allocated and/or requested to be reclaimed according to the at least one second VM request, determining the resource occupation of each specification allocated according to the at least one second VM request Ratio; according to the ratio of resources of each specification, adjust the distribution capability coefficient corresponding to each specification, wherein, the distribution capability coefficient corresponding to any specification after adjustment is the same as that allocated according to the at least one second VM request.
  • the proportion of resources is positively correlated.
  • the distribution capacity coefficient corresponding to each specification can be set according to the resource allocation requirement, so that the setting of the distribution capacity coefficient is more suitable for the user's resource allocation needs .
  • the determining the first resource issuance capability of the first allocable resource according to the resource issuance capability of a single specification allocated to resources of each specification by the first allocable resource includes:
  • the resource distribution capability evaluation table According to the first allocatable resource of any candidate server, query the resource distribution capability evaluation table to obtain the first resource distribution capability of the first allocatable resource;
  • the determining the second resource issuance capability of the second allocable resource according to the resource distribution capability of a single specification for allocating resources of each specification according to the second allocable resource includes:
  • the resource allocation capability evaluation table According to the second allocatable resource of any candidate server, query the resource allocation capability evaluation table to obtain the second resource allocation capability of the second allocatable resource;
  • any item in the evaluation table of resource distribution capability includes allocatable resources and resource distribution capabilities of the allocatable resources. It can be obtained by assigning a single-specification resource issuance capability, or by assigning a single-specification resource issuance capability for resources of each specification based on the allocatable resource and the resource issuance capability coefficient corresponding to the specification.
  • any item in the evaluation table of resource issuance capability includes allocatable resources and resource issuance capabilities of the allocatable resources, and the resource issuance capabilities of the allocatable resources are resource issuance capabilities based on a single specification, or according to The resource distribution capability of a single specification and the resource distribution capability coefficient corresponding to the specification are obtained.
  • Based on the pre-calculated table items of the resource distribution capability evaluation table and real-time allocable resources directly query the resource distribution capability evaluation table to obtain the corresponding The ability to issue resources, so that after the allocation of resources is obtained, the calculation process is omitted, and the acquisition efficiency of the ability to issue resources is improved.
  • any of the candidate servers includes at least one resource set, and each of the resource sets includes at least two resource subsets; the allocation of resources of the specified specification among the allocatable resources of the target server For the target VM, include:
  • the second resource subset is a resource subset whose size is larger than the smallest size among the resource subsets of the specified size, and the resources of the second resource subset are occupied and the size of the remaining resources is not smaller than the specified size;
  • the resources of the specified specification in the third resource subset allocated to the target VM are the same as that of the second resource subset, and the resources of the third resource subset are not occupied.
  • the method also includes:
  • the target The resources of at least two fourth resource subsets in the server are allocated to the target VM, and the sum of the remaining resources of the at least two fourth resource subsets is the resource of the specified specification.
  • the resources can also be The resources of at least two fourth resource subsets in the target server are allocated to the target VM. Since the sum of the resources of the at least two fourth resource subsets is the resource of the specified specification, through at least two fourth resource subsets The four resource subsets also make full use of the resource subsets.
  • the method also includes:
  • the at least one second VM request includes VMs that have completed resource allocation VM requests that request and/or have completed resource reclamation.
  • the specification setting of at least two resource subsets can be made more consistent with the resource allocation requirement requested by at least one second VM.
  • the target server from the first set of candidate servers before selecting the target server from the first set of candidate servers, it also includes:
  • the resource consumption consistency index of any candidate server in the second set of candidate servers characterizes the consumption ratio of at least two types of resources among the second allocatable resources of the candidate server and the consumption ratio of the candidate server the closeness of the proportions of at least two types of resources in the resource specification;
  • At least two candidate servers are selected in descending order of the resource consumption consistency index, and the at least two candidate servers form the first candidate server set.
  • At least two candidate servers are first selected through the resource consumption consistency index, and then the target server is selected from them, so that the selection of the target server will not be decisively affected by a certain factor in resource consumption consistency or resource distribution capability. Select the target server more reasonably.
  • the present application provides another resource scheduling method, which can be executed by the resource scheduling device provided in the present application, and the resource scheduling device can be the electronic device provided in the present application, and the method includes:
  • the first VM request is used to request allocation of resources of a specified specification for the target VM; determining the resource distribution capability variation of each candidate server in the first candidate server set; according to the resource distribution capability variation from low to Selecting at least two candidate servers in a high order, the at least two candidate servers form a second candidate server set; according to the resource of the specified specification requested by the first VM request, and the second candidate server set For the second allocatable resources of each candidate server, respectively determine the resource consumption consistency index of each candidate server in the second candidate server set; use the candidate server with the highest resource consumption consistency index as the target server; Resources of the specified specification in the allocatable resources are allocated to the target VM.
  • the resource issue capability variation of any candidate server in the first candidate server set is the variation between the first resource issue capability and the second resource issue capability of the candidate server, and the first resource issue of any candidate server
  • the issuance capability indicates the first allocable resource of the candidate server, the first allocable resource is the allocatable resource before the candidate server is pre-allocated the resource of the specified specification, and the second resource of any candidate server is issued
  • the capability indicates the second allocatable resource of the candidate server, the second allocatable resource is the allocatable resource after the candidate server is pre-allocated the resource of the specified specification, and the resource issuance capability is used to characterize the pair of allocatable resources
  • At least two candidate servers are first selected based on the resource distribution capability variation, and then the target server is selected according to the resource consumption consistency index, so that the selection of the target server will not be affected by the resource consumption consistency index or the resource distribution capability.
  • the decisive influence of one factor makes it more reasonable to select the target server.
  • the specific way of determining the variation of the resource issuance capability of each candidate server in the first candidate server set can refer to the determination method in the resource scheduling method proposed in the first aspect, and will not be repeated here. repeat.
  • the present application provides a resource scheduling device, including:
  • a receiving module configured to receive a first virtual machine VM request, where the first VM request is used to request allocation of resources of a specified specification for the target VM;
  • a processing module configured to select a target server from the first set of candidate servers, the amount of change in the resource issuance capability of the target server is not greater than the resources of any candidate server in the first set of candidate servers except the target server
  • the amount of change in the resource issuance capability of any candidate server is the variation between the first resource issuance capability and the second resource issuance capability of the candidate server
  • the first resource issuance capability of any candidate server is Capability indicates the first allocatable resource of the candidate server, the first allocatable resource is the allocatable resource before the candidate server is pre-allocated the resource of the specified specification
  • the second resource issuance capability of any candidate server Indicates the second allocatable resource of the candidate server, where the second allocatable resource is the allocatable resource after the candidate server is pre-allocated the resource of the specified specification, and the resource issuance capability is used to represent the impact of the allocatable resource on each The ability to allocate resources of various sizes;
  • An allocating module configured to allocate resources of the specified specification among the allocatable resources of the target server to the target VM.
  • processing module is specifically used for:
  • the first resource issuance capability is obtained in the following manner:
  • the first resource distribution capability of the first allocable resource represents the comprehensive resource distribution capability of the first allocable resource for allocating resources of various specifications
  • the second resource issuance capability is obtained in the following manner:
  • processing module is specifically used for:
  • the first resource issuance capability of the first allocable resource is determined in the following manner:
  • the second resource issuance capability of the second allocatable resource is determined in the following manner:
  • the second resource issuance capability of the second allocable resource is obtained by accumulating or averaging the resource issuance capabilities of a single specification allocated by the second allocatable resources to resources of each specification.
  • the resource of the specified specification requested by the first VM request includes at least two types of resources; the processing module is specifically configured to:
  • the first resource issuance capability of the first allocable resource is determined in the following manner:
  • the first resource distribution capability of the first allocatable resource is determined, and the first resource distribution capability represents the first The ability to allocate comprehensive resources to resources of various specifications for at least two types of resources mentioned in the allocatable resources;
  • the second resource issuance capability of the second allocatable resource is determined in the following manner:
  • the second resource distribution capability of the second allocatable resource is determined, and the second resource distribution capability represents the second The at least two types of resources in the allocatable resources are capable of allocating resources of various specifications.
  • processing module is specifically used for:
  • the resource issuance capability of a single specification for allocating resources of each specification by the first allocable resource is determined in the following manner:
  • the maximum number of times that the first allocable resource allocates resources of any specification, or the maximum number of times that the first allocatable resource allocates resources of any specification is equal to the distribution capability coefficient corresponding to the specification product;
  • the resource issuance capability of a single specification for the second allocatable resource to allocate resources of each specification is determined in the following manner:
  • the maximum number of times the second allocatable resources are allocated to resources of any specification, or the maximum number of times the second allocatable resources are allocated to resources of any specification is the ratio of the distribution capacity coefficient corresponding to any specification product.
  • the provisioning capability coefficient is preset, or the provisioning capability coefficient is adjusted according to at least one second VM request, and the at least one second VM request includes a VM request for which resource allocation has been completed and /or VM requests that have completed resource reclamation.
  • processing module is also used for:
  • the specifications of the resources requested to be allocated and/or reclaimed according to the at least one second VM request determine the proportion of resources of each specification allocated according to the at least one second VM request;
  • the distribution capability coefficient corresponding to each specification adjusts the distribution capability coefficient corresponding to each specification, wherein, the distribution capability coefficient corresponding to any specification after adjustment is different from the resource ratio of the specification allocated according to the at least one second VM request.
  • the ratio is positively correlated.
  • processing module is specifically used for:
  • the first resource issuance capability of the first allocable resource is determined in the following manner:
  • the resource distribution capability evaluation table According to the first allocatable resource of any candidate server, query the resource distribution capability evaluation table to obtain the first resource distribution capability of the first allocatable resource;
  • the second resource issuance capability of the second allocatable resource is determined in the following manner:
  • the resource allocation capability evaluation table According to the second allocatable resource of any candidate server, query the resource allocation capability evaluation table to obtain the second resource allocation capability of the second allocatable resource;
  • any item in the evaluation table of resource distribution capability includes allocatable resources and resource distribution capabilities of the allocatable resources. It can be obtained by assigning a single-specification resource issuance capability, or by assigning a single-specification resource issuance capability for resources of each specification based on the allocatable resource and the resource issuance capability coefficient corresponding to the specification.
  • any of the candidate servers includes at least one resource set, and each of the resource sets includes at least two resource subsets; the allocation module is specifically configured to:
  • the second resource subset is a resource subset whose size is larger than the smallest size among the resource subsets of the specified size, and the resources of the second resource subset are occupied and the size of the remaining resources is not smaller than the specified size;
  • the resources of the specified specification in the third resource subset allocated to the target VM are the same as that of the second resource subset, and the resources of the third resource subset are not occupied.
  • the allocation module is also used for:
  • the target The resources of at least two fourth resource subsets in the server are allocated to the target VM, and the sum of the remaining resources of the at least two fourth resource subsets is the resource of the specified specification.
  • the allocation module is also used for:
  • the at least one second VM request includes VMs that have completed resource allocation VM requests that request and/or have completed resource reclamation.
  • the processing module is further configured to:
  • the resource consumption consistency index of any candidate server in the second set of candidate servers characterizes the consumption ratio of at least two types of resources among the second allocatable resources of the candidate server and the consumption ratio of the candidate server the closeness of the proportions of at least two types of resources in the resource specification;
  • At least two candidate servers are selected in descending order of the resource consumption consistency index, and the at least two candidate servers form the first candidate server set.
  • the present application provides another resource scheduling device, including: a receiving module, configured to receive a first VM request, and the first VM request is used to request allocation of resources of a specified specification for a target VM;
  • a processing module configured to determine the variation in resource issuance capability of each candidate server in the first candidate server set; the variation in resource issuance capability of any candidate server in the first candidate server set is the first resource issuance capability of the candidate server and the second resource issuance capability, the first resource issuance capability of any candidate server indicates the first allocable resource of the candidate server, and the first allocatable resource is pre-allocated by the candidate server Allocatable resources before the resource of the specified specification, the second resource issuance capability of any candidate server indicates the second allocatable resource of the candidate server, and the second allocatable resource is the candidate server that is pre-allocated by the Allocatable resources after resources of specified specifications, the resource issuance capability is used to represent the ability of allocatable resources to allocate resources of various specifications; and
  • the resource consumption consistency index of the server wherein, the resource consumption consistency index of any candidate server in the second candidate server set characterizes the consumption ratio of at least two types of resources among the second allocatable resources of the candidate server and The closeness of the proportions of at least two types of resources in the resource specification of the candidate server;
  • An allocating module configured to allocate resources of the specified specification among the allocatable resources of the target server to the target VM.
  • processing module is specifically used for:
  • the first resource issuance capability is obtained in the following manner:
  • the first resource distribution capability of the first allocable resource represents the comprehensive resource distribution capability of the first allocable resource for allocating resources of various specifications
  • the second resource issuance capability is obtained in the following manner:
  • processing module is also used for:
  • the specifications of the resources requested to be allocated and/or reclaimed according to the at least one second VM request determine the proportion of resources of each specification allocated according to the at least one second VM request;
  • the distribution capability coefficient corresponding to each specification adjusts the distribution capability coefficient corresponding to each specification, wherein, the distribution capability coefficient corresponding to any specification after adjustment is different from the resource ratio of the specification allocated according to the at least one second VM request.
  • the ratio is positively correlated.
  • processing module is specifically used for:
  • the first resource issuance capability of the first allocable resource is determined in the following manner:
  • the resource distribution capability evaluation table According to the first allocatable resource of any candidate server, query the resource distribution capability evaluation table to obtain the first resource distribution capability of the first allocatable resource;
  • the second resource issuance capability of the second allocatable resource is determined in the following manner:
  • the resource allocation capability evaluation table According to the second allocatable resource of any candidate server, query the resource allocation capability evaluation table to obtain the second resource allocation capability of the second allocatable resource;
  • any item in the evaluation table of resource distribution capability includes allocatable resources and resource distribution capabilities of the allocatable resources. It can be obtained by assigning a single-specification resource issuance capability, or by assigning a single-specification resource issuance capability for resources of each specification based on the allocatable resource and the resource issuance capability coefficient corresponding to the specification.
  • any of the candidate servers includes at least one resource set, and each of the resource sets includes at least two resource subsets; the allocation module is specifically configured to:
  • the second resource subset is a resource subset whose size is larger than the smallest size among the resource subsets of the specified size, and the resources of the second resource subset are occupied and the size of the remaining resources is not smaller than the specified size;
  • the resources of the specified specification in the third resource subset allocated to the target VM are the same as that of the second resource subset, and the resources of the third resource subset are not occupied.
  • the present application provides another electronic device, which includes: one or more processors; one or more memories; wherein, the one or more memories store one or more computer instructions, When the one or more computer instructions are executed by the one or more processors, the electronic device is made to execute the method as described in any one of the first aspect or the second aspect above.
  • the present application provides a computer-readable storage medium, the computer-readable storage medium includes computer instructions, and when the computer instructions are run on a computer, the computer executes the above-mentioned first or second aspect.
  • FIG. 1 is a schematic flowchart of a resource scheduling method provided in an embodiment of the present application
  • FIG. 2 is a schematic diagram of division of resource sets and resource sub-sets in a resource scheduling method provided by an embodiment of the present application;
  • FIG. 3 is a schematic diagram of a resource allocation capability evaluation table generation process in a resource scheduling method provided by an embodiment of the present application
  • FIG. 4 is a schematic structural diagram of a resource scheduling device provided in an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • references to "one embodiment” or “some embodiments” or the like in this specification means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application.
  • appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically stated otherwise.
  • the terms “including”, “comprising”, “having” and variations thereof mean “including but not limited to”, unless specifically stated otherwise.
  • multiple in the embodiments of the present application refers to two or more than two. In view of this, “multiple” can also be understood as “at least two” in the embodiments of the present application. "At least one” can be understood as One or more, such as being understood as one, two or more. For example, including at least one means including one, two or more, and does not limit which several are included. For example, including A, At least one of B and C, then it may include A, B, C, A and B, A and C, B and C, or A and B and C. Similarly, for "at least one" and other descriptions Understanding is also similar.
  • ordinal numerals such as “first” and “second” mentioned in the embodiments of the present application are used to distinguish multiple objects, and are not used to limit the order, timing, priority or importance of multiple objects.
  • an embodiment of the present invention provides a resource scheduling method.
  • Step 101 Receive a first VM request.
  • Step 102 Select a target server from the first set of candidate servers.
  • Step 103 Allocate resources of the specified specification among the allocatable resources of the target server to the target VM.
  • the first VM request in step 101 is used to request allocation of resources of a specified specification for the target VM.
  • the resources (such as the allocatable resources of the target server and the resources of specified specifications) appearing in the embodiments of the present application refer to physical resources, such as the processing core, memory and bandwidth of a central processing unit (Central Processing Unit, CPU),
  • a resource can be of a single type or a combination of multiple types.
  • the specifications (such as specified specifications) appearing in the embodiment of this application are used to describe the quantity of resources.
  • the resources of specified specifications can be 2U (that is, 2 processing cores), 4U (that is, 4 processing cores) processing
  • the core can also be 100G memory, 10M bandwidth, etc.
  • the resources with specified specifications can also be a combination of multiple types of resources, such as 2U, 50G, and 5M resources with specified specifications.
  • any candidate server can be divided into resource sets, which is more conducive to the planning of candidate server resource allocation.
  • any of the candidate servers includes at least one resource set, and each of the resource sets includes at least two resource subsets, and it can be stipulated that the allocation of resources with a specified specification is limited to: all of the multiple resource subsets Resources allocate resources of a specified specification, or allocate all or part of resources of a resource subset to resources of a specified specification.
  • it is also possible to set the specified specification and the specification of at least two resource subsets can be a predetermined specification.
  • the specified specification only the specifications of 2U, 4U, 8U, 16U, and 32U are specified in advance, then the specified specification only It can be one of 2U, 4U, 8U, 16U, and 32U. If the specified specification is 2U, the specifications of at least two resource subsets can only be at least two of 2U, 4U, 8U, 16U, and 32U. If at least The specifications of the two resource subsets are 2U, 4U, 8U, and 16U.
  • the specifications of the two resource sub-collections can be preset as follows:
  • the at least one second VM request includes a VM request that has completed resource allocation and/or a VM request that has completed resource reclamation.
  • the specifications of at least two resource subsets of the resource collection may be determined according to the corresponding ratio of the specification of the resource requested by at least one second VM and the specification of any one of the resource collections; for example, at least one second VM requests 10,000, the specification of any resource set is 50U, and the ratio of 16U, 8U, 4U, and 2U among the resource specifications requested by at least one second VM is 1:2:3:3, so you can set the corresponding
  • the ratio of the resource subsets is also 1:2:3:3, that is, in the 50U resource set, set one 16U resource subset, two 8U resource subsets, three 4U resource subsets, 3 A 2U resource subset.
  • the division of specific resource sets and resource subsets in a candidate server can be shown in Figure 2.
  • the candidate server shown in Figure 2 includes two resource sets, and each resource set includes a 2U resource subset, 1 There are one 4U resource subset, one 8U resource subset and two 16U resource subsets.
  • the change amount of resource issuance capability of the target server is not greater than the change amount of resource issuance capability of any candidate server in the first candidate server set except the target server, and the change amount of any candidate server
  • the variation in resource distribution capability is the variation between the first resource distribution capability and the second resource distribution capability of the candidate server, that is, the difference between the second resource distribution capability minus the first resource distribution capability.
  • the first resource issuing capability of any candidate server indicates the first allocatable resource of the candidate server, and the first allocatable resource is the allocatable resource before the candidate server is pre-allocated resources of the specified specification
  • the second resource issuing capability of any of the candidate servers indicates the second allocatable resources of the candidate server, and the second allocatable resources are allocatable resources after the candidate server is pre-allocated resources of the specified specification
  • the Resource provisioning capability is used to represent the ability of allocatable resources to allocate resources of various specifications.
  • various specifications can be all specifications that can be distributed in advance defined by any candidate server, or can be some specifications in all specifications that can be distributed in advance.
  • all specifications that can be distributed in advance defined by candidate servers include 2U, 4U, 8U and 16U.
  • the first resource allocation capability may be the first allocable resource, or may be data calculated based on the first allocable resource, such as the maximum number of times the first allocable resource can be allocated based on a resource of any specification.
  • the first allocable resource is the number of processing cores that can be allocated before the candidate server is pre-allocated with resources of the specified specification, which is 40U, and the resource issuance capability corresponding to 40U is the first Resource distribution capability, if the resource of the specified specification is 4U, then the second allocable resource is 36U, and the resource distribution capability corresponding to 36U is the second resource distribution capability.
  • the resource distribution capability can be characterized in various ways, such as through The maximum number of allocations for a resource of a certain specification, the first resource distribution capacity is 5 times, and the second resource distribution capacity is 4 times.
  • resource distribution capabilities also need to consider the factors of resource sub-collections.
  • the allocation of resources with specified specifications can be limited to: allocate all resources of multiple resource sub-collections to specified Specification resources, or only allocate all or part of resources of a resource subset to resources of a specified specification, then the ability to allocate resources of various specifications needs to be affected by resource subsets, the specific situation will be described in detail later .
  • the resource of the specified specification does not mean that the resource of the specified specification has been allocated, but the allocation scheme of the resource of the specified specification is determined in advance, that is, if the resource allocated on the basis of the first allocable resource resources with the specified specifications above, then the remaining resources after allocation are the second allocatable resources.
  • the first allocatable resource and the second allocatable resource can be the same type of resource at the same time, and can also be multiple types of resources at the same time.
  • the first allocatable resource and the second allocatable resource can both be processing cores.
  • the first allocatable resource and the second allocatable resource may also be a combination of a processing core and a memory, or the like.
  • the first set of candidate servers in step 102 may be all servers in the data center, or a part of servers in the data center. Servers filtered out according to preset rules.
  • the first set of candidate servers in step 102 may be determined in the following manner:
  • Consistency index select at least two candidate servers in descending order of resource consumption consistency index, and the at least two candidate servers form the first set of candidate servers.
  • the servers in the first server set may be all servers in the data center, or some servers in the data center
  • the resource consumption consistency index of any candidate server in the second candidate server set represents How close is the consumed ratio of the at least two types of resources in the second allocatable resources of the candidate server to the ratio of the at least two types of resources in the resource specification of the candidate server.
  • the resource consumption consistency index of any server can be the cosine value of the angle between the first resource vector and the second resource vector of the server, and the first resource vector is at least two types of the total resources of the server A vector corresponding to the proportion of the resource, and the second resource vector is a vector corresponding to the consumed proportion of at least two types of resources among the second allocatable resources of the server.
  • the larger the cosine value of the angle between the first resource vector and the second resource vector the smaller the angle is, and the consumed ratio of at least two types of resources in the second allocatable resource of the server is different from the resources of the server. The closer the proportion of at least two types of resources in the total is.
  • At least two candidate servers are first selected through the resource consumption consistency index, and then the target server is selected from them, so that the selection of the target server will not be decisively affected by a certain factor in resource consumption consistency or resource distribution capability. Select the target server more reasonably.
  • the target server in order that the selection of the target server will not be decisively affected by a certain factor in resource consumption consistency or resource distribution capability, the target server can also be selected in the following way:
  • selecting at least two candidate servers according to the order of resource distribution capability change from low to high refers to the top M candidate servers arranged according to resource distribution capability change from low to high as at least two candidate servers, and M is greater than 1 positive integer of .
  • the first way to obtain the first resource distribution ability and the second resource distribution ability can be:
  • the resource issuance capability of the first allocable resource for the first specification as the first resource issuance capability of the first allocable resource
  • the first specification is greater than the specified specification.
  • the specified specification is 4U
  • the first specification is 8U
  • the first allocable resource is 50U
  • the second allocable resource is 46U
  • the resource of the first specification is represented by the maximum number of times that the resource of the first specification can be issued distribution ability, then the distribution ability of the first resource is 6 times, and the distribution ability of the second resource is 5 times.
  • the second method of obtaining the first resource distribution ability and the second resource distribution ability can be:
  • the first resource distribution capability is obtained in the following manner:
  • the first resource distribution capability of the first allocable resource represents the comprehensive resource distribution capability of the first allocable resource for allocating resources of various specifications
  • the second resource distribution capability is obtained in the following manner:
  • first resource distribution capability and second resource distribution capability comprehensively consider the resource distribution capability of a single specification that allocates resources of each specification, thereby more comprehensively and accurately reflecting the allocation of resources of various specifications. comprehensive resource distribution capabilities.
  • the specific calculation method for obtaining the first resource distribution capability or the second resource distribution capability is based on the resource distribution capability of a single specification that allocates resources of each specification according to the first allocable resource or the second allocatable resource.
  • the first calculation method is the first calculation method
  • the ability of the first allocable resource to issue resources of any specification is: the maximum number of times the first allocable resource allocates resources of any specification, or the first allocable resource allocates resources of any specification The product of the maximum number of distributions and the distribution capacity coefficient corresponding to any specification;
  • the ability of the second allocatable resource to issue resources of any specification is: the maximum number of times the second allocatable resource allocates resources of any specification, or the second allocatable resource allocates resources of any specification The product of the maximum number of distributions and the distribution capacity coefficient corresponding to any specification.
  • the determination method is the product of the maximum number of times the first allocatable resource allocates resources of any specification and the distribution capability coefficient corresponding to any specification
  • the specified specification is 2U
  • the first allocatable resource is 46U
  • the second allocable resource is 44U
  • the various specifications are 2U, 4U, 8U, and 16U.
  • the maximum number of times the first allocable resource allocates resources corresponding to 2U is 23, and the maximum number of resources corresponding to 4U is allocated The number of times is 11, the maximum number of allocations for resources corresponding to 8U is 5, the maximum number of allocations for resources corresponding to 16U is 2, and the distribution capacity coefficient corresponding to 2U is 2, the distribution capacity coefficient corresponding to 4U is 5, and the distribution capacity coefficient corresponding to 8U
  • the distribution capability coefficient is 12, and the distribution capability coefficient corresponding to 16U is 30, then the resource distribution capabilities of the first allocable resource for various specifications are as follows: the resource distribution capability corresponding to 2U is 46, and the resource distribution capability corresponding to 4U is 55 , the resource distribution capability corresponding to 8U is 60, and the resource distribution capability corresponding to 16U is 60.
  • the first calculation method adopts the first method of determining the resource issuance capacity of a single specification, and adopts the method of accumulating the resource issuance capabilities of a single specification allocated by the first allocable resource to resources of each specification
  • the first resource distribution capability is:
  • the resource distribution capabilities of the second allocatable resource for various specifications are as follows: 2U corresponds to 44 resource distribution capabilities, 4U corresponds to 55 resource distribution capabilities, 8U corresponds to 60 resource distribution capabilities, and 16U corresponds to 60 resource distribution capabilities.
  • the resource distribution ability is 60; the second resource distribution ability is:
  • the first allocatable resource and the second allocatable resource may The difference in the maximum number of resource allocations according to the specification results in the difference between the first resource distribution capability and the second resource distribution capability.
  • the first allocable resource is 46U, all in one resource set, this resource set includes a 2U resource subset, a 4U resource subset, a 8U resource subset, 2
  • the resources of the specified specification are 2U, and it is stipulated that the resources of the specified specification can only occupy part or all of the resources of a resource subset, such as occupying a complete 2U resource subset, or occupying a 4U resource subset 2U of resources in a collection, but cannot occupy 1U in a 2U resource subset and occupy 1U in a 4U resource subset.
  • the second resource issuance capability is 219; when pre-allocating 2U resources in the 4U resource subset as resources of a specified specification, the second resource issuance capability is 214 , and the rest of resource allocation can be deduced in turn.
  • the first implementation method :
  • the resource distribution capability evaluation table to obtain the first resource distribution capability of the first allocable resource
  • the second allocatable resource of any candidate server Query the resource issuance capability evaluation table to obtain the second resource issuance capability of the second allocatable resource.
  • any item in the evaluation table of resource distribution capability includes allocatable resources and resource distribution capabilities of the allocatable resources. It can be obtained by assigning a single-specification resource issuance capability, or by assigning a single-specification resource issuance capability for resources of each specification based on the allocatable resource and the resource issuance capability coefficient corresponding to the specification.
  • the first implementation method is to pre-calculate each possible allocable resource and the resource issuance capability of the allocatable resource, and enumerate them exhaustively, and use the resource issuance capability evaluation table to record, for example, table item For (46U, 221), (44U, 219) and so on.
  • the resource distribution capability evaluation table can be specifically shown in Table 1.
  • the entry can also include parameters of resource sub-collections, such as using binary numbers to represent the selection of each resource sub-collection, and each digit represents the resource in the corresponding resource sub-collection Pre-allocation or no pre-allocation, such as 1 means pre-allocation, 0 means no pre-allocation; for example, in the resource subset, the resource subset of 2U corresponds to the first binary number, and the resource subset of 4U corresponds to the second binary number
  • the 8U resource subset corresponds to the third binary number, the first 16U resource subset corresponds to the fourth binary number, and the second 16U resource subset corresponds to the fifth binary number, such as 01000 means pre-allocated 4U 10000 represents resources in the pre-allocated resource subset of 2U, then the entry can be (44U, 10000, 219), (44U, 01000, 214).
  • the resource distribution capability evaluation form can be specifically shown in Table
  • the division of resource sets and resource sub-sets can be obtained according to the total amount of resources that can be allocated by the server, the preset set of specifications requested by the VM (that is, the set of resource specifications that the user allows to request), and at least one second VM request. . Therefore, the process of generating the evaluation form of resource distribution capability can be shown in FIG. 3 .
  • the division of resource subsets is determined by the total amount of resources that can be allocated by the server, the preset specification set of VM requests, and at least one second VM request, and the resource allocation capabilities corresponding to various specifications are determined by at least one second VM request.
  • the coefficient is further calculated to obtain the resource distribution capacity evaluation table.
  • the distribution capacity coefficient corresponding to each specification When it is necessary to obtain the first resource distribution capacity and the second resource distribution capacity, according to the first calculation method, according to the real-time first allocable resource, the second allocable resource and each The distribution capacity coefficient corresponding to the specification calculates the distribution capacity of the first resource and the distribution capacity of the second resource in real time.
  • the first setting method the distribution capacity coefficient is preset.
  • the importance of specifications can be stipulated, and the distribution capacity coefficient can be set according to the importance of specifications. For example, it is stipulated that the importance of specifications is positively correlated with the size of specifications.
  • the second setting manner the issuance capacity coefficient is obtained through adjustment according to at least one second VM request.
  • the at least one second VM request includes a VM request that has completed resource allocation and/or a VM request that has completed resource recovery.
  • the adjusted delivery capacity coefficient corresponding to any specification is positively correlated with the resource ratio of the specification allocated according to the at least one second VM request.
  • At least one second VM request is 10,000
  • the ratio of the number of second VM requests for 16U, 8U, 4U, and 2U is 2:2:3:3 (resource ratio of each specification), which can be determined according to each specification
  • adjust the distribution capacity coefficient corresponding to each specification For example, adjust the distribution capacity coefficient corresponding to each specification according to the resource ratio of each specification and the benchmark coefficient of each specification.
  • the benchmark coefficients of 16U, 8U, 4U, and 2U are in order 8, 4, 2, 1, then the distribution capacity coefficients corresponding to 16U, 8U, 4U, and 2U are 16, 8, 6, and 3.
  • the above-mentioned second setting method may also have multiple methods, such as obtaining the specification with the largest number of requests in the at least one second VM request, and increasing the delivery capability coefficient corresponding to the specification.
  • the maximum amount of resources that can be occupied according to the resource distribution capability of a single specification indicates the resource distribution capability of this specification.
  • the first allocable resource is 50U
  • the resource of a specified specification is 4U
  • the second allocable resource is 46U.
  • the maximum amount of resources that can be occupied by a single-standard resource distribution capability can be: for example, 2U
  • the first allocable resource of 50U can be allocated resources of 2U specification
  • the resource distribution capability corresponding to 2U is 50U
  • the resource distribution capability corresponding to 4U The resource provisioning capacity is 48U.
  • the first allocatable resource allocates resources of various specifications.
  • the resource distribution capability of a single specification is: the resource distribution capability corresponding to 2U is 50U, the resource distribution capability corresponding to 4U is 48U, and the resource distribution capability corresponding to 8U is 48U and 12U.
  • the corresponding resource distribution capability is 48U, and the resource distribution capability corresponding to 16U is 48U; correspondingly, the resource distribution capability of a single specification for the allocation of resources of various specifications by the second allocable resource is: the resource distribution capability corresponding to 2U is 46U, The resource distribution capability corresponding to 4U is 44U, the resource distribution capability corresponding to 8U is 40U, the resource distribution capability corresponding to 12U is 36U, and the resource distribution capability corresponding to 16U is 32U.
  • the first calculation method adopts the second method of determining the resource issuance capacity of a single specification, and adopts the method of accumulating the resource issuance capabilities of a single specification allocated by the first allocable resource to resources of each specification, so
  • the first resource distribution capability is 242U, and correspondingly, the second resource distribution capability is 198U.
  • the second method of determining the ability to issue resources with a single specification when the resources of the candidate server are divided into resource sets and resource sub-sets, for the same allocatable resources, it may still be caused by different resource allocation strategies.
  • the difference between the second allocatable resource's ability to issue resources of any specification will lead to the difference between the first resource's ability to issue and the second resource's ability to issue.
  • the calculation of the ability to issue resources of a single specification can either use the first method for determining the ability to issue resources with a single specification, or the method for determining the ability to issue resources with a single specification.
  • the resource distribution capability in the preset order is the median of the resource distribution capabilities of a single specification that can be allocated to resources of various specifications in descending order.
  • the first allocable resource is 50U and the second method for determining the resource distribution capability of a single specification is adopted
  • the first resource distribution capability is 48U
  • the second resource distribution capability is 40U.
  • the first resource allocation ability and the second resource allocation ability may still be caused by different resource allocation strategies. Different, for specific examples, refer to the description of the first calculation method, which will not be repeated here.
  • the resource of a specified specification may be one type of resource, or may involve multiple types of resources.
  • the resource of the specified specification requested by the first VM request includes
  • the specific ways to obtain the first resource distribution ability and the second resource distribution ability can be as follows:
  • the way to obtain the first resource distribution ability is:
  • the comprehensive resource allocation capability of resources of the same type is determined to determine the first resource allocation capability of the first allocatable resource.
  • the first resource allocation capability represents the comprehensive resource allocation capability of the at least two types of resources among the first allocatable resources for allocating resources of various specifications.
  • the way to obtain the second resource distribution ability is:
  • the comprehensive resource allocation capability of resources of the same type is determined to determine the second resource allocation capability of the second allocatable resource.
  • the second resource allocation capability represents the comprehensive resource allocation capability of the at least two types of resources among the second allocatable resources for allocating resources of various specifications.
  • the comprehensive resource distribution capability of allocating resources of the same type with various specifications for each type of resource can be obtained according to the calculation method of any resource distribution capability in the second acquisition method above, Then, according to the comprehensive resource distribution capability of each type of resource, the first resource distribution capability or the second resource distribution capability is determined.
  • the calculation methods of the comprehensive resource distribution capabilities of different types of resources may be the same or different.
  • the first resource distribution capability or the second resource distribution capability can be obtained by weighting the average or accumulation of the comprehensive resource distribution capabilities of different types of resources, or selecting the largest comprehensive resource distribution capability among them.
  • at least two types of resources are CPU processing cores, memory, and bandwidth.
  • the comprehensive resource distribution capability of CPU processing cores and memory is obtained by the first calculation method, and the bandwidth can be obtained by the second calculation method.
  • You can set The weight value of the processing core of the CPU is relatively high, such as 4, and the weight value of memory and bandwidth is set to be low, such as 2, and the comprehensive resource distribution capabilities of the processing core, memory and bandwidth of the CPU are weighted and averaged to obtain the first resource distribution capability Or the ability to issue secondary resources.
  • step 103 can be specifically as follows:
  • Step 1031 If there is a first resource subset in the target server, allocate resources in the first resource subset to the target VM.
  • the size of the first subset of resources is the same as the specified size, and the resources are not allocated.
  • Step 1032 If the first resource subset does not exist and the second resource subset exists in the target server, allocate resources of the specified specification in the remaining resources of the second resource subset to the target VM.
  • the second resource subset is a resource subset whose size is larger than the minimum size of the resource subsets of the specified size, and the resources of the second resource subset are occupied and the size of the remaining resources is not smaller than the specified size.
  • Step 1033 If the first resource subset does not exist and the second resource subset does not exist in the target server, and there is a third resource subset, set the specified Specifications of resources are allocated to the target VM.
  • the specification of the third resource subset is the same as that of the second resource subset, and the resources of the third resource subset are not occupied.
  • the resource of the specified specification is 2U. If there is a 2U resource subset (the first resource subset) in the target server, the resources in the 2U resource subset (the first resource subset) ( 2U resource) to the target VM, if there is no 2U resource subset in the target server, but there is a 4U resource subset (the second resource subset) that has been occupied by 4U, then the 4U resource subset that has been occupied will be allocated Resources of specified specifications (2U resources) in the 2U resource subset (second resource subset) are allocated to the target VM, if neither the first resource subset nor the second resource subset exists, but 4U And for the resource subset (the third resource subset) that is not occupied, allocate the resources (2U) of the specified specification in the 4U resource subset to the target VM. Of course, it is also possible that all the 4U resource subsets are occupied. In the case where the third resource subset is 8U and the resources are not occupied, then the resources of 2U in the target
  • the target server will The resources of at least two fourth resource subsets are allocated to the target VM, and the sum of the resources of the at least two fourth resource subsets is the resource of the specified specification.
  • the resource of the specified specification is 16U
  • the first resource set and the second resource set exist in the target server, but neither the first resource subset nor the second resource set exists in the first resource set or the second resource set.
  • the second resource subset and the third resource subset are described above, but there is an 8U resource subset with unoccupied resources in the first resource set, and there is also an 8U resource subset with unoccupied resources in the second resource set , then the two 8U resource subsets with unoccupied resources are at least two fourth resource subsets; for another example, there is one 8U resource subset with unoccupied resources in the first resource set, and two 2U resource subsets And the resources are not occupied by the resource subset, there is a 4U resource subset in the second resource set and the resource is not occupied, then there are 1 8U and 2 2U resource subsets in the first resource set that are not occupied And the 4U and unoccupied resource subsets in the second resource set are at least two fourth resource subsets.
  • the candidate server with larger allocatable resources allocates resources of smaller size in more situations, it does not properly reserve allocatable resources, thus affecting the The ability to distribute resources reduces the ability of the first candidate server set to distribute large-scale resources as a whole.
  • resources can be properly reserved. Since the target server is in One of the servers whose ability to allocate resources of various specifications decreases the least before and after allocating resources of a specified specification, so that when the allocatable resources of other servers remain unchanged, for the overall set of first candidate servers, it can Maximize reserved capacity to allocate resources of various sizes.
  • FIG. 4 it is a schematic structural diagram of a resource scheduling device provided by an embodiment of the present application.
  • the above-mentioned resource scheduling device provided by the embodiment of the present application can realize all the method steps realized by the above-mentioned embodiment of the resource scheduling method, and can achieve the same technical effect, and the same part as the method embodiment in this embodiment will not be discussed here. and beneficial effects are described in detail.
  • This application provides a resource scheduling device, including:
  • the receiving module 401 is configured to receive a first virtual machine VM request, and the first VM request is used to request allocation of resources of a specified specification for the target VM;
  • a processing module 402 configured to select a target server from the first set of candidate servers, the amount of change in the resource issuance capability of the target server is not greater than that of any candidate server in the first set of candidate servers except the target server
  • the amount of change in the resource issuance capability of any candidate server is the variation between the first resource issuance capability and the second resource issuance capability of the candidate server, and the first resource of any candidate server
  • the issuance capability indicates the first allocable resource of the candidate server, the first allocable resource is the allocatable resource before the candidate server is pre-allocated the resource of the specified specification, and the second resource of any candidate server is issued
  • the capability indicates the second allocatable resource of the candidate server, the second allocatable resource is the allocatable resource after the candidate server is pre-allocated the resource of the specified specification, and the resource issuance capability is used to characterize the pair of allocatable resources The ability to allocate resources of various sizes;
  • An allocating module 403 configured to allocate resources of the specified specification among the allocatable resources of the target server to the target VM.
  • processing module 402 is specifically configured to:
  • the first resource issuance capability is obtained in the following manner:
  • the first resource distribution capability of the first allocable resource represents the comprehensive resource distribution capability of the first allocable resource for allocating resources of various specifications
  • the second resource issuance capability is obtained in the following manner:
  • processing module 402 is specifically configured to:
  • the first resource issuance capability of the first allocable resource is determined in the following manner:
  • the second resource issuance capability of the second allocatable resource is determined in the following manner:
  • the second resource issuance capability of the second allocable resource is obtained by accumulating or averaging the resource issuance capabilities of a single specification allocated by the second allocatable resources to resources of each specification.
  • the resource of the specified specification requested by the first VM request includes at least two types of resources; the processing module 402 is specifically configured to:
  • the first resource issuance capability of the first allocable resource is determined in the following manner:
  • the first resource distribution capability of the first allocatable resource is determined, and the first resource distribution capability represents the first The ability to allocate comprehensive resources to resources of various specifications for at least two types of resources mentioned in the allocatable resources;
  • the second resource issuance capability of the second allocatable resource is determined in the following manner:
  • the second resource distribution capability of the second allocatable resource is determined, and the second resource distribution capability represents the second The at least two types of resources in the allocatable resources are capable of allocating resources of various specifications.
  • processing module 402 is specifically configured to:
  • the resource issuance capability of a single specification for allocating resources of each specification by the first allocable resource is determined in the following manner:
  • the maximum number of times that the first allocable resource allocates resources of any specification, or the maximum number of times that the first allocatable resource allocates resources of any specification is equal to the distribution capability coefficient corresponding to the specification product;
  • the resource issuance capability of a single specification for the second allocatable resource to allocate resources of each specification is determined in the following manner:
  • the maximum number of times the second allocatable resources are allocated to resources of any specification, or the maximum number of times the second allocatable resources are allocated to resources of any specification is the ratio of the distribution capacity coefficient corresponding to any specification product.
  • the provisioning capability coefficient is preset, or the provisioning capability coefficient is adjusted according to at least one second VM request, and the at least one second VM request includes a VM request for which resource allocation has been completed and /or VM requests that have completed resource reclamation.
  • processing module 402 is also used for:
  • the specifications of the resources requested to be allocated and/or reclaimed according to the at least one second VM request determine the proportion of resources of each specification allocated according to the at least one second VM request;
  • the distribution capability coefficient corresponding to each specification adjusts the distribution capability coefficient corresponding to each specification, wherein, the distribution capability coefficient corresponding to any specification after adjustment is different from the resource ratio of the specification allocated according to the at least one second VM request.
  • the ratio is positively correlated.
  • processing module 402 is specifically configured to:
  • the first resource issuance capability of the first allocable resource is determined in the following manner:
  • the resource distribution capability evaluation table According to the first allocatable resource of any candidate server, query the resource distribution capability evaluation table to obtain the first resource distribution capability of the first allocatable resource;
  • the second resource issuance capability of the second allocatable resource is determined in the following manner:
  • the resource allocation capability evaluation table According to the second allocatable resource of any candidate server, query the resource allocation capability evaluation table to obtain the second resource allocation capability of the second allocatable resource;
  • any item in the evaluation table of resource distribution capability includes allocatable resources and resource distribution capabilities of the allocatable resources. It can be obtained by assigning a single-specification resource issuance capability, or by assigning a single-specification resource issuance capability for resources of each specification based on the allocatable resource and the resource issuance capability coefficient corresponding to the specification.
  • any of the candidate servers includes at least one resource set, and each resource set includes at least two resource subsets; the allocation module 403 is specifically configured to:
  • the second resource subset is a resource subset whose size is larger than the smallest size among the resource subsets of the specified size, and the resources of the second resource subset are occupied and the size of the remaining resources is not smaller than the specified size;
  • the resources of the specified specification in the third resource subset allocated to the target VM are the same as that of the second resource subset, and the resources of the third resource subset are not occupied.
  • the allocation module 403 is also used for:
  • the target The resources of at least two fourth resource subsets in the server are allocated to the target VM, and the sum of the remaining resources of the at least two fourth resource subsets is the resource of the specified specification.
  • the allocation module 403 is also used for:
  • the at least one second VM request includes VMs that have completed resource allocation VM requests that request and/or have completed resource reclamation.
  • the processing module 402 is further configured to:
  • the resource consumption consistency index of any candidate server in the second set of candidate servers characterizes the consumption ratio of at least two types of resources among the second allocatable resources of the candidate server and the consumption ratio of the candidate server the closeness of the proportions of at least two types of resources in the resource specification;
  • At least two candidate servers are selected in descending order of the resource consumption consistency index, and the at least two candidate servers form the first candidate server set.
  • the present application provides another resource scheduling device, and its specific structure may also be shown in Figure 4.
  • the device specifically includes:
  • the receiving module 401 is configured to receive a first VM request, and the first VM request is used to request allocation of resources of a specified specification for the target VM;
  • the processing module 402 is configured to determine the variation in resource issuance capability of each candidate server in the first candidate server set; the resource issuance capability variation of any candidate server in the first candidate server set is the first resource issuance capability of the candidate server.
  • the variation between the capability and the second resource issuance capability, the first resource issuance capability of any candidate server indicates the first allocatable resource of the candidate server, and the first allocatable resource is pre-allocated for the candidate server Allocatable resources before the resource of the specified specification
  • the second resource issuance capability of any candidate server indicates the second allocatable resource of the candidate server, and the second allocatable resource is pre-allocated by the candidate server Allocatable resources after resources of the specified specification
  • the resource issuance capability is used to represent the ability of the allocatable resources to allocate resources of various specifications;
  • the resource consumption consistency index of the server wherein, the resource consumption consistency index of any candidate server in the second candidate server set characterizes the consumption ratio of at least two types of resources among the second allocatable resources of the candidate server and The closeness of the proportions of at least two types of resources in the resource specification of the candidate server;
  • An allocating module 403 configured to allocate resources of the specified specification among the allocatable resources of the target server to the target VM.
  • processing module 402 is specifically configured to:
  • the first resource issuance capability is obtained in the following manner:
  • the first resource distribution capability of the first allocable resource represents the comprehensive resource distribution capability of the first allocable resource for allocating resources of various specifications
  • the second resource issuance capability is obtained in the following manner:
  • processing module 402 is also used for:
  • the specifications of the resources requested to be allocated and/or reclaimed according to the at least one second VM request determine the proportion of resources of each specification allocated according to the at least one second VM request;
  • the distribution capability coefficient corresponding to each specification adjusts the distribution capability coefficient corresponding to each specification, wherein, the distribution capability coefficient corresponding to any specification after adjustment is different from the resource ratio of the specification allocated according to the at least one second VM request.
  • the ratio is positively correlated.
  • processing module 402 is specifically configured to:
  • the first resource issuance capability of the first allocable resource is determined in the following manner:
  • the resource distribution capability evaluation table According to the first allocatable resource of any candidate server, query the resource distribution capability evaluation table to obtain the first resource distribution capability of the first allocatable resource;
  • the second resource issuance capability of the second allocatable resource is determined in the following manner:
  • the resource allocation capability evaluation table According to the second allocatable resource of any candidate server, query the resource allocation capability evaluation table to obtain the second resource allocation capability of the second allocatable resource;
  • any item in the evaluation table of resource distribution capability includes allocatable resources and resource distribution capabilities of the allocatable resources. It can be obtained by assigning a single-specification resource issuance capability, or by assigning a single-specification resource issuance capability for resources of each specification based on the allocatable resource and the resource issuance capability coefficient corresponding to the specification.
  • any of the candidate servers includes at least one resource set, and each resource set includes at least two resource subsets; the allocation module 403 is specifically configured to:
  • the second resource subset is a resource subset whose size is larger than the smallest size among the resource subsets of the specified size, and the resources of the second resource subset are occupied and the size of the remaining resources is not smaller than the specified size;
  • the resources of the specified specification in the third resource subset allocated to the target VM are the same as that of the second resource subset, and the resources of the third resource subset are not occupied.
  • the embodiment of the present application also provides an electronic device.
  • the electronic device may have the structure shown in FIG. 5 .
  • the electronic device may be a computer device, or may be a chip or a chip system capable of supporting the computer device to implement the above method.
  • the electronic device shown in FIG. 5 may include at least one processor 501, and the at least one processor 501 is configured to be coupled with a memory, and read and execute instructions in the memory to implement the resource scheduling method provided by the embodiment of the present application.
  • the electronic device may further include a communication interface 502, configured to support the electronic device in receiving or sending signaling or data.
  • the communication interface 502 in the electronic device can be used to realize interaction with other electronic devices.
  • the processor 501 may be configured to enable the electronic device to execute the steps in the method shown in FIG. 1 .
  • the electronic device may also include a memory 503, in which computer instructions are stored, and the memory 503 may be coupled with the processor 501 and/or the communication interface 502, and is used to support the processor 501 to call the computer instructions in the memory 503 to implement Steps in the method as shown in the schematic diagram of FIG. 1; in addition, the memory 503 can also be used to store the data involved in the method embodiment of the present application, for example, to store data and instructions necessary to support the communication interface 502 to realize interaction, and /or, used to store configuration information necessary for the electronic device to execute the method described in the embodiment of the present application.
  • the embodiment of the present application also provides a computer-readable storage medium.
  • Computer instructions are stored on the computer-readable storage medium. When these computer instructions are called and executed by a computer, the computer can complete any one of the above-mentioned method embodiments and method embodiments. methods involved in a possible design.
  • the computer-readable storage medium is not limited, for example, it may be RAM (random-access memory, random access memory), ROM (read-only memory, read-only memory), etc.
  • the present application also provides a chip, which may include a processor and an interface circuit, for completing the methods involved in any of the above method embodiments and any possible implementation of the method embodiments, wherein "coupling" means Two parts are coupled to each other directly or indirectly, and this coupling can be fixed or movable.
  • all or part of them may be implemented by software, hardware, firmware or any combination thereof.
  • software it may be implemented in whole or in part in the form of computer instructions.
  • the computer instructions When the computer instructions are loaded and executed on the computer, the procedures or functions according to the embodiments of the present invention will be generated in whole or in part.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, optical fiber) or wireless (eg, infrared, wireless, microwave, etc.) means.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device including a server, a data center, and the like integrated with one or more available media.
  • the available medium may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (Solid State Disk, SSD)), etc.
  • a magnetic medium such as a floppy disk, a hard disk, or a magnetic tape
  • an optical medium such as a DVD
  • a semiconductor medium such as a solid state disk (Solid State Disk, SSD)
  • the steps of the method or algorithm described in the embodiments of the present application may be directly embedded in hardware, a software unit executed by a processor, or a combination of both.
  • the software unit may be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, removable disk, CD-ROM or any other storage medium in the art.
  • the storage medium can be connected to the processor, so that the processor can read information from the storage medium, and can write information to the storage medium.
  • the storage medium can also be integrated into the processor.
  • the processor and the storage medium can be set in the ASIC, and the ASIC can be set in the terminal device.
  • the processor and the storage medium may also be disposed in different components in the terminal device.
  • These computer instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device Steps are provided for implementing the functions specified in the flow chart or flow charts and/or block diagram block or blocks.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)

Abstract

Sont divulgués un procédé et un appareil de planification de ressources. Le procédé comprend les étapes suivantes : la réception d'une première requête de machine virtuelle (VM), la première requête de VM étant utilisée pour demander d'attribuer une ressource d'une spécification spécifiée à une VM cible ; la sélection d'un serveur cible parmi un premier ensemble de serveurs candidats, la quantité de variation de capacité d'émission de ressource du serveur cible n'étant pas supérieure à la quantité de variation de capacité d'émission de ressource de n'importe quel serveur candidat dans le premier ensemble de serveurs candidats à l'exception du serveur cible ; et l'attribution de la ressource de la spécification spécifiée parmi des ressources attribuables du serveur cible à la VM cible, le serveur cible étant un serveur ayant la plus petite réduction dans la capacité d'attribuer des ressources de diverses spécifications avant et après l'attribution de la ressource de la spécification spécifiée. Par conséquent, lorsque les ressources attribuables d'autres serveurs restent inchangées, la capacité d'attribuer les ressources de diverses spécifications peut être conservée au maximum pour l'ensemble du premier ensemble de serveurs candidats.
PCT/CN2021/143561 2021-05-27 2021-12-31 Procédé et appareil de planification de ressources WO2022247287A1 (fr)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202110586962.X 2021-05-27
CN202110586962 2021-05-27
CN202110876658.9A CN115408098A (zh) 2021-05-27 2021-07-31 一种资源调度方法及装置
CN202110876658.9 2021-07-31

Publications (1)

Publication Number Publication Date
WO2022247287A1 true WO2022247287A1 (fr) 2022-12-01

Family

ID=84155609

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/143561 WO2022247287A1 (fr) 2021-05-27 2021-12-31 Procédé et appareil de planification de ressources

Country Status (2)

Country Link
CN (1) CN115408098A (fr)
WO (1) WO2022247287A1 (fr)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070016907A1 (en) * 2005-07-12 2007-01-18 Fabio Benedetti Method, system and computer program for automatic provisioning of resources to scheduled jobs
CN102801809A (zh) * 2012-08-20 2012-11-28 深圳市佳创视讯技术股份有限公司 一种资源调度系统
CN103763346A (zh) * 2013-12-31 2014-04-30 华为技术有限公司 一种分布式资源调度方法及装置
US10176550B1 (en) * 2017-03-20 2019-01-08 Nutanix, Inc. GPU resource usage display and dynamic GPU resource allocation in a networked virtualization system
CN110287003A (zh) * 2019-06-28 2019-09-27 北京九章云极科技有限公司 资源的管理方法和管理系统
CN110858161A (zh) * 2018-08-24 2020-03-03 阿里巴巴集团控股有限公司 资源分配方法、装置、系统、设备和介质
CN112019453A (zh) * 2019-05-29 2020-12-01 潘仲光 资源重分配方法、设备及存储介质
CN112685153A (zh) * 2020-12-25 2021-04-20 广州奇盾信息技术有限公司 微服务调度方法、装置以及电子设备

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070016907A1 (en) * 2005-07-12 2007-01-18 Fabio Benedetti Method, system and computer program for automatic provisioning of resources to scheduled jobs
CN102801809A (zh) * 2012-08-20 2012-11-28 深圳市佳创视讯技术股份有限公司 一种资源调度系统
CN103763346A (zh) * 2013-12-31 2014-04-30 华为技术有限公司 一种分布式资源调度方法及装置
US10176550B1 (en) * 2017-03-20 2019-01-08 Nutanix, Inc. GPU resource usage display and dynamic GPU resource allocation in a networked virtualization system
CN110858161A (zh) * 2018-08-24 2020-03-03 阿里巴巴集团控股有限公司 资源分配方法、装置、系统、设备和介质
CN112019453A (zh) * 2019-05-29 2020-12-01 潘仲光 资源重分配方法、设备及存储介质
CN110287003A (zh) * 2019-06-28 2019-09-27 北京九章云极科技有限公司 资源的管理方法和管理系统
CN112685153A (zh) * 2020-12-25 2021-04-20 广州奇盾信息技术有限公司 微服务调度方法、装置以及电子设备

Also Published As

Publication number Publication date
CN115408098A (zh) 2022-11-29

Similar Documents

Publication Publication Date Title
US11048442B2 (en) Scalable in-memory object storage system using hybrid memory devices
US8285961B2 (en) Dynamic performance virtualization for disk access
US9652150B2 (en) Global memory sharing method and apparatus, and communications system
US8060610B1 (en) Multiple server workload management using instant capacity processors
US20130055279A1 (en) Resource allocation tree
CN106469018B (zh) 分布式存储系统的负载监控方法及设备
US9069623B2 (en) Management apparatus, method, and privileged and confidential medium storing program to migrate a virtual machine when a resource shortage or booting occurs
CN108900626B (zh) 一种云环境下数据存储方法、装置及系统
CN107533435B (zh) 存储空间的分配方法及存储设备
US20220407817A1 (en) Resource allocation using distributed segment processing credits
CN109150759B (zh) 一种渐进式非阻塞机会资源预留方法及系统
CN110750498B (zh) 对象访问方法、装置及存储介质
WO2022247287A1 (fr) Procédé et appareil de planification de ressources
CN110308965B (zh) 云数据中心的基于规则的启发式虚拟机分配方法及系统
CN110178119B (zh) 处理业务请求的方法、装置与存储系统
CN108616583B (zh) 一种基于计算机云的存储空间分配方法
CN112805684A (zh) 使用恢复借用的资源分配
CN112783803B (zh) 一种计算机cpu-gpu共享缓存控制方法及系统
CN113157605B (zh) 一种两级缓存的资源分配方法、系统、存储介质及计算设备
CN114860449A (zh) 数据处理方法、装置、设备和存储介质
CN116932156A (zh) 一种任务处理方法、装置及系统
CN113190578A (zh) 多源数据查询系统、方法、装置、设备及存储介质
CN113364648A (zh) 流量控制方法、系统、装置、服务设备及存储介质
CN113010453A (zh) 一种内存管理的方法、系统、设备及可读存储介质
CN116405500B (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: 21942850

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

Country of ref document: EP

Kind code of ref document: A1