Request flow control method, device, equipment and medium
By weighted calculations of the requests of each client in the storage system, obtaining its processing capabilities in real time, and flow control is carried out according to the system resource allocation strategy, the problem of poor flow control effect in the existing technology is solved, and more efficient system performance guarantee is achieved.
Patent Information
- Application Number
- CN202412000353.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-03-28
AI Technical Summary
When existing storage systems handle a large number of concurrent read and write requests, it is difficult to achieve flexible and accurate flow control, resulting in system performance being affected.
By weighted calculations based on the request operation type and operation parameters of each client, the processing capabilities of each client are obtained in real time, and system resources are allocated according to the overall processing capabilities of the storage system. If the processing capabilities of a certain client are higher than the allocation capabilities, request flow control is performed.
It realizes dynamic and accurate identification of clients that occupy too much system processing capabilities, performs accurate flow control, improves flow control effect, and ensures system performance.
Smart Images

Figure CN119718672A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of storage technology, and in particular to a request flow control method, device, equipment and medium. Background Art
[0002] Currently, in the field of data storage, storage systems are facing the challenge of handling a large number of concurrent read and write requests. If the traffic of individual clients is large, it will occupy too many system resources and affect the business processing performance of other clients. The commonly used QoS (Quality of Service) solution can only set fixed upper and lower limits for the business, which is not flexible and accurate enough, and it is difficult to achieve a good flow control effect, which affects system performance.
[0003] Therefore, how to improve the flow control effect and ensure system performance is a problem that technical personnel in this field need to solve. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a request flow control method, device, equipment and medium, which can improve the flow control effect and ensure system performance. The specific scheme is as follows:
[0005] In a first aspect, the present invention provides a request flow control method, comprising:
[0006] Perform weighted calculation based on the operation type and operation parameters of the requests issued by each client within the preset statistical time window to obtain the current processing capacity of each client;
[0007] Calculate the current overall processing capacity of the storage system based on the current corresponding processing capacity of all clients;
[0008] If the queue length of the request queue does not exceed the first threshold, the overall processing capacity is allocated to each client to obtain the system allocation capacity of each client, wherein the request queue is used to place the pending requests sent by the client;
[0009] When the current processing capacity corresponding to any client is higher than the system allocation capacity of the client, request flow control is performed on the client.
[0010] Optionally, also include:
[0011] If the queue length of the request queue exceeds the first threshold, the system deadline processing capacity is allocated to each client to obtain the system allocation capacity of each client, wherein the system deadline processing capacity represents the maximum processing capacity of the storage system.
[0012] Optionally, also include:
[0013] Obtaining hardware configuration parameters of the storage system, wherein the hardware configuration parameters include one or more of processor model, number of cores, clock frequency, memory capacity, storage device type, and number of device nodes;
[0014] Estimating the maximum processing capacity of the storage system based on the hardware configuration parameters to obtain a system processing capacity estimation;
[0015] Determining the system processing capacity estimate as the initial system deadline processing capacity;
[0016] Monitoring the queue length of the request queue;
[0017] comparing a second threshold and the first threshold with the queue length;
[0018] If the queue length is less than the second threshold, compare the system processing capacity estimate and the current overall processing capacity of the storage system, update the system deadline processing capacity to the larger value of the system processing capacity estimate and the current overall processing capacity of the storage system, and trigger the step of allocating the overall processing capacity to each client to obtain the system allocation capacity of each client;
[0019] If the queue length is greater than or equal to the second threshold and less than the first threshold, the system deadline processing capacity is updated to the current overall processing capacity of the storage system, and the step of allocating the overall processing capacity to each client to obtain the system allocation capacity of each client is triggered.
[0020] Optionally, performing weighted calculation based on the operation type and operation parameters of the request sent by each client within a preset statistical time window to obtain the current processing capacity corresponding to each client includes:
[0021] For any client, determine the operation type of the request sent by the client within a preset statistical period and the operation parameters of the target operation type, wherein the target operation type is a data operation or a directory operation, and the directory operation is an operation of reading the content under the directory;
[0022] If the operation type is a preset metadata operation, obtain the preset weight corresponding to the preset metadata operation as the weight corresponding to the request;
[0023] If the operation type is a target operation type, a weight corresponding to the request is determined based on the target operation type and the operation parameters;
[0024] For all requests sent by the client within the preset statistical period, weighted calculation is performed based on the weights corresponding to the requests to obtain the current corresponding processing capacity of the client.
[0025] Optionally, the operation parameter corresponding to the data operation includes a data block size, and the operation parameter corresponding to the directory operation is the number of files under the directory.
[0026] Optionally, performing request flow control on the client includes:
[0027] Reduce the request sending rate of the client based on the flow control strategy.
[0028] Optionally, also include:
[0029] When the current processing capacity corresponding to any client is lower than the system allocation capacity of the client, the processing priority of the client's request is increased.
[0030] In a second aspect, the present invention provides a request flow control device, comprising:
[0031] The processing capacity determination module is used to perform weighted calculation based on the operation type and operation parameters of the request sent by each client within a preset statistical time window to obtain the current corresponding processing capacity of each client;
[0032] The overall processing capacity determination module is used to calculate the current overall processing capacity of the storage system based on the current corresponding processing capacity of all clients;
[0033] A capacity allocation module, configured to allocate the overall processing capacity to each client if the queue length of the request queue does not exceed a first threshold, so as to obtain the system allocation capacity of each client, wherein the request queue is used to place the pending requests sent by the client;
[0034] The request flow control module is used to perform request flow control on any client when the current processing capacity corresponding to the client is higher than the system allocation capacity of the client.
[0035] In a third aspect, the present invention provides an electronic device, comprising:
[0036] Memory for storing computer programs;
[0037] A processor is used to execute the computer program to implement the aforementioned steps of requesting flow control.
[0038] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements the aforementioned steps of request flow control when executed by a processor.
[0039] In a fifth aspect, the present invention provides a computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the aforementioned request flow control method disclosed above.
[0040] It can be seen from the above scheme that the present invention provides a request flow control method, including: performing weighted calculation based on the operation type and operation parameters of the request issued by each client within a preset statistical time window to obtain the current processing capacity corresponding to each client; calculating the current overall processing capacity of the storage system based on the current processing capacity corresponding to all clients; if the queue length of the request queue does not exceed the first threshold, the overall processing capacity is allocated to each client to obtain the system allocation capacity of each client, wherein the request queue is used to place the requests to be processed issued by the client; when the current processing capacity corresponding to any client is higher than the system allocation capacity of the client, request flow control is performed on the client.
[0041] It can be seen that the beneficial effects of the present invention are: in the preset statistical time window, weighted calculation is performed based on the operation type and operation parameters of the request sent by the client, and the current processing capacity corresponding to each client is obtained in real time, and then the current overall processing capacity of the storage system is obtained, which can more accurately determine the current processing capacity required for the storage system as a whole and the processing capacity required for each client respectively, and uniformly determine the system allocation capacity of each client based on the overall processing capacity, and perform flow control on the clients with higher corresponding processing capacity. In this way, clients that occupy too much system processing capacity can be dynamically and accurately identified, thereby achieving precise flow control, improving the flow control effect, and ensuring system performance.
[0042] Correspondingly, a request flow control device, equipment and medium provided by the present invention also have the above-mentioned technical effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 A flow chart of a request flow control method provided by an embodiment of the present invention;
[0045] Figure 2 A system architecture diagram using a flow control solution provided in an embodiment of the present invention;
[0046] Figure 3 A schematic diagram of request flow control provided by an embodiment of the present invention;
[0047] Figure 4 A schematic diagram of the structure of a request flow control device provided by an embodiment of the present invention;
[0048] Figure 5 A structural diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0050] The terms "including" and "having" in the specification of the present invention and the above-mentioned drawings, as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.
[0051] In the field of data storage, storage systems face the challenge of handling a large number of concurrent read and write requests. On the one hand, sudden high loads may cause storage resources to be overloaded, affecting overall performance or even causing service unavailability, bringing serious stability challenges to the operation of existing network services; on the other hand, in a large number of business scenarios such as AIGC (AI Generated Content), all computing nodes are required to perform data read and write operations with basically the same time consumption to avoid the short board effect caused by slow processing of a single node, which affects the overall performance of the system. This requires that the data access performance of different storage clients is equivalent, and AIGC services have high performance requirements for storage systems. In order to solve the above problems and achieve the goal of avoiding sudden business affecting system stability and balancing the access performance of multiple storage clients, the common QoS function in the storage system is often used to set performance upper and lower limits for the client. QoS in the storage system refers to the technology used to control business performance, which can support setting the upper or lower performance limits of read and write business bandwidth, IOPS (IO per second), OPS (Operations per second) and other performance limits for specified storage clients, file system directories and other elements. This solution can achieve certain effects, but it has the following key defects: 1) The QoS solution can only set fixed upper and lower performance limits for the service without considering the system's processing capacity, which may lead to two results: the performance upper limit of the QoS configuration is too low, resulting in the inability to fully utilize the system performance; the QoS configuration value is too high, and the sum of the configuration values exceeds the system processing capacity, which cannot achieve the goal of limiting service performance, making it not exceed the system processing capacity, and not causing stability risks. This problem is particularly prominent in scenarios where the system has expanded or shrunk, which will cause changes in the overall processing capacity, making this solution difficult to implement in the existing network system. In common storage systems, setting fixed QoS parameters is not flexible enough and there are discrepancies with processing resource consumption, making it difficult to achieve good actual results. To this end, the present invention provides a request flow control solution that can improve the flow control effect and ensure system performance.
[0052] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0053] Next, a request flow control method provided by an embodiment of the present invention is introduced in detail. Figure 1 A flow chart of a request flow control method provided by an embodiment of the present invention, the request flow control method includes:
[0054] Step S11: Perform weighted calculation based on the operation type and operation parameters of the request sent by each client within a preset statistical time window to obtain the current processing capacity corresponding to each client.
[0055] The client is a storage client installed on a computing node. Figure 2 As shown, Figure 2 A system architecture diagram using a flow control solution provided in an embodiment of the present invention includes a computing node and a storage system. A storage client is installed in the computing node and is used to send a request to the storage system. The request may be an IO request. The storage system receives the IO request from the client and responds to the request. Figure 2 The figure shows computing node 1 and computing node N, storage client 1 and storage client N, that is, in the embodiment of the present invention, N computing nodes may be included, and N may be greater than or equal to 2. A computing node is a node for performing computing operations, and a storage client software is deployed on the node, which can also be understood as a node of a storage client. Flow control can be understood as a technology that limits the pressure of business requests issued by the business system to prevent excessive business pressure from affecting the stable operation of the system.
[0056] The preset statistical time window is a preset time window for calculating the processing capacity corresponding to the client. It can be understood that each preset statistical time window will perform weighted calculation based on the operation type and operation parameters of the request issued by each client within the preset statistical time window to obtain the current processing capacity corresponding to each client. The preset statistical time window can be set according to the actual scenario, for example, 5s or 10s, to achieve the effect of real-time calculation and dynamic adjustment.
[0057] Among them, the operation type can be an IO operation type, including data operations, target operations and preset metadata operations. Metadata is data that describes data. Preset metadata operations may include create (create operation), getattr (get object attribute operation), lookup (find operation), rename (rename operation), link (connection), etc. The directory operation is an operation to read the content under the directory. Among them, create may include operations such as creating new files and directories. Rename may include operations to change the names of files, directories, etc. Link is an operation to create a connection or reference between two or more files or objects. The operation parameter may be a parameter that characterizes the amount of operation data. For example, the operation parameter corresponding to the data operation includes the data block size, and the operation parameter corresponding to the directory operation is the number of files under the directory.
[0058] In an optional implementation, for any client, the operation type of the request issued by the client within a preset statistical period and the operation parameters of the target operation type can be determined, wherein the target operation type is a data operation or a directory operation, and the directory operation is an operation of reading the content under the directory; if the operation type is a preset metadata operation, the preset weight corresponding to the preset metadata operation is obtained as the weight corresponding to the request; if the operation type is a target operation type, the weight corresponding to the request is determined based on the target operation type and the operation parameters; for all requests issued by the client within the preset statistical period, a weighted calculation is performed based on the weight corresponding to the request to obtain the current corresponding processing capacity of the client.
[0059] It should be pointed out that, for the target operation type, the embodiment of the present invention determines the weight corresponding to the request based on the target operation type and the operation parameters. The larger the amount of data represented by the operation parameters, the larger the weight. In an optional implementation, an initial weight can be set for each target operation type, and the initial weight can be adjusted based on the operation parameters to obtain the weight corresponding to the request. The adjustment can be based on an adjustment value or an adjustment ratio coefficient. The mapping relationship between the operation parameter and the adjustment value or the adjustment ratio coefficient can be pre-set. For example, an operation parameter with a larger amount of data corresponds to a larger adjustment value or a higher upward adjustment ratio coefficient. In this way, the dynamic determination of the weight can more accurately determine the corresponding processing capacity of the client.
[0060] The embodiment of the present invention can perform weighted calculation on all requests issued by the client within the preset statistical period based on the weight corresponding to the request and the capacity requirement value corresponding to the operation type to obtain the current processing capacity corresponding to the client. For example, for a preset metadata operation, the capacity requirement value may be OPS, and the capacity requirement value for a data operation may be IOPS.
[0061] Step S12: Calculate the current overall processing capacity of the storage system based on the current corresponding processing capacity of all clients.
[0062] The embodiment of the present invention can sum up the current processing capabilities corresponding to all clients to obtain the current overall processing capability of the storage system.
[0063] Step S13: If the queue length of the request queue does not exceed the first threshold, the overall processing capacity is allocated to each client to obtain the system allocation capacity of each client, wherein the request queue is used to place the pending requests sent by the client.
[0064] The storage system will first place the request sent by the storage client into a queue before processing it; the system monitors the queue length in real time, and the queue length can be used as a criterion for judging whether the system processing capacity has been reached. Two thresholds are used in the present invention, the first threshold indicates that the business pressure has exceeded the system deadline processing capacity, and the second threshold indicates that the business pressure has reached but has not exceeded the system deadline processing capacity. The first threshold is greater than the second threshold.
[0065] The queue length of the request queue may be a queue length calculated by weighting the queue length of the target queue. In an embodiment of the present invention, the target queue may include all queues for placing requests, or it may be a key queue pre-designated in all request queues. In an embodiment of the present invention, different weights may be assigned to different target queues, and weights may be assigned based on system capacity consumption, so that requests that consume more system capacity have corresponding queue weights that are larger, and a larger queue weight may be understood as a queue with a larger queue weight having smaller capacity consumption relative to a queue with a smaller queue weight. System capacity consumption is related to the type of operation requested, and different operation types may correspond to different queues. In this way, the queue length can better reflect the pressure of the current storage system, thereby better executing corresponding strategies and ensuring stable operation of the system.
[0066] In the embodiment of the present invention, the overall processing capacity may be evenly distributed to each client to obtain the system allocation capacity of each client.
[0067] Furthermore, if the queue length of the request queue exceeds the first threshold, the system deadline processing capacity is allocated to each client to obtain the system allocation capacity of each client, wherein the system deadline processing capacity represents the maximum processing capacity of the storage system.
[0068] In the embodiment of the present invention, the system deadline processing capacity can be evenly distributed to each client to obtain the system allocation capacity of each client.
[0069] In an embodiment of the present invention, the hardware configuration parameters of the storage system can be obtained, wherein the hardware configuration parameters include one or more of processor model, core number, clock frequency, memory capacity, storage device type, and device node number; wherein the device node number can be the number of storage device nodes. The maximum processing capacity of the storage system is estimated based on the hardware configuration parameters to obtain a system processing capacity estimate; the system processing capacity estimate is determined as the initial system deadline processing capacity; the queue length of the request queue is monitored; the second threshold and the first threshold are compared with the queue length; if the queue length is less than the second threshold, the system processing capacity estimate and the current overall processing capacity of the storage system are compared, and the system deadline processing capacity is updated to the larger value of the system processing capacity estimate and the current overall processing capacity of the storage system, and the step of allocating the overall processing capacity to each client to obtain the system allocation capacity of each client is triggered; if the queue length is greater than or equal to the second threshold and less than the first threshold, the system deadline processing capacity is updated to the current overall processing capacity of the storage system, and the step of allocating the overall processing capacity to each client to obtain the system allocation capacity of each client is triggered.
[0070] It can be understood that the system deadline processing capacity in the embodiment of the present invention also changes dynamically in real time, and the steps of monitoring the queue length and updating the system deadline processing capacity can be triggered based on a preset time interval. The preset time interval can be consistent with the preset statistical time window. After determining the complete processing capacity, the queue length of the request queue can be obtained and the threshold comparison can be performed. The system deadline processing capacity sampled in the allocation of system deadline processing capacity to each client is the current system deadline processing capacity, that is, the system deadline processing capacity obtained during system operation, which may be a system processing capacity estimate or the overall processing capacity obtained in the previous round. By dynamically calculating the system deadline processing capacity, the system processing capacity can be fully utilized, and the business pressure can be prevented from exceeding the system processing capacity, thereby avoiding the stability risk caused by system overload operation.
[0071] Step S14: When the current processing capacity corresponding to any client is higher than the system allocation capacity of the client, request flow control is performed on the client.
[0072] The embodiment of the present invention can reduce the request sending rate of the client based on the flow control strategy to implement the request flow control of the client. For example, the request sending rate of the client can be reduced by extending the response time of the request.
[0073] In addition, in an optional implementation, when the current processing capacity corresponding to any client is lower than the system allocation capacity of the client, the processing priority of the client's request is increased and the response time of the request is reduced, thereby achieving a balance in processing performance between clients.
[0074] It can be seen that the embodiment of the present invention performs weighted calculation based on the operation type and operation parameters of the request sent by the client in the preset statistical time window, and obtains the current processing capacity corresponding to each client in real time, and then obtains the current overall processing capacity of the storage system. It can more accurately determine the current processing capacity required for the storage system as a whole and the processing capacity required for each client respectively, and uniformly determine the system allocation capacity of each client based on the overall processing capacity, and perform flow control on the clients with higher corresponding processing capacity. In this way, it can dynamically and accurately identify clients that occupy too much system processing capacity, thereby achieving precise flow control, improving the flow control effect, and ensuring system performance.
[0075] For further information, see Figure 3 As shown, Figure 3 A schematic diagram of request flow control provided by an embodiment of the present invention may include the following steps:
[0076] 1. Use a numerical variable A to record the system deadline processing capacity. After the system is started, an initialization value is estimated for A based on the system hardware configuration and other conditions. The system deadline processing capacity is used to reflect the maximum processing capacity of the system. The system hardware configuration can include CPU model, number of cores, clock frequency, memory capacity, storage device type, number of nodes, etc.
[0077] 2. The system counts the business IO issued by each storage client in real time, and calculates the storage processing capacity value of each client according to the IO type, and accumulates the processing capacity of all clients to obtain the current overall processing capacity of the system, which is recorded as B. It can be calculated every 5s or 10s. In the storage system, due to different IO types and even different parameters of the same type of IO, the processing capacity consumption of the system varies. The embodiment of the present invention uses different weight parameters for calculation based on these differences to obtain a more accurate processing capacity value. The weight value strategy is divided into:
[0078] (1) Fixed weight parameters, including most metadata operations such as create / getattr / lookup / rename / link. For each type of operation, a fixed weight parameter is used for calculation; the OPS * weight of the operation is the system processing capacity used by this type of operation. (2) Dynamic weight parameters, mainly including data operations and readdir operations. The same operation consumes a lot of processing capacity of the system when different parameters and different operation objects are used. The embodiment of the present invention can use dynamic weight parameters for calculation. For example, executing readdir on a directory with less than 1,000 files and executing readdir on a directory with more than 10,000 files consumes much more system performance than the former. When calculating the load, the latter needs to use a weight parameter greater than the former. For data operations, IOPS * weight can be used. Readdir is an operation to read the contents under a directory. Different parameters: For example, when reading file data, the size of the data block to be read can be specified. Different sizes will result in different system pressures; similar to writing data. Different operation objects: For example, readdir reads different directories, with the directory as the operation object; reads and writes files, with the file as the operation object.
[0079] 3. The system will first place the IO request sent by the client into the queue before processing it; the system monitors the length of the IO queue in real time, and the queue length can be used as a criterion for judging whether the system processing capacity has reached the system processing capacity limit. Two thresholds are used in the present invention, threshold 1 indicates that the business pressure has exceeded the system processing capacity limit, and threshold 2 indicates that the business pressure has reached but has not exceeded the system processing capacity limit. Threshold 1 is greater than threshold 2.
[0080] 4. The system determines the length of the IO queue and processes it according to its relationship with the threshold:
[0081] 1) The IO queue length is less than threshold 2. At this time, the business pressure has not reached the system processing capacity. At this time, the system deadline processing capacity is only updated to the larger value of A and B;
[0082] 2) When the IO queue length reaches threshold 2 but does not reach threshold 1, it is considered that the business pressure has reached the system processing capacity limit. In this case, the system processing capacity is directly updated to B. Because the system processing capacity changes dynamically and may become smaller, for example, if a node failure occurs, B is more accurate.
[0083] In the above two cases, the current overall processing capacity B of the system is evenly distributed to all clients, and the system processing capacity allocated to each client is calculated to be C;
[0084] 3) When the IO queue length reaches the threshold 1, it can be considered that the IO sent by the client has exceeded the system processing capacity. At this time, the IO queue time is too long, the IO response is very slow, and the client will feel that the system processing is slow. At this time, the business IO needs to be flow controlled: the system deadline processing capacity value obtained through the above process is evenly distributed to each client, and the system processing capacity allocated to each client is calculated to be C. It can be understood that by setting the initial system deadline processing capacity, system capacity allocation and flow control can be achieved in the case of a sudden increase in requests. B is more accurate and can be larger or smaller than A. If it can be updated to B, it means that the maximum processing capacity of the system can reach B. If the system deadline processing capacity is exceeded, the system deadline processing capacity obtained during the system operation (which may be A or B in the previous cycle) needs to be used for processing.
[0085] 5. The system performs flow control for each client based on C, reduces the processing performance of clients that occupy too much system processing resources, and achieves a balance of processing capabilities among clients. The specific logic is:
[0086] a) For clients whose current processing capacity exceeds C, the system performs flow control to reduce the rate at which the client IO requests are sent, to prevent them from occupying too many system resources and affecting the business processing performance of other clients; on the storage side, the client IO rate can be reduced by extending the IO response time;
[0087] b) For clients whose current processing capacity value does not reach C, the system improves their performance by increasing the processing priority of the IO issued by them, and in this way achieves a balance of processing performance among clients. There are many ways to implement priority, such as using different queues for high and low priorities, and the system gives priority to requests from high-priority queues.
[0088] 6. The system executes the above process in a loop to achieve dynamic adjustment capabilities, including the corresponding processing capabilities of the client, the overall processing capabilities of the system, and the system deadline processing capabilities.
[0089] The embodiment of the present invention provides a solution for weighted calculation of business IO load, dynamic monitoring of system processing capacity, and dynamic flow control of business IO. The dynamic weighted calculation of business IO takes into account both the business IO type and the specific IO parameters, so that the business, i.e., the consumption of the processing capacity of the storage system by each client, can be calculated more accurately, and the system deadline processing capacity can be dynamically calculated. Based on the processing capacity requirements of each business and the system deadline processing capacity, a method for automatic business flow control is provided. In this way, a dynamic weight solution is adopted to calculate the business pressure of the storage system and accurately calculate the consumption of storage processing capacity by different clients. The dynamic monitoring of the overall processing capacity of the system can support situations where the system processing capacity changes dynamically due to expansion and contraction. Clients that occupy too much system processing capacity can be automatically and dynamically identified, so as to achieve accurate flow control for the services corresponding to these clients; the system deadline processing capacity can be dynamically calculated, so that the system processing capacity can be fully utilized, and the business pressure can be prevented from exceeding the system processing capacity, thereby avoiding the stability risk caused by the overload operation of the system. While fully utilizing the storage system's processing capabilities, it automatically controls business IO flow to prevent excessive business pressure from causing slow system processing and affecting stable business operations. It can also achieve a balance in storage business performance among different clients.
[0090] A request flow control device provided in an embodiment of the present invention is introduced below. The request flow control device described below can be referenced to other embodiments described in this document.
[0091] See also Figure 4 As shown, an embodiment of the present invention discloses a request flow control device, including:
[0092] The processing capacity determination module 41 is used to perform weighted calculation based on the operation type and operation parameters of the request sent by each client within a preset statistical time window to obtain the current corresponding processing capacity of each client;
[0093] An overall processing capacity determination module 42 is used to calculate the current overall processing capacity of the storage system based on the current corresponding processing capacities of all clients;
[0094] A capacity allocation module 43 is used to allocate the overall processing capacity to each client to obtain the system allocation capacity of each client if the queue length of the request queue does not exceed the first threshold, wherein the request queue is used to place the pending requests sent by the client;
[0095] The request flow control module 44 is used to perform request flow control on any client when the processing capacity currently corresponding to the client is higher than the system allocation capacity of the client.
[0096] Among them, the capacity allocation module 43 is also used to allocate the system deadline processing capacity to each client if the queue length of the request queue exceeds the first threshold, so as to obtain the system allocation capacity of each client, wherein the system deadline processing capacity represents the maximum processing capacity of the storage system.
[0097] Furthermore, the device also includes:
[0098] A hardware configuration parameter acquisition module, used to acquire hardware configuration parameters of the storage system, wherein the hardware configuration parameters include one or more of processor model, number of cores, clock frequency, memory capacity, storage device type, and number of device nodes;
[0099] An initial deadline capacity determination module is used for estimating the system processing capacity, estimating the maximum processing capacity of the storage system based on the hardware configuration parameters, and obtaining a system processing capacity estimation; and determining the system processing capacity estimation as the initial system deadline processing capacity;
[0100] A deadline capacity adjustment module is used to monitor the queue length of the request queue; compare the second threshold and the first threshold with the queue length; if the queue length is less than the second threshold, compare the system processing capacity estimate and the current overall processing capacity of the storage system, and update the system deadline processing capacity to the larger value of the system processing capacity estimate and the current overall processing capacity of the storage system, and trigger the step of allocating the overall processing capacity to each client to obtain the system allocation capacity of each client; if the queue length is greater than or equal to the second threshold and less than the first threshold, update the system deadline processing capacity to the current overall processing capacity of the storage system, and trigger the step of allocating the overall processing capacity to each client to obtain the system allocation capacity of each client.
[0101] The processing capability determination module 41 is specifically used for:
[0102] For any client, determine the operation type of the request sent by the client within a preset statistical period and the operation parameters of the target operation type, wherein the target operation type is a data operation or a directory operation, and the directory operation is an operation of reading the content under the directory;
[0103] If the operation type is a preset metadata operation, obtain the preset weight corresponding to the preset metadata operation as the weight corresponding to the request;
[0104] If the operation type is a target operation type, a weight corresponding to the request is determined based on the target operation type and the operation parameters;
[0105] For all requests sent by the client within the preset statistical period, weighted calculation is performed based on the weights corresponding to the requests to obtain the current corresponding processing capacity of the client.
[0106] The operation parameter corresponding to the data operation includes the data block size, and the operation parameter corresponding to the directory operation is the number of files under the directory.
[0107] The request flow control module 44 may be used to reduce the request sending rate of the client based on a flow control strategy.
[0108] Furthermore, it also includes a priority adjustment module, which is used to increase the processing priority of the request of any client when the current processing capacity corresponding to the client is lower than the system allocation capacity of the client.
[0109] It can be seen that the embodiment of the present invention performs weighted calculation based on the operation type and operation parameters of the request sent by the client in the preset statistical time window, and obtains the current processing capacity corresponding to each client in real time, and then obtains the current overall processing capacity of the storage system. It can more accurately determine the current processing capacity required for the storage system as a whole and the processing capacity required for each client respectively, and uniformly determine the system allocation capacity of each client based on the overall processing capacity, and perform flow control on the clients with higher corresponding processing capacity. In this way, it can dynamically and accurately identify clients that occupy too much system processing capacity, thereby achieving precise flow control, improving the flow control effect, and ensuring system performance.
[0110] Figure 5 A structural diagram of an electronic device provided by an embodiment of the present invention, such as Figure 5 As shown, the electronic device includes: a memory 50 for storing a computer program;
[0111] The processor 51 is used to implement the steps of the request flow control method disclosed in the above embodiment when executing a computer program.
[0112] The electronic device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop or desktop computer, a server, etc.
[0113] Among them, the processor 51 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 51 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 51 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 51 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 51 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0114] The memory 50 may include one or more computer-readable storage media, which may be non-transitory. The memory 50 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 50 is at least used to store the following computer program 501, wherein, after the computer program is loaded and executed by the processor 51, it can implement the relevant steps of the request flow control method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 50 may also include an operating system 502 and data 503, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 502 may include Windows, Unix, Linux, etc. Data 503 may include but is not limited to request data, etc.
[0115] In some embodiments, the electronic device may further include a display screen 52 , an input / output interface 53 , a communication interface 54 , a power supply 55 , and a communication bus 56 .
[0116] Those skilled in the art will understand that Figure 5 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure.
[0117] It is understandable that if the request flow control method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the current technology or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and executes all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, magnetic disk or optical disk and other media that can store program codes.
[0118] A nonvolatile storage medium provided in an embodiment of the present invention is introduced below. The nonvolatile storage medium described below and other embodiments described herein may be cross-referenced.
[0119] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the request flow control method disclosed above are implemented.
[0120] A computer program product provided by an embodiment of the present invention is introduced below. The computer program product described below can be referenced to other embodiments described in this document.
[0121] A computer program product includes a computer program / instruction, which implements the steps of the aforementioned request flow control method when executed by a processor.
[0122] The above is a detailed introduction to a request flow control method, device, equipment and medium provided by an embodiment of the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0123] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0124] The above is a detailed introduction to a request flow control method, device, equipment and medium provided by the present invention. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A request flow control method, characterized in that: include: Perform weighted calculation based on the operation type and operation parameters of the requests issued by each client within the preset statistical time window to obtain the current processing capacity of each client; Calculate the current overall processing capacity of the storage system based on the current corresponding processing capacity of all clients; If the queue length of the request queue does not exceed the first threshold, the overall processing capacity is allocated to each client to obtain the system allocation capacity of each client, wherein the request queue is used to place the pending requests sent by the client; When the current processing capacity corresponding to any client is higher than the system allocation capacity of the client, request flow control is performed on the client.
2. The request flow control method according to claim 1, characterized in that: Also includes: If the queue length of the request queue exceeds the first threshold, the system deadline processing capacity is allocated to each client to obtain the system allocation capacity of each client, wherein the system deadline processing capacity represents the maximum processing capacity of the storage system.
3. The request flow control method according to claim 2, characterized in that: Also includes: Obtaining hardware configuration parameters of the storage system, wherein the hardware configuration parameters include one or more of processor model, number of cores, clock frequency, memory capacity, storage device type, and number of device nodes; Estimating the maximum processing capacity of the storage system based on the hardware configuration parameters to obtain a system processing capacity estimation; Determining the system processing capacity estimate as the initial system deadline processing capacity; Monitoring the queue length of the request queue; comparing a second threshold and the first threshold with the queue length; If the queue length is less than the second threshold, compare the system processing capacity estimate and the current overall processing capacity of the storage system, update the system deadline processing capacity to the larger value of the system processing capacity estimate and the current overall processing capacity of the storage system, and trigger the step of allocating the overall processing capacity to each client to obtain the system allocation capacity of each client; If the queue length is greater than or equal to the second threshold and less than the first threshold, the system deadline processing capacity is updated to the current overall processing capacity of the storage system, and the step of allocating the overall processing capacity to each client to obtain the system allocation capacity of each client is triggered.
4. The request flow control method according to claim 1, characterized in that: The weighted calculation is performed based on the operation type and operation parameters of the request sent by each client within the preset statistical time window to obtain the current processing capacity corresponding to each client, including: For any client, determine the operation type of the request sent by the client within a preset statistical period and the operation parameters of the target operation type, wherein the target operation type is a data operation or a directory operation, and the directory operation is an operation of reading the content under the directory; If the operation type is a preset metadata operation, obtain the preset weight corresponding to the preset metadata operation as the weight corresponding to the request; If the operation type is a target operation type, a weight corresponding to the request is determined based on the target operation type and the operation parameters; For all requests sent by the client within the preset statistical period, weighted calculation is performed based on the weights corresponding to the requests to obtain the current corresponding processing capacity of the client.
5. The request flow control method according to claim 4, characterized in that: The operation parameters corresponding to the data operation include the data block size, and the operation parameters corresponding to the directory operation are the number of files under the directory.
6. The request flow control method according to claim 1, characterized in that: The request flow control for the client includes: Reduce the request sending rate of the client based on the flow control strategy.
7. The request flow control method according to any one of claims 1 to 6, characterized in that: Also includes: When the current processing capacity corresponding to any client is lower than the system allocation capacity of the client, the processing priority of the client's request is increased.
8. A request flow control device, characterized in that: include: The processing capacity determination module is used to perform weighted calculation based on the operation type and operation parameters of the request sent by each client within a preset statistical time window to obtain the current corresponding processing capacity of each client; The overall processing capacity determination module is used to calculate the current overall processing capacity of the storage system based on the current corresponding processing capacity of all clients; A capacity allocation module, configured to allocate the overall processing capacity to each client if the queue length of the request queue does not exceed a first threshold, so as to obtain the system allocation capacity of each client, wherein the request queue is used to place the pending requests sent by the client; The request flow control module is used to perform request flow control on any client when the current processing capacity corresponding to the client is higher than the system allocation capacity of the client.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of requesting flow control as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of requesting flow control as claimed in any one of claims 1 to 7 are implemented.