CN108762935A - A kind of selection method and server of destination host - Google Patents
A kind of selection method and server of destination host Download PDFInfo
- Publication number
- CN108762935A CN108762935A CN201810564665.3A CN201810564665A CN108762935A CN 108762935 A CN108762935 A CN 108762935A CN 201810564665 A CN201810564665 A CN 201810564665A CN 108762935 A CN108762935 A CN 108762935A
- Authority
- CN
- China
- Prior art keywords
- usage trend
- virtual machine
- data
- trend analysis
- analysis data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000010187 selection method Methods 0.000 title claims description 13
- 238000004458 analytical method Methods 0.000 claims abstract description 101
- 238000000034 method Methods 0.000 claims abstract description 17
- 238000010801 machine learning Methods 0.000 claims description 6
- 238000005516 engineering process Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000007723 transport mechanism Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/505—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
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)
Abstract
本发明实施例公开了一种目标主机的选择方法和服务器,该方法可以包括:为虚拟机选择目标主机时,获取虚拟机的第一使用趋势分析数据和各个候选主机的第二使用趋势分析数据;将第一使用趋势分析数据分别与多个第二使用趋势分析数据相比较;将比较结果符合预设的负载均衡标准的第二使用趋势分析数据对应的候选主机作为虚拟机所选择的目标主机。通过该实施例方案,使得主机间整体的负载均衡更优。
The embodiment of the present invention discloses a method and server for selecting a target host, and the method may include: when selecting a target host for a virtual machine, acquiring first usage trend analysis data of the virtual machine and second usage trend analysis data of each candidate host ; Comparing the first usage trend analysis data with multiple second usage trend analysis data respectively; using the candidate host corresponding to the second usage trend analysis data whose comparison result meets the preset load balancing standard as the target host selected by the virtual machine . Through the solution of this embodiment, the overall load balance among the hosts is better.
Description
技术领域technical field
本发明实施例涉及虚拟机管理技术,尤指一种目标主机的选择方法和服务器。The embodiment of the present invention relates to a virtual machine management technology, in particular to a method for selecting a target host and a server.
背景技术Background technique
在服务器虚拟化系统中,对新创建的虚拟机,需要为其选择一个合适的主机,即虚拟机放置(Placement)策略。该策略可以通过用户手动选择实现,也可以通过系统自动选择实现。系统自动选择的方式一般为选择剩余资源量最多的主机。但是,随着主机内原有虚拟机业务负载的动态变化,主机中剩余资源量也是动态增减的,通过简单的基于最大剩余空间的虚拟机放置策略难以适应动态变化的现实场景。In a server virtualization system, for a newly created virtual machine, it is necessary to select an appropriate host, that is, a virtual machine placement (Placement) strategy. This strategy can be implemented manually by the user or automatically by the system. The automatic selection method of the system is generally to select the host with the largest amount of remaining resources. However, with the dynamic change of the original virtual machine business load in the host, the amount of remaining resources in the host is also dynamically increased or decreased, and it is difficult to adapt to the dynamically changing real scene through a simple virtual machine placement strategy based on the maximum remaining space.
发明内容Contents of the invention
为了解决上述技术问题,本发明实施例提供了一种目标主机的选择方法和服务器,能够使得主机间整体的负载均衡更优。In order to solve the above technical problems, the embodiments of the present invention provide a method for selecting a target host and a server, which can make the overall load balance among the hosts better.
为了达到本发明目的,本发明实施例提供了一种目标主机的选择方法,该方法可以包括:In order to achieve the purpose of the present invention, an embodiment of the present invention provides a method for selecting a target host, which may include:
为虚拟机选择目标主机时,获取虚拟机的第一使用趋势分析数据和各个候选主机的第二使用趋势分析数据;其中,该第一使用趋势分析数据用于指示虚拟机的业务负载的动态变化情况,该第二使用趋势分析数据用于指示目标主机中虚拟机的业务负载的动态变化情况以及该目标主机的资源量动态变化情况;When selecting a target host for a virtual machine, the first usage trend analysis data of the virtual machine and the second usage trend analysis data of each candidate host are obtained; wherein the first usage trend analysis data is used to indicate the dynamic change of the business load of the virtual machine situation, the second usage trend analysis data is used to indicate the dynamic change of the service load of the virtual machine in the target host and the dynamic change of the resource amount of the target host;
将第一使用趋势分析数据分别与多个第二使用趋势分析数据相比较;comparing the first usage trend analysis data with a plurality of second usage trend analysis data respectively;
将比较结果符合预设的负载均衡标准的第二使用趋势分析数据对应的候选主机作为虚拟机所选择的目标主机。The candidate host corresponding to the second usage trend analysis data whose comparison result meets the preset load balancing standard is used as the target host selected by the virtual machine.
可选地,获取虚拟机的第一使用趋势分析数据可以包括:Optionally, acquiring the first usage trend analysis data of the virtual machine may include:
将虚拟机的特征数据与预设的虚拟机样本数据库中保存的多种虚拟机的样本特征数据相比较;Comparing the feature data of the virtual machine with sample feature data of various virtual machines stored in a preset virtual machine sample database;
获取与虚拟机的特征数据的相似度小于或等于预设的相似度阈值的第一样本特征数据;其中,不同的样本特征数据对应不同的使用趋势分析数据;Obtaining first sample feature data whose similarity with the feature data of the virtual machine is less than or equal to a preset similarity threshold; where different sample feature data correspond to different usage trend analysis data;
将与第一样本特征数据对应的使用趋势分析数据作为第一使用趋势分析数据。Use the usage trend analysis data corresponding to the first sample feature data as the first usage trend analysis data.
可选地,获取各个候选主机的第二使用趋势分析数据可以包括:Optionally, acquiring the second usage trend analysis data of each candidate host may include:
计算每一个候选主机中正在运行的全部虚拟机的使用趋势分析数据的总和;Calculate the sum of usage trend analysis data of all virtual machines running in each candidate host;
将全部虚拟机的使用趋势分析数据的总和作为每一个候选主机的第二使用趋势分析数据。The sum of usage trend analysis data of all virtual machines is used as the second usage trend analysis data of each candidate host.
可选地,该方法还可以包括:Optionally, the method may also include:
预先获取不同的虚拟机的特征数据,作为样本特征数据,并存入预设的样本数据库中;Pre-obtain feature data of different virtual machines as sample feature data and store them in a preset sample database;
根据不同的样本特征数据以及预设算法获取不同的使用趋势分析数据,并存入样本数据库中。Obtain different usage trend analysis data according to different sample characteristic data and preset algorithms, and store them in the sample database.
可选地,预设算法包括:预设的机器学习算法。Optionally, the preset algorithm includes: a preset machine learning algorithm.
可选地,获取虚拟机的第一使用趋势分析数据可以包括:Optionally, acquiring the first usage trend analysis data of the virtual machine may include:
将虚拟机的特征数据输入预设的使用趋势分析学习模型获取第一使用趋势分析数据。Inputting the feature data of the virtual machine into a preset usage trend analysis learning model to obtain first usage trend analysis data.
可选地,获取各个候选主机的第二使用趋势分析数据可以包括:Optionally, acquiring the second usage trend analysis data of each candidate host may include:
将各个候选主机中正在运行的全部虚拟机的特征数据输入所述使用趋势分析学习模型,获取正在运行的全部虚拟机的使用趋势分析数据的总和,作为第二使用趋势分析数据。Input the feature data of all the running virtual machines in each candidate host into the usage trend analysis learning model, and obtain the sum of the usage trend analysis data of all the running virtual machines as the second usage trend analysis data.
可选地,虚拟机的特征数据包括以下一种或多种:硬件规格、业务类型、历史负载和当前负载。Optionally, the feature data of the virtual machine includes one or more of the following: hardware specification, service type, historical load and current load.
可选地,该虚拟机可以包括:新建的虚拟机和/或待调度的虚拟机。Optionally, the virtual machine may include: a newly created virtual machine and/or a virtual machine to be scheduled.
为了达到本发明目的,本发明实施例还提供了一种服务器,包括:处理器和计算机可读存储介质;该计算机可读存储介质中存储有指令;当处理器执行该指令时,实现上述的目标主机的选择方法。In order to achieve the purpose of the present invention, an embodiment of the present invention also provides a server, including: a processor and a computer-readable storage medium; instructions are stored in the computer-readable storage medium; when the processor executes the instructions, the above-mentioned The selection method of the target host.
本发明实施例包括:为虚拟机选择目标主机时,获取虚拟机的第一使用趋势分析数据和各个候选主机的第二使用趋势分析数据;其中,该第一使用趋势分析数据用于指示虚拟机的业务负载的动态变化情况,该第二使用趋势分析数据用于指示候选主机中虚拟机的业务负载的动态变化情况以及该候选主机的资源量动态变化情况;将第一使用趋势分析数据分别与多个第二使用趋势分析数据相比较;将比较结果符合预设的负载均衡标准的第二使用趋势分析数据对应的候选主机作为虚拟机所选择的目标主机。通过该实施例方案,使得主机间整体的负载均衡更优。The embodiment of the present invention includes: when selecting a target host for a virtual machine, acquiring the first usage trend analysis data of the virtual machine and the second usage trend analysis data of each candidate host; wherein the first usage trend analysis data is used to indicate the virtual machine The dynamic change of the business load of the candidate host, the second usage trend analysis data is used to indicate the dynamic change of the business load of the virtual machine in the candidate host and the dynamic change of the resource amount of the candidate host; the first usage trend analysis data and Comparing multiple second usage trend analysis data; using the candidate host corresponding to the second usage trend analysis data whose comparison result meets the preset load balancing standard as the target host selected by the virtual machine. Through the solution of this embodiment, the overall load balance among the hosts is better.
本发明实施例的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。本发明实施例的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Additional features and advantages of embodiments of the invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the invention. The objectives and other advantages of the embodiments of the present invention can be realized and obtained by the structures particularly pointed out in the description, claims and accompanying drawings.
附图说明Description of drawings
附图用来提供对本发明实施例技术方案的进一步理解,并且构成说明书的一部分,与本申请的实施例一起用于解释本发明实施例的技术方案,并不构成对本发明实施例技术方案的限制。The accompanying drawings are used to provide a further understanding of the technical solutions of the embodiments of the present invention, and constitute a part of the description, and are used together with the embodiments of the application to explain the technical solutions of the embodiments of the present invention, and do not constitute limitations to the technical solutions of the embodiments of the present invention .
图1为本发明实施例的目标主机的选择方法流程图;FIG. 1 is a flowchart of a method for selecting a target host according to an embodiment of the present invention;
图2为本发明实施例的服务器组成框图。FIG. 2 is a block diagram of a server according to an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚明白,下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined arbitrarily with each other.
在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行。并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。The steps shown in the flowcharts of the figures may be performed in a computer system, such as a set of computer-executable instructions. Also, although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in an order different from that shown or described herein.
为了达到本发明目的,本发明实施例提供了一种目标主机的选择方法,如图1所示,该方法可以包括S101-S103:In order to achieve the purpose of the present invention, the embodiment of the present invention provides a method for selecting a target host, as shown in Figure 1, the method may include S101-S103:
S101、为虚拟机选择目标主机时,获取虚拟机的第一使用趋势分析数据和各个候选主机的第二使用趋势分析数据;其中,该第一使用趋势分析数据用于指示虚拟机的业务负载的动态变化情况,该第二使用趋势分析数据用于指示目标主机中虚拟机的业务负载的动态变化情况以及该目标主机的资源量动态变化情况;S101. When selecting a target host for a virtual machine, acquire the first usage trend analysis data of the virtual machine and the second usage trend analysis data of each candidate host; wherein the first usage trend analysis data is used to indicate the business load of the virtual machine Dynamic changes, the second usage trend analysis data is used to indicate the dynamic changes of the business load of the virtual machine in the target host and the dynamic changes of the resource amount of the target host;
S102、将第一使用趋势分析数据分别与多个第二使用趋势分析数据相比较;S102. Comparing the first usage trend analysis data with multiple second usage trend analysis data respectively;
S103、将比较结果符合预设的负载均衡标准的第二使用趋势分析数据对应的候选主机作为虚拟机所选择的目标主机。S103. Use the candidate host corresponding to the second usage trend analysis data whose comparison result meets the preset load balancing standard as the target host selected by the virtual machine.
在本发明实施例中,本申请可以应用于服务器虚拟化系统的虚拟机调度,可选地,该虚拟机可以包括:新建的虚拟机和/或待调度的虚拟机。通过本申请方案对新建的虚拟机或者待调度的虚拟机选择最合适的服务器主机(即目标主机)作为运行环境,达到主机间负载均衡的目的。In the embodiment of the present invention, the present application may be applied to virtual machine scheduling of a server virtualization system. Optionally, the virtual machine may include: a newly created virtual machine and/or a virtual machine to be scheduled. Through this application scheme, the most suitable server host (namely, the target host) is selected as the operating environment for the newly created virtual machine or the virtual machine to be scheduled, so as to achieve the purpose of load balancing among the hosts.
在本发明实施例中,以候选主机和虚拟机(可以包括新建的虚拟机或者待调度的虚拟机)的资源使用趋势分析数据做参考,充分考虑该虚拟机的资源使用趋势情况和候选主机的资源使用趋势情况,做出虚拟机放置决策,可以保证虚拟化系统内部在未来一段时间内,均能保持主机间整体的更优负载均衡。In the embodiment of the present invention, the resource usage trend analysis data of the candidate host and the virtual machine (which may include a new virtual machine or a virtual machine to be scheduled) is used as a reference, and the resource usage trend of the virtual machine and the candidate host's resource usage trend are fully considered. Based on resource usage trends, virtual machine placement decisions can be made to ensure that the virtualization system can maintain an overall better load balance among hosts for a period of time in the future.
可选地,获取虚拟机的第一使用趋势分析数据可以包括:Optionally, acquiring the first usage trend analysis data of the virtual machine may include:
将虚拟机的特征数据与预设的虚拟机样本数据库中保存的多种虚拟机的样本特征数据相比较;Comparing the feature data of the virtual machine with sample feature data of various virtual machines stored in a preset virtual machine sample database;
获取与虚拟机的特征数据的相似度小于或等于预设的相似度阈值的第一样本特征数据;其中,不同的样本特征数据对应不同的使用趋势分析数据;Obtaining first sample feature data whose similarity with the feature data of the virtual machine is less than or equal to a preset similarity threshold; where different sample feature data correspond to different usage trend analysis data;
将与第一样本特征数据对应的使用趋势分析数据作为第一使用趋势分析数据。Use the usage trend analysis data corresponding to the first sample feature data as the first usage trend analysis data.
在本发明实施例中,可以预先建立虚拟机的样本数据库,存储虚拟机的样本特征数据及使用趋势分析数据。In the embodiment of the present invention, a sample database of a virtual machine may be pre-established to store sample feature data and usage trend analysis data of the virtual machine.
在本发明实施例中,可以将新建的虚拟机或者待调度的虚拟机的特征数据与虚拟机的样本数据库中存储的样本特征数据相比较,获取与其相似的样本特征数据,并相应获取相应的使用趋势分析数据,实现对该新建虚拟机或者待调度的虚拟机的资源使用情况的趋势分析。In the embodiment of the present invention, the feature data of the newly-built virtual machine or the virtual machine to be scheduled can be compared with the sample feature data stored in the sample database of the virtual machine to obtain sample feature data similar to it, and correspondingly obtain the corresponding Use the trend analysis data to implement trend analysis on the resource usage of the newly created virtual machine or the virtual machine to be scheduled.
可选地,虚拟机的特征数据可以包括以下一种或多种:硬件规格、业务类型、历史负载和当前负载。Optionally, the characteristic data of the virtual machine may include one or more of the following: hardware specification, business type, historical load and current load.
可选地,获取各个候选主机的第二使用趋势分析数据可以包括:Optionally, acquiring the second usage trend analysis data of each candidate host may include:
计算每一个候选主机中正在运行的全部虚拟机的使用趋势分析数据的总和;Calculate the sum of usage trend analysis data of all virtual machines running in each candidate host;
将全部虚拟机的使用趋势分析数据的总和作为每一个候选主机的第二使用趋势分析数据。The sum of usage trend analysis data of all virtual machines is used as the second usage trend analysis data of each candidate host.
在本发明实施例中,一个或多个候选主机的资源使用趋势情况,可以基于每一个候选主机内运行的全部虚拟机的资源使用趋势总和计算获得;基于候选主机内正在运行的每个虚拟机的使用趋势分析数据,可以计算得到每一个候选主机的使用趋势分析数据。具体地,可以将每一个候选主内正在运行的虚拟机的使用趋势分析数据中的各项数据相应地进行加权运算,获取整个候选主机的使用趋势分析数据,即上述的第二使用趋势分析数据。In the embodiment of the present invention, the resource usage trend of one or more candidate hosts can be calculated based on the sum of the resource usage trends of all virtual machines running in each candidate host; based on each virtual machine running in the candidate host The use trend analysis data of each candidate host can be calculated to obtain the use trend analysis data. Specifically, the data in the usage trend analysis data of the running virtual machines in each candidate host can be weighted accordingly to obtain the usage trend analysis data of the entire candidate host, that is, the above-mentioned second usage trend analysis data .
可选地,该方法还可以包括:Optionally, the method may also include:
预先获取不同的虚拟机的特征数据,作为样本特征数据,并存入预设的样本数据库中;Pre-obtain feature data of different virtual machines as sample feature data and store them in a preset sample database;
根据不同的样本特征数据以及预设算法获取不同的使用趋势分析数据,并存入样本数据库中。Obtain different usage trend analysis data according to different sample characteristic data and preset algorithms, and store them in the sample database.
可选地,预设算法包括:预设的机器学习算法。Optionally, the preset algorithm includes: a preset machine learning algorithm.
在本发明实施例中,为了通过上述方案获取第一使用趋势分析数据和第二使用趋势分析数据,可以预先收集虚拟机的不同的特征数据,以获得虚拟机的各种样本特征数据,并存入预设的样本数据库中,同时,可以根据这些样本特征数据预先根据机器学习算法计算出相应的使用趋势分析数据存入预设的样本数据库中,以便需要对虚拟机选择主机时,直接调取样本数据库中的数据进行比较,从而获取该虚拟机的取第一使用趋势分析数据,以及各个候选主机的第二使用趋势分析数据。In the embodiment of the present invention, in order to obtain the first usage trend analysis data and the second usage trend analysis data through the above solution, different characteristic data of the virtual machine may be collected in advance to obtain various sample characteristic data of the virtual machine, and the At the same time, according to these sample feature data, the corresponding usage trend analysis data can be calculated in advance according to the machine learning algorithm and stored in the preset sample database, so that when it is necessary to select a host for a virtual machine, it can be directly called The data in the sample database are compared to obtain the first usage trend analysis data of the virtual machine and the second usage trend analysis data of each candidate host.
在本发明实施例中,通过上述方案获取第一使用趋势分析数据和多个第二使用趋势分析数据以后,可以将第一使用趋势分析数据和每一个第二使用趋势分析数据相比较,将比较结果符合预设的负载均衡标准的第二使用趋势分析数据对应的候选主机作为虚拟机所选择的目标主机。这里,该预设的负载均衡标准可以根据不同的应用场景自行定义,例如,在未来的一个预设时长内,第二使用趋势分析数据中显示的该段预设时长内候选主机中的资源使用率小于或等于新建的虚拟机或者待调度的虚拟机在该预设时长内的资源使用率。In the embodiment of the present invention, after the first usage trend analysis data and multiple second usage trend analysis data are obtained through the above scheme, the first usage trend analysis data can be compared with each second usage trend analysis data, and the comparison As a result, the candidate host corresponding to the second usage trend analysis data that meets the preset load balancing standard is used as the target host selected by the virtual machine. Here, the preset load balancing standard can be defined according to different application scenarios, for example, within a preset time period in the future, the resource usage in the candidate host within the preset time period shown in the second usage trend analysis data The rate is less than or equal to the resource usage rate of the newly created virtual machine or the virtual machine to be scheduled within the preset time period.
在本发明实施例中,当比较结果指示多个候选主机满足上述的负载均衡标准时,可以从这些符合负载均衡标准的候选主机中选出一个在该预设时长内资源使用率最小的候选主机作为目标主机。In the embodiment of the present invention, when the comparison result indicates that multiple candidate hosts meet the above load balancing criteria, a candidate host with the smallest resource usage rate within the preset time period can be selected from these candidate hosts that meet the load balancing criteria as the target host.
在本发明实施例中,本申请综合考虑候选主机和虚拟机(如新建的虚拟机或者待调度的虚拟机)的使用趋势分析数据,为虚拟机选择目标主机,达到系统总体的负载均衡。In the embodiment of the present invention, the application comprehensively considers the use trend analysis data of candidate hosts and virtual machines (such as newly created virtual machines or virtual machines to be scheduled), selects target hosts for virtual machines, and achieves overall system load balancing.
可选地,获取虚拟机的第一使用趋势分析数据可以包括:Optionally, acquiring the first usage trend analysis data of the virtual machine may include:
将虚拟机的特征数据输入预设的使用趋势分析学习模型获取第一使用趋势分析数据。Inputting the feature data of the virtual machine into a preset usage trend analysis learning model to obtain first usage trend analysis data.
可选地,获取各个候选主机的第二使用趋势分析数据可以包括:Optionally, acquiring the second usage trend analysis data of each candidate host may include:
将各个候选主机中正在运行的全部虚拟机的特征数据输入所述使用趋势分析学习模型,获取正在运行的全部虚拟机的使用趋势分析数据的总和,作为第二使用趋势分析数据。Input the feature data of all the running virtual machines in each candidate host into the usage trend analysis learning model, and obtain the sum of the usage trend analysis data of all the running virtual machines as the second usage trend analysis data.
在本发明实施例中,还给出了另一种获取第一使用趋势分析数据和第二使用趋势分析数据的方法,即直接将新建的虚拟机或者待调度的虚拟机的特征数据输入预设的使用趋势分析学习模型获取第一使用趋势分析数据,并直接将候选主机中正在运行的全部虚拟机的特征数据输入该使用趋势分析学习模型获取第二使用趋势分析数据。In the embodiment of the present invention, another method for obtaining the first usage trend analysis data and the second usage trend analysis data is provided, that is, directly input the feature data of the newly created virtual machine or the virtual machine to be scheduled into the preset The usage trend analysis learning model acquires the first usage trend analysis data, and directly inputs the characteristic data of all virtual machines running in the candidate host into the usage trend analysis learning model to obtain the second usage trend analysis data.
在本发明实施例中,可以预先根据虚拟机的多种特征数据以及预设的机器学习算法进行使用趋势分析训练,获取该使用趋势分析学习模型。In the embodiment of the present invention, the use trend analysis training can be performed in advance according to various feature data of the virtual machine and a preset machine learning algorithm, and the use trend analysis learning model can be obtained.
在本发明实施例中,对于具体的机器学习算法不做限制,可以根据不同的应用场景自行定义。In the embodiment of the present invention, there is no limitation on the specific machine learning algorithm, which can be defined according to different application scenarios.
为了达到本发明目的,本发明实施例还提供了一种服务器1,如图2所示,可以包括:处理器11和计算机可读存储介质12;该计算机可读存储介质12中存储有指令;当处理器11执行该指令时,实现上述的目标主机的选择方法。In order to achieve the purpose of the present invention, the embodiment of the present invention also provides a server 1, as shown in FIG. 2 , which may include: a processor 11 and a computer-readable storage medium 12; instructions are stored in the computer-readable storage medium 12; When the processor 11 executes the instruction, the above-mentioned method for selecting the target host is realized.
本发明实施例包括:为虚拟机选择目标主机时,获取虚拟机的第一使用趋势分析数据和各个候选主机的第二使用趋势分析数据;其中,该第一使用趋势分析数据用于指示虚拟机的业务负载的动态变化情况,该第二使用趋势分析数据用于指示候选主机中虚拟机的业务负载的动态变化情况以及该候选主机的资源量动态变化情况;将第一使用趋势分析数据分别与多个第二使用趋势分析数据相比较;将比较结果符合预设的负载均衡标准的第二使用趋势分析数据对应的候选主机作为虚拟机所选择的目标主机。通过该实施例方案,使得主机间整体的负载均衡更优。The embodiment of the present invention includes: when selecting a target host for a virtual machine, acquiring the first usage trend analysis data of the virtual machine and the second usage trend analysis data of each candidate host; wherein the first usage trend analysis data is used to indicate the virtual machine The dynamic change of the business load of the candidate host, the second usage trend analysis data is used to indicate the dynamic change of the business load of the virtual machine in the candidate host and the dynamic change of the resource amount of the candidate host; the first usage trend analysis data and Comparing multiple second usage trend analysis data; using the candidate host corresponding to the second usage trend analysis data whose comparison result meets the preset load balancing standard as the target host selected by the virtual machine. Through the solution of this embodiment, the overall load balance among the hosts is better.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些组件或所有组件可以被实施为由处理器,如数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, the functional modules/units in the system, and the device can be implemented as software, firmware, hardware, and an appropriate combination thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be composed of several physical components. Components cooperate to execute. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). As known to those of ordinary skill in the art, the term computer storage media includes both volatile and nonvolatile media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules, or other data. permanent, removable and non-removable media. Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, tape, magnetic disk storage or other magnetic storage devices, or can Any other medium used to store desired information and which can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810564665.3A CN108762935A (en) | 2018-06-04 | 2018-06-04 | A kind of selection method and server of destination host |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810564665.3A CN108762935A (en) | 2018-06-04 | 2018-06-04 | A kind of selection method and server of destination host |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108762935A true CN108762935A (en) | 2018-11-06 |
Family
ID=64002511
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810564665.3A Pending CN108762935A (en) | 2018-06-04 | 2018-06-04 | A kind of selection method and server of destination host |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108762935A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109842689A (en) * | 2019-03-28 | 2019-06-04 | 中国联合网络通信集团有限公司 | A kind of method and apparatus of selection server access |
CN111124687A (en) * | 2019-12-30 | 2020-05-08 | 浪潮电子信息产业股份有限公司 | A CPU resource reservation method, device and related equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102236582A (en) * | 2011-07-15 | 2011-11-09 | 浙江大学 | Method for balanced distribution of virtualization cluster load in a plurality of physical machines |
CN104683388A (en) * | 2013-11-27 | 2015-06-03 | 宁波复博信息技术有限公司 | Cloud resource management system and management method thereof |
CN105260235A (en) * | 2015-09-23 | 2016-01-20 | 浪潮集团有限公司 | Method and device for scheduling resources on basis of application scenarios in cloud platform |
CN105893113A (en) * | 2016-03-29 | 2016-08-24 | 上海携程商务有限公司 | Management system and management method of virtual machine |
CN106293871A (en) * | 2016-07-22 | 2017-01-04 | 浪潮(北京)电子信息产业有限公司 | A resource scheduling method for cluster virtual machines |
CN107562512A (en) * | 2016-07-01 | 2018-01-09 | 华为技术有限公司 | A method, device and system for migrating a virtual machine |
-
2018
- 2018-06-04 CN CN201810564665.3A patent/CN108762935A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102236582A (en) * | 2011-07-15 | 2011-11-09 | 浙江大学 | Method for balanced distribution of virtualization cluster load in a plurality of physical machines |
CN104683388A (en) * | 2013-11-27 | 2015-06-03 | 宁波复博信息技术有限公司 | Cloud resource management system and management method thereof |
CN105260235A (en) * | 2015-09-23 | 2016-01-20 | 浪潮集团有限公司 | Method and device for scheduling resources on basis of application scenarios in cloud platform |
CN105893113A (en) * | 2016-03-29 | 2016-08-24 | 上海携程商务有限公司 | Management system and management method of virtual machine |
CN107562512A (en) * | 2016-07-01 | 2018-01-09 | 华为技术有限公司 | A method, device and system for migrating a virtual machine |
CN106293871A (en) * | 2016-07-22 | 2017-01-04 | 浪潮(北京)电子信息产业有限公司 | A resource scheduling method for cluster virtual machines |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109842689A (en) * | 2019-03-28 | 2019-06-04 | 中国联合网络通信集团有限公司 | A kind of method and apparatus of selection server access |
CN109842689B (en) * | 2019-03-28 | 2021-07-27 | 中国联合网络通信集团有限公司 | Method and device for selecting server access |
CN111124687A (en) * | 2019-12-30 | 2020-05-08 | 浪潮电子信息产业股份有限公司 | A CPU resource reservation method, device and related equipment |
CN111124687B (en) * | 2019-12-30 | 2022-04-22 | 浪潮电子信息产业股份有限公司 | A CPU resource reservation method, device and related equipment |
US11656901B2 (en) | 2019-12-30 | 2023-05-23 | Inspur Electronic Information Industry Co., Ltd. | CPU resource reservation method and apparatus, and related device thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7623775B2 (en) | Federated Machine Learning Using Locality-Sensitive Hashing | |
US10261819B2 (en) | Determining an optimal computing environment for running an image based on performance of similar images | |
US20210357431A1 (en) | Classification of time series data | |
US10721179B2 (en) | Adaptive resource allocation operations based on historical data in a distributed computing environment | |
US10104187B2 (en) | System, computer program, and method for dividing services into subsets based on interdependencies | |
US11150999B2 (en) | Method, device, and computer program product for scheduling backup jobs | |
US20120290348A1 (en) | Routing service requests based on lowest actual cost within a federated virtual service cloud | |
CN112153700A (en) | A network slice resource management method and device | |
US10733015B2 (en) | Prioritizing applications for diagonal scaling in a distributed computing environment | |
US10635501B2 (en) | Adaptive scaling of workloads in a distributed computing environment | |
CN111373374B (en) | Automatic diagonal scaling of workloads in a distributed computing environment | |
US20150163285A1 (en) | Identifying The Workload Of A Hybrid Cloud Based On Workload Provisioning Delay | |
US11025500B2 (en) | Provisioning infrastructure from visual diagrams | |
US11769075B2 (en) | Dynamic machine learning on premise model selection based on entity clustering and feedback | |
US11095520B1 (en) | Remote resource capacity and utilization management | |
CN108762935A (en) | A kind of selection method and server of destination host | |
WO2023173917A1 (en) | Method and apparatus for distributed system | |
US20230161634A1 (en) | Mapping an application signature to designated cloud resources | |
US10417403B2 (en) | Automation authentication and access | |
US11061653B2 (en) | Dynamic compiling for conditional statements during execution | |
US10893000B2 (en) | Diagonal scaling of resource allocations and application instances in a distributed computing environment | |
US10657079B1 (en) | Output processor for transaction processing system | |
US11914733B2 (en) | Timing for user data erasure requests | |
US10956037B2 (en) | Provisioning storage allocation using prioritized storage system capabilities | |
US10887250B2 (en) | Reducing resource allocations and application instances in diagonal scaling in a distributed computing environment |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181106 |
|
RJ01 | Rejection of invention patent application after publication |