Multi-thread IO speed limiting method and device, electronic equipment and storage medium
By maintaining a leaky bucket rate limiter object independently for each thread, and dynamically calculating available space and critical point synchronization, the lock contention problem caused by traditional locking synchronization is solved, thus improving multi-threaded I/O performance.
Patent Information
- Application Number
- CN202511712060.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-20
- Publication Date
- 2026-02-24
AI Technical Summary
In multi-threaded I/O scenarios of distributed block storage systems, traditional locking synchronization schemes lead to frequent lock contention, increasing thread context switching and degrading I/O performance.
Each thread independently maintains a leaky bucket rate limiter object, including a rate limit statistician, rate limit quota, and instantaneous allocation space. By dynamically calculating the available space and using a critical point synchronization mechanism, lock contention is avoided, thus achieving I/O rate limiting.
It effectively avoids frequent lock contention, reduces thread synchronization overhead, and significantly improves IO performance.
Smart Images

Figure CN121560232A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of rate limiting technology, and in particular to a method, apparatus, electronic device and storage medium for I / O rate limiting under multi-threading. Background Technology
[0002] In multi-threaded I / O (Input / Output) scenarios of distributed block storage systems, when multiple concurrent threads make requests to the same disk device, a coordination mechanism must be used to ensure that the overall I / O rate does not exceed a preset threshold. Although traditional locking synchronization schemes can precisely control traffic, high-frequency lock contention leads to increased thread context switching, increased I / O queue latency, and ultimately, a decrease in I / O performance. Summary of the Invention
[0003] In view of this, in order to alleviate the problem of IO performance degradation caused by frequent lock operations in multi-threaded environments, it is necessary to optimize the rate limiting mechanism to reduce lock contention. This application provides an IO rate limiting method, device, electronic device and storage medium under multi-threaded environments.
[0004] In a first aspect, embodiments of this application provide a multi-threaded I / O rate limiting method. The method is applied to a multi-threaded I / O request processing scenario on a client. Each thread independently maintains a leaky bucket rate limiter object. The leaky bucket rate limiter object includes a rate limiting statistician for real-time recording of consumed quota, a rate limiting quota for controlling the decay rate of the rate limiting statistician, and an instantaneous allocation space for characterizing the upper limit of the burst quota amount of the leaky bucket. The method includes: Upon receiving an IO request from the client, the current value of the rate limit statistician is read; wherein, the current value is used to represent the consumed quota; The available space of the leaky bucket is determined based on the current value, the rate limit quota, and the instantaneous delivery space; wherein, the available space refers to the amount of quota in the current leaky bucket that can be used to process IO requests; Detect whether the number of I / O requests exceeds the available space; When the number of requests is detected to be less than the available space, the received IO requests are allowed to be sent to the disk device, and the number of IO requests is added to the rate limiting statistician to update the current value; When the number of requests exceeds the available space, a thread lock is acquired, and the quota management pool is accessed through the thread lock. The target rate-limiting quota is obtained from the quota management pool, and the instantaneous distribution space is increased based on the target rate-limiting quota. Additionally, a rate-limiting quota that can be used to distribute the IO requests is added. The quota management pool is deployed on the client and protected by the thread lock. It is used to store the global IO request rate-limiting quota of the disk device.
[0005] Optionally, as described above, determining the available space of the leaky bucket based on the current value, the rate limit quota, and the instantaneous distribution space includes: Get the current time and the last update time; wherein, the last update time is the timestamp of the last time the leaky bucket rate limiter processed an IO request or updated the quota status; The time interval is determined based on the current time and the last update time; The current water volume is determined based on the speed limit quota, the time interval, and the current value; wherein, the current water volume represents the amount of quota currently occupied in the leaky bucket; Subtract the instantaneous data transmission space from the current water volume to determine the result; The minimum value between the calculation result and the instantaneous distribution space is taken as the available space.
[0006] Optionally, as described above, determining the current water volume based on the speed limit quota, the time interval, and the current value includes: The speed limit quota is multiplied by the time interval to determine the quota recovery amount; The current water volume is determined by subtracting the current value from the quota recovery amount.
[0007] Optionally, as described above, the method further includes: Upon detecting the completion of the instantaneous delivery space event, the thread lock is immediately released.
[0008] Optionally, as described above, obtaining the target rate-limiting quota from the quota management pool includes: Obtain the current remaining speed limit quota from the quota management pool; Check if the current remaining speed limit quota is zero; When it is detected that the current remaining speed limit quota is not zero, the target speed limit quota is determined according to the preset acquisition ratio and the current remaining speed limit quota; Obtain the target speed limit quota from the current remaining speed limit quota.
[0009] Optionally, as described above, the step of spatially expanding the instantaneous allocation space based on the target speed limit quota includes: The potential for improvement is determined based on the target speed limit quota, the speed limit quota, and the proportional coefficient; wherein, the proportional coefficient is a fixed proportional factor used to convert the speed limit quota into an instantaneous burst quota amount; The instantaneous delivery space is improved based on the improved space.
[0010] Optionally, as described above, when the number of requests is detected to exceed the available space, the method further includes: A preset proportion of the current value is placed in the quota management pool to restore the quota corresponding to the same value, while the instantaneous distribution space statistician in the quota management pool accumulates the value.
[0011] Optionally, as described above, the method further includes: When the rate limit statistician is detected to be continuously zero, the thread lock is acquired, the quota management pool is entered through the thread lock, and the target rate limit quota is returned to the quota management pool. Upon detecting a completion event of rate limit quota repayment, the thread lock is immediately released.
[0012] Optionally, as described above, the method further includes: When an idle state is detected, the thread lock is periodically acquired, and the quota management pool is accessed through the thread lock to read the statistical values of the instantaneous distribution space statistician. Check if the statistical value is zero; If the statistical value is detected to be non-zero, the statistical value is added to the speed limit statistical device, the statistical value is attenuated according to the speed limit quota, and the instantaneous distribution space statistical device is cleared of the statistical value.
[0013] Secondly, embodiments of this application provide a multi-threaded I / O rate limiting device. The device is applied to a multi-threaded I / O request processing scenario on a client. Each thread independently maintains a leaky bucket rate limiter object. The leaky bucket rate limiter object includes a rate limiting statistician for real-time recording of consumed quota, a rate limiting quota for controlling the decay rate of the rate limiting statistician, and an instantaneous allocation space for characterizing the upper limit of the leaky bucket's burst quota. The device includes: The reading module is used to read the current value of the rate limit statistician when it receives an IO request from the client; wherein the current value is used to represent the consumed quota; The determination module is used to determine the available space of the leaky bucket based on the current value, the rate limit quota, and the instantaneous distribution space; wherein, the available space refers to the amount of quota in the leaky bucket that can be used to process IO requests. The detection module is used to detect whether the number of IO requests exceeds the available space; The update release module is used to release the received IO request to the disk device when it is detected that the request volume does not exceed the available space, and to add the request volume of the IO request to the rate limit statistician to update the current value; The rate-limiting application module is used to acquire a thread lock when the number of requests exceeds the available space, enter the quota management pool through the thread lock, obtain the target rate-limiting quota from the quota management pool, increase the instantaneous distribution space based on the target rate-limiting quota, and increase the rate-limiting quota that can be used to distribute the IO requests; wherein, the quota management pool is deployed on the client and protected by the thread lock, and is used to store the global IO request rate-limiting quota of the disk device.
[0014] Thirdly, embodiments of this application provide an electronic device, which includes a processor and a memory. The processor is used to execute a program for multi-threaded I / O rate limiting stored in the memory to implement the above-described multi-threaded I / O rate limiting method.
[0015] Fourthly, embodiments of this application provide a storage medium that stores one or more programs, which can be executed by one or more processors to implement the above-described multi-threaded I / O rate limiting method.
[0016] The multi-threaded I / O rate limiting method, device, electronic device, and storage medium provided in this application embodiment achieve I / O request rate limiting while effectively avoiding frequent lock contention through quota isolation and critical point synchronization mechanisms. Its core process is as follows: upon receiving an I / O request from the client, the current value of the rate limiting statistic (i.e., the consumed quota) is first read, and the available space of the leaky bucket is dynamically calculated in combination with the preset rate limiting quota and instantaneous allocation space. If the request volume does not exceed the available space, the request is directly allowed to the disk device and the statistical value is updated. If the request volume exceeds the available space, the quota management pool deployed on the client is securely accessed through a thread lock, the target rate limiting quota is obtained from the global I / O request rate limiting quota, and the instantaneous allocation space is temporarily increased to handle the excess requests. This design allows threads to operate autonomously within their quotas through independent quota allocation, completely eliminating the thread contention and context switching overhead caused by traditional locking mechanisms. Simultaneously, by strictly limiting synchronization operations to the critical scenario of quota application, the frequency of lock contention is significantly reduced, thereby significantly improving I / O performance. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 A flowchart illustrating an embodiment of a multi-threaded I / O rate limiting method provided in this application; Figure 2 A flowchart illustrating another embodiment of a multi-threaded I / O rate limiting method provided in this application; Figure 3 A flowchart illustrating another embodiment of a multi-threaded I / O rate limiting method provided in this application; Figure 4 A flowchart illustrating another embodiment of a multi-threaded I / O rate limiting method provided in this application; Figure 5 A block diagram illustrating an embodiment of a multi-threaded I / O rate limiting device provided in this application; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0021] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0022] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0023] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0024] Foundational technologies in artificial intelligence generally include sensors, dedicated AI chips, cloud computing, storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0025] It should be understood that the sequence number of each step in the following embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0026] To facilitate understanding of the embodiments of this application, the following will provide further explanation and description with reference to the accompanying drawings and specific embodiments. These embodiments do not constitute a limitation on the embodiments of this application.
[0027] This application provides a multi-threaded IO rate limiting method. This method is applied to a multi-threaded IO request processing scenario on a client. Each thread independently maintains a leaky bucket rate limiter object. The leaky bucket rate limiter object includes a rate limiter statistic for real-time recording of consumed quota, a rate limiter quota for controlling the decay rate of the rate limiter statistic, and an instantaneous allocation space for characterizing the upper limit of the burst quota of the leaky bucket.
[0028] The rate limit statistician is a simple counter. When an IO passes the rate limit and can be sent, the value is incremented by 1. However, it cannot exceed the value of the instantaneous sending space. If it does, it means that the IO has triggered the rate limit and the logic of global rate limit allocation needs to be executed (described later).
[0029] The aforementioned rate limit quota is a preset baseline processing rate. The recovery rate of the quota (IOPS (Input Output Operations Per Second) and / or bandwidth) is adjusted by controlling the decay rate of the rate limit statistic. In this embodiment, the quota is IOPS as an example. For instance, when the rate limit quota is set to 100 IOPS / s, then 0.1 IOPS quota is restored every millisecond, gradually replenishing processing capacity over time.
[0030] The instantaneous delivery space is designed based on the leaky bucket algorithm, serving as a buffer limit for short-term burst processing capacity. It can be understood as the maximum capacity of the leaky bucket, typically set to 10%-20% of the rate limit quota. For example, when the rate limit quota is 100 IOPS / s, the instantaneous delivery space is set to 10-20 IOPS, representing the peak IO request that can be allowed in a single instance. The 10%-20% is a fixed proportional factor, or proportional coefficient, used to convert the rate limit quota into an instantaneous burst quota. This proportional coefficient can be set according to actual conditions and is not limited here.
[0031] The significance of this instantaneous delivery space is that actual user IO requests are generally not delivered evenly at time intervals, but rather a large number of IO requests are delivered at certain times and no IO requests are delivered at other times. Therefore, it is designed to quickly deliver a large number of IO requests in a short period of time without exceeding the rate limit.
[0032] It's important to note that the leaky bucket rate limiter object maintained independently by each thread is fully customizable in terms of configuration. This allows all threads to use the exact same rate limiting parameters (such as uniform rate limit quotas and instantaneous delivery space) to achieve a globally consistent flow control strategy. Alternatively, it supports setting differentiated rate limiting parameters for each thread based on their business priority or resource needs (e.g., allocating more instantaneous delivery space or higher rate limit quotas to high-priority threads, while imposing stricter restrictions on low-priority threads). This flexible configuration approach enables the system to adapt to diverse business scenarios. Whether it's a simple scenario requiring strict and uniform rate limiting or a complex scenario requiring tiered protection, precise flow control can be achieved through thread-independent leaky bucket rate limiters. The choice between using the same or differentiated configuration depends entirely on actual business needs and technical implementation choices, and does not affect the core functionality of the rate limiting mechanism.
[0033] Based on the above description, see Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of a multi-threaded I / O rate limiting method provided in this application. Figure 1 The process shown may include the following steps: Step 101: Upon receiving an IO request from the client, read the current value of the rate limit statistician; where the current value is used to indicate the quota already consumed. As a core status monitoring component, the rate limiter provides a foundation for subsequent available space calculations by accurately recording historical consumption data. Its design employs atomic operations to ensure data consistency in a multi-threaded environment, avoiding statistical deviations caused by concurrent access.
[0034] Step 102: Determine the available space of the leaky bucket based on the current value, rate limit quota, and instantaneous distribution space; where available space refers to the amount of quota in the current leaky bucket that can be used to process IO requests. Rate-limited quotas serve as the baseline processing rate, controlling the quota recovery speed, while instantaneous allocation space sets the upper limit for burst processing capacity. Through the coordinated calculation of these three factors, the amount of IO request quota that can still be processed can be assessed in real time. If the determined available space is 10 IOPS, it means that the maximum number of IO requests that can be immediately allowed is 10. For ease of understanding, the process of determining the available space described above can be found in [reference needed]. Figure 2 The specific steps shown are as follows: Step 201: Obtain the current time and the last update time; where the last update time is the timestamp of the last time the leaky bucket rate limiter processed an IO request or updated the quota status; The client records two key timestamps: the current time (accurate to milliseconds) and the time when the leaky bucket rate limiter last allowed an I / O request or updated the quota status (i.e., the last update time). For example, the timestamp of the last allowed I / O request is 12:00:00.500, and the current time is 12:00:01.200. These two timestamps will be used to calculate the quota recovery amount. Obtaining these two times requires a thread-safe, high-precision clock (such as C++'s std::chrono::steady_clock) to avoid timing errors in a multi-threaded environment.
[0035] Step 202: Determine the time interval based on the current time and the last update time; Based on the two times from step 201, the time interval is determined by subtracting the current time from the last update time. Continuing the previous example, the time interval is 0.7 seconds: current time 12:00:01.200 - last update time 12:00:00.500.
[0036] Step 203: Determine the current water volume based on the speed limit quota, time interval, and current value; where the current water volume represents the amount of quota currently occupied in the leaky bucket. The process for determining the current water volume is as follows: multiply the speed limit quota by the time interval to determine the quota recovery amount; subtract the current value from the quota recovery amount to determine the current water volume. The corresponding formula for calculating the current water volume is: Current water volume = Current value - (Speed limit quota × Time interval).
[0037] For example: if the current value is 150 IOPS, the rate limit quota is 100 IOPS / s, and the time interval is 0.7 seconds, then the quota recovery amount is 70 IOPS, and the current water volume is 150-70=80 IOPS. If the current value is 80 IOPS and the time interval is 0.5 seconds, then the current water volume is 80-50=30 IOPS. This step ensures that quota consumption automatically decays over time, which conforms to the core characteristics of the leaky bucket algorithm.
[0038] Step 204: Subtract the instantaneous data release space from the current water volume to determine the result; The above calculation result can be achieved through the following formula: Calculation result = Instantaneous distribution space - Current water volume.
[0039] For example, if the instantaneous download space is 100 IOPS and the current water volume is 30 IOPS, then the calculation result is 70 IOPS (meaning that 70 IO requests can be processed immediately).
[0040] In actual calculations, when the result is negative, the result can be set to automatically return to zero. If negative values are allowed, the system may mistakenly believe that IO requests can still be allowed, resulting in over-issuance of the actual quota. The zeroing operation forces the quota application process to ensure the strictness of the rate limit quota allocation.
[0041] Step 205: Take the minimum value between the calculation result and the instantaneous distribution space as the available space.
[0042] Available space = min(calculation result, instantaneous distribution space) For example, if the instantaneous download space is 100 IOPS and the calculation result is 70 IOPS (positive value), then the available space is 70 IOPS.
[0043] This design ensures that the available space does not exceed the upper limit of the instantaneous allocation space (such as 100 IOPS), while negative values are automatically reset to zero to avoid invalid quota allocation.
[0044] Step 103: Check if the number of IO requests exceeds the available space; The number of I / O requests is compared with the calculated available space. This detection process uses a lock-free design. When the number of requests does not exceed the available space, the process immediately proceeds to the allowance step 104; if it exceeds the available space, the rate-limiting quota replenishment mechanism is triggered, and step 105 is executed. This step is a critical decision node that directly controls whether I / O requests are allowed or blocked.
[0045] Step 104: Allow the received IO requests to the disk device and add the number of IO requests to the rate limiting statistician to update the current value; The thread directly allows IO requests to the disk device for read / write operations. After allowing the request, the current value of the rate limit statistic is updated synchronously, and the cumulative amount of IO requests is the amount of quota consumed by this request. Continuing the previous example, the available space is 10 IOPS, the current value is 20 IOPS, and the amount of requests this time is 5. Since allowing one IO request consumes one IOPS, if 5 IO requests can be allowed, then 5 IO requests will be consumed, and the updated current value will be 20 + 5 = 25 IOPS.
[0046] Update operations are implemented using CAS (Compare-And-Swap) atomic instructions, ensuring thread safety for data updates in a multi-threaded environment. During this process, both allowing and updating do not require synchronization with other threads through lock contention, thus avoiding the performance overhead associated with traditional locking mechanisms.
[0047] Step 105: Acquire the thread lock, enter the quota management pool through the thread lock, obtain the target rate limit quota from the quota management pool, increase the instantaneous distribution space based on the target rate limit quota, and increase the rate limit quota that can be used to distribute IO requests. The quota management pool, deployed on the client side and protected by thread locks, stores the global I / O request rate limit quotas for disk devices. It can be understood as a shared resource pool maintained internally by the client, centrally storing the total allowed global I / O request rate limit quotas for disk devices (e.g., a write limit of 1000 IOPS). These rate limit quotas can be requested and used by all threads. The quota management pool implements thread-safe access through thread locks (such as mutexes). When a thread requests a rate limit quota from the pool, the request process ensures that only one thread enters the quota management pool to acquire the target rate limit quota at a time through locking. If there are no remaining rate limit quotas in the pool, the thread must wait for other threads to return their rate limit quotas before continuing its operation. This mechanism ensures that the total I / O requests of all threads do not exceed the global processing capacity limit of the disk device, and also achieves fair scheduling among multiple threads through fine-grained rate limit quota allocation.
[0048] Threads enter the protected quota management pool through fine-grained locking mechanisms. After successfully obtaining the target rate limit quota from the globally shared IO request rate limit quota, the instantaneous allocation space is increased, thereby increasing the available space and quickly allowing excess backlogged IO requests to be released.
[0049] The process of increasing the instantaneous distribution space based on the target speed limit quota is as follows: determine the increase space based on the target speed limit quota, the speed limit quota, and the proportional coefficient; and increase the instantaneous distribution space based on the increase space. The corresponding calculation formula is: Increased instantaneous distribution space = Instantaneous distribution space + (Speed limit quota + Target speed limit quota) × Proportional coefficient.
[0050] To ensure consistency in the calculations, all terms in the above formula need to be unified under the dimension of "capacity." "Rate limit quota" and "target rate limit quota" typically represent a rate (e.g., 100 IOPS / s), but when multiplied by a dimensionless scaling factor, their product takes on the meaning of "capacity" or "quota amount," usually in IOPS. The scaling factor plays a crucial conversion role here, transforming a rate value (IOPS / s) into an instantaneous increase in capacity (IOPS). Therefore, when applying this formula, the focus is on the numerical value of these quotas, using the scaling factor to convert them from a rate concept into an adjustment to the bucket's capacity.
[0051] In this embodiment, based on specific numerical values and the above formula, we will explain in detail how to improve the instantaneous delivery space and available space, and finally realize the process of quickly releasing excess backlogged IO requests. For example, if the number of IO requests is 8, the current instantaneous delivery space is 10 IOPS, and the current water volume is also 10 IOPS, the available space is min(instantaneous delivery space 10 IOPS - current water volume 10 IOPS, instantaneous delivery space 10 IOPS) = 0 IOPS. This indicates that there is not enough IOPS quota to accommodate the IO requests. The space needs to be increased using the target rate-limiting quota obtained from the quota management pool. If both the rate-limiting quota and the target rate-limiting quota are 100 IOPS / s, and the ratio is 10%, then the increased instantaneous delivery space is 10 IOPS + (100 IOPS / s + 100 IOPS / s) × 10% = 30 IOPS. The available space is then increased to min(increased instantaneous delivery space 30 IOPS - current water volume 10 IOPS, increased instantaneous delivery space 30 IOPS) = 20 IOPS. Since the quota consumption for 8 requests is 8, the available space is less than the required quota for 8 requests. The available space has increased to 20 IOPS, so these 8 IO requests can be allowed.
[0052] On the other hand, since the current rate limit quota has also been increased from the rate limit quota to the rate limit quota plus the target rate limit quota, this will accelerate the decay speed of the rate limit statistician, thereby restoring the available quota more quickly in order to support the issuance of subsequent IO requests.
[0053] This process employs a precise critical section isolation design, strictly limiting synchronous operations to the quota application critical point, which ensures thread safety in quota management while minimizing the impact of lock contention on I / O performance.
[0054] In practical applications, to minimize the time a thread holds the lock, it will immediately release the lock when it detects that the instantaneous space allocation has completed. This design avoids unnecessary lock holding by quickly releasing the lock, reduces the waiting time of other threads, and effectively prevents lock contention hotspots.
[0055] In this scheme, each thread maintains its own leaky bucket rate limiter object, ensuring that quota statistics are bound to the thread and do not interfere with each other. When a thread detects that an IO request has not exceeded the available space, it can autonomously decide to allow the IO without synchronizing with other threads through locks, completely avoiding the synchronization overhead between multiple threads. Only when a thread detects that an IO request has exceeded the available space does it need to acquire a lock to obtain the target rate limit quota from the global IO request rate limit quota, temporarily increasing the instantaneous allocation space to handle the excess requests. This lock acquisition operation is strictly limited to the critical scenario of quota application, which greatly reduces the frequency of lock contention, thereby significantly improving IO performance.
[0056] like Figure 3 As shown, as an optional implementation, the method described above, step 105 of obtaining the target rate-limited quota from the quota management pool includes the following steps: Step 301: Obtain the current remaining rate-limited quota from the quota management pool; The remaining rate-limiting quota is retrieved from a quota management pool protected by a thread lock. For example, if the quota management pool is initially set to 1000 IOPS / s, and other threads have already requested a cumulative 600 IOPS / s, then the current remaining rate-limiting quota is 400 IOPS / s. This operation must guarantee atomicity to prevent data inconsistency caused by multiple threads reading simultaneously. In high-concurrency scenarios, double buffering or CAS instructions can be used to optimize read performance.
[0057] Step 302: Check if the current remaining speed limit quota is zero; When the remaining rate-limit quota reaches zero, this state means that the current thread can no longer obtain any available rate-limit quota from the global quota management pool. This also indicates that the total quota being used by all threads has reached the preset disk device processing limit. At this point, it is necessary to forcibly pause the thread's I / O requests to allow them to proceed. This design ensures that the disk device will not be overloaded due to sudden traffic surges. Therefore, a thread can only proceed with the rate-limit quota acquisition process if the current remaining rate-limit quota is not zero.
[0058] Step 303: When it is detected that the current remaining speed limit quota is not zero, determine the target speed limit quota according to the preset acquisition ratio and the current remaining speed limit quota; When the current remaining speed limit quota is greater than 0, the target speed limit quota is determined according to a preset acquisition ratio (e.g., 20%). The calculation formula is: Target speed limit quota = Preset acquisition ratio × Current remaining speed limit quota.
[0059] For example, if the current remaining rate limit quota is 400 IOPS / s and the preset acquisition ratio is 20%, then the target rate limit quota is 80 IOPS / s. This design achieves fine-grained quota allocation, avoiding resource monopoly by a single thread. The preset acquisition ratio can be dynamically adjusted through a configuration file.
[0060] Step 304: Obtain the target speed limit quota from the current remaining speed limit quota.
[0061] Extract the target rate limit quota from the current remaining rate limit quota. Then the rate limit quota of a thread is the target rate limit quota + the rate limit quota. For example, if the rate limit quota of thread A is 100 IOPS / s, and the target rate limit quota is 100 IOPS / s, then thread A can restore its quota at 200 IOPS / s. This method of applying for rate limit quota can speed up quota restoration and increase the instantaneous distribution space according to the new rate limit quota. This design can improve both long-term processing capacity and short-term burst capacity at the same time, thereby achieving a step-by-step leap in throughput capacity while ensuring the accuracy of rate limit.
[0062] Simultaneously, the rate-limiting quotas in the quota management pool need to be updated to ensure the accuracy of subsequent rate-limiting quota applications. Specifically, after a thread successfully extracts a target rate-limiting quota from the current remaining rate-limiting quota, a deduction operation is immediately performed, precisely subtracting the target rate-limiting quota from the current remaining rate-limiting quota, thus generating an updated new current remaining rate-limiting quota. For example, if the current remaining rate-limiting quota is 400 IOPS / s, and thread A obtains a target rate-limiting quota of 100 IOPS / s, the new current remaining rate-limiting quota will be 300 IOPS / s.
[0063] See Figure 4 , Figure 4A flowchart illustrating another embodiment of a multi-threaded I / O rate limiting method provided in this application. Figure 4 The process shown may include the following steps: Step 401: Upon receiving an IO request from the client, read the current value of the rate limit statistician; where the current value is used to indicate the quota already consumed. Step 402: Determine the available space of the leaky bucket based on the current value, rate limit quota, and instantaneous distribution space; where available space refers to the amount of quota in the current leaky bucket that can be used to process IO requests. Step 403: Check if the number of IO requests exceeds the available space; Step 404: When the number of requests is detected to be less than the available space, the received IO requests are allowed to the disk device, and the number of IO requests is added to the rate limit statistician to update the current value. Step 405: When the number of requests exceeds the available space, acquire the thread lock, enter the quota management pool through the thread lock, obtain the target rate limit quota from the quota management pool, increase the instantaneous distribution space based on the target rate limit quota, and increase the rate limit quota that can be used to distribute IO requests. At the same time, place a preset proportion of the current value in the quota management pool to restore the quota corresponding to the same value, and add the value to the instantaneous distribution space statistician in the quota management pool. The process of obtaining the target speed limit quota in steps 401 to 404, and the process of increasing the instantaneous distribution space based on the target speed limit quota, can be found in steps 101 to 104 of the above embodiments, and will not be repeated here.
[0064] In practical applications, to quickly restore IO delivery capabilities, i.e., to quickly restore consumed quotas, a preset proportion (50%, adjustable) of the current value (200 IOPS) (100 IOPS) can be placed in a quota management pool. This allows threads to instantly restore the corresponding quota (100 IOPS), while the value placed in the quota management pool can be promptly decayed by idle threads. This design improves short-term burst capability.
[0065] Step 406: When an idle state is detected, periodically acquire a thread lock, enter the quota management pool through the thread lock, and read the statistical values of the instantaneous space statistics device. The instantaneous delivery space counter is also a simple counter. When a thread delivers the above value, the value is incremented. For example, if thread A delivers 100 IOPS and thread B also delivers 100 IOPS, then the value in the instantaneous delivery space counter will be 200 IOPS.
[0066] Step 407: Check if the statistical value is zero; If the detected statistical value is zero, there is no need to perform the subsequent process of accumulating the statistical value to the counter and attenuating the statistical value according to the speed limit quota. Step 408 is only executed if the statistical value is not zero.
[0067] Step 408: If the detected statistical value is not zero, the statistical value is accumulated to the speed limit statistical device, the statistical value is attenuated according to the speed limit quota, and the instantaneous distribution space statistical device is cleared of the statistical value.
[0068] The statistical value is accumulated to the rate limit metric (e.g., from 0 IOPS to 20 IOPS), and the accumulated value is decayed according to the rate limit quota (e.g., 100 IOPS / s) (e.g., decaying by 10 IOPS every 0.1 seconds). While accumulating the statistical value to the rate limit metric, the instantaneous distribution spatial metric needs to be updated to clear the statistical value.
[0069] It is important to note that when the statistical value reaches or exceeds the instantaneous delivery space of a thread, precise quota decay control will be executed. That is, only the portion of the statistical value corresponding to the instantaneous delivery space will be added to the rate limiting statistician, while the excess portion will be automatically truncated. This protective mechanism maintains the capacity limit of the instantaneous delivery space from being exceeded, and achieves precise decay of the rate limiting statistician through selective accumulation. Thus, in the case of sudden traffic, it ensures the strict execution of the rate limiting rules and avoids quota management failure due to numerical overflow.
[0070] In practical applications, to prevent the invalid occupation of rate-limiting quotas and ensure that other active threads can obtain the required rate-limiting quotas in a timely manner, it is necessary to acquire a thread lock when the rate-limiting statistician is detected to be continuously zero, enter the quota management pool through the thread lock, and return the target rate-limiting quota to the quota management pool; when the rate-limiting quota return is detected to be completed, the thread lock should be released immediately.
[0071] When a thread detects that its local rate limit statistic value is continuously zero (e.g., 0 IOPS for three consecutive detection cycles), it indicates that the thread currently has no IO request requirement. At this point, the thread will actively acquire a global thread lock. After successfully acquiring the lock, the thread will enter the quota management pool and then return the target rate limit quota (e.g., 100 IOPS / s) previously requested by the thread to the pool in its entirety. Simultaneously, the remaining rate limit quota in the quota management pool needs to be updated.
[0072] Once the rate limit quota return operation is complete (detectable via status code or event flag), the thread immediately releases the thread lock it holds. After the lock is released, the thread's rate limit quota will be reset to the base quota, and any temporarily increased instantaneous allocation space will be cleared. The entire process must ensure that lock release strictly occurs after all critical section operations to avoid priority inversion issues.
[0073] This application provides a multi-threaded I / O rate limiting device. This device is applied to a multi-threaded I / O request processing scenario on a client. Each thread independently maintains a leaky bucket rate limiter object. The leaky bucket rate limiter object includes a rate limiting statistician for real-time recording of consumed quota, a rate limiting quota for controlling the decay rate of the rate limiting statistician, and an instantaneous allocation space for characterizing the upper limit of the leaky bucket's burst quota. See [link to relevant documentation]. Figure 5 This is a block diagram illustrating an embodiment of a multi-threaded I / O rate limiting device provided in this application. Figure 5 As shown, the device includes: The reading module 501 is used to read the current value of the rate limit statistic when it receives an IO request from the client; the current value is used to indicate the quota that has been consumed. The determination module 502 is used to determine the available space of the leaky bucket based on the current value, the rate limit quota, and the instantaneous distribution space; where the available space refers to the amount of quota in the current leaky bucket that can be used to process IO requests. The detection module 503 is used to detect whether the number of IO requests exceeds the available space; The release update module 504 is used to release the received IO requests to the disk device when the number of requests is detected to be less than the available space, and to add the number of IO requests to the rate limit statistician to update the current value. The rate limit application module 505 is used to acquire a thread lock when the number of requests exceeds the available space, enter the quota management pool through the thread lock, obtain the target rate limit quota from the quota management pool, increase the instantaneous distribution space based on the target rate limit quota, and increase the rate limit quota that can be used to distribute IO requests. The quota management pool is deployed on the client and protected by a thread lock. It is used to store the global IO request rate limit quota of the disk device.
[0074] Specifically, the detailed process by which each module in the device of this invention implements its function can be found in the relevant description in the method embodiment, and will not be repeated here.
[0075] As an optional implementation, the determining module 502 is further configured to: Get the current time and the last update time; where the last update time is the timestamp of the last time the leaky bucket rate limiter processed an IO request or updated the quota status; The time interval is determined based on the current time and the last update time; The current water volume is determined based on the speed limit quota, time interval, and current value; where the current water volume represents the amount of quota currently used in the leaky bucket. The instantaneous data distribution space is subtracted from the current water volume to determine the result. The minimum value between the calculation result and the instantaneous delivery space is taken as the available space.
[0076] Specifically, the detailed process by which each module in the device of this invention implements its function can be found in the relevant description in the method embodiment, and will not be repeated here.
[0077] As an optional implementation, the determining module 502 is further configured to: The speed limit quota is multiplied by the time interval to determine the quota recovery amount; Subtract the current value from the quota recovery amount to determine the current water volume.
[0078] Specifically, the detailed process by which each module in the device of this invention implements its function can be found in the relevant description in the method embodiment, and will not be repeated here.
[0079] As an optional implementation, the above-described apparatus further includes: The detection and release module is used to immediately release the thread lock when a space completion event is detected during the lift instantaneous release.
[0080] Specifically, the detailed process by which each module in the device of this invention implements its function can be found in the relevant description in the method embodiment, and will not be repeated here.
[0081] As an optional implementation, the speed limit application module 505 is also used for: Retrieve the current remaining speed limit quota from the quota management pool; Check if the current remaining speed limit quota is zero; When it is detected that the current remaining speed limit quota is not zero, the target speed limit quota is determined according to the preset acquisition ratio and the current remaining speed limit quota. Obtain the target speed limit quota from the current remaining speed limit quota.
[0082] Specifically, the detailed process by which each module in the device of this invention implements its function can be found in the relevant description in the method embodiment, and will not be repeated here.
[0083] As an optional implementation, the speed limit application module 505 is also used for: The potential for improvement is determined based on the target speed limit quota, the speed limit quota, and the proportional coefficient; where the proportional coefficient is a fixed proportional factor used to convert the speed limit quota into an instantaneous burst quota amount. Based on the improvement space, the instantaneous distribution space is improved.
[0084] Specifically, the detailed process by which each module in the device of this invention implements its function can be found in the relevant description in the method embodiment, and will not be repeated here.
[0085] As an optional implementation, the above-described apparatus further includes: The placement recovery module is used to place a preset proportion of the current value into the quota management pool for restoring the quota corresponding to the same value, while also accumulating the value of the instantaneous distribution space statistics unit in the quota management pool.
[0086] Specifically, the detailed process by which each module in the device of this invention implements its function can be found in the relevant description in the method embodiment, and will not be repeated here.
[0087] As an optional implementation, the above-described apparatus further includes: The return module is used to acquire a thread lock when the rate limit statistician is detected to be continuously zero, enter the quota management pool through the thread lock, and return the target rate limit quota to the quota management pool. The release module is used to immediately release the thread lock when the rate limit quota return completion event is detected.
[0088] Specifically, the detailed process by which each module in the device of this invention implements its function can be found in the relevant description in the method embodiment, and will not be repeated here.
[0089] As an optional implementation, the above-described apparatus further includes: The read module is used to periodically acquire a thread lock when it detects that the space is in an idle state, and enter the quota management pool through the thread lock to read the statistical values of the instantaneous space statistics. The numerical detection module is used to detect whether the statistical value is zero; The attenuation and clearing module is used to accumulate the statistical value to the speed limit statistician when the detected statistical value is not zero, attenuate the statistical value according to the speed limit quota, and clear the statistical value of the instantaneous distribution space statistician.
[0090] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 6The illustrated electronic device 1200 includes at least one processor 1201, a memory 1202, at least one network interface 1204, and other user interfaces 1203. The various components in the electronic device 1200 are coupled together via a bus system 1205. It is understood that the bus system 1205 is used to implement communication between these components. In addition to a data bus, the bus system 1205 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 6 The general labeled all buses as Bus System 1205.
[0091] The user interface 1203 may include a display, keyboard, or clicking device (e.g., mouse, trackball, touchpad, or touchscreen).
[0092] It is understood that the memory 1202 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 1202 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0093] In some implementations, memory 1202 stores elements, executable units or data structures, or subsets thereof, or extended sets thereof: operating system 12021 and application program 12022.
[0094] The operating system 12021 includes various system programs, such as the framework layer, core library layer, and driver layer, used to implement various basic business functions and handle hardware-based tasks. The application program 12022 includes various applications, such as a media player and a browser, used to implement various application functions. The program implementing the method of this application embodiment can be included in the application program 12022.
[0095] In this embodiment of the application, the processor 1201 executes the method steps provided by each method embodiment by calling the program or instructions stored in the memory 1202, specifically the program or instructions stored in the application program 12022.
[0096] The methods disclosed in the embodiments of this application can be applied to or implemented by the processor 1201. The processor 1201 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware or by instructions in the form of software in the processor 1201. The processor 1201 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software units in the decoding processor. The software unit can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 1202. Processor 1201 reads the information in memory 1202 and, in conjunction with its hardware, completes the steps of the above method.
[0097] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or combinations thereof.
[0098] For software implementation, the techniques described herein can be implemented by units that perform the functions described herein. The software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.
[0099] The electronic device provided in this embodiment may be as follows: Figure 6 The electronic device shown can perform the following: Figure 1-4 All steps of the I / O rate limiting method under multithreading, and thus achieve... Figure 1-4 For details on the technical effectiveness of the multi-threaded I / O rate limiting method shown, please refer to [link / reference]. Figure 1-4 The relevant descriptions are presented concisely and will not be elaborated upon here.
[0100] This application also provides a storage medium (computer-readable storage medium). This storage medium stores one or more programs. The storage medium may include volatile memory, such as random access memory; it may also include non-volatile memory, such as read-only memory, flash memory, hard disk, or solid-state drive; and it may also include combinations of the above types of memory.
[0101] When one or more programs in the storage medium can be executed by one or more processors, the above-mentioned I / O rate limiting method under multi-threading can be implemented.
[0102] The processor is used to execute the multi-threaded I / O rate limiting program stored in the memory to implement the steps of the multi-threaded I / O rate limiting method.
[0103] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0104] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0105] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of this application. It should be understood that the above description is only a specific embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for I / O rate limiting under multi-threading, characterized in that, The method is applied to a multi-threaded I / O request processing scenario on the client side. Each thread independently maintains a leaky bucket rate limiter object. The leaky bucket rate limiter object includes a rate limiter statistic for real-time recording of consumed quota, a rate limiter quota for controlling the decay rate of the rate limiter statistic, and an instantaneous allocation space for characterizing the upper limit of the burst quota of the leaky bucket. The method includes: Upon receiving an IO request from the client, the current value of the rate limit statistician is read; wherein, the current value is used to represent the consumed quota; The available space of the leaky bucket is determined based on the current value, the rate limit quota, and the instantaneous delivery space; wherein, the available space refers to the amount of quota in the current leaky bucket that can be used to process IO requests; Detect whether the number of I / O requests exceeds the available space; When the number of requests is detected to be less than the available space, the received IO requests are allowed to be sent to the disk device, and the number of IO requests is added to the rate limiting statistician to update the current value; When the number of requests exceeds the available space, a thread lock is acquired, and the quota management pool is accessed through the thread lock. The target rate-limiting quota is obtained from the quota management pool, and the instantaneous distribution space is increased based on the target rate-limiting quota. Additionally, a rate-limiting quota that can be used to distribute the IO requests is added. The quota management pool is deployed on the client and protected by the thread lock. It is used to store the global IO request rate-limiting quota of the disk device.
2. The method according to claim 1, characterized in that, The process of determining the available space of the leaky bucket based on the current value, the rate limit quota, and the instantaneous distribution space includes: Get the current time and the last update time; wherein, the last update time is the timestamp of the last time the leaky bucket rate limiter processed an IO request or updated the quota status; The time interval is determined based on the current time and the last update time; The current water volume is determined based on the speed limit quota, the time interval, and the current value; wherein, the current water volume represents the amount of quota currently occupied in the leaky bucket; Subtract the instantaneous data transmission space from the current water volume to determine the result; The minimum value between the calculation result and the instantaneous distribution space is taken as the available space.
3. The method according to claim 2, characterized in that, Determining the current water volume based on the speed limit quota, the time interval, and the current value includes: The speed limit quota is multiplied by the time interval to determine the quota recovery amount; The current water volume is determined by subtracting the current value from the quota recovery amount.
4. The method according to claim 1, characterized in that, The method further includes: Upon detecting the completion of the instantaneous delivery space event, the thread lock is immediately released.
5. The method according to claim 1, characterized in that, The step of obtaining the target rate-limited quota from the quota management pool includes: Obtain the current remaining speed limit quota from the quota management pool; Check if the current remaining speed limit quota is zero; When it is detected that the current remaining speed limit quota is not zero, the target speed limit quota is determined according to the preset acquisition ratio and the current remaining speed limit quota; Obtain the target speed limit quota from the current remaining speed limit quota.
6. The method according to claim 1, characterized in that, The step of increasing the instantaneous allocation space based on the target speed limit quota includes: The potential for improvement is determined based on the target speed limit quota, the speed limit quota, and the proportional coefficient; wherein, the proportional coefficient is a fixed proportional factor used to convert the speed limit quota into an instantaneous burst quota amount; The instantaneous delivery space is improved based on the improved space.
7. The method according to claim 1, characterized in that, When the number of requests exceeds the available space, the method further includes: A preset proportion of the current value is placed in the quota management pool to restore the quota corresponding to the same value, while the instantaneous distribution space statistician in the quota management pool accumulates the value.
8. The method according to claim 4, characterized in that, The method further includes: When the rate limit statistician is detected to be continuously zero, the thread lock is acquired, the quota management pool is entered through the thread lock, and the target rate limit quota is returned to the quota management pool. Upon detecting a completion event of rate limit quota repayment, the thread lock is immediately released.
9. The method according to claim 7, characterized in that, The method further includes: When an idle state is detected, the thread lock is periodically acquired, and the quota management pool is accessed through the thread lock to read the statistical values of the instantaneous distribution space statistician. Check if the statistical value is zero; If the statistical value is detected to be non-zero, the statistical value is added to the speed limit statistical device, the statistical value is attenuated according to the speed limit quota, and the instantaneous distribution space statistical device is cleared of the statistical value.
10. A multi-threaded I / O rate limiting device, characterized in that, The device is applied to a multi-threaded client I / O request processing scenario. Each thread independently maintains a leaky bucket rate limiter object. The leaky bucket rate limiter object includes a rate limiter statistic for real-time recording of consumed quota, a rate limiter quota for controlling the decay rate of the rate limiter statistic, and an instantaneous allocation space for characterizing the upper limit of the burst quota amount of the leaky bucket. The device includes: The reading module is used to read the current value of the rate limit statistician when it receives an IO request from the client; wherein the current value is used to represent the consumed quota; The determination module is used to determine the available space of the leaky bucket based on the current value, the rate limit quota, and the instantaneous distribution space; wherein, the available space refers to the amount of quota in the leaky bucket that can be used to process IO requests. The detection module is used to detect whether the number of IO requests exceeds the available space; The update release module is used to release the received IO request to the disk device when it is detected that the request volume does not exceed the available space, and to add the request volume of the IO request to the rate limit statistician to update the current value; The rate-limiting application module is used to acquire a thread lock when the number of requests exceeds the available space, enter the quota management pool through the thread lock, obtain the target rate-limiting quota from the quota management pool, increase the instantaneous distribution space based on the target rate-limiting quota, and increase the rate-limiting quota that can be used to distribute the IO requests; wherein, the quota management pool is deployed on the client and protected by the thread lock, and is used to store the global IO request rate-limiting quota of the disk device.
11. An electronic device, characterized in that, include: A processor and a memory, the processor being configured to execute a multi-threaded I / O rate limiting program stored in the memory to implement the multi-threaded I / O rate limiting method according to any one of claims 1 to 9.
12. A storage medium, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to implement the multi-threaded I / O rate limiting method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Distributed lock implementation method and device, electronic equipment and medium
CN114968534A
Flow control method, device and system, medium and computer equipment
CN115766582A
Storage network token bucket scheduling algorithm based on three-party architecture and optimization method thereof
CN120066406A
Method and device for scheduling virtual disk input and output ports
US20140325522A1
Input-Output Prioritization for Database Workload
US20140344312A1
Cited By
Hierarchical current limiting method and device, equipment, storage medium and product
CN121907778A