IO resource isolation method and device, equipment and storage medium
By setting the expected IO resources for each target process and dynamically adjusting the IO resource allocation, the problem of low resource utilization in traditional IO resource isolation methods is solved, and efficient utilization of IO resources and improvement of system performance is achieved.
Patent Information
- Application Number
- CN202411482911.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2024-12-31
AI Technical Summary
Traditional IO resource isolation methods cannot fully utilize IO resources, resulting in low resource utilization. Especially when IO resources are generally sufficient but unevenly allocated, the overall performance of the system cannot be fully utilized.
Set the expected IO resources for each target process, determine the latest allocable IO resources on the disk, and dynamically adjust the IO resource allocation order and quantity based on the expected IO resources and the current IO resource usage of each target process to ensure efficient resource utilization. .
By adjusting the allocation of IO resources, the utilization rate of IO resources is effectively improved, resource waste is avoided, and system performance is improved.
Smart Images

Figure CN119225975A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and storage medium for isolating IO resources. Background Art
[0002] In computer systems, disk performance is one of the key factors in measuring overall system performance, and is usually quantified by two indicators: Input / Output operations Per Second (IOPS) and Bytes PerSecond (BPS). These two indicators not only reflect the physical performance of the disk, but are also considered a system resource, similar to network bandwidth, which is crucial for the smooth operation of the system. At the operating system level, multiple processes share these IO resources, which means that the disk read and write efficiency of a process will inevitably be affected by the activities of other processes. For example, when a process performs a large number of disk read and write operations, the IO resources available to other processes will be reduced accordingly, which may cause the system to respond more slowly or delay tasks.
[0003] For certain types of processes, such as database programs, the performance requirements for disk read and write are extremely high, and frequent and large-scale disk access is the norm. In this case, in order to ensure the stability and response speed of the database, the ideal state is to effectively isolate IO resources to reduce mutual interference between different processes. Traditionally, the Linux operating system provides an IO limit mechanism through the cgroup IO controller, allowing the upper limit of IO usage to be set for each process. The core of this mechanism is to achieve a certain degree of resource isolation and allocation by ensuring that the sum of the IO limits of all processes does not exceed the actual capacity limit of the disk.
[0004] However, although this traditional IO resource isolation method alleviates the IO resource competition problem between processes to a certain extent, it also brings significant limitations. Specifically, since each process is set with a fixed IO usage limit, even if other processes in the system do not fully utilize their allocated IO resources, any specific process cannot exceed its limit to use more IO resources. This "one-size-fits-all" resource allocation method leads to low resource utilization, especially when IO resources are generally sufficient but unevenly distributed, the overall performance of the system cannot be fully utilized. Summary of the invention
[0005] The purpose of the present invention is to provide a method, device, equipment and storage medium for IO resource isolation to solve the problem that the traditional IO resource isolation method cannot fully utilize its IO resources.
[0006] To achieve the above objectives, this application adopts the following technical solutions:
[0007] A method for isolating IO resources in the present application includes the following steps:
[0008] Set the expected IO resource amount for each target process;
[0009] Determine the latest allocatable IO resource amount of the disk and obtain the current IO resource usage of each target process;
[0010] The resource allocation order is determined according to the expected IO resource amount of each target process, and the resource allocation amount of each target process is determined according to the latest allocatable IO resource amount, the expected IO resource amount and the corresponding current IO resource usage.
[0011] Preferably, the method further comprises:
[0012] A daemon process is deployed on the host, and the daemon process is used to set the IO resource limit of each target process and collect its current IO resource usage in real time.
[0013] Preferably, the real-time collection of the current IO resource usage includes:
[0014] The daemon process is used to periodically read the cumulative read and write times and the number of bytes read and written of the target process in each control group, and the read and write times per second and the number of bytes read and written per second of each target process are calculated based on the interval time and the cumulative read and write times and the number of bytes read and written.
[0015] Preferably, determining the latest allocatable IO resource amount of the disk includes:
[0016] Get the current disk read and write times per second and the number of read and write bytes per second, and compare them with the historical values;
[0017] When the current number of read and write times per second or the number of read and write bytes per second is greater than the historical value, a detection state is entered to determine the upper limit of the performance of the disk;
[0018] The performance upper limit value is used as the latest allocatable IO resource amount of the disk.
[0019] Preferably, the determining the upper limit value of the performance of the disk includes:
[0020] Gradually release the IO resource limit of the daemon process on each target process, and make the target process issue IO resources as much as possible, so as to obtain the peak values of the number of reads and writes per second and the number of bytes read and written per second;
[0021] When the IO usage of any target process decreases, the IO resource usage of some target processes other than the target process increases, and the total number of read and write times per second and the number of read and write bytes per second remain unchanged, it is determined that the disk has reached the performance upper limit, and the performance upper limit value is recorded.
[0022] Preferably, the method further comprises:
[0023] When the performance upper limit of the disk cannot be determined, the latest allocatable IO resource amount is determined according to the maximum IO resource amount obtained in the detection state.
[0024] Preferably, determining the resource allocation order according to the expected IO resource amount of each target process, and determining the resource allocation amount of each target process according to the latest allocatable IO resource amount, the expected IO resource amount and the corresponding current IO resource usage, includes:
[0025] Prioritize the allocation of IO resources to target processes whose expected IO resource amount is greater than zero. When the expected IO resource amount is greater than the current IO resource usage, allocate IO resources equal to a fixed multiple of the current IO resource usage. Otherwise, allocate IO resources equal to the current IO resource usage.
[0026] When there are unallocated resources after the first allocation, IO resources equal to the current IO resource usage are allocated to the target processes whose expected IO resource usage is zero in order from small to large.
[0027] When there are unallocated resources after the secondary allocation, additional IO resources equal to the difference between the current IO resource usage and the expected IO resource usage are allocated to the target processes whose expected IO resource usage is greater than zero and less than their current IO resource usage in order from small to large current IO resource usage;
[0028] When there are unallocated resources after three allocations, add IO resources equal to the preset ratio of the current IO resource usage to the target process whose current IO resource usage is equal to its IO resource limit;
[0029] When there are unallocated resources after four allocations, all remaining resources are evenly added to all target processes whose current IO resource usage is greater than their expected IO resource usage;
[0030] The sum of the IO resources allocated to each target process is saved as the IO resource limit in its respective control group.
[0031] An IO resource isolation device, comprising:
[0032] The setting module is used to set the expected IO resource amount for each target process;
[0033] The acquisition module is used to determine the latest allocatable IO resource amount of the disk and obtain the current IO resource usage of each target process;
[0034] The allocation module is used to determine the resource allocation order according to the expected IO resource amount of each target process, and determine the resource allocation amount of each target process according to the latest allocatable IO resource amount, the expected IO resource amount and the corresponding current IO resource usage.
[0035] An electronic device comprises a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement an IO resource isolation method as described in any one of the above.
[0036] A computer-readable storage medium storing a computer program, wherein the computer program enables a computer to implement an IO resource isolation method as described in any one of the above when executed.
[0037] The present invention has the following beneficial effects:
[0038] The present invention calculates the IO resources that each target process deserves according to the reserve value set for each target process, and then suppresses the IO usage of the target process that is higher than expected by adjusting the cgroup IO limit of some target processes, while giving the idle IO resources to the processes in need, effectively improving the utilization rate of IO resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 This is a flow chart of a method for isolating IO resources provided in an embodiment of the present application;
[0040] Figure 2 is a flow chart for determining the upper limit value of disk performance in an embodiment of the present application;
[0041] Figure 3 This is a flowchart of IO resource allocation in an embodiment of the present application;
[0042] Figure 4 It is a structural diagram of an IO resource isolation device provided in an embodiment of the present application;
[0043] Figure 5 It is a schematic diagram of an electronic device for implementing a method for IO resource isolation provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] To make the technical solution of the present application clearer, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. The terms "first", "second", etc. in the claims and specification of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances. This is only to describe the distinction method used when describing objects with the same attributes in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that a process, method, system, product or device containing a series of units is not necessarily limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or devices.
[0045] Example 1
[0046] like Figure 1 As shown, a method for isolating IO resources includes the following steps:
[0047] S110, setting an expected IO resource amount for each target process;
[0048] The expected IO resource amount, also known as the reserve value, is a virtual concept proposed in this embodiment, which is used to describe the number of IO resources that the target process expects to obtain, and also represents the number of resources that the disk needs to reserve for it. In this embodiment, it is also guaranteed that when the target process wants to use IO resources, it can at least use the reserved resources, and the upper limit value is the upper limit of the disk capacity. If the target process itself is idle and does not need so many IO resources, the resources reserved for it can be allocated to other target processes for use, where the target process refers to the process in the system that is responsible for reading data from the disk or writing data to the disk. Setting the reserve value requires the business party to comprehensively consider multiple factors, such as the amount of IO used by the target process, the importance of the target process, the total capacity of the disk IO, and the deployment density, that is, the oversold ratio of IO resources. The reserve value can be 0, which is a default setting, indicating that the disk does not need to reserve resources for this target process. At this time, the number of resources it can use is the amount left by other target resources. It should also be noted here that IOPS and BPS belong to different measurement dimensions. Their reserve values are set independently. You can set both, neither, or only one of them. They are also regulated independently during adjustment. However, the final result is that the IOPS constraint and the BPS constraint will be satisfied at the same time.
[0049] S120, determining the latest allocatable IO resource amount of the disk, and obtaining the current IO resource usage of each target process;
[0050] To accurately allocate IOPS and BPS resources to each target process, you need to first understand the IO usage of each target process and the performance limit of the disk.
[0051] Furthermore, a daemon process is deployed on the host, and the daemon process is used to set the IO resource limit of each target process and collect its current IO resource usage in real time.
[0052] Usually, the target process will be assigned to an independent control group (cgroup), where cgroup is a mechanism provided by the Linux kernel for limiting, managing and isolating system resources including CPU, memory, IO, etc. In this embodiment, the daemon process sets an IO resource limit (IO limit) for each target process through cgroup. In IO resource isolation, IO limit refers to a limit or constraint on input / output (IO) operations, which is used to control the use of IO resources by processes or systems. Therefore, the reserve value will also be limited by the IO limit. At the same time, the daemon process will also regularly read the io.stat file in the cgroup directory. The io.stat file records the cumulative read and write times and read and write bytes of the target process in the cgroup, and then subtracts the new and old values and divides them by the interval time to obtain the IOPS and BPS data of the target process. The IOPS and BPS data of the disk can also be obtained in this way.
[0053] The traditional approach to obtaining the upper limit of disk performance is to run a performance test in the early stage to calculate the limit value of the disk, but this increases the complexity of deployment. This embodiment effectively solves this problem by using business load to calculate disk performance.
[0054] Furthermore, the upper limit of disk performance is determined, including:
[0055] Gradually release the IO resource limit of the daemon process on each target process, and make the target process issue IO resources as much as possible, so as to obtain the peak values of the number of reads and writes per second and the number of bytes read and written per second;
[0056] When the IO usage of any target process decreases, the IO resource usage of some target processes other than the target process increases, and the total number of read and write times per second and the number of read and write bytes per second remain unchanged, it is determined that the disk has reached the performance upper limit, and the performance upper limit value is recorded.
[0057] It is impossible for the business to be in a full load state all the time. Therefore, the daemon process will continue to collect IO data. When the daemon process finds that the current disk IOPS or BPS usage is greater than the previous value, it means that the business load has increased. At this time, the daemon process enters the detection state. The goal of the detection state is to find the performance ceiling of the disk. Therefore, the daemon process will gradually relax the IO limit of each target process and let the target process issue IO resources as much as possible. In other words, in the detection state, IO resource regulation will be suspended, and then the peak IOPS and BPS in this process will be recorded. Reaching the performance ceiling means that the disk cannot handle more IO. Even if more IO is issued, the counted IOPS and BPS will not increase. Therefore, the IOPS and BPS values no longer increase is a necessary condition for judging that the performance ceiling has been reached, but it is not a sufficient condition, because it is possible that the business load is low, although the IOPS and BPS values no longer increase, it is far from the disk limit. When the disk reaches the performance limit, multiple processes will compete for IO resources. At this time, a phenomenon of "one process increases, the other decreases" will occur: if the IO usage of a target process decreases, the IO usage of some target processes other than this target process will increase, while the total IOPS and BPS remain unchanged. Once this phenomenon occurs and the total IOPS and BPS no longer increase, it can be determined that the disk has reached the performance limit.
[0058] At the same time, the detection process is not a one-time process, but will be carried out throughout the entire life cycle of the regulation. That is, once it is found that the IOPS or BPS usage at the current moment is greater than the previous value, the detection state will be re-entered in order to find the disk performance upper limit. However, when the business traffic is very low, the upper limit may not be found. At this time, the latest allocatable IO resource amount is determined based on the maximum IO resource amount obtained in the detection state. In this embodiment, 1.1 times the maximum IO resource amount is taken as the latest allocatable IO resource amount, because the performance upper limit value of the disk is likely to be greater than the current maximum value obtained. At the same time, if the coefficient is too large, the allocatable value is likely to exceed the actual upper limit, making the regulation ineffective.
[0059] S130, determining a resource allocation order according to the expected IO resource amount of each target process, and determining a resource allocation amount for each target process according to the latest allocatable IO resource amount, the expected IO resource amount and the corresponding current IO resource usage.
[0060] like Figure 3 As shown, after obtaining the current IO resource usage of each target process and the latest allocatable IO resource amount of the disk, resource allocation can be performed based on the expected IO resource amount of each target process.
[0061] Furthermore, IO resources are preferentially allocated to target processes whose expected IO resource amount is greater than zero, and when the expected IO resource amount is greater than the current IO resource usage, IO resources equal to a fixed multiple of the current IO resource usage are allocated to the target process; otherwise, IO resources equal to the current IO resource usage are allocated to the target process;
[0062] When there are unallocated resources after the first allocation, IO resources equal to the current IO resource usage are allocated to the target processes whose expected IO resource usage is zero in order from small to large.
[0063] When there are unallocated resources after the secondary allocation, additional IO resources equal to the difference between the current IO resource usage and the expected IO resource usage are allocated to the target processes whose expected IO resource usage is greater than zero and less than their current IO resource usage in order from small to large current IO resource usage;
[0064] When there are unallocated resources after three allocations, add IO resources equal to the preset ratio of the current IO resource usage to the target process whose current IO resource usage is equal to its IO resource limit;
[0065] When there are unallocated resources after four allocations, all remaining resources are evenly added to all target processes whose current IO resource usage is greater than their expected IO resource usage;
[0066] The sum of the IO resources allocated to each target process is saved as the IO resource limit in its respective control group.
[0067] Prioritize resource allocation for target processes with reserve>0. First, the current IO resource usage of the target process is recorded as current. When current < reserve, allocate IO resources equal to current*110% to the target process. Otherwise, allocate IO resources equal to current to the target process. The 110% here can be replaced with other appropriate values according to business needs. That is, the purpose of the first allocation is to meet the reserve constraint. If there are unallocated IO resources after this allocation, a second allocation is performed. This allocation is for target processes with reserve==0. Specifically, IO resources equal to their current are allocated to target processes that meet this condition in order of current from small to large. The second allocation is to try to meet the IO requirements of target processes that do not need reserved resources. If there are still unallocated IO resources after this allocation, a third allocation is performed. This allocation is for target processes with reserve > 0&¤t>reserve, specifically, in order of current from small to large, add IO resources equal to their respective current-reserve to the target processes that meet the condition. The third allocation is a supplement to the first allocation. The first allocation only meets the basic reserve needs of these target processes, but does not meet the current IO needs of the target processes. This part of the demand is supplemented in the third allocation. If there are still unallocated IO resources after this allocation, the fourth allocation will be carried out. This time, it is aimed at the target processes with current==limit, and IO resources equal to their respective current*10% will be added to them. This time, the goal is to give more IO resources to the currently restricted target processes. If there are still unallocated IO resources after this allocation, they will be evenly distributed to all target processes with current > reserve. This allocation is a bottom line, and all IO resources are allocated.
[0068] After the IO resource allocation is completed, the total number of IO resources allocated to each target process is saved as limit in each cgroup.
[0069] The IO resource isolation method provided in this embodiment effectively avoids the resource waste caused by the traditional method, and at the same time, by dynamically setting the IO limit, there is no need to update the kernel, thus cleverly avoiding the difficulty of implementing IO resource scheduling in the Linux kernel.
[0070] The IO resource isolation method provided in this embodiment is applicable to two types of resources, IOPS and BPS. The following uses IOPS as an example for comparison and explanation.
[0071] The IOPS capacity of an ordinary SSD disk is 3500. Suppose there are three target processes A, B and C that need to read and write this disk. The importance of these three target processes to the business is not the same. Target process A is more important and requires 2500 IOPS; target process B is second and requires 800 IOPS; target process C is not important and uses as many resources as possible.
[0072] The traditional isolation method sets limits for the three target processes, such as 2500 IOPS for A, 800 IOPS for B, and 600 IOPS for C. In this way, even if the two target processes B and C generate a large number of reads and writes, it will not affect the 2500 IOPS exclusively occupied by the target process A. The disadvantage of this method is that when the target process A is very busy and B and C are idle, the IO resource usage of the target process A cannot exceed 2500 IOPS, which means that 1400 IOPS is wasted.
[0073] In this embodiment, an expected reserved resource, i.e., reserve, is set for the target process. The IO scheduler will ensure that when the target process wants to use IO resources, it can use at least resources equal to reserve, with no upper limit. If the target process itself is idle and does not need so many IO resources, the resources reserved for it can be allocated to other target processes. Specifically, reserve is set for these three target processes: A's reserve is 2500 IOPS, B's reserve is 800 IOPS, and C's reserve is 0 IOPS. If these three target processes have a large number of read and write operations at the same time, then according to the definition, target process A can use 2500 IOPS, target process B can use 800 IOPS, and target process C can use the remaining 600 IOPS. If target process A currently only needs to use 500 IOPS, the other 2000 IOPS reserved for it can be used by B and C. For example, let target processes B and C share 3400 IOPS equally, that is, target processes B and C can each use 1700 IOPS.
[0074] Compared with the traditional limit-based IO resource isolation method, the reserve-oriented IO resource isolation method in this embodiment can effectively avoid resource waste and improve IO resource utilization.
[0075] Example 2
[0076] like Figure 4 As shown, a device for isolating IO resources includes:
[0077] A setting module 10, used to set an expected IO resource amount for each target process;
[0078] The acquisition module 20 is used to determine the latest allocatable IO resource amount of the disk and obtain the current IO resource usage of each target process;
[0079] The allocation module 30 is used to determine the resource allocation order according to the expected IO resource amount of each target process, and determine the resource allocation amount of each target process according to the latest allocatable IO resource amount, the expected IO resource amount and the corresponding current IO resource usage.
[0080] One implementation of the above-mentioned device may be: the setting module 10 sets the expected IO resource amount for each target process; the acquisition module 20 determines the latest allocatable IO resource amount of the disk, and obtains the current IO resource usage of each target process; the allocation module 30 determines the resource allocation order according to the expected IO resource amount of each target process, and determines the resource allocation amount of each target process according to the latest allocatable IO resource amount, the expected IO resource amount and the corresponding current IO resource usage.
[0081] Example 3
[0082] like Figure 5 As shown, an electronic device includes a memory 501 and a processor 502, wherein the memory 501 is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 502 to implement the above-mentioned IO resource isolation method.
[0083] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the electronic device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0084] A computer-readable storage medium storing a computer program, wherein the computer program enables a computer to implement the above-mentioned method of isolating IO resources when executed.
[0085] Exemplarily, the computer program may be divided into one or more modules / units, one or more modules / units are stored in the memory 501 and executed by the processor 502, and the input interface 505 and the output interface 506 complete the I / O interface transmission of data to complete the present invention. The one or more modules / units may be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the computer device.
[0086] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may include, but is not limited to, a memory 501 and a processor 502. Those skilled in the art may understand that this embodiment is only an example of a computer device and does not constitute a limitation on the computer device. The computer device may include more or fewer components, or a combination of certain components, or different components. For example, the computer device may also include an input device 507, a network access device, a bus, etc.
[0087] The processor 502 may be a central processing unit (CPU), or other general-purpose processors 502, digital signal processors 502 (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor 502 may be a microprocessor 502 or the processor 502 may also be any conventional processor 502, etc.
[0088] The memory 501 may be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. The memory 501 may also be an external storage device of the computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Further, the memory 501 may also include both an internal storage unit of the computer device and an external storage device. The memory 501 is used to store computer programs and other programs and data required by the computer device. The memory 501 may also be used to temporarily store in the output device 508, and the aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory ROM503, a random access memory RAM504, a disk or an optical disk.
[0089] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A method for isolating IO resources, characterized in that: The following steps are involved: Set the expected IO resource amount for each target process; Determine the latest allocatable IO resource amount of the disk and obtain the current IO resource usage of each target process; The resource allocation order is determined according to the expected IO resource amount of each target process, and the resource allocation amount of each target process is determined according to the latest allocatable IO resource amount, the expected IO resource amount and the corresponding current IO resource usage.
2. The method for isolating IO resources according to claim 1, characterized in that: The method further comprises: A daemon process is deployed on the host, and the daemon process is used to set the IO resource limit of each target process and collect its current IO resource usage in real time.
3. The method for isolating IO resources according to claim 2, characterized in that: The real-time collection of the current IO resource usage includes: The daemon process is used to periodically read the cumulative read and write times and the number of bytes read and written of the target process in each control group, and the read and write times per second and the number of bytes read and written per second of each target process are calculated based on the interval time and the cumulative read and write times and the number of bytes read and written.
4. The method for isolating IO resources according to claim 2, characterized in that: The determining the latest allocatable IO resource amount of the disk includes: Get the current disk read and write times per second and the number of read and write bytes per second, and compare them with the historical values; When the current number of read and write times per second or the number of read and write bytes per second is greater than the historical value, a detection state is entered to determine the upper limit of the performance of the disk; The performance upper limit value is used as the latest allocatable IO resource amount of the disk.
5. The method for isolating IO resources according to claim 4, characterized in that: Determining the upper limit value of the performance of the disk includes: Gradually release the IO resource limit of the daemon process on each target process, and make the target process issue IO resources as much as possible, so as to obtain the peak values of the number of reads and writes per second and the number of bytes read and written per second; When the IO usage of any target process decreases, the IO resource usage of some target processes other than the target process increases, and the total number of read and write times per second and the number of read and write bytes per second remain unchanged, it is determined that the disk has reached the performance upper limit, and the performance upper limit value is recorded.
6. The method for isolating IO resources according to claim 4, characterized in that: The method further comprises: When the performance upper limit of the disk cannot be determined, the latest allocatable IO resource amount is determined according to the maximum IO resource amount obtained in the detection state.
7. The method for isolating IO resources according to claim 1, characterized in that: The determining of the resource allocation order according to the expected IO resource amount of each target process, and determining the resource allocation amount of each target process according to the latest allocatable IO resource amount, the expected IO resource amount and the corresponding current IO resource usage, includes: Prioritize the allocation of IO resources to target processes whose expected IO resource amount is greater than zero. When the expected IO resource amount is greater than the current IO resource usage, allocate IO resources equal to a fixed multiple of the current IO resource usage. Otherwise, allocate IO resources equal to the current IO resource usage. When there are unallocated resources after the first allocation, IO resources equal to the current IO resource usage are allocated to the target processes whose expected IO resource usage is zero in order from small to large. When there are unallocated resources after the secondary allocation, additional IO resources equal to the difference between the current IO resource usage and the expected IO resource usage are allocated to the target processes whose expected IO resource usage is greater than zero and less than their current IO resource usage in order from small to large current IO resource usage; When there are unallocated resources after three allocations, add IO resources equal to the preset ratio of the current IO resource usage to the target process whose current IO resource usage is equal to its IO resource limit; When there are unallocated resources after four allocations, all remaining resources are evenly added to all target processes whose current IO resource usage is greater than their expected IO resource usage; The sum of the IO resources allocated to each target process is saved as the IO resource limit in its respective control group.
8. A device for isolating IO resources, characterized in that: include: The setting module is used to set the expected IO resource amount for each target process; The acquisition module is used to determine the latest allocatable IO resource amount of the disk and obtain the current IO resource usage of each target process; The allocation module is used to determine the resource allocation order according to the expected IO resource amount of each target process, and determine the resource allocation amount of each target process according to the latest allocatable IO resource amount, the expected IO resource amount and the corresponding current IO resource usage.
9. An electronic device, characterized in that: It comprises a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement an IO resource isolation method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: The computer program enables a computer to implement an IO resource isolation method according to any one of claims 1 to 7 when executed.