CN114327824A - Method and device for determining service host and electronic equipment - Google Patents

Method and device for determining service host and electronic equipment Download PDF

Info

Publication number
CN114327824A
CN114327824A CN202111623921.XA CN202111623921A CN114327824A CN 114327824 A CN114327824 A CN 114327824A CN 202111623921 A CN202111623921 A CN 202111623921A CN 114327824 A CN114327824 A CN 114327824A
Authority
CN
China
Prior art keywords
service host
resource
online service
virtual machine
historical
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
CN202111623921.XA
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.)
Nsfocus Technologies Inc
Nsfocus Technologies Group Co Ltd
Original Assignee
Nsfocus Technologies Inc
Nsfocus Technologies Group 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 Nsfocus Technologies Inc, Nsfocus Technologies Group Co Ltd filed Critical Nsfocus Technologies Inc
Priority to CN202111623921.XA priority Critical patent/CN114327824A/en
Publication of CN114327824A publication Critical patent/CN114327824A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

A method, a device and an electronic device for determining a service host are provided, wherein the method comprises the following steps: responding to a request for creating a virtual machine, determining all online service hosts on a computing node, determining resource consumption rates corresponding to all historical virtual machines on each online service host, calculating resource allocation rates corresponding to all online service hosts to the virtual machine in creation, bringing the resource consumption rates and the resource allocation rates into a preset algorithm, calculating resource residual evaluation values corresponding to each online service host, screening out minimum resource residual evaluation values from all the resource residual evaluation values, and taking the online service host corresponding to the minimum resource residual evaluation values as a target service host corresponding to the virtual machine to be created. By the method, the service host corresponding to the minimum resource residual evaluation value is screened out to serve as the target service host, the load of all the service hosts on the computing node is balanced, and the screened target service host is ensured to quickly establish the virtual machine.

Description

Method and device for determining service host and electronic equipment
Technical Field
The present application relates to the field of network shooting range technologies, and in particular, to a method and an apparatus for determining a service host, and an electronic device.
Background
The network shooting range simulates and simulates a real network space attack and defense combat environment through the combination of a virtual environment and real equipment, so that the behaviors related to network safety, such as learning, research, inspection, competition, exercise and the like, can be realized, the construction of the real network space attack and defense environment needs a service host on a computing node to establish a virtual machine, and how to quickly establish the virtual machine becomes the primary problem, the speed of establishing the virtual machine is related to the resource surplus rate of the service host, the memory and the load of the service host, and the speed of establishing the virtual machine by the service host is higher when the resource surplus rate of the service host is smaller, the memory is larger and the load of the service host is smaller.
At present, the fast creation of a virtual machine is realized based on a resource scheduling tuning algorithm, and the specific process of creating a virtual machine based on the resource scheduling tuning algorithm includes:
when the control node detects the task of creating the virtual machine, the control node writes the task of creating the virtual machine into a message queue, the scheduler takes out the information of the virtual machine to be created from the message queue and issues the task of creating the virtual machine to a plurality of associated service hosts on the computing node based on a resource scheduling and optimizing algorithm, when the task of creating the virtual machine is issued to the service hosts, the resource scheduler optimizing algorithm is to sort the resource utilization rate of each service host on the computing node, screen out the service host with the lowest resource utilization rate, use the service host as a target service host and control the target service host to create the virtual machine, however, when the target service host screened out by adopting the scheduling and optimizing algorithm creates the virtual machine, because the condition of screening out the target service host is only the resource utilization rate, the load and the memory of the target service host can not be ensured to be in the optimal state, when the memory of the service host is smaller or the load is larger, the speed of the target service host for creating the virtual machine is slower.
Disclosure of Invention
The application provides a method, a device and an electronic device for determining a service host, wherein a minimum resource residual evaluation value is screened out by calculating resource residual evaluation values of all service hosts on a computing node, and the service host corresponding to the minimum resource residual evaluation value is used as a target service host to control the target service host to create a virtual machine, so that the load of all service hosts on the computing node is balanced, and the speed of creating the virtual machine by the service hosts on the computing node is increased.
In a first aspect, the present application provides a method for determining a service host, where the method includes:
responding to a request for creating a virtual machine, and determining all online service hosts on a computing node;
determining resource consumption rates corresponding to all historical virtual machines on each online service host, and calculating resource allocation rates corresponding to virtual machines distributed to the online service host in the creation process;
substituting the resource consumption rate and the resource allocation rate into a preset algorithm, and calculating a resource residual evaluation value corresponding to each online service host;
and screening out the minimum resource residual evaluation value from all the resource residual evaluation values, and taking the online service host corresponding to the minimum resource residual evaluation value as a target service host corresponding to the virtual machine to be created.
In one possible design, the resource consumption rates corresponding to all historical virtual machines on each online service host include:
acquiring historical resource allocation rates and actual resource utilization rates respectively corresponding to all historical virtual machines;
for each online service host, the following steps are performed:
calculating the historical resource allocation rate of each historical virtual machine on the online service host and a resource consumption evaluation value corresponding to the actual resource utilization rate;
and summing the resource consumption evaluation values corresponding to each historical virtual machine on the online service host to obtain the resource consumption rates corresponding to all the historical virtual machines on the online service host.
In one possible design, calculating a resource allocation rate corresponding to allocation of each online service host to the virtual machine under creation includes:
acquiring resource request rates respectively corresponding to all created virtual machines;
for each online service host, the following steps are performed:
calculating resource request evaluation values respectively corresponding to all created virtual machines corresponding to the online service host;
and summing the resource request evaluation values corresponding to the virtual machines in each creation on the online service host to respectively obtain the resource allocation rates corresponding to the virtual machines in all the creations on the online service host.
In a possible design, substituting the resource consumption rate and the resource allocation rate into a preset algorithm, and calculating a resource remaining evaluation value corresponding to each online service host includes:
acquiring the load of each online service host and the resource copy consumption rate of the virtual machine to be created on the online service host;
and performing weighted calculation on the resource consumption rate, the resource allocation rate, the load of the online service host and the resource copy consumption rate of the online service host, and taking the value after weighted calculation as a resource residual evaluation value corresponding to each online service host.
In a second aspect, the present application provides an apparatus for determining a service host, where the apparatus includes:
the response module is used for responding to the request for creating the virtual machine and determining all online service hosts on the computing node;
the determining module is used for determining the resource consumption rate corresponding to all the historical virtual machines on each online service host and calculating the resource allocation rate corresponding to the virtual machine which is allocated to be established by each online service host;
the computing module is used for substituting the resource consumption rate and the resource allocation rate into a preset algorithm and computing a resource residual evaluation value corresponding to each online service host;
and the screening module is used for screening out the minimum resource residual evaluation value from all the resource residual evaluation values, and taking the online service host corresponding to the minimum resource residual evaluation value as a target service host corresponding to the virtual machine to be created.
In a possible design, the determining module is specifically configured to obtain historical resource allocation rates and actual resource usage rates corresponding to all historical virtual machines, and for each online service host, perform the following steps: calculating the historical resource allocation rate of each historical virtual machine on the online service host and the resource consumption evaluation value corresponding to the actual resource utilization rate, and summing the resource consumption evaluation values corresponding to each historical virtual machine on the online service host to obtain the resource consumption rates corresponding to all the historical virtual machines on the online service host.
In a possible design, the determining module is further configured to obtain resource request rates respectively corresponding to all the virtual machines under creation, and perform the following steps for each online service host: calculating resource request evaluation values respectively corresponding to all created virtual machines corresponding to the online service host, summing the resource request evaluation values corresponding to each created virtual machine on the online service host, and respectively obtaining resource allocation rates corresponding to all created virtual machines on the online service host.
In a possible design, the calculation module is specifically configured to obtain a load of each online service host and a resource copy consumption rate of the virtual machine to be created on the online service host, perform weighted calculation on the resource consumption rate, the resource allocation rate, the load of the online service host and the resource copy consumption rate of the online service host, and use a value after the weighted calculation as a resource remaining evaluation value corresponding to each online service host.
In a third aspect, the present application provides an electronic device, comprising:
a memory for storing a computer program;
and the processor is used for realizing the steps of the method for determining the service host when executing the computer program stored in the memory.
In a fourth aspect, a computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the above-mentioned method steps of a service host determination method.
For each of the first to fourth aspects and possible technical effects of each aspect, please refer to the above description of the possible technical effects for the first aspect or each possible solution in the first aspect, and no repeated description is given here.
Drawings
Fig. 1 is a flowchart of steps of a method for determining a service host according to the present application;
fig. 2 is a schematic structural diagram of a determining apparatus of a service host provided in the present application;
fig. 3 is a schematic structural diagram of an electronic device provided in the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clear, the present application will be further described in detail with reference to the accompanying drawings. The particular methods of operation in the method embodiments may also be applied to apparatus embodiments or system embodiments. It should be noted that "a plurality" is understood as "at least two" in the description of the present application. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. A is connected with B and can represent: a and B are directly connected and A and B are connected through C. In addition, in the description of the present application, the terms "first," "second," and the like are used for descriptive purposes only and are not intended to indicate or imply relative importance nor order to be construed.
In the prior art, a resource scheduling tuning algorithm is used for screening out service hosts for creating virtual machines from all service hosts on a computing node, and the resource scheduling tuning algorithm is only implemented from a single dimension: the resource utilization rate screens all the service hosts, when the service host screened to create the virtual machine has the lowest resource utilization rate, the load and the memory of the service host cannot be ensured to be in the optimal state, and when the memory of the service host is smaller or the load is larger, the speed of creating the virtual machine by the target service host is slower.
In order to solve the above problem, an embodiment of the present application provides a method for determining a service host, so as to screen out a service host with the fastest virtual machine creation speed from all service hosts on a computing node, and balance loads of all service hosts on the computing node. The method and the device in the embodiment of the application are based on the same technical concept, and because the principles of the problems solved by the method and the device are similar, the device and the embodiment of the method can be mutually referred, and repeated parts are not repeated.
The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Referring to fig. 1, the present application provides a method for determining a service host, which can screen out an online service host with the fastest virtual machine creation speed from all online service hosts on a computing node, and balance the load of all online service hosts on the computing node, and the method is implemented by the following processes:
step S1: and responding to the request for creating the virtual machine, and determining all online service hosts on the computing node.
When the computing node receives a request of the control node for creating the virtual machine, the computing node responds to the request for creating the virtual machine, the scheduler screens out online service hosts with the highest virtual machine creating speed from all online service hosts on the computing node, in order to screen out the service hosts with faults on the computing node, the computing node sends access information to each service host on the computing node, when the service hosts are online, the response information is sent to the computing node, and the computing node can determine all online service hosts.
By the method, the online service hosts are screened out from all the service hosts connected with the computing node, and the condition that the computing node sends an invalid request for creating the virtual machine due to the fact that the service hosts are not connected is avoided.
Step S2: and determining the resource consumption rate corresponding to all the historical virtual machines on each online service host, and calculating the resource allocation rate corresponding to the virtual machine which is allocated to the online service host in the creation process.
After the computing node determines all online service hosts, in order to calculate the resource remaining amount corresponding to each online service host, it is necessary to count the resource consumption amount corresponding to all virtual machines already created by each online service host and the resource allocation rate corresponding to all virtual machines in the creation, and a specific process of obtaining the resource consumption amount corresponding to all virtual machines already created by each online service host is as follows:
when the online service host is creating a virtual machine, the resource allocation rate of the virtual machine is preset to ensure that the virtual machine can be normally created on the online service host, after the virtual machine is successfully created, the actual resource utilization rate of the virtual machine can be obtained, under the condition that the virtual machine is ensured to normally run, a difference exists between the actually used resource of the virtual machine and the allocated resource, and before the virtual machine to be created is created, in order to avoid a large error between the actually used resource of the virtual machine and the allocated resource to cause resource occupation, the resource consumption evaluation value corresponding to the historical virtual machine of each online service host needs to be determined.
When calculating the resource consumption amount corresponding to all the historical virtual machines of each online service host, since the resource consumption amount is the sum of the resource consumption evaluation values corresponding to each historical virtual machine on the online service host, the historical resource allocation rate and the actual resource utilization rate corresponding to each historical virtual machine need to be obtained.
After obtaining the historical resource allocation rate and the actual resource usage rate corresponding to each historical virtual machine, in order to avoid the influence of data with a large difference between the historical resource allocation rate and the actual resource usage rate, in this embodiment of the present application, a specific formula for calculating the resource consumption rates corresponding to all historical virtual machines on the online service host is as follows:
Figure BDA0003439273380000071
in formula I, BiRepresenting the resource consumption evaluation value of all historical virtual machines on each online service host, i representing the number of online service hosts, N representing the number of virtual machines, when the jth virtual machine falls on the ith host machine, Dij1, otherwise Dij=0,VjRepresenting the historical resource allocation rate of the historical virtual machine, AjRepresenting the actual resource usage of the historical virtual machine.
Based on the above formula, after determining resource consumption rates corresponding to all historical virtual machines on the online service host, in order to accurately count the resource remaining amount of each online service host due to the fact that the online service host is creating a virtual machine, it is further necessary to count resources allocated to the virtual machine in creation by each online service host, obtain resource request rates corresponding to all virtual machines in creation on the online service host, and after obtaining the resource request rates, obtain a specific formula two for obtaining a resource request evaluation value corresponding to each virtual machine in creation on each online service host as follows:
Figure BDA0003439273380000072
in the second formula, HiRepresenting the resource consumption of all the creating virtual machines on each online service host, L representing the number of virtual machines in creation, WiRepresenting virtual machines in each creationResource request rate, when the jth virtual machine is on the ith host machine, then Mij1, otherwise Mij=0。
Based on the above formula, the resource request evaluation value corresponding to each virtual machine in creation on each online service host and the resource allocation rate of the online service host to all virtual machines in creation obtained after adding all resource request evaluation values can be calculated.
Based on the above description, the resource consumption and the resource allocation rate respectively corresponding to all the historical virtual machines and all the created virtual machines on each online service host are calculated through the formula one and the formula two, so that the resource consumed by each online service host can be intuitively determined.
Step S3: and substituting the resource consumption rate and the resource allocation rate into a preset algorithm, and calculating a resource residual evaluation value corresponding to each online service host.
After determining the resource consumption rate and the resource allocation rate of each online service host, in order to ensure that the online service host can quickly create the virtual machine, the load of the online service host and the resource copy consumption rate of the virtual machine to be created in the creation process need to be considered.
After obtaining the load of the online service host and the resource copy consumption rate required by creating the virtual machine to be created, in order to determine the remaining resource evaluation value corresponding to each online service host, the obtained resource consumption rate, resource allocation rate, load of the online service host and resource copy consumption rate of the online service host need to be substituted into the following formula three, which is as follows:
Figure BDA0003439273380000081
in formula III, PiRepresenting the load of the online service host, CiRepresenting the resource copy consumption of the virtual machine to be created on the online service host, if the parameters of the created virtual machine are set when the online service host creates the virtual machine, CiIs constant, otherwise, CiIs zero, SiIndicating the resource remaining evaluation value of the online service host.
Based on the third formula, the resource residual evaluation value corresponding to each online service host can be calculated, and the resource residual corresponding to each online service host is digitalized, so that the efficiency of screening the target online service host from all online service hosts is improved.
Step S4: and screening out the minimum resource residual evaluation value from all the resource residual evaluation values, and taking the online service host corresponding to the minimum resource residual evaluation value as a target service host corresponding to the virtual machine to be created.
In the above description, the resource remaining evaluation value corresponding to each online service host has been obtained, in order to ensure the efficiency when creating the virtual machine to be created, the minimum resource needs to be screened out from all resource remaining evaluation values, and the remaining evaluation value is screened out, and the method of the remaining evaluation value is as follows:
in the embodiment of the present application, all the resource remaining evaluation values are arranged in descending order, so as to determine the minimum resource remaining evaluation value, and the method for determining the minimum resource remaining evaluation value may be adjusted according to the actual situation, which is not described herein too much.
And after the minimum resource residual evaluation value is obtained, determining an online service host corresponding to the minimum resource residual evaluation value, and taking the online service host as a target service host corresponding to the virtual machine to be created.
By the method, the resource consumption evaluation value corresponding to the historical virtual machine and the resource request evaluation value corresponding to the virtual machine in the creation are calculated, so that the resource consumption and the resource allocation rate corresponding to each online service host are obtained, the resource required to be consumed by each online service host is determined, and finally, the resource residual evaluation value corresponding to each online service host is obtained, the residual resource of each online service host is evaluated, and the virtual machine can be efficiently created by the target service host corresponding to the minimum resource residual evaluation value.
Based on the same inventive concept, an embodiment of the present application further provides a device for determining a service host, where the device for determining a service host is configured to implement a function of a method for determining a service host, and with reference to fig. 2, the device includes:
a response module 201, configured to determine all online service hosts on a computing node in response to a request for creating a virtual machine;
a determining module 202, configured to determine resource consumption rates corresponding to all historical virtual machines on each online service host, and calculate a resource allocation rate corresponding to a virtual machine allocated to the online service host in the creation;
the calculating module 203 is configured to bring the resource consumption rate and the resource allocation rate into a preset algorithm, and calculate a resource remaining evaluation value corresponding to each online service host;
and the screening module 204 is configured to screen out a minimum resource remaining evaluation value from all resource remaining evaluation values, and use an online service host corresponding to the minimum resource remaining evaluation value as a target service host corresponding to the virtual machine to be created.
In a possible design, the determining module 202 is specifically configured to obtain historical resource allocation rates and actual resource usage rates corresponding to all historical virtual machines, and for each online service host, perform the following steps: calculating the historical resource allocation rate of each historical virtual machine on the online service host and the resource consumption evaluation value corresponding to the actual resource utilization rate, and summing the resource consumption evaluation values corresponding to each historical virtual machine on the online service host to obtain the resource consumption rates corresponding to all the historical virtual machines on the online service host.
In a possible design, the determining module 202 is further configured to obtain resource request rates respectively corresponding to all the virtual machines under creation, and perform the following steps for each online service host: calculating resource request evaluation values respectively corresponding to all created virtual machines corresponding to the online service host, summing the resource request evaluation values corresponding to each created virtual machine on the online service host, and respectively obtaining resource allocation rates corresponding to all created virtual machines on the online service host.
In a possible design, the calculating module 203 is specifically configured to obtain a load of each online service host and a resource copy consumption rate of a virtual machine to be created on the online service host, perform weighted calculation on the resource consumption rate, the resource allocation rate, the load of the online service host and the resource copy consumption rate of the online service host, and use a value after the weighted calculation as a resource remaining evaluation value corresponding to each online service host.
Based on the same inventive concept, an embodiment of the present application further provides an electronic device, where the electronic device can implement the function of the foregoing determining apparatus of the service host, and with reference to fig. 3, the electronic device includes:
at least one processor 301 and a memory 302 connected to the at least one processor 301, in this embodiment, a specific connection medium between the processor 301 and the memory 302 is not limited in this application, and fig. 3 illustrates an example where the processor 301 and the memory 302 are connected through a bus 300. The bus 300 is shown in fig. 3 by a thick line, and the connection between other components is merely illustrative and not limited thereto. The bus 300 may be divided into an address bus, a data bus, a control bus, etc., and is shown with only one thick line in fig. 3 for ease of illustration, but does not represent only one bus or type of bus. Alternatively, the processor 301 may also be referred to as a controller, without limitation to name a few.
In the embodiment of the present application, the memory 302 stores instructions executable by the at least one processor 301, and the at least one processor 301 can execute the method for determining a service host, which is discussed above, by executing the instructions stored in the memory 302. The processor 301 may implement the functions of the various modules in the apparatus shown in fig. 2.
The processor 301 is a control center of the apparatus, and may connect various parts of the entire control device by using various interfaces and lines, and perform various functions of the apparatus and process data by operating or executing instructions stored in the memory 302 and calling up data stored in the memory 302, thereby performing overall monitoring of the apparatus.
In one possible design, processor 301 may include one or more processing units, and processor 301 may integrate an application processor that primarily handles operating systems, user interfaces, application programs, and the like, and a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 301. In some embodiments, the processor 301 and the memory 302 may be implemented on the same chip, or in some embodiments, they may be implemented separately on separate chips.
The processor 301 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 the method for determining a service host disclosed in the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
Memory 302, 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 302 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 302 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 302 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 processor 301 is programmed to solidify the code corresponding to the method for determining a service host described in the foregoing embodiment into the chip, so that the chip can perform the step of determining a service host of the embodiment shown in fig. 1 when running. How to program the processor 301 is well known to those skilled in the art and will not be described herein.
Based on the same inventive concept, the present application further provides a storage medium storing computer instructions, which when executed on a computer, cause the computer to execute the method for determining a service host discussed above.
In some possible embodiments, the present application provides that the various aspects of the method for determining a service host may also be implemented in the form of a program product comprising program code for causing the control device to perform the steps of a method for determining a service host according to various exemplary embodiments of the present application described above in this specification when the program product is run on an apparatus.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
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 determining a service host, comprising:
responding to a request for creating a virtual machine, and determining all online service hosts on a computing node;
determining resource consumption rates corresponding to all historical virtual machines on each online service host, and calculating resource allocation rates corresponding to virtual machines distributed to the online service host in the creation process;
substituting the resource consumption rate and the resource allocation rate into a preset algorithm, and calculating a resource residual evaluation value corresponding to each online service host;
and screening out the minimum resource residual evaluation value from all the resource residual evaluation values, and taking the online service host corresponding to the minimum resource residual evaluation value as a target service host corresponding to the virtual machine to be created.
2. The method of claim 1, wherein the resource consumption rates for all historical virtual machines on each online service host comprise:
acquiring historical resource allocation rates and actual resource utilization rates respectively corresponding to all historical virtual machines;
for each online service host, the following steps are performed:
calculating the historical resource allocation rate of each historical virtual machine on the online service host and a resource consumption evaluation value corresponding to the actual resource utilization rate;
and summing the resource consumption evaluation values corresponding to each historical virtual machine on the online service host to obtain the resource consumption rates corresponding to all the historical virtual machines on the online service host.
3. The method of claim 1, wherein calculating the resource allocation rate for each online service host to assign to the virtual machine under creation comprises:
acquiring resource request rates respectively corresponding to all created virtual machines;
for each online service host, the following steps are performed:
calculating resource request evaluation values respectively corresponding to all created virtual machines corresponding to the online service host;
and summing the resource request evaluation values corresponding to the virtual machines in each creation on the online service host to respectively obtain the resource allocation rates corresponding to the virtual machines in all the creations on the online service host.
4. The method of claim 1, wherein substituting the resource consumption rate and the resource allocation rate into a preset algorithm to calculate a resource remaining evaluation value corresponding to each online service host comprises:
acquiring the load of each online service host and the resource copy consumption rate of the virtual machine to be created on the online service host;
and performing weighted calculation on the resource consumption rate, the resource allocation rate, the load of the online service host and the resource copy consumption rate of the online service host, and taking the value after weighted calculation as a resource residual evaluation value corresponding to each online service host.
5. An apparatus for determining a service host, the apparatus comprising:
the response module is used for responding to the request for creating the virtual machine and determining all online service hosts on the computing node;
the determining module is used for determining the resource consumption rate corresponding to all the historical virtual machines on each online service host and calculating the resource allocation rate corresponding to the virtual machine which is allocated to be established by each online service host;
the computing module is used for substituting the resource consumption rate and the resource allocation rate into a preset algorithm and computing a resource residual evaluation value corresponding to each online service host;
and the screening module is used for screening out the minimum resource residual evaluation value from all the resource residual evaluation values, and taking the online service host corresponding to the minimum resource residual evaluation value as a target service host corresponding to the virtual machine to be created.
6. The apparatus according to claim 5, wherein the determining module is specifically configured to obtain historical resource allocation rates and actual resource usage rates corresponding to all historical virtual machines, and for each online service host, perform the following steps: calculating the historical resource allocation rate of each historical virtual machine on the online service host and the resource consumption evaluation value corresponding to the actual resource utilization rate, and summing the resource consumption evaluation values corresponding to each historical virtual machine on the online service host to obtain the resource consumption rates corresponding to all the historical virtual machines on the online service host.
7. The apparatus of claim 5, wherein the determining module is further configured to obtain resource request rates respectively corresponding to all the virtual machines in the creation, and for each online service host, perform the following steps: calculating resource request evaluation values respectively corresponding to all created virtual machines corresponding to the online service host, summing the resource request evaluation values corresponding to each created virtual machine on the online service host, and respectively obtaining resource allocation rates corresponding to all created virtual machines on the online service host.
8. The apparatus according to claim 5, wherein the calculating module is specifically configured to obtain a load of each online service host and a resource copy consumption rate of the virtual machine to be created on the online service host, perform weighted calculation on the resource consumption rate, the resource allocation rate, the load of the online service host, and the resource copy consumption rate of the online service host, and use a value after the weighted calculation as the resource remaining evaluation value corresponding to each online service host.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1-4 when executing the computer program stored on the memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1-4.
CN202111623921.XA 2021-12-28 2021-12-28 Method and device for determining service host and electronic equipment Pending CN114327824A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111623921.XA CN114327824A (en) 2021-12-28 2021-12-28 Method and device for determining service host and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111623921.XA CN114327824A (en) 2021-12-28 2021-12-28 Method and device for determining service host and electronic equipment

Publications (1)

Publication Number Publication Date
CN114327824A true CN114327824A (en) 2022-04-12

Family

ID=81014127

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111623921.XA Pending CN114327824A (en) 2021-12-28 2021-12-28 Method and device for determining service host and electronic equipment

Country Status (1)

Country Link
CN (1) CN114327824A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116405391A (en) * 2023-04-10 2023-07-07 长扬科技(北京)股份有限公司 OpenStack-based virtual machine node screening method, system and storage medium
CN117112234A (en) * 2023-10-19 2023-11-24 南京赛宁信息技术有限公司 Reliable resource pre-allocation method and system in network target range

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116405391A (en) * 2023-04-10 2023-07-07 长扬科技(北京)股份有限公司 OpenStack-based virtual machine node screening method, system and storage medium
CN117112234A (en) * 2023-10-19 2023-11-24 南京赛宁信息技术有限公司 Reliable resource pre-allocation method and system in network target range
CN117112234B (en) * 2023-10-19 2024-02-09 南京赛宁信息技术有限公司 Reliable resource pre-allocation method and system in network target range

Similar Documents

Publication Publication Date Title
CN108462760B (en) Electronic device, automatic cluster access domain name generation method and storage medium
CN112346859B (en) Resource scheduling method and device, electronic equipment and storage medium
CN114327824A (en) Method and device for determining service host and electronic equipment
US11876731B2 (en) System and methods for sharing memory subsystem resources among datacenter applications
CN111124687B (en) CPU resource reservation method, device and related equipment
US20140196054A1 (en) Ensuring performance of a computing system
CN111880939A (en) Container dynamic migration method and device and electronic equipment
CN112559130B (en) Container distribution method, device, electronic equipment and storage medium
CN115562843B (en) Container cluster computational power scheduling method and related device
CN113342498A (en) Concurrent request processing method, device, server and storage medium
CN111858458B (en) Method, device, system, equipment and medium for adjusting interconnection channel
CN115033340A (en) Host selection method and related device
CN104243531A (en) Data processing method, device and system
CN114625500A (en) Method and application for scheduling micro-service application based on topology perception in cloud environment
CN111338579A (en) Read-write cache optimization method, system, terminal and storage medium based on storage pool
US20170090986A1 (en) System and method for managing workload performance on billed computer systems
CN113626173A (en) Scheduling method, device and storage medium
CN108228346A (en) service system and its control method
CN116302327A (en) Resource scheduling method and related equipment
CN114201306B (en) Multi-dimensional geographic space entity distribution method and system based on load balancing technology
CN113220463B (en) Binding strategy inference method and device, electronic equipment and storage medium
CN114371954A (en) Automatic recovery method of micro-service system
CN108196936A (en) A kind of resource regulating method, equipment and system
CN113918345A (en) Capacity calculation method and device for configuration hardware, computer equipment and medium
CN113806089A (en) Cluster load resource scheduling method and device, electronic equipment and readable storage medium

Legal Events

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