CN104572251A - Virtual machine deploying method and device - Google Patents

Virtual machine deploying method and device Download PDF

Info

Publication number
CN104572251A
CN104572251A CN201510050846.0A CN201510050846A CN104572251A CN 104572251 A CN104572251 A CN 104572251A CN 201510050846 A CN201510050846 A CN 201510050846A CN 104572251 A CN104572251 A CN 104572251A
Authority
CN
China
Prior art keywords
matrix
virtual machine
resource
dispose
algorithm
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.)
Granted
Application number
CN201510050846.0A
Other languages
Chinese (zh)
Other versions
CN104572251B (en
Inventor
汤雅妃
王志军
魏进武
郭志斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications 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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN201510050846.0A priority Critical patent/CN104572251B/en
Publication of CN104572251A publication Critical patent/CN104572251A/en
Application granted granted Critical
Publication of CN104572251B publication Critical patent/CN104572251B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

An embodiment of the invention provides a virtual machine deploying method and device. The method includes: receiving a virtual machine deploying request transmitted by a user, and determining the number n of to-be-deployed virtual machines and the resources required to be consumed by each to-be-deployed virtual machine according to the received request; solving a target function min(rank(X)) according to a preset algorithm and a constrain condition so as to obtain an optimal solution matrix, wherein rank(X) is the rank of matrix X, and the matrix X is the mapping relation matrix n to-be-deployed virtual machines and m physical machines used for deploying the virtual machines; the constraint condition includes: ||xj||0=1, ||xj||0 represents the l0 norm of the vector of the jth row in the matrix X; Q.X<T><+=R, X<T> is the transposed matrix of the matrix X, a matrix Q=[qj]d*n represents resources required to be consumed by the to-be-deployed virtual machines VMj, R=[ri]d*m represents the resources provided by the physical machines PMi, and d is the number of resource kinds; deploying the virtual machines according to the values of elements in the acquired optimal solution matrix. By the method, the unique and optimal virtual machine deploying scheme can be acquired, and high solving stability and accuracy are achieved.

Description

Virtual machine deployment method and device
Technical field
The present invention relates to cloud platform application technical field, be specifically related to a kind of virtual machine deployment method and device.
Background technology
It is (English: Infrastructure-as-a-Service that namely infrastructure serve, abbreviation: IaaS) platform is the most important a kind of form of expression of current cloud computing platform, virtual by infrastructure, uses physical resource (as the bandwidth of server, internal memory or hard drive space etc.) distribution according to need to user.Along with cloud data center is to the increase of various resources requirement, how by the rational management of resource reducing consumption of data center, improve resource utilization ratio and become one of important research direction of following cloud computing development.
The essence of IaaS cloud platform scheduling of resource is the Optimization deployment carrying out virtual machine according to user resources demand.Usually adopt heuritic approach to solve the combinatorial optimization problem of deploying virtual machine in the deploying virtual machine scheme of existing IaaS cloud platform, select optimum deployment scheme.The method that heuritic approach refers to the moving law by the Nature or the experience towards particular problem, rule inspires out.Heuritic approach all rule of thumb proposes, and does not have solid theoretical foundation.Conventional heuritic approach mainly comprises simulated annealing, genetic algorithm, ant group algorithm, particle cluster algorithm etc.Along with the complicacy of the increase of task in IaaS cloud platform scheduling of resource, the variation of resource category and system strengthens, the extensibility of this kind of empirical algorithm of heuritic approach is limited, often complicacy is amplified, adds the difficulty of problem solving.The solution that heuritic approach obtains is approximate optimal solution, and Global Optimality cannot ensure.This also makes algorithm performance stable not, causes the insincere of result of calculation sometimes.
In sum, the problem that deploying virtual machine scheme existence and stability is poor and accuracy is poor of existing IaaS cloud platform.
Summary of the invention
The virtual machine deployment method that the embodiment of the present invention provides and device, can solve the less stable that exists in prior art and the poor problem of accuracy.
First aspect, the embodiment of the present invention provides a kind of virtual machine deployment method, and described method comprises:
Receive the request of the deployment virtual machine that user sends, determine to treat the number n of deployment virtual machine and described each resource of waiting to dispose virtual machine request consumption according to the described request received;
Objective function min (rank (X)) is solved to obtain optimum solution matrix according to preset algorithm and constraint condition;
Wherein, min function is the function of minimizing, the order of rank (X) representing matrix X, and it is individual for disposing the mapping relations matrix of the physical machine of virtual machine with m that matrix X is that described n to wait disposing virtual machine, matrix X=[x ij], i is the numbering of physical machine for disposing virtual machine and i ∈ [1, m], j wait to dispose the numbering of virtual machine and j ∈ [1, n], x ij∈ { 0,1}, x ijrepresent that jth is waited to dispose virtual machine VM jwith i-th for disposing the physical machine PM of virtual machine imapping relations, work as x ij=1 represents at described physical machine PM iwait described in deploy to dispose virtual machine VM j, work as x ij=0 represents not at described physical machine PM iwait described in deploy to dispose virtual machine VM j; Described constraint condition comprises: || x j|| 0=1, x jfor the jth column vector in matrix X, || x j|| 0jth column vector x in representing matrix X jl 0norm; QX t≤ R, X tfor the transposed matrix of matrix X, matrix Q=[q j] d × n, q jfor the column vector of matrix Q, wait described in expression to dispose virtual machine VM jthe resource that request consumes, R=[r i] d × m, r ifor the column vector of matrix R, represent described physical machine PM ithe resource provided, d is the number of the kind of described resource;
Value according to the element in the optimum solution matrix of described acquisition disposes virtual machine.
In conjunction with first aspect, in the implementation that the first is possible, describedly solve objective function min (rank (X)) according to preset algorithm and constraint condition and comprise to obtain optimum solution matrix:
Described objective function is converted to the second objective function
Wherein, λ be more than or equal to 0 preset value, for matrix S x(E) F norm square, matrix E=R-QX tfor the matrix of d × m, for representing that described m for disposing the physical machine remaining resource separately of virtual machine, matrix S x(E) be the matrix of d × p, dispose for representing p the physical machine remaining resource separately that described n is waited to dispose virtual machine use, d is the number of the kind of described resource;
By the QX in described constraint condition t≤ R is updated to QX t+ E=R, E>=0;
Described second objective function is solved according to the constraint condition after described preset algorithm and described renewal to obtain described optimum solution matrix.
In conjunction with the first possible implementation of first aspect, in the implementation that the second is possible, describedly solve described second objective function according to the constraint condition after described preset algorithm and described renewal comprise to obtain described optimum solution matrix:
According to the constraint condition after lagrange's method of multipliers, described renewal and described second objective function Lagrangian function L ( X , E ) = rank ( X ) + &lambda; | | S X ( E ) | | F 2 + &mu; | | R - Q &CenterDot; X T - E | | F 2 ; Wherein, Lagrange's multiplier μ be greater than 0 preset value;
According to E twith iterative algorithm described Lagrangian function solved and obtain matrix X t; Wherein, t is natural number, as t=0, and initial matrix E 0for the matrix of the d × m of stochastic generation and E 0≤ R;
According to described matrix X twith described iterative algorithm described Lagrangian function solved and obtain matrix E t+1;
Work as E t+1-E tduring≤ε, stop iteration, then by the convergency value X of described matrix X tas described optimum solution matrix; Wherein, ε is default minimal value.
In conjunction with the implementation that the second of first aspect is possible, in the implementation that the third is possible, described iterative algorithm comprises:
Iterative shrinkage thresholding algorithm, greedy algorithm or lasso trick algorithm (English: The Least AbsoluteShrinkage and Selectionator Operator, abbreviation: LASSO).
In conjunction with first aspect or its above-mentioned arbitrary possible implementation, in the 4th kind of possible implementation, the kind of described resource comprises:
The frequency of OS Type, processor CPU, the core number of processor CPU, internal memory, hard drive space and bandwidth; Accordingly, then d=6.
Second aspect, the embodiment of the present invention provides a kind of device for disposing virtual machine, and described device comprises:
Receiving element, for receiving the request of the deployment virtual machine that user sends, determines to treat the number n of deployment virtual machine and described each resource of waiting to dispose virtual machine request consumption according to the described request received;
Computing unit, for solving objective function min (rank (X)) to obtain optimum solution matrix according to preset algorithm and constraint condition;
Wherein, min function is the function of minimizing, the order of rank (X) representing matrix X, and it is individual for disposing the mapping relations matrix of the physical machine of virtual machine with m that matrix X is that described n to wait disposing virtual machine, matrix X=[x ij], i is the numbering of physical machine for disposing virtual machine and i ∈ [1, m], j wait to dispose the numbering of virtual machine and j ∈ [1, n], x ij∈ { 0,1}, x ijrepresent that jth is waited to dispose virtual machine VM jwith i-th for disposing the physical machine PM of virtual machine imapping relations, work as x ij=1 represents at described physical machine PM iwait described in deploy to dispose virtual machine VM j, work as x ij=0 represents not at described physical machine PM iwait described in deploy to dispose virtual machine VM j; Described constraint condition comprises: || x j|| 0=1, x jfor the jth column vector in matrix X, || x j|| 0jth column vector x in representing matrix X jl 0norm; QX t≤ R, X tfor the transposed matrix of matrix X, matrix Q=[q j] d × n, q jfor the column vector of matrix Q, wait described in expression to dispose virtual machine VM jthe resource that request consumes, R=[r i] d × m, r ifor the column vector of matrix R, represent described physical machine PM ithe resource provided, d is the number of the kind of described resource;
Deployment unit, disposes virtual machine for the value according to the element in the optimum solution matrix of described acquisition.
In conjunction with second aspect, in the implementation that the first is possible, described computing unit specifically for:
Described objective function is converted to the second objective function
Wherein, λ be more than or equal to 0 preset value, for matrix S x(E) F norm square, matrix E=R-QX tfor the matrix of d × m, for representing that described m for disposing the physical machine remaining resource separately of virtual machine, matrix S x(E) be the matrix of d × p, dispose for representing p the physical machine remaining resource separately that described n is waited to dispose virtual machine use, d is the number of the kind of described resource;
By the QX in described constraint condition t≤ R is updated to QX t+ E=R, E>=0;
Described second objective function is solved according to the constraint condition after described preset algorithm and described renewal to obtain described optimum solution matrix.
In conjunction with the first possible implementation of second aspect, in the implementation that the second is possible, described computing unit specifically for:
According to the constraint condition after lagrange's method of multipliers, described renewal and described second objective function Lagrangian function L ( X , E ) = rank ( X ) + &lambda; | | S X ( E ) | | F 2 + &mu; | | R - Q &CenterDot; X T - E | | F 2 ; Wherein, Lagrange's multiplier μ be greater than 0 preset value;
According to E twith iterative algorithm described Lagrangian function solved and obtain matrix X t; Wherein, t is natural number, as t=0, and initial matrix E 0for the matrix of the d × m of stochastic generation and E 0≤ R;
According to described matrix X twith described iterative algorithm described Lagrangian function solved and obtain matrix E t+1;
Work as E t+1-E tduring≤ε, stop iteration, then by the convergency value X of described matrix X tas described optimum solution matrix; Wherein, ε is default minimal value.
In conjunction with the implementation that the second of second aspect is possible, in the implementation that the third is possible, described iterative algorithm comprises:
Iterative shrinkage thresholding algorithm, greedy algorithm or lasso trick algorithm LASSO.
In conjunction with second aspect or its above-mentioned arbitrary possible implementation, in the 4th kind of possible implementation, the kind of described resource comprises:
The frequency of OS Type, processor CPU, the core number of processor CPU, internal memory, hard drive space and bandwidth; Accordingly, then d=6.
The virtual machine deployment method that the embodiment of the present invention provides and device, first receive the request of the deployment virtual machine that user sends, and determines to treat the number n of deployment virtual machine and described each resource of waiting to dispose virtual machine request consumption according to the described request received; Then objective function min (rank (X)) is solved to obtain optimum solution matrix according to preset algorithm and constraint condition; Wherein, min function is the function of minimizing, the order of rank (X) representing matrix X, and it is individual for disposing the mapping relations matrix of the physical machine of virtual machine with m that matrix X is that described n to wait disposing virtual machine, matrix X=[x ij], i is the numbering of physical machine for disposing virtual machine and i ∈ [1, m], j wait to dispose the numbering of virtual machine and j ∈ [1, n], x ij∈ { 0,1}, x ijrepresent that jth is waited to dispose virtual machine VM jwith i-th for disposing the physical machine PM of virtual machine imapping relations, work as x ij=1 represents at described physical machine PM iwait described in deploy to dispose virtual machine VM j, work as x ij=0 represents not at described physical machine PM iwait described in deploy to dispose virtual machine VM j; Described constraint condition comprises: || x j|| 0=1, x jfor the jth column vector in matrix X, || x j|| 0jth column vector x in representing matrix X jl 0norm; QX t≤ R, X tfor the transposed matrix of matrix X, matrix Q=[q j] d × n, q jfor the column vector of matrix Q, wait described in expression to dispose virtual machine VM jrequest consume resource, R=[r i] d × m, r ifor the column vector of matrix R, represent described physical machine PM ithe resource provided, d is the number of the kind of described resource; Finally dispose virtual machine according to the value of the element in the optimum solution matrix of described acquisition.By technical scheme provided by the invention, can solve and obtain unique optimum deploying virtual machine scheme, the less stable and accuracy poor that exist in prior art can be solved.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the configuration diagram of the embodiment of the present invention;
The schematic flow sheet of the virtual machine deployment method that Fig. 2 provides for the embodiment of the present invention;
The structural representation of the device for disposing virtual machine that Fig. 3 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
IaaS cloud platform adopts Intel Virtualization Technology to be undertaken abstract by hardware resources such as the network bandwidth of bottom, storages, make the otherness of bottom with compatible transparent to upper layer application, thus the resource that can vary to bottom carries out unified management.Organization Chart as shown in Figure 1, for the services request that user proposes based on IaaS cloud platform, become corresponding virtual machine request attribute by the attributes encapsulation of its services request, the physical machine of mating the most disposes corresponding virtual machine according to virtual machine request attribute, meets the demand of user.
For the separate unit physical machine in IaaS cloud platform, its operational mode comprises shutdown, standby and load three kinds.Under shutdown mode physical machine actual power loss be 0 but scheduling time from shutdown mode to load model too slow; Standby mode refers to that physical machine powers on the state of not starting shooting, and physical machine at this moment has an extremely low stand-by power consumption, and can switch to load model fast; Load model refers to and to configure in physical machine and to have run the state of the virtual machine of different resource combination, its power consumption and charge capacity proportional.The existing correlative study achievement to physical machine power consumption shows: the stand-by power consumption of physical machine is no more than at most 10% of rated disspation, and once enter load model due to needs open modules collaborative work thus actual power loss significantly increase, even no-load power consumption also at least reaches stand-by power consumption more than 10 times or even 50 times.After entering load model, although it is little to increase increasing degree from zero load to some extent to fully loaded actual power loss, usually between 10% ~ 40%.In technical scheme provided by the invention, system receives user send deployment virtual machine request and by request insertion service request queue in, to be allocated is placed in standby mode for the physical machine of disposing virtual collection, the request service request of the deployment virtual machine of user in regular respond services request queue, each virtual machine selecting suitable physical host to dispose user's requirement completes deploying virtual machine task, is placed in load model by by the physical machine selected simultaneously.
The technical scheme more clearly understood the embodiment of the present invention to enable those skilled in the art and provide, below by specific embodiment, be described in detail to the virtual machine deployment method that the embodiment of the present invention provides, as shown in Figure 2, the method comprises:
The request of the deployment virtual machine that S101, reception user send, determines to treat the number n of deployment virtual machine and each resource of waiting to dispose virtual machine request consumption according to the request received.
Concrete, IaaS cloud platform receives the request of the deployment virtual machine that user sends and inserts in service request queue by request, after the response opportunity of physical machine by the time, determine to treat the number n of deployment virtual machine and each resource of waiting to dispose virtual machine request consumption according to the request of the deployment virtual machine in service request queue, the kind of resource comprises: the frequency of OS Type, processor CPU, the core number of processor CPU, internal memory, hard drive space and bandwidth; OS Type can be such as Windows operating system, UNIX operating system or (SuSE) Linux OS; The frequency of CPU can be such as 1GHz, 2GHz or 3GHz; The core numerical example of CPU is as being double-core, four cores or eight cores; Internal memory can be such as 2G, 4G or 8G; Hard drive space can be such as 120G, 250G or 500G; Bandwidth can be 2M, 8M or 10M; Here be only the explanation of exemplary 6 types to aforementioned resource, choose according to actual needs when concrete enforcement technical scheme provided by the invention.
S102, solve objective function min (rank (X)) to obtain optimum solution matrix according to preset algorithm and constraint condition.
Wherein, n virtual machine set expression to be disposed is VM=(VM 1, VM 2..., VM n), VM j(j=1,2 ..., n) represent jth platform virtual machine to be disposed, j ∈ [1, n]; M is PM=(PM for disposing the physical machine set expression of virtual machine 1, PM 2..., PM m), PM i(i=1,2 ..., m) represent that i-th for disposing the physical machine of virtual machine, i ∈ [1, m]; Then the mapping relations of virtual machine set VM and physical host set PM can be expressed as with matrix X:
X ijrepresent virtual machine VM jwith physical host PM imapping relations, if at physical machine PM ideploy virtual machine VM jthen x ij=1, otherwise x ij=0; || x j|| 0the jth column vector x of representing matrix X jl 0norm, i.e. vector x jin the number of non-zero unit, because each virtual machine can only be deployed in a physical machine, therefore || x j|| 0=1 is a constraint condition of matrix X demand fulfillment; Matrix Q=[q j] d × n, q jfor the column vector of matrix Q, represent and wait to dispose virtual machine VM jrequest consume resource, R=[r i] d × m, r ifor the column vector of matrix R, represent physical machine PM ithe resource provided, d is the number of the kind of resource, X tfor the transposed matrix of matrix X, QX t≤ R represents that n to wait the amount of the resource that the amount of the resource of disposing virtual machine consumption can be able to not provide for the physical machine of disposing virtual machine more than m, and this is a constraint condition of matrix X also demand fulfillment.
In conjunction with foregoing, in technical scheme provided by the invention, separate virtual machine (generally m≤n) question variation of the m platform physical host deploy n platform by how in IaaS cloud platform is solving mapping matrix X.Have in each column vector of matrix X and only have an element to be 1, all the other elements are 0, can find out that matrix X is the sparse matrix of m × n dimension, therefore in mn solution of matrix, solve an optimum solution and also namely recover sparse matrix.Rank of matrix, as the openness reasonable tolerance of matrix solution, is a very strong global restriction.If the matrix of m × n dimension is without any constraint, it will have m × n degree of freedom; If its order is r, then degree of freedom will drop to r × (m × n-r).Therefore, order is well for the regularizing filter of matrix.Low-rank matrix recovers rank of matrix to estimate as one is sparse, can effective treatment and analysis matrix data.In technical scheme provided by the invention, in order to reduce the power consumption of the physical machine in cloud platform, the physical host quantity that takies need be made the least possible when disposing virtual machine, therefore, namely the optimum solution of solution matrix X solves objective function min (rank (X)) and obtains optimum solution under above-mentioned constraint condition, wherein, min function is the function of minimizing, the order of rank (X) representing matrix X.
Concrete, solve objective function min (rank (X)) according to preset algorithm and constraint condition and comprise to obtain optimum solution matrix:
Objective function is converted to the second objective function
Wherein, λ be more than or equal to 0 preset value, minimize and minimize the importance of two optimization aim in deployment model of the present invention for weighing mapping matrix order with resource residual amount. for matrix S x(E) F norm square, matrix E=R-QX tfor the matrix of d × m, for representing that m for disposing the physical machine remaining resource separately of virtual machine, matrix S x(E) be the matrix of d × p, dispose for representing p the physical machine remaining resource separately that n is waited to dispose virtual machine use, d is the number of the kind of resource;
By the QX in constraint condition t≤ R is updated to QX t+ E=R, E>=0;
The second objective function is solved according to preset algorithm and the constraint condition after upgrading to obtain optimum solution matrix.
It should be noted that, normally be optimized using the capacity of single or multiple resource metrics (such as bandwidth, internal memory and hard drive space etc.) as constraint condition in existing technical scheme and solve, and reckon without the utilization factor problem of all resources of each physical machine in cloud platform.Such as cause one part resource totally and still to have other part resource to remain in a large number at certain physical machine deploy multiple stage virtual machine and cause the balanced not waste causing resource of the utilization of resources.In technical scheme provided by the invention, in order to ensure that the resource residual amount of each physical machine is the least possible and balanced, avoid the situation occurring that part resource has exhausted and part resource surplus is larger, by introducing in objective function min rank (X) realize, wherein, || S x(E) || ffor matrix S x(E) F norm, represents S x(E) square root sum square of all elements in, represent S x(E) quadratic sum of all elements in.
Wherein, the second objective function is solved according to preset algorithm and the constraint condition after upgrading comprise to obtain optimum solution matrix:
According to the constraint condition after lagrange's method of multipliers, renewal and the second objective function Lagrangian function L ( X , E ) = rank ( X ) + &lambda; | | S X ( E ) | | F 2 + &mu; | | R - Q &CenterDot; X T - E | | F 2 ; Wherein, Lagrange's multiplier μ be greater than 0 preset value;
According to E twith iterative algorithm this Lagrangian function solved and obtain matrix X t; Wherein, t is natural number, as t=0, and initial matrix E 0for the matrix of the d × m of stochastic generation and E 0≤ R;
According to matrix X twith iterative algorithm this Lagrangian function solved and obtain matrix E t+1;
Work as E t+1-E tduring≤ε, stop iteration, then by the convergency value X of matrix X tas optimum solution matrix; Wherein, ε is default minimal value.
Above-mentioned iterative algorithm can be iterative shrinkage thresholding algorithm, greedy algorithm or lasso trick algorithm LASSO.
Exemplary, to above-mentioned according to E twith iterative algorithm to this Lagrangian function L ( X , E ) = rank ( X ) + &lambda; | | S X ( E ) | | F 2 + &mu; | | R - Q &CenterDot; X T - E | | F 2 ; Carry out solving and obtain matrix X tbe illustrated:
Such as, during primary iteration, order matrix E=E 0, E 0for the matrix of the d × m of stochastic generation and E 0≤ R, carries it into this Lagrangian function L ( X , E ) = rank ( X ) + &lambda; | | S X ( E ) | | F 2 + &mu; | | R - Q &CenterDot; X T - E | | F 2 , Ask for optimum solution X under this iteration 0:
E 0 = arg min X L ( X , E 0 ) = arg min rank ( X ) + &lambda; | | S X ( E 0 ) | | F 2 + &mu; | | R - Q &CenterDot; X T - E 0 | | F 2
To above-mentioned according to matrix X twith iterative algorithm this Lagrangian function solved and obtain matrix E t+1be illustrated:
Such as, when this iteration, order matrix X=X 0(X 0for above-mentioned according to E 0solve with this Lagrangian function and obtain), carry it into this Lagrangian function L ( X , E ) = rank ( X ) + &lambda; | | S X ( E ) | | F 2 + &mu; | | R - Q &CenterDot; X T - E | | F 2 , Ask for optimum solution E under this iteration 1:
E 1 = arg min E L ( X 0 , E ) = arg min rank ( X 0 ) + &lambda; | | S X ( E ) | | F 2 + &mu; | | R - Q &CenterDot; X 0 T - E | | F 2
It should be noted that, more heuritic approach such as simulated annealing, genetic algorithm, ant group algorithm and particle cluster algorithm is used to be all the heuritic approach of a class based on random search in existing technical scheme, this kind of algorithm is all data sets because needs travel through, according to often kind of possibility calculation optimization desired value, thus processing speed is limited.Simultaneously owing to lacking effective iteration stopping condition, usually arrange an iterations based on experience, therefore global convergence and speed of convergence cannot ensure.In technical scheme provided by the invention, E t+1-E t≤ ε is as solving optimum solution matrix X ttime iteration stopping condition be very objective effectively iteration stopping condition, and iterations is not rule of thumb chosen but by this iteration stopping conditional decision arranged, can determine that the derivation algorithm speed of convergence in technical scheme provided by the invention is very fast by emulation, global convergence is fine, can ensure to solve to obtain only optimal solution matrix X t.
S103, according to obtain optimum solution matrix in element value dispose virtual machine.
Concrete, the mapping relations of waiting to dispose virtual machine and physical machine that in the optimum solution of the matrix X calculated according to step S102, the value of each element represents complete the deployment of virtual machine.
By the virtual machine deployment method that the invention described above embodiment provides, can solve and obtain unique optimum deploying virtual machine scheme, the less stable existed in prior art, the problem that accuracy is poor and the physical machine utilization of resources is balanced not can be solved.
The device 10 for disposing virtual machine that the embodiment of the present invention provides, as shown in Figure 3, this device 10 comprises:
Receiving element 11, for receiving the request of the deployment virtual machine that user sends, determines to treat the number n of deployment virtual machine and each resource of waiting to dispose virtual machine request consumption according to the request received.
Computing unit 12, for solving objective function min (rank (X)) to obtain optimum solution matrix according to preset algorithm and constraint condition.
Wherein, min function is the function of minimizing, the order of rank (X) representing matrix X, and it is individual for disposing the mapping relations matrix of the physical machine of virtual machine with m that matrix X is that n to wait disposing virtual machine, matrix X=[x ij], i is the numbering of physical machine for disposing virtual machine and i ∈ [1, m], j wait to dispose the numbering of virtual machine and j ∈ [1, n], x ij∈ { 0,1}, x ijrepresent that jth is waited to dispose virtual machine VM jwith i-th for disposing the physical machine PM of virtual machine imapping relations, work as x ij=1 represents at physical machine PM ideploy is waited to dispose virtual machine VM j, work as x ij=0 represents not at physical machine PM ideploy is waited to dispose virtual machine VM j; Constraint condition comprises: || x j|| 0=1, x jfor the jth column vector in matrix X, || x j|| 0jth column vector x in representing matrix X jl 0norm; QX t≤ R, X tfor the transposed matrix of matrix X, matrix Q=[q j] d × n, q jfor the column vector of matrix Q, represent and wait to dispose virtual machine VM jthe resource that request consumes, R=[r i] d × m, r ifor the column vector of matrix R, represent physical machine PM ithe resource provided, d is the number of the kind of resource.
Deployment unit 13, disposes virtual machine for the value according to the element in the optimum solution matrix obtained.
Optionally, computing unit 12 specifically for:
Objective function is converted to the second objective function
Wherein, λ be more than or equal to 0 preset value, for matrix S x(E) F norm square, matrix E=R-QX tfor the matrix of d × m, for representing that m for disposing the physical machine remaining resource separately of virtual machine, matrix S x(E) be the matrix of d × p, dispose for representing p the physical machine remaining resource separately that n is waited to dispose virtual machine use, d is the number of the kind of resource;
By the QX in constraint condition t≤ R is updated to QX t+ E=R, E>=0;
The second objective function is solved according to preset algorithm and the constraint condition after upgrading to obtain optimum solution matrix.
Optionally, computing unit 12 specifically for:
According to the constraint condition after lagrange's method of multipliers, renewal and the second objective function Lagrangian function L ( X , E ) = rank ( X ) + &lambda; | | S X ( E ) | | F 2 + &mu; | | R - Q &CenterDot; X T - E | | F 2 ; Wherein, Lagrange's multiplier μ be greater than 0 preset value;
According to E twith iterative algorithm this Lagrangian function solved and obtain matrix X t; Wherein, t is natural number, as t=0, and initial matrix E 0for the matrix of the d × m of stochastic generation and E 0≤ R;
According to matrix X twith iterative algorithm this Lagrangian function solved and obtain matrix E t+1;
Work as E t+1-E tduring≤ε, stop iteration, then by the convergency value X of matrix X tas optimum solution matrix; Wherein, ε is default minimal value.
Optionally, iterative algorithm comprises:
Iterative shrinkage thresholding algorithm, greedy algorithm or lasso trick algorithm LASSO.
Optionally, the kind of resource comprises:
The frequency of OS Type, processor CPU, the core number of processor CPU, internal memory, hard drive space and bandwidth; Accordingly, then d=6.
The present embodiment is used for realizing above-mentioned each embodiment of the method, and in the present embodiment, the workflow of unit and principle of work are see the description in above-mentioned each embodiment of the method, do not repeat them here.
By the technical scheme provided for the device disposing virtual machine that the embodiment of the present invention provides, can solve and obtain unique optimum deploying virtual machine scheme, the less stable existed in prior art, the problem that accuracy is poor and the physical machine utilization of resources is balanced not can be solved.
Device embodiment described above is only schematic, and such as, the division of module, is only a kind of logic function and divides, and actual can have other dividing mode when realizing.Another point, the connection each other of shown or discussed module can be by some interfaces, can be electrical, machinery or other form.Described modules or can may not be and physically separates, and can be or may not be physical location.Some or all of module wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional module in each embodiment of the present invention can be integrated in a processing module, also can be that the independent physics of modules comprises, also can two or more module integrations in a module.Above-mentioned integrated module both can adopt the form of hardware to realize, and the form that hardware also can be adopted to add software function module realizes.
The above-mentioned integrated module realized with the form of SFU software functional unit, can be stored in a computer read/write memory medium.Above-mentioned software function module is stored in a storage medium, comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) perform the part steps of method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, ROM (read-only memory) are (English: Read-Only Memory, be called for short ROM), random access memory (English: Random Access Memory, to be called for short RAM), magnetic disc or CD etc. various can be program code stored medium.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; change can be expected easily or replace, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of described claim.

Claims (10)

1. a virtual machine deployment method, is characterized in that, comprising:
Receive the request of the deployment virtual machine that user sends, determine to treat the number n of deployment virtual machine and described each resource of waiting to dispose virtual machine request consumption according to the described request received;
Objective function min (rank (X)) is solved to obtain optimum solution matrix according to preset algorithm and constraint condition;
Wherein, min function is the function of minimizing, the order of rank (X) representing matrix X, and it is individual for disposing the mapping relations matrix of the physical machine of virtual machine with m that matrix X is that described n to wait disposing virtual machine, matrix X=[x ij], i is the numbering of physical machine for disposing virtual machine and i ∈ [1, m], j wait to dispose the numbering of virtual machine and j ∈ [1, n], x ij∈ { 0,1}, x ijrepresent that jth is waited to dispose virtual machine VM jwith i-th for disposing the physical machine PM of virtual machine imapping relations, work as x ij=1 represents at described physical machine PM iwait described in deploy to dispose virtual machine VM j, work as x ij=0 represents not at described physical machine PM iwait described in deploy to dispose virtual machine VM j; Described constraint condition comprises: || x j|| 0=1, x jfor the jth column vector in matrix X, || x j|| 0jth column vector x in representing matrix X jl 0norm; QX t≤ R, X tfor the transposed matrix of matrix X, matrix Q=[q j] d × n, q jfor the column vector of matrix Q, wait described in expression to dispose virtual machine VM jthe resource that request consumes, R=[r i] d × m, r ifor the column vector of matrix R, represent described physical machine PM ithe resource provided, d is the number of the kind of described resource;
Value according to the element in the optimum solution matrix of described acquisition disposes virtual machine.
2. method according to claim 1, is characterized in that, describedly solves objective function min (rank (X)) according to preset algorithm and constraint condition and comprises to obtain optimum solution matrix:
Described objective function is converted to the second objective function
Wherein, λ be more than or equal to 0 preset value, for matrix S x(E) F norm square, matrix E=R-QX tfor the matrix of d × m, for representing that described m for disposing the physical machine remaining resource separately of virtual machine, matrix S x(E) be the matrix of d × p, dispose for representing p the physical machine remaining resource separately that described n is waited to dispose virtual machine use, d is the number of the kind of described resource;
By the QX in described constraint condition t≤ R is updated to QX t+ E=R, E>=0;
Described second objective function is solved according to the constraint condition after described preset algorithm and described renewal min ( rank ( X ) + &lambda; | | S X ( E ) | | F 2 ) To obtain described optimum solution matrix.
3. method according to claim 2, is characterized in that, describedly solves described second objective function according to the constraint condition after described preset algorithm and described renewal comprise to obtain described optimum solution matrix:
According to the constraint condition after lagrange's method of multipliers, described renewal and described second objective function Lagrangian function L ( X , E ) = rank ( X ) + &lambda; | | S X ( E ) | | F 2 + &mu; | | R - Q &CenterDot; X T - E | | F 2 ; Wherein, Lagrange's multiplier μ be greater than 0 preset value;
According to E twith iterative algorithm described Lagrangian function solved and obtain matrix X t; Wherein, t is natural number, as t=0, and initial matrix E 0for the matrix of the d × m of stochastic generation and E 0≤ R;
According to described matrix X twith described iterative algorithm described Lagrangian function solved and obtain matrix E t+1;
Work as E t+1-E tduring≤ε, stop iteration, then by the convergency value X of described matrix X tas described optimum solution matrix; Wherein, ε is default minimal value.
4. method according to claim 3, is characterized in that, described iterative algorithm comprises:
Iterative shrinkage thresholding algorithm, greedy algorithm or lasso trick algorithm LASSO.
5., according to the arbitrary described method of Claims 1-4, it is characterized in that, the kind of described resource comprises:
The frequency of OS Type, processor CPU, the core number of processor CPU, internal memory, hard drive space and bandwidth; Accordingly, then d=6.
6. for disposing a device for virtual machine, it is characterized in that, comprising:
Receiving element, for receiving the request of the deployment virtual machine that user sends, determines to treat the number n of deployment virtual machine and described each resource of waiting to dispose virtual machine request consumption according to the described request received;
Computing unit, for solving objective function min (rank (X)) to obtain optimum solution matrix according to preset algorithm and constraint condition;
Wherein, min function is the function of minimizing, the order of rank (X) representing matrix X, and it is individual for disposing the mapping relations matrix of the physical machine of virtual machine with m that matrix X is that described n to wait disposing virtual machine, matrix X=[x ij], i is the numbering of physical machine for disposing virtual machine and i ∈ [1, m], j wait to dispose the numbering of virtual machine and j ∈ [1, n], x ij∈ { 0,1}, x ijrepresent that jth is waited to dispose virtual machine VM jwith i-th for disposing the physical machine PM of virtual machine imapping relations, work as x ij=1 represents at described physical machine PM iwait described in deploy to dispose virtual machine VM j, work as x ij=0 represents not at described physical machine PM iwait described in deploy to dispose virtual machine VM j; Described constraint condition comprises: || x j|| 0=1, x jfor the jth column vector in matrix X, || x j|| 0jth column vector x in representing matrix X jl 0norm; QX t≤ R, X tfor the transposed matrix of matrix X, matrix Q=[q j] d × n, q jfor the column vector of matrix Q, wait described in expression to dispose virtual machine VM jthe resource that request consumes, R=[r i] d × m, r ifor the column vector of matrix R, represent described physical machine PM ithe resource provided, d is the number of the kind of described resource;
Deployment unit, disposes virtual machine for the value according to the element in the optimum solution matrix of described acquisition.
7. device according to claim 6, is characterized in that, described computing unit specifically for:
Described objective function is converted to the second objective function
Wherein, λ be more than or equal to 0 preset value, for matrix S x(E) F norm square, matrix E=R-QX tfor the matrix of d × m, for representing that described m for disposing the physical machine remaining resource separately of virtual machine, matrix S x(E) be the matrix of d × p, dispose for representing p the physical machine remaining resource separately that described n is waited to dispose virtual machine use, d is the number of the kind of described resource;
By the QX in described constraint condition t≤ R is updated to QX t+ E=R, E>=0;
Described second objective function is solved according to the constraint condition after described preset algorithm and described renewal min ( rank ( X ) + &lambda; | | S X ( E ) | | F 2 ) To obtain described optimum solution matrix.
8. device according to claim 7, is characterized in that, described computing unit specifically for:
According to the constraint condition after lagrange's method of multipliers, described renewal and described second objective function Lagrangian function L ( X , E ) = rank ( X ) + &lambda; | | S X ( E ) | | F 2 + &mu; | | R - Q &CenterDot; X T - E | | F 2 ; Wherein, Lagrange's multiplier μ be greater than 0 preset value;
According to E twith iterative algorithm described Lagrangian function solved and obtain matrix X t; Wherein, t is natural number, as t=0, and initial matrix E 0for the matrix of the d × m of stochastic generation and E 0≤ R;
According to described matrix X twith described iterative algorithm described Lagrangian function solved and obtain matrix E t+1;
Work as E t+1-E tduring≤ε, stop iteration, then by the convergency value X of described matrix X tas described optimum solution matrix; Wherein, ε is default minimal value.
9. device according to claim 8, is characterized in that, described iterative algorithm comprises:
Iterative shrinkage thresholding algorithm, greedy algorithm or lasso trick algorithm LASSO.
10., according to the arbitrary described device of claim 6 to 9, it is characterized in that, the kind of described resource comprises:
The frequency of OS Type, processor CPU, the core number of processor CPU, internal memory, hard drive space and bandwidth; Accordingly, then d=6.
CN201510050846.0A 2015-01-30 2015-01-30 Virtual machine deployment method and device Active CN104572251B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510050846.0A CN104572251B (en) 2015-01-30 2015-01-30 Virtual machine deployment method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510050846.0A CN104572251B (en) 2015-01-30 2015-01-30 Virtual machine deployment method and device

Publications (2)

Publication Number Publication Date
CN104572251A true CN104572251A (en) 2015-04-29
CN104572251B CN104572251B (en) 2018-01-26

Family

ID=53088403

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510050846.0A Active CN104572251B (en) 2015-01-30 2015-01-30 Virtual machine deployment method and device

Country Status (1)

Country Link
CN (1) CN104572251B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105094947A (en) * 2015-07-28 2015-11-25 中国联合网络通信集团有限公司 Method and system for quotas management of virtual computing resource
CN105843689A (en) * 2016-04-12 2016-08-10 合肥工业大学 Virtual machine deployment method and system
CN106487889A (en) * 2016-10-09 2017-03-08 南京航空航天大学 A kind of task of facing cloud data center and data aggregate dispositions method
CN108028804A (en) * 2015-07-10 2018-05-11 国际商业机器公司 The management of virtual machine in virtual computation environmental based on structure limitation
CN108345490A (en) * 2017-01-24 2018-07-31 华为技术有限公司 The method and system of virtual machine is disposed in a kind of NFV
CN111324424A (en) * 2020-04-15 2020-06-23 中国联合网络通信集团有限公司 Virtual machine deployment method, device, server and storage medium
CN111970112A (en) * 2020-08-10 2020-11-20 山东大学 Ether house deployment method and system based on ZYNQ heterogeneous computing platform

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140019966A1 (en) * 2012-07-13 2014-01-16 Douglas M. Neuse System and method for continuous optimization of computing systems with automated assignment of virtual machines and physical machines to hosts
CN103677957A (en) * 2013-12-13 2014-03-26 重庆邮电大学 Cloud-data-center high-energy-efficiency virtual machine placement method based on multiple resources
CN104052820A (en) * 2014-06-27 2014-09-17 国家计算机网络与信息安全管理中心 Dynamic energy-saving resource scheduling system and method for distributed cloud computing platform
CN104461739A (en) * 2014-12-15 2015-03-25 中山大学 Cloudsim platform based virtual machine batch deployment method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140019966A1 (en) * 2012-07-13 2014-01-16 Douglas M. Neuse System and method for continuous optimization of computing systems with automated assignment of virtual machines and physical machines to hosts
CN103677957A (en) * 2013-12-13 2014-03-26 重庆邮电大学 Cloud-data-center high-energy-efficiency virtual machine placement method based on multiple resources
CN104052820A (en) * 2014-06-27 2014-09-17 国家计算机网络与信息安全管理中心 Dynamic energy-saving resource scheduling system and method for distributed cloud computing platform
CN104461739A (en) * 2014-12-15 2015-03-25 中山大学 Cloudsim platform based virtual machine batch deployment method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CHEN WEI, ET AL.: "A Profit-aware Virtual Machine Deployment Optimization Framework for Cloud", 《2012 IEEE FIFTH INTERNATIONAL CONFERENCE ON CLOUD COMPUTING》 *
师雪霖等: "云虚拟机资源分配的效用最大化模型", 《计算机学报》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108028804A (en) * 2015-07-10 2018-05-11 国际商业机器公司 The management of virtual machine in virtual computation environmental based on structure limitation
CN105094947A (en) * 2015-07-28 2015-11-25 中国联合网络通信集团有限公司 Method and system for quotas management of virtual computing resource
CN105094947B (en) * 2015-07-28 2018-06-12 中国联合网络通信集团有限公司 The quota management method and system of a kind of virtual computing resource
CN105843689A (en) * 2016-04-12 2016-08-10 合肥工业大学 Virtual machine deployment method and system
CN106487889A (en) * 2016-10-09 2017-03-08 南京航空航天大学 A kind of task of facing cloud data center and data aggregate dispositions method
CN106487889B (en) * 2016-10-09 2019-04-19 南京航空航天大学 A kind of task towards cloud data center and data aggregate dispositions method
CN108345490A (en) * 2017-01-24 2018-07-31 华为技术有限公司 The method and system of virtual machine is disposed in a kind of NFV
CN108345490B (en) * 2017-01-24 2021-04-09 华为技术有限公司 Method and system for deploying virtual machine in NFV
CN111324424A (en) * 2020-04-15 2020-06-23 中国联合网络通信集团有限公司 Virtual machine deployment method, device, server and storage medium
CN111970112A (en) * 2020-08-10 2020-11-20 山东大学 Ether house deployment method and system based on ZYNQ heterogeneous computing platform
CN111970112B (en) * 2020-08-10 2022-01-21 山东大学 Ether house deployment method and system based on ZYNQ heterogeneous computing platform

Also Published As

Publication number Publication date
CN104572251B (en) 2018-01-26

Similar Documents

Publication Publication Date Title
CN104572251A (en) Virtual machine deploying method and device
US9116181B2 (en) Method, apparatus, and system for virtual cluster integration
CN102929701B (en) Scheduling method and device for batched virtual machines
Talebian et al. Optimizing virtual machine placement in IaaS data centers: taxonomy, review and open issues
CN102611723A (en) Method for building high-performance computing application service based on virtualization technology
CN102891896B (en) Cloud computing infrastructure system for mass storage of Internet of things
CN103970607A (en) Computing Optimized Virtual Machine Allocations Using Equivalence Combinations
Li et al. Opportunistic scheduling in clouds partially powered by green energy
CN105975340A (en) Deployment algorithm of application distribution of virtual machine
CN102591443A (en) Method, device and system for integrating virtual clusters
US9672068B2 (en) Virtual machine scheduling using optimum power-consumption profile
CN109032788B (en) Reserved resource pool dynamic dispatching method, device, computer equipment and storage medium
Hao et al. An adaptive algorithm for scheduling parallel jobs in meteorological Cloud
Marszałkowski et al. Time and energy performance of parallel systems with hierarchical memory
Zhang et al. Design and implementation of task scheduling strategies for massive remote sensing data processing across multiple data centers
Zhou et al. Goldilocks: Adaptive resource provisioning in containerized data centers
Yao et al. A weighted pagerank-based algorithm for virtual machine placement in cloud computing
US20110257802A1 (en) Power distribution considering cooling nodes
Dai et al. Energy-efficient virtual machine placement in data centers with heterogeneous requirements
Deng et al. Graph-cut based coscheduling strategy towards efficient execution of scientific workflows in collaborative cloud environments
CN105930202B (en) A kind of virtual machine migration method of three threshold values
AlIsmail et al. Review of energy reduction techniques for green cloud computing
CN110825212B (en) Energy-saving scheduling method and device and computer storage medium
Liu et al. Evaluating task scheduling in hadoop-based cloud systems
US9766946B2 (en) Selecting processor micro-threading mode

Legal Events

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