Distributed storage service request processing method and device and distributed storage system
By determining the allowed value of the business request throttle and controlling the number of requests based on the current business delay and throughput in the distributed storage system, the problem of business request congestion after the storage node failure is recovered is solved, and the service quality and efficiency of the system are improved.
Patent Information
- Application Number
- CN202411156404.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-08-22
AI Technical Summary
In a distributed storage system, during the data recovery and backfill process after a storage node failure is repaired, users send a large number of business requests, causing business request congestion and affecting the quality of storage services.
By obtaining the current total business delay and throughput of the distributed storage system, determine the allowed value of the business request throttle, control the number of business requests sent to the target storage node, avoid congestion, and ensure system delay and throughput.
It effectively avoids business request congestion, improves the storage service quality of the distributed storage system, and ensures the high reliability and efficiency of the system.
Smart Images

Figure CN118677913A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a distributed storage service request processing method, device and distributed storage system. Background Art
[0002] At present, with the development of modern information technology and the popularization of smart devices, the amount of data and the type of data are growing rapidly, and traditional storage systems can no longer meet the large-scale and diversified data storage needs. The rise of big data and cloud computing technologies has provided more application scenarios for distributed storage systems and promoted the development of distributed storage technology.
[0003] In the related art, a storage node in a distributed storage system usually receives a service request sent by a user, and then transmits the service request to a task queue of a corresponding storage device.
[0004] However, when any storage node in the distributed storage system fails, data recovery and backfill will be performed after the failure is repaired. During this process, if the user sends a large number of service requests to the storage node, it will cause congestion of service requests, which is not conducive to ensuring the storage service quality of the distributed storage system. Summary of the invention
[0005] The present application provides a distributed storage service request processing method, device and distributed storage system to solve the defects of related technologies that may cause congestion of service requests and be unfavorable for ensuring the storage service quality of the distributed storage system.
[0006] The first aspect of the present application provides a distributed storage service request processing method, comprising: Obtain the current total service delay and current service throughput of the distributed storage system; Determine a current allowable value of a service request throttle according to a current service total delay and a current service throughput of the distributed storage system; When receiving multiple service requests sent by the user end, transmitting a corresponding number of service requests to a target task queue of a target storage node according to a current allowed value of the service request throttle valve; In response to the service request in the target task queue, the service data is stored in the corresponding target storage device.
[0007] In an optional implementation, determining the current allowed value of the service request throttle according to the current service total delay and the current service throughput of the distributed storage system includes: Determining a target total service delay of the distributed storage system according to a current total service delay and a current service throughput of the distributed storage system; According to the current total service delay of the distributed storage system and the target total service delay, a current allowable value of the service request throttle is determined.
[0008] In an optional implementation manner, determining a target total service delay of the distributed storage system according to a current total service delay and a current service throughput of the distributed storage system includes: Constructing an objective function according to the current service total delay and the current service throughput of the distributed storage system; According to the objective function, the target total service delay of the distributed storage system is updated in a first preset cycle.
[0009] In an optional implementation, constructing an objective function according to the current service total delay and the current service throughput of the distributed storage system includes: Determining a performance measurement indicator of the distributed storage system according to a current service total delay and a current service throughput of the distributed storage system; According to the calculation formula of the performance measurement indicator, an objective function is constructed.
[0010] In an optional implementation, constructing an objective function according to a calculation formula of the performance measurement indicator includes: According to the calculation formula of the performance measurement index, the following objective function is constructed:
[0011] in, Indicates the total delay of the current business. Indicates the total delay of the target business before the update. Indicates the current service throughput. Indicates the throughput adjustment parameter.
[0012] In an optional implementation, updating the target total service delay of the distributed storage system according to the objective function includes: Based on the following formula, the target total service delay of the distributed storage system is updated:
[0013] in, Indicates the updated total delay of the target service. Indicates the total delay of the target business before the update. represents the preset learning rate, represents the partial derivative of the objective function with respect to the total delay of the target service, represents the partial derivative of the objective function with respect to the throughput adjustment parameter.
[0014] In an optional implementation, determining the current allowed value of the service request throttle according to the current service total delay of the distributed storage system and the target service total delay includes: Determining the adjustment direction of the allowable value of the service request throttle according to the size relationship between the current service total delay of the distributed storage system and the target service total delay; The current allowed value of the service request throttle is determined according to the allowed value adjustment direction of the service request throttle and the difference between the current service total delay and the target service total delay.
[0015] In an optional implementation, determining the adjustment direction of the allowable value of the service request throttle according to the size relationship between the current service total delay of the distributed storage system and the target service total delay includes: In a case where the magnitude relationship between the current service total delay and the target service total delay of the distributed storage system indicates that the current service total delay is greater than the target service total delay, determining that the adjustment direction of the allowable value of the service request throttle is a decreasing direction; When the size relationship between the current total service delay and the target total service delay of the distributed storage system indicates that the current total service delay is not greater than the target total service delay, the adjustment direction of the allowable value of the service request throttle is determined to be an increasing direction.
[0016] In an optional implementation, determining the current allowed value of the service request throttle according to the allowed value adjustment direction of the service request throttle and the difference between the current service total delay and the target service total delay includes: According to a second preset period, determining a current allowed value of the service request throttle according to an allowed value adjustment direction of the service request throttle and a difference between the current service total delay and the target service total delay; The second preset period is smaller than the first preset period.
[0017] In an optional implementation, when receiving multiple service requests sent by the user end, transmitting a corresponding number of service requests to a target task queue of a target storage node according to a current allowed value of the service request throttle valve includes: Based on the front-end scheduling device, multiple service requests sent by the user end are received, and the received service requests are cached in the front-end queue; According to the current allowed value of the service request throttle, a corresponding number of service requests in the front-end queue are transmitted to the target task queue of the target storage node.
[0018] In an optional implementation, the transmitting a corresponding number of service requests in the front-end queue to a target task queue of a target storage node according to a current allowed value of the service request throttle valve includes: Determining a target length of a task queue of each storage node in the distributed storage system according to a current allowed value of the service request throttle; When multiple service requests are received from the user end, a corresponding number of service requests are scheduled from the front-end queue according to the target length of the task queue and the current capacity occupancy of the target task queue of the target storage node, and the service requests are transmitted to the target task queue of the target storage node.
[0019] In an optional implementation, storing the business data in a corresponding target storage device in response to the business request in the target task queue includes: In response to a business request in the target task queue, split the business request into a data request and a metadata request, and cache the metadata request in a metadata queue; According to the data request and the metadata request, the data to be stored and the metadata are associated and stored in a corresponding target storage device; The business data includes the data to be stored and metadata.
[0020] A second aspect of the present application provides a distributed storage service request processing device, including: An acquisition module is used to obtain the current total service delay and current service throughput of the distributed storage system; A determination module, configured to determine a current allowable value of a service request throttle according to a current service total delay and a current service throughput of the distributed storage system; A processing module, configured to, when receiving a plurality of service requests sent by a user terminal, transmit a corresponding number of service requests to a target task queue of a target storage node according to a current allowed value of the service request throttle valve; The response module is used to respond to the service request in the target task queue and store the service data in the corresponding target storage device.
[0021] A third aspect of the present application provides a distributed storage system, including: A plurality of storage nodes, each storage node including a plurality of storage devices; Any of the storage nodes processes the service request based on the method described in the first aspect and various possible designs of the first aspect to store the service data of the service request into the corresponding target storage device.
[0022] A fourth aspect of the present application provides an electronic device, comprising: at least one processor and a memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method described in the first aspect and various possible designs of the first aspect.
[0023] A fifth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the method described in the first aspect and various possible designs of the first aspect are implemented.
[0024] The sixth aspect of the present application provides a computer program product, including computer instructions, which are used to enable a computer to execute the method described in the first aspect and various possible designs of the first aspect.
[0025] The technical solution of this application has the following advantages: The present application provides a distributed storage service request processing method, device and distributed storage system, the method comprising: obtaining the current total service delay and current service throughput of the distributed storage system; determining the current allowed value of the service request throttle according to the current total service delay and current service throughput of the distributed storage system; when receiving multiple service requests sent by the user end, transmitting the corresponding number of service requests to the target task queue of the target storage node according to the current allowed value of the service request throttle; in response to the service requests in the target task queue, storing the service data in the corresponding target storage device. The method provided by the above scheme limits the number of service requests sent to the target storage node according to the current allowed value of the service request throttle, thereby ensuring the system service delay and service throughput, avoiding congestion of service requests, and laying a foundation for improving the storage service quality of the distributed storage system. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technical descriptions. Obviously, the drawings described below are some embodiments of the present application, and a person skilled in the art can also obtain other drawings based on these drawings.
[0027] Figure 1 A schematic diagram of a distributed storage service request processing method provided in an embodiment of the present application; Figure 2 A flowchart of an exemplary distributed storage service request processing method provided in an embodiment of the present application; Figure 3 A network architecture diagram of a distributed storage system provided in an embodiment of the present application; Figure 4 A schematic diagram of the structure of a distributed storage service request processing device provided in an embodiment of the present application; Figure 5 A schematic diagram of the structure of a distributed storage system provided in an embodiment of the present application; Figure 6 A schematic diagram of the structure of an exemplary distributed storage system provided in an embodiment of the present application; Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0028] The above drawings have shown clear embodiments of the present application, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0030] In addition, the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. In the description of the following embodiments, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0031] With the development of modern information technology and the popularization of smart devices, the amount of data and the type of data are growing rapidly. Traditional storage systems can no longer meet the large-scale and diversified data storage needs. The rise of big data and cloud computing technologies has provided more application scenarios for distributed storage systems and promoted the development of distributed storage system technology. Traditional file systems cannot compete with distributed storage systems because distributed storage can tolerate common storage failures and can be expanded to thousands of machines. Distributed storage systems are designed to provide high-performance, high-reliability and scalable storage solutions. The design concept of distributed storage systems is based on scalability and fault tolerance. It adopts a distributed architecture to slice data and distribute it on multiple nodes in the form of objects, and ensures the capacity and load balancing of each node. It also provides a unified storage interface for data access and management through network connections. Among them, high reliability: data redundancy and automatic fault recovery mechanisms are used to ensure data reliability and persistence. High scalability: distributed storage system clusters can be dynamically expanded horizontally to support hundreds or even thousands of nodes. Unified interface: provides a unified file system, object storage and block storage interface to facilitate user data access and management.
[0032] The development trend of distributed storage system technology includes more intelligent data management and scheduling, more efficient data balancing and storage technology, more secure and reliable data protection and backup technology, etc. Therefore, distributed storage resource management and IO scheduling face huge challenges. The storage backend is at the bottom layer and is responsible for storing the distributed storage client system application data on the storage device, which refers to the disk, solid-state disk or NVmeSSD. In order to store data more efficiently, the storage backend buffers the request in the IO processing queue and flushes the request data in the queue to the storage device in batches according to some management and scheduling algorithms. Request scheduling is a key technology for distributed storage systems to meet the quality of service (QoS) goals. Request scheduling can balance resource allocation, ensure the throughput and latency of business applications, and isolate performance control.
[0033] With the increasing amount of stored data and the continuous expansion of business scale, it is necessary to ensure high quality of service (QoS) of distributed storage systems. Applying technologies that specify storage performance for distributed storage systems to ensure that specific applications and dynamic workloads always obtain specific access performance has always been the focus of the storage service industry and academic research.
[0034] In the related art, the front-end request scheduling module and the storage back-end module are generally separated to manage the storage system IO. The front-end request scheduling control module needs to set static thresholds in the planning and deployment stages to determine how to allocate and process client requests, thereby ensuring the QoS of the storage system; the storage back-end module is responsible for processing data storage IO and evenly distributing data in the storage system devices. When a distributed storage system client business application requests storage data IO, it first passes through the request scheduling module layer to allocate resources to ensure the throughput and latency of the business application, as well as performance control isolation; then, after passing through the storage back-end module, the request is buffered in the IO processing queue, and the request data in the queue is flushed to the storage device in batches.
[0035] With the continuous update and development of heterogeneous storage devices, storage devices such as disks, solid-state drives or NVmeSSDs have emerged. They need to be set up through heterogeneous deployment solutions in the same distributed storage system cluster, and different request scheduling strategies need to be formulated according to the performance and capacity characteristics of different storage devices.
[0036] In the dynamic workload requests of the distributed storage system, for example, in the case of a failure, the storage needs to perform data self-recovery and balance data, which will consume IO resources. At this time, when the client suddenly makes a large number of IO requests, the design of separating the request scheduling module from the storage backend module will not be able to balance the processing volume of the front-end scheduling and the back-end data storage, because the two modules are separated and decoupled, and the processing status and delay of the two modules cannot be monitored in time and effectively. On the other hand, the request scheduling control module needs to set static thresholds in advance to ensure QoS, which has limitations. The front end refers to the request scheduling module, and the back end refers to the storage back end module. Only when the front end request scheduling processing meets a sufficient number can the scheduling processing be effectively carried out. At the same time, the back end needs to meet a sufficient processing volume to ensure the IO performance of data storage. If there is a difference in the number of requests from the front and back ends in this process, the IO delay cannot be automatically adjusted and weighed, which will cause the performance of the distributed storage system to gradually decline.
[0037] When there are many requests for front-end scheduling and processing, but few requests for back-end data storage queues, the scheduling mechanism can meet the expected QoS setting goals. However, due to the small number of requests for back-end data storage queues, insufficient IO pressure will lead to reduced efficiency of distributed storage processing IO requests, and the storage device will be in an idle dormant state.
[0038] When there are few requests for front-end scheduling and processing, there are many requests for back-end data storage queues. When there are many requests for back-end storage queues and a large amount of data is written to the storage system, the write requests are congested in the buffer waiting to be processed. Storage IO congestion eventually causes the system to become slow in processing these data, increasing response time delays and affecting system performance and throughput.
[0039] In response to the above problems, an embodiment of the present application provides a distributed storage service request processing method, device and distributed storage system, the method comprising: obtaining the current total service delay and current service throughput of the distributed storage system; determining the current allowed value of the service request throttle according to the current total service delay and current service throughput of the distributed storage system; when receiving multiple service requests sent by the user end, transmitting the corresponding number of service requests to the target task queue of the target storage node according to the current allowed value of the service request throttle; in response to the service requests in the target task queue, storing the service data in the corresponding target storage device. The method provided by the above scheme limits the number of service requests sent to the target storage node according to the current allowed value of the service request throttle, thereby ensuring the system service delay and service throughput, avoiding congestion of service requests, and laying a foundation for improving the storage service quality of the distributed storage system.
[0040] The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.
[0041] The embodiment of the present application provides a distributed storage service request processing method, which is used to process the service request sent by the user end to the distributed storage system to avoid the situation where the distributed storage system is congested with service requests. The execution subject of the embodiment of the present application is an electronic device, such as a server, a desktop computer, a laptop computer, a tablet computer, and other electronic devices that can be used for distributed storage service request processing.
[0042] like Figure 1 FIG. 1 is a flow chart of a distributed storage service request processing method provided in an embodiment of the present application, the method comprising: Step 101: Obtain the current service total delay and current service throughput of the distributed storage system.
[0043] Specifically, based on a preset data collection device, the total service delay and service throughput of the distributed storage system can be monitored in real time to obtain the current total service delay and current service throughput of the distributed storage system.
[0044] Step 102: Determine the current allowable value of the service request throttle according to the current service total delay and the current service throughput of the distributed storage system.
[0045] It should be noted that the storage front end sends service requests to the storage back end (storage node) through the service request throttle. The allowed value of the service request throttle is used to limit the number of service requests sent by the storage front end to the back end.
[0046] Specifically, the current allowed value of the service request throttle is determined according to the current service total delay and the current service throughput of the distributed storage system, thereby ensuring that the allowed value adopted by the service request throttle complies with the current actual load of the distributed storage system.
[0047] Step 103: when multiple service requests sent by the user end are received, a corresponding number of service requests are transmitted to the target task queue of the target storage node according to the current allowed value of the service request throttle.
[0048] It should be noted that the distributed storage system includes storage nodes, each storage node includes multiple storage devices, each storage device corresponds to a task queue, and in the embodiment of the present application, the number of target storage nodes and target task queues is not limited to one.
[0049] Specifically, when multiple service requests sent by the user end are received, the number of service requests sent to the target task queue of the target storage node is limited according to the current allowed value of the service request throttle.
[0050] Step 104 , in response to the service request in the target task queue, storing the service data in the corresponding target storage device.
[0051] Specifically, in response to a service request in the target task queue, the service data indicated to be stored in the service request may be stored in the corresponding target storage device.
[0052] Among them, the target storage devices include magnetic disks, solid-state disks, and NVMe hard disks.
[0053] On the basis of the above embodiment, in order to ensure the reliability of the current allowed value adopted by the service request throttle, as an implementable manner, on the basis of the above embodiment, in one embodiment, according to the current service total delay and the current service throughput of the distributed storage system, the current allowed value of the service request throttle is determined, including: Step 1021, determining a target total service delay of the distributed storage system according to the current total service delay and the current service throughput of the distributed storage system; Step 1022: Determine the current allowable value of the service request throttle according to the current service total delay and the target service total delay of the distributed storage system.
[0054] Specifically, Figure 2As shown, it is a flow chart of an exemplary distributed storage business request processing method provided in an embodiment of the present application, which collects the back-end business throughput and the total delay of the back-end business in real time, and assigns the obtained data to loop A and loop B, loop A is used to update the current allowed value of the business request throttle, and loop B is used to update the target total delay of the distributed storage system, so as to dynamically and adaptively update the double loop according to the load conditions of the distributed storage system, thereby ensuring that the current allowed value adopted by the business request throttle is dynamically matched with the load of the distributed storage system, thereby improving the reliability of the current allowed value adopted by the business request throttle.
[0055] Specifically, in one embodiment, an objective function may be constructed according to the current total service delay and the current service throughput of the distributed storage system; and the target total service delay of the distributed storage system may be updated according to the objective function at a first preset period.
[0056] Specifically, an objective function may be constructed according to the user's performance requirements for the distributed storage system, and then two gradient descent optimization methods may be used to update the target total service delay of the distributed storage system according to the objective function.
[0057] Among them, the two gradient descent optimization methods refer to obtaining the target parameters in the iterative step, and gradually approaching the minimum point of the function by iterating along the negative gradient direction of the objective function. The gradient here refers to the partial derivative of the objective function with respect to the parameter. The two gradient descent optimization methods are composed of two loop methods. One loop optimizes one variable by adjusting the system parameters, and the other loop optimizes another variable by adjusting the parameters of the first loop.
[0058] Specifically, in one embodiment, the performance measurement index of the distributed storage system may be determined according to the current total service delay and the current service throughput of the distributed storage system; and the objective function may be constructed according to the calculation formula of the performance measurement index.
[0059] Specifically, the performance measurement index of the distributed storage system can be calculated according to the user's performance requirements for the distributed storage system, the current total service delay and the current service throughput of the distributed storage system, and then the calculation formula of the performance measurement index can be inferred. Finally, the objective function is constructed based on the calculation formula of the performance measurement index.
[0060] Among them, the objective function is as follows:
[0061] in, Indicates the total delay of the current business. Indicates the total delay of the target business before the update. Indicates the current service throughput. Indicates the throughput adjustment parameter.
[0062] It should be noted that the objective function is a measurement indicator calculated based on the current service total delay and the current service throughput. The square term of the current service total delay ( ) represents the excess penalty for delay, which means that the objective of the objective function provided in the embodiment of the present application is to minimize delay. The throughput term ( ) indicates the desire to maximize the system throughput, and There are actually two adjustment parameters used to balance the total service delay and service throughput in the optimization objectives.
[0063] Specifically, an embodiment of the present application proposes to use a gradient descent algorithm in a distributed storage system to detect the total back-end storage IO delay (total current business delay) and throughput (current business throughput), and adaptively adjust the calculation formula and derivation process algorithm of the target delay parameter, optimize the objective function through the gradient descent algorithm, and design the above objective function in the dynamic load of the distributed storage system so that the system's storage front-end scheduling and storage back-end IO delay and throughput can be effectively balanced.
[0064] Furthermore, in one embodiment, the target service total delay of the distributed storage system may be updated based on the following formula:
[0065] in, Indicates the updated total delay of the target service. Indicates the total delay of the target business before the update. represents the preset learning rate, The update step size used to control the total delay of the target service, represents the partial derivative of the objective function with respect to the total delay of the target service, represents the partial derivative of the objective function with respect to the throughput adjustment parameter.
[0066] Specifically, , , the gradient represents the rate of change of the function at a certain point, and is a vector in which each component corresponds to a partial derivative. The gradient descent algorithm uses this gradient to find the minimum point. The embodiment of the present application calculates the gradient of the objective function and then updates the parameters along the negative direction of the gradient. In a distributed storage system, the system load, network conditions, storage medium characteristics, etc. are comprehensively considered, and the gradient of the objective function is calculated by monitoring the actual IO delay (current business total delay) and throughput (current business throughput) of the system, and the target delay parameter (target business total delay) is adaptively adjusted according to the change in the gradient. The adaptive adjustment of the target delay parameter needs to be judged according to the actual situation, and the target delay parameter needs to be dynamically adjusted during the iterative process of gradient descent to adapt to the changes in the dynamic load of the distributed storage system.
[0067] Specifically, Figure 2 As shown, the embodiment of the present application uses a two-variable two-gradient descent optimization method to dynamically and adaptively adjust the target delay parameter in a dynamic workload. The two variables are the storage backend IO delay and IO throughput. The distributed storage client IO request first enters the front-end scheduling device. The embodiment of the present application connects the front-end scheduling device and the back-end storage device through a throttle mechanism to perform forward and backward feedback iterations. Then, the back-end IO delay and throughput distribution are used as input parameters and processed in loop A and loop B, and then the operating value of the throttle is adjusted to control and balance the front-end and back-end IO processing, effectively solving the IO congestion problem.
[0068] Specifically, in one embodiment, the allowable value adjustment direction of the business request throttle can be determined based on the relationship between the current business total delay and the target business total delay of the distributed storage system; the current allowable value of the business request throttle is determined based on the allowable value adjustment direction of the business request throttle and the difference between the current business total delay and the target business total delay.
[0069] Among them, when the size relationship between the current total business delay and the target total business delay of the distributed storage system indicates that the current total business delay is greater than the target total business delay, the allowable value adjustment direction of the business request throttle is determined to be a decreasing direction; when the size relationship between the current total business delay and the target total business delay of the distributed storage system indicates that the current total business delay is not greater than the target total business delay, the allowable value adjustment direction of the business request throttle is determined to be an increasing direction.
[0070] Specifically, an adaptive IO congestion control algorithm can be used to update the current allowed value of the service request throttle. The algorithm records the total delay time allowed for backend storage IO within a certain time interval. At the end of the time interval, if the minimum total delay is higher than the target delay, the allowed value of the queue waiting in the front-end scheduling throttle will be reduced. Conversely, if the minimum total delay is lower than the target delay, the allowed value of the queue waiting will be increased to receive more IO requests.
[0071] Specifically, if the current total service delay is greater than the target total service delay, it indicates that the distributed storage system has experienced an over-delay, and it can be determined that the distributed storage system has experienced service request congestion, so the allowable value of the service request throttle can be reduced to reduce the service requests initiated by the user end to the storage node. If the current total service delay is not greater than the target total service delay, it can be determined that the distributed storage system storage node service requests are relatively small and the delay is small, so the allowable value of the service request throttle can be increased to increase the service requests initiated by the user end to the storage node, so as to improve the resource utilization of the storage node.
[0072] Specifically, in one embodiment, the current allowed value of the service request throttle may be determined according to the second preset period, the allowed value adjustment direction of the service request throttle and the difference between the current service total delay and the target service total delay.
[0073] The second preset period is smaller than the first preset period.
[0074] It should be noted that the adaptive IO congestion control algorithm adjusts the allowed value of queue waiting in the front-end scheduling throttle according to the total IO delay of the storage backend device and the given target delay. The target delay parameter depends on the workload of the distributed storage system. Due to the dynamic business adjustment of the distributed storage system, different target delay values are required for different workloads to perform storage IO operations as expected. Therefore, the embodiment of the present application proposes a dynamic and adaptive adjustment strategy for the target delay parameter under dynamic workloads, which can meet the QoS of distributed storage. Different from the existing related technologies, the use of advance planning, deployment, and setting of static threshold parameters will not solve the current IO congestion management problem of dynamic workloads.
[0075] Specifically, the adaptive IO congestion control algorithm uses the following logic to update the current allowed value of the service request throttle: When the time interval ends Begin If the total delay of current business > the total delay of target business then Reduce the allowed value; / / Current service total delay – target service total delay else Increase the allowed value; End reset The total delay of the current service sleep for interval end The time interval is the second preset period. Figure 2 In the loop, loop A monitors the total IO latency of the storage backend in real time and controls the allowed value of the storage backend queue processing requests according to the target latency parameter. In a short time interval, loop A detects and manages the total IO latency of the backend, thereby quickly responding to storage IO latency and workload changes. Loop B detects the IO throughput of the storage backend at a relatively long time interval. The difference between using a longer time interval is that the backend IO throughput is affected by many factors such as storage internal data synchronization and reconstruction. Therefore, low-frequency sampling statistics at a longer time interval is the best way to ensure accuracy. During this time interval, the target latency parameter in loop A is adjusted to balance the IO throughput of the storage backend. According to the change of the target latency, when the target latency becomes smaller, loop A limits the allowed IO to enter the storage backend device, so the IO latency and throughput of the storage backend device will decrease. Loop B updates and optimizes the target latency parameter based on the IO throughput trade-off to evenly manage and distribute IO requests between the storage backend and the storage frontend. When the IO throughput reaches the maximum capacity, loop B reduces the target latency parameter to prevent a sudden increase in the buffer. As the IO throughput gradually decreases, loop B increases the target latency parameter to prevent the storage backend device from having no more requests to process IO, causing the storage to be idle and enter a dormant state.
[0076] In a distributed storage system, when an OSD (object storage) process such as a storage device disk fails in a fault scenario, first, the OSD no longer carries data due to the fault, and the data needs to be balanced to other normal OSD disk devices to achieve data consistency and integrity of distributed storage. Then, the failed OSD is repaired and restarted, and the data will be restored and backfilled to the OSD, and occupy the back-end IO throughput of the storage device. While data recovery is in progress, a high-load request for distributed storage client services is initiated at the same time. However, since the client's high workload request is dynamically bursty, the storage back-end device OSD processing queue has been filled with data recovery IO at this time. When a large number of high-load requests pour into the back-end storage device, it is bound to affect the overall IO performance of the storage, resulting in high-latency response requests. In this case, through the continuous iterative parameter adjustment of the dual loops A and B proposed in the embodiment of the present application, the target delay parameters are adjusted, and the front-end load request influx is dynamically controlled to adaptively meet the storage efficient IO processing in the current scenario.
[0077] Based on the above embodiment, as an implementable manner, based on the above embodiment, in one embodiment, when multiple service requests sent by a user end are received, a corresponding number of service requests are transmitted to a target task queue of a target storage node according to a current allowed value of a service request throttle, including: Step 1031, based on the front-end scheduling device, receiving multiple service requests sent by the user end, and caching the received service requests into the front-end queue; Step 1032: According to the current allowed value of the service request throttle, a corresponding number of service requests in the front-end queue are transmitted to the target task queue of the target storage node.
[0078] Among them, the distributed storage system in the embodiment of the present application adopts a distributed and decentralized design architecture, and the front-end scheduling device can be any storage node in the distributed storage.
[0079] Specifically, Figure 2 As shown, the service requests sent by the user end are first cached in the front-end queue. The front-end scheduling device schedules the current allowed value of the service request throttle valve to schedule the service requests in the front-end queue to transmit the corresponding number of service requests in the front-end queue to the target task queue of the target storage node (storage device back end).
[0080] Specifically, in one embodiment, the target length of the task queue of each storage node in the distributed storage system can be determined based on the current allowed value of the business request throttle; when multiple business requests sent by the user end are received, the corresponding number of business requests are scheduled from the front-end queue based on the target length of the task queue and the current capacity occupancy of the target task queue of the target storage node, and the business requests are transmitted to the target task queue of the target storage node.
[0081] The target length of the task queue specifically refers to the number of service requests allowed to wait in the task queue.
[0082] Specifically, the number of business requests allowed to wait in each task queue of each storage node in the distributed storage system can be determined based on the current allowed value of the business request throttle, and then the number of business requests currently waiting for response in the target task queue can be determined based on the current capacity occupancy of the target task queue. Finally, based on the difference between the two, it can be determined how many task requests can be added to the target task queue, and then the corresponding number of business requests can be dispatched from the front-end queue to the target task queue.
[0083] Specifically, to ensure load balancing of the distributed storage system, a preset load balancing algorithm may be used to determine the target storage node and target task queue for each task request. The specific load balancing method is not limited in the embodiments of the present application.
[0084] Specifically, in one embodiment, in response to a business request in a target task queue, the business request can be split into a data request and a metadata request, and the metadata request can be cached in the metadata queue; based on the data request and the metadata request, the data to be stored and the metadata can be associated and stored in the corresponding target storage device.
[0085] The business data includes data to be stored and metadata.
[0086] Specifically, Figure 3 As shown, it is a network architecture diagram of the distributed storage system provided by the embodiment of the present application. The distributed storage backend is composed of multiple storage device modules, and each module maintains its own processing queue. In the process of storing data IO in the distributed storage backend, first, the distributed storage system client IO request sends the request to the storage device through the IO congestion control algorithm, and the libaio library (target library) of the operating system performs asynchronous IO operations. The operating system splits the business request into data requests and metadata requests, and puts the data request into a kernel-managed asynchronous IO request queue, and caches the metadata request to the metadata queue. Then, the kernel will process these IO requests asynchronously, including copying data from user memory to the kernel buffer, triggering actual hardware IO operations, and processing IO completion events. In the process of storing metadata IO in the distributed storage backend, first, the metadata needs to be queued in the Key-Value queue (metadata queue), and then stored in the RocksDB database (metadatabase), and finally the data and metadata are stored in the disk, SSD, and NVMe hard disk (NVMESSD).
[0087] The distributed storage service request processing method provided by the embodiment of the present application obtains the current total service delay and current service throughput of the distributed storage system; determines the current allowed value of the service request throttle according to the current total service delay and current service throughput of the distributed storage system; when receiving multiple service requests sent by the user end, transmits the corresponding number of service requests to the target task queue of the target storage node according to the current allowed value of the service request throttle; and stores the service data in the corresponding target storage device in response to the service request in the target task queue. The method provided by the above scheme limits the number of service requests sent to the target storage node according to the current allowed value of the service request throttle, ensures the system service delay and service throughput, avoids congestion of service requests, and lays the foundation for improving the storage service quality of the distributed storage system. In addition, by dynamically adjusting the target delay according to the changes in workload, the trade-off of request processing is always maintained within a reasonable range to avoid serious queuing delays. The performance of the distributed storage system is optimized, serious queuing delays in the storage backend are avoided, and IO congestion is controlled by dynamically adjusting the target delay. Based on the same hardware resources, in the case of dynamic high-concurrency requests, the method provided in the embodiment of the present application can quickly respond to dynamic changes in distributed storage client requests, such as sudden growth in requests, thereby preventing excessive accumulation of the distributed storage backend buffer, thereby providing better storage IO transmission performance and stability, improving the competitiveness and maintenance cost of the distributed storage system, and the method is portable and universal on different hardware devices.
[0088] An embodiment of the present application provides a distributed storage service request processing device, which is used to execute the distributed storage service request processing method provided in the above embodiment.
[0089] like Figure 4 , which is a schematic diagram of the structure of a distributed storage service request processing device provided in an embodiment of the present application. The distributed storage service request processing device 40 comprises: an acquisition module 401 , a determination module 402 , a processing module 403 and a response module 404 .
[0090] Among them, the acquisition module is used to obtain the current total business delay and current business throughput of the distributed storage system; the determination module is used to determine the current allowed value of the business request throttle according to the current total business delay and current business throughput of the distributed storage system; the processing module is used to transmit the corresponding number of business requests to the target task queue of the target storage node according to the current allowed value of the business request throttle when receiving multiple business requests sent by the user end; the response module is used to respond to the business requests in the target task queue and store the business data in the corresponding target storage device.
[0091] Regarding the distributed storage service request processing device in this embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0092] The distributed storage service request processing device provided in the embodiment of the present application is used to execute the distributed storage service request processing method provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.
[0093] An embodiment of the present application provides a distributed storage system for executing the distributed storage service request processing method provided in the above embodiment.
[0094] like Figure 5 As shown, it is a structural diagram of the distributed storage system provided in an embodiment of the present application, the system includes multiple storage nodes, each storage node includes multiple storage devices; any storage node processes a business request based on the distributed storage business request processing method provided in the above embodiment to store the business data of the business request in the corresponding target storage device.
[0095] For example, Figure 6 As shown, it is a structural diagram of an exemplary distributed storage system provided by an embodiment of the present application. The design concept of the distributed storage system is based on scalability and fault tolerance, eliminating performance bottlenecks such as single-point metadata, adopting a distributed and decentralized design architecture, slicing data and distributing and storing them on multiple nodes in the form of objects, and ensuring that the load and capacity of each node are balanced, and using network connections to access and manage data. The technology also provides a unified storage interface. Since the distributed storage system adopts a decentralized design architecture, it is highly scalable; the failure of a single storage server node will not affect the unavailability of the entire distributed storage cluster; it supports dynamic expansion to add or delete storage server nodes, and can automatically relocate data objects in the cluster to balance the storage space utilization between storage servers. The distributed storage system architecture includes multiple components, such as object gateway services, block device services, file system services, a unified, self-controlled, and scalable distributed storage consistency management system, a storage pool, a controllable, scalable, distributed data balancing placement algorithm, and a metadata and monitoring service cluster. In the storage pool, the client's data is stored by slicing, fixed to 4MB objects by default, and the objects are grouped. The group id is the value of the remainder of Hash (object x) and the number of groups, and finally stored in the underlying device. The distributed storage system includes multiple storage pools, and each storage pool includes multiple storage nodes.
[0096] The distributed storage system architecture includes the following key components: 1) Object gateway service, block device service, and file system service: Provide a unified storage interface to provide access interface services for distributed storage clients.
[0097] 2) Unified, self-controlled, and scalable distributed storage consistency management system: This component is the core component of the distributed storage cluster, which provides distributed storage services in the form of objects. In this component, data is stored as objects, and each object has a unique identifier and related data. It is responsible for storing objects in a distributed manner on each node of the storage cluster, and provides data replication, recovery, load balancing and other functions to ensure data reliability and high-performance access. This component usually involves front-end scheduling strategies, setting the bandwidth and iops performance limits of different business interfaces through static thresholds.
[0098] 3) Storage pool: A distributed storage cluster consists of multiple storage nodes, each of which can contain multiple hard disks or storage devices. The storage pool divides storage resources into different pools to meet different storage needs.
[0099] 4) Controllable, scalable, distributed data balanced placement algorithm: This component evenly distributes data objects on various nodes in the storage cluster to avoid data hotspots and improve system performance.
[0100] 5) Metadata and monitoring service cluster: The metadata cluster is only responsible for managing the metadata information of the file system, including the attributes and location of files and directories. The monitoring service cluster is responsible for monitoring the status and configuration information of the cluster. Its technical principles include maintaining the status information, configuration information, health status, etc. of the cluster to ensure the consistency and availability of the cluster.
[0101] Among them, the storage device of each node, namely OSD, will first receive the request for data and metadata, and then enter the processing queue of each stage of the storage device, process it in the queue, and finally flush the data and metadata to the storage device.
[0102] The distributed storage system ensures the performance isolation of different business applications by adopting different front-end scheduling algorithms. The front-end scheduling module can ensure high-quality service QoS requirements. These requirements are usually defined in a unified, self-controlled, and scalable distributed storage consistency management system. The storage back-end module is responsible for effectively storing and retrieving data on the underlying storage devices of the distributed storage system. In the distributed storage node, the scheduling algorithm rearranges the requests in the queue according to the strategy, and assigns higher priority requests to the back-end storage device processing queue. However, if the back-end storage device has enough buffers, the scheduling algorithm will dispatch more requests, which will cause IO congestion in the buffer. The distributed storage system provided in the embodiment of the present application adopts the method provided in the above embodiment to process business requests to avoid causing IO congestion in the buffer.
[0103] Regarding the distributed storage system in this embodiment, its specific implementation has been described in detail in the embodiment of the method, and will not be elaborated here.
[0104] The distributed storage system provided in the embodiment of the present application is used to execute the distributed storage service request processing method provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.
[0105] An embodiment of the present application provides an electronic device for executing the distributed storage service request processing method provided in the above embodiment.
[0106] like Figure 7 FIG. 7 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 70 includes: at least one processor 71 and a memory 72 .
[0107] The memory stores computer-executable instructions; at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the distributed storage service request processing method provided in the above embodiment.
[0108] The electronic device provided in the embodiment of the present application is used to execute the distributed storage service request processing method provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.
[0109] An embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, a distributed storage service request processing method provided in any of the above embodiments is implemented.
[0110] The storage medium containing computer executable instructions provided in the embodiment of the present application can be used to store computer executable instructions of the distributed storage service request processing method provided in the aforementioned embodiment. Its implementation method and principle are the same and will not be repeated here.
[0111] An embodiment of the present application provides a computer program product, including computer instructions, which are used to enable a computer to execute the distributed storage service request processing method provided in the aforementioned embodiment.
[0112] The embodiments of the present application provide a computer program product that can be used to execute computer instructions of the distributed storage service request processing method provided in the aforementioned embodiments. The implementation method and principle are the same and will not be repeated here.
[0113] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0114] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0115] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0116] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0117] A part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0118] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0119] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A distributed storage service request processing method, characterized in that: include: Obtain the current total service delay and current service throughput of the distributed storage system; Determine a current allowable value of a service request throttle according to a current service total delay and a current service throughput of the distributed storage system; When receiving multiple service requests sent by the user end, transmitting a corresponding number of service requests to a target task queue of a target storage node according to a current allowed value of the service request throttle valve; In response to the service request in the target task queue, the service data is stored in the corresponding target storage device.
2. The method according to claim 1, characterized in that The determining, according to the current service total delay and the current service throughput of the distributed storage system, the current allowed value of the service request throttle comprises: Determining a target total service delay of the distributed storage system according to a current total service delay and a current service throughput of the distributed storage system; According to the current total service delay of the distributed storage system and the target total service delay, a current allowable value of the service request throttle is determined.
3. The method according to claim 2, characterized in that The determining, according to the current total service delay and the current service throughput of the distributed storage system, a target total service delay of the distributed storage system comprises: Constructing an objective function according to the current service total delay and the current service throughput of the distributed storage system; According to the objective function, the target total service delay of the distributed storage system is updated in a first preset cycle.
4. The method according to claim 3, characterized in that The constructing of an objective function according to the current service total delay and the current service throughput of the distributed storage system comprises: Determining a performance measurement indicator of the distributed storage system according to a current service total delay and a current service throughput of the distributed storage system; According to the calculation formula of the performance measurement indicator, an objective function is constructed.
5. The method according to claim 4, characterized in that The step of constructing an objective function according to a calculation formula of the performance measurement indicator comprises: According to the calculation formula of the performance measurement index, the following objective function is constructed: in, Indicates the total delay of the current business. Indicates the total target service delay before updating. Indicates the current service throughput. Indicates the throughput adjustment parameter.
6. The method according to claim 3, characterized in that The updating of the target service total delay of the distributed storage system according to the objective function includes: Based on the following formula, the target total service delay of the distributed storage system is updated: in, Indicates the updated total delay of the target service. Indicates the total target service delay before updating. represents the preset learning rate, represents the partial derivative of the objective function with respect to the total delay of the target service, represents the partial derivative of the objective function with respect to the throughput adjustment parameter.
7. The method according to claim 3, characterized in that The determining, according to the current total service delay of the distributed storage system and the target total service delay, a current allowable value of the service request throttle valve comprises: Determining the adjustment direction of the allowable value of the service request throttle according to the size relationship between the current service total delay of the distributed storage system and the target service total delay; The current allowed value of the service request throttle is determined according to the allowed value adjustment direction of the service request throttle and the difference between the current service total delay and the target service total delay.
8. The method according to claim 5, characterized in that The determining, according to the size relationship between the current total service delay of the distributed storage system and the target total service delay, the adjustment direction of the allowable value of the service request throttle valve comprises: In a case where the magnitude relationship between the current service total delay and the target service total delay of the distributed storage system indicates that the current service total delay is greater than the target service total delay, determining that the adjustment direction of the allowable value of the service request throttle is a decreasing direction; When the size relationship between the current total service delay and the target total service delay of the distributed storage system indicates that the current total service delay is not greater than the target total service delay, the adjustment direction of the allowable value of the service request throttle is determined to be an increasing direction.
9. The method according to claim 5, characterized in that The determining the current allowed value of the service request throttle according to the allowed value adjustment direction of the service request throttle and the difference between the current service total delay and the target service total delay includes: According to a second preset period, determining a current allowed value of the service request throttle according to an allowed value adjustment direction of the service request throttle and a difference between the current service total delay and the target service total delay; The second preset period is smaller than the first preset period.
10. The method according to claim 1, characterized in that When receiving multiple service requests sent by the user end, transmitting a corresponding number of service requests to the target task queue of the target storage node according to the current allowed value of the service request throttle, including: Based on the front-end scheduling device, multiple service requests sent by the user end are received, and the received service requests are cached in the front-end queue; According to the current allowed value of the service request throttle, a corresponding number of service requests in the front-end queue are transmitted to the target task queue of the target storage node.
11. The method according to claim 10, characterized in that The transmitting, according to the current allowed value of the service request throttle, a corresponding number of service requests in the front-end queue to the target task queue of the target storage node comprises: Determining a target length of a task queue of each storage node in the distributed storage system according to a current allowed value of the service request throttle; When multiple service requests are received from the user end, a corresponding number of service requests are scheduled from the front-end queue according to the target length of the task queue and the current capacity occupancy of the target task queue of the target storage node, and the service requests are transmitted to the target task queue of the target storage node.
12. The method according to claim 1, characterized in that The step of storing the business data in a corresponding target storage device in response to the business request in the target task queue includes: In response to a business request in the target task queue, split the business request into a data request and a metadata request, and cache the metadata request in a metadata queue; According to the data request and the metadata request, the data to be stored and the metadata are associated and stored in a corresponding target storage device; The business data includes the data to be stored and metadata.
13. A distributed storage service request processing device, characterized in that: include: An acquisition module is used to obtain the current total service delay and current service throughput of the distributed storage system; A determination module, configured to determine a current allowable value of a service request throttle according to a current service total delay and a current service throughput of the distributed storage system; A processing module, configured to, when receiving a plurality of service requests sent by a user terminal, transmit a corresponding number of service requests to a target task queue of a target storage node according to a current allowed value of the service request throttle valve; The response module is used to respond to the service request in the target task queue and store the service data in the corresponding target storage device.
14. A distributed storage system, characterized in that: include: A plurality of storage nodes, each storage node including a plurality of storage devices; Any of the storage nodes processes the service request based on the method according to any one of claims 1 to 12 to store the service data of the service request in the corresponding target storage device.
15. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method according to any one of claims 1 to 12.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, the method according to any one of claims 1 to 12 is implemented.
17. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Method and apparatus for flow congestion control in multiflow networks
CN103718597A
Request degradation processing method and device, electronic equipment and storage medium
CN110505155A
High-throughput parallel log storage system and method
CN116048822A
Slow disk detection strategy system and method for manufacturing industry
CN116149557A
Garbage collection method and device for distributed storage system and distributed storage system
CN116700634A
Cited By
Hard disk IO flow control method and device of distributed storage system, equipment and medium
CN119987675A
Request delivery control method, electronic equipment and storage medium
CN121309479A
