CN109697105A - A kind of container cloud environment physical machine selection method and its system, virtual resource configuration method and moving method - Google Patents

A kind of container cloud environment physical machine selection method and its system, virtual resource configuration method and moving method Download PDF

Info

Publication number
CN109697105A
CN109697105A CN201811512678.2A CN201811512678A CN109697105A CN 109697105 A CN109697105 A CN 109697105A CN 201811512678 A CN201811512678 A CN 201811512678A CN 109697105 A CN109697105 A CN 109697105A
Authority
CN
China
Prior art keywords
physical machine
machine
virtual
physical
virtual 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
CN201811512678.2A
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.)
Guangdong University of Petrochemical Technology
Original Assignee
Guangdong University of Petrochemical Technology
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 Guangdong University of Petrochemical Technology filed Critical Guangdong University of Petrochemical Technology
Priority to CN201811512678.2A priority Critical patent/CN109697105A/en
Publication of CN109697105A publication Critical patent/CN109697105A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • 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/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
    • 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/45575Starting, stopping, suspending or resuming 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/45583Memory management, e.g. access or allocation
    • 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

Abstract

The present invention relates to the virtualization technology and physical machine selection strategy technical field under cloud environment, the container cloud environment physical machine selection method includes the following steps: that S101 is put into exclusive collection X with physical machine that is closing for idle;All physical machines for having task run are put into operation collection E by S102, and calculate the cpu busy percentage of every physical machine in operation collection E;S103 is searched in all physical machines in operation collection E, each physical machine of the CPU usage above or below default CPU usage critical value, the physical machine of overload or underload is respectively obtained, then the physical machine of the physical machine and underload overloaded in operation collection E is moved into the exclusive collection X in step S101;S104 calculates the simulation of energy consumption value of every physical machine in operation collection E;S105 selects operation to collect target physical machine when simulation of energy consumption in E is worth configuration and migration of the smallest physical machine as container cloud virtual resource.It is optimized by the selection to physical machine, to reduce the energy consumption of data center.

Description

A kind of container cloud environment physical machine selection method and its system, virtual resource configuration side Method and moving method
Technical field
The present invention relates to the virtualization technology and physical machine selection strategy technical field under cloud environment, more particularly, to A kind of container cloud environment physical machine selection method and its system, virtual resource configuration method and virtual resource moving method.
Background technique
The cloud environment virtual resource configuration point mixed based on virtual machine, container includes two parts, and a part is physical machine (Host) it virtualizes, i.e., by physical machine resource allocation to virtual machine, another part is virtual machine (Virtual Machine, VM) Resources of virtual machine is distributed to container by containerization.Entire virtual resource configuration process is divided into two stages again, and first stage cloud is appointed Business is submitted to the virtual resource initial configuration after data center, and second stage is that virtual resource moves during cloud task run It moves.Either virtual resource deployment or virtual resource migration, container cloud all suffer from physical machine in progress virtual resource configuration Select permeability.And the physical machine substantial amounts of data center, for example, Tencent's Tianjin data center server quantity has broken through 10 Ten thousand, and have the physical machine of various different brands, model in same data center, their utilization rate and energy in the process of running It is also different to consume situation, in addition, data center's computing resource is sufficient, it is virtual required for running for cloud set of tasks Machine and container will not be generally deployed in all physical machines, therefore, physical machine as the maximum energy consumption person of data center, The physical machine selection strategy used when virtual resource configuration and migration has larger impact to the energy consumption of data center.
Currently, the common physical machine selection strategy of cloud computing environment mainly has random selection (Random), first obtains first (First Fit, FF), peak use rate preferential (Most Full, MF), minimum utilization rate preferential (Least Full, LF) etc.. Wherein, Random strategy is the simplest, and what every physical machine was selected has equal opportunities, and plays the effect of equity dispatching, but does not have Consider the problems of utilization rate.FF can carry out preference setting to physical machine in a manner, come the physical machine before list The chance selected is greater than the subsequent physical machine of list.MF is complex with LF, to calculate the utilization rate of every physical machine.Selection The big physical machine of utilization rate, unit time energy consumption can be relatively large, but it is relatively fewer to handle the time.The small physics of Selection utilization rate Machine, unit time energy consumption is relatively small, but it is relatively long to handle the time.
Typically physical machine utilization rate is higher, and unit time energy consumption is also higher, and therefore, utilization rate is to influence physical machine One key factor of energy consumption.But the energy consumption not only utilization with the physical machine in this period that physical machine is interior for a period of time Rate is related, also related with the energy consumption of the physical machine unit time.But above-mentioned four kinds of physical machine selection strategies often only consider physics Influence of the machine utilization rate to energy consumption causes so that the selection of physical machine is not optimized when virtual resource configuration and migration The energy consumption of data center is high.
Summary of the invention
The present invention is directed to overcome at least one defect (deficiency) of the above-mentioned prior art, a kind of container cloud environment physics is provided Machine selection method optimizes the selection of physical machine, to reduce the energy consumption of data center.
The invention also discloses a kind of container cloud virtual resource configuration methods.
The invention also discloses a kind of container cloud virtual resource moving methods.
The invention also discloses a kind of container cloud environment physical machines to select system.
The technical solution adopted by the present invention is that
A kind of container cloud environment physical machine selection method, the virtual resource allocation mode of container cloud include by physical machine resource It distributes to virtual machine and resources of virtual machine is distributed into container, virtual machine and container are referred to as virtual resource, empty in container cloud In the configuration and transition process of quasi- resource, preferentially physical machine is selected using best energy consumption, is specifically comprised the following steps:
S101 is put into exclusive collection X with physical machine that is closing for idle;
All physical machines for having task run are put into operation collection E by S102, and calculate the CPU of every physical machine in operation collection E Utilization rate;
S103 is searched in all physical machines in operation collection E, and CPU usage is above or below default CPU usage critical value Each physical machine, respectively obtain the physical machine of overload or underload, then the physics for the physical machine and underload that will be overloaded in operation collection E Machine moves into the exclusive collection X in step S101;
S104 calculates the simulation of energy consumption value of every physical machine in operation collection E;
S105 is selected when simulation of energy consumption is worth configuration and migration of the smallest physical machine as container cloud virtual resource in operation collection E Target physical machine.
Data center possesses the energy consumption equipments such as air-conditioning, interchanger, router, but physical machine is the largest energy consumers, For physical machine, its CPU, memory, network interface card, memory etc. are all energy consumption equipments, compare other component, and the CPU of physical machine is Main energy-consuming parts and energy consumption change component the most frequent, and the variation of the utilization rate of CPU is to cause physical machine whole The principal element of energy consumption variation.
In above-mentioned technical proposal, the utilization rate of physical machine is first calculated, and then calculates the power consumption values of physical machine, and according to The cluster property of object, the foundation that the simulation of energy consumption value of physical machine is selected as physical machine select simulation of energy consumption value lesser This physical machine selection method is known as PowerFull method by target physical machine of the physical machine as deployment and migration, the present invention, letter Claim PF method.
PF physical machine selection method of the invention comprehensively considered physical machine utilization rate and physical machine unit time energy consumption this The principal element of two influence data center's entirety energy consumptions, the basic thought of this method are the premises in protection physical machine utilization rate It is lower to select the lower physical machine of energy consumption as the target physical machine for disposing and migrating virtual machine, container, so that data be effectively reduced The whole energy consumption at center.
Preferably, in actual moving process, the cpu busy percentage of physical machine is the process of a dynamic change, the variation Mainly caused by the variation of the cpu busy percentage of virtual machine and container, so, every physical machine in operation collection E is calculated in step S102 Cpu busy percentage specific steps are as follows:
The cpu busy percentage of virtual machine is calculated according to the deployment scenario of virtual machine upper container;
The cpu busy percentage of physical machine is calculated according to the cpu busy percentage of the deployment scenario of virtual machine in physical machine and virtual machine.
It is further preferred that calculating the specific step of the cpu busy percentage of virtual machine according to the deployment scenario of virtual machine upper container Suddenly are as follows: as virtual machine vmjOn container deployment scenario be βjWhen, virtual machine vmjIt is to be deployed in vm in the cpu busy percentage of moment tj Upper all containers are in the sum of workload of moment t and vmjRatio between itself cpu resource size:Wherein, γj(t) virtual machine vm is indicatedjThe utilization rate of CPU in moment t;βjIndicate virtual Machine vmjThe case where upper container is disposed;βJ, kIndicate container ckWhether virtual machine vm is deployed injOn, if ckIt is deployed in vmjOn, Then βJ, k=1, otherwise βJ, k=0;μk(t) container c is indicatedkThe utilization rate of CPU in moment t; 1≤k ≤ S indicates container ckCPU possess HkA processing core,Indicate container ckThe processing capacity of i-th of core;1≤j≤N indicates virtual machine vmjCPU possess GjA processing core,Indicate virtual machine vmjI-th The computing capability of a core.
It is further preferred that calculating physics according to the cpu busy percentage of the deployment scenario of virtual machine in physical machine and virtual machine The specific steps of the cpu busy percentage of machine are as follows: as physical machine hiOn deploying virtual machine situation be αiWhen, physical machine hiIn moment t CPU utilization rate be to be deployed in hiUpper all virtual machines are in the sum of workload of moment t and hiBetween itself cpu resource size Ratio:Wherein, πi(t) physical machine h is indicatediThe utilization rate of CPU in moment t;αI, jTable Show virtual machine vmjWhether h is deployed iniOn, if vmjIt is deployed in hiOn, then αi,j=1, otherwise αi,j=0;γj(t) it indicates Virtual machine vmjThe utilization rate of CPU in moment t;(1≤j≤N) indicates vmjCPU possess GjIt is a Core is handled,Show vmjThe computing capability of i-th of core;(1≤j≤M) indicates hjCPU possess EjA processing core,Indicate hjThe computing capability of i-th of core.
It is further preferred that the specific steps of step S104 are as follows: calculate physical machine h according to the cpu busy percentage of physical machinei? The energy consumption of moment t;By physical machine hiThe deployment scenario of virtual machine calculates the energy of physical machine in the energy consumption combination physical machine of moment t Consume the analogue value.
It is further preferred that calculating physical machine h according to the cpu busy percentage of physical machineiIn the specific steps of the energy consumption of moment t Are as follows: physical machine hiIn the energy consumption and physical machine h of moment tiIn the cpu busy percentage π of moment ti(t) existence function relationship: pi(t)= f(πi(t)), piIt (t) is the nonnegative function of monotonic increase;
By physical machine hiThe deployment scenario of virtual machine calculates the simulation of energy consumption value of physical machine in the energy consumption combination physical machine of moment t Specific steps are as follows:
As physical machine hiOn deploying virtual machine situation be αiWhen, physical machine hiIn t1~t2Power consumption values in time are as follows:
The energy consumption function of physical machine is simulated using linear interpolation, is obtained: To obtain physical machine hiIn t1~t2Simulation of energy consumption value.
From the above, it is only necessary to know t1Moment and t2The utilization rate of moment container can calculate the utilization rate of physical machine, And then basisCalculate the physical machine In t1~t2Simulation of energy consumption value.
Wherein, pi(t) be monotonic increase nonnegative function, so, physical machine utilization rate is higher, and unit time energy consumption is also It is higher.Therefore, utilization rate is to influence a key factor of physical machine energy consumption.But when the configuration feelings of virtual machine in physical machine Condition is A, and when the deployment scenario of virtual machine upper container is B, data center is in t1~t2The energy consumption of time is that all physics functions consume it With:It follows that physical machine for a period of time in energy consumption not only with this The utilization rate of the physical machine is related in the section time, also related with the energy consumption of the physical machine unit time.
In addition, according toIt is found that in the scheduling interval t of a data center1 ~t2The energy consumption of interior certain physical machine is the integral of the energy consumption function of the physical machine during this period of time, and calculating integral is one Relative complex process, if every physical machine will frequently calculate integral, is easy in addition data center's physical machine is large number of Cause calculation amount excessive, so, the energy consumption function of physical machine is simulated using linear interpolation, to simplify the energy consumption of physical machine Calculating process.
A kind of container cloud virtual resource configuration method specifically comprises the following steps: including the deploying step to virtual machine
S201 selection simulation of energy consumption in operation collection E is worth a smallest physical machine to virtual machine, and the physical machine selected can CPU, memory, bandwidth and hard disk resources meet the needs of virtual machine;
S202 selected physical machine is virtual machine storage allocation resource;
S203 selected physical machine is virtual machine bandwidth allocation resource;
S204 selected physical machine is that virtual machine distributes cpu resource, when physical machine has m processing core, is denoted as HPE, virtual machine need N processing core is wanted, VPE is denoted as, m HPE is distributed into n VPE in order;
S205 selected physical machine is that virtual machine distributes hard disk resources;
S206 repeats step S201 to S205, until all virtual machines are all assigned to required physical resource.
It is more in the quantity of data center, physical machine, it, can be in protection physical machine benefit when a virtual machine requests physical resource With selecting under the premise of rate the lower physical machine of energy consumption to dispose the virtual machine, and for the virtual machine distribute CPU, memory, bandwidth and The resources such as hard disk.Virtual resource configuration method of the invention, by selecting simulation of energy consumption to be worth low physical machine as virtual resource Target physical machine in configuration process, to reduce the whole energy consumption of data center.
It is further preferred that container cloud virtual resource configuration method further includes the deployment of container to the deploying step of container Step is consistent with the deploying step of virtual machine, i.e., the CPU of virtual machine, memory, bandwidth and hard disk resources is distributed to container.
A kind of container cloud virtual resource moving method, the migration step including virtual machine and/or container, the migration of virtual machine Step includes first carrying out the migration of virtual machine in overload physical machine to carry out the migration of virtual machine or advanced in underload physical machine again The migration of virtual machine carries out the migration of virtual machine in overload physical machine again in row underload physical machine;
The migration step of virtual machine includes the following steps: in overload physical machine
The physical machine of overload is simultaneously saved in overload list by the resource utilization of S301 Statistical Physics machine, and is arranged in descending order;
S302 arranges the virtual machine in overload list in every physical machine according to utilization rate descending;
S303 selection one is not in overload list, and the smallest physical machine of simulation of energy consumption value is used as migration mesh in operation collection E Mark;
S304 sequentially selects a physical machine from overload list as migration source physical machine, will migrate source object in order Virtual machine on reason machine moves to migration target, and guarantees to migrate target nonoverload, until migration source physical machine is no longer overloaded;If Migration target cannot receive virtual machine to be migrated completely, by step S303 reselect physical machine as migration target into Row migration, until the physical machine in overload list has been processed into;
The migration step of virtual machine includes: in underload physical machine
The physical machine of S305 statistics resource utilization underload is simultaneously saved in underload list;
S306 selects one not in underload list and overloads in list, and simulation of energy consumption is worth the smallest physical machine in operation collection E As migration target;
S307 selects a physical machine as migration source physical machine from underload list, complete in the physical machine of migration source by being deployed in Portion's virtual machine (vm) migration guarantees to migrate target nonoverload to migration target described in S306;If migration target cannot connect completely It receives virtual machine to be migrated, selects a physical machine to be migrated as migration target by step S307 again, until underload arranges Physical machine in table has been processed into;
S308 closes migration source physical machine.
Virtual machine and container are referred to as virtual server or virtual resource by the present invention, and physical machine is known as physical server Or physical resource.In cloud computing environment, diversity is presented in cloud task, often existing a large amount of real-time online processing business, and has A large amount of asynchronous process business.Real-time online business short processing time, demand fluctuation are big, and the asynchronous service processing time is long, data It measures huge.With the execution of task, the performance of task is different in each container.Therefore, the physical machine of data center, The load of virtual machine and container can generate dynamic variation with the execution of task.Some physical machines are more early completed due to task And new task keeps it excessively idle without arriving in time, causes resource utilization lower.Claim when the value is lower than some critical value The server is state under load.Similarly, some physical machines are since task is too long and has new task arrival to keep it excessively numerous It is busy, cause resource utilization excessively high.When the value is higher than some critical value, the server is referred to as overload.Underload is be easy to cause The wasting of resources, overload be easy to cause SLA to break a contract and influence system stability.In data center, both of these case requires to the greatest extent may be used It is avoided that, accomplishes load balancing between servers as far as possible.
In container cloud environment, virtual server migration is the main means for guaranteeing physical server load balancing, due to The server of container Yun Zhongyou physical machine, virtual machine and container three kinds of different grain sizes and level, container can be between virtual machine Migration, virtual machine can migrate between physical machine, and same or different strategy can be used in both migrations.
The mode that clocked flip, quantitative triggering or monitoring triggering can be used in the present invention migrates virtual server, In, monitoring triggering is to be decided whether to start virtual server migration according to data center's real-time monitoring situation.The present invention is preferably Virtual server is migrated by the way of monitoring triggering.When virtual server utilization rate lower than underload critical value or Higher than overload critical value when should be migrated, selected under the premise of protecting physical machine utilization rate the lower physical machine of energy consumption as Target physical machine in virtual resource transition process, to reduce the whole energy consumption of data center.
A kind of container cloud environment physical machine selection system, the virtual resource allocation mode of container cloud includes by physical machine resource It distributes to virtual machine and resources of virtual machine is distributed into container, virtual machine and container are referred to as virtual resource, and the system exists In the configuration and transition process of container cloud virtual resource, preferentially physical machine is selected using best energy consumption, system is specifically wrapped It includes:
Exclusive collection processing module, for being put into exclusive collection X with physical machine that is closing for idle;
Operation collection processing module for all physical machines for having task run to be put into operation collection E, and calculates in operation collection E The cpu busy percentage of every physical machine, and searched in all physical machines in operation collection E, CPU usage is above or below pre- If each physical machine of CPU usage critical value, the physical machine of overload or underload is respectively obtained, then will overload in operation collection E Physical machine and the physical machine of underload move into exclusive collection X;
Simulation of energy consumption value processing module, for calculating the simulation of energy consumption value of every physical machine in operation collection E;
Target physical machine selecting module, for selecting the smallest physical machine of simulation of energy consumption value in operation collection E virtual as container cloud Target physical machine when the configuration and migration of resource.
In above scheme, operation collection processing module first calculates the CPU of virtual machine according to the deployment scenario of virtual machine upper container Utilization rate calculates operation further according to the deployment scenario of virtual machine in every physical machine in operation collection E and the cpu busy percentage of virtual machine Collect the cpu busy percentage of every physical machine in E.Wherein, the CPU benefit of virtual machine is calculated according to the deployment scenario of virtual machine upper container With the specific steps of rate are as follows: as virtual machine vmjOn container deployment scenario be βjWhen, virtual machine vmjIn the cpu busy percentage of moment t It is to be deployed in vmjUpper all containers are in the sum of workload of moment t and vmjRatio between itself cpu resource size:Wherein, γj(t) virtual machine vm is indicatedjThe utilization rate of CPU in moment t;βjIndicate virtual Machine vmjThe case where upper container is disposed;βj,kIndicate container ckWhether virtual machine vm is deployed injOn, if ckIt is deployed in vmjOn, Then βj,k=1, otherwise βJ, k=0;μk(t) container c is indicatedkThe utilization rate of CPU in moment t; 1≤k ≤ S indicates container ckCPU possess HkA processing core,Indicate container ckThe processing capacity of i-th of core;1≤j≤N indicates virtual machine vmjCPU possess GjA processing core,Indicate virtual machine vmjI-th The computing capability of a core.And operation collection E is calculated according to the cpu busy percentage of the deployment scenario of virtual machine in physical machine and virtual machine In every physical machine cpu busy percentage specific steps are as follows: as physical machine hiOn deploying virtual machine situation be αiWhen, physical machine hiIt is to be deployed in h in the cpu busy percentage of moment tiUpper all virtual machines are in the sum of workload of moment t and hiItself CPU money Ratio between source size:Wherein, πi(t) physical machine h is indicatediThe CPU in moment t Utilization rate;αI, jIndicate virtual machine vmjWhether h is deployed iniOn, if vmjIt is deployed in hiOn, then αi,j=1, otherwise αi,j= 0;γj(t) virtual machine vm is indicatedjThe utilization rate of CPU in moment t;(1≤j≤N) indicates vmj's CPU possesses GjA processing core,Indicate vmjThe computing capability of i-th of core;(1≤j≤M), table Show hjCPU possess EjA processing core,Indicate hjThe computing capability of i-th of core.
Simulation of energy consumption value processing module first calculates physical machine h according to the cpu busy percentage of physical machineiIn the energy consumption of moment t;It will Physical machine hiThe deployment scenario of virtual machine calculates the simulation of energy consumption value of physical machine in the energy consumption combination physical machine of moment t.Wherein, Physical machine h is calculated according to the cpu busy percentage of physical machineiIn the specific steps of the energy consumption of moment t are as follows: physical machine hiIn the energy of moment t Consumption and physical machine hiIn the cpu busy percentage π of moment ti(t) existence function relationship: pi(t)=f (πi(t)), piIt (t) is monotonic increase Nonnegative function;
By physical machine hiThe deployment scenario of virtual machine calculates the simulation of energy consumption value of physical machine in the energy consumption combination physical machine of moment t Specific steps are as follows:
As physical machine hiOn deploying virtual machine situation be αiWhen, physical machine hiIn t1~t2Power consumption values in time are as follows:
The energy consumption function of physical machine is simulated using linear interpolation, is obtained: To obtain physical machine hiIn t1~t2Simulation of energy consumption value.
Compared with prior art, the invention has the benefit that PF physical machine selection method of the invention comprehensively considers The principal element of the two influence data center's entirety energy consumptions of physical machine utilization rate and physical machine unit time energy consumption, this method Basic thought be selected under the premise of protecting physical machine utilization rate the lower physical machine of energy consumption as dispose and migration virtual machine, The target physical machine of container, so that the whole energy consumption of data center be effectively reduced.
Detailed description of the invention
Fig. 1 is the flow chart of the container cloud environment physical machine selection method.
Fig. 2 is the flow chart of the container cloud virtual resource configuration method.
Fig. 3 is the flow chart of the container cloud virtual resource moving method.
Fig. 4 is the experimental result schematic diagram of embodiment 2.
Fig. 5 is the experimental result schematic diagram of embodiment 3.
Fig. 6 is the experimental result schematic diagram of embodiment 4.
Specific embodiment
Attached drawing of the present invention only for illustration, is not considered as limiting the invention.It is following in order to more preferably illustrate Embodiment, the certain components of attached drawing have omission, zoom in or out, and do not represent the size of actual product;For art technology For personnel, the omitting of some known structures and their instructions in the attached drawings are understandable.
Embodiment 1
A kind of container cloud environment physical machine selection method, as shown in Figure 1, the virtual resource allocation mode of container cloud includes will Physical machine resource allocation distributes to container to virtual machine and by resources of virtual machine, and virtual machine and container are referred to as virtual resource, In the configuration and transition process of container cloud virtual resource, preferentially physical machine is selected using best energy consumption, is specifically included Following steps:
S101 is put into exclusive collection X with physical machine that is closing for idle;
All physical machines for having task run are put into operation collection E by S102, and calculate the CPU of every physical machine in operation collection E Utilization rate;
S103 is searched in all physical machines in operation collection E, and CPU usage is above or below default CPU usage critical value Each physical machine, respectively obtain the physical machine of overload or underload, then the physics for the physical machine and underload that will be overloaded in operation collection E Machine moves into the exclusive collection X in step S101;
S104 calculates the simulation of energy consumption value of every physical machine in operation collection E;
S105 is selected when simulation of energy consumption is worth configuration and migration of the smallest physical machine as container cloud virtual resource in operation collection E Target physical machine.
The utilization rate of physical machine is first calculated, and then calculates the power consumption values of physical machine, and according to the cluster property of object, The foundation that the simulation of energy consumption value of physical machine is selected as physical machine, select the lesser physical machine of simulation of energy consumption value as deployment and This physical machine selection method is known as PowerFull method, abbreviation PF method by the target physical machine of migration, the present invention.Of the invention PF physical machine selection method has comprehensively considered physical machine utilization rate and the two influence data centers of physical machine unit time energy consumption The principal element of whole energy consumption, the basic thought of this method are to select energy consumption lower under the premise of protecting physical machine utilization rate Physical machine is as the target physical machine for disposing and migrating virtual machine, container, so that the whole energy consumption of data center be effectively reduced.
Wherein, in actual moving process, the cpu busy percentage of physical machine is the process of a dynamic change, variation master To be changed by the cpu busy percentage of virtual machine and container and be caused, so, every physical machine in operation collection E is calculated in step S102 The specific steps of cpu busy percentage are as follows:
The cpu busy percentage of virtual machine is calculated according to the deployment scenario of virtual machine upper container;
The cpu busy percentage of physical machine is calculated according to the cpu busy percentage of the deployment scenario of virtual machine in physical machine and virtual machine.
Specifically, the specific steps of the cpu busy percentage of virtual machine are calculated according to the deployment scenario of virtual machine upper container are as follows: when Virtual machine vmjOn container deployment scenario be βjWhen, virtual machine vmjIt is to be deployed in vm in the cpu busy percentage of moment tjUpper all appearances Device is in the sum of workload of moment t and vmjRatio between itself cpu resource size: Wherein, γ j (t) indicates virtual machine vmjThe utilization rate of CPU in moment t;βjIndicate virtual machine vmjThe case where upper container is disposed;β J,kIndicate container ckWhether virtual machine vm is deployed injOn, if ckIt is deployed in vmjOn, then βJ, k=1, otherwise βJ, k=0;μk (t) container c is indicatedkThe utilization rate of CPU in moment t;1≤k≤S indicates container ckCPU gather around There is HkA processing core,Indicate container ckThe processing capacity of i-th of core;1≤j≤N indicates empty Quasi- machine vmjCPU possess GjA processing core,Indicate virtual machine vmjThe computing capability of i-th of core.
Specifically, the CPU of physical machine is calculated according to the cpu busy percentage of the deployment scenario of virtual machine in physical machine and virtual machine The specific steps of utilization rate are as follows: as physical machine hiOn deploying virtual machine situation be αiWhen, physical machine hiIt is utilized in the CPU of moment t Rate is to be deployed in hiUpper all virtual machines are in the sum of workload of moment t and hiRatio between itself cpu resource size:Wherein, πi(t) physical machine h is indicatediThe utilization rate of CPU in moment t;αI, jIndicate virtual machine vmjWhether h is deployed iniOn, if vmjIt is deployed in hiOn, then αi,j=1, otherwise αi,j=0;γj(t) virtual machine vm is indicatedj The utilization rate of CPU in moment t;(1≤j≤N) indicates vmjCPU possess GjA processing core,Indicate vmjThe computing capability of i-th of core;(1≤j≤M) indicates hjCPU possess EjA place Core is managed,Indicate hjThe computing capability of i-th of core.
Specifically, the specific steps of step S104 are as follows: physical machine h is calculated according to the cpu busy percentage of physical machineiIn moment t Energy consumption;By physical machine hiThe deployment scenario of virtual machine calculates the energy consumption mould of physical machine in the energy consumption combination physical machine of moment t Analog values.
Specifically, physical machine h is calculated according to the cpu busy percentage of physical machineiIn the specific steps of the energy consumption of moment t are as follows: object Reason machine hiIn the energy consumption and physical machine h of moment tiIn the cpu busy percentage π of moment ti(t) existence function relationship: pi(t)=f (πi (t)), piIt (t) is the nonnegative function of monotonic increase;
By physical machine hiThe deployment scenario of virtual machine calculates the simulation of energy consumption value of physical machine in the energy consumption combination physical machine of moment t Specific steps are as follows:
As physical machine hiOn deploying virtual machine situation be αiWhen, physical machine hiIn t1~t2Power consumption values in time are as follows:
The energy consumption function of physical machine is simulated using linear interpolation, is obtained: To obtain physical machine hiIn t1~t2Simulation of energy consumption value.
From the above, it is only necessary to know t1Moment and t2The utilization rate of moment container can calculate the utilization rate of physical machine, And then basisCalculate the physical machine In t1~t2Simulation of energy consumption value.
In the scheduling interval t of a data center1~t2The energy consumption of interior certain physical machine is that the energy consumption function of the physical machine exists Integral in this period, and calculating integral is a relative complex process, in addition data center's physical machine is large number of, is held Easily cause calculation amount excessive, so, the energy consumption function of physical machine is simulated using linear interpolation, to simplify the energy of physical machine Consume calculating process.
A kind of container cloud virtual resource configuration method specifically includes as shown in Fig. 2, including the deploying step to virtual machine Following steps:
S201 selection simulation of energy consumption in operation collection E is worth a smallest physical machine to virtual machine, and the physical machine selected can CPU, memory, bandwidth and hard disk resources meet the needs of virtual machine;
S202 selected physical machine is virtual machine storage allocation resource;
S203 selected physical machine is virtual machine bandwidth allocation resource;
S204 selected physical machine is that virtual machine distributes cpu resource, when physical machine has m processing core, is denoted as HPE, virtual machine need N processing core is wanted, VPE is denoted as, m HPE is distributed into n VPE in order;
S205 selected physical machine is that virtual machine distributes hard disk resources;
S206 repeats step S201 to S205, until all virtual machines are all assigned to required physical resource.
It is more in the quantity of data center, physical machine, it, can be in protection physical machine benefit when a virtual machine requests physical resource With selecting under the premise of rate the lower physical machine of energy consumption to dispose the virtual machine, and for the virtual machine distribute CPU, memory, bandwidth and The resources such as hard disk.Virtual resource configuration method of the invention, by selecting simulation of energy consumption to be worth low physical machine as virtual resource Target physical machine in configuration process, to reduce the whole energy consumption of data center.
Specifically, container cloud virtual resource configuration method further includes the deploying step to container, the deploying step of container with The deploying step of virtual machine is consistent, i.e., the CPU of virtual machine, memory, bandwidth and hard disk resources is distributed to container.
A kind of container cloud virtual resource moving method, as shown in figure 3, include the migration step of virtual machine and/or container, it is empty The migration step of quasi- machine includes first carrying out the migration of virtual machine in overload physical machine to carry out moving for virtual machine in underload physical machine again The migration for moving or first carrying out virtual machine in underload physical machine carries out the migration of virtual machine in overload physical machine again;
The migration step of virtual machine includes the following steps: in overload physical machine
The physical machine of overload is simultaneously saved in overload list by the resource utilization of S301 Statistical Physics machine, and is arranged in descending order;
S302 arranges the virtual machine in overload list in every physical machine according to utilization rate descending;
S303 selection one is not in overload list, and the smallest physical machine of simulation of energy consumption value is used as migration mesh in operation collection E Mark;
S304 sequentially selects a physical machine from overload list as migration source physical machine, will migrate source object in order Virtual machine on reason machine moves to migration target, and guarantees to migrate target nonoverload, until migration source physical machine is no longer overloaded;If Migration target cannot receive virtual machine to be migrated completely, by step S303 reselect physical machine as migration target into Row migration, until the physical machine in overload list has been processed into;
The migration step of virtual machine includes: in underload physical machine
The physical machine of S305 statistics resource utilization underload is simultaneously saved in underload list;
S306 selects one not in underload list and overloads in list, and simulation of energy consumption is worth the smallest physical machine in operation collection E As migration target;
S307 selects a physical machine as migration source physical machine from underload list, complete in the physical machine of migration source by being deployed in Portion's virtual machine (vm) migration guarantees to migrate target nonoverload to migration target described in S306;If migration target cannot connect completely It receives virtual machine to be migrated, selects a physical machine to be migrated as migration target by step S307 again, until underload arranges Physical machine in table has been processed into;
S308 closes migration source physical machine.
In cloud computing environment, underload be easy to cause the wasting of resources, and overload, which be easy to cause SLA to break a contract and influences system, to be stablized Property.In data center, both of these case requires to avoid as far as possible, accomplishes load balancing between servers as far as possible.And in container cloud In environment, virtual server migration be guarantee physical server load balancing main means, due to container Yun Zhongyou physical machine, The server of virtual machine and container three kinds of different grain sizes and level, container can migrate between virtual machine, and virtual machine can be It is migrated between physical machine, same or different strategy can be used in both migrations.
The mode that clocked flip, quantitative triggering or monitoring triggering can be used in the present invention migrates virtual server, this Invention preferably migrates virtual server by the way of monitoring triggering.When the utilization rate of virtual server is lower than underload Critical value should be migrated higher than when overloading critical value, select energy consumption lower under the premise of protecting physical machine utilization rate Physical machine is as the target physical machine in virtual resource transition process, to reduce the whole energy consumption of data center.
A kind of container cloud environment physical machine selection system, the virtual resource allocation mode of container cloud includes by physical machine resource It distributes to virtual machine and resources of virtual machine is distributed into container, virtual machine and container are referred to as virtual resource, and the system exists In the configuration and transition process of container cloud virtual resource, preferentially physical machine is selected using best energy consumption, system is specifically wrapped It includes:
Exclusive collection processing module, for being put into exclusive collection X with physical machine that is closing for idle;
Operation collection processing module for all physical machines for having task run to be put into operation collection E, and calculates in operation collection E The cpu busy percentage of every physical machine, and searched in all physical machines in operation collection E, CPU usage is above or below pre- If each physical machine of CPU usage critical value, the physical machine of overload or underload is respectively obtained, then will overload in operation collection E Physical machine and the physical machine of underload move into exclusive collection X;
Simulation of energy consumption value processing module, for calculating the simulation of energy consumption value of every physical machine in operation collection E;
Target physical machine selecting module, for selecting the smallest physical machine of simulation of energy consumption value in operation collection E virtual as container cloud Target physical machine when the configuration and migration of resource.
Operation collection processing module first calculates the cpu busy percentage of virtual machine, then root according to the deployment scenario of virtual machine upper container Every object in operation collection E is calculated according to the deployment scenario of virtual machine in every physical machine in operation collection E and the cpu busy percentage of virtual machine The cpu busy percentage of reason machine.Wherein, the specific step of the cpu busy percentage of virtual machine is calculated according to the deployment scenario of virtual machine upper container Suddenly are as follows: as virtual machine vmjOn container deployment scenario be βjWhen, virtual machine vmjIt is to be deployed in vm in the cpu busy percentage of moment tj Upper all containers are in the sum of workload of moment t and vmjRatio between itself cpu resource size:Wherein, γj(t) virtual machine vm is indicatedjThe utilization rate of CPU in moment t;βjIndicate virtual Machine vmjThe case where upper container is disposed;βJ, kIndicate container ckWhether virtual machine vm is deployed injOn, if ckIt is deployed in vmjOn, Then βj,k=1, otherwise βj,k=0;μk(t) container c is indicatedkThe utilization rate of CPU in moment t; 1≤k ≤ S indicates container ckCPU possess HkA processing core,Indicate container ckThe processing capacity of i-th of core;1≤j≤N indicates virtual machine vmjCPU possess GjA processing core,Indicate virtual machine vmjI-th The computing capability of a core.And operation collection E is calculated according to the cpu busy percentage of the deployment scenario of virtual machine in physical machine and virtual machine In every physical machine cpu busy percentage specific steps are as follows: as physical machine hiOn deploying virtual machine situation be αiWhen, physical machine hiIt is to be deployed in h in the cpu busy percentage of moment tiUpper all virtual machines are in the sum of workload of moment t and hiItself CPU money Ratio between source size:Wherein, πi(t) physical machine h is indicatediThe benefit of CPU in moment t With rate;αi,jIndicate virtual machine vmjWhether h is deployed iniOn, if vmjIt is deployed in hiOn, then αi,j=1, otherwise αi,j=0; γj(t) virtual machine vm is indicatedjThe utilization rate of CPU in moment t;(1≤j≤N) indicates vmjCPU Possess GjA processing core,Indicate vmjThe computing capability of i-th of core;(1≤j≤M) indicates hj CPU possess EjA processing core,Indicate hjThe computing capability of i-th of core.
Simulation of energy consumption value processing module first calculates physical machine h according to the cpu busy percentage of physical machineiIn the energy consumption of moment t;It will Physical machine hiThe deployment scenario of virtual machine calculates the simulation of energy consumption value of physical machine in the energy consumption combination physical machine of moment t.Wherein, Physical machine h is calculated according to the cpu busy percentage of physical machineiIn the specific steps of the energy consumption of moment t are as follows: physical machine hiIn the energy of moment t Consumption and physical machine hiIn the cpu busy percentage π of moment ti(t) existence function relationship: pi(t)=f (πi(t)), piIt (t) is monotonic increase Nonnegative function;
By physical machine hiThe deployment scenario of virtual machine calculates the simulation of energy consumption value of physical machine in the energy consumption combination physical machine of moment t Specific steps are as follows:
As physical machine hiOn deploying virtual machine situation be αiWhen, physical machine hiIn t1~t2Power consumption values in time are as follows:
The energy consumption function of physical machine is simulated using linear interpolation, is obtained: To obtain physical machine hiIn t1~t2Simulation of energy consumption value.
Embodiment 2
In the present embodiment, using the physical machine mould of 7 kinds of different vendors and model such as including IbmX3250XeonX3470 Type, and their energy consumptions in different utilization rates are provided, as shown in table 1:
1 data center's physical host type selecting table of table
What 0~10 numerical value represented in table 1 is different utilization rate section, and such as " number list shows various physical machines in benefit With rate [0.40,0.50) this section when the unit time power consumption values.It can be seen that energy of the different physical machines in identical utilization rate Consumption is different, and the energy consumption of every kind of physical machine is improved with the raising of utilization rate.
The task length of the experiment scene of the present embodiment is fixed, and has 20 to 200 virtual machines to need to carry out in data center Deployment increases by 20 virtual machines every time, and the quantity of physical machine is set as the half of virtual machine, and number of containers is 3 times of virtual machine.For The energy-saving effect of the different physical machine selection methods of verifying in a wide variety of different scenarios, by the present embodiment will test context be divided into it is more A experiment group, every group of experiment are configured using same cloud task, physical machine, virtual machine and container.For convenience, every group Experiment marks physical machine, the quantity of virtual machine and container, such as H10/V100/C500 using the form formula of HXXX/VXXX/CXXX Indicate physical machine 10, virtual machine 100,500, container.
Specifically, the task length of the present embodiment is fixed as 30000.Experiment is divided into 5 groups, the physical machine of each group, virtual machine With the configuring condition of container be respectively as follows: G11:H10/V20/C60, G12:H30/V60/C180, G13:H50/V100/C300, G14:H70/V140/C420, G15:H90/V180/C540.Each group of physical machine is randomly choosed from table 1 at random, in group Same physical machine set is used when experiment.5 groups are tested using FF, LF, MF and PF respectively, experimental result such as Fig. 4 It is shown.
Embodiment 3
As shown in figure 5, the present embodiment and the experimental method that embodiment 2 is taken are essentially identical, difference is, the present embodiment The task length of experiment scene fix, there are 100 to 200 virtual machines needs to be disposed in data center, increase by 20 every time Platform virtual machine, physical machine quantity fix 100, and number of containers is 3 times of virtual machine.
Specifically, the task length of the present embodiment fixes 30000, randomly selects 100 physical machines as this scene from table 1 Physical machine is used in experiment.The present embodiment is divided into 6 groups, and the configuring condition of the physical machine of each group, virtual machine and container is respectively as follows: G21: H100/V100/C300, G22:H100/V120/C360, G23:H100/V140/C420, G24:H100/V160/C480, G25: H100/V180/C540, G26:H100/V200/C600.6 groups are tested using FF, LF, MF and PF respectively, are tested As a result as shown in Figure 5.
Embodiment 4
As shown in fig. 6, the present embodiment and the experimental method that embodiment 2 is taken are essentially identical, difference is, the present embodiment Experiment scene use dynamic task length, task length is between 50000 to 100000, physical machine 5 to 120, virtual machine 15 to 500,50 to 2000, container.
Specifically, the task length 50000 to 100000 of the present embodiment.The present embodiment is divided into 5 groups, the physical machine of each group, The configuring condition of virtual machine and container is respectively as follows: G31:H5/V15/C50, G32:H10/V30/C100, G33:H20/V100/ C500, G34:H60/V250/C1000, G35:H120/V500/C2000.Each group of physical machine is selected from table 1 at random at random It selects, same physical machine set is used when testing in group.5 groups are tested using FF, LF, MF and PF respectively, it is real It is as shown in Figure 6 to test result.
From Fig. 4,5,6 as it can be seen that energy consumption ratio FF, LF and MF of data center are low when adopting PF algorithm.
Obviously, the above embodiment of the present invention is only intended to clearly illustrate technical solution of the present invention example, and It is not the restriction to a specific embodiment of the invention.It is all made within the spirit and principle of claims of the present invention Any modifications, equivalent replacements, and improvements etc., should all be included in the scope of protection of the claims of the present invention.

Claims (10)

1. a kind of container cloud environment physical machine selection method, the virtual resource allocation mode of container cloud includes by physical machine resource point Dispensing virtual machine and resources of virtual machine is distributed into container, virtual machine and container are referred to as virtual resource, which is characterized in that In the configuration and transition process of container cloud virtual resource, preferentially physical machine is selected using best energy consumption, specifically include as Lower step:
S101 is put into exclusive collection X with physical machine that is closing for idle;
All physical machines for having task run are put into operation collection E by S102, and calculate the CPU of every physical machine in operation collection E Utilization rate;
S103 is searched in all physical machines in operation collection E, and CPU usage is above or below default CPU usage critical value Each physical machine, respectively obtain the physical machine of overload or underload, then the physics for the physical machine and underload that will be overloaded in operation collection E Machine moves into the exclusive collection X in step S101;
S104 calculates the simulation of energy consumption value of every physical machine in operation collection E;
S105 is selected when simulation of energy consumption is worth configuration and migration of the smallest physical machine as container cloud virtual resource in operation collection E Target physical machine.
2. container cloud environment physical machine selection method according to claim 1, which is characterized in that calculate fortune in step S102 The specific steps of the cpu busy percentage of every physical machine in row collection E are as follows:
The cpu busy percentage of virtual machine is calculated according to the deployment scenario of virtual machine upper container;
The cpu busy percentage of physical machine is calculated according to the cpu busy percentage of the deployment scenario of virtual machine in physical machine and virtual machine.
3. container cloud environment physical machine selection method according to claim 2, which is characterized in that according to virtual machine upper container Deployment scenario calculate virtual machine cpu busy percentage specific steps are as follows:
As virtual machine vmjOn container deployment scenario be βjWhen, virtual machine vmjIt is to be deployed in vm in the cpu busy percentage of moment tjOn All containers are in the sum of workload of moment t and vmjRatio between itself cpu resource size:
Wherein, γj(t) virtual machine vm is indicatedjThe utilization rate of CPU in moment t;βjIt indicates Virtual machine vmjThe case where upper container is disposed;βj,kIndicate container ckWhether virtual machine vm is deployed injOn, if ckIt is deployed in vmjOn, then βj,k=1, otherwise βj,k=0;μk(t) container c is indicatedkThe utilization rate of CPU in moment t; 1≤k≤S indicates container ckCPU possess HkA processing core,Indicate container ckThe processing capacity of i-th of core;1≤j≤N indicates virtual machine vmjCPU possess GjA processing core,Indicate virtual machine vmjI-th The computing capability of a core.
4. container cloud environment physical machine selection method according to claim 3, which is characterized in that according to virtual in physical machine The deployment scenario of machine and the cpu busy percentage of virtual machine calculate the specific steps of the cpu busy percentage of physical machine are as follows:
As physical machine hiOn deploying virtual machine situation be αiWhen, physical machine hiIt is to be deployed in h in the cpu busy percentage of moment tiUpper institute There is virtual machine in the sum of workload of moment t and hiRatio between itself cpu resource size:Wherein, πi(t) physical machine h is indicatediThe utilization rate of CPU in moment t;αi,jIndicate virtual machine vmjWhether h is deployed iniOn, if vmjIt is deployed in hiOn, then αi,j=1, otherwise αi,j=0;γj(t) virtual machine vm is indicatedj The utilization rate of CPU in moment t;(1≤j≤N) indicates vmjCPU possess GjA processing core,Indicate vmjThe computing capability of i-th of core;(1≤j≤M) indicates hjCPU possess EjA place Core is managed,Indicate hjThe computing capability of i-th of core.
5. container cloud environment physical machine selection method according to claim 4, which is characterized in that the specific step of step S104 Suddenly are as follows: physical machine h is calculated according to the cpu busy percentage of physical machineiIn the energy consumption of moment t;
By physical machine hiThe deployment scenario of virtual machine calculates the simulation of energy consumption value of physical machine in the energy consumption combination physical machine of moment t.
6. container cloud environment physical machine selection method according to claim 5, which is characterized in that according to the CPU of physical machine Utilization rate calculates physical machine hiIn the specific steps of the energy consumption of moment t are as follows:
Physical machine hiIn the energy consumption and physical machine h of moment tiIn the cpu busy percentage π of moment ti(t) existence function relationship: pi(t)=f (πi(t)), piIt (t) is the nonnegative function of monotonic increase;
By physical machine hiThe deployment scenario of virtual machine calculates the simulation of energy consumption value of physical machine in the energy consumption combination physical machine of moment t Specific steps are as follows:
As physical machine hiOn deploying virtual machine situation be αiWhen, physical machine hiIn t1~t2Power consumption values in time are as follows:
The energy consumption function of physical machine is simulated using linear interpolation, is obtained: To obtain physical machine hiIn t1~t2 Simulation of energy consumption value.
7. a kind of container cloud virtual resource configuration method using any one of the claim 1-6 physical machine selection method, It is characterized in that, including the deploying step to virtual machine, specifically comprises the following steps:
S201 selection simulation of energy consumption in operation collection E is worth a smallest physical machine to virtual machine, and the physical machine selected can CPU, memory, bandwidth and hard disk resources meet the needs of virtual machine;
S202 selected physical machine is virtual machine storage allocation resource;
S203 selected physical machine is virtual machine bandwidth allocation resource;
S204 selected physical machine is that virtual machine distributes cpu resource, when physical machine has m processing core, is denoted as HPE, virtual machine need N processing core is wanted, VPE is denoted as, m HPE is distributed into n VPE in order;
S205 selected physical machine is that virtual machine distributes hard disk resources;
S206 repeats step S201 to S205, until all virtual machines are all assigned to required physical resource.
8. container cloud virtual resource configuration method according to claim 7, which is characterized in that further include the deployment to container Step, the deploying step of container and the deploying step of virtual machine are consistent, i.e., by the CPU of virtual machine, memory, bandwidth and hard disk resources Distribute to container.
9. a kind of container cloud virtual resource moving method using any one of the claim 1-6 physical machine selection method, It is characterized in that, the migration step including virtual machine and/or container, the migration step of virtual machine includes first carrying out in overload physical machine The migration of virtual machine carries out the migration of virtual machine in underload physical machine again or first carries out the migration of virtual machine in underload physical machine The migration of virtual machine in overload physical machine is carried out again;
The migration step of virtual machine includes the following steps: in overload physical machine
The physical machine of overload is simultaneously saved in overload list by the resource utilization of S301 Statistical Physics machine, and is arranged in descending order;
S302 arranges the virtual machine in overload list in every physical machine according to utilization rate descending;
S303 selection one is not in overload list, and the smallest physical machine of simulation of energy consumption value is used as migration mesh in operation collection E Mark;
S304 sequentially selects a physical machine from overload list as migration source physical machine, will migrate source object in order Virtual machine on reason machine moves to migration target, and guarantees to migrate target nonoverload, until migration source physical machine is no longer overloaded;If Migration target cannot receive virtual machine to be migrated completely, by step S303 reselect physical machine as migration target into Row migration, until the physical machine in overload list has been processed into;
The migration step of virtual machine includes: in underload physical machine
The physical machine of S305 statistics resource utilization underload is simultaneously saved in underload list;
S306 selects one not in underload list and overloads in list, and simulation of energy consumption is worth the smallest physical machine in operation collection E As migration target;
S307 selects a physical machine as migration source physical machine from underload list, complete in the physical machine of migration source by being deployed in Portion's virtual machine (vm) migration guarantees to migrate target nonoverload to migration target described in S306;If migration target cannot connect completely It receives virtual machine to be migrated, selects a physical machine to be migrated as migration target by step S307 again, until underload arranges Physical machine in table has been processed into;
S308 closes migration source physical machine.
10. a kind of container cloud environment physical machine selects system, the virtual resource allocation mode of container cloud includes by physical machine resource It distributes to virtual machine and resources of virtual machine is distributed into container, virtual machine and container are referred to as virtual resource, which is characterized in that The system preferentially selects physical machine using best energy consumption in the configuration and transition process of container cloud virtual resource, System specifically includes:
Exclusive collection processing module, for being put into exclusive collection X with physical machine that is closing for idle;
Operation collection processing module for all physical machines for having task run to be put into operation collection E, and calculates in operation collection E The cpu busy percentage of every physical machine, and searched in all physical machines in operation collection E, CPU usage is above or below pre- If each physical machine of CPU usage critical value, the physical machine of overload or underload is respectively obtained, then will overload in operation collection E Physical machine and the physical machine of underload move into exclusive collection X;
Simulation of energy consumption value processing module, for calculating the simulation of energy consumption value of every physical machine in operation collection E;
Target physical machine selecting module, for selecting the smallest physical machine of simulation of energy consumption value in operation collection E virtual as container cloud Target physical machine when the configuration and migration of resource.
CN201811512678.2A 2018-12-11 2018-12-11 A kind of container cloud environment physical machine selection method and its system, virtual resource configuration method and moving method Pending CN109697105A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811512678.2A CN109697105A (en) 2018-12-11 2018-12-11 A kind of container cloud environment physical machine selection method and its system, virtual resource configuration method and moving method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811512678.2A CN109697105A (en) 2018-12-11 2018-12-11 A kind of container cloud environment physical machine selection method and its system, virtual resource configuration method and moving method

Publications (1)

Publication Number Publication Date
CN109697105A true CN109697105A (en) 2019-04-30

Family

ID=66230493

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811512678.2A Pending CN109697105A (en) 2018-12-11 2018-12-11 A kind of container cloud environment physical machine selection method and its system, virtual resource configuration method and moving method

Country Status (1)

Country Link
CN (1) CN109697105A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110321198A (en) * 2019-07-04 2019-10-11 广东石油化工学院 A kind of container cloud platform computing resource and Internet resources coordinated dispatching method and system
CN112416530A (en) * 2020-12-08 2021-02-26 西藏宁算科技集团有限公司 Method and device for flexibly managing cluster physical machine nodes and electronic equipment
CN112965788A (en) * 2021-03-22 2021-06-15 西安电子科技大学 Task execution method, system and equipment in hybrid virtualization mode

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106598733A (en) * 2016-12-08 2017-04-26 南京航空航天大学 Three-dimensional virtual resource scheduling method of cloud computing energy consumption key
CN108089914A (en) * 2018-01-18 2018-05-29 电子科技大学 A kind of cloud computing deploying virtual machine algorithm based on energy consumption
CN108279967A (en) * 2017-10-25 2018-07-13 国云科技股份有限公司 A kind of virtual machine and container mixed scheduling method
CN108897600A (en) * 2018-06-14 2018-11-27 郑州云海信息技术有限公司 A kind of virtual machine placement method under cloud computing environment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106598733A (en) * 2016-12-08 2017-04-26 南京航空航天大学 Three-dimensional virtual resource scheduling method of cloud computing energy consumption key
CN108279967A (en) * 2017-10-25 2018-07-13 国云科技股份有限公司 A kind of virtual machine and container mixed scheduling method
CN108089914A (en) * 2018-01-18 2018-05-29 电子科技大学 A kind of cloud computing deploying virtual machine algorithm based on energy consumption
CN108897600A (en) * 2018-06-14 2018-11-27 郑州云海信息技术有限公司 A kind of virtual machine placement method under cloud computing environment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李启锐等: "容器云环境虚拟资源配置策略的优化", 《计算机应用》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110321198A (en) * 2019-07-04 2019-10-11 广东石油化工学院 A kind of container cloud platform computing resource and Internet resources coordinated dispatching method and system
CN110321198B (en) * 2019-07-04 2020-08-25 广东石油化工学院 Container cloud platform computing resource and network resource cooperative scheduling method and system
CN112416530A (en) * 2020-12-08 2021-02-26 西藏宁算科技集团有限公司 Method and device for flexibly managing cluster physical machine nodes and electronic equipment
CN112416530B (en) * 2020-12-08 2023-12-22 西藏宁算科技集团有限公司 Method and device for elastically managing cluster physical machine nodes and electronic equipment
CN112965788A (en) * 2021-03-22 2021-06-15 西安电子科技大学 Task execution method, system and equipment in hybrid virtualization mode
CN112965788B (en) * 2021-03-22 2023-12-22 西安电子科技大学 Task execution method, system and equipment in hybrid virtualization mode

Similar Documents

Publication Publication Date Title
EP3847549B1 (en) Minimizing impact of migrating virtual services
CN108009016B (en) Resource load balancing control method and cluster scheduler
CN108829494B (en) Container cloud platform intelligent resource optimization method based on load prediction
EP3270289B1 (en) Container-based multi-tenant computing infrastructure
Mann et al. Remedy: Network-aware steady state VM management for data centers
CN102232282B (en) Method and apparatus for realizing load balance of resources in data center
EP3253027B1 (en) Resource allocation method and apparatus for virtual machines
CN108628674A (en) Method for scheduling task, cloud platform based on cloud platform and computer storage media
CN106133693B (en) Moving method, device and the equipment of virtual machine
US11237862B2 (en) Virtualized network function deployment
CN103955398B (en) Virtual machine coexisting scheduling method based on processor performance monitoring
CN104184813A (en) Load balancing method of virtual machines, related equipment and trunking system
CN103870334A (en) Method and device for assigning large-scale vulnerability scanning task
CN106020934A (en) Optimized deploying method based on virtual cluster online migration
CN109697105A (en) A kind of container cloud environment physical machine selection method and its system, virtual resource configuration method and moving method
US9542225B2 (en) Method and apparatus for determining allocation design of virtual machines
CN102710779B (en) Load balance strategy for allocating service resource based on cloud computing environment
CN107220125A (en) A kind of cloud resource dispatching method and device
CN105491150A (en) Load balance processing method based on time sequence and system
CN116541134B (en) Method and device for deploying containers in multi-architecture cluster
WO2020134133A1 (en) Resource allocation method, substation, and computer-readable storage medium
WO2023221844A1 (en) Resource scheduling method, device, and storage medium
CN105607943A (en) Dynamic deployment mechanism of virtual machine under cloud environment
CN105045667A (en) Resource pool management method for vCPU scheduling of virtual machines
CN112559122A (en) Virtualization instance management and control method and system based on electric power special security and protection equipment

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20190430