Network performance measurement method, system and apparatus
By introducing object identification rules into the switching equipment, the first and last packets of service objects can be identified, solving the problem of the inability to quickly locate network problems in the existing technology, and realizing the switching equipment's proactive perception and rapid location of service performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2022-03-11
- Publication Date
- 2026-06-26
AI Technical Summary
Existing network telemetry technologies cannot be directly correlated with service performance, resulting in switching equipment being unable to quickly and proactively detect changes in service performance and thus unable to quickly locate network problems.
By introducing object identification rules into the switching equipment, the first and last packets of service objects are identified, and object measurement information is measured to achieve service-level network performance measurement and locate the cause of anomalies.
Switching equipment can proactively detect changes in service performance, quickly pinpoint the cause of anomalies, and improve the ability to delineate network problems.
Smart Images

Figure CN122293499A_ABST
Abstract
Description
[0001] This application is a divisional application. The original application has the application number CN 202210242665.8 and the original application date is March 11, 2022. The entire contents of the original application are incorporated herein by reference. Technical Field
[0002] This application relates to the field of computer network technology, and in particular to a method, system and apparatus for measuring network performance. Background Technology
[0003] With the deployment of high-performance services such as storage, machine learning, and big data analytics in data centers, these services are placing higher demands on network performance assurance.
[0004] Network telemetry is a crucial tool for fault detection and localization. Current mainstream network telemetry technologies primarily focus on measuring network metrics such as round-trip time, packet loss, and throughput. For example, in-band network telemetry (INT) involves switching devices (in this application, switches, routers, firewalls, and other devices with packet forwarding capabilities) sampling and copying received or forwarded packets. These copied packets are then used as probe packets, with measurement information (such as device ID, ingress / egress ports, and timestamps) added hop-by-hop. Analysis devices can monitor packet forwarding path latency, bandwidth, and other parameters by analyzing the measurement information carried in the copied probe packets.
[0005] However, network metrics obtained from monitoring messages cannot be correlated with services. Consequently, switching equipment cannot directly and proactively detect changes in service performance, and the aforementioned network metrics fail to reflect the degree of impact on service performance. When service anomalies occur, switching equipment cannot directly distinguish network metrics at various stages, such as the endpoint and the network itself, making it impossible to quickly delineate and locate network problems. Summary of the Invention
[0006] This application provides a network performance measurement method, system, and apparatus to measure the network performance of services, enabling switching equipment to proactively detect changes in service performance and quickly delineate and locate the causes of service performance anomalies.
[0007] The first aspect provides a network performance measurement method applied to a switching device used to forward packets between a first device and a second device. The switching device can be a router, switch, firewall, or other device with packet forwarding capabilities. The switching device acquires the first time of a first packet and the second time of a second packet, and obtains object measurement information corresponding to a first service object based on the first and second times. The first time is the time when the switching device receives or forwards the first packet, and the second time is the time when the switching device receives or forwards the second packet. The first packet is the first packet of the first service object. The second packet is the last packet of the first service object. The first and second packets are identified by the switching device according to the object identification rules corresponding to the first service object. The first service object indicates the packet interaction stage to be measured in the service interaction process between the first and second devices. The object identification rules are issued to the switching device by the management device. The first and second packets include the service object identifier of the first service object, thus enabling the switching device to determine that the first and second packets belong to the same service object based on the service object identifier. In this embodiment, the switching device identifies the first service object according to the object identification rules and can measure the object measurement information of the first service object. The object measurement information is associated with the service object, so when a network problem occurs, the abnormal message interaction stage can be located based on the object measurement information, and the service-level abnormal problem can be quickly delimited.
[0008] In the first implementation of the first aspect, the object identification rule includes a first target field and a first target value corresponding to the first target field, and a second target field and a second target value corresponding to the second target field. The first target value is used to identify a first message, and the second target value is used to identify a second message. The first target value and the second target value are different, thus the switching device can distinguish between the first message and the last message of a first service object based on the first target value and the second target value.
[0009] In the second implementation of the first aspect, the first message includes a first target value added by the first or second device according to object identification rules, and the second message includes a second target value added by the first or second device according to object identification rules. This enables the first and second messages to be recognized by the switching device.
[0010] In the third implementation of the first aspect, the first message or the second message is a request message, a response message, the first data message, or the last data message in the message interaction phase.
[0011] In the fourth implementation of the first aspect, when the difference between the second time and the first time is greater than a first threshold, and / or the switching device detects a message anomaly event in the first service object between the first time and the second time, the switching device sends object measurement information to the management device. The message anomaly event includes a message forwarding duration exceeding the second threshold or message loss. This reduces the frequency at which the switching device sends object measurement information, thus reducing bandwidth consumption. Furthermore, associating the object measurement information with the message anomaly event can help locate the root cause of network anomalies.
[0012] In the fifth implementation of the first aspect, the object measurement information includes a first delay, which is the difference between the second time and the first time. The first delay is the detected delay in completing the first business object. The first time, the second time, and the first delay have different meanings depending on the source of the first and second messages: When the first message originates from the first device and the second message originates from the second device, the first time is the time when the switching device receives the first message, and the second time is the time when the switching device forwards the second message to the first device. Therefore, the first delay represents the sum of the network delay of the first and second messages transmitted in the network and the delay of the second device processing the transaction corresponding to the first message, or the total delay of a service.
[0013] When the first message originates from the second device and the second message originates from the first device, the first time is the time when the switching device forwards the first message to the first device, and the second time is the time when the switching device receives the second message. Therefore, the first delay characterizes the delay in the first device processing the transaction corresponding to the first message.
[0014] When both the first message and the second message originate from the first device, the first time is the time when the switching device receives the first message, and the second time is the time when the switching device receives the second message. Therefore, the first delay characterizes the delay in the first device sending the first service object.
[0015] When both the first and second messages originate from the second device, the first time is the time when the switching device forwards the first message to the first device, and the second time is the time when the switching device forwards the second message to the first device. Therefore, the first delay characterizes the delay at which the first device receives the first service object. In this case, the first delay is specifically the transmission delay of all messages of the first service object sent by the second device, plus the delay or acceleration delay of all messages of the first service object transmitted in the network.
[0016] In the sixth implementation of the first aspect, the object measurement information also includes a second delay. Further, the switching device obtains the second delay based on the third time and the first time of the third message. The third message is the first message of the second service object. The third time is the time when the switching device receives or forwards the third message. The second service object is the previous service object of the first service object identified by the switching device. The second service object and the first service object belong to the same service interaction process. The second delay is the difference between the first time and the third time. The second delay represents the time interval between service objects belonging to the same service interaction process, and can be used to assess the burstiness of service objects, as well as explain network problems such as network congestion and increased latency caused by high burstiness.
[0017] In the seventh implementation of the first aspect, the object measurement information includes a first time and a second time.
[0018] A second aspect provides a network performance measurement system. The system includes a management device, a switching device, a first device, and a second device. The switching device is used to forward packets between the first device and the second device. The management device is used to send object identification rules to the switching device. The switching device is further used to identify a first packet and a second packet of a first service object according to the object identification rules, obtain a first time of the first packet and a second time of the second packet, and obtain object measurement information corresponding to the first service object based on the first time and the second time. The first time is the time when the switching device receives or forwards the first packet, and the second time is the time when the switching device receives or forwards the second packet. The first packet is the first packet of the first service object, and the second packet is the last packet of the first service object. The first service object indicates the packet interaction stage to be measured in the service interaction process between the first device and the second device. The first packet and the second packet include a service object identifier of the first service object.
[0019] In the first implementation of the second aspect, the object identification rule includes a first target field and a first target value corresponding to the first target field, and a second target field and a second target value corresponding to the second target field. The first target value is used to identify the first message, and the second target value is used to identify the second message. The first target value and the second target value are different.
[0020] In a second implementation of the second aspect, the management device is further configured to send object identification rules to the first device and / or the second device. The first device or the second device is configured to add a first target value to the first target field according to the object identification rules when constructing the first message, or to add a second target value to the second target field when constructing the second message.
[0021] In the third implementation of the second aspect, the first message or the second message is a request message, a response message, the first data message, or the last data message in the message interaction phase.
[0022] In the fourth implementation of the second aspect, the switching device is further configured to send object measurement information to the management device when the difference between the second time and the first time is greater than a first threshold, and / or when the switching device detects a message anomaly event in the first service object between the first time and the second time. Message anomaly events include message forwarding duration exceeding the second threshold or message loss.
[0023] In the fifth implementation of the second aspect, the object measurement information includes a first delay, which is the difference between the second time and the first time. Specifically, the first message originates from the first device, the second message originates from the second device, the first time is the time the switching device receives the first message, and the second time is the time the switching device forwards the second message to the first device. Alternatively, the first message originates from the second device, the second message originates from the first device, the first time is the time the switching device forwards the first message to the first device, and the second time is the time the switching device receives the second message. Alternatively, both the first and second messages originate from the first device, the first time is the time the switching device receives the first message, and the second time is the time the switching device receives the second message. Alternatively, both the first and second messages originate from the second device, the first time is the time the switching device forwards the first message to the first device, and the second time is the time the switching device forwards the second message to the first device.
[0024] In the sixth implementation of the second aspect, the object measurement information also includes a second delay. The switching device is further configured to obtain the second delay based on the third time and the first time of the third message. The third message is the first message of the second service object. The third time is the time when the switching device receives or forwards the third message. The second service object is the previous service object of the first service object identified by the switching device. The second service object and the first service object belong to the same service interaction process. The second delay is the difference between the first time and the third time.
[0025] In the seventh implementation of the second aspect, the object measurement information includes a first time and a second time.
[0026] A third aspect provides a network performance measurement apparatus. The network performance measurement apparatus can be a switching device, a management device, a first device, or a second device. The apparatus includes a processor and a memory, the processor being coupled to the memory, and the processor being configured to implement, based on instructions stored in the memory, the functions corresponding to the switching device, management device, first device, or second device in the network performance measurement system as described in the second aspect or any implementation thereof.
[0027] Fourthly, a switching device is provided. The switching device includes an acquisition module. The acquisition module is used to acquire a first time of a first message and a second time of a second message. The first time is the time when the switching device receives or forwards the first message, and the second time is the time when the switching device receives or forwards the second message. The first message is the first message of a first service object, and the second message is the last message of the first service object. The first and second messages are identified by the switching device according to the object identification rules corresponding to the first service object. The first service object indicates the message interaction stage to be measured in the service interaction process between the first device and the second device. The object identification rules are issued to the switching device by the management device. The acquisition module is also used to acquire object measurement information corresponding to the first service object based on the first and second times. The first and second messages include the service object identifier of the first service object.
[0028] In the first implementation of the fourth aspect, the object identification rule includes a first target field and a first target value corresponding to the first target field, and a second target field and a second target value corresponding to the second target field. The first target value is used to identify the first message, and the second target value is used to identify the second message. The first target value and the second target value are different.
[0029] In the second implementation of the fourth aspect, the first message includes a first target value added by the first or second device according to object identification rules, and the second message includes a second target value added by the first or second device according to object identification rules. This enables the first and second messages to be recognized by the switching device.
[0030] In the third implementation of the fourth aspect, the first message or the second message is a request message, response message, first data message, or last data message in the message interaction phase.
[0031] In the fourth implementation of the fourth aspect, the device further includes a sending module. The sending module is used to send object measurement information to the management device when the difference between the second time and the first time is greater than a first threshold, and / or when the switching device detects a message anomaly event in the first service object between the first time and the second time. The message anomaly event includes a message forwarding duration greater than the second threshold or message loss.
[0032] In the fifth implementation of the fourth aspect, the object measurement information includes a first delay, which is the difference between the second time and the first time. The first delay is the detected delay in completing the first business object. The first time, the second time, and the first delay have different meanings depending on the source of the first and second messages.
[0033] When the first message originates from the first device and the second message originates from the second device, the first time is the time when the switching device receives the first message, and the second time is the time when the switching device forwards the second message to the first device. The first delay represents the sum of the network delay of the first and second messages in the network transmission and the delay of the second device in processing the transaction corresponding to the first message.
[0034] When the first message originates from the second device and the second message originates from the first device, the first time is the time when the switching device forwards the first message to the first device, and the second time is the time when the switching device receives the second message. The first delay characterizes the delay in the first device processing the transaction corresponding to the first message.
[0035] When both the first message and the second message originate from the first device, the first time is the time when the switching device receives the first message, and the second time is the time when the switching device receives the second message. The first delay characterizes the delay in the first device processing the first service object.
[0036] When both the first and second messages originate from the second device, the first time is the time when the switching device forwards the first message to the first device, and the second time is the time when the switching device forwards the second message to the first device. The first delay characterizes the delay in the second device processing the first service object.
[0037] In the sixth implementation of the fourth aspect, the object measurement information also includes a second delay. The acquisition module is further used to acquire the second delay based on the third time and the first time of the third message. The third message is the first message of the second service object. The third time is the time when the switching device receives or forwards the third message. The second service object is the previous service object of the first service object identified by the switching device. The second service object and the first service object belong to the same service interaction process. The second delay is the difference between the first time and the third time.
[0038] In the seventh implementation of the fourth aspect, the object measurement information includes a first time and a second time.
[0039] The fifth aspect provides a computer-readable storage medium, characterized in that it includes instructions that, when the computer-readable storage medium is run on a computer, cause the computer to perform a network performance measurement method as described in the first aspect or any implementation thereof. Attached Figure Description
[0040] Figure 1 A schematic diagram of an embodiment of the network performance measurement system provided in this application; Figure 2 A flowchart illustrating the interaction process for writing data provided in this application; Figure 3A schematic diagram illustrating the network performance measurement of service objects using the network performance measurement system provided in this application; Figure 4 A flowchart illustrating the first embodiment of the network performance measurement method provided in this application; Figure 5 A flowchart illustrating the second embodiment of the network performance measurement method provided in this application; Figure 6 A flowchart illustrating the third embodiment of the network performance measurement method provided in this application; Figure 7 A schematic diagram of the structure of an embodiment of the switching device provided in this application; Figure 8 This is a schematic diagram of an embodiment of the network performance measurement device provided in this application. Detailed Implementation
[0041] This application provides a network performance measurement method, system, and apparatus to measure the network performance of services and quickly delimit and locate abnormal network events.
[0042] In high-concurrency, low-latency, high-performance business scenarios such as storage, machine learning training, and big data analytics, efficient access, processing, and transmission of data are required. Any performance fluctuations, whether on the endpoint or network side, have a significant impact on business performance, leading to perceived performance degradation by users.
[0043] Data centers typically run multiple services. Currently, network performance metrics in data centers are obtained by measuring basic network performance indicators, and these measurements are not correlated with specific services. Specifically, network switching devices sample and copy received or forwarded packets according to a preset period or sampling rate, adding measurement information (such as device identifier, ingress / egress port, timestamp, etc.) to each hop of the copied packets. Packets from multiple services may pass through the same switching device, but the switching device does not identify which service a packet belongs to when sampling it. The switching device reports the packets with added measurement information to an analyzer. The analyzer, by analyzing the measurement information carried in the packets, can determine network performance metrics such as forwarding path latency, bandwidth, and packet loss rate. Since packets from multiple services are not associated with any particular service, the network performance metric data obtained by the analyzer is also not associated with any service. Furthermore, because there is no correlation between packets, the latency measured for multiple packets only reflects the latency of each individual packet, and cannot reflect the overall latency of a single service (containing multiple interactive packets). Therefore, based on these network performance measurement results, network devices such as switching equipment and analyzers cannot proactively, quickly, and directly perceive which service performance has deteriorated.
[0044] Furthermore, even after learning of service performance degradation, these network performance measurements alone are insufficient to pinpoint the root cause. Service performance degradation could be due to network performance jitter, endpoint performance jitter, or both. Message-level measurements only reflect network performance during the transmission process from one end to the other, failing to reflect endpoint performance. Therefore, current network performance metrics cannot determine whether service performance degradation is caused by endpoint performance jitter or network performance jitter, making it impossible to quickly identify the factors truly affecting the service's performance from the overall data center network performance measurements.
[0045] To address the aforementioned technical issues, this application provides the following embodiments: when a service experiences performance fluctuations or degradation, the network can proactively detect changes in service performance and quickly delineate the cause of the problem, i.e., it can quickly determine the cause of the service performance change.
[0046] like Figure 1 As shown, Figure 1 This is a schematic diagram of an embodiment of the network performance measurement system provided in this application. In this embodiment, the network performance measurement system includes a management device, a switching device, a first device, and a second device.
[0047] The first and second devices can be end-side devices in the network (i.e., devices close to the user). For example, the first or second device can be a server, storage array, computer, or smart terminal. A communication connection is established between the first and second devices through a switching device, enabling them to interact with services based on this connection. The switching device can be a switch, router, firewall, or other device with packet forwarding capabilities.
[0048] In one possible scenario, the network performance measurement system includes a switching device, with the first device and the second device connected to the same switching device. That is, during service interactions between the first device and the second device, packets are forwarded by only one switching device.
[0049] In another possible scenario, the network performance measurement system includes at least two switching devices. A first device is connected to a first switching device out of the at least two switching devices, and a second device is connected to a second switching device out of the at least two switching devices. The first and second switching devices are different switching devices. Packets sent by the first device are forwarded to the second device via both the first and second switching devices, and packets sent by the second device are forwarded to the first device via both the second and first switching devices. Of course, at least one switching device can also exist between the first and second switching devices to forward packets for service interactions between them.
[0050] This application uses the example of a first device connecting to a first switching device and a second device connecting to a second switching device for illustration. The first device connecting to the first switching device can mean that the first device is connected to the first switching device via a wired connection such as fiber optic cable, coaxial cable, or twisted pair cable, or via a wireless connection. That is, the first switching device is the first hop for forwarding packets from the first device and the last hop for forwarding packets to the first device; there are no other switching devices involved in forwarding packets between the first device and the first switching device. The connection relationship between the second device and the second switching device is similar.
[0051] The management device is a device with control and analysis functions. Specifically, the management device can issue object identification rules for service objects to the first and second devices, as well as the first and / or second switching devices. This enables the first and / or second switching devices to identify the service objects according to the object identification rules, measure the network performance of the service objects to obtain object measurement information, and then report this object measurement information to the management device. The management device can further analyze the service performance of the service objects based on the object measurement information.
[0052] In this embodiment, the service object indicates the message interaction phase to be measured in the service interaction process between the first device and the second device. The service interaction process between the first device and the second device includes the interaction process of at least one service transmitted based on the communication connection between the first device and the second device. Specifically, from the establishment of a session between the first device and the second device until the end of the session, all services performed based on the session constitute the interaction process between the first device and the second device. For example, based on the session between the first device and the second device, the first device reads target data from the second device multiple times. Each time the target data is read, it constitutes a service interaction process, and the multiple readings of target data constitute the service interaction process between the first device and the second device.
[0053] To complete a service between the first and second devices, one party needs to initiate a service request, and the other party needs to respond accordingly until both parties confirm the completion of the service. This interaction process is achieved through multiple message exchanges. The multiple messages in the process of completing a service are related and sequential because some messages are constructed and sent only after messages are received from the other end.
[0054] For example, such as Figure 2 As shown, Figure 2 A flowchart illustrating the interaction process for writing data provided in this application. Figure 2The two end devices are a server and a storage array, respectively. Switch 1 is a switching device connected to the server, and switch 2 is a switching device connected to the storage array. The server writes data to the storage array by initiating a data write request through the communication connection between the server and the storage array. First, the server constructs a request message and sends it to the storage array. The storage array receives and parses the request message, constructs and sends a corresponding response message 1 to the server to notify the server that the storage array has received the request message. Upon receiving response message 1, the server encapsulates the data into M data packets (M is an integer greater than or equal to 1) and sends these M data packets to the storage array. After receiving the M data packets, the storage array constructs and sends a response message 2 to the server to notify the server that the storage array has received the M data packets. Upon receiving response message 2, the server considers the data write operation complete and confirms the end of the operation. It can be seen that the request message and response message 1 are related and sequential, response message 1 and the data packets are related and sequential, and the data packets and response message 2 are related and sequential.
[0055] Whether on the first or second device side, the sending or receiving of a message signifies the end of one phase and the beginning of the next in a service, driving the service to completion step by step. A specific service involves the construction, sending, transmission, reception, and parsing of messages; that is, the interaction process of a service includes both the transmission of messages between the first and second devices and the processing (construction, sending, reception, or parsing) of messages by the first and second devices. Therefore, based on the correlation and sequence between messages, the interaction process of a service can be decomposed into multiple message interaction phases. A message interaction phase can be the phase where the first or second device processes the message, or it can be the phase where the first or second device processes the message plus the phase where the message is transmitted in the network, thus separating the phase where the first or second device processes the message from the interaction process of the service. It should be noted that, in order to enable the service object to be measured and perceived by the switching equipment, the message interaction phase in this embodiment refers to a single-side device. For example... Figure 2 In this embodiment, the process from the server sending a request message to receiving response message 1 can be considered a message interaction phase; the process from the storage array receiving a request message to sending response message 1 can be considered a message interaction phase; the process from the server sending the first data message out of M data messages to sending the last data message can be considered a message interaction phase, and so on. However, the process from the server sending a request message to the storage array receiving the request message, and from the storage array sending response message 1 to the server sending the first data message, etc., are not considered message interaction phases as referred to in this embodiment.
[0056] By utilizing correlated messages, semantically meaningful service objects can be defined that can be identified and measured by switching devices, thereby enabling service-level network performance measurement. A service object comprises at least two messages in a message exchange phase. In a message exchange phase, the earliest message sent or received is the first message of the corresponding service object, and the latest message sent or received is the last message of the corresponding service object. A service object can be a service, i.e., the process from sending a request message to receiving a response message indicating the end of the service, which includes multiple message exchange phases. For example... Figure 2 In this context, a business object represents a data write operation, indicating the process from the server sending a request message to receiving a response message. A business object can also indicate a specific message exchange stage within a business interaction process. For example... Figure 2 In this context, the message interaction phase from the server sending a request message to receiving response message 1 can be represented as a business object S1, and the phase from the storage array receiving the request message to sending response message 1 can be represented as a business object S2. Business object S1 has the semantics of transmitting the request message in the network, the storage array processing the request message, and the transmission of response message 1 in the network. Business object S2 has the semantics of the storage array processing the request message. Combining business objects S1 and S2, and separating the phase in business object S1 where the storage array processes the request message (i.e., business object S2), we can obtain the phase of transmitting the request message and response message 1 in the network.
[0057] Therefore, in this embodiment, the first and last messages of the business object are specific messages, and the two are related in terms of business, rather than any message or message that is not related in terms of business among the multiple messages exchanged between the first device and the second device.
[0058] In this embodiment, the first switching device / second switching device identifies the service object specifically by identifying the first and last packets of the service object. To enable the first switching device / second switching device to identify the first and last packets of the service object from multiple received or forwarded packets, the management device needs to distribute object identification rules to the first and / or second devices. The first and / or second devices then construct the first and last packets according to the object identification rules, and the first and second switching devices identify the first and last packets using the same object identification rules.
[0059] The management device distributes object identification rules to at least one of the first and second switching devices. The specific switching device to which the object identification rules are distributed depends on the needs of the business object and can be determined by measurement. For example... Figure 2If only one or more of service objects S1 to S4 need to be measured, the object identification rule can be sent to switch 1 instead of switch 2. The management device sends the object identification rule to at least one of the first and second devices. Which device the object identification rule is sent to depends on which device constructed the first and last packets of the service object. For example... Figure 2 If you want to measure business object S1, where the first message of business object S1 is constructed by the server and the last message is constructed by the storage array, then the management device will send the object identification rules to the server and the storage array. If you only need to measure business object S3, where both the first message and the last message of business object S3 are constructed by the server, then the management device can send the object identification rules to the server without sending them to the storage array. Of course, it can also send them to both the server and the storage array.
[0060] Object identification rules can be generated by the management device receiving user input instructions, or they can be automatically generated by the management device based on message construction rules in the network protocols used in the network.
[0061] The object identification rule includes a first target field and a corresponding first target value, as well as a second target field and a corresponding second target value. The first target field indicates the position of the first target value within the message, such as its offset and length within the message. The second target field indicates the position of the second target value within the message, such as its offset and length within the message. The first target value is used to identify the first message of a service object, and the second target value is used to identify the last message of a service object. In this embodiment, to enable the first switching device / second switching device to distinguish which message is the first message of a service object and which is the last message of a service object, the first target value and the second target value are different. The first target field and the second target field can be the same or different; this application does not impose any restrictions on this.
[0062] The object identification rules also include rules for extracting and matching business object identifiers of business objects. Specifically, the object identification rules include a third target field and a fourth target field. The third target field indicates the position of the business object identifier in the first message, such as the offset value and length of the business object identifier in the first message. The fourth target field indicates the position of the business object identifier in the last message, such as the offset value and length of the business object identifier in the last message. The business object identifier is used to associate the first message and the last message belonging to the same business object; that is, the first message and the last message belonging to the same business object include the same business object identifier. The third target field and the fourth target field can be the same or different, and this application does not impose any restrictions on this.
[0063] The matching rules are used to determine whether the first and last messages belong to the same business object based on the business object identifier extracted from the third target field of the first message and the business object identifier extracted from the fourth target field of the last message. For example, the matching rule can be direct equality matching, meaning that if the business object identifier extracted from the third target field of the first message and the business object identifier extracted from the fourth target field of the last message are exactly the same, then the first and last messages are considered to belong to the same business object. Another example is equality after changing the byte order. This is used when the byte order of the business object identifier extracted from the third target field of the first message and the business object identifier extracted from the fourth target field of the last message are different; that is, one of them has a high-order byte first, low-order byte last, and the other has a low-order byte first, high-order byte last. In this case, the byte order of one of them needs to be changed to make the byte order of the two messages the same before matching for equality. If they are equal, then the first and last messages are considered to belong to the same business object. For example, the matching rule can also be that the values are equal after adjustment. For instance, the business object identifier extracted from the third target field of the first message is added to or subtracted by a preset value and then compared with the business object identifier extracted from the fourth target field of the last message. If they are equal, the first message and the last message are considered to belong to the same business object.
[0064] The first destination field, the second destination field, the third destination field, or the fourth destination field can be located in the message header or in the message payload; this application does not impose any restrictions on this.
[0065] The first / second device adds the service object identifier, the first target value, and the second target value to the first and last messages corresponding to the service objects requiring measurement. For example... Figure 2 If it is necessary to measure business object S1 or business object S5, the first device adds a first target value and business object identifier to the request message, and the second device adds a second target value and business object identifier to the response message 1; if it is necessary to measure business object S3 or business object S7, the first device adds a first target value and business object identifier to the data message 1, and adds a second target value and business object identifier to the data message M.
[0066] Specifically, the first target value in the first message is added to the first target field by the first / second device when constructing the message. The second target value in the last message is added to the second target field by the first / second device when constructing the message. This ensures that the first and last messages of the service object can be recognized by the first and / or second switching devices. The addition of the first and second target values by the first / second device to the message can be divided into two cases: Case 1. Add according to the corresponding message protocol Some standard or proprietary protocols have rules for different types of messages, specifying the addition of specific field values to indicate the message type. For example, in the NVMe over Fabric protocol, CMD (request) and Response messages have explicit message characteristic rules; that is, the base transport header (BTH) of these two messages contains specific operation code (OPCode) field values. In other words, these types of messages naturally carry explicit identification features that can be recognized and distinguished from other messages, namely the aforementioned specific fields and their values.
[0067] In this case, the first and / or last messages of the service object are messages that carry explicit identification features. When the management device generates the object identification rules for the service object, it uses the specific fields specified in the protocol as the first target field and / or the second target field in the object identification rules, and uses the values of the specific fields as the first target value and / or the second target value in the object identification rules.
[0068] Scenario 2. Add according to object recognition rules
[0069] For messages that do not have explicit identification features during the message exchange phase but need to be used as the first or last message of a service object, the first device / second device adds a first target value to the first target field of the message or adds a second target value to the second target field of the message according to the object identification rules, so as to obtain a message that can be identified by the first switching device and / or the second switching device.
[0070] In this case, the first and second target fields can be reserved fields specified in the message. Reserved fields refer to fields that are reserved, unused, and customizable. This avoids conflicts with other message fields that could lead to unrelated messages being incorrectly identified as the first or last message of a business object, thus improving the accuracy of business object identification.
[0071] The service object identifier in the first message is added to the third target field by the first / second device according to the object identification rules when constructing the first message. The service object identifier in the last message is added to the fourth target field by the first / second device according to the object identification rules when constructing the last message. The third and fourth target fields can be reserved fields specified in the message.
[0072] The service object identifier in the first message is generated by the first device / second device. For first messages of different service objects, the first device and the second device generate different service object identifiers, so that the first switching device / second switching device can distinguish different service objects based on the different service object identifiers. The service object identifier in the tail message can reuse the service object identifier in the first message, so the first message and tail message of the same service object include the same service object identifier. If the first message and tail message of a certain service object come from different devices of the first device and the second device, then the one receiving the first message in the first device and the second device extracts the service object identifier in the first message according to the object identification rules, and adds the service object identifier extracted from the first message to the fourth target field when constructing the tail message. Of course, when the first device and the second device generate the first message and tail message of the same service object respectively, the service object identifier in the first message and the service object identifier in the tail message can also be different. There is a mapping relationship between the two, for example, they are equal after changing the byte order, or they are equal after adding or subtracting a preset value.
[0073] In this embodiment, the object identification rule can be a general rule, meaning that the first and last messages of multiple service objects are constructed based on the same object identification rule. Different first messages share the same first target field, first target value, and third target field, while different last messages share the same second target field, second target value, and fourth target field. The only difference is that the service object identifiers of the first and last messages between different service objects are different. This reduces the complexity of identifying service objects for the first and / or second switching devices. Of course, service object rules can also be configured separately for each type of service object; this application does not impose any restrictions on this.
[0074] In some potential application scenarios, when the same initial or final message belongs to at least two business objects, at least two object identification rules are required. This embodiment uses a first object identification rule and a second object identification rule as examples for illustration. The third target field and / or fourth target field in the first object identification rule and the second object identification rule are different. If the same message is the initial message of two business objects simultaneously, for example... Figure 2 The first messages of both business objects S1 and S9 are request messages. Therefore, the third target field in the first and second object identification rules is different. The first, second, or fourth target fields can be the same or different. Thus, when constructing the first message, the first / second device can add the business object identifiers of both business objects to the message without conflict. If the same message is simultaneously the tail message of two business objects, for example... Figure 2The tail messages of both business objects S8 and S9 are response messages 2. Therefore, the fourth target field in the first and second object identification rules is different. The first, second, or third target fields can be the same or different. Thus, when constructing the tail message, the first / second device can add the business object identifiers of the two business objects to the message without conflict.
[0075] If the same message is both the tail message of one business object and the head message of another business object, for example... Figure 2 If response message 1 is the tail message of business object S5 and the head message of business object S2, conflicts can be avoided in two ways. For example, using the same object identification rule, but with different third and fourth target fields, and different first and second target fields. Another example is using two different object identification rules, namely a first object identification rule and a second object identification rule, where the third target field of the first object identification rule differs from the fourth target field of the second object identification rule, and the first target field of the first object identification rule differs from the second target field of the second object identification rule.
[0076] The following explanation uses the first switching device to identify and measure service objects according to object identification rules as an example. The second switching device is similar, so it will not be described in detail here.
[0077] The first switching device receives object identification rules, which include a first target field, a first target value, a second target field, and a second target value. Optionally, the object identification rules may also include a third target field, a fourth target field, and a matching rule. The first switching device parses the received or forwarded messages, checking whether the first target field of each message is the first target value and whether the second target field is the second target value. If the detection determines that the first target field of the first message in the received or forwarded messages is the first target value, then the first message is determined to be the first message. The first switching device extracts the service object identifier of the first service object from the third target field of the first message and records the service object identifier of the first service object and the first time of the first message. The first time of the first message is the time when the first switching device receives or forwards the first message. If the detection determines that the second target field of the second message in the received or forwarded messages is the second target value, then the second message can be determined to be the last message. The first switching device extracts the service object identifier from the fourth target field of the second message. The first switching device determines that the service object identifier in the second message matches the service object identifier in the first message according to the matching rules. Therefore, the first switching device identifies the second message as the tail message of the first service object. The first switching device obtains the second time of receiving or forwarding the second message. Based on the first and second times, the first switching device can obtain the object measurement information of the first service object.
[0078] In one possible scenario, the first switching device receives two service object rules: a first service object rule and a second service object rule. The first switching device uses both service object rules simultaneously to identify received or forwarded packets. If a packet is the first packet of one service object and the last packet of another service object—that is, if the packet contains two service object identifiers (a first service object identifier and a second service object identifier) and two target values (a first target value and a second target value)—then the service object identifier and target value extracted by the first switching device based on the same service object rule belong to the same service object. For example, if the first service object identifier and the first target value are extracted from the packet based on the first service object rule, then the packet is the first packet of the service object corresponding to the first service object identifier, and the first time corresponding to the first service object identifier is recorded. If the second service object identifier and the second target value are extracted from the packet based on the second service object rule, then the packet is the last packet of the service object corresponding to the second service object identifier, and the second time corresponding to the second service object identifier is recorded. The identification method is similar when the first or last packets of two service objects are the same packet.
[0079] The object measurement information for the first business object may include a first delay, which is the difference between the second time and the first time. The first delay can represent the delay in completing the first business object. The object measurement information also includes the business object identifier of the first business object, and the association between the business object identifier and the object measurement information.
[0080] The first message of the first service object can originate from either the first device or the second device. The second message can also originate from either the first device or the second device. Depending on the source and type of the first and second messages, the first service object and the first delay have different meanings. Specifically, they can include the following four cases: Scenario a. The first message originates from the first device, and the second message originates from the second device. In this case, considering that the delay of the first switching device forwarding the first message and the second message is the network delay, in order to improve the accuracy of the first delay, the first time can be the time when the first switching device receives the first message, and the second time can be the time when the first switching device forwards the second message to the first device.
[0081] If the first service object is a service, it includes multiple message exchange stages, i.e., the first message is a request message, the second message is a response message indicating the end of the service, and the first delay is the total delay for completing the service. For example... Figure 2 The business object S9 in the middle.
[0082] If the first service object indicates a message exchange phase of a service, the first delay is the sum of the network transmission delay of the first and second messages, and the delay of the second network device processing the first message. Specifically, the first device sends the first message, the first switching device receives and forwards the first message, and the second switching device receives the first message and forwards it to the second device. After receiving the first message, the second device parses it and constructs the corresponding second message. The second device sends the second message, the second switching device receives and forwards the second message, and the first switching device receives and sends the second message to the first device. For example... Figure 1 The business objects S1, S4, or S6 in the table.
[0083] It should be noted that in this case, the first delay does not include the transmission delay of the first and second messages between the first device and the first switching device. Since the first device and the first switching device are close together, the transmission delay of the first and second messages between them is small and can be ignored. Of course, in scenarios where high accuracy of the first delay is required, the transmission delay of the first and second messages between the first device and the first switching device can be measured and added to the first delay. For example, the transmission delay of the first or second message between the first device and the first switching device can be obtained by dividing the length of the cable connecting the first device and the first switching device by the speed of light. Another example is that the first device timestamps the first message, and the first switching device can calculate the transmission delay of the first message between the first device and the first switching device based on the first time and the timestamp in the first message. Since the distance from the second message to the first device is the same as the distance from the first device to the first switching device, it can be assumed that the transmission delay of the first message between the first device and the first switching device is the same as the transmission delay of the second message from the first switching device to the first device.
[0084] Scenario b. The first message originates from the second device, and the second message originates from the first device.
[0085] In this scenario, the first time can be the time when the first switching device forwards the first message to the first device, and the second time can be the time when the first switching device receives the second message. The first service object indicates the message exchange phase of a service, and the first delay is the delay when the first device processes the first message. For example... Figure 2 The business objects S5, S8, or S2 in the table.
[0086] It should be noted that in this case, the first delay also includes the transmission delay of the first and second messages between the first device and the first switching device. Similarly, this portion of the delay can be ignored, and the first delay can be considered as the processing delay of the first device. Alternatively, the transmission delay of the first and second messages between the first device and the first switching device can be calculated using the above method, and this portion of the delay can be deducted from the first delay.
[0087] Scenario c. Both the first and second messages originate from the first device.
[0088] In this case, the first time can be the time when the first switching device receives the first message, and the second time can be the time when the first switching device receives the second message. The first delay can be approximated as the difference between the time when the first device sends the second message and the time when the first device sends the first message.
[0089] The first service object indicates the message exchange phase, specifically the data transmission phase. For example, a first device sends N data packets to a second device, where the first packet is the first of the N data packets, and the second packet is the last of the N data packets. The first delay is the delay at which the first device sends the N data packets. Figure 2 The business object S3 in the middle.
[0090] Of course, when the first device needs to send a large number of data packets, the data transmission phase can be further decomposed into at least two service objects. For example, in the first service object, the first packet is the first data packet out of N data packets, and the second packet is the Kth data packet out of N data packets. K is greater than 1 and less than N. In the second service object, the first packet is the (K+1)th data packet, and the second packet is the Nth data packet out of N data packets.
[0091] Case d. Both the first and second messages originate from the second device.
[0092] In this scenario, the first time can be the time when the first switching device forwards the first message, and the second time can be the time when the first switching device forwards the second message. The first delay can be approximated as the difference between the time when the first device receives the second message and the time when the first device receives the first message.
[0093] The first service object indicates the message exchange phase, specifically the data reception phase. For example, a first device receives N data packets from a second device, where the first packet is the first data packet out of the N data packets, and the second packet is the Nth data packet out of the N data packets. The first delay is the delay at which the first device receives the N data packets. Figure 2 The business object S7 in the middle.
[0094] In the four scenarios described above, the first switching device needs to determine whether the first and second timestamps are reception or forwarding times based on their origins. The first switching device can determine whether the first and second packets originated from the first device or the second device by identifying the port from which they were received. Alternatively, the first switching device can learn the network topology using the Link Layer Discovery Protocol (LLDP) and determine whether the first and second packets originated from the first device or the second device based on the network topology when receiving them.
[0095] Optionally, the object measurement information may also include a second delay. The second delay indicates the time interval between the first service object and the second service object. The second service object is the previous service object received by the first switching device from the first service object, and the second service object and the first service object belong to the same service interaction process. Specifically, the first switching device obtains the third time of the third message of the second service object, and subtracts the third time from the first time to obtain the second delay. The third message is the first message of the second service object, and the third time is the time when the first switching device receives or forwards the third message. The second delay can be used to assess the burstiness of service objects. High burstiness can easily cause network congestion or increased storage processing latency. The second delay can be used to explain and assist in locating operational phenomena such as congestion and increased latency.
[0096] Optionally, the object measurement information may also include a first time and a second time. Based on the first time and the second time, abnormal events occurring within the first time and the second time can be obtained. The correlation between the abnormal events and the business objects can be analyzed to delineate the problem.
[0097] In some implementations, the first switching device may not calculate the first delay, but instead report the first time and the second time as measurement information to the management device, which then calculates the first delay based on the first time and the second time, thereby reducing the computational burden on the first switching device.
[0098] After the first switching device obtains the object measurement information, there are several ways to report the object measurement information to the management device.
[0099] For example, each time the first switching device measures the object measurement information of a service object, it reports the object measurement information of that service object to the management device.
[0100] For example, the first switching device can periodically report object measurement information of the business objects to the management device.
[0101] For example, to reduce bandwidth resource consumption between the first switching device and the management device, the first switching device only reports abnormal object measurement information to the management device when it detects a network anomaly. For instance, when the first latency of a first service object exceeds a first threshold, the first switching device marks the object measurement information of the first service object as abnormal and reports it to the management device. Alternatively, if the first switching device detects a packet anomaly event within a first and second time period, such as a packet forwarding time exceeding a second threshold or packet loss, the first switching device reports both the object measurement information of the first service object and the packet anomaly event to the management device, allowing the management device to analyze the impact of the packet anomaly event on the first service object based on the object measurement information and the packet anomaly event. Or, if the first latency of a first service object exceeds the first threshold, and the first switching device detects a packet anomaly event within a first and second time period, the first switching device marks the object measurement information of the first service object as abnormal and reports both the object measurement information and the packet anomaly event to the management device, allowing the management device to analyze whether the performance jitter of the first service is caused by the packet anomaly event.
[0102] In this embodiment, by defining service objects and measuring their network performance, object measurement information is obtained, thereby achieving service-level network performance measurement. When the object measurement information indicates an anomaly, the first switching device and the management device can proactively detect changes in service performance and further analyze the causes of these changes. Since a service object can be a semantically meaningful message interaction stage decomposed from the service interaction process, separating the end-side processing stage from the service interaction process, the object measurement information of such service objects can directly reflect end-side processing latency. When the object measurement information indicates an anomaly, it can be determined that the service performance change is caused by end-side jitter, thus quickly delimiting the service performance anomaly. For example... Figure 2 If the object measurement information of business object S5 is abnormal, it can be considered that the performance jitter on the storage array side may have caused the business performance to be abnormal; if the object measurement information of business object S2 is abnormal, it can be considered that the performance jitter on the server side may have caused the business performance to be abnormal, and so on.
[0103] Furthermore, the management equipment can combine object measurement information of two service objects measured by two switching devices within the same service to determine whether there is an anomaly on the network side. For example... Figure 2In the case of service objects S1 and S5, the first and last messages are the same, and the service object identifiers are the same. After switch 1 and switch 2 report the object measurement information of service object S1 and the object measurement information of service object S5 to the management device, the management device can associate the object measurement information of service object S1 and the object measurement information of service object S5 according to the service object identifier. By subtracting the first delay of service object S5 from the first delay of service object S1, the sum of the network delays of the request message and the response message 1 in the network can be obtained. If the sum of the network delays is greater than the third threshold, it can be determined that the network jitter has caused the service performance change, thus making it simple and quick to delineate the abnormality of service performance. Figure 2 The same applies to business objects S2 and S6, and business objects S4 and S8.
[0104] For example, the first delay of business object S3 represents the delay of the server sending M data packets, and the first delay of business object S7 represents the delay of the storage array receiving M data packets. Specifically, the first delay of business object S7 is the sum of the delay of the server sending M data packets and the delay and acceleration of the M data packets in the network. The management device can associate the object measurement information of business object S3 and the object measurement information of business object S7 according to the business object identifier. The first delay of business object S7 is subtracted from the first delay of business object S3. If the result is positive, it means that there is a delay in the transmission of M data packets in the network. If the result is negative, it means that there is acceleration in the transmission of M data packets in the network.
[0105] To more clearly describe the workflow of the management device, first device, second device, first switching device, and second switching device measuring a certain service object in the network performance measurement system of this application, this embodiment uses the scenario of the first device constructing the first packet of the service object, the second device constructing the last packet of the service object, and the first switching device identifying the service object as an example for illustration. Figure 3 As shown, Figure 3 This diagram illustrates how the network performance of a service object is measured using the network performance measurement system provided in this application. It is understood that this method is also applicable to scenarios where the first / second device constructs the header and tail packets, or the second device constructs the header packet and the first device constructs the tail packet, etc. The process for the network performance measurement system to measure the network performance of a specific service object is as follows: 1. Manage the rules for generating object identification for devices.
[0106] 2. The management device distributes object identification rules to the first device and the second device, as well as to at least one of the first switching device and the second switching device.
[0107] 3. The first device constructs the first message of the business object according to the object identification rules.
[0108] 4. The first device sends the first message to the second device.
[0109] 5. The first switching device identifies the first message according to the object identification rules, extracts the service object identifier in the first message, and records the first time the first message is received.
[0110] 6. The first switching device forwards the first message to the second device.
[0111] 7. The second device constructs the tail message of the business object according to the object identification rules.
[0112] 8. The second device sends a tail message to the first device.
[0113] 9. The first switching device identifies the tail message according to the object identification rules, extracts the service object identifier in the tail message, and records the second time when the tail message is forwarded to the first device.
[0114] 10. The first switching device forwards the tail message to the first device.
[0115] 11. The first switching device associates the first and last messages of the service object with the service object identifier, and obtains the object measurement information according to the first time and the second time.
[0116] 12. The first switching device sends object measurement information to the management device.
[0117] 13. Analyze the causes of business anomalies and define the problem boundaries based on the object measurement information.
[0118] The specific implementation of the above process can be referred to the operations corresponding to the management device, the first device, the second device, the first switching device, and the second switching device in the network performance measurement system embodiment, so it will not be repeated here.
[0119] like Figure 4 As shown, Figure 4 This is a flowchart illustrating a first embodiment of the network performance measurement method provided in this application. The executing entity in this embodiment is a switching device. The switching device is used to forward packets between a first device and a second device, for example, forwarding packets from the first device to the second device, and forwarding packets from the second device to the first device. This embodiment includes steps S401 and S402.
[0120] S401: The switching device acquires the first message at the first time and the second message at the second time. The first time is the time when the switching device receives or forwards the first message, and the second time is the time when the switching device receives or forwards the second message. The first message is the first message of the first service object, and the second message is the last message of the first service object. The first message and the second message are identified by the switching device according to the object identification rule corresponding to the first service object. The first service object indicates the message interaction stage to be measured in the service interaction process between the first device and the second device. The object identification rule is issued by the management device to the switching device. The first message and the second message include the service object identifier of the first service object.
[0121] S402: The switching equipment obtains the object measurement information corresponding to the first service object based on the first time and the second time.
[0122] Steps S401 and S402 can be referred to the corresponding operations performed by the switching equipment in the network performance measurement system, so they will not be repeated here.
[0123] like Figure 5 As shown, Figure 5 This is a flowchart illustrating a second embodiment of the network performance measurement method provided in this application. The execution subject of this embodiment is a target device. The target device includes a first device and a second device. This embodiment includes steps S501-S503.
[0124] S501: The target device receives the object identification rules of the first service object from the management device.
[0125] S502: The target device constructs the first message and the last message of the first service object according to the object identification rules, and obtains the first message and the second message. The first message and the second message include the service object identifier of the first service object.
[0126] S503: The target device forwards the first message and the second message through the switching device, so that the switching device can identify the first message and the second message according to the object identification rules, and obtain the object measurement information according to the first time of the first message and the second time of the second message. The first time is the time when the switching device receives or forwards the first message, and the second time is the time when the switching device receives or forwards the second message.
[0127] Steps S501 to S503 can be referred to the corresponding operations performed by the first and second devices in the network performance measurement system, so they will not be repeated here.
[0128] like Figure 6 As shown, Figure 6 This is a flowchart illustrating a third embodiment of the network performance measurement method provided in this application. The execution entity in this embodiment is a management device. This embodiment includes steps S601 and S602.
[0129] S601: The management device sends an object identification rule to the switching device, so that the switching device can identify the first message and the second message of the first service object according to the object identification rule, and obtain the first time of the first message and the second time of the second message, and obtain object measurement information according to the first time and the second time. The first time is the time when the switching device receives or forwards the first message, and the second time is the time when the switching device receives or forwards the second message. The first message is the first message of the first service object, and the second message is the last message of the first service object. The first service object indicates the message interaction stage to be measured in the service interaction process between the first device and the second device. The first message and the second message include the service object identifier of the first service object.
[0130] S602: The management device receives object measurement information from the first service object of the switching device.
[0131] Steps S601 and S602 can be referred to in detail to the corresponding operations performed by the management device in the network performance measurement system, and therefore will not be repeated here. Further, the management device obtains the network performance corresponding to the first service based on the object policy information of the first service object.
[0132] like Figure 7 As shown, Figure 7 A schematic diagram of a switching device according to an embodiment of the present application. The switching device 700 includes: The acquisition module 701 is used to acquire the first time of the first message and the second time of the second message. The first time is the time when the switching device receives or forwards the first message, and the second time is the time when the switching device receives or forwards the second message. The first message is the first message of the first service object, and the second message is the last message of the first service object. The first and second messages are identified by the switching device according to the object identification rules corresponding to the first service object. The first service object indicates the message interaction stage to be measured in the service interaction process between the first device and the second device. The object identification rules are issued by the management device to the switching device. The first and second messages include the service object identifier of the first service object.
[0133] The acquisition module 701 is also used to acquire object measurement information corresponding to the first business object based on the first time and the second time.
[0134] In some possible implementations, the first message and the second message include a business object identifier of the first business object, which is used to associate the first message and the second message.
[0135] In some possible implementations, the object identification rule includes a first target field and a first target value corresponding to the first target field, and a second target field and a second target value corresponding to the second target field. The first target value is used to identify the first message, and the second target value is used to identify the second message. The first target value and the second target value are different.
[0136] In some possible implementations, the first message includes a first target value added by the first or second device according to object identification rules, and the second message includes a second target value added by the first or second device according to object identification rules.
[0137] In some possible implementations, the first or second message is a request message, response message, first data message, or last data message in the message exchange phase.
[0138] In some possible implementations, the switching device 700 also includes: The sending module 702 is used to send object measurement information to the management device when the difference between the second time and the first time is greater than a first threshold, and / or when the switching device detects a message abnormal event in the first service object between the first time and the second time. The message abnormal event includes a message forwarding time greater than the second threshold or message loss.
[0139] In some possible implementations, the object measurement information includes a first delay, which is the difference between a second time and a first time, wherein: a first message originates from a first device, a second message originates from a second device, the first time is the time when the switching device receives the first message, and the second time is the time when the switching device forwards the second message to the first device; or a first message originates from a second device, a second message originates from a first device, the first time is the time when the switching device forwards the first message to the first device, and the second time is the time when the switching device receives the second message; or both the first and second messages originate from the first device, the first time is the time when the switching device receives the first message, and the second time is the time when the switching device receives the second message; or both the first and second messages originate from the second device, the first time is the time when the switching device forwards the first message to the first device, and the second time is the time when the switching device forwards the second message to the first device.
[0140] In some possible implementations, the object measurement information also includes a second delay. The acquisition module 701 is also used to acquire the second delay based on the third time and the first time of the third message. The third message is the first message of the second service object. The third time is the time when the switching device receives or forwards the third message. The second service object is the previous service object of the first service object identified by the switching device. The second service object and the first service object belong to the same service interaction process. The second delay is the difference between the first time and the third time.
[0141] In some possible implementations, object measurement information includes first time and second time.
[0142] like Figure 8 As shown, Figure 8 This is a schematic diagram of an embodiment of the network performance measurement device provided in this application. The network performance measurement device 800 includes a processor 801 and a memory 802. The processor 801 is coupled to the memory 802, which stores instructions. The processor 801 is configured to execute the instructions stored in the memory 802, performing the aforementioned... Figures 4 to 6 Any of the network performance measurement methods.
[0143] The network performance measurement device 800 can be a switching device, management device, first device, or second device in a network performance measurement system.
[0144] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer, implements the network performance measurement method flow of any of the above method embodiments.
[0145] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0146] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between devices or units, and may be electrical or other forms.
[0147] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0148] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0149] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the technical solution of this application can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A measurement method, characterized in that, The method includes: The switching device records the first time, which is the time when the switching device forwards the first message to the storage device. The first message is a data write service request message sent by the server to the storage device. The switching device is a switching device connected to the storage device. Record a second time, which is the time when the switching device receives the second message, and the second message is the message sent by the storage device to the server after receiving the request message; A first delay is obtained based on the first time and the second time, wherein the first delay indicates the processing delay of the storage device.
2. The method according to claim 1, characterized in that, The first message and the second message are NVMe protocol messages.
3. The method according to claim 2, characterized in that, The first message and the second message are messages of the NVMe over Fabric protocol.
4. The method according to any one of claims 1 to 3, characterized in that, The first latency anomaly indicates that performance jitter on the storage device side has caused abnormal service performance.
5. The method according to any one of claims 1 to 4, characterized in that, The first delay is the difference between the second time and the first time.
6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: Report the first delay to the management device.
7. The method according to any one of claims 1 to 6, characterized in that, The processing latency is the latency of the storage device processing the first message.
8. A measurement method, characterized in that, The method includes: The switching device records the first time, which is the time when the switching device forwards the first message to the server. The first message is a response message for the data write service sent by the storage device to the server. The switching device is a switching device connected to the server. Record a second time, which is the time when the switching device receives the second message. The second message is the first data message sent by the server to the storage device after receiving the first message. A first delay is obtained based on the first time and the second time, and the first delay indicates the processing delay of the server.
9. The method according to claim 8, characterized in that, The first message and the second message are NVMe protocol messages.
10. The method according to claim 8 or 9, characterized in that, The first message and the second message are messages of the NVMe over Fabric protocol.
11. The method according to any one of claims 8 to 10, characterized in that, The first latency anomaly indicates that performance fluctuations on the server side have caused abnormal service performance.
12. The method according to any one of claims 8 to 11, characterized in that, The first delay is the difference between the second time and the first time.
13. The method according to any one of claims 8 to 12, characterized in that, The method further includes: Report the first delay to the management device.
14. The method according to any one of claims 8 to 13, characterized in that, The processing delay is the delay in which the server processes the first message.
15. A measuring device, characterized in that, The apparatus includes a processor and a memory, the processor being coupled to the memory and configured to execute instructions stored in the memory to implement the method of any one of claims 1 to 14.
16. A switching device, characterized in that, The switching device includes an acquisition module, which is used to implement the method of any one of claims 1 to 14.
17. A computer-readable storage medium, characterized in that, Includes instructions that, when executed, implement the method of any one of claims 1 to 14.