Virtual computing resource scheduling method and control plane component
By describing virtual computing resources with unified computing power and using side car mode scheduling, the problem of unified scheduling and resource integration of physical computing resource management in the existing technology is solved, the resource utilization rate and management efficiency are improved, operation and maintenance are simplified, and costs are reduced .
Patent Information
- Application Number
- PCT/CN2024/094275
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-02
- Filing Date
- 2024-05-20
- Publication Date
- 2024-12-05
AI Technical Summary
When managing physical computing resources, it is difficult for the existing technology to achieve unified scheduling and resource integration, resulting in low resource utilization and does not support unified scheduling of multiple resource types, and the complex architecture and operation and maintenance costs are high.
By describing virtual computing resources by unified computing power, based on computing power measurement and binding physical computing resources, resource scheduling is used in the side car mode, blocking the differences between different resource types, realizing resource segmentation and aggregation, and improving resource utilization.
It improves the overall resource utilization efficiency of physical computing resources, realizes efficient utilization of fragmented resources, simplifies resource management and operation and maintenance, and reduces costs.
Smart Images

Figure CN2024094275_05122024_PF_FP_ABST
Abstract
Description
Virtual computing resource scheduling method and control plane component
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on June 2, 2023, with application number 202310653084.8 and application name “Scheduling Method and Control Plane Component for Virtual Computing Resources”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] One or more embodiments of this specification relate to the field of resource scheduling, and in particular, to a scheduling method and control plane component for virtual computing resources. Background Art
[0003] The rise of container technology has led to the development of Kubernetes (K8s), an automated container orchestration software. Upon receiving a user's resource request for a service, K8s creates a container to run the service. Based on the service's resource type, it allocates physical computing resources of the corresponding resource type to the service and binds them to the container. The container can also be scaled up or down based on demand. As the number and types of physical computing resources that K8s can manage increase, improving the unified scheduling of physical computing resources and boosting cluster efficiency has become a pressing issue.
[0004] Summary of the Invention
[0005] In view of this, one or more embodiments of this specification provide a scheduling method and control plane component for virtual computing resources to solve the problems existing in the related art.
[0006] To achieve the above objectives, one or more embodiments of this specification provide the following technical solutions:
[0007] According to a first aspect of one or more embodiments of this specification, a scheduling method for virtual computing resources is provided. The method is applied to a control plane component deployed in a resource management platform for managing virtual computing resources, wherein the virtual computing resources are custom virtual computing resources described by computing power. The method comprises:
[0008] Obtain the computing power requirements of the target virtual computing resources to be created corresponding to the target service;
[0009] Determining an expected state for the target virtual computing resource based on the computing power demand and resource state information of physical computing resources of multiple resource types managed by the resource management platform; wherein the expected state includes a target physical computing resource corresponding to the target virtual computing resource;
[0010] According to the expected state, a first service component corresponding to the target virtual computing resource is deployed on the first resource node allocated to the target service in sidecar mode, and the target physical computing resource is bound to the target virtual computing resource; wherein, the first service component includes a main component for running the target service and a sidecar component for assisting the target service in resource scheduling of the target virtual computing resource.
[0011] According to a second aspect of one or more embodiments of this specification, a control plane component is provided, including:
[0012] A control component is used to obtain the computing power requirements of the target virtual computing resources to be created corresponding to the target service;
[0013] The control component is further configured to determine, based on the computing power requirement, a target physical computing resource corresponding to the target virtual computing resource from physical computing resources of multiple resource types managed by the resource management platform;
[0014] A scheduling component is used to deploy a first service component corresponding to the target virtual computing resource on the first resource node allocated to the target service in a sidecar mode, and bind the target physical computing resource with the target virtual computing resource; wherein, the first service component includes a main component for running the target service and a sidecar component for assisting the target service in resource scheduling of the target virtual computing resource.
[0015] According to a third aspect of one or more embodiments of this specification, an electronic device is provided, including:
[0016] processor;
[0017] a memory for storing processor-executable instructions;
[0018] The processor implements the method described in the first aspect by running the executable instructions.
[0019] According to a fourth aspect of one or more embodiments of this specification, a computer-readable storage medium is provided, on which computer instructions are stored. When the instructions are executed by a processor, the steps of the method described in the first aspect are implemented.
[0020] In the above technical solution, the required computing power of the target service and the physical computing resources of various resource types are measured and described through unified computing power, and virtual computing resources described based on computing power are created. The virtual computing resources are bound to the corresponding physical computing resources based on computing power, and the virtual computing resources are scheduled as allocable resource units, so that the differences in physical computing resources of different resource types can be shielded, so that the physical computing resources can be divided and aggregated based on the unified computing power; when the target physical computing resources that meet the computing power requirements are determined from the physical computing resources of multiple resource types and bound to the virtual computing resources, the fragmented physical computing resources can be bound to the virtual computing resources as needed, so that the resource integration of the physical computing resources can be realized, the utilization rate of the fragmented resources can be improved, and the overall resource utilization efficiency can be higher. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] FIG1 is a schematic diagram of the architecture of a scheduling system for virtual computing resources provided by an exemplary embodiment;
[0022] FIG2 is a flow chart of a method for scheduling virtual computing resources provided by an exemplary embodiment;
[0023] 3a-3e are schematic diagrams of the distribution of physical computing resources provided by an exemplary embodiment;
[0024] FIG4 is a schematic diagram of the structure of a service component provided by an exemplary embodiment;
[0025] FIG5 is a schematic diagram of a control plane assembly provided by an exemplary embodiment;
[0026] FIG6 is a flow chart of another method for scheduling virtual computing resources provided by an exemplary embodiment;
[0027] FIG7 is a schematic structural diagram of a scheduling device for virtual computing resources provided by an exemplary embodiment;
[0028] FIG8 is a schematic structural diagram of an electronic device provided by an exemplary embodiment. DETAILED DESCRIPTION
[0029] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The implementations described in the following exemplary embodiments are not intended to represent all implementations consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with certain aspects of one or more embodiments of this specification, as detailed in the appended claims.
[0030] It should be noted that in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than those described in this specification. In addition, a single step described in this specification may be broken down into multiple steps for description in other embodiments, and multiple steps described in this specification may be combined into a single step for description in other embodiments.
[0031] The rise of container technology has led to the creation of Kubernetes (K8s), an automated container orchestration software. After receiving a user's resource request for a service, K8s can create a container to run the service. Based on the resource type corresponding to the service in the resource request, it allocates physical computing resources of the corresponding resource type to the service and binds them to the container. The container can also be expanded or reduced in size based on demand. Nowadays, more and more companies are commercializing AI applications, and the scale of services is also increasing. As the number of services increases, the number and types of physical computing resources that K8s can manage are also increasing. Ultimately, after reaching a certain scale, how to improve the unified scheduling of the overall physical computing resources and improve cluster efficiency becomes a key issue in improving cost-effectiveness and profitability.
[0032] Related technologies are used to schedule physical computing resources. Taking the resource scheduling of the Graphics Processing Unit (GPU) as an example, the technical solutions adopted may include the solution of using the whole card, as well as sharing and isolation solutions such as qGPU, cGPU, vCUDA, rCUDA, and gpushare. Each set of technical solutions implements and deploys its own control plane components, such as scheduling components (Scheduler) and device plug-ins (DevicePlugin), etc. Each set of technical solutions is implemented and deployed separately, making the architecture and operation and maintenance very complicated. The scheduling of physical computing resources is based on the specified scalar as the resource unit, and the addition and subtraction are based on the specified scalar during scheduling, which makes the resource utilization rate low, and does not support the unified scheduling of physical computing resources of multiple resource types.
[0033] In view of this, this specification proposes a scheduling method for virtual computing resources. Through the pooling technology of physical computing resources, various types of physical computing resources are described in a unified computing power manner. The resource management platform supports custom virtual computing resources described based on the computing power they can provide; based on the computing power requirements of the virtual computing resources to be created, a target virtual computing resource described based on the computing power requirements is created, and then a target physical computing resource is determined for the target virtual computing resource from the multiple types of physical computing resources managed, and the target physical computing resource is bound to allocate the bound target virtual computing resource to the target service.
[0034] During implementation, the computing power requirement of the target virtual computing resource to be created corresponding to the target service is obtained; according to the computing power requirement, according to the computing power requirement and the resource status information of the physical computing resources of multiple resource types managed by the resource management platform, the expected state of the target virtual computing resource is determined; wherein, the expected state includes the target physical computing resource corresponding to the target virtual computing resource; according to the expected state, a sidecar mode is adopted to deploy the first service component corresponding to the target virtual computing resource on the first resource node allocated to the target service, and the target physical computing resource is bound to the target virtual computing resource; wherein, the first service component includes a main component for running the target service and a sidecar component for assisting the target service in resource scheduling of the target virtual computing resource.
[0035] In the above technical solution, the required computing power of the target service and the physical computing resources of various resource types are measured and described through unified computing power, and virtual computing resources described based on computing power are created. The virtual computing resources are bound to the corresponding physical computing resources based on computing power, and the virtual computing resources are scheduled as allocable resource units, so that the differences in physical computing resources of different resource types can be shielded, so that the physical computing resources can be divided and aggregated based on the unified computing power; when the target physical computing resources that meet the computing power requirements are determined from the physical computing resources of multiple resource types and bound to the virtual computing resources, the fragmented physical computing resources can be bound to the virtual computing resources as needed, so that the resource integration of the physical computing resources can be realized, the utilization rate of the fragmented resources can be improved, and the overall resource utilization efficiency can be higher.
[0036] Please refer to Figure 1, which is a schematic diagram of the architecture of a virtual computing resource scheduling system provided by an exemplary embodiment. As shown in Figure 1, the system may include a network 10, a server 11, and several electronic devices, such as terminal devices 12, 13, and 14.
[0037] The server 11 may be a physical server including an independent host, or the server 11 may be a virtual server, a cloud server, etc. hosted by a host cluster. The terminal devices 12-14 are only one type of electronic device that a user may use. In fact, the user may also use electronic devices such as mobile phones, tablet devices, laptop computers, PDAs (Personal Digital Assistants), wearable devices (such as smart glasses, smart watches, etc.), etc., and one or more embodiments of this specification are not limited to this. The network 10 may include various types of wired or wireless networks.
[0038] In one embodiment, the server 11 can cooperate with the terminal devices 12-14; wherein, the terminal devices 12-14 can apply to the server 11 through the network 10 to establish target virtual computing resources corresponding to the target service, and then the server 11 executes the virtual computing resource scheduling method of this specification based on the computing power requirements corresponding to the target service, and allocates the established target virtual computing resources to the target service.
[0039] In order to enable people skilled in the art to better understand the technical solutions in this application, the technical solutions in this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this application.
[0040] Please refer to Figure 2, which shows a scheduling method for virtual computing resources provided by an exemplary embodiment. The scheduling method is applied to a control plane component deployed in a resource management platform for managing virtual computing resources, wherein the virtual computing resources are custom virtual computing resources described by computing power.
[0041] It should be noted that the resource management platform may be a K8s resource management platform. The custom virtual computing resource may be a virtual container resource, which may be a custom resource (CR) provided by the K8s resource management platform. The custom resource is an extension of the K8s resource management system API. The custom resource definition (CRD) is a definition of a custom resource, and is a method of extending resources provided by the K8s resource management platform to users. The resource management platform may define a set of native CRDs for custom virtual computing resources, unify the computing power interface upward, and the resource object entity created based on this definition is the virtual computing resource vXPU.
[0042] The resource management platform defines a set of native CRDs for custom virtual computing resources vXPU, which may include: XPU for describing physical computing resources, vXPUClass for describing different types of virtual computing resources, vXPU for describing virtual computing resources, vXPUClaim for describing user request information corresponding to virtual computing resources, vXPUJob for describing services corresponding to virtual computing resources, and vXPUJobclaims for describing declaration information of services corresponding to virtual computing resources.
[0043] The resource management platform can deploy corresponding control plane components for virtual computing resources, which are used to manage and maintain the virtual computing resources. The control plane components can include multiple components, each responsible for the creation, deployment, storage of related information, lifecycle management, fault migration, etc. of virtual computing resources.
[0044] The resource management platform can manage physical computing resources of various resource types, and the computing resources of various resource types can be various types of processor resources, such as a graphics processing unit (GPU), a tensor processing unit (TPU), a physical computing processor (PPU), a brain processor (BPU), a neural network processing unit (NPU), etc. The physical computing resources of various resource types can also include processor resources using different resource partitioning methods, such as processor resources partitioned based on space or time.
[0045] Physical computing resources of various resource types can be abstracted through a preset abstract method, so that various types of physical computing resources can be described based on the computing power they can provide, and computing power information corresponding to each physical computing resource can be obtained to facilitate unified management of physical computing resources of various resource types based on computing power. The computing power information may include the used computing power, remaining computing power, etc. of each physical computing resource. The control plane component can split and aggregate each physical computing resource based on computing power, and determine the physical computing resources that can be bound to the virtual computing resources based on computing power, so that the control plane component can use the virtual computing resources as resource units for resource scheduling and allocation.
[0046] The resource management platform can manage physical computing resources located on different resource nodes. Multiple resource nodes can form a resource cluster. Each resource node can include one or more physical computing resources of the multiple resource types described above. For example, one resource node can include 2 CPUs and 8 GPUs.
[0047] The computing power used to describe physical computing resources and virtual computing resources can be diverse and can be a unit of measurement used to express data processing capabilities, for example, Tera Floating Point Operations Per Second (TFlops / s), Million Floating Point Operations Per Second (MFlop / s), etc., which are used to express the number of floating-point operations per second; Tera Operations Per Second (TOPS), Million Operations Per Second (MOPS), etc., which are used to express the number of operations executed by the processor per second; Million Instructions Per Second (MIPS), which is used to express the average execution speed of processing single-word fixed-point instructions, etc. For simplicity, TFlops / s is used as an example in the following embodiments.
[0048] The method for scheduling virtual computing resources may include the following steps.
[0049] S210: Obtain computing power requirements of target virtual computing resources to be created corresponding to the target service.
[0050] When a user needs to deploy a target service, they can send a resource request message for the target service to the resource management platform. After obtaining the user's resource request message, the control plane component can obtain the computing power requirements of the target virtual computing resources to be created corresponding to the target service based on the resource request message.
[0051] The resource request information may be resource request information for the first service component when a user requests to create the first service component for running the target service. The computing power requirement corresponding to the target virtual computing resource to be created may be the computing power requirement for the first service component obtained based on the resource request information when determining that the virtual computing resource can be allocated to the first service component.
[0052] The first service component for running the target service may be a container group (pod) including at least one container (container) for running the target service, and the computing power requirement may be the computing power requirement for the target service request to create the container group.
[0053] The received resource request information may be expressed in a data file edited using a preset data serialization language, such as a YAML file or a JASON file, and the like.
[0054] The resource request information may be the resource request information for the running component when the user requests to deploy the running component for running the target service. The control plane component can determine whether the resources allocated to the target service can be virtual computing resources by parsing the resource request information; if they are not virtual computing resources, the corresponding physical computing resources can be allocated to the target service based on the resource request information; if they are virtual computing resources, the computing power requirements of the target virtual computing resources corresponding to the target service can be determined based on the resource request information. For example, if the user declares in a YAML file a request to create a target virtual computing resource corresponding to the target service, the control plane component can determine the computing power requirements of the target virtual computing resource based on the resource requirement information recorded in the YAML file.
[0055] After obtaining the resource request information of the target service, the control plane component can obtain the computing power requirement of the target virtual computing resource corresponding to the target service based on the analysis of the resource request information. If the resource request information carries the computing power requirement of the target virtual computing resource in mTFlops / s, the control plane component can extract the computing power requirement of the target virtual computing resource to be created corresponding to the target service from the resource request information as mTFlops / s; if the computing power requirement of the target virtual computing resource is not directly given in the resource request information, the resource request information can be parsed through a preset computing power estimation method to estimate the computing power requirement of the target virtual computing resource. For example, if the hardware requirement information of the service component pod used to run the target service is given in the resource request information, such as the resource type and resource amount of the physical computing resources, the hardware requirement information of the pod can be parsed through a preset computing power estimation method to estimate the computing power requirement of the target virtual computing resource to be created corresponding to the target service.
[0056] Among them, the computing power estimation algorithm can be a method or service that can perform computing power profiling of physical computing resources of various resource types, and can abstract physical computing resources of various resource types based on the computing power they can provide to estimate the computing power requirements of the target virtual computing resources; for example, if the resource request information includes the hardware requirement information required by the service component pod as 40% of the A100 GPU, the computing power estimation algorithm can be used to estimate the computing power requirement of the target virtual computing resources to be allocated to the target service to be mTFlops / s.
[0057] S220. Determine the expected state of the target virtual computing resource based on the computing power demand and the resource status information of the physical computing resources of multiple resource types managed by the resource management platform; wherein the expected state includes the target physical computing resource corresponding to the target virtual computing resource.
[0058] After obtaining the computing power requirement of the target virtual computing resource, the control plane component can create a target virtual computing resource vXPU described based on the computing power requirement.
[0059] The control plane component can also obtain resource status information for each physical computing resource managed by the resource management platform. The resource status information may include computing power information for each physical computing resource, topology information corresponding to each physical computing resource, and so on. The computing power information may include the used computing power and remaining computing power of each physical computing resource. The topology information may include the resource nodes where each physical computing resource is located, as well as the transmission method between each physical computing resource. There are various ways to obtain resource status information for each physical computing resource, and it can be obtained through the computing power estimation method described above.
[0060] The control plane component can determine the desired state for the target virtual computing resource based on the computing power requirements corresponding to the target virtual computing resource and the acquired resource state information of each physical computing resource. The desired state may include hardware requirement information for the target virtual computing resource, which may include the target physical computing resource corresponding to the target virtual computing resource, etc. The desired state may also include relevant information about the service components that need to be deployed on each resource node, such as the name, type, location, topological relationship, etc. of the deployed service components.
[0061] When determining the hardware requirement information for the target virtual computing resource from the multiple types of physical computing resources managed by the resource management platform, the control plane component can select the hardware requirement information corresponding to the target virtual computing resource from all the physical computing resources it manages based on a preset resource selection strategy. For example, the resource selection strategy can be to select a physical computing resource from the physical computing resources it manages whose sum of remaining computing power can meet the computing power requirement of the target virtual computing resource as the target physical computing resource.
[0062] In order to enable the target virtual computing resources to be more adaptable to the target service, the resource selection strategy may include resource restriction conditions for the target physical computing resources. Accordingly, the expected state of the target virtual computing resources determined by the control plane component includes the target physical computing resources corresponding to the target virtual computing resources that meet the resource restriction conditions.
[0063] The resource restriction conditions may be various, for example, they may include any one or a combination of the following:
[0064] Resource constraints corresponding to the resource types of the physical computing resources; for example, the target physical computing resources may be required to be a specified combination of one or more resource types such as GPU, NPU, PPU, etc.;
[0065] Resource constraints corresponding to the resource amount of the physical computing resource; the resource amount of the physical computing resource may include a computing power requirement based on computing power; may also include resource amounts for various resource types, for example, the resource amount for the A100 GPU may be 40%; may also include the number of processors for the physical computing resource, for example, one GPU, or no more than two GPUs, etc.;
[0066] A resource constraint corresponding to the resource bandwidth of the physical computing resource, for example, a bandwidth of not less than 50 GB / s may be required;
[0067] Resource restriction conditions corresponding to the topological relationship between the physical computing resources; the topological relationship may include restrictions on the resource nodes where the target physical computing resources are located; for example, requiring that cross-node GPUs are not allowed; the topological relationship may also include restrictions on transmission methods between different target physical computing resources, for example, requiring the use of NVlink transmission method between GPUs, pcie transmission method between CPUs and GPUs, IPC / MPI transmission method between CPUs, tcp transmission method between nodes, and so on.
[0068] Among them, the resource restriction condition can be specified by the user, for example, the resource restriction condition is included in the resource request information received corresponding to the target service. If the resource restriction condition specified by the user is obtained, the control plane component will determine the target physical computing resource that meets the resource restriction condition for the target virtual computing resource from the multiple types of physical computing resources managed by the resource management platform based on the resource restriction condition specified by the user; if the user does not specify the resource restriction condition, the control plane component can determine the resource restriction condition corresponding to the target service according to the characteristics of the target service or the preset default conditions, and based on the resource restriction condition, determine the target physical computing resource that meets the resource restriction condition for the target virtual computing resource from the multiple types of physical computing resources managed by the resource management platform.
[0069] It can be seen that by obtaining resource restriction conditions, the target physical computing resources that meet the resource restriction conditions are determined for the target virtual computing resources from the various types of physical computing resources managed by the resource management platform, so that after the target physical computing resources are bound to the target virtual computing resources, the target virtual computing resources allocated to the target service can be more suitable for running the target service and meet the needs of the target service.
[0070] It should be noted that when determining the target physical computing resources corresponding to the target virtual computing resources, the selection can also be made based on the current resource usage of each physical computing resource; if the resource utilization rate of each physical computing resource is low and there are a large number of unused physical computing resources, then the target physical computing resources that are relatively beneficial to the operation of the target service can be selected, for example, relatively more target physical computing resources can be selected to make the target virtual resources have a certain redundancy; if the resource utilization rate of each physical computing resource is high or there are a large number of fragmented physical computing resources, then the target physical computing resources that are relatively beneficial to improving resource utilization can be selected.
[0071] It should be noted that, based on the computing power demand and the resource status information of the physical computing resources of various resource types managed by the resource management platform, the physical computing resources are pre-scheduled to determine the expected state of the target virtual computing resources. Specifically, based on the received resource request information YAML file including the target service, the expected state of the target virtual computing resources can be written into the YAML file. For example, corresponding fields can be added or modified in the YAML file by using a webhook or the like to write the expected state of the target virtual computing resources into the YAML file.
[0072] S230. According to the expected state, a sidecar mode is adopted to deploy a first service component corresponding to the target virtual computing resource on the first resource node allocated to the target service, and the target physical computing resource is bound to the target virtual computing resource; wherein, the first resource component includes a main component for running the target service and a sidecar component for assisting the target service in resource scheduling of the target virtual computing resource.
[0073] After determining the expected state corresponding to the target virtual computing resource, the first resource node allocated to the target service can be determined from the multiple resource nodes managed by the resource management platform based on the expected state, and the first service component corresponding to the target virtual computing resource can be deployed on the first resource node, and the first service component is used to run the target service; and based on the expected state, the resource nodes where each target physical computing resource is located can also be determined from the multiple resource nodes managed by the resource management platform, and the target physical computing resources located on each resource node can be bound to the target virtual computing resources, which is equivalent to integrating the target physical computing resources located on each resource node into a target virtual computing resource described based on the required computing power. The bound target virtual computing resources can be allocated to the target service, that is, they can be allocated to the first service component used to run the target service.
[0074] The first service component deployed on the first resource node can adopt a variety of networking methods. For example, in one embodiment, a sidecar mode can be adopted. The first service component can include a main component and a sidecar component, wherein the main component is used to run the target service, and the sidecar component is used to assist the target service in scheduling resources for the target virtual computing resources. For example, the sidecar component can route the resource scheduling request of the target service to the corresponding target physical computing resource. The first service component can be a pod, which can be represented as a client pod, and the main component and sidecar component are respectively a main container and a sidecar container.
[0075] It should be noted that the target physical computing resource bound to the target virtual computing resource may include one or more physical computing resources; accordingly, binding the target physical computing resource to the target virtual computing resource essentially means binding all or part of the computing power of the target physical computing resource to the target virtual computing resource. Therefore, a physical computing resource can be bound to one or more virtual computing resources. It can be seen that the mapping relationship between the target virtual computing resource and the target physical computing resource can be 1:n, 1:1, or n:1, etc., thereby achieving resource integration of physical computing resources and improving the utilization of fragmented resources.
[0076] The target physical computing resource bound to the target virtual computing resource may be located on one or more resource nodes.
[0077] Among them, if the physical computing resources on the first resource node can meet the computing power requirements of the target virtual computing resources, then the target physical computing resources corresponding to the target virtual computing resources can all be located on the first resource node allocated to the target service. This resource allocation scheme can be called a resource allocation scheme for a local scenario. As shown in Figure 3a, the target physical computing resources corresponding to the target virtual computing resources can all be located on the first resource node allocated to the target service. The first service component is deployed on the first resource node, and the target physical computing resources on the first resource node are bound to the target virtual computing resources and allocated to the first service component.
[0078] If the physical computing resources on the first resource node cannot meet the computing power requirements of the target virtual computing resources, then part or all of the target physical computing resources corresponding to the target virtual computing resources can be located on at least one second resource node other than the first resource node. This resource allocation scheme can be called a resource allocation scheme for a remote scenario.
[0079] In a remote scenario, a second service component for running resource scheduling logic for scheduling the target physical computing resource on the second resource node can be deployed on the second resource node, and a link can be established between the first service component and the second service component so that the first service component can call the target physical computing resource located on the second resource node through the second service component. The second service component can be a pod, which can be represented as a Server Pod, and the second service component can include at least one container for running resource scheduling logic for scheduling the target physical computing resource on the second resource node.
[0080] In the remote scenario, the control plane component can flexibly allocate the target physical computing resources, which can be located on one or more second resource nodes. For example, as shown in Figure 3b, the target physical computing resources corresponding to the target virtual computing resources can all originate from the same second resource node, and the ratio of the target virtual computing resources to the second resource node is 1:1; as shown in Figure 3c, the target physical computing resources corresponding to the target virtual computing resources can originate from multiple second resource nodes, and the ratio of the target virtual computing resources to the second resource node is 1:n; as shown in Figure 3d, the target physical computing resources corresponding to the target virtual computing resources can be located on the first resource node and multiple second resource nodes, and the ratio of the target virtual computing resources to the second resource node is 1:n; as shown in Figure 3e, multiple target virtual computing resources can be deployed on the first resource node, and the target physical computing resources on multiple second resource nodes can be remotely bound, and the ratio of the target virtual computing resources to the second resource node is n:n.
[0081] In the remote scenario, as shown in Figure 4, the first service component Client Pod is deployed on the first resource node, and the first service component includes at least one main container for running the target service and at least one sidecar container vXPU-client for assisting the target service in scheduling resources for the target virtual computing resources; the second service component Server Pod deployed on at least one second resource node, as shown in Figure 4, may include three second service components Server Pod-1, Server Pod-2 and Server Pod-3 deployed on the second resource nodes respectively, and each second service component may include at least one container vXPU-server, and the container vXPU-server establishes a link with the vXPU-client to run the resource scheduling logic for scheduling resources for the target physical computing resources on the second resource node.
[0082] When determining the expected state of the target virtual computing resources based on the computing power requirements and the resource status information of the physical computing resources of various resource types managed by the resource management platform, the expected state can indicate the allocation method of the local scenario or remote scenario as described above, and can also indicate the number of resource nodes where each target physical computing resource is located, and can even indicate the location of the resource node where each target physical computing resource is located, and so on.
[0083] It should be noted that the user may also indicate in the resource scheduling request for the target service whether to use the allocation method of the local scenario or the remote scenario as described above.
[0084] From the above, it can be seen that the control plane component can flexibly allocate the target physical computing resources corresponding to the target virtual computing resources, determine whether to adopt a local scenario or a remote scenario based on actual needs, and reasonably configure the target physical computing resources on each second resource node in the remote scenario, thereby improving the unified scheduling of the overall physical computing resources and enhancing cluster efficiency.
[0085] The control plane component can also manage the lifecycle of the target virtual computing resource, ensuring that the target virtual computing resource and its corresponding service components are synchronized, i.e., created or deleted simultaneously. The control plane component can create or delete the target virtual computing resource vXPU based on user needs, and simultaneously deploy or delete the corresponding service components.
[0086] The control plane component can also monitor the created target virtual computing resources, and compare the current state of the monitored target virtual computing resources with the expected state of the target virtual computing resources to determine whether it is necessary to perform a fault migration on the target virtual computing resources. For example, if the current state of the target virtual computing resources does not meet the expected state of the target virtual computing resources, it is necessary to perform a fault migration on the target virtual computing resources so that it can meet the expected state again. The fault migration can include, when it is found that the first service component has crashed, re-determining the first resource node, deploying a new first service component on the new first resource node, and re-establishing a link with the second service component; it can also include, when it is found that the second service component has crashed, re-determining the second resource node, deploying a new second service component on the new second resource node, and re-establishing a link with the first service component.
[0087] It can be seen from the technical solutions of the above embodiments that the embodiments of the present application measure and describe the required computing power of the target service and the physical computing resources of various resource types through unified computing power, create virtual computing resources described based on computing power, bind the virtual computing resources with the corresponding physical computing resources based on computing power, and schedule them with virtual computing resources as allocable resource units, so as to shield the differences between physical computing resources of different resource types and enable the physical computing resources to be divided and aggregated based on unified computing power; when determining the target physical computing resources that meet the computing power requirements from the physical computing resources of multiple resource types and binding them with the virtual computing resources, the fragmented physical computing resources can be bound to the virtual computing resources as needed, so as to realize resource integration of physical computing resources, improve the utilization rate of fragmented resources, and make the overall resource utilization efficiency higher.
[0088] Please refer to FIG5 , which shows a schematic structural diagram of a control plane component according to an embodiment of the present application. As shown in FIG5 , the control plane component may include a control component 51 and a scheduling component 52.
[0089] The control component 51 is used to obtain the computing power requirement of the target virtual computing resource to be created corresponding to the target service;
[0090] The control component 51 is further configured to determine an expected state for the target virtual computing resource based on the computing power requirement and resource state information of physical computing resources of multiple resource types managed by the resource management platform; wherein the expected state includes a target physical computing resource corresponding to the target virtual computing resource;
[0091] The scheduling component 52 is used to deploy the first service component corresponding to the target virtual computing resource on the first resource node allocated to the target service in a sidecar mode according to the expected state, and bind the target physical computing resource with the target virtual computing resource; wherein, the first service component includes a main component for running the target service and a sidecar component for assisting the target service in resource scheduling of the target virtual computing resource.
[0092] The control plane component further includes a resource management component 53 deployed on each resource node. The resource management component 53 is used to manage the virtual computing resources on each resource node and report them to the control component.
[0093] It should be noted that each component in the control plane component can execute the technical solutions in the above-mentioned embodiments and obtain the same technical effects, and the repeated parts will not be repeated here.
[0094] Please refer to FIG6 , which shows a method for scheduling virtual computing resources executed by the control plane component as described above.
[0095] The user inputs the relevant information resnet50.oef generated by the computing power profile to describe the target service into the unified computing power entry corresponding to the control component to generate resource request information corresponding to the target service. For example, it can be a YAML file, and the YAML file includes: the name of the target service (name): resnet50; declaration information (annotaion), in which it is indicated that the target virtual computing resource vxpu.io / env:vxpu-client is requested to be created using the allocation method of the remote scenario; related information oefinfo of the target service; and so on.
[0096] The control component can pre-schedule the physical computing resources based on the computing power demand and the resource status information of the various resource types managed by the resource management platform, and determine the expected state of the target virtual computing resources. Among them, the resource status information of the physical computing resources can be reported by the resource management components deployed on each resource node. After determining the expected state of the target virtual computing resources, the expected state of the target virtual computing resources can be written into the YAML file using webhook; for example, as shown in Figure 6, the following information is added to the YAML file:
[0097] It is used to indicate that the first service component deployed on the first resource node includes two containers, namely the sidecar container and the main container resnet50; the second service component deployed on the second resource node includes the container vxpu-server, and the physical computing resources bound to the container are alibabacloud.com / gpu-core:xx and alibabacloud.com / gpu-memory:xx.
[0098] The modified YAML file can be stored in the database ETCD, which is a distributed unified key-value storage.
[0099] The scheduling component can read the YAML file from ETCD, schedule and allocate resources based on the expected state of the target virtual computing resources in the YAML file, and use node1 as the first resource node and node2 as the second resource node from multiple resource nodes managed by the resource management platform; it also determines that the first service component including the sidecar container and the main container resnet50 needs to be deployed on the first resource node, and the second service component including the container vxpu-sever is deployed on the second resource node, as well as the resources corresponding to each container.
[0100] The scheduling component can cooperate with the resource management component deployed on the first resource node and the second resource node to deploy the first service component on the first resource node and the second service component on the second resource node respectively.
[0101] The resource management component on each resource node can report resource status information of the target virtual computing resources and physical computing resources on the resource node.
[0102] The control component can perform lifecycle management and fault migration for the target virtual computing resources and corresponding service components.
[0103] As shown in Figure 6, in the process of creating, deploying, and scheduling the target virtual computing resources based on the resource request information of the target service, information corresponding to the target virtual computing resources can be generated based on a set of native CRDs pre-defined for the virtual computing resources vXPU, including: vXPUClaim, vXPUClass, vXPU, XPU, etc.
[0104] It can be seen from the technical solutions of the above embodiments that the embodiments of the present application use a control plane component for managing customized virtual computing resources to measure and describe the required computing power of the target service and physical computing resources of various resource types based on unified computing power, create virtual computing resources described based on computing power, bind the virtual computing resources with the corresponding physical computing resources based on computing power, and schedule them with virtual computing resources as allocable resource units, so as to shield the differences between physical computing resources of different resource types and enable physical computing resources to be divided and aggregated based on unified computing power; when determining the target physical computing resources that meet the computing power requirements from physical computing resources of multiple resource types and binding them with virtual computing resources, the fragmented physical computing resources can be bound to the virtual computing resources as needed, thereby realizing resource integration of physical computing resources, improving the utilization rate of fragmented resources, and making the overall resource utilization efficiency higher.
[0105] Corresponding to the aforementioned embodiment of the method for scheduling virtual computing resources, the present application also provides an embodiment of an apparatus for scheduling virtual computing resources.
[0106] As shown in FIG. 7 , the virtual computing resource scheduling device includes: a request receiving module 701 , a resource scheduling module 702 and a service deployment module 703 .
[0107] The request receiving module 701 is used to obtain the computing power requirement of the target virtual computing resource to be created corresponding to the target service;
[0108] The resource scheduling module 702 is configured to determine an expected state for the target virtual computing resource based on the computing power demand and resource state information of physical computing resources of multiple resource types managed by the resource management platform; wherein the expected state includes a target physical computing resource corresponding to the target virtual computing resource;
[0109] The service deployment module 703 is used to deploy the first service component corresponding to the target virtual computing resource on the first resource node allocated to the target service in a sidecar mode according to the expected state, and bind the target physical computing resource with the target virtual computing resource; wherein, the first service component includes a main component for running the target service and a sidecar component for assisting the target service in resource scheduling of the target virtual computing resource.
[0110] The embodiments of the present application can shield the differences between physical computing resources of different resource types, so that physical computing resources can be divided and aggregated based on unified computing power; when determining the target physical computing resources that meet the computing power requirements from physical computing resources of multiple resource types and binding them with virtual computing resources, the fragmented physical computing resources can be bound to the virtual computing resources as needed, thereby realizing resource integration of physical computing resources, improving the utilization rate of fragmented resources, and making the overall resource utilization efficiency higher.
[0111] FIG8 is a schematic structural diagram of a device provided by an exemplary embodiment. Referring to FIG8 , at the hardware level, the device includes a processor 802, an internal bus 804, a network interface 806, a memory 808, and a non-volatile memory 810, and may also include other required hardware. One or more embodiments of this specification may be implemented based on software, such as the processor 802 reading the corresponding computer program from the non-volatile memory 810 into the memory 808 and then running it. Of course, in addition to software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but may also be hardware or logic devices.
[0112] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email transceiver, game console, tablet computer, wearable device, or any combination of these devices.
[0113] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0114] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0115] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.
[0116] 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 this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0117] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0118] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0119] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a," "an," "the," and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0120] It should be understood that although the terms first, second, third, 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 the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when..." or "when..." or "in response to determining."
[0121] The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of this specification shall be included in the scope of protection of one or more embodiments of this specification.
Claims
1. A method for scheduling virtual computing resources, characterized in that: include: Obtaining the computing power requirement of the target virtual computing resource to be created corresponding to the target service; Determine the expected state of the target virtual computing resource according to the computing power demand and the resource state information of the physical computing resources of the multiple resource types managed; wherein the expected state includes the target physical computing resource corresponding to the target virtual computing resource; According to the expected state, a first service component corresponding to the target virtual computing resource is deployed on the first resource node allocated to the target service in sidecar mode, and the target physical computing resource is bound to the target virtual computing resource; wherein the first service component includes a main component for running the target service and a sidecar component for assisting the target service in scheduling resources for the target virtual computing resource.
2. The method according to claim 1, characterized in that: The step of obtaining the computing power requirement of the target virtual computing resource to be created corresponding to the target service includes: Obtain resource request information of the target service; Based on the resource request information, determine whether to allocate virtual computing resources for the target service; if so, estimate the computing power requirements of the target virtual computing resources to be created corresponding to the target service based on the resource request information through a preset computing power estimation algorithm.
3. The method according to claim 2, characterized in that The target physical computing resources include target physical computing resources located on a plurality of second resource nodes; The method further comprises: Deploying, on the second resource node, a second service component for executing a resource scheduling logic for scheduling a target physical computing resource on the second resource node; A link is established between the first service component and the second service component, so that the first service component calls a target physical computing resource located on the first resource node through the second service component.
4. The method according to claim 3, characterized in that The resource request also includes a resource restriction condition for the target physical computing resource; the desired state includes a target physical computing resource corresponding to the target virtual computing resource that satisfies the resource restriction condition.
5. The method according to claim 1, characterized in that The method further comprises: Performing lifecycle management on the target virtual computing resource; and / or, Performing a failover on the target virtual computing resource.
6. The method according to claim 1, characterized in that The physical computing resources are processor resources; the virtual computing resources are virtual container resources; the service component is a container group including at least one container; the main component is a main container for running the target service; the sidecar component is a sidecar container for assisting the target service in scheduling resources for the target virtual computing resources; The computing power requirement is the computing power requirement for creating a container group for the target service request.
7. A control surface assembly, characterized in that: include: A control component, used to obtain the computing power requirements of the target virtual computing resources to be created corresponding to the target service; The control component is further used to determine, according to the computing power demand, a target physical computing resource corresponding to the target virtual computing resource from physical computing resources of multiple resource types managed by the resource management platform; A scheduling component is used to deploy a first service component corresponding to the target virtual computing resource on the first resource node allocated to the target service in a sidecar mode, and bind the target physical computing resource with the target virtual computing resource; wherein the first service component includes a main component for running the target service and a sidecar component for assisting the target service in scheduling resources for the target virtual computing resource.
8. The control surface assembly according to claim 7, characterized in that: The control plane component also includes a resource management component deployed on each resource node, and the resource management component is used to manage the virtual computing resources on each resource node and report them to the control component.
9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 6 by running the executable instructions.
10. A computer-readable storage medium, characterized in that: Computer instructions are stored thereon, and when the instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Resource scheduling method and device
CN110688218A
Method and device for allocating server resources, electronic equipment and storage medium
CN111831450A
Processing method and device, electronic equipment and readable storage medium
CN113296950A
Node for operating container group, and management system and method for container group
CN115705198A
Virtual computing resource scheduling method and control plane component
CN116880996A
Cited By
Resource management method, electronic equipment and storage medium
CN119690594A
Task scheduling method and device, equipment and storage medium
CN120336034A
Heterogeneous GPU resource management scheduling method, computer device, medium and product
CN120994406A
