Traffic management method, device and system and storage medium
By implementing multi-level flow control policies in a distributed storage system, controlling the amount of requested data and priority of the service process, the problem of concurrent request management is solved, and the stability and service quality of the system are improved.
Patent Information
- Application Number
- CN202311027987.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-15
- Publication Date
- 2025-02-25
AI Technical Summary
In a distributed storage system, concurrent requests generated by multiple service processes deployed on storage nodes are not effectively managed, resulting in requests competing for device resources and affecting service performance.
By obtaining the requests generated by the service process and their throughput thresholds, implementing a multi-level flow control strategy to control the amount of requested data within a unit time, which does not exceed the throughput threshold, and batch requests based on the request's scheduling priority and delay sensitivity. Send to the destination.
Effectively manage requests from service processes, avoid resource competition, improve service quality, prioritize high priority and high latency sensitivity requests, reduce their queuing time, and improve processing efficiency.
Smart Images

Figure CN119520621A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a traffic management method, device, system and storage medium. Background Art
[0002] Traffic management refers to managing concurrent requests generated by devices so that the devices can process requests normally to ensure the stability of the system. In a distributed storage system, data needs to be transmitted between storage nodes through the network. A variety of service processes are deployed in storage nodes to provide different services. For example, a read-write process is deployed on a storage node to read and write data on the storage node's disk. For another example, a disk space defragmentation process is deployed on a storage node to defragment the storage node's disk space to improve disk utilization.
[0003] The various service processes deployed on the storage node may generate a large number of requests concurrently. If these requests are not managed, multiple requests will compete for device resources in the system, affecting the service performance of the storage node. Therefore, how to manage the traffic of requests generated by the service processes of the storage node has become a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention
[0004] Multiple aspects of the present application provide a traffic management method, device, system and storage medium for performing traffic management on requests generated by a service process of a storage node to improve service quality.
[0005] The present application provides a traffic management method, including:
[0006] Obtaining a first request generated by a service process and a throughput threshold of the service process;
[0007] According to the data volume of the first request and the throughput threshold, the data volume of the second request read per unit time is controlled not to exceed the throughput threshold; the second request is multiple; the multiple second requests are part or all of the first request;
[0008] Obtaining request attributes of the second request; the request attributes comprising: at least one of scheduling priority and delay sensitivity;
[0009] The multiple second requests are sent to the destination end in batches according to the request attributes of the multiple second requests.
[0010] The embodiment of the present application also provides a traffic management system, including: a service process and a traffic management node; the traffic management node includes: a primary flow control unit and a secondary flow control unit;
[0011] The service process is used to generate a first request and determine the data volume, scheduling priority and delay sensitivity of the first request; the service process is also used to determine a throughput threshold of the service process;
[0012] The traffic management node is used to: control the data volume of the second request read per unit time not exceeding the throughput threshold according to the data volume of the first request and the throughput threshold of the service process; the second request is multiple, and the multiple second requests are part or all of the first request; and obtain the request attributes of the second request; the request attributes include: at least one of scheduling priority and delay sensitivity; and according to the request attributes of the multiple second requests, send the multiple second requests to the destination in batches.
[0013] The embodiment of the present application further provides a computing device, comprising: a memory and a processor; wherein the memory is used to store a computer program;
[0014] The processor is coupled to the memory and is configured to execute the computer program to perform the steps in the above traffic management method.
[0015] An embodiment of the present application also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in the above-mentioned traffic management method.
[0016] In the embodiment of the present application, through a multi-level flow control strategy, bandwidth flow control can be performed on the service process based on the throughput threshold of the service process, so that the network flow sent by the service process does not exceed the throughput threshold of the service process. In this way, flow control is performed on the local end, so that the flow sent by the local end does not occupy all the resources of the local end, thereby avoiding the flow of the local end occupying all the resources of the other end. Afterwards, for multiple second requests read within a unit time, according to the scheduling priority and / or delay sensitivity of the multiple second requests, the multiple second requests are sent to the destination end in batches, and the requests with high scheduling priority and / or high delay sensitivity can be given priority to be sent to the destination end, thereby reducing the queuing time of the requests with high scheduling priority and / or high delay sensitivity, giving priority to ensuring the processing efficiency of the requests with high scheduling priority and / or high delay sensitivity, and helping to improve the quality of service. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 A schematic diagram of the structure of a traffic management system provided in an embodiment of the present application;
[0019] Figure 2 A schematic diagram of the structure of a distributed storage system provided in an embodiment of the present application;
[0020] Figure 3 A schematic diagram of a process of performing traffic management on a traffic management system provided by an embodiment of the present application;
[0021] Figure 4 A flow chart of a flow management method provided in an embodiment of the present application;
[0022] Figure 5 A schematic diagram of the structure of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0024] In some embodiments of the present application, through a multi-level flow control strategy, bandwidth flow control can be performed on the service process based on the throughput threshold of the service process, so that the network flow sent by the service process does not exceed the throughput threshold of the service process. In this way, flow control is performed on the local end, so that the flow sent by the local end does not occupy all the resources of the local end, thereby avoiding the flow of the local end occupying all the resources of the other end. Afterwards, for multiple second requests read within a unit time, the multiple second requests are sent to the destination end in batches according to the scheduling priority and / or delay sensitivity of the multiple second requests. Requests with high scheduling priority and / or high delay sensitivity can be sent to the destination end first, reducing the queuing time of requests with high scheduling priority and / or high delay sensitivity, giving priority to ensuring the processing efficiency of requests with high scheduling priority and / or high delay sensitivity, which helps to improve the quality of service.
[0025] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0026] It should be noted that the same reference numerals denote the same objects in the following drawings and embodiments, and therefore, once an object is defined in one drawing or embodiment, it does not need to be further discussed in the subsequent drawings and embodiments.
[0027] Figure 1 This is a schematic diagram of the structure of the traffic management system provided in the embodiment of the present application. Figure 1As shown, the traffic management system includes: a service process 10 and a traffic management node 20. The number of the service process 10 can be 1 or more. More than 2 means 2 or more. Figure 1 In the figure, only the service process 10 is taken as an example that the service process A, B and C are three service processes.
[0028] The service process 10 is a carrier for running applications in a computing device, and can run applications to provide related services. The computing device can be a single server device, a cloud server array, or a virtual machine (VM) running in a cloud server array. In addition, the computing device can also refer to other computing devices with corresponding service capabilities, such as computers and other terminal devices (running service programs), etc.
[0029] In a distributed storage system, computing and storage are generally separated. Figure 2 As shown, the distributed storage system may include: a management and control node 30 and a storage cluster 40. The storage cluster 40 includes: a plurality of storage nodes 401. A plurality refers to two or more.
[0030] The management and control node 30 refers to a computing device that manages and controls, schedules resources, and monitors resources for the storage cluster 40. For the implementation form of the computing device, please refer to the relevant content of the above embodiment, which will not be repeated here.
[0031] Storage node 401 refers to an electronic device for providing storage resources. Storage node 401 may include: memory. The memory may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk, etc.
[0032] A plurality of storage nodes 401 constitute a storage cluster 40, which can store data in a distributed manner. The data can be file data, image data, or a data table, etc. The storage cluster 40 can implement distributed storage of data based on a block storage service. For example, the data in the storage cluster 40 is distributedly stored in the form of data blocks (Chunk) on different disks.
[0033] In this embodiment, data needs to be transmitted between the storage nodes 401 of the storage cluster 40 through the network. The computing device on which the above-mentioned traffic management system is deployed can be implemented as the storage node 401. Figure 1 The traffic management system shown can be deployed in Figure 2 The storage node 401 shown is used to perform traffic control on the storage cluster 40 .
[0034] The following is an exemplary description of the specific process of performing traffic control in the traffic management system provided in the embodiment of the present application.
[0035] In this embodiment, the service process 10 may generate requests according to actual needs. The service process 10 may generate input / output (IO) requests and / or control requests. Among them, the IO request is a data stream that needs to be sent to the process of the other end (i.e., the destination end of the request). The control request refers to the state synchronization flow between nodes or devices, such as heartbeat requests, status update requests, etc. Among them, the heartbeat request refers to a request for detecting whether the other end is alive, that is, a request for detecting whether the other end is providing services normally. The status update request refers to a request for updating the status of a node or device (such as the health status, etc.).
[0036] Of course, the service provided by the service process 10 is different, and the operation information of the IO request generated is different. The operation information of the IO request is used to reflect the role of the IO request, that is, to reflect what the IO request is used for. For example, Figure 3 As shown, service process A is a process for storage control arrangement, and can provide storage space arrangement service, so the operation information of the IO request generated by service process A is a request for storage space arrangement. For a distributed storage system, service process A can provide storage space arrangement service for storage cluster 40.
[0037] In the embodiments of the present application, the specific implementation method of storage space organization is not limited. In some embodiments, storage space organization can be implemented as garbage collection (GC). Among them, garbage collection (GC) refers to clearing data that is no longer referenced in the data deleted by data deduplication technology. For example, assuming that the data deleted by data deduplication technology is data set R, garbage collection (GC) is to delete data that is no longer referenced in data set R. Correspondingly, garbage data refers to data that is no longer referenced in the data deleted by data deduplication technology.
[0038] In other embodiments, storage space organization can be implemented as defragmentation. Defragmentation means that data is stored as centrally as possible in the storage cluster, specifically, as much data as possible is compactly stored on the same storage node, storage resource fragmentation of the storage node is reduced, and resource utilization of the storage node storing data is increased as much as possible.
[0039] The implementation methods of storage space organization shown in the above embodiments are only exemplary and do not constitute limitations.
[0040] For another example, service process B is a process for data reading and writing, and is used to provide data reading and writing services. Then the IO request generated by service process B can be a read data request or a write data request. Accordingly, the operation information of the read data request is a request to read data; the operation information of the write data request is a request to write data. Of course, the IO request generated by service process B can also be a data processing request. Accordingly, the operation information of the IO request for data processing is implemented as a data processing operation, such as data compression, data deduplication, data encryption, etc., but is not limited to this.
[0041] For another example, service process C is a process for log backup, and is used to provide log backup service. Then the IO request generated by service process C can be a log backup request. Accordingly, the operation information of the log backup request is log backup. For a distributed storage system, service process C is used to provide log backup service for storage cluster 40.
[0042] The above embodiments only illustrate the relationship between the services of the service process and the requests generated by the service process, and do not mean that the above three service processes must be run on the computing device, nor do they mean that only the above three service processes are run on the computing device.
[0043] In this embodiment, the service process 10 may also determine a throughput threshold of the service process 10. The throughput of the service process 10 refers to the amount of data that can be transmitted per unit time, and can be represented by the number of bytes sent to the network by the service process per unit time, such as the number of bytes sent to the network per second (Bit Per Second, BPS) by the service process. The throughput threshold of the service process 10 refers to the maximum amount of data that can be transmitted by the service process 10 per unit time, such as the maximum BPS of the service process 10.
[0044] Specifically, the service process 10 may obtain a throughput influencing parameter; according to the throughput influencing parameter, a stress test is performed on the throughput upper limit of the service process 10 to obtain the throughput threshold of the service process 10. The throughput influencing parameter refers to a parameter that affects the throughput of the service process 10, and may include: the throughput upper limit of the network card of the computing device where the service process 10 is located, the storage space capacity of the computing device, and the computing resources allocated to the service process 10. The computing resources allocated to the service process 10 mainly refer to the processor resources allocated to the service process 10, such as the number of central processing unit (CPU) cores.
[0045] Among them, the throughput threshold of a single service process 10 is less than or equal to the throughput upper limit of the network card. Generally, the throughput threshold of a single service process 10 is less than the throughput upper limit of the network card. In an embodiment where there are multiple service processes 10, multiple service processes 10 independently determine their own throughput thresholds, which may cause the sum of the throughput thresholds of multiple service processes 10 to exceed the throughput upper limit of the network card. Therefore, it is necessary to perform traffic management on the requests generated by the service processes 10.
[0046] Based on the throughput threshold of the above-mentioned service process 10, bandwidth flow control can be performed on the service process 10 so that the network flow sent by the service process 10 does not exceed the throughput threshold of the service process 10. In this way, flow control is performed on the local end so that the flow sent by the local end does not occupy all the resources of the local end, thereby avoiding the local end's flow occupying all the resources of the other end, such as storage resources, processor resources, etc.
[0047] In order to ensure that the network traffic sent by the service process 10 does not exceed the throughput threshold of the service process 10, a first-level flow control unit 201 is introduced in the traffic management node 20 of this embodiment. The first-level flow control unit 201 is used to perform traffic management on requests within the service process 10. Specifically, the first-level flow control unit 201 can control the amount of data of the requests read from the requests generated by the service process 10 per unit time, based on the amount of data of the requests generated by the service process 10 and the throughput threshold of the service process 10, so as not to exceed (i.e., be less than or equal to) the throughput threshold of the service process 10. The unit time here is the same as the unit time for measuring the throughput threshold. Assuming that the throughput threshold is the upper limit of the amount of data sent to the network within 1 second, the unit time here is 1 second.
[0048] In the embodiment of the present application, for the convenience of description and distinction, the request generated by the service process 10 is defined as the first request; the request read from the first request generated by the service process 10 in a unit time is defined as the second request. Among them, the second request is part or all of the requests in the first request. That is, the above-mentioned first-level flow control unit 201 can control the data volume of the second request read from the first request generated by the service process 10 in a unit time according to the data volume of the first request generated by the service process 10 and the throughput threshold of the service process 10, so as not to exceed the throughput threshold of the service process 10.
[0049] The service process 10 may encapsulate the data volume of the first request generated by it and the throughput threshold of the service process 10 into the first request, and send the first request to the primary flow control unit 201. That is, the first request includes: the data volume of the first request and the throughput threshold of the service process generating the first request. Of course, the first request may also include the identifier of the service process generating the first request, such as a process identifier (Process ID, PID) or a process name.
[0050] There are one or more service processes 10. The primary flow control unit 201 performs flow management on each service process 10 separately. In some embodiments, the computing device where the service process 10 is located is pre-set with a storage queue corresponding to the service process 10, which is used to store the first request generated by the service process 10. In an embodiment where there are multiple service processes 10, each service process 10 has a corresponding storage queue. The storage queue generally stores and sends requests according to the First Input First Output (FIFO) principle.
[0051] The capacity of the storage queue is limited. If the service process 10 generates a large number of first requests in a short period of time, the storage queue corresponding to the service process 10 will overflow. Based on this, when the storage queue corresponding to the service process 10 is full, the primary flow control unit 201 can send a stop instruction to the service process 10. The stop instruction is used to instruct the service process to stop sending the first request to the primary flow control unit 201. The service process 10 can respond to the stop instruction and stop sending the first request to the primary flow control unit 201.
[0052] Alternatively, in some embodiments, when the storage queue corresponding to the service process 10 is full, the primary flow control unit 201 does not send a stop instruction to the service process 10, and the service process 10 is unaware of the state of the storage queue and continues to send the generated first request to the primary flow control unit 201. In this embodiment, the primary flow control unit 201 may perform packet loss processing on the first request received after the storage queue corresponding to the service process 10 is full.
[0053] In the case where the storage queue corresponding to the service process 10 is not full, the primary flow control unit 201 may store the received first request in the storage queue corresponding to the service process 10. Accordingly, when the amount of data of the second request read from the first request within the control unit time does not exceed the throughput threshold of the service process 10, the primary flow control unit 201 may read the second request from the storage queue corresponding to the service process 10; and start timing from the reading of the second request, and accumulate the amount of data of the second request read during the timing process.
[0054] Specifically, the first-level flow control unit 201 can obtain the data volume of the second request from the second request; and accumulate the data volume of the second request read during the timing process to obtain the total data volume of the second request read within the timing duration.
[0055] If the timing duration has not reached the above-mentioned unit time (such as 1 second, etc.), and the accumulated data volume of the second request reaches the throughput threshold of the service process 10, stop reading the second request from the storage queue corresponding to the service process 10 until the timing duration reaches the above-mentioned unit time (such as 1 second, etc.). In this way, the data volume of the second request read within the unit time can be controlled not to exceed the throughput threshold of the service process 10.
[0056] Further, when the timing reaches the above-mentioned unit time (such as 1 second, etc.), the first-level flow control unit 201 continues to read the second request from the storage queue corresponding to the service process 10, restarts the timing, and executes the flow control operation of the above-mentioned first-level flow control unit 201 again.
[0057] Correspondingly, if the timing duration reaches the above-mentioned unit time (such as 1 second, etc.), and the accumulated data volume of the second request is still not greater than or equal to the throughput threshold of the service process 10, then when the timing duration reaches the above-mentioned unit time (such as 1 second, etc.), the first-level flow control unit 201 continues to read the second request from the storage queue corresponding to the service process 10, and restarts the timing, and executes the flow control operation of the above-mentioned first-level flow control unit 201 again.
[0058] The above embodiment only illustrates the process of the first-level flow control unit 201 performing flow management on the first request generated by a service process 10. The process of the first-level flow control unit 201 performing flow management on the first request generated by each service process 10 is the same, and the relevant contents of the above embodiment can be referred to. The above embodiment performs flow management on the first request generated by each service process 10 through the first-level flow control unit 201, so that the amount of data of the request read by each service process does not exceed the throughput threshold corresponding to the service process.
[0059] However, if multiple service processes 10 independently determine their respective throughput thresholds, the sum of the throughput thresholds of the multiple service processes 10 may exceed the throughput upper limit of the network card. Therefore, traffic management is required for requests generated by the service processes 10.
[0060] In order to prevent the sum of the throughput thresholds of multiple service processes 10 from exceeding the throughput upper limit of the network card, in this embodiment, the first request generated by the service process 10 is differentiated according to the request attributes of the first request. The request attributes may include: the scheduling priority and / or delay sensitivity of the request. And according to the difference in the request attributes of different requests, the first requests generated by multiple service processes are scheduled. Among them, the request attributes of different types of requests are different. For example, different types of requests have different sensitivities to delays, and the scheduling priorities are also different.
[0061] The delay of the first request refers to the response delay of the first request, that is, the delay from when the service process 10 sends the first request to when the response information of the first request is received. Correspondingly, the delay sensitivity of the first request refers to the sensitivity of the first request to the response delay. The higher the delay sensitivity of the first request, the lower the response delay required by the first request.
[0062] In some embodiments, delay sensitivity may be divided into multiple levels, where multiple means 2 or more. For example, in some embodiments, delay sensitivity may be divided into 2 levels, namely, delay-sensitive and delay-friendly. Among them, the delay sensitivity of the delay-sensitive first request is higher than that of the delay-friendly first request. The delay-sensitive request is more sensitive to delay than the delay-friendly request, that is, the response delay requirement is higher, which also means that the response delay required by the delay-sensitive request is smaller than the response delay required by the delay-friendly request.
[0063] For example, in some embodiments, the first request generated by the service process 10 can be divided into three categories: control request, delay-sensitive IO request and delay-friendly IO request. Among them, a service process can generate these three types of requests, and can also generate some of them, such as generating control requests and / or delay-sensitive IO requests; or generating control requests and / or delay-friendly IO requests, etc.
[0064] Compared with IO requests, control requests have a smaller data volume and lower bandwidth, and control requests are used to report the status of the server and / or detect the status of the peer server. Therefore, if the control request fails in the service process, the service process will be blown, and then the IO request will fail to be sent. Therefore, the scheduling priority of control requests is higher than that of IO requests. The service quality of control requests has lower requirements on response delay. Within the time slice of a unit time, the specific time slice that sends the control request does not affect the service quality of the control request. Therefore, the delay sensitivity of control requests is relatively low and can be set to delay-friendly (such as Figure 3 A delay-friendly control request A1) generated by service process A.
[0065] IO requests can be further divided into foreground IO requests and background IO requests. Among them, foreground IO requests refer to requests responsible for user operations, for example, IO requests responsible for user read and write operations. Background IO requests refer to IO requests generated by background operations of the computing device where the service process is located, generally data processing requests, such as data compression requests, data deduplication requests, etc. Users are unaware of background IO requests. Since users are aware of foreground IO requests, the response delay of foreground IO requests directly affects the user experience. Therefore, the scheduling priority and delay sensitivity of foreground IO requests are higher than those of background IO requests.
[0066] Based on the above analysis, it can be known that the operation information of the first request generated by the service process affects the scheduling priority and delay sensitivity of the first request. Based on this, the service process 10 can determine the scheduling priority and delay sensitivity of the first request generated by the service process 10 according to the operation information of the first request generated by the service process 10.
[0067] The service types of service processes are different, and the first requests generated by service processes have different requirements for response delays. Of course, the scheduling priorities also need to be differentiated. For example, service process 10 includes: a service process for data reading and writing (defined as the first service process) and a service process for log backup (defined as the second service process). The second service process is used for log backup. Even if the first request generated by the second service process fails, it will not cause system-level service risks for the server. Therefore, the scheduling priority of the IO request generated by the second service process is lower. For the first service process used for data reading and writing, the IO request is a read-write request. The read-write efficiency affects the user experience and even affects the subsequent system execution. Therefore, the scheduling priority of the IO request generated by the first service process is higher than the priority of the IO request generated by the second service process.
[0068] Based on the above analysis, the service type of the service process has an important impact on the scheduling priority of the request generated by it. Based on this, the service process 10 can also determine the scheduling priority of the first request generated by the service process 10 according to the service type provided by the service process 10.
[0069] To sum up, service process 10 can determine the scheduling priority of the first request generated by service process 10 and / or the delay sensitivity of the first request based at least on the service type provided by service process 10 and / or the operation information of the first request generated by service process 10.
[0070] The scheduling priority can pre-set multiple priorities. For example, in some embodiments, three priorities can be pre-set: high priority, medium priority and low priority. Among them, the scheduling priority is: high priority is higher than medium priority, and medium priority is higher than low priority. Accordingly, the correspondence between the service type and / or operation information and the scheduling priority can be pre-set; and the correspondence between the service type and / or delay sensitivity can be pre-set. Based on the above correspondence, the service process 10 can query the above correspondence according to the service type provided by the service process 10, and / or the operation information of the first request generated by the service process 10, so as to obtain the scheduling priority of the first request generated by the service process 10 and the delay sensitivity of the first request.
[0071] The following is an illustrative description of a specific implementation method for determining the scheduling priority and delay sensitivity of the first request generated by the service process 10 in conjunction with several common service processes.
[0072] For the first service process used for data reading and writing, the first service process may determine the scheduling priority of the first request generated by the first service process according to the service type provided by the first service process. For example, the correspondence between the service type and the scheduling priority may be pre-configured. Based on the correspondence, the first service process may use the service type provided by the first service process to query the correspondence between the service type and the scheduling priority to obtain the scheduling priority of the first request generated by the first service process. In some embodiments, the scheduling priority of the IO request generated by the first service process may be pre-set to a medium priority.
[0073] For the IO requests generated by the first service process, the operation information is different and the requirements for response delay are different. Generally speaking, read-write requests with a small amount of read and write data have higher requirements for response delay, while read-write requests with a large amount of read and write data have lower requirements for response delay and high requirements for throughput. Therefore, the operation information of the first request generated by the first service process has a certain influence on the delay sensitivity of the first request. Based on this, the delay sensitivity of the first request generated by the first service process can also be determined according to the operation information of the first request generated by the first service process. For example, if the data volume of the operation information of the first request generated by the first service process is greater than or equal to the set data volume threshold, it is determined that the delay sensitivity of the first request generated by the first service process is delay-friendly (such as 0xffffffff). Figure 3 If the data volume of the operation information of the first request generated by the first service process is less than the set data volume threshold, it is determined that the delay sensitivity of the first request generated by the first service process is delay-sensitive (such as Figure 3 The delay-sensitive IO request B1 generated by the service process B).
[0074] For the second service process used for log backup, even if the first request generated by the second service process fails, it will not cause service risks at the system level of the server. Therefore, the scheduling priority and delay sensitivity of the IO request generated by the second service process are relatively low. Therefore, the second service process can determine the scheduling priority and delay sensitivity of the first request generated by the second service process according to the service type provided by the second service process. For example, the correspondence between the service type and the scheduling priority and delay sensitivity can be pre-configured. Accordingly, the service type (i.e., log backup) provided by the second service process can be used to match in the correspondence to obtain the scheduling priority and delay sensitivity of the first request generated by the second service process.
[0075] Based on the characteristics of the service type of the second service process of the log backup, the scheduling priority of the first request generated by the second service process can be pre-configured to be low priority and the delay sensitivity to be delay-friendly (such as Figure 3 The latency-friendly IO requests C1 and C2 generated by the service process C).
[0076] For the service process for storage space organization (defined as the third service process), the first request generated by the third service process is used to request organization of the storage space of the storage cluster to save storage resources. For the third service process for storage space organization, the service type provided by the third service process is storage space organization. The service quality of storage space organization has low requirements on response delay. Within the time slice of a unit time, which specific time slice will issue the storage space organization does not affect the service quality of the IO request for storage space organization. Therefore, the delay sensitivity of the request generated by the third service process for storage space organization is low and can be set to delay-friendly. Based on this, the third service process can determine the delay sensitivity of the first request according to the service type provided by the third service process (i.e., storage space organization). For example, the service type can be pre-configured as storage space organization with a delay sensitivity of delay-friendly, etc. (such as Figure 3 The delay-friendly IO request A2 generated by the service process A).
[0077] The scheduling priority of the first request generated by the third service process varies with the size of the free storage space of the storage cluster. When the free storage space of the storage cluster is large, the scheduling priority of the first request generated by the service process for storage space arrangement is low, and the delay sensitivity is also low, and only the throughput needs to meet the standard; when the free storage space of the storage cluster is small and the storage space is at risk of being full, the scheduling priority of the first request generated by the service process for storage space arrangement is high.
[0078] Therefore, when determining the scheduling priority of the first request generated by the third service process, the third service process can obtain the idle ratio of the storage space of the storage cluster to which the computing device (defined as the target computing device) where the third service process is located belongs.
[0079] In the embodiment of the present application, the specific implementation method of the third service process obtaining the idle ratio of the storage space of the storage cluster to which the target computing device belongs is not limited. Figure 2 As shown, for a distributed storage system, the control node 30 can perform resource scheduling and resource monitoring on the storage cluster 40, that is, the control node 30 can monitor the total storage space and storage space usage of the storage cluster 40. Further, the control node 30 can determine the idle ratio of the storage space of the storage cluster 40 according to the total storage space and storage space usage of the storage cluster 40.
[0080] Accordingly, the service process in the storage node 401 can obtain the idle ratio of the storage space of the storage cluster 40 from the control node 30. That is, the third service process can obtain the idle ratio of the storage space of the storage cluster from the control node. Further, the third service process can determine the scheduling priority of the first request generated by the third service process according to the idle ratio of the storage space of the storage cluster.
[0081] Specifically, if the idle ratio of the storage space of the storage cluster is less than or equal to the set idle ratio threshold, the scheduling priority of the first request generated by the third service process is set to the first priority (such as high priority); if the idle ratio of the storage space of the storage cluster is greater than the set idle ratio threshold, the scheduling priority of the first request generated by the third service process is set to the second priority (such as low priority). The first priority is higher than the second priority.
[0082] In some embodiments, it can also be set that when the idle ratio of the storage space of the storage cluster is greater than the set idle ratio threshold, the scheduling priority of the first request generated by the third service process is lower than the scheduling priority of the first request generated by the first service process for data reading and writing. For example, it can be set that when the idle ratio of the storage space of the storage cluster is greater than the set idle ratio threshold, the scheduling priority of the first request generated by the third service process is low priority, while the scheduling priority of the first request generated by the first service process for data reading and writing is medium priority, etc.
[0083] The above embodiment only takes the service process for data reading and writing, log backup and storage space organization as an example to illustrate the implementation method of the service process determining the scheduling priority and delay sensitivity of the first request generated by it, but it does not constitute a limitation.
[0084] When generating the first request, the service process 10 may determine the scheduling priority and delay sensitivity of the first request; and encapsulate the scheduling priority and delay sensitivity in the first request, and send them to the primary flow control unit 201. That is, the first request may also include: the scheduling priority and / or delay sensitivity of the first request. Since the second request is a partial or complete request read from the first request within a unit time, the second request also includes: the scheduling priority and / or delay sensitivity of the request.
[0085] The first-level flow control unit 201 can control the amount of data read from the first request in the second request per unit time, so as not to exceed the throughput threshold of the service process. However, if multiple service processes 10 independently determine their own throughput thresholds, the sum of the throughput thresholds of multiple service processes 10 may exceed the throughput upper limit of the network card. Therefore, it is necessary to perform flow management on the requests generated by the service process 10.
[0086] In order to prevent the sum of the throughput thresholds of multiple service processes 10 from exceeding the throughput upper limit of the network card, in this embodiment, a secondary flow control unit 202 is introduced based on the scheduling priority and / or delay sensitivity of the requests generated by the above service processes. The second request read by the primary flow control unit 201 is input into the secondary flow control unit 202. The secondary flow control unit 202 can obtain the request attributes of the second request read within a unit time. The request attributes of the second request include: at least one of scheduling priority and delay sensitivity. The second request is generally multiple. The multiple second requests are part or all of the first request. Specifically, the secondary flow control unit 202 can parse the request attributes of the second request from the second request. Furthermore, the secondary flow control unit 202 can send the multiple second requests to the destination in batches according to the request attributes of the multiple second requests.
[0087] The destination refers to the destination of the second request. The destinations of different second requests may be the same or different. In the above distributed storage system, the destination is a storage node other than the storage node where the service process is located.
[0088] The above-mentioned secondary flow control unit 202 sends multiple second requests to the destination in batches according to the scheduling priority and / or delay sensitivity of the second request, and can give priority to sending requests with high scheduling priority and / or high delay sensitivity to the destination, thereby reducing the queuing time of requests with high scheduling priority and / or high delay sensitivity, giving priority to ensuring the processing efficiency of requests with high scheduling priority and / or high delay sensitivity, and helping to improve service quality.
[0089] In the embodiment of the present application, through a multi-level flow control strategy, bandwidth flow control can be performed on the service process based on the throughput threshold of the service process, so that the network flow sent by the service process does not exceed the throughput threshold of the service process. In this way, flow control is performed on the local end, so that the flow sent by the local end does not occupy all the resources of the local end, thereby avoiding the flow of the local end occupying all the resources of the other end. Afterwards, for the request sent to the secondary flow control unit, according to the scheduling priority and / or delay sensitivity of the second request, multiple second requests are sent to the destination end in batches, and requests with high scheduling priority and / or high delay sensitivity can be given priority to be sent to the destination end, thereby reducing the queuing time of requests with high scheduling priority and / or high delay sensitivity, giving priority to ensuring the processing efficiency of requests with high scheduling priority and / or high delay sensitivity, and helping to improve service quality.
[0090] In some embodiments, the number of second requests read by the primary flow control unit 201 within a unit time is multiple, and the multiple second requests may belong to the same service process or to different service processes. Based on the scheduling priority and delay sensitivity of the above-mentioned second request, a storage queue may be set in the computing device where the service process is located to store the second request read by the primary flow control unit 201 within a unit time. In the embodiment of the present application, for the convenience of description and distinction, the above-mentioned storage queue for storing the first request is defined as the first storage queue; and the storage queue used to store the second request here is defined as the second storage queue.
[0091] Among them, there are multiple second storage queues. Multiple means 2 or more. Each of the second storage queues corresponds to a scheduling priority and a delay sensitivity. Different second storage queues correspond to different scheduling priorities and / or delay sensitivities. Among them, the number of second storage queues may be equal to: the number of scheduling priorities M multiplied by the number of delay sensitivity levels N. Among them, M and N are both greater than or equal to 2 and are integers. Alternatively, the number of second storage queues is equal to: M*N-1. This is mainly because in actual applications, the request with the lowest scheduling priority also has the lowest delay sensitivity, and there will be no situation with high delay sensitivity.
[0092] For example, Figure 3 As shown, for the above-mentioned scheduling priority is divided into three priorities: high priority, medium priority and low priority, and the delay sensitivity is divided into two delay sensitivity levels: delay sensitive type and delay friendly type. The second storage queues can be five, namely: a storage queue corresponding to the high priority-delay sensitive type, a storage queue corresponding to the high priority-delay friendly type, a storage queue corresponding to the medium priority-delay sensitive type, a storage queue corresponding to the medium priority-delay friendly type, and a storage queue corresponding to the low priority-delay friendly type.
[0093] Based on the above-mentioned second storage queue, when sending multiple second requests to the destination in batches, the secondary flow control unit 202 can store multiple second requests in the second storage queue adapted to their respective scheduling priorities and delay sensitivities according to the scheduling priorities and delay sensitivities of the multiple second requests read in a unit time. Furthermore, the secondary flow control unit 202 can also obtain the scheduling ratio and scheduling order of the multiple second storage queues. The scheduling ratio is used to indicate the number of second requests read from each second storage queue in a unit time.
[0094] In some embodiments, an initial scheduling ratio can be pre-set for multiple second storage queues, and the initial scheduling ratio can be an empirical value determined by the operation and maintenance personnel of the flow control and management based on prior knowledge. The traffic management node 20 can monitor the real-time traffic of the computing device where the service process is located within a unit time; if the real-time traffic of the computing device within a unit time meets the set adjustment conditions, the initial scheduling ratio is adjusted to obtain the scheduling ratio of the multiple second storage queues. Accordingly, if the real-time traffic of the computing device within a unit time does not meet the set adjustment conditions, the initial scheduling ratio is used as the scheduling ratio of the multiple second storage queues.
[0095] Among them, the real-time traffic per unit time can be characterized by the amount of data (such as BPS) of the request sent by the computing device per unit time. In the embodiment of the present application, the specific implementation form of the above-mentioned set adjustment conditions is not limited. For example, in some embodiments, the set adjustment conditions can be implemented as follows: if the real-time traffic of the computing device per unit time is greater than the traffic threshold per unit time, then if the real-time traffic of the computing device per unit time is greater than the traffic threshold per unit time, it is determined that the set adjustment conditions are met.
[0096] In other embodiments, the set adjustment condition can be implemented as follows: the real-time traffic of the computing device in a unit time is greater than the traffic threshold in a unit time, and is greater than or equal to the throughput upper limit of the network card of the computing device. Accordingly, if the real-time traffic of the computing device in a unit time is greater than the traffic threshold in a unit time, and is greater than or equal to the throughput upper limit of the network card of the computing device, it is determined that the set adjustment condition is met.
[0097] Further, if the set adjustment conditions are met, the preset initial scheduling ratio can be adjusted. Specifically, the ratio value of the target storage queue in the multiple second storage queues in the initial scheduling ratio can be reduced to the set ratio value. Among them, the target storage queue is the storage queue with the lowest scheduling priority among the multiple second storage queues; further, the target ratio values of the other second storage queues except the target storage queue in the multiple second storage queues can be determined according to the throughput upper limit of the network card and the set ratio value; and the ratio values of the other second storage queues in the initial scheduling ratio are adjusted to their respective corresponding target ratio values to obtain the scheduling ratio of the multiple second storage queues. Among them, the set ratio value is less than the corresponding ratio value of the target storage queue in the initial scheduling ratio. In the embodiment of the present application, the specific value of the set ratio value is not limited. For example, the set ratio value can be 0, 0.1% or 0.5%, etc., but is not limited to this.
[0098] Among them, according to the real-time traffic of the computing device in unit time, the scheduling ratio of requests with various scheduling priorities and delay sensitivity is adjusted in time, so that the real-time traffic of the computing device in unit time does not exceed the throughput limit of the network card, which helps to ensure the quality of service.
[0099] The above scheduling order is used to indicate the sending order of the second requests in multiple second storage queues, which is pre-configured. Since delay-sensitive requests generally require the first few time slices in a unit time to be sent, and requests with high scheduling priority generally require that they be sent within a unit time. Therefore, for the same scheduling priority, requests from storage queues with high delay sensitivity are scheduled earlier than requests from storage queues with low delay sensitivity; and for requests with different scheduling priorities, requests with high delay sensitivity are also scheduled first. For example, for Figure 3 The second storage queue in the can be pre-configured in the following scheduling order: high priority-delay sensitive storage queue Q1> medium priority-delay sensitive storage queue Q3> high priority-delay friendly storage queue Q2> medium priority-delay friendly storage queue Q4> low priority-delay sensitive storage queue Q5. The requests in the storage queues with the higher scheduling order will be scheduled with higher priority.
[0100] Based on the scheduling ratio and scheduling order of the multiple second storage queues, the secondary flow control unit 202 can read a corresponding number of second requests from each of the multiple second storage queues according to the scheduling ratio of the multiple second storage queues. Specifically, the number of second requests to be read from each second storage queue can be determined according to the throughput upper limit of the network card of the computing device where the service process 10 is located and the scheduling ratio of the multiple second storage queues, and a corresponding number of second requests can be read from each of the multiple second storage queues.
[0101] Furthermore, the second requests read from the plurality of second storage queues can be sent to the destination in batches according to the scheduling order of the plurality of storage queues. In this way, the real-time flow of the computing device can be ensured not to exceed the throughput limit of the network card, which helps to improve the service quality.
[0102] In addition to the above-mentioned traffic management system, the embodiment of the present application also provides a traffic management method. The traffic management method provided by the embodiment of the present application is exemplarily described below.
[0103] Figure 4 Schematic diagram of the flow chart of the traffic management method provided in the embodiment of the present application. Figure 4 As shown, the traffic management method mainly includes:
[0104] 401. Obtain a first request generated by a service process and a throughput threshold of the service process.
[0105] 402. According to the data volume of the first request and the throughput threshold, the data volume of the second request read per unit time is controlled to not exceed the throughput threshold; the second request is multiple; the multiple second requests are part or all of the requests in the first request.
[0106] 403. Obtain request attributes of the second request; the request attributes include: at least one of scheduling priority and delay sensitivity.
[0107] 404. Send the multiple second requests to the destination end in batches according to the request attributes of the multiple second requests.
[0108] The traffic management method provided in the application embodiment can be applied to any device that requires traffic management, such as a storage node in a distributed storage system, or a network device, etc., and is specifically applicable to the traffic generating end, that is, the sending end of the request.
[0109] In this embodiment, the service process may generate a request according to actual needs. The service process may generate an IO request and / or a control request. Of course, the service provided by the service process is different, and the operation information of the generated IO request is different. The operation information of the IO request is used to reflect the role of the IO request, that is, to reflect what the IO request is used for.
[0110] In this embodiment, a throughput threshold of the service process may also be determined. The throughput threshold of the service process refers to the maximum amount of data that can be transmitted by the service process per unit time, such as the maximum BPS of the service process.
[0111] Specifically, the throughput impact parameter can be obtained; according to the throughput impact parameter, the throughput upper limit of the service process is stress tested to obtain the throughput threshold of the service process. Among them, the throughput threshold of a single service process is less than or equal to the throughput upper limit of the network card. Generally, the throughput threshold of a single service process is less than the throughput upper limit of the network card. In an embodiment where there are multiple service processes, multiple service processes independently determine their own throughput thresholds, which may cause the sum of the throughput thresholds of multiple service processes to exceed the throughput upper limit of the network card. Therefore, it is necessary to perform traffic management on the requests generated by the service processes.
[0112] Based on the throughput threshold of the above service process, bandwidth flow control can be performed on the service process so that the network flow sent by the service process does not exceed the throughput threshold of the service process. In this way, flow control is performed on the local end so that the flow sent by the local end does not occupy all the resources of the local end, thereby avoiding the local flow occupying all the resources of the other end, such as storage resources, processor resources, etc.
[0113] In order to ensure that the network traffic sent by the service process does not exceed the throughput threshold of the service process, in step 401, the request generated by the service process and the throughput threshold of the service process can be obtained. Among them, the service process can encapsulate the data volume of the request generated by it and the throughput threshold of the service process into the request. That is, the request generated by the service process includes: the data volume of the request and the throughput threshold of the service process that generated the request. Of course, the request can also include the identifier of the service process that generated the request, such as PID or process name. Accordingly, the throughput threshold of the service process can be obtained from the request generated by the service process.
[0114] Further, in step 402, the amount of data of the request generated by the service process and the throughput threshold of the service process can be controlled to control the amount of data of the request read from the request generated by the service process per unit time to not exceed (i.e., be less than or equal to) the throughput threshold of the service process. The unit time here is the same as the unit time for measuring the throughput threshold. Assuming that the throughput threshold is the upper limit of the amount of data sent to the network within 1 second, the unit time here is 1 second.
[0115] In the embodiment of the present application, for the convenience of description and distinction, the request generated by the service process is defined as the first request; the request read from the first request generated by the service process in a unit time is defined as the second request. The second request is part or all of the requests in the first request. That is, in step 402, the amount of data of the second request read from the first request generated by the service process in a unit time can be controlled according to the amount of data of the first request generated by the service process and the throughput threshold of the service process, so as not to exceed the throughput threshold of the service process.
[0116] There are one or more service processes. In this embodiment, traffic management is performed separately for each service process. In some embodiments, the computing device where the service process is located is pre-set with a storage queue corresponding to the service process, which is used to store the first request generated by the service process. In an embodiment where there are multiple service processes, each service process has a corresponding storage queue. The storage queue generally stores and sends requests according to the FIFO principle.
[0117] The capacity of the storage queue is limited. If a service process generates a large number of first requests in a short period of time, the storage queue corresponding to the service process will overflow. Based on this, when the storage queue corresponding to the service process is full, a stop instruction can be sent to the service process. The stop instruction is used to instruct the service process to stop sending the first request to the primary flow control unit. The service process can respond to the stop instruction and stop sending the first request to the primary flow control unit.
[0118] Alternatively, in some embodiments, when the storage queue corresponding to the service process is full, no stop instruction is sent to the service process, and the service process is unaware of the state of the storage queue and continues to send the generated first request. In this embodiment, packet loss processing can be performed on the first request received after the storage queue corresponding to the service process is full.
[0119] When the storage queue corresponding to the service process is not full, the received first request can be stored in the storage queue corresponding to the service process. Accordingly, when the amount of data read from the first request to the second request within the control unit time does not exceed the throughput threshold of the service process, the second request can be read from the storage queue corresponding to the service process; and timing starts from the reading of the second request, and the amount of data of the second request read during the cumulative timing process.
[0120] Specifically, the data volume of the second request can be obtained from the second request; and the data volume of the second request read during the timing process is accumulated to obtain the total data volume of the second request read within the timing duration.
[0121] If the timing duration has not reached the above-mentioned unit time (such as 1 second, etc.), and the accumulated data volume of the second request reaches the throughput threshold of the service process, stop reading the second request from the storage queue corresponding to the service process until the timing duration reaches the above-mentioned unit time (such as 1 second, etc.). In this way, the data volume of the second request read within the unit time can be controlled not to exceed the throughput threshold of the service process.
[0122] Furthermore, when the timing reaches the above-mentioned unit time (such as 1 second, etc.), the second request continues to be read from the storage queue corresponding to the service process, and the timing is restarted, and the above-mentioned flow control operation is performed again, that is, the data amount of the second request read within the above-mentioned control unit time does not exceed the throughput threshold of the service process.
[0123] Correspondingly, if the timing duration reaches the above-mentioned unit time (such as 1 second, etc.), and the accumulated data volume of the second request is still not greater than or equal to the throughput threshold of the service process, then when the timing duration reaches the above-mentioned unit time (such as 1 second, etc.), the second request will continue to be read from the storage queue corresponding to the service process, and the timing will be restarted, and the above-mentioned control unit time will be executed again to ensure that the data volume of the second request read does not exceed the throughput threshold of the service process.
[0124] The above embodiment only exemplifies the process of performing traffic management on the first request generated by a service process. In the embodiment of the present application, the process of performing traffic management on the first request generated by each service process is the same, and reference can be made to the relevant contents of the above embodiment. The above embodiment performs traffic management on the first request generated by each service process so that the amount of data requested by each service process does not exceed the throughput threshold corresponding to the service process.
[0125] However, if multiple service processes independently determine their throughput thresholds, the sum of the throughput thresholds of multiple service processes may exceed the throughput limit of the network card. Therefore, it is necessary to manage the traffic of the requests generated by the service processes.
[0126] In order to prevent the sum of the throughput thresholds of multiple service processes from exceeding the throughput upper limit of the network card, in this embodiment, the first requests generated by the service processes are differentiated according to the request attributes. The request attributes of the requests include: at least one of scheduling priority and delay sensitivity. Further, according to the request attributes of different requests, the first requests generated by the multiple service processes are scheduled. Different types of requests have different request attributes.
[0127] The operation information of the first request generated by the service process affects the request attribute of the first request, that is, affects the scheduling priority and delay sensitivity. Based on this, the scheduling priority and delay sensitivity of the first request generated by the service process can be determined according to the operation information of the first request generated by the service process.
[0128] The service types of service processes are different, and the first requests generated by service processes have different requirements for response delays. Of course, the scheduling priorities also need to be differentiated. For example, the service processes include: a service process for data reading and writing (defined as the first service process) and a service process for log backup (defined as the second service process). The second service process is used for log backup. Even if the first request generated by the second service process fails, it will not cause system-level service risks for the server. Therefore, the scheduling priority of the IO request generated by the second service process is lower. For the first service process used for data reading and writing, the IO request is a read-write request. The read-write efficiency affects the user experience and even affects the subsequent system execution. Therefore, the scheduling priority of the IO request generated by the first service process is higher than the priority of the IO request generated by the second service process.
[0129] Based on the above analysis, the service type of a service process has an important influence on the scheduling priority of the request generated by it. Based on this, the scheduling priority of the first request generated by the service process 10 can also be determined according to the service type provided by the service process.
[0130] In summary, the scheduling priority of the first request generated by the service process and the delay sensitivity of the first request can be determined at least according to the service type provided by the service process and / or the operation information of the first request generated by the service process.
[0131] The scheduling priority can pre-set multiple priorities. For example, in some embodiments, three priorities can be pre-set: high priority, medium priority and low priority. Among them, the scheduling priority is: high priority is higher than medium priority, and medium priority is higher than low priority. Accordingly, the correspondence between the service type and / or operation information and the scheduling priority can be pre-set; and the correspondence between the service type and / or delay sensitivity can be pre-set. Based on the above correspondence, the above correspondence can be queried according to the service type provided by the service process, and / or the operation information of the first request generated by the service process, so as to obtain the scheduling priority of the first request generated by the service process and the delay sensitivity of the first request.
[0132] The following is an exemplary description of a specific implementation method for determining the scheduling priority and delay sensitivity of the first request generated by a service process in conjunction with several common service processes.
[0133] For the first service process for data reading and writing, the first service process may determine the scheduling priority of the first request generated by the first service process according to the service type provided by the first service process. In some embodiments, the scheduling priority of the IO request generated by the first service process may be pre-set to a medium priority.
[0134] For the IO request generated by the first service process, the operation information is different and the requirements for response delay are different. Generally, read-write requests with a small amount of read-write data have a higher requirement for response delay, while read-write requests with a large amount of read-write data have a lower requirement for response delay and a high requirement for throughput. Therefore, the delay sensitivity of the first request generated by the first service process can also be determined based on the operation information of the first request generated by the first service process.
[0135] For the second service process used for log backup, even if the first request generated by the second service process fails, it will not cause system-level service risks for the server. Therefore, the scheduling priority and delay sensitivity of the IO request generated by the second service process are relatively low. Therefore, the second service process can determine the scheduling priority and delay sensitivity of the first request generated by the second service process according to the type of service provided by the second service process. Based on the characteristics of the service type of the second service process for log backup, the scheduling priority of the first request generated by the second service process can be pre-configured to be low priority and the delay sensitivity to be delay-friendly.
[0136] For the service process for storage space organization (defined as the third service process), the first request generated by the third service process is used to request the organization of the storage space of the storage cluster to save storage resources. For the third service process for storage space organization, the service type provided by the third service process is storage space organization. The service quality of storage space organization has low requirements on response delay. Within the time slice of a unit time, which specific time slice will issue the storage space organization does not affect the service quality of the IO request for storage space organization. Therefore, the delay sensitivity of the request generated by the third service process for storage space organization is low and can be set to delay-friendly. Based on this, the delay sensitivity of the first request can be determined according to the service type provided by the third service process (i.e., storage space organization). For example, the delay sensitivity of the service type for storage space organization can be pre-configured as delay-friendly, etc.
[0137] The scheduling priority of the first request generated by the third service process varies with the size of the free storage space of the storage cluster. When the free storage space of the storage cluster is large, the scheduling priority of the first request generated by the service process for storage space arrangement is low, and the delay sensitivity is also low, and only the throughput needs to meet the standard; when the free storage space of the storage cluster is small and the storage space is at risk of being full, the scheduling priority of the first request generated by the service process for storage space arrangement is high.
[0138] Therefore, when determining the scheduling priority of the first request generated by the third service process, the idle ratio of the storage space of the storage cluster to which the computing device where the third service process is located belongs can be obtained. For the specific implementation of obtaining the idle ratio of the storage space of the storage cluster to which the computing device where the third service process is located belongs, please refer to the relevant content of the above embodiment, which will not be repeated here. Further, the scheduling priority of the first request generated by the third service process can be determined based on the idle ratio of the storage space of the storage cluster.
[0139] Specifically, if the idle ratio of the storage space of the storage cluster is less than or equal to the set idle ratio threshold, the scheduling priority of the first request generated by the third service process is set to the first priority (such as high priority); if the idle ratio of the storage space of the storage cluster is greater than the set idle ratio threshold, the scheduling priority of the first request generated by the third service process is set to the second priority (such as low priority). The first priority is higher than the second priority.
[0140] In some embodiments, it can also be set that when the idle ratio of the storage space of the storage cluster is greater than the set idle ratio threshold, the scheduling priority of the first request generated by the third service process is lower than the scheduling priority of the first request generated by the first service process for data reading and writing. For example, it can be set that when the idle ratio of the storage space of the storage cluster is greater than the set idle ratio threshold, the scheduling priority of the first request generated by the third service process is low priority, while the scheduling priority of the first request generated by the first service process for data reading and writing is medium priority, etc.
[0141] The above embodiment only takes the service process for data reading and writing, log backup and storage space organization as an example to illustrate the implementation method of the service process determining the scheduling priority and delay sensitivity of the first request generated by it, but it does not constitute a limitation.
[0142] The service process may determine the request attributes of the first request when generating the first request; and encapsulate the request attributes in the first request and send them together to the module, device or equipment that executes the above-mentioned traffic management method. That is, the first request may also include: the request attributes of the first request. Since the second request is a partial or complete request read from the first request within a unit time, the second request also includes: the request attributes of the second request.
[0143] The above embodiment can control the amount of data read from the first request in the second request per unit time, so as not to exceed the throughput threshold of the service process. However, if multiple service processes independently determine their own throughput thresholds, the sum of the throughput thresholds of the multiple service processes may exceed the throughput upper limit of the network card. Therefore, it is necessary to perform traffic management on the requests generated by the service processes.
[0144] In order to prevent the sum of the throughput thresholds of multiple service processes from exceeding the throughput upper limit of the network card, the request attributes of the second request read per unit time may be obtained in step 403. The request attributes include: at least one of scheduling priority and delay sensitivity. Specifically, the request attributes of the second request may be parsed from the second request. There may be multiple second requests, and the multiple second requests may be part or all of the requests in the first request. Furthermore, in step 404, the multiple second requests may be sent to the destination in batches according to the request attributes of the multiple second requests.
[0145] The destination refers to the destination of the second request. The destinations of different second requests may be the same or different. In the above distributed storage system, the destination is a storage node other than the storage node where the service process is located.
[0146] The above-mentioned second request is sent to the destination in batches according to the scheduling priority and / or delay sensitivity of the second request, and the requests with high scheduling priority and / or high delay sensitivity can be sent to the destination first, thereby reducing the queuing time of the requests with high scheduling priority and / or high delay sensitivity, and giving priority to ensuring the processing efficiency of the requests with high scheduling priority and / or high delay sensitivity, which helps to improve the service quality.
[0147] In the embodiment of the present application, through a multi-level flow control strategy, bandwidth flow control can be performed on the service process based on the throughput threshold of the service process, so that the network flow sent by the service process does not exceed the throughput threshold of the service process. In this way, flow control is performed on the local end, so that the flow sent by the local end does not occupy all the resources of the local end, thereby avoiding the flow of the local end occupying all the resources of the other end. Afterwards, for the request sent to the secondary flow control, according to the scheduling priority and / or delay sensitivity of the multiple second requests, the multiple second requests are sent to the destination end in batches, and the requests with high scheduling priority and / or high delay sensitivity can be given priority to be sent to the destination end, thereby reducing the queuing time of the requests with high scheduling priority and / or high delay sensitivity, giving priority to ensuring the processing efficiency of the requests with high scheduling priority and / or high delay sensitivity, and helping to improve the quality of service.
[0148] In some embodiments, during the first-level flow control process, the number of second requests read per unit time is multiple, and the multiple second requests may belong to the same service process or to different service processes. Based on the scheduling priority and delay sensitivity of the above-mentioned second request, a storage queue may be set in the computing device where the service process is located to store the second request read from the first request per unit time. In the embodiment of the present application, for the convenience of description and distinction, the above-mentioned storage queue for storing the first request is defined as the first storage queue; and the storage queue used to store the second request here is defined as the second storage queue.
[0149] Among them, there are multiple second storage queues. Multiple means 2 or more. Each of the second storage queues corresponds to a scheduling priority and delay sensitivity. Different second storage queues correspond to different scheduling priorities and / or delay sensitivities. Based on the above-mentioned second storage queues, step 404 can be implemented as: according to the scheduling priorities and delay sensitivities of multiple second requests read within a unit time, multiple second requests are stored in second storage queues adapted to their respective scheduling priorities and delay sensitivities. Furthermore, the scheduling ratio and scheduling order of multiple second storage queues can also be obtained. Among them, the scheduling ratio is used to indicate the number of second requests read from each second storage queue within a unit time.
[0150] In some embodiments, a scheduling ratio (defined as an initial scheduling ratio) may be pre-set for multiple second storage queues, and the initial scheduling ratio may be an empirical value determined by the operation and maintenance personnel of the flow control and management based on prior knowledge. Accordingly, the real-time traffic of the computing device where the service process is located within a unit time may be monitored; if the real-time traffic of the computing device within a unit time meets the set adjustment conditions, the initial scheduling ratio is adjusted to obtain the scheduling ratio of the multiple second storage queues. Accordingly, if the real-time traffic of the computing device within a unit time does not meet the set adjustment conditions, the initial scheduling ratio is used as the scheduling ratio of the multiple second storage queues.
[0151] Among them, the real-time traffic per unit time can be characterized by the amount of data (such as BPS) of the request sent by the computing device per unit time. In the embodiment of the present application, the specific implementation form of the above-mentioned set adjustment conditions is not limited. For example, in some embodiments, the set adjustment conditions can be implemented as follows: if the real-time traffic of the computing device per unit time is greater than the traffic threshold per unit time, then if the real-time traffic of the computing device per unit time is greater than the traffic threshold per unit time, it is determined that the set adjustment conditions are met.
[0152] In other embodiments, the set adjustment condition can be implemented as follows: the real-time traffic of the computing device in a unit time is greater than the traffic threshold in a unit time, and is greater than or equal to the throughput upper limit of the network card of the computing device. Accordingly, if the real-time traffic of the computing device in a unit time is greater than the traffic threshold in a unit time, and is greater than or equal to the throughput upper limit of the network card of the computing device, it is determined that the set adjustment condition is met.
[0153] Furthermore, if the set adjustment conditions are met, the preset initial scheduling ratio can be adjusted. Specifically, the ratio value of the target storage queue in the multiple second storage queues in the initial scheduling ratio can be reduced to the set ratio value. Among them, the target storage queue is the storage queue with the lowest scheduling priority among the multiple second storage queues; further, the target ratio values of the other second storage queues except the target storage queue in the multiple second storage queues can be determined according to the throughput upper limit of the network card and the set ratio value; and the ratio values of the other second storage queues in the initial scheduling ratio can be adjusted to their respective corresponding target ratio values to obtain the scheduling ratio of the multiple second storage queues. Among them, according to the real-time traffic of the computing device in unit time, the scheduling ratio of the requests of each scheduling priority and delay sensitivity is adjusted in time, so that the real-time traffic of the computing device in unit time does not exceed the throughput upper limit of the network card, which helps to ensure the quality of service.
[0154] The above-mentioned scheduling order is used to indicate the sending order of the second requests in multiple second storage queues, and is pre-configured. Since delay-sensitive requests are generally required to be sent in the first few time slices within a unit time, and requests with high scheduling priorities are generally required to be sent within a unit time. Therefore, at the same scheduling priority, requests from storage queues with high delay sensitivity are earlier than requests from storage queues with low delay sensitivity; and at different scheduling priorities, requests with high delay sensitivity are also scheduled first. The requests in the storage queues that are earlier in the scheduling order will be scheduled first.
[0155] Based on the scheduling ratios and scheduling orders of the multiple second storage queues, a corresponding number of second requests can be read from each of the multiple second storage queues according to the scheduling ratios of the multiple second storage queues. Specifically, the number of second requests to be read from each second storage queue can be determined according to the throughput upper limit of the network card of the computing device where the service process is located and the scheduling ratios of the multiple second storage queues, and a corresponding number of second requests can be read from each of the multiple second storage queues.
[0156] Furthermore, the second requests read from the plurality of second storage queues can be sent to the destination in batches according to the scheduling order of the plurality of storage queues. In this way, the real-time flow of the computing device can be ensured not to exceed the throughput limit of the network card, which helps to improve the service quality.
[0157] It should be noted that the execution subject of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 401 and 402 can be device A; for another example, the execution subject of step 401 can be device A, and the execution subject of step 402 can be device B; and so on.
[0158] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations appearing in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this document or may be executed in parallel, and the sequence numbers of the operations, such as 402, 403, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel.
[0159] Accordingly, an embodiment of the present application also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in the above-mentioned traffic management method.
[0160] Figure 5 This is a schematic diagram of the structure of a computing device provided in an embodiment of the present application. Figure 5As shown, the computing device mainly includes: a memory 50a and a processor 50b. The memory 50a is used to store computer programs.
[0161] The processor 50b is coupled to the memory 50a, and is used to execute a computer program for: obtaining a first request generated by a service process and a throughput threshold of the service process; controlling the amount of data of a second request read per unit time to not exceed the throughput threshold according to the amount of data of the first request and the throughput threshold; the second request is multiple, and the multiple second requests are part or all of the requests in the first request; obtaining request attributes of the multiple second requests; the request attributes include: at least one of scheduling priority and delay sensitivity; and sending the multiple second requests to the destination in batches according to the request attributes of the multiple second requests.
[0162] In some embodiments, there are one or more service processes; each service process corresponds to a first storage queue. The processor 50b is further configured to: for any service process A, if the first storage queue corresponding to any service process A is not full, store the first request generated by a service process A in the first storage queue before controlling the data volume of the second request read per unit time to not exceed the throughput threshold according to the data volume of the first request and the throughput threshold.
[0163] Correspondingly, when the processor 50b controls the data amount of the second request read from the first request per unit time not exceeding the throughput threshold based on the data amount of the first request and the throughput threshold, it is specifically used to: read the second request from the first storage queue corresponding to any service process A and start timing, and accumulate the data amount of the second request read during the timing process; if the timing duration has not reached the unit time, and the accumulated total data amount of the second requests reaches the throughput threshold, stop reading the second request from the first storage queue corresponding to the service process A until the timing duration reaches the unit time.
[0164] Furthermore, the processor 50b is also used for: when the timing duration reaches the unit time, continuing to execute the operation of reading the second request from the first storage queue corresponding to any service process A, and restarting the timing.
[0165] Optionally, the processor 50b is further used to: when the first storage queue is full, send a stop instruction to the service process to instruct the service process to stop sending the first request; or, perform packet loss processing on the first request received after the first storage queue is full.
[0166] In some embodiments, there are multiple second requests. The request attributes include: scheduling priority and delay sensitivity. When the processor 50b sends multiple second requests to the destination in batches according to the request attributes of the multiple second requests, it is specifically used to: store the multiple second requests in the second storage queues adapted to their respective scheduling priorities and delay sensitivity according to the scheduling priorities of the multiple second requests and the delay sensitivity of the multiple second requests; there are multiple second storage queues; different second storage queues correspond to different scheduling priorities and / or delay sensitivities; obtain the scheduling ratio and scheduling order of the multiple second storage queues; read the corresponding number of second requests from each of the multiple second storage queues according to the scheduling ratio of the multiple second storage queues; and, according to the scheduling order of the multiple second storage queues, send the second requests read from each of the multiple second storage queues to the destination in batches.
[0167] Optionally, when obtaining the scheduling ratios of multiple second storage queues, the processor 50b is specifically used to: obtain an initial scheduling ratio pre-set for the multiple second storage queues; monitor the real-time traffic of the computing device where the service process is located within a unit time, and if the real-time traffic of the computing device within a unit time meets the set adjustment conditions, adjust the initial scheduling ratio to obtain the scheduling ratios of the multiple second storage queues; if the real-time traffic of the computing device within a unit time does not meet the set adjustment conditions, use the initial scheduling ratio as the scheduling ratio of the multiple second storage queues.
[0168] In some embodiments, the set adjustment condition is that the real-time traffic of the computing device in a unit time is greater than or equal to the throughput limit of the network card of the computing device. Accordingly, when the processor 50b adjusts the initial scheduling ratio to obtain the scheduling ratio of multiple second storage queues, it is specifically used to: reduce the ratio value of the target storage queue in the initial scheduling ratio among the multiple second storage queues to the set ratio value; the target storage queue is the storage queue with the lowest scheduling priority among the multiple second storage queues; according to the throughput limit of the network card and the set ratio value, determine the target ratio values of the other second storage queues in the multiple second storage queues except the target storage queue; and adjust the ratio values of the other second storage queues in the initial scheduling ratio to their respective corresponding target ratio values to obtain the scheduling ratio of the multiple second storage queues.
[0169] In some other embodiments, the processor 50b is further used to determine the scheduling priority of the first request and / or the delay sensitivity of the first request according to the service type provided by the service process and / or the operation information of the first request.
[0170] In some embodiments, the service process includes: a first service process for reading and writing data. Accordingly, when the processor 50b determines the scheduling priority of the first request and / or the delay sensitivity of the first request according to the service type provided by the service process and / or the operation information of the first request, it is specifically used to: determine the scheduling priority of the first request generated by the first service process according to the service type provided by the first service process; determine the delay sensitivity of the first request generated by the first service process according to the operation information of the first request generated by the first service process.
[0171] In some other embodiments, the service process includes: a second service process for log backup. Accordingly, when the processor 50b determines the scheduling priority of the first request and / or the delay sensitivity of the first request according to the service type provided by the service process and / or the operation information of the first request, it is specifically configured to: determine the scheduling priority and delay sensitivity of the first request generated by the second service process according to the service type of the second service process.
[0172] In some other embodiments, the service process includes: a third service process for storage space organization. Accordingly, when the processor 50b determines the scheduling priority of the first request and / or the delay sensitivity of the first request according to the service type provided by the service process and / or the operation information of the first request, it is specifically used to: determine the delay sensitivity of the first request according to the service type provided by the third service process. Further, the processor 50b is also used to: obtain the idle ratio of the storage space of the storage cluster to which the target computing device belongs; the target computing device is the computing device where the service process is located; and determine the scheduling priority of the first request generated by the third service process according to the idle ratio of the storage space.
[0173] Further, when the processor 50b determines the scheduling priority of the first request generated by the third service process based on the free ratio of the storage space, it is specifically used to: if the free ratio of the storage space is less than or equal to the set free ratio threshold, set the scheduling priority of the first request generated by the third service process to the first priority; if the free ratio of the storage space is greater than the set free ratio threshold, set the scheduling priority of the first request generated by the third service process to the second priority; wherein the first priority is higher than the second priority.
[0174] In some optional implementations, the computing device may be implemented as a server and a terminal device, etc. Figure 5 As shown, the computing device may also include: a communication component 50c and a power component 50d and other components. In some embodiments, the computing device may be implemented as a terminal device such as a computer or a mobile phone. Accordingly, the computing device may also include: a display component 50e and an audio component 50f and other components. Figure 5 The components are shown schematically only and do not necessarily include Figure 5 The components shown do not necessarily mean that the computing device can only include Figure 5 Components shown.
[0175] The computing device provided in this embodiment can control the bandwidth flow of the service process based on the throughput threshold of the service process through a multi-level flow control strategy, so that the network flow sent by the service process does not exceed the throughput threshold of the service process. In this way, flow control is performed on the local end, so that the flow sent by the local end does not occupy all the resources of the local end, thereby avoiding the flow of the local end occupying all the resources of the other end. Afterwards, for multiple second requests sent to the secondary flow control, according to the scheduling priorities of the multiple second requests and / or the delay sensitivity of the second requests, the multiple second requests are sent to the destination end in batches, and the requests with high scheduling priority and / or high delay sensitivity can be sent to the destination end first, thereby reducing the queuing time of the requests with high scheduling priority and / or high delay sensitivity, and giving priority to ensuring the processing efficiency of the requests with high scheduling priority and / or high delay sensitivity, which helps to improve the service quality.
[0176] In an embodiment of the present application, the memory is used to store a computer program and can be configured to store various other data to support operations on the device where it is located. Among them, the processor can execute the computer program stored in the memory to implement the corresponding control logic. The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random-Access Memory, SRAM), electrically erasable programmable read only memory (Electrically Erasable Programmable Read Only Memory, EEPROM), erasable programmable read only memory (Electrical Programmable Read Only Memory, EPROM), programmable read only memory (Programmable Read Only Memory, PROM), read only memory (Read Only Memory, ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0177] In the embodiment of the present application, the processor can be any hardware processing device that can execute the logic of the above method. Optionally, the processor can be a central processing unit (CPU), a graphics processing unit (GPU) or a microcontroller unit (MCU); it can also be a field programmable gate array (FPGA), a programmable array logic device (PAL), a general array logic device (GAL), a complex programmable logic device (CPLD) and other programmable devices; or an application specific integrated circuit (ASIC) chip; or an advanced reduced instruction set (RISC) processor (Advanced RISC Machines, ARM) or a system on chip (SoC), etc., but not limited to this.
[0178] In an embodiment of the present application, the communication component is configured to facilitate wired or wireless communication between the device in which it is located and other devices. The device in which the communication component is located can access a wireless network based on a communication standard, such as Wireless Fidelity (WiFi), 2G or 3G, 4G, 5G or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component can also be based on Near Field Communication (NFC) technology, Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology or other technologies.
[0179] In an embodiment of the present application, the display component may include a liquid crystal display (LCD) and a touch panel (TP). If the display component includes a touch panel, the display component may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
[0180] In an embodiment of the present application, a power supply component is configured to provide power to various components of the device in which it is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which the power supply component is located.
[0181] In an embodiment of the present application, the audio component may be configured to output and / or input audio signals. For example, the audio component includes a microphone (Microphone, MIC), and when the device where the audio component is located is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal may be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting an audio signal. For example, for a device with a language interaction function, voice interaction with a user can be achieved through an audio component.
[0182] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0183] It should also be noted that the descriptions such as "first" and "second" in this article are used to distinguish different messages, devices, modules, etc., and do not represent the order of precedence, nor do they limit "first" and "second" to different types.
[0184] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical storage, etc.) that contain computer-usable program code.
[0185] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (or systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0186] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0187] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0188] In a typical configuration, a computing device includes one or more processors (such as a CPU, etc.), an input / output interface, a network interface, and a memory.
[0189] Memory may include non-permanent storage in a computer-readable medium, random-access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0190] The storage medium of a computer is a readable storage medium, which may also be referred to as a readable medium. The readable storage medium includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be a computer-readable instruction, a data structure, a module of a program, 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 technology, CD-ROM, digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device. According to the definition in this article, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0191] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the above elements.
[0192] The above contents are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A traffic management method, characterized in that: include: Obtaining a first request generated by a service process and a throughput threshold of the service process; According to the data volume of the first request and the throughput threshold, controlling the data volume of the second request read per unit time not to exceed the throughput threshold; The second request is multiple; the multiple second requests are part or all of the first request; Obtaining request attributes of the plurality of second requests, wherein the request attributes include at least one of a scheduling priority and a delay sensitivity; The multiple second requests are sent to the destination end in batches according to the request attributes of the multiple second requests.
2. The method according to claim 1, characterized in that The service process is one or more; each of the service processes corresponds to a first storage queue; before the amount of data of the second request read per unit time is controlled not to exceed the throughput threshold according to the amount of data of the first request and the throughput threshold, the method further includes: For any service process, when a first storage queue corresponding to any service process is not a full queue, storing a first request generated by any service process in the first storage queue; The controlling, according to the data volume of the first request and the throughput threshold, that the data volume of the second request read from the first request in a unit time does not exceed the throughput threshold comprises: Reading the second request from the first storage queue corresponding to any one of the service processes and starting timing, and accumulating the amount of data of the second request read during the timing; If the timing duration does not reach the unit time and the accumulated data volume of the second request reaches the throughput threshold, stop reading the second request from the first storage queue corresponding to any service process until the timing duration reaches the unit time.
3. The method according to claim 2, characterized in that Also includes: When the timing duration reaches the unit time, the operation of reading the second request from the first storage queue corresponding to any one of the service processes is continued, and the timing is restarted.
4. The method according to any one of claims 1 to 3, characterized in that The request attributes of the second request include: scheduling priority and delay sensitivity; and sending the second requests to the destination end in batches according to the request attributes of the plurality of second requests includes: According to the scheduling priorities of the plurality of second requests and the delay sensitivity of the plurality of second requests, the plurality of second requests are stored in second storage queues adapted to their respective scheduling priorities and delay sensitivity; there are a plurality of second storage queues; different second storage queues correspond to different scheduling priorities and / or delay sensitivities; Obtaining the scheduling ratios and scheduling orders of the plurality of second storage queues; Reading a corresponding number of second requests from each of the plurality of second storage queues according to the scheduling ratios of the plurality of second storage queues; According to the scheduling order of the multiple second storage queues, the second requests read from each of the multiple second storage queues are sent to the destination in batches.
5. The method according to claim 4, characterized in that Obtaining the scheduling ratios of the plurality of second storage queues includes: Acquire initial scheduling ratios preset for the plurality of second storage queues; Monitoring the real-time traffic of the computing device where the service process is located within a unit time, and if the real-time traffic of the computing device within a unit time satisfies a set adjustment condition, adjusting the initial scheduling ratio to obtain the scheduling ratios of the plurality of second storage queues; If the real-time traffic of the computing device within a unit time does not meet the set adjustment condition, the initial scheduling ratio is used as the scheduling ratio of the multiple second storage queues.
6. The method according to claim 5, characterized in that The set adjustment condition is that the real-time flow of the computing device in a unit time is greater than or equal to the throughput upper limit of the network card of the computing device; The adjusting the initial scheduling ratio to obtain the scheduling ratios of the plurality of second storage queues includes: reducing the proportion value of a target storage queue among the plurality of second storage queues in the initial scheduling proportion to a set proportion value; the target storage queue is the storage queue with the lowest scheduling priority among the plurality of second storage queues; Determining target ratio values of other second storage queues in the plurality of second storage queues except the target storage queue according to the throughput upper limit of the network card and the set ratio value; The proportion values of the other second storage queues in the initial scheduling proportion are adjusted to their respective corresponding target proportion values to obtain the scheduling proportions of the plurality of second storage queues.
7. The method according to claim 1, characterized in that The method further comprises: Determine the scheduling priority of the first request and / or the delay sensitivity of the first request according to the service type provided by the service process and / or the operation information of the first request.
8. The method according to claim 7, characterized in that The service process includes: a first service process for reading and writing data; and determining the scheduling priority of the first request and / or the delay sensitivity of the first request according to the service type provided by the service process and / or the operation information of the first request, including: Determining, according to the service type provided by the first service process, a scheduling priority of a first request generated by the first service process; Determine the delay sensitivity of the first request generated by the first service process according to the operation information of the first request generated by the first service process.
9. The method according to claim 7, characterized in that: The service process includes: a second service process for log backup; and determining the scheduling priority of the first request and / or the delay sensitivity of the first request according to the service type provided by the service process and / or the operation information of the first request, including: According to the service type of the second service process, a scheduling priority and a delay sensitivity of the first request generated by the second service process are determined.
10. The method according to claim 7, characterized in that The service process includes: a third service process for storage space arrangement; and determining the scheduling priority of the first request and / or the delay sensitivity of the first request according to the service type provided by the service process and / or the operation information of the first request, including: Determining a delay sensitivity of the first request according to a service type provided by the third service process; Obtaining the idle ratio of storage space of the storage cluster to which the target computing device belongs; the target computing device is the computing device where the service process is located; The scheduling priority of the first request generated by the third service process is determined according to the idle ratio of the storage space.
11. The method according to claim 10, characterized in that The determining, according to the idle ratio of the storage space, the scheduling priority of the first request generated by the third service process includes: If the idle ratio of the storage space is less than or equal to a set idle ratio threshold, setting the scheduling priority of the first request generated by the third service process to the first priority; If the idle ratio of the storage space is greater than the set idle ratio threshold, setting the scheduling priority of the first request generated by the third service process to the second priority; The first priority is higher than the second priority.
12. A traffic management system, characterized in that: include: Service process and traffic management node; The traffic management node includes: a primary flow control unit and a secondary flow control unit; The service process is used to generate a first request and determine the data volume, scheduling priority and delay sensitivity of the first request; the service process is also used to determine a throughput threshold of the service process; The traffic management node is used to: control the data volume of the second request per unit time not to exceed the throughput threshold according to the data volume of the first request and the throughput threshold of the service process; the second request is multiple; the multiple second requests are part or all of the requests in the first request; and obtain request attributes of the multiple second requests; the request attributes include: at least one of scheduling priority and delay sensitivity; and according to the request attributes of the multiple second requests, send the multiple second requests to the destination in batches.
13. A computing device, characterized in that: include: A memory and a processor; wherein the memory is used to store a computer program; The processor is coupled to the memory and configured to execute the computer program to perform the steps of the method according to any one of claims 1 to 11.
14. A computer-readable storage medium storing computer instructions, characterized in that: When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in the method according to any one of claims 1 to 11.
Citation Information
Cited By
Flow request access method and device, computer equipment, readable storage medium and program product
CN120128553A