[go: up one dir, main page]

CN119105853A - A virtualized resource scheduling method, device, equipment, storage medium and product - Google Patents

A virtualized resource scheduling method, device, equipment, storage medium and product Download PDF

Info

Publication number
CN119105853A
CN119105853A CN202411261502.XA CN202411261502A CN119105853A CN 119105853 A CN119105853 A CN 119105853A CN 202411261502 A CN202411261502 A CN 202411261502A CN 119105853 A CN119105853 A CN 119105853A
Authority
CN
China
Prior art keywords
resource
node
target
allocation request
nodes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202411261502.XA
Other languages
Chinese (zh)
Inventor
杨鹏菲
孟晓晶
王帅
王彤
张海松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING LIANCHUANG XINAN TECHNOLOGY CO LTD
Original Assignee
BEIJING LIANCHUANG XINAN TECHNOLOGY CO LTD
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BEIJING LIANCHUANG XINAN TECHNOLOGY CO LTD filed Critical BEIJING LIANCHUANG XINAN TECHNOLOGY CO LTD
Priority to CN202411261502.XA priority Critical patent/CN119105853A/en
Publication of CN119105853A publication Critical patent/CN119105853A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种虚拟化资源调度方法、装置、设备、存储介质及产品,所述方法包括:获取节点集群中的可调度节点,并采集所有可调度节点的资源信息;响应于资源分配请求,根据资源分配请求、资源信息以及预设的资源超分比,确定可调度节点中的目标资源节点;在目标资源节点上进行与资源分配请求对应的目标操作。本发明公开的虚拟化资源调度方法,通过预设的资源超分比引入了资源超分策略,可以在不增加硬件成本的情况下提高资源利用率,从而更有效地使用可用资源,并且资源调度可以跨多个资源节点,通过分布式协调机制确保资源的全局最优分配,可以提高集群的整体利用率和响应速度。

The present invention discloses a virtualized resource scheduling method, device, equipment, storage medium and product, the method comprising: obtaining schedulable nodes in a node cluster and collecting resource information of all schedulable nodes; in response to a resource allocation request, determining a target resource node in the schedulable nodes according to the resource allocation request, resource information and a preset resource over-allocation ratio; and performing a target operation corresponding to the resource allocation request 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 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.

Description

Virtualized resource scheduling method, device, equipment, storage medium and product
Technical Field
The present invention relates to the field of cloud computing technologies, and in particular, to a method, an apparatus, a device, a storage medium, and a product for scheduling virtualized resources.
Background
With the rapid development and popularization of cloud computing technology, the demand of enterprises for elastic computing resources is increasing. Cloud computing provides on-demand allocation of resources, high availability, and cost effectiveness, forcing enterprises to seek more efficient and flexible resource management and scheduling solutions. LXD serves as a platform integrating lightweight system containers with traditional virtual machines while supporting kernel virtualization and hardware virtualization.
When the original LXD performs resource scheduling, traversing the containers and the number of virtual machines of the designated node group, and selecting the node with the least number as a candidate node. This strategy considers that the number of components created on the candidate node is the least, so the load is the least, but the actual resource usage of the components is ignored. In addition, the scheduling of resources in the prior art is limited to a single physical node, so that the problem of efficient scheduling of cross-nodes is not solved, and the adaptability to heterogeneous hardware environments is lacking.
Disclosure of Invention
The invention provides a virtualized resource scheduling method, a virtualized resource scheduling device, virtualized resource scheduling equipment, a virtualized resource scheduling device, a virtualized resource scheduling storage medium and a virtualized resource scheduling product, so that optimal utilization and load balancing of resources are achieved.
According to an aspect of the present invention, there is provided a virtualized resource scheduling method, including:
Acquiring schedulable nodes in a node cluster, and acquiring resource information of all the schedulable nodes;
Responding to a resource allocation request, and determining a target resource node in the schedulable nodes according to the resource allocation request, the resource information and a preset resource excess ratio;
And performing target operation corresponding to the resource allocation request on the target resource node.
Further, the resource information includes processor resource information, memory resource information, and storage pool resource information.
Further, determining a target resource node in the schedulable nodes according to the resource allocation request, the resource information and a preset resource superstration ratio includes:
Determining available resources of each schedulable node according to the resource information and a preset resource percentage;
Determining at least one candidate node according to the resource allocation request and available resources of each schedulable node;
And determining the candidate node with the least number of components in the at least one candidate node as the target resource node.
Further, determining available resources of each schedulable node according to the resource information and a preset resource percentage, including:
For each schedulable node, taking the product of the amount of the allocatable resources and the resource supersubstance as the actual amount of the allocatable resources;
And taking the difference between the actual allocable resource quantity and the node allocated resource quantity as the available resource.
Further, determining at least one candidate node according to the resource allocation requirement and the available resources of each schedulable node includes:
extracting a resource allocation requirement corresponding to the resource allocation request;
And determining the resource node with the available resource greater than or equal to the resource allocation requirement in each schedulable node as the candidate node.
Further, performing, on the target resource node, a target operation corresponding to the resource allocation request, including:
Mapping available resources of the target resource node to a virtual processor;
And executing target operation corresponding to the resource allocation request based on the virtual processor.
According to another aspect of the present invention, there is provided a virtualized resource scheduling apparatus comprising:
the resource information acquisition module is used for acquiring schedulable nodes in the node cluster and acquiring resource information of all the schedulable nodes;
A target resource node determining module, configured to determine a target resource node in the schedulable nodes according to a resource allocation request, the resource information and a preset resource percentage in response to the resource allocation request;
And the operation execution module is used for carrying out target operation corresponding to the resource allocation request on the target resource node.
Optionally, the resource information includes processor resource information, memory resource information, and storage pool resource information.
Optionally, the target resource node determining module is further configured to:
Determining available resources of each schedulable node according to the resource information and a preset resource percentage;
Determining at least one candidate node according to the resource allocation request and available resources of each schedulable node;
And determining the candidate node with the least number of components in the at least one candidate node as the target resource node.
Optionally, the target resource node determining module is further configured to:
For each schedulable node, taking the product of the amount of the allocatable resources and the resource supersubstance as the actual amount of the allocatable resources;
And taking the difference between the actual allocable resource quantity and the node allocated resource quantity as the available resource.
Optionally, the target resource node determining module is further configured to:
extracting a resource allocation requirement corresponding to the resource allocation request;
And determining the resource node with the available resource greater than or equal to the resource allocation requirement in each schedulable node as the candidate node.
Optionally, the operation execution module is further configured to:
Mapping available resources of the target resource node to a virtual processor;
And executing target operation corresponding to the resource allocation request based on the virtual processor.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor, and
A memory communicatively coupled to the at least one processor, wherein,
The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the virtualized resource scheduling method of any embodiment of the invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the virtualized resource scheduling method according to any embodiment of the present invention.
According to another aspect of the present invention there is provided a computer program product comprising computer programs/instructions which when executed by a processor implement the steps of the virtualized resource scheduling method of any embodiment of the invention.
The virtualized resource scheduling method comprises the steps of firstly obtaining schedulable nodes in a node cluster, collecting resource information of all schedulable nodes, then responding to a resource allocation request, determining target resource nodes in the schedulable nodes according to the resource allocation request, the resource information and a preset resource excess ratio, and finally performing target operation corresponding to the resource allocation request on the target resource nodes. According to the virtualized resource scheduling method disclosed by the invention, the resource superdivision strategy is introduced through the preset resource superdivision ratio, so that the resource utilization rate can be improved under the condition of not increasing the hardware cost, the available resources can be used more effectively, the resource scheduling can span a plurality of resource nodes, the global optimal allocation of the resources is ensured through the distributed coordination mechanism, and the overall utilization rate and the response speed of the cluster can be improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a virtualized resource scheduling method provided in accordance with a first embodiment of the invention;
FIG. 2 is a schematic diagram of resource allocation for an LXD platform according to a first embodiment of the present invention;
FIG. 3 is a flowchart of a virtualized resource scheduling method provided according to a second embodiment of the invention;
fig. 4 is a schematic diagram of a resource scheduling process based on an LXD platform according to a second embodiment of the present invention;
fig. 5 is a schematic structural diagram of a virtualized resource scheduling device according to a third embodiment of the present invention;
Fig. 6 is a schematic structural diagram of an electronic device implementing a virtualized resource scheduling method according to a fourth embodiment of the invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a virtualized resource scheduling method according to an embodiment of the present invention, where the method may be performed by a virtualized resource scheduling device, and the virtualized resource scheduling device may be implemented in hardware and/or software, and the virtualized resource scheduling device may be configured in an electronic device. As shown in fig. 1, the method includes:
S110, acquiring schedulable nodes in the node cluster and collecting resource information of all schedulable nodes.
The node cluster is a set of one or more resource nodes, the resource nodes are physical machines with hardware resources, and the schedulable nodes are resource nodes which can be used for scheduling in the node cluster.
In this embodiment, the resource information includes processor (CPU) resource information, memory resource information, and storage pool resource information.
Preferably, the virtualized resource scheduling method provided by the embodiment can be applied to LXD (Linux Container Daemon) platforms, LXD is a management tool of a container and a virtual machine, has an intelligent resource scheduling function, can optimize resource allocation, improve system efficiency, enhance security and simplify operation and maintenance management, and is suitable for occasions including enterprise data centers, cloud computing platforms, big data processing, edge computing environments and the like.
Specifically, the LXD platform is used for resource scheduling, objects in the LXD platform, which need to be subjected to resource scheduling, include a cloud component and a cloud hard disk, and the operation of the cloud component and the cloud hard disk is affected by the shortage of node resources (processor resource information, memory resource information and storage pool resource information). For a resource node, if the number of available processors (CPU) and memory resources of the node is insufficient, the operations of component creation, configuration adjustment, hot upgrading and migration cannot be executed on the node, and if the storage resources of the node are insufficient, the operations of component creation, migration, system disk capacity expansion and cloud hard disk creation, capacity expansion, storage pool migration and node migration cannot be executed on the node. After the LXD cluster is started, resource information of all schedulable nodes in the cluster, including physical resource (CPU resource and memory resource) information and storage pool resource information of all schedulable nodes, can be collected and stored in corresponding node/storage pool configurations.
Fig. 2 is a schematic diagram of resource allocation of an LXD platform according to an embodiment of the present invention, where as shown in the drawing, cloud component related operations include creating, modifying configuration, hot upgrading, migration, and system disk expansion, where the creating, modifying configuration, hot upgrading, and migration operations have CPU resource and memory resource requirements, and the creating, migrating, and system disk expansion memory storage pool resource requirements, and cloud hard disk related operations include creating, expanding, migration across storage pools, and migration across nodes, where each operation has a storage pool resource requirement.
S120, responding to the resource allocation request, and determining a target resource node in the schedulable nodes according to the resource allocation request, the resource information and the preset resource superstration.
The resource allocation request is a request for allocating node resources generated by user operation, and the target resource node is a node which is determined in the schedulable nodes and can provide needed resources for the user operation.
In this embodiment, a resource supersubstance (over-commit) policy is adopted in the resource scheduling process, and the resource supersubstance allows the system to allocate virtual resources exceeding the total amount of physical resources to an application program or a virtual machine. This technique takes advantage of the feature that most applications do not always require all of their resources configured in actual use, so that the amount of resources allocated to a client exceeds the total amount of physical resources. Because clients in the physical machine cannot be in a high-load state, proper oversubscription facilitates full utilization of resources, and utilization of resources can be improved without increasing hardware cost through the resource oversubscription, so that available resources can be used more effectively.
Preferably, when the user performs an operation of occupying resources, for example, submitting a component creation request, a corresponding resource allocation request is initiated, the resource scheduling mechanism analyzes the resource allocation request, and the number of available resources in each resource node can be calculated according to the pre-configured resource superstratum and the resource information of each resource node, and the node in which the number of available resources is greater than the resource requirement is screened as a candidate node. And if the number of the candidate nodes is greater than one, acquiring the node with the least number of components on the node as a target resource node according to the original LXD resource scheduling logic.
S130, performing target operation corresponding to the resource allocation request on the target resource node.
In this embodiment, after determining a target resource node in the schedulable node, a target operation corresponding to the resource allocation request may be performed on the target resource node, for example, the resource allocation request is generated by a user submitting a component creation request, and after determining the target resource node, a component created by the user request may be created on the target resource node.
In particular, LXD is a secure and powerful system container and virtual machine manager. It provides a unified user experience for a complete Linux system running and managed within a container or virtual machine. Kernel virtualization is implemented through a Cgroup (control groups) and Namespace (namespaces), LXD daemon uses LXC (Linux container) technology to create and manage containers, QEMU/KVM technology is used to implement hardware virtualization, and a complete virtual hardware system environment is provided for a virtual machine. In LXD, the CPU occupied by all components is actually a vCPU (virtual processor), each client is a Linux process, and each vCPU is a common thread derived from the Host (physical machine) and allocated to the Guest client (virtual machine), and the vCPU is a thread derived from the process and then dynamically scheduled to run on pCPU (physical processor).
The virtualized resource scheduling method comprises the steps of firstly obtaining schedulable nodes in a node cluster, collecting resource information of all schedulable nodes, then responding to a resource allocation request, determining target resource nodes in the schedulable nodes according to the resource allocation request, the resource information and a preset resource excess ratio, and finally performing target operation corresponding to the resource allocation request on the target resource nodes. According to the virtualized resource scheduling method disclosed by the invention, the resource superdivision strategy is introduced through the preset resource superdivision ratio, so that the resource utilization rate can be improved under the condition of not increasing the hardware cost, the available resources can be used more effectively, the resource scheduling can span a plurality of resource nodes, the global optimal allocation of the resources is ensured through the distributed coordination mechanism, and the overall utilization rate and the response speed of the cluster can be improved.
Example two
Fig. 3 is a flowchart of a virtualized resource scheduling method according to a second embodiment of the present invention, where the embodiment is a refinement of the foregoing embodiment, and as shown in fig. 3, the method includes:
s210, acquiring schedulable nodes in the node cluster and collecting resource information of all schedulable nodes.
The node cluster is a set of one or more resource nodes, the resource nodes are physical machines with hardware resources, and the schedulable nodes are resource nodes which can be used for scheduling in the node cluster.
In this embodiment, the resource information includes processor (CPU) resource information, memory resource information, and storage pool resource information.
Preferably, the virtualized resource scheduling method provided by the embodiment can be applied to LXD (Linux Container Daemon) platforms, LXD is a management tool of a container and a virtual machine, has an intelligent resource scheduling function, can optimize resource allocation, improve system efficiency, enhance security and simplify operation and maintenance management, and is suitable for occasions including enterprise data centers, cloud computing platforms, big data processing, edge computing environments and the like.
Specifically, the LXD platform is used for resource scheduling, objects in the LXD platform, which need to be subjected to resource scheduling, include a cloud component and a cloud hard disk, and the operation of the cloud component and the cloud hard disk is affected by the shortage of node resources (processor resource information, memory resource information and storage pool resource information). After the LXD cluster is started, resource information of all schedulable nodes, including physical resource (CPU resource and memory resource) information and storage pool resource information of all schedulable nodes, can be collected and stored in corresponding node/storage pool configuration.
S220, responding to the resource allocation request, and determining available resources of each schedulable node according to the resource information and the preset resource percentage.
In this embodiment, when the user performs an operation that needs to occupy resources, for example, submits a component creation request, a corresponding resource allocation request is initiated, and the resource scheduling mechanism responds to the resource allocation request, and may calculate the amount of available resources in each schedulable node according to the pre-configured resource percentage and the resource information of each schedulable node
Optionally, the method for determining the available resources of each schedulable node according to the resource information and the preset resource excess ratio may be to take, for each schedulable node, the product of the amount of the schedulable resources and the resource excess ratio as the actual amount of the schedulable resources, and take the difference between the actual amount of the schedulable resources and the amount of the resources allocated by the node as the available resources.
Specifically, parameters configurable in the resource superdivision mechanism are:
(1) System reserved resource configuration:
The system reserves CPU resource of reserved_node_cpu
Reserved memory resource of system
(2) And (3) configuring the resource excess ratio:
CPU resource superstration: cpu_allocation_ratio
Virtual machine memory resource superstration: vm_ram_allocation_ratio
The memory resource of the container is calculated by the following percentage: ct_ram_allocation_ratio
Storing the resource excess ratio: [ driver ] _allocation_ratio ]
Typically, the default system reserves resources of 4 cores 4GiB, and the default resource superstration is configured to be 1.0 (not superstration). The storage resource superstration is related to the storage drive, and needs to be configured separately, for example, the zfs storage pool superstration configuration key is zfs_allocation_ratio, and the ceph storage pool superstration configuration key is ceph _allocation_ratio.
The calculation formula of the available resources of each schedulable node is as follows:
(1) The available CPU core number= (total core number of physical machine-reserved core number of system) x CPU excess ratio-virtual machine allocated core number- (container allocated core number x CPU limit), wherein the amount of the allocated resources of the CPU resource is ' total core number of physical machine-reserved core number of system ', the actual amount of the allocated resources is ' total core number of physical machine-reserved core number of system x CPU excess ratio ', and the amount of the allocated resources of the node is ' virtual machine allocated core number + (container allocated core number x CPU limit) ".
(2) The available memory resource quantity of the virtual machine= (total memory capacity of the physical machine-reserved memory capacity of the system/super-allocated memory capacity of the container) ×super-allocated memory capacity of the virtual machine, wherein the allocatable resource quantity of the memory resource of the virtual machine is 'total memory capacity of the physical machine-reserved memory of the system-allocated memory capacity of the container/super-allocated memory capacity of the container) ×super-allocated memory capacity of the virtual machine', and the actual allocatable resource quantity of the memory resource of the virtual machine is '(total memory capacity of the physical machine-reserved memory capacity of the system-allocated memory capacity of the container/super-allocated memory capacity of the container) ×super-allocated memory capacity of the virtual machine', and the node allocated resource quantity of the memory resource of the virtual machine is 'allocated memory capacity of the virtual machine'.
(3) The available memory resource quantity of the container= (total memory capacity of the physical machine-reserved memory of the system-allocated memory capacity of the virtual machine/virtual machine memory excess ratio) ×the memory capacity of the container-allocated memory capacity of the container, wherein the allocatable resource quantity of the memory resource of the container is 'total memory capacity of the physical machine-reserved memory of the system-allocated memory capacity of the virtual machine/virtual machine memory excess ratio', the actual allocatable resource quantity of the memory resource of the container is 'total memory capacity of the physical machine-reserved memory of the system-allocated memory capacity of the virtual machine/virtual machine memory excess ratio) ×the memory excess ratio of the container', and the node allocated resource quantity of the memory resource of the container is 'allocated memory capacity of the container'.
(4) The method comprises the steps of storing available storage resource quantity = storage pool total capacity x storage resource excess ratio-used storage resource total quota, wherein the allocatable resource quantity of storage pool resources is 'storage pool total capacity', the actual allocatable resource quantity is 'storage pool total capacity x storage resource excess ratio', and the node allocated resource quantity is 'used storage resource total quota'.
S230, at least one candidate node is determined according to the resource allocation request and the available resources of each schedulable node.
In this embodiment, after the number of available resources of each schedulable node is obtained, nodes in which the number of available resources is greater than the resource requirement may be screened as candidate nodes according to the resource requirement in the resource allocation request.
Optionally, the method for determining at least one candidate node according to the resource allocation requirement and the available resources of each resource node may be that the resource allocation requirement corresponding to the resource allocation request is extracted, and the resource node with the available resources greater than or equal to the resource allocation requirement in each schedulable node is determined as the candidate node.
Specifically, the candidate node needs to meet all resource conditions, namely the number of CPU cores available to the node is more than or equal to the CPU resource allocation requirement, the number of memory resources available to the node is more than or equal to the memory resource allocation requirement, and the number of memory resources available to the node is more than or equal to the memory pool resource allocation requirement. The resource superdistribution and scheduling mechanism compares whether the quantity of the available resources of the current node meets the resource requirement according to the calculation formula and the system superdistribution configuration. Nodes that do not meet the resource condition are high-load nodes, and if components continue to be created on the nodes, the performance of all components on the nodes is affected, and the system stability is affected.
S240, determining the candidate node with the least number of components in the at least one candidate node as a target resource node.
In this embodiment, after determining candidate nodes by comparing whether the number of available resources of the current node meets the resource requirement, one node with the minimum number of components is selected from the candidate nodes as the target resource node.
Specifically, if there are 3 resource nodes currently being node 1, node 2 and node 3, respectively, the number of components contained in each node is that node 1 contains 5 components, node 2 contains 1 component, and node 3 contains 3 components. According to the original LXD resource scheduling logic, assuming that the node 2 and the node 3 can meet the configuration requirement, transmitting the nodes 2 and 3 to the LXD for resource scheduling and allocation, and selecting the node with the minimum component number from the nodes 2 and 3 as a target resource node. If the resource superdivision strategy is executed according to the preset resource superdivision ratio, the nodes 1 and 3 are determined to meet the configuration requirement after the resource superdivision and the verification, the nodes 1 and 3 are used as candidate nodes, the nodes 1 and 3 are transmitted to the LXD point, and the node with the least number of components in the nodes 1 and 3 is selected as a target resource node through the resource scheduling and the allocation of the LXD.
S250, available resources of the target resource node are mapped to the virtual processor, and target operation corresponding to the resource allocation request is executed based on the virtual processor.
In this embodiment, the LXD platform may allocate the resource scheduling of the CPU, memory, and storage of the physical hardware layer to the virtual machine and container.
Fig. 4 is a schematic diagram of a resource scheduling process based on an LXD platform according to an embodiment of the present invention, where when the LXD platform performs resource scheduling, as shown in the drawing, scheduling of a vCPU (virtual CPU) on a physical hardware resource layer is performed first, mapping a physical hardware resource to the vCPU, then performing scheduling of a thread or a process on the vCPU, mapping a core thread of a virtual machine or a container to a corresponding vCPU, where a scheduling policy and a mechanism of two-stage scheduling have no dependency. The vCPU scheduler is responsible for the allocation and scheduling of physical processor resources among the virtual machines or containers, namely, the vCPU in each virtual machine is essentially scheduled on a physical processing unit according to a certain strategy and mechanism, and any strategy can be adopted to allocate the physical resources so as to meet different requirements of the virtual machines or containers. The vCPU may be scheduled to execute on one or more physical processing units (time-division multiplexed or spatially multiplexed physical processing units), or may establish a one-to-one fixed mapping relationship with the physical processing units (restricted access to a specified physical processing unit).
According to the virtualized resource scheduling method provided by the embodiment of the invention, the resource superdivision strategy is introduced through the preset resource superdivision ratio, so that the resource utilization rate can be improved under the condition of not increasing the hardware cost, the available resources can be used more effectively, the resource scheduling can span a plurality of resource nodes, the global optimal allocation of the resources is ensured through the distributed coordination mechanism, and the overall utilization rate and the response speed of the cluster can be improved. By means of resource scheduling, tasks can be allocated to the most suitable resources, the tasks can be completed on time, resource utilization is optimized, and the maximum utilization of the resources in time and space is ensured. In the resource scheduling process, the most suitable resource can be selected for execution according to the property and the requirement of the task, so that the execution efficiency and the quality of the task are improved. By reasonably distributing and arranging the resources, the idle and waste of the resources can be reduced, and the overall efficiency is improved.
Example III
Fig. 5 is a schematic structural diagram of a virtualized resource scheduling device according to a third embodiment of the present invention, where, as shown in fig. 5, the device includes a resource information acquisition module 310, a target resource node determining module 320, and an operation executing module 330.
The resource information collection module 310 is configured to obtain schedulable nodes in the node cluster, and collect resource information of all schedulable nodes.
The target resource node determining module 320 is configured to determine, in response to the resource allocation request, a target resource node of the schedulable nodes according to the resource allocation request, the resource information, and a preset resource superstration.
The operation execution module 330 is configured to perform a target operation corresponding to the resource allocation request on the target resource node.
Optionally, the resource information includes processor resource information, memory resource information, and storage pool resource information.
Optionally, the target resource node determining module 320 is further configured to:
The method comprises the steps of determining available resources of each schedulable node according to resource information and preset resource percentage, determining at least one candidate node according to a resource allocation request and the available resources of each schedulable node, and determining the candidate node with the minimum component number in the at least one candidate node as a target resource node.
Optionally, the target resource node determining module 320 is further configured to:
For each schedulable node, taking the product of the amount of the allocatable resources and the resource excess ratio as the actual amount of the allocatable resources, and taking the difference between the actual amount of the allocatable resources and the amount of the resources allocated by the node as the available resources.
Optionally, the target resource node determining module 320 is further configured to:
And determining schedulable nodes with available resources larger than or equal to the resource allocation requirements in each resource node as candidate nodes.
Optionally, the operation execution module 330 is further configured to:
and executing target operation corresponding to the resource allocation request based on the virtual processor.
The virtualized resource scheduling device provided by the embodiment of the invention can execute the virtualized resource scheduling method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 6 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 6, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may 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 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including an input unit 16, such as a keyboard, mouse, etc., an output unit 17, such as various types of displays, speakers, etc., a storage unit 18, such as a magnetic disk, optical disk, etc., and a communication unit 19, such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the virtualized resource scheduling method.
In some embodiments, the virtualized resource scheduling method may be implemented as a computer program tangibly embodied on a computer readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more of the steps of virtualized resource scheduling described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the virtualized resource scheduling method in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be a special or general purpose programmable processor, operable to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out 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, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can 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 a trackball) by which the user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user, for example, 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, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can 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.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1.一种虚拟化资源调度方法,其特征在于,包括:1. A virtualization resource scheduling method, characterized by comprising: 获取节点集群中的可调度节点,并采集所有所述可调度节点的资源信息;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.根据权利要求1所述的方法,其特征在于,所述资源信息包括处理器资源信息、内存资源信息和存储池资源信息。2. The method according to claim 1 is characterized in that the resource information includes processor resource information, memory resource information and storage pool resource information. 3.根据权利要求1所述的方法,其特征在于,根据所述资源分配请求、所述资源信息以及预设的资源超分比,确定所述可调度节点中的目标资源节点,包括:3. The method according to claim 1, characterized in that determining the target resource node among the schedulable nodes according to the resource allocation request, the resource information and a preset resource over-allocation ratio comprises: 根据所述资源信息与预设的资源超分比确定各所述可调度节点的可用资源;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.根据权利要求3所述的方法,其特征在于,根据所述资源信息与预设的资源超分比确定各所述可调度节点的可用资源,包括: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 comprises: 针对每一个所述可调度节点,将可分配资源量与所述资源超分比的乘积作为实际可分配资源量;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.根据权利要求3所述的方法,其特征在于,根据所述资源分配请求与各所述可调度节点的可用资源确定至少一个候选节点,包括: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 comprises: 提取所述资源分配请求对应的资源分配需求;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.根据权利要求1所述的方法,其特征在于,在所述目标资源节点上进行与所述资源分配请求对应的目标操作,包括: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 comprises: 将所述目标资源节点的可用资源映射到虚拟处理器上;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.一种虚拟化资源调度装置,其特征在于,包括:7. A virtualized resource scheduling device, comprising: 资源信息采集模块,用于获取节点集群中的可调度节点,并采集所有所述可调度节点的资源信息;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.一种电子设备,其特征在于,所述电子设备包括: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, 所述存储器存储有可被所述至少一个处理器执行的计算机程序,所述计算机程序被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-6中任一项所述的虚拟化资源调度方法。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.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机指令,所述计算机指令用于使处理器执行时实现权利要求1-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.一种计算机程序产品,包括计算机程序/指令,其特征在于,所述计算机程序/指令被处理器执行时实现如权利要求1-6中任一项所述的虚拟化资源调度方法的步骤。10. A computer program product, comprising a computer program/instruction, wherein when the computer program/instruction is executed by a processor, the steps of the virtualization resource scheduling method according to any one of claims 1 to 6 are implemented.
CN202411261502.XA 2024-09-10 2024-09-10 A virtualized resource scheduling method, device, equipment, storage medium and product Pending CN119105853A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411261502.XA CN119105853A (en) 2024-09-10 2024-09-10 A virtualized resource scheduling method, device, equipment, storage medium and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411261502.XA CN119105853A (en) 2024-09-10 2024-09-10 A virtualized resource scheduling method, device, equipment, storage medium and product

Publications (1)

Publication Number Publication Date
CN119105853A true CN119105853A (en) 2024-12-10

Family

ID=93713249

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411261502.XA Pending CN119105853A (en) 2024-09-10 2024-09-10 A virtualized resource scheduling method, device, equipment, storage medium and product

Country Status (1)

Country Link
CN (1) CN119105853A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119809523A (en) * 2024-12-20 2025-04-11 北京百度网讯科技有限公司 Target resource determination method and device
CN120371534A (en) * 2025-06-25 2025-07-25 启元实验室 Resource allocation method for non-uniform memory access, memory access method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119809523A (en) * 2024-12-20 2025-04-11 北京百度网讯科技有限公司 Target resource determination method and device
CN120371534A (en) * 2025-06-25 2025-07-25 启元实验室 Resource allocation method for non-uniform memory access, memory access method and device
CN120371534B (en) * 2025-06-25 2025-11-04 启元实验室 Resource allocation method for non-uniform memory access, memory access method and device

Similar Documents

Publication Publication Date Title
US9304803B2 (en) Cooperative application workload scheduling for a consolidated virtual environment
US10193963B2 (en) Container virtual machines for hadoop
US9183016B2 (en) Adaptive task scheduling of Hadoop in a virtualized environment
US9052932B2 (en) Hybrid virtual machine configuration management
US9176764B1 (en) Managing memory in virtualized environments
CN117480494A (en) Coordinated container scheduling to improve resource allocation in virtual computing environments
CN103473115B (en) virtual machine placement method and device
US20110167421A1 (en) Dynamic Scaling of Management Infrastructure in Virtual Environments
CN119105853A (en) A virtualized resource scheduling method, device, equipment, storage medium and product
CN107239329A (en) Unified resource dispatching method and system under cloud environment
US20160196157A1 (en) Information processing system, management device, and method of controlling information processing system
CN104050137B (en) The method and device that kernel is run in a kind of OS
CN103064746A (en) Processor resource accurate distributing method for predictive scheduling based on current credit
CN107003713B (en) Event driven method and system for logical partitioning for power management
CN110098946A (en) Virtualize the dispositions method and device of network element device
CN115280285A (en) Scheduling workloads on a common set of resources by multiple schedulers operating independently
CN106713375A (en) Method and device for allocating cloud resources
CN114546587A (en) A method for expanding and shrinking capacity of online image recognition service and related device
CN115878257A (en) Method and computing device for optimizing network equipment queue management
CN115951974B (en) Management method, system, equipment and medium of GPU virtual machine
US9575795B2 (en) Reverting a virtual resource to its base configuration using the snapshot image based on frequency the virtual resource is requested
CN105100180A (en) Cluster node dynamic loading method, device and system
EP4109255B1 (en) Scheduling in a container orchestration system utilizing hardware topology hints
US20240160487A1 (en) Flexible gpu resource scheduling method in large-scale container operation environment
CN109558214B (en) Host machine resource management method and device in heterogeneous environment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination