Container resource adjustment method and device of virtualization system, equipment and storage medium

By regularly monitoring the load data and resource usage of the virtualized system, re-prioritize the container and adjusting the operating parameters, the problem of unbalanced resource occupation in the existing technology is solved, and more reasonable and efficient resource allocation is achieved.

CN119883645APending Publication Date: 2025-04-25SHENZHEN VIRTUAL CLUSTERS INFORMATION TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510064939.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing priority-based resource scheduling method is difficult to effectively manage the resource use of containers in the virtualized system when the system load changes, resulting in unbalanced resource occupancy.

Method used

By regularly obtaining system load data of the virtualized system, computing the resources available to the system and container allocation resources, and determining the system resource saturation rate. When the resource saturation rate reaches the preset threshold, the container's priority is re-determined, and the operating parameters of the container are adjusted according to the priority and resource allocation strategy until the resource saturation rate decreases.

Benefits of technology

It realizes that when the virtualized system reaches resource bottleneck, the rationality and efficiency of resource allocation are improved, the problem of excessive concentration or insufficient resources is avoided, and the stability of system resource use is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883645A_ABST
    Figure CN119883645A_ABST
Patent Text Reader

Abstract

The invention provides a container resource adjusting method and device of a virtualization system, equipment and a storage medium, the method is applied to terminal equipment installed with the virtualization system, multiple containers run in the virtualization system, and the method comprises the steps of obtaining system load data of the virtualization system according to a preset detection period, determining system available resources and container allocation resources according to the system load data; determining a system resource saturation rate according to the system available resources and the container allocation resources; when the resource saturation rate is greater than or equal to a preset saturation threshold value, acquiring the priority of the container; re-determining a container resource allocation strategy according to the container allocation resources and the priorities; and adjusting the operation parameters of the container according to the resource allocation strategy until the resource saturation rate is smaller than a preset saturation threshold value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of virtualized containers, and in particular to a container resource adjustment method, device, equipment and storage medium for a virtualized system. Background Art

[0002] With the development of computer technology, virtualization technology has become an important computing model. On the Android system, virtualization technology allows the creation of multiple virtual machines on a physical computer, each of which can run its own operating system and applications. This technology can improve the utilization of computer resources, reduce costs, and improve system reliability and flexibility. However, virtualization technology also brings some new adjustments, one of which is how to effectively manage the resource usage of containers in the virtualization system, especially when the container runs gaming applications with high resource requirements.

[0003] In existing technologies, priority-based resource scheduling is usually used. This method allocates resources based on the priority of each container, and containers with higher priorities will get more resources. This method cannot cope well with changes in system load. When the system load changes, this method may cause some containers to occupy too many resources, while other containers have insufficient resources. Summary of the invention

[0004] The present application provides a container resource adjustment method, device, equipment and storage medium for a virtualization system, which are used to improve the rationality of resource allocation when the virtualization system reaches a resource bottleneck.

[0005] In a first aspect, an embodiment of the present application provides a container resource adjustment method for a virtualization system, wherein multiple containers are running in the virtualization system, and the method includes: Acquire system load data of the virtualization system according to a preset detection cycle, and determine system available resources and container allocation resources according to the system load data; Determining a system resource saturation rate according to the system available resources and the container allocated resources; When the resource saturation rate is greater than or equal to a preset saturation threshold, obtaining the priority of the container; re-determining a container resource allocation strategy according to the container allocation resources and the priority; The operating parameters of the container are adjusted according to the resource allocation strategy until the resource saturation rate is less than a preset saturation threshold.

[0006] In some embodiments, the acquiring system load data of the virtualization system according to a preset detection period, and determining the system available resources and container allocation resources according to the system load data, includes: Sampling data of the virtualization system according to a preset detection cycle to obtain original load data including CPU usage, memory usage, disk usage and network traffic; Perform sliding window average calculation on the original load data to obtain system load trend data; Calculating the available amount of system resources according to the system load trend data to obtain the remaining available amount value of each resource, and normalizing the remaining available amount value to obtain the system available resources; The resource occupancy information of each container is counted in real time to obtain a container resource occupancy data set, and the occupancy rate of the total system resources is calculated based on the container resource occupancy data set to obtain the container allocation resources.

[0007] In some embodiments, determining the system resource saturation rate according to the system available resources and the container allocated resources includes: Classifying the available resources of the system into resource types to obtain available resource vectors of CPU resources, memory resources, disk resources and network resources; Performing weight allocation processing on the available resource vector to obtain a weighted system available resource matrix; Performing resource consumption statistics processing on the container allocation resources to obtain the overall occupancy of each type of resources, and performing utilization calculation processing on each type of resources according to the overall occupancy to obtain a resource utilization data set; Performing saturation calculation processing according to the weighted system available resource matrix and the resource utilization rate data set to obtain saturation values ​​of various resources, and performing weighted average processing on the saturation values ​​to obtain system comprehensive saturation; A time series analysis process is performed on the comprehensive saturation of the system to obtain a saturation change trend diagram, and a threshold prediction process is performed based on the saturation change trend diagram to obtain the system resource saturation rate.

[0008] In some embodiments, the re-determining the container resource allocation strategy according to the container resource allocation and the priority includes: Performing numerical normalization processing on the container allocation resources to obtain container resource component values, and performing level quantization processing on the priorities to obtain priority weight coefficients; Performing a product operation on the container resource component value and the priority weight coefficient to obtain a container resource priority score; Sorting the container resource priority scores in descending order to obtain a container resource adjustment priority sequence, and performing hierarchical threshold setting processing according to the container resource adjustment priority sequence to obtain a multi-level resource adjustment threshold; Perform resource excess calculation processing on the first 30% of the containers in the container resource adjustment priority sequence to obtain a first-level resource reduction target value, and perform resource margin calculation processing on the middle 40% of the containers in the container resource adjustment priority sequence to obtain a second-level resource adjustment target value; According to the first-level resource reduction target value, the resource amount of the high-priority container is gradually reduced to obtain the adjusted resource quota of the high-priority container; according to the second-level resource adjustment target value, the resource amount of the medium-priority container is fine-tuned to obtain the adjusted resource quota of the medium-priority container; Performing minimum resource requirement analysis processing on the last 30% of the containers in the container resource adjustment priority sequence to obtain basic resource guarantee values ​​for low-priority containers, and performing resource guarantee processing on the low-priority containers according to the basic resource guarantee values ​​to obtain adjusted resource quotas for the low-priority containers; A resource allocation scheme synthesis process is performed according to the adjusted resource quota of the high priority container, the adjusted resource quota of the medium priority container, and the adjusted resource quota of the low priority container to obtain the container resource allocation strategy.

[0009] In some embodiments, adjusting the operating parameters of the container according to the resource allocation strategy until the resource saturation rate is less than a preset saturation threshold includes: Quantitatively analyzing and processing the container operation parameters according to the adjusted resource quota of the high-priority container to obtain parameter adjustment coefficients, wherein the parameter adjustment coefficients include: a refresh rate adjustment coefficient, a phase adjustment coefficient, a window size adjustment coefficient, and a color depth adjustment coefficient; Performing parameter lower limit calculation processing on the high priority container according to the parameter adjustment coefficient to obtain an operation parameter adjustment range of the high priority container; Dynamically monitoring container resource occupancy according to the adjusted resource quota of the medium-priority container to obtain a container resource occupancy fluctuation value, and performing trend prediction on the container resource occupancy fluctuation value to obtain a parameter adjustment direction of the medium-priority container; The container operation state is evaluated according to the adjusted resource quota of the low-priority container to obtain a container performance indicator data set, and the container performance indicator data set is parameter mapped to obtain a target operation parameter of the low-priority container; Performing parameter reduction processing on the operating parameter adjustment range of the high-priority container to obtain frequency reduction configuration data of the high-priority container; Performing parameter fine-tuning processing according to the parameter adjustment direction of the medium-priority container to obtain the balance configuration data of the medium-priority container, and performing parameter increment processing according to the target operating parameters of the low-priority container to obtain the frequency increase configuration data of the low-priority container; Performing operation parameter setting processing on the frequency reduction configuration data of the high priority container to obtain a first adjustment result of the refresh rate, phase value, window size and color depth of the high priority container; respectively adjusting the operating parameters of the corresponding containers according to the balancing configuration data of the medium-priority container and the frequency-increasing configuration data of the low-priority container to obtain a second adjustment result; An updated resource saturation rate is determined based on the first adjustment result and the second adjustment result until the updated resource saturation rate is less than a preset saturation threshold.

[0010] In a second aspect, an embodiment of the present application provides a container resource adjustment device for a virtualization system, the device comprising: A load measurement module, used to obtain system load data of the virtualization system according to a preset detection period, and determine the system available resources and container allocation resources according to the system load data; A saturation calculation module, used to determine a system resource saturation rate according to the system available resources and the container allocation resources; A level determination module, configured to obtain the priority of the container when the resource saturation rate is greater than or equal to a preset saturation threshold; A resource allocation module, used to redetermine a container resource allocation strategy according to the container allocation resources and the priority; The parameter adjustment module is used to adjust the operating parameters of the container according to the resource allocation strategy until the resource saturation rate is less than a preset saturation threshold.

[0011] In a third aspect, an embodiment of the present application provides a terminal device, wherein the terminal device includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the container resource adjustment method of the virtualization system as described in any one of the embodiments of the present application when executing the computer program.

[0012] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor enables the processor to implement a container resource adjustment method for a virtualization system as described in any one of the embodiments of the present application.

[0013] An embodiment of the present application provides a container resource adjustment method for a virtualization system, wherein multiple containers are running in the virtualization system, and the method comprises: obtaining system load data of the virtualization system according to a preset detection period, and determining system available resources and container allocation resources according to the system load data; determining a system resource saturation rate according to the system available resources and the container allocation resources; obtaining a priority of the container when the resource saturation rate is greater than or equal to a preset saturation threshold; re-determining a container resource allocation strategy according to the container allocation resources and the priority; and adjusting operating parameters of the container according to the resource allocation strategy until the resource saturation rate is less than the preset saturation threshold. In the above method, the system load data of the virtualization system is obtained through a preset detection cycle and the system available resources and container allocation resources are determined. The resource usage status of the virtualization system can be grasped in real time, the system resource saturation rate is calculated based on the system available resources and container allocation resources, and resource pressure is discovered in time. A clear resource adjustment trigger mechanism is established by comparison with a preset saturation threshold. When the resource saturation rate exceeds the preset threshold, precise adjustments are made according to the container allocation resources and the priority of the container according to the business importance. By comprehensively considering the current resource occupancy and business priority, a reasonable resource adjustment plan is formulated to ensure the continuity and effectiveness of resource adjustment, while avoiding excessive fluctuations in resource adjustment and maintaining the stability of system resource usage. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0015] Figure 1 A schematic flow chart of a container resource adjustment method for a virtualization system provided in an embodiment of the present application; Figure 2 A schematic block diagram of a container resource adjustment device for a virtualization system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0016] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are 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 are within the scope of protection of the present invention.

[0017] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0018] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0019] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0020] See also Figure 1 , Figure 1 FIG. 1 is a schematic flow chart of a container resource adjustment method for a virtualization system provided in an embodiment of the present application. Figure 1 As shown, the specific steps of the container resource adjustment method of the virtualization system include: S101-S105.

[0021] S101. Obtain system load data of a virtualization system according to a preset detection cycle, and determine system available resources and container allocation resources according to the system load data.

[0022] Exemplarily, multi-dimensional data collection is performed on the virtualization system through a preset detection cycle, for example, the preset detection cycle is 5s, and system load data is obtained, including system performance indicators such as processor occupancy, memory page swap rate, disk I / O queue length, and network packet forwarding delay. The collected raw data is smoothed using an exponentially weighted moving average algorithm to eliminate interference caused by short-term fluctuations. Then, a resource utilization curve is constructed based on the smoothed data, and the overall load level of the system is obtained by curve integral calculation. The difference between the current total resource amount and the load level of the virtualization system is standardized to obtain the system available resources. At the same time, the resource request amount and actual occupancy of each container are counted through the resource usage counter, and a matrix of container resource allocation is established as the basic data for subsequent adjustments.

[0023] S102: Determine the system resource saturation rate according to the system available resources and the container allocation resources.

[0024] Exemplarily, a multi-dimensional resource evaluation method is used to convert the system available resource data into a standardized resource vector form, including computing resource dimensions (CPU core number, main frequency, etc.), memory resource dimensions (physical memory capacity, cache size, etc.), storage resource dimensions (disk capacity, IO bandwidth, etc.) and network resource dimensions (network interface bandwidth, number of connections, etc.). According to the actual application scenario of the virtualization system, the weight coefficient of each resource dimension is determined using the hierarchical analysis method, and the calculation method takes into account factors such as resource scarcity and business importance. For each dimension, the ratio of the actual amount of resources used by the container to the amount of allocated resources is calculated to obtain a resource utilization index. The resource utilization of each dimension is multiplied by the corresponding weight coefficient and summed to obtain the overall resource saturation score of the system. Combined with historical data, the exponential smoothing method is used to predict the short-term trend of resource saturation and output the system resource saturation rate.

[0025] S103: When the resource saturation rate is greater than or equal to a preset saturation threshold, obtain the priority of the container.

[0026] Exemplarily, the containers are prioritized and divided into three priority levels: high, medium, and low. A detailed sorting is performed within each level to obtain a complete priority sequence.

[0027] S104: Re-determine the container resource allocation strategy according to the container allocation resources and priorities.

[0028] Exemplarily, a comprehensive analysis is conducted on the current resource allocation status of the container, and the difference between the actual resource usage and the allocated resource amount of each container is calculated. At the same time, the priority level of the container needs to be considered based on the priority sequence. For high-priority containers, in addition to paying attention to their performance, it is also necessary to ensure that the system resources allocated to them do not exceed the corresponding proportion of the total amount. For medium-priority containers, moderate adjustments are made while ensuring basic service quality; for low-priority containers, larger resource adjustments can be made. Based on these analysis results, an optimization model for resource adjustment is constructed with the goal of minimizing system resource waste, while considering resource dependencies and business relevance between containers. A heuristic algorithm is used to calculate the optimal resource adjustment plan, including specific parameters such as the amount of resources that need to be reduced, the execution order of resource adjustment, and the adjustment step size. Finally, a detailed resource allocation adjustment plan is generated, including the target resource quota and adjustment timing for each container.

[0029] S105: Adjust the operating parameters of the container according to the resource allocation strategy until the resource saturation rate is less than a preset saturation threshold.

[0030] Exemplarily, the container operation parameters adjusted according to the resource allocation strategy include reducing the refresh rate (vsync) of the container, the phase adjustment rate (phase), the CPU quota limit (through the cpu.shares and cpu.cfs_quota_us parameters of the cgroup), the upper limit of memory usage (through the memory.limit_in_bytes parameter of the cgroup), the disk IO limit (through the blkio.weight parameter of the cgroup), and the network bandwidth control (through the tc tool setting) and other key parameters. A progressive adjustment strategy is adopted to divide the resource adjustment amount into multiple small steps and execute them step by step. After each adjustment, a sampling cycle is waited to monitor the response of the system. The adjusted system resource usage is monitored in real time, including the performance indicators of the container and the changes in the resource saturation rate of the system as a whole. If it is detected that a certain adjustment causes system instability or service quality degradation, the adjustment is rolled back and an alternative solution is tried. The closed-loop process of adjustment-monitoring-evaluation is repeated until the system resource saturation rate drops below the preset threshold or the preset maximum number of adjustments is reached.

[0031] In order to more clearly introduce the technical solution of the present application, the technical solution of the present application will be introduced through specific embodiments below. It should be noted that the specific embodiments are used to expand the technical solution of the present application, but are not intended to limit the present application.

[0032] In some embodiments, obtaining system load data of a virtualization system according to a preset detection period, and determining system available resources and container allocation resources according to the system load data include: The virtualization system is sampled according to a preset detection cycle to obtain raw load data including CPU usage, memory usage, disk usage, and network traffic.

[0033] The original load data is processed by sliding window average calculation to obtain system load trend data.

[0034] The available amount of system resources is calculated based on the system load trend data to obtain the remaining available amount value of each resource, and the remaining available amount value is normalized to obtain the system available resources.

[0035] The resource occupancy information of each container is counted in real time to obtain a container resource occupancy data set. The occupancy rate of the total system resources is calculated based on the container resource occupancy data set to obtain the container allocation resources.

[0036] Through the above technical solution, the original load data is obtained by regularly sampling the basic performance indicators of the system, and the sliding window average value is used to eliminate data fluctuations. Combined with the normalization processing of the remaining system resources and the statistical analysis of container resource occupancy, accurate quantification and dynamic monitoring of the virtualization system resource usage status are achieved. It can fully reflect the system resource utilization and avoid the data deviation caused by sampling at a single time point. At the same time, through normalization processing, different types of resource indicators are made comparable, which is conducive to unified resource management and scheduling of the system.

[0037] In some embodiments, determining a system resource saturation rate according to system available resources and container allocated resources includes: The available resources of the system are classified by resource type to obtain available resource vectors of CPU resources, memory resources, disk resources and network resources.

[0038] The available resource vectors are weighted and the weighted system available resource matrix is ​​obtained.

[0039] The resource consumption statistics of the container allocation resources are processed to obtain the overall occupancy of each type of resources. The utilization rate of each type of resources is calculated based on the overall occupancy to obtain a resource utilization data set.

[0040] Saturation calculation is performed based on the weighted system available resource matrix and resource utilization data set to obtain the saturation values ​​of various resources. The saturation values ​​are weighted averaged to obtain the system comprehensive saturation.

[0041] The system comprehensive saturation is subjected to time series analysis to obtain a saturation change trend diagram, and a threshold prediction process is performed based on the saturation change trend diagram to obtain the system resource saturation rate.

[0042] In one embodiment, the weighted system available resource matrix is ​​assumed to be W, where the weights of each resource type are w1, w2, w3, and w4, respectively, satisfying: W = [w1w2w3w4], and w1+w2+w3+w4=1. The resource utilization data set is denoted as U, which contains the utilization of each type of resource: U = [u1u2u3u4], where ui = current resource occupancy i / total resource capacity i. The numerical calculation formula for the saturation of each type of resource is: Si = ui / (1-ui), i∈{1, 2, 3, 4} to obtain the saturation vector S = [S1 S2 S3 S4]. The calculation formula for the system resource saturation rate is: S total=Σ(wi×Si) / Σwi, i∈{1, 2, 3, 4}. The following data are monitored: CPU resource weight w1=0.4, memory resource weight w2=0.3, disk resource weight w3=0.2, network resource weight w4=0.1. When the utilization of each resource is: u1=0.75, (CPU utilization 75%) u2=0.60, (memory utilization 60%), u3=0.40 (disk utilization 40%), u4=0.30 (network utilization 30%), then: S1=0.75 / (1-0.75)=3S2=0.60 / (1-0.60)=1.5S3=0.40 / (1-0.40)=0.67S4=0.30 / (1-0.30)=0.43. The system resource saturation rate is: S total =(0.4×3+0.3×1.5+0.2×0.67+0.1×0.43) / (0.4+0.3+0.2+0.1)=1.89.

[0043] In the above technical solution, the system CPU, memory, disk, network and other multi-dimensional resources are classified and counted, and weighted, and a comprehensive evaluation is performed in combination with the actual resource consumption of the container. This calculation method based on the weighted matrix not only takes into account the differences in the importance of various resources, but also dynamically reflects the real-time status of resource utilization, which helps the system to perform more accurate resource scheduling and load balancing, and improve the overall system operation efficiency and resource utilization.

[0044] In some embodiments, re-determining the container resource allocation strategy according to the container allocation resources and priorities includes: The container allocation resources are numerically normalized to obtain the container resource component value, and the priority is quantified to obtain the priority weight coefficient.

[0045] The container resource priority score is obtained by multiplying the container resource component value and the priority weight coefficient. Specifically, the resource allocation is no longer determined solely based on the priority, but the actual resource demand and usage efficiency are taken into consideration.

[0046] The container resource priority scores are sorted in descending order to obtain a container resource adjustment priority sequence, and hierarchical threshold setting is performed according to the container resource adjustment priority sequence to obtain a multi-level resource adjustment threshold.

[0047] The resource excess calculation process is performed on the top 30% of containers in the container resource adjustment priority sequence to obtain the first-level resource reduction target value, and the resource margin calculation process is performed on the middle 40% of containers in the container resource adjustment priority sequence to obtain the second-level resource adjustment target value. Specifically, the containers are divided into three layers according to the priority score: the top 30%, the middle 40%, and the bottom 30%. Different resource adjustment strategies are adopted for different layers to avoid simply over-concentrating resources on high-priority containers. According to the first-level resource reduction target value, the resource amount of high-priority containers is reduced to obtain the adjusted resource quota of high-priority containers. According to the second-level resource adjustment target value, the resource amount of medium-priority containers is fine-tuned to obtain the adjusted resource quota of medium-priority containers. Specifically, the resource amount of high-priority containers is reduced to avoid excessive concentration of resources, the medium-priority containers are fine-tuned to maintain relative stability, and the basic resource guarantee value is set for low-priority containers to ensure basic operation requirements.

[0048] Perform minimum resource requirement analysis on the last 30% of containers in the priority sequence of container resource adjustment to obtain the basic resource guarantee value of low-priority containers, and perform resource guarantee processing on low-priority containers based on the basic resource guarantee value to obtain the adjusted resource quota of low-priority containers. Specifically, perform minimum resource requirement analysis on low-priority containers and set the basic resource guarantee value to ensure that even low-priority containers can obtain the necessary operating resources.

[0049] The resource allocation scheme is synthesized according to the adjusted resource quota of the high priority container, the adjusted resource quota of the medium priority container and the adjusted resource quota of the low priority container to obtain a container resource allocation strategy.

[0050] Through the above technical solution, high-priority containers are prevented from excessively occupying resources, the overall operating efficiency of the system is guaranteed, resource utilization is improved, and more fair and reasonable resource allocation is achieved.

[0051] In some embodiments, adjusting the operating parameters of the container according to the resource allocation strategy until the resource saturation rate is less than a preset saturation threshold includes: According to the adjusted resource quota of the high-priority container, the container operation parameters are quantitatively analyzed and processed to obtain parameter adjustment coefficients, which include: refresh rate adjustment coefficient, phase adjustment coefficient, window size adjustment coefficient and color depth adjustment coefficient;.

[0052] The lower limit of the parameters of the high priority container is calculated according to the parameter adjustment coefficient to obtain the adjustment range of the operating parameters of the high priority container;.

[0053] Dynamically monitor the resource occupancy of the container according to the adjusted resource quota of the medium-priority container to obtain the fluctuation value of the resource occupancy of the container, perform trend prediction on the fluctuation value of the resource occupancy of the container, and obtain the parameter adjustment direction of the medium-priority container;.

[0054] The container operation status is evaluated and processed according to the adjusted resource quota of the low-priority container to obtain a container performance indicator data set, and parameter mapping is performed on the container performance indicator data set to obtain target operation parameters of the low-priority container;.

[0055] Perform parameter reduction processing on the operating parameter adjustment range of the high-priority container to obtain the frequency reduction configuration data of the high-priority container;.

[0056] Perform parameter fine-tuning processing according to the parameter adjustment direction of the medium priority container to obtain the balance configuration data of the medium priority container, and perform parameter increment processing according to the target operating parameters of the low priority container to obtain the frequency increase configuration data of the low priority container;

[0057] Performing operation parameter setting processing on the frequency reduction configuration data of the high priority container to obtain a first adjustment result of the refresh rate, phase value, window size and color depth of the high priority container;.

[0058] The balancing configuration data of the medium-priority container and the frequency-increasing configuration data of the low-priority container are respectively used to adjust the operation parameters of the corresponding containers to obtain a second adjustment result;

[0059] An updated resource saturation rate is determined based on the first adjustment result and the second adjustment result until the updated resource saturation rate is less than a preset saturation threshold.

[0060] Through the above method, a multi-level dynamic resource adjustment mechanism is used to achieve refined management of container operation parameters. Specifically, it adopts differentiated parameter adjustment strategies according to the priority (high, medium, and low) - parameter lower limit protection and decreasing adjustment are adopted for high-priority containers, balance fine-tuning is performed for medium-priority containers, and parameters are allowed to increase for low-priority containers. Through the coordinated adjustment of multi-dimensional parameters such as refresh rate, phase, window size, and color depth, it is possible to reasonably utilize the remaining resources while ensuring the stability of high-priority services, so that the overall resource utilization rate is maintained below a reasonable threshold, which not only improves the efficiency of resource utilization, but also ensures the reliable operation of the virtualization system.

[0061] See also Figure 2 , Figure 21 is a schematic block diagram of a container resource adjustment device for a virtualization system provided in an embodiment of the present application, wherein the container resource adjustment device 200 for the virtualization system is used to execute the container resource adjustment method for the virtualization system described above. The container resource adjustment device 200 for the virtualization system can be configured in a server.

[0062] Among them, the server can be an independent server or a server cluster, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN) and big data and artificial intelligence platforms.

[0063] like Figure 2 As shown, the container resource adjustment device 200 of the virtualization system includes: a load measurement module 201, a saturation calculation module 202, a level determination module 203, a resource allocation module 204 and a parameter adjustment module 205.

[0064] The load measurement module 201 is used to obtain system load data of the virtualization system according to a preset detection period, and determine the system available resources and container allocation resources according to the system load data.

[0065] The saturation calculation module 202 is used to determine the system resource saturation rate according to the system available resources and the container allocated resources.

[0066] The level determination module 203 is used to obtain the priority of the container when the resource saturation rate is greater than or equal to a preset saturation threshold.

[0067] The resource allocation module 204 is configured to redetermine a container resource allocation strategy according to the container allocation resources and the priority.

[0068] The parameter adjustment module 205 is used to adjust the operating parameters of the container according to the resource allocation strategy until the resource saturation rate is less than a preset saturation threshold.

[0069] An embodiment of the present application provides a terminal device, which includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement a container resource adjustment method for a virtualization system such as any one of the embodiments of the present application when executing the computer program.

[0070] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements a container resource adjustment method for a virtualization system as described in any one of the embodiments of the present application.

[0071] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A container resource adjustment method for a virtualization system, characterized in that: There are multiple containers running in the virtualization system, and the method includes: Acquire system load data of the virtualization system according to a preset detection cycle, and determine system available resources and container allocation resources according to the system load data; Determining a system resource saturation rate according to the system available resources and the container allocated resources; When the resource saturation rate is greater than or equal to a preset saturation threshold, obtaining the priority of the container; re-determining a container resource allocation strategy according to the container allocation resources and the priority; The operating parameters of the container are adjusted according to the resource allocation strategy until the resource saturation rate is less than a preset saturation threshold.

2. The container resource adjustment method of the virtualization system according to claim 1, characterized in that: The obtaining system load data of the virtualization system according to a preset detection period, and determining system available resources and container allocation resources according to the system load data, includes: Sampling data of the virtualization system according to a preset detection cycle to obtain original load data including CPU usage, memory usage, disk usage and network traffic; Perform sliding window average calculation on the original load data to obtain system load trend data; Calculating the available amount of system resources according to the system load trend data to obtain the remaining available amount value of each resource, and normalizing the remaining available amount value to obtain the system available resources; The resource occupancy information of each container is counted in real time to obtain a container resource occupancy data set, and the occupancy rate of the total system resources is calculated based on the container resource occupancy data set to obtain the container allocation resources.

3. The container resource adjustment method of the virtualization system according to claim 1, characterized in that: The determining the system resource saturation rate according to the system available resources and the container allocated resources includes: Classifying the available resources of the system into resource types to obtain available resource vectors of CPU resources, memory resources, disk resources and network resources; Performing weight allocation processing on the available resource vector to obtain a weighted system available resource matrix; Performing resource consumption statistics processing on the container allocation resources to obtain the overall occupancy of each type of resources, and performing utilization calculation processing on each type of resources according to the overall occupancy to obtain a resource utilization data set; Performing saturation calculation processing according to the weighted system available resource matrix and the resource utilization rate data set to obtain saturation values ​​of various resources, and performing weighted average processing on the saturation values ​​to obtain system comprehensive saturation; A time series analysis process is performed on the comprehensive saturation of the system to obtain a saturation change trend diagram, and a threshold prediction process is performed based on the saturation change trend diagram to obtain the system resource saturation rate.

4. The container resource adjustment method of the virtualization system according to claim 1, characterized in that: The re-determining the container resource allocation strategy according to the container resource allocation and the priority includes: Performing numerical normalization processing on the container allocation resources to obtain container resource component values, and performing level quantization processing on the priorities to obtain priority weight coefficients; Performing a product operation on the container resource component value and the priority weight coefficient to obtain a container resource priority score; Sorting the container resource priority scores in descending order to obtain a container resource adjustment priority sequence, and performing hierarchical threshold setting processing according to the container resource adjustment priority sequence to obtain a multi-level resource adjustment threshold; Perform resource excess calculation processing on the first 30% of containers in the container resource adjustment priority sequence to obtain a first-level resource reduction target value, and perform resource margin calculation processing on the middle 40% of containers in the container resource adjustment priority sequence to obtain a second-level resource adjustment target value; According to the first-level resource reduction target value, the resource amount of the high-priority container is gradually reduced to obtain the adjusted resource quota of the high-priority container; according to the second-level resource adjustment target value, the resource amount of the medium-priority container is fine-tuned to obtain the adjusted resource quota of the medium-priority container; Performing minimum resource demand analysis on the last 30% of the containers in the priority sequence for adjusting container resources to obtain basic resource guarantee values ​​for low-priority containers, and performing resource guarantee processing on the low-priority containers according to the basic resource guarantee values ​​to obtain adjusted resource quotas for the low-priority containers; A resource allocation scheme synthesis process is performed according to the adjusted resource quota of the high priority container, the adjusted resource quota of the medium priority container, and the adjusted resource quota of the low priority container to obtain the container resource allocation strategy.

5. The container resource adjustment method of the virtualization system according to claim 4, characterized in that: The step of adjusting the operating parameters of the container according to the resource allocation strategy until the resource saturation rate is less than a preset saturation threshold includes: Quantitatively analyzing and processing the container operation parameters according to the adjusted resource quota of the high-priority container to obtain parameter adjustment coefficients, wherein the parameter adjustment coefficients include: a refresh rate adjustment coefficient, a phase adjustment coefficient, a window size adjustment coefficient, and a color depth adjustment coefficient; Performing parameter lower limit calculation processing on the high priority container according to the parameter adjustment coefficient to obtain an operation parameter adjustment range of the high priority container; Dynamically monitoring container resource occupancy according to the adjusted resource quota of the medium-priority container to obtain a container resource occupancy fluctuation value, and performing trend prediction on the container resource occupancy fluctuation value to obtain a parameter adjustment direction of the medium-priority container; The container operation state is evaluated according to the adjusted resource quota of the low-priority container to obtain a container performance indicator data set, and the container performance indicator data set is parameter mapped to obtain a target operation parameter of the low-priority container; Performing parameter reduction processing on the operating parameter adjustment range of the high-priority container to obtain frequency reduction configuration data of the high-priority container; Performing parameter fine-tuning processing according to the parameter adjustment direction of the medium-priority container to obtain the balance configuration data of the medium-priority container, and performing parameter increment processing according to the target operating parameters of the low-priority container to obtain the frequency increase configuration data of the low-priority container; Performing operation parameter setting processing on the frequency reduction configuration data of the high priority container to obtain a first adjustment result of the refresh rate, phase value, window size and color depth of the high priority container; respectively adjusting the operation parameters of the corresponding containers according to the balancing configuration data of the medium-priority container and the frequency-increasing configuration data of the low-priority container to obtain a second adjustment result; An updated resource saturation rate is determined based on the first adjustment result and the second adjustment result until the updated resource saturation rate is less than a preset saturation threshold.

6. A container resource adjustment device for a virtualization system, characterized in that: A plurality of containers are running in a virtualization system, and the container resource adjustment device of the virtualization system includes: A load measurement module, used to obtain system load data of the virtualization system according to a preset detection period, and determine the system available resources and container allocation resources according to the system load data; A saturation calculation module, used to determine a system resource saturation rate according to the system available resources and the container allocation resources; A level determination module, configured to obtain the priority of the container when the resource saturation rate is greater than or equal to a preset saturation threshold; A resource allocation module, used to redetermine a container resource allocation strategy according to the container allocation resources and the priority; The parameter adjustment module is used to adjust the operating parameters of the container according to the resource allocation strategy until the resource saturation rate is less than a preset saturation threshold.

7. A terminal device, characterized in that: The terminal device includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the container resource adjustment method of the virtualization system according to any one of claims 1 to 5 when executing the computer program.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the container resource adjustment method of the virtualization system according to any one of claims 1 to 5.

Citation Information

Cited By

  • Memory allocation speed control method and device, equipment and medium

    CN121116652A

  • A memory allocation speed control method, device, equipment and medium

    CN121116652B