Storage system multi-node communication method, system and device and storage medium
By setting multiple central processors for each communication node of the storage system and adopting optimized link processing rules, the problem of insufficient communication performance under dual-channel CPUs is solved, and efficient multi-node communication and performance improvement are achieved.
Patent Information
- Application Number
- CN202410865845.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-01
AI Technical Summary
After the existing storage system is expanded to dual-channel CPU, the communication performance between communication nodes still needs to be improved, especially the system performance degradation caused by mutex conflicts and UPI communication delays.
Set up multiple central processors for each communication node in the storage system, and optimize message transmission based on priority and distance rules through preset link processing rules, reduce mutex conflicts and UPI communication, and ensure that each business is consistent with A separate CPU is bound to process messages independently.
It effectively improves the multi-node communication performance of the storage system, reduces message transmission time, avoids message backlog and CPU resource contention, and improves the overall performance of the system.
Smart Images

Figure CN118733299A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of storage technology, and in particular to a storage system multi-node communication method, system, device and storage medium. Background Art
[0002] With the rapid rise of big data and artificial intelligence, the performance of storage systems has been severely challenged. Current storage systems usually support many services, including high-performance cache, reliability RAID (Redundant Arrays of Independent Disks), active-active / remote replication, all-flash thin pools, etc. The complexity of storage services and the increasing scale of stored data have led to the current storage systems being more dependent on computing resources such as CPU (Central Processing Unit). In response to this, many current storage systems will increase computing resources by deploying more CPUs to improve storage performance. At the same time, in order to ensure reliability, the storage system will back up I / O (Input / Output) data or key system information between different communication nodes to ensure that the entire storage system can still operate normally when one or more communication nodes fail. Therefore, the communication performance between communication nodes is also very important in the storage system.
[0003] Currently, when the storage system is expanded to a dual-core CPU, the communication performance between communication nodes needs to be improved. Specifically, the message sending process and confirmation process will be protected by mutex locks. When the number of CPU cores increases, mutex lock conflicts will cause a lot of CPU performance to be consumed. UPI (Ultra Path Interconnect) communication is used on the dual-core CPU hardware architecture. If the read and write operations of the memory involve UPI communication between the two CPUs, the delay will increase, seriously affecting the system performance. In addition, after expanding to a dual-core CPU, there are too many messages in a single communication queue, and the message dequeue processing is slow, which will cause the storage IO delay to be too high.
[0004] In summary, how to effectively implement multi-node communication in a storage system and improve communication performance is a technical problem that those skilled in the art urgently need to solve. Summary of the invention
[0005] The purpose of the present invention is to provide a storage system multi-node communication method, system, device and storage medium to effectively implement multi-node communication of the storage system and improve communication performance.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, the present invention provides a storage system multi-node communication method, wherein N communication nodes are provided in the storage system, each of the communication nodes is provided with N central processing units, and the storage system multi-node communication method is applied to each of the central processing units in each of the communication nodes, comprising:
[0008] When receiving a message to be sent generated by a service bound to itself, the message is placed in its own message sending queue;
[0009] Wherein, for each service associated with any one of the communication nodes, the service is bound to a single central processor in the communication node; N is a positive integer not less than 2;
[0010] Based on a preset link processing rule, the message in the message sending queue is sent to the communication node to which the message points, so that after the message is placed in the message receiving queue in the target central processor, the message is processed by the target central processor;
[0011] The target central processor refers to the central processor bound to the service generating the message in the communication node pointed to by the message.
[0012] On the other hand, the preset link processing rule is a priority-based link processing rule, and reducing message transmission time is the goal of the priority-based link processing rule.
[0013] On the other hand, based on a preset link processing rule, sending the message in the message sending queue to the communication node to which the message points, so that after the message is placed in the message receiving queue in the target central processor, the message is processed by the target central processor, including:
[0014] Taking out the message from the message sending queue according to the first-in-first-out rule;
[0015] Obtaining a link list of the communication node where the central processor itself is located;
[0016] Taking out each link of the i-th priority type from the link list; wherein i is a positive integer and the initial value of i is 1;
[0017] Determine whether all the links of the i-th priority taken out are abnormally connected;
[0018] If yes, then i+1 is added, and the operation of taking out each link of the i-th priority type from the link list is returned;
[0019] If not, then prioritize the links of the i-th priority type and the normal connection according to the preset distance rule and send the message in the message sending queue to the communication node to which the message points based on the link with the highest priority determined after the sorting, so that after the message is placed in the message receiving queue of the target central processor, the target central processor processes the message;
[0020] Wherein, for each link in the link list, a remote direct memory access type link is a first priority type, a non-transparent bridge type link is a second priority type, and a fiber channel type link is a third priority type;
[0021] The distance rule is: for each link of the same priority type, the closer the physical distance between the network card interface of the link and the central processor is, the higher the link priority is.
[0022] On the other hand, it also includes:
[0023] When it is determined that all the links in the link list are abnormally connected, a fault record is performed.
[0024] On the other hand, it also includes:
[0025] After the fault is recorded, the preset fault handling operation is executed and an automatic restart is performed.
[0026] On the other hand, the message receiving queue in the target central processor is a message receiving queue set with an order-preserving rule, so that the message sent first is executed first.
[0027] On the other hand, based on a preset link processing rule, sending the message in the message sending queue to the communication node pointed to by the message includes:
[0028] Based on a preset link processing rule, the message in the message sending queue is sent to the communication node pointed to by the message, and when the message in the message sending queue is sent to the communication node pointed to by the message, the message used carries index information, so that the communication node pointed to by the message locates the target central processor through the index information;
[0029] Among them, the index information reflects the number of the central processor that sends the message; and, for any service, if the service is associated with both communication node a and communication node b, the number of the central processor bound to the service in the communication node a is consistent with the number of the central processor bound to the service in the communication node b; a and b are both positive integers and a≠b.
[0030] In a second aspect, the present invention provides a storage system multi-node communication system, characterized in that N communication nodes are set in the storage system, each of the communication nodes is provided with N central processing units, and the storage system multi-node communication system is applied to each of the central processing units in each of the communication nodes, including:
[0031] The message management module is used to place the message to be sent generated by the service bound to itself into its own message sending queue when receiving the message to be sent;
[0032] Wherein, for each service associated with any one of the communication nodes, the service is bound to a single central processor in the communication node; N is a positive integer not less than 2;
[0033] A message sending module, configured to send the message in the message sending queue to the communication node to which the message points based on a preset link processing rule, so that after the message is placed in the message receiving queue in the target central processor, the target central processor processes the message;
[0034] The target central processor refers to the central processor bound to the service generating the message in the communication node pointed to by the message.
[0035] In the third aspect, the present invention provides a storage system multi-node communication device, characterized in that N communication nodes are set in the storage system, N central processing units are set in each of the communication nodes, and the storage system multi-node communication device is applied to each of the central processing units in each of the communication nodes, and the central processing unit implements the steps of the storage system multi-node communication method as described in any one of claims 1 to 7 based on a preset computer program.
[0036] In a fourth aspect, the present invention provides a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the storage system multi-node communication method as described in any one of claims 1 to 7 are implemented.
[0037] Applying the technical solution provided in the embodiment of the present invention, N communication nodes are set in the storage system, and N central processing units are set in each of the communication nodes. In order to enhance the communication capability between communication nodes, reduce UPI communication between different CPUs and mutual exclusion lock conflicts between various service modules, in the solution of the present application, for each service associated with any one of the communication nodes, the service is bound to a single central processing unit in the communication node. In other words, for any one of the communication nodes, the service that needs to be processed by the communication node will only be handled by a single CPU in the communication node, which is conducive to reducing mutual exclusion lock conflicts and improving the communication capability between communication nodes.
[0038] Taking any CPU as an example, when the CPU obtains the message to be sent generated by the business bound to itself, the message is placed in its own message sending queue. In other words, for different CPUs in the same communication node, each has its own message sending queue. Compared with the traditional scheme in which each CPU in the same communication node communicates with other communication nodes through a single communication queue, the setting method of the present application is conducive to avoiding message backlogs, so that the businesses responsible for different CPUs do not affect each other, that is, there will be no situation where the CPU message cannot be continuously queued due to too many messages from other CPUs. Taking any CPU as an example, the CPU can send the message in its own message sending queue to the communication node pointed to by the message based on the preset link processing rules, so that the message is placed in the message receiving queue in the target central processor, and then the target central processor processes the message. The target central processor represents the central processor bound to the business that generates the message in the communication node pointed to by the message.
[0039] In summary, the solution of the present application can effectively implement multi-node communication of the storage system and improve communication performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 A flowchart of a multi-node communication method for a storage system provided in a specific embodiment of the present invention;
[0042] Figure 2a is a schematic diagram of a communication topology structure formed by N communication nodes in a specific implementation manner;
[0043] Figure 2b A schematic diagram of a communication topology structure formed by N communication nodes in another specific implementation manner
[0044] Figure 3 A functional schematic diagram of a central processor in a communication node in a specific implementation manner of the present invention;
[0045] Figure 4 A schematic diagram of the structure of a multi-node communication system of a storage system provided by a specific implementation mode of the present invention;
[0046] Figure 5 A schematic diagram of the structure of a multi-node communication device of a storage system provided by a specific implementation mode of the present invention;
[0047] Figure 6 The present invention is a schematic diagram of the structure of a computer-readable storage medium. DETAILED DESCRIPTION
[0048] The core of the present invention is to provide a storage system multi-node communication method, system, device and storage medium, which can effectively realize the multi-node communication of the storage system and improve the communication performance.
[0049] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0050] Please refer to Figure 1 , Figure 1 The implementation flow chart of the storage system multi-node communication method provided by a specific embodiment of the present invention. In the present application scheme, N communication nodes are set in the storage system, and N central processing units are set in each communication node. The storage system multi-node communication method can be applied to each central processing unit in each communication node, including the following steps:
[0051] Step S101: when obtaining a message to be sent generated by a service bound to itself, the message is placed into its own message sending queue.
[0052] Among them, for each service associated with any communication node, the service is bound to a single central processor in the communication node; N is a positive integer not less than 2.
[0053] Specifically, in the present application, N communication nodes are set in the storage system, and the communication topology structure formed by the N communication nodes can be set and adjusted according to actual needs, for example Figure 2a is a schematic diagram of a communication topology structure formed by N communication nodes in a specific implementation mode, Figure 2a In the example, communication nodes 1 to 4 are connected in sequence. Figure 2b is a schematic diagram of a communication topology structure formed by N communication nodes in another specific implementation manner, Figure 2b In the example, communication nodes 1 to 4 are connected in sequence, and communication node 2 is also connected to communication node 5 and communication node 6. In practical applications, the communication topology structure composed of N communication nodes can be set and adjusted according to actual needs, but generally speaking, direct or indirect communication between any two communication nodes can be achieved.
[0054] Each communication node is provided with N central processors, where N is a positive integer not less than 2, and generally speaking, N=2 is a more commonly used implementation method. Figure 3 Take the example to illustrate the principle of this application scheme. Figure 3 In the example, N=2.
[0055] In the present application, for each service associated with any one communication node, the service is bound to a single central processor in the communication node. Figure 3 In the example, the services associated with communication node 1 include service A1, service B1, service C1 and service D1, wherein service A1 and service B1 are bound to central processor 1 in communication node 1, and service C1 and service D1 are bound to central processor 2 in communication node 1.
[0056] The CPU obtains the message to be sent generated by the business bound to itself, which means that the message needs to be sent to the designated node. Generally speaking, the main function of the message to be sent is to achieve backup to ensure the reliability of the storage business. Of course, in the specific implementation method, the specific content and purpose of the message to be sent generated by the business can be set and adjusted as needed.
[0057] by Figure 3 Taking the central processor 1 in the communication node 1 as an example, if the central processor 1 in the communication node 1 obtains a message to be sent generated by the service A1 bound to itself, it will put the message into its own message sending queue.
[0058] It is understandable that after the binding between the service and the CPU core is performed, it is helpful to avoid the service switching between different CPU cores and threads of the same communication node, thereby reducing the occurrence of cache-miss (cache miss) and reducing unnecessary performance consumption. In addition, such a setting is also helpful to reduce mutex conflicts and improve the communication capabilities between communication nodes.
[0059] The CPU 1 and the CPU 2 in the communication node 1 both have their own message sending queues. Therefore, if the CPU 1 receives a message to be sent generated by the service A1 to which it is bound, it will place the message into its own message sending queue. The message sending queue usually manages message entry and exit according to the first-in-first-out rule.
[0060] Step S102: based on a preset link processing rule, the message in the message sending queue is sent to the communication node to which the message points, so that after the message is placed in the message receiving queue of the target central processor, the target central processor processes the message;
[0061] The target CPU refers to the CPU bound to the service generating the message in the communication node pointed to by the message.
[0062] Still Figure 3 For example, the CPU 1 in the communication node 1 of the CPU 1 obtains the message to be sent generated by the service A1 bound to itself, and after placing the message into its own message sending queue, the CPU 1 can send the message to the communication node pointed to by the message based on the preset link processing rule. Figure 3 In the example, the central processor 1 in the communication node 1 sends the message to the communication node 2 based on the link management function and the link driving function, so that the message is placed in the message receiving queue in the target central processor and then processed by the target central processor.
[0063] The target CPU refers to the CPU bound to the service that generates the message in the communication node to which the message is directed. Figure 3 In the example, for communication node 2, the central processor bound to service A1 is central processor 1 in communication node 2. Therefore, in this example, the target central processor corresponding to the message is specifically central processor 1 in communication node 2.
[0064] The central processor 1 in the communication node 2 will process the message. For example, the central processor 1 in the communication node 2 will place the message into its message receiving queue and register a message processing callback function on the message receiving queue so that the callback function can be called to process messages sent by other communication nodes.
[0065] The specific content of the preset link processing rules can be set and adjusted according to actual needs, as long as the message transmission between communication nodes can be effectively realized.
[0066] In a specific implementation of the present invention, the preset link processing rule described in step S102 is a priority-based link processing rule, and reducing message transmission time is the goal of the priority-based link processing rule.
[0067] This implementation takes into account that there may be one or more available links between communication nodes, and when a message is transmitted, different links are used, and the message transmission time may be different. Therefore, the link processing rules set in this implementation are priority-based link processing rules, and specifically the goal of the priority-based link processing rules is to reduce the message transmission time. In this way, when the message transmission between communication nodes is implemented according to the link processing rules of this implementation, the message transmission time can be effectively reduced, which is beneficial to improving the overall performance of the storage system.
[0068] Of course, the specific priority setting method of the link processing rule in this implementation mode can be set and adjusted according to actual needs, and the goal is to reduce the message transmission time.
[0069] For example, in a specific implementation of the present invention, step S102 may specifically include:
[0070] Take messages from the message sending queue according to the first-in-first-out rule;
[0071] Obtain the link list of the communication node where the CPU itself is located;
[0072] Take each link of the i-th priority type from the link list; where i is a positive integer and the initial value of i is 1;
[0073] Determine whether all links of the i-th priority taken out are abnormally connected;
[0074] If yes, then i+1 is added and the operation of taking out each link of the i-th priority type from the link list is returned;
[0075] If not, prioritize the links of the i-th priority type and the normal connection according to the preset distance rule, and based on the link with the highest priority determined after the sorting, send the message in the message sending queue to the communication node to which the message points, so that after the message is placed in the message receiving queue of the target central processor, the target central processor processes the message;
[0076] Among them, for each link in the link list, a remote direct memory access type link is a first priority type, a non-transparent bridge type link is a second priority type, and a fiber channel type link is a third priority type.
[0077] This implementation can be implemented based on the link management function. Specifically, first, a message needs to be taken out from the message sending queue according to the first-in first-out rule. After taking out a message, a link selection needs to be performed based on the link list of the communication node, so as to use the selected link to send the message.
[0078] When selecting a link, first, it is necessary to take out each link of the first priority type from the link list. The first priority type links of the present application refer to remote direct memory access type links, that is, RDMA type. After that, it is necessary to determine whether each link of the first priority taken out is abnormally connected. If all are abnormally connected, it is necessary to take out each link of the second priority type from the link list. The second priority type links of the present application refer to non-transparent bridge type links, that is, NTB type. Similarly, it is necessary to determine whether each link of the second priority taken out is abnormally connected. If all are abnormally connected, it is necessary to take out each link of the third priority type from the link list. The third priority type links of the present application refer to fiber channel type links, that is, FC type. That is to say, in this embodiment, the priority of the link is RDMA>NTB>FC. Such a design is conducive to reducing the time consumption of message transmission.
[0079] This implementation also takes into account that for each link of the same priority type, the priority can be further divided. Specifically, it is necessary to prioritize each link of the i-th priority type and with normal connection according to the preset distance rule, so that based on the highest priority link determined after sorting, the message in the message sending queue is sent to the communication node to which the message points.
[0080] The distance rule described in this implementation is: for each link of the same priority type, the closer the physical distance between the network card interface of the link and the central processor, the higher the link priority. Such a rule design is conducive to further reducing the message transmission time consumption, so that the application scheme, based on the software design to improve the communication performance of the storage system, also fully considers the hardware architecture, which is conducive to improving performance.
[0081] Still Figure 3Take the CPU 1 in the communication node 1 as an example. When the CPU 1 sends the message generated by the service A1, it needs to obtain the link list of the communication node 1. For example, two links of the first priority type are taken out from the link list, that is, two RDMA type links and both are connected normally. For example, the network card interface of one link is connected to the CPU 1 in the communication node 1, and the network card interface of the other link is connected to the CPU 2 in the communication node 1. The former is physically closer to the CPU 1, and the latter is physically closer to the CPU 2. Therefore, the CPU 1 in the communication node 1 will select the former of the two RDMA type links in this example to send the message generated by the service A1, reducing the message transmission time.
[0082] For example, in the above example, only the RDMA type link connecting the network card interface and the central processor 2 in the communication node 1 is connected normally, and the RDMA type link connecting the network card interface and the central processor 1 in the communication node 1 is connected abnormally. At this time, the central processor 1 in the communication node 1 will use the RDMA type link connecting the network card interface and the central processor 2 in the communication node 1 to send the message generated by the service A1. Although the message transmission takes more time and the storage performance is reduced, the successful transmission of the message is guaranteed, that is, the reliability of the storage system is guaranteed.
[0083] In addition, it should be noted that in some cases, certain types of priority types may not exist between two communication nodes. For example, in one case, there are only FC type links between certain communication nodes. In this case, the link list of the communication node will only have links of the third priority type. At this time, when taking out each link of the first priority type from the link list, it can be regarded as a failure. Similarly, when taking out each link of the second priority type from the link list, it can be regarded as a failure.
[0084] Furthermore, in a specific embodiment of the present invention, it may also include:
[0085] When it is determined that all links in the link list are abnormally connected, a fault record is performed.
[0086] This implementation takes into account that if all links in the link list are abnormally connected, it means that the central processor is currently unable to send messages to the outside through the link of the communication node. At this time, a fault record can be made to assist in subsequent fault analysis and processing.
[0087] Furthermore, in a specific implementation of the present invention, it may also include: after the fault is recorded, a preset fault handling operation is executed and an automatic restart is performed.
[0088] In this implementation, after the fault is recorded, the preset fault handling operation is executed and an automatic restart is performed. The automatic restart is performed considering that the link connection abnormality in some occasions can be solved by automatic restart. The specific content of the preset fault handling operation can be set and adjusted according to actual needs, which is usually some operations that can solve some abnormal situations. In addition, the preset fault handling operation can also include prompt operations such as outputting prompt information, so that the staff can pay attention to the situation in time.
[0089] In a specific embodiment of the present invention, it may also include:
[0090] When the message fails to be sent, the message is sent again based on the preset fault-tolerant retransmission rule. This implementation takes into account that the message sending queue used by the central processor can be set with a fault-tolerant retransmission rule, so that if the message fails to be sent, the fault-tolerant retransmission rule can be used to resend the message. For example, in some cases, after the message is sent, the message can be placed in a queue to be retransmitted. If no feedback indicating that the message is successfully sent is received after a certain period of time, the message can be taken out of the queue to be retransmitted to resend the message.
[0091] In addition, in actual applications, heartbeat detection is performed between different communication nodes to promptly determine whether the corresponding communication nodes are working normally.
[0092] In a specific implementation of the present invention, the message receiving queue in the target central processor is a message receiving queue with an order-preserving rule, so that the message sent first is executed first.
[0093] The message receiving queue in the target CPU is set with an order-preserving rule, which means that the message sent first will be executed first. In practical applications, this can usually be achieved through the message sequence number. For example, the link driver function is responsible for sending the message, and when sending the message, the message sequence number can be encapsulated into the protocol message. After the target CPU receives the message, it can put the message into the message receiving queue. However, when the message is dequeued, the target CPU needs to compare the message sequence number of the message with the sequence number of the currently executed message to determine whether the message should be executed at the moment. If it is determined that the message arrives in advance, the message needs to be re-queued to delay the execution of the message. For example, the CPU 1 in the communication node 2, as the target CPU, successively receives and executes the message with the message sequence number 001, the message with the message sequence number 002 and the message with the message sequence number 003 sent by the CPU 1 in the communication node 1, and then the message with the current message sequence number 005 is taken out from the message receiving queue, the target CPU will put the message back into the message receiving queue, because it can be determined that the message arrived in advance and the message with the message sequence number 004 has not arrived yet.
[0094] It is also understandable that each message has its own independent message sequence number, but the message sequence numbers of message queues between different CPUs can be repeated. Similarly, each CPU has its own message receiving queue, and each message receiving queue can maintain its own currently executed message sequence number without affecting each other. And in this implementation, it can usually be applied in the case of dual communication nodes, and it is not easy to make mistakes.
[0095] In a specific implementation of the present invention, the step S102 described in which the message in the message sending queue is sent to the communication node to which the message points based on the preset link processing rule may specifically include:
[0096] Based on a preset link processing rule, the message in the message sending queue is sent to the communication node pointed to by the message, and when the message in the message sending queue is sent to the communication node pointed to by the message, the message used carries index information, so that the communication node pointed to by the message locates the target central processor through the index information;
[0097] Among them, the index information reflects the number of the central processor that sends the message; and for any service, if the service is associated with both communication node a and communication node b, the number of the central processor bound to the service in communication node a is consistent with the number of the central processor bound to the service in communication node b; a and b are both positive integers and a≠b.
[0098] This implementation takes into account that, in the present application, the messages in the message sending queue need to be sent to the target central processor in the communication node to which the message points. In order to conveniently locate the target central processor in the communication node to which the message points, this implementation is specifically implemented through indexing.
[0099] For example, Figure 3 In the example, for communication node 2, the central processor bound to service A1 is central processor 1 in communication node 2. Therefore, when central processor 1 in communication node 1 sends a message of service A1, the target central processor is specifically central processor 1 in communication node 2.
[0100] In this implementation, for example, if the central processor 1 in the communication node 1 sends a message of service A1, the message used by the message carries index information, which specifically reflects the number of the central processor 1 in the communication node 1, for example, the specific number is "CPU1". Moreover, service A1 is associated with both communication node 1 and communication node 2, so in this example, the number "CPU1" of the central processor 1 bound to service A1 in communication node 1 is also the number "CPU1" of the central processor 1 bound to service A1 in communication node 2. In other words, after the numbering and index information are designed according to this implementation, when communication node 2 receives a message from communication node 1, if it is determined that the index information carried in the message is "CPU1", it can be determined that the message is sent by the central processor 1 in communication node 1 and needs to be handed over to the central processor 1 in communication node 2 for processing.
[0101] Based on the same principle, in this implementation, when communication node 2 receives a message from communication node 1, if it is determined that the index information carried in the message is "CPU2", it can be determined that the message is sent by the central processor 2 in communication node 1 and needs to be processed by the central processor 2 in communication node 2.
[0102] It can be seen that this implementation can very conveniently locate the target central processor in the communication node to which the message is directed.
[0103] By applying the technical solution provided in the embodiment of the present invention, N communication nodes are set in the storage system, and N central processing units are set in each communication node. In order to enhance the communication capability between communication nodes, reduce UPI communication between different CPUs and mutual exclusion lock conflicts between various service modules, in the solution of the present application, for each service associated with any one communication node, the service is bound to a single central processing unit in the communication node. In other words, for any one communication node, the service that the communication node needs to process will only be handled by a single CPU in the communication node, which is conducive to reducing mutual exclusion lock conflicts and improving the communication capability between communication nodes.
[0104] Taking any CPU as an example, when the CPU obtains the message to be sent generated by the business bound to itself, the message is placed in its own message sending queue. In other words, for different CPUs in the same communication node, each has its own message sending queue. Compared with the traditional scheme in which each CPU in the same communication node communicates with other communication nodes through a single communication queue, the setting method of the present application is conducive to avoiding message backlogs, so that the businesses responsible for different CPUs do not affect each other, and there will be no situation where the CPU message cannot be continuously queued due to too many messages from other CPUs. Taking any CPU as an example, the CPU can send the message in its own message sending queue to the communication node pointed to by the message based on the preset link processing rules, so that the message is placed in the message receiving queue in the target central processor, and then the target central processor processes the message. The target central processor represents the central processor bound to the business that generates the message in the communication node pointed to by the message.
[0105] In summary, the solution of the present application can effectively implement multi-node communication of the storage system and improve communication performance.
[0106] Corresponding to the above method embodiment, the embodiment of the present invention further provides a storage system multi-node communication system, which can be referred to in correspondence with the above. N communication nodes are set in the storage system, and N central processing units are set in each of the communication nodes. The storage system multi-node communication system is applied to each of the central processing units in each of the communication nodes, which can be referred to in Figure 4 ,include:
[0107] The message management module 401 is used to place the message into its own message sending queue when receiving a message to be sent generated by a service bound to itself;
[0108] Wherein, for each service associated with any one of the communication nodes, the service is bound to a single central processor in the communication node; N is a positive integer not less than 2;
[0109] A message sending module 402, configured to send the message in the message sending queue to the communication node to which the message points based on a preset link processing rule, so that after the message is placed in the message receiving queue in the target central processor, the target central processor processes the message;
[0110] The target central processor refers to the central processor bound to the service generating the message in the communication node pointed to by the message.
[0111] In a specific implementation of the present invention, the preset link processing rule is a priority-based link processing rule, and reducing message transmission time is used as a goal of the priority-based link processing rule.
[0112] In a specific implementation of the present invention, the message sending module 402 is specifically used for:
[0113] Taking out the message from the message sending queue according to the first-in-first-out rule;
[0114] Obtaining a link list of the communication node where the central processor itself is located;
[0115] Taking out each link of the i-th priority type from the link list; wherein i is a positive integer and the initial value of i is 1;
[0116] Determine whether all the links of the i-th priority taken out are abnormally connected;
[0117] If yes, then i+1 is added, and the operation of taking out each link of the i-th priority type from the link list is returned;
[0118] If not, then prioritize the links of the i-th priority type and the normal connection according to the preset distance rule and send the message in the message sending queue to the communication node to which the message points based on the link with the highest priority determined after the sorting, so that after the message is placed in the message receiving queue of the target central processor, the target central processor processes the message;
[0119] Wherein, for each link in the link list, a remote direct memory access type link is a first priority type, a non-transparent bridge type link is a second priority type, and a fiber channel type link is a third priority type;
[0120] The distance rule is: for each link of the same priority type, the closer the physical distance between the network card interface of the link and the central processor is, the higher the link priority is.
[0121] In a specific embodiment of the present invention, a fault recording module is also included, which is used to:
[0122] When it is determined that all the links in the link list are abnormally connected, a fault record is performed.
[0123] In a specific implementation of the present invention, a fault processing module is also included, which is used to:
[0124] After the fault is recorded, the preset fault handling operation is executed and an automatic restart is performed.
[0125] In a specific implementation of the present invention, the message receiving queue in the target central processor is a message receiving queue with an order-preserving rule, so that the message sent first is executed first.
[0126] In a specific implementation of the present invention, the message sending module 402 sends the message in the message sending queue to the communication node to which the message points based on a preset link processing rule, including:
[0127] Based on a preset link processing rule, the message in the message sending queue is sent to the communication node pointed to by the message, and when the message in the message sending queue is sent to the communication node pointed to by the message, the message used carries index information, so that the communication node pointed to by the message locates the target central processor through the index information;
[0128] Among them, the index information reflects the number of the central processor that sends the message; and, for any service, if the service is associated with both communication node a and communication node b, the number of the central processor bound to the service in the communication node a is consistent with the number of the central processor bound to the service in the communication node b; a and b are both positive integers and a≠b.
[0129] Corresponding to the above method and system embodiments, an embodiment of the present invention further provides a storage system multi-node communication device, a computer-readable storage medium and a computer program product, which can be referred to in correspondence with the above.
[0130] See also Figure 5 As shown, the device may include:
[0131] Memory 501, used for storing computer programs;
[0132] The processor 502 is used to execute a computer program to implement the steps of the storage system multi-node communication method in any of the above embodiments.
[0133] The computer program product includes a computer program / instruction, which, when executed by a processor, implements the steps of the storage system multi-node communication method in any of the above embodiments.
[0134] See also Figure 6 The computer readable storage medium 60 stores a computer program 61, and when the computer program 61 is executed by the processor, the steps of the storage system multi-node communication method in any of the above embodiments are implemented. The computer readable storage medium 60 mentioned here includes RAM (Random Access Memory), memory, ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), register, hard disk, removable disk, or any other form of storage medium known in the technical field.
[0135] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0136] Professionals may further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention, and the description of the above embodiments is only used to help understand the technical solution and its core idea of the present invention. It should be pointed out that for ordinary technicians in the technical field, without departing from the principle of the present invention, the present invention can also be improved and modified in a number of ways, and these improvements and modifications also fall within the scope of protection of the present invention.
Claims
1. A storage system multi-node communication method, characterized in that: N communication nodes are provided in the storage system, each of the communication nodes is provided with N central processing units, and the storage system multi-node communication method is applied to each of the central processing units in each of the communication nodes, including: When receiving a message to be sent generated by a service bound to itself, the message is placed in its own message sending queue; Wherein, for each service associated with any one of the communication nodes, the service is bound to a single central processor in the communication node; N is a positive integer not less than 2; Based on a preset link processing rule, the message in the message sending queue is sent to the communication node to which the message points, so that after the message is placed in the message receiving queue in the target central processor, the message is processed by the target central processor; The target central processor refers to the central processor bound to the service generating the message in the communication node pointed to by the message.
2. The storage system multi-node communication method according to claim 1, characterized in that: The preset link processing rule is a priority-based link processing rule, and reducing message transmission time is the goal of the priority-based link processing rule.
3. The storage system multi-node communication method according to claim 2, characterized in that: Based on a preset link processing rule, the message in the message sending queue is sent to the communication node to which the message points, so that after the message is placed in the message receiving queue in the target central processor, the target central processor processes the message, including: Taking out the message from the message sending queue according to the first-in-first-out rule; Obtaining a link list of the communication node where the central processor itself is located; Taking out each link of the i-th priority type from the link list; wherein i is a positive integer and the initial value of i is 1; Determine whether all the links of the i-th priority taken out are abnormally connected; If yes, then i+1 is added, and the operation of taking out each link of the i-th priority type from the link list is returned; If not, then prioritize the links of the i-th priority type and the normal connection according to the preset distance rule and send the message in the message sending queue to the communication node to which the message points based on the link with the highest priority determined after the sorting, so that after the message is placed in the message receiving queue of the target central processor, the target central processor processes the message; Wherein, for each link in the link list, a remote direct memory access type link is a first priority type, a non-transparent bridge type link is a second priority type, and a fiber channel type link is a third priority type; The distance rule is: for each link of the same priority type, the closer the physical distance between the network card interface of the link and the central processor is, the higher the link priority is.
4. The storage system multi-node communication method according to claim 3, characterized in that: Also includes: When it is determined that all the links in the link list are abnormally connected, a fault record is performed.
5. The storage system multi-node communication method according to claim 4, characterized in that: Also includes: After the fault is recorded, the preset fault handling operation is executed and an automatic restart is performed.
6. The storage system multi-node communication method according to claim 1, characterized in that: The message receiving queue in the target central processor is a message receiving queue with an order-preserving rule, so that the message sent first is executed first.
7. The storage system multi-node communication method according to any one of claims 1 to 6, characterized in that: Based on a preset link processing rule, sending the message in the message sending queue to the communication node pointed to by the message includes: Based on a preset link processing rule, the message in the message sending queue is sent to the communication node pointed to by the message, and when the message in the message sending queue is sent to the communication node pointed to by the message, the message used carries index information, so that the communication node pointed to by the message locates the target central processor through the index information; Among them, the index information reflects the number of the central processor that sends the message; and, for any service, if the service is associated with both communication node a and communication node b, the number of the central processor bound to the service in the communication node a is consistent with the number of the central processor bound to the service in the communication node b; a and b are both positive integers and a≠b.
8. A storage system multi-node communication system, characterized in that: N communication nodes are set in the storage system, each of the communication nodes is set with N central processing units, and the storage system multi-node communication system is applied to each of the central processing units in each of the communication nodes, including: The message management module is used to place the message to be sent generated by the service bound to itself into its own message sending queue when receiving the message to be sent; Wherein, for each service associated with any one of the communication nodes, the service is bound to a single central processor in the communication node; N is a positive integer not less than 2; A message sending module, configured to send the message in the message sending queue to the communication node to which the message points based on a preset link processing rule, so that after the message is placed in the message receiving queue in the target central processor, the target central processor processes the message; The target central processor refers to the central processor bound to the service generating the message in the communication node pointed to by the message.
9. A storage system multi-node communication device, characterized in that: N communication nodes are set in the storage system, N central processing units are set in each of the communication nodes, the storage system multi-node communication device is applied to each of the central processing units in each of the communication nodes, and the central processing unit implements the steps of the storage system multi-node communication method as described in any one of claims 1 to 7 based on a preset computer program.
10. 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 steps of the storage system multi-node communication method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Communication method and system for computer system, and device, product and storage medium
WO2026144036A1
