Data monitoring method, switch, electronic device, and medium
By deploying ECPUs in the switch in conjunction with Host CPUs, and using port mode and stream mode for data monitoring, the timeliness problem of data monitoring in AI training scenarios in intelligent computing centers is solved, achieving millisecond-level data monitoring results.
Patent Information
- Application Number
- PCT/CN2024/102115
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2026-01-02
AI Technical Summary
In AI training scenarios at intelligent computing centers, conventional data monitoring methods for switches cannot capture sudden AI data spikes at the millisecond level in a timely manner, and the host CPU resources are insufficient, making it difficult to achieve millisecond-level data monitoring.
By deploying an ECPU in the switch to work in conjunction with a Host CPU, data monitoring is performed using port mode and stream mode. The ECPU acquires monitoring metric parameters within millisecond intervals and forwards them to the service analyzer for analysis via the Host CPU.
It achieves millisecond-level data monitoring, promptly capturing sudden AI data events and improving the accuracy and real-time performance of data monitoring.
Smart Images

Figure CN2024102115_02012026_PF_FP_ABST
Abstract
Description
Data monitoring method, switch, electronic device and medium TECHNICAL FIELD
[0001] The present application relates to network communication technology, in particular to a data monitoring method, a switch, an electronic device and a medium. BACKGROUND
[0002] In an AI training scenario of an intelligent computing center, communication is required between training nodes in a distributed computing cluster. The data of the communication can be referred to as AI data. In a specific application, the AI data communicated between the training nodes generally passes through a switch.
[0003] The change trend of AI data passing through a local port of the switch is generally represented by a waveform. The duration of a wave crest can be on the order of milliseconds. According to a conventional data monitoring method of the switch, such as monitoring the bandwidth of the port once every set time, for example, 5 seconds, the conventional data monitoring method cannot capture the actual situation of AI data burst in time because the monitoring period used by the conventional data monitoring method (generally on the order of seconds, such as 10 seconds) is much larger than the wave crest duration on the order of milliseconds. Moreover, the control plane of the switch, such as a Host CPU, is shared by multiple tasks and does not have sufficient resources to support the data monitoring on the order of milliseconds, which further increases the difficulty of capturing the actual burst situation of AI data. BRIEF DESCRIPTION OF DRAWINGS
[0004] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and serve to explain the principles of the present disclosure, together with the description.
[0005] FIG. 1 is a structure diagram of a switch provided by an embodiment of the present application;
[0006] FIG. 2 is a flowchart of a method provided by an embodiment of the present application;
[0007] FIG. 3 is an internal networking structure diagram of a switch provided by an embodiment of the present application;
[0008] FIG. 4 is another internal networking structure diagram of a switch provided by an embodiment of the present application;
[0009] FIG. 5 is a structure diagram of a switch provided by an embodiment of the present application;
[0010] FIG. 6 is a structure diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0011] The exemplary embodiments will be described in detail below with reference to the drawings. The following description is only exemplary and is not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with aspects of the present application.
[0012] In order to better understand the technical solutions provided by the embodiments of the present application, and to make the above-mentioned purposes, features and advantages of the embodiments of the present application more apparent and easy to understand, the technical solutions in the embodiments of the present application will be further described in detail below with reference to the drawings.
[0013] First, the structure of the switch will be described below:
[0014] As shown in FIG. 1, the switch includes a switch (Switch) chip and a host (Host) CPU. The Switch chip and the Host CPU are independently deployed.
[0015] In the present embodiment, the Host CPU is a carrier of the control plane in the switch, and the Switch chip is a carrier of the forwarding plane in the switch. The Host CPU accesses the Switch chip, such as accessing the local registers and table entries of the Switch chip, through a PCIE interface.
[0016] In the present embodiment, the Switch chip is deployed with at least one ECPU. The ECPU here is a CPU built-in on the Switch chip. Alternatively, the CPU built-in on the Switch chip can be an embedded CPU, such as an ARM CPU, and the present embodiment does not specifically limit it.
[0017] In the present embodiment, each ECPU is configured with a separate hardware channel for accessing registers and flow tables, as shown in FIG. 1.
[0018] In combination with the switch structure shown in FIG. 1, the present embodiment does not perform data monitoring by the Host CPU alone, but cooperates with the Host CPU and the ECPU to perform data monitoring, so as to realize millisecond-level or even time units below milliseconds, such as microsecond-level data monitoring, and timely capture data change situations occurring in milliseconds or time units below milliseconds, such as microsecond-level, which can timely capture the actual situation of AI data burst in the AI training scene of the intelligent computing center.
[0019] As an embodiment, when the Host CPU and the ECPU cooperate to perform data monitoring, the ECPU has a corresponding data monitoring mode. Here, the data monitoring mode can be a port mode or a flow mode.
[0020] As an embodiment, when the ECPU performs data monitoring in the port mode, the ECPU communicates with the Host CPU to obtain port monitoring index items, such as a port rate, an occupancy of a buffer configured for the port, a number of Explicit Congestion Notification (ECN) stains, a number of Priority based Flow Control (PFC) packets, and the like. Then, the ECPU monitors at least one port of the switch in the port mode according to a first set period to obtain port monitoring index parameters. Then, the ECPU sends the obtained port monitoring index parameters to the Host CPU for forwarding to the traffic analyzer by the Host CPU to analyze the data monitoring. Finally, the ECPU communicates with the Host CPU to enable the Host CPU to obtain the port monitoring index parameters monitored by the ECPU and to forward the port monitoring index parameters to the traffic analyzer to analyze the data monitoring.
[0021] Optionally, the first set period can be a default period or a period configured by the Host CPU. In a specific implementation, the first set period can be 2 ms, 5 ms, 10 ms, or the like. The embodiment is not limited specifically.
[0022] Optionally, in the embodiment, the at least one port monitored by the ECPU can include all ports of the switch or can be a port managed by the ECPU to which the ECPU is assigned. The embodiment is not limited specifically. Optionally, if there are at least two ECPU on the switch chip, all ports of the switch can be divided to be assigned to different ECPU for management by the different ECPU. The sum of the ports assigned to the different ECPU is all ports of the switch.
[0023] As another embodiment, when the ECPU performs data monitoring in the flow mode, the ECPU obtains data packet monitoring index parameters associated with data packets meeting a specified data characteristic every second set period, and sends the obtained data packet monitoring index parameters to the Host CPU for forwarding to the traffic analyzer by the Host CPU to analyze the data monitoring. Finally, the ECPU communicates with the Host CPU to enable the Host CPU to obtain the data packet monitoring index parameters monitored by the ECPU and to forward the data packet monitoring index parameters to the traffic analyzer to analyze the data monitoring.
[0024] Optionally, the data packet monitoring index parameters can be a number of data packets meeting the specified data characteristic, and the like. The embodiment is not limited specifically.
[0025] Optionally, the data packet monitoring index parameter is obtained based on an ACL rule associated with the specified data feature and in combination with the ACL rule binding monitoring index component. Here, the binding monitoring index component is used to record the data packet monitoring index parameter based on the ACL rule. For example, the data packet monitoring index parameter can be the number of data packets meeting the specified data feature, and the monitoring index component is a counter.
[0026] Here, the ACL rule is used to indicate that when a data packet meeting the specified data feature is received, the monitoring index component is controlled to record the corresponding data packet monitoring index parameter. For example, the data packet monitoring index parameter can be the number of data packets meeting the specified data feature, and the ACL rule is used to indicate that when a data packet meeting the specified data feature is received, the monitoring index component is controlled to increase the original data packet monitoring index parameter by a set value, such as 1.
[0027] In combination with the above description, the method provided by the embodiments of the present application is described as follows:
[0028] Referring to FIG. 2, FIG. 2 is a flowchart of the method provided by the embodiments of the present application. The flowchart is applied to the above-mentioned switch. As shown in FIG. 2, the flowchart can include the following steps:
[0029] In step 201, any ECPU executes step 202 when the current data monitoring mode is the port mode, and executes step 203 when the current data monitoring mode is the flow mode.
[0030] In the embodiments, whether the current data monitoring mode of any ECPU is the port mode or the flow mode is configured based on the current service requirement. For example, if the current ECPU needs to implement high-precision monitoring of the port, the current data monitoring mode of the ECPU can be configured as the port mode. When the current ECPU needs to implement monitoring with data flow as the granularity, such as monitoring the burst situation of the data flow, the current data monitoring mode of the ECPU can be configured as the flow mode.
[0031] In step 202, the port monitoring index parameter associated with at least one port of the switch is obtained every first set period, and the obtained port monitoring index parameter is sent to the Host CPU for forwarding to the service analyzer by the Host CPU to analyze the data monitoring situation when the time for communicating with the Host CPU arrives.
[0032] As described above, the unit of the first set period is millisecond, or a time unit below millisecond, such as microsecond, and the embodiments are not specifically limited.
[0033] As described above, the port monitoring index parameter obtained by the ECPU in any cycle includes a real parameter value corresponding to at least one port monitoring index item in the current cycle. The port monitoring index item is issued by the Host CPU to the ECPU.
[0034] As an embodiment, the port monitoring index parameter obtained in any cycle is used to reflect the real network situation in the current cycle. For example, the port monitoring index parameter includes at least one of the following: port rate, occupancy of the configured buffer of the port, ECN coloring quantity, and PFC transceiving packet quantity.
[0035] The ECN coloring quantity refers to the total number of data packets carrying ECN marks sent by each port of the switch in the current cycle, or the number of data packets carrying ECN marks sent through the at least one port in the current cycle, the at least one port being a port managed by the ECPU. Here, the sending of the data packet carrying the ECN mark is based on the ECN mechanism. The ECN mechanism is to notify the sending end to reduce the sending rate to avoid packet loss by sending a data packet carrying an ECN mark when the ECPU senses that the port is congested.
[0036] The PFC transceiving packet quantity refers to the number of PFC packets sent and the number of PFC packets received in the current cycle. Here, the sending of the PFC packet is based on the PFC mechanism. The PFC mechanism is to send a PAUSE frame to the sending end to temporarily prevent the sending end from sending more data packets when the ECPU senses that the data storage of the buffer configured for a port exceeds the set buffer threshold. The buffer threshold is relatively low so that the sending end has time to stop transmitting data packets and can ensure that when the data packets received after the sending of the PAUSE frame are stored in the buffer, the buffer overflow does not occur, preventing data packet loss.
[0037] In step 203, the data packet monitoring index parameter associated with the data packet meeting the specified data characteristics is obtained every second set period, and when the time for communication with the Host CPU arrives, the obtained data packet monitoring index parameter is sent to the Host CPU for forwarding to the service analyzer by the Host CPU to analyze the data monitoring situation.
[0038] As described above, the unit of the second set period is millisecond, or a time unit below millisecond such as microsecond, etc., which is not specifically limited in the embodiment. As an embodiment, the first set period and the second set period are the same or different, which is not specifically limited in the embodiment.
[0039] In the embodiment, the specified data characteristics such as data type (such as the characteristics of lossless message), five-tuple, etc. are not specifically limited in the embodiment.
[0040] As described above, the data packet monitoring index parameter is obtained based on the ACL rule associated with the specified data feature and in combination with the monitoring index component bound to the ACL rule. Here, the bound monitoring index component is used to record the data packet monitoring index parameter based on the ACL rule. For example, the data packet monitoring index parameter can be the number of data packets meeting the specified data feature, and the monitoring index component is a counter (Counter).
[0041] The ACL rule is used to indicate that when a data packet meeting the specified data feature is received, the monitoring index component is controlled to record the corresponding data packet monitoring index parameter. In a specific implementation, the ACL rule can include a matching item and an action, for example, the matching item is a five-tuple of a data packet, and the action is to record the data packet monitoring index parameter. For example, the ACL rule indicates that when a data packet carrying the five-tuple is received, the following action is performed: update the count of the Counter corresponding to the five-tuple, for example, increase the original count by a set value, for example, 1.
[0042] So far, the flow shown in FIG. 2 is completed.
[0043] As can be seen from the flow shown in FIG. 2, in the embodiment, the data monitoring is no longer performed by the Host CPU of the switch alone, but is performed by the Host CPU and the Switch chip (specifically, the CPU built-in in the Switch chip, referred to as ECPU) on the switch in cooperation. The data monitoring in the millisecond level or even in the time unit below the millisecond level, such as the microsecond level, is performed by the Switch chip (specifically, the CPU built-in in the Switch chip, referred to as ECPU), and is sent to the Host CPU for forwarding to the service analyzer for analysis by the Host CPU. This achieves the millisecond-level data monitoring by the cooperation of the local Host CPU of the switch and the ECPU on the Switch chip. Further, the millisecond-level data monitoring by the cooperation of the local Host CPU of the switch and the ECPU on the Switch chip in the embodiment can timely capture the actual situation of AI data burst in the AI training scene of the intelligent computing center.
[0044] Next, a specific embodiment is used to describe the port mode:
[0045] Embodiment 1:
[0046] Referring to FIG. 3, FIG. 3 is a diagram of an internal networking structure of a switch according to an embodiment of the present application. In FIG. 3, the switch includes a Switch chip and a Host CPU. The Switch chip deploys two ECPU, denoted as ECPU 301 and ECPU 302. Each ECPU is responsible for part of the ports of the switch. The ECPU and the Host CPU communicate through a shared memory.
[0047] Suppose that the data monitoring mode of the ECPU 301 is a port mode. In order to ensure monitoring performance, the Host CPU configures port monitoring index items in the shared memory. The ECPU 301 reads the port monitoring index items such as port rate, occupancy of the buffer configured for the port, number of ECN coloring for displaying congestion notification, and number of PFC packets from the shared memory.
[0048] As an embodiment, the Host CPU also configures a monitoring period of the port monitoring index items, such as the first set period mentioned above, in the shared memory. The ECPU 301 reads the first set period from the shared memory. The first set period can be configured to 1 ms at the minimum, or a larger period such as 2 ms, 5 ms, 10 ms, etc.
[0049] In the port mode, the ECPU 301 reads real parameter values corresponding to the port monitoring index items such as port data size (for calculating port rate), occupancy of the buffer configured for the port, number of ECN coloring for displaying congestion notification, and number of PFC packets from the registers corresponding to the ports managed by the ECPU every configured first set period. The real parameter values are collectively referred to as port monitoring index parameters.
[0050] After the ECPU 301 reads the port monitoring index parameters in the current period in the port mode, the ECPU 301 saves the port monitoring index parameters in the local memory. Limited by the memory storage space of the ECPU 301, such as that the local memory of the ECPU 301 can save at most 500 port monitoring index parameters obtained in the first set period, based on this, the present embodiment sets the period for the ECPU 301 to communicate with the Host CPU based on the memory storage space of the ECPU 301. For example, if the local memory of the ECPU 301 can save at most 500 port monitoring index parameters obtained in the first set period, then the period for the ECPU 301 to communicate with the Host CPU can be 500 first set periods.
[0051] Based on this, the ECPU 301 sends the port monitoring index parameters recorded in the local memory to the Host CPU and clears the local memory (equivalent to deleting the recorded data packet monitoring index parameters in the local memory) when the time for the Host CPU to communicate at the current time (i.e., the time for the Host CPU to communicate arrives) is, for example, exactly 500 first set periods.
[0052] The Host CPU receives the port monitoring index parameters uploaded by the ECPU 301 and sends the acquired port monitoring index parameters to the service analyzer at a period interval of communication between the Host CPU and the service analyzer. The period interval is, for example, 5000 first set periods as described above, which is much larger than the first set period and also larger than the time interval of communication between the ECPU 301 and the Host CPU. For example, the Host CPU sends the acquired port monitoring index parameters to the service analyzer every 5 seconds.
[0053] The service analyzer presents the port monitoring index parameters such as the rate change of the specified port or all ports within 1 ms, the ECN dye quantity change trend, the PFC transmission frequency change, and the change trend of the occupation of the configured buffer of the port through graphics, and finally realizes high-precision monitoring based on the port and reflects the real situation of the network in real time.
[0054] The processing manner of the ECPU 302 in the port mode is similar, which is not described herein again.
[0055] Thus far, the description of the embodiment 1 shown in FIG. 3 is completed.
[0056] The flow mode is described below through a specific embodiment:
[0057] Embodiment 2:
[0058] Referring to FIG. 4, FIG. 4 is another internal networking structure diagram of a switch provided by an embodiment of the present application. In FIG. 4, the switch includes a Switch chip and a Host CPU. The Switch chip deploys two ECPU, which are denoted as ECPU 501 and ECPU 502. As shown in FIG. 4, the Switch chip can further include a data flow monitoring component. FIG. 4 takes the data flow monitoring component as an example of the Ifit component. The data flow monitoring component is taken as an example of the Ifit component in the following description:
[0059] If the current service requirement is to monitor the traffic burst situation (millisecond-level granularity monitoring) in the granularity of data flow, the data features (referred to as specified data features) of the data flow to be monitored can be specified in advance. The data features are, for example, five-tuple or other features (such as the features of lossless packets, etc.).
[0060] As an embodiment, the embodiment can configure the specified data features of each data flow that needs to be monitored in the Ifit component.
[0061] In a specific implementation, the monitoring mode of the Ifit component is a high-precision monitoring mode (which can achieve millisecond-level monitoring). If the Ifit component monitors a data packet that meets the specified data features in the high-precision monitoring mode, and finds that there is no ACL rule associated with the specified data features locally, it is considered that the received data packet at this time is the first data packet that meets the specified data features, and a notification will be sent to the Host CPU.
[0062] After the Host CPU receives the notification, the ACL rule associated with the specified data features is allocated. The ACL rule here is bound to the monitoring index component. The monitoring index component is used to record the data packet monitoring index parameter based on the ACL rule. As an embodiment, the ACL rule here can include a matching item and an action item. The matching item can be the 5-tuple of the first data packet. The action item can be to increase the counter (that is, the counter count is the data packet monitoring index parameter described above) bound to the ACL rule by a set value once the packet matches the matching item. The counter is a resource allocated for the ACL. It should be noted that in the embodiment, in the AI training scene of the intelligent computing center, the data flow is generally not too much, and the corresponding ACL rule is also not too much, which does not occupy too many resources.
[0063] The ECPU such as the ECPU 401 shown in FIG. 4 scans the monitoring index component such as the counter bound to each ACL rule every second set period to read the data packet monitoring index parameter in the flow mode.
[0064] Still taking the ECPU 401 as an example, the ECPU 401 saves the read data packet monitoring index parameter in the local memory in the flow mode. Limited by the memory storage space of the ECPU 401, for example, the ECPU 401 local memory can save at most 500 data packet monitoring index parameters obtained in the second set period, based on which, the embodiment will set the period of communication between the ECPU 401 and the Host CPU based on the memory storage space limitation of the ECPU 401. For example, the ECPU 401 local memory can save at most 500 data packet monitoring index parameters obtained in the second set period, and at this time, the period of communication between the ECPU 401 and the Host CPU can be 500 second set periods.
[0065] Based on this, the ECPU 401 sends the recorded packet monitoring index parameters in the local memory to the Host CPU and clears the local memory (equivalent to deleting the recorded packet monitoring index parameters in the local memory) when the time for the Host CPU to communicate arrives, i.e., the time for the Host CPU to communicate arrives, which is, for example, exactly 500 second set periods.
[0066] The Host CPU receives the port monitoring index parameters sent by the ECPU 401 and sends the obtained port monitoring index parameters to the service analyzer every communication period interval between the Host CPU and the service analyzer. The communication period interval is, for example, 5000 first set periods, which is much larger than the first set period and also larger than the communication interval between the ECPU 401 and the Host CPU. For example, the Host CPU sends the obtained packet monitoring index parameters to the service analyzer every 5 seconds.
[0067] The service analyzer presents each packet monitoring index parameter, such as each packet monitoring index parameter of each data stream monitored in 1 ms, in a graphical manner to achieve high-precision monitoring of the data stream and reflect the real situation of the network in real time.
[0068] The processing manner of the ECPU 402 in the flow mode is similar, which is not described here.
[0069] Thus far, the description of the embodiment 2 shown in FIG. 4 is completed.
[0070] The method provided in the embodiments of the present application is described above, and the device provided in the embodiments of the present application is described below.
[0071] Referring to FIG. 5, FIG. 5 is a structure diagram of a switch provided in an embodiment of the present application. The switch includes a Switch chip and a Host CPU deployed independently of the Switch chip; the Switch chip is deployed with at least one ECPU, and the ECPU is a CPU built in the Switch chip;
[0072] When the current data monitoring mode of any ECPU is the port mode, the ECPU obtains port monitoring index parameters associated with at least one port of the switch every first set period; and when the time for the Host CPU to communicate arrives, the ECPU sends the obtained port monitoring index parameters to the Host CPU for forwarding to a service analyzer by the Host CPU to analyze the data monitoring situation.
[0073] When any ECPU is in a current data monitoring mode of a flow mode, a data packet monitoring index parameter associated with a data packet meeting a specified data characteristic is obtained every second set period, and when a time for communicating with the Host CPU arrives, the obtained data packet monitoring index parameter is sent to the Host CPU for forwarding to a service analyzer by the Host CPU to analyze data monitoring conditions.
[0074] Optionally, the first set period and the second set period are the same or different; the first set period and the second set period are in units of milliseconds or time units below milliseconds.
[0075] The obtaining of the port monitoring index parameter associated with the at least one port of the switch every first set period further includes recording the obtained port monitoring index parameter to a local memory of the ECPU.
[0076] The sending of the obtained port monitoring index parameter to the Host CPU further includes deleting the recorded port monitoring index parameter in the local memory.
[0077] The obtaining of the data packet monitoring index parameter associated with the data packet meeting the specified data characteristic every second set period further includes recording the obtained data packet monitoring index parameter to a local memory of the ECPU.
[0078] The sending of the obtained data packet monitoring index parameter to the Host CPU further includes deleting the recorded data packet monitoring index parameter in the local memory.
[0079] The obtained port monitoring index parameter in any period includes a real parameter value corresponding to at least one port monitoring index item in the period; the port monitoring index item is issued by the Host CPU to the ECPU.
[0080] The obtained port monitoring index parameter in any period is used to reflect a real network condition in the period.
[0081] The port monitoring index parameter includes at least one of:
[0082] a port rate, an occupancy of a buffer configured for the port, a number of congestion notification ECN markings, and a number of priority-based flow control (PFC) packets transmitted and received in the period; the number of ECN markings is a number of data packets carrying ECN markings transmitted in the period or a number of data packets carrying ECN markings transmitted through the at least one port in the period, the at least one port being a port managed by the ECPU; the number of PFC packets is a number of PFC packets transmitted and a number of PFC packets received in the period.
[0083] The Switch chip further comprises a data flow monitoring component; the data flow monitoring component notifies the Host CPU when a first data packet conforming to a specified data feature is monitored, so as to assign an ACL rule associated with the specified data feature by the Host CPU; the ACL rule binds a monitoring index component, and the monitoring index component is used to record a data packet monitoring index parameter based on the ACL rule;
[0084] The data packet monitoring index parameter associated with the data packet conforming to the specified data feature is obtained every second set period, which comprises: reading a data packet monitoring index parameter from the monitoring index component bound by the ACL rule associated with the specified data feature every second set period.
[0085] The monitoring index component is a counter; and the data packet monitoring index parameter refers to the number of data packets conforming to the specified data feature.
[0086] The time for any ECPU to communicate with the Host CPU is set based on the space size of the local memory of the ECPU; the interval of the time for any ECPU to communicate with the Host CPU is greater than the first set period and the second set period.
[0087] The ECPU and the Host CPU communicate through a shared storage medium memory;
[0088] The obtained port monitoring index parameter is transmitted to the Host CPU, which comprises: transmitting the obtained port monitoring index parameter to the shared storage medium, so that the Host CPU obtains the port monitoring index parameter from the shared storage medium;
[0089] The obtained data packet monitoring index parameter is transmitted to the Host CPU, which comprises: transmitting the obtained data packet monitoring index parameter to the shared storage medium, so that the Host CPU obtains the data packet monitoring index parameter from the shared storage medium.
[0090] So far, the structure of the switch shown in FIG. 5 is described.
[0091] The embodiment of the present application further provides a hardware structure of the above-described device, and FIG. 6 is a structure diagram of an electronic device provided by the embodiment of the present application. As shown in FIG. 6, the hardware structure can comprise: a processor and a machine readable storage medium, the machine readable storage medium storing machine executable instructions capable of being executed by the processor; and the processor is used to execute the machine executable instructions to implement the method disclosed in the above examples of the present application.
[0092] Based on the same application concept as the above method, the embodiment of the present application further provides a machine readable storage medium, which stores machine executable instructions capable of being executed by a processor; the machine executable instructions are executed by the processor to implement the processing of the above embodiment of the present application.
[0093] For example, the machine readable storage medium can be a RAM (Random Access Memory), a volatile memory, a non-volatile memory, a flash memory, a storage drive (such as a hard disk drive), a solid state disk, or similar storage medium, or a combination thereof.
[0094] For the convenience of description, the above apparatus is described in various units in terms of functions and is described respectively. Of course, the functions of the units can be implemented in one or more software and / or hardware in the implementation of the present application.
[0095] Those skilled in the art should understand that the embodiments of the present application can adopt a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects.
[0096] The above only describes the embodiments of the present application and is not used to limit the present application. Those skilled in the art can make various modifications and changes to the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the scope of claims of the present application.
Claims
1. A data monitoring method, characterized by, The method is applied to a switch; the switch comprises a switch chip and a host CPU deployed independently of the switch chip; the switch chip is deployed with at least one ECPU, the ECPU being a CPU built-in on the switch chip; the method comprises: Any ECPU obtains port monitoring index parameters associated with at least one port on the switch every first set period when the current data monitoring mode is a port mode; and sends the obtained port monitoring index parameters to the Host CPU for forwarding to a traffic analyzer by the Host CPU to analyze data monitoring conditions when the time for communication with the Host CPU arrives. Any ECPU obtains packet monitoring index parameters associated with data packets meeting specified data characteristics every second set period when the current data monitoring mode is a flow mode; and sends the obtained packet monitoring index parameters to the Host CPU for forwarding to a traffic analyzer by the Host CPU to analyze data monitoring conditions when the time for communication with the Host CPU arrives.
2. The method of claim 1, wherein, The first set period and the second set period are the same or different; The first set period and the second set period are in units of milliseconds or time units below milliseconds.
3. The method of claim 1, wherein, The obtaining of the port monitoring index parameters associated with at least one port on the switch every first set period further comprises recording the obtained port monitoring index parameters to local memory of the ECPU; The sending of the obtained port monitoring index parameters to the Host CPU further comprises deleting the recorded port monitoring index parameters from the local memory.
4. The method of claim 1, wherein, The obtaining of the packet monitoring index parameters associated with data packets meeting specified data characteristics every second set period further comprises recording the obtained packet monitoring index parameters to local memory of the ECPU; The sending of the obtained packet monitoring index parameters to the Host CPU further comprises deleting the recorded packet monitoring index parameters from the local memory.
5. The method of claim 1, wherein, The port monitoring index parameters obtained in any period comprise real parameter values corresponding to at least one port monitoring index item in the period; The port monitoring index item is issued to the ECPU by the Host CPU.
6. The method of claim 1, wherein, The port monitoring index parameters obtained in any period are used to reflect real network conditions in the period; The port monitoring index parameters comprise at least one of the following: Port rate, occupancy of a buffer configured for the port, number of congestion notification ECN markings, and number of priority-based flow control (PFC) packets transmitted and received in the period; the number of ECN markings refers to the number of data packets carrying ECN markings transmitted in the period, or the number of data packets carrying ECN markings transmitted through the at least one port managed by the ECPU in the period; the number of PFC packets refers to the number of PFC packets transmitted and received in the period.
7. The method of claim 1, wherein, The Switch chip further comprises a data flow monitoring component; The data flow monitoring component notifies the Host CPU when a first data packet conforming to a specified data feature is monitored, so that the Host CPU allocates an ACL rule associated with the specified data feature; the ACL rule binds a monitoring index component, which is used to record a data packet monitoring index parameter based on the ACL rule; The data packet monitoring index parameter associated with the data packet conforming to the specified data feature is obtained every second set period. The data packet monitoring index parameter associated with the data packet conforming to the specified data feature is obtained every second set period.
8. The method of claim 7, wherein, The monitoring index component is a counter; The data packet monitoring index parameter refers to the number of data packets conforming to the specified data feature.
9. The method according to claim 3 or 4, characterized in that, The time when any ECPU communicates with the Host CPU is set based on the space size of the local memory of the ECPU; The interval of the time when any ECPU communicates with the Host CPU is greater than the first set period and the second set period.
10. The method according to any one of claims 1 to 8, characterized in that, The ECPU and the Host CPU communicate through a shared storage medium memory; The obtained port monitoring index parameter is transmitted to the Host CPU by being transmitted to the shared storage medium, so that the Host CPU obtains the port monitoring index parameter from the shared storage medium; The obtained data packet monitoring index parameter is transmitted to the Host CPU by being transmitted to the shared storage medium, so that the Host CPU obtains the data packet monitoring index parameter from the shared storage medium.
11. A switch, characterized by The switch comprises a Switch chip and a Host CPU deployed independently of the Switch chip; the Switch chip is deployed with at least one ECPU, which is a CPU built-in on the Switch chip; When the current data monitoring mode is a port mode, any ECPU obtains a port monitoring index parameter associated with at least one port of the switch every first set period; when the time for communicating with the Host CPU arrives, the obtained port monitoring index parameter is transmitted to the Host CPU so that the Host CPU forwards it to a traffic analyzer to analyze the data monitoring situation. When the current data monitoring mode is a flow mode, any ECPU obtains a data packet monitoring index parameter associated with a data packet conforming to a specified data feature every second set period; when the time for communicating with the Host CPU arrives, the obtained data packet monitoring index parameter is transmitted to the Host CPU so that the Host CPU forwards it to a traffic analyzer to analyze the data monitoring situation.
12. The switch of claim 11, wherein, The first setting period and the second setting period are the same or different; the first setting period and the second setting period are in units of milliseconds or time units below milliseconds; and / or, The obtaining of the port monitoring index parameter associated with the at least one port of the switch at every first setting period further comprises recording the obtained port monitoring index parameter in a local memory of the ECPU; The sending of the obtained port monitoring index parameter to the Host CPU further comprises deleting the recorded port monitoring index parameter in the local memory; and / or, The obtaining of the packet monitoring index parameter associated with the data packet conforming to the specified data feature at every second setting period further comprises recording the obtained packet monitoring index parameter in a local memory of the ECPU; The sending of the obtained packet monitoring index parameter to the Host CPU further comprises deleting the recorded packet monitoring index parameter in the local memory; and / or, The obtained port monitoring index parameter at any period comprises a real parameter value corresponding to at least one port monitoring index item in the period; the port monitoring index item is issued by the Host CPU to the ECPU; and / or, The obtained port monitoring index parameter at any period is used to reflect the real network situation in the period; The port monitoring index parameter comprises at least one of the following: port rate, occupancy of the configured cache of the port, number of congestion notification ECN dyes, and number of priority-based flow control (PFC) transceiving packets; wherein the number of ECN dyes refers to the number of data packets carrying ECN marks sent in the period, or the number of data packets carrying ECN marks sent through the at least one port in the period, the at least one port being a port managed by the ECPU; the number of PFC transceiving packets refers to the number of PFC packets sent and the number of PFC packets received in the period; and / or, The Switch chip further comprises a data flow monitoring component; the data flow monitoring component notifies the Host CPU when a first data packet conforming to a specified data feature is monitored, so that the Host CPU allocates an ACL rule associated with the specified data feature; the ACL rule is bound to a monitoring index component, and the bound monitoring index component is used to record a packet monitoring index parameter based on the ACL rule; The obtaining of the packet monitoring index parameter associated with the data packet conforming to the specified data feature at every second setting period comprises reading the packet monitoring index parameter from the monitoring index component bound to the ACL rule associated with the specified data feature at every second setting period; and / or, The monitoring index component is a counter; and the packet monitoring index parameter refers to the number of data packets conforming to the specified data feature; and / or, The time for any ECPU to communicate with the Host CPU is based on the space size setting of the local memory of the ECPU; the interval of the time for any ECPU to communicate with the Host CPU is greater than the first setting period and also greater than the second setting period; and / or, The ECPU and the Host CPU communicate through a shared storage medium memory; The sending of the obtained port monitoring index parameter to the Host CPU comprises: transmitting the obtained port monitoring index parameter to the shared storage medium, so that the Host CPU obtains the port monitoring index parameter from the shared storage medium; The sending of the obtained data packet monitoring index parameter to the Host CPU comprises: transmitting the obtained data packet monitoring index parameter to the shared storage medium, so that the Host CPU obtains the data packet monitoring index parameter from the shared storage medium.
13. An electronic device, comprising: The electronic device comprises: a processor and a machine readable storage medium; The machine readable storage medium stores machine executable instructions capable of being executed by the processor; The processor is configured to execute the machine executable instructions to implement the method in any one of claims 1 to 10.
14. A machine-readable storage medium, characterized in that, The machine readable storage medium stores machine executable instructions capable of being executed by the processor; The machine executable instructions are executed by the processor to implement the method in any one of claims 1 to 10.
Citation Information
Patent Citations
Method and device and system of monitoring energy consumption of data network equipment
CN103095483A
Network traffic acquisition method
CN114598493A
Switch message monitoring network queuing system modeling method, system, chip and equipment
CN117354262A
IMS system flow dynamic supervision architecture based on switch chip
CN118041869A
Network device KPI monitors based on bitmaps
US20190230543A1