Resource scheduling method and cloud computing platform
By receiving and mapping resource requests from target computing instances, resource-sharing deployment and "first-come, first-served" resource hybrid deployment are achieved, solving the problem that traditional resource deployment models cannot adapt to diverse needs and improving resource utilization and the stability of computing instances.
Patent Information
- Application Number
- CN202410612977.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2025-11-18
AI Technical Summary
Traditional resource deployment models cannot adapt to diverse specific needs, resulting in increased latency and decreased elasticity of computing instances when resources are insufficient, and underutilization of resources when resources are abundant, leading to increased resource maintenance costs and reduced flexibility and availability of resource scheduling.
By receiving resource requests from target computing instances, and mapping the virtual resource specifications to the physical resource specifications based on the target resource usage type, resources that meet the specifications are allocated from the physical resources of the target physical machine, thereby achieving resource sharing deployment and "first-come, first-served" strong hybrid resource deployment to adapt to diverse actual resource specification needs.
It improves the stability of computing instances and the resource utilization on physical machines, and achieves highly flexible and highly available resource scheduling to meet diverse specific needs.
Smart Images

Figure CN120973484A_ABST
Abstract
Description
Technical Field
[0001] The embodiments in this specification relate to the technical field of cloud computing, and in particular to a resource scheduling method and a cloud computing platform. Background Technology
[0002] With the development of cloud computing technology, through virtualization technology, cloud computing platforms can divide the resources of the underlying physical machine into multiple computing instances. Each computing instance can be customized with resource configuration according to the specific needs of the upper-layer application, which greatly improves the efficiency of resource utilization, reduces the cost of resource use, and improves the operational stability of the upper-layer application.
[0003] Currently, with the diversification of specific requirements from upper-layer applications, the actual resource specifications of deployed computing instances are also becoming increasingly diverse. Traditional fixed deployment models (such as dedicated resource deployment and weakly hybrid resource deployment) are increasingly unable to adapt to the flexible actual resource specifications brought about by diverse specific needs. This leads to increased latency and decreased elasticity of computing instances when resources are insufficient, and a large number of resources are not fully utilized when resources are abundant, resulting in increased resource maintenance costs and reduced flexibility and availability of resource scheduling. Therefore, a highly flexible and highly available resource scheduling method is urgently needed. Summary of the Invention
[0004] In view of this, embodiments of this specification provide a resource scheduling method. One or more embodiments of this specification also relate to a cloud computing platform, a resource scheduling device, a computing device, a computer-readable storage medium, and a computer program product, to address the technical deficiencies existing in the prior art.
[0005] According to a first aspect of the embodiments of this specification, a resource scheduling method is provided, comprising:
[0006] Receive resource requests for target computing instances deployed on target physical machines. The target physical machines have computing instances with various resource usage types. Different resource usage types correspond to different resource mapping relationships. The resource mapping relationship represents the mapping relationship between virtual resources and physical resources. The resource request carries the virtual resource specifications and the target resource usage type.
[0007] Based on the target resource mapping relationship corresponding to the target resource usage type, the physical resource specifications corresponding to the virtual resource specifications are mapped to the virtual resource specifications.
[0008] From the physical resources of the target physical machine, target physical resources that meet the physical resource specifications are allocated, and target computing instances are deployed based on the target physical resources.
[0009] According to a second aspect of the embodiments of this specification, a cloud computing platform is provided, including a server and a client. The server includes a scheduling node and a target physical machine. The target physical machine is deployed with computing instances of various resource usage types. Different resource usage types correspond to different resource mapping relationships. The resource mapping relationship represents the mapping relationship between virtual resources and physical resources.
[0010] The client is used to send resource requests for a target compute instance deployed on a target physical machine, wherein the resource request carries the virtual resource specification and the target resource usage type;
[0011] The scheduling node is used to receive resource requests, map the virtual resource specifications to the physical resource specifications based on the target resource usage type and the target resource mapping relationship, and send the instance deployment instructions to the target physical machine.
[0012] The target physical machine is used to respond to instance deployment instructions, allocate target physical resources that meet the physical resource specifications from the physical resources of the target physical machine, and deploy the target computing instance based on the target physical resources.
[0013] According to a third aspect of the embodiments of this specification, a resource scheduling apparatus is provided, comprising:
[0014] The receiving module is configured to receive resource requests for target computing instances deployed on a target physical machine. The target physical machine has computing instances with various resource usage types. Different resource usage types correspond to different resource mapping relationships. The resource mapping relationship represents the mapping relationship between virtual resources and physical resources. The resource request carries the virtual resource specifications and the target resource usage type.
[0015] The mapping module is configured to map the physical resource specifications corresponding to the virtual resource specifications based on the target resource usage type and the target resource mapping relationship.
[0016] The deployment module is configured to partition target physical resources that conform to the physical resource specifications from the physical resources of the target physical machine, and deploy the target computing instance based on the target physical resources.
[0017] According to a fourth aspect of the embodiments of this specification, a computing device is provided, comprising:
[0018] Memory and processor;
[0019] The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the above method.
[0020] According to a fifth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores a computer program / instructions that, when executed by a processor, implement the steps of the above-described method.
[0021] According to a sixth aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described method.
[0022] In one embodiment of this specification, a resource request for a target computing instance deployed on a target physical machine is received. The target physical machine has computing instances with various resource usage types. Different resource usage types correspond to different resource mapping relationships, which represent the mapping relationship between virtual resources and physical resources. The resource request carries the virtual resource specifications and the target resource usage type. Based on the target resource mapping relationship corresponding to the target resource usage type, the physical resource specifications corresponding to the virtual resource specifications are mapped. Target physical resources conforming to the physical resource specifications are allocated from the physical resources of the target physical machine, and the target computing instance is deployed based on the target physical resources. Deploying computing instances with multiple resource usage types on the target physical machine achieves resource-sharing deployment of the target physical machine. For resource requests from target computing instances, the conversion from virtual resource specifications to physical resource specifications under the target resource usage type is flexibly completed, thereby flexibly allocating target physical resources to complete instance deployment. Based on resource-sharing deployment, a "first-come, first-served" strong hybrid resource deployment is achieved, fully adapting to the flexible actual resource specifications brought about by diverse specific needs, improving the stability of computing instances and the resource utilization rate on the physical machine, and achieving highly flexible and highly available resource scheduling. Attached Figure Description
[0023] Figure 1 This is a schematic diagram of a resource-weak hybrid deployment mode;
[0024] Figure 2 This is a flowchart illustrating a resource scheduling method provided in one embodiment of this specification;
[0025] Figure 3 This is a schematic diagram illustrating the effect of a resource scheduling method provided in one embodiment of this specification;
[0026] Figure 4 This is a schematic diagram illustrating the deployment of different computing instances in a resource scheduling method provided in one embodiment of this specification;
[0027] Figure 5 This is a flowchart illustrating the processing procedure of a resource scheduling method applied to a single-machine cross-product hybrid deployment, as provided in one embodiment of this specification.
[0028] Figure 6 This is a schematic diagram of the structure of a cloud computing platform provided in one embodiment of this specification;
[0029] Figure 7 This is a schematic diagram of the structure of a resource scheduling device provided in one embodiment of this specification;
[0030] Figure 8 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation
[0031] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0032] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0033] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0034] Furthermore, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. Moreover, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0035] First, the terms and concepts used in one or more embodiments of this specification will be explained.
[0036] Dedicated resource deployment mode: A single physical machine provides independent computing resources, which no other computing instances can access. This mode offers higher performance and availability for clients and is suitable for computing instances with high performance and high reliability requirements. However, the maintenance cost of the physical machine resources is higher, and the deployment cost of client instances is also correspondingly higher.
[0037] Resource sharing deployment mode: One physical machine provides shared computing resources, and multiple computing instances share access to these resources. It has lower performance and availability for clients and is suitable for computing instances with low performance and low reliability requirements. However, the maintenance cost of physical machine resources is lower, and the deployment cost of client instances is also correspondingly lower.
[0038] Resource-sharing deployment mode: A resource-sharing deployment mode that uses resource isolation technology to divide the resources of a single physical machine into different partitions to deploy different computing instances. Figure 1 A schematic diagram of a weak hybrid resource deployment mode is shown, such as... Figure 1 As shown:
[0039] By using resource isolation technology, the resources of a single physical machine are divided into dedicated resource partitions and shared resource partitions. Only dedicated resource instances can be deployed in dedicated resource partitions, and only shared resource instances can be deployed in shared resource partitions.
[0040] However, since the two partitions are pre-defined, the dedicated resource partition typically has larger resource specifications, while the shared resource partition has smaller resource specifications. Once a compute instance with larger actual resource specifications is deployed in the shared resource partition (for example, a compute instance using processor resources with hyper-threading), multiple compute instances in the shared resource partition will compete for resources, leading to increased latency and decreased elasticity of the compute instances. At this point, methods such as instance migration and secondary partitioning are needed to complete resource scheduling, increasing the complexity of resource scheduling. Meanwhile, a large number of resources in the dedicated resource partition are not being fully utilized, reducing the flexibility and availability of resource scheduling.
[0041] Strongly Hybrid Deployment Mode: A resource-sharing deployment mode that does not partition the resources of a single physical machine, and supports the hybrid deployment of computing instances of different resource types and specifications on a single physical machine in a "first-come, first-served" manner.
[0042] Machine templates refer to predefined physical machine configurations, which include a set of specifications and parameters such as processor type, number of cores, memory size, and storage capacity. Machine templates are used to quickly configure physical machine clusters, ensuring that each physical machine provides services according to the same standard configuration.
[0043] This specification provides a resource scheduling method, and also relates to a cloud computing platform, a resource scheduling device, a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail in the following embodiments.
[0044] See Figure 2 , Figure 2 A flowchart of a resource scheduling method according to an embodiment of this specification is shown, including the following specific steps:
[0045] Step 202: Receive resource requests for target computing instances deployed on the target physical machine. The target physical machine has computing instances with various resource usage types. Different resource usage types correspond to different resource mapping relationships. The resource mapping relationship represents the mapping relationship between virtual resources and physical resources. The resource request carries the virtual resource specifications and the target resource usage type.
[0046] The embodiments in this specification apply to a cloud computing platform unit (the scheduling node or scheduling terminal of the cloud computing platform) with resource scheduling capabilities. The cloud computing platform comprises a cluster of physical machines, each providing physical resources of a specific machine type template to deploy computing instances and implement cloud computing for upper-layer applications, meeting their specific needs. For example, the cloud computing platform includes 64 physical machines with 5 different machine type templates:
[0047] Entry-level model: Processor: 2 processor cores; Memory: 8GB; Storage: 100GB SSD (Solid StateDrive); suitable for lightweight applications, development environments, or small databases.
[0048] Balanced model: Processor: 4 processor cores; Memory: 16GB; Storage: 250GB SSD; Suitable for web servers, medium-sized data analytics and applications.
[0049] High-performance model: Processor: 8 processor cores; Memory: 32GB; Storage: 500GB SSD; Optimized for big data processing, machine learning training, and high-performance computing scenarios.
[0050] Memory-optimized models: Processor: 16 processor cores; Memory: 128GB; Storage: 1TB SSD; Designed for memory-intensive applications such as large databases, data warehouses, and in-memory databases.
[0051] Computation-intensive models: Processor: 32 processor cores; Memory: 64GB; Storage: 250GB SSD + 1TB HDD (Hard Disk Drive); Suitable for applications with high computing demands such as scientific computing, massively parallel processing, and graphics rendering.
[0052] A compute instance is a virtual server unit built using virtualization technology and based on the physical resources of a physical machine. Each compute instance has its own independent operating system, and after deployment, it runs upper-layer applications using the physical resources of the physical machine. From the client's perspective, a compute instance is treated as an independent physical server. For example, a virtual server unit running an e-commerce website handles application functions such as processing user requests, displaying product information, and processing orders. Another example is a virtual server unit running a large language model, handling model functions such as text question answering, image generation, and speech processing.
[0053] Resource usage type refers to the resource deployment mode adopted when deploying client-facing compute instances. Resource usage types include, but are not limited to, dedicated resource type and shared resource type. The resource usage type is not necessarily the actual resource deployment mode, such as... Figure 1 As shown: In the weak hybrid deployment mode, dedicated resource instances with resource usage type of dedicated resource and shared resource instances with resource usage type of shared resource are deployed together on a single physical machine.
[0054] The resource mapping relationship corresponding to the resource usage type represents the mapping relationship between virtual resources and physical resources under the resource usage type. This ensures the logical mapping between the virtualization layer and physical resources under the resource usage type, enabling resource requests to be accurately mapped to physical resources. The resource mapping relationship can be represented by a ratio, an additive form, or a dynamic form; no limitation is made here. For ease of description, this specification uses a ratio in the embodiments. For example, the resource mapping relationship corresponding to the dedicated resource type is 1:1, the resource mapping relationship corresponding to a resource sharing type 1 with low resource availability requirements is 1:2, and the resource mapping relationship corresponding to another resource sharing type 2 with high resource availability requirements is 1:4.
[0055] Virtual resources are logical resources built through virtualization technology, including but not limited to: virtual processors, virtual memory, virtual storage, and virtual network hardware. For example, a virtual server unit created through virtualization technology has 2 virtual processor cores and 8GB of virtual memory.
[0056] Physical resources refer to the actual hardware resources on the physical machine, including but not limited to: processors (including CPU (Central Processing Unit), GPU (Graphics Processing Unit), NPU (Neural Processing Unit), and FPGA (Field Programmable Gate Array), etc.), memory, storage (including SSD and HDD), and network hardware.
[0057] A target physical machine is the physical machine used to deploy a target compute instance. In a cloud computing platform's cloud environment, a target physical machine is a physical server determined to run the target compute instance. A target physical machine has a corresponding physical machine configuration, configured with physical resources of specified specifications, including but not limited to: processors, memory, storage, and network hardware. For example, if the target compute instance is used for machine learning training, a high-performance physical machine is identified as the target physical machine.
[0058] A target compute instance is a virtual server unit built using virtualization technology based on the physical resources of a target physical machine. Each target compute instance has its own independent operating system and runs upper-layer applications using the physical resources of the target physical machine after deployment. Target compute instances have corresponding virtual resource specifications and target resource types. For example, a target compute instance might be a virtual server unit capable of processing large-scale datasets, used for machine learning training.
[0059] A resource request for a target compute instance is a client's instruction to deploy the target compute instance on a target physical machine. For example, a user, through a cloud computing platform client, selects to deploy the target compute instance used for machine learning training on a high-performance target physical machine, selects the virtual resource specification: 4 processor cores, selects the target resource usage type: resource sharing type 1 (low resource availability requirements), and sends a resource request for that target compute instance to the cloud computing platform server.
[0060] Virtual resource specifications are the logical resource specifications for a target compute instance, determined through virtualization technology. They define the resource specifications requested for scheduling by the target compute instance, including but not limited to: virtual processor specifications, virtual memory specifications, virtual storage specifications, and virtual network hardware specifications. Virtual resource specifications do not directly reflect the actual configuration of the underlying physical hardware; rather, they are determined based on the actual needs of the upper-layer applications of the target compute instance. Typically, the actual scheduled physical resource specifications are lower than the virtual resource specifications. For example, virtual resource specifications of 4 virtual processor cores, 16GB of virtual memory, and 200GB of virtual hard disk space might be suitable for a medium-load web server application.
[0061] The target resource usage type refers to the type of physical resource usage of the target computing resources on the target physical machine, including but not limited to: dedicated resource type and shared resource type. The target resource usage type is determined based on the actual resource requirements of the upper-layer applications of the target computing instance and the expected Service-Level Agreement (SLA). The target resource usage type determines the elasticity and availability of the target computing instance. For example, a dedicated resource type would be chosen for a real-time trading system to ensure low latency and high reliability in transaction processing; while for data backup tasks, where the requirement for immediate resource availability is relatively low, a shared resource type could be selected.
[0062] For example, a cloud computing platform includes 64 physical machines with five different machine templates: entry-level, balanced, high-performance, memory-optimized, and compute-intensive. A developer of an image generation application, on the client side of this cloud computing platform, selects a compute-intensive physical machine as the target physical machine based on the application's needs. They then select an image generation model from the model library and configure virtual resource specifications: 16 virtual processor cores; 64GB virtual memory; 200GB virtual storage, selecting resource sharing type 1 as the target resource usage type. After configuration, a resource request is generated for the target computing instance deployed on the target physical machine, and the resource request instruction is sent to the cloud computing platform's server. The server's scheduling node receives the resource request.
[0063] The target physical machine has multiple computing instances with different resource usage types deployed, which realizes the resource sharing deployment of the target physical machine. The received resource requests include the target resource usage type and virtual resource specifications, providing a mapping reference and mapping object for subsequent mapping.
[0064] Step 204: Based on the target resource mapping relationship corresponding to the target resource usage type, map the physical resource specifications corresponding to the virtual resource specifications.
[0065] The target resource mapping relationship represents the mapping relationship between virtual resources and physical resources under the target resource usage type. It ensures the logical mapping between the virtualization layer and physical resources under the target resource usage type, so that the initiated resource request can be accurately mapped to the physical resources of the target physical machine. The target resource mapping relationship can be represented in ratio form, additive form, or dynamic form, and is not limited here. For the sake of convenience, the embodiments in this specification are represented in ratio form.
[0066] Physical resource specifications are the resource specifications of the physical resources applied to the target computing instance and mapped through the target resource mapping relationship. Physical resource specifications determine the resource specifications requested for scheduling by the target computing instance, including but not limited to: physical processor specifications, physical memory specifications, physical storage specifications, and physical network hardware specifications. Physical resource specifications directly reflect the actual configuration of the underlying physical hardware. For example, with virtual resource specifications of 4 virtual processor cores, 16GB of virtual memory, and 200GB of virtual hard disk space, and a target resource mapping relationship of 1:2, the mapped physical resource specifications would be 2 physical processor cores, 8GB of physical memory, and 100GB of physical hard disk space, suitable for medium-load web server applications. Physical resource specifications are constraints on the virtualization mapping dimension in resource scheduling, ensuring the reasonable implementation of a hybrid resource deployment mode and preventing situations where the physical resource specifications of a resource-sharing type are higher than those of a resource-dedicated type.
[0067] For example, based on the target resource mapping relationship 1:2 corresponding to the target resource usage type (resource sharing type 1), the physical resource specifications corresponding to the virtual resource specifications (16 virtual processor cores; 64GB virtual memory; 200GB virtual storage) are mapped to: 8 physical processor cores; 32GB physical memory; 100GB physical storage.
[0068] For resource requests from target computing instances, the system flexibly converts virtual resource specifications to physical resource specifications under the target resource usage type, providing a basis for subsequent physical resource partitioning. The constraints on virtualization mapping dimension ensure the reasonable implementation of subsequent hybrid resource deployment and improve the availability of resource scheduling.
[0069] Step 206: From the physical resources of the target physical machine, obtain target physical resources that meet the physical resource specifications, and deploy target computing instances based on the target physical resources.
[0070] Target physical resources are a portion of hardware resources conforming to physical resource specifications allocated from the physical resources of the target physical machine, specifically used for deploying and running the target computing instance. Target physical resources include, but are not limited to: target physical processors, target physical memory, target physical storage, and target physical network hardware.
[0071] Deploying target computing instances based on target physical resources involves virtualizing the target physical resources and then deploying the target computing instances based on these virtualized resources. Virtualization includes, but is not limited to, at least one of the following: resource initialization, resource partitioning and isolation, dynamic allocation and adjustment, hardware independence, and advanced feature support. Resource initialization abstracts the target physical resources from the hardware layer, transforming them into logical resources that can be managed and manipulated at the software layer. This prevents hardware resources from being directly exposed to upper-layer applications, instead allowing interaction through standardized and unified interfaces provided by the virtualization layer. Resource partitioning and isolation divides the target physical resources into corresponding logical units according to the virtual resource specifications of the target computing instances, achieving resource isolation between multiple computing instances. This allows multiple computing instances to share the target physical machine without being aware of each other. Dynamic allocation and adjustment establishes a flexible resource allocation mechanism, allowing dynamic adjustment of resource specifications based on the actual operating status of the target computing instances. Hardware independence, through virtualization, eliminates the dependency on specific hardware configurations for the deployment of target computing instances, improving application portability and compatibility. This allows computing instances to migrate between different physical machines without affecting their operational status and service continuity. Advanced features include the introduction of functions such as snapshots, cloning, and disaster recovery, leveraging the advanced features of virtualization technology to enhance the ease of management and disaster recovery capabilities of target compute instances. Snapshots help save the instance's state for quick rollback; cloning enables rapid replication of instances to meet horizontal scaling needs; and disaster recovery mechanisms ensure uninterrupted service in the event of hardware failure.
[0072] For example, from the physical resources of a compute-intensive physical machine (processor: 32 processor cores; memory: 64GB; storage: 250GB SSD + 1TB HDD), target physical resources (8 physical processor cores; 32GB physical memory; 100GB physical storage) that meet the physical resource specifications are partitioned, and the target physical resources are initialized, partitioned and isolated, dynamically allocated and adjusted, hardware-independently processed and supported with advanced features, and a target computing instance for running image generation applications is deployed.
[0073] In the embodiments described in this specification, computing instances with various resource usage types are deployed on the target physical machine, realizing resource-sharing deployment of the target physical machine. For the resource requests of the target computing instances, the conversion from virtual resource specifications to physical resource specifications under the target resource usage type is flexibly completed, and then the target physical resources are flexibly allocated to complete the instance deployment. On the basis of resource-sharing deployment, a "first-come, first-served" strong hybrid resource deployment is realized, which fully adapts to the flexible actual resource specifications brought about by diverse specific needs, improves the stability of computing instances and the resource utilization rate on the physical machine, and realizes highly flexible and highly available resource scheduling.
[0074] In one optional embodiment of this specification, the following specific steps are included before step 204:
[0075] Identify whether the virtual resource specifications exceed the total virtual resource specifications of the target physical machine;
[0076] Correspondingly, step 204 includes the following specific steps:
[0077] If not, based on the target resource mapping relationship corresponding to the target resource usage type, the physical resource specifications corresponding to the virtual resource specifications are mapped.
[0078] Generally, constraints should not only be imposed on the virtualization mapping dimension, but also on ensuring that the virtual resource specifications do not exceed the total virtual resource specifications of the target physical machine, thus imposing constraints on the virtual resource dimension.
[0079] The total virtual resource specifications of the target physical machine can be either real resource specifications or a set of resource specifications configured to ensure safe and stable operation, including but not limited to: virtual processor specifications, virtual memory specifications, virtual storage specifications, and virtual network hardware specifications. For example, the physical resource specifications of the target physical machine are: 48 physical processor cores, 192GB physical memory, and 2TB storage. After virtualization processing, considering redundancy and management overhead, the total virtual resource specifications are set to: a maximum of 80 virtual processor cores, 300GB virtual memory, and 3.5TB virtual storage.
[0080] For example, the total virtual resource specifications of the target physical machine are: 80 virtual processor cores, 300GB virtual memory, and 3.5TB virtual storage. Since the virtual resource specifications (16 virtual processor cores; 64GB virtual memory; 200GB virtual storage) do not exceed the total resource specifications, based on the target resource mapping relationship 1:2 corresponding to the target resource usage type (resource sharing type 1), the physical resource specifications corresponding to the virtual resource specifications are mapped to: 8 physical processor cores; 32GB physical memory; and 100GB physical storage.
[0081] The constraints on virtual resources in the embodiments of this specification ensure the reasonable implementation of subsequent strong hybrid resource deployment and improve the availability of resource scheduling.
[0082] In one optional embodiment of this specification, different resource usage types correspond to different physical resource specification thresholds;
[0083] Before obtaining the target physical resources that conform to the physical resource specifications from the physical resources of the target physical machine in step 206, the following specific steps are also included:
[0084] Identify whether the physical resource specifications exceed the physical resource specification threshold corresponding to the target resource usage type;
[0085] Correspondingly, step 206 involves allocating target physical resources that conform to the physical resource specifications from the physical resources of the target physical machine, including the following specific steps:
[0086] If not, obtain target physical resources that conform to the physical resource specifications from the physical resources of the target physical machine.
[0087] Generally, constraints should not only be imposed on the virtualization mapping dimension and / or virtual resource dimension, but also on the custom resource dimension to ensure that the specifications of the actual target physical resources cannot exceed the physical resource specification threshold corresponding to the target resource usage type.
[0088] The physical resource specification thresholds corresponding to the target resource usage type are preset thresholds for the physical resources that can be occupied by each resource usage type. These thresholds define the maximum amount of physical resources a computing instance can consume under a specific resource usage mode, including but not limited to: processor core count thresholds, memory thresholds, storage thresholds, and network hardware thresholds. Based on the specific needs of the resource usage type (such as dedicated resource type or different levels of shared resource type), a hard constraint is provided when allocating physical resources to computing instances, ensuring that even under resource constraints, over-allocation will not affect the performance or reliability of the computing instance. For example, for dedicated resource type: for high-performance computing tasks, the physical resource specification threshold is set to no more than 8 physical processor cores, 64GB of physical memory, and 500GB of storage space, ensuring that the minimum performance requirements of high-performance applications can be maintained even under resource constraints. For shared resource type: for general service applications, emphasizing efficient resource usage, the physical resource specification threshold is set to no more than 4 physical processor cores, 32GB of physical memory, and 250GB of storage space, aiming to balance resource utilization and cost-effectiveness, and preventing a single computing instance from excessively consuming resources and affecting the performance of other instances.
[0089] For example, the target resource usage type is resource sharing type 1, and the pre-set physical resource specification thresholds corresponding to resource sharing type 1 are: 16 physical processor cores; 32GB physical memory; and 160GB physical storage. If the physical resource specifications (8 physical processor cores; 32GB physical memory; 100GB physical storage) do not exceed the physical resource specification thresholds, the target physical resource (8 physical processor cores; 32GB physical memory; 100GB physical storage) that meets the physical resource specifications is allocated from the physical resources of the compute-intensive physical machine (processors: 32 processor cores; memory: 64GB; storage: 250GB SSD + 1TB HDD).
[0090] In the embodiments described in this specification, constraints are imposed on the custom resource dimension to ensure the reasonable and flexible implementation of subsequent strong hybrid resource deployment and improve the flexibility of resource scheduling.
[0091] In one optional embodiment of this specification, after identifying whether the physical resource specifications exceed the physical resource specification threshold corresponding to the target resource usage type, the following specific steps are further included:
[0092] If so, target physical resources that meet the physical resource specification thresholds are obtained from the physical resources of the target physical machine.
[0093] For example, the target resource usage type is resource sharing type 1, and the pre-set physical resource specification thresholds corresponding to resource sharing type 1 are: 4 physical processor cores; 16GB physical memory; and 64GB physical storage. If the physical resource specifications (8 physical processor cores; 32GB physical memory; 100GB physical storage) exceed the physical resource specification thresholds, the target physical resource (4 physical processor cores; 16GB physical memory; 64GB physical storage) that meets the physical resource specification thresholds is allocated from the physical resources of the compute-intensive physical machine (processors: 32 processor cores; memory: 64GB; storage: 250GB SSD + 1TB HDD).
[0094] In the embodiments described in this specification, constraints are imposed on the custom resource dimension to ensure the reasonable and flexible implementation of subsequent strong hybrid resource deployment and improve the flexibility of resource scheduling.
[0095] In one optional embodiment of this specification, the following specific steps are included before step 202:
[0096] Obtain the resource parameters of the physical resources of each physical machine in the cloud computing platform;
[0097] The target physical machine is determined based on resource parameters;
[0098] Deploy compute instances with various resource usage types on the target physical machine.
[0099] The resource parameters of each physical machine's physical resources are the attribute parameters of those resources. These parameters form the basis for evaluating and deciding on the deployment of computing instances and resource scheduling. Resource parameters include, but are not limited to, resource specifications and resource usage status.
[0100] Based on resource parameters, the target physical machine is determined. One possible approach is to select the target physical machine from multiple physical machines that matches the computing instances with various resource usage types based on resource parameters. Another possible approach is to select the target physical machine from multiple physical machines based on load balancing strategies. Yet another possible approach is to select the target physical machine from multiple physical machines that matches the correlation between computing instances with various resource usage types based on resource parameters. For example, frequently interacting computing instances can be deployed on the same physical machine to reduce network latency, or instances with common hardware requirements (such as GPU acceleration and high-speed storage) can be centrally deployed on specific physical machines to improve processing efficiency and collaborative performance.
[0101] Deploying computing instances with various resource usage types on a target physical machine involves virtualizing the physical resources of the target physical machine and then deploying computing instances with various resource usage types based on these virtualized physical resources. Virtualization includes, but is not limited to, at least one of the following: resource initialization, resource partitioning and isolation, dynamic allocation and adjustment, hardware independence, and advanced feature support.
[0102] For example, in a cloud computing platform, there are 64 physical machines with 5 different machine model templates. The resource specifications of the physical resources of the 64 physical machines are obtained. Based on the resource specifications, a physical machine of a compute-intensive type that matches the resource specifications required for 8 compute instances and has a slight margin is selected from the 64 physical machines as the target physical machine. The 8 compute instances are then deployed on the target physical machine.
[0103] In the embodiments described in this specification, the target physical machine is determined based on resource parameters, which ensures the feasibility of subsequent deployment of target computing instances. Computing instances with multiple resource usage types are deployed on the target physical machine, realizing resource-sharing deployment of the target physical machine.
[0104] In one optional embodiment of this specification, step 206, which involves deploying a target computing instance based on the target physical resources, includes the following specific steps:
[0105] Perform resource initialization processing on the target physical resources;
[0106] Deploy the target computing instance based on the target physical resources that have been initialized.
[0107] Resource initialization involves abstracting the target physical resources from the hardware level and converting them into logical resources that can be managed and operated at the software level. This prevents hardware resources from being directly exposed to upper-layer applications of the computing instance and allows them to interact through standardized and unified interfaces provided by the virtualization layer.
[0108] Based on the initialized target physical resources, deploy the target computing instance, including but not limited to at least one of the following: resource partitioning and isolation, dynamic allocation and adjustment, hardware-independent processing, and advanced feature support.
[0109] It should be noted that if other compute instances are already deployed on the target physical machine, the target physical machine's model template needs to be adjusted to support strong hybrid deployment mode. The physical resources of the target physical machine should be reinitialized according to the adjusted model template, adding constraints on virtualization mapping dimensions, virtual resource dimensions, and / or custom resource dimensions. Then, the deployment of the target compute instance is completed through processes such as resource partitioning and isolation, dynamic allocation and adjustment, hardware independence processing, and advanced feature support. This achieves the switching between "dedicated resource deployment mode -> weakly hybrid resource deployment mode -> strongly hybrid resource deployment mode," as shown below. Figure 3 As shown. Figure 3 This specification illustrates the effect of a resource scheduling method according to an embodiment:
[0110] In dedicated resource deployment mode, if a compute instance requires hyper-threading, a partition meeting the high service level protocol standard is allocated to multiple resource-sharing instances, converting it into a low service level protocol standard partition, thus transforming it into a weakly hybrid resource deployment mode. The strongly hybrid resource deployment mode in the embodiments of this specification adopts a single-machine strongly hybrid deployment method and uses a "first-come, first-served" strategy to maximize the elasticity of physical resources. It avoids the intense contention issues that arise in the weakly hybrid resource deployment mode due to the pre-allocation of the total pool size; each compute instance can enjoy all available physical resources.
[0111] For example, the target physical resources are initialized, and the initialized target physical resources are then segmented and isolated, dynamically allocated and adjusted, hardware-independently processed, and supported with advanced features, before a target computing instance for deploying and running an image generation application is deployed.
[0112] In the embodiments described in this specification, a conversion from a dedicated resource deployment mode to a strongly hybrid resource deployment mode is achieved through resource initialization and flexible scheduling strategies.
[0113] In one optional embodiment of this specification, after step 206, the following specific steps are further included:
[0114] Obtain the running status of each computing instance deployed on the target physical machine;
[0115] Based on the running status of each computing instance, determine whether to migrate the target computing instance to a standby physical machine, where the standby physical machine is another physical machine in the cloud computing platform besides the target physical machine.
[0116] The runtime status of a compute instance refers to its current operating state, including but not limited to: processor utilization, memory usage, disk I / O speed (disk read / write speed), network traffic, runtime, system load, and any exceptions or errors. The runtime status of a compute instance is used to monitor and evaluate its performance and resource utilization, and serves as the basis for resource scheduling. For example, a compute instance running under high load, characterized by a CPU consistently near full capacity and memory usage exceeding 80%, indicates that the instance is handling a large number of computational tasks; conversely, a compute instance idle with low resource utilization indicates that resources are not being fully utilized.
[0117] Backup physical machines are other physical machines in a cloud computing platform besides the target physical machine. They are available for deployment and use, excluding the target physical machine currently running a specific compute instance. Backup physical machines typically remain idle or under low load. For example, if a compute instance needs to be removed from the target physical machine, the backup physical machine can quickly compute the instance, ensuring service continuity and high availability of the cloud computing platform. The presence of backup physical machines enhances the resilience and disaster recovery capabilities of the cloud computing platform.
[0118] Instance migration is the process of moving a running compute instance from one physical machine to another, while ensuring, as far as possible, uninterrupted or minimally disrupted, the applications running on top of the compute instance. Instance migration involves steps such as saving the current running state of the compute instance, rebuilding or restoring that running state on a standby physical machine, and reconfiguration.
[0119] For example, firstly, the running status (processor utilization, memory usage, disk I / O speed, network traffic, runtime, system load, and abnormal or error information) of all running computing instances on the target physical machine of the compute-intensive type is collected. Based on this, it can be determined whether each computing instance is in a highly active state. If so, the target computing instance of the image generation application is migrated to a spare physical machine of another compute-intensive type: the running status of the target computing instance running the image generation application is frozen, the running status is reproduced on the new spare hardware, and the surrounding service links are reconfigured, etc., to ensure a seamless transition of the running image generation application.
[0120] In the embodiments described in this specification, by monitoring the running status of each computing instance on the target physical machine, the high-load target computing instance is actively migrated to the backup physical machine, ensuring the resource balance of the target physical machine and the service continuity of the target computing instance, thereby enhancing the availability and stability of resource scheduling.
[0121] In one optional embodiment of this specification, the multiple resource usage types include a resource-exclusive type, and the target resource mapping relationship corresponding to the target resource usage type includes a one-to-one mapping relationship;
[0122] Step 204 includes the following specific steps:
[0123] When the target resource usage type is dedicated resource type, the physical resource specifications corresponding to the virtual resource specifications are mapped based on a one-to-one mapping relationship.
[0124] Dedicated resource allocation in a cloud computing platform maintains a one-to-one mapping between virtual and physical resources allocated to computing instances. This ensures that each computing instance is directly bound to and exclusively uses physical resources of a specific specification, achieving maximum isolation and performance guarantees in resource usage. Dedicated resource allocation is suitable for application scenarios with stringent requirements for resource availability, performance stability, and security, such as financial trading systems, large enterprise databases, and real-time data analytics.
[0125] For example, when the target resource usage type is dedicated resource type, based on a one-to-one mapping relationship, the physical resource specifications corresponding to the virtual resource specifications (16 virtual processor cores; 64GB virtual memory; 200GB virtual storage) are mapped to: 16 physical processor cores; 64GB physical memory; 200GB physical storage.
[0126] In the embodiments described in this specification, a one-to-one mapping is used to achieve exclusive resource access, providing completely isolated physical resources for high-performance demand scenarios, ensuring stability and security, and improving the reliability and efficiency of resources.
[0127] In one optional embodiment of this specification, the multiple resource usage types include resource sharing types, and the target resource mapping relationship corresponding to the target resource usage type includes a one-to-many mapping relationship;
[0128] Step 204 includes the following specific steps:
[0129] When the target resource usage type is resource sharing, the physical resource specifications corresponding to the virtual resource specifications are mapped based on the one-to-many mapping relationship.
[0130] Resource sharing in a cloud computing platform maintains a one-to-many mapping between virtual and physical resources allocated to computing instances. This ensures that each computing instance does not directly bind to and exclusively occupy physical resources of a specific specification. Multiple computing instances share a small amount of physical resources to meet the needs of applications sensitive to resource costs and with a certain tolerance for performance fluctuations. Resource exclusivity is suitable for application scenarios with strict requirements for resource availability, performance stability, and security, such as web servers, testing environments, and development platforms.
[0131] It should be noted that the 1:1 mapping relationship can be flexibly set according to the differences in the actual needs of the computing instance. For example, it can be configured to map 1 virtual resource unit to 2 physical resource units (1:2), or 1 virtual resource unit to 4 physical resource units (1:4), and so on, so as to achieve efficient resource reuse and cost optimization.
[0132] For example, when the target resource usage type is resource exclusive type 2, based on the 1:4 mapping relationship, the physical resource specifications corresponding to the virtual resource specifications (16 virtual processor cores; 64GB virtual memory; 200GB virtual storage) are mapped to: 14 physical processor cores; 16GB physical memory; 50GB physical storage.
[0133] In the embodiments described in this specification, resource sharing is achieved through one-to-many mapping, which flexibly adapts to cost-sensitive applications, enables the reuse of physical resources among multiple computing instances, optimizes costs while meeting performance fluctuation tolerance, and reduces resource costs.
[0134] In one optional embodiment of this specification, the target computing instance includes a resource-dedicated instance and a resource-shared instance, the virtual resource specifications include a first virtual resource specification for the resource-dedicated instance and a second virtual resource specification for the resource-shared instance, the target resource usage type of the resource-dedicated instance is a resource-dedicated type, the target resource usage type of the resource-shared instance is a resource-shared type, the target resource mapping relationship corresponding to the resource-dedicated type is a one-to-one mapping relationship, and the target resource mapping relationship corresponding to the resource-shared type is a one-to-many mapping relationship;
[0135] Step 204 includes the following specific steps:
[0136] Based on a one-to-one mapping relationship, the first physical resource specification corresponding to the first virtual resource specification is obtained, and based on a one-to-many mapping relationship, the second physical resource specification corresponding to the second virtual resource specification is obtained.
[0137] Correspondingly, step 206 involves allocating target physical resources that conform to the physical resource specifications from the physical resources of the target physical machine, including the following specific steps:
[0138] From the physical resources of the target physical machine, a first target physical resource conforming to the first physical resource specification is obtained, and from the physical resources of the target physical machine, a second target physical resource conforming to the second physical resource specification is obtained.
[0139] Correspondingly, step 206 involves deploying the target computing instance based on the target physical resources, including the following specific steps:
[0140] Based on the first target physical resource, deploy a resource-dedicated instance, and based on the second target physical resource, deploy a resource-shared instance.
[0141] Dedicated resource instances are target compute instances of the dedicated resource type. Shared resource instances are target compute instances of the shared resource type.
[0142] The first virtual resource specification is the resource specification for logical resources determined through virtualization technology and applicable to resource-dedicated instances. The virtual resource specification defines the resource specifications requested for scheduling by resource-dedicated instances, including but not limited to: virtual processor specifications, virtual memory specifications, virtual storage specifications, and virtual network hardware specifications.
[0143] The second virtual resource specification is a resource specification for logical resources determined through virtualization technology and applicable to resource-sharing instances. The virtual resource specification defines the resource specifications requested for scheduling by resource-sharing instances, including but not limited to: virtual processor specifications, virtual memory specifications, virtual storage specifications, and virtual network hardware specifications.
[0144] The first physical resource specification is the resource specification of the physical resource obtained by mapping the first virtual resource specification through a one-to-one mapping relationship. The first physical resource specification ensures that the resource-dedicated instance obtains physical resources that perfectly match the virtual request. For example, if the first virtual resource specification is 16 virtual processor cores, 64GB virtual memory, and 200GB virtual storage, then the first physical resource specification will also be 16 physical processor cores, 64GB physical memory, and 200GB physical storage.
[0145] The second physical resource specification is the physical resource specification mapped from the second virtual resource specification through a 1:2 mapping relationship. The second physical resource specification causes resource-sharing instances to obtain physical resources that do not match the virtual request, requiring them to share resources with other resource-sharing instances. The actual physical resource configuration will be smaller than the proportionally calculated virtual resource request. For example, if the second virtual resource specification request is 8 virtual processor cores, 32GB of virtual memory, and 100GB of virtual storage, under a 1:2 mapping relationship, the second physical resource specification would be 4 physical processor cores, 16GB of physical memory, and 50GB of physical storage.
[0146] The first target physical resource is a portion of hardware resources that conforms to the first physical resource specification and is allocated from the physical resources of the target physical machine, specifically for deploying and running resource-dedicated instances. The first target physical resource includes, but is not limited to: target physical processor, target physical memory, target physical storage, and target physical network hardware.
[0147] The second target physical resource refers to a portion of hardware resources conforming to the second physical resource specifications allocated from the physical resources of the target physical machine, used to deploy and run resource-sharing instances. The second target physical resource includes, but is not limited to: target physical processor, target physical memory, target physical storage, and target physical network hardware.
[0148] For the specific methods or optional methods of each step in the embodiments of this specification, please refer to the embodiments of the above specification, which will not be repeated here.
[0149] Figure 4 This diagram illustrates the deployment of different computing instances in a resource scheduling method according to an embodiment of this specification, as shown below. Figure 4 As shown:
[0150] For the client:
[0151] For resource-dedicated instances, the resource mapping is 1:1. A resource request sent to a resource-dedicated instance has a virtual resource specification of 4 processor cores. The client believes it can schedule a total of 100 processor cores. For resource-shared instances (type 1), the resource mapping is 1:2. A resource request sent to a resource-shared instance has a virtual resource specification of 4 processor cores. The client believes it can schedule a total of 200 processor cores. For resource-shared instances (type 2), the resource mapping is 1:4. A resource request sent to a resource-shared instance has a virtual resource specification of 4 processor cores. The client believes it can schedule a total of 400 processor cores.
[0152] Specifically, the ratio of resource mapping relationships for dedicated resource types to those for resource-sharing type 1 is 1:2, and the ratio of resource mapping relationships for dedicated resource types to those for resource-sharing type 2 is 1:4. Correspondingly, the ratios of total resource specifications are also 1:2 and 1:4, respectively.
[0153] In actual resource scheduling:
[0154] Resource requests sent to dedicated compute instances, where the virtual resource specification is 4 processor cores. Resource requests sent to dedicated compute instances, where the virtual resource specification is 4 processor cores. Resource requests sent to shared compute instances (Resource Sharing Type 2), where the virtual resource specification is 4 processor cores.
[0155] All three require processing by the deduction converter to obtain the physical resource specifications of 4 processor cores for the dedicated resource type computing instance, 2 processor cores for the resource sharing type 1 computing instance, and 1 processor core for the resource sharing type 2 computing instance. The total schedulable resource specifications for all three are 100 processor cores.
[0156] The following is in conjunction with the appendix Figure 5 Taking the application of the resource scheduling method provided in this specification in a single-machine, cross-product, strongly hybrid deployment as an example, the resource scheduling method will be further explained. Among other things, Figure 5 This specification illustrates a flowchart of a resource scheduling method for a single-machine, cross-product, hybrid deployment, according to an embodiment of this specification. The method is applied to a scheduling node of a cloud computing platform and includes the following specific steps:
[0157] Step 502: Obtain the resource parameters of the physical resources of each physical machine in the cloud computing platform. Based on the resource parameters, determine the target physical machine and deploy computing instances of various resource usage types on the target physical machine.
[0158] For example, a target physical machine PM1 exists in the cloud computing platform, with the following physical resource parameters: 32 physical processor cores, 128GB of RAM, and 2TB of hard disk space. Currently, multiple computing instances with different resource usage types have been deployed on the target physical machine, including dedicated resource instances and shared resource instances.
[0159] Step 504: Receive a resource request from the first client for a dedicated resource instance deployed on the target physical machine, wherein the resource request includes a first virtual resource specification and a dedicated resource type.
[0160] For example, client C1 wants to deploy a dedicated instance of resources to run its financial system database, requiring highly stable and secure resources. The resource request includes the following initial virtual resource specifications: 8 vCPUs, 32GB vRAM (Random Access Memory), and 500GB vStorage, specifying the resource usage type as "Dedicated Resource".
[0161] Step 506: Identify whether the first virtual resource specification exceeds the total resource specification of the target physical machine's virtual resources.
[0162] For example, upon receiving a request, it is determined whether the first virtual resource specification (8 vCPU, 32 GB vRAM, 500 GB vStorage) requested by C1 exceeds the total amount of virtual resources currently available to the target physical machine PM1.
[0163] Step 508: If not, based on the one-to-one mapping relationship, map to obtain the first physical resource specification corresponding to the first virtual resource specification.
[0164] For example, without exceeding the limit, based on a one-to-one mapping relationship, the first physical resource specification allocated to C1 is: 8 CPUs, 32GB, and 500GB Storage.
[0165] Step 510: Identify whether the first physical resource specification exceeds the physical resource specification threshold corresponding to the resource exclusive type.
[0166] Step 512: If not, obtain the first target physical resource that conforms to the first physical resource specification from the current physical resources of the target physical machine.
[0167] For example, if the first physical resource specification (8pCPU, 32GB RAM, 500GB Storage) does not exceed the maximum threshold of the exclusive resource type, then the first target physical resource (8CPU, 32GB RAM, 500GB Storage) is partitioned from the physical resources of PM1.
[0168] Step 514: Deploy a dedicated instance based on the first target physical resource.
[0169] For example, based on the pre-allocated primary target physical resources (8 CPUs, 32GB RAM, 500GB Storage), a dedicated instance of the financial system database was successfully deployed and is running.
[0170] Step 516: Obtain the running status of each compute instance deployed on the target physical machine, and based on the running status of each compute instance, determine whether to migrate the dedicated resource instance to the standby physical machine.
[0171] Step 518: Receive a resource request from the second client for a resource sharing instance deployed on the target physical machine, wherein the resource request includes a second virtual resource specification and a resource sharing type.
[0172] For example, client C2 wants to deploy a resource-shared instance for web services, allowing for some degree of resource fluctuation to reduce costs. The resource request includes: 4 vCPUs, 8GB vRAM, 100GB vStorage, and specifies the resource usage type as "Resource-Shared Type 1".
[0173] Step 520: Identify whether the second virtual resource specification exceeds the total resource specification of the target physical machine's virtual resources.
[0174] For example, upon receiving a request, it identifies whether the second virtual resource specification (4 vCPU, 8 GB vRAM, 100 GB vStorage) requested by C2 exceeds the total amount of virtual resources currently available to the target physical machine PM1.
[0175] Step 522: If not, based on the one-to-many mapping relationship, map to obtain the second physical resource specification corresponding to the second virtual resource specification.
[0176] For example, if there is no excess, based on the 1:2 mapping relationship corresponding to resource sharing type 1, the physical resources required after mapping are: 2 CPUs, 4GB RAM, and 50GB Storage.
[0177] Step 524: Identify whether the second physical resource specification exceeds the physical resource specification threshold corresponding to the resource sharing type.
[0178] Step 526: Obtain second target physical resources that conform to the second physical resource specifications from the current physical resources of the target physical machine.
[0179] For example, if the second physical resource specification (2 CPU, 4GB RAM, 50GB Storage) does not exceed the maximum threshold for the exclusive resource type, then the second target physical resource (2 CPU, 4GB RAM, 50GB Storage) is partitioned from the physical resources of PM1.
[0180] Step 528: Deploy a resource-sharing instance based on the second target physical resources.
[0181] For example, a resource-shared instance for web services was successfully deployed based on the pre-allocated secondary target physical resources (2 CPUs, 4GB RAM, 50GB Storage).
[0182] Step 530: Obtain the running status of each computing instance deployed on the target physical machine, and based on the running status of each computing instance, determine whether to migrate the resource-sharing instance to the standby physical machine.
[0183] In the embodiments described in this specification, computing instances with various resource usage types are deployed on the target physical machine, achieving resource-sharing deployment of the target physical machine. For resource requests from the target computing instances, the conversion from virtual resource specifications to physical resource specifications under different resource usage types is flexibly completed, thereby flexibly allocating target physical resources to complete instance deployment. Based on resource-sharing deployment, a "first-come, first-served" strong hybrid resource deployment is implemented. Constraints are implemented in three dimensions: virtual resource dimension, virtual resource conversion dimension, and custom resource dimension, ensuring a balance between ensuring the stability of the cloud computing platform and meeting the needs of large-scale computing instances. A unified resource allocation strategy is implemented for dedicated resource instances and resource-sharing instances, while carefully considering the specific limitations and requirements of various resource specifications to achieve more refined resource scheduling. After switching to the strong hybrid deployment mode, based on the running status of each computing instance, it is determined whether to migrate the resource-sharing instance to a backup physical machine, ensuring the continued uninterrupted operation of the existing deployed computing instances. This not only maintains the service level agreement compliance of dedicated resource instances and strengthens the stability of the main resource scheduling link, but also avoids any performance interference to existing instances, thereby comprehensively guaranteeing customer experience and service continuity.
[0184] Corresponding to the above method embodiments, this specification also provides cloud computing platform embodiments. Figure 6 A schematic diagram of the structure of a cloud computing platform provided in one embodiment of this specification is shown. Figure 6 As shown, the cloud computing platform includes a server 610 and a client 620. The server 610 includes a scheduling node 6110 and a target physical machine 6120. The target physical machine 6120 has computing instances with various resource usage types deployed on it. Different resource usage types correspond to different resource mapping relationships. The resource mapping relationship represents the mapping relationship between virtual resources and physical resources.
[0185] Client 620 is used to send resource requests for a target computing instance deployed on a target physical machine 6120, wherein the resource request carries virtual resource specifications and target resource usage type;
[0186] The scheduling node 6110 is used to receive resource requests, map the physical resource specifications corresponding to the virtual resource specifications based on the target resource mapping relationship corresponding to the target resource usage type, and send the instance deployment instruction to the target physical machine 6120.
[0187] The target physical machine 6120 is used to respond to the instance deployment command, to partition the target physical resources that meet the physical resource specifications from the physical resources of the target physical machine 6120, and to deploy the target computing instance based on the target physical resources.
[0188] In the embodiments described in this specification, computing instances with various resource usage types are deployed on the target physical machine of the cloud computing platform, realizing resource-sharing deployment of the target physical machine. The scheduling node flexibly completes the conversion of virtual resource specifications to physical resource specifications under the target resource usage type in response to the resource requests of the target computing instance initiated by the client, and then flexibly allocates the target physical resources to complete the instance deployment on the target physical machine. On the basis of resource-sharing deployment, a "first-come, first-served" strong hybrid deployment of resources is realized, which fully adapts to the flexible actual resource specifications brought about by diverse specific needs, improves the stability of computing instances and the resource utilization rate on the physical machine, realizes highly flexible and highly available resource scheduling, improves the response speed and service continuity of the cloud computing platform, and enhances the user experience of the cloud computing platform.
[0189] The above is an illustrative scheme of a cloud computing platform according to this embodiment. It should be noted that the technical solution of this cloud computing platform and the technical solution of the resource scheduling method described above belong to the same concept. For details not described in detail in the technical solution of the cloud computing platform, please refer to the description of the technical solution of the resource scheduling method described above.
[0190] Corresponding to the above method embodiments, this specification also provides embodiments of a resource scheduling device. Figure 7 A schematic diagram of a resource scheduling device according to one embodiment of this specification is shown. Figure 7 As shown, the device includes:
[0191] The receiving module 702 is configured to receive resource requests for target computing instances deployed on a target physical machine. The target physical machine has computing instances with multiple resource usage types. Different resource usage types correspond to different resource mapping relationships. The resource mapping relationship represents the mapping relationship between virtual resources and physical resources. The resource request carries the virtual resource specifications and the target resource usage type.
[0192] The mapping module 704 is configured to map the physical resource specifications corresponding to the virtual resource specifications based on the target resource mapping relationship corresponding to the target resource usage type.
[0193] Deployment module 706 is configured to partition target physical resources that conform to the physical resource specifications from the physical resources of the target physical machine, and deploy target computing instances based on the target physical resources.
[0194] Optionally, the device further includes:
[0195] The first identification module is configured to identify whether the virtual resource specifications exceed the total resource specifications of the target physical machine's virtual resources;
[0196] Correspondingly, the mapping module 704 is further configured as follows:
[0197] If not, based on the target resource mapping relationship corresponding to the target resource usage type, the physical resource specifications corresponding to the virtual resource specifications are mapped.
[0198] Optionally, different resource usage types correspond to different physical resource specification thresholds;
[0199] Correspondingly, the device also includes:
[0200] The second identification module is configured to identify whether the physical resource specifications exceed the physical resource specification threshold corresponding to the target resource usage type.
[0201] Correspondingly, deployment module 706 is further configured as follows:
[0202] If not, obtain target physical resources that conform to the physical resource specifications from the physical resources of the target physical machine.
[0203] Optionally, the device further includes:
[0204] The upper limit deployment module is configured to, if so, allocate target physical resources that meet the physical resource specification threshold from the physical resources of the target physical machine.
[0205] Optionally, the device further includes:
[0206] The initial deployment module is configured to obtain the resource parameters of the physical resources of each physical machine in the cloud computing platform; determine the target physical machine based on the resource parameters; and deploy computing instances of various resource usage types on the target physical machine.
[0207] Optionally, the initial deployment module is further configured as follows:
[0208] Perform resource initialization on the target physical resources; deploy the target computing instance based on the initialized target physical resources.
[0209] Optionally, the device further includes:
[0210] The operation assurance module is configured to obtain the running status of each computing instance deployed on the target physical machine; based on the running status of each computing instance, determine whether to migrate the target computing instance to a backup physical machine, wherein the backup physical machine is another physical machine in the cloud computing platform other than the target physical machine.
[0211] Optionally, the various resource usage types include dedicated resource types, and the target resource mapping relationship corresponding to the target resource usage type includes a one-to-one mapping relationship;
[0212] Correspondingly, the mapping module 704 is further configured as follows:
[0213] When the target resource usage type is dedicated resource type, the physical resource specifications corresponding to the virtual resource specifications are mapped based on a one-to-one mapping relationship.
[0214] Optionally, the multiple resource usage types include resource sharing types, and the target resource mapping relationship corresponding to the target resource usage type includes a one-to-many mapping relationship;
[0215] Correspondingly, the mapping module 704 is further configured as follows:
[0216] When the target resource usage type is resource sharing, the physical resource specifications corresponding to the virtual resource specifications are mapped based on the one-to-many mapping relationship.
[0217] Optionally, the target computing instance includes a resource-dedicated instance and a resource-shared instance, and the virtual resource specification includes a first virtual resource specification for the resource-dedicated instance and a second virtual resource specification for the resource-shared instance. The target resource usage type of the resource-dedicated instance is the resource-dedicated type, and the target resource usage type of the resource-shared instance is the resource-shared type. The target resource mapping relationship corresponding to the resource-dedicated type is a one-to-one mapping relationship, and the target resource mapping relationship corresponding to the resource-shared type is a one-to-many mapping relationship.
[0218] Correspondingly, the mapping module 704 is further configured as follows:
[0219] Based on a one-to-one mapping relationship, the first physical resource specification corresponding to the first virtual resource specification is obtained, and based on a one-to-many mapping relationship, the second physical resource specification corresponding to the second virtual resource specification is obtained.
[0220] Correspondingly, deployment module 706 is further configured as follows:
[0221] From the physical resources of the target physical machine, a first target physical resource conforming to the first physical resource specification is obtained, and a second target physical resource conforming to the second physical resource specification is obtained from the physical resources of the target physical machine; based on the first target physical resource, a resource-dedicated instance is deployed, and based on the second target physical resource, a resource-shared instance is deployed.
[0222] In the embodiments described in this specification, computing instances with various resource usage types are deployed on the target physical machine, realizing resource-sharing deployment of the target physical machine. For the resource requests of the target computing instances, the conversion from virtual resource specifications to physical resource specifications under the target resource usage type is flexibly completed, and then the target physical resources are flexibly allocated to complete the instance deployment. On the basis of resource-sharing deployment, a "first-come, first-served" strong hybrid resource deployment is realized, which fully adapts to the flexible actual resource specifications brought about by diverse specific needs, improves the stability of computing instances and the resource utilization rate on the physical machine, and realizes highly flexible and highly available resource scheduling.
[0223] The above is an illustrative scheme of a resource scheduling device according to this embodiment. It should be noted that the technical solution of this resource scheduling device and the technical solution of the resource scheduling method described above belong to the same concept. For details not described in detail in the technical solution of the resource scheduling device, please refer to the description of the technical solution of the resource scheduling method described above.
[0224] Figure 8 This specification illustrates a structural block diagram of a computing device according to one embodiment. The components of the computing device 800 include, but are not limited to, a memory 810 and a processor 820. The processor 820 is connected to the memory 810 via a bus 830, and a database 850 is used to store data.
[0225] The computing device 800 also includes an access device 840, which enables the computing device 800 to communicate via one or more networks 860. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 840 may include one or more of any type of wired or wireless network hardware (e.g., a Network Interface Controller (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, cellular network hardware, a Bluetooth interface, or Near Field Communication (NFC).
[0226] In one embodiment of this specification, the above-described components of the computing device 800 and Figure 8 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 8 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0227] The computing device 800 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 800 can also be a mobile or stationary server.
[0228] The processor 820 is used to execute the following computer program / instructions, which, when executed by the processor, implement the steps of the resource scheduling method described above.
[0229] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the resource scheduling method described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the resource scheduling method described above.
[0230] An embodiment of this specification also provides a computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the resource scheduling method described above.
[0231] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the resource scheduling method described above belong to the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the resource scheduling method described above.
[0232] An embodiment of this specification also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the resource scheduling method described above.
[0233] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product and the technical solution of the resource scheduling method described above belong to the same concept. For details not described in detail in the technical solution of the computer program product, please refer to the description of the technical solution of the resource scheduling method described above.
[0234] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0235] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0236] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.
[0237] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0238] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A resource scheduling method, comprising: Receive resource requests for target computing instances deployed on target physical machines, wherein the target physical machines have computing instances with multiple resource usage types deployed on them, and different resource usage types correspond to different resource mapping relationships. The resource mapping relationship represents the mapping relationship between virtual resources and physical resources, and the resource request carries the virtual resource specifications and the target resource usage type. Based on the target resource mapping relationship corresponding to the target resource usage type, the physical resource specification corresponding to the virtual resource specification is mapped to obtain the physical resource specification; From the physical resources of the target physical machine, target physical resources that conform to the physical resource specifications are allocated, and the target computing instance is deployed based on the target physical resources.
2. The method according to claim 1, before mapping the physical resource specification corresponding to the virtual resource specification based on the target resource mapping relationship corresponding to the target resource usage type, further comprising: Identify whether the virtual resource specifications exceed the total virtual resource specifications of the target physical machine; The process of mapping the virtual resource specifications to the physical resource specifications based on the target resource usage type includes: If not, the physical resource specifications corresponding to the virtual resource specifications are mapped based on the target resource usage type and the target resource mapping relationship.
3. The method according to claim 1 or 2, wherein different resource usage types correspond to different physical resource specification thresholds; Before allocating target physical resources conforming to the physical resource specifications from the physical resources of the target physical machine, the method further includes: Identify whether the physical resource specifications exceed the physical resource specification threshold corresponding to the target resource usage type; The step of allocating target physical resources conforming to the physical resource specifications from the physical resources of the target physical machine includes: If not, target physical resources conforming to the physical resource specifications are allocated from the physical resources of the target physical machine.
4. The method according to claim 3, after identifying whether the physical resource specification exceeds the physical resource specification threshold corresponding to the target resource usage type, further comprising: If so, target physical resources that meet the physical resource specification threshold are allocated from the physical resources of the target physical machine.
5. The method of claim 1, further comprising, before receiving the resource request for the target computing instance deployed on the target physical machine: Obtain the resource parameters of the physical resources of each physical machine in the cloud computing platform; Based on the aforementioned resource parameters, the target physical machine is determined; Deploy computing instances with various resource usage types on the target physical machine.
6. The method according to claim 1, wherein deploying the target computing instance based on the target physical resources comprises: Perform resource initialization processing on the target physical resources; Based on the target physical resources that have been initialized, deploy the target computing instance.
7. The method according to claim 1, further comprising, after deploying the target computing instance based on the target physical resources: Obtain the running status of each computing instance deployed on the target physical machine; Based on the running status of each computing instance, it is determined whether to migrate the target computing instance to a backup physical machine, wherein the backup physical machine is another physical machine in the cloud computing platform besides the target physical machine.
8. The method according to claim 1, wherein the multiple resource usage types include a resource-exclusive type, and the target resource mapping relationship corresponding to the target resource usage type includes a one-to-one mapping relationship; The process of mapping the virtual resource specifications to the physical resource specifications based on the target resource usage type includes: When the target resource usage type is a dedicated resource type, the physical resource specifications corresponding to the virtual resource specifications are mapped based on the one-to-one mapping relationship.
9. The method according to claim 1, wherein the multiple resource usage types include resource sharing types, and the target resource mapping relationship corresponding to the target resource usage type includes a one-to-many mapping relationship; The process of mapping the virtual resource specifications to the physical resource specifications based on the target resource usage type includes: When the target resource usage type is resource sharing type, the physical resource specifications corresponding to the virtual resource specifications are mapped based on the one-to-many mapping relationship.
10. The method according to claim 1, wherein the target computing instance includes a resource-dedicated instance and a resource-shared instance, the virtual resource specification includes a first virtual resource specification of the resource-dedicated instance and a second virtual resource specification of the resource-shared instance, the target resource usage type of the resource-dedicated instance is a resource-dedicated type, the target resource usage type of the resource-shared instance is a resource-shared type, the target resource mapping relationship corresponding to the resource-dedicated type is a one-to-one mapping relationship, and the target resource mapping relationship corresponding to the resource-shared type is a one-to-many mapping relationship; The process of mapping the virtual resource specifications to the physical resource specifications based on the target resource usage type includes: Based on the one-to-one mapping relationship, the first physical resource specification corresponding to the first virtual resource specification is obtained, and based on the one-to-many mapping relationship, the second physical resource specification corresponding to the second virtual resource specification is obtained. The step of allocating target physical resources conforming to the physical resource specifications from the physical resources of the target physical machine includes: From the physical resources of the target physical machine, a first target physical resource conforming to the first physical resource specification is obtained, and from the physical resources of the target physical machine, a second target physical resource conforming to the second physical resource specification is obtained. Deploying the target computing instance based on the target physical resources includes: Based on the first target physical resource, deploy the resource-dedicated instance, and based on the second target physical resource, deploy the resource-shared instance.
11. A cloud computing platform, comprising a server and a client, wherein the server includes a scheduling node and a target physical machine, and the target physical machine is deployed with computing instances of various resource usage types, the different resource usage types corresponding to different resource mapping relationships, the resource mapping relationship representing the mapping relationship between virtual resources and physical resources; The client is configured to send resource requests for a target computing instance deployed on the target physical machine, wherein, The resource request carries the virtual resource specifications and the target resource usage type; The scheduling node is used to receive the resource request, map the physical resource specifications corresponding to the virtual resource specifications based on the target resource usage type, and send the instance deployment instruction to the target physical machine. The target physical machine is configured to, in response to the instance deployment command, allocate target physical resources that conform to the physical resource specifications from the physical resources of the target physical machine, and deploy the target computing instance based on the target physical resources.
12. A computing device, comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1 to 10.
13. A computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 10.
14. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 10.