Nothing Special   »   [go: up one dir, main page]

CN116881012A - Container application vertical capacity expansion method, device, equipment and readable storage medium - Google Patents

Container application vertical capacity expansion method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN116881012A
CN116881012A CN202310913810.5A CN202310913810A CN116881012A CN 116881012 A CN116881012 A CN 116881012A CN 202310913810 A CN202310913810 A CN 202310913810A CN 116881012 A CN116881012 A CN 116881012A
Authority
CN
China
Prior art keywords
expanded
application
central processor
information
workload
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
CN202310913810.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.)
Guangdong Inspur Smart Computing Technology Co Ltd
Original Assignee
Guangdong Inspur Smart Computing Technology 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 Guangdong Inspur Smart Computing Technology Co Ltd filed Critical Guangdong Inspur Smart Computing Technology Co Ltd
Priority to CN202310913810.5A priority Critical patent/CN116881012A/en
Publication of CN116881012A publication Critical patent/CN116881012A/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/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
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the technical field of containers, in particular to a vertical capacity expansion method, a device, equipment and a readable storage medium for container application.

Description

Container application vertical capacity expansion method, device, equipment and readable storage medium
Technical Field
The present invention relates to the field of container technologies, and in particular, to a method, an apparatus, a device, and a readable storage medium for vertical expansion of container applications.
Background
The container technology Kubernetes (K8 s for short) is an open source and is used for managing containerized applications on multiple hosts in a cloud platform, the goal is to enable the application deploying containerization to be simple and efficient, and a mechanism for deploying, planning, updating and maintaining the applications is provided. The container group (Pod) is the smallest deployable unit in Kubernetes. A container group contains an application container (in some cases multiple containers), storage resources, a unique network IP address, and options to determine how the container should function. The container group represents an independent application running instance in Kubernetes, which may consist of a single container or several containers coupled closely together.
In a large number of business application scenarios, with container orchestration technology clouding, for some central processor (Central Processing Unit, CPU) sensitive applications, it is necessary to manually bind the central processor core for the central processor sensitive application when creating a container group to enable the central processor sensitive application to run on a high performance central processor core.
However, in the related art, the manner of binding the cpu core to the cpu sensitive application is still bound by the operation and maintenance personnel according to experience, which may not meet the actual requirement of the cpu sensitive application, and further, it cannot be ensured that the cpu sensitive application running on the container cluster can always run with high performance.
How to ensure the high-performance operation of the sensitive applications of the central processing unit on the container cluster is a technical problem to be solved by the person skilled in the art.
Disclosure of Invention
The invention aims to provide a vertical capacity expansion method, a device, equipment and a readable storage medium for a container application, which are used for guaranteeing high-performance operation of a central processing unit sensitive application on a container cluster.
In order to solve the above technical problems, the present invention provides a vertical expansion method for a container, including:
collecting CPU utilization information of the created workload application from each node of the container cluster;
invoking a central processor core binding recommendation algorithm designed in advance according to a scheduling strategy of the workload application to be expanded to a workload application to be expanded, wherein the workload application to be expanded has an overrun utilization rate of a central processor in the created workload application, so as to determine information of a vertical expansion central processor core for performing vertical expansion on the workload application to be expanded according to the central processor core topology information of each node;
and triggering the central processor core binding operation applied to the workload to be expanded according to the information of the vertical capacity expansion central processor core.
In some implementations, the calling, for the workload application to be expanded with the central processor utilization exceeding the limit in the created workload application, a central processor core binding recommendation algorithm designed in advance according to a scheduling policy of the workload application to be expanded, to determine information of a vertical expansion central processor core for performing vertical expansion for the workload application to be expanded according to central processor core topology information of each node, including:
and if the number of reserved cores of the workload application to be expanded is not zero, selecting the vertical expansion central processor core from the reserved cores of the workload application to be expanded by using the central processor core binding recommendation algorithm, and obtaining the information of the vertical expansion central processor core.
In some implementations, the number of reserved cores and the information of the reserved cores are parameters which are determined according to a central processor resource limit value of the workload application when the workload application is created and updated along with the vertical capacity expansion of the workload application.
In some implementations, the reserved core number is determined from a central processor resource limit of the workload application, specifically calculated by:
Reserved core number=max (1.5×cpu request ,2×λ);
Wherein the CPU request And the upper limit value of the CPU resource applied to the workload is lambda is an adjustable coefficient.
In some implementations, the triggering of the cpu core binding operation for the workload to be expanded according to the information of the vertical expansion cpu core includes:
if the workload application to be expanded is a single-node application and the workload application to be expanded corresponds to a plurality of container groups, the reconstruction of each container group is triggered in a time-sharing manner, and central processor core binding operation is executed on the reconstructed container groups according to the information of the vertical expansion central processor cores during reconstruction;
if the workload application to be expanded is a single-node application and corresponds to a single container group, sending information of overrun of a central processing unit of the workload application to be expanded to a user, triggering reconstruction of the container group after receiving an expansion command issued by the user, and executing central processing unit core binding operation on the reconstructed container group according to the information of the vertical expansion central processing unit core during reconstruction;
If the workload application to be expanded is a cross-node application and the utilization rate of the central processor of the workload application to be expanded on each corresponding node exceeds the limit, the reconstruction of the container group on each corresponding node of the workload application to be expanded is triggered in a time-sharing manner, and a central processor core binding operation is executed on the reconstructed container group according to the information of the vertical expansion central processor core during reconstruction;
and if the workload application to be expanded is a cross-node application and the central processing unit utilization rates of the workload application to be expanded on the corresponding nodes are not exceeded, reconstructing the corresponding container group on the node with the central processing unit utilization rate exceeding the limit corresponding to the workload application to be expanded, and executing central processing unit core binding operation on the reconstructed container group according to the information of the vertical expansion central processing unit core during reconstruction.
In some implementations, the triggering a cpu core binding operation for the workload to be expanded according to the information of the vertical expansion cpu core includes:
invoking daemon controller service of the container cluster, when triggering reconstruction of the container group corresponding to the workload application to be expanded, writing the corresponding central processor core binding information before the reconstruction of the container group and the information of the vertical expansion central processor core serving as the central processor core binding information into a container group template of the reconstructed container group, so as to read the central processor core binding information in the container group template and write the central processor core binding information into a binding core controller file of the container cluster when reconstructing the container group based on the updated container group template, thereby realizing the central processor core binding operation of the workload application to be expanded.
In some implementations, further comprising:
after receiving a workload application creation command, determining the reserved core number of the workload application to be created and the normal binding core number of the workload application to be created according to the central processor resource limit value of the workload application to be created in the workload application creation command;
applying the CPU core binding recommendation algorithm corresponding to the workload application to be created, and selecting reserved cores of each container group corresponding to the workload to be created and normal binding cores of each container group from idle CPU cores of the container cluster;
and recording the mapping relation between the reserved core and the container groups, and carrying out central processing unit core binding operation for the container groups when each container group is created according to the information of the normal binding core.
In some implementations, the triggering of the cpu core binding operation for the workload to be expanded according to the information of the vertical expansion cpu core includes:
pushing the information of the vertical capacity expansion central processing unit core to a user, and receiving the information of the vertical capacity expansion central processing unit core adjusted by the user;
And after the information of the vertical capacity expansion central processing unit core after adjustment is checked to pass, executing the central processing unit core binding operation for the workload application to be expanded according to the information of the vertical capacity expansion central processing unit core after adjustment.
In some implementations, collecting central processor utilization information for a created workload application from nodes of a container cluster includes:
invoking daemon controller services of said container cluster to collect central processor utilization information for said created workload application on each of said nodes;
invoking a dispatch controller service of the container cluster to write central processor utilization information of the created workload applications on the nodes into a status field of each of the created workload applications;
the method for calling the CPU core binding recommendation algorithm designed in advance according to the scheduling policy of the workload application to be expanded to determine the information of the vertical expansion CPU core for the workload application to be expanded according to the topology information of the CPU core of each node, comprising the following steps:
If the number of reserved cores of the workload application to be expanded is not zero, selecting the vertical expansion central processor core from the reserved cores of the workload application to be expanded by using the central processor core binding recommendation algorithm, and obtaining information of the vertical expansion central processor core;
if the reserved core number of the workload application to be expanded is zero, the CPU core binding recommendation algorithm is applied to select the vertical expansion CPU core from idle CPU cores in the container cluster, and information of the vertical expansion CPU core is obtained;
the triggering, according to the information of the vertical capacity expansion central processing unit core, a central processing unit core binding operation applied to the workload to be expanded, including:
if the workload application to be expanded is a single-node application and the workload application to be expanded corresponds to a plurality of container groups, the reconstruction of each container group is triggered in a time-sharing manner, and central processor core binding operation is executed on the reconstructed container groups according to the information of the vertical expansion central processor cores during reconstruction;
if the workload application to be expanded is a single-node application and corresponds to a single container group, sending information of overrun of a central processing unit of the workload application to be expanded to a user, triggering reconstruction of the container group after receiving an expansion command issued by the user, and executing central processing unit core binding operation on the reconstructed container group according to the information of the vertical expansion central processing unit core during reconstruction;
If the workload application to be expanded is a cross-node application and the utilization rate of the central processor of the workload application to be expanded on each corresponding node exceeds the limit, the reconstruction of the container group on each corresponding node of the workload application to be expanded is triggered in a time-sharing manner, and a central processor core binding operation is executed on the reconstructed container group according to the information of the vertical expansion central processor core during reconstruction;
and if the workload application to be expanded is a cross-node application and the central processing unit utilization rates of the workload application to be expanded on the corresponding nodes are not exceeded, reconstructing the corresponding container group on the node with the central processing unit utilization rate exceeding the limit corresponding to the workload application to be expanded, and executing central processing unit core binding operation on the reconstructed container group according to the information of the vertical expansion central processing unit core during reconstruction.
In order to solve the above technical problems, the present invention further provides a vertical expansion device for a container, including:
the collection unit is used for collecting the CPU utilization information of the created workload application from each node of the container cluster;
The computing unit is used for calling a central processor core binding recommendation algorithm designed in advance according to a scheduling strategy of the workload application to be expanded to the workload application to be expanded, wherein the utilization rate of the central processor in the workload application to be expanded exceeds the limit, so as to determine the information of the vertical expansion central processor core for performing vertical expansion on the workload application to be expanded according to the central processor core topology information of each node;
and the triggering unit is used for triggering the central processor core binding operation applied to the workload to be expanded according to the information of the vertical capacity expansion central processor core.
In order to solve the above technical problems, the present invention further provides a vertical expansion device for container application, including:
a memory for storing a computer program;
a processor for executing the computer program, which when executed by the processor implements the steps of applying the vertical expansion method to a container as described in any one of the above.
To solve the above technical problem, the present invention further provides a readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of applying a vertical expansion method to a container according to any one of the above.
According to the vertical capacity expansion method for the container application, central processor core binding recommendation algorithm designed in advance according to the scheduling strategy is called by the central processor core binding recommendation algorithm for the central processor to-be-expanded work load application with the overrun central processor utilization rate through collecting central processor utilization rate information of the created work load application from each node of the container cluster, and the information of the vertical capacity expansion central processor core for the work load application to be vertically expanded is determined according to the central processor core topology information of each node, so that the central processor core binding operation for the work load application to be expanded is triggered according to the information of the vertical capacity expansion central processor core, and the timely and automatic vertical capacity expansion of the central processor sensitive application is realized, and the high-performance operation of the application in the container cluster is ensured.
The invention also provides a container application vertical capacity expansion device, equipment and a readable storage medium, which have the beneficial effects and are not repeated here.
Drawings
For a clearer description of embodiments of the invention or of the prior art, the drawings that are used in the description of the embodiments or of the prior art will be briefly described, it being apparent that the drawings in the description below are only some embodiments of the invention, and that other drawings can be obtained from them without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for vertically expanding a container according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a vertical expansion device for a container according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a vertical capacity expansion device for a container according to an embodiment of the present invention.
Detailed Description
The core of the invention is to provide a vertical capacity expansion method, a device, equipment and a readable storage medium for container applications, which are used for guaranteeing high-performance operation of CPU sensitive applications on a container cluster.
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The following describes an embodiment of the present invention.
For ease of understanding, a system architecture to which the present invention is applicable will first be described. The embodiment of the invention provides a specific implementation mode which is suitable for a container cluster, and the container cluster is subjected to automatic deployment, capacity expansion and operation and maintenance based on Kubernetes. The hardware devices that make up the container cluster are nodes, and the workload applications running in the container cluster are user-oriented business applications. A workload application may run on a single node or across nodes. One workload application may run on a single node based on a single container group (pod) or may run on multiple container groups.
The container group is the smallest scheduling unit in Kubernetes. One container group encapsulates one container (containers) (multiple containers may also be encapsulated). Containers in a group of containers share a storage, network, etc. That is, the entire set of containers may be considered a virtual machine, with each container corresponding to a process running on the virtual machine. All containers in the same container group are uniformly arranged and scheduled. In Kubernetes, common services for managing container groups are depoyment (a stateless controller for managing stateless applications), statefulSet (a stateful controller for managing stateful applications), daemonSet (running a copy of a specified container group on a node in a daemon manner, for example, when monitoring a log of the node on a collection node, daemonSet may be used), job (a temporary controller that uses Job to perform tasks, ends after execution), and the like. The controller creates and manages the container group through a container group Template (Pod Template), which is a specification for creating the container group, and is included in a controller such as a devionyent. Each controller uses its own internal container group template to create the actual container group, the container group templates within the same controller instance being identical.
The central processing unit core (also called CPU core) referred to in the present invention is a virtual computing unit based on computing resources provided by the central processing unit of the node.
In a container cluster, a large number of business application scenarios are technically clouded by Kubernetes container orchestration. For non-central processor sensitive applications therein, the runtime may run on an idle central processor core based on scheduling policies such as load balancing. For applications in which the central processor is sensitive, it is necessary to bind a dedicated central processor core when creating a container group for the workload application in order to guarantee its running performance. The central processor core to which the workload application is bound is the central processor core to which the container group in which the workload application is running. If the workload application is running on multiple container groups, each container group needs to bind a different central processor core. But typically the number of central processor cores bound by different sets of containers of the same workload application is consistent.
With the running of the cpu sensitive application, if the cpu core bound by the workload application cannot meet the requirement of letting the cpu core run with high performance, the cpu core bound by the workload application needs to be increased, and specifically, the cpu core with increased capacity needs to be bound again based on the original cpu core when the container group of the workload application is rebuilt. This way of increasing the capacity of the bound cpu core is vertical capacity expansion for the workload application.
Aiming at the problems that operation and maintenance manpower is consumed and vertical capacity expansion cannot be timely carried out in the operation process of the workload application due to the fact that an operation and maintenance personnel automatically determines the central processing unit cores to be bound according to the requirements only when the container group of the workload application is created in the related technology, the container application vertical capacity expansion scheme provided by the embodiment of the invention aims at automatically generating a recommended central processing unit core binding scheme according to the central processing unit core information of the container cluster and the operation parameters of the workload application in the operation process when the workload application is created in the container cluster, and can automatically execute the vertical capacity expansion of the container application or push the container application to a user to prompt the user to timely carry out the vertical capacity expansion of the container application, so that the situation that the central processing unit sensitive application cannot operate with high performance due to insufficient calculation resources is avoided.
On the basis of the above structure, the following describes a vertical expansion method for a container according to an embodiment of the present invention with reference to the accompanying drawings.
The second embodiment of the present invention will be described below.
Fig. 1 is a flow chart of a method for vertically expanding a container according to an embodiment of the present invention.
As shown in fig. 1, the method for vertically expanding the container application provided by the embodiment of the invention includes:
S101: central processor utilization information for the created workload application is collected from nodes of the container cluster.
S102: and calling a central processor core binding recommendation algorithm designed in advance according to a scheduling strategy of the workload application to be expanded for the workload application to be expanded, wherein the utilization rate of the central processor in the workload application to be expanded exceeds the limit, so as to determine the information of the vertical expansion central processor core for performing vertical expansion on the workload application to be expanded according to the central processor core topology information of each node.
S103: and triggering the central processor core binding operation of the application of the workload to be expanded according to the information of the vertical capacity expansion central processor core.
In a specific implementation, in the scenario that the container cluster runs the cpu-sensitive applications, it is necessary to monitor the usage of computing resources for these workload applications and perform timely vertical capacity expansion operations when necessary.
For S101, the daemon controller service of the container cluster (i.e., the daemon set service of Kubernetes) may be applied to perform the task of collecting central processor utilization information for the created workload application, specifically by enabling the daemon controller service at each node of the container cluster separately. The daemon controller service may be used to collect not only central processor utilization information for created workload applications, but also central processor core topology on each node, central processor core binding information for container groups for each created workload application, and so on. The operation of collecting the respective information may be performed periodically, such as once every 5 seconds.
To enable the use of information such as the central processor core topology on each node and the central processor core binding information for each container group for which a workload application has been created, it is necessary to record this information. Recording of the information collected by the daemon controller service may be accomplished by creating custom resources (Custom Resource Definition, CRD) in the container cluster in advance. Custom Resource (CR) declaration definition for creating Custom resources may be referred to as follows:
wherein, "apiVersion: apieextensions.k8s.io/v 1beta1" represents the application version number. "kind: custom resource definition" means that the type is defined for a custom resource. "metadata" means metadata. "name: cluster-cpu-topology-info" means custom resource name is central processor core topology information. "announcements:" xxx ":" xxxx ":" denotes an annotation of central processor core topology information. "spec" means an instruction. "cpu topologyinfo" means the topology of the central processor core at each node in the container cluster, e.g. "node1" { "NUMA0": 1-15"," NUMA1": 16-31" }, "node2": { "NUMA0": 1-15"," NUMA1": 16-31" } ", i.e. on node1, NUMA0 corresponds to number 1-15 central processor cores, NUMA1 corresponds to number 16-31 central processor cores; on node2, NUMA0 corresponds to CPU cores 1-15 and NUMA1 corresponds to CPU cores 16-31. "allocatedpuuinfo" indicates central processor core binding information of a container group on each node, for example "" node1": [" pod-xxx1":"1-4"," pod-xxx2":"5-9"]", i.e., on node1, container group xxx1 binds No. 1-4 central processor cores, and container group xxx2 binds No. 5-9 central processor cores.
Central processor core topology information on each node, central processor core binding information for a container group on each node, and central processor utilization information for a container group on each node can be collected through daemon controller service (daemon set service) deployed at each node.
In addition, the subsequent cpu core binding operation may also rely on a daemon controller service (daemon set service), where each node may also have the capability to specify core binding after the daemon controller service (daemon set service) is started, as described in detail below.
Further, by starting the dispatch controller service (depoyment service) on the master node (master) of the container cluster, information reported by the daemon controller service (DaemonSet service) on each node can be received, and the dispatch controller service (depoyment service) can collect the topology information of the central processor core on each node reported by each node and the binding information of the central processor core of the container group on each node and write the collected topology information into the custom resources introduced above. And for the CPU utilization information of the container group collected by each node, the CPU core utilization corresponding to the workload application on each node can be obtained through summarizing calculation, and a status field of the workload application is written. Specifically, the cpu utilization corresponding to a workload application on a single node may be calculated by:
Workload application cpu utilization= (pod 1) cpu +pod2 cpu +…+podN cpu )/N;
Wherein N is the total number of the corresponding container groups of the workload application on the node, pod1 cpu CPU core utilization, pod2, of the corresponding set of containers 1 on the node for the workload application cpu CPU core utilization for the corresponding set of containers 2 on the node for the workload application … … podN cpu The central processor core utilization of the corresponding container group N on the node is applied for the workload. The CPU utilization rate corresponding to the workload application on the single node is obtained by averaging the CPU utilization rates of the container groups on the single node.
And when the computing resource state of each workload application is monitored, the central processing unit utilization rate corresponding to the workload application on a single node recorded in a status field of each created workload application can be obtained by starting the asynchronous thread service to inquire the workload on the cluster, and if the central processing unit utilization rate exceeds a certain threshold (the threshold can be set as a built-in parameter or an environment variable), the vertical capacity expansion of the workload application is triggered. The acquisition of each item of information may be performed periodically, and may be performed in synchronism with the acquisition of the information, for example, once every 5 seconds.
For S102, the created workload application requires an idle central processor core in the container cluster for vertical expansion as needed. It can be understood that if there is no idle central processor core in the container cluster, the workload application to be expanded cannot perform vertical expansion, and at this time, a user or an operation and maintenance person can be reminded to add nodes to the container cluster by pushing a cluster expansion reminding mode, otherwise, high-performance operation of the workload application to be expanded cannot be guaranteed.
In order to ensure that the central processor core which is idle when the central processor sensitive application needs to be vertically expanded can select, a reserved core can be set to be used as a space for expanding the workload application besides binding a normal operation core when a container group is created for the workload application.
S102: for a workload application to be expanded, the workload application to be expanded of which the utilization rate of the central processor exceeds the limit, the central processor core binding recommendation algorithm designed in advance according to the scheduling strategy of the workload application to be expanded is called to determine the information of the vertical capacity expansion central processor core for carrying out vertical capacity expansion on the workload application to be expanded according to the central processor core topology information of each node, and the method can comprise the following steps: if the number of reserved cores of the workload application to be expanded is not zero, a central processing unit core binding recommendation algorithm is applied to select a vertical expansion central processing unit core from the reserved cores of the workload application to be expanded, and information of the vertical expansion central processing unit core is obtained.
Specifically, the number of reserved cores and the information of the reserved cores are parameters which are determined according to the central processor resource limit value of the workload application when the workload application is created and updated along with the vertical capacity expansion of the workload application.
The embodiment of the invention provides a way to determine the reserved core number of each container group of the workload application, which can be specifically obtained by the following formula:
reserved core number=max (1.5×cpu request ,2×λ);
Wherein the CPU request The upper limit of the CPU resource for the workload application, λ, is the adjustable coefficient.
In addition to determining the number of reserved cores for each container group, it is also necessary to determine the normal binding core for each container group at the time of creation. Firstly, the number of normal binding cores needs to be determined, and the number can be calculated by the following formula:
normal binding core number=ceil (CPU limit );
Where ceil () is a round-up operation, CPU limit A central processor resource lower limit value for a workload application.
And reserving the sum of the core number and the normal binding core number, namely, the capacity expansion upper limit core number corresponding to each container group of the workload application. The upper core number of expansion should satisfy the following formula:
the number of idle central processor cores of the node is greater than the upper limit of the expansion core number of the container group of the workload application and the number of the container group.
It should be noted that, the above manner of determining the reserved core number and the normal bound core number is to ensure that the quality of service index (QOS) of the container group is burst or guard (the quality of service index is used to indicate the priority of the workload corresponding to the container group in the system, the enumeration of the quality of service index is Guaranteed, burstable, bestEffort, and the Guaranteed priority of the service is sequentially decreased).
After determining the normal binding core number and the reserved core number, a specific corresponding central processing unit core needs to be determined. At this time, the specific information of the central processor core can be calculated by adopting a topologyHit algorithm according to a central processor core binding recommendation algorithm corresponding to a scheduling strategy applied by the workload. Affinity policies such as workload applications, require instance dispersion, must be scheduled to a node, etc.; for example, the workload application is required to be distributed on different nodes, the deleting nodes are traversed according to the expansion upper limit core number, and the central processor cores to be bound are calculated by combining a topologyHit algorithm; if the workload application is required to run on the same node, the central processor cores to be bound are calculated based on a topologyHit algorithm according to the capacity expansion upper limit core number.
In addition, the principle of the topologyHit algorithm is mainly that the binding rule of the central processor cores bound by the container group is binding according to the sequence number from small to large, if the reserved core number is 2, the normal binding core number is 2, and the preselected capacity expansion upper limit core is central processor cores 1-4, the central processor cores 1-2 are bound first when the workload application is created. If the node contains multiple NUMA, the container group of the same workload application preferentially selects the central processor cores on the same NUMA, and if the number of the idle central processor cores on the NUMA is not enough, a cross-NUMA selection mode is adopted.
For S103, after obtaining the information of the vertical capacity expansion central processor core for the vertical capacity expansion workload application, the central processor core binding operation for the vertical capacity expansion workload application according to the information of the vertical capacity expansion central processor core may be directly executed, specifically, the container group for the vertical capacity expansion workload application is rebuilt, and the original central processor core and the vertical capacity expansion central processor core are bound for the rebuilt container group. According to a specific scheduling policy, the information of the vertical capacity expansion central processing unit core can be used as a recommended vertical capacity expansion policy applied by the workload to be pushed to operation and maintenance personnel or users, and the operation and maintenance personnel or users can confirm or adjust the information and then execute the information.
S103: triggering a central processor core binding operation of an application to a workload to be expanded according to information of the vertical expansion central processor core may include: pushing information of the vertical capacity expansion central processing unit core to a user, and receiving information of the vertical capacity expansion central processing unit core adjusted by the user; after the information of the adjusted vertical capacity expansion central processing unit core passes through the verification, the central processing unit core binding operation of the application of the workload to be expanded is executed according to the information of the adjusted vertical capacity expansion central processing unit core. The method for checking the information of the adjusted vertical capacity expansion central processing unit cores can adopt a mode of judging whether the 'number of idle central processing unit cores of the node > the number of capacity expansion upper limit cores of the container group of the workload application x the number of the container group' is met, if the information is met, checking is passed, and if the information is not met, prompting that the user policy is not compliant.
The original central processor cores and the vertical capacity expansion central processor cores are bound for the rebuilt container group, and specifically, the information of the central processor cores is written into a container group template for creating the container group. S103: triggering a central processor core binding operation of an application to a workload to be expanded according to information of the vertical expansion central processor core may include: when triggering the reconstruction of the container group corresponding to the workload application to be expanded, the daemon controller service of the container cluster is called, the central processor core binding information corresponding to the container group before the reconstruction and the information of the vertical capacity expansion central processor core are used as the central processor core binding information to be written into a container group Template (pod Template) of the reconstructed container group, so that the central processor core binding information in the container group Template is read when the container group is reconstructed based on the updated container group Template, and is written into a binding core controller file (cpu file corresponding to a cpu directory) of the container cluster, so that the central processor core binding operation of the workload application to be expanded is realized.
Writing the central processor core binding information to the annotation of the container group Template (pod Template) of the reconstructed container group can be referred to as follows:
where "xxx.xxx.io/bind-cpu-info" indicates the central processor core binding information of the workload application at a certain node. "bind-cpu-normal" represents the central processor core topology information corresponding to the number of normally bound cores. "reserved-cpu" represents the central processor core topology information corresponding to the number of reserved cores. "try-times" indicates the number of times that binding the central processor core fails to attempt. "xxx.xxx.io/bind-cpu-result" means the central processor core to which the workload application is actually bound.
It should be noted that, in order to implement vertical capacity expansion of the workload application, an upgrade mode of replacement and update is adopted, and the central processor resource limit value in the container group template needs to be modified, that is, the operation of increasing the binding cores can be allowed to be executed by increasing the central processor resource limit value to the number of central processor cores corresponding to the central processor core binding information.
According to the vertical capacity expansion method for the container application, central processor core binding recommendation algorithm designed in advance according to the scheduling strategy is called for the central processor core to-be-expanded workload application with the over-limited central processor utilization rate by collecting central processor utilization rate information of the created workload application from each node of the container cluster, so that the information of the vertical capacity expansion central processor core for the to-be-expanded workload application is determined according to the central processor core topology information of each node, and the central processor core binding operation for the to-be-expanded workload application is triggered according to the information of the vertical capacity expansion central processor core, and timely and automatic vertical capacity expansion for the central processor sensitive application is realized, and high-performance operation of the application in the container cluster is ensured.
The following describes a third embodiment of the present invention.
On the basis of the embodiment, different application scenarios such as single-node application, cross-node application, single-container group application and multi-container group application are further described.
In the vertical expansion method for the container application provided by the embodiment of the invention, S103: triggering a central processor core binding operation of an application to a workload to be expanded according to information of the vertical expansion central processor core may include:
if the workload application to be expanded is a single-node application and the workload application to be expanded corresponds to a plurality of container groups, the reconstruction of each container group is triggered in a time-sharing manner, and the central processor core binding operation is executed on the reconstructed container groups according to the information of the vertical expansion central processor cores during the reconstruction;
if the workload application to be expanded is a single-node application and corresponds to a single container group, sending information of overrun of the central processing unit of the workload application to be expanded to a user, triggering reconstruction of the container group after receiving an expansion command issued by the user, and executing central processing unit core binding operation on the reconstructed container group according to the information of the vertical expansion central processing unit core during reconstruction;
If the workload application to be expanded is a cross-node application and the utilization rate of the central processor of the workload application to be expanded on each corresponding node exceeds the limit, the reconstruction of the container group on each corresponding node of the workload application to be expanded is triggered in a time-sharing manner, and the central processor core binding operation is executed on the reconstructed container group according to the information of the vertical capacity expansion central processor core during the reconstruction;
and if the workload application to be expanded is a cross-node application and the utilization rate of the central processor of the workload application to be expanded on each corresponding node is not out of limit, rebuilding a corresponding container group on the node with the out-of-limit utilization rate of the central processor corresponding to the workload application to be expanded, and executing central processor core binding operation on the rebuilt container group according to the information of the vertical capacity expansion central processor core during rebuilding.
In a specific implementation, in order to ensure that a user does not feel when the workload application expands, that is, the operation of the workload application cannot be interrupted, the to-be-expanded workload application running on multiple nodes or the to-be-expanded workload application running on a single node but corresponding to multiple container groups can be reconstructed in a rolling upgrading mode in a time-sharing manner. Based on a load balancing strategy, the difference of the central processor utilization rates of all the container groups is smaller, but for the workload application running on multiple nodes, the situation that the central processor core utilization rate is out of limit on some nodes on which the workload application runs does not occur and the central processor core utilization rate is out of limit on other nodes occurs may exist, and only the corresponding container groups on the out-of-limit nodes need to be rebuilt at the moment.
The fourth embodiment of the present invention will be described below.
In addition to the vertical expansion of the manner of binding the added cpu core when the created workload application is rebuilt through the container group provided in the above embodiment, the method for vertical expansion of the container application provided in the embodiment of the present invention may further include:
after receiving a workload application creation command, determining the reserved core number of the workload application to be created and the normal binding core number of the workload application to be created according to the central processor resource limit value of the workload application to be created in the workload application creation command;
applying a central processor core binding recommendation algorithm corresponding to the workload application to be created, and selecting a reserved core of each container group corresponding to the workload to be created and a normal binding core of each container group from idle central processor cores of the container cluster;
and recording the mapping relation between the reserved core and the container group, and carrying out the CPU core binding operation for the container group when each container group is created according to the information of the normal binding core.
In a specific implementation, according to the central processor resource limit value of the to-be-created workload application in the workload application creation command, the reserved core number and the normal binding core number corresponding to the container group to be created by the to-be-created workload application can be calculated, and at this time, the scheme of vertical capacity expansion of the created workload application introduced by the above embodiment can be adopted, nodes of the container cluster are traversed to find nodes with the idle central processor core number meeting the requirement, and a specific central processor core is determined by using a central processor core binding recommendation algorithm such as a topologyHit algorithm, so as to perform association of the reserved cores and binding operation of the normal binding cores.
When the central processor core binding operation is performed for the container groups when the container groups are created according to the information of the normal binding cores, the method can also be performed directly or after the information of the normal binding cores is pushed to a user for confirmation or adjustment according to the user setting, and specific execution and verification modes can be referred to the description of the embodiment.
The fifth embodiment of the present invention will be described below.
Based on the above embodiments, in the container application vertical expansion method provided in the embodiment of the present invention, S101: collecting central processor utilization information for a created workload application from nodes of a container cluster may include:
invoking daemon controller services of the container cluster to collect central processor utilization information of the created workload application on each node;
the dispatch controller service that invokes the container cluster writes the central processor utilization information for the created workload applications on the nodes into the status fields of each created workload application.
S102: for a workload application to be expanded, the workload application to be expanded of which the utilization rate of the central processor exceeds the limit, the central processor core binding recommendation algorithm designed in advance according to the scheduling strategy of the workload application to be expanded is called to determine the information of the vertical capacity expansion central processor core for carrying out vertical capacity expansion on the workload application to be expanded according to the central processor core topology information of each node, and the method can comprise the following steps:
If the number of reserved cores of the workload application to be expanded is not zero, a central processing unit core binding recommendation algorithm is applied to select a vertical expansion central processing unit core from the reserved cores of the workload application to be expanded, and information of the vertical expansion central processing unit core is obtained;
if the number of reserved cores of the workload application to be expanded is zero, a central processing unit core binding recommendation algorithm is applied to select a vertical expansion central processing unit core from idle central processing unit cores of the container cluster, and information of the vertical expansion central processing unit core is obtained.
S103: triggering a central processor core binding operation of an application to a workload to be expanded according to information of the vertical expansion central processor core may include:
if the workload application to be expanded is a single-node application and the workload application to be expanded corresponds to a plurality of container groups, the reconstruction of each container group is triggered in a time-sharing manner, and the central processor core binding operation is executed on the reconstructed container groups according to the information of the vertical expansion central processor cores during the reconstruction;
if the workload application to be expanded is a single-node application and corresponds to a single container group, sending information of overrun of the central processing unit of the workload application to be expanded to a user, triggering reconstruction of the container group after receiving an expansion command issued by the user, and executing central processing unit core binding operation on the reconstructed container group according to the information of the vertical expansion central processing unit core during reconstruction;
If the workload application to be expanded is a cross-node application and the utilization rate of the central processor of the workload application to be expanded on each corresponding node exceeds the limit, the reconstruction of the container group on each corresponding node of the workload application to be expanded is triggered in a time-sharing manner, and the central processor core binding operation is executed on the reconstructed container group according to the information of the vertical capacity expansion central processor core during the reconstruction;
and if the workload application to be expanded is a cross-node application and the utilization rate of the central processor of the workload application to be expanded on each corresponding node is not out of limit, rebuilding a corresponding container group on the node with the out-of-limit utilization rate of the central processor corresponding to the workload application to be expanded, and executing central processor core binding operation on the rebuilt container group according to the information of the vertical capacity expansion central processor core during rebuilding.
In addition, the method for vertically expanding the container application provided by the embodiment of the invention can further comprise the following steps:
after receiving a workload application creation command, determining the reserved core number of the workload application to be created and the normal binding core number of the workload application to be created according to the central processor resource limit value of the workload application to be created in the workload application creation command;
Applying a central processor core binding recommendation algorithm corresponding to the workload application to be created, and selecting a reserved core of each container group corresponding to the workload to be created and a normal binding core of each container group from idle central processor cores of the container cluster;
and recording the mapping relation between the reserved core and the container group, and carrying out the CPU core binding operation for the container group when each container group is created according to the information of the normal binding core.
The invention further discloses a container application vertical capacity expansion device, equipment and a readable storage medium corresponding to the method.
The sixth embodiment of the present invention will be described.
Fig. 2 is a schematic structural diagram of a vertical expansion device for a container according to an embodiment of the present invention.
As shown in fig. 2, a container application vertical capacity expansion device provided in an embodiment of the present invention includes:
an acquisition unit 201 for acquiring central processor utilization information of the created workload application from each node of the container cluster;
a computing unit 202, configured to invoke a central processor core binding recommendation algorithm designed in advance according to a scheduling policy of a workload application to be expanded, for a workload application to be expanded, where the central processor utilization rate of the workload application to be expanded exceeds a limit, so as to determine information of a vertical expansion central processor core for performing vertical expansion for the workload application to be expanded according to central processor core topology information of each node;
And the triggering unit 203 is configured to trigger a cpu core binding operation of the application of the workload to be expanded according to the information of the vertical expansion cpu core.
In some implementations, the computing unit 202, for a workload application to be expanded for which the central processor utilization in the created workload application exceeds a limit, invokes a central processor core binding recommendation algorithm designed in advance according to a scheduling policy of the workload application to be expanded to determine information of a vertical expansion central processor core for performing vertical expansion for the workload application to be expanded according to central processor core topology information of each node, and may include: if the number of reserved cores of the workload application to be expanded is not zero, a central processing unit core binding recommendation algorithm is applied to select a vertical expansion central processing unit core from the reserved cores of the workload application to be expanded, and information of the vertical expansion central processing unit core is obtained.
The number of reserved cores and the information of the reserved cores are parameters which are determined according to the central processor resource limit value of the workload application when the workload application is created and updated along with the vertical capacity expansion of the workload application.
The method comprises the steps of determining a reserved core number according to a central processor resource limit value of a workload application, and specifically calculating according to the following formula:
Reserved core number=max (1.5×cpu request ,2×λ);
Wherein the CPU request The upper limit of the CPU resource for the workload application, λ, is the adjustable coefficient.
In some implementations, the triggering unit 203 triggers, according to information of the vertical capacity expansion central processor core, a central processor core binding operation of the workload application to be capacity expanded, which may include:
if the workload application to be expanded is a single-node application and the workload application to be expanded corresponds to a plurality of container groups, the reconstruction of each container group is triggered in a time-sharing manner, and the central processor core binding operation is executed on the reconstructed container groups according to the information of the vertical expansion central processor cores during the reconstruction;
if the workload application to be expanded is a single-node application and corresponds to a single container group, sending information of overrun of the central processing unit of the workload application to be expanded to a user, triggering reconstruction of the container group after receiving an expansion command issued by the user, and executing central processing unit core binding operation on the reconstructed container group according to the information of the vertical expansion central processing unit core during reconstruction;
if the workload application to be expanded is a cross-node application and the utilization rate of the central processor of the workload application to be expanded on each corresponding node exceeds the limit, the reconstruction of the container group on each corresponding node of the workload application to be expanded is triggered in a time-sharing manner, and the central processor core binding operation is executed on the reconstructed container group according to the information of the vertical capacity expansion central processor core during the reconstruction;
And if the workload application to be expanded is a cross-node application and the utilization rate of the central processor of the workload application to be expanded on each corresponding node is not out of limit, rebuilding a corresponding container group on the node with the out-of-limit utilization rate of the central processor corresponding to the workload application to be expanded, and executing central processor core binding operation on the rebuilt container group according to the information of the vertical capacity expansion central processor core during rebuilding.
In some implementations, the triggering unit 203 triggers, according to information of the vertical capacity expansion central processor core, a central processor core binding operation of the workload application to be capacity expanded, which may include: when triggering the reconstruction of the container group corresponding to the workload application to be expanded, the daemon controller service of the container cluster is called, the central processor core binding information corresponding to the container group before the reconstruction and the information of the vertical expansion central processor core are used as the central processor core binding information to be written into the container group template of the reconstructed container group, so that the central processor core binding information in the container group template is read when the container group is reconstructed based on the updated container group template and written into the binding core controller file of the container cluster to realize the central processor core binding operation of the workload application to be expanded.
In some implementations, the vertical expansion device for container application provided in the embodiments of the present invention may further include:
the receiving unit is used for determining the reserved core number of the workload application to be created and the normal binding core number of the workload application to be created according to the central processor resource limit value of the workload application to be created in the workload application creation command after receiving the workload application creation command;
the computing unit 202 is further configured to apply a central processor core binding recommendation algorithm corresponding to the workload application to be created, and select a reserved core of each container group and a normal binding core of each container group corresponding to the workload to be created from idle central processor cores of the container cluster;
the triggering unit 203 is further configured to record a mapping relationship between the reserved core and the container group, and perform a cpu core binding operation for the container group when creating each container group according to the information of the normal binding core.
In some implementations, the triggering unit 203 triggers, according to information of the vertical capacity expansion central processor core, a central processor core binding operation of the workload application to be capacity expanded, which may include:
pushing information of the vertical capacity expansion central processing unit core to a user, and receiving information of the vertical capacity expansion central processing unit core adjusted by the user;
After the information of the adjusted vertical capacity expansion central processing unit core passes through the verification, the central processing unit core binding operation of the application of the workload to be expanded is executed according to the information of the adjusted vertical capacity expansion central processing unit core.
In some implementations, the collection unit 201 collects central processor utilization information of the created workload applications from the nodes of the container cluster, which may include:
invoking daemon controller services of the container cluster to collect central processor utilization information of the created workload application on each node;
invoking a dispatch controller service of the container cluster to write central processor utilization information of the created workload applications on the nodes into status fields of each created workload application;
the calculating unit 202 invokes, for a workload application to be expanded, for which the central processor utilization exceeds the limit, a central processor core binding recommendation algorithm designed in advance according to a scheduling policy of the workload application to be expanded, to determine information of a vertical expansion central processor core for performing vertical expansion for the workload application to be expanded according to the central processor core topology information of each node, and may include:
If the number of reserved cores of the workload application to be expanded is not zero, a central processing unit core binding recommendation algorithm is applied to select a vertical expansion central processing unit core from the reserved cores of the workload application to be expanded, and information of the vertical expansion central processing unit core is obtained;
if the number of reserved cores of the workload application to be expanded is zero, a central processing unit core binding recommendation algorithm is applied to select a vertical expansion central processing unit core from idle central processing unit cores of the container cluster, so that information of the vertical expansion central processing unit core is obtained;
the triggering unit 203 triggers a cpu core binding operation of an application to be expanded workload according to information of a vertical expansion cpu core, and may include:
if the workload application to be expanded is a single-node application and the workload application to be expanded corresponds to a plurality of container groups, the reconstruction of each container group is triggered in a time-sharing manner, and the central processor core binding operation is executed on the reconstructed container groups according to the information of the vertical expansion central processor cores during the reconstruction;
if the workload application to be expanded is a single-node application and corresponds to a single container group, sending information of overrun of the central processing unit of the workload application to be expanded to a user, triggering reconstruction of the container group after receiving an expansion command issued by the user, and executing central processing unit core binding operation on the reconstructed container group according to the information of the vertical expansion central processing unit core during reconstruction;
If the workload application to be expanded is a cross-node application and the utilization rate of the central processor of the workload application to be expanded on each corresponding node exceeds the limit, the reconstruction of the container group on each corresponding node of the workload application to be expanded is triggered in a time-sharing manner, and the central processor core binding operation is executed on the reconstructed container group according to the information of the vertical capacity expansion central processor core during the reconstruction;
and if the workload application to be expanded is a cross-node application and the utilization rate of the central processor of the workload application to be expanded on each corresponding node is not out of limit, rebuilding a corresponding container group on the node with the out-of-limit utilization rate of the central processor corresponding to the workload application to be expanded, and executing central processor core binding operation on the rebuilt container group according to the information of the vertical capacity expansion central processor core during rebuilding.
Since the embodiments of the apparatus portion and the embodiments of the method portion correspond to each other, the embodiments of the apparatus portion are referred to the description of the embodiments of the method portion, and are not repeated herein.
The seventh embodiment of the present invention will be described.
Fig. 3 is a schematic structural diagram of a vertical capacity expansion device for a container according to an embodiment of the present invention.
As shown in fig. 3, a container application vertical capacity expansion device provided in an embodiment of the present invention includes:
a memory 310 for storing a computer program 311;
a processor 320 for executing a computer program 311, which computer program 311, when executed by the processor 320, implements the steps of applying a vertical expansion method to a container according to any of the embodiments described above.
Processor 320 may include one or more processing cores, such as a 3-core processor, an 8-core processor, etc. The processor 320 may be implemented in at least one hardware form of digital signal processing DSP (Digital Signal Processing), field programmable gate array FPGA (Field-Programmable Gate Array), programmable logic array PLA (Programmable Logic Array). Processor 320 may also include a main processor, which is a processor for processing data in an awake state, also referred to as a central processor CPU (Central Processing Unit), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 320 may be integrated with an image processor GPU (Graphics Processing Unit), a GPU for use in responsible for rendering and rendering of the content required to be displayed by the display screen. In some embodiments, the processor 320 may also include an artificial intelligence AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 310 may include one or more readable storage media, which may be non-transitory. Memory 310 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 310 is at least used for storing a computer program 311, where the computer program 311, after being loaded and executed by the processor 320, can implement relevant steps in the container application vertical expansion method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 310 may further include an operating system 312, data 313, and the like, where the storage may be transient storage or permanent storage. The operating system 312 may be Windows. The data 313 may include, but is not limited to, data related to the above-described method.
In some embodiments, the container application vertical expansion device may further include a display 330, a power supply 340, a communication interface 350, an input-output interface 360, a sensor 370, and a communication bus 380.
Those skilled in the art will appreciate that the configuration shown in fig. 3 is not limiting of the container application vertical expansion device and may include more or fewer components than shown.
The container application vertical capacity expansion device provided by the embodiment of the invention comprises a memory and a processor, wherein the processor can realize the container application vertical capacity expansion method when executing the program stored in the memory, and the effects are the same as the above.
The eighth embodiment of the present invention will be described.
It should be noted that the apparatus and device embodiments described above are merely exemplary, and for example, the division of modules is merely a logic function division, and there may be other division manners in actual implementation, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms. The modules illustrated as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules.
The integrated modules, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium for performing all or part of the steps of the method according to the embodiments of the present invention.
To this end, an embodiment of the present invention further provides a readable storage medium having a computer program stored thereon, which when executed by a processor implements steps such as a container application vertical expansion method.
The readable storage medium may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (ram) RAM (Random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The computer program included in the readable storage medium provided in this embodiment can implement the steps of the container application vertical expansion method described above when executed by a processor, and the same effects are achieved.
The method, the device, the equipment and the readable storage medium for vertically expanding the container application provided by the invention are described in detail. In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. The apparatus, device and readable storage medium disclosed in the embodiments are relatively simple to describe, and the relevant points refer to the description of the method section since they correspond to the methods disclosed in the embodiments. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the invention can be made without departing from the principles of the invention and these modifications and adaptations are intended to be within the scope of the invention as defined in the following claims.
It should also be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.

Claims (12)

1. A method for vertical expansion of a container application, comprising:
collecting CPU utilization information of the created workload application from each node of the container cluster;
invoking a central processor core binding recommendation algorithm designed in advance according to a scheduling strategy of the workload application to be expanded to a workload application to be expanded, wherein the workload application to be expanded has an overrun utilization rate of a central processor in the created workload application, so as to determine information of a vertical expansion central processor core for performing vertical expansion on the workload application to be expanded according to the central processor core topology information of each node;
and triggering the central processor core binding operation applied to the workload to be expanded according to the information of the vertical capacity expansion central processor core.
2. The method for vertically expanding a container application according to claim 1, wherein the calling a cpu core binding recommendation algorithm designed in advance according to a scheduling policy of the workload application to be expanded to the workload application to be expanded, for the workload application to be expanded with an overrun cpu utilization in the created workload application, to determine information of a vertically expanded cpu core for vertically expanding the workload application to be expanded according to cpu core topology information of each node, comprises:
And if the number of reserved cores of the workload application to be expanded is not zero, selecting the vertical expansion central processor core from the reserved cores of the workload application to be expanded by using the central processor core binding recommendation algorithm, and obtaining the information of the vertical expansion central processor core.
3. The method of claim 2, wherein the number of reserved cores and the information of the reserved cores are parameters that are determined according to a central processor resource limit of the workload application when the workload application is created and updated as the workload application is vertically expanded.
4. A method of vertical expansion for a container application according to claim 3, wherein the number of reserved cores is determined based on a central processor resource limit of the workload application, in particular calculated by the following formula:
reserved core number=max (1.5×cpu request ,2×λ);
Wherein the CPU request And the upper limit value of the CPU resource applied to the workload is lambda is an adjustable coefficient.
5. The method for vertical capacity expansion of a container application according to claim 1, wherein triggering a cpu core binding operation for the workload application to be expanded according to the information of the vertical capacity expansion cpu core comprises:
If the workload application to be expanded is a single-node application and the workload application to be expanded corresponds to a plurality of container groups, the reconstruction of each container group is triggered in a time-sharing manner, and central processor core binding operation is executed on the reconstructed container groups according to the information of the vertical expansion central processor cores during reconstruction;
if the workload application to be expanded is a single-node application and corresponds to a single container group, sending information of overrun of a central processing unit of the workload application to be expanded to a user, triggering reconstruction of the container group after receiving an expansion command issued by the user, and executing central processing unit core binding operation on the reconstructed container group according to the information of the vertical expansion central processing unit core during reconstruction;
if the workload application to be expanded is a cross-node application and the utilization rate of the central processor of the workload application to be expanded on each corresponding node exceeds the limit, the reconstruction of the container group on each corresponding node of the workload application to be expanded is triggered in a time-sharing manner, and a central processor core binding operation is executed on the reconstructed container group according to the information of the vertical expansion central processor core during reconstruction;
And if the workload application to be expanded is a cross-node application and the central processing unit utilization rates of the workload application to be expanded on the corresponding nodes are not exceeded, reconstructing the corresponding container group on the node with the central processing unit utilization rate exceeding the limit corresponding to the workload application to be expanded, and executing central processing unit core binding operation on the reconstructed container group according to the information of the vertical expansion central processing unit core during reconstruction.
6. The method for vertical capacity expansion of a container application according to claim 1, wherein triggering a cpu core binding operation for the workload application to be expanded according to the information of the vertical capacity expansion cpu core comprises:
invoking daemon controller service of the container cluster, when triggering reconstruction of the container group corresponding to the workload application to be expanded, writing the corresponding central processor core binding information before the reconstruction of the container group and the information of the vertical expansion central processor core serving as the central processor core binding information into a container group template of the reconstructed container group, so as to read the central processor core binding information in the container group template and write the central processor core binding information into a binding core controller file of the container cluster when reconstructing the container group based on the updated container group template, thereby realizing the central processor core binding operation of the workload application to be expanded.
7. The container application vertical expansion method according to claim 1, further comprising:
after receiving a workload application creation command, determining the reserved core number of the workload application to be created and the normal binding core number of the workload application to be created according to the central processor resource limit value of the workload application to be created in the workload application creation command;
applying the CPU core binding recommendation algorithm corresponding to the workload application to be created, and selecting reserved cores of each container group corresponding to the workload to be created and normal binding cores of each container group from idle CPU cores of the container cluster;
and recording the mapping relation between the reserved core and the container groups, and carrying out central processing unit core binding operation for the container groups when each container group is created according to the information of the normal binding core.
8. The method for vertical capacity expansion of a container application according to claim 1, wherein triggering a cpu core binding operation for the workload application to be expanded according to the information of the vertical capacity expansion cpu core comprises:
Pushing the information of the vertical capacity expansion central processing unit core to a user, and receiving the information of the vertical capacity expansion central processing unit core adjusted by the user;
and after the information of the vertical capacity expansion central processing unit core after adjustment is checked to pass, executing the central processing unit core binding operation for the workload application to be expanded according to the information of the vertical capacity expansion central processing unit core after adjustment.
9. The container application vertical expansion method of claim 1, wherein the collecting central processor utilization information of the created workload application from each node of the container cluster comprises:
invoking daemon controller services of said container cluster to collect central processor utilization information for said created workload application on each of said nodes;
invoking a dispatch controller service of the container cluster to write central processor utilization information of the created workload applications on the nodes into a status field of each of the created workload applications;
the method for calling the CPU core binding recommendation algorithm designed in advance according to the scheduling policy of the workload application to be expanded to determine the information of the vertical expansion CPU core for the workload application to be expanded according to the topology information of the CPU core of each node, comprising the following steps:
If the number of reserved cores of the workload application to be expanded is not zero, selecting the vertical expansion central processor core from the reserved cores of the workload application to be expanded by using the central processor core binding recommendation algorithm, and obtaining information of the vertical expansion central processor core;
if the reserved core number of the workload application to be expanded is zero, the CPU core binding recommendation algorithm is applied to select the vertical expansion CPU core from idle CPU cores in the container cluster, and information of the vertical expansion CPU core is obtained;
the triggering, according to the information of the vertical capacity expansion central processing unit core, a central processing unit core binding operation applied to the workload to be expanded, including:
if the workload application to be expanded is a single-node application and the workload application to be expanded corresponds to a plurality of container groups, the reconstruction of each container group is triggered in a time-sharing manner, and central processor core binding operation is executed on the reconstructed container groups according to the information of the vertical expansion central processor cores during reconstruction;
if the workload application to be expanded is a single-node application and corresponds to a single container group, sending information of overrun of a central processing unit of the workload application to be expanded to a user, triggering reconstruction of the container group after receiving an expansion command issued by the user, and executing central processing unit core binding operation on the reconstructed container group according to the information of the vertical expansion central processing unit core during reconstruction;
If the workload application to be expanded is a cross-node application and the utilization rate of the central processor of the workload application to be expanded on each corresponding node exceeds the limit, the reconstruction of the container group on each corresponding node of the workload application to be expanded is triggered in a time-sharing manner, and a central processor core binding operation is executed on the reconstructed container group according to the information of the vertical expansion central processor core during reconstruction;
and if the workload application to be expanded is a cross-node application and the central processing unit utilization rates of the workload application to be expanded on the corresponding nodes are not exceeded, reconstructing the corresponding container group on the node with the central processing unit utilization rate exceeding the limit corresponding to the workload application to be expanded, and executing central processing unit core binding operation on the reconstructed container group according to the information of the vertical expansion central processing unit core during reconstruction.
10. A container application vertical expansion device, comprising:
the collection unit is used for collecting the CPU utilization information of the created workload application from each node of the container cluster;
the computing unit is used for calling a central processor core binding recommendation algorithm designed in advance according to a scheduling strategy of the workload application to be expanded to the workload application to be expanded, wherein the utilization rate of the central processor in the workload application to be expanded exceeds the limit, so as to determine the information of the vertical expansion central processor core for performing vertical expansion on the workload application to be expanded according to the central processor core topology information of each node;
And the triggering unit is used for triggering the central processor core binding operation applied to the workload to be expanded according to the information of the vertical capacity expansion central processor core.
11. A container application vertical expansion device, comprising:
a memory for storing a computer program;
a processor for executing the computer program, which when executed by the processor performs the steps of applying a vertical expansion method to a container according to any one of claims 1 to 9.
12. A readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, carries out the steps of applying a vertical expansion method to a container according to any one of claims 1 to 9.
CN202310913810.5A 2023-07-24 2023-07-24 Container application vertical capacity expansion method, device, equipment and readable storage medium Pending CN116881012A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310913810.5A CN116881012A (en) 2023-07-24 2023-07-24 Container application vertical capacity expansion method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310913810.5A CN116881012A (en) 2023-07-24 2023-07-24 Container application vertical capacity expansion method, device, equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN116881012A true CN116881012A (en) 2023-10-13

Family

ID=88267815

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310913810.5A Pending CN116881012A (en) 2023-07-24 2023-07-24 Container application vertical capacity expansion method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN116881012A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117311990A (en) * 2023-11-28 2023-12-29 苏州元脑智能科技有限公司 Resource adjustment method and device, electronic equipment, storage medium and training platform

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117311990A (en) * 2023-11-28 2023-12-29 苏州元脑智能科技有限公司 Resource adjustment method and device, electronic equipment, storage medium and training platform
CN117311990B (en) * 2023-11-28 2024-02-23 苏州元脑智能科技有限公司 Resource adjustment method and device, electronic equipment, storage medium and training platform

Similar Documents

Publication Publication Date Title
US11425194B1 (en) Dynamically modifying a cluster of computing nodes used for distributed execution of a program
EP3270289B1 (en) Container-based multi-tenant computing infrastructure
CN110402431B (en) Event driven scheduling using directed acyclic graphs
US8321558B1 (en) Dynamically monitoring and modifying distributed execution of programs
US20210064442A1 (en) Implementing An Application Manifest In A Node-Specific Manner Using An Intent-Based Orchestrator
US9280390B2 (en) Dynamic scaling of a cluster of computing nodes
US8260840B1 (en) Dynamic scaling of a cluster of computing nodes used for distributed execution of a program
US8418181B1 (en) Managing program execution based on data storage location
US10831387B1 (en) Snapshot reservations in a distributed storage system
JP5843823B2 (en) Saving program execution status
EP2802998B1 (en) Assignment of resources in virtual machine pools
CN102981929B (en) The management method of disk mirroring and system
CN109992373B (en) Resource scheduling method, information management method and device and task deployment system
CN110427258A (en) Scheduling of resource control method and device based on cloud platform
US10845997B2 (en) Job manager for deploying a bundled application
US10725819B2 (en) System and method for scheduling and allocating data storage
CN116881012A (en) Container application vertical capacity expansion method, device, equipment and readable storage medium
CN109939441B (en) Application multi-disk verification processing method and system
CN107528871A (en) Data analysis in storage system
Czarnul A model, design, and implementation of an efficient multithreaded workflow execution engine with data streaming, caching, and storage constraints
CN113608838A (en) Deployment method and device of application image file, computer equipment and storage medium
CN116483546B (en) Distributed training task scheduling method, device, equipment and storage medium
CN109445908A (en) A kind of virtual machine backup method and system
CN118377439B (en) Hard disk IO control method, product, equipment and storage medium
CN114924884B (en) Scheduling method, device and medium of batch scheduler

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