IO control optimization method based on cgroup

By using a central control server to monitor the time delay and bandwidth of the remote server and dynamically adjusting the cgroup parameters in the Linux system, the problem of insufficient I/O priority control is solved, efficient IO resource allocation and optimization is achieved, and the overall performance and adaptability of the system are improved.

CN119690347AActive Publication Date: 2025-03-25BEIJING UNIV OF POSTS & TELECOMM

Patent Information

Application Number
CN202411772793.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-03-25
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

There are problems such as inaccurate and controllable I/O priority control in existing Linux systems, which leads to insufficient response to critical tasks in high-load environments and complex configuration and management of Cgroups, which may lead to performance degradation and compatibility issues.

Method used

The remote server is continuously monitored through the central control server, regularly send test data packets and calculate delay and bandwidth, and dynamically adjust the cgroup parameter values, including IOPS, BPS and latency, to ensure that the system is always running in the best state.

Benefits of technology

Effectively improve IO efficiency and bandwidth utilization, optimize delay, and facilitate QoS control, ensuring that the system operates efficiently and stably, meeting the needs of different users and applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119690347A_ABST
    Figure CN119690347A_ABST
Patent Text Reader

Abstract

The invention discloses a cgroup-based IO control optimization method, which belongs to the technical field of server storage, is realized through a system consisting of a central control server and a remote server, and comprises the following steps: S1, data collection; s2, QoS parameter calculation is carried out; s3, a cgroup is configured; and S4, dynamic adjustment: according to the time delay and bandwidth change of each remote server obtained through continuous monitoring of the central control server, updating alpha and beta and circularly iterating the steps S1 to S3, and dynamically adjusting the resource allocation of the cgroup to ensure that the system always operates in the optimal state. The invention provides a scheme for carrying out resource optimization according to characteristics of a remote server and network conditions, configuration and management are carried out through a unified central control server according to actual conditions of storage engine services in different regions, performance optimization standards are met, parameters and formulas are continuously adjusted and optimized according to requirements, and the performance optimization efficiency is improved. And the method has good robustness and expandability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of server storage, and in particular to an IO control optimization method based on cgroup. Background Art

[0002] There are currently multiple I / O priority policies in Linux systems. Among them, for CFQ (Completely Fair Queuing I / O Scheduler), its attempt to fairly allocate I / O resources to each process may lead to an unresponsive response to critical tasks in some cases. Because in a high-load environment, all processes perform I / O operations according to time slices, even urgent critical tasks may need to wait for the time slices of other processes to end before obtaining I / O resources. Moreover, adjusting parameters such as queue length and time slice size requires in-depth understanding and experience of the system, otherwise it may lead to performance degradation rather than optimization.

[0003] BlkioCgroups (Block Device I / O Control Groups) may bring some complexity during use. Configuring and managing Cgroups requires a good understanding of system architecture and underlying technologies, and may have a certain learning curve for ordinary users or administrators. In addition, different versions of Cgroups may have compatibility issues, and a lot of adjustments and tests may be required when upgrading or migrating the system.

[0004] The Linux kernel's automatic I / O priority increase mechanism may not be precise and controllable enough. The kernel's automatic priority increase criteria based on specific conditions may not fully meet the needs of actual applications, and this automatic increase may affect the performance of other tasks. In addition, automatic priority increase may cause some unpredictable behaviors, increase system complexity and maintenance difficulty.

[0005] Priority control at the file system level often has limitations. Different file systems provide different priority control options and functions, and may be incompatible with the priority policies of other system components. At the same time, priority control at the file system level can usually only be set for specific files or directories, which may not be flexible and comprehensive enough for complex multi-tasking systems.

[0006] In view of the shortcomings of the I / O current limiting measures in the above Linux system, how to provide an I / O current limiting scheduling measure that is easy to configure, flexible to use, reasonably allocates resources, and effectively optimizes control is a problem that technical personnel in this field urgently need to solve. Summary of the invention

[0007] The purpose of the present invention is to provide an IO control optimization method based on cgroup to solve the problems in the background technology.

[0008] To achieve the above object, the present invention provides an IO control optimization method based on cgroup, which is implemented by a system consisting of a central control server and a remote server, and specifically includes the following steps:

[0009] S1. Data collection: Use the central control server to continuously monitor each remote server and regularly send test data packets to each remote server. After the remote server sends back a response data packet, calculate the latency and bandwidth;

[0010] S2, QoS parameter calculation: According to the data obtained in S1, adjust the basic QoS parameter values ​​and calculate the parameter values ​​of the cgroup corresponding to each remote server. The QoS parameters include IOPS, BPS and latency.

[0011] S3. Configure cgroup: Create a corresponding cgroup for each remote server, and accurately write the parameter values ​​obtained in S2 into the control file of the corresponding cgroup;

[0012] S4, dynamic adjustment: According to the central control server's continuous monitoring of the latency and bandwidth changes of each remote server, α and β are updated and steps S1 to S3 are iterated repeatedly to dynamically adjust the resource allocation of the cgroup to ensure that the system always runs in the best state.

[0013] Preferably, the specific steps of S2 are as follows:

[0014] S21. Set basic IOPS, BPS, and latency values ​​for the system, and set latency thresholds and bandwidth thresholds.

[0015] S22, comparing the latency and bandwidth collected in S1 with the set latency threshold and bandwidth threshold respectively, and determining an adjustment plan for the IOPS, BPS and latency values ​​in the system;

[0016] S23, for the IOPS of the cgroup corresponding to the remote server, set the adjustment coefficient to α, for the BPS of the cgroup corresponding to the remote server, set the adjustment coefficient to β, and calculate the IOPS value of each remote server corresponding to the cgroup IOPS cgroup and the value of BPS cgroup .

[0017] Preferably, in S22, the adjustment formula of IOPS is:

[0018] IOPS a =IOPS b ×(1-(u / L max ))×(w / B min );

[0019] In the formula, IOPS a and IOPS b are the adjusted IOPS and basic IOPS respectively, u is the latency, w is the bandwidth, and L max is the maximum delay threshold, B min is the minimum bandwidth threshold;

[0020] The adjustment formula for BPS is:

[0021] BPS a =BPS b ×(1-(u / L max ))×(w / B min );

[0022] Where, BPS a and BPS b They are the adjusted BPS and basic BPS respectively;

[0023] The latency adjustment formula is:

[0024] latency a =latency b + k × u;

[0025] In the formula, latency a and latency b are the adjusted latency and basic latency respectively, and k is the adjustment coefficient.

[0026] Preferably, in S23, IOPS cgroup The calculation formula is:

[0027]

[0028] BPS cgroup The calculation formula is:

[0029]

[0030] Where n is the total number of all remote servers, I total and B total They are the total IOPS and BPS resources in the system respectively.

[0031] Preferably, in S3, the IOPS obtained in S2 cgroup The value is converted into a suitable format and written into the control file of the corresponding cgroup. The BPS obtained for S2 cgroup Value, determine the appropriate number of bytes and units, and write them to the control file of the corresponding cgroup.

[0032] Preferably, the specific steps of updating α and β in S4 are:

[0033] 1) Based on the new latency and bandwidth data obtained by the central control server, perform S23 to obtain the expected IOPS and expected BPS values ​​of the remote server;

[0034] 2) Calculate the deviation ratio between the expected IOPS and expected BPS values ​​obtained and the actual IOPS and actual BPS values ​​of the remote server obtained in the previous step S23, and adjust α and β.

[0035] Preferably, the adjustment rule for the adjustment coefficient α of IOPS is:

[0036] When diff IOPS >0, α u =α i -γ×diff IOPS ;

[0037] When diff IOPS <0, α u =α i +γ×diff IOPS ;

[0038] In the formula, diff IOPS Indicates the deviation ratio of IOPS, α u and α i are the updated α and initial α respectively, and γ is the step size.

[0039] Preferably, the adjustment rule for the adjustment coefficient β of BPS is:

[0040] When diff BPS >0, β u =β i -γ×diff BPS ;

[0041] When diff BPS <0, β u =β i +γ×diff BPS ;

[0042] In the formula, diff BPS Indicates the deviation ratio of BPS, β u and β i are the updated β and initial β respectively.

[0043] The steps reflected on the server side are:

[0044] 1) The data collection request arrives at the central control server and begins measuring the key parameters of the remote server;

[0045] 2) The central control server analyzes and processes the collected data and forwards the specific resource adjustment configuration to the cgroup management module of the remote server;

[0046] 3) The cgroup management module generates a resource configuration list: it contains the configuration information for dynamically adjusting cgroup I / O parameters according to the actual latency and bandwidth shortage or excess;

[0047] 4) The central control server and remote servers call the cgroup management module to set the API, set the cgroup parameters according to the resource configuration list, and implement flow control of resources such as data transmission.

[0048] Therefore, the present invention provides a cgroup-based IO control optimization method, which has the following beneficial effects:

[0049] (1) Effectively improve IO efficiency: Storage engine services in different regions of large-scale storage systems often face the problem of poor data transmission efficiency due to differences in distance, bandwidth, and latency. This solution uses a central control server to accurately measure the latency and bandwidth of each remote server and dynamically adjust the IOPS cgroup , BPS cgroup and latency, creating a corresponding cgroup for each remote server and performing fine parameter configuration. This personalized resource allocation method avoids resource waste and unreasonable allocation, ensuring that each storage engine service can run in the best state, thereby greatly improving the overall IO efficiency. Whether it is data reading or writing, it can be completed at a faster speed, meeting users' needs for efficient storage and access.

[0050] (2) Effectively improve IO bandwidth utilization: As the scale of storage systems continues to expand, the demand for bandwidth resources is increasing. Traditional storage systems often cannot fully utilize bandwidth resources, resulting in some bandwidth being idle, and insufficient bandwidth may occur at critical times. This solution monitors the latency and bandwidth changes of remote servers in real time, and dynamically adjusts the data transmission rate according to actual conditions, so that bandwidth resources can be more reasonably allocated and utilized. When the bandwidth of a remote server is high, its data transmission volume is appropriately increased to give full play to the advantages of high bandwidth; when the bandwidth is low, the data transmission strategy is adjusted in time to avoid affecting system performance due to insufficient bandwidth. As a result, the IO bandwidth utilization of the entire storage system is greatly improved, providing a strong guarantee for the stable operation of the system and efficient service.

[0051] (3) Effectively optimize latency: In distributed storage systems, latency is one of the key factors affecting system performance. High latency not only leads to slow data transmission, but may also affect system response speed and user experience. This solution effectively reduces the latency of data transmission by accurately calculating the latency of remote servers and dynamically adjusting the parameters of cgroup according to the latency. For example, when it is found that the latency of a remote server is high, the system automatically adjusts its data transmission strategy to reduce unnecessary waiting time and data transmission volume, thereby reducing latency. At the same time, through continuous monitoring and dynamic adjustment, the system can adapt to changes in network conditions in a timely manner to ensure that latency always remains at a low level.

[0052] (4) Facilitate QoS control: In large-scale storage systems, different applications and users may have different requirements for the quality of storage services. Some applications require high-priority data transmission, while others can accept lower transmission speeds. This solution enables system administrators to easily perform QoS control by creating a corresponding cgroup for each remote server and configuring its parameters in detail. Different IOPS, BPS, and latency values ​​can be assigned to different cgroups based on different application requirements and user priorities, thereby achieving differentiated management of storage service quality. This flexible QoS control method improves the adaptability and scalability of the system and better meets the needs of different users and applications.

[0053] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 The present invention is a flow chart of a cgroup-based IO control optimization method. DETAILED DESCRIPTION

[0055] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.

[0056] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments.

[0057] Example

[0058] like Figure 1 As shown, the present invention provides an IO control optimization method based on cgroup, which is implemented by a system consisting of a central control server and a remote server, and the steps are as follows:

[0059] S1. Data collection: Use the central control server to continuously monitor each remote server and regularly send test data packets to each remote server. After the remote server sends back a response data packet, calculate the latency and bandwidth; specifically:

[0060] The central control server periodically sends test data packets to each remote server and accurately records the sending time. The remote server immediately responds after receiving the test data packet. The central control server calculates the latency based on the difference between the sending time and the receiving time. The latency reflects the time it takes for data to be transmitted in the network and is one of the important indicators for evaluating network conditions. At the same time, the central control server calculates the bandwidth by monitoring the total amount of data transmission with the remote server over a period of time and dividing the total amount by the transmission time.

[0061] S2, QoS calculation: According to the data obtained in S1, adjust the basic QoS parameter values, and calculate the parameter values ​​of the cgroup corresponding to each remote server. The QoS parameters include IOPS, BPS and latency; specifically:

[0062] S21. Set basic IOPS, BPS, and latency values ​​for the system, and set latency thresholds and bandwidth thresholds.

[0063] S22, comparing the latency and bandwidth collected in S1 with the set latency threshold and bandwidth threshold respectively, and determining an adjustment plan for the IOPS, BPS and latency values ​​in the system;

[0064] The specific adjustment plan is: if the latency u is higher than the threshold, the IOPS and BPS are reduced proportionally, and the latency record value is appropriately increased to facilitate subsequent dynamic adjustments to reflect the impact of network latency on data transmission. If the bandwidth w is lower than the threshold, the IOPS and BPS are also reduced proportionally to adapt to the lower bandwidth and ensure the stability of data transmission under low bandwidth conditions.

[0065] The adjustment formula for IOPS is:

[0066] IOPS a =IOPS b ×(1-(u / L max ))×(w / B min );

[0067] In the formula, IOPS a and IOPS b are the adjusted IOPS and basic IOPS respectively, u and w are the latency and bandwidth collected by S1 respectively, and L max and B min They are the maximum delay threshold and the minimum bandwidth threshold respectively;

[0068] The adjustment formula for BPS is:

[0069] BPS a =BPS b ×(1-(u / L max ))×(w / B min );

[0070] Where, BPS a and BPS b They are the adjusted BPS and basic BPS respectively;

[0071] The latency adjustment formula is:

[0072] latency a =latency b + k × u;

[0073] In the formula, latency a and latency b are the adjusted latency and basic latency respectively, and k is the adjustment coefficient, which is determined according to the actual situation to ensure that the data transmission parameters are dynamically adjusted according to the network status.

[0074] S23. For the IOPS of the remote server corresponding to the cgroup, set the adjustment coefficient to α, and for the BPS of the remote server corresponding to the cgroup, set the adjustment coefficient to β. Considering the coexistence of multiple servers and the limited total resources, calculate the IOPS value of each remote server corresponding to the cgroup IOPS cgroup and the value of BPS cgroup .

[0075] IOPS cgroup The calculation formula is:

[0076]

[0077] Where n is the total number of all remote servers, I total is the total IOPS resource in the system. This formula shows that when the bandwidth of the remote server is higher and the latency is lower, the IOPS that its corresponding cgroup can obtain is cgroup The higher the bandwidth, the easier it is to make full use of the bandwidth. At the same time, by allocating the limited total IOPS resources according to the weight of the server bandwidth in the total bandwidth, the reasonable allocation of system resources is ensured.

[0078] BPS cgroup The calculation formula is:

[0079]

[0080] In the formula, B total is the total BPS resource in the system. Similarly, this formula enables the cgroup corresponding to the server with high bandwidth and low latency to obtain a higher BPS cgroup , and allocates the limited total BPS resources according to bandwidth weight, ensuring the stability and efficiency of the system.

[0081] Through the above formula, the I / O performance parameters of the corresponding cgroup can be dynamically adjusted according to the network conditions of different remote servers to achieve reasonable allocation of resources and efficient operation of the system.

[0082] S3. Configure cgroup: Create a corresponding cgroup for each remote server and accurately write the parameter values ​​obtained in S2 into the control file of the corresponding cgroup; specifically:

[0083] For each remote server, create a corresponding cgroup. This can be achieved by modifying the relevant parameters in the " / sys / fs / cgroup / mygroup / io.max" file. First, determine the requirements and performance goals of the remote server corresponding to the cgroup, and set the IOPS obtained by S2 to cgroup The value is converted to the format and written to the file. For example, if the adjusted IOPS cgroup If the value is 1000, you can set "max=<maximum IOPS>" to "max=1000". During the setting process, you need to ensure that the value is within a reasonable range. It should not be too high to cause over-allocation of system resources, nor too low to affect the normal operation of the server. At the same time, the overall load of the system and the needs of other cgroups should be considered to achieve reasonable resource allocation.

[0084] For setting BPS cgroup , by modifying the " / sys / fs / cgroup / mygroup / io.max" file. BPS obtained for S2 cgroup value, determine the appropriate number of bytes and units. For example, if the adjusted BPS cgroup If the value is 512KB / s, you can set it to "max=524288B". cgroup When cgroup In addition, the characteristics of different storage engines and data transmission modes must be considered to ensure that the set BPS cgroup The value can meet the actual needs.

[0085] After the settings are completed, the system can accurately control the data transmission rate of the remote server according to the latency and bandwidth of the remote server. This can avoid congestion and performance degradation caused by excessive data transmission when the network conditions are poor. At the same time, it can also make full use of bandwidth resources and improve the overall efficiency of the system when the network conditions are good. Through the fine configuration of each cgroup, personalized management of different remote servers can be achieved to ensure the stable operation of the entire system.

[0086] S4, dynamic adjustment: According to the delay and bandwidth changes of each remote server continuously monitored by the central control server, α and β are updated and steps S1 to S3 are iterated repeatedly to dynamically adjust the resource allocation of cgroup to ensure that the system always runs in the best state; specifically:

[0087] The central control server continuously monitors the latency and bandwidth changes of each remote server. At regular intervals, it recalculates the QoS parameters based on the new latency and bandwidth values, updates α and β in S2, and iterates S1-S3, updates the configuration of the corresponding cgroup, and dynamically adjusts the resource allocation of the cgroup to ensure that the system always runs in the best state.

[0088] 1) Based on the new latency and bandwidth data obtained by the central control server, perform S23 to obtain the expected IOPS and expected BPS values ​​of the remote server;

[0089] 2) Calculate the deviation ratio between the expected IOPS and expected BPS values ​​obtained and the actual IOPS and actual BPS values ​​of the remote server obtained in the previous step S23, and adjust α and β.

[0090] The adjustment method for the IOPS adjustment factor α is:

[0091] First, calculate the IOPS deviation ratio:

[0092]

[0093] In the formula, IOPS cgroup is the expected IOPS value, IOPS actual is the actual IOPS value of the remote server obtained in the previous step S23;

[0094] Then the adjustment coefficient α is updated according to the deviation ratio:

[0095] When diff IOPS >0, α u =α i -γ×diff IOPS ;

[0096] When diff IOPS<0, α u =α i +γ×diff IOPS ;

[0097] In the formula, α u and α i are the updated α and initial α respectively, and γ is the step size.

[0098] The adjustment method for the adjustment coefficient β of BPS is:

[0099] First, calculate the deviation ratio of BPS:

[0100]

[0101] Where, BPS cgroup is the expected BPS value, BPS actual is the actual BPS value of the remote server obtained in the previous step S23;

[0102] Then the adjustment coefficient β is updated according to the deviation ratio:

[0103] When diff BPS >0, β u =β i -γ×diff BPS ;

[0104] When diff BPS <0, β u =β i +γ×diff BPS ;

[0105] In the formula, β u and β i are the updated β and initial β respectively.

[0106] By continuously updating the adjustment coefficient based on the actual IOPS and BPS values, the resource allocation of the cgroup can be dynamically adjusted to make it closer to the expected resource allocation, thereby improving the performance and stability of the system. If the γ step value is set too large, the adjustment will be too drastic, causing the system to become unstable during the adjustment process. For example, IOPS and BPS may fluctuate greatly in a short period of time, affecting the normal operation of the system. On the contrary, if the γ step value is set too small, the adjustment speed may be very slow, and it will take a long time for the system to reach the ideal resource allocation state. γ is preferably set to 32.

[0107] The steps reflected on the server side are:

[0108] 1) The data collection request arrives at the central control server and begins measuring the key parameters of the remote server;

[0109] 2) The central control server analyzes and processes the collected data and forwards the specific resource adjustment configuration to the cgroup management module of the remote server;

[0110] 3) The cgroup management module generates a resource configuration list: it contains the configuration information for dynamically adjusting cgroup I / O parameters according to the actual latency and bandwidth shortage or excess;

[0111] 4) The central control server and remote servers call the cgroup management module to set the API, set the cgroup parameters according to the resource configuration list, and implement flow control of resources such as data transmission.

[0112] Among them, the implementation method for adjusting the cgroup I / O parameter configuration is as follows: this solution adopts the export traffic strategy for data transmission, uses cgroup resource allocation and dynamic feedback mechanism to schedule the QoS and order of data transmission, and reasonably restricts resources. It is more accurate and effective than simply adjusting resource indicators, and can be applied to different remote servers.

[0113] Therefore, the present invention provides an IO control optimization method based on cgroup, which can effectively improve IO efficiency: storage engine services in different regions of large-scale storage systems often face the problem of poor data transmission efficiency due to differences in distance, bandwidth and latency. This solution uses a central control server to accurately measure the latency and bandwidth of each remote server, and dynamically adjusts IOPS according to S4 cgroup , BPS cgroup and latency, creating a corresponding cgroup for each remote server and performing fine parameter configuration. This personalized resource allocation method avoids resource waste and unreasonable allocation, ensuring that each storage engine service can run in the best state, thereby greatly improving the overall IO efficiency. Whether it is data reading or writing, it can be completed at a faster speed, meeting users' needs for efficient storage and access.

[0114] Effectively improve IO bandwidth utilization: As the scale of storage systems continues to expand, the demand for bandwidth resources is increasing. Traditional storage systems often fail to fully utilize bandwidth resources, resulting in some bandwidth being idle, and insufficient bandwidth may occur at critical times. This solution monitors the latency and bandwidth changes of remote servers in real time, and dynamically adjusts the data transmission rate according to actual conditions, so that bandwidth resources can be more reasonably allocated and utilized. When a remote server has a high bandwidth, its data transmission volume is appropriately increased to give full play to the high bandwidth advantage; when the bandwidth is low, the data transmission strategy is adjusted in time to avoid affecting system performance due to insufficient bandwidth. As a result, the IO bandwidth utilization of the entire storage system is greatly improved, providing a strong guarantee for the stable operation of the system and efficient services.

[0115] Effectively optimize latency: In distributed storage systems, latency is one of the key factors affecting system performance. High latency not only leads to slow data transmission, but may also affect system response speed and user experience. This solution effectively reduces the latency of data transmission by accurately calculating the latency of remote servers and dynamically adjusting the parameters of cgroup according to the latency. For example, when it is found that the latency of a remote server is high, the system automatically adjusts its data transmission strategy to reduce unnecessary waiting time and data transmission volume, thereby reducing latency. At the same time, through continuous monitoring and dynamic adjustment, the system can adapt to changes in network conditions in a timely manner to ensure that latency always remains at a low level.

[0116] Easy to perform QoS control: In large-scale storage systems, different applications and users may have different requirements for the quality of storage services. Some applications require high-priority data transmission, while others can accept lower transmission speeds. This solution enables system administrators to easily perform QoS control by creating a corresponding cgroup for each remote server and configuring its parameters in detail. Different IOPS, BPS, and latency values ​​can be assigned to different cgroups according to different application requirements and user priorities, thereby achieving differentiated management of storage service quality. This flexible QoS control method improves the adaptability and scalability of the system and better meets the needs of different users and applications.

[0117] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.

Claims

1. A cgroup-based IO control optimization method is implemented by a system consisting of a central control server and a remote server, characterized in that: The following steps are involved: S1. Data collection: Use the central control server to continuously monitor each remote server and regularly send test data packets to each remote server. After the remote server sends back a response data packet, calculate the latency and bandwidth; S2, QoS parameter calculation: According to the data obtained in S1, adjust the basic QoS parameters and calculate the parameter values ​​of the cgroup corresponding to each remote server. The QoS parameters include IOPS, BPS and latency. S3. Configure cgroup: Create a corresponding cgroup for each remote server, and accurately write the parameter values ​​obtained in S2 into the control file of the corresponding cgroup; S4, dynamic adjustment: According to the central control server's continuous monitoring of the latency and bandwidth changes of each remote server, α and β are updated and steps S1 to S3 are iterated repeatedly to dynamically adjust the resource allocation of the cgroup to ensure that the system always runs in the best state.

2. The cgroup-based IO control optimization method according to claim 1, characterized in that: The specific steps of S2 are as follows: S21. Set basic IOPS, BPS, and latency values ​​for the system, and set latency thresholds and bandwidth thresholds. S22, comparing the latency and bandwidth collected in S1 with the set latency threshold and bandwidth threshold respectively, and determining an adjustment plan for the IOPS, BPS and latency values ​​in the system; S23, for the IOPS of the cgroup corresponding to the remote server, set the adjustment coefficient to α, for the BPS of the cgroup corresponding to the remote server, set the adjustment coefficient to β, and calculate the IOPS value of each remote server corresponding to the cgroup IOPS cgroup and the value of BPS cgroup .

3. The cgroup-based IO control optimization method according to claim 2, characterized in that: In S22, the IOPS adjustment formula is: IOPS a =IOPS b ×(1-(u / L max ))×(w / B min ); In the formula, IOPS a and IOPS b are the adjusted IOPS and basic IOPS respectively, u is the latency, w is the bandwidth, and L max is the maximum delay threshold, B min is the minimum bandwidth threshold; The adjustment formula for BPS is: BPS a =BPS b ×(1-(u / L max ))×(w / B min ); In the formula, BPS a and BPS b They are the adjusted BPS and basic BPS respectively; The latency adjustment formula is: latency a =latency b +k×u; Where latency a and latency b are the adjusted latency and basic latency respectively, and k is the adjustment coefficient.

4. The cgroup-based IO control optimization method according to claim 2, characterized in that: In the S23, IOPS cgroup The calculation formula is: BPS cgroup The calculation formula is: Where n is the total number of all remote servers, I total and B total They are the total IOPS and BPS resources in the system respectively.

5. The cgroup-based IO control optimization method according to claim 4, characterized in that: In S3, the IOPS obtained in S2 cgroup The value is converted into a suitable format and written into the control file of the corresponding cgroup. The BPS obtained for S2 cgroup Value, determine the appropriate number of bytes and units, and write them to the control file of the corresponding cgroup.

6. The cgroup-based IO control optimization method according to claim 5, characterized in that: The specific steps of updating α and β in S4 are: 1) Based on the new latency and bandwidth data obtained by the central control server, perform S23 to obtain the expected IOPS and expected BPS values ​​of the remote server; 2) Calculate the deviation ratio between the expected IOPS and expected BPS values ​​obtained and the actual IOPS and actual BPS values ​​of the remote server obtained in the previous step S23, and adjust α and β.

7. The cgroup-based IO control optimization method according to claim 6, characterized in that: The adjustment rule for the IOPS adjustment factor α is: When didd IOPS > 0, α u = α i - γ × diff IOPS ; When diff IOPS < 0, α u = α i + γ × diff IOPS ; In the formula, diff IOPS Indicates the deviation ratio of IOPS, α u and α i are the updated α and initial α respectively, and γ is the step size.

8. The cgroup-based IO control optimization method according to claim 6, characterized in that: The adjustment rule for the adjustment coefficient β of BPS is: When diff BPS > 0, β u = β i - γ × diff BPS ; When diff BPS < 0, β u = β i + γ × diff BPS ; In the formula, diff BPS Indicates the deviation ratio of BPS, β u and β i are the updated β and initial β respectively.

Citation Information

Patent Citations

  • Dynamic QoS configuration system and method for cluster block device

    CN108494588A

  • Resource deployment method and device, terminal equipment and storage medium

    CN118796409A

  • Network measurement control system and network measurement control method

    JP2002016599A

  • Communication system

    US20120198032A1

  • Method and system for using dynamic bandwidth detection to drive quality of service control refinement

    US20150236962A1

Cited By

  • QoS regulation and control method and system based on IO demand prediction

    CN122332135A

  • QoS regulation method and system based on IO demand prediction

    CN122332135B