CN107341060A - A kind of virutal machine memory distribution method and device - Google Patents
A kind of virutal machine memory distribution method and device Download PDFInfo
- Publication number
- CN107341060A CN107341060A CN201710580787.7A CN201710580787A CN107341060A CN 107341060 A CN107341060 A CN 107341060A CN 201710580787 A CN201710580787 A CN 201710580787A CN 107341060 A CN107341060 A CN 107341060A
- Authority
- CN
- China
- Prior art keywords
- memory
- virtual machine
- machine
- internal memory
- scheduling
- 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
Links
- 230000015654 memory Effects 0.000 title claims abstract description 267
- 238000000034 method Methods 0.000 title claims abstract description 25
- 239000011800 void material Substances 0.000 claims description 3
- 238000005070 sampling Methods 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5016—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Memory System (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
The embodiment of the invention discloses a kind of virutal machine memory distribution method, including:The internal memory service condition of physical host and every virtual machine is monitored and periodically gathers memory usage information;Judge whether the internal memory use of more virtual machines is reasonable according to the memory usage information and default scheduling memory reference conditions;The scheduling memory strategy of virtual machine is determined according to judged result.The embodiment of the invention discloses a kind of virutal machine memory distributor.By scheme of the embodiment of the present invention, virutal machine memory utilization rate is kept in balance, improve the physical machine level of resources utilization.
Description
Technical field
The present embodiments relate to virtualization field, espespecially a kind of virutal machine memory distribution method and device.
Background technology
Virtualization technology refers to fictionalizes more logical computers, also known as virtual machine on a main frame.Every virtual machine
There are complete operating system and hardware system, can be independent of each other with independent operating.Virtualization technology can be greatly enhanced money
Source utilization ratio.The internal memory of fixed size can be distributed for virtual machine when creating virtual machine on main frame, when being run due to virtual machine
Demand to memory source is dynamic change, and fixed memory distribution may cause virutal machine memory utilization rate too low, cause to provide
Source wastes;Or EMS memory occupation is too high, cause virtual machine interim card.In order to solve this problem, Xen, VmWare and KVM are provided
The underlying mechanisms such as balloon driving, programmer request and memory sharing dynamically adjust virutal machine memory, but also lack a kind of how virtual
The scheduling memory strategy of machine coordinated management.
The content of the invention
In order to solve the above-mentioned technical problem, the embodiments of the invention provide a kind of virutal machine memory distribution method and device,
Virutal machine memory utilization rate can be made to keep in balance, improve the physical machine level of resources utilization.
, should the embodiments of the invention provide a kind of virutal machine memory distribution method in order to reach purpose of the embodiment of the present invention
Method includes:
The internal memory service condition of physical host and every virtual machine is monitored and periodically gathers memory usage information;
Judge that the internal memory use of more virtual machines is according to memory usage information and default scheduling memory reference conditions
It is no reasonable;
The scheduling memory strategy of virtual machine is determined according to judged result.
Alternatively, memory usage information includes:
The physical memory size P that physical host is usedi, wherein, i, which refers to, gathers the memory usage information i-th week
Phase;And
The maximum free memory size ML of the operating system of every virtual machineijWith the memory size M being usedij, it is current
All application programs memory size that warp-wise system is submitted in free memory size, and the operating system;
Wherein, all virtual machine collection are combined into V on physical hostj∈ VM, 0 < j < n, n is the total number of units of virtual machine, and j refers to jth
Platform virtual machine, i, j, n are positive integer.
Alternatively, default scheduling memory reference conditions include:First relational expression, default utilization rate upper threshold Δup、
Default utilization rate bottom threshold is Δlow, and default weight coefficient βij;
Wherein, the first relational expression includes:(Mij×βij)/MLij。
Alternatively, the internal memory of more virtual machines is judged according to memory usage information and default scheduling memory reference conditions
Using whether rationally including:
When meeting Δlow≤(Mij×βij)/MLij≤ΔupWhen, judge virtual machine V in cycle ijInternal memory service condition is closed
Reason;
As satisfaction (Mij×βij)/MLij≤ΔlowWhen, judge virtual machine V in cycle ijInternal memory is in superfluous state, makes
It is unreasonable with situation;
When meeting Δup≤(Mij×βij)/MLijWhen, judge virtual machine V in cycle ijInternal memory is in state in short supply, uses
Situation is unreasonable.
Alternatively, the scheduling memory strategy for determining virtual machine according to judged result includes:
When meeting Δlow≤(Mij×βij)/MLij≤ΔupWhen, not to virtual machine V in the i+1 cyclejIn maximum can be used
Deposit ML(i+1)jIt is adjusted, ML(i+1)j=MLij;
As satisfaction (Mij×βij)/MLij≤ΔlowWhen, adjust virtual machine V in the i+1 cyclejInternal memory ML(i+1)jMeet:
ML(i+1)j=(Δup+Δlow)MLij/2;
When meeting Δup≤(Mij×βij)/MLijWhen, adjust virtual machine V in the i+1 cyclejInternal memory ML(i+1)jMeet:
ML(i+1)j=MLij+(Δup+Δlow)MLij/2。
Alternatively, this method also includes:After the scheduling memory strategy of each virtual machine is determined, if judged according to institute
State scheduling memory strategy and scheduling memory is carried out to virtual machine, whether physical host internal memory service condition is normal.
Alternatively, this method also includes:By following inequality with default physical host memory usage threshold value a's
If relation judges to carry out scheduling memory, the physical host internal memory service condition to virtual machine according to the scheduling memory strategy
It is whether normal:
The embodiment of the present invention additionally provides a kind of virutal machine memory distributor, and the device includes:Acquisition module, judge mould
Block and determining module;
Acquisition module, for being monitored to the internal memory service condition of physical host and every virtual machine and periodically gathering
Memory usage information;
Judge module, for judging more virtual machines according to memory usage information and default scheduling memory reference conditions
Internal memory use it is whether reasonable;
Determining module, for determining the scheduling memory strategy of virtual machine according to judged result.
Alternatively, memory usage information includes:
The physical memory size P that physical host is usedi, wherein, i, which refers to, gathers the memory usage information i-th week
Phase;And
The maximum free memory size ML of the operating system of every virtual machineijWith the memory size M being usedij, it is current
All application programs memory size that warp-wise system is submitted in free memory size, and the operating system;
Wherein, all virtual machine collection are combined into V on physical hostj∈ VM, 0 < j < n, n is the total number of units of virtual machine, and j refers to jth
Platform virtual machine, i, j, n are positive integer.
Alternatively, default scheduling memory reference conditions include:First relational expression, default utilization rate upper threshold Δup、
Default utilization rate bottom threshold is Δlow, and default weight coefficient βij;
Wherein, the first relational expression includes:(Mij×βij)/MLij。
Alternatively, judge module judges more virtually according to memory usage information and default scheduling memory reference conditions
Whether the internal memory of machine uses rationally includes:
When meeting Δlow≤(Mij×βij)/MLij≤ΔupWhen, judge virtual machine V in cycle ijInternal memory service condition is closed
Reason;
As satisfaction (Mij×βij)/MLij≤ΔlowWhen, judge virtual machine V in cycle ijInternal memory is in superfluous state, makes
It is unreasonable with situation;
When meeting Δup≤(Mij×βij)/MLijWhen, judge virtual machine V in cycle ijInternal memory is in state in short supply, uses
Situation is unreasonable.
Optionally it is determined that module determines that the scheduling memory strategy of virtual machine includes according to judged result:
When meeting Δlow≤(Mij×βij)/MLij≤ΔupWhen, not to virtual machine V in the i+1 cyclejIn maximum can be used
Deposit ML(i+1)jIt is adjusted, ML(i+1)j=MLij;
As satisfaction (Mij×βij)/MLij≤ΔlowWhen, adjust virtual machine V in the i+1 cyclejInternal memory ML(i+1)jMeet:
ML(i+1)j=(Δup+Δlow)MLij/2;
When meeting Δup≤(Mij×βij)/MLijWhen, adjust virtual machine V in the i+1 cyclejInternal memory ML(i+1)jMeet:
ML(i+1)j=MLij+(Δup+Δlow)MLij/2。
Alternatively, the judge module is additionally operable to:After the scheduling memory strategy of each virtual machine is determined, if judge according to
Scheduling memory is carried out to virtual machine according to the scheduling memory strategy, whether physical host internal memory service condition is normal.
Alternatively, the judge module is additionally operable to:Pass through following inequality and default physical host memory usage threshold
If value a relation judges to carry out scheduling memory to virtual machine according to the scheduling memory strategy, the physical host internal memory makes
It is whether normal with situation:
The embodiment of the present invention includes:The internal memory service condition of physical host and every virtual machine is monitored simultaneously periodically
Gather memory usage information;More virtual machines are judged according to the memory usage information and default scheduling memory reference conditions
Internal memory use it is whether reasonable;The scheduling memory strategy of virtual machine is determined according to judged result.By scheme of the embodiment of the present invention,
Virutal machine memory utilization rate is kept in balance, improve the physical machine level of resources utilization.
The further feature and advantage of the embodiment of the present invention will illustrate in the following description, also, partly from explanation
Become apparent in book, or understood by implementing the embodiment of the present invention.The purpose of the embodiment of the present invention and other advantages
It can realize and obtain by specifically noted structure in specification, claims and accompanying drawing.
Brief description of the drawings
Accompanying drawing is used for providing further understanding technical scheme of the embodiment of the present invention, and one of constitution instruction
Point, the technical scheme for explaining the embodiment of the present invention is used for together with embodiments herein, is not formed to the embodiment of the present invention
The limitation of technical scheme.
Fig. 1 is the virutal machine memory distribution method flow chart of the embodiment of the present invention;
Fig. 2 is the virutal machine memory distributor composition frame chart of the embodiment of the present invention.
Embodiment
For the purpose, technical scheme and advantage of the embodiment of the present invention are more clearly understood, below in conjunction with accompanying drawing pair
Embodiments of the invention are described in detail.It should be noted that in the case where not conflicting, embodiment and reality in the application
Applying the feature in example can mutually be combined.
Can be in the computer system of such as one group computer executable instructions the flow of accompanying drawing illustrates the step of
Perform.Also, although logical order is shown in flow charts, in some cases, can be with suitable different from herein
Sequence performs shown or described step.
, should the embodiments of the invention provide a kind of virutal machine memory distribution method in order to reach purpose of the embodiment of the present invention
Method includes S101-S103:
S101, the internal memory service condition to physical host and every virtual machine are monitored and periodically gather internal memory and use
Information.
In embodiments of the present invention, in order to realize the reasonable distribution to virutal machine memory, it is necessary first to physical host and
The internal memory service condition of every virtual machine is monitored, and its memory usage information is gathered in real time, so as to according to collection
Memory usage information targetedly adjust the Memory Allocation situation of virtual machine in subsequent sample period.
Alternatively, memory usage information can include but is not limited to:
The physical memory size P that physical host is usediWith free memory size Fi, wherein, i refers to the collection internal memory
I-th of cycle of use information;And
The maximum free memory size ML of the operating system of every virtual machineijWith the memory size M being usedij, it is current
All application programs memory size that warp-wise system is submitted in free memory size, and the operating system;
Wherein, all virtual machine collection are combined into V on physical hostj∈ VM, 0 < j < n, n is the total number of units of virtual machine, and j refers to jth
Platform virtual machine, i, j, n are positive integer.
In embodiments of the present invention, can be according to different application scenarios and real needs in above-mentioned memory usage information
Items targetedly gathered, be not limited for its specific item.
S102, according to memory usage information and default scheduling memory reference conditions judge that the internal memory of more virtual machines makes
With whether reasonable.
Alternatively, default scheduling memory reference conditions include:First relational expression, default utilization rate upper threshold Δup、
Default utilization rate bottom threshold is Δlow, and default weight coefficient βij;
Wherein, the first relational expression includes:(Mij×βij)/MLij。
In embodiments of the present invention, scheduling memory reference conditions can be pre-set, so as to according to the reference conditions to adopting
The memory usage information collected is weighed.For example, the bound of memory usage can be pre-set, utilization rate described above
Upper threshold ΔupIt is Δ with utilization rate bottom thresholdlow, then can consider that virutal machine memory makes beyond the upper threshold or lower limit
With unreasonable, it is necessary to carry out scheduling memory.Item different in memory usage information corresponding weighting respectively can also be pre-set
Coefficient, weight coefficient β as escribed aboveij, it is used to reserve internal memory peace to fluctuate larger virtual machine for memory usage information
Full surplus.Rational measure algorithm can be set in addition, to be carried out according to above-mentioned various reference conditions to memory usage information
Weigh, the measure algorithm can use but be not limited to the first above-mentioned relational expression.
Alternatively, the internal memory of more virtual machines is judged according to memory usage information and default scheduling memory reference conditions
Using whether can rationally including:
When meeting Δlow≤(Mij×βij)/MLij≤ΔupWhen, judge virtual machine V in cycle ijInternal memory service condition is closed
Reason;
As satisfaction (Mij×βij)/MLij≤ΔlowWhen, judge virtual machine V in cycle ijInternal memory is in superfluous state, interior
Resource serious waste is deposited, service condition is unreasonable;
When meeting Δup≤(Mij×βij)/MLijWhen, judge virtual machine V in cycle ijInternal memory be in state in short supply, it is necessary to
More internal memories are distributed, service condition is unreasonable.
S103, the scheduling memory strategy for determining according to judged result virtual machine.
In embodiments of the present invention, internal memory of the different virtual machine within the different sampling periods is judged by above-mentioned steps
, can be to carry out Memory adjustments to different virtual machines according to the internal memory service condition, so as to the virtual machine after service condition
It can be operated within a sampling period according to the internal memory situation after adjustment, improve operating efficiency.
Alternatively, the scheduling memory strategy for determining virtual machine according to judged result can include:
When meeting Δlow≤(Mij×βij)/MLij≤ΔupWhen, not to virtual machine V in the i+1 cyclejIn maximum can be used
Deposit ML(i+1)jIt is adjusted, ML(i+1)j=MLij;
As satisfaction (Mij×βij)/MLij≤ΔlowWhen, adjust virtual machine V in the i+1 cyclejInternal memory ML(i+1)jMeet:
ML(i+1)j=(Δup+Δlow)MLij/2;
When meeting Δup≤(Mij×βij)/MLijWhen, adjust virtual machine V in the i+1 cyclejInternal memory ML(i+1)jMeet:
ML(i+1)j=MLij+(Δup+Δlow)MLij/2。
Alternatively, this method also includes:After the scheduling memory strategy of each virtual machine is determined, if judged according to interior
Deposit scheduling strategy and scheduling memory is carried out to virtual machine, whether physical host internal memory service condition is normal.
Alternatively, this method also includes:By following inequality with default physical host memory usage threshold value a's
If relation judges to carry out scheduling memory to virtual machine according to scheduling memory strategy, just whether physical host internal memory service condition
Often:
In embodiments of the present invention, the default physical host memory usage threshold value a can be according to different applied fields
Scape self-defining, it is not limited for its concrete numerical value, alternatively, a=90%.
IfIllustrate that physical host memory usage is no more than 90%, internal memory service condition is just
Often, virutal machine memory scheduling can be carried out according to scheduling memory strategy;
IfIllustrate that physical host memory usage can be more than 90%, in internal memory shape in short supply
State, scheduling memory strategy is unreasonable, then should alert or select virtual machine to be migrated.
In embodiments of the present invention, in the case of internal memory scheduling strategy is available, according to according to above-mentioned scheduling memory plan
Slightly carry out the virutal machine memory dynamically distributes in the i+1 cycles and scheduling.
The embodiment of the present invention to physical host and virutal machine memory service condition by being monitored and periodic information
Collection, virutal machine memory scheduling strategy is determined according to dispatching algorithm, and the virtual machine too low to memory usage reduces Memory Allocation,
The virtual machine too high to memory usage, distributes more internal memories, so that virutal machine memory utilization rate is kept in balance, improves
The physical machine level of resources utilization.
The embodiment of the present invention additionally provides a kind of virutal machine memory distributor 1, it is necessary to which explanation, above-mentioned method are real
Any embodiment in example is applied suitable for the device embodiment, this is no longer going to repeat them.As shown in Fig. 2 the device can
With including:Acquisition module 11, judge module 12 and determining module 13;
Acquisition module 11, for being monitored to the internal memory service condition of physical host and every virtual machine and periodically adopting
Collect memory usage information;
Judge module 12, for judging more virtually according to memory usage information and default scheduling memory reference conditions
Whether the internal memory use of machine is reasonable;
Determining module 13, for determining the scheduling memory strategy of virtual machine according to judged result.
Alternatively, memory usage information includes:
The physical memory size P that physical host is usediWith free memory size Fi, wherein, i refers to the collection internal memory
I-th of cycle of use information;And
The maximum free memory size ML of the operating system of every virtual machineijWith the memory size M being usedij, it is current
All application programs memory size that warp-wise system is submitted in free memory size, and the operating system;
Wherein, all virtual machine collection are combined into V on physical hostj∈ VM, 0 < j < n, n is the total number of units of virtual machine, and j refers to jth
Platform virtual machine, i, j, n are positive integer.
Alternatively, default scheduling memory reference conditions include:First relational expression, default utilization rate upper threshold Δup、
Default utilization rate bottom threshold is Δlow, and default weight coefficient βij;
Wherein, the first relational expression includes:(Mij×βij)/MLij。
Alternatively, judge module 12 judges more void according to memory usage information and default scheduling memory reference conditions
Whether the internal memory of plan machine uses rationally includes:
When meeting Δlow≤(Mij×βij)/MLij≤ΔupWhen, judge virtual machine V in cycle ijInternal memory service condition is closed
Reason;
As satisfaction (Mij×βij)/MLij≤ΔlowWhen, judge virtual machine V in cycle ijInternal memory is in superfluous state, makes
It is unreasonable with situation;
When meeting Δup≤(Mij×βij)/MLijWhen, judge virtual machine V in cycle ijInternal memory is in state in short supply, uses
Situation is unreasonable.
Optionally it is determined that module 13 determines that the scheduling memory strategy of virtual machine includes according to judged result:
When meeting Δlow≤(Mij×βij)/MLij≤ΔupWhen, not to virtual machine V in the i+1 cyclejIn maximum can be used
Deposit ML(i+1)jIt is adjusted, ML(i+1)j=MLij;
As satisfaction (Mij×βij)/MLij≤ΔlowWhen, adjust virtual machine V in the i+1 cyclejInternal memory ML(i+1)jMeet:
ML(i+1)j=(Δup+Δlow)MLij/2;
When meeting Δup≤(Mij×βij)/MLijWhen, adjust virtual machine V in the i+1 cyclejInternal memory ML(i+1)jMeet:
ML(i+1)j=MLij+(Δup+Δlow)MLij/2。
Alternatively, the judge module 12 is additionally operable to:After the scheduling memory strategy of each virtual machine is determined, if judged
Scheduling memory is carried out to virtual machine according to the scheduling memory strategy, whether physical host internal memory service condition is normal.
Alternatively, the judge module 12 is additionally operable to:Pass through following inequality and default physical host memory usage
If threshold value a relation judges to carry out scheduling memory, the physical host internal memory to virtual machine according to the scheduling memory strategy
Whether service condition is normal:
The embodiment of the present invention includes:The internal memory service condition of physical host and every virtual machine is monitored simultaneously periodically
Gather memory usage information;More virtual machines are judged according to the memory usage information and default scheduling memory reference conditions
Internal memory use it is whether reasonable;The scheduling memory strategy of virtual machine is determined according to judged result.By scheme of the embodiment of the present invention,
Virutal machine memory utilization rate is kept in balance, improve the physical machine level of resources utilization.
Although the embodiment disclosed by the embodiment of the present invention is as above, described content be only readily appreciate the present invention and
The embodiment of use, is not limited to the embodiment of the present invention.Technical staff in any art of the embodiment of the present invention,
On the premise of the spirit and scope disclosed by the embodiment of the present invention are not departed from, it can be appointed in the form and details of implementation
What modification and change, but the scope of patent protection of the embodiment of the present invention, the model that must be still defined with appended claims
Enclose and be defined.
Claims (10)
1. a kind of virutal machine memory distribution method, it is characterised in that methods described includes:
The internal memory service condition of physical host and every virtual machine is monitored and periodically gathers memory usage information;
Judge that the internal memory use of more virtual machines is according to the memory usage information and default scheduling memory reference conditions
It is no reasonable;
The scheduling memory strategy of virtual machine is determined according to judged result.
2. virutal machine memory distribution method according to claim 1, it is characterised in that the memory usage information includes:
The physical memory size P that the physical host is usedi, wherein, i, which refers to, gathers the memory usage information i-th week
Phase;And
The maximum free memory size ML of the operating system of every virtual machineijWith the memory size M being usedij;
Wherein, all virtual machine collection are combined into V on physical hostj∈ VM, 0 < j < n, n is the total number of units of virtual machine, and it is virtual that j refers to jth platform
Machine, i, j, n are positive integer.
3. virutal machine memory distribution method according to claim 2, it is characterised in that the default scheduling memory reference
Condition includes:First relational expression, default utilization rate upper threshold Δup, default utilization rate bottom threshold be Δlow, and in advance
If weight coefficient βij;
Wherein, first relational expression includes:(Mij×βij)/MLij。
4. virutal machine memory distribution method according to claim 3, it is characterised in that described that letter is used according to the internal memory
Whether breath and default scheduling memory reference conditions judge that the internal memory of more virtual machines uses rationally includes:
When meeting Δlow≤(Mij×βij)/MLij≤ΔupWhen, judge virtual machine V in cycle ijInternal memory service condition is reasonable;
As satisfaction (Mij×βij)/MLij≤ΔlowWhen, judge virtual machine V in cycle ijInternal memory is in superfluous state, service condition
It is unreasonable;
When meeting Δup≤(Mij×βij)/MLijWhen, judge virtual machine V in cycle ijInternal memory is in state in short supply, service condition
It is unreasonable.
5. virutal machine memory distribution method according to claim 4, it is characterised in that described that void is determined according to judged result
The scheduling memory strategy of plan machine includes:
When meeting Δlow≤(Mij×βij)/MLij≤ΔupWhen, not to virtual machine V in the i+1 cyclejThe usable internal memory of maximum
ML(i+1)jIt is adjusted, ML(i+1)j=MLij;
As satisfaction (Mij×βij)/MLij≤ΔlowWhen, adjust virtual machine V in the i+1 cyclejInternal memory ML(i+1)jMeet:ML(i+1)j=
(Δup+Δlow)MLij/2;
When meeting Δup≤(Mij×βij)/MLijWhen, adjust virtual machine V in the i+1 cyclejInternal memory ML(i+1)jMeet:ML(i+1)j=
MLij+(Δup+Δlow)MLij/2。
6. virutal machine memory distribution method according to claim 3, it is characterised in that methods described also includes:It is determined that
After going out the scheduling memory strategy of each virtual machine, if judging to carry out internal memory tune to virtual machine according to the scheduling memory strategy
Whether degree, the physical host internal memory service condition are normal.
7. virutal machine memory distribution method according to claim 6, it is characterised in that methods described also includes:Under
If the relation of the inequality stated and default physical host memory usage threshold value a is judged according to the scheduling memory strategy pair
Virtual machine carries out scheduling memory, and whether the physical host internal memory service condition is normal:
<mrow>
<mfrac>
<mrow>
<mo>(</mo>
<msubsup>
<mi>&Sigma;</mi>
<mrow>
<mi>j</mi>
<mo>=</mo>
<mn>0</mn>
</mrow>
<mi>n</mi>
</msubsup>
<msub>
<mi>ML</mi>
<mrow>
<mi>i</mi>
<mi>j</mi>
</mrow>
</msub>
<mo>)</mo>
</mrow>
<msub>
<mi>P</mi>
<mi>i</mi>
</msub>
</mfrac>
<mo>.</mo>
</mrow>
1
8. a kind of virutal machine memory distributor, it is characterised in that described device includes:Acquisition module, judge module and determination
Module;
The acquisition module, for being monitored to the internal memory service condition of physical host and every virtual machine and periodically gathering
Memory usage information;
The judge module, for judging more void according to the memory usage information and default scheduling memory reference conditions
Whether the internal memory use of plan machine is reasonable;
The determining module, for determining the scheduling memory strategy of virtual machine according to judged result.
9. virutal machine memory distributor according to claim 8, it is characterised in that the memory usage information includes:
The physical memory size P that the physical host is usedi, wherein, i, which refers to, gathers the memory usage information i-th week
Phase;And
The maximum free memory size ML of the operating system of every virtual machineijWith the memory size M being usedij;
Wherein, all virtual machine collection are combined into V on physical hostj∈ VM, 0 < j < n, n is the total number of units of virtual machine, and it is virtual that j refers to jth platform
Machine, i, j, n are positive integer;
The default scheduling memory reference conditions include:First relational expression, default utilization rate upper threshold Δup, it is default
Utilization rate bottom threshold is Δlow, and default weight coefficient βij;
Wherein, first relational expression includes:(Mij×βij)/MLij。
10. virutal machine memory distributor according to claim 9, it is characterised in that the judge module is according to
Whether memory usage information and default scheduling memory reference conditions judge that the internal memory of more virtual machines uses rationally includes:
When meeting Δlow≤(Mij×βij)/MLij≤ΔupWhen, judge virtual machine V in cycle ijInternal memory service condition is reasonable;
As satisfaction (Mij×βij)/MLij≤ΔlowWhen, judge virtual machine V in cycle ijInternal memory is in superfluous state, service condition
It is unreasonable;
When meeting Δup≤(Mij×βij)/MLijWhen, judge virtual machine V in cycle ijInternal memory is in state in short supply, service condition
It is unreasonable;
The determining module determines that the scheduling memory strategy of virtual machine includes according to judged result:
When meeting Δlow≤(Mij×βij)/MLij≤ΔupWhen, not to virtual machine V in the i+1 cyclejThe usable internal memory of maximum
ML(i+1)jIt is adjusted, ML(i+1)jMLij;
As satisfaction (Mij×βij)/MLij≤ΔlowWhen, adjust virtual machine V in the i+1 cyclejInternal memory ML(i+1)jMeet:ML(i+1)j=
(Δup+Δlow)MLij/2;
When meeting Δup≤(Mij×βij)/MLijWhen, adjust virtual machine V in the i+1 cyclejInternal memory ML(i+1)jMeet:ML(i+1)j=
MLij+(Δup+Δlow)MLij/2。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710580787.7A CN107341060B (en) | 2017-07-17 | 2017-07-17 | Virtual machine memory allocation method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710580787.7A CN107341060B (en) | 2017-07-17 | 2017-07-17 | Virtual machine memory allocation method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107341060A true CN107341060A (en) | 2017-11-10 |
CN107341060B CN107341060B (en) | 2021-02-05 |
Family
ID=60219217
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710580787.7A Active CN107341060B (en) | 2017-07-17 | 2017-07-17 | Virtual machine memory allocation method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107341060B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108196942A (en) * | 2018-02-01 | 2018-06-22 | 成都禾苗云科技有限公司 | A kind of quick start method of memory excessive distribution virtual machine |
CN112965792A (en) * | 2021-05-18 | 2021-06-15 | 云宏信息科技股份有限公司 | Method for allocating memory for multiple virtual machines, computer readable storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120110577A1 (en) * | 2006-04-27 | 2012-05-03 | Vmware, Inc. | Controlling memory conditions in a virtual machine |
CN103259813A (en) * | 2012-02-17 | 2013-08-21 | 鸿富锦精密工业(深圳)有限公司 | Method of automatically expanding virtual machines |
CN103605613A (en) * | 2013-11-21 | 2014-02-26 | 中标软件有限公司 | Method and system for dynamically adjusting virtual-machine memory in cloud computing environment |
CN105677485A (en) * | 2016-01-08 | 2016-06-15 | 中电科华云信息技术有限公司 | Memory dynamic adjusting method for cloud desktop host and virtual machine |
CN106648885A (en) * | 2016-10-17 | 2017-05-10 | 深圳市深信服电子科技有限公司 | Dynamic allocation method, device and system for resources of virtual machine |
CN106776048A (en) * | 2017-01-24 | 2017-05-31 | 郑州云海信息技术有限公司 | A kind of real time virtual machine scheduling memory method and device |
-
2017
- 2017-07-17 CN CN201710580787.7A patent/CN107341060B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120110577A1 (en) * | 2006-04-27 | 2012-05-03 | Vmware, Inc. | Controlling memory conditions in a virtual machine |
CN103259813A (en) * | 2012-02-17 | 2013-08-21 | 鸿富锦精密工业(深圳)有限公司 | Method of automatically expanding virtual machines |
CN103605613A (en) * | 2013-11-21 | 2014-02-26 | 中标软件有限公司 | Method and system for dynamically adjusting virtual-machine memory in cloud computing environment |
CN105677485A (en) * | 2016-01-08 | 2016-06-15 | 中电科华云信息技术有限公司 | Memory dynamic adjusting method for cloud desktop host and virtual machine |
CN106648885A (en) * | 2016-10-17 | 2017-05-10 | 深圳市深信服电子科技有限公司 | Dynamic allocation method, device and system for resources of virtual machine |
CN106776048A (en) * | 2017-01-24 | 2017-05-31 | 郑州云海信息技术有限公司 | A kind of real time virtual machine scheduling memory method and device |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108196942A (en) * | 2018-02-01 | 2018-06-22 | 成都禾苗云科技有限公司 | A kind of quick start method of memory excessive distribution virtual machine |
CN108196942B (en) * | 2018-02-01 | 2021-09-03 | 成都禾苗云科技有限公司 | Quick starting method of memory over-allocation virtual machine |
CN112965792A (en) * | 2021-05-18 | 2021-06-15 | 云宏信息科技股份有限公司 | Method for allocating memory for multiple virtual machines, computer readable storage medium |
CN112965792B (en) * | 2021-05-18 | 2021-07-30 | 云宏信息科技股份有限公司 | Method for allocating memory for multiple virtual machines, computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN107341060B (en) | 2021-02-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103338228B (en) | Cloud computing load balancing dispatching algorithms based on double weighting Smallest connection algorithms | |
CN103716381B (en) | Control method and management node of distributed system | |
CN103885831B (en) | The system of selection of virtual machine host machine and device | |
CN102279771B (en) | Method and system for adaptively allocating resources as required in virtualization environment | |
CN103761139B (en) | General purpose computation virtualization implementation method based on dynamic library interception | |
CN105718364B (en) | Resource capability dynamic assessment method is calculated in a kind of cloud computing platform | |
CN103955398B (en) | Virtual machine coexisting scheduling method based on processor performance monitoring | |
CN103118124B (en) | A kind of cloud computing load balancing method based on the many agencies of layering | |
CN104636187B (en) | Dispatching method of virtual machine in NUMA architecture based on load estimation | |
CN111861412B (en) | Completion time optimization-oriented scientific workflow scheduling method and system | |
CN103823714B (en) | Virtualization-based method and device for adjusting QoS (quality of service) of node memory of NUMA (non uniform memory access architecture) | |
CN105843670A (en) | Cloud platform based virtual cluster deployment and integration method | |
CN101169731A (en) | Multiple-path multiple-core server and its CPU virtualization processing method | |
CN103473115B (en) | virtual machine placement method and device | |
CN102521055B (en) | Virtual machine resource allocating method and virtual machine resource allocating system | |
CN103530189A (en) | Automatic scaling and migrating method and device oriented to stream data | |
CN105912406A (en) | Low-energy independent task scheduling and resource configuration method | |
CN105049218A (en) | PhiCloud cloud charging method and system | |
CN107450983A (en) | It is a kind of based on the hierarchical network resource regulating method virtually clustered and system | |
CN107222531A (en) | A kind of container cloud resource dispatching method | |
CN103279390A (en) | Parallel processing system for small operation optimizing | |
CN103605578A (en) | Load balance scheduling method based on virtual machine migration | |
CN104239123A (en) | Campus-cloud-platform-oriented virtual machine management dispatching method and system | |
CN106598731A (en) | Heterogeneous multi-core architecture-based runtime system and control method thereof | |
CN104902001A (en) | Method for load balancing of Web requests based on operating system virtualization |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20210107 Address after: Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province Applicant after: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd. Address before: Room 1601, floor 16, 278 Xinyi Road, Zhengdong New District, Zhengzhou City, Henan Province Applicant before: ZHENGZHOU YUNHAI INFORMATION TECHNOLOGY Co.,Ltd. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant |