CN104657195A - Resource binding method and device - Google Patents

Resource binding method and device Download PDF

Info

Publication number
CN104657195A
CN104657195A CN201510003961.2A CN201510003961A CN104657195A CN 104657195 A CN104657195 A CN 104657195A CN 201510003961 A CN201510003961 A CN 201510003961A CN 104657195 A CN104657195 A CN 104657195A
Authority
CN
China
Prior art keywords
vapp
described current
current
association
machine cpu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510003961.2A
Other languages
Chinese (zh)
Other versions
CN104657195B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201510003961.2A priority Critical patent/CN104657195B/en
Publication of CN104657195A publication Critical patent/CN104657195A/en
Application granted granted Critical
Publication of CN104657195B publication Critical patent/CN104657195B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the invention discloses a resource binding method and a resource binding device. The method comprises the steps: counting the degrees of association between the current virtual application (vAPP) and a plurality of vAPPs; selecting previous N vAPPs according to the sequence from high degree of association to low degree of association of the current vAPP from the plurality of vAPPs as related vAPPs of the current vAPP, wherein N is an integer which is greater than or equal to 1; binding the current vAPP and the related vAPPs to the same physical node. According to the embodiment of the invention, the vAPP performance can be improved.

Description

A kind of resource binding method and apparatus
Technical field
The present invention relates to the communications field, particularly relate to a kind of resource binding method and apparatus.
Background technology
Along with the development of virtual technology, the business of virtual machine process gets more and more, thus virtual machine business process (Virtual Application, vAPP) also gets more and more, and like this under virtual environment, the performance of vAPP is very important problem.The method of current lifting vAPP performance is mainly passed through with the CPU (VisualCPU of virtual machine, vcpu) for granularity carries out compatibility configuration, i.e. physically based deformation asymmetry internal storage access framework (NonUniform Memory Access Architecture, NUMA) by vcpu and physical machine CPU (PhysicalCPU, pcpu) bind, access to avoid remote memory.But may take multiple vcpu or multiple pcpu being applied to some vAPP, the granularity with vcpu being scheduling like this and optimizing, the performance boost of vAPP is direct, thus the Performance comparision of current vAPP is low.
Summary of the invention
The invention provides a kind of resource binding method and apparatus, the performance of vAPP can be promoted.
First aspect, the invention provides a kind of resource binding method, comprising:
The degree of association of statistics current virtual machine business process vAPP and multiple vAPP;
Select to associate vAPP according to the vAPP of top n in sequence from high to low as described current vAPP with the degree of association of described current vAPP from described multiple vAPP, wherein, described N be greater than or equal to 1 integer;
Described current vAPP is tied to identical physical node with the described vAPP of association.
In the first possible implementation of first aspect, described selection from described multiple vAPP associates vAPP according to the vAPP of top n in sequence from high to low as described current vAPP with the degree of association of described current vAPP, comprising:
From described multiple vAPP, select vAPP maximum with described current vAPP number of communications in special time to associate vAPP as described current vAPP; Or
From described multiple vAPP, select vAPP maximum with hypercalls Hypercall number of described current vAPP in special time to associate vAPP as described current vAPP.
In conjunction with first aspect, in the implementation that the second of first aspect is possible, described described current vAPP is tied to identical physical node with the described vAPP of association, comprises:
Described current vAPP and the described vAPP of association are tied on virtual machine CPU corresponding to identical physical machine CPU; Or
Described current vAPP is bound identical storage space with described relation vAPP; Or
Described current vAPP is tied to identical network interface with the described vAPP of association.
In conjunction with first aspect or the first possible implementation of first aspect or the possible implementation of the second of first aspect, in the implementation that the second of first aspect is possible, described method also comprises:
Calculate the pressure trend of physical machine CPU corresponding to the virtual machine CPU of described current vAPP binding;
When described pressure trend is pressure increase trend, the physical node at described physical machine CPU place selects another physical machine CPU, and virtual machine CPU corresponding with this physical machine for described current vAPP is bound.
In conjunction with the third possible implementation of first aspect, in the 4th kind of possible implementation of first aspect, described method also comprises:
When described pressure trend is that pressure reduces trend, and the described current vAPP virtual machine CPU corresponding with multiple physical machine CPU is when binding, by virtual machine CPU unbind relation corresponding with at least one physical machine CPU in described multiple physical machine CPU for described current vAPP.
Second aspect, the invention provides a kind of resource binding device, comprising: statistic unit, selection unit and the first binding unit, wherein:
Described statistic unit, for adding up the degree of association of current virtual machine business process vAPP and multiple vAPP;
Described selection unit, associates vAPP according to the vAPP of top n in sequence from high to low as described current vAPP with the degree of association of described current vAPP for selecting from described multiple vAPP, wherein, described N be greater than or equal to 1 integer;
Described first binding unit, for being tied to identical physical node by described current vAPP with the described vAPP of association.
In the first possible implementation of second aspect, described selection unit is used for from described multiple vAPP, select vAPP maximum with described current vAPP number of communications in special time to associate vAPP as described current vAPP; Or
Described selection unit is used for from described multiple vAPP, select vAPP maximum with hypercalls Hypercall number of described current vAPP in special time to associate vAPP as described current vAPP.
In conjunction with second aspect, in the implementation that the second of second aspect is possible, described first binding unit is for being tied to virtual machine CPU corresponding to identical physical machine CPU by described current vAPP and the described vAPP of association; Or
Described first binding unit is used for described current vAPP to bind identical storage space with described relation vAPP; Or
Described first binding unit is used for described current vAPP to be tied to identical network interface with the described vAPP of association.
In conjunction with second aspect or the first possible implementation of second aspect or the possible implementation of the second of second aspect, in the implementation that the second of second aspect is possible, described device also comprises:
Computing unit, the pressure trend of the physical machine CPU that the virtual machine CPU for calculating described current vAPP binding is corresponding;
Second binding unit, for when described pressure trend is pressure increase trend, the physical node at described physical machine CPU place selects another physical machine CPU, and is bound by virtual machine CPU corresponding with this physical machine for described current vAPP.
In conjunction with the third possible implementation of second aspect, in the 4th kind of possible implementation of second aspect, described device also comprises:
Lifting unit, for when described pressure trend being pressure reduction trend, and the described current vAPP virtual machine CPU corresponding with multiple physical machine CPU is when binding, by virtual machine CPU unbind relation corresponding with at least one physical machine CPU in described multiple physical machine CPU for described current vAPP.
In technique scheme, the degree of association of statistics current virtual machine business process vAPP and multiple vAPP; Select to associate vAPP according to the vAPP of top n in sequence from high to low as described current vAPP with the degree of association of described current vAPP from described multiple vAPP, wherein, described N be greater than or equal to 1 integer; Described current vAPP is tied to identical physical node with the described vAPP of association.VAPP high for the degree of association can be realized like this to be tied to identical physical node, thus the vAPP communication performance lifting each other that the degree of association is high, cause the performance boost of vAPP.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the schematic flow sheet of a kind of resource binding method that the embodiment of the present invention provides;
Fig. 2 is the schematic flow sheet of the another kind of resource binding method that the embodiment of the present invention provides;
Fig. 3 is the schematic diagram of a kind of IPC structure that the embodiment of the present invention provides;
Fig. 4 is the exchange channels schematic diagram between a kind of physical machine of providing of the embodiment of the present invention and virtual machine;
Fig. 5 is a kind of schematic diagram binding nuclear pressure condition monitoring stack that the embodiment of the present invention provides;
Fig. 6 is the binding relationship schematic diagram of a kind of vAPP and pcpu that the embodiment of the present invention provides;
Fig. 7 is the structural representation of a kind of physical machine that the embodiment of the present invention provides;
Fig. 8 is the schematic flow sheet of the another kind of resource binding method that the embodiment of the present invention provides;
Fig. 9 is the schematic flow sheet of the another kind of resource binding method that the embodiment of the present invention provides;
Figure 10 is the scene schematic diagram that the embodiment of the present invention provides a kind of application example;
Figure 11 is that in the example shown in Figure 10, UGW business virtual machine process ties up core exemplary plot;
Figure 12 is the structural representation of a kind of resource binding device that the embodiment of the present invention provides;
Figure 13 is the structural representation of the another kind of resource binding device that the embodiment of the present invention provides;
Figure 14 is the structural representation of the another kind of resource binding device that the embodiment of the present invention provides;
Figure 15 is the structural representation of the another kind of resource binding device that the embodiment of the present invention provides.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Refer to Fig. 1, Fig. 1 is the schematic flow sheet of a kind of resource binding method that the embodiment of the present invention provides, and as shown in Figure 1, comprises the following steps:
101, the degree of association of current vAPP and multiple vAPP is added up.
Above-mentioned current vAPP can be any one vAPP in a certain virtual machine, in addition, above-mentioned multiple vAPP can be that current vAPP belongs to the multiple vAPP in same virtual machine with this, or above-mentioned multiple vAPP can be multiple vAPP that current vAPP belongs to same virtual machine NUMA structure with this, or above-mentioned multiple vAPP can be that current vAPP belongs to the vAPP etc. in same physical machine with this.
In addition, the above-mentioned degree of association refers to the degree of association between two vAPP, such as: step 101 can be the degree of association of each vAPP in statistics current vAPP and multiple vAPP.In addition, the above-mentioned degree of association can be interpreted as the cohesion between two vAPP.Wherein, the degree of association of two vAPP can be directly proportional with the number of times communicated between these two vAPP, or the degree of association of two vAPP can be directly proportional to the similarity of the process business of these two vAPP, or the degree of association of two vAPP can be (English: Hypercall) number of times is directly proportional to the hypercalls between these two vAPP.
102, select to associate vAPP according to the vAPP of top n in sequence from high to low as described current vAPP with the degree of association of described current vAPP from described multiple vAPP, wherein, described N be greater than or equal to 1 integer.
This step can select one or more vAPP in above-mentioned multiple vAPP as the association vAPP of described current vAPP.
103, described current vAPP is tied to identical physical node with the described vAPP of association.
Step 103 can be that above-mentioned current vAPP is tied to same physical node with the above-mentioned vAPP of association, or is tied to identical multiple physical nodes.Wherein, above-mentioned physical node can be understood as computing node, or above-mentioned physical node can be understood as physics NUMA node.In addition, a physical machine can there is one or more physical node, a physical node can have one or more pcpu.
In addition, when a vAPP and physical node is bound, this vAPP just can call the resource of this physical node like this.
Optionally, said method can be applied to the smart machine possessing arbitrarily virtual functions, such as: server, computing machine, the network equipment etc.Or said method can be applied to any virtual machine, or said method can be performed by the scheduling decision device in virtual machine.
In the present embodiment, the degree of association of statistics current virtual machine business process vAPP and multiple vAPP; Select to associate vAPP according to the vAPP of top n in sequence from high to low as described current vAPP with the degree of association of described current vAPP from described multiple vAPP, wherein, described N be greater than or equal to 1 integer; Described current vAPP is tied to identical physical node with the described vAPP of association.VAPP high for the degree of association can be realized like this to be tied to identical physical node, thus the vAPP communication performance lifting each other that the degree of association is high, cause the performance boost of vAPP.
Refer to Fig. 2, Fig. 2 is the schematic flow sheet of the another kind of resource binding method that the embodiment of the present invention provides, and as shown in Figure 2, comprises the following steps:
201, the degree of association of current virtual machine business process vAPP and multiple vAPP is added up.
202, select to associate vAPP according to the vAPP of top n in sequence from high to low as described current vAPP with the degree of association of described current vAPP from described multiple vAPP, wherein, described N be greater than or equal to 1 integer.
Optionally, step 203 can comprise:
From described multiple vAPP, select vAPP maximum with described current vAPP number of communications in special time to associate vAPP as described current vAPP.
Wherein, the time period that above-mentioned special time can preset, such as: 1 second or 3 seconds or 10 seconds or 1 minute etc.
In this embodiment, above-mentioned communication can be interprocess communication (InterProcess Communication, IPC).
In this embodiment, step 201 can comprise:
The IPC sum of statistics above-mentioned current vAPP in above-mentioned special time;
To add up in above-mentioned multiple vAPP each vAPP in above-mentioned special time with IPC the number of above-mentioned current vAPP;
According to each vAPP with in above-mentioned special time with IPC the number of above-mentioned current vAPP, calculate the degree of association of each vAPP and above-mentioned current vAPP, wherein, the degree of association is directly proportional to IPC number.
Such as: the degree of association can pass through following formulae discovery
vAPPij=IPCij÷IPCi×100
Wherein, vAPPij represents the degree of association of vAPPi and vAPPj, and IPCij is vAPPi and vAPPj IPC number in above-mentioned special time, and IPCi is IPC sum in above-mentioned special time.
In addition, can also generate IPC communication structure matrix in the present embodiment, this IPC communication structure matrix can represent each other the IPC time number of above-mentioned current vAPP and above-mentioned multiple vAPP.Such as: for IPC structure as shown in Figure 3, IPC number between this two vAPP of the numeral on the line in this structure between two vAPP, like this can IPC communication structure matrix as follows for the IPC structure shown in Fig. 3:
The incidence matrix after standardization is obtained so as follows according to above-mentioned computing formula vAPPij=IPCij ÷ IPCi × 100:
Such as: be above-mentioned current vAPP example with above-mentioned vAPPi, in above-mentioned multiple vAPP, the degree of association of vAPP1 and above-mentioned current vAPP is the highest, like this when above-mentioned N is 1, vAPP1 just can be selected as the association vAPP of this current vAPP.
Optionally, step 203 can comprise:
Select in special time (English: the vAPP that Hypercall) number of times is maximum associates vAPP as described current vAPP's with the hypercalls of described current vAPP from described multiple vAPP.
In this embodiment, can using the association vAPP of vAPP maximum for Hypercall number as described current vAPP.In addition, the statistical for Hypercall number with reference to the above-mentioned statistical to IPC, can not do repeat specification herein.
203, described current vAPP is tied to identical physical node with the described vAPP of association.
Optionally, above-mentioned current vAPP associates vAPP with upper palm fibre can be vAPP in same virtual machine NUMA structure, like this degree of association much higher vAPP in same virtual machine NUMA structure is tied in identical physics NUMA structure, just can solve virtual machine NUMA structure and physics NUMA structure is inconsistent and business procedure may problem unmatched with NUMA, reach business process scheduling in virtual machine consistent with actual physical NUMA, the effect of performance boost.
Optionally, step 203 can comprise:
Described current vAPP and the described vAPP of association are tied on vcpu corresponding to identical pcpu.
Wherein, can be by above-mentioned current vAPP with associate vAPP and bind on vcpu corresponding to same or multiple pcpu, in addition, above-mentioned current vAPP with associate vAPP bind on vcpu corresponding to some pcpu can be by above-mentioned current vAPP with associate vAPP and bind identical vcpu corresponding to this pcpu, or bind different vcpu corresponding to this pcpu.In addition, the vcpu that vcpu corresponding to pcpu can run in this pcpu above, or the vcpu of mapping relations can be there is with this pcpu in vcpu corresponding to pcpu.
In addition, above-mentioned described current vAPP and the described vAPP of association being tied on vcpu corresponding to identical pcpu can also be described current vAPP and the described vAPP of association are tied to the vcpu that the pcpu of least-loaded on some physical nodes is corresponding.
This embodiment can realize current vAPP and associate vAPP and be tied to identical pcpu, and current like this vAPP and the information interaction associated between vAPP are just more quick, thus promote the performance of vAPP.
Optionally, step 203 can also comprise:
Described current vAPP is bound identical storage space with described relation vAPP.
Such as: above-mentioned current vAPP and relation vAPP is tied to same disk or same memory address is interval.Above-mentioned current vAPP and the memory property associating vAPP can be promoted like this.
Optionally, step 203 can also comprise:
Described current vAPP is tied to identical network interface with the described vAPP of association.
Above-mentioned current vAPP can be realized like this and associate vAPP and can use identical Internet resources, thus current vAPP and the communication performance associating vAPP can be promoted.
204, the pressure trend of pcpu corresponding to the vcpu of described current vAPP binding is calculated.
Above-mentioned pressure trend can be load pressure variation tendency, and in addition, the former figure pressure trend in step 204 can be with interior pressure trend at special time or specific period.
205, when described pressure trend is pressure increase trend, the physical node at described pcpu place selects another pcpu, and vcpu corresponding with this physical machine for described current vAPP is bound.
Optionally, above-mentioned pressure increase trend can be defined as pressure in special time or specific period and shows a rising trend.In addition, the current pressure of the pressure trend of pcpu to be the precondition of pressure increase trend can be this pcpu is greater than the first predetermined threshold value, such as: be greater than 90 or 95 etc.Wherein, in this embodiment, the size of pressure can be represent with 0-100, and wherein, pcpu is current when not having a load, and the pressure of this pcpu is 0, and when pcpu full load, this pcpu pressure is 100.In addition, the pressure of pcpu still represents the utilization factor of pcpu, such as: utilization factor is 0 pressure is 0, and utilization factor is 50%, then pressure is 50, and utilization factor is 100%, then pressure is 100.
In addition, above-mentioned pressure increase trend can be defined as current pressure and be greater than above-mentioned first predetermined threshold value, and within continuous print multiple cycle, pressure is in rising trend.Such as: for three cycles, above-mentioned pressure increase trend can the following condition of demand fulfillment:
The force value in the 3rd cycle is greater than 90;
It is in rising trend that 2nd cycle compares the 1st cycle pressure, and to compare the 2nd cycle pressure in rising trend the 3rd cycle.
In addition, in the present embodiment, virtual machine can create for each vAPP and safeguard a binding nuclear pressure condition monitoring stack, the force value of vAPP can be passed to like this in monitoring stack.Such as: as shown in Figure 4, between physical machine and virtual machine, carry out information interaction by exchange channels, the pressure of the pcpu of vAPP binding can be got like this by this exchange channels.Wherein, this exchange channels as shown in Figure 4, can first obtain the pressure state of each physical machine, then obtains the mapping relations of vcpu and pcpu, thus gets the pressure state of each vAPP.The force value of each vAPP that such exchange channels obtains just can be passed in this monitoring stack, wherein, the degree of depth of this monitoring stack can be 3, and it is stacked with PUSH, so just can obtain binding nuclear pressure condition monitoring stack as shown in Figure 5, wherein, VoP3, VoP2 and VoP2 are expressed as the force value of the 3rd, second and one-period.
In addition, in the present embodiment, the pcpu quantity that each vAPP can bind can limit in a quantity, such as: limit each vAPP and can bind with 5 or 6 pcpu at most.So, step 205 can be, when described pressure trend is pressure increase trend, and the quantity of the pcpu of above-mentioned current vAPP current bindings is when being less than specific threshold, the physical node at described pcpu place selects another pcpu, and vcpu corresponding with this physical machine for described current vAPP is bound.Certainly, the prerequisite selected here is, this physical node exists available pcpu.In addition, in the present embodiment, the physical machine that step 205 is selected can be the pcpu that in above-mentioned physical node, load pressure is minimum.
In this embodiment, or for three cycles, above-mentioned pressure trend is that pressure increase trend can be judged by following formula:
ToP(up)=(VoP3>95)&&(VoP2>VoP1)&&(VoP3>VoP2)&&(Num<Max)
Wherein, when pressure trend meets ToP (up), represent that this pressure trend is pressure increase trend, wherein, VoP3, VoP2 and VoP2 are expressed as the force value of the 3rd, second and one-period, Num represents the number of the physics tribute CPU of current vAPP current bindings, and Max represents the higher limit of the pcpu allowing binding.In addition, the pressure trend of pcpu it is also understood that the pressure trend for the vAPP bound with this pcpu, such step 205 it is also understood that as when the pressure trend of above-mentioned current vAPP is pressure increase trend, the physical node at described pcpu place selects another pcpu, and vcpu corresponding with this physical machine for described current vAPP is bound.Be directed to the above-mentioned formula of vAPP can be understood as:
The binding nuclear pressure value in the 3rd cycle is greater than 95;
2nd, the binding nuclear pressure value in 3 cycles is all in rising trend compared with basic value;
The number that current vAPP binds core is less than max.
Such as: as shown in Figure 6, vAPP is bundled in the pcpu1 on physical node 0 at first, if in 3 monitoring periods, the pressure trend of vApp1 meets pressure increase Rule of judgment.Then based on the mapping table of vcpu and pcpu, can identify that vAPP1 is bundled in the pcpu1 on physical node 0, physical node 0 found the physics core pcpu2 that load is relatively minimum, vApp1 is also tied on the vcpu corresponding to pcpu2 simultaneously.After above-mentioned adjustment, the nuclear mapping scope of tying up of vApp1 is pcpu1 and pcpu2.
In addition, step 205 can also be tied to by above-mentioned association vAPP on pcpu that step 205 selects.
Optionally, said method can also comprise the steps:
When described pressure trend is that pressure reduces trend, and when the described current vAPP vcpu corresponding with multiple pcpu binds, the vcpu unbind relation corresponding with at least one pcpu in described multiple pcpu by described current vAPP.
In this embodiment, can three cycles be example, above-mentioned pressure trend be that pressure reduction trend can be judged by following formula,
ToP(down)=(VoP3<50)&&(VoP2<VoP1)&&(VoP3<VoP2)&&(Num>1)
Wherein, when pressure trend meets ToP (down), represent that this pressure trend is that pressure reduces trend, wherein, VoP3, VoP2 and VoP2 are expressed as the force value of the 3rd, second and one-period, and Num represents the number of the physics tribute CPU of current vAPP current bindings.Be directed to the above-mentioned formula of vAPP like this can be understood as:
The binding nuclear pressure value in the 3rd cycle is less than 50;
2nd, the binding nuclear pressure value in 3 cycles is all on a declining curve compared with basic value;
Current vAPP binds the number size 1 of core.
In addition, above-mentioned steps can be by the above-mentioned current vAPP vcpu unbind relation corresponding with the minimum pcpu of load pressure in described multiple pcpu.This is that the vAPP of pressure increase trend uses by the pcpu of unbind relation with regard to can be used for pressure trend like this.
In addition, above-mentioned steps can also by vcpu unbind relation corresponding with the minimum pcpu of load pressure in described multiple pcpu for above-mentioned association vAPP.
Optionally, in the present embodiment, the structure of the physical machine of said method application can structure as shown in Figure 7, as shown in Figure 7, physical machine comprises physical node 1 and physical node 2, wherein, physical node 1 can comprise multiple PCPU, physical node 2 can comprise multiple PCPU, and this physical machine also comprises Hypervisor, and this physical machine is also deployed with virtual machine; Virtual machine can also comprise dummy node 1 and dummy node 2, and dummy node 1 can comprise multiple vcpu, and dummy node 1 can comprise multiple vcpu, in addition, virtual machine also comprises multiple vAPP.In addition, exchange channels can also be comprised between physical machine and virtual machine.The vAPP that be can be implemented as in virtual machine by said method so dynamically distributes physical resource.
The present embodiment, the basis of the embodiment shown in Fig. 1 adds the embodiment of plurality of optional, and can realize the performance promoting vAPP.
Refer to Fig. 8, Fig. 8 is the schematic flow sheet of the another kind of resource binding method that the embodiment of the present invention provides, and as shown in Figure 8, comprises the steps:
801, physical topological structure is obtained.
Wherein, this step can be the physical topological structure being obtained physical machine and virtual machine by the passage between physical machine and virtual machine.
802, the mean pressure of each physical node is calculated.
803, the corresponding relation of vcpu and pcpu is calculated.
804, start the degree of association between multi-process to detect.
805, add up the IPC sum of each vAPP, and build the communication overall situation matrix of each vAPP.
Wherein, the overall matrix that communicates can be the matrix introduced in the embodiment shown in Fig. 2.
806, for each vAPP selects suitable vcpu to bind, wherein, the vcpu that the vAPP that the degree of association is high binds is mapped on Same Physical node.
807, the utilization factor of pcpu corresponding to vAPP is detected every one-period.
808, for each vAPP safeguards pressure state stack, and the pressure trend of each vAPP in 3 cycles is calculated.
809, judging the pressure trend of vAPP, when for pressure increase trend, perform step 810, when reducing trend for pressure, performing step 812.
810, judge whether the physical node that this vAPP binds has available resources, if so, then perform step 811, if not, then maintain the statusquo.
811, the physical node corresponding to the vcpu bound at this vAPP is found the pcpu of least-loaded, and this pcpu is added to this vAPP ties up core scope, wherein, the check figure that this vAPP binds can not exceed higher limit.
812, find and tie up the core of least-loaded in core scope and unbind relation, wherein, this vAPP binds core can not be less than 1.
Refer to Fig. 9, Fig. 9 is the schematic flow sheet of the another kind of resource binding method that the embodiment of the present invention provides, and as shown in Figure 9, comprises the steps:
901, the physical topology of passage transmission and the pressure information of physical node is resolved.
902, for each vAPP selects suitable vcpu binding, wherein, the vcpu that the vAPP that the degree of association is high binds is mapped on Same Physical node.
903, the utilization factor of pcpu corresponding to vAPP is detected every one-period.
904, for each vAPP safeguards pressure state stack, and the pressure trend of each vAPP in 3 cycles is calculated.
905, judging the pressure trend of vAPP, when for pressure increase trend, perform step 810, when reducing trend for pressure, performing step 812.
906, judge whether the physical node that this vAPP binds has available resources, if so, then perform step 811, if not, then maintain the statusquo.
907, the physical node corresponding to the vcpu bound at this vAPP is found the pcpu of least-loaded, and this pcpu is added to this vAPP ties up core scope, wherein, the check figure that this vAPP binds can not exceed higher limit.
908, find and tie up the core of least-loaded in core scope and unbind relation, wherein, this vAPP binds core can not be less than 1.
Refer to Figure 10 and Figure 11, Figure 10 is the scene schematic diagram that the embodiment of the present invention provides a kind of application example, and Figure 11 is that in this example, UGW business virtual machine process ties up core exemplary plot.This example with the vpp in virtual machine for strategy dispatches granularity, physical topology and NUMA node pressure is obtained by the passage between physical machine and virtual machine, relevance between each vApp of Dynamic Recognition, based on the pressure prediction model of vApp process, what dynamically, in time and periodically adjust vApp ties up core scope.Its general illustration as shown in Figure 10, comprise terminal, base station, mobile management entity (Mobile Managenment Entity, MME), Universal Media Gateway (Universal Media Gateway, UMG), IP Multimedia System (IP MultimediaSubsystem, IMS) subnet), service chaining (Service-Chain), public switched telephone network (PSTN) (PublicTelephone Switch Network, PTSN) and internet.
Wherein, in the UGW virtual machine of UGW, each business function runs with independently process form, and after the technical scheme process provided by the embodiment of the present invention like this, service feature has the lifting of nearly 15%, wherein, the UGW business virtual machine process of this example ties up core exemplary plot as shown in figure 11, and generic server comprises physical node 0 and physical node 1, wherein, physical node 0 can comprise pcpu1 to pcpu4, and physical node 1 can comprise pcpui and pcpuj.UGW virtual machine can comprise vcpu1 to vcpu4, and vcpui and vcpuj, in addition, this virtual machine comprises data call access process, campus network statistics process, routing forwarding process, position trace daemon and system managing process.
Wherein, data call access process is high priority process in UGW network element, can first be configured the core strategy of tying up of each business process of UGW, configuration process is for dynamically to tie up core, it is 6 physics cores (max=6) that process ties up core range limit, and the sense cycle of scheduling decision device is 1s (interval=1).After the business process degree of association identification introduced by the embodiment of the present invention, correlation analysis result shows: the process the highest with data call access process context degree is respectively campus network statistics process and routing forwarding process.Scheduling decision device obtains physical topology and NUMA node pressure by exchange channels, data call is accessed process selection and is deployed on physical node 0, and be tied to pcpu1, the binding relationship specifically as shown in the solid line of Figure 11.In addition, in order to avoid remote memory access, process data call being accessed process, campus network statistics process and routing forwarding process 3 high degrees of association is deployed on physical node 0 simultaneously.Use the processing pressure of physics nuclear pressure stack model monitoring identification data calling access process, find the peak period using surfing Internet with cell phone user, the pressure of data call access process is in rising trend.Scheduling decision device finds the relatively minimum physics core pcpu2 of load at physical node 0, what be added to data call access process ties up core scope, by process by being only bundled in pcpu1, adjust to and be tied on pcpu1 and pcpu2 simultaneously, specifically solid line as shown in figure 11 and the binding relationship shown in dotted line.Pressure stack model continues the processing pressure of monitoring identification data calling access process, if pressure continues to rise, then continue to add the less physics core of new relative load and tie up core scope to data call access process, process can be bind at most on 6 cores.During peak period, system turns down the priority of campus network statistics process process automatically, just first records data on flows, does not add up.So the processing pressure of campus network statistics process is relatively little.
In addition, user uses the non-peak period of surfing Internet with cell phone, and scheduling decision device uses the processing pressure of physics nuclear pressure stack model monitoring identification data calling access process, and the processing pressure of show process declines gradually, and scheduler can discharge for it core bound.Now, the processing pressure that scheduler recognizes traffic statistics process starts to rise, then by cry access process discharge binding physics core be added to campus network to add up process used.The resource of the balanced each business process of scheduler uses, and promotes the performance of each business process.
Be apparatus of the present invention embodiment below, the method that apparatus of the present invention embodiment realizes for performing the inventive method embodiment one to five, for convenience of explanation, illustrate only the part relevant to the embodiment of the present invention, concrete ins and outs do not disclose, and please refer to the embodiment of the present invention one, embodiment two, embodiment three, embodiment four and embodiment five.
Refer to Figure 12, Figure 12 is the structural representation of a kind of resource binding device that the embodiment of the present invention provides, and as shown in figure 12, comprising: statistic unit 121, selection unit 122 and the first binding unit 123, wherein:
Described statistic unit 121, for adding up the degree of association of current virtual machine business process vAPP and multiple vAPP;
Described selection unit 122, associates vAPP according to the vAPP of top n in sequence from high to low as described current vAPP with the degree of association of described current vAPP for selecting from described multiple vAPP, wherein, described N be greater than or equal to 1 integer;
Described first binding unit 123, for being tied to identical physical node by described current vAPP with the described vAPP of association.
Optionally, said apparatus can be applied to the smart machine possessing arbitrarily virtual functions, such as: server, computing machine, the network equipment etc.Or said apparatus can be applied to any virtual machine, or said apparatus can be the scheduling decision device in virtual machine.
In the present embodiment, the degree of association of statistics current virtual machine business process vAPP and multiple vAPP; Select to associate vAPP according to the vAPP of top n in sequence from high to low as described current vAPP with the degree of association of described current vAPP from described multiple vAPP, wherein, described N be greater than or equal to 1 integer; Described current vAPP is tied to identical physical node with the described vAPP of association.VAPP high for the degree of association can be realized like this to be tied to identical physical node, thus the vAPP communication performance lifting each other that the degree of association is high, cause the performance boost of vAPP.
Refer to Figure 13, Figure 13 is the structural representation of the another kind of resource binding device that the embodiment of the present invention provides, as shown in figure 13, comprising: statistic unit 131, selection unit 132, first binding unit 133, computing unit 134 and the second binding unit 135, wherein:
Described statistic unit 131, for adding up the degree of association of current virtual machine business process vAPP and multiple vAPP;
Described selection unit 132, associates vAPP according to the vAPP of top n in sequence from high to low as described current vAPP with the degree of association of described current vAPP for selecting from described multiple vAPP, wherein, described N be greater than or equal to 1 integer;
Described first binding unit 133, for being tied to identical physical node by described current vAPP with the described vAPP of association;
Computing unit 134, the pressure trend of the pcpu that the vcpu for calculating described current vAPP binding is corresponding;
Second binding unit 135, for when described pressure trend is pressure increase trend, the physical node at described pcpu place selects another pcpu, and is bound by vcpu corresponding with this physical machine for described current vAPP.
Optionally, what selection unit 132 may be used for from described multiple vAPP, select vAPP maximum with described current vAPP number of communications in special time as described current vAPP associates vAPP; Or
Optionally, what selection unit 132 may be used for from described multiple vAPP, select vAPP maximum with hypercalls Hypercall number of described current vAPP in special time as described current vAPP associates vAPP.
Optionally, the first binding unit 133 may be used for described current vAPP and the described vAPP of association to be tied on vcpu corresponding to identical pcpu; Or
First binding unit 133 may be used for described current vAPP to bind identical storage space with described relation vAPP; Or
First binding unit 133 may be used for described current vAPP to be tied to identical network interface with the described vAPP of association.
Optionally, as shown in figure 14, said apparatus can also comprise:
Lifting unit 136, for being that pressure reduces trend when described pressure trend, and when the described current vAPP vcpu corresponding with multiple pcpu binds, the vcpu unbind relation corresponding with at least one pcpu in described multiple pcpu by described current vAPP.
The present embodiment, the basis of the embodiment shown in Figure 12 adds the embodiment of plurality of optional, and can realize the performance promoting vAPP.
Refer to Figure 15, Figure 15 is the structural representation of the another kind of resource binding device that the embodiment of the present invention provides, as shown in figure 15, this device comprises: at least one processor 151, such as CPU, at least one network interface 152 or other user interfaces 153, storer 155, at least one communication bus 152.Communication bus 152 is for realizing the connection communication between these assemblies.This computing node 150 optionally comprises user interface 153, comprises display, keyboard or pointing device (such as, mouse, trace ball (trackball), touch-sensitive plate or touch sensitive display screen).Storer 155 may comprise high-speed RAM storer, still may comprise non-labile storer (non-volatile memory), such as at least one magnetic disk memory.Storer 605 optionally can comprise at least one and be positioned at memory storage away from aforementioned processor 151.
In some embodiments, storer 155 stores following element, executable module or data structure, or their subset, or their superset:
Operating system 1551, comprises various system program, for realizing various basic business and processing hardware based task;
Application program module 1552, comprises various application program, for realizing various applied business.
In embodiments of the present invention, by call storer 155 store program or instruction, processor 151 for:
The degree of association of statistics current virtual machine business process vAPP and multiple vAPP;
Select to associate vAPP according to the vAPP of top n in sequence from high to low as described current vAPP with the degree of association of described current vAPP from described multiple vAPP, wherein, described N be greater than or equal to 1 integer;
Described current vAPP is tied to identical physical node with the described vAPP of association.
Optionally, what processor 151 performed select from described multiple vAPP with the degree of association of described current vAPP according to the vAPP of top n in sequence from high to low as the operation associating vAPP of described current vAPP, can comprise:
From described multiple vAPP, select vAPP maximum with described current vAPP number of communications in special time to associate vAPP as described current vAPP; Or
From described multiple vAPP, select vAPP maximum with hypercalls Hypercall number of described current vAPP in special time to associate vAPP as described current vAPP.
Optionally, the operation described current vAPP and the described vAPP of association being tied to identical physical node that processor 151 performs, can comprise:
Described current vAPP and the described vAPP of association are tied on vcpu corresponding to identical pcpu; Or
Described current vAPP is bound identical storage space with described relation vAPP; Or
Described current vAPP is tied to identical network interface with the described vAPP of association.
Optionally, the operation that processor 151 performs can also comprise:
Calculate the pressure trend of pcpu corresponding to the vcpu of described current vAPP binding;
When described pressure trend is pressure increase trend, the physical node at described pcpu place selects another pcpu, and vcpu corresponding with this physical machine for described current vAPP is bound.
Optionally, the operation that processor 151 performs can also comprise:
When described pressure trend is that pressure reduces trend, and when the described current vAPP vcpu corresponding with multiple pcpu binds, the vcpu unbind relation corresponding with at least one pcpu in described multiple pcpu by described current vAPP.
Optionally, said apparatus can be applied to the smart machine possessing arbitrarily virtual functions, such as: server, computing machine, the network equipment etc.
In the present embodiment, the degree of association of statistics current virtual machine business process vAPP and multiple vAPP; Select to associate vAPP according to the vAPP of top n in sequence from high to low as described current vAPP with the degree of association of described current vAPP from described multiple vAPP, wherein, described N be greater than or equal to 1 integer; Described current vAPP is tied to identical physical node with the described vAPP of association.VAPP high for the degree of association can be realized like this to be tied to identical physical node, thus the vAPP communication performance lifting each other that the degree of association is high, cause the performance boost of vAPP.
To sum up, the embodiment of the present invention, can realize much higher for a degree of association vAPP to be tied to identical physical node, thus can improve the performance of these vAPP.In addition, the pressure trend of the pcpu that the embodiment of the present invention can also be bound according to each vAPP, adds the pcpu that each vAPP binds or removes, thus can improve pcpu resource utilization.
One of ordinary skill in the art will appreciate that all or part of flow process realized in above-described embodiment method, that the hardware that can carry out instruction relevant by computer program has come, described program can be stored in a computer read/write memory medium, this program, when performing, can comprise the flow process of the embodiment as above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random access memory (Random Access Memory is called for short RAM) etc.
Above disclosedly be only present pre-ferred embodiments, certainly can not limit the interest field of the present invention with this, therefore according to the equivalent variations that the claims in the present invention are done, still belong to the scope that the present invention is contained.

Claims (10)

1. a resource binding method, is characterized in that, comprising:
The degree of association of statistics current virtual machine business process vAPP and multiple vAPP;
Select to associate vAPP according to the vAPP of top n in sequence from high to low as described current vAPP with the degree of association of described current vAPP from described multiple vAPP, wherein, described N be greater than or equal to 1 integer;
Described current vAPP is tied to identical physical node with the described vAPP of association.
2. the method for claim 1, is characterized in that, described selection from described multiple vAPP associates vAPP according to the vAPP of top n in sequence from high to low as described current vAPP with the degree of association of described current vAPP, comprising:
From described multiple vAPP, select vAPP maximum with described current vAPP number of communications in special time to associate vAPP as described current vAPP; Or
From described multiple vAPP, select vAPP maximum with hypercalls Hypercall number of described current vAPP in special time to associate vAPP as described current vAPP.
3. the method for claim 1, is characterized in that, described described current vAPP is tied to identical physical node with the described vAPP of association, comprising:
Described current vAPP and the described vAPP of association are tied on virtual machine CPU corresponding to identical physical machine CPU; Or
Described current vAPP is bound identical storage space with described relation vAPP; Or
Described current vAPP is tied to identical network interface with the described vAPP of association.
4. the method according to any one of claim 1-3, is characterized in that, described method also comprises:
Calculate the pressure trend of physical machine CPU corresponding to the virtual machine CPU of described current vAPP binding;
When described pressure trend is pressure increase trend, the physical node at described physical machine CPU place selects another physical machine CPU, and virtual machine CPU corresponding with this physical machine for described current vAPP is bound.
5. method as claimed in claim 4, it is characterized in that, described method also comprises:
When described pressure trend is that pressure reduces trend, and the described current vAPP virtual machine CPU corresponding with multiple physical machine CPU is when binding, by virtual machine CPU unbind relation corresponding with at least one physical machine CPU in described multiple physical machine CPU for described current vAPP.
6. a resource binding device, is characterized in that, comprising: statistic unit, selection unit and the first binding unit, wherein:
Described statistic unit, for adding up the degree of association of current virtual machine business process vAPP and multiple vAPP;
Described selection unit, associates vAPP according to the vAPP of top n in sequence from high to low as described current vAPP with the degree of association of described current vAPP for selecting from described multiple vAPP, wherein, described N be greater than or equal to 1 integer;
Described first binding unit, for being tied to identical physical node by described current vAPP with the described vAPP of association.
7. device as claimed in claim 6, is characterized in that, what described selection unit was used for from described multiple vAPP, select vAPP maximum with described current vAPP number of communications in special time as described current vAPP associates vAPP; Or
Described selection unit is used for from described multiple vAPP, select vAPP maximum with hypercalls Hypercall number of described current vAPP in special time to associate vAPP as described current vAPP.
8. device as claimed in claim 6, is characterized in that, described first binding unit is for being tied to virtual machine CPU corresponding to identical physical machine CPU by described current vAPP and the described vAPP of association; Or
Described first binding unit is used for described current vAPP to bind identical storage space with described relation vAPP; Or
Described first binding unit is used for described current vAPP to be tied to identical network interface with the described vAPP of association.
9. the device according to any one of claim 6-8, is characterized in that, described device also comprises:
Computing unit, the pressure trend of the physical machine CPU that the virtual machine CPU for calculating described current vAPP binding is corresponding;
Second binding unit, for when described pressure trend is pressure increase trend, the physical node at described physical machine CPU place selects another physical machine CPU, and is bound by virtual machine CPU corresponding with this physical machine for described current vAPP.
10. device as claimed in claim 9, it is characterized in that, described device also comprises:
Lifting unit, for when described pressure trend being pressure reduction trend, and the described current vAPP virtual machine CPU corresponding with multiple physical machine CPU is when binding, by virtual machine CPU unbind relation corresponding with at least one physical machine CPU in described multiple physical machine CPU for described current vAPP.
CN201510003961.2A 2015-01-05 2015-01-05 A kind of resource binding method and device Expired - Fee Related CN104657195B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510003961.2A CN104657195B (en) 2015-01-05 2015-01-05 A kind of resource binding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510003961.2A CN104657195B (en) 2015-01-05 2015-01-05 A kind of resource binding method and device

Publications (2)

Publication Number Publication Date
CN104657195A true CN104657195A (en) 2015-05-27
CN104657195B CN104657195B (en) 2018-03-06

Family

ID=53248371

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510003961.2A Expired - Fee Related CN104657195B (en) 2015-01-05 2015-01-05 A kind of resource binding method and device

Country Status (1)

Country Link
CN (1) CN104657195B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107436798A (en) * 2017-08-15 2017-12-05 深信服科技股份有限公司 A kind of process access method and device based on NUMA node
CN111752711A (en) * 2020-06-24 2020-10-09 浪潮(北京)电子信息产业有限公司 NUMA-based thread processing method, device, equipment and storage medium
CN113254186A (en) * 2021-06-15 2021-08-13 阿里云计算有限公司 Process scheduling method, scheduler and storage medium
CN113590306A (en) * 2021-06-16 2021-11-02 惠州市德赛西威汽车电子股份有限公司 Method for realizing reliable communication between two systems of domain controller
CN114115696A (en) * 2020-08-25 2022-03-01 华为技术有限公司 Memory deduplication method and device and storage medium
WO2024001559A1 (en) * 2022-06-28 2024-01-04 中兴通讯股份有限公司 Service scheduling method, electronic device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100318997A1 (en) * 2009-06-15 2010-12-16 Microsoft Corporation Annotating virtual application processes
CN102420850A (en) * 2011-11-08 2012-04-18 东软集团股份有限公司 Resource scheduling method and system thereof
CN102427468A (en) * 2011-11-01 2012-04-25 浪潮(北京)电子信息产业有限公司 Cloud computing operating system and scheduling method thereof
CN103067528A (en) * 2013-01-31 2013-04-24 汉柏科技有限公司 Load balancing method and system for realizing multi-platform distributed virtual application
CN103955396A (en) * 2014-04-28 2014-07-30 浙江大学 Virtual machine scheduling method based on coexisting coefficient balance

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100318997A1 (en) * 2009-06-15 2010-12-16 Microsoft Corporation Annotating virtual application processes
CN102427468A (en) * 2011-11-01 2012-04-25 浪潮(北京)电子信息产业有限公司 Cloud computing operating system and scheduling method thereof
CN102420850A (en) * 2011-11-08 2012-04-18 东软集团股份有限公司 Resource scheduling method and system thereof
CN103067528A (en) * 2013-01-31 2013-04-24 汉柏科技有限公司 Load balancing method and system for realizing multi-platform distributed virtual application
CN103955396A (en) * 2014-04-28 2014-07-30 浙江大学 Virtual machine scheduling method based on coexisting coefficient balance

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107436798A (en) * 2017-08-15 2017-12-05 深信服科技股份有限公司 A kind of process access method and device based on NUMA node
CN111752711A (en) * 2020-06-24 2020-10-09 浪潮(北京)电子信息产业有限公司 NUMA-based thread processing method, device, equipment and storage medium
CN114115696A (en) * 2020-08-25 2022-03-01 华为技术有限公司 Memory deduplication method and device and storage medium
CN114115696B (en) * 2020-08-25 2024-06-18 华为技术有限公司 Memory deduplication method, device and storage medium
CN113254186A (en) * 2021-06-15 2021-08-13 阿里云计算有限公司 Process scheduling method, scheduler and storage medium
CN113590306A (en) * 2021-06-16 2021-11-02 惠州市德赛西威汽车电子股份有限公司 Method for realizing reliable communication between two systems of domain controller
WO2024001559A1 (en) * 2022-06-28 2024-01-04 中兴通讯股份有限公司 Service scheduling method, electronic device and storage medium

Also Published As

Publication number Publication date
CN104657195B (en) 2018-03-06

Similar Documents

Publication Publication Date Title
CN104657195A (en) Resource binding method and device
EP3382544B1 (en) Dynamically composable computing system, a data center, and method for dynamically composing a computing system
US9742652B2 (en) Proactive identification of hotspots in a cloud computing environment
EP3507692B1 (en) Resource oversubscription based on utilization patterns in computing systems
US8924561B2 (en) Dynamically resizing a networked computing environment to process a workload
JP6992012B2 (en) Data processing method and device
TWI753881B (en) Data table connection method processing method and device
JP5352890B2 (en) Computer system operation management method, computer system, and computer-readable medium storing program
CN107547595B (en) Cloud resource scheduling system, method and device
CN104102543A (en) Load regulation method and load regulation device in cloud computing environment
CN102810050A (en) Log data writing method and log system
US10320892B2 (en) Rolling capacity upgrade control
CN107070709B (en) NFV (network function virtualization) implementation method based on bottom NUMA (non uniform memory Access) perception
CN109417488A (en) The method and apparatus of virtual network function resource management
CN109271172A (en) A kind of host behavior extension method and device of swarm cluster
CN111104219A (en) Binding method, device, equipment and storage medium of virtual core and physical core
CN104144202A (en) Hadoop distributed file system access method, system and device
US20150169337A1 (en) Intelligent virtual machine (vm) re-location
WO2013082742A1 (en) Resource scheduling method, device and system
US7991962B2 (en) System and method of using threads and thread-local storage
CN105677481B (en) A kind of data processing method, system and electronic equipment
US9311146B2 (en) Strategic placement of jobs for spatial elasticity in a high-performance computing environment
CN102521155B (en) Method and device for realizing table item dynamic allocation on physical storage
WO2018040271A1 (en) Thread processor and thread processing method
CN103853599B (en) A kind of extended method of node computing capability

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180306

Termination date: 20190105

CF01 Termination of patent right due to non-payment of annual fee