Flow control method, device and system, medium and computer device

By obtaining the traffic requirements of the client on the traffic control node and allocating traffic quotas, the problem of "disturbing neighbors" in the mixed storage service scenario is solved, a more fair and stable traffic allocation is achieved, and system performance is improved.

CN115766582BActive Publication Date: 2025-06-17ALIBABA (CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211419966.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-14
Publication Date
2025-06-17
Estimated Expiration
2042-11-14

AI Technical Summary

Technical Problem

In the storage service mixed-in scenario, when the traffic demand for a certain storage service is large, it will occupy the traffic of other storage services, resulting in the "unneighbor disturbance" problem and affecting system performance.

Method used

By acquiring the traffic requirements of each client on the traffic control node, determining the traffic requirements of the storage service, and allocating the traffic quota for the next cycle based on this, ensuring that each client performs traffic control according to its quota, reducing the traffic occupancy of other storage services.

Benefits of technology

It effectively reduces the problem of "disturbing neighbors", ensures that the traffic allocation between storage services is more fair and stable, and improves the overall performance of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115766582B_ABST
    Figure CN115766582B_ABST
Patent Text Reader

Abstract

A flow control method, apparatus, system, medium and computer device, the method comprising: obtaining the flow requirements of each client in the current period, and determining the flow requirements of the storage service in the current period based on the flow requirements of each client in the current period under the same storage service; determining the flow quotas of each storage service in the next period based on the flow requirements of the multiple storage services in the current period; determining the flow quotas of each client under the corresponding storage service in the next period based on the flow requirements of each client in the current period under the same storage service and the flow quota of the corresponding storage service in the next period, so that each client performs flow control on each IO request of the client in the next period based on the flow quota of the client in the next period; each IO request sent after flow control is used to be sent to the server, so that the server accesses the storage system in response to the received IO request.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of cloud storage technology, and in particular, to a traffic control method, apparatus, system, medium, and computer device. Background Art

[0002] The co-location of multiple storage services can effectively improve the resource utilization rate of the storage system. In the co-location scenario of storage services, the resources of the storage system are shared by multiple storage services. When the traffic demand of a certain storage service is relatively large, it will occupy the traffic of other storage services, resulting in the problem of "interfering with neighbors". Summary of the Invention

[0003] In a first aspect, an embodiment of the present disclosure provides a traffic control method, which is applied to a traffic control node and is used to perform traffic control on multiple storage services. The multiple storage services share the traffic resources of the storage system, and each client under the same storage service shares the traffic resources of the storage service. The method includes: obtaining the traffic demands of each client in the current cycle, and determining the traffic demand of the storage service in the current cycle based on the traffic demands of each client under the same storage service in the current cycle; determining the traffic quota of each storage service in the next cycle based on the traffic demands of the multiple storage services in the current cycle; determining the traffic quota of each client under the corresponding storage service in the next cycle based on the traffic demands of each client under the same storage service in the current cycle and the traffic quota of the corresponding storage service in the next cycle, so that each client performs traffic control on each IO request of the client in the next cycle based on the traffic quota of the client in the next cycle; each IO request sent after traffic control is sent to the server, so that the server accesses the storage system in response to the received IO request.

[0004] In some embodiments, the determining the traffic quota of each storage service in the next cycle based on the traffic demands of the multiple storage services in the current cycle includes: determining the basic traffic quota of each storage service in the next cycle based on the weights of the multiple storage services; determining the supplementary traffic quota of each storage service in the next cycle based on the traffic demands of the multiple storage services in the current cycle; determining the traffic quota of the storage service in the next cycle based on the basic traffic quota and the supplementary traffic quota of each storage service in the next cycle.

[0005] In some embodiments, the method further includes: sending the traffic quota of each client in the next cycle to the corresponding client, so that the corresponding client stores the traffic quota of the client in the next cycle locally; wherein, for each IO request of the client in the next cycle, the client performs traffic control on the IO request based on the cached traffic quota and the traffic quota consumed by the client in the next cycle.

[0006] In some embodiments, the client is configured to: if the sum of the traffic requirements of the IO requests received in the next period and the traffic quota already consumed by this client in the next period is greater than the traffic quota of this client in the next period, add the IO requests received in the next period to the waiting queue; if the traffic quota of this client meets the dequeue condition of the IO requests in the waiting queue, remove the IO requests in the waiting queue from the waiting queue and send them to the storage system.

[0007] In some embodiments, the client includes a traffic access control module deployed on the foreground IO thread and a traffic management module deployed on the background thread; the traffic access control module is configured to count the traffic requirements of the IO requests of this client in the current period and perform traffic control on the IO requests of this client in the next period based on the traffic quota of this client in the next period; the traffic management module is configured to obtain the traffic requirements of this client in the current period from the traffic access control module and send them to the traffic control node, and obtain the traffic quota of this client in the next period from the traffic control node and send it to the foreground IO thread.

[0008] In some embodiments, the traffic access control module of the client is configured to perform traffic control on each IO request of this client in the next period based on the priority of the IO stream to which each IO request of this client belongs in the next period, and the priority of the IO stream is issued by the storage service to which the client belongs.

[0009] In some embodiments, the traffic access control module of the client is configured to send the priority of the IO stream to which the IO request belongs to the storage system, so that the storage system schedules the received IO requests based on the priority of the IO stream to which the IO request belongs.

[0010] In some embodiments, at least one client belongs to multiple storage services respectively; the foreground IO threads of the clients belonging to multiple storage services include multiple traffic access control modules, each traffic access control module corresponds to a storage service, and is configured to perform traffic control on the IO requests related to the corresponding storage service of this client in the next period according to the traffic quota of the corresponding storage service.

[0011] In some embodiments, obtaining the traffic requirements of each client in the current period includes: obtaining the reported traffic requirements of the client in the current period; performing weighted average processing on the reported traffic requirements of the client in the current period and the historical traffic requirements of the client to obtain the traffic requirements of the client in the current period.

[0012] In some embodiments, determining the traffic demand of the storage service in the current period based on the traffic demands of each client under the same storage service includes: obtaining the service identifier of each client, where the service identifier is used to represent the storage service to which the client belongs; and determining the traffic demand of the storage service corresponding to the service identifier in the current period based on the traffic demands of the clients with the same service identifier in the current period.

[0013] In some embodiments, the traffic resources of the storage system are divided into clusters, the traffic resources in the clusters are divided into at least one group of service resources, and each group of service resources is divided into at least one group of client resources; the multiple storage services share the traffic resources in the clusters, each group of service resources is allocated to a storage service, and each group of client resources in the same group of service resources is respectively allocated to each client under the same storage service.

[0014] In a second aspect, an embodiment of the present disclosure provides a traffic control method, which is applied to a background thread in a client, and the client further includes a foreground IO thread; the method includes: obtaining the traffic demand of the client in the current period from the foreground IO thread; reporting the traffic demand of the client in the current period to a traffic control node, and obtaining the traffic quota of the client in the next period determined by the traffic control node; where the traffic control node determines the traffic quota of each storage service in the next period based on the traffic demands reported by each client under each storage service among multiple storage services, and determines the traffic quota of each client under the corresponding storage service in the next period based on the traffic demands of each client under the same storage service in the next period and the traffic quota of the corresponding storage service; the multiple storage services share the traffic resources of the storage system, and each client under the same storage service shares the traffic resources of the storage service; sending the traffic quota of the client in the next period to the foreground IO thread, so that the foreground IO thread performs traffic control on the IO requests of the client in the next period based on the obtained traffic quota; each IO request sent after traffic control is used to be sent to a server, so that the server accesses the storage system in response to the received IO request.

[0015] In a third aspect, embodiments of the present disclosure provide a traffic control device, which is applied to a traffic control node and is used for traffic control of multiple storage services. The multiple storage services share the traffic resources of the storage system, and each client under the same storage service shares the traffic resources of the storage service. The device includes: a first acquisition module, configured to acquire the traffic requirements of each client in the current period, and determine the traffic requirements of the storage service in the current period based on the traffic requirements of each client under the same storage service in the current period; a first determination module, configured to determine the traffic quota of each storage service in the next period based on the traffic requirements of the multiple storage services in the current period; a second determination module, configured to determine the traffic quota of each client under the corresponding storage service in the next period based on the traffic requirements of each client under the same storage service in the current period and the traffic quota of the corresponding storage service in the next period, so that each client performs traffic control on each IO request of the client in the next period based on the traffic quota of the client in the next period; each IO request sent after traffic control is used to be sent to a server, so that the server accesses the storage system in response to the received IO request.

[0016] In a fourth aspect, embodiments of the present disclosure provide a traffic control device, which is applied to a background thread in a client, and the client further includes a foreground IO thread. The device includes: a second acquisition module, configured to acquire the traffic requirements of the client in the current period from the foreground IO thread; a third acquisition module, configured to report the traffic requirements of the client in the current period to a traffic control node and acquire the traffic quota of the client in the next period determined by the traffic control node; wherein, the traffic control node determines the traffic quota of each storage service in the next period based on the traffic requirements reported by each client under each storage service in multiple storage services, and determines the traffic quota of each client under the corresponding storage service in the next period based on the traffic requirements of each client under the same storage service in the next period and the traffic quota of the corresponding storage service; the multiple storage services share the traffic resources of the storage system, and each client under the same storage service shares the traffic resources of the storage service; a sending module, configured to send the traffic quota of the client in the next period to the foreground IO thread, so that the foreground IO thread performs traffic control on the IO requests of the client in the next period based on the acquired traffic quota; each IO request sent after traffic control is used to be sent to a server, so that the server accesses the storage system in response to the received IO request.

[0017] Fifth aspect, embodiments of the present disclosure provide a traffic control system, the system comprising: a traffic control node, clients corresponding to each of multiple storage services, and a server; the traffic control node is configured to execute the method in any one of the embodiments of the first aspect of the present disclosure; and / or the client corresponding to each storage service is configured to execute the method in any one of the embodiments of the second aspect of the present disclosure; the server is configured to receive an IO request sent by the client and access the storage system in response to the received IO request.

[0018] Sixth aspect, embodiments of the present disclosure provide a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the method described in any one of the embodiments of the present disclosure is implemented.

[0019] Seventh aspect, embodiments of the present disclosure provide a computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the program, the method described in any one of the embodiments of the present disclosure is implemented.

[0020] Embodiments of the present disclosure hierarchically organize the traffic resources of the storage system in the manner of client-storage service. In each cycle, based on the traffic demands of each client under the same storage service in the current cycle, the traffic demand of the storage service is determined, and thus the traffic quota of the storage service in the next cycle is allocated. Then, based on the traffic quota of the storage service in the next cycle and the traffic demands of each client under the storage service in the current cycle, the traffic quota of each client in the next cycle is determined, so that each client can perform traffic control on each IO request of the client in the next cycle based on the traffic quota of the client, realizing traffic control at the traffic entrance. Since the traffic quota in the next cycle is planned in advance based on the traffic demands in the current cycle, the traffic usage of the storage service in the next cycle can be restricted based on the planned traffic quota, and it will not preempt the traffic resources of other storage services, thus reducing the "neighbor interference" problem.

[0021] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and do not limit the present disclosure. Description of the Drawings

[0022] The drawings herein are incorporated into the specification and constitute a part of the present disclosure. These drawings illustrate embodiments consistent with the present disclosure and, together with the specification, are used to explain the technical solutions of the present disclosure.

[0023] Figure 1 is a schematic diagram of the system architecture of the embodiments of the present disclosure.

[0024] Figure 2 is a schematic diagram of the hierarchical organization mode of the traffic resources of the embodiments of the present disclosure.

[0025] Figure 3 is a flowchart of the traffic control method according to an embodiment of the present disclosure.

[0026] Figure 4 is a schematic diagram of the traffic control process of the client according to an embodiment of the present disclosure.

[0027] Figure 5 is a flowchart of the traffic control method according to another embodiment of the present disclosure.

[0028] Figure 6 is a block diagram of the traffic control device according to an embodiment of the present disclosure.

[0029] Figure 7 is a block diagram of the traffic control device according to another embodiment of the present disclosure.

[0030] Figure 8 is a schematic diagram of the computer device according to an embodiment of the present disclosure. Detailed Embodiments

[0031] Here, exemplary embodiments will be described in detail, and examples thereof are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0032] The terms used in the present disclosure are for the purpose of describing specific embodiments only and are not intended to limit the present disclosure. The singular forms "a", "the", and "said" used in the present disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more of the associated listed items. In addition, the term "at least one" as used herein represents any one of a plurality or any combination of at least two of a plurality.

[0033] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining".

[0034] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present disclosure and to make the above-mentioned objects, features, and advantages of the embodiments of the present disclosure more apparent and understandable, the technical solutions in the embodiments of the present disclosure will be further described in detail below with reference to the accompanying drawings.

[0035] In the scenario of mixed storage services, the problem of disturbing neighbors may occur. For example, in a related technology, management is carried out at the granularity of TrafficGroup (a group composed of multiple clients). The clients in the same TrafficGroup have similar resource and latency requirements. Each TrafficGroup is assigned a TrafficClass, and different TrafficClasses correspond to different latency sensitivities. Traffic resources are controlled and allocated according to priorities through TrafficClass.

[0036] The client uses a rate limiter to manage global traffic resources. The rate limiter records the resource requirements on each storage service and TrafficGroup through a distributed counter. The rate limiter uses the leaky bucket algorithm for flow control. Each time the client receives an IO request, it first determines whether there are idle traffic resources in the TrafficGroup of the client itself, then determines whether there are idle traffic resources in other TrafficGroups in the same storage service, and finally determines whether there are idle traffic resources in other storage services. If the client finds that there are idle traffic resources, it sends the IO request to the storage system. Otherwise, it decides whether the IO request is delayed or rejected according to the timeout.

[0037] In this case, the TrafficGroup / storage service with high pressure (i.e., high concurrency of IO requests) will invisibly preempt the traffic resources of the TrafficGroup / storage service with low pressure, and this part of the traffic resources should have been used by the TrafficGroup / storage service with low pressure. Eventually, the unexpected problem of "disturbing neighbors" occurs.

[0038] In addition, the above solution also has the following defects:

[0039] (1) As a global control point, each time the client receives an IO request, it needs to interact with the global control point to determine whether there are idle resources to allow the IO request to pass. On the one hand, the rate limiter is likely to become a performance bottleneck; on the other hand, in the sending process of each IO request, the interaction between the client and the rate limiter will inevitably increase the IO latency and affect the overall performance of the system.

[0040] (2) Every time the client receives an IO request, if there is no idle traffic resource in the client's TrafficGroup, it will determine whether there is idle resource in other TrafficGroups / storage services. However, since the IO requests of the storage service are not sent to the storage system continuously, but are sent with a certain degree of concurrency, and the subsequent requests will only be sent after the previous IO request returns. During the process of a storage service waiting for the previous IO request, other storage services with higher pressure may misinterpret that this storage service is in an idle state, resulting in the traffic resources of this storage service being preempted by other storage services. This phenomenon is called "deceptive idleness".

[0041] Based on this, the embodiments of the present disclosure provide a traffic control method, device, system, medium and computer device. The embodiments of the present disclosure hierarchically organize the traffic resources of the storage system in the manner of client-storage service. In each cycle, based on the traffic demands of each client under the same storage service in the current cycle, the traffic demand of the storage service is determined, and then the traffic quota of the storage service in the next cycle is allocated. Based on the traffic quota of the storage service in the next cycle and the traffic demands of each client under the storage service in the current cycle, the traffic quota of each client in the next cycle is determined, so that each client can perform traffic control on each IO request of this client in the next cycle based on the traffic quota of this client, realizing traffic control at the traffic entrance. Since the traffic quota for the next cycle is planned in advance based on the traffic demands in the current cycle, the traffic usage of the storage service in the next cycle can be restricted based on the planned traffic quota, and it will not preempt the traffic resources of other storage services, thus reducing the "neighbor interference" problem.

[0042] First, the system architecture of the embodiments of the present disclosure will be exemplarily described in conjunction with Figure 1 As Figure 1As shown in the figure, the system architecture of the embodiments of the present disclosure includes a traffic control node 102, a storage service 104, a client 106, and a storage system 108. Among them, the traffic control node 102 can communicate with the client 106 and the storage system 108 to obtain the traffic requirements reported by the client 106 and the traffic resources of the storage system 108, and perform traffic control on multiple storage services based on the traffic requirements reported by the client 106 and the traffic resources of the storage system 108. The storage service 104 may include, but is not limited to, storage services such as Elastic Block Store (EBS), Object Storage Service (OSS), and Open Table Service (OTS). In the scenario of mixed deployment of storage services, the number of storage services is greater than 1. In the figure, the case where the storage service includes EBS and OSS is taken as an example for illustration. Each storage service may include one or more clients 106. The client 106 is a program that provides a file system service for the customer. The client 106 can communicate with a server (chunkserver) 110 through the network using a specific communication protocol, and then access the storage system 108 through the server 110 to complete read and write operations such as file storage. The storage system 108 may be a distributed storage system that uses traffic resources scattered on multiple storage nodes through the network, and constructs these scattered traffic resources into a virtual storage device, so that data is stored dispersedly on multiple storage nodes. In the case where the storage system 108 is a distributed storage system, the number of servers 110 may be greater than 1. Each server 110 may correspond to a storage node, be used to receive an IO request for the storage node, and send the received IO request to the corresponding storage node to access the storage node.

[0043] The traffic control method of the embodiments of the present disclosure can be applied to Figure 1 the traffic control node 102 in the system architecture shown in the figure. The traffic control node 102 can perform traffic control on multiple storage services. Refer to Figure 2, in the embodiments of the present disclosure, traffic resources are hierarchically organized in the manner of Cluster - Service resources - Client resources. The top layer is the cluster, representing the total traffic resources of the distributed storage system. The next layer below the cluster is the service resources. For the co - hosting scenario, multiple storage services 104 share the traffic resources of the same cluster, that is, the traffic resources in the same cluster can be divided into at least one group of service resources. The bottom layer is the client resources. Each client 106 under the same storage service 104 shares the traffic resources of the storage service 104. The client 106 uses the traffic resources of the corresponding storage service 104 according to the storage service 104 to which it belongs. That is, each group of service resources is divided into at least one group of client resources, and each group of client resources in the same group of service resources is respectively assigned to each client 106 under the same storage service 104.

[0044] Based on the above - mentioned traffic model, the traffic control node 102 can summarize traffic information from bottom to top and then allocate traffic quotas to each client 106 from top to bottom. The whole process is as Figure 3 shown, including the following steps:

[0045] Step 302: Obtain the traffic requirements of each client 106 in the current period, and determine the traffic requirements of the storage service 104 in the current period based on the traffic requirements of each client 106 under the same storage service 104 in the current period;

[0046] Step 304: Determine the traffic quotas of each storage service 104 in the next period based on the traffic requirements of the multiple storage services 104 in the current period;

[0047] Step 306: Determine the traffic quotas of each client 106 under the corresponding storage service 104 in the next period based on the traffic requirements of each client 106 under the same storage service 104 in the current period and the traffic quota of the corresponding storage service 104 in the next period, so that each client 106 performs traffic control on each IO request of this client 106 in the next period based on the traffic quota of this client 106 in the next period; Each IO request sent after traffic control is used to be sent to the server, so that the server accesses the storage system in response to the received IO request.

[0048] In step 302, each client 106 can periodically report the traffic demand of this client to the traffic control node 102. The traffic demand reported by the client 106 is called the reported traffic demand of this client 106. The traffic demand of each IO request sent by the client 106 to the storage system 108 can be carried (for example, 2M). The client 106 can aggregate the traffic demands of each IO request within the same period to obtain the reported traffic demand of this client 106 in this period.

[0049] In some embodiments, the reported traffic demand of the client 106 in one period can be used as the traffic demand of the client 106 in this period. In other embodiments, the traffic control node 102 can obtain the reported traffic demand of the client 106 in one period; perform a weighted average process on the reported traffic demand of the client in this period and the historical traffic demand of the client to obtain the traffic demand of the client in this period. The weighted average process can adopt algorithms such as the exponentially weighted moving average method (EWMA), and the present disclosure does not limit this. Through the above method, the error impact caused by the random fluctuation of short-term service pressure can be smoothed.

[0050] For example, the traffic control node 102 can perform a weighted average process on the reported traffic demand of the client 106 in the kth period and the traffic demand of the client 106 in the (k - 1)th period to obtain the traffic demand of the client 106 in the kth period, where k is an integer greater than 1. Further, a weighted average process can be performed on the reported traffic demand of the client 106 in the (k + 1)th period and the traffic demand of the client 106 in the kth period (obtained by performing a weighted average process on the reported traffic demand of the client 106 in the kth period and the traffic demand of the client 106 in the (k - 1)th period) to obtain the traffic demand of the client 106 in the (k + 1)th period. And so on, so as to obtain the traffic demand of the client 106 in each period.

[0051] Further, the traffic control node 102 can obtain the service identifier of each client 106. The service identifier is used to represent the storage service 104 to which the client 106 belongs. Each client 106 belonging to the same storage service 104 has the same service identifier. Based on the traffic demand of the clients 106 with the same service identifier in one period, the traffic control node 102 can determine the traffic demand of the storage service 104 corresponding to this service identifier in this period. Furthermore, the traffic control node 102 can maintain the traffic demands of each client 106 and storage service 104 according to the hierarchy of storage service → client.

[0052] For example, in Figure 2 Storage service Service1 includes Client1 to Clienti This i-th client stores the business under Service2, including Client i+1 to Client n These n-i clients, then from Client1 to Client i have the same business identifier (all denoted as identifier 1), and from Client i+1 to Client n also have the same business identifier (all denoted as identifier 2), and identifier 1 is different from identifier 2. Thus, the traffic demands of each client with identifier 1 (i.e., from Client1 to Client i ) in the same period can be summed up to obtain the traffic demand of Service1 in this period, and the traffic demands of each client with identifier 2 (i.e., from Client i+1 to Client n ) in the same period can be summed up to obtain the traffic demand of Service2 in this period.

[0053] In step 304, the traffic control node 102 can determine the traffic quotas of each storage service 104 in the next period based on the traffic demands of the multiple storage services 104 in the current period. Since the traffic quotas for the next period are planned in advance based on the traffic demands in the current period, even if the traffic demand of a certain storage service 104 surges in the next period, it will not overly preempt the traffic quotas of other storage services 104 in the next period and cause the "neighbor disturbance" problem. For example, assume the traffic resource of the storage system 108 is 100, and assume that the traffic demands of two storage services 104 are the same in the current period. Then, the traffic quotas of these two storage services 104 in the next period can be determined in a 1:1 ratio, so that each of these two storage services 104 will obtain a traffic quota of 50 in the next period. Even if in the next period, the traffic demand of one of the storage services 104 surges, the traffic quota of this storage service 104 in the next period is still 50. According to the traffic control method in the related technology, when the traffic demand of one of the storage services 104 surges, the clients 106 under this storage service 104 will preempt the traffic resources of other idle storage services 104, and the result may be that the traffic quotas allocated to other idle storage services 104 are only 20, thus unable to provide traffic services with consistent and predictable performance for each storage service 104.

[0054] In some embodiments, the base traffic quota of each storage service 104 in the next cycle can be determined based on the weights of the multiple storage services 104; the supplementary traffic quota of each storage service 104 in the next cycle can be determined based on the traffic demands of the multiple storage services 104 in the current cycle; and the traffic quota of the storage service 104 in the next cycle can be determined based on the base traffic quota and the supplementary traffic quota of each storage service 104 in the next cycle.

[0055] Among them, the weight of the storage service 104 is used to characterize the importance of the storage service 104, and the base traffic quota of the storage service 104 is positively correlated with the weight of the storage service 104. By setting weights for the storage services 104, more base traffic quotas can be allocated to the storage services 104 with higher importance levels. In different situations, the weights of the same storage service 104 may change. In some embodiments, a traffic quota upper limit and a traffic quota lower limit can be set for each storage service 104, and the base traffic quota of the storage service 104 is not lower than the traffic quota lower limit of the storage service 104. After determining the base traffic quotas of the storage services 104 in the next cycle, the remaining traffic quota of the storage system 108 can be determined based on the traffic resources of the storage system 108 and the base traffic quotas of the storage services 104 in the next cycle. If the remaining traffic quota is greater than 0, the supplementary traffic quotas of the storage services 104 in the next cycle can be further determined based on the traffic demands of the multiple storage services 104 in the current cycle. Further, the traffic quota of the storage service 104 in the next cycle does not exceed the traffic quota upper limit of the storage service 104. In this way, when a certain storage service 104 is under low pressure, the traffic resources of the storage system 108 can be moderately tilted towards other storage services 104 with higher pressure, thereby improving the utilization rate of the traffic resources of the storage system 108, and at the same time, preventing one storage service 104 from overly preempting the traffic resources of other storage services 104 and causing the problem of "interfering with neighbors".

[0056] In embodiments that consider both the weights and traffic demands of the storage services 104, the weighted max min fairness algorithm or other allocation algorithms based on weights and demands can be invoked to allocate the traffic resources of the storage system 108 to each storage service 104.

[0057] In some embodiments, the traffic control node 102 may also periodically (e.g., every 1 s) traverse each storage node of the distributed calendar storage system to obtain the traffic resources of the storage node, and summarize the traffic resources of each storage node to obtain the traffic resources of the entire distributed storage system (i.e., the cluster). The traffic control node 102 may allocate traffic quotas to each storage service 104 based on the traffic requirements of each storage service 104, the weights of each storage service 104, and the traffic resources of the entire distributed storage system.

[0058] It should be noted that the traffic control node 102 may periodically or under the trigger of certain trigger conditions determine the traffic quotas of each storage service 104 and each client 106. In the embodiment where the traffic control node 102 periodically determines the traffic quota, the period for the traffic control node 102 to determine the traffic quota may be different from the period for the client to perform traffic control and the period for the storage node to report the traffic resources. For example, the storage node may report the traffic resources of this storage node in a longer first period, the client 106 may report the traffic requirements of this node in a shorter second period (the second period is less than the first period) and query the traffic quota of this client 106 from the traffic control node 102 for traffic control, and the third period for the traffic control node 102 to generate the traffic quota may be greater than, equal to, or less than the second period. The "current period", "next period", etc. in the embodiments of the present disclosure may be the above-mentioned second period. If the third period is greater than the second period, the client 106 may query the same traffic quota in multiple adjacent second periods. If the third period is less than the second period, the traffic control node 102 may generate the same traffic quota in multiple adjacent third periods. However, regardless of the size relationship between the second period and the third period, the client 106 may obtain the traffic quota finally generated by the traffic control node 102 in each second period and perform traffic control based on this.

[0059] In step 306, the traffic control node 102 may send down the traffic quotas of each client 106 in the next period to the corresponding client 106, so that the corresponding client 106 can perform traffic control on each IO request of this client in the next period.

[0060] When allocating traffic quotas for each client 106, the basic traffic quotas of each client 106 in the next cycle can be determined based on the weights of each client 106 under the same storage service 104. The weight of the client 106 is used to represent the importance of the client 106 (optionally, the weights of each client 106 under the same storage service 104 can be set to 1); the supplementary traffic quotas of each client 106 in the next cycle are determined based on the traffic demands of each client 106 in the current cycle; the traffic quota of each client 106 in the next cycle is determined based on the basic traffic quota and the supplementary traffic quota of each client 106 in the next cycle. In an embodiment that simultaneously considers the weight and traffic demand of the client 106, the weighted max min fairness algorithm or other allocation algorithms based on weight and demand can be called to allocate the traffic quota of the storage service 104 to which each client 106 belongs to each client 106 under the storage service 104.

[0061] In the above traffic resource allocation process, when allocating traffic quotas among storage services 104, the allocation algorithm will consider the weight ratio and traffic demand of each storage service 104. The advantage of this is that when the IO pressure of multiple co-located storage services 104 is very high and there is a scramble for traffic resources, the more important (i.e., the storage service 104 with a higher weight ratio) storage service 104 will be allocated more traffic resources; when the IO pressure of a certain storage service 104 is idle, the idle disk traffic resources of this storage service 104 will be moderately tilted to other storage services 104 with high pressure to effectively improve the utilization rate of traffic resources.

[0062] Similarly, when allocating traffic quotas for each client 106 within the storage service 104, the allocation algorithm will also consider the traffic demand of each client 106, so that when the IO pressure of some clients 106 is idle, the traffic resources can be allocated to other clients 106 with high pressure.

[0063] The client 106 can store the traffic quota of the client 106 in the next cycle locally; among them, for each IO request of the client 106 in the next cycle, based on the cached traffic quota and the traffic quota consumed by the client 106 in the next cycle, traffic control is performed on the IO request. Among them, the client 106 can send one or more IO requests to the storage system 108 within a cycle, and each IO request will consume a certain amount of traffic quota. The traffic quota consumed by an IO request can be determined based on the traffic demand carried in the IO request. The client 106 can sum up the traffic demands consumed by each IO request sent within a cycle for the client 106 itself to obtain the traffic quota consumed by the client 106 in this cycle.

[0064] See Figure 4 , after obtaining a new IO request, it can be determined whether the sum of the traffic demand carried in the new IO request and the traffic quota consumed by this client in the next cycle is greater than the cached traffic quota. If so, it is necessary to throttle the new IO request, that is, add the IO requests received in the next cycle to the waiting queue. Among them, each IO stream corresponds to a waiting queue, and the IO request can be added to the corresponding waiting queue according to the IO stream to which the IO request belongs. If the sum of the traffic demand carried in the new IO request and the traffic quota consumed by this client in the next cycle is not greater than the traffic quota of this client in the next cycle, there is no need to throttle the new IO request, and the new IO request can be directly sent to the storage system 108.

[0065] Furthermore, if the traffic quota of this client 106 meets the dequeue condition of the IO requests in the waiting queue, this client 106 can remove the IO requests in the waiting queue from the waiting queue and send them to the storage system 108. Among them, the dequeue condition can be that the traffic quota of this client 106 is replenished and greater than the traffic demand of the IO requests in the waiting queue. For example, when a new cycle arrives, the client 106 can obtain a new traffic quota. If the new traffic quota is greater than the traffic demand of the IO requests in the waiting queue, the IO requests in the waiting queue can be dequeued and sent to the server 110, and the IO requests are forwarded to the storage system 108 through the server 110.

[0066] In the above embodiment, after the traffic control node 102 obtains the traffic quotas of each client 106, the client 106 can directly cache the traffic quota of this client 106 locally. In this way, in the next cycle, the client 106 does not need to interact with the traffic control node 102 every time it receives an IO request to determine whether the currently received IO request needs to be throttled, reducing the IO latency and improving the overall performance of the system. In addition, since the IO requests in a cycle are sent with a certain degree of concurrency, by adopting the above method, since the traffic quota of each client 106 in the next cycle has been pre-planned, even if a client 106 sends a complete IO request concurrently and enters the waiting state, other clients 106 with greater IO pressure will not overly occupy the traffic resources of the client 106 in the waiting state, thus solving the "deceptive idleness" problem.

[0067] In some embodiments, a client 106 includes a Resource Guard module deployed on a foreground IO thread and a Resource Manager module deployed on a background thread. The Resource Guard module is configured to count the traffic demand of the IO requests of the present client 106 in the current cycle, and perform traffic control on the IO requests of the present client 106 in the next cycle based on the traffic quota of the present client 106 in the next cycle; the Resource Manager module is configured to obtain the traffic demand of the present client 106 in the current cycle from the Resource Guard module and send it to the traffic control node 102, and obtain the traffic quota of the present client 106 in the next cycle from the traffic control node 102 and send it to the foreground IO thread. The embodiments of the present disclosure decouple traffic control from IO scheduling. Among them, the traffic resource guard module in the client 106 is deployed on the foreground IO thread to decide whether an IO request is rate-limited. In this process, there is no need to interact with the global control point (i.e., the traffic control node 102) or other modules, and the decision is completed lightweightly within the present thread. The impact on the IO latency is only in the order of nanoseconds, reducing the IO delay. The allocation of traffic resources is completed by the interaction between the traffic resource management module on the background thread and the traffic control node 102. This process is completely executed in the background. By decoupling the background resource scheduling and the foreground IO scheduling, the impact of traffic resource scheduling on the foreground read / write IO performance can be avoided.

[0068] In some embodiments, a Resource Manager module may be deployed for each client 106, and a Resource Guard module may be deployed for each foreground IO thread on the same client 106. The Resource Guard module deployed on a foreground IO thread can count the traffic demand of the IO requests of the foreground IO thread in a cycle, and send the counted traffic demand to the Resource Manager module of the client 106. The Resource Manager module of the client 106 can sum up the traffic demands counted by the Resource Guard modules of the foreground IO threads on the client 106 in the same cycle to obtain the traffic demand of the client 106 in the corresponding cycle.

[0069] In some embodiments, at least one client 106 belongs to multiple storage services 104 respectively; the foreground IO threads of the clients belonging to multiple storage services 104 include multiple traffic access control modules, each traffic access control module corresponding to a storage service, and is used to perform traffic control on the IO requests related to the corresponding storage service of this client in the next cycle according to the traffic quota of the corresponding storage service. For example, still assuming that the number of storage services 104 is 2, the two storage services 104 are respectively denoted as Service1 and Service2, where both Service1 and Service2 include client Client1. Then, client Client1 can respectively obtain the traffic quota corresponding to Service1 (referred to as Q1) and the traffic quota corresponding to Service2 (referred to as Q2) allocated by the traffic control node 102. In this case, the traffic access control modules of client Client1 include the traffic access control module corresponding to Service1 (referred to as Guard1) and the traffic access control module corresponding to Service2 (referred to as Guard2), and the traffic access control module Guard1 is used to perform traffic control on the IO requests related to Service1 of client Client1 in the next cycle according to the traffic quota Q1 corresponding to Service1, and the traffic access control module Guard2 is used to perform traffic control on the IO requests related to Service2 of client Client1 in the next cycle according to the traffic quota Q2 corresponding to Service2.

[0070] In addition, because there may be IO streams of different workload types within the storage service 104, and the priorities of these IO streams may be different, the client 106 allows the storage service 104 to label the priorities of the IO streams. For example, a total of 5 priorities from high to low, namely P0 - P4, can be set. Optionally, the foreground read / write IO stream of EBS can be labeled with the P1 priority, and the background GC IO stream can be labeled with the P3 priority. Those skilled in the art can understand that the number of priorities and the priority sorting of each IO stream are not limited to the situations described in the above embodiments. The storage service 104 can send the labeled priorities to each client 106 under this storage service 104. The traffic access control module of the client 106 can perform traffic control on each IO request of this client 106 in the next cycle based on the priorities of the IO streams to which each IO request of this client 106 belongs in the next cycle. Specifically, the traffic access control module can schedule each IO request in order from high to low according to the priorities of the IO streams to which each IO request belongs. If the current IO request needs to be rate-limited, add this IO request to the waiting queue of the IO stream to which it belongs, such as Figure 4As shown, when setting five priorities, the number of waiting queues is also five. Each waiting queue is respectively denoted as p0, ……, p4. If the current IO request does not need to be rate-limited, the IO request is sent to the storage system 108. After the traffic quota of the client 106 is replenished, the IO requests in the waiting queues corresponding to each IO stream can be dequeued and sent to the storage system 108 in sequence according to the priorities of each IO stream. When dequeuing an IO request from the waiting queue, the IO requests in the waiting queue can be scheduled according to a pre-determined scheduling algorithm, for example, Weighted Round Robin (WRR). Through the above-mentioned priority scheduling method, it is possible to give priority to ensuring the performance of high-priority IO streams when the client 106 is rate-limited. When the IO pressure of the high-priority IO stream drops, the low-priority IO stream can use the idle traffic, thereby reducing the waste of traffic resources.

[0071] In the case where an IO request is not rate-limited, the client 106 can send the IO request to the server 110. A priority scheduling function similar to that of the client 106 can be implemented inside the server 110. The traffic access control module of the client 106 can send the priority of the IO stream to which the IO request belongs to the server 110, so that the server 110 schedules the received IO requests based on the priority of the IO stream to which the IO request belongs. Specifically, the server 110 can add the IO request to the corresponding priority queue and schedule the IO requests in each priority queue according to the determined scheduling policy, thereby implementing priority scheduling on the server 110. When an IO request is scheduled, the server 110 can send the IO request to the storage system 108 to access the storage system 108.

[0072] See Figure 5 , this embodiment of the present disclosure also provides another traffic control method, which is applied to a background thread in the client. The client further includes a foreground IO thread; the method includes:

[0073] Step 502: Obtain the traffic demand of this client in the current cycle from the foreground IO thread;

[0074] Step 504: Report the traffic demand of this client in the current cycle to the traffic control node, and obtain the traffic quota of this client in the next cycle determined by the traffic control node; wherein, the traffic control node determines the traffic quota of each storage service in the next cycle based on the traffic demands reported by each client under each storage service among multiple storage services, and determines the traffic quota of each client under the corresponding storage service in the next cycle based on the traffic demands of each client under the same storage service in the next cycle and the traffic quota of the corresponding storage service; the multiple storage services share the traffic resources of the storage system, and each client under the same storage service shares the traffic resources of this storage service;

[0075] Step 506: Send the traffic quota of this client in the next cycle to the foreground IO thread, so that the foreground IO thread performs traffic control on the IO requests of this client in the next cycle based on the obtained traffic quota; each IO request sent after traffic control is used to be sent to the server, so that the server accesses the storage system in response to the received IO request.

[0076] For the specific details of the embodiments of the present disclosure, please refer to the foregoing method embodiments and will not be elaborated here.

[0077] Those skilled in the art can understand that in the above method of the specific implementation manner, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined according to its function and possible internal logic.

[0078] See Figure 6 , the embodiments of the present disclosure further provide a traffic control device, which is applied to a traffic control node and is used to perform traffic control on multiple storage services. The multiple storage services share the traffic resources of the storage system, and each client under the same storage service shares the traffic resources of this storage service; the device includes:

[0079] The first acquisition module 602 is used to acquire the traffic demands of each client in the current cycle, and determine the traffic demand of this storage service in the current cycle based on the traffic demands of each client under the same storage service in the current cycle;

[0080] The first determination module 604 is used to determine the traffic quota of each storage service in the next cycle based on the traffic demands of the multiple storage services in the current cycle;

[0081] A second determination module 606, configured to determine the traffic quota of each client under the corresponding storage service in the next cycle based on the traffic requirements of each client in the current cycle under the same storage service and the traffic quota of the corresponding storage service in the next cycle, so that each client performs traffic control on each IO request of the client in the next cycle based on the traffic quota of the client in the next cycle; each IO request sent after traffic control is used to be sent to a server, so that the server accesses the storage system in response to the received IO request.

[0082] See Figure 7 , this embodiment of the present disclosure further provides another traffic control device, which is applied to a background thread in a client, and the client further includes a foreground IO thread; the device includes:

[0083] A second acquisition module 702, configured to acquire the traffic requirements of the client in the current cycle from the foreground IO thread;

[0084] A third acquisition module 704, configured to report the traffic requirements of the client in the current cycle to a traffic control node, and acquire the traffic quota of the client in the next cycle determined by the traffic control node; wherein, the traffic control node determines the traffic quota of each storage service in the next cycle based on the traffic requirements reported by each client under each storage service in multiple storage services, and determines the traffic quota of each client under the corresponding storage service in the next cycle based on the traffic requirements of each client in the next cycle under the same storage service and the traffic quota of the corresponding storage service; the multiple storage services share the traffic resources of the storage system, and each client under the same storage service shares the traffic resources of the storage service;

[0085] A sending module 706, configured to send the traffic quota of the client in the next cycle to the foreground IO thread, so that the foreground IO thread performs traffic control on the IO requests of the client in the next cycle based on the acquired traffic quota; each IO request sent after traffic control is used to be sent to a server, so that the server accesses the storage system in response to the received IO request.

[0086] In some embodiments, the functions or modules included in the device provided in this embodiment of the present disclosure can be used to execute the methods described in the above method embodiments, and the specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.

[0087] This embodiment of the present disclosure further provides a computer device, which at least includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the method described in any one of the foregoing embodiments.

[0088] Figure 8 FIG. 0 shows a more specific schematic diagram of the hardware structure of a computing device provided by an embodiment of the present disclosure. The device may include: a processor 802, a memory 804, an input / output interface 806, a communication interface 808, and a bus 810. Among them, the processor 802, the memory 804, the input / output interface 806, and the communication interface 808 are communicatively connected to each other inside the device through the bus 810.

[0089] The processor 802 may be implemented in a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided by the embodiments of the present disclosure. The processor 802 may further include a graphics card, and the graphics card may be an Nvidia titan X graphics card or a 1080Ti graphics card, etc.

[0090] The memory 804 may be implemented in the form of a read-only memory (ROM), a random access memory (RAM), a static storage device, a dynamic storage device, etc. The memory 804 may store an operating system and other application programs. When implementing the technical solutions provided by the embodiments of the present disclosure through software or firmware, the relevant program codes are stored in the memory 804 and are called and executed by the processor 802.

[0091] The input / output interface 806 is used to connect to an input / output module to implement information input and output. The input / output module may be configured as a component in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Among them, the input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0092] The communication interface 808 is used to connect to a communication module (not shown in the figure) to implement communication interaction between this device and other devices. Among them, the communication module may communicate through a wired manner (such as USB, network cable, etc.) or through a wireless manner (such as a mobile network, WIFI, Bluetooth, etc.).

[0093] The bus 810 includes a path for transmitting information between various components of the device (such as the processor 802, the memory 804, the input / output interface 806, and the communication interface 808).

[0094] It should be noted that although the above device only shows the processor 802, the memory 804, the input / output interface 806, the communication interface 808, and the bus 810, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device may also only include the components necessary to implement the solution of the embodiments of the present disclosure, and does not necessarily include all the components shown in the figure.

[0095] Embodiments of the present disclosure also provide a traffic control system, the system includes:

[0096] A traffic control node 102, a client 106 corresponding to each storage service 104 among a plurality of storage services 104; and a server 110;

[0097] The traffic control node 102 may execute the steps executed by the traffic control node 102 in any of the foregoing method embodiments; and / or each client 106 may execute the steps executed by the client 106 in any of the foregoing method embodiments; the server 110 may receive an IO request sent by the client and access the storage system in response to the received IO request.

[0098] For the specific architecture of the traffic control system of the embodiments of the present disclosure, reference may be made to Figure 1 and the foregoing method embodiments, which will not be elaborated herein.

[0099] Embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the method described in any of the foregoing embodiments.

[0100] Computer-readable media includes permanent and non-permanent, removable and non-removable media and can be implemented by any method or technology for information storage. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.

[0101] As can be seen from the description of the above embodiments, those skilled in the art can clearly understand that the embodiments of the present disclosure can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solutions of the embodiments of the present disclosure, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments of the present disclosure.

[0102] The systems, devices, modules or units illustrated in the above embodiments can be specifically implemented by a computer device or entity, or by a product with certain functions. A typical implementation device is a computer, and the specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver device, a game console, a tablet computer, a wearable device, or a combination of any several of these devices.

[0103] Each embodiment in the present disclosure is described in a progressive manner. The same or similar parts among the embodiments can be referred to each other, and the differences between each embodiment and other embodiments are emphasized. In particular, for the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple. For the relevant parts, reference can be made to the description of the method embodiments. The device embodiments described above are only illustrative. The modules described as separate components may or may not be physically separated. When implementing the solutions of the embodiments of the present disclosure, the functions of the modules can be implemented in the same or multiple software and / or hardware. It is also possible to select some or all of the modules according to actual needs to achieve the purpose of the solutions of this embodiment. Those of ordinary skill in the art can understand and implement without creative efforts.

[0104] The above are only the specific implementation manners of the embodiments of the present disclosure. It should be noted that for those of ordinary skill in the art, without departing from the principles of the embodiments of the present disclosure, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the embodiments of the present disclosure.

Claims

1. A traffic control method, applied to a traffic control node, for performing traffic control on multiple storage services. The multiple storage services share the traffic resources of a storage system, and each client under the same storage service shares the traffic resources of this storage service; The method includes: Obtaining the traffic demands of each client in the current period, and determining the traffic demand of the storage service in the current period based on the traffic demands of each client in the current period under the same storage service; Determining the traffic quotas of each storage service in the next period based on the traffic demands of the multiple storage services in the current period; Determining the traffic quotas of each client under the corresponding storage service in the next period based on the traffic demands of each client under the same storage service in the current period and the traffic quotas of the corresponding storage service in the next period, so that each client performs traffic control on each IO request of the client in the next period based on the traffic quota of the client in the next period; Each IO request sent after traffic control is used to be sent to the server, so that the server accesses the storage system in response to the received IO request.

2. The method according to claim 1, wherein determining the traffic quota of each storage service in the next cycle based on the traffic requirements of the multiple storage services in the current cycle includes: Determining the basic traffic quotas of each storage service in the next period based on the weights of the multiple storage services; Determining the supplementary traffic quotas of each storage service in the next period based on the traffic demands of the multiple storage services in the current period; Determining the traffic quota of the storage service in the next period based on the basic traffic quota and the supplementary traffic quota of each storage service in the next period.

3. The method according to claim 1, the method further includes: Issuing the traffic quotas of each client in the next period to the corresponding client, so that the corresponding client stores the traffic quota of the client in the next period locally; wherein, for each IO request of the client in the next period, the client performs traffic control on the IO request based on the cached traffic quota and the traffic quota consumed by the client in the next period.

4. The method according to claim 3, the client is used for: If the sum of the traffic requirements of the IO requests received in the next cycle and the traffic quota already consumed by this client in the next cycle is greater than the traffic quota of this client in the next cycle, add the IO requests received in the next cycle to the waiting queue; If the traffic quota of this client meets the dequeue condition of the IO requests in the waiting queue, remove the IO requests in the waiting queue from the waiting queue and send them to the storage system.

5. The method according to claim 1, the client includes a traffic access control module deployed on the foreground IO thread and a traffic management module deployed on the background thread; The traffic access control module is used to count the traffic requirements of the IO requests of this client in the current cycle, and perform traffic control on the IO requests of this client in the next cycle based on the traffic quota of this client in the next cycle; The traffic management module is used to obtain the traffic requirements of this client in the current cycle from the traffic access control module and send them to the traffic control node, and obtain the traffic quota of this client in the next cycle from the traffic control node and send it to the foreground IO thread.

6. The method according to claim 5, the traffic access control module of the client is used to perform traffic control on the IO requests of this client in the next cycle based on the priorities of the IO streams to which the IO requests of this client in the next cycle belong, and the priorities of the IO streams are issued by the storage service to which the client belongs.

7. The traffic access control module of the client in the method according to claim 6 is configured to send the priority of the IO stream to which the IO request belongs to the storage system, so that the storage system schedules the received IO requests based on the priority of the IO stream to which the IO request belongs.

8. In the method according to claim 5, at least one client belongs to multiple storage services respectively; the foreground IO threads of the clients belonging to multiple storage services include multiple traffic access control modules, and each traffic access control module corresponds to one storage service and is configured to perform traffic control on the IO requests related to the corresponding storage service of the client in the next cycle according to the traffic quota of the corresponding storage service.

9. In the method according to claim 1, the obtaining of the traffic demands of each client in the current cycle includes: Obtaining the reported traffic demand of the client in the current period; Performing weighted average processing on the reported traffic demand of the client in the current period and the historical traffic demand of the client to obtain the traffic demand of the client in the current period.

10. In the method according to claim 1, the traffic resources of the storage system are divided into clusters, the traffic resources in the clusters are divided into at least one group of service resources, and each group of service resources is divided into at least one group of client resources; the multiple storage services share the traffic resources in the clusters, each group of service resources is allocated to one storage service, and each group of client resources in the same group of service resources is respectively allocated to each client under the same storage service.

11. A traffic control method is applied to a background thread in a client, and the client further includes a foreground IO thread; the method includes: Obtaining the traffic demand of the client in the current period from the foreground IO thread; Reporting the traffic demand of the client in the current period to the traffic control node, and obtaining the traffic quota of the client in the next period determined by the traffic control node; wherein, the traffic control node determines the traffic quota of each storage service in the next period based on the traffic demands reported by each client under each storage service in the multiple storage services, and determines the traffic quota of each client under the corresponding storage service in the next period based on the traffic demands of each client under the same storage service in the next period and the traffic quota of the corresponding storage service; The multiple storage services share the traffic resources of the storage system, and each client under the same storage service shares the traffic resources of the storage service; Sending the traffic quota of the client in the next period to the foreground IO thread, so that the foreground IO thread performs traffic control on the IO requests of the client in the next period based on the obtained traffic quota; Each IO request sent after traffic control is used to be sent to the server, so that the server accesses the storage system in response to the received IO request.

12. A traffic control system, the system includes: A traffic control node, clients corresponding to each storage service in multiple storage services, and a server; The flow control node is used to execute the method described in any one of claims 1-10; and / or Each client corresponding to the storage service is used to execute the method described in claim 11; The server is used to receive the IO requests sent by the clients and access the storage system in response to the received IO requests.

13. A computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the method described in any one of claims 1 to 11 is implemented.

14. A computer device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the program, the method described in any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Network flow rate audit method, device and network equipment

    CN103078766A

  • Data forwarding method and device and readable storage medium

    CN111585896A