CN105099951B - A kind of resource regulating method and management equipment - Google Patents

A kind of resource regulating method and management equipment Download PDF

Info

Publication number
CN105099951B
CN105099951B CN201510446911.1A CN201510446911A CN105099951B CN 105099951 B CN105099951 B CN 105099951B CN 201510446911 A CN201510446911 A CN 201510446911A CN 105099951 B CN105099951 B CN 105099951B
Authority
CN
China
Prior art keywords
resource
binary
value
dimension
physical node
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.)
Active
Application number
CN201510446911.1A
Other languages
Chinese (zh)
Other versions
CN105099951A (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 CN201510446911.1A priority Critical patent/CN105099951B/en
Publication of CN105099951A publication Critical patent/CN105099951A/en
Application granted granted Critical
Publication of CN105099951B publication Critical patent/CN105099951B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

The embodiment of the present invention provides a kind of resource regulating method and management equipment, it is related to field of communication technology, it can solve in the prior art when carrying out scheduling of resource, due to need respectively to tie up virtual machine user resource requirement value and all physical nodes in cloud computing system each dimension resource can apportioning cost compared one by one so that match complexity is high, so as to cause management equipment consumed resource it is big the problem of.Concrete scheme is:Management equipment obtains all physical nodes in cloud computing system and is respectively mapped to the point on space filling curve, and form first set, obtain the point on the corresponding subspace mapping to space filling curve of resource requirement range of virtual machine user, and form second set, a physical node to be allocated is selected from the corresponding physical node of point in third set, and each dimension resource on physical node to be allocated is distributed for virtual machine user, third collection is combined into the intersection of first set and second set.The embodiment of the present invention is used to carry out scheduling of resource.

Description

A kind of resource regulating method and management equipment
Technical field
The present embodiments relate to field of communication technology more particularly to a kind of resource regulating method and management equipments.
Background technology
Cloud computing is the increase, use and delivery mode of the related service based on internet, is usually directed to and passes through internet To provide the virtualization resource that dynamic easily extends.
Services such as (Infrastructure as a Service, IaaS) are serviced in the infrastructure of field of cloud calculation In system, the resource requirement of user is typically what is described by a series of virtual machine template, these virtual machine templates provide The multidimensional such as the central processing unit of virtual machine (Central Processing Unit, CPU), memory, disk space, network money The resource quota in source, user choose suitable virtual machine template according to self-demand and file an application to management platform, management platform In management equipment usually pass through each dimension resource requirement value of virtual machine user and all physical nodes in cloud computing system Each dimension resource can apportioning cost compared one by one, so as to obtain it is each tie up resource can apportioning cost be all higher than or equal to virtual machine user The set of the physical node of resource requirement value, and the physics section for meeting preset strategy is chosen from the set according to preset strategy Point, so as to distribute corresponding resource for virtual machine user.
Wherein, each dimension resource that virtual machine user is respectively tieed up to resource requirement value and all physical nodes in cloud computing system can Apportioning cost compare one by one so that matching process complexity height, needs to consume a large amount of resource of management equipment.
Invention content
The embodiment of the present invention provides a kind of resource regulating method and management equipment, can solve provided in the prior art When source is dispatched, due to needing that virtual machine user is respectively tieed up to resource requirement value and each dimension money of all physical nodes in cloud computing system Source can apportioning cost compare one by one so that match complexity is high, so as to cause management equipment consumed resource it is big the problem of.
In order to achieve the above objectives, the embodiment of the present invention adopts the following technical scheme that:
In a first aspect, a kind of resource regulating method is provided, including:
It obtains all physical nodes in cloud computing system and is respectively mapped to the point on space filling curve, and form the first collection It closes, the physical node is tieed up resource vector by d and represented, the element in the d dimensions resource vector is each of the physical node Tie up resource can apportioning cost, the d is positive integer more than 1;
Obtain the point on the corresponding subspace mapping to space filling curve of resource requirement range of virtual machine user, and shape Into second set, the resource requirement range is tieed up resource requirement matrix by d and is represented, i-th in the d dimensions resource requirement matrix Row vector represents the i-th dimension resource requirement codomain of virtual machine user, and the codomain includes demand lower limiting value rilowWith the demand upper limit Value rihigh, the value of the i is the positive integer in section [1, d];
A physical node to be allocated is selected from the corresponding physical node of point in third set, and is the virtual machine User distributes each dimension resource on the physical node to be allocated, and the third collection is combined into the first set and the described second collection The intersection of conjunction.
With reference to first aspect, in the first possible realization method of first aspect, the physical node is mapped to sky Between point on space filling curve represented by binary form, for the first physical node, obtain first physical node and be mapped to Point on space filling curve includes:
To the d dimensions resource in the d of first physical node dimension resource vector can apportioning cost encode respectively, obtain institute Stating d dimensions resource can corresponding d the first binary code of apportioning cost;
Each bit binary value of the d the first binary codes is extracted successively since the 1st, until described in extraction Last bit binary value of d the first binary codes;
The binary numeral of the extraction is connected to generate the first binary system sequence, obtains the first physical node mapping Point on to space filling curve.
The possible realization method of with reference to first aspect the first, in second of possible realization method of first aspect In, to the d of first physical node dimension resource can in apportioning cost i-th dimension resource can apportioning cost encode, obtain described i-th Dimension resource can corresponding first binary code of apportioning cost include:
Set the lower limiting value s of i-th dimension resource in d dimension resource spacesiminWith upper limit value simaxAnd the tree of binary search tree High k;
Interative computation is proceeded by from the root node of the binary search tree, until reaching the kth of the binary search tree Node layer, the interative computation include:
Obtain the siminWith the simaxIntermediate value simid, and the i-th dimension resource of first physical node can divide With value siWith the simidSize;
If the siLess than the simid, then it is corresponding to be encoded to 0 into left subtree, and by the simaxValue be updated to institute State simidValue;
Otherwise, it is corresponding to be encoded to 1 into right subtree, and by the siminValue be updated to the simidValue.
With reference to first aspect, in the third possible realization method of first aspect, the resource of the virtual machine user The point that range of needs is mapped on space filling curve represents by binary form, the resource requirement for obtaining virtual machine user Point on the corresponding subspace mapping to space filling curve of range, and form second set and include:
The r of the i-th dimension resource requirement codomain is obtained respectivelyilowCorresponding second binary code and the rihighIt is right The third binary code answered;
XOR operation is carried out to second binary code and the third binary code successively from left to right, until for the first time It is 1 the exclusive or result occur;
When it is 1 that exclusive or result is first appeared in jth position, the 1st to the two of jth position of second binary code is kept Binary value is constant, and from jth ,+1 proceeds by the first operation up to last position of arrival, and first operation includes:If work as Everybody is 0 on the right side of anteposition, then the binary numeral for keeping present bit is constant, and all positions on the right side of present bit become F, institute It states F and shows that the numerical value of present bit is 0 or the numerical value of present bit is 1;Otherwise, if present bit is 0, present bit is become 1, it will Everybody becomes F on right side, if present bit is 1, keeps the numerical value of present bit constant and promotes one to the right, so as to obtain the 4th Binary code set, wherein, the value of j is the positive integer in section [1, k];
Also, the 1st binary numeral to jth position for keeping the third binary code is constant, since jth+1 The second operation and third operation are carried out until reaching last position, second operation includes:If the right side of present bit everybody It is 1, then the binary numeral for keeping present bit is constant, and by the right side of present bit, everybody becomes F, otherwise keeps the two of present bit Binary value it is constant and to the right promote one;The third operation includes:If present bit is 0, the binary system of present bit is kept Numerical value it is constant and to the right promote one, if present bit be 1, present bit is become 0, everybody becomes F by right side, so as to obtain 5th binary code set;
Obtain the corresponding 6th binary code set z of the i-th dimension resource requirement codomaini, the 6th binary system code collection Close ziFor the 4th binary code set and the 5th binary code union of sets collection;
The d is tieed up in resource requirement codomain and respectively ties up the corresponding 6th binary code set z of resource requirement codomain1Extremely zdMake cartesian product, obtain the second binary code set of strings, it is empty to obtain the corresponding son of the resource requirement range of virtual machine user Between be mapped to point on space filling curve, and form second set.
With reference to first aspect to any one in the third possible realization method of first aspect, in first aspect In 4th kind of possible realization method, the method further includes:
It monitors in the d dimension resources of the virtual machine user and respectively ties up the service condition of resource and the physical node to be allocated D dimension resources in respectively tie up the remaining situation of resource;
I-th dimension resource usage amount and the r when the virtual machine userilowDifference be more than predetermined threshold value TiWhen, by institute State rilowIt is updated to rilow+△i
If the surplus of the i-th dimension resource of the physical node to be allocated is more than or equal to △i, then from described to be allocated It is that the virtual machine user adds stock number △ on physical nodei, the △iValue be more than the TiValue;
If the resource residual amount of the i-th dimension resource of the physical node to be allocated is less than △i, then according to updated described rilowWith the rihighThe second set and the third set are updated, and is selected again from the updated third set Select the physical node to be allocated.
Second aspect provides a kind of management equipment, including:
Acquiring unit is respectively mapped to for obtaining all physical nodes in cloud computing system on space filling curve Point, and first set is formed, the physical node is tieed up resource vector by d and is represented, the element in the d dimensions resource vector is institute State physical node each dimension resource can apportioning cost, the d is the positive integer more than 1;
The acquiring unit is additionally operable to, and obtains the corresponding subspace mapping of resource requirement range of virtual machine user to space Point on space filling curve, and second set is formed, the resource requirement range is tieed up resource requirement matrix by d and is represented, the d dimensions I-th of row vector represents the i-th dimension resource requirement codomain of virtual machine user in resource requirement matrix, and the codomain is included under demand Limit value rilowWith demand upper limit value rihigh, the value of the i is the positive integer in section [1, d];
Processing unit, for selecting a physical node to be allocated from the corresponding physical node of point in third set, And each dimension resource on the physical node to be allocated is distributed for the virtual machine user, the third collection is combined into first collection Close the intersection with the second set.
With reference to second aspect, in the first possible realization method of second aspect, the physical node is mapped to sky Between point on space filling curve represent that, for the first physical node, the acquiring unit is specifically used for by binary form:
To the d dimensions resource in the d of first physical node dimension resource vector can apportioning cost encode respectively, obtain institute Stating d dimensions resource can corresponding d the first binary code of apportioning cost;
Each bit binary value of the d the first binary codes is extracted successively since the 1st, until described in extraction Last bit binary value of d the first binary codes;
The binary numeral of the extraction is connected to generate the first binary system sequence, obtains the first physical node mapping Point on to space filling curve.
With reference to the first possible realization method of second aspect, in second of possible realization method of second aspect In, the acquiring unit is specifically used for:
Set the lower limiting value s of i-th dimension resource in d dimension resource spacesiminWith upper limit value simaxAnd the tree of binary search tree High k;
Interative computation is proceeded by from the root node of the binary search tree, until reaching the kth of the binary search tree Node layer, the interative computation include:
Obtain the siminWith the simaxIntermediate value simid, and the i-th dimension resource of any physical node can divide With value siWith the simidSize;
If the siLess than the simid, then it is corresponding to be encoded to 0 into left subtree, and by the simaxValue be updated to institute State simidValue;
Otherwise, it is corresponding to be encoded to 1 into right subtree, and by the siminValue be updated to the simidValue.
With reference to second aspect, in the third possible realization method of second aspect, the acquiring unit is specifically used for:
The r of the i-th dimension resource requirement codomain is obtained respectivelyilowCorresponding second binary code and the rihighIt is right The third binary code answered;
XOR operation is carried out to second binary code and the third binary code successively from left to right, until for the first time It is 1 the exclusive or result occur;
When it is 1 that exclusive or result is first appeared in jth position, the 1st to the two of jth position of second binary code is kept Binary value is constant, and from jth ,+1 proceeds by the first operation up to last position of arrival, and first operation includes:If work as Everybody is 0 on the right side of anteposition, then the binary numeral for keeping present bit is constant, and all positions on the right side of present bit become F, institute It states F and shows that the numerical value of present bit is 0 or the numerical value of present bit is 1;Otherwise, if present bit is 0, present bit is become 1, it will Everybody becomes F on right side, if present bit is 1, keeps the numerical value of present bit constant and promotes one to the right, so as to obtain the 4th Binary code set, wherein, the value of j is the positive integer in section [1, k];
Also, the 1st binary numeral to jth position for keeping the third binary code is constant, since jth+1 The second operation and third operation are carried out until reaching last position, second operation includes:If the right side of present bit everybody It is 1, then the binary numeral for keeping present bit is constant, and by the right side of present bit, everybody becomes F, otherwise keeps the two of present bit Binary value it is constant and to the right promote one;The third operation includes:If present bit is 0, the binary system of present bit is kept Numerical value it is constant and to the right promote one, if present bit be 1, present bit is become 0, everybody becomes F by right side, so as to obtain 5th binary code set;
Obtain the corresponding 6th binary code set z of the i-th dimension resource requirement codomaini, the 6th binary system code collection Close ziFor the 4th binary code set and the 5th binary code union of sets collection;
The d is tieed up in resource requirement codomain and respectively ties up the corresponding 6th binary code set z of resource requirement codomain1Extremely zdMake cartesian product, obtain the second binary code set of strings, it is empty to obtain the corresponding son of the resource requirement range of virtual machine user Between be mapped to point on space filling curve, and form second set.
With reference to second aspect to second aspect the third possible realization method in any one, in second aspect In 4th kind of possible realization method, the processing unit is additionally operable to:
It monitors in the d dimension resources of the virtual machine user and respectively ties up the service condition of resource and the physical node to be allocated D dimension resources in respectively tie up the remaining situation of resource;
I-th dimension resource usage amount and the r when the virtual machine userilowDifference be more than predetermined threshold value TiWhen, by institute State rilowIt is updated to rilow+△i
If the surplus of the i-th dimension resource of the physical node to be allocated is more than or equal to △i, then from described to be allocated It is that the virtual machine user adds stock number △ on physical nodei, the △iValue be more than the TiValue;
If the resource residual amount of the i-th dimension resource of the physical node to be allocated is less than △i, then according to updated described rilowWith the rihighThe second set and the third set are updated, and is selected again from the updated third set Select the physical node to be allocated.
The embodiment of the present invention provides a kind of resource regulating method and management equipment, by obtain d tie up resource can apportioning cost retouch The first set that the point that all physical nodes are respectively mapped on one-dimensional space space filling curve in the cloud computing system stated is formed, and Obtain what the point on the corresponding subspace mapping to one-dimensional space space filling curve of d dimension resource requirement matrixes of virtual machine user was formed Second set so that management equipment does not need to carry out one by one each dimension resource as the prior art when carrying out scheduling of resource Matching, and only need the point in the point and second set in first set carrying out one-dimensional matching, so as to obtain first set with The intersection of second set, the corresponding physical node of point in the intersection are the physics for meeting virtual machine user resource requirement range Node.Thus, it is possible to it solves in the prior art when carrying out scheduling of resource, due to needing virtual machine user respectively tieing up resource requirement In value and cloud computing system each dimension resource of all physical nodes can apportioning cost compared one by one so that match complexity is high, from And the problem of causing management equipment consumed resource big.
Description of the drawings
It in order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be in embodiment or description of the prior art Required attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is only some realities of the present invention Example is applied, it for those of ordinary skill in the art, without creative efforts, can also be according to these attached drawings Obtain other attached drawings.
Fig. 1 is a kind of method flow schematic diagram provided in an embodiment of the present invention;
Fig. 2 is another method flow schematic diagram provided in an embodiment of the present invention;
Fig. 3 is another method flow schematic diagram provided in an embodiment of the present invention;
Fig. 4 is a kind of structure diagram of binary search tree provided in an embodiment of the present invention;
Fig. 5 is a kind of structure diagram of management equipment provided in an embodiment of the present invention.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other without creative efforts Embodiment shall fall within the protection scope of the present invention.
Referring to Fig. 1, the embodiment of the present invention provides a kind of resource regulating method, and key step can include:
101st, management equipment obtains all physical nodes in cloud computing system and is respectively mapped to the point on space filling curve, And first set is formed, physical node is tieed up resource vector by d and is represented, the element in d dimension resource vectors is each of physical node Tie up resource can apportioning cost, d is positive integer more than 1.
Wherein, management equipment can be carrying out the equipment such as the management server of scheduling of resource in cloud computing system.Object Reason node refers to distribute the computer equipment of resource, the resource that physical node provides for virtual machine user in cloud computing system Can include the multi dimensional resources such as cpu resource, memory source, disk space resource, Internet resources, physical node from d tie up resource to Amount<s1,s2,…,sd>It represents, wherein each element siIt can be a certain of virtual machine user distribution to characterize physical node Tie up resource can apportioning cost, therefore a physical node can correspond to a point in d dimension spaces, and d therein is more than 1 just Integer, the value of i is the positive integer in section [1, d].
Space filling curve is a kind of method that d dimension spaces are mapped as to the one-dimensional space, can include Z curves, Hilbert Curve and Gray curves etc..Element in this step in first set is mapped to for physical node on one-dimensional space space filling curve Point, all points that all physical nodes are mapped on space filling curve in cloud computing system form first set.Its In, by with d dimensions resource can the physical node of apportioning cost description be mapped as point on one-dimensional space space filling curve, can be in resource tune It d is tieed up into resource matched problem during degree is converted into one-dimensional matching problem and handle, so as to reduce matched dimension, drop The complexity of low matching process.
102nd, the corresponding subspace mapping of resource requirement range of management equipment acquisition virtual machine user fills song to space Point on line, and second set is formed, resource requirement range is tieed up resource requirement matrix by d and is represented, in d dimension resource requirement matrixes I-th of row vector represents the i-th dimension resource requirement codomain of virtual machine user, and codomain includes demand lower limiting value rilowWith the demand upper limit Value rihigh, the value of i is the positive integer in section [1, d].
Wherein, the resource requirement range of virtual machine user is tieed up resource requirement matrix by d and is represented, d dimension resource requirement matrixes In i-th row vector represent user into rack business when by each dimension resource requirement range of virtual machine application, per one-dimensional money Source range of needs is represented by a resource requirement codomain.Illustratively, the d dimensions resource requirement matrix of virtual machine user can be with It is expressed as ([r1low,r1high],[r2low,r2high],…,[rdlow,rdhigh]).From geometric meaning, the d of virtual machine user It ties up the subspace that resource requirement matrix corresponds in d dimension resource spaces and ties up hypercube, d dimension hypercube mappings for a d All points on to space filling curve form second set.Illustratively, the d dimension resource requirement matrixes of virtual machine user In, one dimensional resource and its demand codomain therein can be cpu resource [2 cores, 4 cores], and another one dimensional resource and its demand codomain can Think memory source [1G, 2G], another one dimensional resource and its demand codomain can be disk space resource [10G, 20G] etc..Certainly, It can also include other types of resource in d dimension resource requirement matrixes and its demand codomain no longer repeats one by one here.Wherein, with I-th dimension resource in d dimension resource requirement matrixes is for memory source, memory source demand codomain [1G, 2G] represents virtual machine The demand lower limiting value r of the memory source of user demandilowFor 1G, demand upper limit value rihighFor 2G, the memory of virtual machine user provides Source range of needs is [1G, 2G].
The element in second set in this step is tieed up the corresponding subspace of resource requirement range for the d of virtual machine user and is reflected The point being mapped on one-dimensional space space filling curve.By the way that the d of virtual machine user is tieed up the corresponding subspace mapping of resource requirement range Onto one-dimensional space space filling curve, d can be tieed up into resource matched problem and be converted into one-dimensional matching problem when carrying out scheduling of resource It is handled, so as to reduce resource matched dimension, reduces the complexity of matching process.Meanwhile by the d of virtual machine user The corresponding subspace mapping of resource requirement range is tieed up as the point on one-dimensional space space filling curve, maintains space adjacency, space In point on adjacent area maps to space curve also be located at close position.
Compared with being only capable of in the prior art through resource requirement of the determining resource requirement value to describe virtual machine user, this The d dimension resource requirement matrixes of virtual machine user in step allow virtual machine user to describe resource requirement by range, so as to Enhance the flexibility that user applies for resource mode.
In addition, since cloud computing system in the prior art is typically according to virtual machine user need to the charge of virtual machine user The size for the stock number asked carrys out divided rank.For example, for memory source, if memory source requirements are at [1G, 2G] In the range of, then it charges relatively low;If memory source requirements in the range of [4G, 6G], are then charged higher.Thus, by range come The resource requirement of virtual machine user is described, can be matched with fees policy of the prior art, convenient for charging and managing.
103rd, management equipment selects a physical node to be allocated from the corresponding physical node of point in third set, and Each dimension resource on physical node to be allocated is distributed for virtual machine user, third collection is combined into the friendship of first set and second set Collection.
Since the corresponding d of the resource requirement range for the virtual machine user that resource requirement matrix description is tieed up by d ties up hypercube Body subspace may map to the second set of the point on one-dimensional space space filling curve, thus, if the point in second set is simultaneously A physical node is corresponded to, then the physical node centainly meets the d dimension resource requirement ranges of virtual machine user.Therefore, in this step In rapid, the point in first set can be compared with the point in second set in this step for management equipment, if first set In point simultaneously also in second set, then illustrate that the corresponding physical node of point meets the resource requirement model of virtual machine user It encloses.That is, the corresponding physical node of point in the intersection of first set and second set meets the money of virtual machine user Source range of needs, thus can be selected from intersection, that is, third set of first set and second set according to default allocation strategy One physical node to be allocated, so as to which the resource on physical node to be allocated be configured for virtual machine user.Here default distribution Strategy can be energy conservation priority allocation strategy, the preferential allocation strategy of load balancing etc..
It should be noted that due to the d of the point in first set on space filling curve and physical node dimension resource can minute It is corresponding with being worth, and the point in second set on space filling curve is corresponding with virtual machine user d dimension resource requirement codomains, because And each dimension resource in the d dimension resources of first set physical node corresponding with the point in the intersection of second set can apportioning cost it is equal Meet each dimension resource requirement range of virtual machine user.
In embodiments of the present invention, since management equipment collects the point in first set and second when carrying out scheduling of resource Point in conjunction carries out one-dimensional comparison, you can the set for meeting the physical node that virtual machine user respectively ties up resource requirement range is obtained, Cause without matching each dimension resource as the prior art one by one, so as to reduce matched dimension and matching process Complexity, reduce the resource consumption of management equipment, can solve in the prior art when carrying out scheduling of resource, due to need Virtual machine user is respectively tieed up all physical nodes in resource requirement value and cloud computing system each dimension resource can apportioning cost carry out by One compares so that match complexity is high, so as to cause management equipment consumed resource it is big the problem of.
The embodiment of the present invention provides a kind of resource regulating method, by obtain d tie up resource can the cloud computing that describes of apportioning cost The first set that the point that all physical nodes are respectively mapped on one-dimensional space space filling curve in system is formed, and obtain virtual machine The second set that point on the corresponding subspace mapping to one-dimensional space space filling curve of d dimension resource requirement matrixes of user is formed, So that management equipment when carrying out scheduling of resource, does not need to match each dimension resource one by one as the prior art, and only It needs the point in the point and second set in first set carrying out one-dimensional matching, so as to obtain first set and second set Intersection, the corresponding physical node of point in the intersection are the physical node for meeting virtual machine user resource requirement range.Thus, It can solve in the prior art when carrying out scheduling of resource, due to needing that virtual machine user is respectively tieed up to resource requirement value and cloud computing In system each dimension resource of all physical nodes can apportioning cost compared one by one so that match complexity is high, so as to cause management The problem of device resource consumption is big.
Referring to Fig. 2, the embodiment of the present invention provides a kind of resource regulating method, by space filling curve for for Z curves into Row explanation, the point and the resource requirement range of virtual machine user that physical node is mapped on space filling curve are mapped to space Point on space filling curve can be represented that key step can include by binary form:
201st, management equipment to the d dimensions resource in the d of the first physical node dimension resource vector can apportioning cost compile respectively Code, obtaining d dimensions resource can corresponding d the first binary code of apportioning cost.
First physical node therein can be any physical node in cloud computing system.Illustratively, referring to Fig. 3, Management equipment to the d of the first physical node dimension resource can in apportioning cost i-th dimension resource can apportioning cost encode, obtain i-th dimension Resource can corresponding first binary code of apportioning cost may comprise steps of:
001st, management equipment setting d ties up the lower limiting value s of i-th dimension resource in resource spaceiminWith upper limit value simaxAnd two Pitch the high k of tree of search tree.
Wherein, d ties up the lower limiting value s of i-th dimension resource in resource spaceiminWith upper limit value simaxIt may indicate that cloud computing system The minimum usable levels and maximum value available of middle i-th dimension resource.Illustratively, by taking i-th dimension resource is cpu resource as an example, if under it Limit value can be 1 core, and upper limit value can be 16 cores, then show the cpu resource that the physical node in cloud computing system can distribute And the cpu resource minimum that virtual machine user can apply can be 1 core, maximum can be 16 cores.
By binary search tree and iterative algorithm, management equipment can be to physical node any in cloud computing system for example The i-th dimension resource of first physical node can apportioning cost progress binary coding.Wherein, the high k of the tree of binary tree may indicate that coding The binary code of acquisition to the i-th dimension resource of the first physical node can apportioning cost approximation ratio, what k can be according to actual needs Precision is set.
002nd, management equipment proceeds by interative computation from the root node of binary search tree, until reaching binary search tree Kth node layer.
Interative computation therein can include:Management equipment obtains siminWith simaxIntermediate value simid, and compare the first physics The i-th dimension resource of node can apportioning cost siWith simidSize;If siLess than simid, then it is corresponding to be encoded to 0 into left subtree, and By simaxValue be updated to simidValue;Otherwise, then it is corresponding to be encoded to 1 into right subtree, and by siminValue be updated to simid Value.
Specifically, referring to Fig. 4, since root node, management equipment can be by section [simin, simax] be divided into it is identical big Two small subinterval [simin,simid] and [simid, simax].Compare siWith simidValue, if si<simid, then into left son Tree, and by simaxValue be updated to simidValue, what is this time obtained after iteration is encoded to 0, i.e. the 1st binary code v1It is 0;Such as Fruit si≥simid, then into right subtree, and by siminValue be updated to simidValue, what is this time obtained after iteration is encoded to 1, i.e. si The 1st binary code v1It is 1, then continues interative computation, until reaches the kth node layer of binary search tree.If It is higher for required precision, then repeatedly subinterval can be divided and be iterated operation, interval division number and repeatedly Generation number corresponds to the high k of tree of binary search tree.The k dimension binary codes v obtained by above-mentioned cataloged procedure1, v2,…,vkIt is then the One physical node i-th dimension resource can apportioning cost siBinary code, referred to herein as the first binary code.
It should be noted that the embodiment of the present invention by binary search tree and iterative algorithm to the d of the first physical node Dimension resource can apportioning cost carry out binary coding be only to coding mode for example, be not intended as the present invention restriction model It encloses.
202nd, management equipment extracts each bit binary value of d the first binary codes successively since the 1st, until Extract last bit binary value of d the first binary codes, and connect the binary numeral of extraction with generate the one or two into Sequence processed obtains the point that the first physical node is mapped on space filling curve.
Obtain in step 201 the first physical node d dimensions resource can after corresponding d the first binary codes of apportioning cost, In this step, management equipment can extract the first of the 1st the first binary system sequence of formation of d the first binary codes respectively Group d bit binary value (v11,v21,...,vd1), then successively respectively the 2nd of extraction d the first binary codes to kth position, Second group of d bit binary value of the first binary system sequence is respectively formed to kth group d bit binary value, the 1st of formation the System sequence can be expressed as (v11,v21,...,vd1,...,v1k,v2k,...,vdk).The first binary system sequence is d dimension moneys Source can apportioning cost be mapped to the binary representation of the point on space filling curve, that is, d dimensions resource can apportioning cost description The first physical node be mapped to the binary representation of the point on space filling curve, you can to obtain the first physical node The point being mapped on space filling curve.Certainly, the first binary system sequence can also be converted into the decimal system or hexadecimal etc. its Its form, so as to represent that the first physical node is mapped to the point on space filling curve, space here by other forms Space filling curve is Z curves.
203rd, management equipment is mapped to space according to all physical nodes in step 201 to 202 acquisition cloud computing systems and fills out The point on curve is filled, and forms first set.
Management equipment can obtain the point that the first physical nodes are mapped on space filling curve according to step 201 to 202 Mode, obtain all physical nodes in cloud computing system and be mapped to all points on space filling curve, and form first Set.
Element in the first set obtained due to step 201-203 ties up resource for the d of physical node can apportioning cost mapping Point on to one-dimensional space space filling curve, and hyperspace can be reduced to the one-dimensional space by space filling curve, thus according to object Reason node d dimension resource can apportioning cost physical node is mapped on one-dimensional space space filling curve, can carry out scheduling of resource When, d dimension matching problems are converted into one-dimensional matching problem and are handled, so as to reduce matched dimension, reduction matched The complexity of journey.
204th, management equipment obtains the r of i-th dimension resource requirement codomain respectivelyilowCorresponding second binary code and rihighIt is right The third binary code answered.
In this step, binary search tree in above-mentioned steps 201 may be used in management equipment and iterative algorithm is right respectively The r of i-th dimension resource requirement codomainilowAnd rihighBinary coding is carried out, obtains rilowCorresponding second binary code and rihigh Corresponding third binary code, detailed process may refer to the description in step 201, and which is not described herein again.
205th, management equipment carries out step-by-step XOR operation to the second binary code and third binary code successively from left to right, Until it is 1 to first appear exclusive or result.
Wherein, since the second binary code is the corresponding binary code of lower limiting value, third binary code is corresponded to for upper limit value Binary code, and lower limiting value is usually less than upper limit value, thus the second binary code is different from third binary code, and the two or two Ary codes are less than third binary code.When management equipment from left to right successively carries out the second binary code and third binary code During step-by-step exclusive or, if j first appear exclusive or result as 1, illustrate the 1st of the second binary code and third binary code extremely Jth -1 is identical.Illustratively, if the second binary code is 00100, third binary code is 01101, then the second binary code It is 1 that the 1st exclusive or result with third binary code, which is the 0, the 2nd exclusive or result, performs following steps at this time.
206th, when it is 1 that exclusive or result is first appeared in jth position, the 1st to the two of jth position of the second binary code is kept Binary value is constant, and from jth ,+1 proceeds by the first operation up to last position of arrival, and the first operation includes:If present bit Right side everybody be 0, then the binary numeral for keeping present bit is constant, and all positions on the right side of present bit become F, and F shows The numerical value of present bit is 0 or the numerical value of present bit is 1;Otherwise, if present bit is 0, present bit is become 1, right side is each Position becomes F, if present bit is 1, keeps the numerical value of present bit constant and promotes one to the right, so as to obtain the 4th binary system Code collection is closed.
If the second binary code is 00100, third binary code is 01101, then first appearing exclusive or result at the 2nd is 1, at this point, for the second binary code, the 1st and the 2nd invariant position are kept, the first operation is performed since the 3rd.3rd Everybody is 0 on position right side, thus the binary numeral of holding the 3rd is constant, and the 4th and the 5th, right side becomes F, acquisition 4th binary code collection is combined into { 001FF }, and F therein shows that the numerical value of present bit is 0 or the numerical value of present bit is 1, i.e., and Four binary code collection are combined into { 00100,00101,00110,00111 }.
207th, when it is 1 that exclusive or result is first appeared in jth position, the 1st to the two of jth position of third binary code is kept Binary value is constant, and from jth ,+1 proceeds by the second operation and third operation up to reaching last position, the second operation packet It includes:If everybody is 1 on the right side of present bit, the binary numeral for keeping present bit is constant, and by the right side of present bit, everybody is equal Become F, otherwise keep present bit binary numeral it is constant and to the right promote one;Third operation includes:If present bit is 0, Then keep the binary numeral of present bit constant and to the right promote one, if present bit be 1, present bit is become 0, by right side Everybody becomes F, so as to obtain the 5th binary code set.
If the second binary code is 00100, third binary code is 01101, then first appearing exclusive or result at the 2nd is 1, at this point, for third binary code, the 1st and the 2nd invariant position are kept, the second operation is performed since the 3rd:3rd It is 1 that everybody, which is not, on the right side of position, and promoting one to determine the 4th right side to the right, whether everybody is 1, and the 5th of the 4th right side is 1, thus keep the binary numeral of the 4th constant, become F by the 5th, so as to obtain 0110F.For third binary code For, the 1st and the 2nd invariant position are kept, third operation is performed since the 3rd:3rd is 1, thus becomes 0 by the 3rd, By right side, the 4th and the 5th becomes F, so as to obtain 010FF.Thus, perform the second operation and third operation obtain the 5th Binary code collection is combined into { 010FF, 0110F }, and F therein shows that the numerical value of present bit is 0 or the numerical value of present bit is 1, i.e., 5th binary code collection is combined into { 01000,01001,01010,01011,01100,01101 }.
208th, management equipment obtains the corresponding 6th binary code set z of i-th dimension resource requirement codomaini, the 6th binary system Code collection closes ziFor the 4th binary code set and the 5th binary code union of sets collection.
After obtaining the 4th binary code set by step 206 and obtaining the 5th binary code set by step 207, The 4th binary code set and the 5th binary code union of sets collection, i.e. the 6th binary code set z can be obtainedi.Wherein, Six binary code set ziIn binary code be [rilow,rihigh] the corresponding binary code of value in section.For example, the 6th 2 Ary codes set ziCan be { 001FF, 010FF, 0110F }.
Further, management equipment may be used the described methods of step 204-208 and obtain in d dimension resource requirement codomains It is each to tie up the corresponding 6th binary code set z of resource requirement codomain1To zd
209th, d is tieed up in resource requirement codomain and is respectively tieed up the corresponding z of resource requirement codomain by management equipment1To zdMake flute card You are long-pending, obtains the second binary code set of strings, is arrived with the corresponding subspace mapping of resource requirement range for obtaining virtual machine user Point on space filling curve, and form second set.
In this step, it is corresponding will can respectively to tie up resource requirement codomain in d dimension resource requirement codomains for management equipment 6th binary code set z1To zdMake cartesian product, so as to obtain the second binary code set of strings.Specifically, management equipment can With in z1, z2..., zdIn respectively take an element, be denoted as m1, m2..., md, to generate a second binary system sequence, the two or two First group of d binary code of system sequence are respectively by m1, m2..., mdFirst composition, d binary codes of jth group are by m1, m2..., mdJth position form.Work as z1, z2..., zdIn all elements when all having taken, all second binary codes of generation Element in set of strings is on the corresponding subspace mapping to space filling curve of resource requirement range of virtual machine user The binary representation of point, all points on space filling curve which represents form second set, Here space filling curve is Z curves.The corresponding physical node of element in second binary code set of strings is to meet void The physical node of the resource requirement range of plan machine user.Illustratively, if d is 2, and corresponding 6th binary code set z1={ 001FF, 010FF, 0110F }, z2={ 001FF, 0001F, 0100F }, then the second binary code trail be combined into {000010F1FF,000011FFFF,000110F0FF,01001FFFF,001000F1FF,001100F0FF,0010110FFF, 00101001FF, 00111000FF }, F therein represents that present bit can be 0 or 1.
The embodiment of the present invention obtains the corresponding subspace of resource requirement range of virtual machine user by step 204-209 The point represented on space filling curve by binary form is mapped to, and forms second set.Wherein, by virtual machine user It, can be when carrying out scheduling of resource, by d on the corresponding subspace mapping to one-dimensional space space filling curve of d dimension resource requirement ranges It ties up resource matched problem and is converted into one-dimensional matching problem and handled, so as to reduce resource matched dimension, reduce matching The complexity of process.
210th, management equipment selects a physical node to be allocated from the corresponding physical node of point in third set, and Each dimension resource on physical node to be allocated is distributed for virtual machine user, third collection is combined into the friendship of first set and second set Collection.
In this step, management equipment can be from intersection, that is, third set of first set and second set according to default Allocation strategy selects a physical node to be allocated, so as to which the resource on physical node to be allocated be configured for virtual machine user, Detailed process may refer to the description in step 103.Wherein, first set physics corresponding with the point in the intersection of second set Each dimension resource in the d dimension resources of node can apportioning cost meet each dimension resource requirement range of virtual machine user, i.e. physics section Each dimension resource of point can apportioning cost be all higher than either equal to the lower limiting value of corresponding each dimension resource requirement range and being less than or waiting In the upper limit value of corresponding each dimension resource requirement range.
Illustratively, in this step by by the element in first set compared with the element in second set to obtain The intersection of first set and second set when, if an element in first set is 0010100101, due to the second collection In conjunction in second set 00101001FF (including 0010100100,0010100101,0010100110, 0010100111) match, then intersection of the element for first set and second set, the corresponding physical node of the element meets The resource requirement range of virtual machine user.
In embodiments of the present invention, due to management equipment when carrying out scheduling of resource by the first binary system in first set The point that the second binary code string in point and second set that sequence represents represents carries out one-dimensional compare, it is possible to it is empty to obtain satisfaction The set of the physical node of plan machine user's Ge Wei resource requirement ranges, because without as the prior art to it is each dimension resource into Row matches one by one, so as to reduce the complexity of matched dimension and matching process, reduces the resource consumption of management equipment, energy It is enough to solve in the prior art when carrying out scheduling of resource, due to needing that virtual machine user is respectively tieed up to resource requirement value and cloud computing system In system each dimension resource of all physical nodes can apportioning cost compare one by one so that match complexity is high, set so as to cause management The problem of standby consumed resource is big.
Wherein, after physical node to be allocated is selected according to default allocation strategy, management equipment is from physical node to be allocated Upper each dimension resource value for virtual machine user distribution can respectively tie up the lower limiting value of resource requirement, such as manage slightly larger than virtual machine user Reason equipment is that the resource value of the i-th dimension resource of virtual machine user distribution can be rilow+△i, wherein △iOccurrence according to right The resource type answered is different and different.In cloud computing system, the resource usage amount of virtual machine user is often dynamic change, Thus management equipment can distribute resource for virtual machine user by stages, dynamically, specifically can be by following steps come real It is existing:
211st, the service condition of resource and physics to be allocated are respectively tieed up in the d dimension resources of management equipment monitoring virtual machine user The remaining situation of resource is respectively tieed up in the d dimension resources of node.
After each dimension resource on physical node to be allocated is distributed for virtual machine user, management equipment can also monitor virtually It is respectively tieed up in the d dimension resources of machine user in the service condition of resource and the d dimension resources of physical node to be allocated and respectively ties up the surplus of resource Remaining situation, in order to be adjusted to the resource value of virtual machine distribution at any time.
212nd, when the i-th dimension resource usage amount and r of virtual machine userilowDifference be more than predetermined threshold value TiWhen, management equipment By rilowIt is updated to rilow+△i
When management equipment monitors the i-th dimension resource usage amount and r of virtual machine userilowDifference be more than predetermined threshold value Ti When, show resource value of the management equipment for virtual machine user distribution from physical node to be allocated, may be insufficient for virtual Demand of the machine user to i-th dimension resource, thus can be by rilowIt is updated to rilow+△i, in order to according to updated rilow Resource is distributed for virtual machine user.Wherein, TiOccurrence can be different and different according to the type of i-th dimension resource.
213rd, management equipment determines whether the surplus of the i-th dimension resource of physical node to be allocated is more than or equal to △i, Then enter step 214 or step 215.
The 214th, if the surplus of the i-th dimension resource of physical node to be allocated is more than or equal to △i, then management equipment is from treating It distributes on physical node and adds stock number △ for virtual machine useri, △iValue be more than TiValue, then reenter step 211.
In rilowIt is updated to rilow+△iLater, if the surplus of the i-th dimension resource of physical node to be allocated is more than or waits In △i, then from physical node to be allocated stock number △ is added for virtual machine useri, so that management equipment is used for virtual machine The resource of family distribution disclosure satisfy that the resource requirement of virtual machine user, wherein, TiValue can be more than △iValue.
In addition, if management equipment monitors rilowIt is more than with the difference of the i-th dimension resource usage amount of virtual machine user default Threshold value Ti, then can also be by rilowIt is updated to rilow-△i, and the resource from physical node to be allocated for virtual machine user distribution Amount reduces △i, so as to be dynamically that virtual machine user distributes resource.
Since the actual use amount that virtual machine user respectively ties up resource in practical application is not usually fixed value, but exist respectively It is fluctuated in a certain range, and source scheduling mode of the prior art frequently to change when the demand of user but wave When dynamic range is smaller, the quantity of continually add drop virtual machine is needed, and continually increasing virtual machine quantity needs repeatedly to carry out The configuration works such as network share, business are shared, information is exchanged visits, thus workload is increased, improve cost.And of the invention real In the resource regulating method for applying example offer, the physical node to be allocated selected from third set is to meet virtual machine user resource The physical node of range of needs, thus when the actual use amount that virtual machine user respectively ties up resource fluctuates in range of needs, when Each dimension resource in preceding physical node to be allocated can meet the actual use amount of each dimension resource of virtual machine user, so as to To be that the currently used virtual machine of user expands in a manner of current virtual machine user adds resource by being by stages, dynamically Resource, the quantity without needing continually add drop virtual machine as the prior art, so as to avoid a large amount of configuration work Make, reduce cost.
The 215th, if the resource residual amount of the i-th dimension resource of physical node to be allocated is less than △i, then management equipment is according to update R afterwardsilowAnd rihighSecond set and third set are updated, then reenters step 210, so as to from updated third collection Physical node to be allocated is reselected in conjunction.
In rilowIt is updated to rilow+△iLater, if the resource residual amount of the i-th dimension resource of physical node to be allocated is less than △i, then after showing that current physical node to be allocated is insufficient for the resource requirement of virtual machine user, thus needs are according to update RilowAnd rihighSecond set is updated, and then updates third set, then reenters step 210, so as to from updated Physical node to be allocated is reselected in third set.
Wherein, according to updated rilowAnd rihighSecond set is updated, can be included:
Mode 1:Using the algorithm in 204-209, according to updated rilowAnd rihighThe second set regained is i.e. For updated second set.
Mode 2:Using the algorithm in 204-209, according to the r before updateilowObtain [rilow,rilow+△i] it is mapped to sky Between point on space filling curve the 4th set, the element element in second set removed in the 4th set is as updated Second set.
Compared with mode 1, due to [rilow,rilow+△i] interval range be less than [rilow,rihigh] interval range, because And the calculation amount of mode 2 is small compared with the calculation amount of mode 1.
It should be noted that in above process, when physical node appoint one dimensional resource can apportioning cost change when, can With according to the resource after variation can apportioning cost obtain the first binary system sequence of the node, and update the physics section in first set The corresponding first binary system sequence of point.
The embodiment of the present invention provides a kind of resource regulating method, by obtain d tie up resource can the cloud computing that describes of apportioning cost The first set that the point that all physical nodes are respectively mapped on one-dimensional space space filling curve in system is formed, and obtain virtual machine The second set that point on the corresponding subspace mapping to one-dimensional space space filling curve of d dimension resource requirement matrixes of user is formed, So that management equipment when carrying out scheduling of resource, does not need to match each dimension resource one by one as the prior art, and only It needs the point in the point and second set in first set carrying out one-dimensional matching, so as to obtain first set and second set Intersection, the corresponding physical node of point in the intersection are the physical node for meeting virtual machine user resource requirement range.Thus, It can solve in the prior art when carrying out scheduling of resource, due to needing that virtual machine user is respectively tieed up to resource requirement value and cloud computing In system each dimension resource of all physical nodes can apportioning cost compared one by one so that match complexity is high, so as to cause management The problem of device resource consumption is big.
Referring to Fig. 5, the embodiment of the present invention provides a kind of management equipment 300, which can include:
Acquiring unit 301 can be used for obtaining all physical nodes in cloud computing system and be respectively mapped to space filling song Point on line, and first set is formed, physical node is tieed up resource vector by d and is represented, the element in d dimension resource vectors is physics Each dimension resource of node can apportioning cost, d is the positive integer more than 1.
Acquiring unit 301 can be also used for, and the corresponding subspace mapping of resource requirement range for obtaining virtual machine user arrives Point on space filling curve, and second set is formed, resource requirement range is tieed up resource requirement matrix by d and is represented, d dimension resources I-th of row vector represents the i-th dimension resource requirement codomain of virtual machine user in requirement matrix, and codomain includes demand lower limiting value rilow With demand upper limit value rihigh, the value of i is the positive integer in section [1, d].
Processing unit 302 can be used for selecting an object to be allocated from the corresponding physical node of point in third set Node is managed, and each dimension resource on physical node to be allocated is distributed for virtual machine user, third collection is combined into first set and second Intersection of sets collection.
Wherein, management equipment 300 here can be carrying out the management server of scheduling of resource in cloud computing system Etc. equipment.
The point that physical node is mapped on space filling curve is represented by binary form, for the first physical node, is obtained Take unit 301 that can be specifically used for:
To the d dimensions resource in the d of the first physical node dimension resource vector can apportioning cost encode respectively, obtain d dimension moneys It source can corresponding d the first binary code of apportioning cost;
Each bit binary value of d the first binary codes is extracted successively since the 1st, until extraction d first Last bit binary value of binary code;
The binary numeral of extraction is connected to generate the first binary system sequence, the first physical node of acquisition is mapped to space and fills out Fill the point on curve.
Further, acquiring unit 301 can be specifically used for:
Set the lower limiting value s of i-th dimension resource in d dimension resource spacesiminWith upper limit value simaxAnd the tree of binary search tree High k;
Interative computation is proceeded by from the root node of binary search tree, until reaching the kth node layer of binary search tree, repeatedly Include for operation:
Obtain siminWith simaxIntermediate value simid, and the i-th dimension resource of any physical node can apportioning cost siWith simid Size;
If siLess than simid, then it is corresponding to be encoded to 0 into left subtree, and by simaxValue be updated to simidValue;
Otherwise, it is corresponding to be encoded to 1 into right subtree, and by siminValue be updated to simidValue.
Acquiring unit 301 can also be specifically used for:
The r of i-th dimension resource requirement codomain is obtained respectivelyilowCorresponding second binary code and rihighCorresponding 3rd 2 into Code processed;
XOR operation is carried out to the second binary code and third binary code successively from left to right, until first appearing exclusive or As a result it is 1;
When it is 1 that exclusive or result is first appeared in jth position, the 1st binary system to jth position of the second binary code is kept Numerical value is constant, and from jth ,+1 proceeds by the first operation up to last position of arrival, and the first operation includes:If the right side of present bit Everybody is 0 for side, then the binary numeral for keeping present bit is constant, and all positions on the right side of present bit become F, and F shows currently The numerical value of position is 0 or the numerical value of present bit is 1;Otherwise, if present bit is 0, present bit is become 1, everybody is equal by right side Become F, if present bit is 1, keeps the numerical value of present bit constant and promote one to the right, so as to obtain the 4th binary system code collection It closes, wherein, the value of j is the positive integer in section [1, k];
Also, the 1st binary numeral to jth position for keeping third binary code is constant, and from jth ,+1 proceeds by Until reaching last position, the second operation includes for second operation and third operation:If everybody is 1 on the right side of present bit, protect The binary numeral for holding present bit is constant, and by the right side of present bit, everybody becomes F, otherwise keeps the binary numeral of present bit Constant and propulsion one to the right;Third operation includes:If present bit be 0, keep the binary numeral of present bit constant and to It is right to promote one, if present bit is 1, present bit is become 0, everybody becomes F by right side, so as to obtain the 5th binary code Set;
Obtain the corresponding 6th binary code set z of i-th dimension resource requirement codomaini, the 6th binary code set ziIt is the 4th Binary code set and the 5th binary code union of sets collection;
D is tieed up in resource requirement codomain and respectively ties up the corresponding 6th binary code set z of resource requirement codomain1To zdMake Cartesian product is obtained the second binary code set of strings, is reflected with the corresponding subspace of resource requirement range for obtaining virtual machine user The point being mapped on space filling curve, and form second set.
Processing unit 302 can be also used for:
The service condition of resource and the d dimension moneys of physical node to be allocated are respectively tieed up in the d dimension resources of monitoring virtual machine user The remaining situation of resource is respectively tieed up in source;
When the i-th dimension resource usage amount and r of virtual machine userilowDifference be more than predetermined threshold value TiWhen, by rilowIt is updated to rilow+△i
If the surplus of the i-th dimension resource of physical node to be allocated is more than or equal to △i, then from physical node to be allocated It is upper to add stock number △ for virtual machine useri, △iValue be more than TiValue;
If the resource residual amount of the i-th dimension resource of physical node to be allocated is less than △i, then according to updated rilowWith rihighSecond set and third set are updated, and physical node to be allocated is reselected from updated third set.
The embodiment of the present invention provides a kind of management equipment 300, by obtain d tie up resource can the cloud computing system that describes of apportioning cost The first set that the point that all physical nodes are respectively mapped on one-dimensional space space filling curve in system is formed, and obtain virtual machine use The second set that point on the corresponding subspace mapping to one-dimensional space space filling curve of d dimension resource requirement matrixes at family is formed, makes Management equipment 300 is obtained when carrying out scheduling of resource, does not need to match each dimension resource one by one as the prior art, and only It needs the point in the point and second set in first set carrying out one-dimensional matching, so as to obtain first set and second set Intersection, the corresponding physical node of point in the intersection are the physical node for meeting virtual machine user resource requirement range.Thus, It can solve in the prior art when carrying out scheduling of resource, due to needing that virtual machine user is respectively tieed up to resource requirement value and cloud computing In system each dimension resource of all physical nodes can apportioning cost compared one by one so that match complexity is high, so as to cause management The problem of 300 consumed resource of equipment is big.
In several embodiments provided herein, it should be understood that disclosed management equipment and method, Ke Yitong Other modes are crossed to realize.For example, the apparatus embodiments described above are merely exemplary, for example, the division of unit, only Only a kind of division of logic function can have other dividing mode in actual implementation, such as multiple units or component can be tied It closes or is desirably integrated into another system or some features can be ignored or does not perform.Another point, it is shown or discussed Mutual coupling, direct-coupling or communication connection can be the INDIRECT COUPLING or logical by some interfaces, device or unit Letter connection can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separate, be shown as unit Component may or may not be physical unit, you can be located at a place or can also be distributed to multiple networks On unit.Some or all of unit therein can be selected according to the actual needs to realize the purpose of this embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also That the independent physics of each unit includes, can also two or more units integrate in a unit.Above-mentioned integrated list The form that hardware had both may be used in member is realized, can also be realized in the form of hardware adds SFU software functional unit.
The above-mentioned integrated unit realized in the form of SFU software functional unit, can be stored in one and computer-readable deposit In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, is used including some instructions so that a computer Equipment (can be personal computer, server or the network equipment etc.) performs the part step of each embodiment method of the present invention Suddenly.And aforementioned storage medium includes:USB flash disk, mobile hard disk, read-only memory (Read-Only Memory, abbreviation ROM), with Machine access memory (Random Access Memory, abbreviation RAM), magnetic disc or CD etc. are various can to store program code Medium.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although The present invention is described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that:It still may be used To modify to the technical solution recorded in foregoing embodiments or carry out equivalent replacement to which part technical characteristic; And these modification or replace, various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution spirit and Range.

Claims (8)

1. a kind of resource regulating method, which is characterized in that including:
It obtains all physical nodes in cloud computing system and is respectively mapped to the point on space filling curve, and form first set, The physical node is tieed up resource vector by d and is represented, each dimension money of the element in the d dimensions resource vector for the physical node Source can apportioning cost, the d is positive integer more than 1;
The point on the corresponding subspace mapping to space filling curve of resource requirement range of virtual machine user is obtained, and forms the Two set, the resource requirement range are tieed up resource requirement matrix by d and are represented, in the d dimensions resource requirement matrix i-th of row to Amount represents the i-th dimension resource requirement codomain of virtual machine user, and the codomain includes demand lower limiting value rilowWith demand upper limit value rihigh, the value of the i is the positive integer in section [1, d];
A physical node to be allocated is selected from the corresponding physical node of point in third set, and is the virtual machine user Each dimension resource on the physical node to be allocated is distributed, the third collection is combined into the first set and the second set Intersection;
The point that the resource requirement range of the virtual machine user is mapped on space filling curve is represented by binary form, described The point on the corresponding subspace mapping to space filling curve of resource requirement range of virtual machine user is obtained, and forms the second collection Conjunction includes:
The r of the i-th dimension resource requirement codomain is obtained respectivelyilowCorresponding second binary code and the rihighIt is corresponding Third binary code;
XOR operation is carried out to second binary code and the third binary code successively from left to right, until first appearing The exclusive or result is 1;
When it is 1 that exclusive or result is first appeared in jth position, the 1st binary system to jth position of second binary code is kept Numerical value is constant, and from jth ,+1 proceeds by the first operation up to last position of arrival, and first operation includes:If present bit Right side everybody be 0, then the binary numeral for keeping present bit is constant, and all positions on the right side of present bit become F, the F The numerical value for showing present bit is 0 or the numerical value of present bit is 1;Otherwise, if present bit is 0, present bit is become 1, it will be right Everybody becomes F for side, if present bit is 1, keeps the numerical value of present bit constant and promotes one to the right, so as to obtain the four or two Ary codes set, wherein, the value of j is the positive integer in section [1, k];
Also, the 1st binary numeral to jth position for keeping the third binary code is constant, and from jth ,+1 proceeds by Until reaching last position, second operation includes for second operation and third operation:If everybody is 1 on the right side of present bit, The binary numeral for then keeping present bit is constant, and by the right side of present bit, everybody becomes F, otherwise keeps the binary system of present bit Numerical value it is constant and to the right promote one;The third operation includes:If present bit is 0, the binary numeral of present bit is kept Constant and propulsion one to the right, if present bit is 1, becomes 0, everybody becomes F by right side, so as to obtain the 5th by present bit Binary code set;
Obtain the corresponding 6th binary code set z of the i-th dimension resource requirement codomaini, the 6th binary code set ziFor 4th binary code set and the 5th binary code union of sets collection;
The d is tieed up in resource requirement codomain and respectively ties up the corresponding 6th binary code set z of resource requirement codomain1To zdMake Cartesian product is obtained the second binary code set of strings, is reflected with the corresponding subspace of resource requirement range for obtaining virtual machine user The point being mapped on space filling curve, and form second set.
2. according to the method described in claim 1, it is characterized in that, the physical node is mapped to the point on space filling curve It is represented by binary form, for the first physical node, obtains first physical node and be mapped on space filling curve Point includes:
To the d dimensions resource in the d of first physical node dimension resource vector can apportioning cost encode respectively, obtain the d Tieing up resource can corresponding d the first binary code of apportioning cost;
Each bit binary value of the d the first binary codes is extracted successively since the 1st, until extracting d described Last bit binary value of first binary code;
The binary numeral of the extraction is connected to generate the first binary system sequence, first physical node is obtained and is mapped to sky Between point on space filling curve.
3. according to the method described in claim 2, it is characterized in that, the d dimension resources to first physical node can apportioning cost Middle i-th dimension resource can apportioning cost encoded, obtain the i-th dimension resource can corresponding first binary code of apportioning cost include:
Set the lower limiting value s of i-th dimension resource in d dimension resource spacesiminWith upper limit value simaxAnd the high k of tree of binary search tree;
Interative computation is proceeded by from the root node of the binary search tree, until reaching the kth layer section of the binary search tree Point, the interative computation include:
Obtain the siminWith the simaxIntermediate value simid, and the i-th dimension resource of first physical node can apportioning cost siWith the simidSize;
If the siLess than the simid, then it is corresponding to be encoded to 0 into left subtree, and by the simaxValue be updated to it is described simidValue;
Otherwise, it is corresponding to be encoded to 1 into right subtree, and by the siminValue be updated to the simidValue.
4. according to claim 1-3 any one of them methods, which is characterized in that the method further includes:
It monitors in the d dimension resources of the virtual machine user and respectively ties up the service condition of resource and the d of the physical node to be allocated The remaining situation of resource is respectively tieed up in dimension resource;
I-th dimension resource usage amount and the r when the virtual machine userilowDifference be more than predetermined threshold value TiWhen, by described in rilowIt is updated to rilow+△i
If the surplus of the i-th dimension resource of the physical node to be allocated is more than or equal to △i, then from the physics to be allocated It is that the virtual machine user adds stock number △ on nodei, the △iValue be more than the TiValue;
If the resource residual amount of the i-th dimension resource of the physical node to be allocated is less than △i, then according to the updated rilow With the rihighThe second set and the third set are updated, and institute is reselected from the updated third set State physical node to be allocated.
5. a kind of management equipment, which is characterized in that including:
Acquiring unit, for obtaining the point that all physical nodes in cloud computing system are respectively mapped on space filling curve, and First set is formed, the physical node is tieed up resource vector by d and represented, the element in the d dimensions resource vector is the object Manage node each dimension resource can apportioning cost, the d is the positive integer more than 1;
The acquiring unit is additionally operable to, and the corresponding subspace mapping of resource requirement range for obtaining virtual machine user is filled to space Point on curve, and second set is formed, the resource requirement range is tieed up resource requirement matrix by d and is represented, the d ties up resource I-th of row vector represents the i-th dimension resource requirement codomain of virtual machine user in requirement matrix, and the codomain includes demand lower limiting value rilowWith demand upper limit value rihigh, the value of the i is the positive integer in section [1, d];
Processing unit for selecting a physical node to be allocated from the corresponding physical node of point in third set, and is The virtual machine user distributes each dimension resource on the physical node to be allocated, the third collection be combined into the first set with The intersection of the second set;
The corresponding subspace mapping of resource requirement range that the acquiring unit is used to obtain virtual machine user fills song to space Point on line, and form second set and specifically include:
The r of the i-th dimension resource requirement codomain is obtained respectivelyilowCorresponding second binary code and the rihighIt is corresponding Third binary code;
XOR operation is carried out to second binary code and the third binary code successively from left to right, until first appearing The exclusive or result is 1;
When it is 1 that exclusive or result is first appeared in jth position, the 1st binary system to jth position of second binary code is kept Numerical value is constant, and from jth ,+1 proceeds by the first operation up to last position of arrival, and first operation includes:If present bit Right side everybody be 0, then the binary numeral for keeping present bit is constant, and all positions on the right side of present bit become F, the F The numerical value for showing present bit is 0 or the numerical value of present bit is 1;Otherwise, if present bit is 0, present bit is become 1, it will be right Everybody becomes F for side, if present bit is 1, keeps the numerical value of present bit constant and promotes one to the right, so as to obtain the four or two Ary codes set, wherein, the value of j is the positive integer in section [1, k];
Also, the 1st binary numeral to jth position for keeping the third binary code is constant, and from jth ,+1 proceeds by Until reaching last position, second operation includes for second operation and third operation:If everybody is 1 on the right side of present bit, The binary numeral for then keeping present bit is constant, and by the right side of present bit, everybody becomes F, otherwise keeps the binary system of present bit Numerical value it is constant and to the right promote one;The third operation includes:If present bit is 0, the binary numeral of present bit is kept Constant and propulsion one to the right, if present bit is 1, becomes 0, everybody becomes F by right side, so as to obtain the 5th by present bit Binary code set;
Obtain the corresponding 6th binary code set z of the i-th dimension resource requirement codomaini, the 6th binary code set ziFor 4th binary code set and the 5th binary code union of sets collection;
The d is tieed up in resource requirement codomain and respectively ties up the corresponding 6th binary code set z of resource requirement codomain1To zdMake Cartesian product is obtained the second binary code set of strings, is reflected with the corresponding subspace of resource requirement range for obtaining virtual machine user The point being mapped on space filling curve, and form second set.
6. management equipment according to claim 5, which is characterized in that the physical node is mapped on space filling curve Point represent that, for the first physical node, the acquiring unit is specifically used for by binary form:
To the d dimensions resource in the d of first physical node dimension resource vector can apportioning cost encode respectively, obtain the d Tieing up resource can corresponding d the first binary code of apportioning cost;
Each bit binary value of the d the first binary codes is extracted successively since the 1st, until extracting d described Last bit binary value of first binary code;
The binary numeral of the extraction is connected to generate the first binary system sequence, first physical node is obtained and is mapped to sky Between point on space filling curve.
7. management equipment according to claim 6, which is characterized in that the acquiring unit is specifically used for:
Set the lower limiting value s of i-th dimension resource in d dimension resource spacesiminWith upper limit value simaxAnd the high k of tree of binary search tree;
Interative computation is proceeded by from the root node of the binary search tree, until reaching the kth layer section of the binary search tree Point, the interative computation include:
Obtain the siminWith the simaxIntermediate value simid, and the i-th dimension resource of any physical node can apportioning cost siWith the simidSize;
If the siLess than the simid, then it is corresponding to be encoded to 0 into left subtree, and by the simaxValue be updated to it is described simidValue;
Otherwise, it is corresponding to be encoded to 1 into right subtree, and by the siminValue be updated to the simidValue.
8. according to claim 5-7 any one of them management equipments, which is characterized in that the processing unit is additionally operable to:
It monitors in the d dimension resources of the virtual machine user and respectively ties up the service condition of resource and the d of the physical node to be allocated The remaining situation of resource is respectively tieed up in dimension resource;
I-th dimension resource usage amount and the r when the virtual machine userilowDifference be more than predetermined threshold value TiWhen, by described in rilowIt is updated to rilow+△i
If the surplus of the i-th dimension resource of the physical node to be allocated is more than or equal to △i, then from the physics to be allocated It is that the virtual machine user adds stock number △ on nodei, the △iValue be more than the TiValue;
If the resource residual amount of the i-th dimension resource of the physical node to be allocated is less than △i, then according to the updated rilow With the rihighThe second set and the third set are updated, and institute is reselected from the updated third set State physical node to be allocated.
CN201510446911.1A 2015-07-27 2015-07-27 A kind of resource regulating method and management equipment Active CN105099951B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510446911.1A CN105099951B (en) 2015-07-27 2015-07-27 A kind of resource regulating method and management equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510446911.1A CN105099951B (en) 2015-07-27 2015-07-27 A kind of resource regulating method and management equipment

Publications (2)

Publication Number Publication Date
CN105099951A CN105099951A (en) 2015-11-25
CN105099951B true CN105099951B (en) 2018-06-26

Family

ID=54579528

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510446911.1A Active CN105099951B (en) 2015-07-27 2015-07-27 A kind of resource regulating method and management equipment

Country Status (1)

Country Link
CN (1) CN105099951B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126323B (en) * 2016-06-17 2019-11-22 广州商品清算中心股份有限公司 Real-time task scheduling method based on cloud platform
CN108122062B (en) * 2016-11-30 2021-11-26 阿里巴巴集团控股有限公司 Method and device for allocating resources in product set and establishing product and evaluation model of resources in product set
CN108829520B (en) * 2017-06-20 2022-03-29 成都灵跃云创科技有限公司 Server resource allocation method and device in cloud environment
CN107508765B (en) * 2017-08-15 2020-02-21 华为技术有限公司 Message processing method and device
CN110138519A (en) * 2018-02-02 2019-08-16 索尼公司 Device and method, computer readable storage medium in wireless communication system
CN111800293B (en) * 2020-06-05 2021-03-05 深圳库博能源科技有限公司 Edge calculation control gateway of intelligent micro-grid
CN111694649B (en) * 2020-06-12 2023-07-18 北京火山引擎科技有限公司 Resource scheduling method, device, computer equipment and storage medium
CN111897627B (en) * 2020-07-07 2022-05-17 烽火通信科技股份有限公司 Cloud computing resource quota management method and system
CN113793675A (en) * 2021-04-06 2021-12-14 北京京东拓先科技有限公司 Data processing method, device, medium and electronic equipment for rights and interests of family doctors
CN113656832B (en) * 2021-08-09 2024-07-02 支付宝(杭州)信息技术有限公司 Data processing method, device, equipment and medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7840598B2 (en) * 2007-04-18 2010-11-23 Siemens Aktiengesellschaft Method for distributing resources to network nodes in a decentralized data network

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7840598B2 (en) * 2007-04-18 2010-11-23 Siemens Aktiengesellschaft Method for distributing resources to network nodes in a decentralized data network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种感知底层网络属性的对等式资源发现方法;陈曦,曾华燊,吴涛;《四川大学学报(工程科学版)》;20120320(第2期);第105-111页 *

Also Published As

Publication number Publication date
CN105099951A (en) 2015-11-25

Similar Documents

Publication Publication Date Title
CN105099951B (en) A kind of resource regulating method and management equipment
CN105103506B (en) For the method and system for the non-homogeneous bandwidth request allocation bandwidth in system for cloud computing
CN105224392B (en) A kind of virtual computing resource quota management method and platform
CN104769550B (en) The method and system of bandwidth allocation in system for cloud computing
CN104407925A (en) Dynamic resource distribution method
CN107203412A (en) A kind of cloud resource method for optimizing scheduling that particle cluster algorithm is improved based on membranous system
CN107122490A (en) The data processing method and system of aggregate function in a kind of Querying by group
CN103902384B (en) The method and device of physical machine is distributed for virtual machine
CN103281374B (en) A kind of method of data fast dispatch during cloud stores
CN111182037A (en) Mapping method and device of virtual network
CN107864211A (en) Cluster resource dispatching method and system
CN108304256A (en) The method for scheduling task and device of low overhead in a kind of edge calculations
CN108241531A (en) A kind of method and apparatus for distributing resource for virtual machine in the cluster
CN103995749B (en) The calculation task allocating method and system of cell cloud system
CN111159859B (en) Cloud container cluster deployment method and system
CN106407007A (en) Elasticity analysis process oriented cloud resource allocation optimization method
CN109525404A (en) A kind of flow cell rate optimization method, device, computer equipment and medium
CN105490959B (en) Implementation method is embedded in based on the non-homogeneous bandwidth virtual data center that congestion is evaded
CN107357649A (en) The determination method, apparatus and electronic equipment of system resource deployment strategy
CN104933110B (en) A kind of data prefetching method based on MapReduce
CN106874108A (en) Thin cloud is minimized in mobile cloud computing use number technology
CN109038569A (en) Power distribution network reconstruction method, device and system and computer readable storage medium
CN107590000A (en) Secondary random sources management method/system, computer-readable storage medium and equipment
CN102340443B (en) Traffic scheduling device and method for packet switched network
CN106874069A (en) A kind of resources of virtual machine distribution method and device

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