CN110287029A - A method of it is adjusted based on kubernetes container resource dynamic - Google Patents

A method of it is adjusted based on kubernetes container resource dynamic Download PDF

Info

Publication number
CN110287029A
CN110287029A CN201910566915.1A CN201910566915A CN110287029A CN 110287029 A CN110287029 A CN 110287029A CN 201910566915 A CN201910566915 A CN 201910566915A CN 110287029 A CN110287029 A CN 110287029A
Authority
CN
China
Prior art keywords
usage amount
pod
resource
resource usage
container
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
CN201910566915.1A
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 Asean Information Port Ltd By Share Ltd
Original Assignee
China Asean Information Port Ltd By Share 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 Asean Information Port Ltd By Share Ltd filed Critical China Asean Information Port Ltd By Share Ltd
Priority to CN201910566915.1A priority Critical patent/CN110287029A/en
Publication of CN110287029A publication Critical patent/CN110287029A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45583Memory management, e.g. access or allocation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a kind of methods based on the resource dynamic adjustment of kubernetes container, comprising: passes through the real-time container real resource usage amount of the index collection of server built in kubernetes to pod;It according to the real resource usage amount being collected into, is integrated, calculates separately and record the target resource usage amount of the container of the recommendation of pod;The resource situation information for persistently monitoring pod, pod is restarted;Request to create is intercepted when pod is restarted, and preceding aim resource usage amount is updated into the resource distribution of pod, and new pod is created with the configuration.Method based on the resource dynamic adjustment of kubernetes container of the invention, the resource request usage amount of kubernetes cluster minimum load unit pod is adjusted by dynamic, it can reduce the risk that container uses up memory and cpu starvation, improve the resource utilization of entire kubernetes cluster.

Description

A method of it is adjusted based on kubernetes container resource dynamic
Technical field
The present invention relates to the operation control technology fields of software application, especially a kind of to be based on kubernetes container resource The method of dynamic adjustment.
Background technique
With the continuous development of cloud computing, container and Kubernetes have become the foundation stone of cloud native applications, Kubernetes is becoming vast Internet company and tradition IT industry carries out cloudization and simplifies the sharp weapon of O&M, in production ring Large scale deployment is obtained on border and is used by more and more companies.
Application load resource distribution is manually in pod creation just in advance into configuring one on existing kubernetes As will not all change in the life cycle entirely applied, such as need to change, restart pod after manually carrying out configuration modification, deposit In the disadvantage too strong to people's dependence.Also there is the horizontal automatic telescopic device (HPA) of the resource management pod based on software performance index, According to the cpu of currently running pod occupy and EMS memory occupation come the quantity of dynamic retractility pod, exist be not adapted dynamically it is each The shortcomings that resource occupation amount of pod, the quantity for only adjusting pod can not be accurately controlled the hardware resource utilization rate of node.
Summary of the invention
Goal of the invention of the invention is, in view of the above-mentioned problems, providing a kind of based on kubernetes container resource dynamic tune Whole method is the container dispatching method with time correlation based on Kubernetes container cluster management platform.
In order to achieve the above objectives, the technical scheme adopted by the invention is that:
A method of it is adjusted based on kubernetes container resource dynamic, the following steps are included:
S1, every preheating setting time, pass through the real-time container of the index collection of server built in kubernetes to pod Real resource usage amount;
S2, according to the real resource usage amount being collected into step S1, integrated, calculate separately and record pushing away for pod The target resource usage amount for the container recommended;
S3, the resource situation information for persistently monitoring pod, when the target resource usage amount of pod is configured higher or lower than container When the presetting numerical value of resource usage amount, or when memory occur within the presetting period use up the event for being forced to delete When, pod is restarted;
S4, request to create is intercepted when pod is restarted, and preceding aim resource usage amount is updated into the resource distribution to pod In, and new pod is created with the configuration.
As an option, step S2 specifically includes the following contents:
S21, the service condition information including CPU and memory usage amount for obtaining each pod in cluster, and carry out whole It closes;
S22, using margin algorithm and confidence algorithm, respectively obtain target resource usage amount, the usage amount upper limit And usage amount lower limit;It is specific as follows:
Target resource usage amount is calculated using margin algorithm, and margin algorithmic formula is as follows:
TargetRes ource=RecourceAmount* (1+marginFraction), wherein RecourceAmount is the real resource usage amount being collected into, and marginFraction is target resource resource usage amount than real The multiple that border resource usage amount has more;
The usage amount upper limit and usage amount lower limit all substitute into the superposition of confidence algorithm using by the result of margin algorithm It calculates and obtains;Confidence algorithmic formula is as follows:
ScaledResource=originalResource* (1+multiplier/confidence) ^exponent;
Wherein, originalResource is the result TargetResource of aforementioned margin algorithm;confidence For the data duration of acquisition;The usage amount upper limit and the multiplier value of usage amount lower limit are respectively 1 and 0.001;In usage amount Limit and the exponent value of usage amount lower limit are respectively 1 and -2;
S23, the target resource usage amount, the usage amount upper limit and usage amount lower numerical limit of the container of the recommendation of pod are updated It is stored in status field, prepares for down-stream.
As an option, step S3 specifically includes the following contents:
S31, the resource situation information that a pod is obtained every the t1 time;
S32, the event information that pod is obtained by the status field information of pod, as the presetting t2 started in pod Occurred to then follow the steps S35 when memory uses up the event for being forced to delete in period, it is no to then follow the steps S33;
S33, configuration resource usage amount information is obtained by the resource field information of pod, when the configuration resource of pod makes S35 is thened follow the steps when dosage is not between the aforementioned usage amount upper limit and usage amount lower limit, it is no to then follow the steps S34;
S34, the configuration resource usage amount of pod and preceding aim resource usage amount are compared, when configuration resource uses Measuring then terminates process when being less than presetting numerical value k with the gap ratio of target resource usage amount and exits, no to then follow the steps S35;
S35, pod is carried out to chase operation, executes pod reboot operation.
As an option, the particular content of step S4 is as follows:
The new pod that creates that S41, interception are sent to kubernetes application programming interface server is requested;
S42, using target resource usage amount as pod resou rce request usage amount update to pod resource distribution In, and modified pod resource allocation information is sent to kubernetes application programming interface server, it completes new The creation of pod.
Due to the adoption of the above technical scheme, the invention has the following advantages:
Method based on the resource dynamic adjustment of kubernetes container of the invention, adjusts kubernetes collection by dynamic The resource request usage amount of group's minimum load unit pod, reduces the cost of manual maintenance;By the inventive method, can reduce Container uses up the risk of memory and cpu starvation, improves the resource utilization of entire kubernetes cluster.
Detailed description of the invention
Fig. 1 is step block diagram of the invention.
Fig. 2 is the process flow diagram of one embodiment of the invention.
Fig. 3 is the use block diagram of one embodiment of the invention.
Fig. 4 is the structural block diagram of one embodiment of the invention.
Specific embodiment
It is further illustrated below in conjunction with specific implementation of the attached drawing to invention.
As shown in Figure 1, a kind of method based on the resource dynamic adjustment of kubernetes container, comprising the following steps:
Step S1, every preheating setting time, pass through the index collection of server built in kubernetes to the real-time of pod Container real resource usage amount.Preheating setting time t0 is configurable value, and default value is 1 minute.
Step S2, it according to the real resource usage amount being collected into step S1, is integrated, calculates separately and record pod Recommendation container target resource usage amount.
In one example, step S2 specifically includes the following contents:
S21, the service condition information including CPU and memory usage amount for obtaining each pod in cluster, and carry out whole It closes;
S22, using margin algorithm and confidence algorithm, respectively obtain target resource usage amount, the usage amount upper limit And usage amount lower limit;It is specific as follows:
Target resource usage amount is calculated using margin algorithm, and margin algorithmic formula is as follows:
TargetRes ource=RecourceAmount* (1+marginFraction), wherein RecourceAmount is the real resource usage amount being collected into, and marginFraction is target resource resource usage amount than real The multiple that border resource usage amount has more;
The usage amount upper limit and usage amount lower limit all substitute into the superposition of confidence algorithm using by the result of margin algorithm It calculates and obtains;Confidence algorithmic formula is as follows:
ScaledResource=originalResource* (1+multiplier/confidence) ^exponent;
Wherein, originalResource is the result TargetResource of aforementioned margin algorithm;confidence For the data duration of acquisition;The usage amount upper limit and the multiplier value of usage amount lower limit are respectively 1 and 0.001;In usage amount Limit and the exponent value of usage amount lower limit are respectively 1 and -2;
S23, the target resource usage amount, the usage amount upper limit and usage amount lower numerical limit of the container of the recommendation of pod are updated It is stored in status field, prepares for down-stream.
Step S3, the resource situation information for persistently monitoring pod, when the target resource usage amount of pod is higher or lower than container When configuring the presetting numerical value of resource usage amount, or when memory occur within the presetting period using up to be forced to delete When event, pod is restarted.
Step S3 specifically includes the following contents:
S31, the resource situation information that a pod is obtained every the t1 time;
S32, the event information that pod is obtained by the status field information of pod, as the presetting t2 started in pod Occurred to then follow the steps S35 when memory uses up the event for being forced to delete in period, it is no to then follow the steps S33;
S33, configuration resource usage amount information is obtained by the resource field information of pod, when the configuration resource of pod makes S35 is thened follow the steps when dosage is not between the aforementioned usage amount upper limit and usage amount lower limit, it is no to then follow the steps S34;
S34, the configuration resource usage amount of pod and preceding aim resource usage amount are compared, when configuration resource uses Measuring then terminates process when being less than presetting numerical value k with the gap ratio of target resource usage amount and exits, no to then follow the steps S35;
S35, pod is carried out to chase operation, executes pod reboot operation.
It wherein, is comprising endpoint value between the usage amount upper limit and usage amount lower limit of step S33, e.g., target resource makes The 90% of dosage is less than configuration resource usage amount and is less than the 110% of target resource usage amount.Gap ratio is target resource use Amount is higher or lower than the ratio of container configuration resource usage amount.In one example, t1 is configurable value, and default value is 1 minute; T2 is configurable value, and default value is 10 minutes;K is configurable value, default value 10%.
Step S4, request to create is intercepted when pod is restarted, and preceding aim resource usage amount is updated into the resource to pod In configuration, and new pod is created with the configuration.
In one example, the particular content of step S4 is as follows:
The new pod that creates that S41, interception are sent to kubernetes application programming interface server is requested;
S42, using target resource usage amount as pod resource request usage amount update to pod resource distribution In, and modified pod resource allocation information is sent to kubernetes application programming interface server, it completes new The creation of pod.Wherein, resource be have Resource field at container, then next stage has CPU, MEMORY, then Next stage is request, that is, the request usage amount of cpu and memory.
Based on the method for aforesaid receptacle resource dynamic adjustment, a kind of vertical automatic telescopic device (VPA) of Pod container group is constituted, Including acquisition module, nominator's module, renovator module and admission controller module.It is following will be to the vertical automatic telescopic of container group Explanation is unfolded in the modules of device, and not most place refers to aforementioned.
Acquisition module: for passing through the index service built in kubernetes every preheating setting time (as every 1 minute) Device collects the real-time container real resource usage amount of pod.
Nominator's module: for being integrated, calculating separately and record pod according to the real resource usage amount being collected into Recommendation container target resource usage amount.
Renovator module: for persistently monitoring the resource situation information of pod, be higher than when the target resource usage amount of pod or When configuring the presetting numerical value of resource usage amount (such as gap ratio is less than 10%) lower than container, or when in the presetting period It is interior occurred (in such as 10 minutes) memory use up be forced delete event when, pod is restarted.
Admission controller module: it is updated for intercepting request to create when pod is restarted, and by preceding aim resource usage amount Into the resource distribution of pod, and new pod is created with the configuration.
It is following to will be further illustrated.
As shown in figs 2-4.For present embodiment using 3 Master Node as control node, control node is not responsible Workload is run, the component of only some kubernetes is operated in above in the form of container, including application programming interfaces Server (API Server), controller management control centre (Controller Manager), scheduler (Scheduler).
API Server on each Master Node can be connect with distributed data base etcd, for each in cluster Kind resource distribution and state storage.
As shown in figure 3, in dotted line frame be innovation realization of the present invention the vertical automatic telescopic device (VPA) of Pod container group, can With in cluster arbitrary node run.
Wherein, API Server and Metrics Server is the subsidiary component of kubernetes cluster, can be by cluster Interior resource service condition is exposed by kubernetes API form, other modules is facilitated to acquire.Pod is The minimum load unit of kubernetes cluster, the usually application load in cluster.
As shown in Fig. 2, should be comprised the steps of based on the method for kubernetes container resource dynamic adjustment:
Step 1 is executed, can execute this primary step per presetting time interval, recommender (nominator) is from API Server collects the resource usage amount of pod, passes through the available target of many algorithms (target) usage amount, the usage amount upper limit (upperbound), usage amount lower limit (lowerbound), and be arranged into VPA API object.It is wherein " presetting Time interval " period configuring when being recommender starting, be defaulted as 1 minute.
In conjunction with Fig. 4, the step specifically:
Each VPA that the vertical automatic telescopic controller of step 11. container group (VPA Controller) obtains in cluster refers to To pod resource usage amount situation, including CPU usage amount and memory usage amount, and integrated.VPA resource is provided with pod Source binding, in general 1 VPA can bind the pod of several same types.
Step 12.Recommender calculates the resource usage amount data after integration by many algorithms, wherein mesh It marks usage amount and margin algorithm is used only, formula is as follows:
TargetResource=RecourceAmount* (1+marginFraction)
Wherein, marginFraction defaults value 0.15, and RecourceAmount is collected reality in step 11 Resource usage amount.It can be understood as 1.15 times that target resource usage amount is real resource usage amount.
The amount of the being recommended to use upper limit and the calculation method of the amount of being recommended to use lower limit are that the result of margin algorithm substitutes into Confidence algorithm, wherein the formula of confidence algorithm is as follows:
ScaledResource=originalResource* (1+multiplier/confidence) ^exponent
Wherein, it is one that originalResource, which is the result TargetResource, confidence of margin algorithm, A value for describing confidence level, for the data duration (day) of acquisition;The multiplier of the usage amount upper limit is 1, usage amount lower limit Multiplier is 0.001;The exponent of the usage amount upper limit is 1, and the exponent of usage amount lower limit is -2.It is known that adopting The data duration of collection is longer, and data are more credible, and the bound of resource usage amount is narrower.
It is the use of other modules in the status field that 3 of calculating are recommended numerical value to update deposit VPA by step 13. It prepares.
Step 2 is executed, renovator (updater) monitors the information of (watch) all pod for possessing VPA, including configuration Resource request number information, memory exhaust (OOM) event information etc., these comprehensive situations finally judge whether to execute the pod's Update operation.
In conjunction with Fig. 4, the step specifically:
Renovator inside the vertical automatic telescopic controller of step 21. container group is from the status acquisition of information of the pod pod The event that memory exhausts (OOM) and is terminated whether occurred in 10 minutes of starting, in case of mistake, executes step 24, such as Fruit did not occurred, and executed step 22.
If the usage amount of the resource usage amount information of the resource field configuration of step 22.pod not in step 12 Between the upper limit and usage amount lower limit, then step 24 is directly executed, it is no to then follow the steps 23.
The target usage amount recorded in the resource usage amount and step 12VPA of the resource field configuration of step 23.pod It compares, it is no to then follow the steps 24 if do not operated to pod with target usage amount gap ratio less than 10%.
Pod is expelled (evict) to operate by step 24., and controller of pod such as copy set replicaSet etc. can incite somebody to action Pod is restarted, so that new resource usage amount comes into force.
As shown in figure 4, vertical automatic telescopic controller admission controller (the VPA Admission of container group It Controller is) that the one of of kubernetes admission controller MutatingAdmissionWebhook realizes, it Essence is a network hook (webhook), can first call the webhook to execute one before specified request reaches API Server A little operations may carry out some changes to the resource distribution of operation, in this embodiment it is that the request to create of pod has been intercepted, It is added to new resource usage amount information, then carries out the creation of pod.
Execute step 3, vertical automatic telescopic controller admission controller (the VPA Admission of container group Controller request to create) can be intercepted when pod is restarted, and more by the recommendation resource usage amount being recorded in VPA in step 1 Newly into the resource distribution of pod, and new pod is created with the configuration.
As above-mentioned, the resource request usage amount of kubernetes cluster minimum load unit pod is adjusted by dynamic, it can The risk that container uses up memory and cpu starvation is reduced, the resource utilization of entire kubernetes cluster is improved.Have following Advantage:
1, it because Pod resource request value is adapted dynamically, is entirely capable of needed for it, so kubernetes clustered node makes It is improved with efficiency.
2, Pod can be arranged on the kubernetes clustered node with appropriate available resources.
3, time-consuming benchmark test task need not be run to determine the right value of CPU and memory request.
4, VPA can adjust at any time CPU and memory request according to using operating condition, without manually performing any operation, So maintenance time is reduced.
Above description is the detailed description for the present invention preferably possible embodiments, but embodiment is not limited to this hair Bright patent claim, it is all the present invention suggested by technical spirit under completed same changes or modifications change, should all belong to In the covered the scope of the patents of the present invention.

Claims (10)

1. a kind of method based on the resource dynamic adjustment of kubernetes container, which comprises the following steps:
S1, every preheating setting time, the real-time container for passing through the index collection of server built in kubernetes to pod is practical Resource usage amount;
S2, according to the real resource usage amount being collected into step S1, integrated, calculate separately and record the recommendation of pod The target resource usage amount of container;
S3, the resource situation information for persistently monitoring pod configure resource when the target resource usage amount of pod is higher or lower than container When the presetting numerical value of usage amount, or when memory occurring within the presetting period using up the event for being forced to delete, Pod is restarted;
S4, request to create is intercepted when pod is restarted, and preceding aim resource usage amount is updated into the resource distribution of pod, and New pod is created with the configuration.
2. a kind of method based on the resource dynamic adjustment of kubernetes container according to claim 1, it is characterised in that: The step S2 specifically includes the following contents:
S21, the service condition information including CPU and memory usage amount for obtaining each pod in cluster, and are integrated;
S22, using margin algorithm and confidence algorithm, respectively obtain target resource usage amount, the usage amount upper limit and make Dosage lower limit;It is specific as follows:
Target resource usage amount is calculated using margin algorithm, and formula is as follows:
TargetResource=RecourceAmount* (1+marginFraction), wherein RecourceAmount is to receive The real resource usage amount collected, marginFraction are what target resource resource usage amount had more than real resource usage amount Multiple;
The usage amount upper limit and usage amount lower limit all substitute into confidence algorithm superposition calculation using by the result of margin algorithm And obtain, formula is as follows:
ScaledResource=originalResource* (1+multiplier/confidence) ^exponent;
Wherein, originalResource is the result TargetResource of aforementioned margin algorithm;Confidence is to adopt The data duration of collection;The usage amount upper limit and the multiplier value of usage amount lower limit are respectively 1 and 0.001;The usage amount upper limit and The exponent value of usage amount lower limit is respectively 1 and -2;
S23, the target resource usage amount, the usage amount upper limit and usage amount lower numerical limit of the container of the recommendation of pod are updated into deposit In status field, prepare for down-stream.
3. a kind of method based on the resource dynamic adjustment of kubernetes container according to claim 2, it is characterised in that: The step S3 specifically includes the following contents:
S31, the resource situation information that a pod is obtained every the t1 time;
S32, the event information that pod is obtained by the status field information of pod, when the presetting t2 time started in pod Occurred to then follow the steps S35 when memory uses up the event for being forced to delete in section, it is no to then follow the steps S33;
S33, configuration resource usage amount information is obtained by the resource field information of pod, when the configuration resource usage amount of pod S35 is thened follow the steps when not between the aforementioned usage amount upper limit and usage amount lower limit, it is no to then follow the steps S34;
S34, the configuration resource usage amount of pod and preceding aim resource usage amount are compared, when configuration resource usage amount with The gap ratio of target resource usage amount then terminates process and exits when being less than presetting numerical value k, no to then follow the steps S35;
S35, pod is carried out to chase operation, executes pod reboot operation.
4. a kind of method based on the resource dynamic adjustment of kubernetes container according to claim 3, it is characterised in that: In the step S3, t1 is configurable value, and default value is 1 minute;T2 is configurable value, and default value is 10 minutes;K is can The value of configuration, default value 10%.
5. a kind of method based on the resource dynamic adjustment of kubernetes container according to claim 1, it is characterised in that: The particular content of the step S4 is as follows:
The new pod that creates that S41, interception are sent to kubernetes application programming interface server is requested;
S42, it updates target resource usage amount as the request usage amount of pod resource into the resource distribution of pod, and Modified pod resource allocation information is sent to kubernetes application programming interface server, completes the wound of new pod It builds.
6. a kind of vertical automatic telescopic device of Pod container group, it is characterised in that: including the following contents:
Acquisition module: for passing through the index collection of server built in kubernetes to the real-time of pod every preheating setting time Container real resource usage amount;And
Nominator's module: for being integrated, calculating separately and record pushing away for pod according to the real resource usage amount being collected into The target resource usage amount for the container recommended;And
Renovator module: for persistently monitoring the resource situation information of pod, when the target resource usage amount of pod is higher or lower than When container configures resource usage amount presetting numerical value, or when memory occur within the presetting period using up to be forced to delete When the event removed, pod is restarted;And
Admission controller module: it is arrived for intercepting request to create when pod is restarted, and by the update of preceding aim resource usage amount In the resource distribution of pod, and new pod is created with the configuration.
7. a kind of vertical automatic telescopic device of Pod container group according to claim 6, it is characterised in that: nominator's mould The particular content of block is as follows:
For obtaining the service condition information including CPU and memory usage amount of each pod in cluster, and integrated;With And
Using margin algorithm and confidence algorithm, target resource usage amount, the usage amount upper limit and usage amount are respectively obtained Lower limit;It is specific as follows:
Target resource usage amount is calculated using margin algorithm, and margin algorithmic formula is as follows:
TargetResource=RecourceAmount* (1+marginFraction), wherein RecourceAmount is to receive The real resource usage amount collected, marginFraction are what target resource resource usage amount had more than real resource usage amount Multiple;
The usage amount upper limit and usage amount lower limit all substitute into confidence algorithm superposition calculation using by the result of margin algorithm And it obtains;Confidence algorithmic formula is as follows:
ScaledResource=originalResource* (1+multiplier/confidence) ^exponent;
Wherein, originalResource is the result TargetResource of aforementioned margin algorithm;Confidence is to adopt The data duration of collection;The usage amount upper limit and the multiplier value of usage amount lower limit are respectively 1 and 0.001;The usage amount upper limit and The exponent value of usage amount lower limit is respectively 1 and -2;And
The target resource usage amount, the usage amount upper limit and usage amount lower numerical limit of the container of the recommendation of pod are updated into deposit In status field, prepare for down-stream.
8. a kind of vertical automatic telescopic device of Pod container group according to claim 7, it is characterised in that: the renovator mould The particular content of block is as follows:
For obtaining the resource situation information of a pod every the t1 time;And
The event information that pod is obtained by the status field information of pod, when within the presetting t2 period that pod starts Occurred memory use up be forced delete event when, then by pod carry out expulsion execute pod reboot operation;And it is if presetting The t2 period in do not occur memory use up be forced delete event then further include the following contents,
Configuration resource usage amount information is obtained by the resource field information of pod, when the configuration resource usage amount of pod does not exist When between the aforementioned usage amount upper limit and usage amount lower limit, then pod is subjected to expulsion and executes pod reboot operation;And if configuration money Source usage amount then further includes the following contents between the aforementioned usage amount upper limit and usage amount lower limit,
The configuration resource usage amount of pod and preceding aim resource usage amount are compared, when configuration resource usage amount and target The gap ratio of resource usage amount then terminates process and exits when being less than presetting numerical value k, and pod is otherwise carried out expulsion execution Pod reboot operation.
9. a kind of vertical automatic telescopic device of Pod container group according to claim 8, it is characterised in that: the renovator mould In block, t1 is configurable value, and default value is 1 minute;T2 is configurable value, and default value is 10 minutes;K is configurable Value, default value 10%.
10. a kind of vertical automatic telescopic device of the Pod container group according to claim 5 or 7, it is characterised in that: the access The particular content of controller module is as follows:
For intercepting the new pod request of creation for being sent to kubernetes application programming interface server;And
It updates target resource usage amount as the request usage amount of pod resource into the resource distribution of pod, and will repair Pod resource allocation information after changing is sent to kubernetes application programming interface server, completes the creation of new pod.
CN201910566915.1A 2019-06-27 2019-06-27 A method of it is adjusted based on kubernetes container resource dynamic Pending CN110287029A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910566915.1A CN110287029A (en) 2019-06-27 2019-06-27 A method of it is adjusted based on kubernetes container resource dynamic

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910566915.1A CN110287029A (en) 2019-06-27 2019-06-27 A method of it is adjusted based on kubernetes container resource dynamic

Publications (1)

Publication Number Publication Date
CN110287029A true CN110287029A (en) 2019-09-27

Family

ID=68007754

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910566915.1A Pending CN110287029A (en) 2019-06-27 2019-06-27 A method of it is adjusted based on kubernetes container resource dynamic

Country Status (1)

Country Link
CN (1) CN110287029A (en)

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110990121A (en) * 2019-11-28 2020-04-10 中国—东盟信息港股份有限公司 Kubernetes scheduling strategy based on application portrait
CN111158908A (en) * 2019-12-27 2020-05-15 重庆紫光华山智安科技有限公司 Kubernetes-based scheduling method and device for improving GPU utilization rate
CN111290768A (en) * 2020-01-22 2020-06-16 北京百度网讯科技有限公司 Updating method, device, equipment and medium for containerization application system
CN111506412A (en) * 2020-04-22 2020-08-07 上海德拓信息技术股份有限公司 Distributed asynchronous task construction and scheduling system and method based on Airflow
CN111708609A (en) * 2020-06-19 2020-09-25 中国—东盟信息港股份有限公司 Kubernetes container based implementation method and system for configuring dictionary and security dictionary
CN112000422A (en) * 2020-07-17 2020-11-27 苏州浪潮智能科技有限公司 Method and device for preventing POD memory overflow in container arrangement frame
CN112015433A (en) * 2020-08-28 2020-12-01 北京浪潮数据技术有限公司 Resource scheduling method and device, electronic equipment and storage medium
CN112099911A (en) * 2020-08-28 2020-12-18 中国—东盟信息港股份有限公司 Method for constructing dynamic resource access controller based on Kubernetes
CN112181603A (en) * 2020-10-26 2021-01-05 浪潮云信息技术股份公司 Controllable vertical automatic retractor implementation method and system in cloud environment
CN112181597A (en) * 2020-10-12 2021-01-05 成都精灵云科技有限公司 Dynamic updating method for use limit of container resource
CN112506444A (en) * 2020-12-28 2021-03-16 南方电网深圳数字电网研究院有限公司 Kubernetes cluster-based expansion and contraction capacity control method and device and electronic equipment
CN112559186A (en) * 2020-12-22 2021-03-26 北京云思畅想科技有限公司 Novel Kubernetes container resource expansion and contraction method
CN112783642A (en) * 2019-11-11 2021-05-11 阿里巴巴集团控股有限公司 In-container logic configuration method, device and computer readable medium
CN112783608A (en) * 2021-01-29 2021-05-11 上海哔哩哔哩科技有限公司 Method and device for adjusting container resources in container cluster
WO2021103790A1 (en) * 2019-11-26 2021-06-03 北京京东尚科信息技术有限公司 Container scheduling method and apparatus, and non-volatile computer-readable storage medium
WO2021103646A1 (en) * 2019-11-26 2021-06-03 华为技术有限公司 Pod deployment method and device
CN112925695A (en) * 2021-03-29 2021-06-08 浪潮云信息技术股份公司 Method for automatically updating configuration file for configuring fluent
CN113342461A (en) * 2021-05-31 2021-09-03 北京市商汤科技开发有限公司 Equipment mounting method and device, computer equipment and readable storage medium
CN113590415A (en) * 2021-06-30 2021-11-02 郑州云海信息技术有限公司 Port management system, method, device and medium of deep learning training platform
CN113872997A (en) * 2020-06-30 2021-12-31 华为技术有限公司 Container group POD reconstruction method based on container cluster service and related equipment
CN113938379A (en) * 2021-09-29 2022-01-14 浪潮云信息技术股份公司 Method for dynamically loading cloud platform log acquisition configuration

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109144727A (en) * 2018-08-21 2019-01-04 郑州云海信息技术有限公司 The management method and device of resource in cloud data system
CN109783218A (en) * 2019-01-24 2019-05-21 中国—东盟信息港股份有限公司 A kind of container dispatching method based on Kubernetes container cluster with time correlation connection

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109144727A (en) * 2018-08-21 2019-01-04 郑州云海信息技术有限公司 The management method and device of resource in cloud data system
CN109783218A (en) * 2019-01-24 2019-05-21 中国—东盟信息港股份有限公司 A kind of container dispatching method based on Kubernetes container cluster with time correlation connection

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
TOADER SEBASTIAN: "vertical Pod autoscaling", 《HTTPS://BANZAICLOUD.COM/BLOG/K8S-VERTICAL-POD-AUTOSCALER/》 *
WARMCHANG 等: "Vertical Pod Autoscaler", 《HTTPS://GITHUB.COM/KUBERNETES/COMMUNITY/BLOB/MASTER/CONTRIBUTORS/DESIGN-PROPOSALS/AUTOSCALING/VERTICAL-POD-AUTOSCALER.MD》 *

Cited By (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783642A (en) * 2019-11-11 2021-05-11 阿里巴巴集团控股有限公司 In-container logic configuration method, device and computer readable medium
WO2021103646A1 (en) * 2019-11-26 2021-06-03 华为技术有限公司 Pod deployment method and device
WO2021103790A1 (en) * 2019-11-26 2021-06-03 北京京东尚科信息技术有限公司 Container scheduling method and apparatus, and non-volatile computer-readable storage medium
CN110990121A (en) * 2019-11-28 2020-04-10 中国—东盟信息港股份有限公司 Kubernetes scheduling strategy based on application portrait
CN111158908A (en) * 2019-12-27 2020-05-15 重庆紫光华山智安科技有限公司 Kubernetes-based scheduling method and device for improving GPU utilization rate
CN111290768A (en) * 2020-01-22 2020-06-16 北京百度网讯科技有限公司 Updating method, device, equipment and medium for containerization application system
CN111290768B (en) * 2020-01-22 2023-10-20 北京百度网讯科技有限公司 Updating method, device, equipment and medium of containerized application system
CN111506412A (en) * 2020-04-22 2020-08-07 上海德拓信息技术股份有限公司 Distributed asynchronous task construction and scheduling system and method based on Airflow
CN111506412B (en) * 2020-04-22 2023-04-25 上海德拓信息技术股份有限公司 Airflow-based distributed asynchronous task construction and scheduling system and method
CN111708609A (en) * 2020-06-19 2020-09-25 中国—东盟信息港股份有限公司 Kubernetes container based implementation method and system for configuring dictionary and security dictionary
CN113872997B (en) * 2020-06-30 2022-08-26 华为技术有限公司 Container group POD reconstruction method based on container cluster service and related equipment
CN113872997A (en) * 2020-06-30 2021-12-31 华为技术有限公司 Container group POD reconstruction method based on container cluster service and related equipment
CN112000422B (en) * 2020-07-17 2022-08-05 苏州浪潮智能科技有限公司 Method and device for preventing POD memory overflow in container arrangement frame
CN112000422A (en) * 2020-07-17 2020-11-27 苏州浪潮智能科技有限公司 Method and device for preventing POD memory overflow in container arrangement frame
CN112015433A (en) * 2020-08-28 2020-12-01 北京浪潮数据技术有限公司 Resource scheduling method and device, electronic equipment and storage medium
CN112099911B (en) * 2020-08-28 2024-02-13 中国—东盟信息港股份有限公司 Method for constructing dynamic resource access controller based on Kubernetes
CN112099911A (en) * 2020-08-28 2020-12-18 中国—东盟信息港股份有限公司 Method for constructing dynamic resource access controller based on Kubernetes
CN112181597A (en) * 2020-10-12 2021-01-05 成都精灵云科技有限公司 Dynamic updating method for use limit of container resource
CN112181597B (en) * 2020-10-12 2024-01-19 成都精灵云科技有限公司 Dynamic updating method for container resource use limit
CN112181603A (en) * 2020-10-26 2021-01-05 浪潮云信息技术股份公司 Controllable vertical automatic retractor implementation method and system in cloud environment
CN112559186A (en) * 2020-12-22 2021-03-26 北京云思畅想科技有限公司 Novel Kubernetes container resource expansion and contraction method
CN112506444A (en) * 2020-12-28 2021-03-16 南方电网深圳数字电网研究院有限公司 Kubernetes cluster-based expansion and contraction capacity control method and device and electronic equipment
CN112783608A (en) * 2021-01-29 2021-05-11 上海哔哩哔哩科技有限公司 Method and device for adjusting container resources in container cluster
CN112925695A (en) * 2021-03-29 2021-06-08 浪潮云信息技术股份公司 Method for automatically updating configuration file for configuring fluent
CN113342461A (en) * 2021-05-31 2021-09-03 北京市商汤科技开发有限公司 Equipment mounting method and device, computer equipment and readable storage medium
CN113342461B (en) * 2021-05-31 2023-04-07 北京市商汤科技开发有限公司 Equipment mounting method and device, computer equipment and readable storage medium
CN113590415B (en) * 2021-06-30 2023-09-22 郑州云海信息技术有限公司 Port management system, method, equipment and medium of deep learning training platform
CN113590415A (en) * 2021-06-30 2021-11-02 郑州云海信息技术有限公司 Port management system, method, device and medium of deep learning training platform
CN113938379A (en) * 2021-09-29 2022-01-14 浪潮云信息技术股份公司 Method for dynamically loading cloud platform log acquisition configuration

Similar Documents

Publication Publication Date Title
CN110287029A (en) A method of it is adjusted based on kubernetes container resource dynamic
CN105049268B (en) Distributed computing resource distribution system and task processing method
US9112782B2 (en) Reactive auto-scaling of capacity
CN104579761B (en) A kind of nosql clusters automatic configuration system and method for automatic configuration based on cloud computing
CN107580023A (en) A kind of the stream process job scheduling method and system of dynamic adjustment task distribution
CN105338027B (en) Carry out the method, system and device of video data cloud storage
CN110659741A (en) AI model training system and method based on piece-splitting automatic learning
CN110413391A (en) Deep learning task service method for ensuring quality and system based on container cluster
US9058428B1 (en) Software testing using shadow requests
CN111399986A (en) Method and device for configuring Pod resource quota
CN102622303A (en) Memory overload control method and device
CN112445575B (en) Multi-cluster resource scheduling method, device and system
CN113010260A (en) Elastic expansion method and system for container quantity
CN112685153A (en) Micro-service scheduling method and device and electronic equipment
CN103701934A (en) Resource optimal scheduling method and virtual machine host machine optimal selection method
CN114035941A (en) Resource scheduling system, method and computing device
CN107291536A (en) Application task stream scheduling method under a kind of cloud computing environment
CN112365366A (en) Micro-grid management method and system based on intelligent 5G slice
CN107967175A (en) A kind of resource scheduling system and method based on multiple-objection optimization
CN109936471B (en) Multi-cluster resource allocation method and device
CN106850330A (en) Intelligentized cloud desktop Performance Test System and method
CN102026228A (en) Statistical method and equipment for communication network performance data
CN113568759B (en) Cloud computing-based big data processing method and system
CN107479974A (en) A kind of dispatching method of virtual machine and device
CN101212342B (en) Multi-version network element network management method

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