A dynamic priority-based container recycling method and system

By collecting container performance data in a high-computing-intensity cloud platform, calculating recycling priorities, and generating queues, the problem of resource management in existing technologies struggling to cope with resource contention and user experience is solved, achieving efficient container recycling and resource utilization.

CN120821532BActive Publication Date: 2026-02-03浙江望安科技有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511331591.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-18
Publication Date
2026-02-03
Estimated Expiration
2045-09-18

AI Technical Summary

Technical Problem

Existing container resource management mechanisms struggle to flexibly address the conflict between resource contention and user experience assurance in high-computational-intensity, highly interactive, and long-lifecycle cloud computing tasks, thus impacting user experience and increasing labor costs.

Method used

By collecting performance data of containers in compute-intensive cloud platforms, combining it with a weighted mechanism to calculate recycling priorities, generating recycling queues, and recycling containers, intelligent and dynamic resource management is achieved.

Benefits of technology

It improved resource utilization efficiency, reduced labor costs, enhanced user experience, resolved the conflict between resource competition and user experience assurance, and optimized system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120821532B_ABST
    Figure CN120821532B_ABST
Patent Text Reader

Abstract

The application provides a container recycling method and system based on dynamic priority, and relates to the technical field of data processing.The method comprises the following steps: collecting a plurality of performance data of each running container in a computing-intensive cloud platform; judging whether each performance data is greater than a threshold value; if yes, starting a container recycling process and calculating the recycling priority of each running container; otherwise, re-collecting the performance data; calculating the recycling priority of each running container according to the performance data and in combination with a weighting mechanism; generating a recycling queue based on the calculated recycling priority; and recycling each running container according to the recycling queue.The application can realize dynamic evaluation and elastic management of containers under resource pressure, and significantly improve resource utilization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a container recycling method and system based on dynamic priority. Background Technology

[0002] Dynamic prioritization refers to dynamically adjusting the priority of containers based on real-time data (such as performance metrics). As the state of containers changes over time, the priority of container reclamation needs to be adjusted in real time according to these changes. Container reclamation refers to stopping and releasing containers that occupy resources, usually to optimize resource usage or because the containers themselves are no longer needed. Dynamic priority-based container reclamation is a container management mechanism that calculates and determines which containers should be prioritized for reclamation based on each container's real-time performance data (such as CPU utilization, memory utilization, idle time, etc.).

[0003] In cloud platforms, containers are resource consumers. If unnecessary containers are not recycled in a timely manner, it will lead to resource waste. Automated container recycling eliminates the need for manual intervention, which can reduce management complexity and save operating costs, prevent unnecessary containers from occupying valuable resources, and improve the response speed and service quality of the cloud platform.

[0004] However, while existing container resource management mechanisms have achieved some success in general online programming platforms, they still face limitations in some special types of cloud computing tasks. In particular, in containerized service platforms with high computational intensity, strong interactivity, and long lifecycles, such as the W-Cert theorem proof task, existing resource management and recycling strategies have limited performance and are unable to flexibly address the contradiction between resource contention and user experience assurance, thus affecting user experience, increasing labor costs, and impacting the overall performance of the system. Summary of the Invention

[0005] In view of the shortcomings of the prior art, the purpose of this invention is to provide a container recycling method based on dynamic priority, which can solve the limitations of the existing container resource management mechanism in some special types of cloud computing tasks. In particular, in containerized service platforms with high computational intensity, strong interactivity, and long life cycle, such as the W-Cert theorem proof task, the existing resource management and recycling strategies have limited performance, making it difficult to flexibly deal with the contradiction between resource contention and user experience protection, thus affecting user experience, increasing labor costs, and impacting the overall performance of the system.

[0006] A first aspect of this invention provides a container recycling method based on dynamic priority, comprising:

[0007] S1: Collect multiple performance data points from various running containers in a compute-intensive cloud platform;

[0008] S2: Determine whether each performance data is greater than the threshold. If yes, start the container recycling process and proceed to step S3; otherwise, return to step S1.

[0009] S3: Based on performance data and a weighted mechanism, calculate the recycling priority of each running container;

[0010] S4: Generate a recycling queue based on recycling priority;

[0011] S5: Reclaim each running container according to the reclamation queue.

[0012] A second aspect of this invention provides a container recycling device based on dynamic priority:

[0013] The data acquisition module is used to collect multiple performance data from various running containers in a compute-intensive cloud platform.

[0014] The judgment module is used to determine whether each performance data exceeds the threshold. If so, the container recycling process is started and the calculation module is entered; otherwise, the process returns to the collection module.

[0015] The calculation module is used to calculate the recycling priority of each running container based on performance data and a weighting mechanism.

[0016] The generation module is used to generate a recycling queue based on the calculated recycling priority;

[0017] The recycling module is used to recycle each running container according to the recycling queue.

[0018] A third aspect of the present invention provides a container recycling system based on dynamic priority, comprising: a processor and a memory;

[0019] The memory stores programs or instructions that can run on the processor, and when the programs or instructions are executed by the processor, they implement the steps of the container reclamation method based on dynamic priority as described in the first aspect.

[0020] A fourth aspect of the present invention provides a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the container recycling method based on dynamic priority as described in the first aspect.

[0021] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:

[0022] In this embodiment of the invention, multiple performance data points of each running container in a compute-intensive cloud platform are collected. Then, it is determined whether each performance data point exceeds a threshold. If so, the container reclamation process is initiated; otherwise, the process returns to collect performance data again. Based on the performance data and a weighted mechanism, the reclamation priority of each running container is calculated, thereby ensuring targeted and efficient resource reclamation. Finally, based on the calculated reclamation priority, a reclamation queue is generated, and each running container is reclaimed. This intelligently balances system load, avoids resource waste, improves computational efficiency and system stability, reduces labor costs, enhances user experience, and resolves the contradiction between resource contention and user experience assurance. Attached Figure Description

[0023] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts. Obviously, the drawings described below are merely some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative effort.

[0024] Figure 1 This is a schematic flowchart of a container recycling method based on dynamic priority provided in an embodiment of the present invention;

[0025] Figure 2 This is a schematic diagram of a container recycling device based on dynamic priority provided in an embodiment of the present invention;

[0026] Figure 3 This is a schematic diagram of a container recycling system based on dynamic priority provided in an embodiment of the present invention. Detailed Implementation

[0027] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0028] The container recycling method based on dynamic priority provided by the present invention will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.

[0029] Reference manual attached Figure 1 The diagram illustrates a flow chart of a container recycling method based on dynamic priority provided by an embodiment of the present invention.

[0030] This invention provides a container recycling method based on dynamic priority, which may include the following steps:

[0031] S1: Collect multiple performance data points from various running containers in a compute-intensive cloud platform.

[0032] Compute-intensive cloud platforms refer to cloud computing environments that require significant computing resources. These platforms typically handle complex computational tasks such as theorem proving and scientific computing. Running containers is a lightweight virtualization technology that encapsulates applications and their dependent environments. Performance data reflects the resource consumption of containers.

[0033] Specifically, computationally intensive cloud platforms are exemplified by cloud platforms that provide proofs of the W-Cert theorem.

[0034] It's worth noting that by collecting multiple performance data points in real time, accurate foundational information is provided for subsequent container reclamation decisions. Continuously monitoring container resource usage allows for the timely identification of containers with excessive resource consumption, preventing resource waste or system overload, and laying the groundwork for dynamic reclamation and optimized resource utilization. This data-driven monitoring approach helps improve system responsiveness and computational efficiency.

[0035] In one possible implementation, the performance data specifically includes: CPU utilization, memory utilization, memory growth rate, maximum memory growth rate, storage space utilization, and container idle time.

[0036] CPU utilization refers to the proportion of CPU resources used by a container during runtime.

[0037] Memory utilization rate represents the proportion of memory resources used by a container during runtime.

[0038] Among them, the memory growth rate refers to the rate at which the container's memory usage increases over a period of time.

[0039] The maximum memory growth rate represents the maximum memory growth rate experienced by all containers during operation.

[0040] Storage space utilization rate represents the proportion of storage space occupied by the container.

[0041] Container idle time refers to the length of time a container is not performing any computational tasks or operations.

[0042] It's important to note that for the W-Cert theorem proof scenario, idle time is not equivalent to zero resource usage. Even with low CPU utilization, if the proof tree (the structured proof state representation of W-Cert) is still changing, such as lemma additions or structure expansions, it is considered an active state. Once the state remains unchanged and the user performs no action, it is determined to be inactive and a timer begins. For other scenarios, a reasonable definition of "effective idle time" can be defined by combining user inactivity detection (e.g., no mouse or keyboard input) with resource usage judgment.

[0043] S2: Determine whether each performance data is greater than the threshold. If yes, start the container recycling process and proceed to step S3; otherwise, return to step S1.

[0044] The threshold refers to a preset standard value. If certain performance indicators of a container exceed these thresholds, the system will consider the container potentially overloaded or no longer needed, thus triggering the recycling process. The container recycling process refers to the operation of releasing resources and closing the container, aiming to free up system resources and maintain the platform's efficient operation.

[0045] It's worth noting that by setting thresholds to automatically determine container resource usage, manual intervention and over-configuration are avoided. When performance data exceeds the preset threshold, the system immediately initiates a resource reclamation process, effectively managing system resources and preventing containers from excessively consuming computing resources and causing system overload. This improves the automation and flexibility of container management, making resource scheduling more efficient and enabling real-time responses to changes in system load, thus optimizing user experience and platform performance.

[0046] S3: Based on performance data and a weighted mechanism, calculate the recycling priority of each running container.

[0047] The weighting mechanism assigns different weights to different performance data, thus giving certain performance metrics (such as CPU utilization and memory utilization) a more significant place in priority calculation. Reclaiming priority is a value calculated based on container performance data and the weighting mechanism, used to determine which containers should be reclaimed first. Higher-priority containers mean they are less resource-intensive or no longer needed, and can be reclaimed more quickly.

[0048] It's important to note that by combining various performance data points from containers and employing a weighted mechanism, the recycling priority of each container is precisely calculated. This ensures that the recycling strategy is more intelligent and dynamic, not simply a fixed rule, but adjusted based on the actual resource consumption of the containers. By prioritizing the recycling of containers with high resource consumption and heavy loads, resource allocation can be effectively optimized, avoiding system overload or unnecessary resource waste, thereby improving overall system performance and resource utilization efficiency.

[0049] In one possible implementation, the formula for calculating the recycling priority is as follows:

[0050] ;

[0051] in, Priority Indicates the recycling priority. α , β , λ as well as δ All represent weighting coefficients. This represents the 90th percentile of container CPU utilization. Mem The % represents the percentage of memory used by the container. MemGrowth This represents the memory growth rate, i.e., the rate at which the container's memory usage changes. MaxMemGrowth This represents the maximum memory growth rate shared by all containers. Storage The % indicates the percentage of storage space used in the container. T Indicates the container's idle time. τ This parameter controls the increase in idle time. ε This represents a small constant used to prevent the denominator from being zero.

[0052] In one possible implementation, the formula for calculating the memory growth rate is as follows:

[0053] ;

[0054] in, Indicates the measurement interval. Mem n Indicates the first n The container's memory usage during this measurement. Mem n-1 Indicates the first n -1. Container memory usage during measurement.

[0055] S4: Generate a recycling queue based on recycling priority.

[0056] The recycling queue is a list of containers sorted by priority, and the recycling order of containers is determined by their recycling priority.

[0057] It should be noted that by generating a recycling queue based on recycling priority, the container recycling process becomes more orderly and efficient. By prioritizing containers, the system ensures that high-priority containers with excessive resource consumption are recycled first, thereby avoiding unnecessary resource waste and system overload.

[0058] S5: Reclaim each running container according to the reclamation queue.

[0059] It should be noted that the recycling module removes the container from the front of the queue and closes it. After the container is closed, the system waits for a period of time to ensure that the resources are completely released, and then re-checks the overall performance indicators of the server. If they are still higher than the threshold, the container recycling process is restarted again; otherwise, the recycling process is terminated.

[0060] In one possible implementation, S5 specifically includes:

[0061] The running container is removed from the recycling queue and shut down using the recycling module.

[0062] It should be noted that the container recycling module is only activated after the recycling process is triggered. It performs priority calculation on all containers, generates a recycling queue, and terminates the lowest priority containers one by one until the system pressure is relieved.

[0063] In one possible implementation, the following is included after S5:

[0064] S6: Record relevant information about recycling.

[0065] The relevant information includes data and details related to the container recycling process.

[0066] It's important to note that after the container recycling operation is complete, the system records crucial information from the process. This information may include the container's resource usage before and after recycling, the container's unique identifier (ID), its priority score at the time of recycling, and the container's shutdown time. This data helps track and optimize the recycling process and can also provide a reference for future container management strategies.

[0067] In one possible implementation, the relevant information specifically includes:

[0068] Changes in resource usage of the running container before and after recycling.

[0069] The ID, priority score, and shutdown time of the reclaimed running container.

[0070] The duration of the overall recycling operation and the total amount of resources released.

[0071] It should be noted that this data helps operations and maintenance personnel evaluate the effectiveness of recycling strategies, adjust threshold parameters, or optimize scheduling rules.

[0072] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:

[0073] In this embodiment of the invention, multiple performance data points of each running container in a compute-intensive cloud platform are collected. Then, it is determined whether each performance data point exceeds a threshold. If so, the container reclamation process is initiated; otherwise, the process returns to collect performance data again. Based on the performance data and a weighted mechanism, the reclamation priority of each running container is calculated, thereby ensuring targeted and efficient resource reclamation. Finally, based on the calculated reclamation priority, a reclamation queue is generated, and each running container is reclaimed. This intelligently balances system load, avoids resource waste, improves computational efficiency and system stability, reduces labor costs, enhances user experience, and resolves the contradiction between resource contention and user experience assurance.

[0074] The container recycling method based on dynamic priority provided in this application can be executed by a container recycling device based on dynamic priority. This application uses an example of a container recycling device based on dynamic priority executing the container recycling method based on dynamic priority to illustrate the container recycling device based on dynamic priority provided in this application.

[0075] Reference manual attached Figure 2 The diagram shows a schematic of a container recycling device based on dynamic priority provided by an embodiment of the present invention.

[0076] This invention provides a container recycling device 20 based on dynamic priority, comprising:

[0077] The acquisition module 201 is used to collect multiple performance data of each running container in the compute-intensive cloud platform.

[0078] The judgment module 202 is used to determine whether each performance data is greater than the threshold. If so, the container recycling process is started and the calculation module is entered; otherwise, the process is returned to the acquisition module.

[0079] The calculation module 203 is used to calculate the recycling priority of each running container based on performance data and a weighting mechanism.

[0080] The generation module 204 is used to generate a recycling queue based on the calculated recycling priority.

[0081] The recycling module 205 is used to recycle each running container according to the recycling queue.

[0082] In one possible implementation, the performance data specifically includes: CPU utilization, memory utilization, memory growth rate, maximum memory growth rate, storage space utilization, and container idle time.

[0083] In one possible implementation, the formula for calculating the recycling priority is as follows:

[0084] ;

[0085] in, Priority Indicates the recycling priority. α , β , λ as well as δ All represent weighting coefficients. This represents the 90th percentile of container CPU utilization. Mem The % represents the percentage of memory used by the container. MemGrowth This represents the memory growth rate, i.e., the rate at which the container's memory usage changes. MaxMemGrowth This represents the maximum memory growth rate shared by all containers. Storage The % indicates the percentage of storage space used in the container. T Indicates the container's idle time. τ This parameter controls the increase in idle time. ε This represents a small constant used to prevent the denominator from being zero.

[0086] In one possible implementation, the formula for calculating the memory growth rate is as follows:

[0087] ;

[0088] in, Indicates the measurement interval. Mem n Indicates the first n The container's memory usage during this measurement. Mem n-1 Indicates the first n -1. Container memory usage during measurement.

[0089] In one possible implementation, the recycling module specifically comprises:

[0090] The running container is removed from the recycling queue and shut down using the recycling module.

[0091] In one possible implementation, the module further includes:

[0092] The recording module is used to record relevant information about recycling.

[0093] In one possible implementation, the relevant information specifically includes:

[0094] Changes in resource usage of the running container before and after recycling.

[0095] The ID, priority score, and shutdown time of the reclaimed running container.

[0096] The duration of the overall recycling operation and the total amount of resources released.

[0097] The container recycling device 20 based on dynamic priority provided by the present invention can implement the steps of the container recycling method based on dynamic priority described above, and can achieve the same technical effect. To avoid repetition, the present invention will not elaborate further.

[0098] Reference manual attached Figure 3 The diagram shows a schematic of a container recycling system based on dynamic priority provided by an embodiment of the present invention.

[0099] This invention provides a container recycling system 30 based on dynamic priority, comprising: a processor 301 and a memory 302;

[0100] The memory 302 stores programs or instructions that can run on the processor 301. When the program or instructions are executed by the processor 301, they implement the steps of the above-described container recycling method based on dynamic priority and achieve the same technical effect. To avoid repetition, the present invention will not elaborate further.

[0101] It should be understood that the processor 301 in this embodiment of the invention may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0102] It should also be understood that the memory 302 in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0103] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the flow or function according to the embodiments of the present invention is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. A computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media. Semiconductor media can be solid-state drives.

[0104] It should be understood that, in various embodiments of the present invention, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0105] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0106] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0107] In the embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0108] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0109] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0110] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0111] This invention provides a readable storage medium that stores a program or instructions on the medium. When the program or instructions are executed by a processor, they implement the steps of the above-described container recycling method based on dynamic priority and achieve the same technical effect. To avoid repetition, this invention will not elaborate further.

[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the protection scope of the present invention.

Claims

1. A container recycling method based on dynamic priority, characterized in that, include: S1: Collect multiple performance data points from various running containers in a compute-intensive cloud platform; Specifically, the performance data includes: CPU utilization, memory utilization, memory growth rate, maximum memory growth rate, storage space utilization, and container idle time. S2: Determine whether each of the performance data is greater than the threshold. If yes, start the container recycling process and proceed to step S3; otherwise, return to step S1. S3: Based on the performance data and using a weighted mechanism, calculate the recycling priority of each running container; The specific formula for calculating the recycling priority is as follows: ; Where Priority represents the recycling priority, α, β, λ and δ are all weighting coefficients, P90[CPU%] represents the 90th percentile of the container's CPU utilization, Mem% represents the container's memory usage percentage, MemGrowth represents the memory growth rate, i.e. the rate at which the container's memory usage changes, MaxMemGrowth represents the maximum memory growth rate shared by all containers, Storage% represents the container's storage space usage percentage, T represents the container's idle time, τ represents the parameter that controls the growth of idle time, and ε represents a small constant to prevent the denominator from being zero; S4: Generate a recycling queue based on the recycling priority; S5: Recycle each of the running containers according to the recycling queue.

2. The container recycling method based on dynamic priority according to claim 1, characterized in that, The specific formula for calculating the memory growth rate is as follows: ; Where △t represents the measurement interval, Mem n Mem represents the memory usage of the container during the nth measurement. n-1 This represents the amount of memory used by the container during the (n-1)th measurement.

3. The container recycling method based on dynamic priority according to claim 1, characterized in that, Specifically, S5 is: The running container is removed from the recycling queue and shut down via the recycling module.

4. The container recycling method based on dynamic priority according to claim 1, characterized in that, Following S5, the following is also included: S6: Record relevant information about recycling.

5. The container recycling method based on dynamic priority according to claim 4, characterized in that, The relevant information specifically includes: Changes in resource usage of the running container before and after recycling; The ID, priority score, and shutdown time of the reclaimed running container; The duration of the overall recovery of the running container and the total amount of resources released.

6. A container recycling device based on dynamic priority, characterized in that, include: The data acquisition module is used to collect multiple performance data from various running containers in a compute-intensive cloud platform. Specifically, the performance data includes: CPU utilization, memory utilization, memory growth rate, maximum memory growth rate, storage space utilization, and container idle time. The judgment module is used to determine whether each performance data exceeds the threshold. If so, the container recycling process is started and the calculation module is entered; otherwise, the process returns to the collection module. The calculation module is used to calculate the recycling priority of each running container based on performance data and a weighting mechanism. The specific formula for calculating the recycling priority is as follows: ; Where Priority represents the recycling priority, α, β, λ and δ are all weighting coefficients, P90[CPU%] represents the 90th percentile of the container's CPU utilization, Mem% represents the container's memory usage percentage, MemGrowth represents the memory growth rate, i.e. the rate at which the container's memory usage changes, MaxMemGrowth represents the maximum memory growth rate shared by all containers, Storage% represents the container's storage space usage percentage, T represents the container's idle time, τ represents the parameter that controls the growth of idle time, and ε represents a small constant to prevent the denominator from being zero; The generation module is used to generate a recycling queue based on the calculated recycling priority; The recycling module is used to recycle each running container according to the recycling queue.

7. A container recycling system based on dynamic priority, characterized in that, include: Processor and memory; The memory stores programs or instructions that can run on the processor, which, when executed by the processor, implement the steps of the container recycling method based on dynamic priority as described in any one of claims 1 to 5.

8. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the container recycling method based on dynamic priority as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Memory recovery method and device, computing equipment and computer storage medium

    CN117555816A