Cloud resource scheduling method and apparatus

By using a unified resource scheduling method on the cloud management platform, resources of different instance types are dynamically scheduled, resolving resource scheduling conflicts between traditional applications and cloud-native applications, improving host resource utilization, and achieving efficient resource management in hybrid cloud scenarios.

WO2026066132A1PCT designated stage Publication Date: 2026-04-02HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-05-15
Publication Date
2026-04-02

AI Technical Summary

Technical Problem

In hybrid cloud scenarios, the resource scheduling of traditional applications and cloud-native applications is isolated from each other, resulting in low utilization of host resources. Furthermore, the dynamic scheduling mechanism is conflicting, making it difficult to effectively utilize host resources.

Method used

The cloud management platform receives instance creation requests, obtains the available resources of each host, selects a target host that meets the instance specifications, creates an instance on that host, and adopts a unified resource scheduling method that considers the resource priorities and computing methods of different instance types to dynamically schedule resources to improve utilization.

Benefits of technology

It enables the classification and management of resources of different instance types, resolves resource scheduling conflicts, improves host resource utilization, supports dynamic scheduling of multiple instance types, and prioritizes the service quality of high-priority instances.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025095194_02042026_PF_FP_ABST
    Figure CN2025095194_02042026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of cloud services, and discloses a cloud resource scheduling method and apparatus. The method comprises: a cloud management platform receives an instance creation request sent by a tenant, wherein the instance creation request carries a first instance type and a first instance specification of a first instance to be created; the cloud management platform acquires an available resource amount of resources that each of a plurality of hosts can provide to an instance of the first instance type, wherein a first host can provide resources to instances of a plurality of instance types, calculation manners for the available resource amounts of the resources that the first host can provide to the instances of the plurality of instance types are different, and the first host is any one of the plurality of hosts; the cloud management platform selects, from among the plurality of hosts, the first host of which the available resource amount can meet the first instance specification, so as to obtain a target first host; and the cloud management platform creates a first instance on the target first host. The present application effectively improves the resource utilization rate of hosts.
Need to check novelty before this filing date? Find Prior Art

Description

Cloud resource scheduling method and device

[0001] The present application claims priority to the Chinese patent application No. 202411357097.1, filed on September 27, 2024, and entitled "Cloud resource scheduling method and device", the whole content of which is incorporated herein by reference. TECHNICAL FIELD

[0002] The present application relates to the technical field of cloud services, and in particular to a cloud resource scheduling method and device. BACKGROUND

[0003] In actual business deployment, an information technology (IT) infrastructure of an enterprise exists a demand for simultaneously using a traditional application and a cloud-native application according to specific needs and application characteristics, so as to exert respective advantages of the traditional application and the cloud-native application. In a typical scenario, the traditional application generally deploys a business by using a virtual machine, and the cloud-native application generally deploys a business by using an agile container instance, and the container is run in the virtual machine to provide a secure isolation capability.

[0004] At present, an instance for deploying the traditional application and an instance for deploying the cloud-native application use isolated resource pools. In this way, the instance for deploying the traditional application and the instance for deploying the cloud-native application use mutually isolated resources. When performing resource scheduling on the instance for deploying the traditional application and the instance for deploying the cloud-native application, the scheduling is performed in the respective used resource pools, which makes the resource scheduling on the two instances not interfere with each other.

[0005] However, such a scheduling manner results in a low resource utilization rate of a host for deploying the instance. SUMMARY

[0006] The present application provides a cloud resource scheduling method and device. The present application effectively improves the resource utilization rate of the host. The technical solution provided by the present application is as follows:

[0007] In a first aspect, the present application provides a cloud resource scheduling method. The method is performed by a cloud management platform. The cloud management platform is configured to manage an infrastructure providing cloud services. The infrastructure comprises a plurality of hosts. The method comprises: receiving, by the cloud management platform, an instance creation request sent by a tenant, the instance creation request carrying a first instance type and a first instance specification of a first instance to be created; obtaining, by the cloud management platform, an available resource amount of resources that each host in the plurality of hosts can provide to an instance of the first instance type, wherein the first host can provide resources to instances of a plurality of instance types, and the available resource amount of resources that the first host can provide to instances of the plurality of instance types is calculated in different ways, and the first host is any one of the plurality of hosts; selecting, by the cloud management platform, a first host from the plurality of hosts, wherein the available resource amount of resources of the first host can meet the first instance specification, to obtain a target first host; and creating, by the cloud management platform, the first instance on the target first host.

[0008] In the present application, since the first host can provide resources to instances of a plurality of instance types, and the available resource amount of resources that the first host can provide to instances of the plurality of instance types is calculated in different ways, the available resource amount of resources that the first host can provide to instances of different instance types can be different. The present application provides a unified cloud resource scheduling method in the case that the same host can deploy instances of different instance types, but the calculation method of the available resource amount of resources that the same host provides to instances of different instance types is different. In this way, when scheduling resources for creating instances, the available resource amount of resources that the same host provides to instances of different instance types is filtered, and resources are scheduled for the first instance according to the first instance type of the first instance to be created, thereby realizing the classified management of resources provided by the same host to instances of different instance types, overcoming the conflict in resource scheduling for instances of different instance types, solving the problem of dynamic scheduling of resources used by a plurality of instance types deployed in the same host, supporting dynamic scheduling of resources used by a plurality of instance types deployed in the same host, and effectively improving the resource utilization of the host.

[0009] Suppose the instances of the multiple instance types include: the first type of instance, the second type of instance and the third type of instance, and the priority of the first type of instance and the second type of instance to use the resources provided by the host is higher than the priority of the third type of instance to use the resources provided by the host. In one possible implementation, the available resource amount of the resources that the first host can provide to the first type of instance and the second type of instance is calculated based on the total amount of resources that the first host can provide to the instances and the instance specifications of the first type of instance and the second type of instance that have been deployed in the first host, and the total amount of resources that the first host can provide to the instances is obtained based on the specifications of the hardware resources of the first host and the oversubscription multiple; and the available resource amount of the resources that the first host can provide to the third type of instance is calculated based on the total amount of resources that the first host can provide to the instances and the total amount of resources actually used by the first type of instance, the second type of instance and the third type of instance that have been deployed in the first host.

[0010] In this calculation manner, since the priority of the first type of instance and the second type of instance to use the resources provided by the host is higher than the priority of the third type of instance to use the resources provided by the host, when scheduling resources for the first type of instance, the second type of instance and the third type of instance, the resource use demand of the first type of instance and the second type of instance needs to be satisfied first. Therefore, when calculating the available resource amount of the resources that the first host can provide to the first type of instance and the second type of instance, the calculation is performed based on the instance specifications of the first type of instance and the second type of instance that have been deployed in the first host. In this way, the cloud management platform can reserve resources for the first type of instance according to the instance specification of the first type of instance, so as to guarantee the quality of service (QOS) of the first type of instance during the service peak, and reserve resources for the second type of instance according to the instance specification of the second type of instance, so as to guarantee the QOS of the second type of instance during the service peak. When calculating the available resource amount of the resources that the first host can provide to the third type of instance, it is considered that the priority of the third type of instance to use the resources provided by the host is lower, the third type of instance can be migrated to other hosts when resource competition occurs, and the calculation is performed based on the total amount of resources actually used by the first type of instance, the second type of instance and the third type of instance that have been deployed in the first host, rather than based on the instance specifications of the first type of instance, the second type of instance and the third type of instance that have been deployed in the first host, for the purpose of guaranteeing the resource utilization of the host as much as possible.

[0011] Further, in the case that the implementation manner of the cloud management platform for scheduling resources to the second type of instance and the third type of instance is the same, and the implementation manner of the cloud management platform for scheduling resources to the first type of instance is different from the implementation manner of the cloud management platform for scheduling resources to the second type of instance and the third type of instance, the available resource amount of the resources that the first host can provide to the first type of instance can be optionally calculated based on the total amount of resources actually used by the third type of instance that have been deployed in the first host.

[0012] In a possible implementation, the cloud management platform creates the first instance on the target first host, including: the cloud management platform determines a first binding core range of the first instance in the target first host based on the first instance type, the binding core ranges of instances of the plurality of instance types in the first host are calculated in different ways, and the binding core range is used to indicate a processor core in the first host for providing a microprocessor core to the instance; the cloud management platform performs device simulation on the processor cores in the first binding core range to obtain microprocessor cores available for the first instance, and creates the first instance based on the microprocessor cores.

[0013] When the cloud management platform creates the first instance on the target first host, it is necessary to first determine hardware devices in the target first host for providing various virtual hardware required by the first instance, then perform device simulation on the hardware devices to obtain virtual hardware available for the first instance, and then create the first instance based on the virtual hardware. When the cloud management platform determines the hardware devices in the target first host for providing various virtual hardware required by the first instance, it is necessary to first select a selectable range of hardware devices capable of providing various virtual hardware required by the first instance, and then determine the hardware devices in the selectable range for providing various virtual hardware required by the first instance. The following takes the determination of processor cores for providing microprocessor cores for the first instance as an example to describe the implementation process of the cloud management platform for creating the first instance on the target first host. It is assumed that the instances of the plurality of instance types include: first-type instances, second-type instances, and third-type instances, and the priority of the first-type instances and the second-type instances for using resources provided by the host is higher than that of the third-type instances. As a possible implementation, the binding core range of the first-type instances in the first host includes: processor cores selected from all available processor cores of the first host, and the number of the processor cores is equal to the number of microprocessor cores indicated by the instance specification of the first-type instances; the binding core range of the second-type instances in the first host includes: available processor cores of the first host except for the processor cores for providing microprocessor cores to the first-type instances; and the binding core range of the third-type instances in the first host includes: all available processor cores of the first host.

[0014] The cloud management platform determines the first binding core range of the first instance in the target first host, which is equivalent to obtaining the optional range of the processor core for providing the microprocessor core for the first instance. When the calculation manner of the binding core range of the instances of the plurality of instance types in the first host is different, the binding core ranges of the instances of different instance types are different, so that the dynamic isolation of the resources provided for the instances of different instance types can be realized, and the instances of different instance types can be isolated and managed. In this implementation manner, the priority of the first type of instance using the resources provided by the host is higher than the priority of the second type of instance using the resources provided by the host, and therefore the calculation manner can reflect the following principle: the binding core range of the first type of instance is preferentially guaranteed, then the binding core range of the second type of instance is guaranteed, and finally the binding core range of the third type of instance is guaranteed.

[0015] Similarly, in the case where the priority of the first type of instance using the resources provided by the host is lower than the priority of the second type of instance using the resources provided by the host, the binding core range of the second type of instance in the first host includes the processor cores selected from all the available processor cores of the first host and the number of which is equal to the number of microprocessor cores indicated by the instance specification of the second type of instance. The binding core range of the first type of instance in the first host includes the available processor cores of the target first host except the processor cores providing the microprocessor cores for the second type of instance. The binding core range of the third type of instance in the first host includes all the available processor cores of the target first host. At this time, it is equivalent to preferentially guaranteeing the binding core range of the second type of instance, then guaranteeing the binding core range of the first type of instance, and finally guaranteeing the binding core range of the third type of instance.

[0016] Further, in the case of preferentially guaranteeing the binding core range of the first type of instance, the binding core range of the first type of instance in the target first host includes the available processor cores selected from all the available processor cores of the first host and the number of which is equal to the number of microprocessor cores indicated by the instance specification of the first type of instance and the super-allocated resources are not used up. In this way, the processor cores providing the microprocessor cores for the first type of instance are the used processor cores in the target first host. And / or, the binding core range of the first type of instance in the target first host includes the available processor cores selected from all the available processor cores of the first host and the number of which is equal to the number of microprocessor cores indicated by the instance specification of the first type of instance and the super-allocated resources are not used up and the available processor cores adjacent to the same. In this way, the processor cores providing the microprocessor cores for the first type of instance are the used processor cores in the target first host and the available processor cores adjacent to the same, so that the processor cores providing the microprocessor cores for the first type of instance can more probably write data into the memory segment closest to the same, reduce the need of the processor core to jump in reading data in a plurality of memory segments when reading data, and help to guarantee the memory access performance of the processor resource and further guarantee the running performance of the instance using the processor resource.

[0017] In a possible implementation, the method further includes: the cloud management platform acquiring running performance data of the plurality of instances deployed in the plurality of hosts; and in a case where the running performance data of the second instance indicates that the quality of service of the second instance is deteriorating, the cloud management platform migrating a third instance in the second host to a third host, and providing cloud resources released by the third instance in the second host to the second instance, the second instance being one of the plurality of instances deployed in the plurality of hosts, and the third instance being an instance with the lowest priority to use resources provided by the second host.

[0018] In this way, when resource competition occurs, the third instance with a lower priority in the second host can be migrated to another host, and the resources released by the migrated third instance can be provided to the instance with a higher priority in the second host, so as to eliminate resource hotspots and relieve the resource competition in the second host. In this way, it is equivalent to providing differentiated QOS guarantee capabilities for the instances with different priorities to use the resources provided by the second host, and preferentially guaranteeing that the instance with a higher priority is not disturbed.

[0019] In a second aspect, the present application provides a cloud resource scheduling apparatus. The apparatus is deployed in a cloud management platform. The cloud management platform is configured to manage an infrastructure providing cloud services. The infrastructure includes a plurality of hosts. The apparatus includes: an interaction module configured to receive an instance creation request sent by a tenant, the instance creation request carrying a first instance type and a first instance specification of a first instance to be created; a first acquisition module configured to acquire an available resource amount of resources that each host in the plurality of hosts can provide to instances of the first instance type, wherein the first host can provide resources to instances of a plurality of instance types, and the available resource amount of the resources that the first host can provide to instances of the plurality of instance types is calculated in different ways, and the first host is any one of the plurality of hosts; a first scheduling module configured to select, from the plurality of hosts, a first host whose available resource amount can meet the first instance specification, to obtain a target first host; and a creation module configured to create the first instance on the target first host.

[0020] In a possible implementation, the instances of the plurality of instance types include: first-type instances, second-type instances, and third-type instances, the first-type instances and the second-type instances have higher priority than the third-type instances in using resources provided by the host; the available resource amount of the resources that the first host can provide to the first-type instances and the second-type instances is calculated based on the total amount of resources that the first host can provide to instances and the instance specifications of the first-type instances and the second-type instances that have been deployed in the first host, the total amount of resources that the first host can provide to instances is obtained based on the specifications of hardware resources of the first host and an oversubscription multiple; and the available resource amount of the resources that the first host can provide to the third-type instances is calculated based on the total amount of resources that the first host can provide to instances and the total amount of resources actually used by the first-type instances, the second-type instances, and the third-type instances that have been deployed in the first host.

[0021] In a possible implementation, the available resource amount of the resources that the first host can provide to the first-type instances is further calculated based on the total amount of resources actually used by the third-type instances that have been deployed in the first host.

[0022] In a possible implementation, the creating module is specifically configured to: determine, based on a first instance type, a first core binding range of a first instance in a target first host, the core binding ranges of the instances of the plurality of instance types in the first host are calculated in different manners, and the core binding range is used to indicate a processor core of the first host that is used to provide a microprocessor core to the instance; perform device simulation on the processor cores in the first core binding range to obtain microprocessor cores available for the first instance, and create the first instance based on the microprocessor cores.

[0023] In a possible implementation, the instances of the plurality of instance types include: first-type instances, second-type instances, and third-type instances, the first-type instances and the second-type instances have higher priority than the third-type instances in using resources provided by the host. Then, the core binding range of the first-type instances in the first host includes processor cores selected from all available processor cores of the first host, and the number of the processor cores is equal to the number of microprocessor cores indicated by the instance specification of the first-type instances; the core binding range of the second-type instances in the first host includes available processor cores of all available processor cores of the first host except the processor cores that provide microprocessor cores to the first-type instances; and the core binding range of the third-type instances in the first host includes all available processor cores of the first host.

[0024] In a possible implementation, the binding core range of the first type of instance in the first host comprises: a number of available processor cores selected from all available processor cores of the first host is equal to the number of microprocessor cores indicated by the instance specification of the first type of instance, and the available processor cores are not used up by the oversubscription resources, and / or a number of available processor cores selected from all available processor cores of the first host is equal to the number of microprocessor cores indicated by the instance specification of the first type of instance, and the available processor cores are not used up by the oversubscription resources and the available processor cores adjacent to the available processor cores are used.

[0025] In a possible implementation, the apparatus further includes: a second acquisition module, configured to acquire running performance data of a plurality of instances deployed in a plurality of hosts; and a second scheduling module, configured to, in a case where the running performance data of a second instance indicates that the quality of service of the second instance is deteriorating, migrate a third instance in a second host in which the second instance is located to a third host, and provide cloud resources released by the third instance in the second host to the second instance for use, the second instance being one of the plurality of instances deployed in the plurality of hosts, and the third instance being an instance with the lowest priority of using resources provided by the second host.

[0026] In a third aspect, the present application provides a computing device, including a memory and a processor, the memory storing program instructions, and the processor executing the program instructions to perform the method provided in the first aspect of the present application and any possible implementation manner thereof.

[0027] In a fourth aspect, the present application provides a computing device cluster, including a plurality of computing devices, the plurality of computing devices including a plurality of processors and a plurality of memories, the plurality of memories storing program instructions, and the plurality of processors executing the program instructions so that the computing device cluster performs the method provided in the first aspect of the present application and any possible implementation manner thereof.

[0028] In a fifth aspect, the present application provides a computer readable storage medium, which is a non-volatile computer readable storage medium, and includes program instructions, when the program instructions are executed on a computing device, the computing device performs the method provided in the first aspect of the present application and any possible implementation manner thereof.

[0029] In a sixth aspect, the present application provides a computer program product containing instructions, when the computer program product is executed on a computer, the computer performs the method provided in the first aspect of the present application and any possible implementation manner thereof. BRIEF DESCRIPTION OF DRAWINGS

[0030] FIG. 1 is a structural schematic diagram of an implementation scenario involved in a cloud resource scheduling method provided by an embodiment of the present application;

[0031] Fig. 2 is a schematic diagram of deployment of basic resources in a data center according to an embodiment of the present application;

[0032] Fig. 3 is a flowchart of a cloud resource scheduling method according to an embodiment of the present application;

[0033] Fig. 4 is a schematic diagram of a process of creating an instance based on an instance creation request according to an embodiment of the present application;

[0034] Fig. 5 is a flowchart of creating a first instance in a target first host according to an embodiment of the present application;

[0035] Fig. 6 is a schematic diagram of resource scheduling according to an embodiment of the present application;

[0036] Fig. 7 is a flowchart of another cloud resource scheduling method according to an embodiment of the present application;

[0037] Fig. 8 is a schematic diagram of QOS guarantee according to an embodiment of the present application;

[0038] Fig. 9 is a schematic diagram of a cloud resource scheduling apparatus according to an embodiment of the present application;

[0039] Fig. 10 is a schematic diagram of another cloud resource scheduling apparatus according to an embodiment of the present application;

[0040] Fig. 11 is a schematic diagram of a computing device according to an embodiment of the present application;

[0041] Fig. 12 is a schematic diagram of a computing device cluster according to an embodiment of the present application;

[0042] Fig. 13 is a schematic diagram of another computing device cluster according to an embodiment of the present application. DETAILED DESCRIPTION

[0043] In order to make the objects, technical solutions and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings.

[0044] In order to make the objects, technical solutions and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings.

[0045] Cloud computing: Cloud computing is a kind of distributed computing, which refers to a network that uniformly manages and schedules a large number of computing resources and storage resources to provide on-demand services to users. The computing resources and storage resources are provided by a cluster of computing devices set in a data center. Moreover, cloud computing can provide multiple types of service types for users, for example, it can provide infrastructure as a service (IaaS), platform as a service (PaaS) and software as a service (SaaS) and the like. The role of infrastructure as a service is to provide virtual machines or other resources as services to tenants. The role of platform as a service is to provide a development platform as a service to tenants. The role of software as a service is to provide an application (App) as a service to customers.

[0046] An internet data center (IDC) is a facility and related service system that provides operation and maintenance for centralized collection, storage, processing and transmission of data based on an Internet network. Conceptually, it can be understood as a public commercial Internet "machine room", and it is also an IT professional service and an important infrastructure of the IT industry. IDC is not only a service concept, but also a network concept, which constitutes part of the network infrastructure, just like the backbone network and the access network, providing a high-end data delivery service and high-speed access service. Generally, a tenant's offline IDC can be understood as a tenant's offline machine room, which is a standardized telecom professional machine room environment built by tenants using existing Internet communication lines and bandwidth resources, used to provide server hosting, rental and related value-added services. A cloud data center is an Internet data center deployed using the underlying resources of a cloud vendor.

[0047] A resource pool is a collection of various hardware resources and software resources involved in a cloud data center. Generally, according to the type of resources, the resources in the resource pool can be divided into computing resources, storage resources and network resources, etc.

[0048] Physical Machine (PM): A physical resource used to carry virtualization technology. A host is also called a physical machine. Generally, a host used to deploy a virtual instance is a physical server. A physical machine has multiple physical devices. For example, a physical server has physical devices such as a processor and a memory. Multiple virtual instances can be deployed in a host. Multiple virtual instances deployed on the same host share the physical resources of the host. According to different use cases, multiple virtual instances deployed in a host can belong to the same tenant or belong to different tenants respectively.

[0049] Virtualization is a resource management technology. Virtualization can abstract and convert various entity resources of a host, such as computing resources, network resources, and storage resources, to break the barriers between the entity structures of the host, so that tenants can use these resources in a better way than the original configuration. The resources obtained through virtualization are called virtualized resources, which are not limited by the setup method, setting region, or physical configuration of the existing entity resources.

[0050] Virtualized resources are usually provided to tenants in the form of virtual instances. A virtual instance can use the hardware resources of a host and run on the operating system of the host. An application runs in the virtual instance, which is used to implement the business of a tenant. The hardware resources of the host can be used by one or more tenants in the granularity of a virtual instance. Different virtual instances are isolated from each other, so that tenants can conveniently and flexibly use physical resources under the premise of secure isolation, and the utilization rate of physical resources can be greatly improved. Generally, a virtual instance can be a virtual machine (VM), a pod, or an independent process (such as a function). A virtual instance can also be called an elastic compute service (ECS) or an elastic instance (different cloud service providers have different names).

[0051] Virtual machine: refers to a complete computer system with complete hardware system function simulated by virtualization technology, running in a completely isolated environment. Part of the instructions of the virtual machine can be processed in the host machine, and the other part of the instructions can be executed in an emulated manner. The virtual machine is also called a virtual server. The virtual machine can be regarded as a collection of a plurality of virtual devices, which has complete hardware system function and runs in a completely isolated environment. The virtual device is virtually obtained based on a physical device capable of being shared resources by virtualization technology. For example, a virtual processor virtually obtained based on a processor by virtualization technology is a virtual device. For another example, a training card virtually obtained based on a field-programmable gate array (FPGA) by virtualization technology is also a virtual device. Exemplarily, the virtual machine in the present application can be a kernel-based virtual machine (KVM). The work that can be completed in a server can be implemented in the virtual machine. When the virtual machine is created in the server, part of the hard disk and memory capacity of the entity machine need to be used as the hard disk and memory capacity of the virtual machine. Each virtual machine has an independent hard disk and operating system, and the tenant of the virtual machine can operate the virtual machine like using the server. The running environment (such as virtual machine application, operating system and virtual hardware) in different virtual machines is completely isolated, and the communication between different virtual machines needs to be forwarded through the virtual manager network message.

[0052] The container uses the namespace and cgroup technologies supported by the Linux kernel to isolate the application APP process and its dependent packages (running environment bins / libs, specifically all files required to run the APP) in an independent running environment. The container provides a lightweight virtual running environment. The container can be obtained by packaging all the codes, libraries and dependencies of the tenant's application into an image. When the image is executed, the image runs in a virtual running environment. At this time, the container is the runtime instance of the image, similar to a lightweight sandbox, which can be started, started, stopped and deleted. The infrastructure of the container can be the hardware of the server or the virtual machine on the cloud (that is, a container can also be deployed in a virtual machine), and the operating system uses the Linux kernel, supports namespace and cgroup, wherein the namespace is used to realize the isolation between processes, and the cgroup is used to realize the allocation of process resources, and the resources are specifically virtual processors and memories allocated to the process. The container engine is similar to the virtual machine manager and runs in the operating system to manage the container. Compared with the characteristics of the virtual machine with the operating system, the container does not exist the operating system, and the container runs as a process in the operating system of the host computer, so the starting speed of the container is faster than that of the virtual machine, and the container is particularly suitable for lightweight applications, and a host computer can simultaneously run thousands of containers (processes).

[0053] Kubernetes (K8S) is an open source container orchestration engine of Google. Kubernetes is used to manage containerized workloads and services, and supports automatic deployment, large-scale scalability, application container management, facilitates declarative configuration and automatic deployment of containers. The node Kubelet component communicates with the Kubernetes control plane to manage container instances on each node. In Kubernetes, multiple containers can be created, and an application instance runs in each container. When deploying an application in a production environment, multiple application instances of the application can be deployed, and then the multiple application instances are managed, discovered and accessed through the built-in load balancing strategy, and the implementation of these details does not require complex manual configuration and processing by the operation and maintenance personnel.

[0054] Cloud resource scheduling refers to reasonably allocating and scheduling cloud resources for issuing instances such as virtual machines, so as to realize efficient resource management and task execution, and improve the availability, reliability and performance of the system. Typical scheduling modes include static scheduling and dynamic scheduling. Static scheduling is to allocate and schedule cloud resources according to static peak resources (flavor). Once the scheduling is completed, the resource allocation status generally does not change without maintenance. Dynamic scheduling is a real-time monitoring-based resource scheduling algorithm. Virtual machines and other instances deployed in the host are scheduled according to the actual utilization rate of the host resources, so that the resource usage on the data center host is relatively balanced, and the utilization rate of the host resources is improved.

[0055] Traditional application: usually a huge, tightly integrated whole, all functional modules in a single code library and deployment package, usually running on dedicated hardware or virtual machines, relying on fixed infrastructure.

[0056] Cloud-native application: an application designed and optimized for cloud environment, usually adopting microservice architecture to split the application program into multiple independent, loosely coupled services. These service applications can be independently deployed and managed through corresponding cloud-native instance objects such as containers, Hadoop job processes and other agile applications.

[0057] In actual business deployment, enterprise IT infrastructure exists the demand of using both traditional application and cloud-native application according to specific needs and application characteristics, so as to exert the respective advantages of traditional application and cloud-native application. In typical scenarios, traditional application generally deploys business by using virtual machine, and cloud-native application generally deploys business by using agile container instance, and the container runs in the virtual machine to provide security isolation capability.

[0058] At present, the instances for deploying traditional application and the instances for deploying cloud-native application use isolated resource pools. In this way, the resources used by the instances for deploying traditional application and the instances for deploying cloud-native application are isolated from each other. When scheduling resources for the instances for deploying traditional application and the instances for deploying cloud-native application, the scheduling is performed in the respective used resource pools, which makes the resource scheduling processes of the two not interfere with each other. However, such scheduling mode leads to low resource utilization rate of the host for deploying instances.

[0059] And in the hybrid cloud scenario, cost reduction and efficiency improvement has become the key competitiveness to practice deep cloud. In order to improve the utilization rate of the basic resources managed by the cloud management platform, the resource scheduling mode of the cloud management platform is gradually changing from the traditional static scheduling allocation mode centered on static peak resources to the dynamic scheduling mode centered on dynamic business load. Therefore, in order to effectively utilize the physical resources on the host, the cloud management platform expects to deploy traditional applications and cloud native applications in a mixed manner under the condition of limited resources when performing dynamic scheduling of resources, that is, to deploy both instances of traditional applications and instances of cloud native applications in the same host. However, due to the differences between traditional applications and cloud native applications in resource scheduling and management, conflicts may occur in the dynamic scheduling of instances of traditional applications and instances of cloud native applications in actual deployment. For example, when a cloud native application is implemented by using a container, the container needs to be deployed in a virtual machine, so that multiple containers will be deployed in the virtual machine of the cloud native application due to business demands, and the containers themselves have priorities, and the priorities of different containers in the same virtual machine may be different, which leads to the fact that the priority of the virtual machine of the cloud native application cannot be determined due to the different priorities of the multiple containers inside the virtual machine. However, the current dynamic scheduling needs to be based on the priority of the virtual machine to perform cloud resource scheduling, which leads to the conflict between the virtual machine of the cloud native application and the implementation mechanism of the dynamic scheduling. The dynamic scheduling mechanism is also an inevitable choice for customers to reduce costs and improve efficiency in the process of deep cloud use. Therefore, a unified dynamic scheduling method is needed to support the co-hosting scenario of traditional applications and cloud native applications, so as to meet the demand of customers for improving resource utilization in the hybrid cloud scenario.

[0060] Therefore, an embodiment of the present application provides a cloud resource scheduling method. The method is performed by a cloud management platform. The cloud management platform is used to manage an infrastructure providing cloud services. The infrastructure includes a plurality of hosts. The method comprises: after receiving an instance creation request sent by a tenant, the cloud management platform acquires an available resource amount of resources that each host in the plurality of hosts can provide for an instance of a first instance type, and then selects a first host in the plurality of hosts that can meet a first instance specification based on the available resource amount, to obtain a target first host, and creates a first instance on the target first host. Wherein, the instance creation request carries a first instance type and a first instance specification of a first instance to be created. The first host can provide resources for instances of a plurality of instance types, and the available resource amount of the resources that the first host can provide for the instances of the plurality of instance types is calculated in different ways. The first host is any one of the plurality of hosts.

[0061] In the present application, since the first host can provide resources to instances of multiple instance types, and the calculation manner of the available resource amount of the resources provided by the first host to instances of multiple instance types is different, the available resource amount of the resources provided by the first host to instances of different instance types can be different. The present application provides a unified cloud resource scheduling manner in the case that the same host has instances of different instance types, but the calculation manner of the available resource amount of the resources provided by the same host to instances of different instance types is different. In this way, when scheduling the resources for creating instances, the available resource amount of the resources provided by the same host to instances of different instance types is filtered, and the resources are scheduled for the first instance according to the first instance type of the first instance to be created, which realizes the classified management of the resources provided by the same host to instances of different instance types, can overcome the conflict in the resource scheduling for instances of different instance types, solves the problem of dynamic scheduling of the resources used by multiple instance types of instances deployed in the same host, can support the dynamic scheduling of the resources used by multiple instance types of instances deployed in the same host, and effectively improves the resource utilization of the host.

[0062] The technical solutions of the present application are described in detail from the aspects of implementation scenarios, method flows, hardware devices, software devices, and the like.

[0063] The implementation scenario of the embodiments of the present application is described below.

[0064] FIG. 1 is a structural schematic diagram of an implementation scenario involved in a cloud resource scheduling method provided by an embodiment of the present application. As shown in FIG. 1, the implementation scenario includes a data center 1 and a client 2. The data center 1 and the client 2 can establish a communication connection through a network. Optionally, the network can be the Internet, or other networks, which are not limited by the embodiments of the present application. A tenant can interact with the data center 1 through the client 2. For example, the tenant can send cloud service request information and the like to the data center 1 through the client 2. The data center 1 is used to respond based on the information sent by the client 2.

[0065] A large amount of infrastructure owned by a cloud service provider, such as computing resources, storage resources, and network resources, is deployed in the data center 1. For example, the computing resources can be computing devices (such as servers and the like) capable of providing computing power. As shown in FIG. 1, the data center 1 includes a cloud management platform and infrastructure (not shown in FIG. 1). The cloud management platform and the infrastructure are connected through an intra-data-center network. The cloud management platform is configured to manage the infrastructure. The infrastructure is configured to provide public cloud services. The infrastructure includes a plurality of servers. Cloud services can be optionally deployed in the servers. The cloud services are implemented by running virtual instances, and thus are also referred to as virtual instance deployments for implementing tenant businesses in the servers. A tenant can send a cloud service request and related information to the servers through a client 2 used by the tenant, the servers can process the cloud service request and related information, and the servers can provide cloud services to the tenant based on the processed cloud service request and related information. For example, the cloud management platform can receive an instance creation request sent by a tenant to request to create a first instance, can obtain an available resource amount of resources that each host in a plurality of hosts can provide to a first instance belonging to a first instance type, and can select a target first host from the plurality of hosts, where an available resource amount of the target first host can satisfy a specification of the first instance, and then create the first instance on the target first host, by using a cloud resource scheduling method provided by an embodiment of the present application.

[0066] The cloud management platform can be logically divided into a tenant console, a computing management service, a network management service, a storage management service, an authentication service, and an image management service. The tenant console provides an interface or an application programming interface (API) to interact with a tenant. The computing management service is configured to manage servers running virtual instances and bare-metal servers. The network management service is configured to manage network services (such as gateways, firewalls, and the like). The storage management service is configured to manage storage services (such as data bucket services). The authentication service is configured to manage accounts and passwords of tenants. The image management service is configured to manage images of virtual instances.

[0067] In the implementation scenario shown in FIG. 1, a plurality of servers are provided in one data center. The servers include a hardware layer and a software layer. The hardware layer is a conventional configuration of the servers. The hardware layer is deployed with hardware devices such as processors, memories, network cards, disks, and buses. The software layer includes an operating system installed and running on the servers. The operating system of a virtual machine can be referred to as a host operating system. A virtual machine manager (also referred to as a Hypervisor) runs in the host operating system. The virtual machine manager is configured to implement computing virtualization, network virtualization, and storage virtualization of virtual machines, and is responsible for managing the virtual machines.

[0068] The cloud management platform client can receive the control plane command sent by the cloud management platform, create a virtual instance on the server according to the control plane control command, and perform full life cycle management on the virtual instance. For example, the cloud management platform client can detect the use of hardware resources of the server in real time and report to the cloud management platform. When the cloud management platform confirms to create a virtual instance on a server, it will send a virtual instance creation command to the cloud management platform client on the server, and the cloud management platform client will create a virtual instance on the server after receiving the command. In this way, tenants can create, manage, log in and operate virtual instances in the data center through the cloud management platform.

[0069] The server can be used to run virtual machines of different specifications. Virtual machine specifications include general computing, memory optimization, and super memory, etc. Each type has specific specifications. After the tenant selects a virtual machine specification, the cloud management platform selects a server in the data center that supports the specification and determines that the server has sufficient idle hardware resources, and then creates a virtual machine with the specification on the server. By configuring the server through the cloud management platform, the analysis and planning of the server hardware resources can be realized, and the corresponding computing products of the physical hardware can be planned according to the hardware performance of the server, such as planning virtual machines of different specifications to meet the differentiated demands of different tenants. Moreover, according to the performance difference of virtual machines of different specifications, a differentiated pricing strategy can be implemented. For example, virtual instances of high-performance specifications are sold at a higher price, and virtual instances of ordinary performance specifications are sold at a lower price, so that tenants can purchase virtual instances on demand.

[0070] In an implementation, as shown in FIG. 2, the location of the underlying resources in the data center can be described by cloud resource deployment regions and availability zones (AZs). A tenant can choose to deploy a cloud service based on resources in a specific region and AZ. A region is divided from the dimensions of geographical location and network latency. The same resource pool is used within the same region, which can be understood as sharing public services such as elastic computing, block storage, object storage, virtual private cloud (VPC) network, elastic internet protocol (EIP) address, and image. A region is divided into general regions and dedicated regions. A general region refers to a region that provides general cloud services to public tenants. A dedicated region refers to a region that carries the same type of business or provides business services to specific tenants. A region usually includes multiple AZs. Multiple AZs in a region are connected by high-speed optical fibers to meet the needs of tenants to build high-availability systems across AZs. An AZ is a collection of one or more data centers shown in FIG. 2. The resources such as computing, network, and storage within an AZ are logically divided into multiple clusters.

[0071] A tenant can send instructions to the cloud management platform through a client 2 used by the tenant to create, manage, log in to, and operate virtual instances in a server, and use cloud services provided by the virtual instances. For example, the cloud management platform can provide an access interface. The access interface can be provided in the form of an interface or an API. A tenant can remotely access the access interface to register a cloud account and a password with the cloud management platform and log in to the cloud management platform using the cloud account and the password. The cloud management platform can also authenticate the cloud account and the password. After successful authentication, the tenant can further select and pay for a virtual instance of a specific specification (processor, memory, disk) in the cloud management platform. After the tenant successfully pays for the virtual instance, the cloud management platform provides the tenant with a remote login account and a password for the purchased virtual instance. The tenant can use the remote login account and the password to remotely log in to the virtual instance, install and run an application of the tenant in the virtual instance, and implement the business of the tenant through the application.

[0072] The client 2 can be a computer, a personal computer, a laptop computer, a mobile phone, a smartphone, a tablet computer, a cloud host, a portable mobile terminal, a multimedia player, an electronic book reader, a wearable device, a smart home appliance, an artificial intelligence device, a smart wearable device, a smart vehicle device, or an Internet of Things device, etc.

[0073] In an implementation manner, the cloud resource scheduling method provided by the embodiment of the present application can be implemented by running an executable program on a computing device in the data center 1. Optionally, the cloud resource scheduling method provided by the embodiment of the present application can be applied to a cloud service management system. The cloud service management system is deployed in a server managed by a cloud management platform. The cloud service management system can implement the cloud resource scheduling method provided by the embodiment of the present application by running an executable program of the cloud resource scheduling method. In addition, the executable program implementing the cloud resource scheduling method can be presented in the form of an application installation package. After the server installs the application installation package, the cloud resource scheduling method provided by the embodiment of the present application can be implemented by running the executable program in the application installation package.

[0074] It should be understood that the above is an exemplary description of the implementation scenario of the cloud resource scheduling method provided by the embodiment of the present application, and does not constitute a limitation on the implementation scenario of the cloud resource scheduling method. It can be known by those skilled in the art that the implementation scenario can be adjusted according to application requirements as the business requirements change, and the embodiment of the present application does not make a specific limitation. In addition, when the cloud resource scheduling method provided by the embodiment of the present application is applied to other scenarios, the executable program of the method can also be presented in the form of an application installation package or in other ways, and the embodiment of the present application does not make a one-by-one enumeration.

[0075] The implementation process of the method will be described below by taking the cloud resource scheduling method provided by the embodiment of the present application applied to the cloud management platform as an example. FIG. 3 is a flowchart of the cloud resource scheduling method provided by the embodiment of the present application. As shown in FIG. 3, the cloud resource scheduling method includes the following steps:

[0076] In step 301, the cloud management platform receives an instance creation request sent by a tenant, and the instance creation request carries a first instance type and a first instance specification of a first instance to be created.

[0077] When a tenant needs to create an instance based on the cloud management platform managed infrastructure, the tenant can perform a specified operation on a client used by the tenant to trigger an instance creation request, so that the cloud management platform creates an instance for the tenant under the indication of the instance creation request. In a possible implementation, the cloud management platform can provide an instance creation interface to the tenant, and the tenant can trigger an instance creation request based on the instance creation interface. Since the cloud management platform can create instances of multiple instance types for the tenant, when the tenant triggers an instance creation request, the tenant not only needs to select the instance specification of the instance to be created, but also needs to select the instance type of the instance to be created. In this way, the instance creation request carries the first instance type and the first instance specification of the first instance to be created. After the tenant triggers the instance creation request, the cloud management platform can obtain the instance creation request through the instance creation interface, and obtain the first instance type and the first instance specification of the first instance to be created from the instance creation request.

[0078] Different instance types can be selected as virtual machines, containers, bare metal servers, or other types of instances, and the instance type can further subdivide instances of the same type into multiple subtypes. The multiple subtypes of instances can be selected as instances with different priorities. For example, the priority of an instance mainly reflects the priority of the resources provided by the host used by the instance. When the priority of the instance is high, the resources provided by the host can be used preferentially. It should be noted that the above manner of dividing the types of cloud instances is only an example, and the present application can also divide different types of cloud instances in other manners. For example, the multiple subtypes of instances can also be divided according to their capabilities. For example, the multiple subtypes of instances can be selected as general computing instances, memory-optimized instances, and large memory instances, and embodiments of the present application do not make redundant descriptions.

[0079] In a possible implementation, the instance creation interface is implemented through one or more of the following: an application programming interface (application programming interface, API), an interaction template, and a configuration interface. The interaction template is a template provided by the cloud management platform to the tenant for implementing different functions. When the tenant needs to use a certain function, the tenant can download a template for implementing the function, add relevant information of the tenant in the template, and then feed back the template with the tenant's relevant information to the cloud management platform. After receiving the template with the tenant's relevant information, the cloud management platform can obtain the function that the template needs to implement, and customize the implementation of the function according to the information of the tenant. The configuration interface refers to an interface that the tenant can operate in to indicate the function that the tenant needs to implement.

[0080] In step 302, the cloud management platform obtains the available resource amount of resources that each host in the plurality of hosts can provide to instances of the first instance type, wherein the first host can provide resources to instances of a plurality of instance types, and the available resource amount of resources that the first host can provide to instances of the plurality of instance types is calculated in different manners, and the first host is any one of the plurality of hosts.

[0081] The cloud management platform obtaining the available resource amount of resources that each host in the plurality of hosts can provide to instances of the first instance type is equivalent to obtaining a resource hierarchical profile of the available resource amount of resources that each host can provide to instances of the first instance type. The cloud management platform obtaining the available resource amount of resources that each host in the plurality of hosts can provide to instances of the first instance type includes at least the following two cases.

[0082] In a first case, the cloud management platform queries the available resource amount of resources that each host in the plurality of hosts can provide to instances of the first instance type from the available resource amount of resources that each host in the plurality of hosts can provide to instances of a plurality of instance types that has been calculated. For example, in the first case, the cloud management platform periodically calculates the available resource amount of resources that each host in the plurality of hosts can provide to instances of a plurality of instance types during the running of the host, obtains the calculation result of the available resource amount, and queries the available resource amount of resources that each host in the plurality of hosts can provide to instances of the first instance type from the calculation result obtained most recently before receiving the instance creation request. For example, as shown in FIG. 4, after receiving the instance creation request, the cloud management platform first determines the first instance type of the first instance indicated by the instance creation request. Then, when the first instance type indicates that the first instance is a container, the cloud management platform queries the available resource amount of resources that each host in the plurality of hosts can provide to the container from the calculation result obtained most recently before receiving the instance creation request. When the first instance type indicates that the first instance is a virtual machine with high priority to use resources provided by the host (referred to as a high-priority virtual machine), the cloud management platform queries the available resource amount of resources that each host in the plurality of hosts can provide to the high-priority virtual machine from the calculation result obtained most recently before receiving the instance creation request. When the first instance type indicates that the first instance is a virtual machine with low priority to use resources provided by the host (referred to as a low-priority virtual machine), the cloud management platform queries the available resource amount of resources that each host in the plurality of hosts can provide to the low-priority virtual machine from the calculation result obtained most recently before receiving the instance creation request.

[0083] In the second case, the cloud management platform calculates the available resource amount of the resource that each host in the plurality of hosts can provide to the instance of the first instance type in real time. In the second case, the cloud management platform calculates the available resource amount of the resource that each host in the plurality of hosts can provide to the instance of the plurality of instance types in real time after receiving the instance creation request.

[0084] The two cases mainly differ in the time when the available resource amount of the resource that each host in the plurality of hosts can provide to the instance of the plurality of instance types is calculated, and the calculation principle is basically the same. The calculation principle is described below by way of example.

[0085] Suppose that the instance of the plurality of instance types includes a first instance, a second instance, and a third instance. The priority of the first instance and the second instance to use the resource provided by the host is higher than the priority of the third instance to use the resource provided by the host. In a possible implementation, the available resource amount of the resource that the host can provide to the first instance, the second instance, and the third instance is calculated in the following manner: the available resource amount of the resource that the first host can provide to the first instance and the second instance is calculated based on the total amount of the resource that the first host can provide to the instance and the instance specification of the first instance and the second instance that have been deployed in the first host; and the available resource amount of the resource that the first host can provide to the third instance is calculated based on the total amount of the resource that the first host can provide to the instance and the total amount of the resource actually used by the first instance, the second instance, and the third instance that have been deployed in the first host.

[0086] In the calculation manner, since the priority of the first type of instance and the second type of instance to use the resource provided by the host is higher than the priority of the third type of instance to use the resource provided by the host, when scheduling the resource for the first type of instance, the second type of instance and the third type of instance, the resource use demand of the first type of instance and the second type of instance needs to be satisfied first. Therefore, when calculating the available resource amount of the resource that the first host can provide for the first type of instance and the second type of instance, the calculation is based on the instance specification of the first type of instance and the second type of instance that have been deployed in the first host. In this way, the cloud management platform can reserve the resource for the first type of instance according to the instance specification of the first type of instance, so as to guarantee the QOS of the first type of instance in the business peak, and reserve the resource for the second type of instance according to the instance specification of the second type of instance, so as to guarantee the QOS of the second type of instance in the business peak. When calculating the available resource amount of the resource that the first host can provide for the third type of instance, considering that the priority of the third type of instance to use the resource provided by the host is lower, the third type of instance can be migrated to other host in the case of resource competition, and for the purpose of guaranteeing the resource utilization rate of the host as much as possible, the calculation is based on the total amount of the resource actually used by the first type of instance, the second type of instance and the third type of instance that have been deployed in the first host, instead of based on the instance specification of the first type of instance, the second type of instance and the third type of instance that have been deployed in the first host.

[0087] For example, in the case that the priority of the first type of instance and the second type of instance to use the resource provided by the host is higher than the priority of the third type of instance to use the resource provided by the host, and the priority of the first type of instance and the second type of instance to use the resource provided by the host is equal, the available resource amount of the resource that the first host can provide for the first type of instance and the second type of instance is equal to the total amount of the resource that the first host can provide for the instance minus the instance specification of the first type of instance and the second type of instance that have been deployed in the first host; the available resource amount of the resource that the first host can provide for the third type of instance is equal to the total amount of the resource that the first host can provide for the instance minus the total amount of the resource actually used by the first type of instance, the second type of instance and the third type of instance that have been deployed in the first host.

[0088] For example, in a case where the host supports providing resources to virtual machines and containers, the virtual machines are further divided into virtual machines with high priority to use the resources provided by the host and virtual machines with low priority to use the resources provided by the host, and the containers have a priority to use the resources provided by the host equal to the virtual machines with high priority. The first host can provide resources to the virtual machines with high priority and the containers with available resource amount equal to the total amount of resources that the first host can provide to instances minus the instance specifications of the virtual machines with high priority and the containers that have been deployed in the first host to use the resources provided by the host. The first host can provide resources to the virtual machines with low priority with available resource amount equal to the total amount of resources that the first host can provide to instances minus the total amount of resources actually used by all the virtual machines and the containers that have been deployed in the first host.

[0089] Based on the logic above for calculating the available resource amount that the first host can provide to instances of a specified instance type, in order to migrate instances with lower priority to use resources provided by the host to other hosts when resource competition occurs, and for the purpose of ensuring resource utilization of the host as much as possible, the implementation of the calculation of the available resource amount can be further extended to a scenario where the first host provides resources to instances of more instance types. At this time, when calculating the available resource amount that the first host can provide to instances of the instance type with the highest priority to use resources provided by the host among the multiple instance types, the calculation is based on the total amount of resources that the first host can provide to instances, and the instance specification of the instances with the highest priority to use resources provided by the host that have been deployed in the first host. When calculating the available resource amount that the first host can provide to instances of the instance type with intermediate priority to use resources provided by the host among the multiple instance types, the calculation is based on the total amount of resources that the first host can provide to instances, the instance specification of the instances with the same priority to use resources provided by the host that have been deployed in the first host, and the total amount of resources actually used by the instances with higher priority to use resources provided by the host that have been deployed in the first host. When calculating the available resource amount that the first host can provide to instances of the instance type with the lowest priority to use resources provided by the host among the multiple instance types, the calculation is based on the total amount of resources that the first host can provide to instances, and the total amount of resources actually used by all the instances that have been deployed in the first host.

[0090] For example, assume that the instances of the multiple instance types include: the first type of instance, the second type of instance, the third type of instance, the fourth type of instance, and the fifth type of instance. The priority of the first type of instance and the second type of instance to use the resources provided by the host is higher than the priority of the fourth type of instance and the fifth type of instance to use the resources provided by the host, the priority of the fourth type of instance and the fifth type of instance to use the resources provided by the host is higher than the priority of the third type of instance to use the resources provided by the host, the priority of the first type of instance and the second type of instance to use the resources provided by the host is equal, and the priority of the fourth type of instance and the fifth type of instance to use the resources provided by the host is equal. Then, the available resource amount of the resources that the first host can provide to the first type of instance and the second type of instance is equal to the total amount of the resources that the first host can provide to the instances minus the instance specifications of the first type of instance and the second type of instance that have been deployed in the first host; the available resource amount of the resources that the first host can provide to the fourth type of instance and the fifth type of instance is equal to the total amount of the resources that the first host can provide to the instances minus the instance specifications of the fourth type of instance and the fifth type of instance that have been deployed in the first host and the total amount of the resources actually used by the first type of instance and the second type of instance that have been deployed in the first host; and the available resource amount of the resources that the first host can provide to the third type of instance is equal to the total amount of the resources that the first host can provide to the instances minus the total amount of the resources actually used by the first type of instance, the second type of instance, the fourth type of instance, the fifth type of instance, and the third type of instance that have been deployed in the first host.

[0091] The total amount of resources that the first host can provide to the instance is based on the specification of the hardware resource of the first host and the oversubscription multiple. For example, the total amount of resources that the first host can provide based on a certain hardware is equal to the product of the specification of the hardware and the oversubscription multiple. The total amount of resources actually used by the instance can be obtained based on the running performance data of the instance. For example, when the cloud management platform needs to calculate the available resource amount of resources that the first host can provide to instances of multiple instance types, the cloud management platform can obtain the running performance data of the instance deployed in the first host within a specified time length, and obtain the total amount of resources actually used by the instance based on the running performance data of any instance within the specified time length. In a possible implementation, the running performance data can reflect the utilization rate of any resource required by the instance, and based on the utilization rate and the instance specification of the instance for the any resource, the total amount of the any resource actually used by the instance can be obtained. For example, the total amount of the any resource actually used by the instance can be equal to the product of the utilization rate of the any resource required by the instance and the instance specification of the instance for the any resource. The running performance data of the instance using the any resource within the specified time length includes the running performance data collected at multiple time points within the specified time length, and the cloud management platform processes the running performance data collected at the multiple time points to obtain the overall running performance data reflecting the use of the any resource by the instance within the specified time length, and then obtains the utilization rate of the any resource according to the overall running performance data. Alternatively, the overall running performance data of the instance using the any resource within the specified time length can be equal to a specified percentage of the mean value or the maximum value of the running performance data collected at the multiple time points within the specified time length. The implementation of obtaining the utilization rate of the resource based on the running performance data is currently relatively mature, and thus is not described in detail herein. It should be noted that in the case where the container runs in the virtual machine, when calculating the total amount of resources actually used by the container, the total amount of resources actually used by the virtual machine is usually calculated in the unit of the whole virtual machine running multiple containers. The total amount of resources actually used by the virtual machine is calculated according to the sum of the total amount of resources used by all containers in the virtual machine. The running performance data is data used to indicate the running performance of the virtual instance. For example, the running performance data includes the processor utilization rate, the memory usage rate, the disk read rate, and the network transmission rate, and the like.

[0092] Further, in the case that the cloud management platform implements the same manner to schedule resources to the second type of instance and the third type of instance, and implements a different manner to schedule resources to the first type of instance, the available resource amount of the resources that the first host can provide to the first type of instance can be alternatively calculated based on the total amount of resources actually used by the third type of instance deployed in the first host. For example, assuming that the first type of instance is a container, the second type of instance is a virtual machine with high priority to use the resources provided by the host, and the third type of instance is a virtual machine with low priority to use the resources provided by the host. Then, the available resource amount of the resources that the first host can provide to the first type of instance is equal to the total amount of resources that the first host can provide to the instances minus the total amount of resources actually used by the second type of instance, the instance specification of the first type of instance, and the third type of instance deployed in the first host. The available resource amount of the resources that the first host can provide to the second type of instance is equal to the total amount of resources that the first host can provide to the instances minus the instance specifications of the first type of instance and the second type of instance deployed in the first host. The available resource amount of the resources that the first host can provide to the third type of instance is equal to the total amount of resources that the first host can provide to the instances minus the total amount of resources actually used by all virtual machines and containers deployed in the first host. Similarly, when the first host can provide resources to more types of instances, and the cloud management platform implements different manners to provide resources to instances of different types of instances, the calculation manner of the available resource amount of the resources that the first host can provide to the instances can be correspondingly referred to the foregoing description, which will not be described herein.

[0093] In step 303, the cloud management platform selects a first host with an available resource amount capable of satisfying the first instance specification from the plurality of hosts, to obtain a target first host.

[0094] After the cloud management platform obtains the available resource amount of the resources that each host in the plurality of hosts can provide to the instances of the first instance type, the cloud management platform can compare the first instance specification with the available resource amount of the resources that each host can provide to the instances of the first instance type. When the available resource amount of the resources that the target first host can provide to the instances of the first instance type is greater than or equal to the first instance specification, it is determined that the available resource amount of the target first host can satisfy the first instance specification. The first instance specification can indicate the specification of one or more types of resources. At this time, the available resource amount of the resources that the target first host can provide to the instances of the first instance type also indicates the available resource amount of one or more types of resources in a one-to-one correspondence. When the available resource amount of the one or more types of resources that the target first host can provide to the instances of the first instance type satisfies the greater than or equal to relationship with the specification of the one or more types of resources indicated by the first instance specification in a one-to-one correspondence, it is determined that the available resource amount of the target first host can satisfy the first instance specification.

[0095] Step 304, the cloud management platform creates the first instance on the target first host.

[0096] When the cloud management platform creates the first instance on the target first host, it needs to first determine the hardware devices in the target first host for providing the first instance with various virtual hardware required by the first instance, then performs device simulation on the hardware devices to obtain virtual hardware available for the first instance, and then creates the first instance based on the virtual hardware. For example, the cloud management platform first determines a processor core (also referred to as a physical processor core) for providing the first instance with a microprocessor core, then performs device simulation on the processor core to obtain a microprocessor core available for the first instance, and then creates the first instance based on the microprocessor core. When the cloud management platform determines the hardware devices in the target first host for providing the first instance with various virtual hardware required by the first instance, it needs to first select a selectable range of hardware devices capable of providing the first instance with various virtual hardware required by the first instance, and then determine the hardware devices in the target first host for providing the first instance with various virtual hardware required by the first instance. The implementation process of the cloud management platform for creating the first instance on the target first host is described below by taking the determination of a processor core for providing the first instance with a microprocessor core as an example. The implementation of the determination of hardware devices in the target first host for providing the first instance with other virtual hardware required by the first instance is described below by referring to the implementation of the determination of a processor core for providing the first instance with a microprocessor core, and will not be described herein.

[0097] As shown in FIG. 5, the implementation process of the cloud management platform for creating the first instance on the target first host includes the following steps 3041 and 3042.

[0098] Step 3041, the cloud management platform determines a first core binding range of the first instance in the target first host based on the first instance type. The calculation manner of the core binding range of the instances of the plurality of instance types in the first host is different, and the core binding range is used to indicate the processor core in the first host for providing the first instance with a microprocessor core.

[0099] The cloud management platform determines the first core binding range of the first instance in the target first host, which is equivalent to obtaining a selectable range of processor cores for providing the first instance with a microprocessor core. When the calculation manner of the core binding range of the instances of the plurality of instance types in the first host is different, the core binding range of the instances of different instance types is different, so that dynamic isolation of the resources provided for the instances of different instance types can be achieved, and the instances of different instance types can be managed in isolation.

[0100] The cloud management platform determines the first binding core range of the first instance, including at least the following two cases: in a first case, the cloud management platform queries the binding core range of the target first host for the first instance type from the calculated binding core range of each host in the plurality of hosts for the instances of the plurality of instance types; in a second case, the cloud management platform calculates the binding core range of the target first host for the first instance type in real time. In the first case, the cloud management platform periodically calculates the binding core range of each host in the plurality of hosts for the instances of the plurality of instance types during the running of the host, obtains the calculation result of the binding core range, and queries the binding core range of the target first host for the first instance type from the calculation result obtained most recently before the determination of the creation of the first instance in the target first host. In the second case, the cloud management platform calculates the binding core range of the target first host for the first instance type in real time after the determination of the creation of the first instance in the target first host. The two cases mainly differ in the timing of calculating the binding core range of the target first host for the first instance type, and the calculation principles are basically the same. The calculation principles are described below by way of example.

[0101] It is assumed that the instances of the plurality of instance types include a first instance, a second instance, and a third instance. The priority of the first instance and the second instance to use the resources provided by the host is higher than the priority of the third instance to use the resources provided by the host. In a possible implementation, the binding core range of the first instance in the first host includes the processor cores selected from all the available processor cores of the first host, and the number of the processor cores is equal to the number of microprocessor cores indicated by the instance specification of the first instance. The binding core range of the second instance in the first host includes the available processor cores of the target first host except the processor cores providing microprocessor cores for the first instance. The binding core range of the third instance in the first host includes all the available processor cores of the target first host.

[0102] In this implementation, the priority of the first type of instance using the resources provided by the host is higher than the priority of the second type of instance using the resources provided by the host, and therefore the calculation manner can reflect the principle that the binding core range of the first type of instance is preferentially guaranteed, then the binding core range of the second type of instance is guaranteed, and finally the binding core range of the third type of instance is guaranteed. For example, the first type of instance is a container, the second type of instance is a virtual machine with high priority of using the resources provided by the host, and the third type of instance is a virtual machine with low priority of using the resources provided by the host, and the binding core range of the container in the first host includes: processor cores selected from all available processor cores of the target first host, and the number of the processor cores is equal to the number of microprocessor cores indicated by the specification of the container. The binding core range of the virtual machine with high priority of using the resources provided by the host in the first host includes: available processor cores of all available processor cores of the target first host except the processor cores providing microprocessor cores to the container. The binding core range of the virtual machine with low priority of using the resources provided by the host in the first host includes: all available processor cores of the target first host.

[0103] Similarly, in the case where the priority of the first type of instance using the resources provided by the host is lower than the priority of the second type of instance using the resources provided by the host, the binding core range of the second type of instance in the first host includes: processor cores selected from all available processor cores of the first host, and the number of the processor cores is equal to the number of microprocessor cores indicated by the instance specification of the second type of instance. The binding core range of the first type of instance in the first host includes: available processor cores of all available processor cores of the target first host except the processor cores providing microprocessor cores to the second type of instance. The binding core range of the third type of instance in the first host includes: all available processor cores of the target first host. At this time, it is equivalent to preferentially guaranteeing the binding core range of the second type of instance, then guaranteeing the binding core range of the first type of instance, and finally guaranteeing the binding core range of the third type of instance. When the cloud management platform schedules cloud resources, the binding core range of the first type of instance can be preferentially guaranteed, or the binding core range of the second type of instance can be preferentially guaranteed according to application requirements, which is not limited in the embodiments of the present application. Moreover, the above-mentioned logic of determining the binding core range of the instance has reflected the influence of the three priorities of using the resources provided by the host on the binding core range, and therefore the logic of determining the binding core range can also be applied to the scenario of determining the binding core range of more types of instances using the resources provided by the host, and the implementation manner thereof can be correspondingly referred to the above description, which is not described herein.

[0104] Further, in the case of giving priority to the binding core range of the first type of instance, the binding core range of the first type of instance in the target first host includes: the number of microprocessor cores selected from all available processor cores of the target first host is equal to the number of microprocessor cores indicated by the specification of the first type of instance, and the available processor cores that are not used up by the oversubscription resources. In this way, the processor cores providing microprocessor cores for the first type of instance are the used processor cores in the target first host. And / or, the binding core range of the first type of instance in the target first host includes: the number of microprocessor cores selected from all available processor cores of the target first host is equal to the number of microprocessor cores indicated by the specification of the first type of instance, and the available processor cores that are not used up by the oversubscription resources and the available processor cores adjacent to them. In this way, the processor cores providing microprocessor cores for the first type of instance are the used processor cores in the target first host and the available processor cores adjacent to them. In the architecture of the processor, the processor includes a plurality of processor cores, and the plurality of processor cores are correspondingly configured with a plurality of memory segments. The memory segment configured for a processor core is the memory segment closest to the processor core in position among the plurality of memory segments. The plurality of memory segments are shared by the plurality of processor cores, and when the plurality of processor cores write to the memory, they will sequentially perform continuous writing to the plurality of memory segments. For example, it is assumed that the processor includes four processor cores, which are sequentially arranged as processor core 1, processor core 2, processor core 3, and processor core 4. The four processor cores are correspondingly configured with four memory segments, which are sequentially arranged as memory segment 1, memory segment 2, memory segment 3, and memory segment 4. The memory segment configured for any processor core is the memory segment closest to the processor core in position among the four memory segments. When the processor cores providing microprocessor cores for the first type of instance are the available processor cores that are not used up by the oversubscription resources in the target first host, and / or the available processor cores that are not used up by the oversubscription resources and the available processor cores adjacent to them in the target first host, the processor core 1, the processor core 2, the processor core 3, and the processor core 4 will be sequentially determined as the binding cores, and when the processor core 1, the processor core 2, the processor core 3, and the processor core 4 write to the memory, they will sequentially write to the memory segment 1, the memory segment 2, the memory segment 3, and the memory segment 4. In this way, for any one of the processor core 1, the processor core 2, the processor core 3, and the processor core 4, it can have a greater probability of writing data to the memory segment closest to it, reducing the need for the processor core to jump to read data in multiple memory segments when reading data, which helps to ensure the memory access performance of the processor resources, and further ensures the running performance of the instances using the processor resources. The above is an example of the target first host to describe the implementation manner of determining the binding core range of the instances of multiple instance types in the first host. The implementation manner of determining the binding core range of the instances of multiple instance types in other hosts is described above, and will not be described here.

[0105] At step 3042, the cloud management platform device-emulates the processor cores in the first binding core range to obtain microprocessor cores available for the first instance, and creates the first instance based on the microprocessor cores.

[0106] After determining the first binding core range of the first instance in the target first host, the cloud management platform can device-emulate the processor cores in the first binding core range to obtain microprocessor cores available for the first instance, and create the first instance conforming to the first instance specification based on the microprocessor cores. The specification of the created first instance conforms to the first instance specification, which means that when the first instance specification indicates multiple parameters (such as computing power, display memory size, display memory bit width, and display memory bandwidth) of the resources used by the first instance, the resources available for the created first instance also have multiple parameters corresponding to the multiple parameters indicated by the first instance specification, and any one of the multiple parameters of the resources available for the created first instance is equal to or slightly greater than the corresponding parameter of the multiple parameters indicated by the first instance specification.

[0107] For example, as shown in FIG. 4, after obtaining the available resource amount of the resources that each host in the plurality of hosts can provide for the first instance, the cloud management platform selects a target first host in which the available resource amount can meet the first instance specification, then determines the first binding core range of the first instance in the target first host, device-emulates the processor cores in the first binding core range to obtain microprocessor cores available for the first instance, and creates the first instance based on the microprocessor cores. Moreover, as shown in FIG. 6, when creating the first instance, if the first instance is a container, the K8S scheduler container scheduling logic can be used to deploy the container into a virtual machine, and then the kubelet can be invoked to create the container in the virtual machine, and if the first instance is a virtual machine, the virtual machine scheduler virtual machine scheduling logic can be used to invoke the virtual machine agent to create the virtual machine in the virtual machine. Meanwhile, when the first instance is the first type of instance, because the occupation of the processor cores by the first type of instance will affect the binding core range of the second type of instance, after creating the first type of instance, the binding core range of the second type of instance also needs to be updated. For example, as shown in FIG. 4, the processor cores occupied by the container are excluded from the binding core range of the high-priority virtual machine.

[0108] Optionally, after completing the creation of the instance, the cloud management platform also needs to schedule resources for the instance during the running of the instance. As shown in FIG. 7, the cloud resource scheduling method provided by the embodiments of the present application further includes steps 305 and 306.

[0109] At step 305, the cloud management platform obtains running performance data of a plurality of instances deployed in a plurality of hosts.

[0110] In the running process of the instance, the cloud management platform can acquire the running performance data of the instance, so as to evaluate the running performance of the instance based on the running performance data. There are various implementation manners for the cloud management platform to acquire the running performance data of the instance. For example, as shown in FIG. 6, the QOS agent is deployed in the host and the virtual machine in which the container is deployed, the QOS agent deployed in the host acquires the running data of the virtual machine, and after the QOS agent deployed in the virtual machine in which the container is deployed acquires the running performance data of the container, the acquired running performance data is provided to the cloud management platform (as shown by the dashed arrow in FIG. 6). The running performance data is data for indicating the running performance of the virtual instance. For example, the running performance data includes processor utilization, memory usage, disk read rate, network transmission rate, and the like.

[0111] In step 306, in the case that the running performance data of the second instance indicates that the quality of service of the second instance deteriorates, the cloud management platform migrates a third instance in the second host in which the second instance is located to a third host, and provides the cloud resources released by the third instance in the second host to the second instance for use. The second instance is one of the plurality of instances deployed in the plurality of hosts, and the third instance is an instance with the lowest priority to use the resources provided by the host in the second host.

[0112] As shown in FIG. 8, after the cloud management platform acquires the running performance data of the plurality of instances deployed in the plurality of hosts managed thereby, it can judge whether the running performance of the second instance deteriorates based on the running performance data of the second instance, and in the case that the running performance data of the second instance indicates that the quality of service of the second instance deteriorates, migrates a third instance in the second host in which the second instance is located to a third host, and provides the cloud resources released by the third instance in the second host to the second instance for use. That is, in the case of resource competition, the third instance with a lower priority in the second host is migrated to another host, and the resources released by the migrated third instance are provided to the instance with a higher priority in the second host for use, so as to eliminate the resource hotspot and relieve the resource competition in the second host. In this way, it is equivalent to providing differentiated QOS guarantee capabilities for the instances with different priorities to use the resources provided by the second host, and preferentially guaranteeing that the instance with a higher priority is not disturbed. As shown in FIG. 6, when the first instance is migrated, if the first instance is a container, the first instance can be migrated to another host by the K8S scheduler, and if the first instance is a virtual machine, the first instance can be migrated to another host by the virtual machine scheduler.

[0113] In an implementation manner, the cloud resource scheduling method provided by the embodiment of the present application can be implemented through multiple functional modules. For example, as shown in FIG. 6, the cloud resource scheduling method can be implemented through the following multiple functional modules: a resource scheduling module and a QOS guarantee module. The resource scheduling module is used to schedule the resources provided by the host for the instance. For example, the steps 301 to 304 described above are executed by the resource scheduling module. The QOS guarantee module is used to guarantee the QOS performance of the instance. For example, the steps 305 and 306 described above are executed by the QOS guarantee module.

[0114] It should be noted that when the implementation manner of the cloud resource scheduling method provided by the present application is described herein, the mixed deployment scenario of virtual machines and containers is mainly taken as an example for introduction. For example, FIG. 6 is a scenario in which the traditional application virtual machine (traditional application VM) and the container of the cloud native application are mixedly deployed in the same host, and the container is deployed in the virtual machine (cloud native application VM). However, it does not exclude that the present application can also be applied to other scenarios. For example, the present application can also be extended to the mixed deployment scenario of dynamic oversubscription ratio computing power instances and fixed oversubscription ratio computing power instances, so as to effectively share and manage the host resources.

[0115] In summary, in the present application, since the first host can provide resources to instances of multiple instance types, and the calculation manner of the available resource amount of the resources provided by the first host to instances of multiple instance types is different, the available resource amount of the resources provided by the first host to instances of different instance types can be different. The present application is equivalent to providing a set of unified cloud resource scheduling manner in the case that the same host has the ability to deploy instances of different instance types, but the calculation manner of the available resource amount of the resources provided by the same host to instances of different instance types is different. In this way, when the resources for creating instances are scheduled, it is equivalent to screening the available resource amount of the resources provided by the same host to instances of different instance types, and scheduling resources for the first instance according to the first instance type of the first instance to be created, which realizes the classified management of the resources provided by the same host to instances of different instance types, can overcome the conflict of resource scheduling for instances of different instance types, solves the problem of dynamic scheduling of the resources used by multiple instance types of instances deployed in the same host, can support the dynamic scheduling of the resources used by multiple instance types of instances deployed in the same host, and effectively improves the resource utilization rate of the host. For example, by classifying the management of the resources provided by the same host to instances of different instance types, it is not necessary to determine the priority of the virtual machine in which the container is deployed, and the dynamic scheduling priority conflict problem of the container running in the virtual machine architecture in the actual deployment scenario is solved. Similarly, the conflict problem of being unable to determine the priority due to the different priorities of the multiple Hadoop job processes and other agile applications internally deployed in the cloud native application virtual machine when the cloud native application virtual machine is deployed in the same host can also be solved.

[0116] In addition, in the scheduling scheme in the related art, dynamic scheduling of the virtual machine only supports host group granularity, resulting in poor flexibility of host resource usage. The application reduces the requirement of dynamic scheduling scenario on host group granularity and improves the flexibility of host resource usage by reducing the dynamic scheduling granularity from host group isolation to co-host.

[0117] It should be noted that the order of the steps of the cloud resource scheduling method provided in the embodiments of the application can be appropriately adjusted, and the steps can be increased or decreased as appropriate. Any person skilled in the art can easily think of changes within the scope of the technology disclosed in the application, which should be covered within the protection scope of the application, and therefore will not be described again.

[0118] The virtual device of the embodiments of the application is illustrated below.

[0119] The cloud resource scheduling method of the embodiments of the application is introduced above. Corresponding to the above method, the cloud resource scheduling device is also provided in the embodiments of the application. FIG. 9 is a structural schematic diagram of a cloud resource scheduling device provided in the embodiments of the application. Based on the following multiple components shown in FIG. 9, the cloud resource scheduling device shown in FIG. 9 can perform all or part of the operations shown in FIG. 3. It should be understood that the device can include more additional components than the shown components or omit part of the shown components, and the embodiments of the application do not limit this. Optionally, the cloud resource scheduling device can be deployed in a cloud management platform. The cloud management platform is used to manage the infrastructure providing cloud services. The infrastructure includes multiple hosts. As shown in FIG. 9, the cloud resource scheduling device 90 can include:

[0120] The interaction module 901 is configured to receive an instance creation request sent by a tenant, the instance creation request carrying a first instance type and a first instance specification of a first instance to be created.

[0121] The first acquisition module 902 is configured to acquire an available resource amount of resources that each host in the multiple hosts can provide to an instance of the first instance type, wherein the first host can provide resources to instances of multiple instance types, and the available resource amount of the resources that the first host can provide to the instances of the multiple instance types is calculated in different ways, and the first host is any one of the multiple hosts.

[0122] The first scheduling module 903 is configured to select a first host in the multiple hosts whose available resource amount can meet the first instance specification, to obtain a target first host.

[0123] The creation module 904 is configured to create the first instance on the target first host.

[0124] In a possible implementation, the instances of the plurality of instance types include: first-type instances, second-type instances, and third-type instances, the first-type instances and the second-type instances have higher priority than the third-type instances in using resources provided by the host; the available resource amount of the resources that the first host can provide to the first-type instances and the second-type instances is calculated based on the total amount of resources that the first host can provide to instances and the instance specifications of the first-type instances and the second-type instances that have been deployed in the first host, the total amount of resources that the first host can provide to instances is obtained based on the specifications of hardware resources of the first host and an oversubscription multiple; and the available resource amount of the resources that the first host can provide to the third-type instances is calculated based on the total amount of resources that the first host can provide to instances and the total amount of resources actually used by the first-type instances, the second-type instances, and the third-type instances that have been deployed in the first host.

[0125] In a possible implementation, the available resource amount of the resources that the first host can provide to the first-type instances is further calculated based on the total amount of resources actually used by the third-type instances that have been deployed in the first host.

[0126] In a possible implementation, the creating module 904 is specifically configured to: determine, based on a first instance type, a first core binding range of a first instance in a target first host, the core binding ranges of the instances of the plurality of instance types in the first host are calculated in different manners, and the core binding range is used to indicate a processor core of the first host that is used to provide a microprocessor core to the instance; perform device simulation on the processor cores in the first core binding range to obtain microprocessor cores available for the first instance, and create the first instance based on the microprocessor cores.

[0127] In a possible implementation, the instances of the plurality of instance types include: first-type instances, second-type instances, and third-type instances, the first-type instances and the second-type instances have higher priority than the third-type instances in using resources provided by the host. Then, the core binding range of the first-type instances in the first host includes: processor cores selected from all available processor cores of the first host, and the number of the processor cores is equal to the number of microprocessor cores indicated by the instance specification of the first-type instances; the core binding range of the second-type instances in the first host includes: available processor cores of all available processor cores of the first host except the processor cores that provide microprocessor cores to the first-type instances; and the core binding range of the third-type instances in the first host includes: all available processor cores of the first host.

[0128] In a possible implementation, the binding core range of the first type of instance in the first host comprises: a number of selected available processor cores in the first host equal to the number of microprocessor cores indicated by the instance specification of the first type of instance, and the available processor cores which are not used up by the oversubscription resources, and / or a number of selected available processor cores in the first host equal to the number of microprocessor cores indicated by the instance specification of the first type of instance, and the available processor cores which are not used up by the oversubscription resources and the available processor cores which are adjacently arranged with the available processor cores.

[0129] In a possible implementation, as shown in FIG. 10, the cloud resource scheduling apparatus 90 further comprises:

[0130] The second obtaining module 905 is configured to obtain running performance data of a plurality of instances deployed in a plurality of hosts.

[0131] The second scheduling module 906 is configured to, in a case where the running performance data of the second instance indicates that the quality of service of the second instance is deteriorating, migrate a third instance in a second host where the second instance is located to a third host, and provide cloud resources released by the third instance in the second host to the second instance for use, the second instance being one of the plurality of instances deployed in the plurality of hosts, and the third instance being an instance with the lowest priority of using resources provided by the second host.

[0132] Here, the detailed working processes of the interaction module 901, the first obtaining module 902, the first scheduling module 903, the creating module 904, the second obtaining module 905, and the second scheduling module 906 are described in the foregoing method embodiments, which will not be repeated here. For example, the interaction module 901 receives the instance creation request sent by the tenant by using the foregoing step 301. The first obtaining module 902 obtains the available resource amount of resources that each host in the plurality of hosts can provide to the instance of the first instance type by using the foregoing step 302. The first scheduling module 903 selects the first host in the plurality of hosts whose available resource amount can meet the first instance specification to obtain the target first host by using the foregoing step 303. The creating module 904 creates the first instance on the target first host by using the foregoing step 304. The second obtaining module 905 obtains the running performance data of the plurality of instances deployed in the plurality of hosts by using the foregoing step 305. The second scheduling module 906, in a case where the running performance data of the second instance indicates that the quality of service of the second instance is deteriorating, migrates the third instance in the second host where the second instance is located to the third host, and provides cloud resources released by the third instance in the second host to the second instance for use by using the foregoing step 306.

[0133] The interaction module 901, the first obtaining module 902, the first scheduling module 903, the creating module 904, the second obtaining module 905, and the second scheduling module 906 can all be implemented by software or by hardware. For example, the implementation of the interaction module 901 is described below. Similarly, the implementation of the first obtaining module 902, the first scheduling module 903, the creating module 904, the second obtaining module 905, and the second scheduling module 906 can be implemented in the same way as the implementation of the interaction module 901.

[0134] As an example of a software functional unit, the interaction module 901 can include code running on a computing instance. The computing instance can include at least one of a physical host (computing device), a virtual machine, and a container. Further, the computing instance can be one or more. For example, the interaction module 901 can include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code can be distributed in the same region, or can be distributed in different regions. Further, the multiple hosts / virtual machines / containers used to run the code can be distributed in the same availability zone (AZ), or can be distributed in different AZs, each of which includes one cloud data center or multiple cloud data centers with similar geographical locations. Generally, one region can include multiple AZs.

[0135] Similarly, the multiple hosts / virtual machines / containers used to run the code can be distributed in the same virtual private cloud (VPC), or can be distributed in multiple VPCs. Generally, one VPC is set in one region, and communication between two VPCs in the same region and between VPCs in different regions needs to be set in each VPC to set a communication gateway to realize the interconnection between VPCs.

[0136] As an example of a hardware functional unit, the interaction module 901 can include at least one computing device, such as a server, etc. Alternatively, the interaction module 901 can also be a device implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), etc. The PLD can be implemented by a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0137] The plurality of computing devices included in the interaction module 901 can be distributed in the same region or in different regions. The plurality of computing devices included in the interaction module 901 can be distributed in the same AZ or in different AZs. Similarly, the plurality of computing devices included in the interaction module 901 can be distributed in the same VPC or in multiple VPCs. The plurality of computing devices can be any combination of servers, ASICs, PLDs, CPLDs, FPGAs, and GALs, etc.

[0138] It should be noted that in other embodiments, any one of the interaction module 901, the first acquisition module 902, the first scheduling module 903, the creation module 904, the second acquisition module 905, and the second scheduling module 906 can be used to perform any step in the cloud resource scheduling method. The steps implemented by the interaction module 901, the first acquisition module 902, the first scheduling module 903, the creation module 904, the second acquisition module 905, and the second scheduling module 906 can be specified as needed, and the entire function of the cloud resource scheduling device can be implemented by the interaction module 901, the first acquisition module 902, the first scheduling module 903, the creation module 904, the second acquisition module 905, and the second scheduling module 906 respectively implementing different steps in the cloud resource scheduling method.

[0139] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of each component described above can refer to the corresponding content in the foregoing method embodiments, which will not be described here.

[0140] The basic hardware structure related to the embodiments of the present application is described below.

[0141] The present application also provides a computing device 1100. As shown in FIG. 11, the computing device 1100 includes a bus 1102, a processor 1104, a memory 1106, and a communication interface 1108. The processor 1104, the memory 1106, and the communication interface 1108 communicate via the bus 1102. The computing device 1100 can be a server or a terminal device. It should be understood that the number of processors and memories in the computing device 1100 is not limited.

[0142] The bus 1102 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one line is shown in FIG. 11, but it does not mean that there is only one bus or only one type of bus. The bus 1102 can include a path for transmitting information between various components (e.g., the memory 1106, the processor 1104, the communication interface 1108) of the computing device 1100.

[0143] The processor 1104 can include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP), etc.

[0144] The memory 1106 can include a volatile memory (e.g., a random access memory (RAM)). The processor 1104 can also include a non-volatile memory (e.g., a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD)).

[0145] The executable program code stored in the memory 1106 is executed by the processor 1104 to implement the functions of the aforementioned interaction module 901, the first obtaining module 902, the first scheduling module 903, the creating module 904, the second obtaining module 905, and the second scheduling module 906 respectively, so as to implement the cloud resource scheduling method. That is, the memory 1106 stores instructions for executing the cloud resource scheduling method.

[0146] The communication interface 1108 uses a transceiving module such as but not limited to a network interface card and a transceiver to implement the communication between the computing device 1100 and other devices or communication networks.

[0147] The embodiments of the present application also provide a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, for example, a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a notebook computer, or a smart phone.

[0148] As shown in FIG. 12, the computing device cluster includes at least one computing device 1100. The memory 1106 in one or more computing devices 1100 in the computing device cluster can store the same instructions for executing the cloud resource scheduling method.

[0149] In some possible implementations, the memory 1106 of one or more computing devices 1100 in the computing device cluster can also respectively store partial instructions for executing the cloud resource scheduling method. In other words, the combination of one or more computing devices 1100 can collectively execute the instructions for executing the cloud resource scheduling method.

[0150] It should be noted that the memories 1106 in different computing devices 1100 in the computing device cluster can store different instructions for respectively executing partial functions of the cloud resource scheduling apparatus. That is, the instructions stored in the memories 1106 in different computing devices 1100 can implement the functions of one or more of the interaction module 901, the first obtaining module 902, the first scheduling module 903, the creating module 904, the second obtaining module 905, and the second scheduling module 906.

[0151] In some possible implementation manners, one or more of the computing devices in the computing device cluster can be connected through a network. The network can be a wide area network, a local area network, or the like. FIG. 13 shows one possible implementation manner. As shown in FIG. 13, two computing devices 1100A and 1100B are connected through a network. Specifically, the computing devices are connected to the network through communication interfaces in the computing devices. In this type of possible implementation manner, the memory 1106 in the computing device 1100A stores instructions for performing the functions of the interaction module 901, the first obtaining module 902, the first scheduling module 903, and the creating module 904. Meanwhile, the memory 1106 in the computing device 1100B stores instructions for performing the functions of the second obtaining module 905 and the second scheduling module 906.

[0152] It should be understood that the functions of the computing device 1100A shown in FIG. 13 can also be completed by multiple computing devices 1100. Similarly, the functions of the computing device 1100B can also be completed by multiple computing devices 1100.

[0153] The embodiments of the present application also provide another computing device cluster. The connection relationship between the computing devices in the computing device cluster can be similar to the connection manners of the computing device clusters shown in FIG. 12 and FIG. 13. The difference is that the memory 1106 in one or more of the computing devices 1100 in the computing device cluster can store the same instructions for performing the cloud resource scheduling method.

[0154] In some possible implementation manners, the memory 1106 of one or more of the computing devices 1100 in the computing device cluster can also respectively store partial instructions for performing the cloud resource scheduling method. In other words, the combination of one or more of the computing devices 1100 can collectively execute the instructions for performing the cloud resource scheduling method.

[0155] The embodiments of the present application also provide a computer program product containing instructions. The computer program product can be software or a program product containing instructions, which can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device is caused to perform the cloud resource scheduling method.

[0156] The embodiments of the present application also provide a computer readable storage medium. The computer readable storage medium can be any available medium that the computing device can store or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk), or the like. The computer readable storage medium contains instructions, which instruct the computing device to perform the cloud resource scheduling method, or instruct the computing device to perform the cloud resource scheduling method.

[0157] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by programs instructing relevant hardware to complete, and the programs can be stored in a computer readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk.

[0158] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.) and signals involved in the present application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions. For example, the raw data and executable codes involved in the present application are obtained under sufficient authorization.

[0159] In the embodiments of the present application, the terms "first", "second" and "third" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance. The term "at least one" means one or more, and the term "multiple" means two or more, unless otherwise explicitly limited.

[0160] In the present application, the term "and / or" is only used to describe the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. In addition, the character " / " in this paper generally represents that the front and rear associated objects are a "or" relationship.

[0161] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the protection scope of the technical solutions of the embodiments of the present application.

Claims

1. A cloud resource scheduling method, characterized in that, The method is performed by a cloud management platform for managing an infrastructure providing cloud services, the infrastructure comprising a plurality of hosts, and the method comprises: The cloud management platform receives an instance creation request sent by a tenant, the instance creation request carrying a first instance type and a first instance specification of a first instance to be created; The cloud management platform obtains an available resource amount of resources that each host in the plurality of hosts can provide to an instance of the first instance type, wherein a first host can provide resources to instances of a plurality of instance types, and the available resource amount of resources that the first host can provide to the instances of the plurality of instance types is calculated in different manners, and the first host is any one of the plurality of hosts; The cloud management platform selects a first host from the plurality of hosts, wherein the available resource amount of resources of the first host can satisfy the first instance specification, to obtain a target first host; The cloud management platform creates the first instance on the target first host.

2. The method of claim 1, wherein, The instances of the plurality of instance types comprise a first type of instance, a second type of instance, and a third type of instance, and a priority of the first type of instance and the second type of instance in using resources provided by a host is higher than a priority of the third type of instance in using resources provided by a host; The available resource amount of resources that the first host can provide to the first type of instance and the second type of instance is calculated based on a total amount of resources that the first host can provide to instances, and instance specifications of the first type of instance and the second type of instance that have been deployed in the first host, and the total amount of resources that the first host can provide to instances is obtained based on a specification of hardware resources of the first host and an oversubscription multiple; The available resource amount of resources that the first host can provide to the third type of instance is calculated based on the total amount of resources that the first host can provide to instances, and a total amount of resources actually used by the first type of instance, the second type of instance, and the third type of instance that have been deployed in the first host.

3. The method of claim 2, wherein The available resource amount of resources that the first host can provide to the first type of instance is further calculated based on a total amount of resources actually used by the third type of instance that has been deployed in the first host.

4. The method according to any one of claims 1 to 3, characterized in that, The cloud management platform creates the first instance on the target first host, comprising: The cloud management platform determines, based on the first instance type, a first core binding range of the first instance in the target first host, wherein core binding ranges of instances of the plurality of instance types in the first host are calculated in different manners, and the core binding range is used to indicate a processor core in the first host for providing a microprocessor core to the instance; The cloud management platform performs device simulation on processor cores in the first core binding range to obtain microprocessor cores available for the first instance, and creates the first instance based on the microprocessor cores.

5. The method of claim 4, wherein, The multiple instance types include a first instance type, a second instance type and a third instance type, and the first instance type and the second instance type have higher priority than the third instance type in using resources provided by a host; The binding core range of the first instance in the first host includes processor cores selected from all available processor cores of the first host, and the number of the processor cores is equal to the number of microprocessor cores indicated by the instance specification of the first instance; The binding core range of the second instance in the first host includes available processor cores of all available processor cores of the first host except the processor cores providing the microprocessor cores to the first instance; The binding core range of the third instance in the first host includes all available processor cores of the first host.

6. The method of claim 5, wherein The binding core range of the first instance in the first host includes available processor cores selected from all available processor cores of the first host, and the number of the available processor cores is equal to the number of microprocessor cores indicated by the instance specification of the first instance and the available processor cores are not used by the oversubscribed resources, and / or the available processor cores are selected from all available processor cores of the first host, and the number of the available processor cores is equal to the number of microprocessor cores indicated by the instance specification of the first instance and the available processor cores are not used by the oversubscribed resources and the available processor cores are adjacent to the available processor cores not used by the oversubscribed resources.

7. The method of any one of claims 1 to 6, wherein, The method further includes: The cloud management platform acquires running performance data of multiple instances deployed in the multiple hosts; In a case where the running performance data of the second instance indicates that the quality of service of the second instance is degraded, the cloud management platform migrates a third instance in a second host where the second instance is located to a third host, and provides cloud resources released by the third instance in the second host to the second instance, the second instance being one of the multiple instances deployed in the multiple hosts, and the third instance being an instance with the lowest priority in using resources provided by the host in the second host.

8. A cloud resource scheduling apparatus, characterized by comprising: The apparatus is deployed in a cloud management platform, and the cloud management platform is configured to manage infrastructure providing cloud services, and the infrastructure includes multiple hosts, and the apparatus includes: The interaction module is configured to receive an instance creation request sent by a tenant, and the instance creation request carries a first instance type and a first instance specification of a first instance to be created; The first acquisition module is configured to acquire an available resource amount of resources that each host in the multiple hosts can provide to instances of the first instance type, wherein a first host can provide resources to instances of multiple instance types, and the available resource amount of resources that the first host can provide to instances of the multiple instance types is calculated in different ways, and the first host is any one of the multiple hosts; The first scheduling module is configured to select a first host in the multiple hosts, wherein the available resource amount of resources of the first host can meet the first instance specification, to obtain a target first host; The creation module is configured to create the first instance on the target first host.

9. The apparatus of claim 8, wherein, the instances of the plurality of instance types comprise a first instance type, a second instance type, and a third instance type, the first instance type and the second instance type have a higher priority to use resources provided by a host than the third instance type; an available resource amount of resources that the first host is capable of providing to the first instance type and the second instance type is calculated based on a total amount of resources that the first host is capable of providing to instances and instance specifications of the first instance type and the second instance that have been deployed in the first host, the total amount of resources that the first host is capable of providing to instances is calculated based on a specification of hardware resources of the first host and an oversubscription multiple; an available resource amount of resources that the first host is capable of providing to the third instance type is calculated based on the total amount of resources that the first host is capable of providing to instances and a total amount of resources actually used by the first instance type, the second instance type, and the third instance that have been deployed in the first host.

10. The apparatus of claim 9, wherein the available resource amount of resources that the first host is capable of providing to the first instance type is further calculated based on the total amount of resources actually used by the third instance that have been deployed in the first host.

11. The apparatus of any one of claims 8 to 10, wherein, The creating module is specifically configured to: determine, based on the first instance type, a first core binding range of the first instance in the target first host, the core binding ranges of the instances of the plurality of instance types in the first host are calculated in different manners, and the core binding range is used to indicate processor cores of the first host that are used to provide microprocessor cores to the instance; perform device simulation on processor cores in the first core binding range to obtain microprocessor cores available for the first instance, and create the first instance based on the microprocessor cores.

12. The apparatus of claim 11, wherein, the instances of the plurality of instance types comprise a first instance type, a second instance type, and a third instance type, the first instance type and the second instance type have a higher priority to use resources provided by a host than the third instance type; the core binding range of the first instance type in the first host comprises processor cores selected from all available processor cores of the first host, and a number of the processor cores is equal to a number of microprocessor cores indicated by an instance specification of the first instance type; the core binding range of the second instance type in the first host comprises available processor cores of all available processor cores of the first host except for the processor cores used to provide the microprocessor cores to the first instance type; the core binding range of the third instance type in the first host comprises all available processor cores of the first host.

13. The apparatus of claim 12, wherein The binding core range of the first type of instance in the first host includes: the number of available processor cores selected from all available processor cores of the first host is equal to the number of microprocessor cores indicated by the instance specification of the first type of instance, and the available processor cores are not used up by the oversubscription resources, and / or the number of available processor cores selected from all available processor cores of the first host is equal to the number of microprocessor cores indicated by the instance specification of the first type of instance, and the available processor cores and the available processor cores adjacent to them are not used up by the oversubscription resources.

14. The apparatus of any one of claims 8 to 13, wherein, The apparatus further includes: A second acquisition module is configured to acquire running performance data of a plurality of instances deployed in the plurality of hosts. A second scheduling module is configured to, in a case where running performance data of a second instance indicates that quality of service of the second instance is deteriorating, migrate a third instance in a second host where the second instance is located to a third host, and provide cloud resources released by the third instance in the second host to the second instance for use, the second instance being one of the plurality of instances deployed in the plurality of hosts, and the third instance being an instance with the lowest priority of using resources provided by the second host.

15. A cluster of computing devices, characterized in that, A plurality of computing devices including a plurality of processors and a plurality of memories, the plurality of memories storing program instructions, the plurality of processors executing the program instructions to cause the cluster of computing devices to perform the method of any of claims 1-7.

16. A computer-readable storage medium, characterized in that, Program instructions that, when executed on a computing device, cause the computing device to perform the method of any of claims 1-7.

17. A computer program product comprising instructions, characterized in that, When the instructions are executed by a cluster of computing devices, the cluster of computing devices performs the method of any of claims 1-7.

Citation Information

Patent Citations

  • Instance deployment method and device, cloud system, computing equipment and storage medium

    CN115168020A

  • Distributed heterogeneous resource pool scheduling method and device, server and storage medium

    CN116360994A

  • Cloud service deployment method based on cloud computing technology and cloud management platform

    CN118075107A

  • Cloud resource capacity management method and cloud management platform

    CN118519758A

  • Virtual instance deployment method and device

    CN118656168A