CN109495398A - A kind of resource regulating method and equipment of container cloud - Google Patents

A kind of resource regulating method and equipment of container cloud Download PDF

Info

Publication number
CN109495398A
CN109495398A CN201710811864.5A CN201710811864A CN109495398A CN 109495398 A CN109495398 A CN 109495398A CN 201710811864 A CN201710811864 A CN 201710811864A CN 109495398 A CN109495398 A CN 109495398A
Authority
CN
China
Prior art keywords
host
resource
task
load
container cloud
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
Application number
CN201710811864.5A
Other languages
Chinese (zh)
Inventor
钟储建
郭岳
张式勤
陈远峥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Group Zhejiang Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Group Zhejiang Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Group Zhejiang Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201710811864.5A priority Critical patent/CN109495398A/en
Publication of CN109495398A publication Critical patent/CN109495398A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/78Architectures of resource allocation
    • H04L47/783Distributed allocation of resources, e.g. bandwidth brokers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention provides the resource regulating method and equipment of a kind of container cloud.The described method includes: S1, obtains current scheduling task, the monitoring resource result based on container cloud is scheduled calculating, obtains the deployed position of the current scheduling task;S2 is based on the deployed position, carries out Real-Time Scheduling using the host in container cloud resource pond, gives the corresponding resource allocation of the deployed position to the current scheduling task.The present invention is based on the monitored results of the whole resource in container cloud resource pond to be scheduled calculating, is not limited to some frame;According to the deployed position for calculating acquisition, Real-Time Scheduling is carried out using the host in container cloud resource pond, due to having used host as centralized dispatching module, all resources can be grouped or the resource usage amount of user precisely limits, the frequency that conflict occurs when solving shared scheduling, the quantity of supported upper layer scheduling greatly increases, and the load of whole resource pool can be made more balanced.

Description

A kind of resource regulating method and equipment of container cloud
Technical field
The present invention relates to field of computer technology, more particularly, to the resource regulating method and equipment of a kind of container cloud.
Background technique
It is in the industry cycle interior to be widely used with the fast development of cloud computing technology and the maturation of containerization technique.Together When business more generation repeatedly replace, huge variation also has occurred to the resource requirement of data center in new business.China Mobile it is some The regular characteristic of line service, as the daily peak of the service traffics of the hand Room, business hall system and low ebb, the peak at the end of month at the beginning of the month and Low ebb etc..At peak, it is necessary to quick response business demand, while in low ebb, it can guarantee the impregnable feelings of business Under condition, Resource recovery is used for other business.So the construction of data center and the intelligent scheduling of resource are for the normal of business Operation plays very crucial effect.Some business it is preferential activity and cause using meet Lingao it is concurrent, burst flow or height Situations such as flow, if substantially infeasible using the method for salary distribution of resource in traditional data center, in high concurrent, burst flow Or when the case where high flow capacity, data center can not accurately respond service resources demand, cause the irregular operation of business.In order to Such issues that solution, way generally used now is the Scheduling Framework (Marathon on mesos, K8s etc.) using open source in the industry It realizes the Quick Extended of srvice instance, can satisfy the demand of srvice instance simplicity vertical and horizontal extension.In traffic pressure Before arriving, under the premise of not operating underlying resource, business is coped with by quick start example.Guaranteed service it is continuous Property.Shown in system architecture Fig. 1.
As shown in Figure 1, using Master-Slave framework, Slave node indicates the node of execution task, in order to guarantee The normal operation of business, data center administrator can expand the configuration of application, the i.e. configuration parameter of srvice instance, such as CPU as far as possible And memory parameters, enough resources are distributed to it, sufficiently large service traffics can be coped with.There is movable progress simultaneously When, it can be quickly by some Scheduling Frameworks or platform come quickly extending transversely.Avoid the complicated audit of traditional empty machine formula Process reduces manpower waste.Peak period is avoided, since traffic pressure and business caused by being unable to Quick Extended application can not Continuity.
Although can by Mesos or K8s come in data center CPU and memory carry out scheduling of resource, guarantee industry The robustness of business, but in most cases, the operation conditions and resource requirement analysis to business are not accurate enough.It is some existing simultaneously Open source component there are some pessimistic lock mechanisms, if Mesos is when carrying out resource offer to multiple frames, the offer of resource is same When can only be dispatched to a frame, this has resulted in a kind of pessimistic mechanism, resource is monopolized by independent frame, unless frame active Report time-out or release resource.Some prior art frames are frequent to dispatch in shared scheduling simultaneously, the probability clashed Increase, the performance of integrated scheduling is impacted.The service operation that will lead to data center in a case where breaks down: 1) Upper layer application frame increases, the load down of underlying resource Scheduling Framework, while treatment effeciency reduces, the demand response of resource Slow down;There is low-response in the business of will lead to, influences customer perception.2) when elasticity is scalable frequent, resource ceaselessly sends and recycles, Cause the unstability and discontinuity of business.When problem above occurs, data center can only in advance or later maintenance, in advance Enough resources are distributed to application, and the resource utilization of data center is caused to be greatly lowered in this way, the subsequent industry for overload Business is allocated resource.Temporarily, to lead to operation system delay machine, need to restart, this is for core system in business It is unacceptable.
The major defect of the prior art based on above system framework is as follows:
(1) as the significance level of the expansion of cluster scale and business is distinguished, cause cluster there are multiple frames, and resource Pond can interact when carrying out resource offer, while only with a frame, result in a kind of Pessimistic Locking in this way, exist point Bottleneck with scheduling cannot respond rapidly to resource requirement, cause service resources short, influence the robustness of its business, make each system System business is unable to stable operation.
(2) portion of techniques realizes shared scheduling, but conflicts the frequency occurred when shared scheduling, directly affects entirety The performance of scheduler.Simultaneously because the scheduler module that do not concentrate, it is difficult to all resources grouping (Namespace) or user Resource usage amount precisely limits.Upper scheduler quantity still cannot be very much, distribute the expense of complete cluster state parallel It is larger, the continuity of business is impacted.
Summary of the invention
The present invention provides a kind of resource tune of container cloud for overcoming the above problem or at least being partially solved the above problem Spend method and apparatus.
According to an aspect of the present invention, a kind of resource regulating method of container cloud is provided, comprising:
S1 obtains current scheduling task, and the monitoring resource result based on container cloud is scheduled calculating, obtains described current The deployed position of scheduler task;
S2 is based on the deployed position, Real-Time Scheduling is carried out using the host in container cloud resource pond, by the deployment The corresponding resource allocation in position gives the current scheduling task.
Further, before the S1 further include:
S0 obtains Real-Time Scheduling task, and the scheduler task is written in scheduling request queue;
Correspondingly, current scheduling task is obtained described in S1, is further comprised: being obtained and work as from the scheduling request queue Preceding scheduler task.
Further, in the S1, the monitoring resource structure based on container cloud is scheduled calculating, obtains described current The deployed position of scheduler task further comprises:
S1.1 filters out part host using oversold mechanism and/or diversification strategies, and acquisition can dispose Host List;
S1.2 disposes Host List based on described, according to the load on host computers of the monitoring resource result of container cloud acquisition, master Machine performance indicator and corresponding weight carry out resource sequence, to obtain the deployed position of the current scheduling task.
Further, the S1.1 filters out part host using oversold mechanism and/or diversification strategies, and acquisition can dispose master Machine list further comprises:
Oversold is arranged to switch, and different scheduler tasks is arranged different oversold coefficients;
The Host List in container cloud resource pond is obtained based on the oversold mechanism and/or diversification strategies;
Based on the Host List, selection, which meets, can dispose Host List described in the host addition of preset condition.
Further, the S1.2 disposes Host List based on described, supervises what result control obtained according to the resource of container cloud Load on host computers, host performance index and corresponding weight carry out resource sequence, further comprise:
Host List is disposed based on described, load on host computers is obtained and is alternately led less than the host of the first preset threshold Machine;
Based on the alternative host, the load score value Score of each host is obtained using following formulai:
Scorei=K1 × MericScpu+K2×Mericsmem+K3×Mericsio,
Wherein, MericscpuFor cpu load, MericsmemFor Memory load and MericsioFor I/O load, K1, K2 and K3 is respectively the weight of cpu load, Memory load and I/O load;
Load score value based on each host carries out resource sequence, obtains described in the higher host conduct of load score value The deployed position of current scheduling task.
Further, in the S2, it is based on the deployed position, is adjusted in real time using the host in container cloud resource pond Degree gives the corresponding resource allocation of the deployed position to the current scheduling task, further comprises:
Monitoring resource based on container cloud is as a result, extending instance number and/or adjusting the resource distribution of example;
The host in container cloud resource pond distributes to the corresponding example resource of deployed position of the current scheduling task The current scheduling task.
Further, the load score value based on each host carries out resource sequence, and it is higher to obtain load score value Deployed position of the host as the current scheduling task, comprising:
Load score value based on each host carries out resource sequence, obtains the higher top n host of load score value and makees For the deployed position of the current scheduling task, wherein N is integer, and N is more than or equal to 1;
The load score value based on each host carries out resource sequence, obtains the load higher host conduct of score value The deployed position of the current scheduling task, later further include: successively to the corresponding host application resource of the N number of host; If host is all refused, scheduling is re-started according to the global resource in container cloud resource pond and is calculated.
Further, scheduler task includes one of online task, offline task, timed task and batch processing task or more Kind;
The monitoring resource based on container cloud is as a result, extending instance number and/or adjusting the resource distribution of example, further Include:
Host is according to the monitoring resource as a result, utilizing this group of planes resource expansion instance number;
If the online task is in peak flow or host load more than the second preset threshold, the host is adjusted The memory or CPU quota of batch processing task or offline task on machine.
According to another aspect of the present invention, a kind of scheduling of resource equipment of container cloud is also provided, comprising:
At least one processor;And
At least one processor being connect with the processor communication, in which:
The memory is stored with the program instruction that can be executed by the processor, and the processor calls described program to refer to Enable the method for being able to carry out the resource regulating method and its any alternative embodiment of a kind of container cloud of the embodiment of the present invention.
The embodiment of the present invention proposes the resource regulating method and equipment of a kind of container cloud, the entirety based on container cloud resource pond The monitored results of resource are scheduled calculating, are not limited to some frame;According to the deployed position obtained is calculated, container cloud is utilized The host of resource pool carries out Real-Time Scheduling, can be to all resources point due to having used host as centralized dispatching module Group (Namespace) or the resource usage amount of user precisely limit, the frequency that conflict occurs when solving shared scheduling;It is based on The scheduling of whole resource calculates and concentrates scheduling mechanism, and the quantity of supported upper layer scheduling greatly increases, and can make whole money The load in source pond is more balanced.
Detailed description of the invention
Fig. 1 is prior art Scheduling Framework system structure diagram;
Fig. 2 is a kind of resource regulating method flow chart of container cloud of the embodiment of the present invention;
Fig. 3 is a kind of block schematic illustration of the resource regulating method of container cloud of the embodiment of the present invention;
Fig. 4 is that the embodiment of the present invention utilizes oversold mechanism and/or the flow diagram of diversification strategies filtered host;
Fig. 5 is the flow diagram that the embodiment of the present invention is ranked up according to load on host computers score value;
Fig. 6 is a kind of structural block diagram of the scheduling of resource equipment of container cloud of the embodiment of the present invention.
Specific embodiment
With reference to the accompanying drawings and examples, specific embodiments of the present invention will be described in further detail.Implement below Example is not intended to limit the scope of the invention for illustrating the present invention.
A kind of resource regulating method and equipment of container cloud described in the embodiment of the present invention, wherein container cloud is a kind of calculating Machine resource.In general, if to run multiple tasks on a server, traditional method be divided into it is multiple virtual Machine runs a task using each virtual machine.But virtual machine starting is very slow, because they must start up whole operation system System, this will spend a few minutes.And this can occupy vast resources, because each virtual machine requires operation one completely Operation system example.Container then provides some like behavior, is a complete execution link, does not depend on outside, but Be speed more faster because starting one container just as start a process, be very suitable to service building and recombination. Container cloud (CaaS) encapsulates entire software runtime environment using container as the basic unit of division of resources and scheduling, is developer The platform for constructing, issuing and running Distributed Application is provided with system manager.When container cloud be absorbed in resource-sharing with When isolation, container layout and deployment, it is closer to traditional cloud host (IaaS);When container cloud is penetrated into using support and operation When environment when, it is closer to traditional platform service (PaaS).
The embodiment of the present invention to solve the deficiencies in the prior art, provides a kind of resource regulating method of container cloud, Ke Yi Hundreds of business is run in large-scale physical clusters, when there is request peak in multinomial business, processing that can be concurrent Resource request is enable to respond quickly, and realizes that second grade provides resource, the stable operation of safeguards system greatly shortens service request money Source time.For multi-service, the business of frequency modulation degree, data center can be good at being coped with, and ensure that business operates normally, such as Shown in Fig. 2, a kind of resource regulating method of container cloud includes:
S1 obtains current scheduling task, and the monitoring resource result based on container cloud is scheduled calculating, obtains described current The deployed position of scheduler task;
Scheduler task in the embodiment of the present invention includes in online task, offline task, timed task and batch processing task It is one or more.The monitoring resource of container cloud is mainly the loading condition of whole hosts in monitoring of containers cloud resource pond, performance Index etc..
S2 is based on the deployed position, Real-Time Scheduling is carried out using the host in container cloud resource pond, by the deployment The corresponding resource allocation in position gives the current scheduling task.The deployed position can be one or more alternative target moneys Source.
The method of the embodiment of the present invention can be implemented in the system structure for including resource layer, podium level and application layer. Wherein scheduler task comes from application layer, including online task, offline task, timed task and batch processing task;The money of container cloud Source monitoring and scheduling, which calculate, is located at podium level;Real-Time Scheduling is located at resource layer, and resource layer is large-scale physical clusters composition Host system.
The monitored results of whole resource of the embodiment of the present invention based on container cloud resource pond are scheduled calculating, are not limited to Some frame;According to the deployed position obtained is calculated, Real-Time Scheduling is carried out using the host in container cloud resource pond, due to using For host as centralized dispatching module, the resource usage amount that can be grouped (Namespace) or user to all resources does essence Fidelity system, the frequency that conflict occurs when solving shared scheduling;Scheduling based on whole resource calculates and concentrates scheduling mechanism, can The quantity of the upper layer scheduling of support greatly increases, and the load of whole resource pool can be made more balanced.Wherein, the deployed position Refer to that using the host in disposed computer room, rack, cluster and cluster, i.e. which computer room application is deployed in, in the machine Which rack in room, in which cluster of the rack and which host in the cluster.
In an alternative embodiment, before the S1 further include:
S0 obtains Real-Time Scheduling task, and the scheduler task is written in scheduling request queue;Due to the tune of application layer Degree task be usually it is concurrent, multiple scheduler tasks can be received simultaneously, therefore the scheduler task received in real time can be put into tune Queuing processing is carried out in degree request queue, the order of scheduling of resource can be improved.
If scheduler task is put into scheduling request queue first to suffer, current scheduling task is obtained described in S1, into one Step includes: the acquisition current scheduling task from the scheduling request queue.The current scheduling task is scheduling request queue First scheduler task of outlet.
The block schematic illustration of the resource regulating method of container cloud based on scheduling request queue is as shown in figure 3, come self-application The scheduling request of layer scheduler task ID is written in scheduling request queue into people's scheduling request queue;In scheduling request queue Scheduling request successively take out, and be scheduled calculating, decision goes out alternative deployed position;It will pass through after alternative deployed position The host (Host) in container cloud resource pond executes Real-Time Scheduling, and whole host resources can be integrated into a resource pool and be supplied to institute There is scheduler task shared, each host has a corresponding Executor to be responsible for management in resource pool.
In an alternative embodiment, in the S1, based on the monitoring resource result by container cloud is scheduled It calculates, obtains the deployed position of the current scheduling task, further comprise:
S1.1 filters out part host using oversold mechanism and/or diversification strategies, and acquisition can dispose Host List;
S1.2 disposes Host List based on described, according to the load on host computers of the monitoring resource result of container cloud acquisition, master Machine performance indicator and corresponding weight carry out resource sequence, to obtain the deployed position of the current scheduling task.
The embodiment of the present invention carries out prescreening (Pre-Screen) to host by step S1.1, is limited by oversold, dispersion System strategy filters out the host that a part does not meet demand in advance, can reduce complexity when scheduling of resource calculates in this way, add Fast schedule speed;It is ranked up by step S1.2, it is one that sequence, which is screening again for previous step prescreening process, It is excellent it is middle select excellent concept, by load on host computers and host performance index and respective weights, finally calculate a rank value, according to The sequence of rank value finally obtains optimal deployed position.
The bottom of the embodiment of the present invention is to dispatch the host cluster shared in resource pool, and pool rank is supported to be isolated firmly, As online service from database/caching example deployment in different physical machine clusters;Support the soft isolation of resource, such as online clothes It is engaged in the deployment of offline task interspersion, is isolated by mechanism such as cgroups, and weight is arranged according to the present load of each host.
Oversold mechanism described in the embodiment of the present invention refers to that the resource reported exceeds the practical money of oneself when reporting resource Source amount;If the CPU of a node is 8C, by oversold, when reporting resource, 16C etc. is reported.The diversification strategies refer to root According to the position of node, carries out across computer room, across rack deployment, be a kind of deployment of dispersion.
In an alternative embodiment, the S1.1 filters out part master using oversold mechanism and/or diversification strategies Machine, acquisition can dispose Host List, further comprise:
Oversold is arranged to switch, and different scheduler tasks is arranged different oversold coefficients;
The Host List in container cloud resource pond is obtained based on the oversold mechanism and/or diversification strategies;
Based on the Host List, selection, which meets, can dispose Host List described in the host addition of preset condition.Wherein, institute Stating preset condition can be arranged according to specific application demand, and the embodiment of the present invention is not construed as limiting this.
The embodiment of the present invention uses oversold mechanism in the prescreening stage, is guaranteed by setting oversold switch and oversold coefficient The stability of system business.Major applications can be divided into two class resources, dynamic resource for the demand of resource in production (CPU and IO etc.) and static resource (memory and disk etc.).Different oversold coefficients is set for different business, for core system Higher weights coefficient is arranged in system.
Meanwhile the high availability in order to guarantee business, using dispersion deployment by the way of guarantee using across computer room, across rack, Across host deployments, the high availability of applied business can effectively improve.With the expansion of physical cluster scale, host failure frequency It is secondary also to correspondingly increase.If all examples of an online service are all deployed on the same host, the same rack etc., It is likely to occur to service after host delay machine whole unavailable, this is that we are unacceptable.When carrying out using deployment, in phase Under same interchanger or rack, the quantity of example is limited to avoid service caused by network problem unavailable.The prescreening stage Scheduling flow figure it is as shown in Figure 4.
In an alternative embodiment, the S1.2 disposes Host List based on described, according to the resource of container cloud Load on host computers, host performance index and the corresponding weight that monitored results obtain carry out resource sequence, further comprise:
Host List is disposed based on described, load on host computers is obtained and is alternately led less than the host of the first preset threshold Machine;By the way that the first preset threshold is arranged, it is compared, lower host will be loaded and be directly added into alternate list.
Based on the alternative host, the load score value Score of each host is obtained using following formulai:
icorei=K1 × Mericscpu+K2×Mericsmem+K3×Mericsio,
Wherein, MericscpuFor cpu load, MericsmemFor Memory load and MericsioFor I/O load, K1, K2 and K3 is respectively the weight of cpu load, Memory load and I/O load;
Load score value based on each host carries out resource sequence, obtains described in the higher host conduct of load score value The deployed position of current scheduling task.
The embodiment of the present invention comprehensively considers many index, such as host average load, CPU, memory factor.Resource elasticity tune Degree system can obtain the system monitoring data of host from monitoring system, include the indexs such as CPU, Memory, IO.For negative Carrying lower host can pay the utmost attention to, if load is lower to be directly added into alternate list.Some higher hosts of load, property Can decline, processing capacity dies down, to service can continuity cannot be guaranteed.And then CPU, Memory, IO factor are carried out comprehensive It closes and considers.When calculating the load score value of a host, the weight of cpu load, Memory load and I/O load can be according to practical feelings Condition or processing strategie and flexible setting.Preferably, it can be used etc. than weight, i.e. K1=K2=K3=1/3, then above formula can indicate Are as follows:
Since the load data in the embodiment of the present invention is obtained according to the monitoring resource of container cloud, MericsiTable Show the index in the percentage of current time.Wherein the scheduling flow figure of phase sorting is as shown in Figure 5.
In an alternative embodiment, in the S2, it is based on the deployed position, utilizes the host in container cloud resource pond Machine carries out Real-Time Scheduling, gives the corresponding resource allocation of the deployed position to the current scheduling task, further comprises:
Monitoring resource based on container cloud is as a result, extending instance number and/or adjusting the resource distribution of example;
The host in container cloud resource pond distributes to the corresponding example resource of deployed position of the current scheduling task The current scheduling task.
Example described in the embodiment of the present invention refers to application example.In container cloud field, application example be exactly start it is some Encapsulate the docker container of application.
In the embodiment of the present invention, in scheduler task interspersion, the Exector on host can monitor host money Some fluctuations in source, dynamically dispatch service deployment, guarantee line service it is normal under the premise of, pass through expanded application example Quantity dynamically to increase the resource in line service.The host in container cloud resource pond is by the deployment of the current scheduling task The corresponding example resource in position distributes to the current scheduling task.
As previously mentioned, scheduler task include one of online task, offline task, timed task and batch processing task or It is a variety of;
The monitoring resource based on container cloud is as a result, extending instance number and/or adjusting the resource distribution of example, further Include:
Host is according to the monitoring resource as a result, utilizing this group of planes resource expansion instance number;
If the online task is in peak flow or host load more than the second preset threshold, the host is adjusted The memory or CPU quota of batch processing task or offline task on machine.
Since the possibility of each scheduler task processing priority is different, for example, online task than offline task priority more Height needs acquisition resource more rapidly more preferably, therefore online task is in peak flow or host load is pre- more than second If when threshold value, adjusting the memory or CPU quota of the batch processing task on the host or offline task.
In an alternative embodiment, the load score value based on each host carries out resource sequence, obtains Load deployed position of the higher host of score value as the current scheduling task, comprising:
Load score value based on each host carries out resource sequence, obtains the higher top n host of load score value and makees For the deployed position of the current scheduling task, wherein N is integer, and N is more than or equal to 1;
The load score value based on each host carries out resource sequence, obtains the load higher host conduct of score value The deployed position of the current scheduling task, later further include: successively to the corresponding host application resource of the N number of host; If host is all refused, scheduling is re-started according to the global resource in container cloud resource pond and is calculated.
In a specific embodiment, if two scheduler tasks are based on share resource state applies for some host simultaneously Upper same resource, then host Executor can inform the sequence of message in the message queue according to itself to handle, resource It arrives first and first obtains.When message queue length is more than the upper limit, host Executor can actively inform scheduler task, and queue has been expired;This When scheduler task will continue to the host Executor of next alternative resource attempt apply, increase concurrent dynamics.Work as scheduling Calculating process decision goes out one can be after deployed position list according to the good resource of scheduling rank weight sequencing, and scheduler task can take negative The top n element for carrying score value sequence, successively to corresponding host Executor application resource, until host Executor is returned Return approval (dispatching successfully);If the top n taken out is rejected, scheduler task needs to share shape according to new global resource pond State dispatches calculating again.
A kind of resource regulating method of container cloud described in the embodiment of the present invention, can obtain following purposes or effect:
1) when cluster scale is excessive, scheduling of resource may be more frequent, can be subtracted using prescreening and rank scoring Few resource request conflict, improves the oncurrent processing ability of scheduling system, gives accordingly resource request in time.
2) dynamic resource allocation carries out Real-Time Scheduling for different types of service using in mixed deployment mode, Check the resource service condition on host.To some in line service or the operation system of core, host resource alert When, the resource accounting of offline business or non-core services can be dynamically reduced, guarantees the normal fortune in line service and core business Row.The resource utilization of data center is substantially improved.
The embodiment of the present invention is enable to respond quickly service resources demand, under the premise of guaranteeing that business operates normally, improves whole The resource utilization at volume data center.Using request queue length on each host as reference value, locate in a parallel fashion High concurrent resource request is managed, computational efficiency can be accelerated, and situations such as according to load on host computers, obtains the host of locally optimal solution. The mechanism of oversold and dispersion simultaneously, reduces the complexity of calculating.It, can be real-time in the offline and scene of online service interspersion Dispatch the resource quota of different task, the preferential normal operation for guaranteeing online service.With very strong practicability and scalability, it is Technological highlights should give protection.
The embodiment of the present invention considers that money cannot quickly be dynamically distributed by compensating in conventional data centers from production actual demand Source and the relatively low defect of whole resource utilization.The robustness for substantially increasing data center, in large-scale cluster and on a large scale , can be to high concurrent in the scene of application, shortage of resources problem caused by high flow capacity or burst flow quickly guarantees business It operates normally.The intelligent dispatching algorithm being previously mentioned in this programme simultaneously carries out underlying resource host using oversold and dispersal mechanism Prescreening, reduce when request resource some unnecessary computation complexities, accelerate schedule speed, timely respond to resource need It asks.The robustness in data center is substantially increased, and there is very strong practicability and scalability.
Fig. 6 shows a kind of structural block diagram of the scheduling of resource equipment of container cloud of the embodiment of the present invention.
Referring to Fig. 6, the equipment, comprising: processor (processor) 501, memory (memory) 502 and bus 503;
Wherein, the processor 501 and memory 502 complete mutual communication by the bus 503;
The processor 501 is used to call the program instruction in the memory 502, to execute above-mentioned each method embodiment Provided method, for example, obtain current scheduling task, the monitoring resource based on container cloud is scheduled calculating, obtains The deployed position of the current scheduling task;Based on the deployed position of the current scheduling task, container cloud resource pond is utilized Host carries out Real-Time Scheduling.
Another embodiment of the present invention discloses a kind of computer program product, and the computer program product is non-including being stored in Computer program in transitory computer readable storage medium, the computer program include program instruction, when described program refers to When order is computer-executed, computer is able to carry out method provided by above-mentioned each method embodiment, for example, obtains current Scheduler task, the monitoring resource based on container cloud are scheduled calculating, obtain the deployed position of the current scheduling task;It is based on The deployed position of the current scheduling task carries out Real-Time Scheduling using the host in container cloud resource pond.
Another embodiment of the present invention provides a kind of non-transient computer readable storage medium, the non-transient computer is readable Storage medium stores computer instruction, and the computer instruction executes the computer provided by above-mentioned each method embodiment Method, for example, obtain current scheduling task, the monitoring resource based on container cloud is scheduled calculating, obtains described current The deployed position of scheduler task;Based on the deployed position of the current scheduling task, using container cloud resource pond host into Row Real-Time Scheduling.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through The relevant hardware of program instruction is completed, and program above-mentioned can be stored in a computer readable storage medium, the program When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes: ROM, RAM, magnetic disk or light The various media that can store program code such as disk.
The embodiments such as the scheduling of resource equipment of container cloud described above are only schematical, wherein described be used as is divided Unit from part description may or may not be physically separated, component shown as a unit can be or It may not be physical unit, it can it is in one place, or may be distributed over multiple network units.It can basis It is actual to need that some or all of the modules therein is selected to achieve the purpose of the solution of this embodiment.Ordinary skill people Member is without paying creative labor, it can understands and implements.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can It realizes by means of software and necessary general hardware platform, naturally it is also possible to pass through hardware.Based on this understanding, on Stating technical solution, substantially the part that contributes to existing technology can be embodied in the form of software products in other words, should Computer software product may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, CD, including several fingers It enables and using so that a computer equipment (can be personal computer, server or the network equipment etc.) executes each implementation Method described in certain parts of example or embodiment.
Finally, the present processes are only preferable embodiment, it is not intended to limit the scope of the present invention.It is all Within the spirit and principles in the present invention, any modification, equivalent replacement, improvement and so on should be included in protection of the invention Within the scope of.

Claims (9)

1. a kind of resource regulating method of container cloud characterized by comprising
S1, obtains current scheduling task, and the monitoring resource result based on container cloud is scheduled calculating, obtains the current scheduling The deployed position of task;
S2 is based on the deployed position, Real-Time Scheduling is carried out using the host in container cloud resource pond, by the deployed position Corresponding resource allocation gives the current scheduling task.
2. the method as described in claim 1, which is characterized in that before the S1 further include:
S0 obtains Real-Time Scheduling task, and the scheduler task is written in scheduling request queue;
Correspondingly, acquisition current scheduling task described in S1 further comprises: current adjust is obtained from the scheduling request queue Degree task.
3. method according to claim 1 or 2, which is characterized in that in the S1, the monitoring resource knot based on container cloud Fruit is scheduled calculating, obtains the deployed position of the current scheduling task, further comprises:
S1.1 filters out part host using oversold mechanism and/or diversification strategies, and acquisition can dispose Host List;
S1.2 disposes Host List based on described, load on host computers, the host obtained according to the monitoring resource result of container cloud Energy index and corresponding weight carry out resource sequence, to obtain the deployed position of the current scheduling task.
4. method as claimed in claim 3, which is characterized in that the S1.1 is filtered using oversold mechanism and/or diversification strategies Fall part host, acquisition can dispose Host List, further comprise:
Oversold is arranged to switch, and different scheduler tasks is arranged different oversold coefficients;
The Host List in container cloud resource pond is obtained based on the oversold mechanism and/or diversification strategies;
Based on the Host List, selection, which meets, can dispose Host List described in the host addition of preset condition.
5. method as claimed in claim 4, which is characterized in that the S1.2 disposes Host List based on described, according to appearance Load on host computers, host performance index and the corresponding weight that the monitoring resource result of device cloud obtains carry out resource sequence, further Include:
Host List is disposed based on described, obtains host alternately host of the load on host computers less than the first preset threshold;
Based on the alternative host, the load score value Score of each host is obtained using following formulai:
Scorei=K1 × Mericscpu+K2×Mericsmem+K3×Mericsio, wherein MericscpuFor cpu load, MericsmemFor Memory load and MericsioFor I/O load, K1, K2 and K3 are respectively cpu load, Memory load and IO negative The weight of load;
Load score value based on each host carries out resource sequence, obtains the load higher host of score value as described current The deployed position of scheduler task.
6. method as claimed in claim 5, which is characterized in that in the S2, be based on the deployed position, provided using container cloud The host in source pond carries out Real-Time Scheduling, gives the corresponding resource allocation of the deployed position to the current scheduling task, into One step includes:
Monitoring resource based on container cloud is as a result, extending instance number and/or adjusting the resource distribution of example;
The host in container cloud resource pond distributes to the corresponding example resource of deployed position of the current scheduling task described Current scheduling task.
7. method as claimed in claim 5, which is characterized in that the load score value based on each host carries out resource Sequence obtains deployed position of the load higher host of score value as the current scheduling task, comprising:
Load score value based on each host carries out resource sequence, obtains the load higher top n host of score value as institute The deployed position of current scheduling task is stated, wherein N is integer, and N is more than or equal to 1;
The load score value based on each host carries out resource sequence, obtains described in the higher host conduct of load score value The deployed position of current scheduling task, later further include: successively to the corresponding host application resource of the N number of host;If place Host is all refused, then re-starts scheduling according to the global resource in container cloud resource pond and calculate.
8. method as claimed in claim 6, which is characterized in that scheduler task includes online task, offline task, timed task With one of batch processing task or a variety of;
The monitoring resource based on container cloud as a result, extension instance number and/or adjust example resource distribution, further wrap It includes:
Host is according to the monitoring resource as a result, utilizing this group of planes resource expansion instance number;
If the online task is in peak flow or host load more than the second preset threshold, adjust on the host Batch processing task or offline task memory or CPU quota.
9. a kind of scheduling of resource equipment of container cloud characterized by comprising
At least one processor;And
At least one processor being connect with the processor communication, in which:
The memory is stored with the program instruction that can be executed by the processor, and the processor calls described program to instruct energy Enough execute method as described in any of the claims 1 to 8.
CN201710811864.5A 2017-09-11 2017-09-11 A kind of resource regulating method and equipment of container cloud Pending CN109495398A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710811864.5A CN109495398A (en) 2017-09-11 2017-09-11 A kind of resource regulating method and equipment of container cloud

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710811864.5A CN109495398A (en) 2017-09-11 2017-09-11 A kind of resource regulating method and equipment of container cloud

Publications (1)

Publication Number Publication Date
CN109495398A true CN109495398A (en) 2019-03-19

Family

ID=65687420

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710811864.5A Pending CN109495398A (en) 2017-09-11 2017-09-11 A kind of resource regulating method and equipment of container cloud

Country Status (1)

Country Link
CN (1) CN109495398A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110289982A (en) * 2019-05-17 2019-09-27 平安科技(深圳)有限公司 Expansion method, device, computer equipment and the storage medium of container application
CN110311831A (en) * 2019-06-14 2019-10-08 平安科技(深圳)有限公司 System resource monitoring method and relevant device based on container cloud
CN110955524A (en) * 2019-11-27 2020-04-03 北京网聘咨询有限公司 Optimized scheduling method for server
CN111367632A (en) * 2020-02-14 2020-07-03 重庆邮电大学 Container cloud scheduling method based on periodic characteristics
CN111935321A (en) * 2020-10-12 2020-11-13 中国传媒大学 Converged media micro-service platform based on container cloud
CN112988390A (en) * 2021-03-22 2021-06-18 上海超级计算中心 Calculation power resource allocation method and device
WO2021179487A1 (en) * 2020-03-13 2021-09-16 平安科技(深圳)有限公司 Method for dynamically allocating cloud host to host machine, electronic apparatus, and storage medium
WO2021208184A1 (en) * 2020-04-13 2021-10-21 网宿科技股份有限公司 Method and system for calling-in and recovery of node traffic and central server
CN113703962A (en) * 2021-07-22 2021-11-26 北京华胜天成科技股份有限公司 Cloud resource allocation method and device, electronic equipment and storage medium
CN114039974A (en) * 2021-10-20 2022-02-11 支付宝(杭州)信息技术有限公司 Cloud container generation method and device, storage medium and electronic equipment
CN114070855A (en) * 2020-07-28 2022-02-18 中国电信股份有限公司 Resource allocation method, resource allocation device, resource allocation system, and storage medium
CN114868112A (en) * 2019-10-17 2022-08-05 华为云计算技术有限公司 Variable job resource representation and scheduling for cloud computing

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103248659A (en) * 2012-02-13 2013-08-14 北京华胜天成科技股份有限公司 Method and system for dispatching cloud computed resources
CN104010028A (en) * 2014-05-04 2014-08-27 华南理工大学 Dynamic virtual resource management strategy method for performance weighting under cloud platform
US20160014191A1 (en) * 2014-07-14 2016-01-14 Oracle International Corporation System and method for web container partitions in a multitenant application server environment
CN105979009A (en) * 2016-07-06 2016-09-28 乾云众创(北京)信息科技研究院有限公司 Method for automatically balancing increased load of cloud application container
CN106020930A (en) * 2016-05-13 2016-10-12 深圳市中润四方信息技术有限公司 Application container based application management method and system
CN106027328A (en) * 2016-05-13 2016-10-12 深圳市中润四方信息技术有限公司 Cluster monitoring method and system based on application container deployment
US20160330138A1 (en) * 2015-05-07 2016-11-10 Dell Products L.P. Selecting a cloud from a plurality of clouds for a workload

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103248659A (en) * 2012-02-13 2013-08-14 北京华胜天成科技股份有限公司 Method and system for dispatching cloud computed resources
CN104010028A (en) * 2014-05-04 2014-08-27 华南理工大学 Dynamic virtual resource management strategy method for performance weighting under cloud platform
US20160014191A1 (en) * 2014-07-14 2016-01-14 Oracle International Corporation System and method for web container partitions in a multitenant application server environment
US20160330138A1 (en) * 2015-05-07 2016-11-10 Dell Products L.P. Selecting a cloud from a plurality of clouds for a workload
CN106020930A (en) * 2016-05-13 2016-10-12 深圳市中润四方信息技术有限公司 Application container based application management method and system
CN106027328A (en) * 2016-05-13 2016-10-12 深圳市中润四方信息技术有限公司 Cluster monitoring method and system based on application container deployment
CN105979009A (en) * 2016-07-06 2016-09-28 乾云众创(北京)信息科技研究院有限公司 Method for automatically balancing increased load of cloud application container

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110289982A (en) * 2019-05-17 2019-09-27 平安科技(深圳)有限公司 Expansion method, device, computer equipment and the storage medium of container application
CN110289982B (en) * 2019-05-17 2022-08-23 平安科技(深圳)有限公司 Container application capacity expansion method and device, computer equipment and storage medium
CN110311831A (en) * 2019-06-14 2019-10-08 平安科技(深圳)有限公司 System resource monitoring method and relevant device based on container cloud
CN110311831B (en) * 2019-06-14 2022-03-25 平安科技(深圳)有限公司 Container cloud-based system resource monitoring method and related equipment
CN114868112A (en) * 2019-10-17 2022-08-05 华为云计算技术有限公司 Variable job resource representation and scheduling for cloud computing
CN110955524A (en) * 2019-11-27 2020-04-03 北京网聘咨询有限公司 Optimized scheduling method for server
CN111367632A (en) * 2020-02-14 2020-07-03 重庆邮电大学 Container cloud scheduling method based on periodic characteristics
CN111367632B (en) * 2020-02-14 2023-04-18 重庆邮电大学 Container cloud scheduling method based on periodic characteristics
WO2021179487A1 (en) * 2020-03-13 2021-09-16 平安科技(深圳)有限公司 Method for dynamically allocating cloud host to host machine, electronic apparatus, and storage medium
WO2021208184A1 (en) * 2020-04-13 2021-10-21 网宿科技股份有限公司 Method and system for calling-in and recovery of node traffic and central server
CN114070855B (en) * 2020-07-28 2024-04-12 中国电信股份有限公司 Resource allocation method, resource allocation device, resource allocation system, and storage medium
CN114070855A (en) * 2020-07-28 2022-02-18 中国电信股份有限公司 Resource allocation method, resource allocation device, resource allocation system, and storage medium
CN111935321A (en) * 2020-10-12 2020-11-13 中国传媒大学 Converged media micro-service platform based on container cloud
CN112988390A (en) * 2021-03-22 2021-06-18 上海超级计算中心 Calculation power resource allocation method and device
CN113703962A (en) * 2021-07-22 2021-11-26 北京华胜天成科技股份有限公司 Cloud resource allocation method and device, electronic equipment and storage medium
CN113703962B (en) * 2021-07-22 2023-08-22 北京华胜天成科技股份有限公司 Cloud resource allocation method and device, electronic equipment and storage medium
CN114039974A (en) * 2021-10-20 2022-02-11 支付宝(杭州)信息技术有限公司 Cloud container generation method and device, storage medium and electronic equipment
CN114039974B (en) * 2021-10-20 2024-05-31 支付宝(杭州)信息技术有限公司 Method and device for providing equipment service for user, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN109495398A (en) A kind of resource regulating method and equipment of container cloud
CN109347974B (en) Hybrid scheduling system for improving online service quality and cluster resource utilization rate
CN108519911A (en) The dispatching method and device of resource in a kind of cluster management system based on container
CN106445675B (en) B2B platform distributed application scheduling and resource allocation method
CN110221920B (en) Deployment method, device, storage medium and system
CN104503832B (en) A kind of scheduling virtual machine system and method for fair and efficiency balance
CN105871957B (en) Monitoring framework design method and monitoring server, agent unit, control server
CN110661842B (en) Resource scheduling management method, electronic equipment and storage medium
CN109901922A (en) A kind of container cloud resource method for optimizing scheduling of oriented multilayer service
CN108572873A (en) A kind of load-balancing method and device solving the problems, such as Spark data skews
CN111160873A (en) Batch processing device and method based on distributed architecture
CN108170517A (en) A kind of container allocation method, apparatus, server and medium
CN102521055A (en) Virtual machine resource allocating method and virtual machine resource allocating system
CN107291550A (en) A kind of Spark platform resources dynamic allocation method and system for iterated application
CN106713375A (en) Method and device for allocating cloud resources
CN115412501B (en) Multilayer collaborative reconfiguration stream processing method based on Flink
CN114296868A (en) Virtual machine automatic migration decision method based on user experience in multi-cloud environment
CN114816715A (en) Cross-region-oriented flow calculation delay optimization method and device
Rashmi et al. Enhanced load balancing approach to avoid deadlocks in cloud
CN104965762B (en) A kind of scheduling system towards hybrid task
Sharma et al. A Dynamic optimization algorithm for task scheduling in cloud computing with resource utilization
CN112559122A (en) Virtualization instance management and control method and system based on electric power special security and protection equipment
CN104298539B (en) Scheduling virtual machine and dispatching method again based on network aware
WO2022151951A1 (en) Task scheduling method and management system
CN113778627B (en) Scheduling method for creating cloud resources

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: 20190319