CN106959894A - Resource allocation methods and device - Google Patents
Resource allocation methods and device Download PDFInfo
- Publication number
- CN106959894A CN106959894A CN201610016268.3A CN201610016268A CN106959894A CN 106959894 A CN106959894 A CN 106959894A CN 201610016268 A CN201610016268 A CN 201610016268A CN 106959894 A CN106959894 A CN 106959894A
- Authority
- CN
- China
- Prior art keywords
- parameter
- server
- server cluster
- resource allocation
- utilization 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.)
- Granted
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/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
Abstract
This application discloses resource allocation methods and device.One embodiment of this method includes:Receive resource allocation request, the applications parameter of quantity of the resource allocation request comprising the server for indicating server cluster application;The utilization rate parameter of the hardware resource of each server cluster is obtained respectively;Based on applications parameter and the corresponding fraction parameter of utilization rate parameter, the quantity of the server to be allocated to each server cluster is determined, and the server for the quantity determined is respectively allocated to each server cluster.Realize during to server cluster distribution server, the number of servers of server cluster application is combined with the actual conditions of the hardware resource of server cluster, it is determined that distributing to the quantity of the server of server cluster.On the one hand, the flexibility to server cluster distribution server is enhanced, another side improves the accuracy of distribution.
Description
Technical field
The application is related to computer realm, and in particular to big data processing technology field, especially relates to
And resource allocation methods and device.
Background technology
Data Mart is the storage scheme being widely used in big data treatment technology.Can profit
Mass historical data is stored with Data Mart, to analyze historical data.As needs are deposited
The increases of the data of storage to Data Mart, it is necessary to carry out dilatation, accordingly, it is desirable to operation number
According to the server cluster distribution server in fairground, to ensure that server cluster has enough resources
Run the Data Mart after dilatation.At present, the method for salary distribution generally used for:According to conventional
The quantity of the server of each server cluster is distributed to, prediction is currently assigned to each server
The quantity of the server of cluster.
The shortcoming of prior art is shown:On the one hand, it is impossible to which each service is distributed in adjustment in real time
The quantity of the server of device cluster, causes flexibility poor.On the other hand, only examined in distribution
The quantity for the server for distributing to each server cluster in the past is considered, without considering that each takes
The actually used situation of the hardware resource for the server being engaged in device cluster, causes the accuracy rate of distribution
It is relatively low.
The content of the invention
This application provides resource allocation methods and device, for solving above-mentioned background section
The technical problem of presence.
In a first aspect, this application provides resource allocation methods, this method includes:Receive resource
Distribution request, resource allocation request is generated based on the Data Mart dilatation run on server cluster,
The applications ginseng of quantity of the resource allocation request comprising the server for indicating server cluster application
Number;The utilization rate parameter of the hardware resource of each server cluster, utilization rate ginseng are obtained respectively
Count the hardware resource used for server cluster and distribute to the hardware resource of server cluster
Ratio;Based on applications parameter and the corresponding fraction parameter of utilization rate parameter, determine it is to be allocated to
The quantity of the server of each server cluster, and the server for the quantity determined is divided
Each server cluster is not distributed to, and fraction parameter indicates that server cluster needs to be assigned to newly
Server to run the urgency level of the Data Mart after dilatation.
Second aspect, this application provides resource allocation device, the device includes:Receiving unit,
It is configured to receive resource allocation request, resource allocation request is based on running on server cluster
Data Mart dilatation is generated, and resource allocation request includes the server for indicating server cluster application
Quantity applications parameter;Acquiring unit, is configured to obtain each server set respectively
The utilization rate parameter of the hardware resource of group, the hardware money that utilization rate parameter uses for server cluster
The ratio of hardware resource of the source with having distributed to server cluster;Determining unit, is configured to base
In applications parameter and the corresponding fraction parameter of utilization rate parameter, determine it is to be allocated to each clothes
The quantity of the server of business device cluster, and the server for the quantity determined is respectively allocated to
Each server cluster, fraction parameter indicates that server cluster needs to be assigned to new server
To run the urgency level of the Data Mart after dilatation.
Resource allocation methods and device that the application is provided, by receiving resource allocation request, money
The applications parameter of quantity of the source distribution request comprising the server for indicating server cluster application;
The utilization rate parameter of the hardware resource of each server cluster is obtained respectively;Based on applications ginseng
The corresponding with utilization rate parameter fraction parameters of number, are determined to be allocated to each server cluster
The quantity of server, and the server for the quantity determined is respectively allocated to each service
Device cluster.Realize during to server cluster distribution server, by server cluster
The number of servers of application is combined with the actual conditions of the hardware resource of server cluster, it is determined that
Distribute to the quantity of the server of server cluster.On the one hand, enhance to server cluster point
Flexibility with server, another side improves the accuracy of distribution.
Brief description of the drawings
Retouched by reading with reference to the detailed of being made to non-limiting example of being made of the following drawings
State, other features, objects and advantages will become more apparent upon:
Fig. 1 is that the application can apply to exemplary system architecture figure therein;
Fig. 2 shows the flow chart of one embodiment of the resource allocation methods according to the application;
Fig. 3 shows the schematic diagram of resource allocation rule;
Fig. 4 shows the schematic diagram of fraction parameter;
Fig. 5 shows an exemplary architecture figure of the resource allocation methods suitable for the application;
Fig. 6 shows an exemplary process diagram of the resource allocation methods of the application;
Fig. 7 shows the structural representation of one embodiment of the resource allocation device according to the application
Figure;
Fig. 8 is adapted for for realizing the terminal device of the embodiment of the present application or the computer of server
The structural representation of system.
Embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is appreciated that
, specific embodiment described herein is used only for explaining related invention, rather than to the hair
Bright restriction.It also should be noted that, illustrate only for the ease of description, in accompanying drawing with
About the related part of invention.
It should be noted that in the case where not conflicting, embodiment and embodiment in the application
In feature can be mutually combined.Describe this in detail below with reference to the accompanying drawings and in conjunction with the embodiments
Application.
Fig. 1 shows the reality of the resource allocation methods or resource allocation device that can apply the application
Apply the exemplary system architecture 100 of example.
As shown in figure 1, system architecture 100 includes server cluster 101,102,103, net
Network 104 and central server 105.Network 104 is used in server cluster 101,102,103
The medium of transmission link is provided between central server 105.Network 104 can include various
Connection type, such as wired, wireless transmission link or fiber optic cables etc..Server cluster
101st, 102, the 103 different types of Data Mart of operation.Central server 105 can be used for
For each server cluster distribution server, to ensure that server cluster 101,102,103 has
Data Mart after enough resource operation dilatations.
It should be understood that the number of the terminal device, network and server in Fig. 1 is only signal
Property.According to needs are realized, can have any number of terminal device, network and server.
Fig. 2 is refer to, it illustrates one embodiment of the resource allocation methods according to the application
Flow 200.It should be noted that the resource allocation methods one that the embodiment of the present application is provided
As performed by the central server 105 in Fig. 1, correspondingly, resource allocation device is typically set
In central server 105.This method comprises the following steps:
Step 201, resource allocation request is received.
In the present embodiment, resource allocation request is based on the Data Mart run on server cluster
Dilatation is generated, and resource allocation request (can also claim comprising the server for indicating server cluster application
Be machine resources) quantity applications parameter.In the present embodiment, each server set
Group can run different types of Data Mart.When operating in the Data Mart on server cluster
When carrying out dilatation, i.e., during data increase in Data Mart, the server set in service data fairground
Group then needs more servers to run the Data Mart after dilatation.At this point it is possible to generate money
Source distribution request asks to distribute new server for it.In addition, in the present embodiment, may be used also
To use active mode to each server cluster distribution server, i.e., at interval of preset time period,
To each server cluster distribution server, correspondingly, each server can be obtained first
Applications parameter, this application amount parameter can in advance be carried out by the O&M engineer of server cluster
Set.
Step 202, the utilization rate parameter of the hardware resource of each server cluster is obtained respectively.
In the present embodiment, the number to be allocated to each data-base cluster is determined when needs are calculated
According to storehouse quantity when, the utilization rate of the hardware resource of each server cluster can be obtained first
Parameter, hardware resource and distributed to server set that utilization rate parameter uses for server cluster
The ratio of the hardware resource of group.Hardware resource can include but is not limited to:It is CPU, internal memory, hard
Disk.
In some optional implementations of the present embodiment, after resource allocation request is received,
Methods described also includes:Resource allocation rule is judged whether, it is fixed that resource allocation rule is used for
Each self-corresponding default weighting of type and applications parameter and utilization rate parameter of adopted hardware resource
Value;If so, resolving resource allocation rule, obtains the type and default weighted value of hardware resource;
If it is not, receive input configuration-direct, configuration-direct comprising hardware resource type mark with
And default weighted value;The mark of type based on hardware resource and default weighted value, build money
Source allocation rule.
In the present embodiment, resource allocation rule is used for type and the application for defining hardware resource
Measure parameter and each self-corresponding default weighted value of utilization rate parameter.Resource allocation rule can be used
Form is indicated:Index 1* weight 1+ index 2* weight 2+......+ index n* weights n.
Wherein it is possible to by the applications parameter of the quantity for the server for indicating server cluster application, hard
The utilization rate parameter of part resource is referred to as index.Each index can correspond to a weight, i.e.,
One weighted value of correspondence.So that hardware resource is internal memory as an example, resource allocation rule can include two
Individual index a, index is applications parameter, and another index is the utilization rate parameter of internal memory.
Correspondingly, applications parameter and the utilization rate parameter of internal memory each correspond to a weighted value.
Step 203, based on applications parameter and the corresponding fraction parameter of utilization rate parameter, it is determined that
The quantity of server to be allocated to each server cluster, and by the quantity determined
Server is respectively allocated to each server cluster.
In the present embodiment, fraction parameter indicates that server cluster needs to be assigned to new server
To run the urgency level of the Data Mart after dilatation.Applications parameter and utilization rate can be based on
Parameter (such as utilization rate parameter of internal memory, CPU, hard disk) corresponding fraction parameter, it is determined that
The quantity of server to be allocated to each server cluster.By taking a server cluster as an example,
When hardware resource is internal memory, and utilization rate parameter is the utilization rate parameter of internal memory, it can count respectively
Calculate applications parameter and each server cluster applications parameter sum applications ratio with
And the corresponding fraction parameter of utilization rate parameter of internal memory and making for the internal memory of each server cluster
With the utilization rate ratio of the corresponding fraction parameter sum of rate parameter, then, to be allocated is owned
The quantitative value of the half of the quantity of server cluster respectively with applications ratio and utilization rate ratio phase
Multiply, obtain applications quantity and utilization rate quantity, applications quantity is added with utilization rate quantity,
Obtain distributing to the quantity of the server of the server cluster.
In some optional implementations of the present embodiment, hardware resource is internal memory;And base
In applications parameter and the corresponding fraction parameter of utilization rate parameter, determine it is to be allocated to each clothes
The quantity of the server of business device cluster includes:Joined according to the utilization rate parameter of default internal memory and fraction
Several mapping tables, determines that the utilization rate parameter of the internal memory of each server cluster is each respectively
Self-corresponding fraction parameter;Calculate to be allocated to each server set respectively using below equation
The quantity of the server of group:
MacN=MacTotal*C1*MAn/MAs+MacTotal*C2*MUSecn/MUs,
Wherein, MacN represents the quantity of the server to be allocated to n-th server cluster,
MacTotal represents the total quantity of the server to be allocated to each server cluster, and C1 is represented
The corresponding default weighted value of applications parameter, MAn represents the applications of n-th server cluster
Parameter, MAs represents the applications parameter sum of each server cluster, and C2 represents internal memory
The corresponding default weighted value of utilization rate parameter, MUSecn represents n-th server cluster
Fraction parameter, MUs represents the fraction parameter sum of each server cluster.
In the present embodiment, when the two indices included in resource allocation rule are applications parameter
During the utilization rate parameter of internal memory, in the present embodiment, the number of servers of server cluster application
Applications parameter can serve to indicate that server cluster application server situation, internal memory
Utilization rate parameter can serve to indicate that the actually used situation of the internal memory of server cluster.So as to,
Can be by the number of servers of server cluster application and the reality of the memory source of server cluster
Situation is combined, it is determined that distributing to the quantity of the server of each server cluster.For example,
The quantity MacN of the above-mentioned calculating server to be allocated to n-th server cluster formula
In, C1*MAn/MAs can serve to indicate that the service of server cluster application in the assignment procedure
Influence of the quantity of device to allocation result, C2*MUSecn/MUs can serve to indicate that in distribution
During server cluster internal memory influence of the service condition to allocation result.In the present embodiment
In, C1, C2 value can be 0.5.
In the present embodiment, can be according to pair of the utilization rate parameter of default internal memory and fraction parameter
Relation table is answered, determines that the utilization rate parameter of the internal memory of each server cluster is each corresponded to respectively
Fraction parameter.Fraction parameter can add equivalent to corresponding preset of utilization rate parameter in internal memory
On the basis of weights, the service condition to internal memory assigns weight again, so as to this point of utilization
Number parameter indicates that server cluster needs the tight stage of the i.e. machine resources of server.
In some optional implementations of the present embodiment, C2 value is 0.5*C3, wherein,
Residing period corresponding default weighted value when C3 is reception resource allocation request.
In the present embodiment, the weight of the utilization rate parameter of the internal memory of server cluster can be
0.5*C3.C3 can represent to receive period residing during resource allocation request corresponding preset and add
Weights.For example, the period residing when receiving resource allocation request is on server cluster
During the visitation frequency of Data Mart higher period, C3 can be set to 1.2.Provided when receiving
During the distribution request of source the residing period be server cluster on Data Mart visitation frequency just
During the normal period, C3 can be set to 1.The residing time when receiving resource allocation request
Section for the Data Mart on server cluster visitation frequency relatively low period when, can be by C3
It is set to 0.8.
In the present embodiment, by the number of servers and server cluster of server cluster application
The actual conditions of memory source be combined, it is determined that distributing to the server of each server cluster
Quantity, the server for the quantity determined can be respectively allocated to each server cluster.
Fig. 3 is refer to, it illustrates the schematic diagram of resource allocation rule.
In fig. 3 it is shown that the two indices of resource allocation rule a, index takes for instruction
The server of business device cluster application is the applications parameter of the quantity of machine resources, another index
For the utilization rate parameter of the internal memory of the service condition of the internal memory of instruction server cluster.Applications are joined
The weight of number and memory usage parameter is that weighted value is 0.5.For the utilization rate ginseng of internal memory
Number, the weight of the utilization rate parameter of internal memory can be weighted, correspondingly, can set again again
The weighted value of secondary weighting.For example, the period residing when receiving resource allocation request is busy
Period, then the weighted value weighted again can be set to 1.2.When receiving resource allocation request
The residing period is idle, then the weighted value weighted again can be set into 0.8.
Fig. 4 is refer to, it illustrates the schematic diagram of fraction parameter.
In Fig. 4, memory usage parameter one fraction parameter of correspondence of each cluster, when
When the utilization rate parameter of internal memory is more than 80%, fraction parameter is 7, when the utilization rate parameter of internal memory
During for 50%-80%, fraction parameter is 2, when the utilization rate parameter of internal memory is 30%-50%,
Fraction parameter is 1, and when the utilization rate parameter of internal memory is less than 30%, fraction parameter is 0.
Fig. 5 is refer to, it illustrates the resource allocation methods suitable for the application a example
Property Organization Chart.In fig. 5 it is shown that view layer, logical layer, model layer.View layer is included
Query page, regular assignment page.Logical layer comprising user control interface, data be loaded into interface,
Resource allocation rule interface.Model layer includes data warehouse EDW, distributed computing framework
Hadoop, relevant database.
Query page:For the selection of resource allocation rule, allocation result is shown and allocation result is led
Go out.
Resource rule assignment page:For showing index and weight in resource allocation rule, refer to
Mark can comprising indicate server be machine resources application quantity applications parameter and internal memory,
CPU, the utilization rate parameter of hard disk hardware resource weighted value, for example, the power of applications parameter
Weight be the utilization rate parameter of 0.5, internal memory weight be 0.2, CPU utilization rate parameter be 0.1.
Meanwhile, it is also actually used comprising the corresponding fraction parameter of memory usage parameter and hardware resource
The weighted value weighted again of situation.It can neatly be adjusted and referred to by the regular assignment page of resource
Mark and weight.
User control interface:For controlling to carry out data loading or generation resource allocation rule.
User can be O&M engineer.The instruction that console receives O&M engineer input can be provided.
Data are loaded into interface:It is loaded into for completing data.
Resource allocation rule interface:For according to resource allocation rule, data to be used with reference to resource,
Complete distribution data.
EDW, Hadoop, relevant database:Source data is provided, and preserves resource allocation rule
Then and allocation result, so that subsequent reference is used.
Fig. 6 is refer to, it illustrates the resource allocation methods of the application a exemplary flow
Figure.Comprise the steps of:
Step 601:Obtain the parameter associated with dispensation machines resource.It can obtain and indicate each
The server of server cluster application is the applications parameter of the quantity of machine resources, hardware resource
Utilization rate parameter (the utilization rate parameter of such as internal memory).Then, by the reference record got
In tables of data, the table can be referred to as to resource base information table.
Step 602:Distribu-tion index and weight., should during can be only fitted to distribution server
The index (such as utilization rate parameter of applications parameter, internal memory) and the weight of index used.
Can neatly it be adjusted according to actual conditions index and weight.
Step 603:Judge whether resource allocation rule.Judge that definition has index and index
The resource allocation rule of weight whether there is.If there is no resource allocation rule, step is performed
Rapid 604, if existing resource allocation is regular, perform step 605.
Step 604:The new resource allocation rule of generation.
Step 605:Machine resources are then called to be allocated.
Step 606:Generate machine resources allocation result.
Illustrate the resource allocation methods difference with the prior art of the application below:
In the prior art, the mode of distribution server is:Each clothes is distributed to according to conventional
The quantity of the server of business device cluster, prediction is currently assigned to the server of each server cluster
Quantity.On the one hand, it is impossible to which adjustment distributes the quantity of the server of each server cluster in real time,
Cause flexibility poor.On the other hand, only account for distributing to each service in the past in distribution
The quantity of the server of device cluster, without considering the hard of the server in each server cluster
The actually used situation of part resource, causes the accuracy rate of distribution relatively low.
And in this application, index, weight and fraction in resource allocation rule are joined
Number determines the quantity of the server to be allocated to server cluster, i.e., by server cluster application
Number of servers is combined with the actual conditions of the memory source of server cluster, it is determined that distributing to
The quantity of the server of each server cluster, enhances the server i.e. standard of machine resources distribution
True property.Meanwhile, the parameter and weight in resource allocation rule can be adjusted in real time, from
And strengthen the flexibility of machine resources distribution.Further, it is also possible to real time inspection current resource point
With rule and allocation result, it is easy to check maintenance and follow-up rule expending, further improves just
Profit.
With further reference to Fig. 7, as the realization to method shown in above-mentioned each figure, the application is provided
A kind of one embodiment of resource allocation device, the device embodiment and the method shown in Fig. 2
Embodiment is corresponding, and the device specifically can apply in various electronic equipments.
As shown in fig. 7, the resource allocation device 700 of the present embodiment includes:Receiving unit 701,
Acquiring unit 702, determining unit 703.Receiving unit 701 is configured to reception resource allocation please
Ask, resource allocation request is based on the Data Mart dilatation generation run on server cluster, resource
The applications parameter of quantity of the distribution request comprising the server for indicating server cluster application;Obtain
Unit 702 is taken to be configured to obtain the utilization rate of the hardware resource of each server cluster respectively
Parameter, hardware resource and distributed to server set that utilization rate parameter uses for server cluster
The ratio of the hardware resource of group;Determining unit 703 is configured to based on applications parameter and used
The corresponding fraction parameter of rate parameter, determines the server to be allocated to each server cluster
Quantity, and the server for the quantity determined is respectively allocated to each server cluster,
Fraction parameter indicates that server cluster needs to be assigned to new server to run the data after dilatation
The urgency level in fairground.
In the present embodiment, receiving unit 701 can receive resource allocation request.Resource allocation
Ask based on the Data Mart dilatation generation run on server cluster, resource allocation request is included
Indicate the application of the quantity of the server (also referred to as machine resources) of server cluster application
Measure parameter.In the present embodiment, each server cluster can run different types of data set
City.When operating in the progress dilatation of the Data Mart on server cluster, i.e., in Data Mart
During data increase, the server cluster in service data fairground then needs more servers to run
Data Mart after dilatation.At this point it is possible to generate resource allocation request to ask as its distribution newly
Server.
In the present embodiment, acquiring unit 702 can need calculating determination to be allocated to each
During the quantity of the database of individual data-base cluster, the hardware of each server cluster is obtained first
The utilization rate parameter of resource, the hardware resource that utilization rate parameter is used for server cluster is with having divided
The ratio of the hardware resource of dispensing server cluster.Hardware resource can include but is not limited to:
CPU, internal memory, hard disk.
In the present embodiment, determining unit 703 can be based on applications parameter and utilization rate parameter
(such as utilization rate parameter of internal memory, CPU, hard disk) corresponding fraction parameter, it is determined that treating point
The quantity of the server of each server cluster of dispensing.
In some optional implementations of the present embodiment, determining unit 703 includes:Fraction
Parameter determination subelement (not shown), is configured to when hardware resource is internal memory, according to default
The utilization rate parameter of internal memory and the mapping table of fraction parameter, determine each server respectively
Each self-corresponding fraction parameter of utilization rate parameter of the internal memory of cluster;Computation subunit (not shown),
It is configured to calculate the server to be allocated to each server cluster respectively using below equation
Quantity:MacN=MacTotal*C1*MAn/MAs+MacTotal*C2*
MUSecn/MUs, wherein, MacN represents the service to be allocated to n-th server cluster
The quantity of device, MacTotal represents the sum of the server to be allocated to each server cluster
Amount, C1 represents the corresponding default weighted value of applications parameter, and MAn represents n-th server
The applications parameter of cluster, MAs represents the applications parameter sum of each server cluster,
C2 represents the corresponding default weighted value of the utilization rate parameter of internal memory, and MUSecn represents that n-th takes
The fraction parameter of business device cluster, MUs represents the fraction parameter sum of each server cluster.
In some optional implementations of the present embodiment, C1 and C2 value are 0.5.
In some optional implementations of the present embodiment, C1 value taking for 0.5, C2
It is worth for 0.5*C3, wherein, C3 is corresponding pre- to receive the period residing during resource allocation request
If weighted value.
In some optional implementations of the present embodiment, device 700 also includes:Judge single
First (not shown), is configured to after resource allocation request is received, judges whether resource
Allocation rule, resource allocation rule be used for define hardware resource type and applications parameter and
Each self-corresponding default weighted value of utilization rate parameter;Resolution unit (not shown), is configured to work as
Exist resource allocation it is regular when, resolving resource allocation rule obtains the type of hardware resource and pre-
If weighted value;Instruction reception unit (not shown), is configured to regular when resource allocation is not present
When, receive input configuration-direct, configuration-direct comprising hardware resource type mark and
Default weighted value;Construction unit (not shown), is configured to the mark of the type based on hardware resource
Know and default weighted value, build resource allocation rule.
It will be understood by those skilled in the art that said apparatus 700 also includes some other known knots
Structure, such as processor, memory, in order to unnecessarily obscure embodiment of the disclosure, this
A little known structures are not shown in the figure 7.
Fig. 8 is shown suitable for being used for realizing the terminal device of the embodiment of the present application or the meter of server
The structural representation of calculation machine system.
As shown in figure 8, computer system 800 includes CPU (CPU) 801, its
Can according to the program being stored in read-only storage (ROM) 802 or from storage part 808
The program that is loaded into random access storage device (RAM) 803 and perform various appropriate actions
And processing.In RAM 803, the system that is also stored with 800 operates required various program sums
According to.CPU 801, ROM 802 and RAM 803 are connected with each other by bus 804.Input
/ output (I/O) interface 805 is also connected to bus 804.
I/O interfaces 805 are connected to lower component:Importation 806 including keyboard, mouse etc.;
Including cathode-ray tube (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.
Output par, c 807;Storage part 808 including hard disk etc.;And including such as LAN card,
The communications portion 809 of the NIC of modem etc..Communications portion 809 is via such as
The network of internet performs communication process.Driver 810 is also according to needing to be connected to I/O interfaces
805.Detachable media 811, such as disk, CD, magneto-optic disk, semiconductor memory etc.,
Be arranged on as needed on driver 810, in order to the computer program that reads from it according to
Need to be mounted into storage part 808.
Especially, in accordance with an embodiment of the present disclosure, the process described above with reference to flow chart can be with
It is implemented as computer software programs.For example, embodiment of the disclosure includes a kind of computer journey
Sequence product, it includes being tangibly embodied in the computer program on machine readable media, the meter
Calculation machine program bag, which contains, is used for the program code of the method shown in execution flow chart.Implement such
In example, the computer program can be downloaded and installed by communications portion 809 from network,
And/or be mounted from detachable media 811.
Flow chart and block diagram in accompanying drawing, it is illustrated that according to the system of the various embodiments of the application,
Architectural framework in the cards, function and the operation of method and computer program product.This point
On, each square frame in flow chart or block diagram can represent a module, program segment or code
A part, the part of the module, program segment or code is used for comprising one or more
The executable instruction of logic function as defined in realizing.It should also be noted that being used as replacement at some
In realization, the function of being marked in square frame can also be with different from the order marked in accompanying drawing hair
It is raw.For example, two square frames succeedingly represented can essentially be performed substantially in parallel, they
Sometimes it can also perform in the opposite order, this is depending on involved function.It is also noted that
It is, each square frame in block diagram and/or flow chart and the square frame in block diagram and/or flow chart
Combination, can be realized with the special hardware based system of defined function or operation is performed,
Or can be realized with the combination of specialized hardware and computer instruction.
As on the other hand, present invention also provides a kind of nonvolatile computer storage media,
The nonvolatile computer storage media can be described in above-described embodiment included in device
Nonvolatile computer storage media;Can also be individualism, without non-in supplying terminal
Volatile computer storage medium.Above-mentioned nonvolatile computer storage media be stored with one or
The multiple programs of person, when one or more of programs are performed by an equipment so that described
Equipment:Resource allocation request is received, the resource allocation request is based on running on server cluster
Data Mart dilatation generation, the resource allocation request is comprising indicating server cluster application
The applications parameter of the quantity of server;The hardware resource of each server cluster is obtained respectively
Utilization rate parameter, the hardware resource that the utilization rate parameter is used for server cluster is with having divided
The ratio of the hardware resource of dispensing server cluster;Joined based on the applications parameter and utilization rate
The corresponding fraction parameter of number, determines the quantity of the server to be allocated to each server cluster,
And the server for the quantity determined is respectively allocated to each server cluster, fraction ginseng
Number indicates that server cluster needs to be assigned to new server to run the Data Mart after dilatation
Urgency level.
Above description is only the preferred embodiment of the application and saying to institute's application technology principle
It is bright.It will be appreciated by those skilled in the art that invention scope involved in the application, is not limited
In the technical scheme of the particular combination of above-mentioned technical characteristic, do not departed from while should cover yet
In the case of the inventive concept, it is combined by above-mentioned technical characteristic or its equivalent feature
Formed by other technical schemes.Such as features described above and (but not limited to) disclosed herein
Technical characteristic with similar functions carries out technical scheme formed by replacement mutually.
Claims (10)
1. a kind of resource allocation methods, it is characterised in that methods described includes:
Receive resource allocation request, the resource allocation request is based on running on server cluster
Data Mart dilatation is generated, and the resource allocation request includes the clothes for indicating server cluster application
The applications parameter of the quantity of business device;
The utilization rate parameter of the hardware resource of each server cluster is obtained respectively, it is described to use
Rate parameter provides for the hardware resource that server cluster is used with having distributed to the hardware of server cluster
The ratio in source;
Based on the applications parameter and the corresponding fraction parameter of utilization rate parameter, determine to be allocated
To the quantity of the server of each server cluster, and by the server for the quantity determined
Each server cluster is respectively allocated to, the fraction parameter indicates that server cluster needs to divide
New server is fitted on to run the urgency level of the Data Mart after dilatation.
2. according to the method described in claim 1, it is characterised in that the hardware resource is interior
Deposit;And
It is described to be based on the applications parameter and the corresponding fraction parameter of utilization rate parameter, it is determined that treating
Distributing to the quantity of the server of each server cluster includes:
According to the mapping table of the utilization rate parameter of default internal memory and fraction parameter, determine respectively
Each self-corresponding fraction parameter of utilization rate parameter of the internal memory of each server cluster;
Calculate the number of the server to be allocated to each server cluster respectively using below equation
Amount:
MacN=MacTotal*C1*MAn/MAs+MacTotal*C2*MUSecn/MUs,
Wherein, MacN represents the quantity of the server to be allocated to n-th server cluster,
MacTotal represents the total quantity of the server to be allocated to each server cluster, and C1 is represented
The corresponding default weighted value of applications parameter, MAn represents the applications of n-th server cluster
Parameter, MAs represents the applications parameter sum of each server cluster, and C2 represents internal memory
The corresponding default weighted value of utilization rate parameter, MUSecn represents n-th server cluster
The fraction parameter, MUs represents the fraction parameter sum of each server cluster.
3. method according to claim 2, it is characterised in that the C1's and C2
Value is 0.5.
4. method according to claim 2, it is characterised in that the value of the C1 is
0.5, the C2 value are 0.5*C3, wherein, C3 is residing during resource allocation request to receive
Period corresponding default weighted value.
5. the method according to one of claim 1-4, it is characterised in that receiving resource
After distribution request, methods described also includes:
Resource allocation rule is judged whether, the resource allocation rule is used to define hardware money
Each self-corresponding default weighted value of type and applications parameter and utilization rate parameter in source;
If so, resolving resource allocation rule, obtains the type of hardware resource and the default weighting
Value;
If it is not, receiving the configuration-direct of input, the configuration-direct includes the type of hardware resource
Mark and the default weighted value;
The mark of type based on hardware resource and the default weighted value, build resource allocation
Rule.
6. a kind of resource allocation device, it is characterised in that described device includes:
Receiving unit, is configured to receive resource allocation request, the resource allocation request is based on
The Data Mart dilatation generation run on server cluster, the resource allocation request includes instruction
The applications parameter of the quantity of the server of server cluster application;
Acquiring unit, being configured to obtain the hardware resource of each server cluster respectively makes
Use rate parameter, the hardware resource that the utilization rate parameter is used for server cluster is with having distributed to
The ratio of the hardware resource of server cluster;
Determining unit, is configured to be based on the applications parameter and corresponding point of utilization rate parameter
Number parameter, determines the quantity of the server to be allocated to each server cluster, and will be true
The server for the quantity made is respectively allocated to each server cluster, and the fraction parameter refers to
Show that server cluster needs to be assigned to new server to run the urgent of the Data Mart after dilatation
Degree.
7. device according to claim 6, it is characterised in that the determining unit includes:
Fraction parameter determination subelement, is configured to when the hardware resource is internal memory, according to
The mapping table of the utilization rate parameter and fraction parameter of default internal memory, determines that each takes respectively
Each self-corresponding fraction parameter of utilization rate parameter of the internal memory of business device cluster;
Computation subunit, be configured to using below equation calculate respectively it is to be allocated to each clothes
The quantity of the server of business device cluster:MacN=MacTotal*C1*MAn/MAs+MacTot
Al*C2*MUSecn/MUs, wherein, MacN represents to be allocated to n-th server set
The quantity of the server of group, MacTotal represents the service to be allocated to each server cluster
The total quantity of device, C1 represents the corresponding default weighted value of applications parameter, and MAn represents N
The applications parameter of individual server cluster, MAs represents the applications ginseng of each server cluster
Number sum, C2 represents the corresponding default weighted value of the utilization rate parameter of internal memory, and MUSecn is represented
The fraction parameter of n-th server cluster, MUs represents the institute of each server cluster
State fraction parameter sum.
8. device according to claim 7, it is characterised in that the C1's and C2
Value is 0.5.
9. device according to claim 7, it is characterised in that the value of the C1 is
0.5, the C2 value are 0.5*C3, wherein, C3 is residing during resource allocation request to receive
Period corresponding default weighted value.
10. the device according to one of claim 6-9, it is characterised in that described device is also
Including:
Judging unit, is configured to after resource allocation request is received, and judges whether money
Source allocation rule, the resource allocation rule is used for the type and applications for defining hardware resource
Parameter and each self-corresponding default weighted value of utilization rate parameter;
Resolution unit, is configured to when there is resource allocation rule, resolving resource allocation rule,
Obtain the type and the default weighted value of hardware resource;
Instruction reception unit, is configured to when in the absence of resource allocation rule, receive input
Configuration-direct, the mark of type of the configuration-direct comprising hardware resource and described preset add
Weights;
Construction unit, the mark and described preset for being configured to the type based on hardware resource adds
Weights, build resource allocation rule.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610016268.3A CN106959894B (en) | 2016-01-11 | 2016-01-11 | Resource allocation method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610016268.3A CN106959894B (en) | 2016-01-11 | 2016-01-11 | Resource allocation method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106959894A true CN106959894A (en) | 2017-07-18 |
CN106959894B CN106959894B (en) | 2020-11-24 |
Family
ID=59480636
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610016268.3A Active CN106959894B (en) | 2016-01-11 | 2016-01-11 | Resource allocation method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106959894B (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107707612A (en) * | 2017-08-10 | 2018-02-16 | 北京奇艺世纪科技有限公司 | A kind of appraisal procedure and device of the resource utilization of load balancing cluster |
CN109324802A (en) * | 2018-09-29 | 2019-02-12 | 北京百度网讯科技有限公司 | Method and apparatus for configuration server |
CN109617738A (en) * | 2018-12-28 | 2019-04-12 | 优刻得科技股份有限公司 | Method, system and the non-volatile memory medium of the scalable appearance of user service |
CN109981699A (en) * | 2017-12-27 | 2019-07-05 | 中国移动通信集团云南有限公司 | A kind of resource allocation methods of cloud computing system, device and cloud computing system |
CN110138732A (en) * | 2019-04-03 | 2019-08-16 | 平安科技(深圳)有限公司 | Response method, device, equipment and the storage medium of access request |
CN110932935A (en) * | 2019-11-26 | 2020-03-27 | 深圳前海微众银行股份有限公司 | Resource control method, device, equipment and computer storage medium |
CN111090516A (en) * | 2019-11-25 | 2020-05-01 | 支付宝(杭州)信息技术有限公司 | Request distribution method, device and equipment |
CN111431996A (en) * | 2020-03-20 | 2020-07-17 | 北京百度网讯科技有限公司 | Method, apparatus, device and medium for resource configuration |
CN111597036A (en) * | 2020-04-15 | 2020-08-28 | 中国人民财产保险股份有限公司 | Server resource configuration method and device |
CN111669294A (en) * | 2020-06-22 | 2020-09-15 | 南方电网数字电网研究院有限公司 | Monitoring system configuration method, device, monitoring system and storage medium |
CN113010315A (en) * | 2021-03-18 | 2021-06-22 | 中国邮政储蓄银行股份有限公司 | Resource allocation method, resource allocation device and computer-readable storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103117959A (en) * | 2013-01-17 | 2013-05-22 | 中国联合网络通信集团有限公司 | Resource redistribution method and information collection device and resource management device |
CN103248659A (en) * | 2012-02-13 | 2013-08-14 | 北京华胜天成科技股份有限公司 | Method and system for dispatching cloud computed resources |
US20140280441A1 (en) * | 2013-03-15 | 2014-09-18 | International Business Machines Corporation | Data integration on retargetable engines in a networked environment |
CN104063265A (en) * | 2014-07-04 | 2014-09-24 | 云南电网公司 | Method for comprehensively evaluating virtual resources |
WO2015101419A1 (en) * | 2014-01-02 | 2015-07-09 | Sky Atlas Iletisim Sanayi Ve Ticaret Anonim Sirketi | Method and system for allocating resources to resource consumers in a cloud computing environment |
CN104836850A (en) * | 2015-04-16 | 2015-08-12 | 华为技术有限公司 | Instance node management method and management equipment |
CN104834569A (en) * | 2015-05-11 | 2015-08-12 | 北京京东尚科信息技术有限公司 | Cluster resource scheduling method and cluster resource scheduling system based on application types |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US280441A (en) * | 1883-07-03 | bennett |
-
2016
- 2016-01-11 CN CN201610016268.3A patent/CN106959894B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103248659A (en) * | 2012-02-13 | 2013-08-14 | 北京华胜天成科技股份有限公司 | Method and system for dispatching cloud computed resources |
CN103117959A (en) * | 2013-01-17 | 2013-05-22 | 中国联合网络通信集团有限公司 | Resource redistribution method and information collection device and resource management device |
US20140280441A1 (en) * | 2013-03-15 | 2014-09-18 | International Business Machines Corporation | Data integration on retargetable engines in a networked environment |
WO2015101419A1 (en) * | 2014-01-02 | 2015-07-09 | Sky Atlas Iletisim Sanayi Ve Ticaret Anonim Sirketi | Method and system for allocating resources to resource consumers in a cloud computing environment |
CN104063265A (en) * | 2014-07-04 | 2014-09-24 | 云南电网公司 | Method for comprehensively evaluating virtual resources |
CN104836850A (en) * | 2015-04-16 | 2015-08-12 | 华为技术有限公司 | Instance node management method and management equipment |
CN104834569A (en) * | 2015-05-11 | 2015-08-12 | 北京京东尚科信息技术有限公司 | Cluster resource scheduling method and cluster resource scheduling system based on application types |
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107707612B (en) * | 2017-08-10 | 2020-11-13 | 北京奇艺世纪科技有限公司 | Method and device for evaluating resource utilization rate of load balancing cluster |
CN107707612A (en) * | 2017-08-10 | 2018-02-16 | 北京奇艺世纪科技有限公司 | A kind of appraisal procedure and device of the resource utilization of load balancing cluster |
CN109981699A (en) * | 2017-12-27 | 2019-07-05 | 中国移动通信集团云南有限公司 | A kind of resource allocation methods of cloud computing system, device and cloud computing system |
CN109324802A (en) * | 2018-09-29 | 2019-02-12 | 北京百度网讯科技有限公司 | Method and apparatus for configuration server |
CN109324802B (en) * | 2018-09-29 | 2022-11-01 | 北京百度网讯科技有限公司 | Method and device for configuring server |
CN109617738A (en) * | 2018-12-28 | 2019-04-12 | 优刻得科技股份有限公司 | Method, system and the non-volatile memory medium of the scalable appearance of user service |
CN109617738B (en) * | 2018-12-28 | 2022-05-31 | 优刻得科技股份有限公司 | Method, system and non-volatile storage medium for user service scaling |
CN110138732B (en) * | 2019-04-03 | 2022-03-29 | 平安科技(深圳)有限公司 | Access request response method, device, equipment and storage medium |
CN110138732A (en) * | 2019-04-03 | 2019-08-16 | 平安科技(深圳)有限公司 | Response method, device, equipment and the storage medium of access request |
CN111090516A (en) * | 2019-11-25 | 2020-05-01 | 支付宝(杭州)信息技术有限公司 | Request distribution method, device and equipment |
CN111090516B (en) * | 2019-11-25 | 2023-03-31 | 支付宝(杭州)信息技术有限公司 | Request distribution method, device and equipment |
CN110932935A (en) * | 2019-11-26 | 2020-03-27 | 深圳前海微众银行股份有限公司 | Resource control method, device, equipment and computer storage medium |
CN111431996A (en) * | 2020-03-20 | 2020-07-17 | 北京百度网讯科技有限公司 | Method, apparatus, device and medium for resource configuration |
CN111597036A (en) * | 2020-04-15 | 2020-08-28 | 中国人民财产保险股份有限公司 | Server resource configuration method and device |
CN111669294A (en) * | 2020-06-22 | 2020-09-15 | 南方电网数字电网研究院有限公司 | Monitoring system configuration method, device, monitoring system and storage medium |
CN111669294B (en) * | 2020-06-22 | 2023-06-30 | 南方电网数字电网研究院有限公司 | Monitoring system configuration method, device, monitoring system and storage medium |
CN113010315A (en) * | 2021-03-18 | 2021-06-22 | 中国邮政储蓄银行股份有限公司 | Resource allocation method, resource allocation device and computer-readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN106959894B (en) | 2020-11-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106959894A (en) | Resource allocation methods and device | |
CN107885595A (en) | A kind of resource allocation methods, relevant device and system | |
US9887930B1 (en) | Aggregating resource requests | |
CN109191202A (en) | Resource allocation methods, device, electronic equipment and computer readable storage medium | |
CN108629611A (en) | Method and apparatus for distributing resource | |
CN109697637A (en) | Object type determines method, apparatus, electronic equipment and computer storage medium | |
CN106455056A (en) | Positioning method and device | |
CN108306874A (en) | Service interface accesses current-limiting method and device | |
CN112017042A (en) | Resource quota determining method and device based on tweed distribution and electronic equipment | |
TW202121274A (en) | Cloud resource management method and apparatus, and electronic device and computer readable storage medium | |
CN109636227A (en) | Method for allocating tasks, device, electronic equipment and computer readable storage medium | |
US9141936B2 (en) | Systems and methods for simulating a resource constrained process | |
CN108023834A (en) | A kind of cloud resource auto-allocation method and device | |
CN111681112A (en) | Method and device for managing release strategy and electronic equipment | |
CN105511914B (en) | Using update method, device and system | |
Zhang et al. | Strategy-proof mechanism for time-varying batch virtual machine allocation in clouds | |
CN111008767B (en) | Internet financial technology architecture evaluation method, device, electronic equipment and medium | |
CN109062683A (en) | The method, apparatus and computer readable storage medium of host resource distribution | |
CN113205391B (en) | Historical order matching degree based order dispatching method, electronic equipment and computer readable medium | |
CN115129481B (en) | Computing resource allocation method and device and electronic equipment | |
CN109543928B (en) | Information output method and device | |
CN110413393A (en) | Cluster resource management method, device, computer cluster and readable storage medium storing program for executing | |
CN109783236A (en) | Method and apparatus for output information | |
CN111694670B (en) | Resource allocation method, apparatus, device and computer readable medium | |
CN109783189A (en) | A kind of quiescent operation stream scheduling method and device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |