Virtualized resource scheduling method and device, equipment, storage medium and product

By obtaining node cluster resource information and preset resource overscore ratios, and determining the target resource nodes, the efficiency of cross-node resource scheduling in cloud computing is solved, the optimal utilization and load balancing of resources are achieved, and the overall cloud computing cluster is improved. performance.

CN119105853APending Publication Date: 2024-12-10BEIJING UDSAFE TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411261502.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

In the cloud computing, the resource scheduling is limited to a single physical node, which fails to effectively solve the problem of efficient scheduling across nodes, and lacks adaptability to heterogeneous hardware environments, ignoring the actual situation of component resource occupation.

Method used

By obtaining the dispatchable node resource information of the node cluster, determining the target resource node based on resource allocation requests and preset resource overscore ratios, achieving optimal resource utilization and load balancing, and adopting resource overscore strategy to improve resource utilization. Support cross-node resource scheduling.

Benefits of technology

Without increasing hardware costs, improve resource utilization and response speed, ensure global optimal allocation of resources, and improve overall cluster utilization and response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119105853A_ABST
    Figure CN119105853A_ABST
Patent Text Reader

Abstract

The invention discloses a virtual resource scheduling method, device and equipment, a storage medium and a product, and the method comprises the steps: obtaining schedulable nodes in a node cluster, and collecting the resource information of all schedulable nodes; in response to the resource allocation request, determining a target resource node in the schedulable nodes according to the resource allocation request, the resource information and a preset resource super-score; and performing a target operation corresponding to the resource allocation request on the target resource node. According to the virtualized resource scheduling method disclosed by the invention, the resource super-division strategy is introduced through the preset resource super-division ratio, so that the resource utilization rate can be improved under the condition of not increasing the hardware cost, the available resources can be more effectively used, the resource scheduling can cross a plurality of resource nodes, and the resource scheduling efficiency is improved. The global optimal allocation of resources is ensured through a distributed coordination mechanism, and the overall utilization rate and response speed of the cluster can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud computing technology, and in particular to a virtualized resource scheduling method, device, equipment, storage medium and product. Background Art

[0002] With the rapid development and popularization of cloud computing technology, enterprises have a growing demand for elastic computing resources. The on-demand resource allocation, high availability and cost-effectiveness provided by cloud computing have prompted enterprises to seek more efficient and flexible resource management and scheduling solutions. LXD is a platform that integrates lightweight system containers and traditional virtual machines, and supports both kernel virtualization and hardware virtualization.

[0003] When performing resource scheduling, native LXD will traverse the number of containers and virtual machines in the specified node group and select the node with the least number as the candidate node. This strategy believes that the candidate node has the least number of components created, so the load is the lightest, but it ignores the actual resource usage of the components. In addition, the existing technology is limited to scheduling resources within a single physical node, does not solve the problem of efficient scheduling across nodes, and lacks adaptability to heterogeneous hardware environments. Summary of the invention

[0004] The present invention provides a virtualized resource scheduling method, device, equipment, storage medium and product to achieve optimal resource utilization and load balancing.

[0005] According to one aspect of the present invention, a virtualization resource scheduling method is provided, comprising:

[0006] Obtain schedulable nodes in the node cluster and collect resource information of all the schedulable nodes;

[0007] In response to a resource allocation request, determining a target resource node among the schedulable nodes according to the resource allocation request, the resource information, and a preset resource over-allocation ratio;

[0008] A target operation corresponding to the resource allocation request is performed on the target resource node.

[0009] Furthermore, the resource information includes processor resource information, memory resource information and storage pool resource information.

[0010] Further, determining a target resource node among the schedulable nodes according to the resource allocation request, the resource information, and a preset resource over-allocation ratio includes:

[0011] Determining available resources of each of the schedulable nodes according to the resource information and a preset resource over-allocation ratio;

[0012] Determine at least one candidate node according to the resource allocation request and the available resources of each of the schedulable nodes;

[0013] A candidate node including the least number of components among the at least one candidate node is determined as the target resource node.

[0014] Further, determining the available resources of each of the schedulable nodes according to the resource information and a preset resource over-allocation ratio includes:

[0015] For each of the schedulable nodes, taking the product of the allocatable resource amount and the resource over-allocation ratio as the actual allocatable resource amount;

[0016] The difference between the actual allocatable resource amount and the node allocated resource amount is taken as the available resource.

[0017] Further, determining at least one candidate node according to the resource allocation requirement and the available resources of each of the schedulable nodes includes:

[0018] Extracting a resource allocation requirement corresponding to the resource allocation request;

[0019] A resource node whose available resources are greater than or equal to the resource allocation requirement among the schedulable nodes is determined as the candidate node.

[0020] Further, performing a target operation corresponding to the resource allocation request on the target resource node includes:

[0021] Mapping the available resources of the target resource node to the virtual processor;

[0022] A target operation corresponding to the resource allocation request is performed based on the virtual processor.

[0023] According to another aspect of the present invention, there is provided a virtualized resource scheduling device, comprising:

[0024] A resource information collection module is used to obtain the schedulable nodes in the node cluster and collect resource information of all the schedulable nodes;

[0025] A target resource node determination module, configured to respond to a resource allocation request and determine a target resource node among the schedulable nodes according to the resource allocation request, the resource information and a preset resource over-allocation ratio;

[0026] The operation execution module is used to perform a target operation corresponding to the resource allocation request on the target resource node.

[0027] Optionally, the resource information includes processor resource information, memory resource information and storage pool resource information.

[0028] Optionally, the target resource node determination module is further used to:

[0029] Determining available resources of each of the schedulable nodes according to the resource information and a preset resource over-allocation ratio;

[0030] Determine at least one candidate node according to the resource allocation request and the available resources of each of the schedulable nodes;

[0031] A candidate node including the least number of components among the at least one candidate node is determined as the target resource node.

[0032] Optionally, the target resource node determination module is further used to:

[0033] For each of the schedulable nodes, taking the product of the allocatable resource amount and the resource over-allocation ratio as the actual allocatable resource amount;

[0034] The difference between the actual allocatable resource amount and the node allocated resource amount is taken as the available resource.

[0035] Optionally, the target resource node determination module is further used to:

[0036] Extracting a resource allocation requirement corresponding to the resource allocation request;

[0037] A resource node whose available resources are greater than or equal to the resource allocation requirement among the schedulable nodes is determined as the candidate node.

[0038] Optionally, the operation execution module is further used to:

[0039] Mapping the available resources of the target resource node to the virtual processor;

[0040] A target operation corresponding to the resource allocation request is performed based on the virtual processor.

[0041] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0042] at least one processor; and

[0043] a memory communicatively connected to the at least one processor; wherein,

[0044] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the virtualization resource scheduling method described in any embodiment of the present invention.

[0045] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the virtualization resource scheduling method described in any embodiment of the present invention when executed.

[0046] According to another aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program / instruction, and the computer program / instruction, when executed by a processor, implements the steps of the virtualization resource scheduling method described in any embodiment of the present invention.

[0047] The virtualized resource scheduling method disclosed in the present invention first obtains the schedulable nodes in the node cluster and collects the resource information of all the schedulable nodes; then responds to the resource allocation request and determines the target resource node in the schedulable nodes according to the resource allocation request, the resource information and the preset resource over-allocation ratio; finally, the target operation corresponding to the resource allocation request is performed on the target resource node. The virtualized resource scheduling method disclosed in the present invention introduces a resource over-allocation strategy through a preset resource over-allocation ratio, which can improve resource utilization without increasing hardware costs, thereby more effectively using available resources, and resource scheduling can span multiple resource nodes, and ensure the global optimal allocation of resources through a distributed coordination mechanism, which can improve the overall utilization and response speed of the cluster.

[0048] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0050] Figure 1 is a flow chart of a virtualization resource scheduling method provided according to Embodiment 1 of the present invention;

[0051] Figure 2 is a schematic diagram of resource allocation of an LXD platform provided according to Embodiment 1 of the present invention;

[0052] Figure 3 is a flow chart of a virtualization resource scheduling method provided according to Embodiment 2 of the present invention;

[0053] Figure 4is a schematic diagram of a resource scheduling process based on the LXD platform provided according to the second embodiment of the present invention;

[0054] Figure 5 is a structural diagram of a virtualized resource scheduling device provided according to Embodiment 3 of the present invention;

[0055] Figure 6 It is a structural diagram of an electronic device for implementing the virtualized resource scheduling method of the fourth embodiment of the present invention. DETAILED DESCRIPTION

[0056] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0057] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0058] Embodiment 1

[0059] Figure 1 This is a flowchart of a virtualized resource scheduling method provided in the first embodiment of the present invention. This embodiment is applicable to the case of node resource scheduling based on the LXD platform. The method can be executed by a virtualized resource scheduling device. The virtualized resource scheduling device can be implemented in the form of hardware and / or software. The virtualized resource scheduling device can be configured in an electronic device. Figure 1 As shown, the method includes:

[0060] S110 , obtaining schedulable nodes in the node cluster, and collecting resource information of all schedulable nodes.

[0061] The node cluster is a collection of one or more resource nodes, a resource node is a physical machine with hardware resources, and a schedulable node is a resource node in the node cluster that can be used for scheduling.

[0062] In this embodiment, the resource information includes processor (CPU) resource information, memory resource information, and storage pool resource information.

[0063] Preferably, the virtualization resource scheduling method provided in this embodiment can be applied to the LXD (Linux Container Daemon) platform. LXD is a management tool for containers and virtual machines. It has an intelligent resource scheduling function, can optimize resource allocation, improve system efficiency, enhance security and simplify operation and maintenance management. Applicable scenarios include enterprise data centers, cloud computing platforms, big data processing and edge computing environments.

[0064] Specifically, resources are scheduled through the LXD platform. The objects that need to be scheduled in the LXD platform include cloud components and cloud hard disks. Insufficient node resources (processor resource information, memory resource information, and storage pool resource information) will affect the operation of cloud components and cloud hard disks. For a resource node, if the number of available processors (CPU) and memory resources of the node is insufficient, component creation, configuration adjustment, hot upgrade, and migration operations cannot be performed on the node; if the storage resources of the node are insufficient, component creation, migration, system disk expansion operations, and cloud hard disk creation, expansion, cross-storage pool migration, and cross-node migration operations cannot be performed on the node. After the LXD cluster is started, the resource information of all schedulable nodes in the cluster can be collected, including the physical resource (CPU resource and memory resource) information and storage pool resource information of all schedulable nodes, and saved to the corresponding node / storage pool configuration.

[0065] Figure 2 : is a resource allocation diagram of an LXD platform provided by an embodiment of the present invention. As shown in the figure, cloud component related operations include creation, configuration modification, hot upgrade, migration and system disk expansion, among which creation, configuration modification, hot upgrade and migration operations have CPU resource and memory resource requirements, and creation, migration and system disk expansion have storage pool resource requirements; cloud hard disk related operations include creation, expansion, cross-storage pool migration and cross-node migration, and each operation has storage pool resource requirements.

[0066] S120. In response to the resource allocation request, determine a target resource node among the schedulable nodes according to the resource allocation request, resource information, and a preset resource over-allocation ratio.

[0067] The resource allocation request is a request for allocating node resources generated by a user operation, and the target resource node is a node determined among the schedulable nodes that can provide the required resources for the user operation.

[0068] In this embodiment, the resource scheduling process adopts the resource over-commit strategy, which allows the system to allocate virtual resources that exceed the total amount of physical resources to the application program or virtual machine. This technology takes advantage of the fact that most applications do not always need all the resources configured in actual use, so that the number of resources allocated to the client exceeds the total amount of physical resources. Because it is impossible for all the clients in the physical machine to be in a high-load state, appropriate over-commitment helps to make full use of resources. Through resource over-commitment, the utilization rate of resources can be improved without increasing the hardware cost, thereby using the available resources more effectively.

[0069] Preferably, when a user performs an operation that requires occupying resources, such as submitting a component creation request, a corresponding resource allocation request will be initiated. The resource scheduling mechanism parses the resource allocation request and can calculate the number of available resources in each resource node based on the pre-configured resource over-allocation ratio and the resource information of each resource node, and select the nodes whose available resources are greater than the resource demand as candidate nodes. If the number of candidate nodes is greater than one, the node with the least number of components on the node is obtained as the target resource node according to the native LXD resource scheduling logic.

[0070] S130. Perform a target operation corresponding to the resource allocation request on the target resource node.

[0071] In this embodiment, after determining the target resource node among the schedulable nodes, the target operation corresponding to the resource allocation request can be performed on the target resource node. For example, if the resource allocation request is generated by a component creation request submitted by a user, then after determining the target resource node, the component requested to be created by the user can be created on the target resource node.

[0072] Specifically, LXD is a secure and powerful system container and virtual machine manager. It provides a unified user experience for complete Linux systems running and managed in containers or virtual machines. Kernel virtualization is achieved through Cgroup (control groups) and Namespace (namespace). The LXD daemon uses LXC (Linux container) technology to create and manage containers, and uses QEMU / KVM technology to achieve hardware virtualization, providing a complete virtual hardware system environment for virtual machines. In LXD, the CPU occupied by all components is actually vCPU (virtual processor). Each client is a Linux process, and each vCPU is a derived ordinary thread in the Host host (physical machine) assigned to the Guest client (virtual machine). The vCPU is a thread derived from the process, and then dynamically scheduled to run on the pCPU (physical processor).

[0073] The virtualized resource scheduling method disclosed in the present invention first obtains the schedulable nodes in the node cluster and collects the resource information of all the schedulable nodes; then responds to the resource allocation request and determines the target resource node in the schedulable nodes according to the resource allocation request, the resource information and the preset resource over-allocation ratio; finally, the target operation corresponding to the resource allocation request is performed on the target resource node. The virtualized resource scheduling method disclosed in the present invention introduces a resource over-allocation strategy through a preset resource over-allocation ratio, which can improve resource utilization without increasing hardware costs, thereby more effectively using available resources, and resource scheduling can span multiple resource nodes, and ensure the global optimal allocation of resources through a distributed coordination mechanism, which can improve the overall utilization and response speed of the cluster.

[0074] Embodiment 2

[0075] Figure 3 Flow chart of a virtualized resource scheduling method provided in Embodiment 2 of the present invention. This embodiment is a refinement of the above embodiment. Figure 3 As shown, the method includes:

[0076] S210: Acquire schedulable nodes in the node cluster, and collect resource information of all schedulable nodes.

[0077] The node cluster is a collection of one or more resource nodes, a resource node is a physical machine with hardware resources, and a schedulable node is a resource node in the node cluster that can be used for scheduling.

[0078] In this embodiment, the resource information includes processor (CPU) resource information, memory resource information, and storage pool resource information.

[0079] Preferably, the virtualization resource scheduling method provided in this embodiment can be applied to the LXD (Linux Container Daemon) platform. LXD is a management tool for containers and virtual machines. It has an intelligent resource scheduling function, can optimize resource allocation, improve system efficiency, enhance security and simplify operation and maintenance management. Applicable scenarios include enterprise data centers, cloud computing platforms, big data processing and edge computing environments.

[0080] Specifically, resources are scheduled through the LXD platform. The objects that need to be scheduled in the LXD platform include cloud components and cloud hard disks. Insufficient node resources (processor resource information, memory resource information, and storage pool resource information) will affect the operation of cloud components and cloud hard disks. After the LXD cluster is started, the resource information of all schedulable nodes can be collected, including the physical resource (CPU resource and memory resource) information and storage pool resource information of all schedulable nodes, and saved to the corresponding node / storage pool configuration.

[0081] S220 . In response to the resource allocation request, determine the available resources of each schedulable node according to the resource information and a preset resource over-allocation ratio.

[0082] In this embodiment, when a user performs an operation that requires occupying resources, such as submitting a component creation request, a corresponding resource allocation request is initiated. In response to the resource allocation request, the resource scheduling mechanism can calculate the number of available resources in each schedulable node based on the pre-configured resource over-allocation ratio and the resource information of each schedulable node.

[0083] Optionally, the method for determining the available resources of each schedulable node based on resource information and a preset resource over-allocation ratio may be: for each schedulable node, taking the product of the allocatable resource amount and the resource over-allocation ratio as the actual allocatable resource amount; and taking the difference between the actual allocatable resource amount and the node's allocated resource amount as the available resources.

[0084] Specifically, the configurable parameters in the resource over-allocation mechanism are:

[0085] (1) System reserved resource configuration:

[0086] System reserved CPU resources: reserved_node_cpu

[0087] System reserved memory resources: reserved_node_ram

[0088] (2) Resource over-ratio configuration:

[0089] CPU resource overallocation ratio: cpu_allocation_ratio

[0090] Virtual machine memory resource over-allocation ratio: vm_ram_allocation_ratio

[0091] Container memory resource over-allocation ratio: ct_ram_allocation_ratio

[0092] Storage resource over-allocation ratio: [driver]_allocation_ratio

[0093] Generally, the default system reserved resources are 4 cores and 4 GiB, and the default resource over-allocation ratio is 1.0 (no over-allocation). The storage resource over-allocation ratio is related to the storage driver and needs to be configured separately. For example, the over-allocation ratio configuration key for the zfs storage pool is zfs_allocation_ratio, and the over-allocation ratio configuration key for the ceph storage pool is ceph_allocation_ratio.

[0094] The calculation formula for the available resources of each schedulable node is as follows:

[0095] (1) Available CPU cores = (total number of cores on the physical machine - number of cores reserved by the system) × CPU over-allocation ratio - number of cores allocated to the virtual machine - (number of cores allocated to the container × CPU limit); where the allocatable amount of CPU resources is "total number of cores on the physical machine - number of cores reserved by the system", the actual allocatable amount is "(total number of cores on the physical machine - number of cores reserved by the system) × CPU over-allocation ratio", and the node's allocated amount is "number of cores allocated to the virtual machine + (number of cores allocated to the container × CPU limit)".

[0096] (2) Amount of available memory resources for a virtual machine = (total memory capacity of the physical machine - reserved memory for the system - allocated memory capacity of the container / container memory over-allocation ratio) × virtual machine memory over-allocation ratio - allocated memory capacity of the virtual machine; where the allocatable amount of memory resources for a virtual machine is "total memory capacity of the physical machine - reserved memory for the system - allocated memory capacity of the container / container memory over-allocation ratio", the actual allocatable amount of memory resources for a virtual machine is "(total memory capacity of the physical machine - reserved memory for the system - allocated memory capacity of the container / container memory over-allocation ratio) × virtual machine memory over-allocation ratio", and the node allocated amount of memory resources for a virtual machine is "allocated memory capacity of the virtual machine".

[0097] (3) The amount of available memory resources for a container = (total memory capacity of the physical machine - reserved memory for the system - allocated memory capacity of the virtual machine / memory over-allocation ratio of the virtual machine) × container memory over-allocation ratio - container allocated memory capacity; where the allocatable amount of container memory resources is "total memory capacity of the physical machine - reserved memory for the system - allocated memory capacity of the virtual machine / memory over-allocation ratio of the virtual machine", the actual allocatable amount of container memory resources is "total memory capacity of the physical machine - reserved memory for the system - allocated memory capacity of the virtual machine / memory over-allocation ratio of the virtual machine) × container memory over-allocation ratio, and the node allocated amount of container memory resources is "container allocated memory capacity".

[0098] (4) The amount of available storage resources in the storage pool = the total capacity of the storage pool × the storage resource over-allocation ratio - the total quota of used storage resources; where the allocatable amount of storage pool resources is the "total capacity of the storage pool", the actual allocatable amount of resources is the "total capacity of the storage pool × the storage resource over-allocation ratio", and the amount of resources allocated to the node is the "total quota of used storage resources".

[0099] S230: Determine at least one candidate node according to the resource allocation request and available resources of each schedulable node.

[0100] In this embodiment, after obtaining the available resource quantity of each schedulable node, nodes whose available resource quantity is greater than the resource demand can be screened as candidate nodes according to the resource demand in the resource allocation request.

[0101] Optionally, the method for determining at least one candidate node based on resource allocation requirements and available resources of each resource node may be: extracting the resource allocation requirements corresponding to the resource allocation request; and determining resource nodes whose available resources are greater than or equal to the resource allocation requirements among each schedulable node as candidate nodes.

[0102] Specifically, to become a candidate node, all resource conditions must be met, that is, the following conditions must be met at the same time: the number of available CPU cores on the node ≥ the CPU resource allocation requirements, the number of available memory resources on the node ≥ the memory resource allocation requirements, and the number of available storage resources on the node ≥ the storage pool resource allocation requirements. The resource over-allocation and scheduling mechanism will compare whether the current number of available resources on the node meets the resource requirements based on the above calculation formula and the system over-allocation ratio configuration. Nodes that do not meet the resource conditions are high-load nodes. If you continue to create components on this node, the performance of all components on the node will be affected, affecting system stability.

[0103] S240: Determine the candidate node having the least number of components among the at least one candidate node as the target resource node.

[0104] In this embodiment, after determining the candidate nodes by comparing whether the available resources of the current node meet the resource requirements, a node with the least number of components can be selected from the candidate nodes as the target resource node.

[0105] Specifically, if there are currently 3 resource nodes, namely node 1, node 2, and node 3, the number of components contained in each node is: node 1 contains 5 components, node 2 contains 1 component, and node 3 contains 3 components. According to the native LXD resource scheduling logic, assuming that nodes 2 and 3 can meet the configuration requirements, nodes 2 and 3 are passed to LXD for resource scheduling and allocation, and the node with the least number of components is selected from nodes 2 and 3 as the target resource node. If the resource over-allocation strategy is executed according to the preset resource over-allocation ratio, and it is determined through resource over-allocation and verification that nodes 1 and 3 can meet the configuration requirements, they are used as candidate nodes, and nodes 1 and 3 are passed to LXD. Then, through LXD's resource scheduling and allocation, the node with the least number of components in nodes 1 and 3 is selected as the target resource node.

[0106] S250: Map available resources of the target resource node to a virtual processor, and execute a target operation corresponding to the resource allocation request based on the virtual processor.

[0107] In this embodiment, the LXD platform can allocate resources such as CPU, memory, and storage at the physical hardware layer to virtual machines and containers.

[0108] Figure 4This is a schematic diagram of a resource scheduling process based on the LXD platform provided by an embodiment of the present invention. As shown in the figure, when the LXD platform performs resource scheduling, it first schedules the vCPU (virtual CPU) at the physical hardware resource layer, maps the physical hardware resources to the vCPU, and then schedules the thread or process on the vCPU, and maps the core thread of the virtual machine or container to the corresponding vCPU. There is no dependency between the scheduling strategies and mechanisms of the two-level scheduling. The vCPU scheduler is responsible for the allocation and scheduling of physical processor resources between various virtual machines or containers. In essence, it schedules the vCPU in each virtual machine on the physical processing unit according to certain strategies and mechanisms. Any strategy can be used to allocate physical resources to meet the different needs of virtual machines or containers. The vCPU can be scheduled to execute on one or more physical processing units (time-division multiplexing or space-division multiplexing physical processing units), or it can establish a one-to-one fixed mapping relationship with the physical processing unit (limiting access to specified physical processing units).

[0109] The virtualized resource scheduling method provided by the implementation of the present invention introduces a resource over-allocation strategy through a preset resource over-allocation ratio, which can improve resource utilization without increasing hardware costs, thereby using available resources more effectively, and resource scheduling can span multiple resource nodes, and ensure the global optimal allocation of resources through a distributed coordination mechanism, which can improve the overall utilization and response speed of the cluster. Through resource scheduling, tasks can be assigned to the most suitable resources to ensure that tasks can be completed on time, help optimize resource utilization, and ensure that resources are maximized in time and space. In the resource scheduling process, the most suitable resources can be selected for execution according to the nature and requirements of the task, thereby improving the execution efficiency and quality of the task. By reasonably allocating and arranging resources, the idleness and waste of resources can be reduced, and the overall efficiency can be improved.

[0110] Embodiment 3

[0111] Figure 5 A schematic diagram of the structure of a virtualized resource scheduling device provided in Embodiment 3 of the present invention is shown in FIG. Figure 5 As shown, the device includes: a resource information collection module 310, a target resource node determination module 320 and an operation execution module 330.

[0112] The resource information collection module 310 is used to obtain the schedulable nodes in the node cluster and collect the resource information of all the schedulable nodes.

[0113] The target resource node determination module 320 is used to determine the target resource node among the schedulable nodes in response to the resource allocation request according to the resource allocation request, resource information and a preset resource over-allocation ratio.

[0114] The operation execution module 330 is used to perform a target operation corresponding to the resource allocation request on the target resource node.

[0115] Optionally, the resource information includes processor resource information, memory resource information, and storage pool resource information.

[0116] Optionally, the target resource node determination module 320 is further configured to:

[0117] Determine the available resources of each schedulable node according to resource information and a preset resource over-allocation ratio; determine at least one candidate node according to a resource allocation request and the available resources of each schedulable node; and determine the candidate node with the least number of components among the at least one candidate node as a target resource node.

[0118] Optionally, the target resource node determination module 320 is further configured to:

[0119] For each schedulable node, the product of the allocatable resource amount and the resource over-allocation ratio is taken as the actual allocatable resource amount; the difference between the actual allocatable resource amount and the node's allocated resource amount is taken as the available resources.

[0120] Optionally, the target resource node determination module 320 is further configured to:

[0121] The resource allocation requirement corresponding to the resource allocation request is extracted; and the schedulable nodes whose available resources are greater than or equal to the resource allocation requirement among the resource nodes are determined as candidate nodes.

[0122] Optionally, the operation execution module 330 is further configured to:

[0123] The available resources of the target resource node are mapped to the virtual processor; and the target operation corresponding to the resource allocation request is executed based on the virtual processor.

[0124] The virtualization resource scheduling device provided in the embodiment of the present invention can execute the virtualization resource scheduling method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0125] Embodiment 4

[0126] Figure 6A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0127] like Figure 6 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0128] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0129] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a virtualized resource scheduling method.

[0130] In some embodiments, the virtualized resource scheduling method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the virtualized resource scheduling described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the virtualized resource scheduling method in any other appropriate manner (e.g., by means of firmware).

[0131] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0132] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0133] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0134] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0135] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0136] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0137] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0138] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A virtualization resource scheduling method, characterized in that: include: Obtain schedulable nodes in the node cluster and collect resource information of all the schedulable nodes; In response to a resource allocation request, determining a target resource node among the schedulable nodes according to the resource allocation request, the resource information, and a preset resource over-allocation ratio; A target operation corresponding to the resource allocation request is performed on the target resource node.

2. The method according to claim 1, characterized in that The resource information includes processor resource information, memory resource information and storage pool resource information.

3. The method according to claim 1, characterized in that Determining a target resource node among the schedulable nodes according to the resource allocation request, the resource information, and a preset resource over-allocation ratio includes: Determining available resources of each of the schedulable nodes according to the resource information and a preset resource over-allocation ratio; Determine at least one candidate node according to the resource allocation request and the available resources of each of the schedulable nodes; A candidate node including the least number of components among the at least one candidate node is determined as the target resource node.

4. The method according to claim 3, characterized in that Determining the available resources of each of the schedulable nodes according to the resource information and a preset resource over-allocation ratio includes: For each of the schedulable nodes, taking the product of the allocatable resource amount and the resource over-allocation ratio as the actual allocatable resource amount; The difference between the actual allocatable resource amount and the node allocated resource amount is taken as the available resource.

5. The method according to claim 3, characterized in that: Determining at least one candidate node according to the resource allocation request and the available resources of each of the schedulable nodes includes: Extracting a resource allocation requirement corresponding to the resource allocation request; A node whose available resources are greater than or equal to the resource allocation requirement among the schedulable nodes is determined as the candidate node.

6. The method according to claim 1, characterized in that Performing a target operation corresponding to the resource allocation request on the target resource node includes: Mapping the available resources of the target resource node to the virtual processor; A target operation corresponding to the resource allocation request is performed based on the virtual processor.

7. A virtualized resource scheduling device, characterized in that: include: A resource information collection module is used to obtain the schedulable nodes in the node cluster and collect resource information of all the schedulable nodes; A target resource node determination module, configured to respond to a resource allocation request and determine a target resource node among the schedulable nodes according to the resource allocation request, the resource information and a preset resource over-allocation ratio; The operation execution module is used to perform a target operation corresponding to the resource allocation request on the target resource node.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the virtualization resource scheduling method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the virtualization resource scheduling method according to any one of claims 1 to 6 when executed.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the virtualization resource scheduling method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Target resource determination method and device

    CN119809523A

  • Resource allocation method and device for non-uniform memory access and memory access method and device

    CN120371534A

  • Non-uniform memory access resource allocation method, memory access method and device

    CN120371534B