Port traffic processing method, device, computer equipment and storage medium

By collecting switch port traffic data in the SAN storage architecture, calculating bandwidth utilization and implementing emergency strategies, the problem of unstable traffic caused by multiple hosts sharing storage ports is solved, ensuring port load balancing and business performance, and improving user experience.

CN115665014BActive Publication Date: 2025-09-16PING AN YIZHANGTONG CLOUD TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211257303.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-14
Publication Date
2025-09-16
Estimated Expiration
2042-10-14

AI Technical Summary

Technical Problem

In a SAN storage architecture, when multiple hosts share a storage port, the continued growth of read and write traffic on one host can cause the shared storage port bandwidth utilization to approach 100%, affecting the read and write latency and traffic of other hosts. This raises the question of how to improve the stability of storage port traffic.

Method used

By collecting traffic data from storage area network switch ports, calculating bandwidth utilization, and obtaining emergency strategies when the threshold is exceeded, degradation or fuse measures are implemented, including host traffic degradation, storage volume traffic degradation, and backup traffic fuse, to ensure stable port traffic load.

Benefits of technology

The stability of port traffic has been improved, the normal performance of business has been ensured, and the user experience has been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115665014B_ABST
    Figure CN115665014B_ABST
Patent Text Reader

Abstract

The present application relates to the field of communication technology, and specifically discloses a port traffic processing method, apparatus, device, and storage medium. The port traffic processing method includes: collecting traffic data of a storage area network switch port in a preset unit time, and calculating the unit bandwidth utilization of the switch port based on the maximum traffic bandwidth of the switch port and the traffic data; when the unit bandwidth utilization exceeds the preset unit bandwidth utilization threshold and the switch port is a switch storage port, obtaining a preset emergency strategy; based on the emergency strategy, downgrading or fusing the traffic of the preset port, wherein the preset port is the switch storage port or the host port of the host accessing the switch storage port. This method improves the stability of port traffic and ensures that data analysis, data processing, and other services that require shared data can be carried out stably.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a port traffic processing method, apparatus, computer equipment, and storage medium. Background Art

[0002] In traditional SAN (Storage Area Network) storage architectures, service hosts access SAN storage arrays located on the same SAN fabric by connecting to an FC-SAN (Fibre Channel-Storage Area Network) network. In current mainstream enterprise-class high-end SANs, a single storage device is often shared by multiple hosts. For example, when the HBA (Host Bus Adapter) ports of multiple medical computer hosts simultaneously access one (or more) pairs of shared storage service front-end ports, the read and write traffic of one host will continue to increase, eventually causing the bandwidth utilization of the shared storage port to approach or even reach 100%, resulting in reduced or even no read and write traffic available to other hosts. This significantly impacts the read and write latency of other hosts. Therefore, improving the stability of storage port traffic and maintaining service performance has become a pressing technical issue. Summary of the Invention

[0003] The present application provides a port traffic processing method, apparatus, computer equipment, and storage medium to improve the stability of storage port traffic.

[0004] In a first aspect, the present application provides a port traffic processing method, the method comprising:

[0005] Collecting flow data of a storage area network switch port in a preset unit time, and calculating a unit bandwidth utilization rate of the switch port based on the maximum flow bandwidth of the switch port and the flow data;

[0006] When the unit bandwidth utilization exceeds a preset unit bandwidth utilization threshold and the switch port is a switch storage port, obtaining a preset emergency strategy;

[0007] Traffic of a preset port is degraded or cut off based on the emergency strategy, wherein the preset port is the switch storage port or a host port of a host accessing the switch storage port.

[0008] In a second aspect, the present application further provides a port traffic processing device, the device comprising:

[0009] a utilization calculation module, configured to collect flow data of a storage area network switch port in a preset unit time, and calculate a unit bandwidth utilization of the switch port based on the maximum flow bandwidth of the switch port and the flow data;

[0010] An emergency strategy acquisition module, configured to acquire a preset emergency strategy when the unit bandwidth utilization exceeds a preset unit bandwidth utilization threshold and the switch port is a switch storage port;

[0011] The traffic processing module is used to degrade or fuse the traffic of the preset port based on the emergency strategy, wherein the preset port is the switch storage port or the host port of the host accessing the switch storage port.

[0012] In a third aspect, the present application also provides a computer device, which includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement the port traffic processing method as described above when executing the computer program.

[0013] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the port traffic processing method as described above.

[0014] The present application discloses a method, apparatus, computer device, and storage medium for port traffic processing. The method collects traffic data from a storage area network switch port over a preset unit time period, and calculates the unit bandwidth utilization of the switch port based on the maximum traffic bandwidth of the switch port and the traffic data. When the unit bandwidth utilization exceeds a preset unit bandwidth utilization threshold and the switch port is a switch storage port, a preset emergency strategy is obtained. Based on the emergency strategy, the traffic of the preset port is downgraded or disconnected, wherein the preset port is the switch storage port or a host port of a host accessing the switch storage port. In this manner, the present invention collects traffic data from a storage area network switch port, and when the calculated unit bandwidth utilization exceeds the threshold, the traffic is downgraded or disconnected based on the emergency strategy. This ensures that the port does not occupy the traffic of other ports, ensuring that the traffic load of each port is normal, improving the stability of the port traffic, ensuring the normal performance of business operations, and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0016] Figure 1 This is a schematic flow chart of a port traffic processing method provided in an embodiment of the present application;

[0017] Figure 2 yes Figure 1 A schematic flow chart of the sub-steps of the port traffic processing method in FIG.

[0018] Figure 3 yes Figure 1 Another sub-step schematic flow chart of the port traffic processing method;

[0019] Figure 4 yes Figure 1 Another sub-step schematic flow chart of the port traffic processing method;

[0020] Figure 5 A schematic block diagram of a port traffic processing device provided in an embodiment of the present application;

[0021] Figure 6 A schematic block diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0023] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.

[0024] It should be understood that the terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0025] It should be further understood that the term “and / or” used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0026] Embodiments of the present application provide a port traffic processing method, apparatus, computer device, and storage medium. The port traffic processing method can be applied to a server. By collecting traffic data and calculating the bandwidth utilization of storage ports, combined with user-preset emergency strategies, the method can degrade or disconnect port traffic. The server can be a standalone server or a server cluster.

[0027] The following describes some embodiments of the present application in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features therein may be combined with each other.

[0028] See also Figure 1 , Figure 1 This is a schematic flow chart of a port traffic processing method provided by an embodiment of the present application. The port traffic processing method can be applied in a server to process the traffic of the storage port based on a preset emergency strategy.

[0029] like Figure 1 As shown, the port traffic processing method specifically includes steps S101 to S103.

[0030] S101: Collect flow data of a storage area network switch port in a preset unit time, and calculate a unit bandwidth utilization rate of the switch port based on a maximum flow bandwidth of the switch port and the flow data.

[0031] Collecting flow data of a storage area network switch port in a preset unit time, and calculating a unit bandwidth utilization rate of the switch port based on a maximum flow bandwidth of the switch port and the flow data, specifically includes: collecting flow data of the switch port in a preset unit time, and calculating the unit bandwidth utilization rate based on the maximum flow bandwidth of the switch port and the flow data.

[0032] In one embodiment, the preset unit collection time can be every minute or every second, etc. The automated program regularly (for example, every minute) collects traffic data from all ports of the SAN switch and calculates the bandwidth utilization of each port. The port bandwidth utilization is calculated as follows: Assuming that the maximum traffic bandwidth allowed by port A is 16Gb / s and the current traffic sampling data is 14Gb / s, the bandwidth utilization of the port at that moment is 14 / 16*100%=87.5%;

[0033] A SAN (Storage Area Network) is a network consisting of storage devices and system components. All communications occur over a Fibre Channel network, allowing for centralized and shared storage resources. It's no longer a network device that simply acts as a network node, as in NAS (Network Attached Storage) storage solutions. A SAN not only provides high-performance connectivity for data devices, improving data backup speeds, but also adds redundant connections to storage systems, supporting high-availability cluster systems. Simply put, a SAN is a dedicated Fibre Channel network (unlike Ethernet) that connects storage devices and servers. However, it shares a similar architecture to Ethernet, consisting of Fibre Channel-capable servers, Fibre Channel adapters (NICs), Fibre Channel hubs / switches, and Fibre Channel storage devices. Technically, the three most important components of a SAN network are device interfaces (such as SCSI (Small Computer System Interface), Fibre Channel, and ESCON (Enterprise Systems Connection)), connection devices (switches, gateways, routers, etc.), and communication control protocols (such as IP (Internet Protocol)). These three components, together with additional storage devices and servers, constitute a SAN system.

[0034] S102: When the unit bandwidth utilization exceeds a preset unit bandwidth utilization threshold and the switch port is a switch storage port, obtain a preset emergency strategy.

[0035] When the unit bandwidth utilization exceeds a preset unit bandwidth utilization threshold and the switch port is a switch storage port, before obtaining a preset emergency strategy, the method further includes: determining whether the unit bandwidth utilization exceeds the unit bandwidth utilization threshold; when the unit bandwidth utilization exceeds the unit bandwidth utilization threshold, determining whether the switch port is the switch storage port; and when the switch port is not the switch storage port, recollecting the traffic data and recalculating the unit bandwidth utilization.

[0036] In one embodiment, the unit bandwidth utilization is calculated using the collected traffic data and the maximum traffic bandwidth according to a formula: bandwidth utilization = traffic data / maximum traffic bandwidth * 100%. Assuming a utilization threshold of 85%, when the bandwidth utilization exceeds 85% and the port is a storage port, an automated program queries a preset emergency policy.

[0037] Specifically, assuming that the maximum traffic bandwidth of port A is 16 Gb / s and the current traffic sampling data is 14 Gb / s, the bandwidth utilization of the port at this moment is 14 / 16*100%=87.5%, which means that the bandwidth utilization of port A exceeds the threshold; when the type attribute of port A is physical target, port A is a storage port.

[0038] In one embodiment, when the bandwidth utilization of port A exceeds a preset utilization threshold (e.g., 85%) or the unit bandwidth utilization exceeds the preset unit utilization threshold for three consecutive minutes (i.e., three consecutive sampling times), it is determined whether port A is a storage port based on the type attribute of port A. The port type attribute includes a physical target (PhysicalTarget) and a physical initiator (PhysicalInitiator). If the port type attribute is a physical target (PhysicalTarget), the port is a storage port.

[0039] Specifically, the preset emergency strategies may be various, including but not limited to host traffic degradation strategy, storage volume traffic degradation strategy, and backup traffic fuse strategy.

[0040] S103: Degrade or fuse traffic of a preset port based on the emergency strategy, where the preset port is the switch storage port or a host port of a host accessing the switch storage port.

[0041] In one embodiment, when the emergency policy is a host traffic degradation policy, the bandwidth utilization of the host ports of all hosts accessing the switch storage port is calculated; when the emergency policy is a storage volume traffic degradation policy, the traffic of all storage volumes mapped from the switch storage port is downgraded; when the emergency policy is a backup host fuse policy, the primary host is found among all hosts accessing the switch storage port, the backup operation process of the backup host is terminated, and the traffic input to the backup host is stopped.

[0042] Specifically, the host traffic degradation policy is a targeted restriction for hosts with high traffic loads, and the storage volume degradation policy is an indiscriminate restriction that restricts the traffic of all storage volumes mapped from the switch storage port that do not have a traffic quality of service (QoS) set.

[0043] The port traffic processing method provided in the above embodiment collects traffic data of a storage area network switch port within a preset unit time, and calculates the unit bandwidth utilization of the switch port based on the maximum traffic bandwidth of the switch port and the traffic data; when the unit bandwidth utilization exceeds a preset unit bandwidth utilization threshold and the switch port is a switch storage port, obtains a preset emergency strategy; and based on the emergency strategy, downgrades or fuses the traffic of the preset port, wherein the preset port is the switch storage port or the host port of a host accessing the switch storage port. Through the above method, the present invention achieves the purpose of preventing a port from occupying the traffic of other ports, ensures that the traffic load of each port is normal, improves the stability of port traffic, ensures the normal performance of business performance, and improves user experience.

[0044] See also Figure 2 , Figure 2 This application Figure 1 The port traffic processing method can be applied in a server to process the traffic of the storage port based on a preset emergency strategy.

[0045] like Figure 2 As shown, the port traffic processing method specifically includes steps S201 to S204.

[0046] S201: When the emergency strategy is a host traffic degradation strategy, determine a host accessing a storage port of the switch, and obtain a host port of the host as the preset port.

[0047] Specifically, when the emergency strategy is the host traffic degradation strategy, it is necessary to find all hosts accessing the switch storage port, find the hosts whose total port bandwidth utilization exceeds the total bandwidth utilization threshold among these hosts, and set QoS for the hosts that exceed the threshold to achieve traffic degradation.

[0048] In one embodiment, the total port bandwidth utilization is the total bandwidth utilization of all ports of the host. Based on the zone relationship, the query shows that the hosts accessing the above port A are host 1 and host 2. After calculation, it is found that the total bandwidth utilization of host 1 is 65%, and the total bandwidth utilization of host 2 is 75%.

[0049] Among them, zones are used to logically divide devices (hosts and storage) connected to the SAN network into different areas, so that devices in different areas cannot directly access each other through the FC (Fibre Channel) network, thereby achieving mutual isolation between devices in the network.

[0050] S202: Obtain the total port bandwidth utilization of the host, determine the host whose total port bandwidth utilization exceeds the total bandwidth utilization threshold as a host to be processed, and obtain a storage volume list of the host to be processed.

[0051] In one embodiment, assuming the host port total bandwidth utilization threshold is 70%, if host 1's total bandwidth utilization does not exceed the host port total bandwidth utilization threshold, no processing is performed. However, if host 2's total bandwidth utilization exceeds the host port total bandwidth utilization threshold, host 2 is treated as a pending host whose traffic needs to be processed, and a list of storage volumes on host 2 is obtained.

[0052] A storage volume binds a directory in the host's local file system directly to a directory in the container's internal file system. This means that when you write data to this directory in the container, the container writes its contents directly to the directory on the host that is bound to the container.

[0053] S203: Access the storage volumes of the host to be processed based on the storage volume list, and determine whether there is a host storage volume to be processed in the host to be processed, wherein the host storage volume to be processed is a host storage volume for which traffic quality of service is not set.

[0054] In one embodiment, the storage volumes in the host to be processed are queried in sequence according to the obtained storage volume list, and the storage volumes without traffic QoS are obtained as the storage volumes to be processed for which traffic QoS is to be set. Traffic QoS is set for the volumes to be processed, and the processing of the storage port traffic is completed, thereby completing the entire process of intelligent automatic monitoring and emergency response of the port.

[0055] QoS (Quality of Service) allocates bandwidth to various services within limited bandwidth resources, providing end-to-end quality of service. For example, QoS can prioritize voice, video, and critical data applications on network devices.

[0056] S204: When the host to be processed has the storage volume of the host to be processed, determine the traffic quality of service of the storage volume of the host to be processed according to the total bandwidth of the host port and the number of storage volumes of the host to be processed, so as to achieve traffic degradation of the preset port.

[0057] Specifically, assuming the total available port bandwidth of a host is M and the number of volumes on the host is N, the traffic limit for each volume is: M * 80% / N. This traffic limit is targeted. Among all hosts accessing the storage port, the system identifies hosts whose total port bandwidth utilization exceeds a preset threshold (assuming it's 70%). Each storage volume on this host is then queried sequentially to identify any volumes without traffic QoS configured. Traffic QoS is then configured for these volumes.

[0058] Degrading or fusing the traffic of the preset port based on the emergency strategy also includes: when there is no host storage volume to be processed in the current host to be processed or there is no mapped storage volume to be processed in the current mapped storage volume set, continuing to detect the next host to be processed or the next mapped storage volume set.

[0059] In one embodiment, if the storage volume or mapped storage volume has been set with traffic quality of service, the next host to be processed or the next mapped storage volume set will continue to be checked until it is detected that there is a host storage volume to be processed for which traffic quality of service is not set or there is a mapped storage volume to be processed for which traffic quality of service is not set in the next mapped storage volume set, and traffic quality of service will be set for it.

[0060] The method for port traffic processing provided by the above embodiment is as follows: when the emergency strategy is the host traffic degradation strategy, the host accessing the switch storage port is determined, and the host port of the host is obtained as the preset port; based on the preset total bandwidth utilization threshold and the total bandwidth utilization of the port, the host to be processed is determined, and the storage volume list of the host to be processed is obtained, wherein the host to be processed refers to the host whose total bandwidth utilization of the port exceeds the total bandwidth utilization threshold; based on the storage volume list, the storage volume of the host to be processed is accessed, and the storage volume to be processed for which the traffic quality of service is not set is determined, and the traffic quality of service is set for the storage volume to be processed according to the total bandwidth of the host port and the number of the storage volumes. Through the above method, for hosts with high traffic loads, targeted traffic QoS restrictions are imposed on the storage volumes they access, so that the port does not occupy the traffic of other ports, ensuring that the traffic load of each port is normal, improving the stability of port traffic, ensuring the normal performance of business performance, and improving user experience.

[0061] See also Figure 3 , Figure 3 This application Figure 1 The port traffic processing method can be applied in a server to process the traffic of the storage port based on a preset emergency strategy.

[0062] like Figure 3As shown, the port traffic processing method specifically includes steps S301 to S302.

[0063] S301. When the emergency strategy is a storage volume traffic degradation strategy, the switch storage port is used as the preset port, at least one mapped storage volume mapped by the preset port is determined, a mapped storage volume set is obtained, and it is determined whether there is a pending mapped storage volume in the mapped storage volume set, wherein the pending mapped storage volume is a mapped storage volume for which a traffic quality service is not set.

[0064] Specifically, the storage volume degradation policy is to perform indiscriminate QoS restrictions on all storage volumes mapped out through the switch storage port.

[0065] In one embodiment, when the emergency strategy is a storage volume traffic degradation strategy, all volumes mapped to the host through the storage port are found to form a mapped storage volume set, and all volumes in the set are queried in turn to determine whether the mapped storage volume set contains mapped storage volumes for which traffic QoS is not set, as storage volumes to be processed.

[0066] S302: When the mapped storage volume to be processed exists in the mapped storage volume set, determine the traffic quality of service of the mapped storage volume to be processed according to the total bandwidth of the switch storage port and the number of the mapped storage volumes, so as to achieve traffic degradation of the preset port.

[0067] In one embodiment, assuming the total bandwidth of the switch storage port is M and the number of mapped storage volumes is N, the traffic of each volume is indiscriminately limited to: M*80% / N. When all storage volumes are processed, the traffic degradation is completed, completing the entire process of intelligent automatic port monitoring and emergency response.

[0068] The port traffic processing method provided in the above embodiment determines the mapped storage volume mapped by the storage port when the emergency strategy is the storage volume traffic degradation strategy, and determines whether the mapped storage volume has been set with traffic quality of service; when the mapped storage volume has not been set with the traffic quality of service, the traffic quality of service is set for the mapped storage volume to be processed based on the total bandwidth of the switch storage port and the number of the mapped storage volumes. In this way, by performing indiscriminate QoS restrictions on all storage volumes mapped by the storage port, the purpose of preventing the port from occupying the traffic of other ports is achieved, ensuring that the traffic load of each port is normal, improving the stability of the port traffic, ensuring the normal performance of business performance, and improving the user experience.

[0069] See also Figure 4 , Figure 4 This application Figure 1The port traffic processing method can be applied in a server to process the traffic of the storage port based on a preset emergency strategy.

[0070] like Figure 4 As shown, the port traffic processing method specifically includes steps S401 to S402.

[0071] S401: When the emergency strategy is a backup traffic fusing strategy, the switch storage port is used as the preset port, and a backup host accessing the preset port is determined.

[0072] Specifically, the backup traffic fusing strategy is to directly kill the backup job process if the traffic load increases due to the backup job on the backup host, giving priority to ensuring the normal reading and writing of the business.

[0073] In one embodiment, when the emergency strategy is a backup traffic fusing strategy, all hosts accessing the storage port are found based on the zone relationship, and the hosts are queried in turn. When the host is found to be a backup host, it is determined whether the host contains a backup job process.

[0074] S402: When a backup operation process exists on the backup host, terminate the backup operation process and stop the traffic input of the backup host to achieve traffic fusing of the preset port.

[0075] Specifically, if the backup host has a backup job process, the backup job process will be closed. If there is no backup job process, other hosts will continue to be queried. When the host query is completed, the port traffic processing is completed, and the entire process of intelligent automatic monitoring and emergency response of the port is completed.

[0076] The port traffic processing method provided in the above embodiment utilizes the switch storage port as the preset port when the emergency strategy is a backup traffic fusing strategy, and identifies a backup host accessing the preset port. When a backup job process exists on the backup host, the backup job process is terminated to stop traffic input to the backup host. This method directly terminates the backup job process when the traffic load increases due to backup jobs on the backup host, prioritizing normal service read and write operations. This ensures that the port does not occupy the traffic of other ports, ensuring a normal traffic load on each port, improving port traffic stability, ensuring normal service performance, and enhancing the user experience.

[0077] See also Figure 5 , Figure 5 This is a schematic block diagram of a port traffic processing device provided by an embodiment of the present application, wherein the port traffic processing device is used to execute the aforementioned port traffic processing method.

[0078] like Figure 5 As shown, the port traffic processing device 500 includes:

[0079] The utilization calculation module 501 is configured to collect traffic data of a storage area network switch port in a preset unit time, and calculate the unit bandwidth utilization of the switch port based on the maximum traffic bandwidth of the switch port and the traffic data;

[0080] An emergency strategy acquisition module 502 is configured to acquire a preset emergency strategy when the unit bandwidth utilization exceeds a preset unit bandwidth utilization threshold and the switch port is a switch storage port;

[0081] The traffic processing module 503 is configured to degrade or fuse traffic of a preset port based on the emergency strategy, wherein the preset port is the switch storage port or a host port of a host accessing the switch storage port.

[0082] In one embodiment, the emergency strategy acquisition module 502 further includes:

[0083] a utilization determination unit, configured to determine whether the unit bandwidth utilization exceeds the unit bandwidth utilization threshold;

[0084] a storage port determination unit, configured to determine whether the switch port is the switch storage port when the unit bandwidth utilization exceeds the unit bandwidth utilization threshold;

[0085] The unit bandwidth utilization recalculating unit is configured to recollect the flow data and recalculate the unit bandwidth utilization when the switch port is not the switch storage port.

[0086] In one embodiment, the traffic processing module 503 includes:

[0087] a port total bandwidth utilization acquisition unit, configured to, when the emergency strategy is a host traffic degradation strategy, determine a host accessing the switch storage port and acquire a host port of the host as the preset port;

[0088] a storage volume list acquiring unit, configured to acquire the total port bandwidth utilization of the host, determine a host whose total port bandwidth utilization exceeds the total bandwidth utilization threshold as a host to be processed, and acquire a storage volume list of the host to be processed;

[0089] a traffic quality of service determination unit, configured to access the storage volumes of the host to be processed based on the storage volume list and determine whether there is a host storage volume to be processed among the hosts to be processed, wherein the host storage volume to be processed is a host storage volume for which traffic quality of service is not set;

[0090] The traffic quality of service determination unit is used to determine the traffic quality of service of the storage volume of the host to be processed according to the total bandwidth of the host port and the number of storage volumes of the host to be processed when the host to be processed has the storage volume of the host to be processed, so as to achieve traffic degradation of the preset port.

[0091] In one embodiment, the traffic processing module 503 includes:

[0092] a mapped storage volume determining unit, configured to, when the emergency policy is a storage volume traffic degradation policy, use the switch storage port as the preset port, determine at least one mapped storage volume mapped by the preset port, obtain a mapped storage volume set, and determine whether there is a pending mapped storage volume in the mapped storage volume set, wherein the pending mapped storage volume is a mapped storage volume for which a traffic quality service is not configured;

[0093] The traffic quality of service setting unit is configured to determine the traffic quality of service of the to-be-processed mapped storage volume according to the total bandwidth of the switch storage port and the number of the mapped storage volumes when the to-be-processed mapped storage volume exists in the mapped storage volume set, so as to achieve traffic degradation of the preset port.

[0094] In one embodiment, the traffic processing module 503 further includes:

[0095] The continuing detection unit is configured to continue detecting the storage volume or the mapped storage volume when the traffic quality of service of the storage volume has been set or there is no to-be-processed mapped storage volume in the mapped storage volume set.

[0096] In one embodiment, the traffic processing module 503 includes:

[0097] a backup host determining unit, configured to, when the emergency strategy is a backup traffic fusing strategy, use the switch storage port as the preset port and determine a backup host accessing the preset port;

[0098] The backup operation process ending unit is used to end the backup operation process when the backup operation process exists on the backup host, and stop the flow input of the backup host to achieve flow fusing of the preset port.

[0099] In one embodiment, the utilization calculation module 501 further includes:

[0100] The flow data recollection unit is configured to recollect the flow data and recalculate the unit bandwidth utilization when the unit bandwidth utilization does not exceed the unit bandwidth utilization threshold.

[0101] It should be noted that those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0102] The above-mentioned device can be realized in the form of a computer program. The computer program can be used in Figure 6 Runs on the computer equipment shown.

[0103] See also Figure 6 , Figure 6 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device may be a server.

[0104] See Figure 6 The computer device includes a processor, a memory, and a network interface connected through a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.

[0105] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any port traffic processing method.

[0106] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0107] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any port traffic processing method.

[0108] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0109] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0110] In one embodiment, the processor is configured to execute a computer program stored in the memory to implement the following steps:

[0111] Collecting flow data of a storage area network switch port in a preset unit time, and calculating a unit bandwidth utilization rate of the switch port based on the maximum flow bandwidth of the switch port and the flow data;

[0112] When the unit bandwidth utilization exceeds a preset unit bandwidth utilization threshold and the switch port is a switch storage port, obtaining a preset emergency strategy;

[0113] Traffic of a preset port is degraded or cut off based on the emergency strategy, wherein the preset port is the switch storage port or a host port of a host accessing the switch storage port.

[0114] In one embodiment, before obtaining the preset emergency strategy when the unit bandwidth utilization exceeds the preset unit bandwidth utilization threshold and the switch port is a switch storage port, the processor is further configured to implement:

[0115] Determining whether the unit bandwidth utilization exceeds the unit bandwidth utilization threshold;

[0116] When the unit bandwidth utilization exceeds the unit bandwidth utilization threshold, determining whether the switch port is the switch storage port;

[0117] When the switch port is not the switch storage port, the flow data is recollected and the unit bandwidth utilization is recalculated.

[0118] In one embodiment, the processor downgrades or fuses traffic on a preset port based on the emergency strategy to achieve:

[0119] When the emergency strategy is a host traffic degradation strategy, determining a host accessing the switch storage port, and obtaining a host port of the host as the preset port;

[0120] Obtaining the total port bandwidth utilization of the host, and determining a host whose total port bandwidth utilization exceeds the total bandwidth utilization threshold as a host to be processed, and obtaining a storage volume list of the host to be processed;

[0121] Accessing the storage volumes of the host to be processed based on the storage volume list, and determining whether there is a host storage volume to be processed in the host to be processed, wherein the host storage volume to be processed is a host storage volume for which traffic quality of service is not set;

[0122] When the host to be processed has the host storage volume to be processed, the traffic quality of the host storage volume to be processed is determined according to the total bandwidth of the host port and the number of storage volumes of the host to be processed, so as to achieve traffic degradation of the preset port.

[0123] In one embodiment, the processor downgrades or fuses traffic on a preset port based on the emergency strategy to achieve:

[0124] When the emergency strategy is a storage volume traffic degradation strategy, the switch storage port is used as the preset port, at least one mapped storage volume mapped by the preset port is determined, a mapped storage volume set is obtained, and it is determined whether there is a pending mapped storage volume in the mapped storage volume set, wherein the pending mapped storage volume is a mapped storage volume for which a traffic quality service is not set;

[0125] When the mapped storage volume to be processed exists in the mapped storage volume set, the traffic quality of the mapped storage volume to be processed is determined according to the total bandwidth of the switch storage port and the number of the mapped storage volumes, so as to achieve traffic degradation of the preset port.

[0126] In one embodiment, the processor, in implementing the downgrading or fusing of traffic on the preset port based on the emergency policy, is further configured to implement:

[0127] When the traffic quality of service of the storage volume has been set or there is no to-be-processed mapped storage volume in the mapped storage volume set, the storage volume or the mapped storage volume continues to be detected.

[0128] In one embodiment, the processor downgrades or fuses traffic on a preset port based on the emergency strategy to achieve:

[0129] When the emergency strategy is a backup traffic fusing strategy, the switch storage port is used as the preset port, and a backup host accessing the preset port is determined;

[0130] When a backup operation process exists on the backup host, the backup operation process is terminated and the flow input of the backup host is stopped to achieve flow fusing of the preset port.

[0131] In one embodiment, after collecting traffic data of a storage area network switch port in a preset unit time and calculating a unit bandwidth utilization rate of the switch port based on the maximum traffic bandwidth of the switch port and the traffic data, the processor is further configured to:

[0132] When the unit bandwidth utilization does not exceed the unit bandwidth utilization threshold, the traffic data is recollected and the unit bandwidth utilization is recalculated.

[0133] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and the processor executes the program instructions to implement any port traffic processing method provided in the embodiment of the present application.

[0134] The computer-readable storage medium may be an internal storage unit of the computer device described in the aforementioned embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a SmartMedia Card (SMC), a Secure Digital (SD) card, a flash memory card, etc., equipped on the computer device.

[0135] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and such modifications or substitutions should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A port traffic processing method, characterized in that: include: Collecting flow data of a storage area network switch port in a preset unit time, and calculating a unit bandwidth utilization rate of the switch port based on the maximum flow bandwidth of the switch port and the flow data; When the unit bandwidth utilization exceeds a preset unit bandwidth utilization threshold and the switch port is a switch storage port, obtaining a preset emergency strategy; Degrading or fusing traffic of a preset port based on the emergency strategy, wherein the preset port is the switch storage port or a host port of a host accessing the switch storage port; The step of downgrading or fusing the traffic of the preset port based on the emergency strategy includes: When the emergency strategy is a host traffic degradation strategy, determining a host accessing the switch storage port, and obtaining a host port of the host as the preset port; Obtaining the total port bandwidth utilization of the host, determining a host whose total port bandwidth utilization exceeds a total bandwidth utilization threshold as a host to be processed, and obtaining a storage volume list of the host to be processed; Accessing the storage volumes of the host to be processed based on the storage volume list, and determining whether there is a host storage volume to be processed in the host to be processed, wherein the host storage volume to be processed is a host storage volume for which traffic quality of service is not set; When the host to be processed has the host storage volume to be processed, the traffic quality of the host storage volume to be processed is determined according to the total bandwidth of the host port and the number of storage volumes of the host to be processed, so as to achieve traffic degradation of the preset port.

2. The port traffic processing method according to claim 1, characterized in that: Before obtaining the preset emergency strategy when the unit bandwidth utilization exceeds the preset unit bandwidth utilization threshold and the switch port is a switch storage port, the method further includes: Determining whether the unit bandwidth utilization exceeds the unit bandwidth utilization threshold; When the unit bandwidth utilization exceeds the unit bandwidth utilization threshold, determining whether the switch port is the switch storage port; When the switch port is not the switch storage port, the flow data is recollected and the unit bandwidth utilization is recalculated.

3. The port traffic processing method according to claim 1, characterized in that: Degrading or fusing the traffic of the preset port based on the emergency strategy includes: When the emergency strategy is a storage volume traffic degradation strategy, the switch storage port is used as the preset port, at least one mapped storage volume mapped by the preset port is determined, a mapped storage volume set is obtained, and it is determined whether there is a pending mapped storage volume in the mapped storage volume set, wherein the pending mapped storage volume is a mapped storage volume for which a traffic quality service is not set; When the mapped storage volume to be processed exists in the mapped storage volume set, the traffic quality of the mapped storage volume to be processed is determined according to the total bandwidth of the switch storage port and the number of the mapped storage volumes, so as to achieve traffic degradation of the preset port.

4. The port traffic processing method according to claim 1, characterized in that: Degrading or fusing the traffic of the preset port based on the emergency strategy further includes: When there is no host storage volume to be processed in the current host to be processed or there is no mapped storage volume to be processed in the current mapped storage volume set, the next host to be processed or the next mapped storage volume set is detected.

5. The port traffic processing method according to claim 1, characterized in that: Degrading or fusing the traffic of the preset port based on the emergency strategy includes: When the emergency strategy is a backup traffic fusing strategy, the switch storage port is used as the preset port, and a backup host accessing the preset port is determined; When a backup operation process exists on the backup host, the backup operation process is terminated and the flow input of the backup host is stopped to achieve flow fusing of the preset port.

6. The port traffic processing method according to any one of claims 1 to 5, characterized in that: After collecting the flow data of the storage area network switch port in a preset unit time and calculating the unit bandwidth utilization of the switch port based on the maximum flow bandwidth of the switch port and the flow data, the method further includes: When the unit bandwidth utilization does not exceed the unit bandwidth utilization threshold, the traffic data is recollected and the unit bandwidth utilization is recalculated.

7. A port traffic processing device, characterized in that: include: a utilization calculation module, configured to collect flow data of a storage area network switch port in a preset unit time, and calculate a unit bandwidth utilization of the switch port based on the maximum flow bandwidth of the switch port and the flow data; An emergency strategy acquisition module, configured to acquire a preset emergency strategy when the unit bandwidth utilization exceeds a preset unit bandwidth utilization threshold and the switch port is a switch storage port; a traffic processing module, configured to degrade or fuse traffic of a preset port based on the emergency strategy, wherein the preset port is the switch storage port or a host port of a host accessing the switch storage port; The traffic processing module includes: a port total bandwidth utilization acquisition unit, configured to, when the emergency strategy is a host traffic degradation strategy, determine a host accessing the switch storage port and acquire a host port of the host as the preset port; a storage volume list acquiring unit, configured to acquire the total port bandwidth utilization of the host, determine a host whose total port bandwidth utilization exceeds a total bandwidth utilization threshold as a host to be processed, and acquire a storage volume list of the host to be processed; a traffic quality of service determination unit, configured to access the storage volumes of the host to be processed based on the storage volume list and determine whether there is a host storage volume to be processed among the hosts to be processed, wherein the host storage volume to be processed is a host storage volume for which traffic quality of service is not set; The traffic quality of service determination unit is used to determine the traffic quality of service of the storage volume of the host to be processed according to the total bandwidth of the host port and the number of storage volumes of the host to be processed when the host to be processed has the storage volume of the host to be processed, so as to achieve traffic degradation of the preset port.

8. A computer device, characterized in that: The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is configured to execute the computer program and implement the port traffic processing method according to any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the port traffic processing method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Micro-service request processing method and device thereof, computer equipment and storage medium

    CN114064326A

  • Maximizing Storage Controller Bandwidth Utilization In Heterogeneous Storage Area Networks

    US20150312126A1