A host selection method and related device

By using differential integrated moving average autoregressive model in the cloud computing platform to predict the resource utilization rate of the host and sort and filter based on the target virtual machine type, the problem of low resource utilization rate of the host is solved, and efficient resource utilization and management is achieved .

CN115033340BActive Publication Date: 2025-02-11CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210526616.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-16
Publication Date
2025-02-11
Estimated Expiration
2042-05-16

AI Technical Summary

Technical Problem

The existing cloud computing platform has a problem of low resource utilization in host resource scheduling, resulting in wasting of the host's memory resources.

Method used

By receiving the scheduling selection request, the usage parameter information of the host is obtained, and the preset differential integrated moving average autoregressive model is used for prediction processing to obtain the utilization rate of each resource. Determine the sorting rules based on the target virtual machine type, sort the hosts, and filter out the hosts whose resource utilization balance and relative saturation meet the preset conditions to determine the target host.

Benefits of technology

It improves the utilization rate of host resources, avoids resource waste, and improves the resource management efficiency of cloud computing platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115033340B_ABST
    Figure CN115033340B_ABST
Patent Text Reader

Abstract

The present application discloses a host selection method and related devices, which relate to the field of cloud computing technology and are used to solve the technical problem of low resource utilization corresponding to the host. The method comprises: receiving a scheduling selection request, the scheduling selection request is determined based on a creation request for creating a virtual machine, the creation request at least includes a target virtual machine type; in response to the scheduling request, obtaining usage parameter information of at least one host within a first time period; based on the obtained usage parameter information and the target virtual machine type, determining a target host from the at least one host. Through this method, the utilization of the corresponding resources of the host can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] With the continuous development of science and technology, following the rise of computers and the internet, a new technology has emerged in the information age: cloud computing. The core of cloud computing is to coordinate multiple computer resources using the internet as a hub, thereby providing fast and secure cloud computing services and data storage services.

[0003] Specifically, the Infrastructure as a Service (IaaS) cloud platform centrally manages virtualized resources such as computing, networking, and storage. Users can pay on demand based on actual usage needs and apply for corresponding virtual machines from the IaaS cloud platform, thereby using the corresponding virtualized resources based on the virtual machines. In this way, users can decide how to apply for virtual resources from the IaaS cloud platform based on their actual usage needs, and the cloud company corresponding to the IaaS cloud platform can provide users with corresponding services.

[0004] In the process of providing services on the IaaS cloud platform corresponding to the cloud company, the IaaS cloud platform needs to do a good job of scheduling resources. For example, this process involves scheduling virtual machines to run on the optimal host machine, that is, maximizing the utilization of host machine resources when scheduling host machine resources.

[0005] However, in related technologies, IaaS cloud platforms often perform static statistical calculations on resources and then schedule and select hosts based on these results. For example, if host A has 8C16GB of resources available and VM 1 is already created on host A, with 4C8GB of resources allocated to it, the IaaS cloud platform's database will record the 4C8GB allocated to host A. Therefore, based on existing host scheduling schemes, host A can only be assigned another VM with the same resources as VM 1.

[0006] Obviously, based on the existing host scheduling selection scheme, when the total memory of the virtual machines already allocated on host A reaches the upper limit of the host, it is impossible to further allocate virtual machines on host A. However, in actual use, host A may have a very low memory utilization rate, resulting in the waste of memory resources of host A. It can be seen that there is a technical problem of low resource utilization corresponding to the host in the relevant technology. Summary of the Invention

[0007] The embodiments of the present application provide a method for selecting a host machine and related devices for improving the utilization rate of resources corresponding to the host machine.

[0008] In a first aspect, an embodiment of the present application provides a method for selecting a host machine, the method comprising:

[0009] receiving a scheduling selection request, the scheduling selection request being determined based on a creation request for creating a virtual machine, the creation request including at least a target virtual machine type;

[0010] In response to the scheduling request, obtaining usage parameter information of at least one host machine within a first time period;

[0011] Based on the obtained usage parameter information and the target virtual machine type, a target host machine is determined from the at least one host machine.

[0012] In a possible implementation, determining a target host machine from the at least one host machine based on the obtained usage parameter information and the target virtual machine type includes:

[0013] Predicting each of the obtained usage parameter information using a preset differential integrated moving average autoregressive model to obtain a utilization rate of each resource corresponding to the at least one host machine;

[0014] Determining a target sorting rule based on the target virtual machine type, and sorting the at least one host machine based on the target sorting rule and utilization of each resource corresponding to the at least one host machine to determine a set of candidate host machines;

[0015] A target host is determined from the candidate host set.

[0016] In one possible implementation, determining a target sorting rule based on the target virtual machine type includes:

[0017] When it is determined that the target virtual machine type is a computing type, determining the target sorting rule to sort the at least one host machine according to CPU utilization;

[0018] When it is determined that the target virtual machine type is a memory type, determining the target sorting rule to sort the at least one host machine according to memory utilization;

[0019] When it is determined that the target virtual machine type is no specified type, the target sorting rule is determined to sort the at least one host machine according to an average value determined by utilization of the CPU and the corresponding memory.

[0020] In one possible implementation, sorting the at least one host machine based on the target sorting rule and utilization of each resource corresponding to the at least one host machine to determine a set of candidate host machines includes:

[0021] Determining a sorting sequence number of the at least one host machine based on the target sorting rule and utilization rates of resources corresponding to the at least one host machine;

[0022] From the at least one host machine, host machines whose sorting numbers meet preset conditions are screened to determine a set of candidate host machines.

[0023] In one possible implementation, determining a target host from the set of candidate hosts includes:

[0024] Determining a resource utilization balance of each candidate host in the candidate host set based on a utilization rate of each resource of each candidate host in the candidate host set;

[0025] From the candidate host set, select hosts whose resource utilization balance satisfies a preset range to obtain a first candidate host subset;

[0026] Determining a relative saturation of resource utilization of each candidate host in the first subset of candidate hosts based on utilization rates of each resource of each candidate host in the first subset of candidate hosts; the relative saturation of resource utilization is used to indicate whether each resource of the candidate host has reached maximum utilization;

[0027] From the first candidate host machine subset, host machines whose relative saturation of resource utilization meets a preset threshold are screened to determine a target host machine.

[0028] In one possible implementation, determining a resource utilization balance of each candidate host in the candidate host set based on a utilization rate of each resource of each candidate host in the candidate host set includes:

[0029] For each candidate host's resource utilization, perform the following operations:

[0030] Determine the average of the CPU resource utilization and the memory resource utilization of the candidate host machine;

[0031] Determining a first processing value based on the utilization rate of the CPU resource of the candidate host and the average value; the first processing value is used to represent the degree of utilization of the CPU resource; and

[0032] Determining a second processing value based on the memory resources of the candidate host machine and the mean value; the second processing value is used to represent the degree of use of the memory resources;

[0033] Based on the first processing value and the second processing value, a resource utilization balance of the candidate host is correspondingly determined.

[0034] In a possible implementation, determining a relative saturation of resource utilization of each candidate host in the first candidate host subset based on resource utilization of each candidate host in the first candidate host subset includes:

[0035] For each resource utilization rate of a candidate host in any of the first candidate host subsets, perform the following operations:

[0036] Determine the average of the CPU resource utilization and the memory resource utilization of the candidate host machine;

[0037] Determining a relative saturation of CPU resource utilization of the candidate host machine based on a difference between the CPU resource utilization of the candidate host machine and the mean; and

[0038] Based on the difference between the utilization rate of the memory resources of the candidate host machine and the mean value, a relative saturation of resource utilization of the memory resources of the candidate host machine is determined.

[0039] In a second aspect, a host selection device is provided, the device comprising:

[0040] a receiving unit, configured to receive a scheduling selection request, wherein the scheduling selection request is determined based on a creation request for creating a virtual machine, wherein the creation request includes at least a target virtual machine type;

[0041] an acquiring unit, configured to acquire usage parameter information of at least one host machine within a first time period in response to the scheduling request;

[0042] A determining unit is configured to determine a target host machine from the at least one host machine based on the obtained usage parameter information and the target virtual machine type.

[0043] In a possible implementation manner, the determining unit is configured to:

[0044] Predicting each of the obtained usage parameter information using a preset differential integrated moving average autoregressive model to obtain a utilization rate of each resource corresponding to the at least one host machine;

[0045] Determining a target sorting rule based on the target virtual machine type, and sorting the at least one host machine based on the target sorting rule and utilization of each resource corresponding to the at least one host machine to determine a set of candidate host machines;

[0046] A target host is determined from the candidate host set.

[0047] In a possible implementation manner, the determining unit is configured to:

[0048] When it is determined that the target virtual machine type is a computing type, determining the target sorting rule to sort the at least one host machine according to CPU utilization;

[0049] When it is determined that the target virtual machine type is a memory type, determining the target sorting rule to sort the at least one host machine according to memory utilization;

[0050] When it is determined that the target virtual machine type is no specified type, the target sorting rule is determined to sort the at least one host machine according to an average value determined by utilization of the CPU and the corresponding memory.

[0051] In a possible implementation manner, the determining unit is configured to:

[0052] Determining a sorting sequence number of the at least one host machine based on the target sorting rule and utilization rates of resources corresponding to the at least one host machine;

[0053] From the at least one host machine, host machines whose sorting numbers meet preset conditions are screened to determine a set of candidate host machines.

[0054] In a possible implementation manner, the determining unit is configured to:

[0055] Determining a resource utilization balance of each candidate host in the candidate host set based on a utilization rate of each resource of each candidate host in the candidate host set;

[0056] From the candidate host set, select hosts whose resource utilization balance satisfies a preset range to obtain a first candidate host subset;

[0057] Determining a relative saturation of resource utilization of each candidate host in the first subset of candidate hosts based on utilization rates of each resource of each candidate host in the first subset of candidate hosts; the relative saturation of resource utilization is used to indicate whether each resource of the candidate host has reached maximum utilization;

[0058] From the first candidate host machine subset, host machines whose relative saturation of resource utilization meets a preset threshold are screened to determine a target host machine.

[0059] In a possible implementation manner, the determining unit is configured to:

[0060] For each candidate host's resource utilization, perform the following operations:

[0061] Determine the average of the CPU resource utilization and the memory resource utilization of the candidate host machine;

[0062] Determining a first processing value based on the utilization rate of the CPU resource of the candidate host and the average value; the first processing value is used to represent the degree of utilization of the CPU resource; and

[0063] Determining a second processing value based on the memory resources of the candidate host machine and the mean value; the second processing value is used to represent the degree of use of the memory resources;

[0064] Based on the first processing value and the second processing value, a resource utilization balance of the candidate host is correspondingly determined.

[0065] In a possible implementation manner, the determining unit is configured to:

[0066] For each resource utilization rate of a candidate host in any of the first candidate host subsets, perform the following operations:

[0067] Determine the average of the CPU resource utilization and the memory resource utilization of the candidate host machine;

[0068] Determining a relative saturation of CPU resource utilization of the candidate host machine based on a difference between the CPU resource utilization of the candidate host machine and the mean; and

[0069] Based on the difference between the utilization rate of the memory resources of the candidate host machine and the mean value, a relative saturation of resource utilization of the memory resources of the candidate host machine is determined.

[0070] According to a third aspect, a computer device is provided, comprising:

[0071] a memory for storing program instructions;

[0072] The processor is configured to call the program instructions stored in the memory and execute the steps included in any one of the methods in the first aspect according to the obtained program instructions.

[0073] According to a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. The computer program is executed by a processor to implement the steps included in any method of the first aspect.

[0074] In a fifth aspect, a computer program product or computer program is provided, the computer program product or computer program comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps included in any one of the methods of the first aspect.

[0075] The technical solutions provided by the embodiments of this application bring at least the following beneficial effects:

[0076] In an embodiment of the present application, a host machine selection method and related devices are proposed. Since, when receiving a scheduling selection request, the scheduling selection request includes at least a target virtual machine type in a creation request determined based on a creation request for creating a virtual machine, the host machine corresponding to the control node can obtain usage parameter information of at least one host machine within a first time period. In this way, the target host machine can be determined from at least one host machine based on the obtained usage parameter information and the target virtual machine type. That is to say, in an embodiment of the present application, the selected target host machine is comprehensively determined based on the dynamically obtained usage parameter information of the host machine and the target virtual machine type specified by the user. In this way, the utilization rate of the corresponding resources of the host machine can be improved.

[0077] Other features and advantages of the present application will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present application. The purposes and other advantages of the present application can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0079] Figure 1 This is a schematic diagram of the utilization of host CPU resources and memory resources in a resource pool in the prior art;

[0080] Figure 2 This is an optional schematic diagram of an application scenario in an embodiment of the present application;

[0081] Figure 3 A schematic diagram of a cloud computing cluster system according to an embodiment of the present application;

[0082] Figure 4 This is a flowchart of a method for selecting a host machine in an embodiment of the present application;

[0083] Figure 5 A schematic diagram of a specific scenario of the host machine selection method in an embodiment of the present application;

[0084] Figure 6 This is a schematic diagram of the utilization of the CPU resources and memory resources of the host machine in an embodiment of the present application;

[0085] Figure 7 A schematic diagram of the structure of a host selection device according to an embodiment of the present application;

[0086] Figure 8 This is a schematic diagram of the hardware structure of a computer device in an embodiment of the present application. DETAILED DESCRIPTION

[0087] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other in any way. In addition, although a logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.

[0088] To facilitate understanding of the technical solutions provided in the embodiments of the present application, some key terms or processes involved in the embodiments of the present application are explained here:

[0089] Host: The host can be understood as a server.

[0090] Virtual machine: A virtual machine can be understood as a resource in a host machine.

[0091] Infrastructure as a Service (IaaS) refers to a service model in which IT infrastructure is provided as a service over the internet, with users billed based on actual resource usage. In this service model, users pay on-demand for resources based on their actual needs. In other words, users decide on the resource specifications and the operating system to install, while the cloud company simply prepares to provide the service.

[0092] The central processing unit (CPU) is the computing and control core of the computer system and the final execution unit for information processing and program execution.

[0093] Memory is an important component of the computer, also known as internal memory and main memory. It is used to temporarily store the calculation data in the CPU and the data exchanged with external memory such as the hard disk.

[0094] For example, if the virtual machine's resources are: 4C8G, it can be understood that the virtual machine's resources are: 4 CPUs and 8G memory.

[0095] Compute Service Component (Nova): A virtual server deployment and business computing module developed by NASA. The Compute Service Component includes multiple components, including the interactive interface API Server (nova-api), which allows administrators to manage internal infrastructure and provide services to users. This interface then sends messages to the message queue to achieve resource scheduling. Compute Workers (nova-compute) are used to manage the instance lifecycle, receiving requests through the message queue and performing operational tasks. Conductor (nova-conductor) is responsible for controlling database access permissions to prevent nova-compute from directly accessing the database. Nova-scheduler is a component that maps nova-API calls to OpenStack and makes scheduling decisions based on factors such as CPU architecture, physical distance between availability zones, memory, and load.

[0096] The Autoregressive Integrated Moving Average (ARIMA) model is a time series forecasting and analysis method. In ARIMA (p, d, q), AR stands for "autoregressive," p is the number of autoregressive terms, MA stands for "moving average," q is the number of moving average terms, and d is the number of differencing steps (order) required to achieve a stationary series.

[0097] Currently, in the process of providing services at the IaaS layer of cloud companies, an important part is resource scheduling, that is, how to schedule virtual machines to run on the optimal host machine, that is, how to select a host machine so as to maximize the utilization of host machine resources. Specifically, for example, choose a host machine with low memory usage, low CPU usage, low network bandwidth usage, and low disk usage for scheduling.

[0098] However, the existing scheduling and host selection methods are all implemented based on the calculation of the static statistical results of resources. Specifically, the scheme for implementing scheduling and host selection based on the results of static statistics means that if the resources on a host can only match to create one virtual machine, then no matter what the resource utilization of the created virtual machine is, only the number of virtual machines created on the host is monitored, thereby ignoring the actual resource utilization of the created virtual machines, which may cause waste of resources on the host. For example, the total memory of the virtual machines already allocated on the host reaches the upper limit of the host, resulting in the inability to further allocate virtual machines on this host. However, in actual situation, the memory utilization of the host is very low. Similarly, the CPU and network will also have this situation. Obviously, this kind of situation will cause more obvious resource waste as the scale of the cloud environment continues to expand.

[0099] For example, if a host machine W with 8C16GB of allocatable resources has already created a virtual machine with a capacity of 4C8GB, the database can record the 4C8GB of resources already allocated to the host machine W. In other words, the host machine W can only allocate one more virtual machine with a capacity of 4C8GB. Obviously, static resources on the host machine W cannot be further allocated. However, in actual implementation, the utilization rate of the host machine's CPU, memory, and other resources is relatively low.

[0100] In order to better utilize the host machine's resources, it is hoped that more virtual machines can be allocated to a host machine. However, once multiple virtual machines are allocated to a host machine, other problems will be introduced. For example, when some virtual machines are highly loaded, the operation of other virtual machines with lower loads will be affected, thereby reducing the user experience of users who apply for resources, or even making the corresponding virtual machines of the users unusable.

[0101] See Figure 1 As shown, Figure 1 The inventors of this application have adopted an existing solution for selecting a host based on static statistics, and have calculated the average utilization of the CPU and memory on each host in the corresponding cloud computing cluster. Figure 1 The horizontal axis in is used to represent the computing node identification (Identity document, ID). Specifically, the computing node ID represents the number of the host machine running the virtual machine, that is, the host machine is called a computing node. And, Figure 1 The vertical axis in the table is used to represent the average utilization of the CPU and memory on the computing node. The hollow circle represents the average CPU utilization, and the solid circle represents the average memory utilization. The two average utilizations are the average values ​​obtained by regularly collecting the CPU and memory utilization on the computing node. Obviously, Figure 1 It can be seen that the CPU resource utilization of each host machine is low, maintained at around 15%, and the memory resource utilization of each host machine is also low, maintained at around 50%.

[0102] It can be seen that the related technology has a technical problem of low resource utilization corresponding to the host machine.

[0103] In view of this, in an embodiment of the present application, a new scheme for selecting a host machine is provided, in which the target host machine is no longer calculated based on the results of static statistics of the host machine, but is guided by the user's willingness to apply for resources, and uses the host machine resource utilization statistical prediction as a method, and combines the host machine's resource utilization balance and resource utilization relative saturation to comprehensively determine the selected host machine, that is, the target host machine. Specifically, the target virtual machine type in the scheduling selection request can be received, so that the user's willingness to apply for resources can be determined. Then, the usage parameter information of at least one host machine in the first time period can be obtained, and then predictions can be made based on the obtained usage parameter information, and the resource utilization balance and resource utilization relative saturation of at least one host machine can be determined, so that the target host machine can be selected based on the results determined by the above-mentioned processing. It can be seen that the scheme provided by the present application maximizes the utilization of host machine resources on the basis of retaining the existing scheduling algorithm.

[0104] After introducing the design concepts of the embodiments of the present application, the following briefly introduces the application scenarios to which the technical solutions of the embodiments of the present application can be applied. It should be noted that the application scenarios introduced below are only used to illustrate the embodiments of the present application and are not limiting. In the specific implementation process, the technical solutions provided by the embodiments of the present application can be flexibly applied according to actual needs.

[0105] The solution provided in the embodiment of the present application can be applied to all scenarios of selecting a host machine corresponding to a cloud platform, for example, a scenario in which company 1, to which the cloud computing cluster corresponding to the cloud platform belongs, provides a host machine corresponding to a virtual machine to user A.

[0106] See Figure 2 FIG2 is a schematic diagram of a scenario provided by an embodiment of the present application. In this scenario, a first host machine 201 corresponding to a control node and a second host machine 202 corresponding to multiple computing nodes may be included. It should be noted that in actual implementation, there may be multiple second host machines 202, namely, host machine 202-1, second host machine 202-2, ..., second host machine 202-n, where n is a positive integer.

[0107] In the embodiments of the present application, the first host machine and the second host machine are used only to distinguish different host machines. That is, "first," "second," and the like are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the images used in this manner are interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than that illustrated or described herein.

[0108] It should be noted that the host machines in the embodiments of the present application, such as the aforementioned first host machine and the second host machine, can be independent physical servers, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, but is not limited to this.

[0109] In an embodiment of the present application, the first host machine 201 corresponding to the control node can determine the host machine to be filtered. The host machine to be filtered is determined, for example, from a cloud computer cluster, which is not limited in this application. In addition, the nova-api in the first host machine 201 sends a request to nova-conductor, carrying the user-specifiable virtual machine type in the request, and then ova-conductor requests nova-scheduler for scheduling, so that nova-scheduler requests the monitoring service to obtain the memory and CPU data series of the second host machine 202 over a period of time in the past, which is used for ARIMA modeling to predict the R value, and then nova-scheduler calculates the virtual machine host that meets the conditions, that is, determines the target host machine. Specifically, the judgment method for meeting the conditions can be to add a filtering algorithm based on the host machine resource balance and an algorithm that matches the user's application for virtual machine type, while retaining the existing feature filtering algorithm. Furthermore, a virtual machine creation request can be issued to the determined target host machine to achieve the creation of the virtual machine.

[0110] The first host machine 201 and the second host machine 202, as well as the second host machines 202, can be directly or indirectly connected to each other through one or more networks 203. The network 203 can be a wired network or a wireless network, for example, a mobile cellular network or a Wireless Fidelity (WIFI) network, or other possible networks, which are not limited in the present embodiment.

[0111] Of course, the method provided in the embodiment of the present application is not limited to Figure 2 The application scenarios shown can also be used in other possible application scenarios, and the embodiments of this application are not limited thereto. Figure 2 The functions that can be implemented by each device in the application scenario shown will be described in subsequent method embodiments and will not be described in detail here.

[0112] See Figure 3As shown, the embodiment of the present application provides a cloud computing cluster system, which includes a first host machine 301 corresponding to the control node, a third host machine 303 corresponding to the network node, a second host machine 302 corresponding to the computing node, and a monitoring service 304. Among them, the first host machine 301 corresponding to the control node can be understood as the aforementioned Figure 2 The first host 201 and the second host 302 can be understood as Figure 2 The second host machine 202 in.

[0113] In the entire cloud computing cluster, host machines can be classified. For example, they can be divided into control nodes (used to receive API requests, scheduling, etc.), computing nodes (used to run virtual machines), network nodes (used to manage virtual machine networks, such as subnets, IPs, ports, etc.) according to their functions.

[0114] See also Figure 3 As shown, the first host 301 can interact with at least one second host 302 and the monitoring service 304. The specific interaction process will be described in detail later and will not be repeated here. Figure 3 The cloud computing cluster in the example can be the aforementioned Figure 2 The system composed of all devices included in the application scenario will not be explained one by one here.

[0115] To further illustrate the technical solutions provided by the embodiments of the present application, this is described in detail below with reference to the accompanying drawings and specific implementation methods. Although the embodiments of the present application provide method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or no creative labor. In steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided by the embodiments of the present application. The method may be executed in the order of the methods shown in the embodiments or drawings or in parallel during the actual processing process or when the device is executed.

[0116] See also Figure 4 , the embodiment of the present application provides a flowchart of a method for selecting a host machine. Figure 4 As shown, the process of the method can be executed by a computer device, which can be Figure 2 or Figure 3 The first host shown. The specific process is as follows:

[0117] Step 401: Receive a scheduling selection request, where the scheduling selection request is determined based on a creation request for creating a virtual machine, and the creation request at least includes a target virtual machine type.

[0118] In an embodiment of the present application, the nova-api component in the first host corresponding to the computer device (i.e., the control node) can send a request to nova-conductor, wherein the request carries a user-specified virtual machine type (i.e., the target virtual machine type). Specifically, the virtual machine type can be a computing virtual machine type, a memory virtual machine type, or an unspecified type, which is not limited in this application.

[0119] During the specific implementation process, the user can interact with the processing device corresponding to the cloud computing cluster through his or her corresponding electronic device, so that the processing device can send the specified virtual machine type obtained from the creation request of the virtual machine creation request sent from the electronic device to the first host machine, and then the nova-api component in the first host machine can determine the virtual machine type specified by the user.

[0120] Step 402: In response to the scheduling request, obtain usage parameter information of at least one host machine within a first time period.

[0121] In an embodiment of the present application, the nova-scheduler component in the first host can respond to the scheduling request and then send a request to the monitoring service corresponding to the cloud computing cluster to obtain usage parameter information of at least one host during the first time period. The at least one host can be understood as all hosts corresponding to all compute nodes in the cloud computing cluster. In other words, the at least one host in this embodiment of the present application is the host of all virtual machines running in the cloud computing cluster.

[0122] In an embodiment of the present application, the monitoring service is used to monitor the operating status of virtual machines deployed in all host machines corresponding to all computing nodes in the cloud computing cluster. Therefore, the monitoring service can obtain usage parameter information of at least one host machine within a first time period and feedback to the first host machine, so that the first host machine can obtain usage parameter information of at least one host machine within the first time period based on the feedback from the monitoring service.

[0123] In an embodiment of the present application, the first time period can be determined based on actual implementation conditions. For example, the first time period is 10 seconds before the current time. When the current time is 9:34:10, the first time period can be from 9:34:00 to 9:34:10. This is not limited in the present application. In addition, the usage parameter information corresponding to the host machine in the first time period in the embodiment of the present application can be understood as information about the resources used by the virtual machine running on the host machine. For example, the usage parameter information may include the data sequence of the host machine's memory and CPU in the first time period.

[0124] It can be seen that in the embodiment of the present application, the data of the host machine's resources is not determined based on static statistics, but the data of the host machine's resources in each first time period is determined. In this way, the actual usage of the host machine's resources can be dynamically known, providing a good implementation basis for the selection of the host machine corresponding to the subsequent computing node.

[0125] Step 403: Based on the obtained usage parameter information and the target virtual machine type, determine a target host machine from at least one host machine.

[0126] In the embodiment of the present application, the first host corresponding to the control node may determine the target host by, but not limited to, the following steps:

[0127] Step A: Predicting and processing each of the obtained usage parameter information is performed by using a preset differential integrated moving average autoregressive model to obtain the utilization rate of each resource corresponding to at least one host machine.

[0128] In an embodiment of the present application, in order to eliminate the impact of unstable resource utilization monitoring values ​​and the impact of glitches in monitoring data, an ARIMA (p, d, q) model is used in the embodiment of the present application to estimate the current CPU and memory usage of the host machine.

[0129] Specifically, the ARIMA (p, d, q) model is used to analyze time series data, learning patterns over time from historical data and then using these patterns to predict the future. The model goes through the steps of acquiring the time series, preprocessing the time series, model identification, model order determination, parameter estimation, and model validation before ultimately producing an estimated value.

[0130] In the embodiment of the present application, since the monitoring values ​​of the CPU and memory are time series data, ARIMA (p, d, q) modeling can be performed on these data to calculate the estimated value. Specifically, a threshold Rmax is set in this application, and the R value of the host machine's CPU and memory is calculated through the ARIMA (p, d, q) model. When screening hosts, hosts with R values ​​less than Rmax are selected to prevent the host machine from being overloaded and causing the host machine to run slowly or out of memory (OOM) to occur.

[0131] Step B: Determine a target sorting rule based on the target virtual machine type, and sort at least one host machine based on the target sorting rule and utilization of each resource corresponding to the at least one host machine to determine a candidate host machine set.

[0132] In an embodiment of the present application, when the target virtual machine type is determined to be computing type, the target sorting rule is determined to sort at least one host machine according to the CPU utilization; when the target virtual machine type is determined to be memory type, the target sorting rule is determined to sort at least one host machine according to the memory utilization; when the target virtual machine type is determined to be unspecified type, the target sorting rule is determined to sort at least one host machine according to the average determined by the CPU and corresponding memory utilization.

[0133] It can be seen that in the embodiment of the present application, corresponding target sorting rules are provided for different target virtual machine types. In this way, the user's resource application needs can be met more accurately, and a variety of implementation plans can be provided to avoid the sorting impact caused by target sorting rules based on indiscriminate words, thereby improving the screening accuracy of the host machine corresponding to the computing node.

[0134] In an embodiment of the present application, a ranking number of at least one host is determined based on a target ranking rule and the utilization of various resources corresponding to at least one host. From the at least one host, hosts whose ranking numbers meet a preset condition are screened to determine a set of candidate hosts. The preset condition may screen the first N hosts with the ranking numbers in ascending order, where N is a positive integer. The value of N may be determined based on actual implementation and is not limited in this application.

[0135] For example, assuming that the target virtual machine type is computing type, the five host machines are sorted based on the CPU utilization corresponding to the five host machines, and the five host machines, namely host A, host B, host C, host D and host E, are determined, and the corresponding sorting numbers are 3, 2, 1, 4, and 5 respectively. That is to say, the CPU utilization of host C is the highest, and the CPU utilization of host E is the lowest. Therefore, based on the preset filtering conditions, host A, host B and host C can be filtered out as candidate hosts.

[0136] Step C: Determine the target host from the candidate host set.

[0137] In the embodiment of the present application, the target host machine may be determined from the candidate host machine set by, but not limited to, the following steps:

[0138] Step a: Determine the resource utilization balance of each candidate host in the candidate host set based on the utilization rate of each resource of each candidate host in the candidate host set.

[0139] In the embodiments of the present application, since each virtual machine uses different resources on the host machine, the remaining resources on each host machine are constantly changing. To avoid excessive or insufficient remaining resources, it is necessary to maintain a balance between the use of various resources on each host machine. In view of this, in the embodiments of the present application, the resource utilization balance of each candidate host machine in the candidate host machine set can be determined.

[0140] In an embodiment of the present application, for the utilization of each resource of any candidate host machine, the following operations are performed respectively: determining the average utilization of the CPU resources and the memory resources of the candidate host machine; determining a first processing value based on the utilization and the average of the CPU resources of the candidate host machine; the first processing value is used to characterize the degree of utilization of the CPU resources; and, determining a second processing value based on the memory resources and the average of the candidate host machine; the second processing value is used to characterize the degree of utilization of the memory resources; based on the first processing value and the second processing value, the resource utilization balance of the candidate host machine is correspondingly determined.

[0141] Specifically, the resource utilization balance of the candidate host can be determined using the following formula:

[0142]

[0143] Among them, u j cpu Used to characterize the CPU resource utilization of the candidate host, u j mem Used to characterize the utilization of memory resources of the candidate host, u j represents the average utilization of these two resources, L j The value range is [0, 1].

[0144] Obviously, in the specific implementation process, when determining the L of the candidate host j The larger the value, the more balanced the resource utilization of the candidate host can be determined; and when the L j The smaller the value, the more unbalanced the resource utilization of the candidate host.

[0145] Step b: From the candidate host set, select hosts whose resource utilization balance satisfies a preset range to obtain a first candidate host subset.

[0146] Specifically, the preset range can be determined based on actual implementation, and is not limited to this in the embodiments of the present application.

[0147] Step c: Based on the utilization rate of each resource of each candidate host in the first candidate host subset, determine the relative saturation of resource utilization of each candidate host in the first candidate host subset; the relative saturation of resource utilization is used to indicate whether the resources of the candidate host have reached the maximum utilization progress.

[0148] In the embodiment of the present application, the following operations are performed for the utilization rate of each resource of the candidate host in any first candidate host subset:

[0149] Determine the mean of the CPU resource utilization and the memory resource utilization of the candidate host machine; determine the relative saturation of resource utilization of the CPU resources of the candidate host machine based on the difference between the CPU resource utilization and the mean of the candidate host machine; and determine the relative saturation of resource utilization of the memory resources of the candidate host machine based on the difference between the memory resource utilization and the mean of the candidate host machine.

[0150] Specifically, the following formula 2 may be used to determine the relative saturation of resource utilization of the candidate hosts in the first candidate host subset:

[0151]

[0152] Among them, u j cpu Used to characterize the CPU resource utilization of the candidate host, u j mem Used to characterize the utilization of memory resources of the candidate host, u j The average value used to represent the utilization of these two resources, d j Used to characterize the relative saturation of any resource utilization, d j It can be negative or positive, that is, d j mem Used to characterize the relative saturation of memory resources used by candidate hosts, d j cpu Used to indicate the relative saturation of CPU resources on the candidate host.

[0153] In the embodiment of the present application, d j The larger the value, the more saturated the resource utilization is. The smaller the value, the less saturated the resource utilization is. j cpu Similarly, if the user specifies the virtual machine type as a memory-based machine when applying for a virtual machine, then d j mem The smaller the value, the better the host.

[0154] Step d: From the first candidate host subset, screen the host whose relative resource utilization saturation meets the preset threshold and determine the target host.

[0155] Specifically, the preset threshold can be determined accordingly based on the target virtual machine type and the dj value of each candidate host machine. That is to say, the preset threshold in this application can be updated accordingly based on actual implementation, and is not limited in the embodiments of this application.

[0156] In the embodiment of the present application, in order to better introduce the host machine selection method provided by the present application, the creation process of a virtual machine is taken as an example for explanation.

[0157] See also Figure 5 As shown, in an embodiment of the present application, the nova-api in the first host corresponding to the control node sends a request to nova-conductor, and the request carries a user-specifiable virtual machine type, such as a computing type. Then, the nova-conductor in the first host corresponding to the control node requests nova-scheduler for scheduling. Furthermore, the nova-scheduler in the first host corresponding to the control node requests a monitoring service to obtain the memory and CPU data series of the second host corresponding to each computing node within the first time period, and this data series is used for ARIMA (p, d, q) modeling to predict the R value.

[0158] Specifically, the monitoring service can provide feedback to the nova-scheduler in the first host corresponding to the control node, including the memory and CPU data sequences of the second host corresponding to each computing node within the first time period. Furthermore, the nova-scheduler in the first host corresponding to the control node can calculate virtual machine hosts that meet the conditions. Specifically, the conditions corresponding to the nova-scheduler in the first host corresponding to the control node are determined by retaining the existing feature filtering algorithm while adding a filtering algorithm based on the host resource balance and an algorithm that matches the user's requested virtual machine type. Finally, the nova-scheduler in the first host corresponding to the control node sends a virtual machine creation request to the determined target host, thereby processing the user's virtual machine creation request.

[0159] In practice, existing feature filtering algorithms can be understood as the many host selection filtering algorithms included in the nova-scheduler on the first host corresponding to the control node. Nearly 20 of these are actually used, and each filtering algorithm is executed to select the most suitable host. For example, if the filtering algorithm is the Aggregate InstanceExtra Specs Filter, which specifies a flavor (similar to a tag) specified by the VM creation, it will select aggregates (host aggregates) with the same tag, even if the aggregate contains multiple hosts.

[0160] In the embodiment of the present application, the process of determining the target host machine can be represented by, but not limited to, the following pseudo code:

[0161] 1: H = {h1,h2,...,hy}

[0162] 2: use ARIMA(p,d,q)and get RR<=Rmax.H→H`

[0163] 3: sortAscendingResourceUsage(H`)*percentThreshold.H`→H``

[0164] 4: sortAscendingByL(H``).H``→H```

[0165] 5: find min(dj)in H```*percentThreshold as h

[0166] 6: return h.

[0167] Specifically, the above pseudo code can be understood as: Step 1: Input the host to be filtered, that is, determine the host to be selected. Step 2: Predict the current utilization value R of each resource based on the ARIMA (p, d, q) model, and perform filtering of Rmax. Step 3: Arrange H` in ascending order according to the R value obtained in step 2 (i.e., sortAscendingResourceUsage), Resource corresponds to the type of virtual machine applied for by the user, and percentThreshold is a configurable percentage. Step 4: Arrange in ascending order according to the resource utilization balance of resources. Step 5: Find the host with the smallest relative saturation of applied resources, and percentThreshold is a configurable percentage. Step 6: Return the filtered target host.

[0168] It can be seen that in the embodiment of the present application, the ARIMA (p, d, q) model is used to estimate the current values ​​of the host CPU and memory, eliminating the influence of the instability of the resource utilization monitoring value obtained based on the monitoring service, that is, the parameter information, and eliminating the influence of the burr data, so that judgments can be made more accurately. In addition, the present application can accurately send it to the corresponding host machine according to the type of virtual machine applied for by the user, and the host machine resource balance and resource relative saturation are screened. The overall consideration is combined to select the target host machine, thereby improving the host machine resource utilization. In addition, compared with the scheduling selection scheme based on static statistics in the prior art, the dynamic data obtained by the monitoring service in the present application is used to make judgments, which is more conducive to the utilization of host machine resources, thereby improving the resource utilization of the host machine.

[0169] See also Figure 6 The figure shows a schematic diagram of the CPU utilization and memory utilization of the host machine determined by the solution provided by this application. Obviously, after a period of operation, the CPU utilization of the host machine has increased and is close to the memory utilization after screening the host machine using the solution provided by this application.

[0170] Based on the same inventive concept, the embodiment of the present application also provides a host selection device. Figure 7 As shown, it is a schematic diagram of the structure of the host selection device 700, which may include:

[0171] A receiving unit 701 is configured to receive a scheduling selection request, where the scheduling selection request is determined based on a creation request for creating a virtual machine, where the creation request includes at least a target virtual machine type;

[0172] An acquiring unit 702 is configured to acquire usage parameter information of at least one host machine within a first time period in response to the scheduling request;

[0173] The determining unit 703 is configured to determine a target host machine from the at least one host machine based on the obtained usage parameter information and the target virtual machine type.

[0174] In a possible implementation, the determining unit 703 is configured to:

[0175] Predicting each of the obtained usage parameter information using a preset differential integrated moving average autoregressive model to obtain a utilization rate of each resource corresponding to the at least one host machine;

[0176] Determining a target sorting rule based on the target virtual machine type, and sorting the at least one host machine based on the target sorting rule and utilization of each resource corresponding to the at least one host machine to determine a set of candidate host machines;

[0177] A target host is determined from the candidate host set.

[0178] In a possible implementation, the determining unit 703 is configured to:

[0179] When it is determined that the target virtual machine type is a computing type, determining the target sorting rule to sort the at least one host machine according to CPU utilization;

[0180] When it is determined that the target virtual machine type is a memory type, determining the target sorting rule to sort the at least one host machine according to memory utilization;

[0181] When it is determined that the target virtual machine type is no specified type, the target sorting rule is determined to sort the at least one host machine according to an average value determined by utilization of the CPU and the corresponding memory.

[0182] In a possible implementation, the determining unit 703 is configured to:

[0183] Determining a sorting sequence number of the at least one host machine based on the target sorting rule and utilization rates of resources corresponding to the at least one host machine;

[0184] From the at least one host machine, host machines whose sorting numbers meet preset conditions are screened to determine a set of candidate host machines.

[0185] In a possible implementation, the determining unit 703 is configured to:

[0186] Determining a resource utilization balance of each candidate host in the candidate host set based on a utilization rate of each resource of each candidate host in the candidate host set;

[0187] From the candidate host set, select hosts whose resource utilization balance satisfies a preset range to obtain a first candidate host subset;

[0188] Determining a relative saturation of resource utilization of each candidate host in the first subset of candidate hosts based on utilization rates of each resource of each candidate host in the first subset of candidate hosts; the relative saturation of resource utilization is used to indicate whether each resource of the candidate host has reached maximum utilization;

[0189] From the first candidate host machine subset, host machines whose relative saturation of resource utilization meets a preset threshold are screened to determine a target host machine.

[0190] In a possible implementation, the determining unit 703 is configured to:

[0191] For each candidate host's resource utilization, perform the following operations:

[0192] Determine the average of the CPU resource utilization and the memory resource utilization of the candidate host machine;

[0193] Determining a first processing value based on the utilization rate of the CPU resource of the candidate host and the average value; the first processing value is used to represent the degree of utilization of the CPU resource; and

[0194] Determining a second processing value based on the memory resources of the candidate host machine and the mean value; the second processing value is used to represent the degree of use of the memory resources;

[0195] Based on the first processing value and the second processing value, a resource utilization balance of the candidate host is correspondingly determined.

[0196] In a possible implementation, the determining unit 703 is configured to:

[0197] For each resource utilization rate of a candidate host in any of the first candidate host subsets, perform the following operations:

[0198] Determine the average of the CPU resource utilization and the memory resource utilization of the candidate host machine;

[0199] Determining a relative saturation of CPU resource utilization of the candidate host machine based on a difference between the CPU resource utilization of the candidate host machine and the mean; and

[0200] Based on the difference between the utilization rate of the memory resources of the candidate host machine and the mean value, a relative saturation of resource utilization of the memory resources of the candidate host machine is determined.

[0201] For the convenience of description, the above parts are divided into modules (or units) according to their functions and described separately. Of course, when implementing this application, the functions of each module (or unit) can be implemented in the same or multiple software or hardware.

[0202] After introducing the host machine selection method and apparatus according to an exemplary embodiment of the present application, a computer device according to another exemplary embodiment of the present application is introduced next.

[0203] Those skilled in the art will appreciate that various aspects of the present application can be implemented as systems, methods, or program products. Therefore, various aspects of the present application can be specifically implemented in the following forms: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation that combines hardware and software aspects, which may be collectively referred to herein as a "circuit," "module," or "system."

[0204] Based on the same inventive concept as the above method embodiment, the present application embodiment also provides a computer device. In one embodiment, the computer device can be a server, such as Figure 2 In this embodiment, the structure of the computer device can be as follows Figure 8 As shown, the embodiment of the present application also provides a computer device, such as Figure 8 As shown, the computer device in the embodiment of the present application includes at least one processor 801, and a memory 802 and a communication interface 803 connected to the at least one processor 801. The specific connection medium between the processor 801 and the memory 802 is not limited in the embodiment of the present application. Figure 8 In the example, the processor 801 and the memory 802 are connected via a bus 800. Figure 8 The bus 800 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0205] In an embodiment of the present application, the memory 802 stores instructions that can be executed by at least one processor 801. The at least one processor 801 can execute the steps included in the aforementioned host machine selection method by executing the instructions stored in the memory 802.

[0206] The processor 801 is the control center of the computer device and can connect the various parts of the entire fault detection device using various interfaces and lines. By running or executing instructions stored in the memory 802 and calling data stored in the memory 802, the various functions of the computer device can be realized. Optionally, the processor 801 may include one or more processing units. The processor 801 may integrate an application processor and a modem processor. The processor 801 mainly processes the operating system, user interface, and application programs, while the modem processor mainly processes wireless communications. It is understood that the modem processor may not be integrated into the processor 801. In some embodiments, the processor 801 and the memory 802 may be implemented on the same chip. In some embodiments, they may also be implemented on separate chips.

[0207] The processor 801 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor.

[0208] The memory 802 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 802 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 802 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 802 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0209] The communication interface 803 is a transmission interface that can be used for communication, and data can be received or sent through the communication interface 803 .

[0210] In addition, the computer device also includes a basic input / output system (I / O system) 804 for facilitating information transmission between various components within the computer device, and a large-capacity storage device 808 for storing an operating system 805 , application programs 806 , and other program modules 807 .

[0211] The basic input / output system 804 includes a display 809 for displaying information and an input device 810, such as a mouse and keyboard, for user input. Both the display 809 and the input device 810 are connected to the processor 801 via the basic input / output system 804, which is connected to the system bus 800. The basic input / output system 804 may also include an input / output controller for receiving and processing input from a variety of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller also provides output to a display screen, printer, or other types of output devices.

[0212] Specifically, the mass storage device 808 is connected to the processor 801 via a mass storage controller (not shown) connected to the system bus 800. The mass storage device 808 and its associated computer-readable media provide non-volatile storage for the server package. In other words, the mass storage device 808 may include a computer-readable medium (not shown) such as a hard disk or a CD-ROM drive.

[0213] According to various embodiments of the present application, the computer device may also be connected to a remote computer on a network such as the Internet for operation. That is, the computer device may be connected to the network 811 via the communication interface 803 connected to the system bus 800, or the communication interface 803 may be used to connect to other types of networks or remote computer systems (not shown).

[0214] In some possible implementations, various aspects of the host selection method provided in the present application may also be implemented in the form of a program product, which includes program code. When the program product is run on a computer device, the program code is used to cause the computer device to execute the steps of the host selection method according to various exemplary embodiments of the present application described above in this specification. For example, the computer device may execute the following steps: Figure 4 Follow the steps shown in .

[0215] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0216] The program product of the embodiment of the present application may be a portable compact disc read-only memory (CD-ROM) and include program code, and can be run on a computing device. However, the program product of the present application is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with a command execution system, device, or device.

[0217] A readable signal medium may include a data signal transmitted in baseband or as part of a carrier wave, which carries readable program code. Such a transmitted data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with a command execution system, apparatus, or device.

[0218] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0219] The program code for performing the operations of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0220] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.

[0221] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A method for selecting a host machine, characterized in that: The method comprises: receiving a scheduling selection request, the scheduling selection request being determined based on a creation request for creating a virtual machine, the creation request including at least a target virtual machine type; In response to the scheduling selection request, obtaining usage parameter information of at least one host machine within a first time period; Determine a target host machine from the at least one host machine based on the obtained usage parameter information and the target virtual machine type; The method of determining a target host from the at least one host based on the obtained usage parameter information and the target virtual machine type includes: performing prediction processing on the obtained usage parameter information through a preset differential integrated moving average autoregressive model to obtain the utilization rate of each resource corresponding to the at least one host; determining a target sorting rule based on the target virtual machine type, and sorting the at least one host based on the target sorting rule and the utilization rate of each resource corresponding to the at least one host to determine a set of candidate hosts; and determining a target host from the set of candidate hosts; Wherein, determining the target host from the candidate host set includes: determining the resource utilization balance of each candidate host in the candidate host set based on the utilization rate of each resource of each candidate host in the candidate host set; screening the host whose resource utilization balance meets a preset range from the candidate host set to obtain a first candidate host subset; determining the relative saturation of resource utilization of each candidate host in the first candidate host subset based on the utilization rate of each resource of each candidate host in the first candidate host subset; the relative saturation of resource utilization is used to characterize whether each resource of the candidate host has reached the progress of being maximized; screening the host whose relative saturation of resource utilization meets a preset threshold from the first candidate host subset to determine the target host; Among them, the method of determining the relative saturation of resource utilization of each candidate host machine in the first candidate host machine subset based on the utilization of each resource of each candidate host machine in the first candidate host machine subset includes: for the utilization of each resource of any candidate host machine in the first candidate host machine subset, performing the following operations respectively: determining the mean of the utilization of the CPU resources and the utilization of the memory resources of the candidate host machine; determining the relative saturation of resource utilization of the CPU resources of the candidate host machine based on the difference between the utilization of the CPU resources of the candidate host machine and the mean; and determining the relative saturation of resource utilization of the memory resources of the candidate host machine based on the difference between the utilization of the memory resources of the candidate host machine and the mean.

2. The method according to claim 1, characterized in that Determining a target sorting rule based on the target virtual machine type includes: When it is determined that the target virtual machine type is a computing type, determining the target sorting rule to sort the at least one host machine according to CPU utilization; When it is determined that the target virtual machine type is a memory type, determining the target sorting rule to sort the at least one host machine according to memory utilization; When it is determined that the target virtual machine type is no specified type, the target sorting rule is determined to sort the at least one host machine according to an average value determined by utilization of the CPU and the corresponding memory.

3. The method according to claim 2, characterized in that Sorting the at least one host machine based on the target sorting rule and the utilization rate of each resource corresponding to the at least one host machine to determine a set of candidate host machines includes: Determining a sorting sequence number of the at least one host machine based on the target sorting rule and utilization rates of various resources corresponding to the at least one host machine; From the at least one host machine, host machines whose sorting numbers meet preset conditions are screened to determine a set of candidate host machines.

4. The method according to claim 1, characterized in that Determining the resource utilization balance of each candidate host in the candidate host set based on the utilization rate of each resource of each candidate host in the candidate host set includes: For the utilization of each resource of any candidate host, perform the following operations: Determine the average of the CPU resource utilization and the memory resource utilization of the candidate host machine; Based on the utilization rate of the CPU resources of the candidate host machine and the average value, a first processing value is determined; the first processing value is used to represent the degree of utilization of the CPU resources; and, Determining a second processing value based on the memory resources of the candidate host machine and the mean value; the second processing value is used to represent the degree of use of the memory resources; Based on the first processing value and the second processing value, a resource utilization balance of the candidate host is correspondingly determined.

5. A host selection device, characterized in that: The device comprises: A receiving unit, configured to receive a scheduling selection request, wherein the scheduling selection request is determined based on a creation request for creating a virtual machine, wherein the creation request at least includes a target virtual machine type; an acquisition unit, configured to acquire, in response to the scheduling selection request, usage parameter information of at least one host machine within a first time period; a determining unit, configured to determine a target host machine from the at least one host machine based on the obtained usage parameter information and the target virtual machine type; Wherein, when determining the target host from the at least one host based on the obtained usage parameter information and the target virtual machine type, the determination unit is specifically used to: perform prediction processing on the obtained usage parameter information through a preset differential integrated moving average autoregressive model to obtain the utilization rate of each resource corresponding to the at least one host; determine a target sorting rule based on the target virtual machine type, and sort the at least one host based on the target sorting rule and the utilization rate of each resource corresponding to the at least one host to determine a set of candidate hosts; determine the target host from the set of candidate hosts; Wherein, when determining the target host from the candidate host set, the determination unit is specifically used to: determine the resource utilization balance of each candidate host in the candidate host set based on the utilization rate of each resource of each candidate host in the candidate host set; screen the host whose resource utilization balance meets a preset range from the candidate host set to obtain a first candidate host subset; determine the relative saturation of resource utilization of each candidate host in the first candidate host subset based on the utilization rate of each resource of each candidate host in the first candidate host subset; the relative saturation of resource utilization is used to characterize whether each resource of the candidate host has reached the progress of being maximized; screen the host whose relative saturation of resource utilization meets a preset threshold from the first candidate host subset to determine the target host; Among them, when the determination unit determines the relative saturation of resource utilization of each candidate host machine in the first candidate host machine subset based on the utilization of each resource of each candidate host machine in the first candidate host machine subset, it is specifically used to: for the utilization of each resource of any candidate host machine in the first candidate host machine subset, perform the following operations respectively: determine the mean of the utilization of the CPU resources and the utilization of the memory resources of the candidate host; determine the relative saturation of resource utilization of the CPU resources of the candidate host based on the difference between the utilization of the CPU resources of the candidate host and the mean; and determine the relative saturation of resource utilization of the memory resources of the candidate host based on the difference between the utilization of the memory resources of the candidate host and the mean.

6. A computer device, characterized in that: The computer device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the host selection method according to any one of claims 1 to 4 when executed by the processor.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the host selection method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Dynamic virtual machine resource scheduling system and method oriented to cloud platform

    CN106970831A

  • Load balancing method and apparatus, computer-readable storage medium, and system

    WO2018014566A1