Method, system and device for improving utilization rate of cluster resources and storage medium

By adjusting the configuration parameters of the container management platform and container network communication plug-in, increasing the maximum number of containers per node, the problem of low resource utilization rate of cloud computing clusters is solved, and higher resource utilization rate and system stability are achieved.

CN120029757APending Publication Date: 2025-05-23SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411894515.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

Under the conditions of limited hardware resources, how to improve the resource utilization rate of cloud computing clusters has become a technical problem that needs to be solved urgently.

Method used

By pre-setting the configuration files and network communication configuration files of the container management platform, increasing the maximum number of containers per node, and updating the configuration parameters of the container management platform and container network communication plug-in, restarting the relevant services to make the configuration take effect.

Benefits of technology

This increases the maximum number of containers that each hardware node can carry, thereby increasing the resource utilization rate of the cluster and ensuring that the system can still operate stably in a high-concurrency and high-load environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120029757A_ABST
    Figure CN120029757A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of cloud computing, and particularly provides a method, system and device for improving the utilization rate of cluster resources and a storage medium, and the method comprises the steps that a configuration file of a container management platform and a network communication configuration file are preset, and the configuration file of the container management platform increases the maximum container number of each node; updating current configuration parameters of the container management platform based on the configuration file of the container management platform; updating a current configuration parameter of the container network communication plug-in based on the network communication configuration file; and restarting the container management platform and the container network communication plug-in to enable the configuration to take effect. By optimizing the configuration parameters of the container management platform and the network communication, the maximum number of containers capable of being borne by each hardware node is increased, so that the resource utilization rate of the cluster is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of cloud computing, and in particular relates to a method, system, device and storage medium for improving cluster resource utilization. Background Art

[0002] As a core component of modern information technology, cloud computing is essentially about building an efficient distributed computing system. It integrates many servers into a huge computer system, thereby forming unprecedented computing power. On this powerful computing platform, countless small programs can be deployed and run, and their processing results are quickly fed back to users through the network. This Internet-based computing resource sharing model is vividly called "cloud".

[0003] Cloud computing not only involves the deep integration of information technology and software, but is also closely linked to Internet services. It uses software to achieve automated resource management, pooling huge computing resources, making resource allocation and scheduling extremely flexible. This highly automated feature greatly reduces manual intervention and ensures rapid supply and efficient use of resources.

[0004] However, despite the many advantages of cloud computing, the limited hardware resources have always been a key factor restricting its development. How to improve the resource utilization rate of the cluster under the condition of limited hardware resources has become a technical problem that needs to be solved urgently. Summary of the invention

[0005] In view of the above-mentioned deficiencies in the prior art, the present invention provides a method, system, device and storage medium for improving cluster resource utilization to solve the above-mentioned technical problems.

[0006] In a first aspect, the present invention provides a method for improving cluster resource utilization, comprising: Presetting a configuration file of a container management platform and a network communication configuration file, wherein the configuration file of the container management platform increases the maximum number of containers per node; Updating current configuration parameters of the container management platform based on the configuration file of the container management platform; Update the current configuration parameters of the container network communication plug-in based on the network communication configuration file; Restart the container management platform and container network communication plug-in for the configuration to take effect.

[0007] In an optional implementation, before updating the configuration parameters, the method further includes: Obtain the current configuration data of the container management platform and container network communication plug-in, and back up the current configuration data; Extract key configuration parameters from the current configuration data, and determine whether the key configuration parameters are consistent with corresponding parameter values ​​of the configuration file of the container management platform and the network communication configuration file: If yes, the configuration parameter update is not performed; If not, continue to execute the configuration parameter update.

[0008] In an optional embodiment, the method further comprises: If the configuration parameter update fails, restore the configuration parameters of the container management platform and the container network communication plug-in to the backed-up configuration parameters.

[0009] In an optional implementation, the configuration file of the container management platform includes: The maximum number of containers that kubelet can run is set to 400; Set the maximum number of processes in each container to 10000; The maximum grace period used when terminating a container in response to meeting the soft eviction threshold, set to 30 seconds; The name of the network plugin called by various events in the container life cycle is set to CNI plugin; The full path to the directory used to search for CNI configuration files, set to / etc / CNI / net.d; Comma-separated list of full paths to directories where the kubelet will search for CNI plugin executables. Set to / opt / cni / bin.

[0010] In an optional implementation, the network communication configuration file includes: CNI plugin name, set to CNI0; CNI plugin version, set to 0.3.1; List of CNI plugins used, configure the CNI plugins used; CNI plugin category, set to calico; Calico uses etcd to save network topology and status parameters, which is used to specify the address of the etcd service, set to https: / / vip-apiserver.inspur.com:2378; Log level, set to WARNING; IP address management parameters, specify the IP address allocation method; IP address management mode, set to calico-ipam, managed by calico's address manager; Whether to use the assign_ipv4 parameter. If set to true, it means using ipv4. Configure the IPv4 resource pool and set it to 10.101.0.0 / 16.

[0011] In an optional implementation, restarting the container management platform and the container network communication plug-in to make the configuration effective includes: After modifying the configuration file, ensure that all containers have been correctly migrated to other nodes and restart the container management platform to make the new configuration take effect; Make sure that the container network communication plug-in in the cluster is started and running correctly, and apply the new configuration to the cluster using the kubectl command or Calico command line tool.

[0012] In a second aspect, the present invention provides a system for improving cluster resource utilization, comprising: A configuration module, used to pre-set a configuration file and a network communication configuration file of a container management platform, wherein the configuration file of the container management platform increases the maximum number of containers per node; A first updating module, configured to update current configuration parameters of the container management platform based on a configuration file of the container management platform; A second updating module is used to update the current configuration parameters of the container network communication plug-in based on the network communication configuration file; The restart module is used to restart the container management platform and the container network communication plug-in to make the configuration take effect.

[0013] In an optional implementation, the configuration file of the container management platform includes: The maximum number of containers that kubelet can run is set to 400; Set the maximum number of processes in each container to 10000; The maximum grace period used when terminating a container in response to meeting the soft eviction threshold, set to 30 seconds; The name of the network plugin called by various events in the container life cycle is set to CNI plugin; The full path to the directory used to search for CNI configuration files, set to / etc / CNI / net.d; Comma-separated list of full paths to directories where the kubelet will search for CNI plugin executables. Set to / opt / cni / bin.

[0014] In a third aspect, a device is provided, including: Memory, used to store programs that improve cluster resource utilization; The processor is configured to implement the steps of the method for improving cluster resource utilization as provided in the first aspect when executing the program for improving cluster resource utilization.

[0015] In a fourth aspect, a computer-readable storage medium is provided, on which a program for improving cluster resource utilization is stored. When the program for improving cluster resource utilization is executed by a processor, the steps of the method for improving cluster resource utilization provided in the first aspect are implemented.

[0016] The beneficial effect of the present invention lies in that the method, system, device and storage medium for improving cluster resource utilization provided by the present invention optimize the configuration parameters of the container management platform and network communication, thereby improving the maximum number of containers that each hardware node can carry, thereby improving the resource utilization of the cluster.

[0017] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.

[0020] Figure 2 The diagram is a schematic architecture diagram of a container management platform of a method according to an embodiment of the present invention.

[0021] Figure 3 is a schematic block diagram of a system according to an embodiment of the present invention.

[0022] Figure 4 A schematic diagram of the structure of a device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0025] The key terms appearing in the present invention are explained below.

[0026] Kubernetes is a portable, scalable, open source platform for managing containerized workloads and services. The goal of Kubernetes is to simplify the deployment of containerized applications. Kubernetes has a large and rapidly growing ecosystem. Kubernetes provides a complete set of technologies for containerized application deployment, organization, update, and maintenance.

[0027] Docker is an open source application container engine that allows developers to package their applications and dependencies into a portable image and then publish it to any popular Linux or Windows machine. Containers are completely sandboxed and there are no interfaces between them. Kubernetes uses Pod, a built-in resource, to run Docker containers.

[0028] Calico is an open source network and network security solution for workloads on containers, virtual machines, and hosts. Calico is often used for network interconnection and isolation control between containers on cloud platforms. Calico is a pure three-layer network solution based on BGP, which can be well integrated with current mainstream cloud platforms such as Openstack, Kubernetes, AWS, GCE, etc. Calico uses Linux Kernel to implement an efficient vRouter on each computing node to forward data. Each vRouter uses the BGP1 protocol to broadcast the routes of the containers running on this node to the entire Calico network, and automatically sets the routing forwarding rules to reach other nodes. Calico ensures that the data traffic between containers is interconnected through IP routing. Calico node networking does not require additional NAT or tunnels, no additional packet unpacking, can save CPU computing, and improve network efficiency. Calico is often run in a cluster as a network plug-in for the cluster.

[0029] The method for improving cluster resource utilization provided by the embodiment of the present invention is executed by a computer device, and accordingly, the system for improving cluster resource utilization runs in the computer device.

[0030] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention. Figure 1 The execution subject may be a system for improving cluster resource utilization. According to different requirements, the order of the steps in the flowchart may be changed, and some may be omitted.

[0031] like Figure 1 As shown, the method includes: S1. Pre-set a configuration file of a container management platform and a network communication configuration file, wherein the configuration file of the container management platform increases the maximum number of containers per node.

[0032] In the early stages of deploying a container management system, the first task is to pre-set the configuration files of the container management platform and the network communication configuration files. This step is crucial because it lays a solid foundation for the operation of the entire system. Specifically, the configuration files of the container management platform need to be carefully adjusted, and one of the key settings is to increase the maximum number of containers per node. The setting of this parameter must fully consider the system's load capacity, resource allocation strategy, and future expansion requirements to ensure that the system can still operate stably in a high-concurrency, high-load environment.

[0033] S2. Update current configuration parameters of the container management platform based on the configuration file of the container management platform.

[0034] Based on the configuration file of the container management platform that has been set, the current configuration parameters of the container management platform are updated. This process involves importing the parameters in the configuration file into the system and overwriting the original configuration. Through this step, the system can allocate resources and schedule tasks according to the new configuration parameters, thereby optimizing performance and improving resource utilization.

[0035] S3. Update current configuration parameters of the container network communication plug-in based on the network communication configuration file.

[0036] The network communication configuration file also needs to be updated accordingly. This includes adjusting the network topology, configuring network address translation (NAT) rules, setting firewall policies, etc. to ensure smooth network communication between containers while ensuring the security of the system. After updating the network communication configuration file, the current configuration parameters of the container network communication plug-in also need to be updated synchronously to match the new network communication configuration.

[0037] S4. Restart the container management platform and container network communication plug-in to make the configuration take effect.

[0038] In order for the new configuration to take effect, you need to restart the container management platform and the container network communication plug-in. Although this step may seem simple, it is actually a key step to ensure the stable operation of the system. By restarting, the system can reload the new configuration parameters and perform resource allocation and task scheduling according to the new rules. In this way, the entire container management system can run with higher efficiency and stronger stability, providing users with better services.

[0039] Please refer to Figure 2 Kubernetes (K8s for short) is an open source container orchestration and management system that provides powerful container deployment, expansion, and management capabilities. The Kubernetes system architecture follows the client / server (C / S) architecture and is mainly divided into two parts: Master and Node. The Master serves as the server and the Node serves as the client.

[0040] The main components of the Kubernetes container cloud platform are: Master: As a server, the Master is responsible for managing and controlling the entire Kubernetes cluster and making global decisions about the cluster. It is equivalent to the "brain" of the entire cluster, receiving and processing all control commands. The Master mainly includes the following components: kube-apiserver: The HTTP REST API interface of the cluster is the entry point for cluster control. It provides cluster access control and resource management functions.

[0041] kube-controller-manager: The automated control center for all resource objects in the cluster. It is responsible for handling events in the cluster and ensuring that the state of the cluster meets user expectations.

[0042] kube-scheduler: The scheduling service for Pod resource objects in the cluster. It allocates Pods to appropriate Node nodes based on Pod resources and scheduling policies.

[0043] Node: As a client, Node is a working node in the Kubernetes cluster. The work on the Node is assigned by the Master server. For example, when a Node goes down, the Master node will transfer its work to other Nodes. Node mainly includes the following components: Kubelet: Responsible for managing the creation, deletion, start and stop of containers on the node and communicating with the Master node. It is the core component on the Node node and is responsible for executing tasks issued by the Master.

[0044] Pod: Responsible for the basic management services of containers and receiving instructions from the kubelet component. Pod is the smallest deployable computing unit in Kubernetes, which encapsulates one or more containers.

[0045] Calico: A network plug-in. It provides powerful network functions and supports container network communication across nodes.

[0046] The kubelet component plays a vital role in the Kubernetes cluster. It is responsible for receiving, processing, and reporting tasks issued by the kube-apiserver component, and managing containers on the node. In order to improve the utilization rate of the cluster, it is necessary to optimize the configuration of kubelet. The following is the command to start kubelet: kubelet --max-pods=400 --pod-max-pids=10000 --eviction-max-pod-grace-period=30 --network-plugin=cni --cni-conf-dir= / etc / cni / net.d --cni-bin-dir= / opt / cni / bin Configuration optimization: --max-pods: Sets the maximum number of Pods that the kubelet can run. By default, this value may be low, limiting the number of Pods on a node. By increasing this value, more Pods can be run on the node, thereby improving the utilization of the node, so it can be set to 400 or higher.

[0047] --pod-max-pids: Sets the maximum number of processes in each Pod. This parameter can limit the number of processes in a Pod to prevent a Pod from taking up too many resources. However, if resources are sufficient, increasing this value can allow the Pod to run more processes and improve the computing power of the node. For example, you can set it to 10000 or higher.

[0048] --eviction-max-pod-grace-period: The maximum grace period (in seconds) used when terminating a Pod in response to meeting the soft eviction threshold. This parameter can be used to set the grace period given when evicting a Pod to avoid abrupt termination of the Pod due to insufficient resources. By setting this value appropriately, you can ensure sufficient resources while reducing the impact of frequent Pod starts and stops on system performance. For example, you can set it to 30 seconds or longer.

[0049] --network-plugin: Set the name of the network plugin called by various events in the Pod lifecycle. Kubernetes supports a variety of network plugins, such as Calico, Flannel, etc. Choosing the right network plugin is crucial to improving the network performance and stability of the cluster. Here, Calico is selected as the network plugin.

[0050] --cni-conf-dir and --cni-bin-dir: are used to specify the directory of the CNI configuration file and the directory of the CNI plugin executable file respectively. These two parameters are crucial for the normal operation of the CNI plugin. By setting these two parameters correctly, you can ensure that the CNI plugin can load and configure the network correctly.

[0051] Detailed configuration: a) --max-pods=400: The maximum number of Pods that kubelet can run, which is set to 400 here; b) --pod-max-pids=10000: Set the maximum number of processes in each Pod, which is set to 10000 here; c) --eviction-max-pod-grace-period=30: The maximum grace period (in seconds) used when terminating a Pod in response to meeting the soft eviction threshold. Here it is set to 30 seconds. d) --network-plugin=cni: Set the name of the network plug-in called by various events in the pod life cycle, here is the cni plug-in; e) --cni-conf-dir= / etc / cni / net.d: The full path to the directory where the CNI configuration files are searched. Here it is set to / etc / cni / net.d; f) --cni-bin-dir= / opt / cni / bin: A comma-separated list of full paths to directories where the kubelet will search for CNI plugin executables. Here it is set to / opt / cni / bin.

[0052] (III) Calico configuration optimization Calico is a high-performance, scalable network plug-in that provides powerful network functions and supports cross-node container network communication. In order to give full play to the performance advantages of Calico, it needs to be configured and optimized. The Calico configuration file is as follows: {"name": "cni0", "cniVersion":"0.3.1", "plugins":[ { "type": "calico", "etcd_endpoints": "https: / / vip-apiserver.inspur.com:2378", "log_level": "WARNING", "ipam": { "type": "calico-ipam", "assign_ipv4": "true", "ipv4_pools": ["10.101.0.0 / 16"]}}]}.

[0053] Configuration optimization: name: The name of the CNI plugin. This parameter is crucial for identifying the CNI plugin. In the configuration file, you need to specify a unique name for the CNI plugin.

[0054] cniVersion: The version of the CNI plugin. Different versions of CNI plugins may have different functions and performance. Therefore, in the configuration file, you need to specify a CNI plugin version that is compatible with the Kubernetes cluster.

[0055] plugins: List of CNI plugins to use. In this list, multiple CNI plugins can be specified and configured in order. For Calico, it is usually configured as the only CNI plugin.

[0056] type: The type of the CNI plugin. For Calico, this is usually "calico".

[0057] etcd_endpoints: Calico uses etcd to save network topology and status. This parameter specifies the address of the etcd service. In the configuration file, the address of etcd needs to be set correctly to ensure that Calico can access etcd normally and save the network status.

[0058] log_level: Log level. This parameter can control the amount of log output by Calico. By adjusting the log level, you can obtain log information of different levels as needed for troubleshooting and performance optimization.

[0059] ipam: IP address management settings. This section contains Calico's IP address management configuration, including IP address allocation method, IP address pool, etc. By properly configuring IP address management, you can ensure that the container can obtain a suitable IP address and achieve cross-node network communication.

[0060] type: IP address management method. For Calico, its IP address management method is usually "calico-ipam".

[0061] assign_ipv4: Set to true to use IPv4 addresses. In most cases, choose to use IPv4 addresses.

[0062] ipv4_pools: IPv4 address pool. This parameter specifies the range of IPv4 addresses that Calico can allocate. By properly configuring the IPv4 address pool, you can ensure that the container can obtain enough IPv4 addresses and achieve cross-node network communication.

[0063] Detailed configuration: a)name: configure the cni plugin name, here it is set to "cni0"; b)cniVersion: configure the cni plug-in version, here set to "0.3.1"; c) plugins: configure the cni plugins used; d)type: configure the cni plugin category, here it is set to "calico"; e) etcd_endpoints: Configure Calico to use etcd to save network topology and status. This parameter specifies the address of the etcd service, which is set to "https: / / vip-apiserver.inspur.com:2378" here; f)log_level: configure the log level, here set to "WARNING"; h)ipam: configure ip address allocation settings; i)ipam.type: Set the IP address management method. Here, calico-ipam is used, which is managed by the calico address manager. Set it to "calico-ipam"; j) assign_ipv4: set to true to use ipv4, here set to "true"; k)ipv4_pools: Configure the ipv4 resource pool, here it is set to "10.101.0.0 / 16".

[0064] The specific configuration parameter update methods include: 1. Preparation Environmental assessment: First, we need to evaluate the existing Kubernetes cluster environment and understand the cluster's hardware configuration, software version, network topology, and other information to help us determine the specific implementation steps and parameter settings for the optimization solution.

[0065] Back up data: Before making any configuration changes, you need to back up important data in the cluster to prevent data loss or service interruption due to configuration errors.

[0066] Obtain the current configuration data of the container management platform and the container network communication plug-in, and back up the current configuration data; extract key configuration parameters from the current configuration data, and determine whether the key configuration parameters are consistent with the corresponding parameter values ​​of the configuration file of the container management platform and the network communication configuration file: if so, do not execute the configuration parameter update; if not, continue to execute the configuration parameter update.

[0067] 2. Kubelet configuration optimization Modify the kubelet configuration file: According to the kubelet configuration parameters mentioned above, you need to modify the kubelet configuration file (usually the kubelet configuration file or startup parameters). In the configuration file, you need to add or modify the values ​​of related parameters to achieve the optimized configuration of kubelet.

[0068] Restart the kubelet service: After modifying the configuration file, you need to restart the kubelet service for the new configuration to take effect. Before restarting the kubelet service, you need to ensure that all Pods have been correctly migrated to other nodes to avoid Pod loss or interruption due to kubelet restart.

[0069] 3. Calico configuration optimization Modify the Calico configuration file: According to the Calico configuration parameters mentioned above, modify the Calico configuration file (usually the Calico YAML configuration file or JSON configuration file). In the configuration file, you need to add or modify the values ​​of related parameters to achieve the optimized configuration of Calico.

[0070] Apply Calico configuration: After modifying the configuration file, you need to apply the new configuration to the cluster. This can usually be done through the kubectl command or Calico's command line tool. Before applying the new configuration, you need to ensure that the Calico service in the cluster is started and running correctly.

[0071] 4. Monitoring and Tuning Monitor cluster performance: After optimizing the configuration, you need to continuously monitor cluster performance indicators, such as CPU usage, memory usage, network throughput, etc., to verify the implementation effect.

[0072] Adjust configuration parameters: Based on the monitoring results, you may need to further adjust the configuration parameters of kubelet and Calico to optimize the performance and stability of the cluster.

[0073] If the configuration parameter update fails, the configuration parameters of the container management platform and the container network communication plug-in are restored to the backup configuration parameters.

[0074] In some embodiments, the system for improving cluster resource utilization may include multiple functional modules composed of computer program segments. The computer program of each program segment in the system for improving cluster resource utilization may be stored in a memory of a computer device and executed by at least one processor to perform (see Figure 1 Description) Improves cluster resource utilization.

[0075] In this embodiment, the system for improving cluster resource utilization can be divided into multiple functional modules according to the functions it performs, such as Figure 3 As shown. The functional modules of the system 300 may include: a configuration module 310, a first update module 320, a second update module 330 and a restart module 340. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0076] A configuration module, used to pre-set a configuration file and a network communication configuration file of a container management platform, wherein the configuration file of the container management platform increases the maximum number of containers per node; A first updating module, configured to update current configuration parameters of the container management platform based on a configuration file of the container management platform; A second updating module is used to update the current configuration parameters of the container network communication plug-in based on the network communication configuration file; The restart module is used to restart the container management platform and the container network communication plug-in to make the configuration take effect.

[0077] Optionally, as an embodiment of the present invention, the configuration file of the container management platform includes: The maximum number of containers that kubelet can run is set to 400; Set the maximum number of processes in each container to 10000; The maximum grace period used when terminating a container in response to meeting the soft eviction threshold, set to 30 seconds; The name of the network plugin called by various events in the container life cycle is set to CNI plugin; The full path to the directory used to search for CNI configuration files, set to / etc / CNI / net.d; Comma-separated list of full paths to directories where the kubelet will search for CNI plugin executables. Set to / opt / cni / bin.

[0078] Figure 4 The method for improving cluster resource utilization provided for the embodiment of the present application can be applied to equipment. It will be appreciated by those skilled in the art that the equipment structure involved in the embodiment of the present invention does not constitute a limitation on the equipment, and the equipment may include more or less components than shown, or combine certain components, or arrange different components. In an embodiment of the present invention, the equipment includes but is not limited to laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The equipment may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples, and are not intended to limit the implementation of the embodiments of the present application described and / or required herein.

[0079] The device 400 may include: a processor 410, a memory 420 and a communication unit 430. These components communicate via one or more buses. Those skilled in the art will appreciate that the server structure shown in the figure does not limit the present invention, and it may be a bus structure or a star structure, and may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently.

[0080] The memory 420 may be used to store the execution instructions of the processor 410, and the memory 420 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 420 are executed by the processor 410, the device 400 is enabled to perform some or all of the steps in the following method embodiments.

[0081] The processor 410 is the control center of the storage device, and uses various interfaces and lines to connect various parts of the entire electronic device. It runs or executes software programs and / or modules stored in the memory 420, and calls data stored in the memory to perform various functions of the electronic device and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of a plurality of packaged ICs with the same or different functions. For example, the processor 410 can include only a central processing unit (CPU). In an embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.

[0082] The communication unit 430 is used to establish a communication channel so that the storage device can communicate with other devices, receive user data sent by other devices or send user data to other devices.

[0083] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0084] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes, including several instructions for enabling a computer device (which can be a personal computer, a server, or a second device, a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.

[0085] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.

[0086] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or modules, which can be electrical, mechanical or other forms.

[0087] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0088] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0089] Although the present invention has been described in detail with reference to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person of ordinary skill in the art may easily think of changes or substitutions within the technical scope disclosed by the present invention, and these shall be within the scope of protection of the present invention.

Claims

1. A method for improving cluster resource utilization, characterized in that: include: Presetting a configuration file of a container management platform and a network communication configuration file, wherein the configuration file of the container management platform increases the maximum number of containers per node; Updating current configuration parameters of the container management platform based on the configuration file of the container management platform; Update the current configuration parameters of the container network communication plug-in based on the network communication configuration file; Restart the container management platform and container network communication plug-in for the configuration to take effect.

2. The method according to claim 1, characterized in that Before updating the configuration parameters, the method further includes: Obtain the current configuration data of the container management platform and container network communication plug-in, and back up the current configuration data; Extract key configuration parameters from the current configuration data, and determine whether the key configuration parameters are consistent with corresponding parameter values ​​of the configuration file of the container management platform and the network communication configuration file: If yes, the configuration parameter update is not performed; If not, continue to execute the configuration parameter update.

3. The method according to claim 2, characterized in that The method further comprises: If the configuration parameter update fails, restore the configuration parameters of the container management platform and the container network communication plug-in to the backed-up configuration parameters.

4. The method according to claim 1, characterized in that: The configuration file of the container management platform includes: The maximum number of containers that kubelet can run is set to 400; Set the maximum number of processes in each container to 10000; The maximum grace period used when terminating a container in response to meeting the soft eviction threshold, set to 30 seconds; The name of the network plugin called by various events in the container life cycle is set to CNI plugin; The full path to the directory used to search for CNI configuration files, set to / etc / CNI / net.d; Comma-separated list of full paths to directories where the kubelet will search for CNI plugin executables. Set to / opt / cni / bin.

5. The method according to claim 1, characterized in that The network communication configuration file includes: CNI plugin name, set to CNI0; CNI plugin version, set to 0.3.1; List of CNI plugins used, configure the CNI plugins used; CNI plugin category, set to calico; Calico uses etcd to save network topology and status parameters, which is used to specify the address of the etcd service, set to https: / / vip-apiserver.inspur.com:2378; Log level, set to WARNING; IP address management parameters, specify the IP address allocation method; IP address management mode, set to calico-ipam, managed by calico's address manager; Whether to use the assign_ipv4 parameter. If set to true, it means using ipv4. Configure the IPv4 resource pool and set it to 10.101.0.0 / 16.

6. The method according to claim 1, characterized in that Restart the container management platform and container network communication plug-in to make the configuration take effect, including: After modifying the configuration file, ensure that all containers have been correctly migrated to other nodes and restart the container management platform to make the new configuration take effect; Make sure that the container network communication plug-in in the cluster is started and running correctly, and apply the new configuration to the cluster using the kubectl command or Calico command line tool.

7. A system for improving cluster resource utilization, characterized in that: include: A configuration module, used to pre-set a configuration file and a network communication configuration file of a container management platform, wherein the configuration file of the container management platform increases the maximum number of containers per node; A first updating module, configured to update current configuration parameters of the container management platform based on a configuration file of the container management platform; A second updating module is used to update the current configuration parameters of the container network communication plug-in based on the network communication configuration file; The restart module is used to restart the container management platform and the container network communication plug-in to make the configuration take effect.

8. The system according to claim 7, characterized in that The configuration file of the container management platform includes: The maximum number of containers that kubelet can run is set to 400; Set the maximum number of processes in each container to 10000; The maximum grace period used when terminating a container in response to meeting the soft eviction threshold, set to 30 seconds; The name of the network plugin called by various events in the container life cycle is set to CNI plugin; The full path to the directory used to search for CNI configuration files, set to / etc / CNI / net.d; Comma-separated list of full paths to directories where the kubelet will search for CNI plugin executables. Set to / opt / cni / bin.

9. A device, characterized in that: include: Memory, used to store programs that improve cluster resource utilization; A processor is used to implement the steps of the method for improving cluster resource utilization as described in any one of claims 1 to 6 when executing the program for improving cluster resource utilization.

10. A computer-readable storage medium storing a computer program, characterized in that: The readable storage medium stores a program for improving cluster resource utilization, and when the program for improving cluster resource utilization is executed by a processor, the steps of the method for improving cluster resource utilization as claimed in any one of claims 1 to 6 are implemented.