Container resource limiting, fault monitoring and recovering method

A technology for resource limitation and fault monitoring, applied in the direction of instruments, program control design, program control devices, etc., can solve the problem of inability to monitor health status in fine-grained manner, poor stability and maintainability of container management systems, and inability to quickly restore containers across hosts and other problems, to achieve the effect of strong stability and maintainability, and low coupling

Pending Publication Date: 2022-05-27
NARI TECH CO LTD +1
View PDF0 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The purpose of the present invention is to overcome the deficiencies in the prior art, provide a container resource limitation, fault monitoring and recovery method, solve the poor stability and maintainability of the container management system in the prior art, and cannot fine-grained monitor each container Technical issues such as the health status of each business process and the inability to quickly restore containers across hosts

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Container resource limiting, fault monitoring and recovering method
  • Container resource limiting, fault monitoring and recovering method
  • Container resource limiting, fault monitoring and recovering method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0041] like figure 1 As shown, an embodiment of the present invention provides a container resource limitation method, and the method includes the following steps:

[0042] Start the specified container, set the PID of the container startup process itself to the cgroup resource limit group such as CPU and memory, and set the limit value of cgroup resources such as CPU and memory;

[0043] Specify the systemd resource limit group of the container process as a non-system resource limit group to get rid of the control of the system service on the container resource limit group;

[0044] The container directory is generated by joint mounting of the mirror directory, and then the container namespace is created;

[0045] Execute the command command of the container to start the first process of the container;

[0046] If the first process of the container fails to start, release the container mount point and cgroup resources and update the container running status to exit;

[004...

Embodiment 2

[0052] The embodiment of the present invention provides a container fault monitoring method, and the implementation environment of the method is: after the container is successfully started based on the method described in the first embodiment, the container head process is taken over by the host process No. 1. The container process is divided into the first process, the persistent process and the business process, and the first process of the container is configured to pull up multiple business processes in batches and execute the persistent process to keep the container running all the time. It should be noted that the so-called host process No. 1 is the init process in the operating system.

[0053] like figure 2 As shown, the container fault monitoring method provided by the embodiment of the present invention can be executed by a host, and specifically can be implemented by a separate monitoring program in the host, and the method includes the following steps:

[0054] ...

Embodiment 3

[0083] This embodiment provides a container fault monitoring method, which is based on the same technical concept as the second embodiment, and both can start a separate monitoring program on the host to execute the container fault monitoring method, so as to monitor the operation of the business process in the container The difference from the second embodiment is that the container fault monitoring method is further described in this embodiment in conjunction with an example, and the details are as follows:

[0084] like image 3 As shown, two containers are started on the host, namely container a and container b; among them, in container a: / bin / bash / usr / sys103_start.sh is the container first process, / bin / bash is the persistent process, app_warn, app_monitor, and app_server are all business processes; the same business process is also started in container b. The business process in container a reports the process startup command and parameters app_warn -service sys -inst...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a container resource limiting, fault monitoring and recovering method in the field of cloud computing big data, which comprises the following steps of: acquiring a starting process PID (Proportion Integration Differentiation) of a container, setting the starting process PID in a cgroup resource limiting group to which the container belongs, and setting a cgroup resource limiting value; a systemd resource restriction group of the container cgroup is specified as a non-system resource restriction group; executing a command of the container to start a first process of the container; if the first process of the container is successfully started, updating the state of the container to be in operation and recording the PID of the first process of the container; and destroying the container starting process, and taking over the first process of the container by the first process of the host machine so as to realize separated limitation of container resources. According to the method, the coupling between the components of the container management system is lower, the system is simpler and more reliable, the stability and maintainability of the container are higher, the self-recovery function is achieved, and when the local container breaks down, quick cross-host image file synchronization and container recovery are supported.

Description

technical field [0001] The invention relates to a container resource limitation, fault monitoring and recovery method, belonging to the technical field of cloud computing big data. Background technique [0002] The container engine technology represented by docker is a lightweight virtualization technology. In the Linux operating system, the container mainly implements resource quota restrictions through the Control Group (control group). Resources include CPU resources, memory resources, and IO resources. The containerd-shim container shim is used in docker as the resident parent process of each real container. The main function of the container shim is to monitor the process status of the container and provide a resident parent process for the cgroup resource limit of the container. However, once the container shim is abnormally disconnected, all processes of the corresponding user container will also disappear at the same time, and when the container shim needs to be upg...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/455
CPCG06F9/45558
Inventor 符鹏高原陈泊宇顾雯轩刘威顾文杰董子奇丁雨恒陈兴亮郑磊马德超陈旻昱汤雨豪
Owner NARI TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products