CN115033340A - Host selection method and related device - Google Patents

Host selection method and related device Download PDF

Info

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

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/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)

Abstract

The application discloses a host selection method and a related device, relates to the technical field of cloud computing, and is used for solving the technical problem that the resource utilization rate corresponding to a host is low. The method comprises the following steps: 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 machine in a first time period; and determining a target host machine from the at least one host machine based on the obtained use parameter information and the target virtual machine type. By the method, the utilization rate of the corresponding resources of the host machine can be improved.

Description

Host machine 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 machine selection method and a related device.
Background
At present, with the continuous development of science and technology, a new technology, namely cloud computing, is developed after computers and the internet in the information age. The core of cloud computing is that a plurality of computer resources are coordinated together by taking the internet as a center, so that fast and safe cloud computing services and data storage services are provided.
Specifically, an Infrastructure as a Service (IaaS) cloud platform uniformly manages virtualized resources such as computing, network, storage, and the like, and a user can pay as needed according to actual use requirements and apply for a corresponding virtual machine from the IaaS cloud platform, so that the corresponding virtualized resource is used based on the virtual machine.
In the process of providing services by an IaaS cloud platform corresponding to a cloud company, the IaaS cloud platform needs to perform resource scheduling processing, for example, a virtual machine is scheduled to an optimal host machine to run, that is, when the host machine resource scheduling is realized, the host machine resource can be maximally utilized.
However, in the related art, most IaaS cloud platforms perform static statistical calculation on resources, and perform scheduling selection of hosts based on a statistical calculation result. For example, the resource allocable by host a is 8C16G, and host a has created a virtual machine 1, and the resource of this virtual machine 1 is 4C8G, then the database corresponding to the IaaS cloud platform records the resource allocated with 4C8G on host a, so that, based on the existing host scheduling selection scheme, host a can only reallocate one virtual machine that is the same as the resource of virtual machine 1.
Obviously, based on the existing host scheduling selection scheme, when the total memory of the virtual machines already allocated on the host a reaches the upper limit value of the host, the virtual machines cannot be allocated on the host a, but in the actual use process, the host a may have a condition of low memory utilization rate, so that the memory resources of the host a are wasted, and thus, the technical problem of low resource utilization rate corresponding to the host exists in the related art.
Disclosure of Invention
The embodiment of the application provides a host machine selection method and a related device, which are used for improving the utilization rate of resources corresponding to a host machine.
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 machine in a first time period;
and determining a target host machine from the at least one host machine based on the obtained use parameter information and the target virtual machine type.
In a possible embodiment, determining a target host from the at least one host based on the obtained usage parameter information and the target virtual machine type includes:
integrating a moving average autoregressive model through a preset difference, and performing prediction processing on the obtained use parameter information to obtain the utilization rate of each resource corresponding to the at least one host;
determining a target sorting rule based on the type of the target virtual machine, and 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;
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 type of the target virtual machine is determined to be a calculation type, determining that the target sorting rule is to sort the at least one host according to the utilization rate of the CPU;
when the type of the target virtual machine is determined to be a memory type, determining the target sorting rule to sort the at least one host according to the utilization rate of the memory;
and when the type of the target virtual machine is determined to be the unspecified type, determining that the target sorting rule is to sort 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, ranking the at least one host based on the target ranking rule and the utilization rate of each resource corresponding to the at least one host to determine a candidate host set 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 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 embodiment, determining a target host from the set of candidate hosts comprises:
determining resource utilization balance of each candidate host in the candidate host set based on utilization rate of each resource of each candidate host in the candidate host set;
screening host machines with resource utilization balance degrees meeting a preset range from the candidate host machine set to obtain a first candidate host machine subset;
determining relative saturation of resource utilization of each candidate host in the first subset of candidate hosts based on utilization of each resource of each candidate host in the first subset of candidate hosts; the resource utilization relative saturation is used for representing whether each resource of the candidate host reaches the progress of being utilized to the maximum extent;
and screening host machines with the resource utilization relative saturation meeting a preset threshold value from the first candidate host machine subset, and determining a target host machine.
In a possible embodiment, determining the resource utilization balance of each candidate host in the candidate host set based on the utilization rate of each resource of each candidate host in the candidate host set includes:
aiming at the utilization rate of each resource of any candidate host machine, 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 machine;
determining a first processing value based on the utilization rate of the CPU resource of the candidate host and the average value; the first processing value is used for representing the used degree of CPU resources; and (c) a second step of,
determining a second processing value based on the memory resources of the candidate host and the mean value; the second processing value is used for representing the used degree of the memory resource;
and correspondingly determining the resource utilization balance degree of the candidate host machine based on the first processing value and the second processing value.
In one possible embodiment, 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:
for the utilization rate of each resource of the candidate host in any one of the first subset of candidate hosts, respectively performing the following operations:
determining the average value of the utilization rate of the CPU resource and the utilization rate of the memory resource of the candidate host machine;
determining resource utilization relative saturation of the CPU resource of the candidate host machine based on the difference between the utilization rate of the CPU resource of the candidate host machine and the average value; and (c) a second step of,
and determining the relative resource utilization saturation of the memory resources of the candidate host machine based on the difference between the utilization rate of the memory resources of the candidate host machine and the average value.
In a second aspect, there is provided a host selection apparatus, the apparatus comprising:
a receiving unit, 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 at least includes a target virtual machine type;
the obtaining unit is used for responding to the scheduling request and obtaining the use parameter information of at least one host machine in a first time period;
a determining unit, configured to determine a target host from the at least one host based on the obtained usage parameter information and the type of the target virtual machine.
In a possible implementation, the determining unit is configured to:
integrating a moving average autoregressive model through a preset difference, and performing prediction processing on the obtained use parameter information to obtain the utilization rate of each resource corresponding to the at least one host;
determining a target sorting rule based on the type of the target virtual machine, and 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;
and determining a target host from the candidate host set.
In a possible implementation, the determining unit is configured to:
when the type of the target virtual machine is determined to be a calculation type, determining the target sorting rule to sort the 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, determining the target sorting rule to sort the at least one host according to the utilization rate of the memory;
and when the type of the target virtual machine is determined to be the unspecified type, determining that the target sorting rule is to sort 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, 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 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, the determining unit is configured to:
determining resource utilization balance of each candidate host in the candidate host set based on utilization rate of each resource of each candidate host in the candidate host set;
screening host machines with resource utilization balance degrees meeting a preset range from the candidate host machine set to obtain a first candidate host machine subset;
determining relative saturation of resource utilization of each candidate host in the first subset of candidate hosts based on utilization of each resource of each candidate host in the first subset of candidate hosts; the resource utilization relative saturation is used for representing whether each resource of the candidate host reaches the progress of being utilized to the maximum extent;
and screening host machines with the resource utilization relative saturation meeting a preset threshold value from the first candidate host machine subset, and determining a target host machine.
In a possible implementation, the determining unit is configured to:
aiming at the utilization rate of each resource of any candidate host machine, 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 machine;
determining a first processing value based on the utilization rate of the CPU resource of the candidate host and the average value; the first processing value is used for representing the used degree of CPU resources; and (c) a second step of,
determining a second processing value based on the memory resources of the candidate host and the mean value; the second processing value is used for representing the used degree of the memory resource;
and correspondingly determining the resource utilization balance degree of the candidate host machine based on the first processing value and the second processing value.
In a possible implementation, the determining unit is configured to:
for the utilization rate of each resource of the candidate host in any one of the first subset of candidate hosts, respectively performing the following operations:
determining the average value of the utilization rate of the CPU resource and the utilization rate of the memory resource of the candidate host machine;
determining resource utilization relative saturation of the CPU resource of the candidate host machine based on the difference between the utilization rate of the CPU resource of the candidate host machine and the average value; and (c) a second step of,
and determining the relative resource utilization saturation of the memory resources of the candidate host machine based on the difference between the utilization rate of the memory resources of the candidate host machine and the average value.
In a third aspect, a computer device is provided, the computer device comprising:
a memory for storing program instructions;
a processor for calling the program instructions stored in the memory and executing the steps included in any 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 included in implementing any of the methods of 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. The computer instructions are read by a processor of the computer device from a computer readable storage medium, and the computer instructions are executed by the processor to cause the computer device to perform the steps included in 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 present application, a method for selecting a host and a related device are provided, where a scheduling selection request is received, where the scheduling selection request includes at least a target virtual machine type in a creation request determined based on the creation request for creating a virtual machine, and therefore, a host corresponding to a control node may obtain usage parameter information of at least one host in a first time period, and thus, a target host may be determined from at least one host based on the obtained usage parameter information and the target virtual machine type, that is, in this embodiment, the selected target host may be determined comprehensively based on the dynamically obtained usage parameter information of the host and the target virtual machine type specified by a user, and thus, a utilization rate of resources corresponding to the host may 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 the practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments or related technologies, the drawings needed to be used in the description of the embodiments or related technologies are briefly introduced below, it is obvious that the drawings in the following description are only the embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic diagram illustrating utilization rates of CPU resources and memory resources of a host 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 in an embodiment of the present application;
fig. 4 is a schematic flow chart of a host selection method in an embodiment of the present application;
fig. 5 is a schematic diagram of a specific scenario of a host selection method in an embodiment of the present application;
fig. 6 is a schematic diagram illustrating usage rates of CPU resources and memory resources of a host in an embodiment of the present application;
fig. 7 is a schematic structural diagram of a selection device of a host in an embodiment of the present application;
fig. 8 is a schematic hardware component structure diagram of a computer device in the embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application. In the present application, the embodiments and features of the embodiments may be arbitrarily combined with each other without conflict. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
To facilitate understanding of the technical solutions provided by the embodiments of the present application, some key terms or procedures referred to by the embodiments of the present application are explained first:
host machine: a host may be understood as a server.
Virtual machine: a virtual machine may be understood as a resource within a host machine.
Infrastructure as a Service (IaaS), which is a Service mode in which IT Infrastructure is provided as a Service through a network and charges a resource according to an actual usage amount or an occupied amount of a user. In this service model, the user can apply for resources on a pay-as-needed basis. That is, the user can decide the specification of the application resource, what operating system is installed, and the cloud company only needs to prepare for providing the service.
A Central Processing Unit (CPU) is a final execution unit for information processing and program operation, and serves as an operation and control core of a computer system.
A Memory (Memory) is an important part of a computer, and is also called an internal Memory and a main Memory, and temporarily stores operation data in a CPU and data exchanged with an external Memory such as a hard disk.
For example, the resources of a virtual machine are: 4C8G, the resources that can be understood as a virtual machine are: 4 CPUs and 8G memory.
Compute services component (Nova): the computing service component comprises a plurality of small components, wherein an interactive interface API Server (nova-API) is arranged in the small components, and a manager can manage internal infrastructure through the interface, provide service for users through the interface and then send messages to a message queue to achieve the function of resource scheduling; computer Workers (nova-computers), are for processing management instance lifecycle. Receiving a request through a message queue and undertaking operation work; the concentrator (nova-concentrator) is responsible for controlling the access authority of the database and avoiding the nova-computer from directly accessing the database; the nova-scheduler is a component with the function of mapping the nova-API call to an Open Stack, and makes scheduling decisions according to the physical distance of the CPU architecture, available domains, memory, load, etc.
The model of differential integration Moving Average Autoregressive (ARIMA) is one of the methods of time series prediction analysis. In ARIMA (p, d, q), AR is "autoregressive" and p is the number of autoregressive terms; MA is "moving average", q is the number of terms of the moving average, and d is the number of differences (order) made to make it a stationary sequence.
At present, in the process of providing services at the IaaS layer of the cloud company, an important part is to schedule resources, that is, how to schedule a virtual machine to an optimal host machine for operation, that is, how to select a host machine, so that the resources of the host machine can be utilized to the maximum extent, specifically, for example, a host machine with less memory occupation, less CPU usage, less network bandwidth occupation, and less disk occupation is selected for scheduling.
However, the existing manners of scheduling and selecting hosts are implemented based on the result calculation of the static statistics of resources, and in particular, the solution of scheduling and selecting hosts based on the result of the static statistics means that if the resources on one host can only be matched to create one virtual machine, the number of virtual machines created on the host is only monitored regardless of the utilization rate of the created virtual machine on the resources, so as to ignore the actual utilization rate of the created virtual machine on the resources, further, it may cause a waste of resources on the host, for example, the total memory of the allocated virtual machines on the host reaches the upper limit of the host, resulting in that the virtual machines cannot be continuously allocated on the host, however, in practical situations, the host has a low memory utilization, which also occurs in the same way for the CPU and the network, obviously, the resource waste caused by the situation is more obvious along with the continuous expansion of the cloud environment.
For example, if an allocable resource is 8C16G on the host W and a virtual machine with specification of 4C8G has been created, the database may record the resource allocated with 4C8G on the host W, that is, the host W may only allocate one virtual machine with specification of 4C 8G. Obviously, the static resources on the host W cannot be allocated continuously, but in the actual implementation process, the utilization rate of resources such as CPU, memory, etc. of the host is relatively low.
In order to better utilize resources of a host machine, it is desirable to allocate more virtual machines on one host machine, but once the virtual machines are allocated to more host machines, other problems may be introduced, for example, when a load of a certain part of virtual machines is high, the operation of other virtual machines with low load may be affected, so that the use experience of a user applying for the resources is reduced, or the corresponding virtual machine of the user cannot be used.
Referring to fig. 1, fig. 1 shows average utilization rates of CPUs and memories on hosts counted by the present inventor for each host in a corresponding cloud computing cluster by using a conventional scheme for selecting hosts based on static statistics. The abscissa in fig. 1 is used to characterize the Identity Document (ID) of the computing node. Specifically, the compute node ID represents the number of the host running the virtual machine, i.e., the host is referred to as a compute node. And the ordinate in fig. 1 is used to characterize the average utilization of CPU and memory on the compute node. The hollow circles represent the average utilization rate of the CPU, and the solid circles represent the average utilization rate of the memory. The two average utilization rates are average values obtained by periodically acquiring and calculating the utilization rates of the CPU and the memory on the node. Obviously, as can be seen from fig. 1, the utilization rate of the CPU resource of each host is low and is maintained at about 15%, and the utilization rate of the memory resource 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 technology.
In view of this, in the embodiment of the present application, a new solution for selecting a host is provided, in which a target host is no longer determined by calculation based on a static statistical result of the host, but a statistical prediction of the host resource utilization is used as a method for guiding a desire of a user to apply for a resource, and the selected host, that is, the target host, is determined comprehensively by combining the resource utilization balance and the resource utilization relative saturation of the host. Specifically, the type of the target virtual machine in the scheduling selection request may be received, so that the will of the user for applying for the resource may be determined, then, the usage parameter information of the at least one host in the first time period may be obtained, prediction may be performed based on the obtained usage parameter information, the resource utilization balance and the resource utilization relative saturation of the at least one host are determined, and the target host is selected based on the result determined by the foregoing processing. Therefore, the scheme provided by the application maximally utilizes the host machine resources on the basis of keeping the existing scheduling algorithm.
After introducing the design concept of the embodiment of the present application, some simple descriptions are provided below for application scenarios to which the technical solution of the embodiment of the present application can be applied, and it should be noted that the application scenarios described below are only used for describing the embodiment of the present application and are not limited. In a 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 suitable for selection scenes of hosts corresponding to all cloud platforms. For example, the company 1 to which the cloud computing cluster corresponding to the cloud platform belongs provides a scene of the host corresponding to the virtual machine for the user a.
Referring to fig. 2, a scene schematic diagram provided in the 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 scene. It should be noted that, in an actual implementation process, there may be a plurality of secondary hosts 202, that is, the host 202-1, the secondary hosts 202-2, … …, and the secondary host 202-n, where n is a positive integer.
In the embodiment of the present application, the first host and the second host are only used for distinguishing different hosts, that is, "first", "second", and the like are used for distinguishing similar objects, and are not necessarily used for describing a specific order or a sequential order. It is to be understood that the images so used are interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or described herein.
It should be noted that the hosts in this embodiment, for example, the first host and the second host may be independent physical servers, may also be a server cluster or a distributed system formed by a plurality of physical servers, and may also be cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, Network services, cloud communications, middleware services, domain name services, security services, a CDN (Content Delivery Network), and big data and artificial intelligence platforms, but is not limited thereto.
In this embodiment of the 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 from, for example, a cloud computer cluster, and this application is not limited in this application. And the nova-api in the first host 201 sends a request to the nova-producer, the request carries a virtual machine type which can be specified by a user, then the ova-producer requests the nova-scheduler to schedule, so that the nova-scheduler requests a monitoring service, obtains a data sequence of a memory and a CPU (central processing unit) of the second host 202 in a past period of time, and uses the data sequence to model and predict an R value for ARIMA (architecture analysis of mobile communication), and the nova-scheduler calculates a virtual host meeting the condition, namely determines a target host. Specifically, the judgment mode for satisfying the condition may be to add a filtering algorithm based on the resource balance of the host and a matching user application virtual machine type algorithm, and to retain the existing characteristic filtering algorithm. Further, a virtual machine creating request can be issued to the determined target host machine, so that the virtual machine can be created.
The first host 201 and the second host 202, and the second hosts 202 may be directly or indirectly connected through one or more networks 203. The network 203 may be a wired network or a Wireless network, for example, the Wireless network may be a mobile cellular network, or may be a Wireless-Fidelity (WIFI) network, or may also be other possible networks, which is not limited in this embodiment of the present application.
Of course, the method provided in the embodiment of the present application is not limited to be used in the application scenario shown in fig. 2, and may also 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 in the following method embodiments, and will not be described in detail herein.
Referring to fig. 3, an embodiment of the present application provides a cloud computing cluster system, where the meta computing cluster system 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 aforementioned first host 201 in fig. 2, and the second host 302 may be understood as the second host 202 in fig. 2.
In the entire cloud computing cluster, hosts may be classified, for example, a control node (for receiving API requests, scheduling, and the like), a computing node (for running virtual machines), a network node (for managing networks of virtual machines, such as subnets, IPs, ports, and the like) and the like are divided according to functions.
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 in detail here. Specifically, the cloud computing cluster in fig. 3 may be, for example, a system formed by all the devices included in the application scenario in fig. 2, and will not be described one by one here.
To further explain the technical solutions provided by the embodiments of the present application, the following detailed description is made with reference to the accompanying drawings and the specific embodiments. Although the embodiments of the present application provide the method operation steps as shown in the following embodiments or figures, more or less operation steps may be included in the method based on the conventional or non-inventive labor. In steps where no necessary causal relationship exists logically, the order of execution of the steps is not limited to that provided by the embodiments of the present application. The method can be executed in sequence or in parallel according to the method shown in the embodiment or the figure when the method is executed in an actual processing procedure or a device.
Referring to fig. 4, an embodiment of the present application provides a flowchart of a host selection method. 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 process is as follows:
step 401: and receiving a scheduling selection request, wherein the scheduling selection request is determined based on a creation request of the creation virtual machine, and the creation request at least comprises a target virtual machine type.
In this embodiment of the present application, a nova-api component in a first host corresponding to a computer device, that is, a control node, may send a request to a nova-conductor, where the request carries a virtual machine type, that is, a target virtual machine type, specified by a user. Specifically, the virtual machine type may be any one of a compute type virtual machine type, a memory type virtual machine type, or an unspecified type, which is not limited in this application.
In a specific implementation process, a user may interact with a processing device corresponding to a cloud computing cluster through an electronic device corresponding to the user, so that the processing device may send a specified virtual machine type obtained from a creation request of a virtual machine creation request sent from the electronic device to a first host, and a nova-api component in the first host may determine the virtual machine type specified by the user.
Step 402: and responding to the scheduling request, and acquiring the use parameter information of at least one host in a first time period.
In this embodiment of the application, the nova-scheduler component in the first host may respond to the scheduling request, and then send an acquisition request to the monitoring service corresponding to the cloud computing cluster, where the acquisition request is used to acquire the usage parameter information of at least one host in the 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 the virtual machine in the cloud computing cluster.
In this embodiment of the application, the monitoring service is configured to monitor the operating 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 in a first time period and feed back the use parameter information to the first host, and the first host can obtain the use parameter information of at least one host in the first time period based on the feedback of the monitoring service.
In this embodiment of the present application, the first time period may be correspondingly determined based on actual implementation, for example, the first time period is 10 seconds before the current time, and when the current time is 9 o ' clock 34 minutes 10 seconds, the first time period may be 9 o ' clock 34 minutes 00 seconds to 9 o ' clock 34 minutes 10 seconds, which is not limited in this application. In addition, in the embodiment of the present application, the usage parameter information corresponding to the host machine in the first time period may be understood as information of the virtual machine running on the host machine using the resource. For example, the usage parameter information may include a memory of the host and a data sequence of the CPU in the first time period.
Therefore, in the embodiment of the application, the data of the resources of the hosts in each first time period is determined instead of the data of the resources of the hosts determined based on static statistics, so that the actual use condition of the resources of the hosts can be dynamically known, and a good implementation basis is provided for the selection of the hosts corresponding to the subsequent computing nodes.
Step 403: and determining a target host machine from the at least one host machine based on the obtained using parameter information and the type of the target virtual machine.
In this embodiment of the present application, the first host corresponding to the control node may determine the target host by using, but not limited to, the following steps:
step A: and integrating the moving average autoregressive model through a preset difference to predict the obtained use parameter information to obtain the utilization rate of each resource corresponding to at least one host.
In the embodiment of the application, in order to eliminate the influence of unstable monitoring values of resource utilization and eliminate the influence caused by burrs of monitoring data, an ARIMA (p, d, q) model is adopted to estimate the current CPU and memory usage of a host.
Specifically, the ARIMA (p, d, q) model is used to analyze time series data, learn time-varying patterns from historical data, and then use this rule to predict the future. The model obtains a predicted value through acquisition of a time sequence, preprocessing of the time sequence, model identification, model order determination, parameter estimation and model verification.
In the embodiment of the application, since the monitored values of the CPU and the memory are time series data, ARIMA (p, d, q) modeling calculation can be performed on the data to obtain the estimated value. Specifically, a threshold value Rmax is set in the application, R values of a CPU and a memory of a host are calculated through an ARIMA (p, d, q) model, and hosts with R values smaller than Rmax are selected when screening the hosts, so as to prevent Occurrence of Out of Memory (OOM) or slow operation of the hosts due to overload of the hosts.
And B, step B: and determining a target sorting rule based on the type of the target virtual machine, and sorting 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.
In the embodiment of the application, when the type of the target virtual machine is determined to be a calculation type, determining a target sorting rule to sort at least one host according to the utilization rate of a CPU; when the type of the target virtual machine is determined to be a memory type, determining a target sorting rule as sorting at least one host according to the utilization rate of the memory; and when the type of the target virtual machine is determined to be the unspecified type, determining the target sorting rule to sort at least one host machine according to the average value determined by the utilization rate of the CPU and the corresponding memory.
Therefore, in the embodiment of the application, the corresponding target sorting rules are provided for different target virtual machine types, so that the requirements of users for applying resources can be met more accurately, various implementation schemes are provided, sorting influence caused by the target sorting rules based on no difference is avoided, and the screening accuracy of the hosts corresponding to the computing nodes is improved.
In the embodiment of the application, a sequencing sequence number of at least one host is determined based on a target sequencing rule and the utilization rate of each resource corresponding to the at least one host; and screening host machines with the sequencing sequence numbers meeting preset conditions from at least one host machine, and determining a candidate host machine set. The preset condition may be to screen the first N sequencing sequence numbers from small to large, where N is a positive integer, and a value of N may be correspondingly determined based on actual implementation, which is not limited in this application.
For example, assuming that the type of the target virtual machine is a calculation type, 5 hosts are sorted based on the utilization rates of the CPUs corresponding to the 5 hosts, and the 5 hosts, i.e., host a, host B, host C, host D, and host E, are determined, and the corresponding sorting order numbers are 3, 2, 1, 4, and 5, that is, the utilization rate of the CPU of host C is the maximum, and the utilization rate of the CPU of host E is the minimum, so that the host a, the host B, and the host C can be screened out as candidate hosts based on the preset screening condition.
And C: and determining the target host from the candidate host set.
In the embodiment of the present application, from the candidate host set, the following steps may be adopted for determining the target host, but are not limited to:
step a: and 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 present application, because each virtual machine uses different resources of a host machine, the remaining resources of each host machine are constantly changed, and in order to avoid excessive or less remaining resources, it is necessary to keep the usage balance among the resources of each host machine 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 present application, the following operations are respectively performed for the utilization rate of each resource of any candidate host: determining the average value of the utilization rate of the CPU resource and the utilization rate of the memory resource of the candidate host machine; determining a first processing value based on the utilization rate and the average value of the CPU resources of the candidate host machine; the first processing value is used for representing the used degree of the CPU resource; determining a second processing value based on the memory resources and the mean value of the candidate host; the second processing value is used for representing the used degree of the memory resource; and correspondingly determining the resource utilization balance degree of the candidate host machine based on the first processing value and the second processing value.
Specifically, the resource utilization balance of the candidate host may be determined by using the following formula one:
Figure BDA0003644638030000171
wherein u is j cpu Benefits for characterizing CPU resources of candidate hostsRate of utilization u j mem Utilization of memory resources, u, for characterizing candidate hosts j Represents the average of these two resource utilizations, L j The value range is [0, 1 ]]。
Obviously, in a specific implementation, when determining the L of a candidate host j The larger the value, the more balanced the resource utilization of the candidate hosts can be determined; and, when determining the L of the candidate host j The smaller the value, the more unbalanced the resource utilization of the candidate host can be determined.
Step b: and screening the 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 determined based on actual implementation, which is not limited in the embodiment of the present application.
Step c: determining relative resource utilization 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; the resource utilization relative saturation is used for representing whether each resource of the candidate host reaches the progress of being utilized to the maximum extent.
In this embodiment of the present application, for the utilization rate of each resource of the candidate hosts in any first subset of candidate hosts, the following operations are respectively performed:
determining the average value of the utilization rate of the CPU resource and the utilization rate of the memory resource of the candidate host machine; determining resource utilization relative saturation of the CPU resource of the candidate host machine based on the difference value between the utilization rate of the CPU resource of the candidate host machine and the average value; and determining the relative resource utilization saturation of the memory resources of the candidate host machine based on the difference between the utilization rate and the average value of the memory resources of the candidate host machine.
Specifically, the following formula two may be adopted to determine the relative saturation of resource utilization of the candidate hosts in the first candidate host subset:
Figure BDA0003644638030000172
wherein u is j cpu Utilization of CPU resources, u, to characterize candidate hosts j mem Utilization of memory resources, u, for characterizing candidate hosts j Average value used to characterize the utilization of these two resources, d j For characterizing the relative saturation of any resource utilization, d j Either negative or positive, i.e. d j mem Resource utilization relative saturation, d, for characterizing memory resources of candidate hosts j cpu Resource utilization relative saturation for characterizing CPU resources of a candidate host.
In the examples of the present application, d j A larger value 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 specifies that the virtual machine type is a computing type when applying for the virtual machine, d is selected during scheduling j cpu The smaller the value of the host, if the user specifies the virtual machine type as the memory type machine when applying for the virtual machine, then select d during scheduling j mem The smaller the value of the host.
Step d: and screening host machines with the resource utilization relative saturation meeting a preset threshold value from the first candidate host machine subset, and determining the target host machine.
In the examples of the present application, d j A larger value 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 specifies that the virtual machine type is a computing type when applying for the virtual machine, d is selected during scheduling j cpu The smaller the value of the host, if the user specifies the virtual machine type as the memory type machine when applying for the virtual machine, then select d during scheduling j mem The smaller the value of the host.
Specifically, the preset threshold may be determined according to 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 according to actual implementation, and the present application is not limited in this embodiment.
In the embodiment of the present application, in order to better describe the method for selecting a host provided by the present application, a process for creating a virtual machine is taken as an example and described below.
Referring to fig. 5, in this embodiment of the present application, a nova-api in a first host corresponding to a control node issues a request to a nova-conductor, and the request carries a virtual machine type that can be specified by a user, such as a compute type. Then, the nova-conductor in the first host corresponding to the control node requests the nova-scheduler to schedule. Further, a nova-scheduler request monitoring service in a first host corresponding to the control node acquires a data sequence of a memory and a CPU (central processing unit) of a second host corresponding to each computing node in a first time period, and the data sequence is used for ARIMA (p, d, q) modeling and predicting R values.
Specifically, the monitoring service may feed back the data sequence of the memory and the CPU of the second host corresponding to each computing node in the first time 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 may calculate a virtual machine host satisfying the condition, and specifically, the condition corresponding to the nova-scheduler in the first host corresponding to the control node is determined by adding a filtering algorithm based on the host resource balance and a virtual machine type algorithm matching the user application on the basis of keeping the existing characteristic filtering algorithm. And finally, the nova-scheduler in the first host corresponding to the control node issues a virtual machine creation request to the determined target host, so that the virtual machine creation request of the user is processed.
In a specific implementation process, the existing characteristic filtering algorithm can be understood as a plurality of selective host filtering algorithms contained in the nova-scheduler in the first host corresponding to the control node. More than 20 actual filtering algorithms are executed, and the most suitable host is selected. For example, if the filtering algorithm is an algorithm of Aggregate instant Extra Specs Filter, i.e. by creating a virtual machine-specified navigator (inside specifies similar tag), it will select an Aggregate with the same tag, and multiple hosts are included under the Aggregate.
In the embodiment of the present application, the process of determining the target host may be represented by, but not limited to, the following pseudo code:
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 may be understood as: step 1: and inputting the host to be filtered, namely determining the host to be selected. Step 2: and predicting the utilization value R of each current resource according to an ARIMA (p, d, q) model, and filtering and screening Rmax. And 3, step 3: and (3) carrying out ascending arrangement on H' according to the R value (namely sortAscedingResourceUusages) obtained in the step (2), wherein the Resource corresponds to the type of the virtual machine applied by the user, and the percentThreshold is a configurable percentage. And 4, step 4: and performing ascending arrangement according to the resource utilization balance degree of the resources. And 5, step 5: and finding out the host with the minimum relative saturation of the application resource, wherein the percentThreshold is a configurable percentage. And 6, a step of: and returning the screened target host machine.
Therefore, in the embodiment of the application, the ARIMA (p, d, q) model is adopted to estimate the current values of the CPU and the memory of the host, so that the influence of unstable parameter information, namely the resource utilization monitoring value obtained based on the monitoring service, is eliminated, and the influence of the burr data is eliminated, thereby more accurately making the judgment. In addition, the method and the device can accurately issue the virtual machines to corresponding host machines according to the types of the virtual machines applied by the users, and select the target host machine by integrally considering the screening of the resource balance degree and the resource relative saturation degree of the host machines, thereby improving the resource utilization rate of the host machines. In addition, compared with a scheme of scheduling selection based on static statistics in the prior art, judgment is made based on dynamic data obtained by monitoring service, and the method and the device are more beneficial to utilization of host machine resources, so that the resource utilization rate of the host machine is improved.
Fig. 6 is a schematic diagram illustrating a CPU utilization rate and a memory utilization rate of a host determined by the solution provided in the present application. Obviously, by adopting the scheme provided by the application to screen the host machine, the CPU utilization rate of the host machine is improved after the host machine runs for a period of time, and the CPU utilization rate tends to be close to the memory utilization rate.
Based on the same inventive concept, the embodiment of the application also provides a host machine selection device. As shown in fig. 7, 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 at least includes a target virtual machine type;
an obtaining unit 702, configured to obtain, in response to the scheduling request, usage parameter information of at least one host in a first time period;
a determining unit 703, configured to determine a target host from the at least one host based on the obtained each piece of usage parameter information and the type of the target virtual machine.
In a possible implementation, the determining unit 703 is configured to:
integrating a moving average autoregressive model through a preset difference, and performing prediction processing on the obtained use parameter information to obtain the utilization rate of each resource corresponding to the at least one host;
determining a target sorting rule based on the type of the target virtual machine, and 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;
and determining a target host from the candidate host set.
In a possible implementation, the determining unit 703 is configured to:
when the type of the target virtual machine is determined to be a calculation type, determining the target sorting rule to sort the 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, determining that the target sorting rule is to sort the at least one host according to the utilization rate of the memory;
when the type of the target virtual machine is determined to be a non-specified type, determining that the target sorting rule is to sort the at least one host according to a mean value determined by the utilization rates of the CPU and the corresponding memory.
In a possible implementation, 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 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, the determining unit 703 is configured to:
determining resource utilization balance of each candidate host in the candidate host set based on utilization rate of each resource of each candidate host in the candidate host set;
screening host machines with resource utilization balance degrees meeting a preset range from the candidate host machine set to obtain a first candidate host machine subset;
determining relative saturation of resource utilization of each candidate host in the first subset of candidate hosts based on utilization of each resource of each candidate host in the first subset of candidate hosts; the resource utilization relative saturation is used for representing whether each resource of the candidate host reaches the progress of being utilized to the maximum extent;
and screening host machines with the resource utilization relative saturation meeting a preset threshold value from the first candidate host machine subset, and determining a target host machine.
In a possible implementation, the determining unit 703 is configured to:
aiming at the utilization rate of each resource of any candidate host machine, 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 machine;
determining a first processing value based on the utilization rate of the CPU resource of the candidate host and the average value; the first processing value is used for representing the used degree of CPU resources; and the number of the first and second groups,
determining a second processing value based on the memory resources of the candidate host and the mean value; the second processing value is used for representing the used degree of the memory resource;
and correspondingly determining the resource utilization balance degree of the candidate host machine based on the first processing value and the second processing value.
In a possible implementation, the determining unit 703 is configured to:
for the utilization rate of each resource of the candidate hosts in any one of the first subset of candidate hosts, respectively performing the following operations:
determining the average value of the utilization rate of the CPU resource and the utilization rate of the memory resource of the candidate host machine;
determining resource utilization relative saturation of the CPU resource of the candidate host machine based on the difference between the utilization rate of the CPU resource of the candidate host machine and the average value; and the number of the first and second groups,
and determining the relative resource utilization saturation of the memory resources of the candidate host machine based on the difference between the utilization rate of the memory resources of the candidate host machine and the average value.
For convenience of description, the above parts are separately described as modules (or units) according to functional division. Of course, the functionality of the various modules (or units) may be implemented in the same one or more 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, a computer device according to another exemplary embodiment of the present application will be described.
As will be appreciated by one skilled in the art, aspects of the present application may be embodied as a system, method or program product. Accordingly, various aspects of the present application may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
The invention is based on the same inventive concept as the method embodiment, and the embodiment of the application also provides computer equipment. In one embodiment, the computer device may be a server, such as the server shown in FIG. 2. In this embodiment, a structure of a computer device may be as shown in fig. 8, and an embodiment of the present application further provides a computer device, as shown in fig. 8, a computer device in this embodiment of the present application includes at least one processor 801, a memory 802 and a communication interface 803 that are connected to the at least one processor 801, a specific connection medium between the processor 801 and the memory 802 is not limited in this embodiment of the present application, in fig. 8, a connection between the processor 801 and the memory 802 is taken as an example through a bus 800, the bus 800 is shown by a thick line in fig. 8, and a connection manner between other components is merely schematically illustrated and is not taken as a limitation. The bus 800 may be divided into an address bus, a data bus, a control bus, etc., and is shown in fig. 8 with only one thick line for ease of illustration, but does not represent only one bus or 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 may execute the steps included in the method for selecting a host by executing the instructions stored in the memory 802.
The processor 801 is a control center of the computer device, and may connect various parts of the entire fault detection device by using various interfaces and lines, and may implement various functions of the computer device by executing or executing instructions stored in the memory 802 and calling 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 mainly processes an operating system, a user interface, an application program, and the like, and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 801. In some embodiments, the processor 801 and the memory 802 may be implemented on the same chip, or in some embodiments, they may be implemented separately on separate chips.
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, discrete hardware components, or the like, that may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present application. A 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 directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in a processor.
The memory 802, which is 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, and may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charge Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and so on. The 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 in the embodiments of the present application may also be circuitry or any other device capable of performing a storage function for storing program instructions and/or data.
The communication interface 803 is a transmission interface that can be used for communication, and can receive data or transmit data via the communication interface 803.
The computer device also includes a basic input/output system (I/O system) 804 for facilitating information transfer between the various devices within the computer device, and a mass storage device 808 for storing an operating system 805, application programs 806, and other program modules 807.
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 connected to the processor 801 through the basic input/output system 804 coupled to the system bus 800. The basic input/output system 804 may also include, among other things, an input/output controller for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, an input-output controller may also provide output to a display screen, a printer, or other type of output device.
In particular, the mass storage device 808 is coupled to the processor 801 through a mass storage controller (not shown) that is coupled to the 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.
According to various embodiments of the present application, the computer device may also operate as a remote computer connected to a network through a network, such as the Internet. That is, the computer device may be connected to the network 811 through the communication interface 803 connected to the system bus 800, or may be connected to another type of network or a remote computer system (not shown) using the communication interface 803.
In some possible embodiments, various aspects of the selection method of a host provided by the present application may also be implemented in the form of a program product including program code for causing a computer device to perform the steps in the selection method of a host according to various exemplary embodiments of the present application described above in this specification when the program product is run on the 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 may be, for example, but 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 the readable storage medium include: an electrical connection having one or more wires, a portable diskette, 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 be 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.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. 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 computing device, partly on the user equipment, as a stand-alone software package, partly on the user computing device and 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., through the internet using an internet service provider).
While the 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. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all changes and modifications that fall within the scope of the present application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A method for 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 request, and acquiring the use parameter information of at least one host machine in a first time period;
and determining a target host machine from the at least one host machine based on the obtained use parameter information and the type of the target virtual machine.
2. The method of claim 1, wherein determining a target host from the at least one host based on the obtained respective usage parameter information and the target virtual machine type comprises:
integrating a moving average autoregressive model through a preset difference, and performing prediction processing on the obtained use parameter information to obtain the utilization rate of each resource corresponding to the at least one host;
determining a target sorting rule based on the type of the target virtual machine, and 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;
and determining a target host from the candidate host set.
3. The method of claim 2, wherein determining a target ordering rule based on the target virtual machine type comprises:
when the type of the target virtual machine is determined to be a calculation type, determining the target sorting rule to sort the 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, determining the target sorting rule to sort the at least one host according to the utilization rate of the memory;
and when the type of the target virtual machine is determined to be the unspecified type, determining that the target sorting rule is to sort the at least one host machine according to the average value determined by the utilization rate of the CPU and the corresponding memory.
4. The method of claim 3, wherein ranking the at least one host based on the target ranking rule and utilization of resources corresponding to the at least one host to determine a set of candidate hosts 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 host machines with the sequencing sequence numbers meeting preset conditions from the at least one host machine, and determining a candidate host machine set.
5. The method of claim 2, wherein determining a target host from the set of candidate hosts comprises:
determining resource utilization balance of each candidate host in the candidate host set based on utilization rate of each resource of each candidate host in the candidate host set;
screening host machines with resource utilization balance degrees meeting a preset range from the candidate host machine set to obtain a first candidate host machine subset;
determining relative saturation of resource utilization of each candidate host in the first subset of candidate hosts based on utilization of each resource of each candidate host in the first subset of candidate hosts; the resource utilization relative saturation is used for representing whether each resource of the candidate host reaches the progress of being utilized to the maximum extent;
and screening host machines with the resource utilization relative saturation meeting a preset threshold value from the first candidate host machine subset, and determining a target host machine.
6. The method of claim 5, wherein determining a resource utilization balance for each candidate host in the set of candidate hosts based on utilization of each resource of each candidate host in the set of candidate hosts comprises:
aiming at the utilization rate of each resource of any candidate host machine, 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 machine;
determining a first processing value based on the utilization rate of the CPU resource of the candidate host and the average value; the first processing value is used for representing the used degree of CPU resources; and the number of the first and second groups,
determining a second processing value based on the memory resources of the candidate host and the mean value; the second processing value is used for representing the used degree of the memory resource;
and correspondingly determining the resource utilization balance degree of the candidate host machine based on the first processing value and the second processing value.
7. The method of claim 5, wherein determining relative saturation of resource utilization for each candidate host in the first subset of candidate hosts based on each resource utilization for each candidate host in the first subset of candidate hosts comprises:
for the utilization rate of each resource of the candidate hosts in any one of the first subset of candidate hosts, respectively performing the following operations:
determining the average value of the utilization rate of the CPU resource and the utilization rate of the memory resource of the candidate host machine;
determining resource utilization relative saturation of the CPU resource of the candidate host machine based on the difference between the utilization rate of the CPU resource of the candidate host machine and the average value; and the number of the first and second groups,
and determining the relative resource utilization saturation of the memory resources of the candidate host machine based on the difference between the utilization rate of the memory resources of the candidate host machine and the average value.
8. An apparatus for host selection, the apparatus comprising:
a receiving unit, 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 at least includes a target virtual machine type;
the obtaining unit is used for responding to the scheduling request and obtaining the use parameter information of at least one host machine in a first time period;
a determining unit, configured to determine a target host from the at least one host based on the obtained usage parameter information and the type of the target virtual machine.
9. A computer device, characterized in that the computer device comprises: memory, processor and computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the selection method of a host according to any one of claims 1 to 7.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the selection method of a host according to any one of claims 1 to 7.
CN202210526616.7A 2022-05-16 2022-05-16 Host selection method and related device Pending CN115033340A (en)

Priority Applications (1)

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

Applications Claiming Priority (1)

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

Publications (1)

Publication Number Publication Date
CN115033340A true CN115033340A (en) 2022-09-09

Family

ID=83121861

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN115033340A (en)

Cited By (4)

* 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
CN115878329A (en) * 2023-02-02 2023-03-31 天翼云科技有限公司 Host resource scheduling method and device, electronic equipment and storage medium
CN115904717A (en) * 2022-11-30 2023-04-04 湖南长银五八消费金融股份有限公司 Method and device for deploying application system in cloud platform and computer equipment
CN116881001A (en) * 2023-07-04 2023-10-13 中科驭数(北京)科技有限公司 Method, device, equipment and medium for managing and controlling cloud platform of multiple DPU hosts

Cited By (6)

* 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
CN115904717A (en) * 2022-11-30 2023-04-04 湖南长银五八消费金融股份有限公司 Method and device for deploying application system in cloud platform and computer equipment
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
CN116881001A (en) * 2023-07-04 2023-10-13 中科驭数(北京)科技有限公司 Method, device, equipment and medium for managing and controlling cloud platform of multiple DPU hosts
CN116881001B (en) * 2023-07-04 2024-03-01 中科驭数(北京)科技有限公司 Method, device, equipment and medium for managing and controlling cloud platform of multiple DPU hosts

Similar Documents

Publication Publication Date Title
CN109803004B (en) Block chain intelligent contract management method and device, electronic equipment and storage medium
CN112153700B (en) Network slice resource management method and equipment
CN109783237B (en) Resource allocation method and device
CN115033340A (en) Host selection method and related device
CN108052615B (en) Access request processing method, device, medium and electronic equipment
US20160218950A1 (en) Proactive identification of hotspots in a cloud computing environment
CN112465146B (en) Quantum and classical hybrid cloud platform and task execution method
WO2019091387A1 (en) Method and system for provisioning resources in cloud computing
US10353738B2 (en) Resource allocation based on social networking trends in a networked computing environment
US11579933B2 (en) Method for establishing system resource prediction and resource management model through multi-layer correlations
CN113037877B (en) Optimization method for time-space data and resource scheduling under cloud edge architecture
US20170344400A1 (en) Method and system for performance ticket reduction
WO2020148342A1 (en) A method and a system for managing the computing resources of a cloud computing platform
CN111309440B (en) Method and equipment for managing and scheduling multiple types of GPUs
CN110162407A (en) A kind of method for managing resource and device
CN114625500A (en) Method and application for scheduling micro-service application based on topology perception in cloud environment
CN109347982A (en) A kind of dispatching method and device of data center
CN117311973A (en) Computing device scheduling method and device, nonvolatile storage medium and electronic device
CN111143033A (en) Operation execution method and device based on scalable operating system
AU2021269911B2 (en) Optimized deployment of analytic models in an edge topology
CN108829516A (en) A kind of graphics processor resource virtualizing dispatching method
KR102284264B1 (en) Cloud system and control method thereof
CN114201306A (en) Multi-dimensional geographic space entity distribution method and system based on load balancing technology
CN114237902A (en) Service deployment method and device, electronic equipment and computer readable medium
Yu et al. A two steps method of resources utilization predication for large Hadoop data center

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