CN106445690A - Dynamic scheduling method and device for virtual machine resource - Google Patents
Dynamic scheduling method and device for virtual machine resource Download PDFInfo
- Publication number
- CN106445690A CN106445690A CN201610903604.6A CN201610903604A CN106445690A CN 106445690 A CN106445690 A CN 106445690A CN 201610903604 A CN201610903604 A CN 201610903604A CN 106445690 A CN106445690 A CN 106445690A
- Authority
- CN
- China
- Prior art keywords
- virtual machine
- priority
- state information
- information
- running state
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
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/5061—Partitioning or combining of resources
- G06F9/5077—Logical partitioning of resources; Management or configuration of virtualized resources
-
- 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)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a dynamic scheduling method for virtual machine resources. The dynamic scheduling method comprises the following steps: acquiring operation state information of a virtual machine operated at present by a server, and confirming a current priority of the virtual machine according to the acquired operation state information and preset priority rules; and scheduling the resources of the virtual machine by the server according to the confirmed current priority of the virtual machine. The invention further discloses a dynamic scheduling device for the virtual machine resources. By adopting the dynamic scheduling method and the dynamic scheduling device, the technical problems in the prior art that the priority of the virtual machine cannot be confirmed according to the actual operation situation of the virtual machine, and furthermore the resources cannot be dynamically scheduled according to the confirmed priority can be solved.
Description
Technical field
The present invention relates to virtual machine technique field, the dynamic adaptation method and device of more particularly, to a kind of resources of virtual machine.
Background technology
In technical field of virtualization, above a server, multiple virtual machines can be run, in order to make full use of clothes
The hardware resource of business device, the hardware resource configuration to virtual machine generally all can carry out surpassing joining, i.e. all of configuration services at one
The synthesis of the hardware resource of all virtual machines on device is more than the hardware resource of the server being located, such as, all virtual machines
CPU sum can exceed the physical cpu quantity of server;Total internal memory of virtual machine can be more than the physical memory of server, leads to
Cross this super join characteristic so that more virtual machines can be run on individual server machine, help user to reduce hardware and put into
Cost.
Above-mentioned super join characteristic and be capable of the premise of normal work be:It is assumed that in synchronization, not every virtual machine is all full
Load operation.Because if each virtual machine is extremely busy, constantly fighting for of hardware resource can be carried out between virtual machine, lead to
Each virtual machine is very slow, all cannot normal work, overall performance can be affected on the contrary.
For super join all oeprations at full load of rear virtual machine and lead to all virtual machines all to run slow in the case of, current solution
Method is to virtual machine prioritization, such as a part of virtual machine is set to high priority, when server residue hardware resource
When not enough, preferentially ensure that the hardware resource of this kind of high priority virtual machine uses, but, this scheme is merely able to solve specific field
Problem under scape, it is fixing it is impossible to according to the specifically used situation of virtual machine to its priority that virtual machine priority is divided
Enter Mobile state adjustment, lack motility it is impossible to meet more complicated user's scene.
Content of the invention
The present invention provides a kind of dynamic adaptation method and device of resources of virtual machine, and its main purpose is to solve existing skill
It is impossible to determine the priority of virtual machine according to the practical operation situation of virtual machine in art, and then according to the priority determining to money
Source carries out the technical problem of dynamic adaptation.
For achieving the above object, the present invention provides a kind of dynamic adaptation method of resources of virtual machine, this resources of virtual machine
Dynamic adaptation method includes:
Server obtains the running state information of the current virtual machine running, and according to the running state information getting,
And preset priority rule determines the current priority of described virtual machine;
Described server is allocated to the resource of described virtual machine according to the current priority of the described virtual machine determining.
Alternatively, the step of the running state information of virtual machine that described server acquisition currently runs includes:
Described server detect surplus yield be less than predetermined threshold value when, on described server run described void
Plan machine sends acquisition of information instruction, so that described virtual machine obtains described running status letter based on the acquisition of information instruction receiving
Breath;
Receive described virtual machine and the running state information that instruction sends is obtained according to described information.
Alternatively, before described server obtains the current step of the running state information of virtual machine run, described void
The dynamic adaptation method of plan machine resource also includes step:
Described server receives and stores the running state information that described virtual machine sends;
When described server is when surplus yield is detected less than predetermined threshold value, execution obtains and runs on described server
The current running state information of virtual machine step;
The described step obtaining the current running state information of the virtual machine running on described server includes:
Obtain the running state information of the transmission of described virtual machine of the last storage.
Alternatively, described preset priority rule includes weight allocation rule and weights algorithm;Described service
Device is according to the running state information getting, and preset priority rule determines the step of the current priority of described virtual machine
Rapid inclusion:
Described server according to the running state information getting described virtual machine, and preset weight allocation rule and
Weights algorithm, calculates the weights of described virtual machine respectively, true according to calculated described weights
The priority of fixed described virtual machine.
Alternatively, the dynamic adaptation method of described resources of virtual machine also includes step:
Described server when receiving the rules modification information sending based on described preset priority rule, according to connecing
The described rules modification information receiving is modified to described priority rule.
Alternatively, described server enters to the resource of described virtual machine according to the current priority of the described virtual machine determining
The step of row allotment includes:
Described server, according to the weights of calculated described virtual machine, reclaims weights less than default
The resource of the virtual machine of weights, the resource allocation reclaiming is more than the virtual machine of described preset weights to weights.
Additionally, for achieving the above object, the present invention also provides a kind of dynamic adaptation device of resources of virtual machine, this virtual machine
The dynamic adaptation device of resource includes:
The dynamic adaptation device of described resources of virtual machine includes:
Data obtaining module, obtains the running state information of the current virtual machine running for server;
Priority Determination module, the running state information getting for basis, and preset priority rule determine
The current priority of described virtual machine;
Resource allocation module, enters to the resource of described virtual machine for the priority current according to the described virtual machine determining
Row allotment.
Alternatively, described information acquisition module includes:
Instruction sending unit, for when surplus yield is detected less than predetermined threshold value, running on described server
Described virtual machine send acquisition of information instruction, so that described virtual machine obtains described fortune based on the acquisition of information instruction receiving
Row status information;
Information receiving unit, obtains, according to described information, the running status letter that instruction sends for receiving described virtual machine
Breath.
Alternatively, the dynamic adaptation device of described resources of virtual machine also includes:
Information storage module, receives and stores the running state information that described virtual machine sends for server;
Described information obtains also module and is used for:When surplus yield is detected less than predetermined threshold value, obtain the last
The running state information of the transmission of described virtual machine of storage.
Alternatively, described priority rule includes weight allocation rule and priority weighting algorithm, and described priority determines
Module is additionally operable to:According to the running state information getting described virtual machine, and preset weight allocation rule and priority
Weights-selected Algorithm, calculates the weights of described virtual machine respectively, according to calculated described weights determine
The priority of virtual machine.
The dynamic adaptation method and device of resources of virtual machine proposed by the present invention, server obtains the current virtual machine running
Running state information, and according to the running state information getting, and preset priority rule determines that virtual machine is current
Priority, even if according to determine priority dynamic adaptation is carried out to the resource of virtual machine that is to say, that virtual machine open
When, server is total amount of hardware resources beyond server itself for the initial resource amount of virtual machine configuration, in the fortune of virtual machine
During row, still the current priority of virtual machine can be determined according to the running state information of virtual machine, and according to determination
Priority is dynamically configured to the resource of virtual machine, according to the regulation rule of configuration on server, by reducing priority
The resource quota of low virtual machine, preferentially to ensure the normal operation of the high virtual machine of priority.
Brief description
Fig. 1 is the flow chart of the dynamic adaptation method first embodiment of resources of virtual machine of the present invention;
Fig. 2 is the schematic diagram of the process list in the dynamic adaptation method first embodiment of resources of virtual machine of the present invention;
Fig. 3 obtains running state information step in the dynamic adaptation method first embodiment of resources of virtual machine of the present invention
Like schematic flow sheet;
Fig. 4 is the high-level schematic functional block diagram of the dynamic adaptation device first embodiment of resources of virtual machine of the present invention;
Fig. 5 is the functional module of the embodiment in the dynamic adaptation device first embodiment of resources of virtual machine of the present invention
Schematic diagram.
The realization of the object of the invention, functional characteristics and advantage will be described further in conjunction with the embodiments referring to the drawings.
Specific embodiment
It should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
The present invention provides a kind of dynamic adaptation method of resources of virtual machine.With reference to shown in Fig. 1, it is resources of virtual machine of the present invention
Dynamic adaptation method first embodiment flow chart.
In the present embodiment, the dynamic adaptation method of this resources of virtual machine includes:
Step S10, server obtains the running state information of the current virtual machine running, and according to the operation shape getting
State information, and preset priority rule determines the current priority of described virtual machine;
It should be noted that in the embodiment of the present invention, a server can run one or multiple stage is virtual simultaneously
Machine, hardware resource is reasonably allocated to one or multiple stage virtual machine by server, and when virtual machine is opened, server can basis
Current surplus resources distribute suitable resource for this virtual machine, and server-assignment to the resource sum of all virtual machines may be
More than the hardware resource of server itself, for virtual machine, when most of virtual machine all oeprations at full load, due to resource
Surpass and join it may occur that fighting for of hardware resource, lead to each virtual machine very slow, the use of impact user;Or some are virtual
The resource that machine needs in the program run or application is more, and its uses enough of the inadequate resource of actual distribution, now may have
Some virtual machines are in stops using the resource that the application of state or the current execution of this virtual machine needs less, but is its point
The stock number joined is larger, will result in resources idle.Therefore, for server, need to obtain the fortune of the virtual machine running
Row status information, and the priority of virtual machine is determined according to the running state information getting, and then action is entered to its resource
The allotment of state.
Alternatively, as a kind of embodiment, server can timing acquisition virtual machine running state information with true
Its priority fixed, in other embodiments it is also possible to when remaining hardware resource server is detected is not enough, obtain
The running state information of virtual machine is it is to be understood that when virtual machine has multiple stage, need to obtain the operation of each virtual machine
Status information.
It should be noted that above-mentioned running state information each item of information including but not limited to following:Virtual machine packet, when
The type of the application of front operation, present period, CPU usage, memory usage, disk I/O occupancy, user mode access with
And virtual machine whether be in use state etc..Wherein, virtual machine packet is arranged as required to by user, and this item of information can be remembered
Record is in virtual machine it is also possible to record in the server, if record is in the server, can directly read record in server
Grouping information;Present period includes go to work period, two values of period of coming off duty, and the type of the current application running is current virtual
The corresponding application of CPU usage highest process on machine, when judging the type of the current application of virtual machine, obtains virtual machine system
The process list of system, with reference to shown in Fig. 2, arranges each process according to CPU usage order from high to low, by CPU usage
The type of highest process as the type of the current application of this virtual machine, due to may open on now virtual machine multiple enter
Journey, but the possible only one of which that user mainly uses, therefore judge the current main process using according to CPU usage
Type, for example, if CPU usage highest process is game process, judges its application type as types of entertainment, if
CPU usage highest process is the process of office application, then judge its application type as office-type;Above-mentioned access way can
Can be remote desktop, VNC (Virtual NetworkComputer, Virtual network computer) client, SSH (secure
Shell, safety shell protocol) client, cloud desktop client end etc..
Obtain running state information with regard to server, can have numerous embodiments, be exemplified below two kinds therein and carry out
Explanation.
As a kind of embodiment, with reference to shown in Fig. 3, step S10 includes following refinement step:
Step S11, described server, when surplus yield is detected less than predetermined threshold value, runs on described server
Described virtual machine send acquisition of information instruction, so that described virtual machine obtains described fortune based on the acquisition of information instruction receiving
Row status information;
Step S12, receives described virtual machine and obtains, according to described information, the running state information that instruction sends.
Server real-time monitoring surplus yield, when surplus yield is less than predetermined threshold value, runs on server
Each virtual machine sends acquisition of information instruction, arranges a plug-in unit on a virtual machine, and this plug-in unit refers to receiving this acquisition of information
After order, obtain the running state information of this virtual machine, i.e. each item of information above-mentioned.These information are sent to server, services
Device can determine the priority of virtual machine according to these information after receiving these information.
As another embodiment, before step S10, the dynamic adaptation method of this resources of virtual machine also includes step:
Server receives and stores the running state information that described virtual machine sends;
When described server is when surplus yield is detected less than predetermined threshold value, execution step S10;
Step S10 includes:Obtain the running state information of the transmission of described virtual machine of the last storage.
In this embodiment, virtual machine is installed a plug-in unit, this plug-in unit timing acquisition running state information, and will obtain
The running state information got is sent to server, for example, sends once at interval of one minute.
These running state information are stored after receiving these information by server, then remaining money is being detected
When source amount is less than predetermined threshold value, obtain the last running state information receiving from the information of storage, according to these letters
Breath determines the priority of virtual machine.The priority higher position of virtual machine is intended to more resources, and the low just meaning of priority
And do not need for its distribution compared with multiple resource.
Above-mentioned predetermined threshold value can be arranged as required to by user, and for example, it is total that this predetermined threshold value could be arranged to server
The 10%~20% of stock number.
Step S20, described server resource to described virtual machine according to the current priority of the described virtual machine determining
Allocated.
With regard to priority, as a kind of embodiment, can be counted according to default priority algorithm, such as weighting algorithm
Calculate the weights of virtual machine, the weights according to calculating determine the priority of virtual machine, the high then priority of weights
Height, the low then priority of weights is low, and the resource reclaim of virtual machine relatively low for priority valve distributes to weights higher
Virtual machine, wherein, the stock number of recovery determines according to the running state information of the virtual machine being recovered, specifically, server root
According to the weights of calculated described virtual machine, reclaim the resource that weights are less than the virtual machine of preset weights,
The resource allocation reclaiming is more than the virtual machine of described preset weights to weights.In other implementations, permissible
The value of each item of information in overall merit running state information, to determine the rank of priority, for example, application type is to do
Public affairs, current time belongs to the work hours, and CPU usage, memory usage are higher than 60%, and this virtual machine is currently at and uses shape
State, then rank is height.It is understood that user pre-sets the standard of rank evaluation and test, server is according to the information getting
Determine the rank of each item of information, then overall merit goes out the rank of the priority of virtual machine.Virtual machine by low priority
Resource reclaim, distribute to the virtual machine of high priority.
The dynamic adaptation method of the resources of virtual machine that the present embodiment proposes, server obtains the fortune of the current virtual machine running
Row status information, and according to the running state information getting, and preset priority rule determines that described virtual machine is current
Priority, even if according to determine priority dynamic adaptation is carried out to the resource of virtual machine that is to say, that virtual machine open
When, server is total amount of hardware resources beyond server itself for the initial resource amount of multiple virtual machine configurations, in virtual machine
Running in, still the current priority of virtual machine can be determined according to the running state information of virtual machine, and according to true
Fixed priority is dynamically configured to the resource of virtual machine, according to the regulation rule of configuration on server, excellent by reducing
The resource quota of the low virtual machine of first level, preferentially to ensure the normal operation of the high virtual machine of priority.
It is understood that the running state information of virtual machine is service condition according to user in dynamic change, because
This, in use for some time, possible priority can reduce the high virtual machine of current priority, and current priority is low.Currently
In use for some time, possible priority can raise the operation shape that is to say, that with virtual machine to the low virtual machine of priority
The dynamic change of state, the height of its priority is also in dynamic change, and with the dynamic change of priority, dynamic adjustment is empty
The stock number of plan machine.
The second embodiment of the dynamic adaptation method of resources of virtual machine of the present invention is proposed based on first embodiment.With reference to Fig. 2
Shown, in the present embodiment, priority rule includes weight allocation rule and priority weighting algorithm, and step S20 includes following
Refinement step:
According to the running state information getting described virtual machine, and preset weight allocation rule and weights
Algorithm, calculates the weights of described virtual machine respectively, is determined described virtual according to calculated described weights
The priority of machine.
In the present embodiment, using weighting algorithm, it is each item of information setting weight in running state information, Suo Youxin
The weight sum of breath item is 1, and then the value according to each item of information obtaining and priority rule calculate each item of information
Fraction, calculate the weighted mean of all items of information according to weighting algorithm, be the weights of this virtual machine.Example
As using hundred-mark system, the total score of each item of information is a percentage, and user pre-sets different parameters under each item of information
Corresponding fraction, office application is 100 points taking application type as a example, and Video Applications are 60 points, and game application is 20 points.So
The fraction of this item of information after getting each item of information, can be obtained, in conjunction with weight, calculate adding of all items of information
Weight average value.
The present invention also proposes a kind of dynamic adaptation device of resources of virtual machine.
Functional module with reference to the dynamic adaptation device first embodiment shown in Fig. 4, being resources of virtual machine of the present invention is illustrated
Figure.
In this embodiment, the dynamic adaptation device of this resources of virtual machine includes:
Data obtaining module 10, for obtaining the running state information of the virtual machine of current operation;
Priority Determination module 20, the running state information getting for basis, and preset priority rule is true
The current priority of fixed described virtual machine;
Resource allocation module 30, for the resource to described virtual machine for the priority current according to the described virtual machine determining
Allocated.
It should be noted that described server can be used as the dynamic adaptation method of described resources of virtual machine.The present invention is real
Apply in example, a server can run one or multiple stage virtual machine simultaneously, hardware resource is reasonably configured by server
To multiple stage virtual machine, when virtual machine is opened, server can provide for the distribution of this virtual machine is suitable according to current surplus resources
Source, it may be more than the hardware resource of server itself that server-assignment gives the resource sum of all virtual machines, for virtual machine
For, when most of virtual machine all oeprations at full load, join it may occur that fighting for of hardware resource because resource surpasses, lead to each
Virtual machine is all very slow, the use of impact user;Or some virtual machines run program or application need resource relatively
Many, and its uses enough of the inadequate resource of actual distribution, some virtual machines now may be had to be in and to stop using state or this void
The resource that the application of the current execution of plan machine needs is less, but larger for the stock number of its distribution, will result in resources idle.Cause
This, for server, need to obtain the running state information of each virtual machine running, and according to the operation shape getting
State information determines the priority of virtual machine, and then its resource is dynamically allocated.
Alternatively, as a kind of embodiment, the data obtaining module 10 of server can timing acquisition virtual machine
Running state information to determine its priority, in other embodiments it is also possible to the remaining hardware money of server is being detected
When source is not enough, obtain the running state information of virtual machine.
It should be noted that above-mentioned running state information each item of information including but not limited to following:Virtual machine packet, when
The type of the application of front operation, present period, CPU usage, memory usage, disk I/O occupancy, user mode access with
And virtual machine whether be in use state etc..Wherein, virtual machine packet is arranged as required to by user, and this item of information can be remembered
Record is in virtual machine it is also possible to record in the server, if record is in the server, can directly read record in server
Grouping information;Present period includes go to work period, two values of period of coming off duty, and the type of the current application running is current virtual
The corresponding application of CPU usage highest process on machine, when judging the type of the current application of virtual machine, obtains virtual machine system
The process list of system, with reference to shown in Fig. 2, arranges each process according to CPU usage order from high to low, by CPU usage
The type of highest process as the type of the current application of this virtual machine, due to may open on now virtual machine multiple enter
Journey, but the possible only one of which that user mainly uses, therefore judge the current main process using according to CPU usage
Type, for example, if CPU usage highest process is game process, judges its application type as types of entertainment, if
CPU usage highest process is the process of office application, then judge its application type as office-type;Above-mentioned access way can
Can be remote desktop, VNC (Virtual NetworkComputer, Virtual network computer) client, SSH (secure
Shell, safety shell protocol) client, cloud desktop client end etc..
Obtain running state information with regard to server, can have numerous embodiments, be exemplified below two kinds therein and carry out
Explanation.
As a kind of embodiment, data obtaining module 10 includes:
Instruction sending unit, for when surplus yield is detected less than predetermined threshold value, running on described server
Described virtual machine send acquisition of information instruction, so that described virtual machine obtains described fortune based on the acquisition of information instruction receiving
Row status information;
Information receiving unit, obtains, according to described information, the running status letter that instruction sends for receiving described virtual machine
Breath.
Server real-time monitoring surplus yield, when surplus yield is less than predetermined threshold value, instruction sending unit is to clothes
The virtual machine running on business device sends acquisition of information instruction, arranges a plug-in unit on a virtual machine, and this plug-in unit is receiving this letter
After breath obtains instruction, obtain the running state information of this virtual machine, i.e. each item of information above-mentioned.These information are sent to service
Device, after information receiving unit receives these information, Priority Determination module 20 can determine the excellent of virtual machine according to these information
First level.
As another embodiment, with reference to shown in Fig. 5, the dynamic adaptation device of this resources of virtual machine also includes:
Information storage module 40, receives and stores the running state information that described virtual machine sends for server;
Data obtaining module 10 is additionally operable to:When surplus yield is detected less than predetermined threshold value, acquisition the last time deposits
The running state information of the transmission of described virtual machine of storage.
In this embodiment, virtual machine is installed a plug-in unit, this plug-in unit timing acquisition running state information, and will obtain
The running state information got is sent to server, for example, sends once at interval of one minute.
After receiving these information, these running state information are stored server by information storage module 40, so
Afterwards when surplus yield is detected less than predetermined threshold value, obtain the last running status receiving from the information of storage
Information, determines the priority of virtual machine according to these information.The priority higher position of virtual machine is intended to more resources, and
Low the meaning that of priority does not need for its distribution compared with multiple resource.
Above-mentioned predetermined threshold value can be arranged as required to by user, and for example, it is total that this predetermined threshold value could be arranged to server
The 10%~20% of stock number.
With regard to priority, as a kind of embodiment, can be counted according to default priority algorithm, such as weighting algorithm
Calculate the weights of virtual machine, Priority Determination module 20 determines the priority of virtual machine according to the weights calculating,
The high then priority of weights is high, and the low then priority of weights is low, and resource allocation module 30 is by virtual machine relatively low for priority valve
Resource reclaim, distributes to the higher virtual machine of weights, and wherein, the stock number of recovery is according to the fortune of the virtual machine being recovered
Row status information determines, specifically, resource allocation module 30, according to the weights of calculated described virtual machine, reclaims
Weights are less than the resource of the virtual machine of preset weights, the resource allocation reclaiming to weights are more than described default
The virtual machine of weights.In other implementations, Priority Determination module 20 can be with each in overall merit running state information
The value of individual item of information, to determine the rank of priority, for example, application type is office, and current time belongs to the work hours,
CPU usage, memory usage are higher than 60%, and this virtual machine is currently at use state, then rank is height.May be appreciated
It is that user pre-sets the standard of rank evaluation and test, server determines the rank of each item of information according to the information getting, so
Overall merit goes out the rank of the priority of virtual machine afterwards.Resource allocation module 30 by the resource reclaim of the virtual machine of low priority,
Distribute to the virtual machine of high priority.
The dynamic adaptation device of the resources of virtual machine that the present embodiment proposes, server obtains the fortune of the current virtual machine running
Row status information, and according to the running state information getting, and preset priority rule determines that described virtual machine is current
Priority, even if according to determine priority dynamic adaptation is carried out to the resource of virtual machine that is to say, that virtual machine open
When, server is total amount of hardware resources beyond server itself for the initial resource amount of virtual machine configuration, in the fortune of virtual machine
During row, still the current priority of virtual machine can be determined according to the running state information of virtual machine, and according to determination
Priority is dynamically configured to the resource of virtual machine, according to the regulation rule of configuration on server, by reducing priority
The resource quota of low virtual machine, preferentially to ensure the normal operation of the high virtual machine of priority.
It is understood that the running state information of virtual machine is service condition according to user in dynamic change, because
This, in use for some time, possible priority can reduce the high virtual machine of current priority, and current priority is low.Virtual
In use for some time, possible priority can raise the dynamic change that is to say, that running status with virtual machine to machine,
The height of its priority is also in dynamic change, and with the dynamic change of priority, resource allocation module 30 dynamically adjusts
The stock number of virtual machine.
The second embodiment of the dynamic adaptation device of resources of virtual machine of the present invention is proposed based on first embodiment.In this enforcement
In example, priority rule includes weight allocation rule and priority weighting algorithm, and Priority Determination module 20 is additionally operable to:According to obtaining
Get the running state information of described virtual machine, and preset weight allocation rule and weights algorithm, calculate respectively
The weights of described virtual machine, determine the priority of described virtual machine according to calculated described weights.
In the present embodiment, using weighting algorithm, it is each item of information setting weight in running state information, Suo Youxin
The weight sum of breath item is 1, and then the value according to each item of information obtaining and priority rule calculate each item of information
Fraction, Priority Determination module 20 calculates the weighted mean of all items of information according to weighting algorithm, is this virtual machine
Weights.For example, using hundred-mark system, the total score of each item of information is a percentage, and user pre-sets each letter
The different corresponding fraction of parameter under breath item, office application is 100 points taking application type as a example, and Video Applications are 60 points, game
Apply as 20 points.The fraction of this item of information so after getting each item of information, can be obtained, in conjunction with weight, preferentially
Level determining module 20 calculates the weighted mean of all items of information.
It should be noted that herein, term " inclusion ", "comprising" or its any other variant are intended to non-row
The comprising of his property, so that including a series of process of key elements, method, article or device not only include those key elements, and
And also include other key elements of being not expressly set out, or also include intrinsic for this process, method, article or device institute
Key element.In the absence of more restrictions, the key element being limited by sentence "including a ..." is it is not excluded that including being somebody's turn to do
Also there is other identical element in the process of key element, method, article or device.
In addition, the description being related to " first ", " second " etc. in invention only describes purpose, and it is not intended that instruction or
Imply its relative importance or the implicit quantity indicating indicated technical characteristic.Thus, " first ", " second " are defined
Feature can be expressed or implicitly include at least one this feature.In addition, the technical scheme between each embodiment can phase
Mutually combine, but must be capable of by those of ordinary skill in the art based on, when the combination of technical scheme occurs mutually
Contradiction or people should think that the combination of this technical scheme does not exist, also not in the protection domain of application claims when cannot realize
Within.
These are only the preferred embodiments of the present invention, not thereby limit the present invention the scope of the claims, every using this
Equivalent structure or equivalent flow conversion that bright description and accompanying drawing content are made, or directly or indirectly it is used in other related skills
Art field, is included within the scope of the present invention.
Claims (10)
1. a kind of dynamic adaptation method of resources of virtual machine is it is characterised in that the dynamic adaptation method bag of described resources of virtual machine
Include:
Server obtains the running state information of the current virtual machine running, and according to the running state information getting, and
Preset priority rule determines the current priority of described virtual machine;
Described server is allocated to the resource of described virtual machine according to the current priority of the described virtual machine determining.
2. the dynamic adaptation method of resources of virtual machine according to claim 1 is it is characterised in that the acquisition of described server is worked as
The step of the running state information of the virtual machine of front operation includes:
Described server detect surplus yield be less than predetermined threshold value when, on described server run described virtual machine
Send acquisition of information instruction, so that described virtual machine obtains described running state information based on the acquisition of information instruction receiving;
Receive described virtual machine and the running state information that instruction sends is obtained according to described information.
3. the dynamic adaptation method of resources of virtual machine according to claim 1 is it is characterised in that the acquisition of described server is worked as
Before the step of the running state information of the virtual machine of front operation, the dynamic adaptation method of described resources of virtual machine also includes walking
Suddenly:
Described server receives and stores the running state information that described virtual machine sends;
When described server is when surplus yield is detected less than predetermined threshold value, execution obtains the void run on described server
The step of the current running state information of plan machine;
The described step obtaining the current running state information of the virtual machine running on described server includes:
Obtain the running state information of the transmission of described virtual machine of the last storage.
4. the dynamic adaptation method of resources of virtual machine according to claim 1 is it is characterised in that described preset priority
Rule includes weight allocation rule and weights algorithm;The running state information that described basis gets, and preset
Priority rule determines that the step of the current priority of described virtual machine includes:
Described server is according to the running state information getting described virtual machine, and preset weight allocation rule and preferential
Level Weights-selected Algorithm, calculates the weights of described virtual machine respectively, determines institute according to calculated described weights
State the priority of virtual machine.
5. the dynamic adaptation method of resources of virtual machine according to any one of claim 1 to 4 is it is characterised in that described
The dynamic adaptation method of resources of virtual machine also includes step:
Described server when receiving the rules modification information sending based on described preset priority rule, according to receiving
Described rules modification information described priority rule is modified.
6. the dynamic adaptation method of resources of virtual machine according to claim 4 is it is characterised in that described server is according to really
The step that the current priority of fixed described virtual machine is allocated to the resource of described virtual machine includes:
Described server, according to the weights of calculated described virtual machine, reclaims weights and is less than preset weights
Virtual machine resource, by reclaim resource allocation to weights be more than described preset weights virtual machine.
7. a kind of dynamic adaptation device of resources of virtual machine is it is characterised in that the dynamic adaptation device bag of described resources of virtual machine
Include:
Data obtaining module, for obtaining the running state information of the virtual machine of current operation;
Priority Determination module, the running state information getting for basis, and preset priority rule determine described
The current priority of virtual machine;
Resource allocation module, adjusts to the resource of described virtual machine for the priority current according to the described virtual machine determining
Join.
8. the dynamic adaptation device of resources of virtual machine according to claim 7 is it is characterised in that described information acquisition module
Including:
Instruction sending unit, for the institute when surplus yield is detected less than predetermined threshold value, running on described server
State virtual machine and send acquisition of information instruction, so that described virtual machine obtains described operation shape based on the acquisition of information instruction receiving
State information;
Information receiving unit, obtains, according to described information, the running state information that instruction sends for receiving described virtual machine.
9. the dynamic adaptation device of resources of virtual machine according to claim 7 is it is characterised in that described resources of virtual machine
Dynamic adaptation device also includes:
Information storage module, receives and stores the running state information that described virtual machine sends for server;
Described information obtains also module and is used for:When surplus yield is detected less than predetermined threshold value, obtain the last storage
The transmission of described virtual machine running state information.
10. the dynamic adaptation device of the resources of virtual machine according to any one of claim 7 to 9 is it is characterised in that described
Priority rule includes weight allocation rule and priority weighting algorithm, and described Priority Determination module is additionally operable to:According to acquisition
To the running state information of described virtual machine, and preset weight allocation rule and weights algorithm, calculate institute respectively
State the weights of virtual machine, determine the priority of described virtual machine according to calculated described weights.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610903604.6A CN106445690A (en) | 2016-10-17 | 2016-10-17 | Dynamic scheduling method and device for virtual machine resource |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610903604.6A CN106445690A (en) | 2016-10-17 | 2016-10-17 | Dynamic scheduling method and device for virtual machine resource |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106445690A true CN106445690A (en) | 2017-02-22 |
Family
ID=58175366
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610903604.6A Pending CN106445690A (en) | 2016-10-17 | 2016-10-17 | Dynamic scheduling method and device for virtual machine resource |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106445690A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107122235A (en) * | 2017-04-19 | 2017-09-01 | 中国舰船研究设计中心 | Public infrastructure resource regulating method based on application priority |
CN109710484A (en) * | 2017-10-25 | 2019-05-03 | 中国电信股份有限公司 | Method of adjustment, device and the computer readable storage medium of equipment energy consumption |
CN109726007A (en) * | 2017-10-31 | 2019-05-07 | 中兴通讯股份有限公司 | A kind of container layout quota management method and device and container arranging system |
CN110209466A (en) * | 2018-05-17 | 2019-09-06 | 腾讯科技(深圳)有限公司 | Resource allocation method, device for allocating resources and storage medium |
CN110740100A (en) * | 2019-10-22 | 2020-01-31 | 新华三信息安全技术有限公司 | transmission rate determination method, device, network equipment and storage medium |
CN112395045A (en) * | 2020-11-13 | 2021-02-23 | 深圳力维智联技术有限公司 | Virtual machine recovery and resource adjustment method thereof |
CN113515371A (en) * | 2021-05-11 | 2021-10-19 | 上海安畅网络科技股份有限公司 | Cloud resource dividing method, device, equipment and storage medium |
CN117234742A (en) * | 2023-11-14 | 2023-12-15 | 苏州元脑智能科技有限公司 | Processor core allocation method, device, equipment and storage medium |
WO2024148864A1 (en) * | 2023-01-09 | 2024-07-18 | 苏州元脑智能科技有限公司 | Virtual machine memory adjustment method and device, non-volatile readable storage medium, and electronic device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101154167A (en) * | 2006-09-28 | 2008-04-02 | 联想(北京)有限公司 | Virtual machine system and its CPU scheduling method |
CN101499021A (en) * | 2008-01-31 | 2009-08-05 | 国际商业机器公司 | Method and apparatus for dynamically distributing resources on a plurality of virtual machines |
CN102567072A (en) * | 2010-12-20 | 2012-07-11 | 中国移动通信集团公司 | Resource allocation method, resource allocation device and resource allocation system |
CN103064746A (en) * | 2013-01-23 | 2013-04-24 | 上海交通大学 | Processor resource accurate distributing method for predictive scheduling based on current credit |
CN103870341A (en) * | 2014-03-12 | 2014-06-18 | 汉柏科技有限公司 | Method and system of adjusting resources of virtual machine |
CN104111860A (en) * | 2014-06-20 | 2014-10-22 | 深圳市深信服电子科技有限公司 | Method and system for virtual machine operation in server |
-
2016
- 2016-10-17 CN CN201610903604.6A patent/CN106445690A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101154167A (en) * | 2006-09-28 | 2008-04-02 | 联想(北京)有限公司 | Virtual machine system and its CPU scheduling method |
CN101499021A (en) * | 2008-01-31 | 2009-08-05 | 国际商业机器公司 | Method and apparatus for dynamically distributing resources on a plurality of virtual machines |
CN102567072A (en) * | 2010-12-20 | 2012-07-11 | 中国移动通信集团公司 | Resource allocation method, resource allocation device and resource allocation system |
CN103064746A (en) * | 2013-01-23 | 2013-04-24 | 上海交通大学 | Processor resource accurate distributing method for predictive scheduling based on current credit |
CN103870341A (en) * | 2014-03-12 | 2014-06-18 | 汉柏科技有限公司 | Method and system of adjusting resources of virtual machine |
CN104111860A (en) * | 2014-06-20 | 2014-10-22 | 深圳市深信服电子科技有限公司 | Method and system for virtual machine operation in server |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107122235A (en) * | 2017-04-19 | 2017-09-01 | 中国舰船研究设计中心 | Public infrastructure resource regulating method based on application priority |
CN109710484A (en) * | 2017-10-25 | 2019-05-03 | 中国电信股份有限公司 | Method of adjustment, device and the computer readable storage medium of equipment energy consumption |
CN109726007B (en) * | 2017-10-31 | 2023-05-26 | 中兴通讯股份有限公司 | Container arrangement quota management method and device and container arrangement system |
CN109726007A (en) * | 2017-10-31 | 2019-05-07 | 中兴通讯股份有限公司 | A kind of container layout quota management method and device and container arranging system |
CN110209466B (en) * | 2018-05-17 | 2023-10-13 | 腾讯科技(深圳)有限公司 | Resource allocation method, resource allocation device and storage medium |
CN110209466A (en) * | 2018-05-17 | 2019-09-06 | 腾讯科技(深圳)有限公司 | Resource allocation method, device for allocating resources and storage medium |
CN110740100B (en) * | 2019-10-22 | 2022-04-22 | 新华三信息安全技术有限公司 | Transmission rate determining method, device, network equipment and storage medium |
CN110740100A (en) * | 2019-10-22 | 2020-01-31 | 新华三信息安全技术有限公司 | transmission rate determination method, device, network equipment and storage medium |
CN112395045A (en) * | 2020-11-13 | 2021-02-23 | 深圳力维智联技术有限公司 | Virtual machine recovery and resource adjustment method thereof |
CN113515371A (en) * | 2021-05-11 | 2021-10-19 | 上海安畅网络科技股份有限公司 | Cloud resource dividing method, device, equipment and storage medium |
WO2024148864A1 (en) * | 2023-01-09 | 2024-07-18 | 苏州元脑智能科技有限公司 | Virtual machine memory adjustment method and device, non-volatile readable storage medium, and electronic device |
CN117234742A (en) * | 2023-11-14 | 2023-12-15 | 苏州元脑智能科技有限公司 | Processor core allocation method, device, equipment and storage medium |
CN117234742B (en) * | 2023-11-14 | 2024-02-09 | 苏州元脑智能科技有限公司 | Processor core allocation method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106445690A (en) | Dynamic scheduling method and device for virtual machine resource | |
Chaczko et al. | Availability and load balancing in cloud computing | |
CN104102543B (en) | The method and apparatus of adjustment of load in a kind of cloud computing environment | |
CN110276182A (en) | The implementation method of API distribution current limliting | |
CN109586952B (en) | Server capacity expansion method and device | |
CN102916908B (en) | Method and system for optimizing bandwidth in network application | |
CN111131639A (en) | Customer service seat allocation method, customer service seat allocation device, server and storage medium | |
CN110333937A (en) | Task distribution method, device, computer equipment and storage medium | |
CN108984301A (en) | Self-adaptive cloud resource allocation method and device | |
CN111506404A (en) | Kubernetes-based shared GPU (graphics processing Unit) scheduling method | |
CN103699445A (en) | Task scheduling method, device and system | |
CN104375897A (en) | Cloud computing resource scheduling method based on minimum relative load imbalance degree | |
CN105049509A (en) | Cluster scheduling method, load balancer and clustering system | |
CN105893120A (en) | Acquisition method and device for thread synchronization resources | |
CN108829510B (en) | Thread binding processing method and device | |
CN110647392A (en) | Intelligent elastic expansion method based on container cluster | |
CN109117280A (en) | The method that is communicated between electronic device and its limiting process, storage medium | |
EP3541048A1 (en) | Method and apparatus for determining main scheduler from cloud computing system | |
CN104092620A (en) | Method and device for achieving adjustment of network bandwidth | |
CN104835063A (en) | E-commerce platform communication queuing method and system | |
CN105187514B (en) | The management method and its system of cloud application program | |
CN110336888A (en) | A kind of server distribution method, device, system and medium | |
CN109002381A (en) | Process communication monitoring method, electronic device and computer readable storage medium | |
CN109347762A (en) | Cross-region rate of discharge concocting method, device, computer equipment and storage medium | |
CN108563504A (en) | A kind of resource management-control method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170222 |
|
RJ01 | Rejection of invention patent application after publication |