Method and device for selecting computing node in resource scheduling, equipment and storage medium
By selecting appropriate computing nodes for resource allocation based on resource demand and residual amount in cloud computing, the problem of over-average resources and tenant aggregation is solved, and resource utilization and user experience are improved.
Patent Information
- Application Number
- CN202411281855.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-12-27
AI Technical Summary
The existing cloud computing resource scheduling strategy causes the computing node resources to be too average in resource allocation, unable to meet extreme needs, affect user experience, and have tenant aggregation problems, resulting in overload load and failure risk.
By obtaining the resource remaining amount of the creation request and candidate computing nodes, the node closest to the demand when the resource demand is less than the threshold is preferred as the host node, and the node with the largest resource remaining amount is selected when the demand is greater than or equal to the threshold is selected to ensure that The allocation of small package requirements and the effective allocation of large package resources.
Effectively utilize small pieces of resources, avoid resource fragmentation, improve resource utilization of computing nodes, improve system stability and user experience, and reduce the risk of overload and failure caused by tenant aggregation.
Smart Images

Figure CN119201454A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of cloud computing, and in particular to a method, device, equipment and storage medium for selecting computing nodes in resource scheduling. Background Art
[0002] In cloud host resource scheduling services, reasonable allocation and scheduling of resources are crucial to improving resource utilization and user experience.
[0003] The scheduling strategy in the related art is: give priority to computing nodes with low resource utilization and high resource surplus.
[0004] Although the above scheduling strategy ensures the reasonable allocation of resources to a certain extent, it is easy to cause the resources of each computing node to be relatively evenly distributed, which leads to the inability to meet the extreme needs of users and affects the user experience. Summary of the invention
[0005] In order to solve the above technical problems, the present disclosure provides a method, device, equipment and storage medium for selecting computing nodes in resource scheduling.
[0006] In a first aspect, the present invention provides a method for selecting a computing node in resource scheduling, comprising:
[0007] Obtain a creation request, at least two candidate computing nodes, and a resource remaining amount of a preset resource in each candidate computing node, wherein the creation request includes a resource demand amount of the preset resource; when the resource demand amount is less than a preset demand amount threshold, determine as a host computing node a candidate computing node corresponding to a resource remaining amount that is greater than or equal to the resource demand amount and closest to the resource demand amount; and determine a target computing node from the host computing nodes.
[0008] In an optional implementation, the creation request further includes a requester identifier, and obtaining at least two candidate computing nodes includes:
[0009] Obtain a tenant list of each initially screened computing node, the tenant list including a tenant ID; count the number of tenant IDs consistent with the requester ID in the tenant list of each initially screened computing node; determine the initially screened computing nodes whose number is less than or equal to a preset number threshold as candidate computing nodes.
[0010] In an optional embodiment, the method further comprises:
[0011] When the resource demand is greater than or equal to a preset demand threshold, the candidate computing node with the largest remaining resource is determined as the host computing node.
[0012] In an optional implementation, determining the target computing node from the host computing node includes:
[0013] When there is only one host computing node, the host computing node is directly determined as the target computing node; when there are multiple host computing nodes, the host computing node with the largest remaining memory is determined as the target computing node.
[0014] In an optional implementation, after determining the target computing node from the host computing node, the method further includes:
[0015] Create a virtual machine on the target computing node and complete resource provisioning.
[0016] In a second aspect, the present invention provides a device for selecting a computing node in resource scheduling, comprising:
[0017] An acquisition module is used to obtain a creation request, at least two candidate computing nodes, and the remaining resource of preset resources in each candidate computing node, wherein the creation request includes the resource demand of the preset resources; a first determination module is used to determine, when the resource demand is less than a preset demand threshold, a candidate computing node corresponding to a resource remaining amount that is greater than or equal to the resource demand and closest to the resource demand as a host computing node; and a second determination module is used to determine a target computing node from the host computing node.
[0018] In an optional implementation, the creation request further includes a requester identifier, and the acquisition module includes:
[0019] An acquisition submodule is used to obtain a tenant list of each preliminary screening computing node, wherein the tenant list includes a tenant identifier; a counting submodule is used to count the number of tenant identifiers consistent with the requesting party identifier in the tenant list of each preliminary screening computing node; and a first determination submodule is used to determine preliminary screening computing nodes whose number is less than or equal to a preset number threshold as candidate computing nodes.
[0020] In a third aspect, the present invention provides a computer device, comprising:
[0021] The memory and the processor are communicatively connected with each other, the memory stores computer instructions, and the processor executes the method for selecting computing nodes in resource scheduling of the first aspect of the invention and any embodiment thereof by executing the computer instructions.
[0022] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for selecting computing nodes in resource scheduling of the first aspect of the invention and any of its embodiments.
[0023] In a fifth aspect, the present invention provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method for selecting a computing node in resource scheduling of the first aspect of the invention and any embodiment thereof.
[0024] The technical solution provided by the embodiment of the present invention has the following advantages compared with the prior art:
[0025] The method for selecting computing nodes in resource scheduling provided in this embodiment obtains a creation request, at least two candidate nodes, and a resource surplus of preset resources in each candidate computing node; when the resource demand of the preset resource is less than the preset demand threshold, the candidate computing node corresponding to the resource surplus that is greater than or equal to the resource demand and closest to the resource demand is preferentially determined as the host computing node; the target computing node is determined from the host computing node; the present invention preferentially allocates a small package demand such as the resource demand of the preset resource that is less than the preset demand threshold to the candidate computing node corresponding to the resource surplus that is closest to the resource demand, which can not only effectively utilize small resources and avoid resource fragmentation, but also free up large resources to ensure the effective allocation of large package resources such as the resource demand of the preset resource that is greater than or equal to the preset demand threshold, thereby improving the resource utilization of the computing nodes as a whole, and improving the stability of the overall system and the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0028] Figure 1 A schematic diagram of a process for selecting a computing node in resource scheduling provided by an embodiment of the present invention;
[0029] Figure 2 A schematic diagram of a process for obtaining candidate computing nodes provided by an embodiment of the present invention;
[0030] Figure 3 A structural connection diagram of a device for selecting computing nodes in resource scheduling provided by an embodiment of the present invention;
[0031] Figure 4 A structural connection diagram of a computer device provided for an embodiment of the invention. DETAILED DESCRIPTION
[0032] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0033] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0034] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0035] In order to ensure the reasonable allocation of resources in the cloud host resource scheduling service, the relevant technology mainly gives priority to computing nodes with low resource utilization and high resource surplus.
[0036] Taking CPU resources as an example, to ensure load balancing and efficient use of resources, computing nodes with CPU usage less than the preset usage threshold are prioritized. On the premise of meeting the CPU usage requirements, computing nodes that meet the CPU usage requirements are sorted according to the remaining CPU, and computing nodes with more remaining CPU are prioritized.
[0037] Although the above scheduling strategy guarantees the reasonable allocation of resources to a certain extent, it is easy to cause the CPU resources of each computing node to be too evenly distributed. When users make extreme demands, such as large package resource requirements, the large package will fail to start due to insufficient resources on each computing node, thus affecting the user experience. In addition, the current scheduling strategy also has the problem of tenant aggregation. The tenant aggregation problem is that multiple virtual machines of the same tenant all run on one computing node. When the computing node fails, the tenant's business services will be paralyzed, which can easily lead to a reduction in risk resistance. Moreover, when multiple virtual machines of the same tenant are in a concurrent running state, the load capacity of the computing node is too heavy, which can easily lead to computing node failure, thereby affecting the overall performance and reliability of the computing node.
[0038] To this end, an embodiment of the present invention provides a method for selecting computing nodes in resource scheduling, which preferentially allocates small package demands whose demand is less than a preset demand threshold to computing nodes whose remaining quantity is closest to the demand. In this way, not only can small resources be effectively utilized to avoid resource fragmentation, but large resources can also be freed up to ensure the effective allocation of large package resources, thereby improving the resource utilization of computing nodes as a whole, enhancing the stability of the overall system and the user experience.
[0039] According to an embodiment of the present invention, an embodiment of a method for selecting a computing node in resource scheduling is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0040] In this embodiment, a method for selecting computing nodes in resource scheduling is provided, which is applicable to the creation process of GPU virtual machines and CPU virtual machines and can be used in the scheduler of the cloud platform. Figure 1 is a flowchart of a method for selecting a computing node in resource scheduling according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0041] S101, obtaining a creation request, at least two candidate computing nodes, and remaining resources of preset resources in each candidate computing node.
[0042] Among them, the creation request is a virtual machine creation request issued by the client. A creation request may include one or more virtual machine creation tasks, and each creation task corresponds to a set of creation information. The creation information includes the model of the virtual machine to be created and the demand for various resources for this creation task, including the resource demand for preset resources. The model of the virtual machine to be created includes but is not limited to GPU model and CPU model. The virtual machine model is related to the processing business of the virtual machine. Generally, the virtual machine to be created is a CPU model. The demand for various resources includes but is not limited to the demand for CPU resources / GPU resources, the demand for memory resources and the demand for hard disk resources. The preset resources are CPU resources / GPU resources. The selection of preset resources corresponds to the model of the virtual machine to be created. When the model of the virtual machine to be created is a GPU model, the preset resources are GPU resources. When the model of the virtual machine to be created is a CPU model, the preset resources are CPU resources.
[0043] The candidate computing nodes are selected from all computing nodes on the cloud platform and meet the screening conditions. The screening conditions can be to meet the demand for each resource, or to meet the demand for each resource and the resource usage rate of the preset resource is lower than the preset usage rate threshold.
[0044] Specifically, a creation request is received from a client. When the creation request includes a virtual machine creation task, the resource requirement of the preset resource (such as CPU resource requirement or GPU resource requirement) is obtained from the creation information of the creation request, and the creation request is stored in the storage area of the scheduler. At the same time, the computing nodes that can meet the creation requirements (i.e., candidate computing nodes) are screened out from all computing nodes of the cloud platform, and the remaining amount of preset resources in each candidate computing node is obtained. When the creation request includes multiple virtual machine creation tasks, the above S101 is performed according to the above method based on each creation task. It should be noted that the reason why the number of candidate computing nodes is limited to at least two in this embodiment is that if the number of candidate computing nodes is one, the subsequent steps are meaningless. Therefore, the embodiment of the present invention is only for the case where there are at least two candidate computing nodes.
[0045] S102: When the resource demand is less than a preset demand threshold, a candidate computing node corresponding to a resource surplus that is greater than or equal to the resource demand and closest to the resource demand is determined as a host computing node.
[0046] In this embodiment, the demand for resource demand that is less than a preset demand threshold is called a small package demand.
[0047] Specifically, when the resource demand of the preset resource is less than the preset demand threshold, a candidate computing node whose remaining resource is greater than or equal to the resource demand and whose remaining resource is closest to the resource demand is selected from each candidate computing node, and the selected candidate computing node is determined as the host computing node. In the above manner, small package demands are preferentially allocated to candidate computing nodes whose remaining resource is closest to the resource demand, which effectively utilizes small blocks of resources in the candidate computing nodes, avoids resource fragmentation and averaging, frees up sufficient space for large package demands, and improves the overall resource utilization efficiency of computing nodes.
[0048] Exemplarily, the preset demand threshold is 8 cores. The preset resource is the CPU resource, and the resource demand of the preset resource is 7 cores. The number of candidate computing nodes is 2, namely computing node D and computing node E. Among them, the CPU resource remaining amount of computing node D is 16 cores (i.e., the resource remaining amount of the preset resource), and the CPU resource remaining amount of computing node E is 8 cores. From each candidate computing node, a computing node with a resource remaining amount greater than or equal to 7 cores and closest to 7 cores is selected. By comparison, it can be seen that the resource remaining amount greater than or equal to 7 cores and closest to 7 cores is 8 cores, and the computing node E corresponding to 8 cores is determined as the host computing node.
[0049] In an optional embodiment, the method further includes: when the resource demand is greater than or equal to a preset demand threshold, determining the candidate computing node with the largest remaining resource as the host computing node.
[0050] In this embodiment, a demand for resource demand that is greater than or equal to a preset demand threshold is referred to as a large package demand.
[0051] Specifically, when the resource demand of the preset resource is greater than or equal to the preset demand threshold, the maximum value is selected from the resource surplus of the preset resource corresponding to each candidate computing node, and the candidate computing node corresponding to the maximum value is determined as the host computing node. In the above manner, the large package demand is preferentially allocated to the candidate computing node with the largest resource surplus. This method ensures the effective allocation of the large package demand, reduces the probability of failure to start the large package, and improves resource utilization.
[0052] Exemplarily, the preset demand threshold is 8 cores. The preset resource is a CPU resource, and the resource demand of the preset resource is 32 cores. The number of candidate computing nodes is 3, namely computing node A, computing node B, and computing node C. Among them, the remaining CPU resources of computing node A are 50 cores, the remaining CPU resources of computing node B are 50 cores, and the remaining CPU resources of computing node C are 32 cores. By comparison, it can be seen that among the candidate computing nodes, the maximum value of the remaining resources of the preset resources is 50 cores, and computing nodes A and computing nodes B corresponding to 50 cores are determined as host computing nodes.
[0053] S103, determining a target computing node from the host computing nodes.
[0054] Specifically, the determination of the target computing node is related to the number of host computing nodes. When there is one host computing node, the host computing node is directly determined as the target computing node; when there are multiple host computing nodes, the target computing node can be determined from the host computing nodes by a set screening method. It should be noted that the screening method here still corresponds to the size relationship between "resource demand and preset demand threshold". For example, when the resource demand is greater than or equal to the preset demand threshold, the host computing node with the largest memory remaining can be determined as the target computing node. When the resource demand is less than the preset demand threshold, the host computing node with the smallest difference between the memory remaining and the memory demand can be determined as the target computing node. If the target computing node cannot be determined based on the memory remaining, the screening can continue to be performed based on the disk remaining. The principle of screening based on the disk remaining is consistent with the principle of screening based on the memory remaining, and the screening principle is still determined based on the size relationship between "resource demand and preset demand threshold". If the target computing node cannot be determined based on the disk remaining, then any computing node can be selected from the host computing nodes corresponding to the most recent screening result as the target computing node. The target computing node determined by this step can be understood as the computing node that runs the virtual machine after the virtual machine creation task is completed.
[0055] Exemplarily, two host computing nodes are selected from the candidate computing nodes, namely computing node A and computing node B. The remaining memory of computing node A and computing node B is obtained. The remaining memory of computing node A is 64G, and the remaining memory of computing node B is 48G. At this time, computing node A with the largest remaining memory (i.e., 64G) is selected as the target computing node.
[0056] In an optional embodiment, after S103, the process further includes: creating a virtual machine on the target computing node and completing resource activation.
[0057] Specifically, after determining the target computing node, the creation of the virtual machine and the resource provisioning operation can be completed on the target computing node. The resource provisioning operation is completed based on the resource demand for each resource in the creation requirement.
[0058] The method for selecting computing nodes in resource scheduling provided in this embodiment obtains a creation request, at least two candidate nodes, and a resource surplus of preset resources in each candidate computing node; when the resource demand of the preset resource is less than the preset demand threshold, the candidate computing node corresponding to the resource surplus that is greater than or equal to the resource demand and closest to the resource demand is preferentially determined as the host computing node; the target computing node is determined from the host computing node; the present invention preferentially allocates a small package demand such as the resource demand of the preset resource that is less than the preset demand threshold to the candidate computing node corresponding to the resource surplus that is closest to the resource demand, which can not only effectively utilize small resources and avoid resource fragmentation, but also free up large resources to ensure the effective allocation of large package resources such as the resource demand of the preset resource that is greater than or equal to the preset demand threshold, thereby improving the resource utilization of the computing nodes as a whole, and improving the stability of the overall system and the user experience.
[0059] In some optional embodiments, the method for obtaining the candidate computing nodes is optimized. In this embodiment, the creation request also includes a requester identifier, that is, an identifier corresponding to the user who initiates the creation request (that is, the requester), such as Figure 2 As shown, obtaining at least two candidate computing nodes includes the following steps:
[0060] S201, obtaining a tenant list of each initially screened computing node, wherein the tenant list includes a tenant identifier.
[0061] Among them, the initial screening computing nodes are computing nodes that meet the initial screening conditions in the cloud platform. The initial screening conditions can be to meet the demand for various resources, or to meet the demand for various resources and the resource utilization rate of the preset resources is lower than the preset utilization rate threshold. Each initial screening computing node corresponds to a tenant list, which is used to record the relevant information of the virtual machines created in the initial screening computing node. The relevant information includes but is not limited to the identification information of the created virtual machine, the creation time, resource requirements, the running status and the tenant identification of the tenant to which the virtual machine belongs.
[0062] Specifically, a tenant list of each initially screened computing node is obtained, and a tenant identifier corresponding to each virtual machine is obtained from the tenant list.
[0063] In an optional embodiment, when the initial screening condition is to meet the demand for each resource, the initial screening computing node is determined in the following manner: the resource surplus of each resource in each computing node is obtained from each computer cluster of the cloud platform, and the surplus can be understood as the actual available amount. The resource surplus corresponding to each computing resource in the computing node is compared with the resource demand corresponding to the computing resource. When the resource surplus of all computing resources in the computing node is greater than or equal to the resource demand of the corresponding computing resource, the computing node is determined as the initial screening computing node. Among them, the resource surplus of each resource can be read directly or read from the global resource view, which includes real-time information of each resource of each computing node.
[0064] In another optional embodiment, when the initial screening condition is to meet the demand for each resource and the resource utilization rate of the preset resource is lower than the preset utilization rate threshold, the initial screening computing node is determined in the following manner: the resource remaining amount of each resource in each computing node is obtained from each computer cluster of the cloud platform. Compare the resource remaining amount corresponding to each computing resource in the computing node with the resource demand amount corresponding to the computing resource. When the resource remaining amount of all computing resources in the computing node is greater than or equal to the resource demand amount of the corresponding computing resource, the computing node is screened out. Obtain the preset resource utilization rate (such as CPU utilization rate) of each screened computing node, and determine the computing node whose preset resource utilization rate is less than or equal to the preset utilization rate threshold (such as 30%) as the initial screening computing node. It should be noted that the preset resource utilization rate here is the utilization rate of the preset resource, and the preset resource is consistent with S101.
[0065] S202, counting the number of tenant identifiers that are consistent with the requester identifier in the tenant list of each initially screened computing node.
[0066] Specifically, each tenant identifier recorded in each tenant list is extracted in turn, and the extracted tenant identifiers are compared with the requester identifier for consistency, and the comparison result is counted as the number of consistent ones.
[0067] Exemplarily, a tenant list of a pre-screened computing node is used as an example for exemplary description. For example, in this embodiment, the requester identifier obtained from the creation request is 00x. There are 10 virtual machines corresponding to the tenant list of the pre-screened computing node Y. The tenant identifiers are extracted from the relevant information of each virtual machine, and the tenant identifiers are 001, 003, 001, 005, 00x, 00x, 003, 00x, 002, and 004, respectively. Among the 10 tenant identifiers contained in the tenant list, each tenant identifier is compared with the requester identifier for consistency. After comparison, it is found that there are 3 identifiers that are consistent with the requester identifier 00x. This result can be understood as that before receiving the current creation request, there are 3 virtual machines that have been created and managed by the requester 00x in the pre-screened computing node Y.
[0068] Through the above method, the number of tenant identifiers that are consistent with the requester identifier in each primary screening computing node is counted in turn.
[0069] S203: Determine the preliminarily screened computing nodes whose number is less than or equal to a preset number threshold as candidate computing nodes.
[0070] The preset number threshold is the maximum number of virtual machines of the same tenant that can be accepted to run on the computing node when the computing node performance is maintained at a qualified level. The preset number is related to the actual situation of the computing node and the needs of the tenant, and can be determined by those skilled in the art according to the actual situation.
[0071] For example, still taking the embodiment in S202 as an example, in this embodiment, the preset quantity threshold is 2. According to the statistics of S202, in the tenant list corresponding to the initial screening computing node Y, the number of tenant identifiers that are consistent with the requesting party identifier is 3. Comparing 3 with the preset quantity threshold 2, it is known that 3>2, and the screening condition of the candidate computing node is not met. Therefore, the initial screening computing node Y cannot be determined as a candidate computing node.
[0072] Through the above method, the number of tenant identifiers corresponding to each preliminary screening computing node and consistent with the requesting party identifier is compared with the preset number threshold in turn, and the preliminary screening computing nodes whose number in the comparison result is less than or equal to the preset number threshold are determined as candidate computing nodes.
[0073] This embodiment preferentially determines the initially screened computing nodes with less tenant aggregation as candidate computing nodes, which solves the problem of excessive load and low risk defense capability caused by tenant aggregation, and ensures load balancing and efficient use of resources.
[0074] In this embodiment, a device for selecting computing nodes in resource scheduling is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made are not repeated here. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0075] This embodiment provides a device for selecting computing nodes in resource scheduling, such as Figure 3 As shown, including:
[0076] The acquisition module 301 is used to acquire a creation request, at least two candidate computing nodes, and the remaining amount of resources of preset resources in each candidate computing node, wherein the creation request includes the required amount of resources of the preset resources.
[0077] The first determination module 302 is configured to determine, when the resource demand is less than a preset demand threshold, a candidate computing node corresponding to a resource surplus that is greater than or equal to the resource demand and closest to the resource demand as a host computing node.
[0078] The second determination module 303 is used to determine the target computing node from the host computing node.
[0079] In an optional implementation, the creation request further includes a requester identifier, and the acquisition module 301 includes:
[0080] An acquisition submodule is used to obtain a tenant list of each preliminary screening computing node, wherein the tenant list includes a tenant identifier; a counting submodule is used to count the number of tenant identifiers consistent with the requesting party identifier in the tenant list of each preliminary screening computing node; and a first determination submodule is used to determine preliminary screening computing nodes whose number is less than or equal to a preset number threshold as candidate computing nodes.
[0081] In some optional implementations, the device for selecting a computing node in resource scheduling further includes:
[0082] The third determination module is used to determine the candidate computing node with the largest remaining resources as the host computing node when the resource demand is greater than or equal to a preset demand threshold.
[0083] In some optional implementations, the second determining module 303 includes:
[0084] The second determination submodule is used to directly determine the host computing node as the target computing node when there is only one host computing node; the third determination submodule is used to determine the host computing node with the largest remaining memory as the target computing node when there are multiple host computing nodes.
[0085] In some optional implementations, the device for selecting a computing node in resource scheduling further includes:
[0086] The creation module is used to create a virtual machine on the target computing node and complete resource provisioning.
[0087] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0088] The selection device of the computing node in the resource scheduling in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0089] The embodiment of the present invention also provides a computer device having the above Figure 3 The device for selecting computing nodes in resource scheduling is shown.
[0090] See also Figure 4 , Figure 4 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 4 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 4 A processor 10 is taken as an example.
[0091] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0092] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0093] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0094] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0095] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0096] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0097] In addition to the above-mentioned computer device and computer-readable storage medium, the embodiments of the present application may also be a computer program product, which includes computer program instructions. When the computer program instructions are executed by a processor, the processor executes the steps of the sound source localization method provided by any embodiment of the present application.
[0098] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0099] The above are only specific embodiments of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for selecting computing nodes in resource scheduling, characterized in that: include: Obtaining a creation request, at least two candidate computing nodes, and a remaining amount of resources of a preset resource in each of the candidate computing nodes, wherein the creation request includes a required amount of resources of the preset resource; When the resource demand is less than a preset demand threshold, determining a candidate computing node corresponding to the resource surplus that is greater than or equal to the resource demand and closest to the resource demand as a host computing node; A target computing node is determined from the host computing nodes.
2. The method according to claim 1, characterized in that The creation request also includes a requester identifier, and obtaining at least two candidate computing nodes includes: Obtaining a tenant list of each initially screened computing node, wherein the tenant list includes a tenant identifier; Counting the number of tenant identifiers that are consistent with the requester identifier in the tenant list of each of the initially screened computing nodes; The preliminarily screened computing nodes whose number is less than or equal to a preset number threshold are determined as the candidate computing nodes.
3. The method according to claim 1, characterized in that The method further comprises: When the resource demand is greater than or equal to the preset demand threshold, the candidate computing node with the largest remaining resource is determined as the host computing node.
4. The method according to any one of claims 1 to 3, characterized in that The determining of the target computing node from the host computing node includes: When there is only one host computing node, directly determining the host computing node as the target computing node; When there are multiple host computing nodes, the host computing node with the largest remaining memory is determined as the target computing node.
5. The method according to claim 1, characterized in that After determining the target computing node from the host computing node, the method further includes: A virtual machine is created on the target computing node, and resource provisioning is completed.
6. A device for selecting computing nodes in resource scheduling, characterized in that: include: An acquisition module, configured to acquire a creation request, at least two candidate computing nodes, and a remaining amount of resources of a preset resource in each of the candidate computing nodes, wherein the creation request includes a required amount of resources of the preset resource; A first determination module is used to determine, when the resource demand is less than a preset demand threshold, a candidate computing node corresponding to the resource surplus that is greater than or equal to the resource demand and closest to the resource demand as a host computing node; The second determining module is used to determine a target computing node from the host computing node.
7. The device according to claim 6, characterized in that The creation request also includes a requester identifier, and an acquisition module, including: An acquisition submodule, used to acquire a tenant list of each preliminarily screened computing node, wherein the tenant list includes a tenant identifier; A statistics submodule, used to count the number of tenant identifiers consistent with the requester identifier in the tenant list of each of the initially screened computing nodes; The first determination submodule is used to determine the preliminarily screened computing nodes whose number is less than or equal to a preset number threshold as the candidate computing nodes.
8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for selecting a computing node in resource scheduling according to any one of claims 1 to 5 by executing the computer instructions.
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 computer to execute the method for selecting a computing node in resource scheduling according to any one of claims 1 to 5.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for selecting a computing node in resource scheduling according to any one of claims 1 to 5 are implemented.
Citation Information
Cited By
Node determination method and apparatus, and related device
CN116827943A
Cloud resource scheduling method and device based on artificial intelligence, electronic equipment and medium
CN120768954A
