CN114996005A - Resource scheduling method, device, equipment and medium - Google Patents

Resource scheduling method, device, equipment and medium Download PDF

Info

Publication number
CN114996005A
CN114996005A CN202210606148.4A CN202210606148A CN114996005A CN 114996005 A CN114996005 A CN 114996005A CN 202210606148 A CN202210606148 A CN 202210606148A CN 114996005 A CN114996005 A CN 114996005A
Authority
CN
China
Prior art keywords
virtual machine
computing node
data center
computing
filter
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
CN202210606148.4A
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.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data 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 Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202210606148.4A priority Critical patent/CN114996005A/en
Publication of CN114996005A publication Critical patent/CN114996005A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a resource scheduling method, a device, equipment and a medium, which relate to the technical field of computers and comprise the following steps: acquiring a virtual machine creation request, and processing the virtual machine creation request by using a first preset filter to determine a target data center; screening out a first computing node from a plurality of computing nodes of the target data center by utilizing a second preset filter based on the virtual machine creation request; a second compute node is determined based on the first compute node to create a virtual machine on the second compute node. After the virtual machine creation request is obtained, the virtual machine creation request is processed through the first preset filter and the second preset filter, so that a first computing node is screened out from a target data center, and a second computing node is determined based on the first computing node, so that a virtual machine is created on the second computing node. And the computing nodes with sufficient residual resources can be scheduled to create the virtual machine through the setting of the filter.

Description

Resource scheduling method, device, equipment and medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a medium for resource scheduling.
Background
A compute node has various resources, such as the number of Central Processing Units (CPUs), the memory capacity, the number of Graphics Processing Units (GPUs), and so on. With the increasing demands for GPUs in the market, the utilization rate of GPU resources becomes an important issue for customers to pay attention to. The intelligent scheduling of the GPU equipment is divided into pGPU intelligent scheduling and vGPU intelligent scheduling, and because the pGPU and vGPU equipment used by the virtual machine are both in a direct connection mode and the GPU equipment on the physical machine can only be in one mode of pGPU and vGPU, the virtual machine can only bind one of the pGPU or vGPU. The intelligent scheduling of the GPU equipment aims at scheduling the computing nodes with more residual pGPU/vGPU resources, so that the idle rate of the GPU equipment is reduced, and the utilization rate of the GPU resources is obviously improved. Meanwhile, other resources of the computing node, such as a central processing unit and contents, also need to be intelligently scheduled, so as to improve the utilization rate of each resource.
In summary, how to implement intelligent scheduling of the current remaining resources in each computing node to improve the utilization rate of the current remaining resources is a problem to be solved at present.
Disclosure of Invention
In view of this, an object of the present invention is to provide a resource scheduling method, device, apparatus and medium, which can implement intelligent scheduling of current remaining resources in each computing node to improve the utilization rate of the current remaining resources. The specific scheme is as follows:
in a first aspect, the present application discloses a resource scheduling method, including:
acquiring a virtual machine creation request, and processing the virtual machine creation request by using a first preset filter to determine a target data center;
screening out a first computing node from a plurality of computing nodes of the target data center by utilizing a second preset filter based on the virtual machine creation request;
a second compute node is determined based on the first compute node to create a virtual machine on the second compute node.
Optionally, the processing the virtual machine creation request by using the first preset filter to determine the target data center includes:
determining a target data center from all data centers by using a data center filter based on the data center identification in the virtual machine creation request.
Optionally, the resource scheduling method further includes:
constructing the second preset filter based on a central processing unit quantity filter, a memory capacity filter and a graphics processor quantity filter;
correspondingly, the screening out a first computing node from a plurality of computing nodes in the target data center based on the virtual machine creation request and by using a second preset filter includes:
and screening out first computing nodes from a plurality of computing nodes of the target data center by respectively utilizing the central processing unit quantity filter, the memory capacity filter and the graphics processor quantity filter based on the first central processing unit quantity, the first memory capacity and the first graphics processor quantity in the virtual machine creation request.
Optionally, in the process of screening out a first computing node from a plurality of computing nodes in the target data center by using the central processing unit quantity filter, the memory capacity filter, and the graphics processing unit quantity filter, the method further includes:
comparing the current second graphics processor quantity of each compute node in the target data center with the first graphics processor quantity;
and if the number of the second graphic processors is not less than the number of the first graphic processors, determining the corresponding computing node as a first computing node.
Optionally, the determining a second computing node based on the first computing node includes:
if the number of the first computing nodes is multiple, performing normalization processing on the current number of the second central processing units, the current second memory capacity and the current number of the second graphic processors of each first computing node to obtain a corresponding normalization value;
distributing a weight coefficient to all the normalized values of each first computing node, and performing weighted computation on the normalized values by using the weight coefficients to obtain weight values corresponding to the first computing nodes;
determining a second computing node based on the weight values of all the first computing nodes.
Optionally, the determining a second computing node based on the weight values of all the first computing nodes includes:
screening out a maximum weight value from the weight values of all the first computing nodes, and determining the first computing node corresponding to the maximum weight value as a second computing node.
Optionally, the determining a second computing node based on the first computing node includes:
and if the number of the first computing nodes is single, directly determining the first computing nodes as second computing nodes.
In a second aspect, the present application discloses a resource scheduling apparatus, including:
the first filtering module is used for acquiring a virtual machine creation request and processing the virtual machine creation request by using a first preset filter to determine a target data center;
the second filtering module is used for screening out first computing nodes from a plurality of computing nodes of the target data center by utilizing a second preset filter based on the virtual machine creating request;
a virtual machine creation module to determine a second computing node based on the first computing node to create a virtual machine on the second computing node.
In a third aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the resource scheduling method disclosed in the foregoing.
In a fourth aspect, the present application discloses a computer readable storage medium for storing a computer program; wherein the computer program realizes the steps of the resource scheduling method disclosed in the foregoing when being executed by a processor.
Therefore, the method includes the steps that a virtual machine creation request is obtained, and the virtual machine creation request is processed by a first preset filter to determine a target data center; screening out a first computing node from a plurality of computing nodes of the target data center by utilizing a second preset filter based on the virtual machine creation request; a second compute node is determined based on the first compute node to create a virtual machine on the second compute node. Therefore, after the virtual machine creation request is obtained, the virtual machine creation request is processed by using a first preset filter and a second preset filter, specifically, a target data center is determined from all data centers, then a first computing node is screened from a plurality of computing nodes of the target data center, and a second computing node is determined based on the first computing node, so that a virtual machine is created on the second computing node. Therefore, the computing node with sufficient current residual resources can be scheduled to create the virtual machine through the setting of the first preset filter and the second preset filter, and the utilization rate of the current residual resources in the computing node is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a resource scheduling method disclosed in the present application;
FIG. 2 is a flowchart of a specific resource scheduling method disclosed in the present application;
FIG. 3 is a flowchart of a specific resource scheduling method disclosed in the present application;
FIG. 4 is a diagram illustrating a specific resource scheduling process disclosed herein;
fig. 5 is a schematic structural diagram of a resource scheduling apparatus disclosed in the present application;
fig. 6 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
A compute node has various resources, such as the number of Central Processing Units (CPUs), the memory capacity, the number of Graphics Processing Units (GPUs), and so on. The intelligent scheduling of the GPU equipment aims at scheduling the computing nodes with more residual pGPU/vGPU resources, so that the idle rate of the GPU equipment is reduced, and the utilization rate of the GPU resources is obviously improved. Meanwhile, other resources of the computing node, such as a central processing unit and contents, also need to be intelligently scheduled, so as to improve the utilization rate of each resource. Therefore, the embodiment of the application discloses a resource scheduling method, a resource scheduling device and a resource scheduling medium, which can realize intelligent scheduling of current remaining resources in each computing node so as to improve the utilization rate of the current remaining resources. Particularly, the method is applied to an OpenStack cloud platform.
Referring to fig. 1, an embodiment of the present application discloses a resource scheduling method, including:
step S11: the method comprises the steps of obtaining a virtual machine creation request, and processing the virtual machine creation request by using a first preset filter to determine a target data center.
In this embodiment, after the virtual machine creation request is acquired, the virtual machine creation request is processed by using a first preset filter to determine a target data center. That is, it is determined in which data center the virtual machine needs to be created according to the relevant information in the virtual machine creation request.
Step S12: and screening out a first computing node from a plurality of computing nodes of the target data center by utilizing a second preset filter based on the virtual machine creation request.
In this embodiment, after the target data center is determined, the first computing node is further screened out from a plurality of computing nodes of the target data center by using a second preset filter according to the relevant information of the virtual machine creation request. That is, for a plurality of computing nodes in the target data center, the first computing node that meets the virtual machine creation request needs to be screened out according to the setting of the second preset filter, and at this time, the number of the screened out first computing nodes may be multiple or 1, or may not exist, and needs to be determined according to specific situations.
Step S13: a second computing node is determined based on the first computing node to create a virtual machine on the second computing node.
In this embodiment, a second computing node that best satisfies the virtual machine creation request needs to be determined from the screened first computing nodes, so as to create the virtual machine on the second computing node.
Therefore, the method and the device for establishing the virtual machine acquire the virtual machine establishing request, and process the virtual machine establishing request by using a first preset filter to determine a target data center; screening out a first computing node from a plurality of computing nodes of the target data center by utilizing a second preset filter based on the virtual machine creation request; a second compute node is determined based on the first compute node to create a virtual machine on the second compute node. Therefore, after the virtual machine creation request is obtained, the virtual machine creation request is processed by using a first preset filter and a second preset filter, specifically, a target data center is determined from all data centers, then a first computing node is screened from a plurality of computing nodes of the target data center, and a second computing node is determined based on the first computing node, so that a virtual machine is created on the second computing node. Therefore, the computing node with sufficient current residual resources can be scheduled to create the virtual machine through the setting of the first preset filter and the second preset filter, and the utilization rate of the current residual resources in the computing node is improved.
Referring to fig. 2, the embodiment of the present application discloses a specific resource scheduling method, and compared with the previous embodiment, the present embodiment further describes and optimizes the technical solution. The method specifically comprises the following steps:
step S21: and acquiring a virtual machine creation request, and determining a target data center from all data centers by using a data center filter based on the data center identification in the virtual machine creation request.
In this embodiment, the first preset filter may specifically be a data center filter. The virtual machine creation request carries the data center identification, so that the data center filter can be used for determining a corresponding target data center from all the data centers according to the data center identification.
Step S22: and screening out first computing nodes from a plurality of computing nodes of the target data center by using a central processing unit quantity filter, a memory capacity filter and a graphics processor quantity filter respectively based on the first central processing unit quantity, the first memory capacity and the first graphics processor quantity in the virtual machine creation request.
In this embodiment, the method for scheduling resources further includes: and constructing the second preset filter based on a central processing unit quantity filter, a memory capacity filter and a graphics processor quantity filter. That is, the second default Filter includes a central processing unit (Core Filter), a memory capacity Filter (RAM Filter), and a graphics processing unit (GPU Filter). The virtual machine creation request carries the data center identifier, and also includes the number of the first central processing units, the first memory capacity, and the number of the first graphics processing units, that is, the number of the central processing units, the memory capacity, and the number of the graphics processing units required for creating the virtual machine. The format of the virtual machine creation request is shown in table one:
watch 1
Req:AZ=dc1,core=16,ram=32G,NVIDIA_GPU_1DB6=1
Table one provides information indicating that a virtual machine needs to be created in data center dc1 and requires 16 central processors, 32G memory, and 1 graphics processor, NVIDIA _ GPU _1DB6 represents a GPU model 1DB6 of invida.
Further, in the process of screening out the first computing node from the plurality of computing nodes in the target data center by using the central processing unit quantity filter, the memory capacity filter, and the graphics processing unit quantity filter, respectively, the method further includes: comparing the current second graphics processor quantity of each compute node in the target data center with the first graphics processor quantity; and if the number of the second graphic processors is not less than the number of the first graphic processors, determining the corresponding computing node as a first computing node. It can be understood that the filter is used for judging whether the current remaining resources in each compute node can meet the virtual machine creation request according to the information, such as the number of central processing units, the memory capacity, and the number of graphics processors, required for creating the virtual machine, carried in the virtual machine creation request, for example, for the number of graphics processors, the current second graphics processor number of each compute node in the target data center is compared with the first graphics processor number; if the number of the second graphic processors is not less than that of the first graphic processors, determining the corresponding computing node as the first computing node, namely, comparing the number of GPUs requested by the created virtual machine with the number of GPUs of the same type remained on the computing node, and if the number of the GPUs requested is greater than the number of the GPUs remained on the computing node, filtering the computing node; otherwise, the first computing node can be used. In addition, when the GPU meets the condition, the second number of central processing units and the second memory capacity of the compute node are compared with the first number of central processing units and the first memory capacity of the virtual machine creation request, and if the second number of central processing units and the second memory capacity are not less than the corresponding first number of central processing units and the corresponding first memory capacity, the corresponding compute node is determined as the first compute node.
Step S23: a second compute node is determined based on the first compute node to create a virtual machine on the second compute node.
For a more specific processing procedure of the step S23, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
Therefore, the method and the device for establishing the virtual machine acquire the virtual machine establishing request, and determine the target data center from all the data centers by using the data center filter based on the data center identification in the virtual machine establishing request; screening out first computing nodes from a plurality of computing nodes of the target data center by respectively utilizing a central processing unit quantity filter, a memory capacity filter and a graphics processor quantity filter based on the first central processing unit quantity, the first memory capacity and the first graphics processor quantity in the virtual machine creation request; a second compute node is determined based on the first compute node to create a virtual machine on the second compute node. Therefore, the virtual machine creation request includes a data center identifier, a first central processing unit number, a first memory capacity and a first graphics processor number, and the virtual machine creation request is processed by respectively using the data center filter, the central processing unit number filter, the memory capacity filter and the graphics processor number filter to screen out first computing nodes meeting requirements from all computing nodes of all data centers, specifically to judge whether current remaining resources of each computing node are greater than resources required in the request, that is, the resources are the central processing unit number, the memory capacity and the graphics processor number. A second computing node for creating the virtual machine is then determined from the first computing nodes. Therefore, the computing nodes with sufficient current residual resources can be scheduled to create the virtual machine, and the utilization rate of the current residual resources in the computing nodes is improved.
Referring to fig. 3, the embodiment of the present application discloses a specific resource scheduling method, and compared with the previous embodiment, the present embodiment further describes and optimizes the technical solution. The method specifically comprises the following steps:
step S31: the method comprises the steps of obtaining a virtual machine creation request, and processing the virtual machine creation request by using a first preset filter to determine a target data center.
Step S32: and screening out a first computing node from a plurality of computing nodes of the target data center by utilizing a second preset filter based on the virtual machine creation request.
Step S33: if the number of the first computing nodes is multiple, the current number of the second central processing units, the current second memory capacity and the current number of the second graphic processors of each first computing node are subjected to normalization processing to obtain corresponding normalization values.
In this embodiment, if the number of the screened first compute nodes is multiple, the current number of the second central processing units, the current number of the second memory capacity, and the current number of the second graphics processing units of each first compute node need to be normalized to obtain a corresponding normalized value. Normalization is to scale the data to fall within a small specific interval. In some index processing for comparison and evaluation, unit limitation of data is removed and converted into a dimensionless pure numerical value, so that indexes of different units or orders can be compared and weighted conveniently. The most typical of these is the normalization of the data, i.e. the uniform mapping of the data onto the [0,1] interval. The normalized formula is:
f (x) is (x-min)/(max-min); wherein min and max represent the minimum and maximum values of the interval to which x belongs, respectively. In this embodiment, min is 0, and max is a maximum value of the current remaining resources in all the compute nodes, that is, a maximum value of the number of second central processing units in the first compute node, a maximum value of the second memory capacity, and a maximum value of the number of second graphics processors.
For example, assume that there are three compute nodes in data center doc1, host01, host02, and host 03. And the number of the first computing nodes screened by the second preset filter is two, namely host01 and host 03. Wherein, the host01 currently has the remaining resources: the number of central processing units is 32, the memory capacity is 128, the number of graphics processors is 2, and the abbreviation is: cpu 32, ram 128, gpu 2; host03 currently has resources remaining: the number of central processing units is 64, the memory capacity is 64, the number of graphics processors is 1, and the notation is: cpu 64, ram 64, gpu 1. Then, during the normalization process, for the memory capacity ram [128, 64], the remaining quantities of the two computation nodes are respectively 128M and 64M, and the normalization computation step is: min is 0, max is 128, max-min is 128, normalized to [1, 0.5 ]. Similarly, cpu [32,64] is normalized to [0.5, 1], and gpu [2, 1] is normalized to [1, 0.5 ].
Step S34: distributing a weight coefficient for all the normalized values of each first computing node, and performing weighted computation on the normalized values by using the weight coefficients to obtain weight values corresponding to the first computing nodes.
In this embodiment, a weight coefficient needs to be allocated to all normalized values of each first computing node, and then the normalized values are weighted by using the weight coefficients to obtain weight values corresponding to the first computing nodes. The weighting formula is as follows:
W=ram_weight_multiplier*ram_weight+cpu_weight_multiplier*cpu_weight+gpu_weight_multiplier*gpu_weight
wherein ram _ weight _ multiplier, cpu _ weight _ multiplier and gpu _ weight _ multiplier respectively represent the weights of ram, cpu and gpu, the default is 1, and all the weights can be configured; and ram _ weight, cpu _ weight and gpu _ weight respectively represent normalized values of ram, cpu and gpu.
For host01, the final weight value is 1 × 1+1 × 0.5+1 × 1 — 2.5; for host03, the final weight value is 1 × 0.5+1 × 1+1 × 0.5 ═ 2.
Step S35: determining a second compute node based on the weight values of all the first compute nodes to create a virtual machine on the second compute node.
In this embodiment, after the weight value of each first computing node is obtained, a second computing node is determined from the first computing nodes based on the weight value, so as to create a virtual machine on the second computing node. Further, the determining a second computing node based on the weight values of all the first computing nodes includes: screening out a maximum weight value from the weight values of all the first computing nodes, and determining the first computing node corresponding to the maximum weight value as a second computing node. That is, in this embodiment, the maximum weight value is screened from the ownership weight values, and the first computing node corresponding to the maximum weight value is determined as the second computing node. For example, for host01 and host03, the weight value of host01 obtained through the above calculation is 2.5, and the weight value of host03 is 2, so that the weight value corresponding to host01 is greater than the weight value corresponding to host0, and host01 is used as a second computing node, that is, a computing node for finally creating a virtual machine. That is, the embodiment of the application realizes the cooperative scheduling of the GPU and various resources such as the CPU, the memory, and the like through algorithms such as linear normalization and weighted distribution calculation, effectively improves the utilization rate of various resources in the compute node, and reduces the resource use cost.
In another specific embodiment, the determining a second computing node based on the first computing node includes: and if the number of the first computing nodes is single, directly determining the first computing nodes as second computing nodes. It will be appreciated that by the filter process it is possible that eventually only one compute node satisfies the virtual machine creation request, and then the first compute node is determined directly as the second compute node. It should be noted that if there are no compute nodes satisfying the condition after passing the preset filter process, it indicates that the virtual machine was not created. For example, after filtering by a graphics processor quantity Filter, that is, a GPU Filter, it is found that the current second graphics processor quantity of all the compute nodes is smaller than the first graphics processor quantity of the virtual machine creation request, and if there is no compute node satisfying the request, the virtual machine creation is failed this time. The problem that no equipment exists when the request is sent to the bottom layer can be prevented through the setting of the second preset filter.
For more specific processing procedures of the steps S31 and S32, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
It can be seen that, in the embodiment of the present application, when a second computing node is determined based on the first computing node, in a specific embodiment, if the number of the first computing nodes is multiple, the current number of the second central processing units, the current second memory capacity, and the current number of the second graphics processors of each first computing node are subjected to normalization processing to obtain corresponding normalized values; distributing a weight coefficient to all the normalized values of each first computing node, and performing weighted computation on the normalized values by using the weight coefficients to obtain weight values corresponding to the first computing nodes; screening out a maximum weight value from the weight values of all the first computing nodes, and determining the first computing node corresponding to the maximum weight value as a second computing node. In another embodiment, if the number of the first computing nodes is single, the first computing node is directly determined as the second computing node. That is, if there is more than one first computing node, algorithms such as linear normalization processing and weighting calculation need to be performed on the current remaining resources of the host, so as to screen out the final second computing node for creating the virtual machine. And when the number of the first computing nodes is one, directly serving as the second computing nodes to create the virtual machine.
Referring to fig. 4, fig. 4 is a schematic diagram of a specific resource scheduling process disclosed in the present application, and fig. 4 illustrates two data centers dc1 and dc2 as an example to describe the technical solution of the present application in detail.
Data center dc1 includes three hosts, host01, host02, and host03, and data center dc2 includes two hosts, host05 and host 06. After a virtual machine creation request is obtained, processing the request through a data center Filter (AZ Filter), a central processor quantity Filter (Core Filter), a memory capacity Filter (RAM Filter) and a graphics processing unit quantity Filter (GPU Filter), and screening host01 and host03 in dc1 to meet the request condition for creating the virtual machine according to the content carried in the virtual machine creation request, wherein the current residual resource of the host01 is RAM:128, cpu:32 and GPU:2, and the content carried in the virtual machine creation request can be known, and the virtual machine needs to be created in a data center dc1, 16 cpu, 32G memories and 1 GPU are needed; the current remaining resources of host03 are ram:64, cpu:64, gpu: 1. Then, linear normalization processing is respectively carried out on ram, cpu and gpu, a weight coefficient is distributed, and weight calculation output is carried out, so that the weight value of a host01 is obtained to be 2.5, the weight value of a host03 is obtained to be 2, and finally a host01 with the largest weight value is selected to create the virtual machine.
Referring to fig. 5, an embodiment of the present application discloses a resource scheduling apparatus, including:
the first filtering module 11 is configured to obtain a virtual machine creation request, and process the virtual machine creation request by using a first preset filter to determine a target data center;
the second filtering module 12 is configured to screen out a first computing node from a plurality of computing nodes in the target data center based on the virtual machine creation request and by using a second preset filter;
a virtual machine creating module 13, configured to determine a second computing node based on the first computing node, so as to create a virtual machine on the second computing node.
Therefore, the method includes the steps that a virtual machine creation request is obtained, and the virtual machine creation request is processed by a first preset filter to determine a target data center; screening out a first computing node from a plurality of computing nodes of the target data center by utilizing a second preset filter based on the virtual machine creating request; a second compute node is determined based on the first compute node to create a virtual machine on the second compute node. Therefore, after the virtual machine creation request is obtained, the virtual machine creation request is processed by using a first preset filter and a second preset filter, specifically, a target data center is determined from all data centers, then a first computing node is screened from a plurality of computing nodes of the target data center, and a second computing node is determined based on the first computing node, so that a virtual machine is created on the second computing node. Therefore, the computing node with sufficient current residual resources can be scheduled to create the virtual machine through the setting of the first preset filter and the second preset filter, and the utilization rate of the current residual resources in the computing node is improved.
In some specific embodiments, the first filtering module 11 may specifically include:
and the data center determining unit is used for determining a target data center from all the data centers by using a data center filter based on the data center identification in the virtual machine creating request.
In some specific embodiments, the resource scheduling apparatus may further include:
and the filter construction module is used for constructing the second preset filter based on the central processing unit quantity filter, the memory capacity filter and the graphics processing unit quantity filter.
In some specific embodiments, the second filtering module 12 may specifically include:
and the first computing node determining submodule is used for screening out a first computing node from a plurality of computing nodes of the target data center by respectively utilizing the central processing unit quantity filter, the memory capacity filter and the graphics processor quantity filter based on the first central processing unit quantity, the first memory capacity and the first graphics processor quantity in the virtual machine creating request.
In some specific embodiments, the first computing node determining sub-module may further include:
the comparison unit is used for comparing the current second graphic processor quantity of each computing node in the target data center with the first graphic processor quantity;
and the result determining unit is used for determining the corresponding computing node as the first computing node if the number of the second graphics processors is not less than the number of the first graphics processors.
In some specific embodiments, the virtual machine creating module 13 may specifically include:
the normalization processing unit is used for performing normalization processing on the current number of second central processing units, the current second memory capacity and the current number of second graphic processors of each first computing node to obtain a corresponding normalization value if the number of the first computing nodes is multiple;
the weighting calculation unit is used for distributing a weight coefficient to all the normalized values of each first calculation node and performing weighting calculation on the normalized values by using the weight coefficients to obtain weight values corresponding to the first calculation nodes;
a first determining unit configured to determine a second computing node based on the weight values of all the first computing nodes.
In some specific embodiments, the second computing node determining unit may specifically include:
the screening unit is configured to screen a maximum weight value from the weight values of all the first computing nodes, and determine the first computing node corresponding to the maximum weight value as a second computing node.
In some specific embodiments, the virtual machine creating module 13 may specifically include:
a second determining unit, configured to directly determine the first computing node as a second computing node if the number of the first computing nodes is single.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The method specifically comprises the following steps: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. Wherein the memory 22 is used for storing a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the resource scheduling method executed by the electronic device disclosed in any of the foregoing embodiments.
In this embodiment, the power supply 23 is configured to provide a working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and a communication protocol followed by the communication interface is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to obtain external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
The processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 21 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 21 may further include an AI (Artificial Intelligence) processor for processing a calculation operation related to machine learning.
In addition, the storage 22 is used as a carrier for storing resources, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., the resources stored thereon include an operating system 221, a computer program 222, data 223, etc., and the storage may be a transient storage or a permanent storage.
The operating system 221 is used for managing and controlling each hardware device on the electronic device 20 and the computer program 222, so as to implement the operation and processing of the mass data 223 in the memory 22 by the processor 21, which may be Windows, Unix, Linux, or the like. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the resource scheduling method performed by the electronic device 20 disclosed in any of the foregoing embodiments. The data 223 may include data received by the electronic device and transmitted from an external device, or may include data collected by the input/output interface 25 itself.
Further, an embodiment of the present application also discloses a computer-readable storage medium, in which a computer program is stored, and when the computer program is loaded and executed by a processor, the method steps executed in the resource scheduling process disclosed in any of the foregoing embodiments are implemented.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The resource scheduling method, apparatus, device and storage medium provided by the present invention are described in detail above, and a specific example is applied in the description to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for scheduling resources, comprising:
acquiring a virtual machine creation request, and processing the virtual machine creation request by using a first preset filter to determine a target data center;
screening out a first computing node from a plurality of computing nodes of the target data center by utilizing a second preset filter based on the virtual machine creating request;
a second computing node is determined based on the first computing node to create a virtual machine on the second computing node.
2. The method according to claim 1, wherein the processing the virtual machine creation request by using the first preset filter to determine a target data center includes:
determining a target data center from all data centers by using a data center filter based on the data center identification in the virtual machine creation request.
3. The method for scheduling resources according to claim 1, further comprising:
constructing the second preset filter based on a central processing unit quantity filter, a memory capacity filter and a graphics processor quantity filter;
correspondingly, the screening out a first computing node from a plurality of computing nodes of the target data center based on the virtual machine creation request and by using a second preset filter includes:
and screening out first computing nodes from a plurality of computing nodes of the target data center by respectively utilizing the central processing unit quantity filter, the memory capacity filter and the graphics processor quantity filter based on the first central processing unit quantity, the first memory capacity and the first graphics processor quantity in the virtual machine creation request.
4. The method according to claim 3, wherein in the process of screening out the first computing node from the plurality of computing nodes in the target data center by using the number of cpus, the memory capacity filter, and the number of graphics processors, respectively, the method further comprises:
comparing the current second graphics processor quantity of each compute node in the target data center with the first graphics processor quantity;
and if the number of the second graphic processors is not less than the number of the first graphic processors, determining the corresponding computing node as a first computing node.
5. The method of claim 4, wherein the determining a second computing node based on the first computing node comprises:
if the number of the first computing nodes is multiple, performing normalization processing on the current number of second central processing units, the current second memory capacity and the current number of second graphic processors of each first computing node to obtain a corresponding normalization value;
distributing a weight coefficient to all the normalized values of each first computing node, and performing weighted computation on the normalized values by using the weight coefficients to obtain weight values corresponding to the first computing nodes;
determining a second computing node based on the weight values of all the first computing nodes.
6. The method according to claim 5, wherein the determining a second computing node based on the weight values of all the first computing nodes comprises:
screening out a maximum weight value from the weight values of all the first computing nodes, and determining the first computing node corresponding to the maximum weight value as a second computing node.
7. The method according to any one of claims 1 to 6, wherein said determining a second computing node based on the first computing node comprises:
and if the number of the first computing nodes is single, directly determining the first computing nodes as second computing nodes.
8. A resource scheduling apparatus, comprising:
the first filtering module is used for acquiring a virtual machine creation request and processing the virtual machine creation request by using a first preset filter to determine a target data center;
the second filtering module is used for screening out first computing nodes from a plurality of computing nodes of the target data center by utilizing a second preset filter based on the virtual machine creating request;
a virtual machine creation module to determine a second compute node based on the first compute node to create a virtual machine on the second compute node.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program for implementing the steps of the resource scheduling method according to any of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program; wherein the computer program realizes the steps of the resource scheduling method according to any one of claims 1 to 7 when executed by a processor.
CN202210606148.4A 2022-05-31 2022-05-31 Resource scheduling method, device, equipment and medium Pending CN114996005A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210606148.4A CN114996005A (en) 2022-05-31 2022-05-31 Resource scheduling method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210606148.4A CN114996005A (en) 2022-05-31 2022-05-31 Resource scheduling method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN114996005A true CN114996005A (en) 2022-09-02

Family

ID=83030719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210606148.4A Pending CN114996005A (en) 2022-05-31 2022-05-31 Resource scheduling method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN114996005A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116405391A (en) * 2023-04-10 2023-07-07 长扬科技(北京)股份有限公司 OpenStack-based virtual machine node screening method, system and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116405391A (en) * 2023-04-10 2023-07-07 长扬科技(北京)股份有限公司 OpenStack-based virtual machine node screening method, system and storage medium

Similar Documents

Publication Publication Date Title
CN111966500B (en) Resource scheduling method and device, electronic equipment and storage medium
CN108234581B (en) Resource scheduling method and server
CN106959894B (en) Resource allocation method and device
CN109815007A (en) Thread control method, device, electronic equipment and storage medium based on cloud monitoring
CN111143039B (en) Scheduling method and device of virtual machine and computer storage medium
CN109240825A (en) Elastic method for scheduling task, device, equipment and computer readable storage medium
CN114356587B (en) Calculation power task cross-region scheduling method, system and equipment
CN114996005A (en) Resource scheduling method, device, equipment and medium
CN108459905A (en) Resource pool method for planning capacity and server
CN115617511A (en) Resource data processing method and device, electronic equipment and storage medium
CN111796933A (en) Resource scheduling method, device, storage medium and electronic equipment
CN111464331A (en) Control method and system for thread creation and terminal equipment
CN113495779A (en) Task scheduling method and device and task execution system
CN109783236A (en) Method and apparatus for output information
CN117311973A (en) Computing device scheduling method and device, nonvolatile storage medium and electronic device
CN117112222A (en) Request processing method and device, electronic equipment and storage medium
CN115952054A (en) Simulation task resource management method, device, equipment and medium
CN110618855A (en) Task allocation method and device, electronic equipment and storage medium
KR20120069364A (en) Apparatus and method of processing the frame for considering processing capability and power consumption in multicore environment
CN115222338A (en) Material purchasing system, purchasing list generation method and component
CN111694670B (en) Resource allocation method, apparatus, device and computer readable medium
CN111813541B (en) Task scheduling method, device, medium and equipment
CN114596012A (en) Method, system, apparatus and medium for resource scheduling
CN114153592A (en) Physical host load scheduling method and device of cloud platform, electronic equipment and medium
CN112905119A (en) Data writing control method, device and equipment of distributed storage system

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