Hard disk IO flow control method, device and equipment of distributed storage system and medium
By differentiating IO types and setting reasonable scheduling ratios in the distributed storage system, the problem of background traffic consuming system resources is solved, achieving optimal performance and stability under high concurrency conditions and ensuring user experience.
Patent Information
- Application Number
- CN202510111415.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2045-01-23
AI Technical Summary
Distributed storage systems are prone to overload and congestion under high-concurrency I/O requests. Background traffic consumes too many system resources, affecting data read/write efficiency and system stability. Existing technologies have failed to effectively control the background I/O traffic of storage systems.
By obtaining business I/O requests and storage pool capacity, requests are stored in a buffer queue according to I/O type identifiers, and requests are sent to the hard disk according to a preset I/O scheduling ratio table. This ensures that the scheduling ratio of the front-end business type identifier is higher than that of the back-end business type identifier, and the buffer queue is set up to reduce the problem of excessive load in a short period of time.
Effectively reduce the impact of backend I/O on frontend business, ensure that the storage system provides optimal performance under various conditions, and ensure that the user experience is not affected.
Smart Images

Figure CN119987675B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of distributed storage technology, and in particular to a hard disk I / O flow control method, apparatus, device and medium for a distributed storage system. Background Technology
[0002] In today's digital age, data volume is exploding, and enterprises and organizations need to store and process massive amounts of data. For example, internet companies need to process hundreds of millions of user behavior data and video data every day. The large amount of data needs to be read, written, and accessed frequently, causing distributed storage systems to face extremely high concurrent I / O (Input / Output) request pressure. If the I / O flow is not controlled, the storage system can easily become overloaded and congested, affecting data read / write efficiency and system stability.
[0003] In related technologies, flow control is usually implemented for different customers' businesses, but there is no control over the background I / O of the storage system. For example, in scenarios such as fault reconstruction, high-capacity garbage collection, and data verification, this background traffic may consume too many system resources, causing the background traffic to impact the customer's business. Summary of the Invention
[0004] To address, or at least partially address, the aforementioned technical problems, this disclosure provides a disk I / O flow control method, apparatus, device, and medium for a distributed storage system, thereby avoiding the problem of excessive system resource consumption by background traffic in different data processing scenarios.
[0005] To achieve the above objectives, the present disclosure provides the following technical solutions:
[0006] In a first aspect, embodiments of this disclosure provide a disk I / O flow control method for a distributed storage system, the method comprising:
[0007] The system obtains multiple business I / O requests and the storage pool capacity in the storage system; each of the multiple business I / O requests carries its own I / O type identifier; wherein, the I / O type identifier includes: a front-end business type identifier and a back-end business type identifier; the storage pool capacity is used to indicate the used capacity of the storage pool;
[0008] Based on multiple IO type identifiers, the multiple business IO requests are stored in their respective buffer queues;
[0009] According to the storage pool capacity and a preset IO scheduling proportion table, a plurality of service IO requests stored in each buffer queue are issued to a hard disk according to a preset IO scheduling proportion; the preset IO scheduling proportion table comprises a scheduling proportion of each IO type corresponding to a storage pool capacity at different capacity levels, and when the storage pool capacity belongs to different capacity levels, a scheduling proportion of the foreground service type identifier is higher than a scheduling proportion of the background service type identifier.
[0010] As an optional implementation of the embodiment of the present disclosure, before the plurality of service IO requests in the buffer queue are issued to the hard disk according to the preset IO scheduling proportion, the method further comprises:
[0011] Dividing the storage pool capacity into levels according to a preset interval;
[0012] For the storage pool capacity at different levels, a scheduling proportion of each IO type is preset to construct a preset IO scheduling proportion table.
[0013] As an optional implementation of the embodiment of the present disclosure, for the storage pool capacity at different levels, a scheduling proportion of each IO type is preset to construct a preset IO scheduling proportion table, which comprises:
[0014] For the storage pool capacity at different levels, an IO number corresponding to each IO type identifier is determined;
[0015] According to the storage pool capacity at each level and the IO number corresponding to each IO type identifier, a preset IO scheduling proportion table is constructed.
[0016] As an optional implementation of the embodiment of the present disclosure, for the storage pool capacity at different levels, a scheduling proportion of each IO type is preset to construct a preset IO scheduling proportion table, which further comprises:
[0017] For the storage pool capacity at different levels, an IO proportion corresponding to each IO type identifier is determined;
[0018] According to the storage pool capacity at each level and the IO proportion corresponding to each IO type identifier, a preset IO scheduling proportion table is constructed.
[0019] As an optional implementation of the embodiment of the present disclosure, the plurality of service IO requests comprise foreground service IO requests and background service IO requests; the foreground service IO requests are triggered by a front end of a user interface or an application program; the background service IO requests are triggered by a system background service or a daemon process; a processing priority of the foreground service IO requests is higher than a processing priority of the background service IO requests.
[0020] As an optional implementation of the embodiment of the present disclosure, the background service type identifier comprises a background reconfiguration identifier, a background aggregation identifier and a background garbage collection identifier; the scheduling proportion occupied by the background reconfiguration identifier is negatively correlated with the capacity level corresponding to the storage pool capacity; the background aggregation identifier is positively correlated with the capacity level corresponding to the storage pool capacity; and the background garbage collection identifier is positively correlated with the capacity level corresponding to the storage pool capacity.
[0021] As an optional implementation of the embodiment of the present disclosure, the background service type identifier further comprises a background data verification identifier; and the scheduling proportion occupied by the background data verification identifier is a preset value.
[0022] In a second aspect, the embodiment of the present disclosure provides a hard disk IO flow control device of a distributed storage system, comprising:
[0023] An acquisition module is configured to acquire a plurality of service IO requests and a storage pool capacity in a storage system; the plurality of service IO requests respectively carry respective IO type identifiers; wherein the IO type identifier comprises a foreground service type identifier and a background service type identifier; and the storage pool capacity is used to represent the used capacity of the storage pool;
[0024] A storage module is configured to store the plurality of service IO requests in corresponding buffer queues according to the plurality of IO type identifiers;
[0025] A flow control module is configured to issue the plurality of service IO requests stored in each buffer queue to a hard disk according to the storage pool capacity and a preset IO scheduling proportion table; the preset IO scheduling proportion table comprises the scheduling proportion occupied by each IO type corresponding to the storage pool capacity at different capacity levels, and when the storage pool capacity belongs to different capacity levels, the scheduling proportion occupied by the foreground service type identifier is higher than the scheduling proportion occupied by the background service type identifier.
[0026] As an optional implementation of the embodiment of the present disclosure, the device further comprises a construction module, and the construction module comprises:
[0027] A division unit is configured to divide the storage pool capacity into levels according to a preset interval;
[0028] A construction unit is configured to set the scheduling proportion occupied by each IO type in advance for the storage pool capacity at different levels, and to construct a preset IO scheduling proportion table.
[0029] As an optional implementation of the embodiment of the present disclosure, the construction unit is configured to:
[0030] determine the IO number corresponding to each IO type identifier for the storage pool capacity at different levels;
[0031] According to the storage pool capacity of each gear and the IO quantity corresponding to each IO type identifier, a preset IO scheduling proportion table is constructed.
[0032] As an optional implementation of the embodiment of the present disclosure, the construction unit is further configured to:
[0033] For the storage pool capacity of different gears, the IO proportion corresponding to each IO type identifier is determined.
[0034] According to the storage pool capacity of each gear and the IO proportion corresponding to each IO type identifier, a preset IO scheduling proportion table is constructed.
[0035] As an optional implementation of the embodiment of the present disclosure, the plurality of service IO requests include foreground service IO requests and background service IO requests; the foreground service IO requests are triggered by a user interface or a front end of an application program; the background service IO requests are triggered by a system background service or a daemon process; the processing priority of the foreground service IO requests is higher than the processing priority of the background service IO requests.
[0036] As an optional implementation of the embodiment of the present disclosure, the background service type identifier includes a background reconstruction identifier, a background aggregation identifier and a background garbage collection identifier; the scheduling proportion occupied by the background reconstruction identifier is negatively correlated with the capacity gear corresponding to the storage pool capacity; the background aggregation identifier is positively correlated with the capacity gear corresponding to the storage pool capacity; the background garbage collection identifier is positively correlated with the capacity gear corresponding to the storage pool capacity.
[0037] As an optional implementation of the embodiment of the present disclosure, the background service type identifier further includes a background data verification identifier; the scheduling proportion occupied by the background data verification identifier is a preset value.
[0038] In a third aspect, an electronic device is provided, including a memory and a processor, the memory stores a computer program, and the processor implements the hard disk IO flow control method of the distributed storage system of the first aspect or any of the implementation manners of the first aspect when executing the computer program.
[0039] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the hard disk IO flow control method of the distributed storage system of the first aspect or any of the implementation manners of the first aspect.
[0040] The hard disk IO flow control method of the distributed storage system provided by the present disclosure comprises the following steps: obtaining a plurality of service IO requests and a storage pool capacity in a storage system, wherein each of the plurality of service IO requests carries an IO type identifier; storing the plurality of service requests in corresponding buffer queues according to the plurality of IO type identifiers; and delivering the plurality of IO requests stored in each buffer queue to a hard disk according to the storage pool capacity and a preset IO scheduling ratio table, wherein the IO type identifier comprises a foreground service type identifier and a background service type identifier; the storage pool capacity represents a used capacity of the storage pool; the preset IO scheduling ratio table comprises a scheduling ratio of each IO type corresponding to a storage pool capacity at different capacity levels; and when the storage pool capacity belongs to different capacity levels, the scheduling ratio of the foreground service type identifier is higher than the scheduling ratio of the background service type identifier. By distinguishing the IO types and setting reasonable scheduling ratios, the user's experience is not affected, so that the scheduling ratio of the foreground service type identifier is set to be higher than the scheduling ratio of the background service type identifier at any capacity level, so that the performance provided by the storage system to the outside can always be optimal, and by setting the buffer queues, the problem of excessively high load of the storage system in a short time is reduced. By flow control, the influence of background IO on foreground service is effectively reduced, and the cluster can provide the optimal performance under the current state to the user under various conditions. BRIEF DESCRIPTION OF DRAWINGS
[0041] The accompanying drawings, which are incorporated into and form a part of the specification, illustrate an embodiment consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure.
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained based on these drawings without creative labor.
[0043] Figure 1 A flowchart of the hard disk IO flow control method of the distributed storage system in an embodiment;
[0044] Figure 2 A structural diagram of the hard disk IO flow control device of the distributed storage system in an embodiment;
[0045] Figure 3 A structural diagram of the electronic device described in the embodiment of the present disclosure. DETAILED DESCRIPTION
[0046] In order to more clearly understand the above-mentioned purposes, features and advantages of the present disclosure, the solutions of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0047] In the following description, a large number of specific details are set forth in order to facilitate a thorough understanding of the present disclosure, but the present disclosure can also be implemented in other manners different from those described herein; obviously, the embodiments described in the specification are only a part of the embodiments of the present disclosure, and not all the embodiments.
[0048] In the embodiments of the present disclosure, the words such as “exemplary” or “for example” are used to mean serving as an example, instance, or illustration, rather than “preferred” or “advantageous over other embodiments or designs”. In fact, the word “exemplary” or “for example” is used to present related concepts in a concrete manner. In addition, in the description of the embodiments of the present disclosure, the meaning of “plurality” is two or more, unless otherwise specified.
[0049] Internet companies need to process hundreds of millions of user behavior data, video data and the like every day. A large amount of data needs to be frequently read, written and accessed, resulting in extremely high concurrent IO (Input / Output bus) request pressure faced by distributed storage systems. If the IO flow is not controlled, the storage system is easy to overload and congest, affecting the data read-write efficiency and system stability.
[0050] In the related art, the flow control restriction is usually performed on the businesses of different customers, but the background IO of the storage system is not controlled. For example, in the scenarios of fault reconstruction, high-capacity garbage collection, data verification and the like, the background traffic may occupy too many system resources, causing the background traffic to impact the business of the customer.
[0051] Based on the above problems, the embodiments of the present disclosure provide a hard disk IO flow control method of a distributed storage system, referring to FIG. 1, the method comprises the following steps: Figure 1
[0052] S11, acquire a plurality of business IO requests and a storage pool capacity in a storage system.
[0053] Among them, the plurality of business IO requests respectively carry respective IO type identifiers; the IO type identifier includes a foreground business type identifier and a background business type identifier; the storage pool capacity is used to represent the used capacity of the storage pool.
[0054] The IO request refers to a data read or write request issued by an application program or an operating system to a storage device.
[0055] Optionally, the plurality of service IO requests include foreground service IO requests and background service IO requests; the foreground service IO requests are triggered by a user interface or a front end of an application program; the background service IO requests are triggered by a system background service or a daemon process; a processing priority of the foreground service IO requests is higher than a processing priority of the background service IO requests.
[0056] Specifically, the local storage module obtains a plurality of service IO requests and a used capacity of a storage pool of the storage system. The IO requests can be divided into foreground services and background services according to their sources. The foreground service IO requests are usually initiated by a user interface or a front end of an application program, and the background service IO requests are initiated by a system background service or a daemon process.
[0057] The foreground service IO requests usually require fast response to ensure user experience. For example, a user clicks a link in a browser, expecting the web page to load quickly. The foreground service IO requests directly affect user experience, and if the response is slow or there is a lag, it will lead to poor user experience. The sources of the background service IO requests include system garbage collection and defragmentation, data migration and optimization, data backup and recovery, system and application generated log information recording, etc. The background service IO requests usually do not require immediate response and can be performed when the system load is low, such as at night or on weekends, etc. The background service IO requests are often performed in batches, such as batch writing of log data, batch migration of a large number of files, etc.
[0058] The foreground service IO requests are usually triggered directly by the client, such as user operations in the application program (e.g., opening a file, saving a document, browsing a web page, etc.), which have a higher requirement for response time.
[0059] The background service IO requests are usually automatically executed by the system and do not directly depend on real-time user operations, such as data backup, log recording, data migration, garbage collection, etc., which are used to maintain the stable operation of the system, data security and performance optimization, and have relatively low real-time requirements. They can be performed when the system load is low to avoid interference with foreground services.
[0060] In terms of resource scheduling and processing priority, the foreground service IO requests are usually given a higher priority to ensure user experience, and the background service IO requests can be arranged at a low priority to avoid affecting the foreground services.
[0061] The frequency and mode of the foreground service IO requests are related to user operation habits and task requirements and have high randomness; the frequency and mode of the background service IO requests are usually determined by system configuration and scheduled tasks and have a certain regularity.
[0062] S12, according to multiple IO type identifications, the multiple service IO requests are respectively stored in the corresponding buffer queues.
[0063] Specifically, according to multiple IO type identifications, the multiple service IO requests are respectively stored in the corresponding buffer queues. By setting the buffer queue, the problem of short-time high load of the storage system is reduced.
[0064] S13, according to the storage pool capacity and the preset IO scheduling ratio table, the multiple service IO requests stored in each buffer queue are issued to the hard disk according to the preset IO scheduling ratio.
[0065] The preset IO scheduling ratio table includes the scheduling ratio of each IO type corresponding to the storage pool capacity at different capacity levels, and when the storage pool capacity belongs to different capacity levels, the scheduling ratio of the foreground service type identification is higher than the scheduling ratio of the background service type identification.
[0066] Specifically, the preset IO scheduling ratio table includes the scheduling ratio of each IO type corresponding to the storage pool capacity at different capacity levels, and when the storage pool capacity belongs to different capacity levels, the scheduling ratio of the foreground service type identification is higher than the scheduling ratio of the background service type identification. According to the storage pool capacity and the preset IO scheduling ratio table, the multiple service IO requests stored in each buffer queue are issued to the hard disk according to the preset IO scheduling ratio.
[0067] The hard disk IO flow control method of the distributed storage system provided by the present disclosure comprises the following steps: acquiring a plurality of service IO requests and a storage pool capacity in a storage system, wherein each of the plurality of service IO requests carries a respective IO type identifier; storing the plurality of service requests in corresponding buffer queues according to the plurality of IO type identifiers; and delivering the plurality of IO requests stored in each buffer queue to a hard disk according to the storage pool capacity and a preset IO scheduling proportion table, wherein the IO type identifier comprises a foreground service type identifier and a background service type identifier; the storage pool capacity represents a used capacity of the storage pool; the preset IO scheduling proportion table comprises a scheduling proportion of each IO type corresponding to a storage pool capacity at a different capacity level; and when the storage pool capacity belongs to different capacity levels, the scheduling proportion occupied by the foreground service type identifier is higher than the scheduling proportion occupied by the background service type identifier. By distinguishing the IO types and setting reasonable scheduling proportions in advance, the scheduling proportions occupied by the foreground type identifier are set to be higher than the scheduling proportions occupied by the background service type identifier at any capacity level, so as to ensure that the performance provided by the storage system is always optimal, and the problem of excessively high load of the storage system in a short time is reduced by setting the buffer queues. By flow control, the influence of background IO on foreground service is effectively reduced, and the optimal performance provided by the cluster to the user under the current state is ensured under various conditions.
[0068] In one embodiment, before performing the above step S12 (delivering the plurality of service IO requests in the buffer queue to the hard disk according to the storage pool capacity and the preset IO scheduling proportion table according to the preset IO scheduling proportion table), the following step can also be performed:
[0069] a. Dividing the storage pool capacity into levels according to a preset interval.
[0070] The preset interval can be set according to actual conditions, for example, the preset interval can be set to 10%, 20%, 25%, etc. It should be noted that the preset interval can be equal intervals or non-equal intervals.
[0071] For example, assuming that the preset interval is equal interval and the preset interval is 20%, the storage pool capacity can be divided into the following levels according to the preset interval: 0-20%, 20%-40%, 40%-60%, 60%-80%, 80%-100%. Assuming that the preset interval is non-equal interval, the storage pool capacity can be divided into the following levels according to the preset interval: 0-50%, 50%-70%, 70%-80%, 80%-90%, 90%-100%.
[0072] b. For different levels of storage pool capacity, the scheduling proportion of each IO type is set in advance to construct a preset IO scheduling proportion table.
[0073] Specifically, the scheduling proportion of each IO type is set in advance according to the storage pool capacity of different gears, and a preset IO scheduling proportion table is constructed.
[0074] Optionally, the step b (setting the scheduling proportion of each IO type in advance according to the storage pool capacity of different gears, and constructing a preset IO scheduling proportion table) can be implemented in the following manner:
[0075] According to the storage pool capacity of different gears, the IO quantity corresponding to each IO type identifier is determined.
[0076] According to the storage pool capacity of each gear and the IO quantity corresponding to each IO type identifier, a preset IO scheduling proportion table is constructed.
[0077] Specifically, the IO quantity corresponding to each IO type identifier is determined according to the storage pool capacity of different gears, and a preset IO scheduling proportion table is constructed according to the storage pool capacity of each gear and the IO quantity corresponding to each IO type identifier.
[0078] For example, referring to Table 1, the IO type identifier includes foreground service, background IO type 1, background IO type 2, background IO type 3 and background IO type 4. First, the IO quantity corresponding to each IO type identifier is determined according to the storage pool capacity of different gears, and then a preset IO scheduling proportion table is constructed according to the storage pool capacity of each gear and the IO quantity corresponding to each IO type identifier.
[0079] Table 1
[0080] Capacity tier Foreground traffic Background IO type 1 Background IO type 2 Background IO type 3 Background IO type 4 <50% 10 4 1 1 1 50%-70% 10 4 1 2 2 70%-80% 10 3 1 3 4 80%-90% 10 2 1 5 6 >90% 10 2 1 6 6
[0081] Optionally, the step b (setting the scheduling proportion of each IO type in advance according to the storage pool capacity of different gears, and constructing a preset IO scheduling proportion table) can also be implemented in the following manner:
[0082] According to the storage pool capacity of different gears, the IO proportion corresponding to each IO type identifier is determined.
[0083] According to the storage pool capacity of each gear and the IO proportion corresponding to each IO type identifier, a preset IO scheduling proportion table is constructed.
[0084] Specifically, the IO proportion corresponding to each IO type identifier is determined according to the storage pool capacity of different gears, and a preset IO scheduling proportion table is constructed according to the storage pool capacity of each gear and the IO proportion corresponding to each IO type identifier.
[0085] For example, referring to Table 2, which is another preset IO scheduling ratio table, the IO type identifiers include foreground service, background IO type 1, background IO type 2, background IO type 3, and background IO type 4. First, the IO ratio corresponding to each IO type identifier is determined for the storage pool capacity of different gears. Then, the preset IO scheduling ratio table is constructed according to the storage pool capacity of each gear and the IO ratio corresponding to each IO type identifier.
[0086] Table 2
[0087] Capacity tier Foreground traffic Background IO type 1 Background IO type 2 Background IO type 3 Background IO type 4 <50% 90% 2% 1% 4% 3% 50%-70% 90% 2% 1% 4% 3% 70%-80% 80% 3% 1% 6% 10% 80%-90% 80% 3% 1% 6% 10% >90% 75% 3% 2% 10% 10%
[0088] Optionally, the background service type identifiers include a background reconstruction identifier, a background aggregation identifier, and a background garbage collection identifier. The scheduling ratio occupied by the background reconstruction identifier is negatively correlated with the capacity gear corresponding to the storage pool capacity. The background aggregation identifier is positively correlated with the capacity gear corresponding to the storage pool capacity. The background garbage collection identifier is positively correlated with the capacity gear corresponding to the storage pool capacity.
[0089] Optionally, the background service type identifiers further include a background data verification identifier. The scheduling ratio occupied by the background data verification identifier is a preset value.
[0090] Specifically, referring to Table 3, which is another preset IO scheduling ratio table, the IO type identifiers include a foreground service identifier, a background reconstruction identifier, a background data verification identifier, a background aggregation identifier, and a background garbage collection identifier. Regardless of the capacity gear, the foreground service needs to have the highest proportion. The background reconstruction writes new data to the hard disk first, and then cleans up the old and incomplete data. Therefore, the storage pool capacity increases during the reconstruction of data. As the capacity increases, the IO proportion of the background reconstruction should be reduced to prevent the storage pool from being full due to the background reconstruction. The background aggregation and the background garbage collection are both for deleting invalid data in the storage pool to release the storage pool space. Therefore, as the capacity increases, the proportion of the background aggregation and the background garbage collection should be increased to release the space as quickly as possible. Therefore, the proportion of the background aggregation and the background garbage collection increases as the capacity increases. The background data verification is for checking silent errors, but the data read from the disk is also verified in the process of normal foreground service reading. Therefore, the data verification is not an urgent task compared to other types of IO. The IO proportion of the data verification can be maintained as long as it can run.
[0091] Table 3
[0092] Capacity tier Foreground traffic Background reorganization Background data validation Background aggregation Background garbage collection <50% 10 4 1 1 1 50%-70% 10 4 1 2 2 70%-80% 10 3 1 3 4 80%-90% 10 2 1 5 6 >90% 10 2 1 6 6
[0093] For example, assuming that the maximum number of IO requests supported by a disk per second is 100, and each IO request will generate an IO to all the disks of the storage pool. In one case, the used capacity of the storage pool is 40%, and the foreground business is 100 per second, and due to the sudden failure of a disk causing the reconstruction of the storage pool, the reconstruction also generates 100 disk IOs per second. Without any traffic control strategy, due to the reconstruction, the proportion of 100 IOs on the disk may change from 100 IOs of the foreground business to 50 IOs of the foreground business plus 50 IOs of the reconstruction, that is, the foreground business decreases from 100 per second to 50 per second due to the sudden occupation of disk resources by the reconstruction; with traffic control, the proportion of disk IOs will be controlled to be 10:4 according to the above preset proportion, that is, there are 100*4 / (10+4) = 28.5 per second of reconstruction business and 71 per second of foreground business on the disk per second, effectively reducing the impact of reconstruction on the foreground business.
[0094] In another case, the used capacity of the storage pool is 85%, and the foreground business is 100 per second, and to prevent the storage pool capacity from being exhausted, the background garbage collection and the background aggregation will generate 100 disk IOs per second. Without a traffic control strategy, the IO proportion on the disk may be one third for the foreground business, one third for the background aggregation, and one third for the background garbage collection, at which time the foreground business decreases from 100 per second to 33 per second; after traffic control, the IO proportion on the disk is: foreground business = 100*10 / (10+5+6) = 47.6, effectively reducing the impact of the two background IOs on the foreground business.
[0095] Through traffic control, the impact of background IO on foreground business can be effectively reduced, and under various conditions, the cluster can provide the user with the optimal performance in the current state.
[0096] The hard disk IO flow control method of the distributed storage system provided by the present disclosure comprises the following steps: obtaining a plurality of service IO requests and a storage pool capacity in a storage system, wherein each of the plurality of service IO requests carries an IO type identifier; storing the plurality of service IO requests in corresponding buffer queues according to the plurality of IO type identifiers; and delivering the plurality of IO requests stored in each buffer queue to a hard disk according to the storage pool capacity and a preset IO scheduling ratio table, wherein the IO type identifier comprises a foreground service type identifier and a background service type identifier; the storage pool capacity represents a used capacity of the storage pool; the preset IO scheduling ratio table comprises a scheduling ratio of each IO type corresponding to a storage pool capacity at different capacity levels; and when the storage pool capacity belongs to different capacity levels, the scheduling ratio of the foreground service type identifier is higher than the scheduling ratio of the background service type identifier. By distinguishing the IO types and setting reasonable scheduling ratios, the scheduling ratios of the foreground service type identifier are set to be higher than the scheduling ratios of the background service type identifier at any capacity level, so as to ensure that the performance provided by the storage system is optimal, and the problem of excessively high load of the storage system in a short time is reduced by setting the buffer queues. By flow control, the influence of background IO on foreground service is effectively reduced, and the optimal performance of the cluster is provided for users under various conditions.
[0097] In one embodiment, as shown in FIG. 2, Figure 2 a hard disk IO flow control device 200 of a distributed storage system is provided, comprising:
[0098] an obtaining module 210, configured to obtain a plurality of service IO requests and a storage pool capacity in a storage system, wherein each of the plurality of service IO requests carries an IO type identifier; the IO type identifier comprises a foreground service type identifier and a background service type identifier; and the storage pool capacity represents a used capacity of the storage pool;
[0099] a storage module 220, configured to store the plurality of service IO requests in corresponding buffer queues according to the plurality of IO type identifiers;
[0100] a flow control module 230, configured to deliver the plurality of service IO requests stored in each buffer queue to a hard disk according to the storage pool capacity and a preset IO scheduling ratio table; the preset IO scheduling ratio table comprises a scheduling ratio of each IO type corresponding to a storage pool capacity at different capacity levels; and when the storage pool capacity belongs to different capacity levels, the scheduling ratio of the foreground service type identifier is higher than the scheduling ratio of the background service type identifier.
[0101] As an optional implementation of the embodiment of the present disclosure, the apparatus further comprises a constructing module, which comprises:
[0102] a dividing unit configured to divide the storage pool capacity by preset intervals.
[0103] a constructing unit configured to set a scheduling proportion of each IO type for the storage pool capacity of different gears in advance, and construct a preset IO scheduling proportion table.
[0104] As an optional implementation of the embodiment of the present disclosure, the constructing unit is configured to:
[0105] determine the IO quantity corresponding to each IO type identifier for the storage pool capacity of different gears.
[0106] construct the preset IO scheduling proportion table according to the storage pool capacity of each gear and the IO quantity corresponding to each IO type identifier.
[0107] As an optional implementation of the embodiment of the present disclosure, the constructing unit is further configured to:
[0108] determine the IO proportion corresponding to each IO type identifier for the storage pool capacity of different gears.
[0109] construct the preset IO scheduling proportion table according to the storage pool capacity of each gear and the IO proportion corresponding to each IO type identifier.
[0110] As an optional implementation of the embodiment of the present disclosure, the plurality of service IO requests comprise foreground service IO requests and background service IO requests; the foreground service IO requests are triggered by a front end of a user interface or an application program; the background service IO requests are triggered by a system background service or a daemon process; and the processing priority of the foreground service IO requests is higher than that of the background service IO requests.
[0111] As an optional implementation of the embodiment of the present disclosure, the background service type identifier comprises a background reconstruction identifier, a background aggregation identifier and a background garbage collection identifier; the scheduling proportion of the background reconstruction identifier is negatively correlated with the capacity gear corresponding to the storage pool capacity; the background aggregation identifier is positively correlated with the capacity gear corresponding to the storage pool capacity; and the background garbage collection identifier is positively correlated with the capacity gear corresponding to the storage pool capacity.
[0112] As an optional implementation of the embodiment of the present disclosure, the background service type identifier further comprises a background data verification identifier; and the scheduling proportion of the background data verification identifier is a preset value.
[0113] According to the distributed storage system hard disk IO flow control device provided by the embodiment of the present disclosure, a plurality of service IO requests and a storage pool capacity in the storage system are obtained, the plurality of service IO requests respectively carry respective IO type identifiers, the plurality of service requests are respectively stored in corresponding buffer queues according to the plurality of IO type identifiers, and the plurality of IO requests stored in each buffer queue are issued to the hard disk according to the storage pool capacity and a preset IO scheduling ratio table according to the preset IO scheduling ratio. The IO type identifier includes: foreground service type identifier and background service type identifier; the storage pool capacity is used to represent the used capacity of the storage pool, the preset IO scheduling ratio table includes the scheduling ratio of each IO type corresponding to the storage pool capacity at different capacity levels, and when the storage pool capacity belongs to different capacity levels, the scheduling ratio of the foreground service type identifier is higher than the scheduling ratio of the background service type identifier. By distinguishing the IO types, a reasonable scheduling ratio is set in advance, so as not to affect the user experience. Therefore, the scheduling ratio of the foreground service type identifier is set to be higher than the scheduling ratio of the background service type identifier at any capacity level, so that the performance provided by the storage system to the outside can always be optimal. In addition, by setting the buffer queue, the problem of excessively high load of the storage system in a short time is reduced. Through flow control, the influence of background IO on foreground service is effectively reduced, and the cluster can provide the optimal performance to the user under various conditions.
[0114] The specific limitation of the distributed storage system hard disk IO flow control device can refer to the limitation of the distributed storage system hard disk IO flow control method in the foregoing, and will not be repeated here. Each module in the distributed storage system hard disk IO flow control device can be realized by software, hardware and a combination thereof in whole or in part. The above modules can be embedded in or independent of the processor of the electronic device in hardware form, or can be stored in the processor of the electronic device in software form, so as to call and execute the operations corresponding to the above modules by the processor.
[0115] The embodiment of the present disclosure also provides an electronic device, Figure 3 The structure schematic diagram of the electronic device provided by the embodiment of the present disclosure is shown in FIG. 1. As shown in FIG. 1, the electronic device includes a processor 100, a memory 200 and a communication interface 300. Figure 3As shown, the electronic device provided in this embodiment includes a memory 31 and a processor 32. The memory 31 is used to store computer programs; the processor 32 is used to execute the steps performed in any embodiment of the hard disk I / O flow control method of the distributed storage system provided in the above method embodiments when the computer program is invoked. The electronic device includes a processor, a memory, a communication interface, a display screen, and an input device connected via a system bus. The processor of the electronic device provides computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. When the computer program is executed by the processor, it implements a hard disk I / O flow control method for a distributed storage system. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen. The input device of the electronic device can be a touch layer covering the display screen, or a button, trackball, or touchpad provided on the casing of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0116] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present disclosure and does not constitute a limitation on the computer device to which the present disclosure is applied. Specific electronic devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0117] In one embodiment, the hard disk I / O flow control device for the distributed storage system provided in this disclosure can be implemented as a computer, and the computer program can be implemented in a manner such as... Figure 3 The electronic device shown operates on this device. The memory of the electronic device can store various program modules of the hard disk I / O flow control device that constitutes the distributed storage system of the electronic device, for example, Figure 2 The acquisition module 210, storage module 220, and flow control module 230 are shown. The computer program comprised of these modules causes the processor to execute the steps in the hard disk I / O flow control method for a distributed storage system of an electronic device according to various embodiments of this disclosure.
[0118] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the hard disk I / O flow control method for the distributed storage system provided in the above-described method embodiments.
[0119] Those skilled in the art will appreciate that embodiments of the disclosure can be supplied as a method, a system, or a computer program product. Thus, the disclosure can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the disclosure can take the form of a computer program product on one or more computer readable storage media having computer readable program code embodied therein.
[0120] The processor can be a Central Processing Unit (CPU), 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 device, discrete gate or transistor logic, discrete hardware components, or the like. The general-purpose processor can be a microprocessor, or the processor can be any conventional processor.
[0121] The memory can include non-persistent memory and / or volatile memory, e.g., a Random Access Memory (RAM) and / or a non-volatile memory, e.g., a Read-Only Memory (ROM), a flash memory, or the like. The memory is an example of computer readable media.
[0122] Computer readable media includes permanent and non-permanent, movable and non-movable storage media. The storage media can be implemented by any method or technology to store information, which can be computer readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassette, disk storage, or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carriers.
[0123] It has to be noted that, as used herein, the terms "includes", "including", "has", "having" or "has" are intended to be open-ended terms that specifically permit the inclusion of one or more elements, steps, features, components, or the like. As used herein, the term "exemplary" is used to mean "serving as an example, instance, or illustration." Any implementation described as exemplary is not necessarily to be construed as preferred or advantageous over other implementations.
[0124] The foregoing is merely illustrative of the principles of this disclosure and various modifications can be made by those skilled in the art without departing from the spirit and scope of the disclosure. The above embodiments are illustrative, and not restrictive. The scope of the disclosure should, therefore, be determined not with reference to the above description, but instead with reference to the appended claims, along with their full scope of equivalents.
Claims
1. A hard disk IO flow control method of a distributed storage system, characterized in that, The method comprises: acquiring a plurality of service IO requests and a storage pool capacity in a storage system; the plurality of service IO requests respectively carry respective IO type identifiers; wherein the IO type identifiers comprise foreground service type identifiers and background service type identifiers; the storage pool capacity is used to represent a used capacity of the storage pool; storing the plurality of service IO requests in corresponding buffer queues according to the plurality of IO type identifiers; dividing the storage pool capacity into gears according to a preset interval; the preset interval comprises equal intervals / non-equal intervals; pre-setting a scheduling proportion of each IO type for the storage pool capacity of different gears to construct a preset IO scheduling proportion table; issuing the plurality of service IO requests stored in each buffer queue to a hard disk according to the storage pool capacity and the preset IO scheduling proportion table; the preset IO scheduling proportion table comprises a scheduling proportion of each IO type corresponding to the storage pool capacity of different capacity gears, and when the storage pool capacity belongs to different capacity gears, a scheduling proportion of the foreground service type identifier is higher than a scheduling proportion of the background service type identifier.
2. The method of claim 1, wherein, The pre-setting of the scheduling proportion of each IO type for the storage pool capacity of different gears to construct the preset IO scheduling proportion table comprises: determining an IO number corresponding to each IO type identifier for the storage pool capacity of different gears; constructing the preset IO scheduling proportion table according to the storage pool capacity of each gear and the IO number corresponding to each IO type identifier.
3. The method of claim 1, wherein, The pre-setting of the scheduling proportion of each IO type for the storage pool capacity of different gears to construct the preset IO scheduling proportion table further comprises: determining an IO proportion corresponding to each IO type identifier for the storage pool capacity of different gears; constructing the preset IO scheduling proportion table according to the storage pool capacity of each gear and the IO proportion corresponding to each IO type identifier.
4. The method of claim 1, wherein, The plurality of service IO requests comprise foreground service IO requests and background service IO requests; the foreground service IO requests are triggered by a front end of a user interface or an application program; the background service IO requests are triggered by a system background service or a daemon process; a processing priority of the foreground service IO requests is higher than a processing priority of the background service IO requests.
5. The method of claim 1, wherein, The background service type identifiers comprise a background reconstruction identifier, a background aggregation identifier and a background garbage collection identifier; the scheduling proportion of the background reconstruction identifier is negatively correlated with a capacity gear corresponding to the storage pool capacity; the background aggregation identifier is positively correlated with the capacity gear corresponding to the storage pool capacity; the background garbage collection identifier is positively correlated with the capacity gear corresponding to the storage pool capacity.
6. The method of claim 5, wherein, The background service type identifiers further comprise a background data verification identifier; the scheduling proportion of the background data verification identifier is a preset value.
7. A hard disk IO flow control device of a distributed storage system, characterized in that, comprise: an acquisition module, configured to acquire a plurality of service IO requests and a storage pool capacity in a storage system; The multiple service IO requests respectively carry respective IO type identifiers; wherein the IO type identifiers comprise foreground service type identifiers and background service type identifiers; and the storage pool capacity is used to represent a used capacity of the storage pool; a storage module configured to store the multiple service IO requests in respective buffer queues according to the multiple IO type identifiers; a construction module configured to divide the storage pool capacity into gears according to a preset interval; wherein the preset interval comprises equal intervals or unequal intervals; a preset IO scheduling proportion table is constructed by setting a scheduling proportion of each IO type for different gears of the storage pool capacity; a flow control module configured to distribute the multiple service IO requests stored in the buffer queues to the hard disk according to the storage pool capacity and the preset IO scheduling proportion table according to a preset IO scheduling proportion; wherein the preset IO scheduling proportion table comprises a scheduling proportion of each IO type corresponding to different gears of the storage pool capacity, and when the storage pool capacity belongs to different gears, a scheduling proportion of the foreground service type identifier is higher than a scheduling proportion of the background service type identifier. 8.An electronic device comprising a memory and a processor, the memory storing a computer program, wherein, The processor executes the computer program to implement the hard disk IO flow control method of the distributed storage system in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer program is stored on the computer program and is executed by the processor to implement the hard disk IO flow control method of the distributed storage system in any one of claims 1 to 6.
Citation Information
Patent Citations
System cache processing method and device, electronic equipment and storage medium
CN119166351A