Data transmission control method and device, congestion detection and device, server system
By detecting the data transmission status within the server system and controlling the data transmission, the delay and performance degradation caused by network congestion are solved, and more efficient data transmission is achieved.
Patent Information
- Application Number
- CN201911043520.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-30
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2039-10-30
AI Technical Summary
Network congestion in server systems leads to data transmission delay and network performance degradation, and the prior art lacks an effective congestion control mechanism.
The data storage amount of the second device is obtained by the first device in the server system, the data transmission status is determined, and when a congestion state is detected, the data transmission is controlled, including sending a congestion notification and adjusting the transmission rate to avoid congestion.
It effectively avoids data transmission delay and performance degradation due to network congestion, and improves data transmission efficiency and stability in the server system.
Smart Images

Figure CN112751778B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and specifically to a method and device for controlling data transmission in a server system, a method and device for detecting data congestion in a server system, a server system, a computer storage medium, and an electronic device. Background Art
[0002] General-purpose CPUs are encountering increasingly severe performance bottlenecks in big data processing and machine learning. More and more scenarios are beginning to introduce heterogeneous computing units such as GPUs and FPGAs for acceleration.
[0003] The so-called heterogeneous computing refers to the way in which the CPU collaborates with various co-processing computing devices such as GPU, ASIC, FPGA, DSP, etc. that use different types of instruction sets, interconnected through the system interconnection bus to form a hybrid system to perform calculations.
[0004] With the development of heterogeneous computing, more and more components are integrated into server systems, such as Figure 1 As shown in the figure, it includes general-purpose CPU, memory, coprocessor computing devices, network devices (such as network cards), storage devices and other system devices. When the number of interconnected components in the server system increases, the communication between server systems is not limited to the memory and other devices, but also includes peer-to-peer communication between devices, making it very obvious that multiple components occupy the interconnection bandwidth of the server system, which will cause network congestion.
[0005] However, in the current interconnection protocols within server systems, such as the PCIe IO bus, there is only a point-to-point flow control backpressure mechanism, without any congestion control mechanism. Figure 1 As shown in the figure, when multiple devices (such as memory and network card) transmit data to computing device 1, network congestion occurs. Congestion starts from computing device 1 and gradually spreads to the interconnected devices in the entire server system, causing data transmission obstruction and communication delay. What is more serious is that the network congestion in the server system may be further spread to the data center network through the network card, thus causing large-scale network delay and other problems. Summary of the invention
[0006] The present application provides a data transmission control method in a server system to solve the problem of data communication delay caused by network congestion in the prior art.
[0007] The present application provides a method for controlling data transmission in a server system, comprising:
[0008] A first device in the server system obtains a data storage capacity of a data storage area of a second device, wherein the first device is used to forward data transmitted to the second device;
[0009] The first device determines a data transmission status of the second device according to a data storage amount of the second device;
[0010] When the data transmission state is determined to be a congestion state, the first device controls transmission of data.
[0011] In some embodiments, the first device is a first switching device; the second device is an endpoint device or a second switching device; wherein the endpoint device includes a source node device that initiates a data request and a target node device that receives a data request.
[0012] In some embodiments, the first device in the server system obtains the data storage capacity of the data storage area of the second device, including:
[0013] According to the set acquisition condition, the operation of the first device acquiring the data storage capacity of the data storage area of the second device is triggered.
[0014] In some embodiments, the acquisition condition is at least one of the following conditions:
[0015] The fixed time interval conditions for data transmission are set;
[0016] Dynamic time interval conditions for setting data transmission;
[0017] a reception request condition of a data request received by the first device;
[0018] The first device sends a request condition for sending a data request.
[0019] In some embodiments, the first device determines the data transmission status of the second device according to the data storage amount of the second device, including:
[0020] Determine the available storage capacity of the data storage area according to the data storage capacity and the total amount of data sent by the second device;
[0021] Determining a deviation of a current available storage amount according to the available storage amount and a preset storage occupancy amount;
[0022] Determine, based on the current available storage amount and the last determined available storage amount, a change in the last determined available storage amount relative to the current available storage amount;
[0023] The data transmission state is determined according to the deviation and the change.
[0024] In some embodiments, determining the transmission status of the data according to the deviation and the change includes:
[0025] When the sum of the deviation amount and the change amount is greater than zero, determining the determined data transmission state as a congestion state;
[0026] When the sum of the deviation and the change is less than or equal to zero, the determined data transmission state is determined as a smooth state.
[0027] In some embodiments, it also includes:
[0028] When the determined data transmission state is a congestion state, configuring a congestion state level weight;
[0029] The congestion state is classified into congestion levels according to the configured congestion state level weight to obtain a congestion state level.
[0030] In some embodiments, when the determined data transmission state is a congestion state, the first device controls the transmission of the data, including:
[0031] When the data transmission state is determined to be a congestion state, the first device sends a congestion notification to the end side that initiates the data request or to the end side that receives the data request;
[0032] According to the congestion notification, the first device controls transmission of the data.
[0033] In some embodiments, when the data transmission state is determined to be a congestion state, the first device sends a congestion notification to an end side that initiates a data request or to an end side that receives a data request, including:
[0034] When the second device is a target node device and the data transmission state is a congestion state, the first device sends a congestion notification to the connected source node device;
[0035] When the second device is a source node device and the data transmission state is a congestion state, the first device sends a congestion notification to a connected target node device, or sends data carrying the congestion state;
[0036] When the second device is a second switching device and the data transmission state is in a congested state, the first device sends a congestion notification to a source node device that initiates a data request, or the first device sends a congestion notification to a target node device that receives a data request.
[0037] In some embodiments, when the data transmission state is determined to be a congestion state, the first device sends a congestion notification to an end side that initiates a data request or to an end side that receives a data request, including:
[0038] According to the congestion state of data transmission, marking the congestion level of the congestion state;
[0039] The first device controlling the transmission of the data according to the congestion notification includes:
[0040] According to the congestion level, the first device controls the data transmission volume between the source node device and the target node device.
[0041] In some embodiments, the first device controls the amount of data transmission between the source node device and the target node device according to the congestion status level, including:
[0042] controlling a data transmission rate according to the congestion level;
[0043] Converting the transmission rate into the amount of data transmitted within a preset time;
[0044] The data transmission volume between the source node device and the target node device is controlled according to the data volume transmitted within the preset time.
[0045] In some embodiments, controlling the amount of data transmitted between the source node device and the target node device according to the amount of data transmitted within the preset time includes:
[0046] Determine whether the amount of data transmitted within the preset time meets the data transmission requirement, and if not, suspend the transmission.
[0047] In some embodiments, it also includes:
[0048] If the amount of data transmitted within the preset time meets the data transmission requirement, then the data is transmitted.
[0049] In some embodiments, the first device in the server system obtains the data storage capacity of the data storage area of the second device, including:
[0050] The first device in the server system obtains the data cache amount of the data cache area of the second device.
[0051] The present application also provides a data transmission control device in a server system, comprising:
[0052] An acquisition unit, configured for a first device in a server system to acquire a data storage capacity of a data storage area of a second device, wherein the first device is configured to forward data transmitted to the second device;
[0053] A determining unit, configured for the first device to determine a data transmission status of the second device according to a data storage amount of the second device;
[0054] A control unit is used for, when the data transmission state is determined to be a congestion state, for the first device to control the transmission of the data.
[0055] The present application also provides a method for detecting a data transmission status in a server system, comprising:
[0056] Determine the available storage capacity of the first device according to the data storage capacity of the second device data storage area in the server system and the total amount of data sent by the second device;
[0057] Determining a deviation of the available storage amount according to the available storage amount and a preset storage occupancy amount;
[0058] Determining, based on the available storage amount and the last determined available storage amount, a change in the last determined available storage amount relative to the available storage amount;
[0059] The data transmission state is detected according to the deviation amount and the change amount.
[0060] In some embodiments, detecting the data transmission status according to the deviation and the change includes:
[0061] When the sum of the deviation amount and the change amount is greater than zero, the detected data transmission state is determined as a congestion state;
[0062] When the sum of the deviation amount and the change amount is less than or equal to zero, the detected data transmission state is determined to be a smooth state.
[0063] In some embodiments, it also includes:
[0064] When the determined data transmission state is a congestion state, configuring a congestion state level weight;
[0065] The congestion state is classified into congestion levels according to the configured congestion state level weight to obtain a congestion state level.
[0066] In some embodiments, when the determined data transmission state is a congestion state, configuring a congestion state level weight includes:
[0067] A weight for describing the congestion status level is configured for at least one parameter of the deviation and the change.
[0068] The present application also provides a device for detecting a data transmission status in a server system, comprising:
[0069] An available storage capacity determining unit, configured to determine the available storage capacity of the data storage area according to the data storage capacity of the second device data storage area in the server system and the total amount of data sent by the second device;
[0070] a deviation amount determining unit, configured to determine a deviation amount of the available storage amount according to the available storage amount and a preset storage occupancy amount;
[0071] a change amount determining unit, configured to determine, based on the available storage amount and the available storage amount determined last time, a change amount of the available storage amount determined last time relative to the available storage amount;
[0072] The state detection unit is used to detect the data transmission state according to the deviation amount and the change amount.
[0073] The present application also provides a method for controlling data transmission in a server system, comprising:
[0074] The first device determines the data transmission status of the second device according to the storage capacity of the second device;
[0075] If the data transmission state of the second device is determined to be a congested state, marking a congestion level of the congested state;
[0076] According to the congestion level, transmission of data is controlled by the first device.
[0077] In some embodiments, controlling the transmission of data by the first device according to the congestion level includes:
[0078] According to the congestion level, the first device controls the amount of data transmission.
[0079] In some embodiments, the first device controls the amount of data transmission between the source node device and the target node device according to the congestion level, including:
[0080] controlling a data transmission rate according to the congestion level;
[0081] Converting the transmission rate into the amount of data transmitted within a preset time;
[0082] The amount of data transmitted is controlled according to the amount of data transmitted within the preset time.
[0083] In some embodiments, controlling the amount of data transmitted between the source node device and the target node device according to the amount of data transmitted within the preset time includes:
[0084] Determine whether the amount of data transmitted within the preset time meets the data transmission requirement, and if not, suspend the transmission.
[0085] In some embodiments, it also includes:
[0086] If the amount of data transmitted within the preset time meets the data transmission requirement, the data is transmitted.
[0087] The present application also provides a control device for data transmission in a server system, comprising:
[0088] A determination unit, configured for the first device to obtain a data transmission status of the second device;
[0089] a marking unit, configured to mark a congestion level of the congestion state when the data transmission state of the second device is determined to be a congestion state;
[0090] A control unit is used to control the transmission of data through the first device according to the congestion level.
[0091] The application also provides a server system, including:
[0092] a first device and a second device;
[0093] The first device in the server system is used to obtain the data storage capacity of the data storage area of the second device, wherein the first device is used to forward data transmitted to the second device; the first device determines the data transmission status of the second device according to the data storage capacity of the second device; when the data transmission status is determined to be a congested state, the first device controls the transmission of data.
[0094] In some embodiments, the first device is a first switching device; the second device is an endpoint device or a second switching device;
[0095] The first switching device includes a port module and an internal switching module for connecting to the second device, the port module includes a receiving submodule for receiving data and a sending submodule for sending data, as well as a congestion measurement submodule for detecting the data transmission status of the second device and a congestion control submodule for controlling the data transmission when the data transmission status is a congested state; the endpoint device includes at least one of a source node device that initiates a data request and a target node device that receives a data request.
[0096] The present application also provides a computer storage medium for storing a program;
[0097] When the program is read and executed, it can execute the data transmission control method within the server system as described above, or execute the data transmission status detection method within the server system as described above, or execute the data transmission control method within the server system as described above.
[0098] The present application also provides an electronic device, including:
[0099] processor;
[0100] A memory for storing a program, which, when read and executed by the processor, enables the electronic device to execute the data transmission control method within the server system as described above, or the data congestion detection method within the server system as described above, or the data transmission congestion control method within the server system as described above.
[0101] Compared with the prior art, this application has the following advantages:
[0102] The present application provides a method for controlling data transmission in a server system, comprising: a first device in the server system obtains the data storage capacity of a data storage area of a second device, wherein the first device is used to forward data transmitted to the second device; the first device determines the data transmission state of the second device according to the data storage capacity of the second device; when the data transmission state is determined to be a congested state, the first device controls the transmission of the data; so that when the data transmission is in a congested state, the data transmission can be controlled by the first device, thereby avoiding communication delays and network performance degradation caused by congestion.
[0103] The present application also provides a method for detecting the data transmission status in a server system, comprising: determining the available storage capacity of the data storage area according to the data storage capacity of a first device in the server system and the total amount of data sent by the second device; determining the deviation of the available storage capacity according to the available storage capacity and a preset storage occupancy; determining the change of the available storage capacity relative to the available storage capacity determined last time according to the available storage capacity and the available storage capacity determined last time; detecting the congestion status of the data transmission according to the deviation and the change; thereby, the data transmission status in the server system can be detected to determine whether there is data transmission congestion, thereby avoiding communication delays and network performance degradation caused by data transmission congestion.
[0104] The present application also provides a method for controlling data transmission in a server system, comprising: a first device obtains a data transmission status of a second device, and when the data transmission status of the second device is determined to be a congested state, marks the congestion level of the congested state; and according to the congestion level, controls the transmission of data through the first device. Thus, the transmission of the data can be controlled according to the congestion level, avoiding the problem of data transmission delay and network performance degradation caused by the congested state. BRIEF DESCRIPTION OF THE DRAWINGS
[0105] Figure 1 It is a schematic diagram of the structure of the server system interconnection network;
[0106] Figure 2 It is a flow chart of an embodiment of a data transmission control method in a server system provided by the present application;
[0107] Figure 3 It is a structural schematic diagram of an embodiment of a data transmission control device in a server system provided by the present application;
[0108] Figure 4 It is a flow chart of an embodiment of a method for detecting data transmission status in a server system provided by the present application;
[0109] Figure 5 It is a structural schematic diagram of an embodiment of a detection device for data status in a server system provided by the present application;
[0110] Figure 6 It is a flow chart of an embodiment of a method for controlling data transmission in a server system provided by the present application;
[0111] Figure 7 It is a structural schematic diagram of an embodiment of a control device for data transmission in a server system provided by the present application;
[0112] Figure 8 It is a structural diagram of a first embodiment of a server system provided by the present application;
[0113] Fig. 9 It is a structural diagram of a second embodiment of a server system provided by the present application;
[0114] Fig.10 It is a structural schematic diagram of a port module in a switching device provided by the present application. DETAILED DESCRIPTION
[0115] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.
[0116] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The descriptions used in this application and the appended claims, such as "a", "first", and "second", are not limitations on quantity or sequence, but are used to distinguish the same type of information from each other.
[0117] Please refer to Figure 2 As shown, Figure 2 1 is a flow chart of an embodiment of a method for controlling data transmission in a server system provided by the present application, the control method comprising:
[0118] Step S201: A first device in a server system obtains a storage capacity of a data storage area of a second device, wherein the first device is used to forward data transmitted to the second device.
[0119] Before describing step S201, concepts such as the first device and the second device of this embodiment are described first.
[0120] In this embodiment, the server system can be understood as a network interconnected server system, which can include an endpoint device and a first switching device, which are interconnected through a system interconnection bus. The system interconnection bus can be a communication bus used to interconnect various devices in the server system. The system interconnection bus in this embodiment is PCIE, and of course includes other third-party buses, such as CCIX, OpenCAPI, GenZ, etc.
[0121] In this embodiment, the first switching device can be determined as the first device, and the endpoint device can be determined as the second device. Of course, the second device can also be other switching devices other than the first switching device, that is, the second switching device. Specifically, the first device can be the first switching device, the second device can be the endpoint device, and the second device can also be the second switching device and the endpoint device. Among them, the endpoint device can include a source node device and a target node device. The source node device can refer to a device that initiates a data request. The so-called initiating data request can be, for example, a request to write data or a request to read back data. The target node device can refer to a device that receives a data request. The so-called receiving a data request can be, for example, receiving write data or returning read data, etc., and sending and receiving are corresponding operation relationships. The endpoint device can be any one or more of a computing device, a storage device, a network card device, and a coprocessor computing device.
[0122] The data request, based on PCIe, may include two types of requests, namely: Post request and Non-Post request, wherein a Post request is a source node device sending a request data packet to a target node device without requiring a return, such as a memory write request; a Non-Post request is a source node device first sending a request data packet to a target node device, and after the target node device receives the request data packet, it returns a completed Cpl packet to the source node device, such as a memory read request.
[0123] In this embodiment, the first switching device has multiple port modules and internal switching modules, each port module can be connected to a different second device, when the second device is a second switching device, the second switching device can be another switching device with some or all of the same functions as the first switching device, for example: data exchange function. The endpoint device can also include a port module, the connection between the first device and the second device can be the connection between the port module of the endpoint device and the port module of the first switching device or the connection between the port module of the first switching device and the port module of the second switching device, that is: the connection between the two devices mainly refers to the connection between the devices through the corresponding port modules.
[0124] The port module of the first switching device includes a receiving submodule for receiving data and a sending submodule for sending data, as well as a congestion measurement submodule for detecting the data transmission state of the second device and a congestion control submodule for controlling the data transmission when the data transmission state is a congested state. The congestion measurement submodule and the congestion control submodule will be specifically described in the process of determining the data transmission state. This part mainly describes the receiving submodule and the sending submodule. The data storage area matched with the receiving submodule is a receiving storage area, and the receiving storage area can be a buffer area and can include multiple. In this embodiment, the receiving buffer area can be cached according to the data type, for example, according to the data type of NPH (non-post header, data packet header of non-post request transaction), NPD (non-post data, data packet payload of non-post request transaction), PH (post header, data packet header of post request transaction), PD (post data, data packet payload of post request transaction), CplH (completion header, data packet header of return transaction) and CplD (completion Data, data packet payload of return transaction), they can be cached in the corresponding buffer area respectively, so as to realize classified cache. The data storage area matching the sending submodule is the sending storage area. Of course, the storage area can also be a buffer area. The data type of the sending storage area corresponds to the data type of the receiving storage area.
[0125] In this embodiment, the first switching device has multiple port modules. When there are multiple second devices, the port modules of each second device are connected to the port modules in the first switching device in a one-to-one correspondence. When the second device is a second switching device, it can have the same or different port modules as the first switching device; when the second device is an endpoint device, the port module includes a receiving submodule and a sending submodule.
[0126] The receiving submodule in the port module of the first switching device can be used to receive data from a second device connected to the first switching device through the port module; the sending submodule in the port module of the first switching device can be used to send data to the second device connected to the first switching device through the port module.
[0127] When the second device is a source node device and a target node device, the receiving submodule in the port module of the first switching device connected to the source node device can be used to receive data from the source node device, and the sending submodule can be used to send data to the source node device; the receiving submodule in the port module of the first switching device connected to the target node device can receive data returned by the target node device, and the sending submodule can send the returned data to the target node device.
[0128] When the second device is a second switching device, a source node device, and a target node device, the receiving submodule in the port module of the first switching device can be used to receive data from the second switching device, and the sending submodule can be used to send data to the second switching device.
[0129] It should be noted that when the second device is the second switching device, the data source can be the sending end of the data request (source node device) and the receiving end of the data request (target node device). Since the focus of this embodiment is on the monitoring of the data flow of the second device by the first switching device, the next layer of devices connected to the second switching device will not be described in detail. The next layer of devices can be source node devices and target node devices. Similarly, when the second device is an endpoint device, the focus of this embodiment is on the monitoring of data transmission between the first switching device and the target node device and the monitoring of data transmission between the first switching device and the source node device; or the monitoring of data transmission between the first switching device and the target node device; or the monitoring of data transmission between the first switching device and the source node device.
[0130] The internal switching module in the first switching device may perform data scheduling based on at least two port modules.
[0131] In this embodiment, the port module connected to the endpoint device may also be marked as an endpoint port.
[0132] The introduction to the port module of the first switching device is only a brief description, which will be described in detail later when the structure of the first switching device is described.
[0133] The specific implementation process of step S201 may include:
[0134] Step S201 - 11 : triggering the first device to obtain the current data cache amount of the data cache area of the second device according to the set acquisition condition.
[0135] In step S201-11, the acquisition condition may be a fixed time interval condition for data transmission, a dynamic time interval condition for data transmission, a receiving request condition based on a data request received by the second device, or a sending request condition based on a data request sent by the first device, etc. as the acquisition condition.
[0136] Based on step S201-11, when the time of data transmission meets the set fixed time interval condition, the operation of the first device obtaining the current data cache amount of the data cache area of the second device is triggered; when the time of data transmission meets the dynamic time interval condition, the operation of the first device obtaining the current data cache amount of the data cache area of the second device is triggered; when the second device receives a data request, the operation of the first device obtaining the current data cache amount of the data cache area of the second device is triggered; when the first device sends a data request, the operation of the first device obtaining the current data cache amount of the data cache area of the second device is triggered.
[0137] In this embodiment, the purpose of step S201-11 is to trigger the timing of obtaining the current data cache amount of the data cache area of the second device. The triggering timing can be set according to different data transmission scenarios or requirements, and is not limited to the above examples.
[0138] In this embodiment, when obtaining the current available buffer capacity of the receiving buffer area, the current available buffer capacity of the receiving buffer area corresponding to the data type in the second device may be obtained according to the data type of the transmission data.
[0139] In step S201-11, since the two devices are point-to-point connected inside the server system, a point-to-point flow control mechanism can be used to obtain the current available buffer size of the receiving buffer, and since the two devices are point-to-point connected inside the server system, the point-to-point flow control mechanism is more reliable. Taking PCIe interconnection as an example, the so-called PCI-Express (peripheral component interconnect express) is a high-speed serial computer expansion bus standard, which is a communication bus used to interconnect various devices in the server system. PCIe uses Credit-based absolute flow control to achieve point-to-point flow control. In this embodiment, the PCIe bus is used as an example. In fact, buses such as CCIX, OpenCAPI, and GenZ can also be used.
[0140] In this embodiment, data requests based on PCIe may include two types of requests, namely, post requests and non-post requests, wherein a post request is a request data packet sent by the source node device to the target node device without a return; a non-post request is a request data packet sent by the source node device to the target node device first, and after the target node device receives the request data packet, it returns a completed cpl packet to the source node device. Therefore, obtaining the current data cache amount of the data cache area may include two methods:
[0141] The first method is to obtain the current data cache amount of the data cache area of the source node device port module connected to the first device;
[0142] The second method is to obtain the current data cache amount of the data cache area of the port module of the target node device connected to the second device.
[0143] The purpose of the first type is that when the first device sends data to the second device, the data buffer area in the port module connected to the target node device (or the second switching device) in the first switching device can represent the data volume of the received request data of the target node device (or the second switching device); the purpose of the second type is that when the target node device (or the second switching device) returns data to the source node device (or the first switching device), the data buffer area in the port module connected to the source node device (or the second switching device) in the first switching device can represent the data volume of the received return data of the source node device (or the second switching device).
[0144] Step S202: the first device determines a data transmission status of the second device according to the data storage capacity of the second device.
[0145] The purpose of step S202 is to obtain the data transmission status of the second device through the data storage capacity of the second device.
[0146] Based on the description in the above step S201, it can be known that in the step S202, when the second device is an endpoint device, the data transmission state in the step S202 may include: at least one of the transmission state when the source node device transmits data to the target node device, and the transmission state when the target node device returns data to the source node device. If the second device is a second switching device, the data transmission state may include the transmission state when the second switching device receives data, or the transmission state when the first switching device receives returned data.
[0147] In this embodiment, the transmission status may include two types of status information, namely, a congestion status and a smooth status.
[0148] In this embodiment, the data storage capacity in step S101 may be the current data cache capacity, and the current available data cache capacity may be used as one of the reference data for judging the data transmission status. Of course, it is understandable that the current data cache capacity may also be used as one of the reference data for judging the data transmission status with the current unavailable data cache capacity.
[0149] The specific implementation process of step S202 may be:
[0150] Step S202-1: Determine the current available buffer capacity of the data buffer area according to the current data buffer capacity and the total amount of data sent by the second device.
[0151] Using the PCIe interconnection as an example, during initialization, the receiving submodule of the port module of the second device sends the size C of its receiving buffer to the port module of the first device connected to the other end of the link. init During data transmission, the receiving submodule of the first device port module records a limit score based on the amount of buffer data (in units of Credit) that has been processed since initialization, namely: Limit Credits (in order to simplify the description, C is used below). limit ), and continuously connect the second device port module to the other end of the link to update the C limit , so that the total amount of data sent by the sending submodule in the second device port module from the initialization cannot exceed the C limit . The C limit Describes the initialization receive buffer size C init The sending submodule of the first device port maintains a series of sending-related flow control counters FC Counters, including the total amount of data that has been sent by the first device port Consumed_Credits (in order to simplify the description, C is used below). consumed Indicates), the total amount of data C that has been sent consumed and the total amount of data that can be sent C limit The relationship between the first device and the second device is controlled so that the data sent by the first device will not exceed the processing capacity of the second device. This mechanism enables the sending port of the first device to check the available receiving buffer size of the receiving port of the second device in advance, that is, the buffer capacity of the receiving buffer. The current available buffer capacity of the receiving buffer is Available_Credits (hereinafter referred to as C in order to simplify the description). avail The specific formula can be used to determine:
[0152] C avail =C limit –Cconsumed ;
[0153] Among them, the C avail Indicates the current available cache size of the second device, the C limit Indicates the total amount of data that can be sent by the first device from the beginning of initialization; consumed Indicates the total amount of data that the sender has sent since initialization. If the available buffer size of the second device is ≤ 0, it means that there is no available buffer size. Of course, a threshold value can also be set, below which there is no available buffer size.
[0154] It should be noted that the current available buffer size can determine the current available buffer size of the receiving buffer of the corresponding data type of the second device according to the data type, so that the data transmission status can be determined according to the data type. For example: if the data type sent during measurement is NP type, the available buffer size of the receiving buffer corresponding to NPH (non-post header, data packet header of non-post request transaction) and NPD (non-post data, data packet payload of non-post request transaction) is determined; if the data type sent during measurement is CPL type, the available buffer size of the receiving buffer corresponding to CplH and CplD is determined.
[0155] Step S202-2: Determine the deviation of the current available cache amount according to the current available cache amount and the preset cache available amount.
[0156] The current available cache volume C avail It can be obtained through the above step S201.
[0157] The preset cache available amount C eq It can be understood as the expected available size for the data buffer area. For example, a value expected to occupy the data buffer area can be preset according to the currently transmitted data. Furthermore, the expected available size can be preset according to different data types.
[0158] Therefore, the available buffer offset in step S202-1 can be determined by the following formula:
[0159] C off =C avail –C eq ;
[0160] Among them, the C avail Indicates the current available cache amount; the C eq Indicates the preset available amount of cache. off Expressed as the available cache offset, C offReflects the current status of the available receive buffer area relative to the expected available buffer area size.
[0161] Step S202-3: Determine, based on the current available cache amount and the available cache amount determined last time, a change amount of the available cache amount determined last time relative to the current available cache amount.
[0162] The last determined available cache amount in step S202-3 may be the previous time relative to the time when the current available cache amount is calculated, for example, the current available cache amount is calculated at time T1 and the previous time T0. Of course, the current available cache amount may also be calculated and determined at a non-previous time.
[0163] In this embodiment, the available cache change amount can be specifically determined by the following formula:
[0164] C delta =C avail –C avail ';
[0165] Among them, the C avail Indicates the current available cache amount; the C avail ' represents the available cache amount determined last time, that is, the historical available cache amount, which may be the available cache amount result determined last time adjacent to the current available cache amount. delta The available cache change reflects the difference in the dequeue and enqueue rates of the receiving cache area during the two determinations of the available cache amount, that is, when C delta >0, indicating that the dequeue rate is less than the enqueue rate, and the network tends to be congested. delta ≤0, indicating that the dequeue rate is greater than or equal to the enqueue rate, and the network tends to be smooth.
[0166] Step S202-4: Detecting a congestion state of data transmission according to the deviation and the change.
[0167] The specific implementation of step S202-4 can be implemented using the following formula:
[0168] P=C off +C delta
[0169] Among them, P>0 indicates that the receiving buffer area of the data type of the second device is in a congested state; P≤0 indicates that the receiving buffer area of the data type of the second device is in a non-congested state.
[0170] Step S202-5: Determine a data transmission state according to the congestion state.
[0171] Based on the result obtained in step S202-4 above, step S202-5 may include:
[0172] Step S202-51: when the sum of the deviation amount and the change amount is greater than zero, determining the detected data transmission state as a congestion state;
[0173] The step S202-51 may be specifically understood as: when the sum of the deviation and the change is greater than zero, the receiving buffer area of the data type of the second device is determined to be in a congested state.
[0174] Step S202-52: When the sum of the deviation amount and the change amount is less than or equal to zero, the detected data transmission state is determined as a smooth state.
[0175] The step S202-52 may be specifically understood as: when the sum of the deviation and the change is less than or equal to zero, the receiving buffer area of the data type of the second device is determined to be in a smooth state.
[0176] Based on the above, it can also include:
[0177] Step S202-a1: When the determined data transmission state is a congestion state, configure a congestion state level weight.
[0178] The formula of step S202-4 above can also be expressed as:
[0179] P=C off +w·C delta
[0180] Among them, w represents when calculating the network congestion status, C delta The weight can be configured by configuring the weight of the cache deviation, or configuring the change in the available cache, or configuring the cache deviation and the change in the available cache. The above formula is only a representation of an implementation method and does not limit the setting method of the weight.
[0181] Step S202-a2: classifying the congestion state into congestion levels according to the configured congestion state level weights to obtain congestion state levels.
[0182] In this embodiment, P can be converted into a congestion level F that can be represented by a limited number of bits. b ; otherwise, it is set to non-congested state. The following formula quantifies the congestion level into the range of 6 bits, that is, [0, 63]:
[0183] F b =64·P / ((w+1)·C init –(Cinit- C eq ))
[0184] It should be noted that, because the second device includes cache areas of different data types, the congestion status of the second device can also be classified and marked according to different cache types.
[0185] From the above content, it can be known that when the determined data transmission state is a congestion state, a congestion state level weight is configured, and the congestion state is classified into congestion levels according to the configured congestion state level weight to obtain a congestion state level.
[0186] Step S203: When the data transmission state is determined to be a congestion state, the first device controls data transmission.
[0187] The purpose of step S203 is: when the data transmission is in a congested state, the data sent by the source node device to the target node device will be controlled by the port module of the first switching device connected to the target node device to stop the sending operation. After the available cache amount in the data cache area of the port module reaches the sending requirement, the port module releases the stop control and sends data to the target network node; or, the return data sent by the target node device to the source node device will be controlled by the port module of the first switching device connected to the source node device to stop the sending operation. After the available cache amount in the data cache area of the port module reaches the sending requirement, the port module releases the stop control and sends the returned data to the source target network node.
[0188] The following is a description of the specific implementation process of the first device controlling the data transmission between the second device when it is determined in step S203 that the data transmission state is a congested state:
[0189] First of all, it should be noted that the following content is described with the first device being the first switching device and the second device being the endpoint device, that is, the source node device and the target node device as an example. When the second device is the second switching device, the data can be transmitted from the end side that initiates the data request to the end side that receives the data request, and the data is forwarded to the second switching device through the first switching device, and is transmitted to the end side that initiates the data request or the end side that receives the data request through the second switching device, wherein the end side that initiates the data request can be understood as the source node device, and the end side that receives the data request can be understood as the target node device.
[0190] Step S203 - 1 : when the data transmission state is determined to be a congestion state, a congestion notification is sent to the second device through the first device.
[0191] The specific implementation process of step S203-1 may be as follows:
[0192] When the second device is a target node device and a source node device, then after the first switching device in the server system measures, when it is determined that the target node device state is a congested state, the first switching device may send a congestion notification to the source node device that sends data during the measurement, and the congestion notification may carry a notification congestion level F. b Congestion notification can also be a separate notification congestion level F b When it is determined that the source node device state is a congested state, the first switching device may send a congestion notification to the target node device receiving data during measurement, and the congestion notification may carry a notification congestion level F b Congestion notification can also be a separate notification congestion level F b The congestion notification sent to the target node device may be a notification of return data sent by the target node device to the source node device.
[0193] When the second device is a second switching device, then after the first switching device in the server system measures, it can be determined that the state of the second switching device is a congested state, and the first switching device sends a congestion notification to the end side that sends the data request or the end side that receives the data during the measurement, or sends a congestion notification to the end side that sends the data request or the end side that receives the data. Similarly, the congestion notification may carry a notification congestion level F. b Congestion notification can also be a separate notification congestion level F b .
[0194] The sending or returning process may be: when the port module of the first switching device connected to the target node device determines that the data cache area of the target node device is congested, the sending submodule in the port module sends a congestion notification to the source node device; when the port module of the first switching device connected to the source node device determines that the data cache area of the source node device is congested, the sending submodule in the port module sends a congestion notification to the target node device, and the congestion notification may be a notification for returned data.
[0195] If the data packet to be sent is a non-CplD packet (such as a P / NP request packet), the source node device is the endpoint device that initiates the request; if the data packet to be sent is a CplD, the source node device is the destination endpoint device of the CplD packet, that is, the endpoint device that initiates the NP packet requesting the CplD;
[0196] In one embodiment, if the first device measures congestion when sending a CplD packet, it sets the congestion level F to b It is carried in the CplD data packet and sent to the source node device; if congestion is measured when sending non-CplD data packets, the congestion level F bEncapsulate a congestion notification packet and send it back to the source node device. Therefore, the step S203-1 may include:
[0197] Step S203-11: When the second device is a target node device and the data transmission status is a congested state, a congestion notification is sent to the connected source node device through the first switching device; or, data carrying the congestion status is returned to the connected source node device through the first switching device; when the data transmission status of the source node device in the second device is a congested state, a congestion notification is sent to the connected target node device through the first switching device; or, data carrying the congestion status is returned to the connected target node device through the first switching device.
[0198] The specific implementation process of step S203-11 may be:
[0199] The port module of the first switching device connected to the source node device receives the notification information of the congestion notification, parses the information and other operations, determines the data transmission status of the source node device according to the congestion level obtained after the analysis, and performs congestion control on the data transmission between the source node device and the target node device.
[0200] The congestion control is controlled by a port module of a first switching device connected to an endpoint device (source node device or target node device). When the port module of the first switching device sends a data packet, it checks the sent data packet. If the sent data packet is a data packet with a congestion mark (such as Cpl) or a congestion notification packet, and itself is marked as an endpoint port module (that is, the port module of the first switching device is directly connected to the port module of the source node device, or directly connected to the port module of the target node device, or at least two port modules of the first switching device are directly connected to the port module of the source node device, and directly connected to the port module of the target node device respectively), then the congestion information in the data packet is extracted, and the data packet carrying the congestion mark is processed, for example: the congestion notification packet is discarded; the port module that receives the congestion notification performs congestion control when its receiving module forwards the data packet; when the first switching device is a port module of a non-endpoint device (that is, the first switching device is connected to the second switching device), all data packets in the sending buffer area can be forwarded normally, the second switching device extracts the congestion information, and processes the data packet carrying the congestion mark, or the first switching device can still extract the congestion information and process the data packet carrying the congestion mark.
[0201] Since congestion exists at different levels, data transmission can be controlled according to different congestion levels, so step S203-1 may further include:
[0202] According to the congestion state of data transmission, a congestion level of the congestion state is marked.
[0203] Based on the above congestion notification, step S203 - 2 is executed.
[0204] The step S203 - 2 : according to the congestion notification, the first device controls the transmission of the data.
[0205] The specific implementation process of step S203-2 is as follows:
[0206] The sending module of the port module of the first switching device connected to the source node device checks the sent data packet, and if a data packet carrying a congestion mark or a congestion notification packet is detected, the congestion notification information is extracted for analysis.
[0207] After the first switching device that measures the congestion state sends a congestion notification to the source node device, the port module of the first switching device connected to the source node device checks and extracts the congestion notification information, and parses the congestion level F carried in the congestion notification information. b And the data flow information to which the congestion notification information belongs (such as <source ID, destination ID> is called a flow), marking that the current data flow is in a congested state.
[0208] The specific marking process can be:
[0209] The port module of the first switching device is provided with a congestion status bit and a non-congestion status counter for each forwarded data flow. If the congestion notification information is extracted, the congestion status bit of the data flow is marked as 1, and the corresponding non-congestion status counter is reset; if a non-congestion status counter times out, the congestion status bit of the corresponding data flow is marked as non-congestion status.
[0210] The specific implementation process of step S203-2 may be: according to the congestion level, the first device controls the data transmission volume between the source node device and the target node device. Therefore, step S203-2 may also include:
[0211] Step S203-21: controlling the data transmission rate according to the congestion level;
[0212] Step S203-22: converting the transmission rate into the amount of data transmitted within a preset time;
[0213] Step S203-23: Control the data transmission volume between the source node device and the target node device according to the data transmission volume within the preset time.
[0214] The specific implementation process of the above steps S203-21 to S203-23 can be understood as: according to the received congestion level, the amount of data that can be sent between the source node device and the target node device within the preset time is controlled, and the forwarding control counter is started; when the data flow is in a congested state, the forwarding control counter is periodically updated to the total amount of data that can be sent within the preset time slice, and the sending rate of the data packet is controlled by controlling the amount of data allowed to be sent within the preset time slice. There can be multiple ways to control data transmission between the specific source node device and the target node device. In this embodiment, it can be controlled by the transmission rate, the amount of data transmitted, etc. For example: the receiving module in the port module of the first switching device controls the forwarding of the data packet according to the congestion state and the forwarding control counter. Specifically, when the receiving module in the port module of the first switching device forwards the data packet, it is determined according to the congestion state of the corresponding flow of the data packet. If the data packet is in a congested state for the congested data flow, and the total amount of data represented by the corresponding forwarding control counter is sufficient to send the data packet, the data packet is forwarded, otherwise the forwarding is suspended until the next time slice for sending data arrives; if the data packet is in a non-congested state for the congested data flow, the data packet is directly sent. Therefore, the step S203-23 can be summarized as determining whether the amount of data transmitted within the preset time meets the data transmission requirement, and if not, suspending the transmission. The data transmission requirement can be a preset time requirement for data transmission, etc.
[0215] The above is a detailed description of an embodiment of a method for controlling data transmission in a server system provided by the present application. Corresponding to the embodiment of a method for controlling data transmission in a server system provided above, the present application also discloses an embodiment of a device for controlling data transmission in a server system. Figure 3 Since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described below is only illustrative.
[0216] like Figure 3 As shown, Figure 3 1 is a schematic diagram of a structure of an embodiment of a data transmission control device in a server system provided by the present application, wherein the control device comprises:
[0217] An acquiring unit 301 is used for a first device in a server system to acquire a data storage capacity of a data storage area of a second device, wherein the first device is used to forward data transmitted to the second device.
[0218] The acquisition unit 301 includes:
[0219] The acquisition trigger subunit is used to trigger the first device to acquire the current data cache amount of the data cache area of the second device according to the set acquisition condition.
[0220] The acquisition unit 301 is specifically used for the first device in the server system to acquire the current data cache capacity of the data cache area of the second device, and the data cache area is used to cache data sent by the first device in the server system to the second device in the server system; or, the first device in the server system acquires the current data cache capacity of the data cache area of the second device, and the data cache area is used to cache return data sent by the second device in the server system to the first device in the server system.
[0221] The determining unit 302 is configured to determine, by the first device, a data transmission status of the second device according to a data storage amount of the second device.
[0222] The determining unit 302 includes:
[0223] The first determining subunit is used to determine the available storage capacity of the data storage area according to the data storage capacity and the total amount of data sent by the second device.
[0224] The second determining subunit is used to determine a deviation of the available storage amount according to the available storage amount and a preset storage available amount.
[0225] The third determining subunit is used to determine, based on the available storage amount and the available storage amount determined last time, a change amount of the available storage amount relative to the available storage amount determined last time.
[0226] The fourth determining subunit is used to detect a congestion state of data transmission according to the deviation and the change.
[0227] A fifth determining subunit is configured to determine a data transmission state according to the congestion state.
[0228] The fourth determining subunit can be implemented by using the following formula:
[0229] P=C off +C delta
[0230] Among them, P>0, it means that the receiving buffer area of the data type of the second device is in a congested state; P≤0, it means that the receiving buffer area of the data type of the second device is in a non-congested state;.
[0231] Based on the result obtained in the fourth determining subunit, the following may be included:
[0232] When the sum of the deviation and the change is greater than zero, the data transmission state is determined as a congestion state;
[0233] When the sum of the deviation and the change is greater than zero, the receiving buffer area of the data type of the second device is determined to be in a congested state.
[0234] When the sum of the deviation and the change is less than or equal to zero, the data transmission state is determined to be a smooth state.
[0235] When the sum of the deviation and the change is less than or equal to zero, the receiving buffer area of the data type of the second device is determined to be in a smooth state.
[0236] Based on the above content, the determining unit 302 may further include: a weight configuration subunit and a level division subunit.
[0237] Weight configuration subunit: configured to configure the congestion state level weight when the determined data transmission state is a congestion state.
[0238] The formula of the fourth determination subunit can also be expressed as:
[0239] P=C off +w·C delta
[0240] Among them, w represents when calculating the network congestion status, C delta The weight can be configured by configuring the weight of the cache deviation, or configuring the change in the available cache; or configuring the cache deviation and the change in the available cache together. The above formula is only a representation of an implementation method and does not limit the setting method of the weight.
[0241] The level classification subunit: classifies the congestion state into congestion levels according to the configured congestion state level weights to obtain congestion state levels.
[0242] In this embodiment, P can be converted into a congestion level F that can be represented by a limited number of bits. b ; otherwise, it is set to non-congested state. The following formula quantifies the congestion level into the range of 6 bits, that is, [0, 63]:
[0243] F b =64·P / ((w+1)·C init –(C init- C eq ))
[0244] It should be noted that, because the second device includes cache areas of different data types, the congestion status of the second device can also be classified and marked according to different cache types.
[0245] The meanings of the letters in the above formula can be referred to the explanations in the above method steps and will not be repeated here.
[0246] From the above content, it can be known that when the determined data transmission state is a congestion state, a congestion state level weight is configured, and the congestion state is classified into congestion levels according to the configured congestion state level weight to obtain a congestion state level.
[0247] The above content is only an overview, and for specific content, please refer to the steps of the above method.
[0248] Control unit 303: configured to, when the data transmission state is determined to be a congested state, control the transmission of the data by the first device.
[0249] The control unit 303 includes:
[0250] The notification sending subunit is used to send a congestion notification to the second device through the first device when the data transmission state is determined to be a congestion state. For details, please refer to the above step S203-1, which will not be repeated here.
[0251] The control subunit is configured to control the data transmission between the first device and the second device according to the congestion notification. For details, please refer to the above step S203-2, which will not be described in detail here.
[0252] The above is a description of an embodiment of a data transmission control device in a server system provided by the present application. For details, please refer to the description of an embodiment of a data transmission control method in a server system provided by the present application. No further details will be given here.
[0253] Based on the above content, this application also provides a method for detecting data congestion in a server system. Please refer to Figure 4 As shown, Figure 4 1 is a flow chart of an embodiment of a method for detecting data transmission status in a server system provided by the present application. The congestion detection method includes:
[0254] Step S401: Determine the available storage capacity of the data storage area according to the data storage capacity of the second device data storage area in the server system and the total amount of data sent by the second device.
[0255] The specific implementation process of step S401 can refer to the above step S202-1, which will not be repeated here.
[0256] Step S402: Determine the deviation of the available storage capacity according to the available storage capacity and the preset storage occupancy.
[0257] The specific implementation process of step S402 can refer to the above step S202-2, which will not be repeated here.
[0258] Step S403: Determine, based on the available storage amount and the available storage amount determined last time, a change amount of the available storage amount determined last time relative to the available storage amount.
[0259] The specific implementation process of step S403 may refer to step S202-3.
[0260] Step S404: Detecting a congestion state of data transmission according to the deviation and the change.
[0261] The specific implementation process of step S404 may refer to the above step S202-4.
[0262] Step S405: Determine the data transmission status according to the congestion status.
[0263] The specific implementation process of step S405 may refer to the above step S202-5.
[0264] The above is a brief description of an embodiment of a method for detecting data transmission status in a server system provided by the present application. For specific contents, please refer to the description process of step S202 in the embodiment of a method for controlling data transmission in a server system provided by the present application.
[0265] The above is a specific description of an embodiment of a method for detecting a data transmission status in a server system provided by the present application. Corresponding to the embodiment of a method for detecting a data transmission status in a server system provided above, the present application also discloses an embodiment of a device for detecting a data transmission status in a server system. Figure 5 Since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described below is only illustrative.
[0266] like Figure 5 As shown, Figure 5 1 is a schematic diagram of a structure of an embodiment of a detection device for data transmission status in a server system provided by the present application; the detection device comprises:
[0267] An available storage capacity determining unit 501 is used to determine the available storage capacity of the data storage area according to the data storage capacity of the second device data storage area in the server system and the total amount of data sent by the second device;
[0268] The deviation determination unit 502 is used to determine the deviation of the available storage amount according to the available storage amount and the preset storage occupancy;
[0269] a change amount determining unit 503, configured to determine, based on the available storage amount and the available storage amount determined last time, a change amount of the available storage amount determined last time relative to the available storage amount;
[0270] The state detection unit 504 is used to detect the congestion state of data transmission according to the deviation and the change.
[0271] The state determination unit 508 includes:
[0272] a congestion state determination subunit, configured to determine the data transmission state as a congestion state when the sum of the deviation amount and the change amount is greater than zero;
[0273] The smooth state determining subunit is used to determine the data transmission state as a smooth state when the sum of the deviation amount and the change amount is less than or equal to zero.
[0274] This embodiment may also include:
[0275] A configuration unit, configured to configure a congestion state level weight when the determined data transmission state is a congestion state;
[0276] The classification unit is used to classify the congestion state into congestion levels according to the configured congestion state level weight to obtain a congestion state level.
[0277] The configuration unit is specifically configured to configure a weight for describing the congestion status level for at least one parameter among the deviation and the change.
[0278] The above is a description of an embodiment of a device for detecting the data transmission status in a server system provided in the present application. For specific contents, please refer to the description of an embodiment of a method for detecting the data transmission status in a server system provided in the present application, which will not be repeated here.
[0279] Based on the above content, this application also provides a control method for data transmission within the server system, please refer to Figure 6 As shown, Figure 6 1 is a flow chart of an embodiment of a method for controlling data transmission in a server system provided by the present application, the control method comprising:
[0280] Step S601: The first device determines the data transmission status of the second device according to the storage capacity of the second device;
[0281] Step S602: if the data transmission state of the second device is determined to be a congested state, marking a congestion level of the congested state;
[0282] Step S603: Controlling data transmission through the first device according to the congestion level.
[0283] The specific implementation process of step S601 can refer to the description of the above steps S201 and S202, which will not be repeated here.
[0284] The specific implementation process of step S602 may be: according to the congestion level, the first device controls the data transmission volume. Specifically, it may include:
[0285] Step S602-1: controlling the data transmission rate according to the congestion level;
[0286] Step S602-2: converting the transmission rate into a data volume transmitted within a preset time;
[0287] Step S602-3: Control the amount of data transmission according to the amount of data transmitted within the preset time.
[0288] The specific implementation process of step S602-3 may include:
[0289] Determine whether the amount of data transmitted within the preset time meets the data transmission requirement, and if not, suspend the transmission of the data. Specifically, if the transmission requirement is a preset time requirement, the data can be sent after the next preset time arrives.
[0290] It also includes: if the amount of data transmitted within the preset time meets the data transmission requirement, transmitting the data.
[0291] The above is a detailed description of an embodiment of a method for controlling data transmission in a server system provided by the present application. Corresponding to the embodiment of a method for controlling data transmission in a server system provided above, the present application also discloses an embodiment of a device for controlling data transmission in a server system. Figure 7 Since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described below is only illustrative.
[0292] like Figure 7 As shown, Figure 7 This is a schematic diagram of a structure of an embodiment of a control device for data transmission in a server system provided by the present application, wherein the control device comprises:
[0293] A determination unit 701, configured for a first device to determine a data transmission status of a second device according to a storage capacity of the second device;
[0294] A marking unit 702 is configured to mark a congestion level of the congestion state if the data transmission state of the second device is determined to be a congestion state;
[0295] The control unit 703 is configured to control data transmission through the first device according to the congestion level.
[0296] The control unit 702 includes:
[0297] A rate control subunit, configured to control a data transmission rate according to the congestion status level;
[0298] A conversion subunit, used for converting the transmission rate into an amount of data transmitted within a preset time;
[0299] The transmission volume control subunit is used to control the data transmission volume according to the data volume transmitted within the preset time.
[0300] The transmission volume control subunit is specifically used to determine whether the amount of data transmitted within the preset time meets the data transmission requirement. If not, the data transmission is suspended; if satisfied, the data is transmitted.
[0301] The above is a description of an embodiment of a congestion control device for data transmission within a server system provided in the present application. For specific content, please refer to the description of an embodiment of a congestion control method for data transmission within a server system provided in the present application, which will not be repeated here.
[0302] This application also provides a server system, please refer to Figure 8 As shown, Figure 8 1 is a schematic diagram of the structure of a first embodiment of a server system provided by the present application, the system comprising:
[0303] a first device and a second device;
[0304] The first device in the server system is used to obtain the data storage capacity of the data storage area of the second device, wherein the first device is used to forward data transmitted to the second device; the first device determines the data transmission state of the second device according to the data storage capacity of the second device; when the data transmission state is determined to be a congested state, the first device controls the transmission of data;
[0305] The first device is a first switching device; the second device is an endpoint device or a second switching device; wherein the first switching device includes a port module and an internal switching module for connecting to the second device, the port module includes a receiving submodule for receiving data and a sending submodule for sending data, as well as a congestion measurement submodule for detecting the data transmission status of the second device and a congestion control submodule for controlling the data transmission when the data transmission status is a congested state; the endpoint device includes at least one of a source node device that initiates a data request and a target node device that receives a data request.
[0306] Please refer to Figure 8 As shown, when the second device is an endpoint device, if the detected data transmission status is the data transmission status of the source node device, the second device can be the source node device; if the detected data transmission status is the data transmission status of the target node device, the second device can be the target node device; if the detected data transmission status is the data transmission status of the source node device and the target node device respectively, the second device can be the source node device and the target node device. Based on the above content, please refer to Fig. 9 As shown, Fig. 9 1 is a schematic diagram of the structure of a second embodiment of a server system provided by the present application. When the second device in the system is a second switching device, the second switching device may be one or more, such as Fig. 9 As shown, it can be a second switching device 1 and a second switching device 2 respectively connected to the first switching device, one end of the second switching device 1 is connected to the port module A of the first switching device, and the other end is connected to the port module of the source node device; one end of the second switching device 2 is connected to the port module B of the first switching device, and the other end is connected to the port module of the target node device. The working process of the system can refer to the above-mentioned specific description of the data transmission control method in the server system, which will not be repeated here.
[0307] Based on the above content, the present application also provides a switching device, such as Fig.10 As shown, Fig.10 This is a schematic diagram of the structure of a port module in a switching device provided by the present application, and the switching device includes:
[0308] Port modules and switch modules;
[0309] The switching module is used for data exchange between the port modules.
[0310] The port module may include: a receiving module and a sending module
[0311] The receiving module includes: a receiving storage area and a congestion control submodule.
[0312] The receiving storage area is used to store received data. The storage area may be a cache area. The receiving storage area may classify and store data, for example, classifying and caching data according to NPH (non-post header, data packet header of non-post request transaction), NPD (non-post data, data packet payload of non-post request transaction), PH (postheader, data packet header of post request transaction), PD (post data, data packet payload of post request transaction), CplH (completion header, data packet header of return transaction) and CplD (completion Data, data packet payload of return transaction), and then processing the cached data.
[0313] The congestion control submodule is used to control the transmission of transmission data when the data transmission state is determined to be a congestion state.
[0314] The sending module includes: a flow control counter, a congestion measurement submodule, a sending storage area and a control submodule.
[0315] The flow control counter maintains flow control information for different types of buffers in the receiving module, and updates flow control information for different types of buffers according to flow control information updated by the opposite node (another switching device or endpoint device) received.
[0316] The congestion measurement submodule is used to check the available buffer size of the opposite end receiving buffer according to the flow control counter, measure the network congestion according to the change trend of the available buffer size of the opposite end receiving buffer, and send a congestion notification to the source node of the data packet. It should be noted that the opposite end can refer to another switching device or an endpoint device. The storage area can be a buffer area.
[0317] Based on the above content, the present application also provides a computer storage medium for storing a program;
[0318] When the program is read and executed, it can execute the data transmission control method within the server system as described above, or execute the data transmission status detection method within the server system as described above, or execute the data transmission control method within the server system as described above.
[0319] Based on the above content, the present application also provides an electronic device, including:
[0320] processor;
[0321] A memory for storing a program, which, when read and executed by the processor, enables the electronic device to execute the data transmission control method within the server system as described above, or the data congestion detection method within the server system as described above, or the data transmission congestion control method within the server system as described above.
[0322] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0323] The 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. The memory is an example of a computer-readable medium.
[0324] 1. Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.
[0325] 2. Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0326] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
Claims
1. A method for controlling data transmission in a server system, characterized in that: include: A first device in the server system obtains a data storage capacity of a data storage area of a second device, wherein the first device is used to forward data transmitted to the second device; determining the available storage capacity of the data storage area according to the size of the initialization receiving buffer of the second device, the total amount of the receiving buffer data that has been processed by the second device since initialization, and the total amount of data that has been sent by the first device since initialization; Determining a deviation of a current available storage amount according to the available storage amount and a preset storage occupancy amount; Determine, based on the current available storage amount and the last determined available storage amount, a change in the last determined available storage amount relative to the current available storage amount; Determining a data transmission state according to the deviation and the change; When the data transmission state is determined to be a congestion state, the first device controls transmission of data.
2. The method for controlling data transmission in a server system according to claim 1, characterized in that: The first device is a first switching device; the second device is an endpoint device or a second switching device; wherein the endpoint device includes a source node device that initiates a data request and a target node device that receives a data request.
3. The method for controlling data transmission in a server system according to claim 2, characterized in that: The first device in the server system obtains the data storage capacity of the data storage area of the second device, including: According to the set acquisition condition, the operation of the first device acquiring the data storage capacity of the data storage area of the second device is triggered.
4. The method for controlling data transmission in a server system according to claim 3, characterized in that: The acquisition condition is at least one of the following conditions: The fixed time interval conditions for data transmission are set; Dynamic time interval conditions for setting data transmission; a reception request condition of a data request received by the first device; The first device sends a request condition for sending a data request.
5. The method for controlling data transmission in a server system according to claim 1, characterized in that: The determining the data transmission state according to the deviation and the change includes: When the sum of the deviation and the change is greater than zero, the determined data transmission state is determined as a congestion state; When the sum of the deviation and the change is less than or equal to zero, the determined data transmission state is determined as a smooth state.
6. The method for controlling data transmission in a server system according to any one of claims 1 or 5, characterized in that: Also includes: When the determined data transmission state is a congestion state, configuring a congestion state level weight; The congestion state is classified into congestion levels according to the configured congestion state level weight to obtain a congestion state level.
7. The method for controlling data transmission in a server system according to claim 1, characterized in that: When the determined data transmission state is a congestion state, the first device controls the transmission of the data, including: When the data transmission state is determined to be a congestion state, the first device sends a congestion notification to the end side that initiates the data request or to the end side that receives the data request; According to the congestion notification, the first device controls transmission of the data.
8. The method for controlling data transmission in a server system according to claim 7, characterized in that: When the data transmission state is determined to be a congestion state, the first device sends a congestion notification to a terminal side that initiates a data request or to a terminal side that receives a data request, including: When the second device is a target node device and the data transmission state is a congestion state, the first device sends a congestion notification to the connected source node device; When the second device is a source node device and the data transmission state is a congestion state, the first device sends a congestion notification to a connected target node device, or sends data carrying the congestion state; When the second device is a second switching device and the data transmission state is in a congested state, the first device sends a congestion notification to a source node device that initiates a data request, or the first device sends a congestion notification to a target node device that receives a data request.
9. The method for controlling data transmission in a server system according to claim 7, characterized in that: When the data transmission state is determined to be a congestion state, the first device sends a congestion notification to a terminal side that initiates a data request or to a terminal side that receives a data request, including: According to the congestion state of data transmission, marking the congestion level of the congestion state; The first device controlling the transmission of the data according to the congestion notification includes: According to the congestion level, the first device controls the data transmission volume between the source node device and the target node device.
10. The method for controlling data transmission in a server system according to claim 9, characterized in that: The first device controls the data transmission volume between the source node device and the target node device according to the congestion status level, including: controlling a data transmission rate according to the congestion level; Converting the transmission rate into the amount of data transmitted within a preset time; The data transmission volume between the source node device and the target node device is controlled according to the data volume transmitted within the preset time.
11. The method for controlling data transmission in a server system according to claim 10, characterized in that: The controlling the data transmission volume between the source node device and the target node device according to the data volume transmitted within the preset time includes: Determine whether the amount of data transmitted within the preset time meets the data transmission requirement, and if not, suspend the transmission.
12. The method for controlling data transmission in a server system according to claim 11, characterized in that: Also includes: If the amount of data transmitted within the preset time meets the data transmission requirement, then the data is transmitted.
13. The method for controlling data transmission in a server system according to any one of claims 1 to 5 or 7 to 12, characterized in that: The first device in the server system obtains the data storage capacity of the data storage area of the second device, including: The first device in the server system obtains the data cache amount of the data cache area of the second device.
14. A data transmission control device in a server system, characterized in that: include: An acquisition unit, configured for a first device in a server system to acquire a data storage capacity of a data storage area of a second device, wherein the first device is configured to forward data transmitted to the second device; a determining unit, configured to determine the available storage capacity of the data storage area according to the size of the initialization receiving buffer area of the second device, the total amount of the buffer area of the receiving buffer area data volume processed by the second device since the initialization, and the total amount of data sent by the first device since the initialization; determine the deviation of the current available storage capacity according to the available storage capacity and the preset storage occupancy; determine the change of the last determined available storage capacity relative to the current available storage capacity according to the current available storage capacity and the last determined available storage capacity; and determine the data transmission status according to the deviation and the change; A control unit is used for, when the data transmission state is determined to be a congestion state, for the first device to control the transmission of the data.
15. A method for detecting data transmission status in a server system, characterized in that: include: Determine the available storage capacity of the second device according to the data storage capacity of the data storage area of the second device in the server system and the total amount of data sent by the second device; Determining a deviation of the available storage amount according to the available storage amount and a preset storage occupancy amount; Determining, based on the available storage amount and the last determined available storage amount, a change in the last determined available storage amount relative to the available storage amount; Detecting a data transmission state according to the deviation and the change; When the data transmission state is detected as a congestion state, the data transmission is controlled by the first device.
16. The method for detecting data transmission status in a server system according to claim 15, characterized in that: The detecting the data transmission state according to the deviation and the change comprises: When the sum of the deviation and the change is greater than zero, the detected data transmission state is determined as a congestion state; When the sum of the deviation and the change is less than or equal to zero, the detected data transmission state is determined to be a smooth state.
17. The method for detecting data transmission status in a server system according to any one of claims 15 and 16, characterized in that: Also includes: When the determined data transmission state is a congestion state, configuring a congestion state level weight; The congestion state is classified into congestion levels according to the configured congestion state level weight to obtain a congestion state level.
18. The method for detecting data transmission status in a server system according to claim 17, characterized in that: When the determined data transmission state is a congestion state, configuring a congestion state level weight includes: A weight for describing the congestion status level is configured for at least one parameter of the deviation and the change.
19. A device for detecting data transmission status in a server system, characterized in that: include: An available storage capacity determining unit, configured to determine the available storage capacity of the data storage area according to the data storage capacity of the second device data storage area in the server system and the total amount of data sent by the second device; a deviation amount determining unit, configured to determine a deviation amount of the available storage amount according to the available storage amount and a preset storage occupancy amount; a change amount determining unit, configured to determine, based on the available storage amount and the available storage amount determined last time, a change amount of the available storage amount determined last time relative to the available storage amount; A state detection unit, used for detecting a data transmission state according to the deviation amount and the change amount; Wherein, when the data transmission state is detected as a congestion state, the transmission of data is controlled by the first device.
20. A method for controlling data transmission in a server system, characterized in that: include: The first device determines the data transmission status of the second device according to the storage capacity of the second device; If the data transmission state of the second device is determined to be a congested state, marking a congestion level of the congested state; controlling transmission of data through the first device according to the congestion level; The first device determining the data transmission status of the second device according to the storage capacity of the second device includes: determining the available storage capacity of the data storage area according to the size of the initialization receiving buffer of the second device, the total amount of the receiving buffer data that has been processed by the second device since initialization, and the total amount of data that has been sent by the first device since initialization; Determining a deviation of a current available storage amount according to the available storage amount and a preset storage occupancy amount; Determine, based on the current available storage amount and the last determined available storage amount, a change in the last determined available storage amount relative to the current available storage amount; The data transmission state is determined according to the deviation and the change.
21. The method for controlling data transmission in a server system according to claim 20, characterized in that: The controlling the transmission of data by the first device according to the congestion level includes: According to the congestion level, the first device controls the amount of data transmission.
22. The method for controlling data transmission in a server system according to claim 21, characterized in that: The first device controlling the data transmission volume between the source node device and the target node device according to the congestion level includes: controlling a data transmission rate according to the congestion level; Converting the transmission rate into the amount of data transmitted within a preset time; The amount of data transmitted is controlled according to the amount of data transmitted within the preset time.
23. The method for controlling data transmission in a server system according to claim 22, characterized in that: The controlling the data transmission volume between the source node device and the target node device according to the data volume transmitted within the preset time includes: Determine whether the amount of data transmitted within the preset time meets the data transmission requirement, and if not, suspend the transmission.
24. The method for controlling data transmission in a server system according to claim 23, characterized in that: Also includes: If the amount of data transmitted within the preset time meets the data transmission requirement, the data is transmitted.
25. A control device for data transmission in a server system, characterized in that: include: A determination unit, configured for the first device to obtain a data transmission status of the second device; a marking unit, configured to mark a congestion level of the congestion state when the data transmission state of the second device is determined to be a congestion state; a control unit, configured to control transmission of data through the first device according to the congestion level; The determination unit is used for the first device to obtain the data transmission status of the second device, and is specifically used to: determine the available storage capacity of the data storage area according to the size of the initialization receiving buffer of the second device, the total amount of buffer of the receiving buffer data volume that has been processed by the second device since initialization, and the total amount of data that has been sent by the first device since initialization; determine the deviation of the current available storage capacity according to the available storage capacity and the preset storage occupancy; determine the change of the last determined available storage capacity relative to the current available storage capacity according to the current available storage capacity and the last determined available storage capacity; and determine the data transmission status according to the deviation and the change.
26. A server system, characterized in that: include: a first device and a second device; The first device in the server system is used to obtain the data storage capacity of the data storage area of the second device, wherein the first device is used to forward data transmitted to the second device; the first device determines the data transmission state of the second device according to the data storage capacity of the second device; when the data transmission state is determined to be a congested state, the first device controls the transmission of data; Among them, the first device determines the data transmission status of the second device according to the data storage capacity of the second device, including: the first device determines the available storage capacity of the data storage area according to the initialization receiving buffer size of the second device, the total buffer amount of the receiving buffer data volume processed by the second device since initialization, and the total data sent by the first device since initialization; the first device determines the deviation of the current available storage capacity according to the available storage capacity and the preset storage occupancy; the first device determines the change of the last determined available storage capacity relative to the current available storage capacity according to the current available storage capacity and the last determined available storage capacity; the first device determines the data transmission status according to the deviation and the change.
27. The server system according to claim 26, characterized in that: The first device is a first switching device; the second device is an endpoint device or a second switching device; The first switching device includes a port module and an internal switching module for connecting to the second device, the port module includes a receiving submodule for receiving data and a sending submodule for sending data, as well as a congestion measurement submodule for detecting the data transmission status of the second device and a congestion control submodule for controlling the data transmission when the data transmission status is a congested state; the endpoint device includes at least one of a source node device that initiates a data request and a target node device that receives a data request.
28. A computer storage medium for storing programs; When the program is read and executed, it can execute the steps of the data transmission control method within the server system as described in any one of claims 1-13, or execute the steps of the data transmission status detection method within the server system as described in any one of claims 15-18, or execute the data transmission control method within the server system as described in any one of claims 20-24.
29. An electronic device comprising: processor; A memory for storing a program, which, when read and executed by the processor, enables the electronic device to perform the steps of the method for controlling data transmission in a server system as described in any one of claims 1 to 13, or the steps of the method for detecting data congestion in a server system as described in any one of claims 15 to 18, or the method for controlling congestion of data transmission in a server system as described in any one of claims 20 to 24.
