Nothing Special   »   [go: up one dir, main page]

CN115033340B - A host selection method and related device - Google Patents

A host selection method and related device Download PDF

Info

Publication number
CN115033340B
CN115033340B CN202210526616.7A CN202210526616A CN115033340B CN 115033340 B CN115033340 B CN 115033340B CN 202210526616 A CN202210526616 A CN 202210526616A CN 115033340 B CN115033340 B CN 115033340B
Authority
CN
China
Prior art keywords
host
candidate
resource
determining
utilization
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210526616.7A
Other languages
Chinese (zh)
Other versions
CN115033340A (en
Inventor
淦飞
张帆
刘智
闫维金
吴健
唐鸿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Cloud Technology Co Ltd
Original Assignee
China Telecom Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Cloud Technology Co Ltd filed Critical China Telecom Cloud Technology Co Ltd
Priority to CN202210526616.7A priority Critical patent/CN115033340B/en
Publication of CN115033340A publication Critical patent/CN115033340A/en
Application granted granted Critical
Publication of CN115033340B publication Critical patent/CN115033340B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

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.

Description

Host selection method and related device
Technical Field
The embodiment of the invention relates to the technical field of cloud computing, in particular to a host selection method and a related device.
Background
At present, with the continuous development of technology, a new technology, namely cloud computing, is developed in the information age after computers and the Internet. The core of cloud computing is to coordinate multiple computer resources together with the internet as a center, so as to provide a quick and safe cloud computing service and a data storage service.
Specifically, the Infrastructure service (IaaS) cloud platform uniformly manages virtualized resources such as computing, network, storage and the like, and a user can pay according to actual use requirements to apply for a corresponding virtual machine to the IaaS cloud platform so as to use the corresponding virtualized resources based on the virtual machine.
In the process of providing services for the IaaS cloud platform corresponding to the cloud company, the IaaS cloud platform needs to perform scheduling resource processing, for example, scheduling the virtual machine to an optimal host machine for operation, that is, when the host machine resource scheduling is realized, the host machine resource can be utilized to the maximum extent.
However, in the related art, the IaaS cloud platform performs static statistical calculation on the resources, and performs scheduling selection of the host based on the statistical calculation result. For example, the available resources of the host a are 8C16G, and a virtual machine 1 is created on the host a, and the resources of the virtual machine 1 are 4C8G, then the resources of the allocated 4C8G on the host a are recorded in the database corresponding to the IaaS cloud platform, so that, based on the existing host scheduling selection scheme, the host a can only reallocate one virtual machine identical to the resources of the virtual machine 1.
Obviously, based on the existing host scheduling selection scheme, when the sum of the memory of the virtual machine already allocated on the host machine a reaches the upper limit value of the host machine, the virtual machine cannot be allocated on the host machine a continuously, but in the actual use process, the host machine a may have a low memory utilization rate, so that the memory resources of the host machine a are wasted, and therefore, the technical problem of low resource utilization rate corresponding to the host machine exists in the related art.
Disclosure of Invention
The embodiment of the application provides a host selection method and a related device, which are used for improving the utilization rate of resources corresponding to a host.
In a first aspect, an embodiment of the present application provides a method for selecting a host, where the method includes:
receiving a scheduling selection request, wherein the scheduling selection request is determined based on a creation request for creating a virtual machine, and the creation request at least comprises a target virtual machine type;
Responding to the scheduling request, and acquiring the use parameter information of at least one host in a first time period;
and determining a target host from the at least one host based on the obtained usage parameter information and the target virtual machine type.
In one possible implementation manner, determining a target host from the at least one host based on the obtained usage parameter information and the target virtual machine type, includes:
The obtained using parameter information is subjected to prediction processing through a preset differential integration moving average autoregressive model, and the utilization rate of each resource corresponding to the at least one host machine is obtained;
Determining a target ordering rule based on the target virtual machine type, and ordering the at least one host machine based on the target ordering rule and the utilization rate of each resource corresponding to the at least one host machine to determine a candidate host machine set;
And determining a target host from the candidate host set.
In one possible implementation, determining a target ordering rule based on the target virtual machine type includes:
When the target virtual machine type is determined to be of a calculation type, determining the target ordering rule to order the at least one host machine according to the utilization rate of the CPU;
when the target virtual machine type is determined to be the memory type, determining the target ordering rule to order the at least one host machine according to the utilization rate of the memory;
and when the target virtual machine type is determined to be of a non-appointed type, determining the target ordering rule to order the at least one host machine according to the average value determined by the utilization rate of the CPU and the corresponding memory.
In one possible implementation, the ranking the at least one host to determine the candidate host set based on the target ranking rule and the utilization of each resource corresponding to the at least one host includes:
Determining a sequencing sequence number of the at least one host machine based on the target sequencing rule and the utilization rate of each resource corresponding to the at least one host machine;
And screening the host machines with the sequencing sequence numbers meeting preset conditions from the at least one host machine, and determining a candidate host machine set.
In one possible implementation, determining a target host from the candidate host set includes:
Determining the resource utilization balance degree 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 host machines with the resource utilization balance degree meeting a preset range from the candidate host machine set to obtain a first candidate host machine subset;
Determining the relative saturation of the 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, wherein the relative saturation of the resource utilization is used for representing whether each resource of the candidate hosts reaches the progress of being maximally utilized;
and screening host machines with the relative saturation of the resource utilization meeting a preset threshold from the first candidate host machine subset, and determining a target host machine.
In one possible implementation, determining the resource utilization balance of each candidate host in the candidate host set based on the utilization of each resource of each candidate host in the candidate host set includes:
For the utilization rate of each resource of any candidate host, the following operations are respectively executed:
Determining the average value of the utilization rate of the CPU resource and the utilization rate of the memory resource of the candidate host;
Determining a first processing value based on the utilization rate of the CPU resource of the candidate host and the average value, wherein the first processing value is used for representing the used degree of the CPU resource, and
Determining a second processing value based on the memory resources of the candidate host and the average value, wherein the second processing value is used for representing the used degree of the memory resources;
And correspondingly determining the resource utilization balance degree of the candidate host based on the first processing value and the second processing value.
In one possible implementation, determining the relative saturation of resource utilization of each candidate host in the first subset of candidate hosts based on each resource utilization of each candidate host in the first subset of candidate hosts includes:
the following operations are respectively executed for the utilization rate of each resource of the candidate host in any one of the first candidate host subsets:
Determining the average value of the utilization rate of the CPU resource and the utilization rate of the memory resource of the candidate host;
Determining the relative saturation of the CPU resource utilization of the candidate host based on the difference between the CPU resource utilization of the candidate host and the average value, and
And determining the relative saturation of the utilization of the memory resources of the candidate host based on the utilization rate of the memory resources of the candidate host and the difference value of the mean value.
In a second aspect, there is provided a selection device of a host, the device comprising:
the receiving unit is used for receiving a scheduling selection request, wherein the scheduling selection request is determined based on a creation request for creating the virtual machine, and the creation request at least comprises a target virtual machine type;
The acquisition unit is used for responding to the scheduling request and acquiring the use parameter information of at least one host in a first time period;
and the determining unit is used for determining a target host machine from the at least one host machine based on the obtained using parameter information and the target virtual machine type.
In a possible embodiment, the determining unit is configured to:
The obtained using parameter information is subjected to prediction processing through a preset differential integration moving average autoregressive model, and the utilization rate of each resource corresponding to the at least one host machine is obtained;
Determining a target ordering rule based on the target virtual machine type, and ordering the at least one host machine based on the target ordering rule and the utilization rate of each resource corresponding to the at least one host machine to determine a candidate host machine set;
And determining a target host from the candidate host set.
In a possible embodiment, the determining unit is configured to:
When the target virtual machine type is determined to be of a calculation type, determining the target ordering rule to order the at least one host machine according to the utilization rate of the CPU;
when the target virtual machine type is determined to be the memory type, determining the target ordering rule to order the at least one host machine according to the utilization rate of the memory;
and when the target virtual machine type is determined to be of a non-appointed type, determining the target ordering rule to order the at least one host machine according to the average value determined by the utilization rate of the CPU and the corresponding memory.
In a possible embodiment, the determining unit is configured to:
Determining a sequencing sequence number of the at least one host machine based on the target sequencing rule and the utilization rate of each resource corresponding to the at least one host machine;
And screening the host machines with the sequencing sequence numbers meeting preset conditions from the at least one host machine, and determining a candidate host machine set.
In a possible embodiment, the determining unit is configured to:
Determining the resource utilization balance degree 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 host machines with the resource utilization balance degree meeting a preset range from the candidate host machine set to obtain a first candidate host machine subset;
Determining the relative saturation of the 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, wherein the relative saturation of the resource utilization is used for representing whether each resource of the candidate hosts reaches the progress of being maximally utilized;
and screening host machines with the relative saturation of the resource utilization meeting a preset threshold from the first candidate host machine subset, and determining a target host machine.
In a possible embodiment, the determining unit is configured to:
For the utilization rate of each resource of any candidate host, the following operations are respectively executed:
Determining the average value of the utilization rate of the CPU resource and the utilization rate of the memory resource of the candidate host;
Determining a first processing value based on the utilization rate of the CPU resource of the candidate host and the average value, wherein the first processing value is used for representing the used degree of the CPU resource, and
Determining a second processing value based on the memory resources of the candidate host and the average value, wherein the second processing value is used for representing the used degree of the memory resources;
And correspondingly determining the resource utilization balance degree of the candidate host based on the first processing value and the second processing value.
In a possible embodiment, the determining unit is configured to:
the following operations are respectively executed for the utilization rate of each resource of the candidate host in any one of the first candidate host subsets:
Determining the average value of the utilization rate of the CPU resource and the utilization rate of the memory resource of the candidate host;
Determining the relative saturation of the CPU resource utilization of the candidate host based on the difference between the CPU resource utilization of the candidate host and the average value, and
And determining the relative saturation of the utilization of the memory resources of the candidate host based on the utilization rate of the memory resources of the candidate host and the difference value of the mean value.
In a third aspect, there is provided a computer device comprising:
a memory for storing program instructions;
And a processor for calling program instructions stored in the memory, and executing steps comprised in any one of the methods of the first aspect according to the obtained program instructions.
In a fourth aspect, there is provided a computer readable storage medium having stored thereon a computer program for execution by a processor to perform the steps comprised by any of the methods as in the first aspect.
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 a computer readable storage medium, the processor executing the computer instructions, causing the computer device to perform steps comprised of implementing any of the methods as in the first aspect.
The technical scheme provided by the embodiment of the application at least has the following beneficial effects:
in the embodiment of the application, a method for selecting a host machine and a related device are provided, because a scheduling selection request is received, the scheduling selection request at least comprises a target virtual machine type in a creation request determined based on the creation request for creating a virtual machine, so that the host machine corresponding to a control node can acquire usage parameter information of at least one host machine in a first time period, and thus, the target host machine can be determined from at least one host machine based on the acquired usage parameter information and the target virtual machine type, that is, in the embodiment of the application, the selected target host machine is comprehensively determined based on the dynamically acquired usage parameter information of the host machine and the target virtual machine type designated by a user, so that the utilization rate of corresponding resources of the host machine can be improved.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described, and it is apparent that the drawings in the following description are only embodiments of the present application, and other drawings may be obtained according to the provided drawings without inventive effort for those skilled in the art.
FIG. 1 is a schematic diagram of utilization of host CPU resources and memory resources in a resource pool in the prior art;
FIG. 2 is an alternative schematic diagram of an application scenario in an embodiment of the present application;
FIG. 3 is a schematic diagram of a cloud computing cluster system according to an embodiment of the present application;
FIG. 4 is a flowchart of a method for selecting a host according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a specific scenario of a method for selecting a host according to an embodiment of the present application;
FIG. 6 is a schematic diagram of utilization of CPU resources and memory resources of a host in an embodiment of the present application;
FIG. 7 is a schematic diagram of a configuration of a selection device of a host according to an embodiment of the present application;
fig. 8 is a schematic diagram of a hardware composition structure of a computer device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application. Embodiments of the application and features of the embodiments may be combined with one another arbitrarily without conflict. Also, while a logical order is depicted in the flowchart, in some cases, the steps depicted or described may be performed in a different order than presented herein.
In order to facilitate understanding of the technical solution provided by the embodiments of the present application, some key terms or processes related to the embodiments of the present application are explained here:
host-host can be understood as a server.
Virtual machine-a virtual machine can be understood as a resource inside a host machine.
Infrastructure as a service (IaaS) AS A SERVICE refers to a service mode in which IT Infrastructure is provided externally as a service through a network and charges for actual usage or occupancy of resources by users. In this service model, the user can pay on demand for resources as the case may be. That is, the user can determine the specification of the application resource, what operating system is installed, and the cloud company only needs to prepare for providing the service.
The central processing unit (central processing unit, CPU) is used as the operation and control core of the computer system and is the final execution unit for information processing and program running.
Memory (Memory) is an important component of a computer, also called an internal Memory and a main Memory, and is used for temporarily storing operation data in a CPU and data exchanged with an external Memory such as a hard disk.
For example, the virtual machine resources are 4C8G, and the virtual machine resources can be understood as 4 CPUs and 8G memories.
The computing service component (Nova) is a virtual server deployment and service computing module developed by NASA, and comprises a plurality of gadgets, wherein an interactive interface API SERVER (Nova-api) is arranged in the computing service component, an administrator can manage an internal infrastructure through the interface, can provide services for users through the interface and then send messages to a message queue to achieve the function of resource scheduling, and Compute Workers (Nova-computer) is used for processing and managing the life cycle of an instance. Receiving the request through the message queue and assuming the operation work, conductor (nova-connector) in charge of controlling the access authority of the database and avoiding the nova-computer from directly accessing the database, wherein the nova-scheduler is a component with the function of mapping nova-API call to Open Stack, and makes scheduling decision according to the physical distance, memory, load and the like of the CPU architecture and the available domain.
The differential integrated moving average autoregressive model (Autoregressive Integrated Moving Average model, ARIMA model) is one of the time series predictive analysis methods. In ARIMA (p, d, q), AR is "autoregressive", p is the number of autoregressive terms, MA is "moving average", q is the number of moving average terms, and d is the number of differences (order) made to make it a stationary sequence.
At present, in the process of providing services by the cloud company IaaS layer, an important loop is to schedule resources, namely how to schedule the virtual machine to an optimal host machine for running, that is, how to select the host machine, so that the host machine resources can be utilized to the maximum extent, and specifically, for example, the host machine with less memory occupation, less CPU usage, less network bandwidth occupation and less disk occupation is selected for scheduling.
However, the existing method for selecting the host machine by scheduling is implemented based on the result calculation of the static statistics of the resources, specifically, the scheme for selecting the host machine by scheduling based on the result of the static statistics means that if the resources on one host machine can only be matched and created with one virtual machine, the number of virtual machines created on the host machine is monitored no matter what the utilization rate of the resources is by the created virtual machine, so that the utilization rate of the resources actually created by the created virtual machine is ignored, and further the waste of the resources on the host machine may be caused, for example, the sum of the memories of the virtual machines already allocated on the host machine reaches the upper limit value of the host machine, so that the virtual machine cannot be continuously allocated on the host machine, but in the actual situation, the memory utilization rate of the host machine is very low, and the situation can occur in the same way, and obviously, the more obvious resource waste is caused by the continuous expansion of the cloud environment.
For example, if the allocatable resource is 8C16G host W, a virtual machine with a specification of 4C8G has been created, the allocated resource of 4C8G on host W may be recorded in the database, that is, host W may only reallocate a virtual machine with a specification of 4C 8G. Obviously, the static resources on the host W cannot be continuously allocated, but in the actual implementation process, the utilization rate of the resources such as the CPU and the memory of the host is relatively low.
In order to better utilize the resources of the hosts, it is desirable to allocate multiple virtual machines on one host, but once many hosts allocate virtual machines, other problems are introduced, for example, when some virtual machines have high loads, the operation of other virtual machines with low loads can be affected, so that the use experience of users applying for resources is reduced, or the virtual machines corresponding to the users cannot be used.
Referring to fig. 1, fig. 1 shows an average utilization ratio of a CPU and a memory on a host in a corresponding cloud computing cluster according to a scheme of selecting a host based on static statistics by the inventor. The abscissa in fig. 1 is used to characterize the computing node identification (Identity document, ID). Specifically, the compute node ID represents the number of the host running the virtual machine, i.e., the host is referred to as the compute node. And, the ordinate in FIG. 1 is used to characterize the average utilization of CPU, memory on the compute node. Wherein, the open circles represent the average utilization of the CPU, and the filled circles represent the average utilization of the memory. The two average utilization rates are average values obtained by periodically collecting the utilization rates of the CPU and the memory on the computing node. It is apparent from fig. 1 that the CPU resource utilization of each host is low, and is maintained at about 15%, and the memory resource utilization of each host is also low, and is maintained at about 50%.
Therefore, the technical problem of low resource utilization rate corresponding to the host exists in the related art.
In view of this, in the embodiment of the present application, a new scheme for selecting a host is provided, in which the target host is not calculated and determined based on the static statistics result of the host, but the user's willingness to apply for resources is used as a guide, the statistical prediction of the host resource utilization rate is used as a method, and the selected host, that is, the target host, is comprehensively determined by combining the resource utilization balance degree and the resource utilization relative saturation degree of the host. Specifically, the type of the target virtual machine in the scheduling selection request may be received, so as to determine a desire of the user to apply for resources, then, usage parameter information of at least one host machine in a first period of time may be obtained, prediction may be performed based on the obtained usage parameter information, and a resource utilization balance degree and a resource utilization relative saturation degree of at least one host machine may be determined, so that the target host machine is selected based on the result determined by the foregoing process. Therefore, the scheme provided by the application can maximally utilize the host machine resources on the basis of reserving the existing scheduling algorithm.
After the design idea of the embodiment of the present application is introduced, some simple descriptions are made below for application scenarios applicable to the technical solution of the embodiment of the present application, and it should be noted that the application scenarios described below are only used for illustrating the embodiment of the present application and are not limiting. In the specific implementation process, the technical scheme provided by the embodiment of the application can be flexibly applied according to actual needs.
The scheme provided by the embodiment of the application can be applied to the selection scenes of the hosts corresponding to all cloud platforms. For example, company 1, to which a cloud computing cluster corresponding to a cloud platform belongs, provides a user a with a scene of a host machine corresponding to a virtual machine, and the like.
Referring to fig. 2, a schematic view of a scenario provided in an embodiment of the present application may include a first host 201 corresponding to 1 control node and a second host 202 corresponding to a plurality of computing nodes. In the actual implementation process, there may be a plurality of second hosts 202, that is, the host 202-1, the second host 202-2, the second host 202-n, and n are positive integers.
In the embodiment of the present application, the first host and the second host are only used for distinguishing different hosts, i.e. "first", "second", etc. are used for distinguishing similar objects, and are not necessarily used for describing a specific order or precedence. It is to be understood that the images so used may be interchanged where appropriate such that the embodiments of the present disclosure described herein may be implemented in sequences other than those illustrated or described herein.
It should be noted that, in the embodiment of the present application, the hosts, for example, the first host and the second host, may be independent physical servers, may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs (Content Delivery Network, content distribution networks), and basic cloud computing services such as big data and artificial intelligent platforms, but are not limited thereto.
In the embodiment of the present application, the first host 201 corresponding to the control node may determine a host to be filtered, where the host to be filtered is determined, for example, from a cloud computer cluster, and the present application is not limited thereto. And, the nova-api in the first host 201 sends a request to the nova-connector, the request carries a user-specifiable virtual machine type, and then the ova-connector requests the nova-scheduler to schedule, so that the nova-scheduler requests the monitoring service, acquires a data sequence of the memory and the CPU of the second host 202 in a period of time in the past, and uses the data sequence to predict the R value by ARIMA modeling, and then the nova-scheduler calculates the virtual machine host meeting the condition, namely, determines the target host. Specifically, the judging mode of meeting the condition can be to add a filtering algorithm for balancing the host machine resources and a type algorithm matched with the user application virtual machine, and the existing characteristic filtering algorithm is reserved. Further, a virtual machine creation request can be issued to the determined target host machine, and creation of the virtual machine is achieved.
Wherein, the first host 201 and the second host 202, and each second host 202 may be directly or indirectly connected through one or more networks 203. The network 203 may be a wired network, or may be a Wireless network, for example, a mobile cellular network, or may be a Wireless-Fidelity (WIFI) network, or may be other possible networks, which are not limited in this embodiment of the present application.
Of course, the method provided by the embodiment of the present application is not limited to the application scenario shown in fig. 2, but may be used in other possible application scenarios, and the embodiment of the present application is not limited. The functions that can be implemented by each device in the application scenario shown in fig. 2 will be described together in the following method embodiments, which are not described in detail herein.
Referring to fig. 3, an embodiment of the present application provides a cloud computing cluster system, which includes a first host 301 corresponding to a control node, a third host 303 corresponding to a network node, a second host 302 corresponding to a computing node, and a monitoring service 304. The first host 301 corresponding to the control node may be understood as the first host 201 in fig. 2, and the second host 302 may be understood as the second host 202 in fig. 2.
Throughout the cloud computing cluster, hosts may be categorized, for example, by function, into control nodes (for receiving API requests, scheduling, etc.), computing nodes (for running virtual machines), network nodes (networks for managing virtual machines, such as subnets, IP, ports, etc.), and the like.
Referring to fig. 3, a first host 301 may interact with at least one second host 302, and a monitoring service 304. The specific interaction process is described in detail later, and is not described here again. Specifically, the cloud computing cluster in fig. 3 may be, for example, a system formed by all devices included in the application scenario in fig. 2, which is not described here.
In order to further explain the technical solution provided by the embodiments of the present application, the following details are described with reference to the accompanying drawings and the detailed description. Although embodiments of the present application provide the method operational steps shown in the following embodiments or figures, more or fewer operational steps may be included in the method, either on a routine or non-inventive basis. In steps where there is logically no necessary causal relationship, the execution order of the steps is not limited to the execution order provided by the embodiments of the present application. The methods may be performed sequentially or in parallel as shown in the embodiments or the drawings when the actual processing or the apparatus is performed.
Referring to fig. 4, an embodiment of the present application provides a flowchart of a method for selecting a host. As shown in fig. 4, the flow of the method may be performed by a computer device, which may be the first host shown in fig. 2 or fig. 3. The specific flow is as follows:
Step 401, receiving a scheduling selection request, wherein the scheduling selection request is determined based on a creation request for creating a virtual machine, and the creation request at least comprises a target virtual machine type.
In the embodiment of the application, a nova-api component in a first host corresponding to a computer device, i.e. a control node, may send a request to a nova-connector, where the request carries a virtual machine type specified by a user, i.e. a target virtual machine type. Specifically, the virtual machine type may be any of a computing type virtual machine type, a memory type virtual machine type or a non-specified type, which is not limited in the present application.
In a specific implementation process, a user can interact with a processing device corresponding to the cloud computing cluster through the corresponding electronic device, so that the processing device can send the obtained specified virtual machine type to a first host in a creation request of a virtual machine creation request sent from the electronic device, and further a nova-api component in the first host can determine the type of the virtual machine specified by the user.
Step 402, obtaining usage parameter information of at least one host in a first time period in response to a scheduling request.
In the embodiment of the application, a nova-scheduler component in the first host machine can respond to the scheduling request, and then sends an acquisition request to a monitoring service corresponding to the cloud computing cluster, wherein the acquisition request is used for acquiring the usage parameter information of at least one host machine in a first time period. The at least one host may be understood as all hosts corresponding to all computing nodes in the cloud computing cluster, that is, the at least one host in the embodiment of the present application is all hosts running virtual machines in the cloud computing cluster.
In the embodiment of the application, the monitoring service is used for monitoring the running states of the virtual machines deployed in all hosts corresponding to all computing nodes in the cloud computing cluster, so that the monitoring service can obtain the use parameter information of at least one host machine in a first time period and feed back the use parameter information to the first host machine, and the first host machine can obtain the use parameter information of at least one host machine in the first time period based on the feedback of the monitoring service.
In the embodiment of the present application, the first time period may be correspondingly determined based on the actual implementation situation, for example, the first time period is 10 seconds before the current time, and when the current time is 9×34×10 seconds, the first time period may be 9×34×00×00×34×10×34×10 seconds, which is not limited in the present application. In addition, in the embodiment of the application, the usage parameter information of the host corresponding to the first time period can be understood as the information of the virtual machine usage resource running on the host. For example, the usage parameter information may include a memory of the host, a data sequence of the CPU, during the first period of time.
Therefore, in the embodiment of the application, the data of the resources of the host machine in each first time period is not determined based on the static statistics, so that the actual use condition of the resources of the host machine can be dynamically known, and a good implementation basis is provided for the selection of the host machine corresponding to the subsequent computing node.
Step 403, determining a target host machine from at least one host machine based on the obtained usage parameter information and the target virtual machine type.
In the embodiment of the present application, the first host corresponding to the control node may determine the target host by adopting, but not limited to, the following steps:
And A, predicting the obtained use parameter information by a preset differential integration moving average autoregressive model to obtain the utilization rate of each resource corresponding to at least one host machine.
In the embodiment of the application, in order to eliminate the influence of unstable resource utilization monitoring values and the influence caused by burrs of monitoring data, an ARIMA (p, d, q) model is adopted to estimate the current CPU and memory use of the host.
Specifically, the ARIMA (p, d, q) model is used to analyze time series data, learn a time-varying pattern from historical data, and then use this law to predict the future. The model is subjected to time sequence acquisition, time sequence pretreatment, model identification, model scaling, parameter estimation and model verification to obtain an estimated value.
In the embodiment of the application, since the monitoring values of the CPU and the memory are time series data, the data can be subjected to ARIMA (p, d, q) modeling calculation to obtain the predicted value. Specifically, in the application, a threshold Rmax is set, the R values of the CPU and the memory of the host are calculated through an ARIMA (p, d, q) model, and the host with the R values smaller than Rmax is selected when the host is screened, so that the occurrence of slow running or memory overflow (OOM) of the host caused by overload of the host is prevented.
And B, determining a target ordering rule based on the type of the target virtual machine, and ordering at least one host machine based on the target ordering rule and the utilization rate of each resource corresponding to the at least one host machine so as to determine a candidate host machine set.
In the embodiment of the application, when the type of the target virtual machine is determined to be a calculation type, the target ordering rule is determined to order at least one host machine according to the utilization rate of the CPU, when the type of the target virtual machine is determined to be a memory type, the target ordering rule is determined to order at least one host machine according to the utilization rate of the memory, and when the type of the target virtual machine is determined to be a non-appointed type, the target ordering rule is determined to order at least one host machine according to the average value determined by the CPU and the corresponding utilization rate of the memory.
Therefore, in the embodiment of the application, corresponding target ordering rules are provided for different target virtual machine types, so that the requirements of user application resources can be met more accurately, various embodiments are provided, the ordering influence caused by the target ordering rules based on indiscriminate words is avoided, and the screening accuracy of the host machines corresponding to the computing nodes is further improved.
In the embodiment of the application, the sequencing serial number of at least one host machine is determined based on the target sequencing rule and the utilization rate of each resource corresponding to the at least one host machine, and the host machines with the sequencing serial numbers meeting the preset conditions are screened from the at least one host machine to determine a candidate host machine set. The preset conditions can screen the first N of the sequence numbers from small to large, wherein N is a positive integer, and the value of N can be correspondingly determined based on actual implementation, and the application is not limited to the method.
For example, assuming that the target virtual machine type is a computing type, the 5 hosts are ranked based on the utilization ratio of the CPUs corresponding to the 5 hosts, and 5 hosts, namely, host a, host B, host C, host D and host E, are determined, and the ranking numbers corresponding to the 5 hosts are 3, 2,1, 4 and 5, respectively, that is, the utilization ratio of the CPU of host C is the largest, and the utilization ratio of the CPU of host E is the smallest, so that host a, host B and host C can be screened out as candidate hosts based on preset screening conditions.
And C, determining the target host from the candidate host set.
In the embodiment of the present application, from the candidate host set, the determining the target host may include, but is not limited to, the following steps:
And a step a of determining the resource utilization balance degree 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.
In the embodiment of the application, as the resources of each virtual machine on the host machine are used differently, the residual resources of each host machine are changed continuously, and in order to avoid excessive or less residual resources, the use balance among the resources of each host machine needs to be kept as much as possible. In view of this, in the embodiment of the present application, the resource utilization balance of each candidate host in the candidate host set may be determined.
In the embodiment of the application, the method and the device respectively execute the following operations of determining the average value of the utilization rate of the CPU resource and the utilization rate of the memory resource of any candidate host, determining a first processing value based on the utilization rate and the average value of the CPU resource of the candidate host, determining a second processing value based on the memory resource and the average value of the candidate host, correspondingly determining the resource utilization balance of the candidate host based on the first processing value and the second processing value.
Specifically, the following formula one may be used to determine the resource utilization balance of the candidate hosts:
Wherein u j cpu is used for representing the utilization rate of CPU resources of the candidate host, u j mem is used for representing the utilization rate of memory resources of the candidate host, u j represents the average value of the two resource utilization rates, and the value range of L j is [0,1].
It is apparent that in a specific implementation, the greater the value of L j of the candidate hosts, the more uniform the resource utilization of the candidate hosts may be determined, and the lesser the value of L j of the candidate hosts, the more unbalanced the resource utilization of the candidate hosts may be determined.
And b, screening host machines with the resource utilization balance degree meeting a preset range from the candidate host machine set to obtain a first candidate host machine subset.
Specifically, the preset range may be correspondingly determined based on actual implementation, which is not limited in the embodiment of the present application.
And c, determining the relative saturation of the 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, wherein the relative saturation of the resource utilization is used for representing whether each resource of the candidate hosts reaches the progress of being utilized to the maximum extent.
In the embodiment of the application, the following operations are respectively executed for the utilization rate of each resource of the candidate hosts in any first candidate host subset:
The method comprises the steps of determining the average value of the utilization rate of CPU resources and the utilization rate of memory resources of a candidate host, determining the relative saturation of the utilization rate of the CPU resources of the candidate host based on the difference value of the utilization rate of the CPU resources of the candidate host and the average value, and determining the relative saturation of the utilization rate of the memory resources of the candidate host based on the difference value of the utilization rate of the memory resources of the candidate host and the average value.
Specifically, the following formula two may be used to determine the relative saturation of resource utilization of the candidate hosts in the first candidate host subset:
Wherein u j cpu is used for representing the utilization rate of the CPU resource of the candidate host, u j mem is used for representing the utilization rate of the memory resource of the candidate host, u j is used for representing the average value of the two resource utilization rates, d j is used for representing the relative saturation of any resource utilization, d j can be a negative number or a positive number, namely d j mem is used for representing the relative saturation of the resource utilization of the memory resource of the candidate host, and d j cpu is used for representing the relative saturation of the resource utilization of the CPU resource of the candidate host.
In embodiments of the present application, a larger value of d j indicates that the resource utilization of the resource is relatively saturated, and a smaller value indicates that the resource utilization is relatively unsaturated. Specifically, if the user designates the virtual machine type as a computing type when applying for the virtual machine, a host machine with a smaller d j cpu value is selected during scheduling, and similarly if the user designates the virtual machine type as a memory type when applying for the virtual machine, a host machine with a smaller d j mem value is selected during scheduling.
And d, screening host machines with the relative saturation of the resource utilization meeting a preset threshold value from the first candidate host machine subset, and determining a target host machine.
Specifically, the preset threshold may be determined by the type of the target virtual machine and the dj value of each candidate host, that is, the preset threshold in the present application may be updated correspondingly based on actual implementation, which is not limited in the embodiment of the present application.
In the embodiment of the present application, in order to better introduce the method for selecting a host provided by the present application, a process of creating a virtual machine is described below as an example.
Referring to fig. 5, in the embodiment of the present application, a nova-api in a first host corresponding to a control node sends a request to a nova-connector, where the request carries a user-specifiable virtual machine type, such as a computing type. Then, the nova-connector in the first host corresponding to the control node requests the nova-scheduler to schedule. Further, a nova-scheduler in the first host corresponding to the control node requests the monitoring service, a data sequence of a memory and a CPU of the second host corresponding to each computing node in the first time period is obtained, and the data sequence is used for ARIMA (p, d, q) modeling prediction R value.
Specifically, the monitoring service may feed back the memory and the data sequence of the CPU of the second host corresponding to each computing node in the first period to the nova-scheduler in the first host corresponding to the control node. Further, the nova-scheduler in the first host corresponding to the control node can calculate the virtual machine host meeting the conditions, and specifically, the conditions corresponding to the nova-scheduler in the first host corresponding to the control node are determined by adding a filtering algorithm based on the resource balance degree of the host and a matching user application virtual machine type algorithm on the basis of keeping the existing characteristic filtering algorithm. And finally, the nova-schedule in the first host corresponding to the control node issues a virtual machine creating request to the determined target host, so that the processing of the virtual machine creating request of the user is realized.
In a specific implementation, the existing characteristic filtering algorithm may be understood as a number of selective host filtering algorithms contained in the nova-scheduler in the first host corresponding to the control node. Wherein, the actual application is more than 20, each filtering algorithm is executed, and the most suitable host is selected. For example, if the filtering algorithm is AGGREGATE INSTANCE Extra SPECS FILTER, that is, by creating a virtual machine-designated flag (similar tags are designated therein), an aggregation (host aggregation) with the same tag is selected, and multiple hosts are included under the aggregation.
In an embodiment of the present application, the process of determining the target host may employ, but is not limited to, the following pseudo-code representation:
1:H={h1,h2,...,hy}
2:use ARIMA(p,d,q)and get R.R<=Rmax.H→H`
3:sortAscendingResourceUsage(H`)*percentThreshold.H`→H``
4:sortAscendingByL(H``).H``→H```
5:find min(dj)in H```*percentThreshold as h
6:return h。
Specifically, the pseudo code can be understood as that in step 1, the host to be filtered is input, namely, the host to be selected is determined. And 2, predicting the utilization rate value R of each current resource according to an ARIMA (p, d, q) model, and filtering and screening Rmax. And step 3, carrying out ascending arrangement on H' according to the R value (sortAscendingResourceUsage) obtained in the step 2, wherein Resource corresponds to the type of the virtual machine applied by the user, and percentThreshold is a configurable percentage. And step 4, carrying out ascending arrangement according to the resource utilization balance degree of the resources. And step 5, finding out the host with the minimum relative saturation of the application resources, wherein percentThreshold is a configurable percentage. And 6, returning to the screened target host.
Therefore, in the embodiment of the application, the current values of the host CPU and the memory are estimated by adopting an ARIMA (p, d, q) model, the influence of unstable parameter information, namely the resource utilization monitoring value obtained based on the monitoring service, is eliminated, and the influence of burr data is eliminated, so that the judgment can be more accurately made. In addition, the application can accurately transmit the virtual machine to the corresponding host machine according to the type of the virtual machine applied by the user, and also screens the resource balance degree and the relative saturation degree of the host machine, and selects the target host machine by integrally combining the consideration, thereby improving the resource utilization rate of the host machine. In addition, compared with the scheme of scheduling selection based on static statistics in the prior art, the method and the device for scheduling selection based on the dynamic data are more beneficial to the utilization of the host resources by judging based on the dynamic data obtained by the monitoring service, so that the resource utilization rate of the host is improved.
Referring to fig. 6, a schematic diagram of the determined CPU utilization and memory utilization of the host according to the scheme provided by the present application is shown. Obviously, the host is screened by adopting the scheme provided by the application, the CPU utilization rate of the host is improved after the host runs for a period of time, and the host tends to approach the memory utilization rate.
Based on the same inventive concept, the embodiment of the application also provides a host machine selecting device. As shown in fig. 7, which is a schematic structural diagram of a selection device 700 of a host, may include:
A receiving unit 701, configured to 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 includes at least a target virtual machine type;
An obtaining unit 702, configured to obtain usage parameter information of at least one host in a first period of time in response to the scheduling request;
a determining unit 703, configured to determine a target host from the at least one host based on the obtained usage parameter information and the target virtual machine type.
In a possible implementation manner, the determining unit 703 is configured to:
The obtained using parameter information is subjected to prediction processing through a preset differential integration moving average autoregressive model, and the utilization rate of each resource corresponding to the at least one host machine is obtained;
Determining a target ordering rule based on the target virtual machine type, and ordering the at least one host machine based on the target ordering rule and the utilization rate of each resource corresponding to the at least one host machine to determine a candidate host machine set;
And determining a target host from the candidate host set.
In a possible implementation manner, the determining unit 703 is configured to:
When the target virtual machine type is determined to be of a calculation type, determining the target ordering rule to order the at least one host machine according to the utilization rate of the CPU;
when the target virtual machine type is determined to be the memory type, determining the target ordering rule to order the at least one host machine according to the utilization rate of the memory;
and when the target virtual machine type is determined to be of a non-appointed type, determining the target ordering rule to order the at least one host machine according to the average value determined by the utilization rate of the CPU and the corresponding memory.
In a possible implementation manner, the determining unit 703 is configured to:
Determining a sequencing sequence number of the at least one host machine based on the target sequencing rule and the utilization rate of each resource corresponding to the at least one host machine;
And screening the host machines with the sequencing sequence numbers meeting preset conditions from the at least one host machine, and determining a candidate host machine set.
In a possible implementation manner, the determining unit 703 is configured to:
Determining the resource utilization balance degree 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 host machines with the resource utilization balance degree meeting a preset range from the candidate host machine set to obtain a first candidate host machine subset;
Determining the relative saturation of the 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, wherein the relative saturation of the resource utilization is used for representing whether each resource of the candidate hosts reaches the progress of being maximally utilized;
and screening host machines with the relative saturation of the resource utilization meeting a preset threshold from the first candidate host machine subset, and determining a target host machine.
In a possible implementation manner, the determining unit 703 is configured to:
For the utilization rate of each resource of any candidate host, the following operations are respectively executed:
Determining the average value of the utilization rate of the CPU resource and the utilization rate of the memory resource of the candidate host;
Determining a first processing value based on the utilization rate of the CPU resource of the candidate host and the average value, wherein the first processing value is used for representing the used degree of the CPU resource, and
Determining a second processing value based on the memory resources of the candidate host and the average value, wherein the second processing value is used for representing the used degree of the memory resources;
And correspondingly determining the resource utilization balance degree of the candidate host based on the first processing value and the second processing value.
In a possible implementation manner, the determining unit 703 is configured to:
the following operations are respectively executed for the utilization rate of each resource of the candidate host in any one of the first candidate host subsets:
Determining the average value of the utilization rate of the CPU resource and the utilization rate of the memory resource of the candidate host;
Determining the relative saturation of the CPU resource utilization of the candidate host based on the difference between the CPU resource utilization of the candidate host and the average value, and
And determining the relative saturation of the utilization of the memory resources of the candidate host based on the utilization rate of the memory resources of the candidate host and the difference value of the mean value.
For convenience of description, the above parts are described as being functionally divided into modules (or units) respectively. Of course, the functions of each module (or unit) may be implemented in the same piece or pieces of software or hardware when implementing the present application.
Having described the method and apparatus for selecting a host according to an exemplary embodiment of the present application, next, a computer device according to another exemplary embodiment of the present application is described.
Those skilled in the art will appreciate that the various aspects of the application may be implemented as a system, method, or program product. Accordingly, aspects of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects that may be referred to herein collectively as a "circuit," module "or" system.
Based on the same inventive concept as the above-mentioned method embodiment, a computer device is also provided in the embodiment of the present application. In one embodiment, the computer device may be a server, such as the server shown in FIG. 2. In this embodiment, the structure of the computer device may be shown in fig. 8, and the embodiment of the present application further provides a computer device, as shown in fig. 8, where 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 embodiment of the present application is not limited to a specific connection medium between the processor 801 and the memory 802, and in fig. 8, the connection between the processor 801 and the memory 802 is taken as an example, and in fig. 8, the bus 800 is shown in a bold line, and the connection manner between other components is merely illustrative, but not limited to. Bus 800 may be divided into an address bus, a data bus, a control bus, etc., and is represented by only one thick line in fig. 8 for ease of illustration, but does not represent only one bus or one type of bus.
In the embodiment of the present application, the memory 802 stores instructions executable by the at least one processor 801, and the at least one processor 801 can execute the steps included in the foregoing host selection method by executing the instructions stored in the memory 802.
The processor 801 is a control center of the computer device, and may be connected to various parts of the entire fault detection device by various interfaces and lines, and may implement various functions of the computer device by executing or executing instructions stored in the memory 802 and invoking data stored in the memory 802. Alternatively, the processor 801 may include one or more processing units, and the processor 801 may integrate an application processor and a modem processor, wherein the processor 801 primarily processes operating systems, user interfaces, application programs, and the like, and the modem processor primarily processes wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 801. In some embodiments, processor 801 and memory 802 may be implemented on the same chip, or they may be implemented separately on separate chips in some embodiments.
The processor 801 may be a general purpose processor such as a Central Processing Unit (CPU), digital signal processor, application specific integrated circuit, field programmable gate array or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, and may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the application. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in the processor for execution.
Memory 802, as a non-volatile computer-readable storage medium, may 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, which may include, for example, flash Memory, hard disk, multimedia card, card Memory, random access Memory (Random Access Memory, RAM), static random access Memory (Static Random Access Memory, SRAM), programmable Read-Only Memory (Programmable Read Only Memory, PROM), read-Only Memory (ROM), charged erasable programmable Read-Only Memory (ELECTRICALLY ERASABLE PROGRAMMABLE READ-Only Memory, EEPROM), magnetic Memory, magnetic disk, optical disk, and the like. Memory 802 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 802 of embodiments of the present application may also be circuitry or any other device capable of performing storage functions for storing program instructions and/or data.
The communication interface 803 is a transmission interface that can be used for communication, and data can be received or transmitted through the communication interface 803.
In addition, the computer device includes a basic input/output system (I/O system) 804, a mass storage device 808 for storing an operating system 805, application programs 806, and other program modules 807, which facilitate the transfer of information between the various devices within the computer device.
The basic input/output system 804 includes a display 809 for displaying information and an input device 810, such as a mouse, keyboard, etc., for user input of information. Wherein a display 809 and an input device 810 are coupled to the processor 801 via a basic input/output system 804 coupled 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 number of other devices, such as a keyboard, mouse, or electronic stylus, among others. Similarly, the input-output controller also provides output to a display screen, a printer, or other type of output device.
In particular, mass storage device 808 is coupled to processor 801 through a mass storage controller (not shown) coupled to system bus 800. Wherein the mass storage device 808 and its associated computer-readable media provide non-volatile storage for the server package. That is, the mass storage device 808 may include a computer readable medium (not shown) such as a hard disk or CD-ROM drive.
The computer device may also operate in accordance with various embodiments of the application, through a network, such as the Internet, to remote computers connected to the network. I.e., the computer device may be connected to the network 811 through a communication interface 803 coupled to the system bus 800, or may be connected to other types of networks or remote computer systems (not shown) using the communication interface 803.
In some possible embodiments, aspects of the method for selecting a host provided by the present application may also be implemented in the form of a program product, which includes program code for causing a computer device to perform the steps in the method for selecting a host according to the various exemplary embodiments of the present application described above when the program product is run on a computer device, for example, the computer device may perform the steps as shown in fig. 4.
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 can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of a readable storage medium include an electrical connection having 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product of embodiments of the present application may employ a portable compact disc read only memory (CD-ROM) and include program code and may run on a computing device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with a command execution system, apparatus, or device.
The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with a command execution system, apparatus, or device.
Program code embodied on a 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.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's equipment, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (7)

1. A method of selecting a host, the method comprising:
receiving a scheduling selection request, wherein the scheduling selection request is determined based on a creation request for creating a virtual machine, and the creation request at least comprises a target virtual machine type;
responding to the scheduling selection request, and acquiring the use parameter information of at least one host in a first time period;
determining a target host from the at least one host based on the obtained respective usage parameter information and the target virtual machine type;
The method comprises the steps of obtaining each piece of usage parameter information, obtaining a target virtual machine type, determining a target host machine from at least one host machine based on the obtained usage parameter information and the target virtual machine type, wherein the method comprises the steps of carrying out prediction processing on the obtained usage parameter information through a preset difference integration moving average autoregressive model to obtain the utilization rate of each resource corresponding to the at least one host machine;
The method comprises the steps of determining target hosts from a candidate host set, screening hosts with the resource utilization balance meeting a preset range from the candidate host set to obtain a first candidate host subset, determining the resource utilization relative saturation 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, wherein the resource utilization relative saturation is used for representing whether each resource of the candidate hosts reaches the progress of being maximally utilized or not, screening hosts with the resource utilization relative saturation meeting a preset threshold from the first candidate host subset, and determining the target host;
The method comprises the steps of determining the average value of the utilization rate of CPU resources of the candidate hosts and the utilization rate of memory resources of the candidate hosts, determining the relative saturation of the utilization rate of the resources of the CPU resources of the candidate hosts based on the utilization rate of the resources of the candidate hosts in the first candidate host subset, and determining the relative saturation of the utilization rate of the resources of the CPU resources of the candidate hosts based on the difference value of the utilization rate of the CPU resources of the candidate hosts and the average value.
2. The method of claim 1, wherein determining a target ordering rule based on the target virtual machine type comprises:
When the target virtual machine type is determined to be of a calculation type, determining the target ordering rule to order the at least one host machine according to the utilization rate of the CPU;
when the target virtual machine type is determined to be the memory type, determining the target ordering rule to order the at least one host machine according to the utilization rate of the memory;
and when the target virtual machine type is determined to be of a non-appointed type, determining the target ordering rule to order the at least one host machine according to the average value determined by the utilization rate of the CPU and the corresponding memory.
3. The method of claim 2, wherein ranking the at least one host to determine a candidate host set based on the target ranking rule and the utilization of resources corresponding to the at least one host comprises:
Determining a sequencing sequence number of the at least one host machine based on the target sequencing rule and the utilization rate of each resource corresponding to the at least one host machine;
And screening the host machines with the sequencing sequence numbers meeting preset conditions from the at least one host machine, and determining a candidate host machine set.
4. The method of claim 1, wherein determining a resource utilization balance for each candidate host in the set of candidate hosts based on utilization of resources for each candidate host in the set of candidate hosts comprises:
For the utilization rate of each resource of any candidate host, the following operations are respectively executed:
Determining the average value of the utilization rate of the CPU resource and the utilization rate of the memory resource of the candidate host;
Determining a first processing value based on the utilization rate of the CPU resource of the candidate host and the average value, wherein the first processing value is used for representing the used degree of the CPU resource, and
Determining a second processing value based on the memory resources of the candidate host and the average value, wherein the second processing value is used for representing the used degree of the memory resources;
And correspondingly determining the resource utilization balance degree of the candidate host based on the first processing value and the second processing value.
5. A host selection apparatus, the apparatus comprising:
the receiving unit is used for receiving a scheduling selection request, wherein the scheduling selection request is determined based on a creation request for creating the virtual machine, and the creation request at least comprises a target virtual machine type;
the acquisition unit is used for responding to the scheduling selection request and acquiring the use parameter information of at least one host in a first time period;
A determining unit configured to determine a target host from the at least one host based on the obtained respective usage parameter information and the target virtual machine type;
The determining unit is specifically configured to, when determining a target host from the at least one host based on the obtained usage parameter information and the target virtual machine type, predict the obtained usage parameter information by using a preset differential integration moving average autoregressive model, and obtain a utilization rate of each resource corresponding to the at least one host; determining a target sorting rule based on the target virtual machine type, 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 candidate host machine set;
The determining unit is specifically used for determining the resource utilization balance degree 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 when determining the target host from the candidate host set, screening hosts with the resource utilization balance degree meeting a preset range from the candidate host set to obtain a first candidate host subset, determining the resource utilization relative saturation degree 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, wherein the resource utilization relative saturation degree is used for representing the progress of whether each resource of each candidate host reaches the maximum utilization limit;
The determining unit is specifically configured to, when determining the relative saturation of the resource utilization of each candidate host in the first candidate host subset based on the utilization ratio of each resource of each candidate host in the first candidate host subset, determine the average value of the utilization ratio of the CPU resource and the utilization ratio of the memory resource of each candidate host in any one of the first candidate host subset, determine the relative saturation of the resource utilization of the CPU resource of the candidate host based on the difference between the utilization ratio of the CPU resource of the candidate host and the average value, and determine the relative saturation of the resource utilization of the memory resource of the candidate host based on the difference between the utilization ratio of the memory resource of the candidate host and the average value.
6. Computer device, characterized in that it comprises a memory, a processor and a computer program stored on the memory and executable on the processor, which when executed by the processor realizes the steps of the method for selecting a host according to any of claims 1 to 4.
7. A computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the method of selecting a host according to any of claims 1 to 4.
CN202210526616.7A 2022-05-16 2022-05-16 A host selection method and related device Active CN115033340B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210526616.7A CN115033340B (en) 2022-05-16 2022-05-16 A host selection method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210526616.7A CN115033340B (en) 2022-05-16 2022-05-16 A host selection method and related device

Publications (2)

Publication Number Publication Date
CN115033340A CN115033340A (en) 2022-09-09
CN115033340B true CN115033340B (en) 2025-02-11

Family

ID=83121861

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210526616.7A Active CN115033340B (en) 2022-05-16 2022-05-16 A host selection method and related device

Country Status (1)

Country Link
CN (1) CN115033340B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115495249A (en) * 2022-10-31 2022-12-20 上海楷领科技有限公司 Task execution method of cloud cluster
CN115904717B (en) * 2022-11-30 2023-11-17 湖南长银五八消费金融股份有限公司 Application system deployment method and device in cloud platform and computer equipment
CN115878329A (en) * 2023-02-02 2023-03-31 天翼云科技有限公司 Host resource scheduling method and device, electronic equipment and storage medium
CN116881001B (en) * 2023-07-04 2024-03-01 中科驭数(北京)科技有限公司 Method, device, equipment and medium for managing and controlling cloud platform of multiple DPU hosts
CN117971381A (en) * 2023-12-13 2024-05-03 天翼云科技有限公司 NUMA Granularity Defragmentation Method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106970831A (en) * 2017-05-15 2017-07-21 金航数码科技有限责任公司 The resources of virtual machine dynamic scheduling system and method for a kind of facing cloud platform
WO2018014566A1 (en) * 2016-07-22 2018-01-25 平安科技(深圳)有限公司 Load balancing method and apparatus, computer-readable storage medium, and system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101937357B (en) * 2009-07-01 2013-11-06 华为技术有限公司 Virtual machine migration decision-making method, device and system
US9569277B1 (en) * 2016-01-29 2017-02-14 International Business Machines Corporation Rebalancing virtual resources for virtual machines based on multiple resource capacities
CN105893113A (en) * 2016-03-29 2016-08-24 上海携程商务有限公司 Management system and management method of virtual machine
CN106125888B (en) * 2016-06-23 2018-12-25 河海大学常州校区 The efficient power-economizing method of the utilization of resources in cloud data center based on virtual machine (vm) migration
CN106020937A (en) * 2016-07-07 2016-10-12 腾讯科技(深圳)有限公司 Method, device and system for creating virtual machine
CN107168805A (en) * 2017-06-19 2017-09-15 成都鼎智汇科技有限公司 A kind of resource regulating method based on virtual machine
CN109343931B (en) * 2018-09-12 2021-02-12 西安交通大学 Load balancing oriented application perception virtual machine scheduling method in IaaS environment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018014566A1 (en) * 2016-07-22 2018-01-25 平安科技(深圳)有限公司 Load balancing method and apparatus, computer-readable storage medium, and system
CN106970831A (en) * 2017-05-15 2017-07-21 金航数码科技有限责任公司 The resources of virtual machine dynamic scheduling system and method for a kind of facing cloud platform

Also Published As

Publication number Publication date
CN115033340A (en) 2022-09-09

Similar Documents

Publication Publication Date Title
CN115033340B (en) A host selection method and related device
CN112153700B (en) Network slice resource management method and equipment
CN112465146B (en) Quantum and classical hybrid cloud platform and task execution method
WO2019091387A1 (en) Method and system for provisioning resources in cloud computing
US20120011254A1 (en) Network-aware virtual machine migration in datacenters
WO2017010922A1 (en) Allocation of cloud computing resources
CN106201661A (en) Method and apparatus for elastic telescopic cluster virtual machine
CN111131486B (en) Load adjustment method and device of execution node, server and storage medium
CN104679595A (en) Application-oriented dynamic resource allocation method for IaaS (Infrastructure As A Service) layer
CN112181613A (en) Heterogeneous resource distributed computing platform batch task scheduling method and storage medium
CN117834560A (en) Resource allocation method based on computing power network and related equipment
CN116755829A (en) Method for generating host PCIe topological structure and method for distributing container resources
CN113055199A (en) Gateway access method and device and gateway equipment
US11726833B2 (en) Dynamically provisioning virtual machines from remote, multi-tier pool
CN108829516A (en) A kind of graphics processor resource virtualizing dispatching method
US12113719B2 (en) Method for allocating resources of a network infrastructure
CN111143033B (en) Operation execution method and device based on scalable operation system
Zhang et al. PRMRAP: A proactive virtual resource management framework in cloud
CN117573291A (en) Cross-data-center multi-cluster management method, device, equipment and storage medium
CN117311973A (en) Computing device scheduling method and device, nonvolatile storage medium and electronic device
CN114201306B (en) Multi-dimensional geographic space entity distribution method and system based on load balancing technology
CN116909729A (en) GPU multitasking scheduling method
CN117056023A (en) Distributed system storage resource scheduling method and device
CN115774618A (en) Cloud server iaas layer dynamic resource allocation method and device
CN114237902A (en) Service deployment method and device, electronic equipment and computer readable medium

Legal Events

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