WO2023045467A1 - Container cpu resource scheduling and isolation method and apparatus, and storage medium and electronic device - Google Patents

Container cpu resource scheduling and isolation method and apparatus, and storage medium and electronic device Download PDF

Info

Publication number
WO2023045467A1
WO2023045467A1 PCT/CN2022/102750 CN2022102750W WO2023045467A1 WO 2023045467 A1 WO2023045467 A1 WO 2023045467A1 CN 2022102750 W CN2022102750 W CN 2022102750W WO 2023045467 A1 WO2023045467 A1 WO 2023045467A1
Authority
WO
WIPO (PCT)
Prior art keywords
container
node
resource pool
resource
cpu
Prior art date
Application number
PCT/CN2022/102750
Other languages
French (fr)
Chinese (zh)
Inventor
郭天
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2023045467A1 publication Critical patent/WO2023045467A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • 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]

Definitions

  • the present disclosure relates to the field of computer technology, and in particular, to a container CPU resource scheduling and isolation method and device, a storage medium, and electronic equipment.
  • Kubernetes is currently the most mainstream and widely used open source container computing platform in the industry. It allows users to easily and efficiently deploy container applications on a batch of common infrastructure nodes, and provides a set of application deployment, planning, updating, and maintenance of the whole life Cycle management mechanism to meet different actual needs.
  • native Kubernetes treats the resources on each node as a whole. After excluding the resources reserved for the system, all remaining resources on the node are incorporated into a separate schedulable resource pool by Kubernetes.
  • the scheduler selects nodes for container pods, it uses the total vacancy of this schedulable resource pool To evaluate; when the pod is running on the node, the resources of the entire schedulable pool can be used, and precise core binding or isolation control cannot be performed.
  • Embodiments of the present disclosure provide a container CPU resource scheduling and isolation method and device, a storage medium, and electronic equipment to at least solve the problem that the resource management and scheduling mechanism of native Kubernetes cannot meet the precise isolation requirements of different types of pods for CPU resources. .
  • a container CPU resource scheduling and isolation method including:
  • the container orchestration engine plans and creates resource pools, and makes each node divide its own CPU resources into resource pools; the container orchestration engine obtains container creation information; wherein, the container creation information includes the desired resource pool label; the container orchestration engine according to The resource pool label and the state of the resource pool corresponding to each node determine the target node; the container orchestration engine sends a container creation instruction to the execution agent module of the target node, so that the execution agent module creates a container and The container is bound to the CPU core corresponding to the resource pool.
  • a container CPU resource scheduling and isolation method including: the execution agent module on the current node receives the container creation instruction sent by the container orchestration engine, wherein the above container creation instruction carries the container creation instruction Configuration data and configuration information of the resource pool to be bound, the above configuration information includes the resource pool label; the above-mentioned execution agent module calls the container runtime interface CRI on the node for business execution to create a container according to the above-mentioned container creation instruction and creates a container according to the above-mentioned resource pool
  • the label determines the corresponding CPU core index; the above resource pool label and the corresponding CPU core index are sent to the above CRI, so that the CRI binds the above container to the CPU core corresponding to the above resource pool; the execution agent module sends the container creation result Information to the scheduler of the above container orchestration engine.
  • a container CPU resource scheduling and isolation device including: a first creation unit configured to create a resource pool, and make each node divide its own CPU resources into resource pools; an acquisition unit, It is set to obtain container creation information; wherein, the container creation information includes the desired resource pool label; the determination unit is configured to determine the target node according to the resource pool label and the state of the resource pool corresponding to each node; the sending unit , it is set that the container orchestration engine sends a container creation instruction to the execution agent module of the target node, so that the execution agent module creates a container and binds the container to the CPU core corresponding to the resource pool.
  • a CPU resource scheduling and isolation device including: a receiving unit configured to receive a container creation instruction sent by a container orchestration engine, wherein the container creation instruction carries configuration data to be created and The configuration information of the resource pool to be bound, the configuration information includes the resource pool label; the second creation unit is configured to call the container runtime interface CRI on the node of the service execution to create the container according to the container creation instruction and The container is bound to the CPU core corresponding to the resource pool; the first sending unit is configured to send the resource pool label and the corresponding CPU core index to the CRI, so that how many CRIs associate the container with the The CPU core corresponding to the resource pool is bound; the second sending unit is configured to send task creation result information to the scheduler of the container orchestration engine.
  • a computer-readable storage medium in which a computer program is stored in the above-mentioned computer-readable storage medium, wherein the above-mentioned computer program is configured to execute any one of the above-mentioned method embodiments when running in the steps.
  • an electronic device including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute any one of the above method embodiments in the steps.
  • FIG. 1 is a block diagram of a hardware structure of a communication device according to a container CPU resource scheduling and isolation method according to an embodiment of the present disclosure
  • Fig. 2 is a flowchart of a container CPU resource scheduling and isolation method according to an embodiment of the present disclosure
  • Fig. 3 is a flowchart of another container CPU resource scheduling and isolation method according to an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram of a node scheduling state of a container CPU resource scheduling and isolation method according to an embodiment of the present disclosure
  • FIG. 5 is a schematic diagram of a node running process of a container CPU resource scheduling and isolation method according to an embodiment of the present disclosure
  • FIG. 6 is a schematic diagram of a node CPU resource pool according to a container CPU resource scheduling and isolation method according to an embodiment of the present disclosure
  • FIG. 7 is a schematic diagram of a container CPU resource scheduling and isolation system according to an embodiment of the present disclosure.
  • FIG. 8 is a flow chart of another container CPU resource scheduling and isolation method according to an embodiment of the present disclosure.
  • FIG. 9 is a flow chart of another container CPU resource scheduling and isolation method according to an embodiment of the present disclosure.
  • FIG. 10 is a flow chart of another container CPU resource scheduling and isolation method according to an embodiment of the present disclosure.
  • FIG. 11 is a flowchart of another container CPU resource scheduling and isolation method according to an embodiment of the present disclosure.
  • Fig. 12 is a flowchart of another container CPU resource scheduling and isolation method according to an embodiment of the present disclosure.
  • FIG. 13 is a schematic diagram of node resource division according to a container CPU resource scheduling and isolation method according to an embodiment of the present disclosure
  • FIG. 14 is a schematic diagram of node resource division according to another container CPU resource scheduling and isolation method according to an embodiment of the present disclosure
  • 15 is a schematic diagram of node resource division according to another container CPU resource scheduling and isolation method according to an embodiment of the present disclosure
  • Fig. 16 is a schematic structural diagram of a container CPU resource scheduling and isolation device according to an embodiment of the present disclosure
  • Fig. 17 is a schematic structural diagram of another container CPU resource scheduling and isolation device according to an embodiment of the present disclosure.
  • FIG. 1 is a block diagram of a hardware structure of a mobile terminal according to a method for scheduling and isolating container CPU resources according to an embodiment of the present disclosure.
  • the mobile terminal may include one or more (only one is shown in Figure 1) processors 102 (processors 102 may include but not limited to processing devices such as microprocessor MCU or programmable logic device FPGA, etc.) and a memory 104 configured to store data, wherein the mobile terminal may further include a transmission device 106 and an input/output device 108 configured to communicate.
  • processors 102 may include but not limited to processing devices such as microprocessor MCU or programmable logic device FPGA, etc.
  • memory 104 configured to store data
  • the mobile terminal may further include a transmission device 106 and an input/output device 108 configured to communicate.
  • FIG. 1 is only for illustration, and it does not limit the structure of the above mobile terminal.
  • the mobile terminal may also include more or fewer components than those shown in FIG. 1 , or have a different configuration from that shown in FIG. 1 .
  • the memory 104 can be set to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the container CPU resource scheduling and isolation method in the embodiment of the present disclosure, the processor 102 runs the computer program stored in the memory 104 program, so as to execute various functional applications and data processing, that is, to realize the above-mentioned method.
  • the memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
  • the memory 104 may further include a memory that is remotely located relative to the processor 102, and these remote memories may be connected to the mobile terminal through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the transmission device 106 is configured to receive or transmit data via a network.
  • the specific example of the above network may include a wireless network provided by the communication provider of the mobile terminal.
  • the transmission device 106 includes a network adapter (Network Interface Controller, referred to as C for short), which can be connected to other network devices through a base station so as to communicate with the Internet.
  • the transmission device 106 may be a radio frequency (Radio Frequency, referred to as RF) module, which is configured to communicate with the Internet in a wireless manner.
  • RF Radio Frequency
  • Fig. 2 is a flowchart of a container CPU resource scheduling and isolation method according to an embodiment of the present disclosure. As shown in Fig. 2, the process includes the following steps:
  • the container orchestration engine plans and creates a resource pool, and makes each node divide its own CPU resources according to the resource pool;
  • the container orchestration engine acquires container creation information; wherein, the container creation information includes the desired resource pool label;
  • the container orchestration engine determines the target node according to the resource pool label and the state of the resource pool corresponding to each node;
  • the container orchestration engine sends a container creation instruction to the execution agent module of the target node, so that the execution agent module creates a container and binds the container to the CPU core corresponding to the resource pool.
  • the container orchestration engine may include a Kubernetes platform, where a container may be the smallest business abstraction unit pod that Kubernetes can manage, and a pod may contain one or more containers.
  • the resource pool label may be the name of a different resource pool obtained by dividing multiple CPUs, and the resource demand may be the time length of the occupied CPU, which is not limited here.
  • the scheduler is used to obtain the creation instruction of the container from the container orchestration engine; wherein, the above-mentioned creation instruction carries the resource pool label and the resource demand that the above-mentioned container expects to enter; according to the state information of the resource pool corresponding to each node at present , select the target node that matches the above resource pool label and resource demand; the method of creating the above container on the above target node; because according to the status information of the resource pool corresponding to each node at present, select the target node that matches the above resource pool label and resource demand Matching target nodes can precisely control the CPU resources bound to the container and allow evaluation and scheduling in units of resource pools, and can more flexibly and accurately control and isolate CPU resources.
  • the above-mentioned container orchestration engine plans and creates a resource pool, and makes each node divide its own CPU resources according to the resource pool, it includes:
  • the scheduler After the above-mentioned scheduler obtains the configuration information of all current nodes, it sends a resource pool initialization instruction to the execution agent module corresponding to each node; wherein, the above-mentioned resource pool initialization instruction is used to make the above-mentioned execution agent module divide the CPU core on the node into Several tag CPU groups, and match the above tag CPU groups to different resource pools.
  • the container orchestration engine determines the target node according to the resource pool label and the state of the resource pool corresponding to each node, including:
  • the container orchestration engine selects a target node that matches the label of the resource pool and the resource demand according to the state information of the resource pool corresponding to each node.
  • the container orchestration engine selects target nodes that match the above resource pool labels and resource requirements according to the status information of the resource pools corresponding to the current nodes, including:
  • each of the above-mentioned nodes includes CPU resources and memory resources, and the above-mentioned resource pools include resource amounts of CPU groups with different labels;
  • the scheduler determines the target nodes satisfying the scheduling of non-CPU resources from the candidate target nodes, and creates a container on the target node and assigns the container to the CPU corresponding to the resource pool The nucleus binds.
  • the above method further includes: the scheduler obtains a request message for adding a new node from the container orchestration engine, wherein the above request message carries the access interface information of the execution proxy module corresponding to the above new adding node;
  • the above-mentioned scheduler sends a resource pool initialization instruction to the execution agent module of the above-mentioned newly added node, wherein the above-mentioned initialization instruction includes parameters of one or more resource pools to be created, and the above-mentioned resource pool parameters include a resource pool label and a CPU group;
  • the scheduler When the scheduler receives the resource pool creation success message sent by the execution agent module of the newly added node, the scheduler stores the resource pool state information of the newly added node in the database.
  • the method for scheduling and isolating container CPU resources further includes: if no candidate target node is selected, the scheduler suspends or terminates the creation task corresponding to the creation instruction.
  • the above-mentioned container CPU resource scheduling and isolation method further includes: the above-mentioned scheduler deducts the target node for access The resource consumed by the container corresponding to the node, and update the resource status of the resource pool corresponding to the access node.
  • Fig. 3 is a flowchart of a container CPU resource scheduling and isolation method according to an embodiment of the present disclosure. As shown in Fig. 3 , the process includes the following steps:
  • the execution agent module on the current node receives a container creation instruction from the scheduler, wherein the container creation instruction carries configuration data to be created and configuration information of a resource pool to be bound, and the configuration information includes a resource pool label;
  • the above execution agent module calls the container runtime interface CRI on the node for service execution to create a container according to the above container creation instruction, and determines the corresponding CPU core index according to the above resource pool label;
  • the execution agent module sends container creation result information to the above-mentioned scheduler.
  • the execution agent module on the current node is used to receive the container creation instruction sent by the container orchestration engine, wherein the above-mentioned container creation instruction carries the configuration data of the container to be created and the configuration information of the resource pool to be bound.
  • the configuration information includes the resource pool label; the above-mentioned execution agent module calls the container runtime interface CRI on the node where the service is executed according to the above-mentioned container creation instruction to create a container and determines the corresponding CPU core index according to the above-mentioned resource pool label; the above-mentioned resource pool label And the corresponding CPU core index is sent to the above-mentioned CRI, so that the above-mentioned CRI binds the above-mentioned container to the CPU core corresponding to the above-mentioned resource pool; the execution agent module sends the container creation result information to the scheduler of the above-mentioned container orchestration engine; because according to the current The status information of the resource pool corresponding to each node, select the target node that matches the above resource pool label and resource demand, can accurately bind and isolate CPU resources, accurately control the CPU resources bound to the container, and allow the resource pool to be used as the Units are evaluated and scheduled, and the technical effects of CPU resource control and isolation can
  • the execution agent module on the current node before the execution agent module on the current node receives the container creation instruction sent by the container scheduler orchestration engine, it also includes:
  • the proxy node After the proxy node accesses the container orchestration engine, it receives the resource pool initialization instruction sent by the scheduler of the container orchestration engine;
  • the execution agent module sends resource pool initialization result information to the above-mentioned scheduler.
  • the above-mentioned dividing the CPU resources on the agent node into several groups according to the above-mentioned initialization instructions includes: using the cgroup subsystem of the Linux kernel to build multiple CPU groups according to the configuration requirements of the above-mentioned resource pool, wherein , each CPU group includes preset CPU cores.
  • Kubernetes is currently the most mainstream and widely used open source container computing platform in the industry. It allows users to easily and efficiently deploy container applications on a batch of common infrastructure nodes, and provides a set of application deployment, planning, updating, and maintenance of the whole life Cycle management mechanism to meet different actual needs.
  • Pod is the smallest business abstraction unit that Kubernetes can manage.
  • a pod can contain one or more containers.
  • Users will write business orchestration blueprints according to actual needs, which will require the creation of one or more business pods.
  • the built-in native scheduler of Kubernetes will evaluate all the nodes under its jurisdiction, combine the available resources of each node, the resource requirements of the Pod, and other factors, and finally decide which node to build the Pod on.
  • the Kubernetes scheduler continuously monitors the running status of each node and all Pods to ensure that the resources of all nodes can be fully utilized, and at the same time, there will be no overloading of some nodes or failure of some Pods to obtain the resources they need. Phenomenon.
  • the scheduler needs to continuously monitor the current available resources on each node; the scheduler needs to ensure that the workload carried by all nodes is basically balanced; when creating a new Pod, the scheduler needs to combine the resource requirements of each Pod The available resources and workload of the node determine which node the Pod is created on.
  • CPU is generally measured by CPU time/second. For example, for an 8-core node, the total available CPU resources within 1 second is 8 (8000 if milliseconds are used as the unit of measurement); while memory is directly measured by size. The unit of measurement, for example, if there is 16G memory on a node, then the total maximum available memory is 16G.
  • a Pod When a Pod is created, it will consume a portion of CPU and memory resources (can be declared in the blueprint), and these consumed resources will be deducted from the total resources of the node. If the current available resources of a node can no longer meet the needs of a Pod, the Kubernetes scheduler will not let the Pod be built on this node, but will find another node with sufficient resources. If the current available resources of all nodes do not meet the conditions, the creation process of the Pod will be suspended, and the scheduler will continue to monitor the resource status of all nodes, and wait for the resources of a certain node to be available before executing the creation of the Pod.
  • Kubernetes treats it as a whole.
  • the scheduler schedules them as a CPU time resource pool during work, and does not distinguish which core the resource belongs to.
  • the scheduling of the above Pod processes between different CPU cores is not implemented by Kubernetes, but by the kernel scheduler of the node operating system.
  • the task of the kernel scheduler of the operating system is to distribute all processes running on the node to all CPU cores in a balanced manner, so as to make full use of all CPU resources as much as possible.
  • the kernel scheduler is very similar to the Kubernetes scheduler, except that their scheduling object levels are different: the Kubernetes scheduler is responsible for scheduling Pods to appropriate nodes, and balancing the load of all nodes as much as possible ; The kernel scheduler is responsible for reasonably allocating all Pod processes to all CPU cores on a specific node, so as to make all CPU cores fully utilized at all times and maintain load balance as much as possible.
  • a node will not only run pods, but also the core processes of the operating system and Kubernetes management processes will consume certain resources. If the scheduler does not reserve part of the system process and Kubernetes management process when calculating node resources, it may cause the Pod process to preempt the resources of these key processes, causing the node to work abnormally.
  • Kubernetes specifically provides system resource reservation parameters, which allow system administrators to reserve some resources for system processes and management processes. Kubernetes will exclude these resources from the visible range of the scheduler to ensure that Pods will not occupy them. this part of the resource.
  • CPU resources on a node are divided into three blocks, among which the resources reserved for Pods are called allocatable pools, which do not contain management processes for the system or Kubernetes itself Reserved resources, so PODs running on this node will never occupy the reserved CPU resources.
  • Kubernetes cannot meet the above two isolation requirements.
  • Kubernetes regards the resources on each node as a whole. After excluding the resources reserved for the system, all remaining resources on the node are incorporated into a separate schedulable resource pool by Kubernetes.
  • the scheduler selects nodes for POD, it is based on the total vacancy of this schedulable resource pool. Evaluated; when the POD is running on the node, the resources of the entire schedulable pool can be used, and precise core binding or isolation control cannot be performed.
  • a container CPU resource scheduling and isolation method is provided.
  • the applicable environment requirements for the above method are as follows: use Kubernetes to manage the container application environment; as shown in Figure 7, this
  • the application also provides a container CPU resource scheduling and isolation device, including: module A: interface server (API Server), module B: database, module C: container runtime; module D: enhanced scheduler, module D: execution agent module (kubelet); where:
  • Module A is responsible for providing user interaction interface and functional interface. Users can manage and configure Kubernetes clusters through the interfaces or interfaces provided by this module, and at the same time create and manage various business Pods and related objects.
  • Module B is responsible for the internal management of the Kubernetes system and the access and persistence of state data. It will store the user configuration data input from module A, and return the data set queried by the user to module A; it will also store the node status and resource status information returned from module D, and respond to the data query request sent by subsequent module D.
  • Module C runs on the node and is responsible for accepting the request from module E, creating, deleting or configuring containers and images on the node, and responding to the container status query request.
  • Module D is responsible for maintaining resource status information of all nodes, scheduling decisions of all Pods, and sending execution instructions to module E.
  • Module E runs on the node and is responsible for accepting and responding to instructions from module D, initializing resource pools on the node, interacting with module C, managing the lifecycle of containers and binding CPU cores.
  • the key function of the scheduler is to perform unified evaluation and scheduling on multiple CPU resource pools of all nodes, and select an appropriate node for it according to the requirements of the POD; while the execution agent module runs on the node and is responsible for The scheduler's instructions create resource pools and PODs, and bind the two when containers are created.
  • the method for scheduling and isolating container CPU resources includes: S802: Read the configuration and obtain the configuration information of the node resource pool. Specifically, before the environment is deployed, the user should pre-plan Configure the resource pool on a node with a specific specification, and record the configuration information in the corresponding configuration file. When the enhanced scheduler starts, it will read the configuration file to know the expected configuration information of the node resource pool.
  • S804 Obtain a node list, and initialize node resource states. Specifically, the enhanced scheduler obtains a registered node list from a built-in Kubernetes database, and records and initializes resource pool usage state information of these nodes in the database. When the system is just started, the node list may be empty, but the new node management action will trigger the scheduler's node addition process to complete the initialization action.
  • S806 Send a resource initialization instruction to the nodes. Specifically, after the scheduler has learned the information of all currently managed nodes, it sends a resource pool initialization instruction to the execution agents of each node. The execution agent should divide the CPU cores on the node into several groups according to the instructions, and put them into different resource pools for subsequent use when creating PODs.
  • the method for scheduling and isolating container CPU resources includes:
  • S902 receiving a newly added node, specifically, the enhanced scheduler obtains a message that the new node is managed from other Kubernetes management services, and obtains access interface information of the execution agent program of the new node.
  • S904 Send a resource pool initialization instruction to the node, specifically, the enhanced scheduler sends a resource pool initialization instruction to the execution agent of the new node, which contains details of one or more resource pools that need to be created (resource pool labels and included CPU cores index, etc.).
  • step S906 Determine whether the resource pool initialization is successful, specifically: if the execution agent replies that the resource pool has been successfully created, continue to step S908; if it fails, enter step S910, resend the creation instruction and continue to wait.
  • the method for scheduling and isolating container CPU resources includes:
  • the enhanced scheduler acquires CPU resource scheduling messages from other Kubernetes management services.
  • the enhanced scheduler obtains the specific parameters of CPU resource scheduling from the CPU resource scheduling message, which includes the label of the resource pool that the Pod wants to enter and the resource demand (if these parameters are not configured, default values are used).
  • the enhanced scheduler evaluates the resource status of the resource pools corresponding to all nodes, and screens the access nodes according to the resource pool label and resource demand that the Pod wants to enter, combined with the status information of the current resource pools corresponding to each node maintained in the database.
  • step S1008 If the target node can be selected, go to step S1010; if no node can be selected, stop the process directly and go to step S1018; the creation of the Pod will be suspended.
  • step S1012 If a batch of optional nodes can be selected, the enhanced scheduler will execute the scheduling logic of the Kubernetes native scheduler on the basis of these nodes to filter again. This step is mainly to complete other non-CPU resources (such as memory, ports, etc.) etc.) scheduling screening. If no node can be selected by the screening, go to step S1018, the process will be terminated directly, and the creation of the Pod will be suspended.
  • S1014 Send a pod creation instruction to the selection node; a final access candidate node can be obtained.
  • the enhanced scheduler sends instructions to the execution agent of the node, which contains the detailed information of the Pod to be created, so that the execution agent can create the Pod on the node and bind the resource pool.
  • Step S1018 the process is terminated, and the creation of the Pod will be suspended.
  • the method for scheduling and isolating container CPU resources includes:
  • the execution agent program reads the initial configuration and starts, and registers the node where it is located with the Kubernetes control node. This step is the same as that of the Kubernetes native execution agent program (Kubelet).
  • the enhanced scheduler After the node where the execution agent is located is managed by Kubernetes, the enhanced scheduler will send a resource pool initialization command.
  • S1106 The execution agent needs to divide the CPU resources on the node into several groups according to the instruction, which belong to different resource pool objects. There are many ways to group CPUs. The most common method is to use the cgroup subsystem of the Linux kernel to create multiple cpusets according to the configuration requirements of the resource pool, and each cpuset contains specified CPU cores.
  • the method for scheduling and isolating container CPU resources includes:
  • the execution agent on a certain node receives a Pod creation instruction from the enhanced scheduler, which includes information such as container configuration data to be created, resource pools to be bound, and the like.
  • S1204 Read the Pod creation instruction, which includes information such as container configuration data that needs to be created, resource pools to be bound, and the like.
  • the execution agent invokes a container runtime interface (Container Runtime Interface, CRI for short) on the node to create a container according to the creation instruction. When created, it will find the corresponding cpuset index according to the resource pool label, and bind the container process to the corresponding cpuset.
  • CRI Container Runtime Interface
  • the environment reserves 1.5 cores for operating system processes, 2 cores for Kubernetes’ own management processes, and 4.5 cores for pods; the native resource allocation mechanism only supports one pod reservation Group (allocated pool); the original resource reservation mechanism is divided by available CPU time (for example, reserving 1.5 cores means that 150ms of CPU time can be used within 100ms), so different reservation groups It is possible for processes to be assigned to the same CPU core for scheduling (this may lead to resource contention); at a certain moment, it is uncertain which CPU core a process in a different reservation group runs on .
  • the position shown in FIG. 13 is only an example, without any limitation.
  • one core is reserved for the operating system process, two cores are reserved for the Kubernetes self-management process, and two cores are reserved for Pod group A , 3 cores are reserved for Pod group B.
  • Enhanced resource allocation mechanism supports multiple Pod reservation groups (multiple allocatable pools). The enhanced solution is to precisely bind CPU cores to reserved groups by creating multiple cpusets, and users can arbitrarily specify the mapping relationship between CPU cores and reserved groups.
  • Pod Reserved Group B is bound to CPUs 3, 4, and 5, and all Pod processes included in Pod Reserved Group B will only run on CPUs 3, 4, and 5. The same applies to other reservation groups. In this embodiment, which CPU core (or which range) the processes in different reservation groups run on is determined at any time.
  • the Pod indicates that it wants to belong to reserved group A, and the minimum requirement for CPU resources is 120ms.
  • the enhanced scheduler traverses all nodes and finds that only the resource status of node 0 can meet the requirements; after other resource judgments are passed, the scheduler sends the command to create a Pod to the execution agent of node 0, and simultaneously Pods reserve group A resources with a deduction of 120ms (the remaining 60ms).
  • the Pod indicates that it wants to belong to reserved group B, and the minimum requirement for CPU resources is 60ms.
  • the enhanced scheduler traverses all nodes and finds that the resources of nodes 1 and 2 can meet the requirements, but the resources of node 1 are more relaxed than those of node 2 (240>100), so the preferred result is node 1.
  • the scheduler sends a Pod creation command to the execution agent of Node 1, and at the same time deducts 60ms of Group B resources reserved for Pods of Node 1 (the remaining 180ms).
  • the Pod indicates that it wants to belong to reserved group A, and the minimum requirement for CPU resources is 200ms.
  • the enhanced scheduler traverses all nodes and finds that no node can meet the requirements, so it directly ends the judgment and suspends the Pod creation process.
  • a Pod belonging to reserved group A runs abnormally after it is successfully created on node 0, causing it to consume all the time on CPU 0 and CPU 1 (these CPU cores belong to reserved Group A), at this time, the Pods belonging to reserved group B are not affected by it, and the operating system process and Kubernetes management process are not affected by it, and the creation and scheduling process of Pods belonging to reserved group B can still proceed normally.
  • the execution agent calls the container runtime interface on the node to create the container.
  • the method according to the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation.
  • the technical solution of the present disclosure can be embodied in the form of a software product in essence or the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the above-mentioned methods in various embodiments of the present disclosure.
  • a terminal device which may be a mobile phone, a computer, a server, or a network device, etc.
  • This embodiment also provides a container CPU resource scheduling and isolation device.
  • the device is used to implement the above-mentioned embodiments and preferred implementation modes, and what has been described will not be repeated.
  • the term "module” may be a combination of software and/or hardware that realizes a predetermined function.
  • the devices described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
  • Fig. 16 is a structural block diagram of a container CPU resource scheduling and isolation device according to an embodiment of the present disclosure. As shown in Fig. 16 , the device includes:
  • the first creating unit 1602 is configured to create a resource pool, and make each node divide its own CPU resources according to the resource pool;
  • the obtaining unit 1604 is configured to obtain container creation information; wherein, the container creation information includes the desired resource pool label;
  • the determining unit 1606 is configured to determine the target node according to the resource pool label and the state of the resource pool corresponding to each node;
  • the sending unit 1608 is configured as a container orchestration engine sending a container creation instruction to the execution agent module of the target node, so that the execution agent module creates a container and binds the container to the CPU core corresponding to the resource pool.
  • the container orchestration engine may include a Kubernetes platform, where a container may be the smallest business abstraction unit pod that Kubernetes can manage, and a pod may include one or more containers.
  • the resource pool label can be the name of different resource pools obtained by dividing multiple CPUs, and the resource requirement can be the capacity of the occupied CPU and the duration of the occupied CPU, which is not limited here.
  • the scheduler is used to obtain the creation instruction of the container from the container orchestration engine; wherein, the above-mentioned creation instruction carries the resource pool label and the resource demand that the above-mentioned container expects to enter; according to the state information of the resource pool corresponding to each node at present , select the target node that matches the above resource pool label and resource demand; the method of creating the above container on the above target node; because according to the status information of the resource pool corresponding to each node at present, select the target node that matches the above resource pool label and resource demand Matching target nodes can accurately bind and isolate CPU resources, thereby achieving precise control of CPU resources bound to containers and allowing evaluation and scheduling in units of resource pools, and more flexible and accurate control and isolation of CPU resources technical effect.
  • Fig. 17 is a structural block diagram of a container CPU resource scheduling and isolation device according to an embodiment of the present disclosure. As shown in Fig. 17 , the device includes:
  • the receiving unit 1702 is configured to receive the container creation instruction sent by the container orchestration engine, wherein the above-mentioned container creation instruction carries the configuration information of the container configuration data to be created and the resource pool to be bound, and the above-mentioned configuration information includes the resource pool label;
  • the second creation unit 1704 is configured to call the container runtime interface CRI on the node for service execution to create a container according to the container creation instruction and determine the corresponding CPU core index according to the resource pool label;
  • the first sending unit 1706 is configured to send the resource pool label and the corresponding CPU core index to the CRI, so that how many CRIs bind the container to the CPU core corresponding to the resource pool;
  • the second sending unit 1708 is configured to send task creation result information to the scheduler of the container orchestration engine.
  • the execution agent module on the current node is used to receive the container creation instruction from the scheduler, wherein the above-mentioned creation instruction carries the configuration data of the container to be created and the resource pool information to be bound, and the information of the above-mentioned resource includes resource Pool label; the above-mentioned execution agent module calls the container runtime interface CRI on the node for business execution according to the above-mentioned creation instruction to create a container; wherein, the above-mentioned CRI determines the CPU setting index corresponding to the above-mentioned node according to the resource pool label, and the above-mentioned container process Bind to the corresponding CPU to set the index; the execution agent module sends the task creation result information to the above-mentioned scheduler; according to the state information of the resource pool corresponding to each node at present, select the target node that matches the above-mentioned resource pool label and resource demand, It can accurately bind and isolate CPU resources, thereby achieving
  • the above-mentioned modules can be realized by software or hardware. For the latter, it can be realized by the following methods, but not limited to this: the above-mentioned modules are all located in the same processor; or, the above-mentioned modules can be combined in any combination The forms of are located in different processors.
  • Embodiments of the present disclosure also provide a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps in any one of the above method embodiments when running.
  • the above-mentioned computer-readable storage medium may include but not limited to: U disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM) , mobile hard disk, magnetic disk or optical disk and other media that can store computer programs.
  • ROM read-only memory
  • RAM random access memory
  • mobile hard disk magnetic disk or optical disk and other media that can store computer programs.
  • Embodiments of the present disclosure also provide an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
  • the electronic device may further include a transmission device and an input and output device, wherein the transmission device is connected to the processor, and the input and output device is connected to the processor.
  • each module or each step of the above-mentioned disclosure can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed in a network composed of multiple computing devices In fact, they can be implemented in program code executable by a computing device, and thus, they can be stored in a storage device to be executed by a computing device, and in some cases, can be executed in an order different from that shown here. Or described steps, or they are fabricated into individual integrated circuit modules, or multiple modules or steps among them are fabricated into a single integrated circuit module for implementation. As such, the present disclosure is not limited to any specific combination of hardware and software.

Abstract

Provided are a container CPU resource scheduling and isolation method and apparatus, and a storage medium and an electronic device. The method comprises: a container orchestration engine planning and creating a plurality of resource pods, and causing each node to divide its own CPU resources by resource pod; the container orchestration engine acquiring a container creation request instruction, wherein the container creation request instruction carries a resource pod label that is expected to enter; the container orchestration engine determining a target node according to the resource pod label and the state of the resource pod corresponding to each node; and the container orchestration engine sending a container creation instruction to an execution agent module of the target node, such that the execution agent module creates a container on the target node and binds the container with a CPU core corresponding to the resource pod. Therefore, the problem of different types of pods having a precise isolation requirement for CPU resources is solved.

Description

容器CPU资源调度与隔离方法和装置、存储介质及电子设备Container CPU resource scheduling and isolation method and device, storage medium and electronic equipment
相关申请的交叉引用Cross References to Related Applications
本公开基于2021年9月26日提交的发明名称为“容器CPU资源调度与隔离方法和装置、存储介质及电子设备”的中国专利申请CN202111132020.0,并且要求该专利申请的优先权,通过引用将其所公开的内容全部并入本公开。This disclosure is based on the Chinese patent application CN202111132020.0 filed on September 26, 2021 with the title of "Container CPU resource scheduling and isolation method and device, storage medium and electronic equipment", and claims the priority of this patent application, by reference All the disclosed content is incorporated into this disclosure.
技术领域technical field
本公开涉计算机技术领域,具体而言,涉及一种容器CPU资源调度与隔离方法和装置、存储介质及电子设备。The present disclosure relates to the field of computer technology, and in particular, to a container CPU resource scheduling and isolation method and device, a storage medium, and electronic equipment.
背景技术Background technique
Kubernetes是目前业界最主流、应用最广泛的开源容器计算平台,其允许用户简单高效地在一批通用基础设施节点上部署容器应用,并提供了一套应用部署、规划、更新、维护的全生命周期管理机制,以满足不同的实际需求。Kubernetes is currently the most mainstream and widely used open source container computing platform in the industry. It allows users to easily and efficiently deploy container applications on a batch of common infrastructure nodes, and provides a set of application deployment, planning, updating, and maintenance of the whole life Cycle management mechanism to meet different actual needs.
然而原生Kubernetes将每个节点上的资源作为一个整体来看待。在排除掉为系统预留的资源之后,节点上的所有剩余资源都被Kubernetes纳入一个单独的可调度资源池,调度器在为容器pod选择节点时,是以这个可调度资源池的总空余量来评估的;而当pod在节点上运行时,整个可调度池的资源都是可以被使用的,无法进行精确的绑核或隔离控制。However, native Kubernetes treats the resources on each node as a whole. After excluding the resources reserved for the system, all remaining resources on the node are incorporated into a separate schedulable resource pool by Kubernetes. When the scheduler selects nodes for container pods, it uses the total vacancy of this schedulable resource pool To evaluate; when the pod is running on the node, the resources of the entire schedulable pool can be used, and precise core binding or isolation control cannot be performed.
针对上述原生Kubernetes的资源管理与调度机制无法满足不同类型的pod对CPU资源的精确隔离需求的问题,目前尚未提出有效的解决方案。For the above-mentioned problem that the resource management and scheduling mechanism of native Kubernetes cannot meet the precise isolation requirements of different types of pods for CPU resources, no effective solution has been proposed yet.
发明内容Contents of the invention
本公开实施例提供了一种容器CPU资源调度与隔离方法和装置、存储介质及电子设备,以至少解决原生Kubernetes的资源管理与调度机制无法满足不同类型的pod对CPU资源的精确隔离需求的问题。Embodiments of the present disclosure provide a container CPU resource scheduling and isolation method and device, a storage medium, and electronic equipment to at least solve the problem that the resource management and scheduling mechanism of native Kubernetes cannot meet the precise isolation requirements of different types of pods for CPU resources. .
根据本公开的一个方面,提供了一种容器CPU资源调度与隔离方法,包括:According to one aspect of the present disclosure, a container CPU resource scheduling and isolation method is provided, including:
容器编排引擎规划并创建资源池,并令各节点将自身CPU资源按资源池进行划分;容器编排引擎获取容器创建信息;其中,所述容器创建信息包含期望进入的资源池标签;容器编排引擎根据所述资源池标签以及各节点对应的资源池的状态,确定出目标节点;容器编排引擎发送容器创建指令至所述目标节点的执行代理模块,以使所述执行代理模块创建容器并将所述容器与所述资源池对应的CPU核进行绑定。The container orchestration engine plans and creates resource pools, and makes each node divide its own CPU resources into resource pools; the container orchestration engine obtains container creation information; wherein, the container creation information includes the desired resource pool label; the container orchestration engine according to The resource pool label and the state of the resource pool corresponding to each node determine the target node; the container orchestration engine sends a container creation instruction to the execution agent module of the target node, so that the execution agent module creates a container and The container is bound to the CPU core corresponding to the resource pool.
根据本公开的另一个方面,提供了一种容器CPU资源调度与隔离方法,包括:当前节点上的执行代理模块接收容器编排引擎发送的容器创建指令,其中,上述容器创建指令携带需要创建容器的配置数据以及待绑定的资源池的配置信息,上述配置信息包含资源池标签;上述执行代理模块根据上述容器创建指令,调用业务执行的节点上的容器运行时接口CRI创建容器并根据上述资源池标签确定出对应的CPU核索引;将上述资源池标签和对应的CPU核索 引发送至上述CRI,以使CRI将上述容器与上述资源池对应的CPU核进行绑定;执行代理模块发送容器创建结果信息至上述容器编排引擎的调度器。According to another aspect of the present disclosure, a container CPU resource scheduling and isolation method is provided, including: the execution agent module on the current node receives the container creation instruction sent by the container orchestration engine, wherein the above container creation instruction carries the container creation instruction Configuration data and configuration information of the resource pool to be bound, the above configuration information includes the resource pool label; the above-mentioned execution agent module calls the container runtime interface CRI on the node for business execution to create a container according to the above-mentioned container creation instruction and creates a container according to the above-mentioned resource pool The label determines the corresponding CPU core index; the above resource pool label and the corresponding CPU core index are sent to the above CRI, so that the CRI binds the above container to the CPU core corresponding to the above resource pool; the execution agent module sends the container creation result Information to the scheduler of the above container orchestration engine.
根据本公开的另一个方面,提供了一种容器CPU资源调度与隔离装置,包括:第一创建单元,设置为创建资源池,并令各节点将自身CPU资源按资源池进行划分;获取单元,设置为获取容器创建信息;其中,所述容器创建信息包含期望进入的资源池标签;确定单元,设置为根据所述资源池标签以及各节点对应的资源池的状态,确定出目标节点;发送单元,设置为容器编排引擎发送容器创建指令至所述目标节点的执行代理模块,以使所述执行代理模块创建容器并将所述容器与所述资源池对应的CPU核进行绑定。According to another aspect of the present disclosure, there is provided a container CPU resource scheduling and isolation device, including: a first creation unit configured to create a resource pool, and make each node divide its own CPU resources into resource pools; an acquisition unit, It is set to obtain container creation information; wherein, the container creation information includes the desired resource pool label; the determination unit is configured to determine the target node according to the resource pool label and the state of the resource pool corresponding to each node; the sending unit , it is set that the container orchestration engine sends a container creation instruction to the execution agent module of the target node, so that the execution agent module creates a container and binds the container to the CPU core corresponding to the resource pool.
根据本公开的另一个方面,提供了一种CPU资源调度与隔离装置,包括:接收单元,设置为接收容器编排引擎发送的容器创建指令,其中,所述容器创建指令携带需要创建容器配置数据以及待绑定的资源池的配置信息,所述配置信息包含资源池标签;第二创建单元,设置为根据所述容器创建指令,调用业务执行的节点上的容器运行时接口CRI创建容器并将所述容器与所述资源池对应的CPU核进行绑定;第一发送单元,设置为将所述资源池标签和对应的CPU核索引发送至所述CRI,以使多少CRI将所述容器与所述资源池对应的CPU核进行绑定;第二发送单元,设置为发送任务创建结果信息至所述容器编排引擎的调度器。According to another aspect of the present disclosure, there is provided a CPU resource scheduling and isolation device, including: a receiving unit configured to receive a container creation instruction sent by a container orchestration engine, wherein the container creation instruction carries configuration data to be created and The configuration information of the resource pool to be bound, the configuration information includes the resource pool label; the second creation unit is configured to call the container runtime interface CRI on the node of the service execution to create the container according to the container creation instruction and The container is bound to the CPU core corresponding to the resource pool; the first sending unit is configured to send the resource pool label and the corresponding CPU core index to the CRI, so that how many CRIs associate the container with the The CPU core corresponding to the resource pool is bound; the second sending unit is configured to send task creation result information to the scheduler of the container orchestration engine.
根据本公开的又一个实施例,还提供了一种计算机可读存储介质,上述计算机可读存储介质中存储有计算机程序,其中,上述计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。According to yet another embodiment of the present disclosure, there is also provided a computer-readable storage medium, in which a computer program is stored in the above-mentioned computer-readable storage medium, wherein the above-mentioned computer program is configured to execute any one of the above-mentioned method embodiments when running in the steps.
根据本公开的又一个实施例,还提供了一种电子装置,包括存储器和处理器,上述存储器中存储有计算机程序,上述处理器被设置为运行上述计算机程序以执行上述任一项方法实施例中的步骤。According to yet another embodiment of the present disclosure, there is also provided an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute any one of the above method embodiments in the steps.
附图说明Description of drawings
图1是根据本公开实施例的容器CPU资源调度与隔离方法的通信设备的硬件结构框图;FIG. 1 is a block diagram of a hardware structure of a communication device according to a container CPU resource scheduling and isolation method according to an embodiment of the present disclosure;
图2是根据本公开实施例的一种容器CPU资源调度与隔离方法的流程图;Fig. 2 is a flowchart of a container CPU resource scheduling and isolation method according to an embodiment of the present disclosure;
图3是根据本公开实施例的另一种容器CPU资源调度与隔离方法的流程图;Fig. 3 is a flowchart of another container CPU resource scheduling and isolation method according to an embodiment of the present disclosure;
图4是根据本公开实施例的一种容器CPU资源调度与隔离方法的节点调度状态示意图;4 is a schematic diagram of a node scheduling state of a container CPU resource scheduling and isolation method according to an embodiment of the present disclosure;
图5是根据本公开实施例的一种容器CPU资源调度与隔离方法的节点运行进程示意图;5 is a schematic diagram of a node running process of a container CPU resource scheduling and isolation method according to an embodiment of the present disclosure;
图6是根据本公开实施例的一种容器CPU资源调度与隔离方法的节点CPU资源池示意图;6 is a schematic diagram of a node CPU resource pool according to a container CPU resource scheduling and isolation method according to an embodiment of the present disclosure;
图7是根据本公开实施例的一种容器CPU资源调度与隔离系统的架构示意图;FIG. 7 is a schematic diagram of a container CPU resource scheduling and isolation system according to an embodiment of the present disclosure;
图8是根据本公开实施例的另一种容器CPU资源调度与隔离方法的流程图;FIG. 8 is a flow chart of another container CPU resource scheduling and isolation method according to an embodiment of the present disclosure;
图9是根据本公开实施例的又一种容器CPU资源调度与隔离方法的流程图;FIG. 9 is a flow chart of another container CPU resource scheduling and isolation method according to an embodiment of the present disclosure;
图10是根据本公开实施例的另一种容器CPU资源调度与隔离方法的流程图;FIG. 10 is a flow chart of another container CPU resource scheduling and isolation method according to an embodiment of the present disclosure;
图11是根据本公开实施例的又一种容器CPU资源调度与隔离方法的流程图;FIG. 11 is a flowchart of another container CPU resource scheduling and isolation method according to an embodiment of the present disclosure;
图12是根据本公开实施例的又一种容器CPU资源调度与隔离方法的流程图;Fig. 12 is a flowchart of another container CPU resource scheduling and isolation method according to an embodiment of the present disclosure;
图13是根据本公开实施例的一种容器CPU资源调度与隔离方法的节点资源划分示意图;FIG. 13 is a schematic diagram of node resource division according to a container CPU resource scheduling and isolation method according to an embodiment of the present disclosure;
图14是根据本公开实施例的另一种容器CPU资源调度与隔离方法的节点资源划分示意图;14 is a schematic diagram of node resource division according to another container CPU resource scheduling and isolation method according to an embodiment of the present disclosure;
图15是根据本公开实施例的另一种容器CPU资源调度与隔离方法的节点资源划分示意图;15 is a schematic diagram of node resource division according to another container CPU resource scheduling and isolation method according to an embodiment of the present disclosure;
图16是根据本公开实施例的一种容器CPU资源调度与隔离装置的结构示意图;Fig. 16 is a schematic structural diagram of a container CPU resource scheduling and isolation device according to an embodiment of the present disclosure;
图17是根据本公开实施例的另一种容器CPU资源调度与隔离装置的结构示意图。Fig. 17 is a schematic structural diagram of another container CPU resource scheduling and isolation device according to an embodiment of the present disclosure.
具体实施方式Detailed ways
下文中将参考附图并结合实施例来详细说明本公开的实施例。Hereinafter, embodiments of the present disclosure will be described in detail with reference to the drawings and in combination with the embodiments.
需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that the terms "first" and "second" in the specification and claims of the present disclosure and the above drawings are used to distinguish similar objects, but not necessarily used to describe a specific sequence or sequence.
本申请实施例中所提供的方法实施例可以在移动终端、计算机终端或者类似的运算装置中执行。以运行在移动终端上为例,图1是本公开实施例的一种容器CPU资源调度与隔离方法的移动终端的硬件结构框图。如图1所示,移动终端可以包括一个或多个(图1中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)和设置为存储数据的存储器104,其中,上述移动终端还可以包括设置为通信功能的传输设备106以及输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述移动终端的结构造成限定。例如,移动终端还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。The method embodiments provided in the embodiments of the present application may be executed in mobile terminals, computer terminals or similar computing devices. Taking running on a mobile terminal as an example, FIG. 1 is a block diagram of a hardware structure of a mobile terminal according to a method for scheduling and isolating container CPU resources according to an embodiment of the present disclosure. As shown in Figure 1, the mobile terminal may include one or more (only one is shown in Figure 1) processors 102 (processors 102 may include but not limited to processing devices such as microprocessor MCU or programmable logic device FPGA, etc.) and a memory 104 configured to store data, wherein the mobile terminal may further include a transmission device 106 and an input/output device 108 configured to communicate. Those skilled in the art can understand that the structure shown in FIG. 1 is only for illustration, and it does not limit the structure of the above mobile terminal. For example, the mobile terminal may also include more or fewer components than those shown in FIG. 1 , or have a different configuration from that shown in FIG. 1 .
存储器104可设置为存储计算机程序,例如,应用软件的软件程序以及模块,如本公开实施例中的容器CPU资源调度与隔离方法对应的计算机程序,处理器102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至移动终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 104 can be set to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the container CPU resource scheduling and isolation method in the embodiment of the present disclosure, the processor 102 runs the computer program stored in the memory 104 program, so as to execute various functional applications and data processing, that is, to realize the above-mentioned method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory that is remotely located relative to the processor 102, and these remote memories may be connected to the mobile terminal through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
传输装置106设置为经由一个网络接收或者发送数据。上述的网络具体实例可包括移动终端的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network Interface Controller,简称为刚C),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,简称为RF)模块,其设置为通过无线方式与互联网进行通讯。The transmission device 106 is configured to receive or transmit data via a network. The specific example of the above network may include a wireless network provided by the communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as C for short), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (Radio Frequency, referred to as RF) module, which is configured to communicate with the Internet in a wireless manner.
图2是根据本公开实施例的容器CPU资源调度与隔离方法的流程图,如图2所示,该流程包括如下步骤:Fig. 2 is a flowchart of a container CPU resource scheduling and isolation method according to an embodiment of the present disclosure. As shown in Fig. 2, the process includes the following steps:
S202,容器编排引擎规划并创建资源池,并令各节点将自身CPU资源按资源池进行划分;S202, the container orchestration engine plans and creates a resource pool, and makes each node divide its own CPU resources according to the resource pool;
S204,容器编排引擎获取容器创建信息;其中,所述容器创建信息包含期望进入的资源池标签;S204, the container orchestration engine acquires container creation information; wherein, the container creation information includes the desired resource pool label;
S206,容器编排引擎根据所述资源池标签以及各节点对应的资源池的状态,确定出目标节点;S206. The container orchestration engine determines the target node according to the resource pool label and the state of the resource pool corresponding to each node;
S208,容器编排引擎发送容器创建指令至所述目标节点的执行代理模块,以使所述执行代理模块创建容器并将所述容器与所述资源池对应的CPU核进行绑定。S208, the container orchestration engine sends a container creation instruction to the execution agent module of the target node, so that the execution agent module creates a container and binds the container to the CPU core corresponding to the resource pool.
在申请实施例中,容器编排引擎可以包括Kubernetes平台,这里的容器可以为Kubernetes所能管理的最小业务抽象单元pod,一个pod可以包含一个或多个容器。资源池标签可以为将多个CPU进行划分得到的不同的资源池的名称,资源需求量可以为所占用CPU的时长,在此不做任何限定。In the embodiment of the application, the container orchestration engine may include a Kubernetes platform, where a container may be the smallest business abstraction unit pod that Kubernetes can manage, and a pod may contain one or more containers. The resource pool label may be the name of a different resource pool obtained by dividing multiple CPUs, and the resource demand may be the time length of the occupied CPU, which is not limited here.
通过本公开实施例,采用了调度器从容器编排引擎获取容器的创建指令;其中,上述创建指令携带上述容器期望进入的资源池标签以及资源需求量;根据当前各节点对应的资源池的状态信息,选择与上述资源池标签和资源需求量匹配的目标节点;在上述目标节点上创建上述容器的方式;由于根据当前各节点对应的资源池的状态信息,选择与上述资源池标签和资源需求量匹配的目标节点,可以精确控制容器绑定的CPU资源以及允许以资源池为单位进行评估调度,而且能够更灵活与精确的对CPU资源管控与隔离的技术效果。Through the embodiments of the present disclosure, the scheduler is used to obtain the creation instruction of the container from the container orchestration engine; wherein, the above-mentioned creation instruction carries the resource pool label and the resource demand that the above-mentioned container expects to enter; according to the state information of the resource pool corresponding to each node at present , select the target node that matches the above resource pool label and resource demand; the method of creating the above container on the above target node; because according to the status information of the resource pool corresponding to each node at present, select the target node that matches the above resource pool label and resource demand Matching target nodes can precisely control the CPU resources bound to the container and allow evaluation and scheduling in units of resource pools, and can more flexibly and accurately control and isolate CPU resources.
在一个或多个实施例中,上述步骤S202,上述容器编排引擎规划并创建资源池,并令各节点将自身CPU资源按照资源池进行划分之前,包括:In one or more embodiments, before the above-mentioned step S202, the above-mentioned container orchestration engine plans and creates a resource pool, and makes each node divide its own CPU resources according to the resource pool, it includes:
将上述各节点对应的CPU资源进行分配得到分配结果;其中,上述分配结果用于为上述容器编排引擎所属的节点创建资源池;Allocating the CPU resources corresponding to the above nodes to obtain an allocation result; wherein, the above allocation result is used to create a resource pool for the node to which the above container orchestration engine belongs;
获取节点配置文件,其中,上述节点配置文件中记录有节点资源池配置信息;Obtain a node configuration file, wherein the node resource pool configuration information is recorded in the above node configuration file;
获取注册节点的列表,存储并初始化上述注册节点的资源池使用状态信息;Obtain the list of registered nodes, store and initialize the resource pool usage status information of the above registered nodes;
当上述调度器获取到当前所有节点的配置信息后,向各节点对应的执行代理模块发送资源池初始化指令;其中,上述资源池初始化指令用于使上述执行代理模块将节点上的CPU核划分为若干标签CPU组,并将上述标签CPU组匹配不同的资源池。After the above-mentioned scheduler obtains the configuration information of all current nodes, it sends a resource pool initialization instruction to the execution agent module corresponding to each node; wherein, the above-mentioned resource pool initialization instruction is used to make the above-mentioned execution agent module divide the CPU core on the node into Several tag CPU groups, and match the above tag CPU groups to different resource pools.
在一个或多个实施例中,步骤S206,容器编排引擎根据所述资源池标签以及各节点对应的资源池的状态,确定出目标节点,包括:In one or more embodiments, in step S206, the container orchestration engine determines the target node according to the resource pool label and the state of the resource pool corresponding to each node, including:
所述容器编排引擎根据当前各节点对应的资源池的状态信息,选择与所述资源池标签和资源需求量匹配的目标节点。The container orchestration engine selects a target node that matches the label of the resource pool and the resource demand according to the state information of the resource pool corresponding to each node.
在一个或多个实施例中,容器编排引擎根据当前各节点对应的资源池的状态信息,选择与上述资源池标签和资源需求量匹配的目标节点,包括:In one or more embodiments, the container orchestration engine selects target nodes that match the above resource pool labels and resource requirements according to the status information of the resource pools corresponding to the current nodes, including:
根据当前各节点对应的资源池的状态信息从上述当前各节点中筛选候选目标节点;其中,每个上述节点包括CPU资源和内存资源,上述资源池包含不同标签CPU组的资源量;Screen candidate target nodes from the above-mentioned current nodes according to the status information of the resource pools corresponding to the current nodes; wherein, each of the above-mentioned nodes includes CPU resources and memory resources, and the above-mentioned resource pools include resource amounts of CPU groups with different labels;
在筛选出候选目标节点的情况下,上述调度器从上述候选目标节点中确定出满足非CPU资源的调度的目标节点,并在上述目标节点上创建容器并将上述容器与上述资源池对应的CPU核进行绑定。When the candidate target nodes are selected, the scheduler determines the target nodes satisfying the scheduling of non-CPU resources from the candidate target nodes, and creates a container on the target node and assigns the container to the CPU corresponding to the resource pool The nucleus binds.
在一个或多个实施例中,上述方法还包括:调度器从容器编排引擎中获取新增节点的请求消息,其中,上述请求消息中携带上述新增节点对应的执行代理模块的访问接口信息;In one or more embodiments, the above method further includes: the scheduler obtains a request message for adding a new node from the container orchestration engine, wherein the above request message carries the access interface information of the execution proxy module corresponding to the above new adding node;
上述调度器向上述新增节点的执行代理模块发送资源池初始化指令,其中,上述初始化指令包含需要创建的一个或多个资源池的参数,上述资源池参数包括资源池标签和CPU组;The above-mentioned scheduler sends a resource pool initialization instruction to the execution agent module of the above-mentioned newly added node, wherein the above-mentioned initialization instruction includes parameters of one or more resource pools to be created, and the above-mentioned resource pool parameters include a resource pool label and a CPU group;
上述调度器收到上述新增节点的执行代理模块发送的资源池创建成功消息时,上述调度器在数据库中存储上述新增节点的资源池状态信息。When the scheduler receives the resource pool creation success message sent by the execution agent module of the newly added node, the scheduler stores the resource pool state information of the newly added node in the database.
在一个或多个实例中,上述容器CPU资源调度与隔离方法还包括:在未筛选出候选目标节点的情况下,上述调度器将上述创建指令对应的创建任务挂起或终止。In one or more examples, the method for scheduling and isolating container CPU resources further includes: if no candidate target node is selected, the scheduler suspends or terminates the creation task corresponding to the creation instruction.
在一个或多个实例中,上述调度器从上述候选目标节点中确定出满足非CPU资源的调度的目标节点之后,上述容器CPU资源调度与隔离方法还包括:上述调度器扣减接入的目标节点对应的容器所耗费的资源,并更新接入节点对应资源池的资源状态。In one or more examples, after the above-mentioned scheduler determines the target node satisfying the scheduling of non-CPU resources from the above-mentioned candidate target nodes, the above-mentioned container CPU resource scheduling and isolation method further includes: the above-mentioned scheduler deducts the target node for access The resource consumed by the container corresponding to the node, and update the resource status of the resource pool corresponding to the access node.
图3是根据本公开实施例的容器CPU资源调度与隔离方法的流程图,如图3所示,该流程包括如下步骤:Fig. 3 is a flowchart of a container CPU resource scheduling and isolation method according to an embodiment of the present disclosure. As shown in Fig. 3 , the process includes the following steps:
S302,当前节点上的执行代理模块从调度器接收容器的创建指令,其中,上述容器创建指令携带需要创建容器配置数据以及待绑定的资源池的配置信息,上述配置信息包含资源池标签;S302. The execution agent module on the current node receives a container creation instruction from the scheduler, wherein the container creation instruction carries configuration data to be created and configuration information of a resource pool to be bound, and the configuration information includes a resource pool label;
S304,上述执行代理模块根据上述容器创建指令,调用业务执行的节点上的容器运行时接口CRI创建容器并根据上述资源池标签确定出对应的CPU核索引;S304, the above execution agent module calls the container runtime interface CRI on the node for service execution to create a container according to the above container creation instruction, and determines the corresponding CPU core index according to the above resource pool label;
S306,将上述资源池标签和对应的CPU核索引发送至上述CRI,以使上述CRI将上述容器与上述资源池对应的CPU核进行绑定;S306. Send the above-mentioned resource pool label and the corresponding CPU core index to the above-mentioned CRI, so that the above-mentioned CRI binds the above-mentioned container to the CPU core corresponding to the above-mentioned resource pool;
S308,执行代理模块发送容器创建结果信息至上述调度器。S308, the execution agent module sends container creation result information to the above-mentioned scheduler.
通过本公开实施例,采用了当前节点上的执行代理模块接收容器编排引擎发送的容器创建指令,其中,上述容器创建指令携带需要创建容器的配置数据以及待绑定的资源池的配置信息,上述配置信息包含资源池标签;上述执行代理模块根据上述容器创建指令,调用业务执行的节点上的容器运行时接口CRI创建容器并根据上述资源池标签确定出对应的CPU核索引;将上述资源池标签和对应的CPU核索引发送至上述CRI,以使上述CRI将上述容器与上述资源池对应的CPU核进行绑定;执行代理模块发送容器创建结果信息至上述容器编排引擎的调度器;由于根据当前各节点对应的资源池的状态信息,选择与上述资源池标签和资源需求量匹配的目标节点,可以精准的对CPU资源绑定与隔离,精确控制容器绑定的CPU资源以及允许以资源池为单位进行评估调度,而且能够更灵活与精确的对CPU资源管控与隔离的技术效果。Through the embodiments of the present disclosure, the execution agent module on the current node is used to receive the container creation instruction sent by the container orchestration engine, wherein the above-mentioned container creation instruction carries the configuration data of the container to be created and the configuration information of the resource pool to be bound. The configuration information includes the resource pool label; the above-mentioned execution agent module calls the container runtime interface CRI on the node where the service is executed according to the above-mentioned container creation instruction to create a container and determines the corresponding CPU core index according to the above-mentioned resource pool label; the above-mentioned resource pool label And the corresponding CPU core index is sent to the above-mentioned CRI, so that the above-mentioned CRI binds the above-mentioned container to the CPU core corresponding to the above-mentioned resource pool; the execution agent module sends the container creation result information to the scheduler of the above-mentioned container orchestration engine; because according to the current The status information of the resource pool corresponding to each node, select the target node that matches the above resource pool label and resource demand, can accurately bind and isolate CPU resources, accurately control the CPU resources bound to the container, and allow the resource pool to be used as the Units are evaluated and scheduled, and the technical effects of CPU resource control and isolation can be more flexible and accurate.
在一个或多个实施例中,上述当前节点上的执行代理模块从接收容器调度器编排引擎发送的容器创建指令之前,还包括:In one or more embodiments, before the execution agent module on the current node receives the container creation instruction sent by the container scheduler orchestration engine, it also includes:
在上述代理节点接入上述容器编排引擎后,接收上述容器编排引擎的调度器发送的资源池初始化指令;After the proxy node accesses the container orchestration engine, it receives the resource pool initialization instruction sent by the scheduler of the container orchestration engine;
根据上述初始化指令将上述节点上的CPU核划分为若干标签CPU组,并将标签CPU组匹配不同的资源池;Divide the CPU cores on the above nodes into several tag CPU groups according to the above initialization instructions, and match the tag CPU groups to different resource pools;
执行代理模块发送资源池初始化结果信息至上述调度器。The execution agent module sends resource pool initialization result information to the above-mentioned scheduler.
在一个或多个实施例中,上述根据上述初始化指令将上述代理节点上的CPU资源划分为若干组包括:利用Linux内核的cgroup子系统,根据上述资源池的配置要求建多个CPU组,其中,每个CPU组中包括预设的CPU核。In one or more embodiments, the above-mentioned dividing the CPU resources on the agent node into several groups according to the above-mentioned initialization instructions includes: using the cgroup subsystem of the Linux kernel to build multiple CPU groups according to the configuration requirements of the above-mentioned resource pool, wherein , each CPU group includes preset CPU cores.
Kubernetes是目前业界最主流、应用最广泛的开源容器计算平台,其允许用户简单高效地在一批通用基础设施节点上部署容器应用,并提供了一套应用部署、规划、更新、维护的全生命周期管理机制,以满足不同的实际需求。Kubernetes is currently the most mainstream and widely used open source container computing platform in the industry. It allows users to easily and efficiently deploy container applications on a batch of common infrastructure nodes, and provides a set of application deployment, planning, updating, and maintenance of the whole life Cycle management mechanism to meet different actual needs.
Pod是Kubernetes所能管理的最小业务抽象单元,一个pod内可以包含一个或多个容器。用户会根据实际需求编写业务编排蓝图,其中会要求创建一个或多个业务Pod。蓝图提交给Kubernetes后,Kubernetes内置的原生调度器会评估其所管辖的所有节点,综合各个节点的可用资源、Pod的资源需求以及其他一些因素,最终决定要将Pod建立在哪一个节点上。Kubernetes的调度器通过持续不断的监控各个节点以及所有Pod的运行状况,来保证所有节点的资源能充分地被利用,同时不会出现部分节点负荷过载、或是部分Pod无法获得其所需资源的现象。Pod is the smallest business abstraction unit that Kubernetes can manage. A pod can contain one or more containers. Users will write business orchestration blueprints according to actual needs, which will require the creation of one or more business pods. After the blueprint is submitted to Kubernetes, the built-in native scheduler of Kubernetes will evaluate all the nodes under its jurisdiction, combine the available resources of each node, the resource requirements of the Pod, and other factors, and finally decide which node to build the Pod on. The Kubernetes scheduler continuously monitors the running status of each node and all Pods to ensure that the resources of all nodes can be fully utilized, and at the same time, there will be no overloading of some nodes or failure of some Pods to obtain the resources they need. Phenomenon.
如图4所示,调度器需要持续监控各个节点上当前的可用资源;调度器需要尽可能保证所 有节点承载的工作负荷基本均衡;创建新Pod时,调度器需要根据Pod的资源需求并结合各节点的可用资源与工作负荷,决定Pod在哪一个节点上创建。As shown in Figure 4, the scheduler needs to continuously monitor the current available resources on each node; the scheduler needs to ensure that the workload carried by all nodes is basically balanced; when creating a new Pod, the scheduler needs to combine the resource requirements of each Pod The available resources and workload of the node determine which node the Pod is created on.
对于每一个节点,其可用资源有若干种类型,但一般评估的主要对象是CPU与内存:For each node, there are several types of available resources, but the main objects of general evaluation are CPU and memory:
CPU一般以CPU时间/秒作为衡量单位,比如一个8核节点,在1秒的时间范围内总共可用的CPU资源就是8(如果以毫秒作为计量单位就是8000);而内存则是直接以大小作为衡量单位,比如一个节点上有16G内存,那么总共的最大可用内存就是16G。CPU is generally measured by CPU time/second. For example, for an 8-core node, the total available CPU resources within 1 second is 8 (8000 if milliseconds are used as the unit of measurement); while memory is directly measured by size. The unit of measurement, for example, if there is 16G memory on a node, then the total maximum available memory is 16G.
Pod在建立时会消耗一部分CPU和内存资源(在蓝图中可以声明),这些消耗的资源会从节点总资源量中扣除。如果一个节点的当前可用资源已经无法满足一个Pod的需求,Kubernetes调度器将不会让Pod建立在这个节点上,而是会另寻其他资源充足的节点。如果当前所有节点的可用资源都不满足条件,该Pod的建立过程会被挂起,调度器会持续监控所有节点的资源状况,等待某个节点资源可用时再执行Pod的建立。When a Pod is created, it will consume a portion of CPU and memory resources (can be declared in the blueprint), and these consumed resources will be deducted from the total resources of the node. If the current available resources of a node can no longer meet the needs of a Pod, the Kubernetes scheduler will not let the Pod be built on this node, but will find another node with sufficient resources. If the current available resources of all nodes do not meet the conditions, the creation process of the Pod will be suspended, and the scheduler will continue to monitor the resource status of all nodes, and wait for the resources of a certain node to be available before executing the creation of the Pod.
对于节点上的某类资源,Kubernetes是将其作为一个整体来看待的。特别是对于CPU,虽然一个节点上可能存在多个CPU核,但调度器在工作时是将其作为一个CPU时间资源池来进行调度的,并不会区分资源具体归属于哪一个核。For a certain type of resource on a node, Kubernetes treats it as a whole. Especially for the CPU, although there may be multiple CPU cores on a node, the scheduler schedules them as a CPU time resource pool during work, and does not distinguish which core the resource belongs to.
对于一个运行了了多个Pod的节点,其在某个时刻内、特定的CPU核上承载了哪个Pod的进程是不确定的。举例来说,对于0号核,在时刻1可能运行的是Pod A的进程,在时刻2运行的可能是Pod B的进程,其他核也都是类似的情况。如图5所示:上述Pod进程在不同的CPU核之间调度并不是由Kubernetes实现的,而是由节点操作系统的内核调度器实现的。操作系统的内核调度器要完成的任务是将节点上运行的所有进程均衡地分配给所有的CPU核,以尽可能充分利用所有的CPU资源。从这个角度来看,内核调度器与Kubernetes的调度器是非常类似的,只是它们调度的对象层次不同:Kubernetes调度器是负责将Pod调度到合适的节点上,尽可能使所有节点的负荷保持均衡;而内核调度器是负责在某个特定节点上将所有的Pod进程合理地分配到所有的CPU核上,尽可能使所有的CPU核在所有时刻都被充分利用并保持负荷均衡。For a node running multiple Pods, it is uncertain which Pod process is carried on a specific CPU core at a certain moment. For example, for core 0, the process of Pod A may be running at time 1, and the process of Pod B may be running at time 2, and the situation is similar for other cores. As shown in Figure 5: the scheduling of the above Pod processes between different CPU cores is not implemented by Kubernetes, but by the kernel scheduler of the node operating system. The task of the kernel scheduler of the operating system is to distribute all processes running on the node to all CPU cores in a balanced manner, so as to make full use of all CPU resources as much as possible. From this point of view, the kernel scheduler is very similar to the Kubernetes scheduler, except that their scheduling object levels are different: the Kubernetes scheduler is responsible for scheduling Pods to appropriate nodes, and balancing the load of all nodes as much as possible ; The kernel scheduler is responsible for reasonably allocating all Pod processes to all CPU cores on a specific node, so as to make all CPU cores fully utilized at all times and maintain load balance as much as possible.
一个节点不仅仅只会运行Pod,操作系统核心进程与Kubernetes的管理进程也会消耗一定的资源。如果调度器在计算节点资源时没有预留一部分给系统进程和Kubernetes管理进程,就可能导致Pod进程会抢占这些关键进程的资源,导致节点工作异常。为此,Kubernetes专门提供了系统资源预留参数,允许系统管理员预留一部分资源给系统进程与管理进程,Kubernetes会将这部分资源从调度器的可见范围内排除掉,从而确保Pod不会占用这部分资源。以CPU资源为例,如图6所示,节点上的CPU资源被划分成三块,其中为Pod所预留的资源被称为可分配池,可分配池内不包含为系统或Kubernetes自身管理进程所预留的资源,因此在该节点上运行的POD决不会占用预留的CPU资源。A node will not only run pods, but also the core processes of the operating system and Kubernetes management processes will consume certain resources. If the scheduler does not reserve part of the system process and Kubernetes management process when calculating node resources, it may cause the Pod process to preempt the resources of these key processes, causing the node to work abnormally. To this end, Kubernetes specifically provides system resource reservation parameters, which allow system administrators to reserve some resources for system processes and management processes. Kubernetes will exclude these resources from the visible range of the scheduler to ensure that Pods will not occupy them. this part of the resource. Taking CPU resources as an example, as shown in Figure 6, the CPU resources on a node are divided into three blocks, among which the resources reserved for Pods are called allocatable pools, which do not contain management processes for the system or Kubernetes itself Reserved resources, so PODs running on this node will never occupy the reserved CPU resources.
在实际的场景中,可能会存在某些关键核心业务(比如电信业务或视频实时处理业务),它们对处理时间和响应时延的稳定性要求极高,一次线程抢占导致的上下文切换就会对其性能产生明显的影响。因此这类业务往往有独占CPU核的需求,其甚至会明确指定要独占特定编号的CPU核,不允许其他任何进程使用这些核。In actual scenarios, there may be some key core services (such as telecommunication services or real-time video processing services), which have extremely high requirements on the stability of processing time and response delay, and a context switch caused by a thread preemption will affect the Its performance has a noticeable impact. Therefore, this type of business often has the need to monopolize CPU cores, and it will even explicitly specify that CPU cores with a specific number are to be monopolized, and no other process is allowed to use these cores.
现实中还存在另一种常见的需求:即用户希望不同类型的POD在资源使用和分配上存在一定程度的隔离保护。举例来说,如果一个节点上同时存在3个A类POD和3个B类POD,那么当A类POD中的一个出现异常(比如死循环)导致占用了过多的CPU资源时,只有A类 POD会受到影响,B类POD不会受到任何影响。There is another common requirement in reality: users want different types of PODs to have a certain degree of isolation protection in terms of resource usage and allocation. For example, if there are 3 A-type PODs and 3 B-type PODs on a node at the same time, then when one of the A-type PODs has an exception (such as an infinite loop) that takes up too much CPU resources, only the A-type PODs PODs will be affected, Class B PODs will not be affected in any way.
很显然,原生Kubernetes是无法满足上述两个隔离需求的,Kubernetes将每个节点上的资源作为一个整体来看待。在排除掉为系统预留的资源之后,节点上的所有剩余资源都被Kubernetes纳入一个单独的可调度资源池,调度器在为POD选择节点时,是以这个可调度资源池的总空余量来评估的;而当POD在节点上运行时,整个可调度池的资源都是可以被使用的,无法进行精确的绑核或隔离控制。Obviously, native Kubernetes cannot meet the above two isolation requirements. Kubernetes regards the resources on each node as a whole. After excluding the resources reserved for the system, all remaining resources on the node are incorporated into a separate schedulable resource pool by Kubernetes. When the scheduler selects nodes for POD, it is based on the total vacancy of this schedulable resource pool. Evaluated; when the POD is running on the node, the resources of the entire schedulable pool can be used, and precise core binding or isolation control cannot be performed.
为了解决上述问题,在一应用实施例中,提供了一种容器CPU资源调度与隔离方法,在上述方法中适用环境要求如下:使用Kubernetes对容器应用进行管理的环境;如图7所示,本申请还提供了一种容器CPU资源调度与隔离装置,包括:模块A:接口服务器(API Server),模块B:数据库,模块C:容器运行时;模块D:增强调度器,模块D:执行代理模块(kubelet);其中:In order to solve the above problems, in an application embodiment, a container CPU resource scheduling and isolation method is provided. The applicable environment requirements for the above method are as follows: use Kubernetes to manage the container application environment; as shown in Figure 7, this The application also provides a container CPU resource scheduling and isolation device, including: module A: interface server (API Server), module B: database, module C: container runtime; module D: enhanced scheduler, module D: execution agent module (kubelet); where:
模块A负责提供用户交互界面以及功能接口。用户可以通过该模块提供的界面或接口来对Kubernetes集群进行管理与配置,同时建立并管理各类业务Pod和相关对象。Module A is responsible for providing user interaction interface and functional interface. Users can manage and configure Kubernetes clusters through the interfaces or interfaces provided by this module, and at the same time create and manage various business Pods and related objects.
模块B统一负责Kubernetes系统内部管理与状态数据的存取和持久化工作。其会存储从模块A输入的用户配置数据,并向模块A返回用户查询的数据集;其也会存储从模块D返回的节点状态与资源状况信息,并响应后续模块D发出的数据查询请求。Module B is responsible for the internal management of the Kubernetes system and the access and persistence of state data. It will store the user configuration data input from module A, and return the data set queried by the user to module A; it will also store the node status and resource status information returned from module D, and respond to the data query request sent by subsequent module D.
模块C运行在节点上,负责接受模块E发出的请求,在节点上创建、删除或配置容器与镜像,并响应容器状态查询请求。Module C runs on the node and is responsible for accepting the request from module E, creating, deleting or configuring containers and images on the node, and responding to the container status query request.
模块D负责维护所有节点的资源状态信息、所有Pod的调度判决、向模块E发送执行指令等工作。Module D is responsible for maintaining resource status information of all nodes, scheduling decisions of all Pods, and sending execution instructions to module E.
模块E运行在节点上,负责接受并响应模块D发出的指令,初始化节点上的各个资源池,与模块C交互、对容器进行生命周期管理和CPU绑核。Module E runs on the node and is responsible for accepting and responding to instructions from module D, initializing resource pools on the node, interacting with module C, managing the lifecycle of containers and binding CPU cores.
在本申请实施例中,调度器的关键功能是对所有节点的多个CPU资源池进行统一评估调度,并根据POD的需求为其选择合适的节点;而执行代理模块运行在节点上,负责根据调度器的指令创建资源池和POD,并在容器创建时将两者绑定。In the embodiment of this application, the key function of the scheduler is to perform unified evaluation and scheduling on multiple CPU resource pools of all nodes, and select an appropriate node for it according to the requirements of the POD; while the execution agent module runs on the node and is responsible for The scheduler's instructions create resource pools and PODs, and bind the two when containers are created.
在一个可选的实施例中,如图8所示,上述容器CPU资源调度与隔离方法包括:S802:读取配置,获取节点资源池配置信息,具体地,环境在部署前,用户应预先规划好特定规格节点上资源池的配置,并将配置信息记录在对应的配置文件中。增强调度器启动时会读取配置文件,从而知晓期望中的节点资源池配置信息。In an optional embodiment, as shown in FIG. 8 , the method for scheduling and isolating container CPU resources includes: S802: Read the configuration and obtain the configuration information of the node resource pool. Specifically, before the environment is deployed, the user should pre-plan Configure the resource pool on a node with a specific specification, and record the configuration information in the corresponding configuration file. When the enhanced scheduler starts, it will read the configuration file to know the expected configuration information of the node resource pool.
S804:获取节点列表,初始化节点资源状态,具体地,增强调度器从Kubernetes内置的数据库中获取注册的节点列表,并在数据库中记录并初始化这些节点的资源池使用状态信息。在系统刚启动时,节点列表可能为空,但新增节点的纳管动作会触发调度器的节点新增流程,从而完成初始化动作。S804: Obtain a node list, and initialize node resource states. Specifically, the enhanced scheduler obtains a registered node list from a built-in Kubernetes database, and records and initializes resource pool usage state information of these nodes in the database. When the system is just started, the node list may be empty, but the new node management action will trigger the scheduler's node addition process to complete the initialization action.
S806:向节点发送资源初始化指令,具体地,当调度器已获知当前被纳管的所有节点信息后,其向各节点的执行代理程序发送资源池初始化指令。执行代理应根据指令,将节点上的CPU核划分为若干组,纳入不同的资源池,以备后续创建POD时使用。S806: Send a resource initialization instruction to the nodes. Specifically, after the scheduler has learned the information of all currently managed nodes, it sends a resource pool initialization instruction to the execution agents of each node. The execution agent should divide the CPU cores on the node into several groups according to the instructions, and put them into different resource pools for subsequent use when creating PODs.
在一个可选的实施例中,如图9所示,上述容器CPU资源调度与隔离方法包括:In an optional embodiment, as shown in FIG. 9, the method for scheduling and isolating container CPU resources includes:
S902:收到新增节点,具体地,增强调度器从Kubernetes其他管理服务中获取新节点被纳管的消息,得到新节点的执行代理程序的访问接口信息。S902: receiving a newly added node, specifically, the enhanced scheduler obtains a message that the new node is managed from other Kubernetes management services, and obtains access interface information of the execution agent program of the new node.
S904:向节点发送资源池初始化指令,具体地,增强调度器向新节点的执行代理程序发送资源池初始化指令,其中包含需要创建的一个或多个资源池详情(资源池标签和包含的CPU核索引等等)。S904: Send a resource pool initialization instruction to the node, specifically, the enhanced scheduler sends a resource pool initialization instruction to the execution agent of the new node, which contains details of one or more resource pools that need to be created (resource pool labels and included CPU cores index, etc.).
S906:判断资源池初始化是否成功,具体地:如果执行代理程序回复资源池创建成功,则继续执行步骤S908;如果失败,则进入步骤S910,则重新发送创建指令并继续等待。S906: Determine whether the resource pool initialization is successful, specifically: if the execution agent replies that the resource pool has been successfully created, continue to step S908; if it fails, enter step S910, resend the creation instruction and continue to wait.
S908:更新节点状态信息,增强调度器在数据库中记录该新节点的资源池状态信息。S908: Update the node status information, and the enhanced scheduler records the resource pool status information of the new node in the database.
在一个可选的实施例中,如图10所示,上述容器CPU资源调度与隔离方法包括:In an optional embodiment, as shown in FIG. 10, the method for scheduling and isolating container CPU resources includes:
S1002:增强调度器从Kubernetes其他管理服务中获取CPU资源调度消息。S1002: The enhanced scheduler acquires CPU resource scheduling messages from other Kubernetes management services.
S1004:增强调度器从CPU资源调度消息中获取CPU资源调度的具体参数,其中包含Pod希望进入的资源池标签以及资源需求量(如果没有配置这些参数则取默认值)。S1004: The enhanced scheduler obtains the specific parameters of CPU resource scheduling from the CPU resource scheduling message, which includes the label of the resource pool that the Pod wants to enter and the resource demand (if these parameters are not configured, default values are used).
S1006:增强调度器评估所有节点对应资源池的资源状况,根据Pod希望进入的资源池标签以及资源需求量,结合数据库中维护的当前各节点对应资源池的状态信息,筛选接入节点。S1006: The enhanced scheduler evaluates the resource status of the resource pools corresponding to all nodes, and screens the access nodes according to the resource pool label and resource demand that the Pod wants to enter, combined with the status information of the current resource pools corresponding to each node maintained in the database.
S1008:如果能够选出目标节点,转入步骤S1010;如果无法选出任何节点,则直接中止流程,转入步骤S1018;该Pod的创建会被挂起。S1008: If the target node can be selected, go to step S1010; if no node can be selected, stop the process directly and go to step S1018; the creation of the Pod will be suspended.
S1010:评估其他限制项;S1010: Evaluate other restricted items;
S1012:如果能够选出一批可选节点,增强调度器将在这批节点的基础上执行Kubernetes原生调度器的调度逻辑再次进行过滤,这一步骤主要为了完成其他非CPU资源(如内存、端口等)的调度筛选。如果筛无法选出任何节点,转入步骤S1018,则直接中止流程,该Pod的创建会被挂起。S1012: If a batch of optional nodes can be selected, the enhanced scheduler will execute the scheduling logic of the Kubernetes native scheduler on the basis of these nodes to filter again. This step is mainly to complete other non-CPU resources (such as memory, ports, etc.) etc.) scheduling screening. If no node can be selected by the screening, go to step S1018, the process will be terminated directly, and the creation of the Pod will be suspended.
S1014:向选择节点发送创建pod指令;能够得到一个最终的接入候选节点。增强调度器向该节点的执行代理程序发送指令,其中包含待创建Pod的详细信息,让执行代理程序在节点上创建Pod并进行资源池绑定。S1014: Send a pod creation instruction to the selection node; a final access candidate node can be obtained. The enhanced scheduler sends instructions to the execution agent of the node, which contains the detailed information of the Pod to be created, so that the execution agent can create the Pod on the node and bind the resource pool.
S1016,更新节点资源池状态信息。增强调度器需要更新数据库中接入节点对应资源池的资源状态,从中扣减掉接入Pod所耗费的资源。S1016. Update the status information of the node resource pool. The enhanced scheduler needs to update the resource status of the resource pool corresponding to the access node in the database, and deduct the resources consumed by the access Pod from it.
步骤S1018,中止流程,该Pod的创建会被挂起。Step S1018, the process is terminated, and the creation of the Pod will be suspended.
在一个可选的实施例中,如图11所示,上述容器CPU资源调度与隔离方法包括:In an optional embodiment, as shown in FIG. 11, the method for scheduling and isolating container CPU resources includes:
S1102:执行代理程序读取初始配置启动,向Kubernetes控制节点注册所在节点,该步骤与Kubernetes原生执行代理程序(Kubelet)行为相同。S1102: The execution agent program reads the initial configuration and starts, and registers the node where it is located with the Kubernetes control node. This step is the same as that of the Kubernetes native execution agent program (Kubelet).
S1104执行代理所在节点被Kubernetes纳管后,增强调度器会发来资源池初始化指令。S1104 After the node where the execution agent is located is managed by Kubernetes, the enhanced scheduler will send a resource pool initialization command.
S1106:执行代理需要根据指令将节点上的CPU资源划分为若干组,归属于不同的资源池对象。有多种方法可以将CPU分组,最常见的方法是利用Linux内核的cgroup子系统,根据资源池的配置要求,建立多个cpuset,每个cpuset中包含指定的CPU核。S1106: The execution agent needs to divide the CPU resources on the node into several groups according to the instruction, which belong to different resource pool objects. There are many ways to group CPUs. The most common method is to use the cgroup subsystem of the Linux kernel to create multiple cpusets according to the configuration requirements of the resource pool, and each cpuset contains specified CPU cores.
S1108:无论资源池初始化成功还是失败,执行代理程序都应向增强调度器汇报,并结束整个流程。S1108: No matter whether the resource pool initialization succeeds or fails, the execution agent should report to the enhanced scheduler and end the whole process.
在一个可选的实施例中,如图12所示,上述容器CPU资源调度与隔离方法包括:In an optional embodiment, as shown in FIG. 12, the method for scheduling and isolating container CPU resources includes:
S1202:某个节点上的执行代理程序从增强调度器收到创建Pod指令,其中包含需要创建容器配置数据,以及希望绑定的资源池等信息。S1202: The execution agent on a certain node receives a Pod creation instruction from the enhanced scheduler, which includes information such as container configuration data to be created, resource pools to be bound, and the like.
S1204:读取创建Pod指令包含需要创建容器配置数据,以及希望绑定的资源池等信息。S1204: Read the Pod creation instruction, which includes information such as container configuration data that needs to be created, resource pools to be bound, and the like.
S1206:执行代理根据创建指令,调用节点上的容器运行时接口(Container Runtime  Interface,简称CRI)创建容器。在创建时,其会根据资源池标签查到对应的cpuset索引,并将容器进程绑定到对应的cpuset上。S1206: The execution agent invokes a container runtime interface (Container Runtime Interface, CRI for short) on the node to create a container according to the creation instruction. When created, it will find the corresponding cpuset index according to the resource pool label, and bind the container process to the corresponding cpuset.
S1208:无论容器创建成功还是失败,执行代理程序都应向增强调度器反馈创建结果,并结束整个流程。S1208: No matter whether the container is successfully created or failed, the execution agent should feed back the creation result to the enhanced scheduler and end the whole process.
基于上述实施例,在一应用实施例中,假定存在一个Kubernetes环境,其有3个节点,所有节点都有8个CPU核。在原生Kubernetes的资源管理机制下,系统任意节点的一种可能的初始资源划分状况如图13所示:Based on the above embodiments, in an application embodiment, it is assumed that there is a Kubernetes environment with 3 nodes, and all nodes have 8 CPU cores. Under the resource management mechanism of native Kubernetes, a possible initial resource division of any node in the system is shown in Figure 13:
在图13中,该环境为操作系统进程预留了1.5个核,为Kubernetes自身管理进程预留了2个核,为Pod预留了4.5个核;原生的资源分配机制只支持一个Pod预留组(可分配池);原生的资源预留机制是通过可用的CPU时间来进行划分的(如预留1.5个核的含义是在100ms内可以使用150ms的CPU时间),因此不同预留组内的进程是有可能被分配到相同的CPU核上进行调度的(这就可能会导致资源争抢);某一时刻下,不同预留组内的进程运行在哪一个CPU核上是不确定的。图13中显示的位置仅为一种示例,在此不做任何限定。In Figure 13, the environment reserves 1.5 cores for operating system processes, 2 cores for Kubernetes’ own management processes, and 4.5 cores for pods; the native resource allocation mechanism only supports one pod reservation Group (allocated pool); the original resource reservation mechanism is divided by available CPU time (for example, reserving 1.5 cores means that 150ms of CPU time can be used within 100ms), so different reservation groups It is possible for processes to be assigned to the same CPU core for scheduling (this may lead to resource contention); at a certain moment, it is uncertain which CPU core a process in a different reservation group runs on . The position shown in FIG. 13 is only an example, without any limitation.
在一个实施例的执行环境中,如图14所示,该环境为操作系统进程预留了1个核,为Kubernetes自身管理进程预留了2个核,为Pod组A预留了2个核,为Pod组B预留了3个核。增强的资源分配机制支持多个Pod预留组(多个可分配池)。增强方案是通过创建多个cpuset来将CPU核精确地与预留组绑定,用户可以任意指定CPU核与预留组之间的映射关系。从图14中可以看到,Pod预留B组与CPU 3、4、5绑定,所有纳入Pod预留B组的Pod进程就只会运行在CPU 3、4、5上。其它预留组的情况与之相同。在本实施例中,不同预留组内的进程运行在哪一个CPU核(或是哪一个范围内)在任意时刻下都是确定的。In the execution environment of an embodiment, as shown in Figure 14, one core is reserved for the operating system process, two cores are reserved for the Kubernetes self-management process, and two cores are reserved for Pod group A , 3 cores are reserved for Pod group B. Enhanced resource allocation mechanism supports multiple Pod reservation groups (multiple allocatable pools). The enhanced solution is to precisely bind CPU cores to reserved groups by creating multiple cpusets, and users can arbitrarily specify the mapping relationship between CPU cores and reserved groups. As can be seen from Figure 14, Pod Reserved Group B is bound to CPUs 3, 4, and 5, and all Pod processes included in Pod Reserved Group B will only run on CPUs 3, 4, and 5. The same applies to other reservation groups. In this embodiment, which CPU core (or which range) the processes in different reservation groups run on is determined at any time.
在一实施例中,假定当前容器CPU资源调度与隔离系统已运行了一段时间,各节点的资源状况如图15所示,此时,用户需要创建一个新的Pod,增强调度器会读取Pod蓝图中的资源组和其他资源需求相关参数,结合各个节点当前的资源状况进行判决,选择一个最合适的节点来创建Pod。In one embodiment, assume that the current container CPU resource scheduling and isolation system has been running for a period of time, and the resource status of each node is shown in Figure 15. At this time, the user needs to create a new Pod, and the enhanced scheduler will read the Pod The resource group and other resource requirements related parameters in the blueprint are judged based on the current resource status of each node, and the most suitable node is selected to create a Pod.
在一实施例中,Pod指明希望归属预留组A,对CPU资源的最小需求是120ms。在这种情况下,增强调度器遍历所有的节点,发现只有节点0的资源状况能够满足要求;在其他资源判决都通过后,调度器向节点0的执行代理发送创建Pod命令,同时将节点0的Pod预留A组资源扣减120ms(剩余60ms)。In one embodiment, the Pod indicates that it wants to belong to reserved group A, and the minimum requirement for CPU resources is 120ms. In this case, the enhanced scheduler traverses all nodes and finds that only the resource status of node 0 can meet the requirements; after other resource judgments are passed, the scheduler sends the command to create a Pod to the execution agent of node 0, and simultaneously Pods reserve group A resources with a deduction of 120ms (the remaining 60ms).
在一实施例中,Pod指明希望归属预留组B,对CPU资源的最小需求是60ms。在这种情况下,增强调度器遍历所有的节点,发现节点1、2的资源状况都能够满足要求,但节点1的资源比节点2的更为宽松(240>100),因此优选结果为节点1;在其他资源判决都通过后,调度器向节点1的执行代理发送创建Pod命令,同时将节点1的Pod预留B组资源扣减60ms(剩余180ms)。In an embodiment, the Pod indicates that it wants to belong to reserved group B, and the minimum requirement for CPU resources is 60ms. In this case, the enhanced scheduler traverses all nodes and finds that the resources of nodes 1 and 2 can meet the requirements, but the resources of node 1 are more relaxed than those of node 2 (240>100), so the preferred result is node 1. After all other resource judgments are passed, the scheduler sends a Pod creation command to the execution agent of Node 1, and at the same time deducts 60ms of Group B resources reserved for Pods of Node 1 (the remaining 180ms).
在一实施例中,Pod指明希望归属预留组A,对CPU资源的最小需求是200ms。在这种情况下,增强调度器遍历所有的节点,发现没有任何节点能够满足要求,于是直接结束判决,挂起Pod的创建流程。In one embodiment, the Pod indicates that it wants to belong to reserved group A, and the minimum requirement for CPU resources is 200ms. In this case, the enhanced scheduler traverses all nodes and finds that no node can meet the requirements, so it directly ends the judgment and suspends the Pod creation process.
在一实施例中,某个归属于预留组A的Pod成功地在节点0上创建后运行出现了异常,导致其耗尽了CPU 0和CPU 1上的所有时间(这些CPU核属于预留组A),此时归属于预留组B的Pod不受其影响,操作系统进程和Kubernetes管理进程也不受其影响,归属于预留组B 的Pod创建调度过程仍然可以正常进行。In one embodiment, a Pod belonging to reserved group A runs abnormally after it is successfully created on node 0, causing it to consume all the time on CPU 0 and CPU 1 (these CPU cores belong to reserved Group A), at this time, the Pods belonging to reserved group B are not affected by it, and the operating system process and Kubernetes management process are not affected by it, and the creation and scheduling process of Pods belonging to reserved group B can still proceed normally.
在pod的创建阶段,执行代理会调用节点上的容器运行时接口来创建容器。当前业界主流的容器运行时均支持在创建容器时指定cpuset,因此执行代理只需将增强调度器提供的cpu参数传递给容器运行时接口即可实现容器与指定cpu核的绑定。During the pod creation phase, the execution agent calls the container runtime interface on the node to create the container. The current mainstream container runtimes in the industry support specifying the cpuset when creating a container, so the execution agent only needs to pass the cpu parameter provided by the enhanced scheduler to the container runtime interface to realize the binding between the container and the specified cpu core.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本公开各个实施例上述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the technical solution of the present disclosure can be embodied in the form of a software product in essence or the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the above-mentioned methods in various embodiments of the present disclosure.
在本实施例中还提供了一种容器CPU资源调度与隔离装置。该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。This embodiment also provides a container CPU resource scheduling and isolation device. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and what has been described will not be repeated. As used below, the term "module" may be a combination of software and/or hardware that realizes a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
图16是根据本公开实施例的容器CPU资源调度与隔离装置的结构框图,如图16所示,该装置包括:Fig. 16 is a structural block diagram of a container CPU resource scheduling and isolation device according to an embodiment of the present disclosure. As shown in Fig. 16 , the device includes:
第一创建单元1602,设置为创建资源池,并令各节点将自身的CPU资源按资源池进行划分;The first creating unit 1602 is configured to create a resource pool, and make each node divide its own CPU resources according to the resource pool;
获取单元1604,设置为获取容器创建信息;其中,所述容器创建信息包含期望进入的资源池标签;The obtaining unit 1604 is configured to obtain container creation information; wherein, the container creation information includes the desired resource pool label;
确定单元1606,设置为根据所述资源池标签以及各节点对应的资源池的状态,确定出目标节点;The determining unit 1606 is configured to determine the target node according to the resource pool label and the state of the resource pool corresponding to each node;
发送单元1608,设置为容器编排引擎发送容器创建指令至所述目标节点的执行代理模块,以使所述执行代理模块创建容器并将所述容器与所述资源池对应的CPU核进行绑定。The sending unit 1608 is configured as a container orchestration engine sending a container creation instruction to the execution agent module of the target node, so that the execution agent module creates a container and binds the container to the CPU core corresponding to the resource pool.
在本公开实施例中,容器编排引擎可以包括Kubernetes平台,这里的容器可以为Kubernetes所能管理的最小业务抽象单元pod,一个pod可以包含一个或多个容器。资源池标签可以为将多个CPU进行划分得到的不同的资源池的名称,资源需求量可以为所占CPU的容量大小和占用CPU的时长,在此不做任何限定。In the embodiment of the present disclosure, the container orchestration engine may include a Kubernetes platform, where a container may be the smallest business abstraction unit pod that Kubernetes can manage, and a pod may include one or more containers. The resource pool label can be the name of different resource pools obtained by dividing multiple CPUs, and the resource requirement can be the capacity of the occupied CPU and the duration of the occupied CPU, which is not limited here.
通过本公开实施例,采用了调度器从容器编排引擎获取容器的创建指令;其中,上述创建指令携带上述容器期望进入的资源池标签以及资源需求量;根据当前各节点对应的资源池的状态信息,选择与上述资源池标签和资源需求量匹配的目标节点;在上述目标节点上创建上述容器的方式;由于根据当前各节点对应的资源池的状态信息,选择与上述资源池标签和资源需求量匹配的目标节点,可以精准的对CPU资源绑定与隔离,进而达到精确控制容器绑定的CPU资源以及允许以资源池为单位进行评估调度,而且能够更灵活与精确的对CPU资源管控与隔离的技术效果。Through the embodiments of the present disclosure, the scheduler is used to obtain the creation instruction of the container from the container orchestration engine; wherein, the above-mentioned creation instruction carries the resource pool label and the resource demand that the above-mentioned container expects to enter; according to the state information of the resource pool corresponding to each node at present , select the target node that matches the above resource pool label and resource demand; the method of creating the above container on the above target node; because according to the status information of the resource pool corresponding to each node at present, select the target node that matches the above resource pool label and resource demand Matching target nodes can accurately bind and isolate CPU resources, thereby achieving precise control of CPU resources bound to containers and allowing evaluation and scheduling in units of resource pools, and more flexible and accurate control and isolation of CPU resources technical effect.
图17是根据本公开实施例的容器CPU资源调度与隔离装置的结构框图,如图17所示,该装置包括:Fig. 17 is a structural block diagram of a container CPU resource scheduling and isolation device according to an embodiment of the present disclosure. As shown in Fig. 17 , the device includes:
接收单元1702,设置为接收容器编排引擎发送的容器创建指令,其中,上述容器创建指 令携带需要创建容器配置数据以及待绑定的资源池的配置信息,上述配置信息包含资源池标签;The receiving unit 1702 is configured to receive the container creation instruction sent by the container orchestration engine, wherein the above-mentioned container creation instruction carries the configuration information of the container configuration data to be created and the resource pool to be bound, and the above-mentioned configuration information includes the resource pool label;
第二创建单元1704,设置为根据所述容器创建指令,调用业务执行的节点上的容器运行时接口CRI创建容器并根据所述资源池标签确定出对应的CPU核索引;The second creation unit 1704 is configured to call the container runtime interface CRI on the node for service execution to create a container according to the container creation instruction and determine the corresponding CPU core index according to the resource pool label;
第一发送单元1706,设置为将所述资源池标签和对应的CPU核索引发送至所述CRI,以使多少CRI将所述容器与所述资源池对应的CPU核进行绑定;The first sending unit 1706 is configured to send the resource pool label and the corresponding CPU core index to the CRI, so that how many CRIs bind the container to the CPU core corresponding to the resource pool;
第二发送单元1708,设置为发送任务创建结果信息至所述容器编排引擎的调度器。The second sending unit 1708 is configured to send task creation result information to the scheduler of the container orchestration engine.
通过本公开实施例,采用了当前节点上的执行代理模块从调度器接收容器的创建指令,其中,上述创建指令携带需要创建容器配置数据以及待绑定的资源池信息,上述资源此信息包含资源池标签;上述执行代理模块根据上述创建指令,调用业务执行的节点上的容器运行时接口CRI创建容器;其中,上述CRI根据资源池标签确定出上述节点对应的CPU设置索引,并将上述容器进程绑定到对应的CPU设置索引;执行代理模块发送任务创建结果信息至上述调度器;由于根据当前各节点对应的资源池的状态信息,选择与上述资源池标签和资源需求量匹配的目标节点,可以精准的对CPU资源绑定与隔离,进而达到了提高CPU资源利用率的效果。Through the embodiments of the present disclosure, the execution agent module on the current node is used to receive the container creation instruction from the scheduler, wherein the above-mentioned creation instruction carries the configuration data of the container to be created and the resource pool information to be bound, and the information of the above-mentioned resource includes resource Pool label; the above-mentioned execution agent module calls the container runtime interface CRI on the node for business execution according to the above-mentioned creation instruction to create a container; wherein, the above-mentioned CRI determines the CPU setting index corresponding to the above-mentioned node according to the resource pool label, and the above-mentioned container process Bind to the corresponding CPU to set the index; the execution agent module sends the task creation result information to the above-mentioned scheduler; according to the state information of the resource pool corresponding to each node at present, select the target node that matches the above-mentioned resource pool label and resource demand, It can accurately bind and isolate CPU resources, thereby achieving the effect of improving CPU resource utilization.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。It should be noted that the above-mentioned modules can be realized by software or hardware. For the latter, it can be realized by the following methods, but not limited to this: the above-mentioned modules are all located in the same processor; or, the above-mentioned modules can be combined in any combination The forms of are located in different processors.
本公开的实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。Embodiments of the present disclosure also provide a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps in any one of the above method embodiments when running.
在一个示例性实施例中,上述计算机可读存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。In an exemplary embodiment, the above-mentioned computer-readable storage medium may include but not limited to: U disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM) , mobile hard disk, magnetic disk or optical disk and other media that can store computer programs.
本公开的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。Embodiments of the present disclosure also provide an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
在一个示例性实施例中,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。In an exemplary embodiment, the electronic device may further include a transmission device and an input and output device, wherein the transmission device is connected to the processor, and the input and output device is connected to the processor.
本实施例中的具体示例可以参考上述实施例及示例性实施方式中所描述的示例,本实施例在此不再赘述。For specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments and exemplary implementation manners, and details will not be repeated here in this embodiment.
显然,本领域的技术人员应该明白,上述的本公开的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本公开不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that each module or each step of the above-mentioned disclosure can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed in a network composed of multiple computing devices In fact, they can be implemented in program code executable by a computing device, and thus, they can be stored in a storage device to be executed by a computing device, and in some cases, can be executed in an order different from that shown here. Or described steps, or they are fabricated into individual integrated circuit modules, or multiple modules or steps among them are fabricated into a single integrated circuit module for implementation. As such, the present disclosure is not limited to any specific combination of hardware and software.
以上所述仅为本公开的优选实施例而已,并不用于限制本公开,对于本领域的技术人员来说,本公开可以有各种更改和变化。凡在本公开的原则之内,所作的任何修改、等同替换、改进等,均应包含在本公开的保护范围之内。The above descriptions are only preferred embodiments of the present disclosure, and are not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims (13)

  1. 一种容器CPU资源调度与隔离方法,包括:A container CPU resource scheduling and isolation method, comprising:
    容器编排引擎规划并创建资源池,并令各节点将自身CPU资源按照资源池进行划分;The container orchestration engine plans and creates resource pools, and makes each node divide its own CPU resources according to the resource pools;
    容器编排引擎获取容器创建信息;其中,所述容器创建信息包含期望进入的资源池标签;The container orchestration engine obtains container creation information; wherein, the container creation information includes the desired resource pool label;
    容器编排引擎根据所述资源池标签以及各节点对应的资源池的状态,确定出目标节点;The container orchestration engine determines the target node according to the resource pool label and the state of the resource pool corresponding to each node;
    容器编排引擎发送容器创建指令至所述目标节点的执行代理模块,以使所述执行代理模块创建容器并将所述容器与所述资源池对应的CPU核进行绑定。The container orchestration engine sends a container creation instruction to the execution agent module of the target node, so that the execution agent module creates a container and binds the container to the CPU core corresponding to the resource pool.
  2. 根据权利要求1所述的方法,其中,所述容器编排引擎规划并创建资源池,并令各节点将自身CPU资源按资源池进行划分之前,包括:The method according to claim 1, wherein, before the container orchestration engine plans and creates resource pools, and makes each node divide its own CPU resources according to the resource pools, the steps include:
    将所述各节点对应的CPU资源进行分配得到分配结果;其中,所述分配结果用于为所述容器编排引擎所属的节点创建资源池;Allocating the CPU resources corresponding to each node to obtain an allocation result; wherein the allocation result is used to create a resource pool for the node to which the container orchestration engine belongs;
    获取节点配置文件,其中,所述节点配置文件中记录有节点资源池配置信息;Obtaining a node configuration file, wherein the node resource pool configuration information is recorded in the node configuration file;
    获取注册节点的列表,存储并初始化所述注册节点的资源池使用状态信息;Obtain a list of registered nodes, store and initialize resource pool usage status information of the registered nodes;
    当所述调度器获取到当前所有节点的配置信息后,向各节点对应的执行代理模块发送资源池初始化指令;其中,所述资源池初始化指令用于使所述执行代理模块将节点上的CPU核划分为若干标签CPU组,并将所述标签CPU组匹配不同的资源池。After the scheduler obtains the configuration information of all current nodes, it sends a resource pool initialization instruction to the execution agent module corresponding to each node; wherein, the resource pool initialization instruction is used to make the execution agent module assign the CPU on the node to The cores are divided into several tagged CPU groups, and the tagged CPU groups are matched to different resource pools.
  3. 根据权利要求1所述的方法,其中,所述容器编排引擎根据所述资源池标签以及各节点对应的资源池的状态,确定出目标节点,包括:The method according to claim 1, wherein the container orchestration engine determines the target node according to the resource pool label and the state of the resource pool corresponding to each node, including:
    所述容器编排引擎根据当前各节点对应的资源池的状态信息,选择与所述资源池标签和资源需求量匹配的目标节点。The container orchestration engine selects a target node that matches the label of the resource pool and the resource demand according to the state information of the resource pool corresponding to each node.
  4. 根据权利要求3所述的方法,其中,所述容器编排引擎根据当前各节点对应的资源池的状态信息,选择与所述资源池标签和资源需求量匹配的目标节点,包括:The method according to claim 3, wherein the container orchestration engine selects a target node matching the resource pool label and resource demand according to the state information of the resource pool corresponding to each current node, including:
    根据当前各节点对应的资源池的状态信息从所述当前各节点中筛选候选目标节点;其中,每个所述节点包括CPU资源和内存资源,所述资源池包含不同标签CPU组的资源量;Screen candidate target nodes from the current nodes according to the status information of the resource pools corresponding to the current nodes; wherein, each of the nodes includes CPU resources and memory resources, and the resource pools include resource amounts of CPU groups with different labels;
    在筛选出候选目标节点的情况下,所述调度器从所述候选目标节点中确定出满足非CPU资源的调度的目标节点,并在所述目标节点上创建容器并将所述容器与所述资源池对应的CPU核进行绑定。When the candidate target nodes are screened out, the scheduler determines the target nodes satisfying the scheduling of non-CPU resources from the candidate target nodes, and creates a container on the target node and combines the container with the The CPU core corresponding to the resource pool is bound.
  5. 根据权利要求4所述的方法,其中,所述方法还包括:The method according to claim 4, wherein the method further comprises:
    在未筛选出候选目标节点的情况下,所述调度器将所述创建指令对应的创建任务挂起或终止。If no candidate target node is screened out, the scheduler suspends or terminates the creation task corresponding to the creation instruction.
  6. 根据权利要求4所述的方法,其中,所述调度器从所述候选目标节点中确定出满足非CPU资源的调度的目标节点之后,所述方法还包括:The method according to claim 4, wherein, after the scheduler determines a target node that satisfies scheduling of non-CPU resources from the candidate target nodes, the method further comprises:
    所述调度器扣减接入的目标节点对应的容器所耗费的资源,并更新接入节点对应资源池的资源状态。The scheduler deducts the resource consumed by the container corresponding to the accessed target node, and updates the resource status of the resource pool corresponding to the accessed node.
  7. 一种容器CPU资源调度与隔离方法,包括:A container CPU resource scheduling and isolation method, comprising:
    当前节点上的执行代理模块接收容器编排引擎发送的容器创建指令,其中,所述容器创建指令携带需要创建容器的配置数据以及待绑定的资源池的配置信息,所述配置信息包含资源池标签;The execution agent module on the current node receives the container creation instruction sent by the container orchestration engine, wherein the container creation instruction carries the configuration data of the container to be created and the configuration information of the resource pool to be bound, and the configuration information includes the resource pool label ;
    所述执行代理模块根据所述容器创建指令,调用业务执行的节点上的容器运行时接口CRI创建容器并根据所述资源池标签确定出对应的CPU核索引;The execution agent module calls the container runtime interface CRI on the node for service execution according to the container creation instruction to create a container and determines the corresponding CPU core index according to the resource pool label;
    将所述资源池标签和对应的CPU核索引发送至所述CRI,以使所述CRI将所述容器与所述资源池对应的CPU核进行绑定;sending the resource pool label and the corresponding CPU core index to the CRI, so that the CRI binds the container to the CPU core corresponding to the resource pool;
    执行代理模块发送容器创建结果信息至所述容器编排引擎的调度器。The execution proxy module sends container creation result information to the scheduler of the container orchestration engine.
  8. 根据权利要求7所述的方法,其中,所述当前节点上的执行代理模块从接收容器编排引擎发送的容器创建指令之前,还包括:The method according to claim 7, wherein, before the execution agent module on the current node receives the container creation instruction sent by the container orchestration engine, it further includes:
    在所述当前节点接入所述容器编排引擎后,接收所述容器编排引擎的调度器发送的资源池初始化指令;After the current node accesses the container orchestration engine, receiving a resource pool initialization instruction sent by the scheduler of the container orchestration engine;
    所述执行代理模块根据所述初始化指令将当前节点上的CPU核划分为若干标签CPU组,并将所述标签CPU组匹配不同的资源池;The execution agent module divides the CPU core on the current node into several label CPU groups according to the initialization instruction, and matches the label CPU groups to different resource pools;
    执行代理模块发送资源池初始化结果信息至所述调度器。The execution agent module sends resource pool initialization result information to the scheduler.
  9. 根据权利要求8所述的方法,其中,所述执行代理模块根据所述初始化指令将当前节点上的CPU核划分为若干标签CPU组,并将所述标签CPU组匹配不同的资源池,包括:The method according to claim 8, wherein the execution proxy module divides the CPU cores on the current node into several label CPU groups according to the initialization instruction, and matches the label CPU groups to different resource pools, including:
    利用Linux内核的cgroup子系统,根据所述资源池的配置要求建多个CPU组,其中,每个CPU组中包括预设的CPU核。Using the cgroup subsystem of the Linux kernel, multiple CPU groups are built according to the configuration requirements of the resource pool, wherein each CPU group includes a preset CPU core.
  10. 一种容器CPU资源调度与隔离装置,包括:A container CPU resource scheduling and isolation device, comprising:
    第一创建单元,设置为创建资源池,并令各节点将自身CPU资源按资源池进行划分;The first creation unit is set to create a resource pool, and makes each node divide its own CPU resources according to the resource pool;
    获取单元,设置为获取容器创建信息;其中,所述容器创建信息包含期望进入的资源池标签;The acquisition unit is configured to acquire container creation information; wherein, the container creation information includes the desired resource pool label;
    确定单元,设置为根据所述资源池标签以及各节点对应的资源池的状态,确定出目标节点;The determination unit is configured to determine the target node according to the resource pool label and the state of the resource pool corresponding to each node;
    发送单元,设置为容器编排引擎发送容器创建指令至所述目标节点的执行代理模块,以使所述执行代理模块创建容器并将所述容器与所述资源池对应的CPU核进行绑定。The sending unit is configured as a container orchestration engine sending a container creation instruction to the execution agent module of the target node, so that the execution agent module creates a container and binds the container to the CPU core corresponding to the resource pool.
  11. 一种容器CPU资源调度与隔离装置,包括:A container CPU resource scheduling and isolation device, comprising:
    接收单元,设置为接收容器编排引擎发送的容器创建指令,其中,所述容器创建指令携带需要创建容器配置数据以及待绑定的资源池的配置信息,所述配置信息包含资源池标签;The receiving unit is configured to receive the container creation instruction sent by the container orchestration engine, wherein the container creation instruction carries the configuration information of the container configuration data to be created and the resource pool to be bound, and the configuration information includes the resource pool label;
    第二创建单元,设置为根据所述容器创建指令,调用业务执行的节点上的容器运行时接口CRI创建容器并根据所述资源池标签确定出对应的CPU核索引;The second creation unit is configured to call the container runtime interface CRI on the node for service execution to create a container according to the container creation instruction and determine the corresponding CPU core index according to the resource pool label;
    第一发送单元,设置为将所述资源池标签和对应的CPU核索引发送至所述CRI,以使多少CRI将所述容器与所述资源池对应的CPU核进行绑定;The first sending unit is configured to send the resource pool label and the corresponding CPU core index to the CRI, so that how many CRIs bind the container to the CPU core corresponding to the resource pool;
    第二发送单元,设置为发送任务创建结果信息至所述容器编排引擎的调度器。The second sending unit is configured to send task creation result information to the scheduler of the container orchestration engine.
  12. 一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行所述权利要求1至6或7至9任一项中所述的方法。A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, wherein the computer program is configured to perform the operation described in any one of claims 1 to 6 or 7 to 9 when running. Methods.
  13. 一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行所述权利要求1至6或7至9任一项中所述的方法。An electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to perform the process described in any one of claims 1 to 6 or 7 to 9 described method.
PCT/CN2022/102750 2021-09-26 2022-06-30 Container cpu resource scheduling and isolation method and apparatus, and storage medium and electronic device WO2023045467A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111132020.0 2021-09-26
CN202111132020.0A CN115858083A (en) 2021-09-26 2021-09-26 Container CPU resource scheduling and isolating method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
WO2023045467A1 true WO2023045467A1 (en) 2023-03-30

Family

ID=85652208

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/102750 WO2023045467A1 (en) 2021-09-26 2022-06-30 Container cpu resource scheduling and isolation method and apparatus, and storage medium and electronic device

Country Status (2)

Country Link
CN (1) CN115858083A (en)
WO (1) WO2023045467A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117112231A (en) * 2023-09-22 2023-11-24 中国人民解放军91977部队 Multi-model collaborative processing method and device
CN117311990A (en) * 2023-11-28 2023-12-29 苏州元脑智能科技有限公司 Resource adjustment method and device, electronic equipment, storage medium and training platform

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116339927B (en) * 2023-05-29 2023-08-15 苏州浪潮智能科技有限公司 Equipment determining method, device, storage medium and electronic device
CN116954822A (en) * 2023-07-26 2023-10-27 中科驭数(北京)科技有限公司 Container arranging system and use method thereof
CN117009060B (en) * 2023-09-27 2024-01-12 腾讯科技(深圳)有限公司 Resource scheduling method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106569895A (en) * 2016-10-24 2017-04-19 华南理工大学 Construction method of multi-tenant big data platform based on container
US20180365076A1 (en) * 2016-02-29 2018-12-20 Huawei Technologies Co., Ltd. Service Container Creation Method and Apparatus
CN109213573A (en) * 2018-09-14 2019-01-15 珠海国芯云科技有限公司 The equipment blocking method and device of virtual desktop based on container
CN111897651A (en) * 2020-07-28 2020-11-06 华中科技大学 Memory system resource management method based on tags
CN112052068A (en) * 2020-08-17 2020-12-08 烽火通信科技股份有限公司 Method and device for binding CPU (central processing unit) of Kubernetes container platform

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180365076A1 (en) * 2016-02-29 2018-12-20 Huawei Technologies Co., Ltd. Service Container Creation Method and Apparatus
CN106569895A (en) * 2016-10-24 2017-04-19 华南理工大学 Construction method of multi-tenant big data platform based on container
CN109213573A (en) * 2018-09-14 2019-01-15 珠海国芯云科技有限公司 The equipment blocking method and device of virtual desktop based on container
CN111897651A (en) * 2020-07-28 2020-11-06 华中科技大学 Memory system resource management method based on tags
CN112052068A (en) * 2020-08-17 2020-12-08 烽火通信科技股份有限公司 Method and device for binding CPU (central processing unit) of Kubernetes container platform

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117112231A (en) * 2023-09-22 2023-11-24 中国人民解放军91977部队 Multi-model collaborative processing method and device
CN117112231B (en) * 2023-09-22 2024-04-16 中国人民解放军91977部队 Multi-model collaborative processing method and device
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

Also Published As

Publication number Publication date
CN115858083A (en) 2023-03-28

Similar Documents

Publication Publication Date Title
WO2023045467A1 (en) Container cpu resource scheduling and isolation method and apparatus, and storage medium and electronic device
US11416307B2 (en) System and method for processing task resources
US10003500B2 (en) Systems and methods for resource sharing between two resource allocation systems
WO2017170470A1 (en) Network function virtualization management orchestration device, method and program
US20210004258A1 (en) Method and Apparatus for Creating Virtual Machine
CN108370341B (en) Resource allocation method, virtual network function manager and network element management system
US11231955B1 (en) Dynamically reallocating memory in an on-demand code execution system
CN114930295A (en) Serverless call allocation with reserved capacity without throttling scaling
US11403149B2 (en) Management of a virtual network function
WO2020147573A1 (en) Method and device for instantiating virtualized network function
EP4177751A1 (en) Resource scheduling method, resource scheduling system, and device
CN111831232A (en) Data storage method and device, storage medium and electronic device
CN113382077B (en) Micro-service scheduling method, micro-service scheduling device, computer equipment and storage medium
CN112631780A (en) Resource scheduling method and device, storage medium and electronic equipment
CN114327881A (en) Task scheduling method and device
CN113886069A (en) Resource allocation method and device, electronic equipment and storage medium
CN114253459A (en) Method and device for creating persistent data volume and server
CN109905258B (en) PaaS management method, device and storage medium
CN110673787A (en) Volume configuration method and device
CN110399200A (en) A kind of cloud platform resource regulating method and device
CN114816272B (en) Magnetic disk management system under Kubernetes environment
CN114860203A (en) Project creation method, project creation device, server and storage medium
CN114490083A (en) CPU resource binding method and device, storage medium and electronic device
CN112612600A (en) Resource scheduling method and device based on DCU and computer equipment
CN112015515A (en) Virtual network function instantiation method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22871528

Country of ref document: EP

Kind code of ref document: A1