CN108572868A - A kind of physical host selection method, device, equipment and readable storage medium storing program for executing - Google Patents
A kind of physical host selection method, device, equipment and readable storage medium storing program for executing Download PDFInfo
- Publication number
- CN108572868A CN108572868A CN201710874682.2A CN201710874682A CN108572868A CN 108572868 A CN108572868 A CN 108572868A CN 201710874682 A CN201710874682 A CN 201710874682A CN 108572868 A CN108572868 A CN 108572868A
- Authority
- CN
- China
- Prior art keywords
- physical host
- storage resource
- performance parameter
- resource
- rate
- 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
- 238000003860 storage Methods 0.000 title claims abstract description 397
- 238000010187 selection method Methods 0.000 title claims abstract description 31
- 238000000034 method Methods 0.000 claims abstract description 47
- 238000004891 communication Methods 0.000 claims description 17
- 238000004590 computer program Methods 0.000 claims description 14
- 238000013467 fragmentation Methods 0.000 abstract description 11
- 238000006062 fragmentation reaction Methods 0.000 abstract description 11
- 230000033228 biological regulation Effects 0.000 description 8
- 230000005540 biological transmission Effects 0.000 description 6
- 239000012141 concentrate Substances 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 230000006399 behavior Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000002028 premature Effects 0.000 description 2
- 230000002035 prolonged effect Effects 0.000 description 2
- 241000208340 Araliaceae Species 0.000 description 1
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 1
- 235000003140 Panax quinquefolius Nutrition 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004883 computer application Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 239000012634 fragment Substances 0.000 description 1
- 235000008434 ginseng Nutrition 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000006641 stabilisation Effects 0.000 description 1
- 238000011105 stabilization Methods 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/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- 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
-
- 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/5083—Techniques for rebalancing the load in a distributed system
-
- 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
- G06F2009/45562—Creating, deleting, cloning virtual machine instances
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
An embodiment of the present invention provides a kind of physical host selection method, device, equipment and readable storage medium storing program for executing, wherein the method includes:Container request to create is received, the container request to create includes containers size;The remaining storage resource of selection is more than the physical host of the containers size, and will be in the storage to resource pool of the mark of the physical host;Remaining storage resource rate is selected to be not less than the physical host of default first storage resource threshold value in the physical host corresponding to mark in the resource pool;Remaining storage resource rate is selected to be less than the physical host of default second storage resource threshold value when the remaining storage resource rate of physical host corresponding to the mark in the resource pool is below default first storage resource threshold value, in the physical host corresponding to mark in the resource pool.Technical solution can reduce storage resource fragmentation with each physical host residue storage resource rate of efficient balance through the invention.
Description
Technical field
The present invention relates to computer application technologies, more particularly to a kind of physical host selection method, device, equipment
And readable storage medium storing program for executing.
Background technology
RDS (Relational Database Service) i.e. relevant database service, is built upon relational model base
On plinth, the data in database are handled by the mathematical concepts such as algebra of sets and method, are that a kind of plug and play, stabilization can
Lean on, can elastic telescopic online database service.RDS is that (container technique is to pass through virtualizing operating systems by container technique
Mode come management code and application program), on physical host create specify specification (specification refers in the container that user specifies
Deposit the size with disk) container, then in the container of establishment log-on data library realize.However, the prior art is selecting
Physical host carries out being randomly selected when establishment container, i.e., it is enough may to be built into any one remaining storage resource for container
Physical host on.For example, common OpenStack (a cloud computing management platform project increased income) is exactly by selecting at random
It selects to select physical host to create container.
Random selection management is simple, if remaining storage resource can be created container by selection enough on physical host, but
It is prolonged random selection to lead to different physical host residue storage resource rates (remaining storage resource rate refers to separate unit physics
The ratio of remaining storage resource and total storage resource on host) it is unbalanced, certain physical hosts may be caused premature in full
And the case where state, occurs, and the workability of the physical host can be influenced if physical host is in saturation state for a long time
Can, reduce user experience.
Invention content
The embodiment of the present invention is designed to provide a kind of physical host selection method, device, equipment and readable storage medium
Matter reduces the fragmentation of physical host storage resource, by high-performance to realize balanced every physical host residue storage resource rate
Physical host preferentially distribute to the purpose of user.
The one side that the present invention is implemented provides a kind of physical host selection method, including:
Container request to create is received, the container request to create includes containers size;
The remaining storage resource of selection is more than the physical host of said vesse specification, and the mark of above-mentioned physical host is stored
Into resource pool;
Select remaining storage resource rate not less than default the in the physical host corresponding to mark in above-mentioned resource pool
The physical host of one storage resource threshold value.
The remaining storage resource rate of the physical host corresponding to mark in above-mentioned resource pool is less than default first storage
When resource threshold,
Remaining storage resource rate is selected to be less than default second in the physical host corresponding to mark in above-mentioned resource pool
The physical host of storage resource threshold value.
Optionally, the above method further includes:
It is above-mentioned one power of physical host distribution each selected according to the performance parameter of each physical host performance selected
Value;
Select the physical host of above-mentioned maximum weight.
Optionally, above-mentioned performance parameter includes:Physical host arithmetic speed, physical host memory size and network interface card communication speed
Rate.
Optionally, the performance parameter for the physical host that above-mentioned basis each selects is the above-mentioned physical host each selected point
The step of with a weights, including:
The significance level of every performance parameter of the physical host more each selected;
According to the above-mentioned significance level per performance parameter, the significance level of the physical host each selected is determined;
Using the significance level of the above-mentioned physical host each selected, for above-mentioned one power of physical host distribution each selected
Value.
Optionally, the performance parameter for the physical host that above-mentioned basis each selects is the above-mentioned physical host each selected point
The step of with a weights, further include:
In the significance level of the first performance parameter in determining the performance parameter institute is removed higher than in the performance parameter
When stating the significance level of other performance parameters other than first performance parameter, it is according to the parameter value of the first performance parameter then
The physical host each selected distributes a weights.
The another aspect that the present invention is implemented additionally provides a kind of physical host selection device, including:
Receiving module, for receiving container request to create, the container request to create includes containers size;
First choice module selects remaining storage resource to be more than the physical host of said vesse specification, and by above-mentioned physics
In the mark storage to resource pool of host;
Second selecting module, for the remaining storage resource of physical host selection corresponding to the mark in above-mentioned resource pool
Rate is not less than the physical host of default first storage resource threshold value.
The remaining storage resource rate of physical host corresponding to the mark in above-mentioned resource pool is less than default first storage
When resource threshold, above-mentioned second selecting module is additionally operable to,
Remaining storage resource rate is selected to be less than default second in the physical host corresponding to mark in above-mentioned resource pool
The physical host of storage resource threshold value.
Optionally, above-mentioned apparatus further includes:
Weights distribution module, for being the above-mentioned physics each selected according to the performance parameter of the physical host each selected
One weights of host assignment;
Third selecting module, the physical host for selecting above-mentioned maximum weight.
Optionally, above-mentioned performance parameter includes:Physical host arithmetic speed, physical host memory size and network interface card communication speed
Rate.
Optionally, above-mentioned weights distribution module is used for,
The significance level of every performance parameter of the physical host more each selected;
According to the above-mentioned significance level per performance parameter, the significance level of the physical host each selected is determined;
Using the significance level of the above-mentioned physical host each selected, for above-mentioned one power of physical host distribution each selected
Value.
Optionally, above-mentioned weights distribution module is additionally operable to,
In the significance level of the first performance parameter in determining the performance parameter institute is removed higher than in the performance parameter
When stating the significance level of other performance parameters other than first performance parameter, it is according to the parameter value of the first performance parameter then
The physical host each selected distributes a weights.
The third aspect, an embodiment of the present invention provides a kind of electronic equipment, including processor and machine readable storage medium,
Above-mentioned machine readable storage medium is stored with the machine-executable instruction that can be executed by above-mentioned processor, on above-mentioned processor
Machine-executable instruction is stated to promote:Realize any of the above-described physical host selection method.
Fourth aspect, an embodiment of the present invention provides a kind of computer readable storage medium, above computer readable storages
Dielectric memory contains computer program, when above computer program is executed by processor, realizes any of the above-described physical host selection
Method.
5th aspect, an embodiment of the present invention provides a kind of computer program products including instruction, when it is in computer
When upper operation so that computer executes any of the above-described physical host selection method.
6th aspect, an embodiment of the present invention provides a kind of computer programs, when run on a computer so that meter
Calculation machine executes any of the above-described physical host selection method.
Physical host selection method, device and equipment provided in an embodiment of the present invention create container in selection physical host
When, in the physical host corresponding to mark in resource pool, dynamic select residue storage resource rate is deposited not less than default first
Store up the physical host of resource threshold, the remaining storage resource rate based on the physical host that this technical solution of the present invention final choice goes out
It is a higher level of the physical host residue storage resource rate corresponding to the mark that is in resource pool.Choosing preferential in this way
The mode for selecting the remaining high physical host of storage resource rate, can be with each physical host residue storage resource of efficient balance
Rate, and when the remaining storage resource rate for identifying corresponding physical host in resource pool is below default first storage resource threshold value
When, then dynamic select residue storage resource rate is less than the physical host of default second storage resource threshold value, can preferentially select to remain
Balance stores up the low physical host of resource utilization, has preferentially utilized the few physical host of remaining storage resource broken to reduce storage resource
Piece.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is the required attached drawing utilized in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
Obtain other attached drawings according to these attached drawings.
Fig. 1 is a kind of flow chart of physical host selection method provided in an embodiment of the present invention;
It is that the physical host of each selection distributes the step flow chart of a weights that Fig. 2, which is in the embodiment of the present invention,;
Fig. 3 is a kind of structural schematic diagram of physical host selection device in the embodiment of the present invention;
Fig. 4 is the structural schematic diagram of a kind of electronic equipment in the embodiment of the present invention.
Specific implementation mode
First, it is provided for the embodiments of the invention a kind of physical host selection method to illustrate, this method can wrap
Include following steps:
Container request to create is received, the container request to create includes containers size;
The remaining storage resource of selection is more than the physical host of the containers size, and the mark of the physical host is put into
In resource pool;
Select remaining storage resource rate not less than default the in the physical host corresponding to mark in the resource pool
The physical host of one storage resource threshold value.
Cloud database is increasingly known, and common are Kingsoft cloud etc., and people can pass through cloud management console
The cloud database service for creating oneself usually first needs user to specify the appearance for starting cloud database when creating cloud database
The specification of device, such as can take specified containers memory size as 1G, disk size 10G.Then it is in setting cloud database information
After the information such as cloud database account, password, example number, the information set can be sent to service by confirming button
Device.
Server can select an object according to the containers size that user specifies first after the information for receiving user's transmission
Host is managed, container is then created on physical host, finally starts cloud database in a reservoir to realize cloud database service.So
And in existing cloud database service, when the containers size specified according to user selects physical host be it is randomly selected, i.e.,
One is randomly choosed in the physical host that remaining storage resource is capable of storage container, random selection management is simple, without additional
Code development quantity, but prolonged random selection can cause every physical host residue storage resource rate to differ greatly, can
The case where certain physical hosts capable of being caused premature in saturation state, and if physical host is in saturation state meeting for a long time
The working performance of the physical host is influenced, user experience is reduced.
The embodiment of the present invention selects in view of the above-mentioned problems, when selecting physical host to create the container of the specified specification of user
Remaining storage resource rate is not less than the physical host of default first storage resource threshold value, wherein remaining storage resource rate, that is, physics master
Machine residue storage resource and the ratio of total storage resource can subtract the difference obtained with storage resource by total storage resource
Divided by total storage resource is calculated.For example, preset first storage resource threshold value can first be set as 70%, search whether
There are the physical hosts that remaining storage resource rate is not less than 70%, and if so, showing that the physical host residue found stores
It is high that resource utilization compares other physical host residue storage resources rates in resource pool, if there is no then can be by the first storage resource
Threshold value is reduced to 60% and continues to search, until when the first storage resource threshold value is reduced to 30%, still without qualified
Physical host, then it is assumed that the remaining storage resource rate of the physical host corresponding to mark in resource pool is not much different, then searches
It is less than 5% physical host with the presence or absence of remaining storage resource rate, and if so, complete selection, if there is no then increasing the
Two storage resource threshold values are 10%, and what is continued to search for whether there is qualified physical host, if otherwise continuing growing the
Two storage resource threshold values search the physical host that remaining storage resource rate is less than default second storage resource threshold value up to 30%.
The embodiment of the present invention can choose the physics master that remaining storage resource rate is not less than default first storage resource threshold value
Machine, also, during actual selection qualified physical host, presetting the first storage resource threshold value can be as needed
Dynamic regulation is carried out, can ensure that the remaining storage resource rate for the physical host that final choice goes out is to be in money based on said program
A higher level of all physical host residue storage resource rates in the pond of source, or even in some cases, higher residue
Storage resource rate can ensure that the remaining storage resource rate for the physical host that final choice goes out is deposited higher than other physical host residues
Store up resource utilization.The mode of the high physical host of the preferential remaining storage resource rate of selection in this way, can be with each physics master of efficient balance
Machine residue storage resource rate, when the remaining storage resource rate of physical host in resource pool is below default first storage resource threshold value
When, then dynamic select residue storage resource rate is less than the physical host of default second storage resource threshold value, can preferentially select to remain
Balance stores up the low physical host of resource utilization, has preferentially utilized the few physical host of remaining storage resource broken to reduce storage resource
Piece.
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
Referring to Fig.1, a kind of flow chart of physical host selection method provided in an embodiment of the present invention, this method tool are shown
Body includes the following steps:
S110 receives container request to create, and the container request to create includes containers size.
Container technique is a kind of server resource sharing mode being widely recognized as by everybody, and container technique can be in on-demand structure
It builds in the process of container technique operation system example and provides great flexibility for system manager, while can be at same
The virtual machine instance quantity compared to twice before is created on server, therefore container technique will reduce system and always put into.
When user creates cloud database by client cloud management console, it usually needs first specify for starting cloud data
The specification of the container in library, the i.e. size of the memory of specified containers and disk.The memory size of specific container can have 512M,
1G, 2G, 4G etc. are selected for user, and disk size can have 10G, 30G, 50G, 100G etc. to be selected for user, simultaneously to this present invention
It does not limit.Containers size is can be increased during user's use, in this way when a certain user starts in use
When specified containers size is not enough, increase-volume can be carried out according to self-demand.
User can wish to pass through cloud according to the demand of oneself come the specification of specified containers, such as user in a particular application
Database purchase is mainly used to store video, the data such as picture, then its container that a disk can be specified big, such as memory
512M, disk 100G;And user wishes that when running some program codes, software, then one can be specified by cloud database
The big container of memory, such as memory 2G, disk 10G.This present invention is not limited.
The embodiment of the present invention can also provide different containers sizes, such as high-grade user ratio for different users
The containers size that the user of inferior grade can select is big, the container that the high user of the liveness user lower than liveness can select
Specification is big, is not limited to this present invention.
The embodiment of the present invention can while meeting the needs of different users by providing the container of different size to the user
It is more reasonably utilized storage resource, is reduced after a certain user specifies the container of one big specification and is not often used but and cause
The case where storage resource wastes.
S120 selects remaining storage resource to be more than the physical host of the containers size, and by the mark of the physical host
Know in storage to resource pool.
After server receives the containers size that user specifies, remaining storage resource is selected first according to containers size
It is the physical host that remaining storage resource can create container more than the physical host of containers size, then by the physical host
To in resource pool, resource pool is more than the same of the mark of the physical host of containers size in the remaining storage resource of record for mark storage
When, each physical host storage resource service condition can also be recorded further to select qualified physical host.
In in a kind of realization method, server can be that each physical host distribute different marks, and resource pool is remaining
Storage resource is more than the set that the physical host of containers size to be created identifies, and can be stored in service in the form of a list
In device, the case where can also recording each physical host residue storage resource rate, may include total storage of each physical host
Resource size and the size for having used storage resource.For example, wherein a certain physical host storage resource utilization power can record
For:Physical host is identified as 001, and total storage resource 1000G, remaining storage resource 850G, remaining storage resource rate are 85%.Base
Enable to server that can quickly understand each physics master in resource pool during subsequent selection physical host in this
The storage resource service condition of machine, accelerates the selection course of physical host.
S130 selects in the physical host corresponding to mark in the resource pool remaining storage resource rate not less than pre-
If the physical host of the first storage resource threshold value.
Storage resource threshold value refers to the ratio of pre-set remaining storage resource and physical host total resources.Such as certain object
The total storage resource for managing host is 200G, and remaining storage resource is 180G, and remaining storage resource rate is 90%.When the first of setting
When storage resource threshold value is 70%, then the physical host residue storage resource rate is 90% in subsequent selection course, greatly
In 70%, then show that the physical host meets the condition of setting.
Understandable is that total storage resource of each physical host in resource pool is different, and the present invention passes through setting the
One storage resource threshold value, even when total storage resource of each physical host corresponding to mark in resource pool is different, but
It is that the remaining storage resource rate of each physical host changes between 0%-100%, by the way that phase is arranged for physical host
With the first storage resource threshold value selected with this, avoid and selected only by the size of remaining storage resource
When, in the case of there is the physical host residue storage resource selected more than other physical hosts, and the physical host is surplus
Balance stores up the resource utilization problem low compared to other physical hosts, that is, the physical host selected is more compared to other physical hosts
Close to saturation state, i.e., the ratio for accounting for total storage resource with storage resource is more nearly 100%.
It is now illustrated for convenience of understanding, the mark in resource pool is corresponding with two physical hosts, wherein No.1 object
Reason host residue storage resource is 70G, and total storage resource is 100G;No. two physical host residue storage resources are 100G, are always deposited
Storage resource is 500G, can select No. two physical hosts if the physical host more than the remaining storage resource of selection, but the physics
Host residue storage resource rate is 20%, although and the remaining storage resource of No.1 physical host is 70G few compared to 100G, one
Number physical host residue storage resource rate is 70%, it is clear that No. two physical hosts compared to the more adjunction of No.1 physical host
Nearly saturation state, if that container can be then created to the low physical host of remaining storage resource rate by No. two physical hosts of selection
On, it can not achieve the purpose that the remaining storage resource rate between balanced each physical host.
In a kind of realization method, the first storage resource threshold value can select qualified physical host from resource pool
During dynamic regulation.Preset first storage resource threshold value can first be set as 70%, search whether there is remaining storage
Resource utilization is not less than 70% physical host, and if so, showing the physical host residue storage resource rate found compared to money
Other physical host residue storage resources rates are horizontal high in the pond of source, if there is no can then reduce the first storage resource threshold value
Continue to search for 60%, and so on until find qualified physical host.
In above-mentioned search procedure, the physical host that remaining storage resource rate is not less than default first storage resource threshold value can
Can only one, it is stored then the remaining storage resource rate for the physical host that final choice goes out then is higher than other physical host residues
Resource utilization.
In a kind of realization method, default first storage resource threshold value can also be not less than select remaining storage resource rate
Physical host after, continue to select the remaining highest physical host of storage resource rate in qualified physical host.
In a kind of realization method, in the case of no qualified physical host, it can also subtract in search procedure
Few residue storage resource rate reduces amplitude, for example, only reduce 1% every time, makes physical host that final choice goes out with this
Remaining storage resource rate is then higher than the remaining storage resource rate of other physical hosts.
Based on said program, then show the physical host residue storage resource after selecting qualified physical host
One higher level of rate remaining storage resource rate of all physical hosts in resource pool, it is in some cases, higher
Remaining storage resource rate can ensure that the remaining storage resource rate for the physical host that final choice goes out is surplus higher than other physical hosts
Balance stores up resource utilization.The mode of the high physical host of the preferential remaining storage resource rate of selection in this way, can be with each object of efficient balance
Manage host residue storage resource rate.
The first storage resource threshold value is preset in a kind of realization method can also be by counting corresponding to the mark in resource pool
Physical host average residual storage resource rate come the value that determines, for example, the physical host corresponding to mark in resource pool
Average residual storage resource rate be 50%, then can set the first storage resource threshold value be 60%, i.e., setting one be more than
The value of average residual storage resource rate is provided with this to select remaining storage in the physical host corresponding to the mark in resource pool
Source rate is compared to the horizontal high physical host of other physical hosts.
In one embodiment of the present invention, in the case that S130 is judged as NO, i.e., corresponding to the mark in resource pool
The remaining storage resource rate of physical host when being less than default first storage resource threshold value, then execute S140:
Remaining storage resource rate is selected to be less than default second in the physical host corresponding to mark in the resource pool
The physical host of storage resource threshold value.
In actual application, when the remaining storage resource of certain physical host is not enough to create the container of big specification
(such as disk 1000G) then the physical host may be idle and cause storage resource fragmentation.
In a kind of realization method, the minimum value of a first storage resource threshold value can be set, i.e., in the mistake of dynamic regulation
There are no qualified physical host when the first storage resource threshold value is reduced to the minimum value of setting in journey, then resource pool is judged
In mark corresponding to the remaining storage resource rate of physical host be less than default first storage resource threshold value, correspondingly in resource
Remaining storage resource rate is selected to be less than the physics of default second storage resource threshold value in the physical host corresponding to mark in pond
Host.Wherein, the second storage resource threshold value can also be moved during selecting qualified physical host from resource pool
State is adjusted.For example, it is 5% that the second storage resource threshold value, which can first be arranged, the physics master that remaining storage resource rate is less than 5% is searched
Machine.Based on this, the horizontal low physical host of physical host residue storage resource rate corresponding to the preferential mark selected in resource pool,
It is preferential that the remaining storage resource rate of the physical host corresponding to mark in resource pool is less than default first storage resource threshold value
The storage resource of the few physical host of remaining storage resource is utilized, prioritized resources are concentrated, and storage resource fragmentation is prevented.
For convenience of understanding, the object that a preferred embodiment meets above-mentioned selection default storage resource threshold value is set forth below
The process of reason host is described:
Container request to create is received, the container request to create includes containers size.
User is the specification for needing first specified containers creating cloud database by cloud management platform, and containers size can be
Memory 1G, disk 10G.After user has specified the specification of container, containers size information is sent to server.
The remaining storage resource of selection is more than the physical host of the containers size, and the mark of the physical host is put into
In resource pool.
After server receives the containers size information of user's transmission, remaining storage resource rate is selected first and is more than institute
Containers size is stated, i.e., remaining storage resource can create the physical host of container, then by the mark for the physical host selected
It is put into resource pool and records the storage resource utilization power of each physical host.
Select remaining storage resource rate not less than default the in the physical host corresponding to mark in the resource pool
The physical host of one storage resource threshold value.
The initial value of server settings the first storage resource threshold value is 60%, searches whether that there are residues to deposit in resource pool
Store up resource utilization be not less than 60% physical host, if there is complete select, if there is no then, reduce the first storage resource threshold
Value be 50%, search whether that there are qualified physical hosts, continue if not reduce the first storage resource threshold value until
30%, search whether there is physics master of the remaining storage resource rate not less than the default first storage resource threshold value after changing successively
Machine.
The remaining storage resource rate of physical host corresponding to the mark in resource pool is below default first storage money
Remaining storage resource rate is selected to be less than default second when the threshold value of source, in the physical host corresponding to mark in the resource pool
The physical host of storage resource threshold value.
If preset first storage resource threshold value is reduced to 30%, still without qualified physical host, then recognize
It is not much different for the remaining storage resource rate of the physical host corresponding to the mark in resource pool, then selects remaining storage resource rate
Less than the physical host of default second storage resource threshold value.
Second storage resource threshold value of server settings is 5%, searches whether there is remaining storage resource in resource pool
Rate is less than 5% physical host, and if so, completing selection, is if there is no the second storage resource threshold value is then increased
10%, what is continued to search for whether there is qualified physical host, if it is straight otherwise to continue growing the second storage resource threshold value
To 30%, the physical host that remaining storage resource rate is less than default second storage resource threshold value is searched.
The embodiment of the present invention is when selecting physical host to create container, the physical host corresponding to mark in resource pool
In, dynamic select residue storage resource rate is not less than the physical host of default first storage resource threshold value, is based on this skill of the present invention
The remaining storage resource rate for the physical host that art scheme final choice goes out is the physics master corresponding to the mark that is in resource pool
One higher level of machine residue storage resource rate.The remaining high physical host of storage resource rate of selection preferential in this way
Mode, can be with each physical host residue storage resource rate of efficient balance, and works as and identify corresponding physical host in resource pool
Remaining storage resource rate when being below default first storage resource threshold value, then dynamic select residue storage resource rate is less than default
The physical host of second storage resource threshold value, the physical host that can preferentially select remaining storage resource rate low, preferentially will be remaining
The few physical host of storage resource has been utilized to reduce storage resource fragmentation.
In a kind of realization method of the embodiment of the present invention, physical host selection method of the present invention can also include:
According to the performance parameter of each physical host selected a weights are distributed for the physical host each selected.
Weights are an opposite concepts, and for a certain performance parameter, the weights of a certain performance parameter refer to the property
Relative importance of the energy parameter in the overall evaluation, in practical applications for the computer of different purposes, to different portions
The performance indicator of part requires different.Such as:For as the computer based on scientific algorithm, to the arithmetic speed of host
It is required that very high;For the computer based on being handled as large database, to the memory size, access speed and external memory of host
The read or write speed of reservoir is more demanding;For the computer as network transmission, then require have very high I/O speed, therefore answer
When the I/O buses and corresponding I/O interfaces for having high speed.Weights are that weight is separated from several performance parameters, can be directed to
The height of the performance parameter of each physical host performance distributes weights for each physical host.The performance of physical host performance is joined
Number is higher to give the weights matched higher.
In a kind of realization method, in all users that cloud database service can have been used by statistics in the present invention
Usage behavior determines the weights of a certain performance parameter.For example, running program by cloud database when counting in all users
Code, application software user compared with using other functions user it is more when, then show user to physical host arithmetic speed demand
Relative to other performance parameters height, it is determined that the weights of physical host arithmetic speed performance parameter are higher than other performance parameters
Weights;And when the user stored using cloud database in all users counted is more compared with using the user of other functions
When, then show user to physical host storage resource demands relative to other performance parameters height, it is determined that physical host storage money
The weights of source volumetric properties parameter are higher than the weights of other performance parameters.
Wherein performance parameter may include:Physical host arithmetic speed, physical host memory size, network interface card communication speed.
Physical host arithmetic speed refers to the instruction number that physical host can execute each second, generally with can execute hundred per second
Ten thousand instruct numbers to weigh, and unit is million instructions per second.The principal element for influencing physical host arithmetic speed is centre
Manage the storage cycle of the dominant frequency and memory of device.
The storage resource capacity of physical host refers to the size of physical host hard-disk capacity.The capacity of hard disk with Mbytes
(MB) or gigabytes (GB) is unit, 1GB=1024MB, 1TB=1024GB.The capacity performance index of hard disk further includes the list of hard disk
Dish capacity.So-called single dish capacity refers to the capacity of hard disk individual discs, and single dish capacity is bigger, and unit cost is lower, average access
Time is also shorter.
Network interface card communication speed refers to the ability of network interface card reception each second or transmission data, and unit is Mbps (megabit per second).Net
The ability of higher reception each second of card communication speed or transmission data is stronger.
Select the physical host of the maximum weight.
The the weights of the physical host of selection the big, indicates that the comprehensive performance of the physical host of selection is better, is stored in residue
The maximum physical host of preoption value among the qualified physical host of resource utilization, so as to by high performance physics
Chiller priority distributes to user, improves user experience.
In a kind of realization method physics can also be distributed for each user according to the difference for the containers size that user specifies
Host then illustrates that the user is not high to cloud database service demand, then when some user specifies the container of a minimum gauge
The physical host of weights minimum can be distributed to the user;Accordingly when some user specifies the container of a maximum specification
When the physical host of maximum weight can be distributed to the user.Based on this, the embodiment of the present invention can be directed to the demand of user
Difference distribute the physical host of different weights, the physical host of high weight can preferentially distribute to the big user of demand.
With reference to Fig. 2, show in the embodiment of the present invention to be that the physical host of each selection distributes the step flow of a weights
Figure, the step can specifically include:
S21, the significance level of every performance parameter of the physical host performance more each selected.
Significance level can be understood as user in practical applications, can be by obtaining institute to the degree of dependence of a certain performance
There is user's historical data to determine, can specifically see user often with which parameter, which is just important.Such as it is all
It is more compared with using the user of other functions using operation program in cloud database in user, then illustrate the performance of physical host performance
The significance level of physical host arithmetic speed this parameter in parameter is higher than the significance level of other performance parameters.It is all
When carrying out the behavior of the resources such as storage video, picture in user using cloud database compared with utilizing the user of other functions more, then say
The significance level of physical host storage resource capacity this parameter in bright physical host performance parameter is joined higher than other performances
Several significance levels.
S22 determines the significance level of the physical host each selected according to the significance level per performance parameter.
In a kind of embodiment, it is possible, firstly, to be every according to the size of each each performance parameter of the physical host selected
Each performance parameter of physical host of a selection distributes the value of significance level.The value of performance parameter is most in the physical host of selection
Big, significance level is set as maximum, then according to the value of the physical host performance parameter and maximum performance parameter of other selections
Ratio, to determine the significance level of every performance parameter.For example, it is 1000G that storage resource capacity is maximum in physical host,
It can determine that the significance level of the physical host storage resource capacity is 10, then the physical host of storage resource capacity 500G is deposited
The significance level for storing up resource capacity is 5, and the significance level of the physical host storage resource capacity of storage resource capacity 100G is 1.
It is then possible to according to user using the actual use situation of physical host performance come the performance parameter for physical host
Distribute a coefficient, user that certain performance parameter is actually used in all users is more at most that performance parameter distribution is
Number is bigger, for example it is 1000 people to use the total number of users of cloud database service, counts and carries out operation program using cloud database
The number of code be 500 people, using the resources such as cloud database purchase video, picture number be 300 people, using cloud database into
The number of row network data transmission is 200 people, and the utilization rate > of physical host arithmetic speed is then can be assumed that according to statistical result
The utilization rate of the utilization rate > network interface card communication speeds of physical host storage resource, can set the coefficient of physical host arithmetic speed
It is 0.5;The coefficient of physical host storage resource is 0.3;The coefficient of network interface card communication speed is 0.2.
The calculation formula of the significance level of the last physical host each selected can be expressed as physical host arithmetic speed
Significance level * 0.5+ physical host storage resources significance level * 0.3+ network interface card communication speeds network interface card communication speed weight
Want degree * 0.2.
Said program avoids the performance parameter of the value of a certain item performance parameter of physical host higher than other physical hosts
Value, but this performance parameter is not but that parameter that user is commonly used, and leads to the physical host distributed for user
And the problem of user actually uses situation is not met.
S23, using the significance level of the physical host each selected, for the physical host distribution each selected
One weights.
Higher the distributed weights of significance level of the physical host of selection are bigger.In a kind of realization method, for convenience
The weights for calculating the physical host that the significance level of the physical host of each selection can be used as to each selection, to this present invention
It does not limit.
Present invention determine that each select physical host weights the step of, consider each of the physical host of each selection
The practical utilization power of performance parameter and each performance parameter user, to determine the physical host different performance each selected ginseng
Several significance level and then distribute weights for the physical host each selected so that each of determine the physical host selected
Weights are more in line with the use habit of user.
It is described every according to the performance parameter of each physical host selected in the embodiment of the present invention in a kind of embodiment
The physical host of a selection, which distributes the step of weights, can also include specifically:
In the significance level of the first performance parameter in determining the performance parameter institute is removed higher than in the performance parameter
When stating the significance level of other performance parameters other than first performance parameter, it is according to the parameter value of the first performance parameter then
The physical host each selected distributes a weights.
The embodiment of the present invention can only consider a performance parameter to determine the physics master each selected to simplify operation
The significance level of machine.For example, relatively utilizing it when counting the user in all users using the program of operation in cloud database
His user of function is more, it is determined that the significance level of physical host arithmetic speed this parameter in performance parameter is higher than it
The significance level of his performance parameter, can be using physical host arithmetic speed as first performance parameter based on this, then basis
Physical host arithmetic speed determines the significance level of the physical host each selected, then further according to the physics master of each selection
The importance of machine is that the physical host each selected distributes a weights.
In a kind of realization method, the present invention can also provide cloud database work(when user specifies the container of different size
Energy options allows user's selection that cloud database is mainly used in storage resource and is also primarily used for the work(such as program code execution
Can, based on this server can according to user itself select come for user distribute physical host.I.e. when user selects main use
When storage resource, then for the user in physical host performance parameter physical host storage resource capacity important journey
Degree is higher than other performance parameters, then server only can be selected each according to physical host storage resource capacity to determine
The significance level of physical host, the then physical host further according to the significance level of each physical host selected each to select
Distribute a weights.
And when user's selection is mainly used for program code execution, then the physical host performance parameter for the user
The significance level of middle physical host arithmetic speed is higher than other performance parameters, then server can be transported only according to physical host
Speed is calculated to determine the significance level of the physical host each selected, then further according to the important journey of the physical host of each selection
Degree distributes a weights for the physical host each selected.Can be every according to the difference of user's self-demand based on this present invention
A user simplifies physical host during distributing physical host and selects step.
Physical host of embodiment of the present invention selection method is by selecting remaining storage resource rate to be more than containers size and described
The physical host that remaining storage resource rate is not less than default first storage resource threshold value carrys out balanced each physical host residue storage
Resource utilization;When the remaining storage resource rate of physical host in resource pool is below default first storage resource threshold value, selection is surplus
Balance stores up the physical host that resource utilization is less than default second storage resource threshold value, can preferentially select remaining storage resource rate few
Physical host is to reduce storage resource fragmentation;The maximum physical host of weights is finally selected in the physical host of selection,
High performance physical host is preferentially distributed into user, improves user experience.
Corresponding to above method embodiment, the embodiment of the present invention additionally provides a kind of physical host selection device, such as Fig. 3
Shown, a kind of structural schematic diagram of physical host selection device during the embodiment of the present invention provides, which includes:
Receiving module 300, for receiving container request to create, the container request to create includes containers size.
First choice module 310 selects remaining storage resource to be more than the physical host of the containers size, and by the object
In the mark storage to resource pool for managing host.
Second selection 320, for selecting remaining storage money in the physical host corresponding to the mark in the resource pool
Source rate is not less than the physical host of default first storage resource threshold value.
The remaining storage resource rate of the physical host corresponding to mark in the resource pool is less than default first storage money
When the threshold value of source, the second selecting module 320 is specifically additionally operable to,
Remaining storage resource rate is selected to be less than default second in the physical host corresponding to mark in the resource pool
The physical host of storage resource threshold value.
Physical host of embodiment of the present invention selection device can choose remaining storage resource rate not less than default first storage
The physical host of resource threshold, also, during actual selection qualified physical host, preset the first storage resource
Threshold value can carry out dynamic regulation as needed, can ensure that the residue for the physical host that final choice goes out is deposited based on said program
Storage resource utilization is to be in a higher level of all physical host residue storage resource rates in resource pool, or even in some feelings
Under condition, higher residue storage resource rate can ensure that the remaining storage resource rate for the physical host that final choice goes out is higher than other
Physical host residue storage resource rate.The mode of the high physical host of the preferential remaining storage resource rate of selection in this way, can be effective
Balanced each physical host residue storage resource rate.When the remaining storage resource rate for identifying corresponding physical host in resource pool
When being below default first storage resource threshold value, then dynamic select residue storage resource rate is less than default second storage resource threshold value
Physical host, can prioritized resources concentrate, prevent from being idle when a certain physical host residue storage resource rate is too small,
Reduce resource fragmentation.
In a kind of embodiment in the embodiment of the present invention, physical host selection device of the present invention further includes:
Weights distribution module, for each being selected according to the performance parameter of physical host performance each selected is described
Physical host distributes a weights;
Wherein, performance parameter includes:Physical host arithmetic speed, physical host memory size, network interface card communication speed.
Third selecting module, the physical host for selecting the maximum weight.
The maximum physical host of weights is selected, so as to which high performance physical host is preferentially distributed to user, is improved
User experience.
In a kind of embodiment in the embodiment of the present invention, weights distribution module has in physical host selection device of the present invention
Body can be used for,
The significance level of every performance parameter of the physical host more each selected;
According to the significance level per performance parameter, the significance level of the physical host each selected is determined;
Using the significance level of the physical host each selected, for one power of physical host distribution each selected
Value.
In a kind of embodiment in the embodiment of the present invention, weights distribution module has in physical host selection device of the present invention
Body can be also used for,
In the significance level of the first performance parameter in determining the performance parameter institute is removed higher than in the performance parameter
When stating the significance level of other performance parameters other than first performance parameter, it is according to the parameter value of the first performance parameter then
The physical host each selected distributes a weights.
Physical host of embodiment of the present invention selection device is by selecting remaining storage resource rate not less than default first storage
The physical host of resource threshold carrys out balanced each physical host residue storage resource rate;When alternative resource mediocre person manages the surplus of host
When balance storage resource utilization is below default first storage resource threshold value, remaining storage resource rate is selected to be less than default second storage money
The physical host of source threshold value, the physical host that can preferentially select remaining storage resource rate less is to reduce storage resource fragment
Change;Finally select the maximum physical host of weights that high performance physical host is preferentially distributed to use in the physical host of selection
User experience is improved at family.
The embodiment of the present invention additionally provides a kind of electronic equipment, as shown in figure 4, including processor 001, machine readable storage
Medium 002;
Machine readable storage medium 002, for storing the machine-executable instruction that can be executed by the processor;
Processor 001 when for executing the instruction stored on machine readable storage medium 002, realizes that the present invention is implemented
Physical host selection method described in example.
Specifically, above-mentioned physical host selection method, including:
Container request to create is received, the container request to create includes containers size;
The remaining storage resource of selection is more than the physical host of the containers size, and the mark of the physical host is stored
Into resource pool;
Select remaining storage resource rate not less than default the in the physical host corresponding to mark in the resource pool
The physical host of one storage resource threshold value;
The remaining storage resource rate of physical host corresponding to the mark in the resource pool is below default first and deposits
When storing up resource threshold,
Remaining storage resource rate is selected to be less than default second in the physical host corresponding to mark in the resource pool
The physical host of storage resource threshold value.
It should be noted that above by the object for executing the program stored on machine readable storage medium 002 and realizing
Manage each reality of the other embodiment and the physical host selection method described in preceding method embodiment part of Selection of chiller method
It is identical to apply example, details are not described herein.
Electronic equipment of the embodiment of the present invention can choose remaining storage resource rate and be not less than default first storage resource threshold value
Physical host, also, during actual selection qualified physical host, presetting the first storage resource threshold value can be with
Dynamic regulation is carried out as needed, can ensure the remaining storage resource rate for the physical host that final choice goes out based on said program
It is to be in a higher level of all physical host residue storage resource rates in resource pool, or even in some cases, compared with
High remaining storage resource rate can ensure that the remaining storage resource rate for the physical host that final choice goes out is higher than other physics master
Machine residue storage resource rate.The mode of the high physical host of the preferential remaining storage resource rate of selection in this way, can be each with efficient balance
A physical host residue storage resource rate.When the remaining storage resource rate for identifying corresponding physical host in resource pool is below
When default first storage resource threshold value, then dynamic select residue storage resource rate is less than the physics of default second storage resource threshold value
Host, can prioritized resources concentrate, prevent from be idle when a certain physical host residue storage resource rate is too small, reduce provide
Source fragmentation.
Above-mentioned electronic equipment is connected by communication bus, and communication bus can be Peripheral Component Interconnect standard
(Peripheral Component Interconnect, PCI) bus or expanding the industrial standard structure (Extended
Industry Standard Architecture, EISA) bus etc..It is total that the communication bus can be divided into address bus, data
Line, controlling bus etc..For ease of indicating, only indicated with a thick line in figure, it is not intended that an only bus or a type
The bus of type.
Communication interface is for the communication between above-mentioned scheduling of resource equipment and other equipment.
Machine readable storage medium may include random access memory (Random Access Memory, RAM), also may be used
To include nonvolatile memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally,
Memory can also be at least one storage device for being located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit,
CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal
Processing, DSP), it is application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing
It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete
Door or transistor logic, discrete hardware components.
In another embodiment provided by the invention, a kind of computer readable storage medium is provided, this is computer-readable
It is stored with computer program in storage medium, when the computer program is executed by processor, realizes described in the embodiment of the present invention
Physical host selection method.
Container request to create is received, the container request to create includes containers size;
The remaining storage resource of selection is more than the physical host of the containers size, and the mark of the physical host is stored
Into resource pool;
Select remaining storage resource rate not less than default the in the physical host corresponding to mark in the resource pool
The physical host of one storage resource threshold value;
The remaining storage resource rate of physical host corresponding to the mark in the resource pool is below default first and deposits
When storing up resource threshold,
Remaining storage resource rate is selected to be less than default second in the physical host corresponding to mark in the resource pool
The physical host of storage resource threshold value.
It should be noted that the physics master realized above by the program that execution computer readable storage medium is stored
Each embodiment of the other embodiment of machine selection method and the physical host selection method described in preceding method embodiment part
Identical, details are not described herein.
Computer readable storage medium of the embodiment of the present invention can choose remaining storage resource rate and be deposited not less than default first
The physical host of resource threshold is stored up, also, during actual selection qualified physical host, presets the first storage money
Source threshold value can carry out dynamic regulation as needed, can ensure the residue for the physical host that final choice goes out based on said program
Storage resource rate is to be in a higher level of all physical host residue storage resource rates in resource pool, or even at some
In the case of, higher residue storage resource rate can ensure that the remaining storage resource rate for the physical host that final choice goes out is higher than it
His physical host residue storage resource rate.The mode of the high physical host of the preferential remaining storage resource rate of selection in this way, Ke Yiyou
The balanced each physical host residue storage resource rate of effect.When the remaining storage resource for identifying corresponding physical host in resource pool
When rate is below default first storage resource threshold value, then dynamic select residue storage resource rate is less than default second storage resource threshold
The physical host of value, can prioritized resources concentrate, prevent not busy when a certain physical host residue storage resource rate is too small
It sets, reduces resource fragmentation.
In another embodiment provided by the invention, provide it is a kind of comprising instruction computer program product, when its
When being run on computer so that computer realizes the physical host selection method described in the embodiment of the present invention.
Specifically, above-mentioned physical host selection method, including:
Container request to create is received, the container request to create includes containers size;
The remaining storage resource of selection is more than the physical host of the containers size, and the mark of the physical host is stored
Into resource pool;
Select remaining storage resource rate not less than default the in the physical host corresponding to mark in the resource pool
The physical host of one storage resource threshold value;
The remaining storage resource rate of physical host corresponding to the mark in the resource pool is below default first and deposits
When storing up resource threshold,
Remaining storage resource rate is selected to be less than default second in the physical host corresponding to mark in the resource pool
The physical host of storage resource threshold value.
It should be noted that above by the instruction and the physical host choosing realized that computer program product is stored is executed
The other embodiment of selection method is identical as each embodiment of physical host selection method described in preceding method embodiment part,
Details are not described herein.
Computer program product of the embodiment of the present invention can choose remaining storage resource rate not less than default first storage money
The physical host of source threshold value, also, during actual selection qualified physical host, preset the first storage resource threshold
Value can carry out dynamic regulation as needed, can ensure the remaining storage for the physical host that final choice goes out based on said program
Resource utilization is to be in a higher level of all physical host residue storage resource rates in resource pool, or even in some cases
Under, higher residue storage resource rate can ensure that the remaining storage resource rate for the physical host that final choice goes out is higher than other objects
Manage host residue storage resource rate.The mode of the high physical host of the preferential remaining storage resource rate of selection in this way, can effectively
Weigh each physical host residue storage resource rate.When the remaining storage resource rate for identifying corresponding physical host in resource pool is equal
When less than default first storage resource threshold value, then dynamic select residue storage resource rate is less than default second storage resource threshold value
Physical host, can prioritized resources concentrate, prevent from being idle when a certain physical host residue storage resource rate is too small, subtract
Few resource fragmentation.
In further embodiment of this invention, a kind of computer program is provided, when run on a computer so that calculate
Machine realizes the physical host selection method described in the embodiment of the present invention.
Specifically, above-mentioned physical host selection method, including:
Container request to create is received, the container request to create includes containers size;
The remaining storage resource of selection is more than the physical host of the containers size, and the mark of the physical host is stored
Into resource pool;
Select remaining storage resource rate not less than default the in the physical host corresponding to mark in the resource pool
The physical host of one storage resource threshold value;
The remaining storage resource rate of physical host corresponding to the mark in the resource pool is below default first and deposits
When storing up resource threshold,
Remaining storage resource rate is selected to be less than default second in the physical host corresponding to mark in the resource pool
The physical host of storage resource threshold value.
It should be noted that other implementations for the physical host selection method realized by executing above computer program
Example is identical as each embodiment of physical host selection method described in preceding method embodiment part, and details are not described herein.
Computer program of the embodiment of the present invention can choose remaining storage resource rate and be not less than default first storage resource threshold
The physical host of value, also, during actual selection qualified physical host, presetting the first storage resource threshold value can
To carry out dynamic regulation as needed, it can ensure the remaining storage resource for the physical host that final choice goes out based on said program
Rate is to be in a higher level of all physical host residue storage resource rates in resource pool, or even in some cases,
Higher residue storage resource rate can ensure that the remaining storage resource rate for the physical host that final choice goes out is higher than other physics
Host residue storage resource rate.The mode of the high physical host of the preferential remaining storage resource rate of selection in this way, can be with efficient balance
Each physical host residue storage resource rate.When the remaining storage resource rate for identifying corresponding physical host in resource pool is low
When default first storage resource threshold value, then dynamic select residue storage resource rate is less than the object of default second storage resource threshold value
Manage host, can prioritized resources concentrate, prevent from be idle when a certain physical host residue storage resource rate is too small, reduction
Resource fragmentation.
It should be noted that herein, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also include other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, identical similar portion between each embodiment
Point just to refer each other, and each embodiment focuses on the differences from other embodiments.Especially for device,
For electronic equipment, computer readable storage medium, computer program product embodiments, implement since it is substantially similar to method
Example, so description is fairly simple, the relevent part can refer to the partial explaination of embodiments of method.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention
It is interior.
Claims (12)
1. a kind of physical host selection method, which is characterized in that including:
Container request to create is received, the container request to create includes containers size;
The remaining storage resource of selection is more than the physical host of the containers size, and the mark of the physical host is stored to money
In the pond of source;
Remaining storage resource rate is selected to be deposited not less than default first in the physical host corresponding to mark in the resource pool
Store up the physical host of resource threshold;
The remaining storage resource rate of physical host corresponding to the mark in the resource pool is below default first storage money
When the threshold value of source,
Remaining storage resource rate is selected to be less than default second storage in the physical host corresponding to mark in the resource pool
The physical host of resource threshold.
2. according to the method described in claim 1, it is characterized in that, the method further includes:
According to the performance parameter of each physical host selected a weights are distributed for the physical host each selected;
Select the physical host of the maximum weight.
3. according to the method described in claim 2, it is characterized in that, the performance parameter includes:Physical host arithmetic speed, object
Manage host memory capacity and network interface card communication speed.
4. according to the method described in claim 3, it is characterized in that, the performance parameter for the physical host that the basis each selects
A step of weights being distributed for the physical host each selected, including:
The significance level of every performance parameter of the physical host more each selected;
According to the significance level per performance parameter, the significance level of the physical host each selected is determined;
Using the significance level of the physical host each selected, a weights are distributed for the physical host each selected.
5. according to the method described in claim 3, it is characterized in that, the performance parameter for the physical host that the basis each selects
The step of distributing a weights for the physical host that each selects further include:
The first performance parameter in determining the performance parameter significance level higher than in the performance parameter except described the
Then it is each according to the parameter value of the first performance parameter when significance level of other performance parameters other than one performance parameter
The physical host of selection distributes a weights.
6. a kind of physical host selection device, which is characterized in that including:
Receiving module, for receiving container request to create, the container request to create includes containers size;
First choice module selects remaining storage resource to be more than the physical host of the containers size, and by the physical host
Mark storage in resource pool;
Second selecting module, not for the remaining storage resource rate of physical host selection corresponding to the mark in the resource pool
Less than the physical host of default first storage resource threshold value;
The remaining storage resource rate of physical host corresponding to the mark in the resource pool is below default first storage money
When the threshold value of source, second selecting module is additionally operable to,
Remaining storage resource rate is selected to be less than default second storage in the physical host corresponding to mark in the resource pool
The physical host of resource threshold.
7. device according to claim 6, which is characterized in that described device further includes:
Weights distribution module, for being the physical host each selected according to the performance parameter of the physical host each selected
Distribute a weights;
Third selecting module, the physical host for selecting the maximum weight.
8. device according to claim 7, which is characterized in that the performance parameter includes:Physical host arithmetic speed, object
Manage host memory capacity and network interface card communication speed.
9. device according to claim 8, which is characterized in that the weights distribution module is used for, and is more each selected
The significance level of every performance parameter of physical host;
According to the significance level per performance parameter, the significance level of the physical host each selected is determined;
Using the significance level of the physical host each selected, a weights are distributed for the physical host each selected.
10. device according to claim 8, which is characterized in that the weights distribution module is additionally operable to,
The first performance parameter in determining the performance parameter significance level higher than in the performance parameter except described the
Then it is each according to the parameter value of the first performance parameter when significance level of other performance parameters other than one performance parameter
The physical host of selection distributes a weights.
11. a kind of electronic equipment, which is characterized in that including processor and machine readable storage medium, the machine readable storage
Media storage has the machine-executable instruction that can be executed by the processor, and the processor is by the machine-executable instruction
Promote:Realize any method and step of claim 1~6.
12. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium
Program when the computer program is executed by processor, realizes claim 1~6 any one of them method and step.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710874682.2A CN108572868A (en) | 2017-09-25 | 2017-09-25 | A kind of physical host selection method, device, equipment and readable storage medium storing program for executing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710874682.2A CN108572868A (en) | 2017-09-25 | 2017-09-25 | A kind of physical host selection method, device, equipment and readable storage medium storing program for executing |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108572868A true CN108572868A (en) | 2018-09-25 |
Family
ID=63576514
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710874682.2A Pending CN108572868A (en) | 2017-09-25 | 2017-09-25 | A kind of physical host selection method, device, equipment and readable storage medium storing program for executing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108572868A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109639791A (en) * | 2018-12-06 | 2019-04-16 | 广东石油化工学院 | Cloud workflow schedule method and system under a kind of container environment |
CN113741793A (en) * | 2020-05-29 | 2021-12-03 | 华为技术有限公司 | Method, device and system for reporting storage resources |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101071386A (en) * | 2006-05-12 | 2007-11-14 | 上海惠普有限公司 | Frame space distributing method and device |
CN104598316A (en) * | 2014-12-25 | 2015-05-06 | 华为技术有限公司 | Storage resource distribution method and device |
CN106095533A (en) * | 2016-06-14 | 2016-11-09 | 中国联合网络通信集团有限公司 | Method of server expansion and device |
CN106125888A (en) * | 2016-06-23 | 2016-11-16 | 河海大学常州校区 | The efficient power-economizing method of the utilization of resources based on virtual machine (vm) migration in cloud data center |
CN106502765A (en) * | 2016-11-07 | 2017-03-15 | 中南大学 | A kind of virtual machine placement method suitable for cloud data center |
CN106874116A (en) * | 2017-02-14 | 2017-06-20 | 郑州云海信息技术有限公司 | A kind of server selection method and device for placing newly-built virtual machine |
CN106909462A (en) * | 2017-02-27 | 2017-06-30 | 郑州云海信息技术有限公司 | A kind of cloud resource regulating method and device |
-
2017
- 2017-09-25 CN CN201710874682.2A patent/CN108572868A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101071386A (en) * | 2006-05-12 | 2007-11-14 | 上海惠普有限公司 | Frame space distributing method and device |
CN104598316A (en) * | 2014-12-25 | 2015-05-06 | 华为技术有限公司 | Storage resource distribution method and device |
CN106095533A (en) * | 2016-06-14 | 2016-11-09 | 中国联合网络通信集团有限公司 | Method of server expansion and device |
CN106125888A (en) * | 2016-06-23 | 2016-11-16 | 河海大学常州校区 | The efficient power-economizing method of the utilization of resources based on virtual machine (vm) migration in cloud data center |
CN106502765A (en) * | 2016-11-07 | 2017-03-15 | 中南大学 | A kind of virtual machine placement method suitable for cloud data center |
CN106874116A (en) * | 2017-02-14 | 2017-06-20 | 郑州云海信息技术有限公司 | A kind of server selection method and device for placing newly-built virtual machine |
CN106909462A (en) * | 2017-02-27 | 2017-06-30 | 郑州云海信息技术有限公司 | A kind of cloud resource regulating method and device |
Non-Patent Citations (1)
Title |
---|
SUNIL RAO K , ET AL.,: "Heuristics based server consolidation with residual resource defragmentation in cloud data centers", 《FUTURE GENERATION COMPUTER SYSTEMS》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109639791A (en) * | 2018-12-06 | 2019-04-16 | 广东石油化工学院 | Cloud workflow schedule method and system under a kind of container environment |
CN113741793A (en) * | 2020-05-29 | 2021-12-03 | 华为技术有限公司 | Method, device and system for reporting storage resources |
CN113741793B (en) * | 2020-05-29 | 2024-04-09 | 华为技术有限公司 | Method, device and system for reporting storage resources |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9866450B2 (en) | Methods and apparatus related to management of unit-based virtual resources within a data center environment | |
EP2888676B1 (en) | Client placement in a computer network system using dynamic weight assignments on resource utilization metrics | |
CN105516347B (en) | A kind of method and device of the load balancing allotment of streaming media server | |
CN106162233A (en) | Code check recommends method and device | |
US10366110B2 (en) | Load balancing for multi-tiered querying | |
CN110018799A (en) | A kind of main determining method, apparatus of storage pool PG, equipment and readable storage medium storing program for executing | |
CN108628769A (en) | A kind of cache allocation method and equipment | |
CN108572868A (en) | A kind of physical host selection method, device, equipment and readable storage medium storing program for executing | |
CN110321215A (en) | Queue control method and device | |
CN111045808A (en) | Distributed network task scheduling method and device | |
CN109669775A (en) | Distributed task dispatching method, system and storage medium | |
CN103366088A (en) | Method and device for improving game quality through intelligent matching | |
US9712580B2 (en) | Pipelining for parallel network connections to transmit a digital content stream | |
CN109815037A (en) | Slow disk detection method and storage array | |
CN109684080A (en) | Centralized method for scheduling task, system and storage medium | |
CN109144706A (en) | A kind of dynamic allocation method of cpu resource, device and physical machine | |
CN108572869A (en) | A kind of physical host selection method, device, equipment and readable storage medium storing program for executing | |
US20180246763A1 (en) | Computer system management method and computer system | |
CN108551585A (en) | A kind of barrage method of calibration, device, server and medium | |
CN105242955B (en) | A kind of magnetic disk of virtual machine input/output scheduling method and system | |
US20150363118A1 (en) | Techniques for harmonic-resistant file striping | |
US20020077791A1 (en) | Method and apparatus for computing data storage assignments | |
CN107026897A (en) | A kind of methods, devices and systems of data processing | |
CN111966918B (en) | Current limiting method, device and system for concurrent access request | |
CN108769107A (en) | A kind of video dispatching method, device and electronic equipment |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180925 |