Service processing method, apparatus and device and medium
By using the central processor core of the standby control node to balance the allocation of virtual ports and service data in a dual-controller storage system, the problem of reduced service processing capabilities after the control node failure is solved, and the maintenance of service throughput and efficient utilization of CPU resources is achieved.
Patent Information
- Application Number
- PCT/CN2024/122418
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-18
- Filing Date
- 2024-09-29
- Publication Date
- 2025-07-24
AI Technical Summary
In a dual-controller storage system, when one control node fails, the other control node takes over the service of the fault control node, resulting in a decrease in the service processing capacity and the original service throughput cannot be maintained.
When the service of the fault control node is transferred to the backup control node, the target virtual port is balancedly allocated in each current central processor core of the backup control node, and the service data is balancedly allocated to the target central processor core for processing according to the drop-off nature of the service data and the utilization rate of the central processor core, to ensure load balancing.
After the service transfer of the fault control node, the service processing capacity on the standby control node is improved, ensuring the maintenance of business throughput and the full utilization of CPU resources, and avoiding the reduction in processing capacity caused by excessive load of a single CPU core.
Smart Images

Figure CN2024122418_24072025_PF_FP_ABST
Abstract
Description
Business processing method, device, equipment and medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on January 18, 2024, with application number 202410072350.2, and application name “A business processing method, device, equipment and medium”, all contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the field of data processing technology, and in particular to a business processing method, device, equipment and medium. Background Art
[0004] In a dual-controller storage system, when one controller node fails, the surviving controller node takes over the failed controller node's port information, transfers the failed controller node's links to the other controller node, and then restores services, ensuring normal service processing on the failed controller node.
[0005] Figure 1 illustrates a typical path migration scenario involving dual controllers. As shown in Figure 1 , virtual port 2 of node A (standby control node 10) takes over the World Wide Port Name (WWPN) of virtual port 1 of node B (failed control node 9). Link 2 disappears, and a new link 3 is established between host / server 8 and virtual port 2 of node A. The traffic on link 2 is then transferred to link 3. Subsequently, because the traffic loads on both links 1 and 3 are processed by central processing unit (CPU) core 1, the corresponding processing load on the corresponding CPU core 1 on node A increases, making it impossible to maintain the throughput of the original traffic, thereby reducing node A's service processing capability.
[0006] Therefore, how to maintain the service throughput of the controller to improve the service processing capability is a technical problem that those skilled in the art urgently need to solve.
[0007] Summary of the Invention
[0008] The purpose of this application is to provide a service processing method, apparatus, device and medium to solve the technical problem that the current dual controllers cannot maintain the original service throughput of the standby controller after path transfer, resulting in reduced service processing capability.
[0009] To solve the above technical problems, the present application provides a service processing method applied to a storage system with dual control nodes, the method comprising:
[0010] When the service corresponding to the failed control node is transferred to the standby control node, obtaining service data of the service thread, each target virtual port of the standby control node and the permissions of each current central processing unit core;
[0011] Evenly allocating each of the target virtual ports to a corresponding target CPU core within each of the current CPU cores, wherein the number of the target CPU cores is multiple;
[0012] The business data is evenly distributed to the corresponding target CPU cores for business processing according to a business balancing processing mechanism, wherein the business balancing processing mechanism is determined based on the disk numbering properties of the business data and / or the utilization rate of each target CPU core.
[0013] On the one hand, the balancing of the target virtual ports to the corresponding target CPU cores in the current CPU cores includes:
[0014] Numbering each of the target virtual ports and each of the current central processing unit cores respectively;
[0015] Performing a modulo process on the number of each target virtual port and the total number of the current central processing unit cores to determine a remainder corresponding to the number of each target virtual port;
[0016] The remainder corresponding to the number of each target virtual port is matched to the number of each current CPU core to determine the corresponding target CPU core.
[0017] On the other hand, the business balancing processing mechanism is determined based on the nature of the disk number of the business data, and the business data is evenly distributed to the corresponding target central processing unit core for business processing according to the business balancing processing mechanism, including:
[0018] Obtaining a virtual disk number corresponding to the service data, wherein the virtual disk number is distinguished from a disk number corresponding to the host;
[0019] Numbering the target CPU cores corresponding to the target virtual ports;
[0020] Performing a modulo process on each virtual disk number and the total number of cores of the target central processing unit to determine a remainder corresponding to each virtual disk number;
[0021] The remainder corresponding to each virtual disk number is matched to the number of each target CPU core to determine the corresponding target CPU core.
[0022] On the other hand, the service balancing processing mechanism is determined based on the utilization rate of the central processing unit core, and the service data is evenly distributed to the corresponding target central processing unit core for service processing according to the service balancing processing mechanism, including:
[0023] Obtaining the utilization rate of each target CPU core;
[0024] Obtaining the target CPU cores corresponding to the maximum utilization rate and the minimum utilization rate respectively from the utilization rates of the target CPU cores;
[0025] determining a difference between the maximum usage rate and the minimum usage rate;
[0026] Determining whether the difference is greater than a difference threshold;
[0027] If it is greater, the business data is allocated to the target CPU core corresponding to the minimum usage rate for business processing.
[0028] On the other hand, the business balancing processing mechanism is determined based on the disk numbering nature of the business data and the utilization rate of each of the target CPU cores, and the business data is evenly distributed to the corresponding target CPU cores for business processing according to the business balancing processing mechanism, including:
[0029] Obtaining the utilization rate of each target CPU core;
[0030] Obtaining the target CPU cores corresponding to the maximum utilization rate and the minimum utilization rate respectively from the utilization rates of the target CPU cores;
[0031] determining a difference between the maximum usage rate and the minimum usage rate;
[0032] Determining whether the difference is greater than a difference threshold;
[0033] If it is greater than, the virtual disk corresponding to the business data is written to the target CPU core corresponding to the minimum usage rate;
[0034] If not, obtaining the virtual disk number corresponding to the service data, wherein the virtual disk number is distinguished from the host corresponding disk number;
[0035] Numbering the target CPU cores corresponding to the target virtual ports;
[0036] Performing a modulo process on each virtual disk number and the total number of cores of the target central processing unit to determine a remainder corresponding to each virtual disk number;
[0037] The remainder corresponding to each virtual disk number is matched to the number of each target CPU core to determine the corresponding target CPU core.
[0038] On the other hand, the process of determining to transfer the service corresponding to the failed control node to the standby control node includes:
[0039] Acquire the virtual port of the faulty control node, the virtual port to be transferred of the standby control node, and a port transfer list, wherein the port transfer list stores a port mapping relationship between the virtual port of the faulty control node and the virtual port to be transferred of the standby control node;
[0040] The links of the virtual port of the failed control node are transferred in parallel to the corresponding virtual port to be transferred of the standby control node according to the port transfer list.
[0041] On the other hand, the process of determining to transfer the service corresponding to the failed control node to the standby control node includes:
[0042] Obtaining a link priority corresponding to the virtual port of the fault control node, wherein the link priority is determined by the importance of a service thread undertaken by the virtual port corresponding to the link of the fault control node;
[0043] Acquire the virtual port of the faulty control node, the virtual port to be transferred of the standby control node, and a port transfer list, wherein the port transfer list stores a port mapping relationship between the virtual port of the faulty control node and the virtual port to be transferred of the standby control node;
[0044] The link of the virtual port of the failed control node is transferred to the corresponding virtual port to be transferred of the standby control node according to the port transfer list and the link priority.
[0045] On the other hand, the process of determining each current CPU core includes:
[0046] Obtaining all central processing unit cores corresponding to the backup control node;
[0047] determining the processing types and corresponding processing capabilities of all the central processing unit cores;
[0048] Selecting a central processing unit core whose processing type corresponds to the business processing type from among all the central processing unit cores;
[0049] Selecting a spare CPU core having a processing capacity greater than a preset processing capacity from among all the CPU cores except the CPU cores of the business processing type;
[0050] The central processing unit core corresponding to the business processing type and the standby central processing unit core are used as the current central processing unit cores.
[0051] On the other hand, after determining the corresponding target CPU core for balanced distribution of the service data according to the service balancing processing mechanism, and before writing the service data to the target CPU core, the method further includes:
[0052] Obtaining the current throughput of each target CPU core;
[0053] If the current throughput is less than the preset throughput, obtaining processing types and throughputs corresponding to the remaining target CPU cores except the target CPU core corresponding to the target CPU core whose current throughput is less than the preset throughput;
[0054] The target CPU core corresponding to the business processing type, the throughput greater than the preset throughput, and the maximum throughput is filtered out, and the target CPU core corresponding to the current throughput less than the preset throughput is replaced to perform business processing.
[0055] On the other hand, after the service data is evenly distributed to the corresponding target central processing unit core for service processing according to the service balancing processing mechanism, the method further includes:
[0056] Determining the processing capability corresponding to each of the target CPU cores;
[0057] Determining whether each of the processing capabilities exceeds a preset processing capability;
[0058] If the processing capacity exceeds the preset processing capacity, the target CPU core corresponding to the processing capacity exceeding the preset capacity will be marked so that the next business data will not be written to the target CPU core corresponding to the processing capacity exceeding the preset capacity.
[0059] On the other hand, the process of acquiring the target virtual port of the standby control node includes:
[0060] Obtaining a virtual port to be transferred from the failed control node to which the service corresponding to the failed control node is transferred;
[0061] Acquire an initial virtual port of a link corresponding to a service processing thread formed with a host in the standby control node;
[0062] The to-be-transferred virtual port and the initial virtual port are used as the target virtual ports.
[0063] On the other hand, after the service data is evenly distributed to the corresponding target central processing unit core for service processing according to the service balancing processing mechanism, the method further includes:
[0064] Obtaining the task completion progress corresponding to each target CPU core according to a preset time;
[0065] The memory space to which the business data corresponding to the completed task belongs is cleared and reclaimed.
[0066] To solve the above technical problems, the present application further provides a service processing device, which is applied to a storage system with dual control nodes. The device includes:
[0067] A first acquisition module is used to obtain service data of the service thread, each target virtual port of the backup control node and the permissions of each current central processing unit core when the service corresponding to the failed control node is transferred to the backup control node;
[0068] A first balanced allocation module is configured to evenly allocate each of the target virtual ports to a corresponding target CPU core within each of the current CPU cores, wherein the number of the target CPU cores is multiple;
[0069] The second balanced distribution module is used to evenly distribute the business data to the corresponding target central processing unit core for business processing according to the business balanced processing mechanism, wherein the business balanced processing mechanism is determined based on the disk number nature of the business data and / or the utilization rate of each of the target central processing unit cores.
[0070] To solve the above technical problems, the present application further provides a service processing device, including:
[0071] Memory for storing computer programs;
[0072] A processor is used to implement the steps of the business processing method as described above when executing the computer program.
[0073] In order to solve the above technical problems, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the business processing method as described above are implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only 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.
[0075] FIG1 is a schematic diagram of a path transfer of a current dual controller;
[0076] FIG2 is a schematic diagram of another path transfer of the current dual controller;
[0077] FIG3 is a flow chart of a service processing method provided in an embodiment of the present application;
[0078] FIG4 is a structural diagram of a service processing device provided in an embodiment of the present application;
[0079] FIG5 is a structural diagram of a service processing device provided in an embodiment of the present application;
[0080] FIG6 is a schematic diagram of a business processing scenario provided in an embodiment of the present application. DETAILED DESCRIPTION
[0081] The following will be combined with the accompanying 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 only 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.
[0082] The core of this application is to provide a business processing method, device, equipment and medium to solve the technical problem that the current dual controllers cannot maintain the original business throughput of the standby controller after path transfer, resulting in reduced business processing capacity.
[0083] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0084] During the dual-controller path migration process, the host cannot perceive the path change. The WWPN on the host or server port and the WWPN on the storage port can uniquely determine a path. A physical port can have multiple virtual ports, each with a WWPN. A physical port of the storage can generate multiple paths with a physical port of the host or server. Figure 2 is a schematic diagram of another path migration of the current dual-controller. As shown in Figure 2, node A (standby control node 10) has a physical port that includes two virtual ports, virtual port 1 and virtual port 2. The services of virtual port 1 and virtual port 2 are processed by the service processing thread in a round-robin manner. The physical port of node A is connected to the host / server and is used to process the host / server services. Virtual port 2 is used for port redundancy and takes over the services of node B's virtual port 1 in the event of a failure of node B (failure control node 9). Node B has a physical port that includes two virtual ports, virtual port 1 and virtual port 2. The services of virtual port 1 and virtual port 2 are processed by the service processing thread in a round-robin manner. The physical port of node B is connected to the host / server 8 and is used to process the host / server 8 services. Virtual port 2 is used for port redundancy.
[0085] After node B fails, node A's virtual port 2 takes over the WWPN of node B's virtual port 1, so link 2 disappears. A new link 3 is established between the host / server and node A's virtual port 2, and the services on link 2 are naturally transferred to link 3. In this way, the host services will not be interrupted due to the disappearance of link 2. For the specific transfer process, the host port WWPN is assumed to be wwpn-h, the WWPN on node A's virtual port 1 is assumed to be wwpn-a, and the WWPN on node B's virtual port 1 is assumed to be wwpn-b. wwpn-h and wwpn-a form link 1, and wwpn-h and wwpn-b form link 2. After node B fails, wwpn-b is transferred from node B's virtual port 1 to node A's virtual port 2, and wwpn-b and wwpn-h form a new link 3. In this way, the logical path between host port wwpn-h and storage node wwpn-b does not change, only the physical location changes.
[0086] In the above process, each service thread runs on a CPU core. When the service load on links 1 and 3 increases, the processing load on the CPU core will also increase. At this time, node A cannot maintain the original service throughput. Overall, the service processing capacity of the storage is reduced due to the failure of node B. The service processing method provided in this application can solve the current technical problems.
[0087] FIG3 is a flow chart of a service processing method provided in an embodiment of the present application. As shown in FIG3 , the method is applied to a storage system with dual control nodes, including:
[0088] S11: When the service corresponding to the failed control node is transferred to the standby control node, obtain service data of the service thread, each target virtual port of the standby control node, and permissions of each current central processing unit core;
[0089] S12: Evenly distribute each target virtual port to a corresponding target central processing unit core in each current central processing unit core of the standby control node;
[0090] Wherein, the number of target CPU cores is multiple;
[0091] S13: Evenly distribute the business data to the corresponding target CPU cores for business processing according to the business balancing processing mechanism;
[0092] The service balancing mechanism is determined based on the nature of the service data's disk numbering and / or the utilization rate of each target CPU core.
[0093] Specifically, the present application is applied to a storage system with dual control nodes. The dual control redundancy mode corresponding to the dual control nodes is not limited and can be a mutual backup mode or a dual active mode, which can be set according to the actual situation. In the mutual backup mode, both controllers are working, and one of the controllers takes over after a failure, forming a mutual backup controller of each controller. The dual active mode balances the system load at the input and output (IO) granularity, and there will be no situation where one controller is busy and the other controller is idle, resulting in a load on one controller being much higher than that on the other controller.
[0094] During service transfer and link changes, the backup control node reserves a certain number of virtual ports for the failed control node to facilitate the transfer. For example, if the backup control node has 10 virtual ports, the links will actually occupy a maximum of 5 virtual ports, and the remaining 5 ports are reserved for the failed control node. Similarly, the virtual port configuration process for the failed control node is the same. Both control nodes share common cluster data and are synchronized in real time.
[0095] In this embodiment, when the service corresponding to the failed control node is transferred to the backup control node, it does not matter which controller is the failed control node or the backup control node. Either node A or node B can be the failed control node. Transfer is performed whenever the failed control node becomes inoperable. It should be noted that the transfer path in this embodiment is independent of the load balancing between the CPU core and service threads during service processing. When transferring to the backup control node, the service thread's service data, the backup control node's target virtual ports, and the permissions of each current CPU core are obtained.
[0096] Business data is a series of logical operations that process read / write instructions from the host or server. Completing a write operation can be considered a business transaction, and completing a read operation can also be considered a business transaction. For example, a CPU core includes three businesses: Business 1: Obtaining host read / write instructions from the driver's buffer; Business 2: Parsing the instruction content, such as the logical address of the read / write instruction and the length of the read / write data; Business 3: For read instructions, sending data from local memory to the host; for write instructions, writing the host data to memory.
[0097] The target virtual ports of the standby control node can be all virtual ports within the standby control node; or they can be virtual ports formed by the occupied links, including the original virtual ports within the standby control node and the virtual ports transferred from the failed control node to the standby control node. There is no limitation here and it can be set according to actual conditions.
[0098] Each current central processing unit core can be all the CPU cores of the controller where the backup control node is located, or the CPU core responsible only for business processing, or the CPU core responsible for business processing and other processing (such as system processing, etc.), etc. There is no limitation here and it can be set according to actual conditions.
[0099] In step S12, each target virtual port is evenly distributed to the corresponding target CPU core in each current CPU core. It can be understood that the number of target CPU cores is multiple, so as to distinguish that the path transfer under the current dual controller only processes the business thread in one CPU core. The balanced distribution in this embodiment can be an average distribution, or it can be based on a certain balancing algorithm to determine the corresponding target CPU core, and the current number of CPU cores is greater than or equal to the target CPU core. The purpose of the balanced distribution in step S12 is to ensure that each target virtual port corresponds to each target CPU core, and to avoid all target virtual ports corresponding to only one target CPU core. In this embodiment, one target CPU core can correspond to one target virtual port, or it can correspond to multiple target virtual ports.
[0100] The balanced allocation in step S13 is based on the specific business data allocation. In this embodiment, business data is flexibly processed, and allocation is performed after a certain amount of business data is issued. This is not done by pre-arranging a mapping relationship between business data and virtual ports. Instead, after each virtual port is mapped to a CPU core, the mapping relationship between business data and CPU cores is considered before issuance.
[0101] The business balancing processing mechanism in this embodiment can be based on the disk numbering properties of the business data, the utilization rate of each target CPU core, or a combination of the two. Of course, other reference data besides the two can also be used for determination, which is not limited here.
[0102] Regarding the nature of the disk numbering for business data, it should be noted that the corresponding disks on the host, such as E disk and F disk, are the host's names for the disks. The disk numbers in this embodiment are based on the internal numbers of the corresponding virtual disks on the storage device. Generally, a storage device can provide up to 2048 virtual disks to a host, which is far greater than the number of CPU cores. At this time, it is necessary to determine which CPU core will process the virtual disk data (business data) to balance the CPU load and ensure even utilization of the CPU cores. The corresponding disk number can range from 0 to 2047, and the CPU core that processes the data is determined based on the nature of the number.
[0103] The target CPU core usage rate. Since there are multiple target CPU cores, balancing needs to take into account usage rates. If the difference in usage rates is small, it indicates that the target CPU cores are currently balanced. If the difference in usage rates is large, it indicates that balance has not yet been achieved and needs to be filled in the specific target CPU cores that have not reached balance based on the current business data. The specific balanced allocation process can be the same as the balanced allocation process described above, or it can be different. A new balanced processing algorithm can also be used to determine the corresponding target CPU core to facilitate business processing.
[0104] A business processing method provided by an embodiment of the present application is applied to a storage system with dual control nodes. When the business of the faulty control node is transferred to the backup control node, the target virtual port is evenly distributed to the corresponding target central processing unit core in each current central processing unit core of the backup control node as the first balanced distribution; then, according to the business balanced processing mechanism, the business data is evenly distributed to the corresponding target business processor core for business processing as the second balanced processing of the central processing unit core. The beneficial effect of the present application is that the first balanced distribution ensures the balanced processing of the business thread corresponding to the virtual port on the CPU core, and the second balanced distribution ensures the balanced processing of the business data on the business thread corresponding to the CPU core. The two balanced processing processes avoid the situation where the load increases due to the current dual controller path transfer being processed only on one CPU core, and at the same time, the original business and the transferred business on the backup control node can be balancedly processed. While ensuring the normal processing of the business of the faulty control node, the business processing capability is also improved, and the CPU resources are fully utilized to increase the business throughput.
[0105] Based on the above embodiment, in some embodiments, the step S12 of balancing the target virtual ports to the corresponding target CPU cores in each current CPU core of the standby control node includes:
[0106] Numbering each target virtual port and each current CPU core respectively;
[0107] Performing a modulo process on the number of each target virtual port and the total number of current CPU cores to determine a remainder corresponding to the number of each target virtual port;
[0108] The remainder corresponding to the number of each target virtual port is matched to the number of each current CPU core to determine the corresponding target CPU core.
[0109] Specifically, each target virtual port and each current CPU core are numbered separately. The target virtual ports are numbered starting at 0, and the current CPU cores are numbered independently of each other. The number of each target virtual port is modulo the total number of current CPU cores to determine the corresponding remainder. This remainder is then matched to the number of each current CPU core to complete the matching process.
[0110] For example, the target virtual port is numbered 5, the total number of current CPU cores is 3, and the remainder obtained by taking the remainder is 2. Then the target virtual port is matched to the current CPU core numbered 2.
[0111] The balanced matching of virtual ports and CPU cores provided in this embodiment facilitates the creation of a corresponding mapping mechanism, ensuring balanced CPU cores during subsequent service processing, and avoiding the situation where the processing is concentrated in one CPU core and causes a high load pressure.
[0112] In some embodiments, the service balancing mechanism is determined based on the nature of the disk number of the service data. Step S13 evenly distributes the service data to the corresponding target CPU core for service processing according to the service balancing mechanism, including:
[0113] Obtain the virtual disk number corresponding to the business data, where the virtual disk number is different from the host corresponding disk number;
[0114] Numbering the target CPU cores corresponding to each target virtual port;
[0115] Perform modulo processing on each virtual disk number and the total number of target CPU cores to determine the remainder corresponding to each virtual disk number;
[0116] The remainder corresponding to each virtual disk number is matched to the number of each target CPU core to determine the corresponding target CPU core.
[0117] Specifically, the business balancing processing mechanism is determined only by the nature of the disk numbering of the business data. The virtual disk number corresponding to the business data is obtained. At this time, the virtual disk number is different from the number of the corresponding disk of the host. For example, to provide business data of multiple virtual disks to the host, it is necessary to obtain the number of the virtual disk starting from 0 and then number the target CPU core. The two are independent numbering processes.
[0118] The remainder corresponding to each virtual disk number is determined by performing a modulo process on the total number of target CPU cores. Each remainder is then matched to the number of each target CPU core to determine the corresponding target CPU core. The modulo process in this embodiment is the same as the modulo process for the virtual port described above and will not be described in detail here.
[0119] In some embodiments, the service balancing mechanism is determined based on the utilization rate of the CPU core, and the service data is evenly distributed to the corresponding target CPU core for service processing according to the service balancing mechanism, including:
[0120] Get the usage of each target CPU core;
[0121] Obtaining the target CPU cores corresponding to the maximum utilization rate and the minimum utilization rate from the utilization rates of the target CPU cores;
[0122] Determine the difference between the maximum utilization rate and the minimum utilization rate;
[0123] Determine whether the difference is greater than a difference threshold;
[0124] If it is greater, the business data will be allocated to the target CPU core corresponding to the minimum utilization rate for business processing.
[0125] Specifically, the utilization rates of the target CPU cores may vary. Therefore, the balance of the target CPU cores can be determined by the utilization rate parameter. If the utilization rates differ greatly, the balance of the corresponding target CPU cores will be poor. In this case, the business data needs to be distributed to the target CPU cores with poor balance to ensure balanced distribution, so as to achieve balanced utilization of the target CPU cores and reduce the differences.
[0126] In addition, the target CPU cores corresponding to the maximum utilization rate and the minimum utilization rate can be obtained by sorting or screening, which is not limited here. The corresponding sorting method can be obtained by sorting the utilization rate of each target CPU core from large to small or from small to large, which is not limited here, and can be set according to actual conditions. The difference threshold in this embodiment can be determined based on an algorithm to determine a specific threshold, or it can be determined by parameters such as the time difference for completing the same task in the business processing process, which is not limited here.
[0127] In this embodiment, the balance of the utilization rate of each target CPU core is determined based on the difference between the maximum utilization rate and the minimum utilization rate. If the difference is greater than the difference threshold, it means that the utilization rates of the corresponding two target CPU cores are quite different, resulting in a large difference in the balance degree. Therefore, it is necessary to allocate business data to the target CPU core corresponding to the minimum utilization rate for business processing.
[0128] When the difference is less than or equal to the difference threshold, it indicates that the current usage rates of the target CPU cores are relatively small and roughly equivalent. Therefore, other balancing methods can be used for allocation.
[0129] In some embodiments, the service balancing mechanism is determined based on the disk numbering nature of the service data and the utilization rate of each target CPU core, and the service data is evenly distributed to the corresponding target CPU core for service processing according to the service balancing mechanism, including:
[0130] Get the usage of each target CPU core;
[0131] Obtaining the target CPU cores corresponding to the maximum utilization rate and the minimum utilization rate from the utilization rates of the target CPU cores;
[0132] Determine the difference between the maximum utilization rate and the minimum utilization rate;
[0133] Determine whether the difference is greater than a difference threshold;
[0134] If it is greater, the virtual disk corresponding to the business data will be moved to the target CPU core corresponding to the minimum utilization rate;
[0135] If not, obtain the virtual disk number corresponding to the business data, where the virtual disk number is different from the host corresponding disk number;
[0136] Numbering the target CPU cores corresponding to each target virtual port;
[0137] Perform modulo processing on each virtual disk number and the total number of target CPU cores to determine the remainder corresponding to each virtual disk number;
[0138] The remainder corresponding to each virtual disk number is matched to the number of each target CPU core to determine the corresponding target CPU core.
[0139] Specifically, when the difference is not greater than the difference threshold, the remainder processing method can be used. The corresponding specific method is the same as the above virtual disk number remainder method, which will not be repeated here. Please refer to the above embodiment.
[0140] Due to the different determination processes of the business balancing processing mechanism provided in this embodiment, the corresponding balanced distribution methods of evenly distributing business data to the corresponding target central processing unit cores for business processing according to the business balancing processing mechanism are different, thereby achieving diversity and flexibility in balanced distribution and ensuring load balancing of each target CPU core.
[0141] Based on the above embodiment, in some embodiments, the process of determining to transfer the service corresponding to the failed control node to the standby control node in step S11 includes:
[0142] Acquire the virtual port of the faulty control node, the virtual port to be transferred of the backup control node, and a port transfer list, wherein the port transfer list stores a port mapping relationship between the virtual port of the faulty control node and the virtual port to be transferred of the backup control node;
[0143] The links of the virtual port of the failed control node are transferred in parallel to the to-be-transferred virtual ports of the corresponding standby control node according to the port transfer list.
[0144] It is understood that the virtual port of the faulty control node primarily refers to the virtual port corresponding to the link formed between the host and the faulty control node, and the virtual port to be transferred of the backup control node is the virtual port corresponding to the backup control node to which the services of the faulty control node are to be transferred. The port transfer list stores the port mapping relationship between the virtual port of the faulty control node and the virtual port to be transferred of the backup control node. The port mapping relationship is the mapping of each virtual port pre-stored in the dual controller. For example, virtual ports 2, 4, 6, and 8 of control node A take over virtual ports 1, 3, 5, and 7 of control node B, respectively, thus forming a port mapping.
[0145] Based on the port transfer list, the links of the virtual port of the faulty control node are transferred in parallel to the corresponding virtual port to be transferred of the standby control node, so as to realize parallel processing of the transfer path and save transfer time.
[0146] In some embodiments, considering that path transfer may be sequential transfer in addition to the parallel transfer in the above embodiments, the process of determining whether to transfer the service corresponding to the failed control node to the standby control node in step S12 includes:
[0147] Obtaining a link priority corresponding to a virtual port of the faulty control node, wherein the link priority is determined by the importance of a service thread undertaken by the virtual port corresponding to the link of the faulty control node;
[0148] Acquire the virtual port of the faulty control node, the virtual port to be transferred of the backup control node, and a port transfer list, wherein the port transfer list stores a port mapping relationship between the virtual port of the faulty control node and the virtual port to be transferred of the backup control node;
[0149] The link of the virtual port of the failed control node is transferred to the to-be-transferred virtual port of the corresponding standby control node according to the port transfer list and the link priority.
[0150] Specifically, the link priority corresponding to the virtual port of the faulty control node is obtained. The link priority can be determined by the corresponding service thread priority. In this embodiment, the service thread priority can be determined by the importance of the service thread, or by the size of the space occupied by other service threads, etc., which is not limited here. Based on the port transfer list and the link priority, the link of the virtual port of the faulty control node is transferred to the corresponding virtual port with transfer. In other words, based on the link priority, the link with higher priority is transferred first, and the link with lower priority is transferred later, so as to achieve orderly link transfer.
[0151] In the link transfer process provided by this embodiment, the corresponding parallel transfer can save transfer time, and the transfer is carried out in the transfer order of the link priority, thereby achieving orderly link transfer.
[0152] Based on the above embodiment, in some embodiments, the process of determining each current CPU core in step S11 includes:
[0153] Get all the CPU cores corresponding to the backup control node;
[0154] Determine the processing type and corresponding processing capabilities of all CPU cores;
[0155] Filtering among all the CPU cores a CPU core whose processing type corresponds to the business processing type;
[0156] Selecting a spare CPU core having a processing capacity greater than a preset processing capacity from among all CPU cores except for the business processing type;
[0157] The central processing unit core corresponding to the business processing type and the reserve central processing unit core are used as the current central processing unit cores.
[0158] It is understandable that the current CPU core in this embodiment can be based on all CPU cores corresponding to the entire controller, or can be based on a specific CPU core for subsequent allocation. This embodiment takes into account the limitations of processing type and processing capacity.
[0159] First, CPU cores whose processing type corresponds to the business processing type are screened out. The corresponding screening process can be performed using a flag bit method, or CPU cores corresponding to the frequently used processing of business data can be set as the CPU cores of the business processing type. In addition, among the remaining CPU cores other than the business processing type, a spare CPU core whose processing capacity is greater than the preset processing capacity is screened. In this embodiment, the spare CPU core, considering the higher processing capacity of the CPU core, can be used as an alternative for processing business data of the business thread to improve the efficiency of subsequent business processing.
[0160] The CPU core and the reserve CPU core corresponding to the above-mentioned business processing type are used as the current CPU core, so that subsequent balanced processing is distributed in the current CPU core.
[0161] In some embodiments, after determining the corresponding target CPU core for balanced distribution of service data according to the service balancing mechanism, and before writing the service data to the target CPU core, the process further includes:
[0162] Get the current throughput of each target CPU core;
[0163] If the current throughput is less than the preset throughput, obtaining the processing types and throughputs corresponding to the remaining target CPU cores except the target CPU core corresponding to the target CPU core whose current throughput is less than the preset throughput;
[0164] Filter out the target CPU cores whose processing type is business processing type, whose throughput is greater than the preset throughput and whose throughput is the largest, and replace the target CPU cores whose current throughput is less than the preset throughput to perform business processing.
[0165] Specifically, after determining the target CPU core, before the data is stored on the target CPU core for business processing, the throughput of the target CPU core is checked again to ensure that the target CPU core currently storing the data can handle the business data and that the throughput reaches a certain preset throughput.
[0166] If the current throughput is less than the preset throughput, another target CPU core is obtained. This other target CPU core is a CPU core with a throughput greater than or equal to the preset throughput. The processing type and throughput corresponding to the other target CPU core are obtained, and the other target CPU cores are screened. The corresponding screening conditions are mainly that the processing type is a business processing type, the throughput is greater than the preset throughput, and the throughput is the highest among the other target CPU cores. After screening, the target CPU core corresponding to the one with a current throughput less than the preset throughput is replaced to facilitate subsequent business processing.
[0167] It should be noted that the screening conditions can be other conditions, such as processing power, etc. The number of replacement CPU cores can be one or more, which is not limited here. If there are multiple replacement CPU cores, the target CPU core with the largest throughput can take over multiple target CPU cores whose current throughput is less than the preset throughput. Or, if there are multiple other target CPU cores with the largest throughput, balanced matching can be performed. The balanced matching here can follow the above-mentioned matching process or adopt other new matching processing methods, which is not limited here.
[0168] The embodiment of the present application provides a method for checking the target CPU core to be written to the disk before processing the business, ensuring the balance of the CPU cores, so as to improve the efficiency of subsequent business processing.
[0169] In some embodiments, after the service data is evenly distributed to the corresponding target CPU cores for service processing according to the service balancing mechanism, the method further includes:
[0170] Determine the corresponding processing capabilities of each target CPU core;
[0171] Determine whether each processing capacity exceeds the preset processing capacity;
[0172] If the processing capacity exceeds the preset processing capacity, the target CPU core corresponding to the exceeding preset processing capacity will be marked so that the next business data will not be written to the target CPU core corresponding to the exceeding preset processing capacity.
[0173] Specifically, after the current business data is allocated to the target CPU core for business processing, in order to evenly distribute the next business data, it is necessary to check the processing capacity corresponding to each target CPU core. If the processing capacity exceeds the preset processing capacity, it is necessary to mark the target CPU core corresponding to the exceeding preset processing capacity so that the next business data will not be written to the marked target CPU core, saving the processing time and calculation time for even distribution and improving the overall business processing efficiency.
[0174] In some embodiments, the process of acquiring the target virtual port of the standby control node includes:
[0175] Obtaining a virtual port to be transferred from a failed control node to a standby control node for transferring services corresponding to the failed control node;
[0176] Obtaining an initial virtual port of a link corresponding to a service processing thread formed with the host in the standby control node;
[0177] The virtual port to be transferred and the initial virtual port are used as target virtual ports.
[0178] Specifically, the target virtual ports in this embodiment can be all virtual ports of the standby control node, or can be virtual ports corresponding to actual links. Considering the balanced load of the CPU core and the service processing between service data, in this embodiment, subsequent balanced matching is only performed on the virtual ports that actually form links in the standby control node.
[0179] The virtual ports that actually form links in the standby control node mainly include the initial virtual ports in the standby control node that originally formed links corresponding to the business processing threads with the host and the virtual ports to be transferred from the faulty control node to the standby control node, so as to shorten the time for balancing the distribution and save resources.
[0180] In some embodiments, after the service data is evenly distributed to the corresponding target CPU cores for service processing according to the service balancing mechanism, the method further includes:
[0181] Obtain the task completion progress corresponding to each target CPU core according to the preset time;
[0182] Clear and reclaim the memory space belonging to the business data corresponding to the completed tasks.
[0183] Specifically, the task completion progress corresponding to each target CPU core is obtained according to a preset time, and the memory space to which the business data of the completed task belongs is cleared and reclaimed to ensure regular cleaning of the memory space and save memory space.
[0184] The preset time in this embodiment is not limited to a specific value, and can be comprehensively considered based on the number of services in each target CPU core and specific data, etc. The clearing and recycling time is also not limited and can be set according to actual conditions.
[0185] The above detailed descriptions of various embodiments corresponding to the service processing method are based on this. This application also discloses a service processing device corresponding to the above method, which is applied to a storage system with dual control nodes. FIG4 is a structural diagram of a service processing device provided in an embodiment of this application. As shown in FIG4 , the service processing device includes:
[0186] The first acquisition module 11 is used to obtain the service data of the service thread, the target virtual ports of the backup control node and the permissions of the current central processing unit cores when the service corresponding to the failed control node is transferred to the backup control node;
[0187] A first balanced allocation module 12 is configured to evenly allocate each target virtual port to a corresponding target CPU core in each current CPU core, wherein the number of the target CPU cores is multiple;
[0188] The second balanced distribution module 13 is used to evenly distribute business data to the corresponding target CPU cores for business processing according to the business balanced processing mechanism, wherein the business balanced processing mechanism is determined based on the disk numbering properties of the business data and / or the utilization rate of each target CPU core.
[0189] On the one hand, the first balanced distribution module 12 includes:
[0190] A first numbering submodule is used to number each target virtual port and each current central processing unit core respectively;
[0191] A first remainder processing submodule is configured to perform remainder processing on the number of each target virtual port and the total number of current CPU cores to determine a remainder corresponding to the number of each target virtual port;
[0192] The first allocation submodule is configured to match the remainder corresponding to the number of each target virtual port to the number of each current CPU core to determine the corresponding target CPU core.
[0193] On the other hand, the business balancing processing mechanism is determined based on the nature of the business data's disk numbering. The second balancing distribution module 13 includes:
[0194] A first acquisition submodule is configured to acquire a virtual disk number corresponding to the service data, wherein the virtual disk number is distinguished from a host corresponding disk number;
[0195] A second numbering submodule is used to number the target central processing unit core corresponding to each target virtual port;
[0196] The second remainder processing submodule is used to perform remainder processing on each virtual disk number with respect to the total number of target central processing unit cores to determine the remainder corresponding to each virtual disk number;
[0197] The second allocation submodule is configured to match the remainder corresponding to each virtual disk number to the number of each target CPU core to determine the corresponding target CPU core.
[0198] On the other hand, the service balancing mechanism is determined based on the utilization rate of the CPU core. The second balancing distribution module 13 includes:
[0199] The second acquisition submodule is used to obtain the usage rate of each target CPU core;
[0200] A third acquisition submodule is used to acquire the target CPU cores corresponding to the maximum utilization rate and the minimum utilization rate respectively from the utilization rates of the target CPU cores;
[0201] A first determining submodule, configured to determine a difference between a maximum usage rate and a minimum usage rate;
[0202] The first judgment submodule is used to judge whether the difference is greater than the difference threshold; if so, the third allocation submodule is triggered;
[0203] The third allocation submodule is used to allocate business data to the target central processing unit core corresponding to the minimum utilization rate for business processing.
[0204] On the other hand, the service balancing mechanism is determined based on the nature of the service data's disk numbering and the utilization rate of each target CPU core. The second balancing allocation module 13 includes:
[0205] The fourth acquisition submodule is used to obtain the usage rate of each target CPU core;
[0206] A fifth acquisition submodule is configured to acquire the target CPU cores corresponding to the maximum utilization rate and the minimum utilization rate respectively from the utilization rates of the target CPU cores;
[0207] A second determining submodule is used to determine the difference between the maximum usage rate and the minimum usage rate;
[0208] The second judgment submodule is used to judge whether the difference is greater than the difference threshold; if so, the fourth allocation submodule is triggered; if not, the sixth acquisition submodule is triggered;
[0209] A fourth allocation submodule is configured to store the virtual disk corresponding to the business data to the target CPU core corresponding to the minimum usage rate;
[0210] A sixth acquisition submodule is used to obtain a virtual disk number corresponding to the service data, wherein the virtual disk number is distinguished from a disk number corresponding to the host;
[0211] A third numbering submodule is used to number the target CPU core corresponding to each target virtual port;
[0212] The third remainder processing submodule is used to perform remainder processing on each virtual disk number with respect to the total number of target CPU cores to determine the remainder corresponding to each virtual disk number;
[0213] The fifth allocation submodule is configured to match the remainder corresponding to each virtual disk number to the number of each target CPU core to determine the corresponding target CPU core.
[0214] On the other hand, the process of determining whether to transfer the service corresponding to the failed control node to the standby control node includes:
[0215] a seventh acquisition submodule, configured to acquire the virtual port of the failed control node, the virtual port to be transferred of the backup control node, and a port transfer list, wherein the port transfer list stores a port mapping relationship between the virtual port of the failed control node and the virtual port to be transferred of the backup control node;
[0216] The first transfer submodule is configured to transfer links of the virtual port of the failed control node to the corresponding virtual port to be transferred of the standby control node in parallel according to the port transfer list.
[0217] On the other hand, the process of determining whether to transfer the service corresponding to the failed control node to the standby control node includes:
[0218] an eighth acquisition submodule, configured to acquire a link priority corresponding to the virtual port of the faulty control node, wherein the link priority is determined by the importance of a service thread undertaken by the virtual port corresponding to the link of the faulty control node;
[0219] a ninth acquisition submodule, configured to acquire the virtual port of the failed control node, the virtual port to be transferred of the backup control node, and a port transfer list, wherein the port transfer list stores a port mapping relationship between the virtual port of the failed control node and the virtual port to be transferred of the backup control node;
[0220] The second transfer submodule is configured to transfer the link of the virtual port of the failed control node to the to-be-transferred virtual port of the corresponding standby control node according to the port transfer list and the link priority.
[0221] On the other hand, the process of determining each current CPU core includes:
[0222] a tenth acquisition submodule, configured to acquire all central processing unit cores corresponding to the standby control node;
[0223] A third determination submodule is used to determine the processing type and corresponding processing capacity of all central processing unit cores;
[0224] A first screening processing submodule is used to screen out central processing unit cores whose processing type corresponds to the business processing type from among all central processing unit cores;
[0225] The second screening processing submodule is used to screen out spare CPU cores whose processing capabilities are greater than the preset processing capabilities from CPU cores other than the business processing type in all CPU cores;
[0226] The first one is a submodule, which is used to use the central processing unit core and the standby central processing unit core corresponding to the service processing type as the current central processing unit cores.
[0227] On the other hand, after determining the corresponding target CPU core for balanced distribution of service data according to the service balancing mechanism, and before writing the service data to the target CPU core, the process further includes:
[0228] an eleventh acquisition submodule, for acquiring the current throughput of each target CPU core;
[0229] a twelfth obtaining submodule, configured to obtain, if the current throughput is less than the preset throughput, processing types and throughputs corresponding to the remaining target CPU cores except for the target CPU core corresponding to the target CPU core whose current throughput is less than the preset throughput;
[0230] The third screening processing submodule is used to screen out the target CPU cores whose processing type is business processing type, whose throughput is greater than the preset throughput and whose throughput is the maximum, and replace the target CPU cores whose current throughput is less than the preset throughput to perform business processing.
[0231] On the other hand, after the second balanced distribution module 13, the following is further included:
[0232] A fourth determination submodule is used to determine the processing capability corresponding to each target CPU core;
[0233] The third judgment submodule is used to judge whether each processing capacity exceeds the preset processing capacity; if there is a processing capacity that exceeds the preset processing capacity, the first marking submodule is triggered;
[0234] The first marking submodule is used to mark the target CPU core that exceeds the preset processing capacity so that the next business data will not be stored in the target CPU core that exceeds the preset processing capacity.
[0235] On the other hand, the process of acquiring the target virtual port of the standby control node includes:
[0236] The thirteenth obtaining submodule is used to obtain the virtual port to be transferred from the failed control node to the standby control node;
[0237] A fourteenth obtaining submodule is used to obtain an initial virtual port of a link corresponding to a service processing thread formed with the host in the standby control node;
[0238] The second submodule is used to use the virtual port to be transferred and the initial virtual port as target virtual ports.
[0239] On the other hand, after the second balanced distribution module 13, the following is further included:
[0240] The fifteenth acquisition submodule is used to obtain the task completion progress corresponding to each target CPU core according to a preset time;
[0241] The first recycling submodule is used to clear and recycle the memory space to which the business data corresponding to the completed tasks belongs.
[0242] Since the embodiments of the device part correspond to the above embodiments, the embodiments of the device part please refer to the description of the embodiments of the method part, and will not be repeated here.
[0243] For an introduction to a business processing device provided by this application, please refer to the above method embodiment, and this application will not go into details here. It has the same beneficial effects as the above business processing method.
[0244] FIG5 is a structural diagram of a service processing device provided in an embodiment of the present application. As shown in FIG5 , the device includes:
[0245] Memory 21, for storing computer programs;
[0246] The processor 22 is configured to implement the steps of the business processing method when executing a computer program.
[0247] The service processing device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.
[0248] Among them, the processor 22 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 22 can be implemented in at least one hardware form of a digital signal processor (DSP), a field programmable gate array (FPGA), and a programmable logic array (PLA). The processor 22 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU; the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 22 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 22 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0249] The memory 21 may include one or more computer-readable storage media, which may be non-transitory. The memory 21 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 21 is at least used to store the following computer program 211, wherein, after the computer program is loaded and executed by the processor 22, it can implement the relevant steps of the business processing method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 21 may also include an operating system 212 and data 213, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 212 may include Windows, Unix, Linux, etc. The data 213 may include but is not limited to data involved in the business processing method, etc.
[0250] In some embodiments, the business processing device may further include a display screen 23 , an input / output interface 24 , a communication interface 25 , a power supply 26 , and a communication bus 27 .
[0251] Those skilled in the art will appreciate that the structure shown in FIG5 does not constitute a limitation on the business processing device, and may include more or fewer components than shown in the figure.
[0252] The processor 22 implements the service processing method provided by any of the above embodiments by calling the instructions stored in the memory 21 .
[0253] For an introduction to a business processing device provided by this application, please refer to the above method embodiment, and this application will not go into details here. It has the same beneficial effects as the above business processing method.
[0254] Furthermore, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by the processor 22, the steps of the above-mentioned business processing method are implemented.
[0255] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0256] For an introduction to a computer-readable storage medium provided in this application, please refer to the above method embodiment, which will not be repeated in this application. It has the same beneficial effects as the above business processing method.
[0257] Figure 6 is a schematic diagram of a business processing scenario provided by an embodiment of the present application. As shown in Figure 6, node A (standby control node 10) has a physical port including two virtual ports, virtual port 1 and virtual port 2. The business of virtual port 1 is processed by business processing thread 1, and the business processing thread is affinity bound to the central processing unit core 1. The business of virtual port 2 is processed by business processing thread 2, and the business processing thread 2 is affinity bound to the CPU core 2. The physical port of node A is connected to the host / server 8 for processing the business of host / server 8. Virtual port 2 is used for port redundancy. When node B (fault control node 9) fails, node A takes over the business of virtual port 1 of node B; node B has a physical port including two virtual ports, virtual port 1 and virtual port 2. The business of virtual port 1 is processed by business processing thread 1, and the business processing thread is affinity bound to the CPU core 1. The business of virtual port 2 is processed by business processing thread 2, and the business processing thread 2 is affinity bound to the CPU core 2. The physical port of node B is connected to the host / server for processing the business of host / server. Virtual port 2 is used for port redundancy. When node A fails, node B takes over the business of virtual port 1 of node A. Compared with the original design, if one node in the dual-control system fails, the links accessible to the storage on the host side will not be reduced. The business of the failed node will be transferred to the partner node (the partner node is fault-free), which will not cause excessive load on some CPU cores of the partner node (there are enough CPU cores). Through the reasonable binding of virtual ports and CPU core affinity, CPU resources can be effectively utilized, business loads can be balanced, and the original business throughput can be guaranteed.
[0258] The above is a detailed introduction to a business processing method, device, equipment and medium provided by the present application. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the scope of protection of this application.
[0259] It should also be noted that, in this specification, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
Claims
1. A service processing method, characterized in that, A storage system applied to dual control nodes, the method comprising: When the services corresponding to the faulty control node are transferred to the standby control node, obtaining the service data of the service thread, the permissions of each target virtual port of the standby control node, and each current central processing unit core; Evenly distributing each of the target virtual ports to the corresponding target central processing unit cores within each of the current central processing unit cores, wherein the number of the target central processing unit cores is multiple; According to the service balancing processing mechanism, evenly distributing the service data to the corresponding target central processing unit cores for service processing, wherein the service balancing processing mechanism is determined based on the disk write number property of the service data and / or the utilization rate of each of the target central processing unit cores.
2. The service processing method according to claim 1, wherein The evenly distributing each of the target virtual ports to the corresponding target central processing unit cores within each of the current central processing unit cores includes: Numbering each of the target virtual ports and each of the current central processing unit cores respectively; Performing a remainder operation on the number of each of the target virtual ports with respect to the total number of the current central processing unit cores to determine the remainder corresponding to the number of each of the target virtual ports; Matching the remainder corresponding to the number of each of the target virtual ports to the number of each of the current central processing unit cores to determine the corresponding target central processing unit core.
3. The service processing method according to claim 2, characterized in that The service balancing processing mechanism is determined based on the disk write number property of the service data. The evenly distributing the service data to the corresponding target central processing unit cores for service processing according to the service balancing processing mechanism includes: Obtaining the virtual disk number corresponding to the service data, wherein the virtual disk number is different from the disk number corresponding to the host; Numbering the target central processing unit cores corresponding to each of the target virtual ports; Performing a remainder operation on each of the virtual disk numbers with respect to the total number of the target central processing unit cores to determine the remainder corresponding to each of the virtual disk numbers; Matching the remainder corresponding to each of the virtual disk numbers to the number of each of the target central processing unit cores to determine the corresponding target central processing unit core.
4. The service processing method according to claim 2, wherein The service balancing processing mechanism is determined based on the utilization rate of the central processing unit cores. The evenly distributing the service data to the corresponding target central processing unit cores for service processing according to the service balancing processing mechanism includes: Obtaining the utilization rate of each of the target central processing unit cores; Obtaining the target central processing unit cores corresponding to the maximum utilization rate and the minimum utilization rate respectively among the utilization rates of each of the target central processing unit cores; Determining the difference between the maximum utilization rate and the minimum utilization rate; Judging whether the difference is greater than the difference threshold; In response to the difference being greater than the difference threshold, allocating the service data to the target central processing unit core corresponding to the minimum utilization rate for service processing.
5. The service processing method according to claim 2, wherein The service balancing processing mechanism is determined based on the disk write number property of the service data and the utilization rate of each of the target central processing unit cores. The evenly distributing the service data to the corresponding target central processing unit cores for service processing according to the service balancing processing mechanism includes: Obtain the usage rate of each of the target central processing unit cores; Obtain the target central processing unit cores corresponding to the maximum usage rate and the minimum usage rate respectively among the usage rates of each of the target central processing unit cores; Determine the difference between the maximum usage rate and the minimum usage rate; Judge whether the difference is greater than the difference threshold; In response to the difference being greater than the difference threshold, drop the virtual disk corresponding to the service data to the target central processing unit core corresponding to the minimum usage rate; In response to the difference not being greater than the difference threshold, obtain the virtual disk number corresponding to the service data, where the virtual disk number is different from the disk number corresponding to the host; Number the target central processing unit cores corresponding to each of the target virtual ports; Perform a remainder operation on the total number of the target central processing unit cores with each of the virtual disk numbers to determine the remainder corresponding to each of the virtual disk numbers; Match the remainder corresponding to each of the virtual disk numbers to the number of each of the target central processing unit cores to determine the corresponding target central processing unit core.
6. The service processing method according to claim 1, characterized in that, The process of determining the transfer of the service corresponding to the faulty control node to the standby control node includes: Obtain the virtual ports of the faulty control node, the virtual ports to be transferred of the standby control node, and the port transfer list, where the port transfer list stores the port mapping relationship between the virtual ports of the faulty control node and the virtual ports to be transferred of the standby control node; Parallel transfer the links of the virtual ports of the faulty control node to the corresponding virtual ports to be transferred of the standby control node according to the port transfer list.
7. The service processing method according to claim 1, characterized in that The process of determining the transfer of the service corresponding to the faulty control node to the standby control node includes: Obtain the link priority corresponding to the virtual port of the faulty control node, where the link priority is determined by the importance of the service threads carried by the virtual port corresponding to the link of the faulty control node; Obtain the virtual ports of the faulty control node, the virtual ports to be transferred of the standby control node, and the port transfer list, where the port transfer list stores the port mapping relationship between the virtual ports of the faulty control node and the virtual ports to be transferred of the standby control node; Transfer the links of the virtual ports of the faulty control node to the corresponding virtual ports to be transferred of the standby control node according to the port transfer list and the link priority.
8. The service processing method according to claim 1, characterized in that The process of determining each of the current central processing unit cores includes: Obtain all the central processing unit cores corresponding to the standby control node; Determine the processing types and the corresponding processing capabilities of all the central processing unit cores; Screen the central processing unit cores with the processing type being the service processing type among all the central processing unit cores; Screen the preliminary central processing unit cores with the corresponding processing capabilities greater than the preset processing capabilities among the other central processing unit cores except the service processing type among all the central processing unit cores; Use the central processing unit cores corresponding to the service processing type and the preliminary central processing unit cores as each of the current central processing unit cores.
9. The service processing method according to any one of claims 3 to 5, characterized in that After determining the corresponding target central processing unit core for the balanced distribution of the service data according to the service balancing processing mechanism, before disk-writing the service data to the target central processing unit core, it further includes: Obtain the current throughput of each of the target central processing unit cores; If there is a situation where the current throughput is less than the preset throughput, then obtain the processing types and throughputs corresponding to the remaining target central processing unit cores except for the target central processing unit core corresponding to the current throughput being less than the preset throughput; Filter out the target central processing unit core corresponding to the processing type being the service processing type, the throughput being greater than the preset throughput, and the maximum throughput, and replace the target central processing unit core corresponding to the current throughput being less than the preset throughput for service processing.
10. The service processing method according to claim 9, wherein After performing service processing on the service data by evenly distributing it to the corresponding target central processing unit cores according to the service balancing processing mechanism, it further includes: Determine the processing capabilities corresponding to each of the target central processing unit cores; Judge whether each of the processing capabilities exceeds the preset processing capabilities; If there is a situation where the processing capabilities exceed the preset processing capabilities, then mark the target central processing unit cores corresponding to the processing capabilities exceeding the preset processing capabilities, so as to prevent the service data from being disk-written to the target central processing unit cores corresponding to the processing capabilities exceeding the preset processing capabilities in the next time.
11. The service processing method according to claim 6 or 7, characterized in that, The process of obtaining the target virtual ports of the standby control node includes: Obtain the virtual ports to be transferred for the services corresponding to the faulty control node that are transferred to the standby control node; Obtain the initial virtual ports of the links corresponding to the service processing threads formed with the host within the standby control node; Use the virtual ports to be transferred and the initial virtual ports as the target virtual ports.
12. The service processing method according to claim 1, characterized in that After performing service processing on the service data by evenly distributing it to the corresponding target central processing unit cores according to the service balancing processing mechanism, it further includes: Obtain the task completion progress corresponding to each of the target central processing unit cores according to the preset time; Clear and recycle the memory space to which the service data corresponding to the completed tasks belongs.
13. The service processing method according to claim 1, characterized in that The dual control nodes are in a mutual standby mode or an active-active mode.
14. The service processing method according to claim 1, characterized in that Each of the target central processing unit cores corresponds to one or more of the target virtual ports.
15. The service processing method according to claim 4, wherein The step of obtaining the target central processing unit cores corresponding to the maximum utilization rate and the minimum utilization rate respectively among the utilization rates of each of the target central processing unit cores includes: Obtain through sorting.
16. The service processing method according to claim 4, wherein The step of obtaining the target central processing unit cores corresponding to the maximum utilization rate and the minimum utilization rate respectively among the utilization rates of each of the target central processing unit cores includes: Obtain through filtering.
17. The service processing method according to claim 6, wherein The port mapping relationship is the mapping stored in advance under each virtual port within the dual control nodes.
18. A service processing device, characterized in that, Applied to a storage system with dual control nodes, the device includes: A first acquisition module, configured to, when the services corresponding to the faulty control node are transferred to the standby control node, acquire the service data of the service threads, the target virtual ports of the standby control node, and the permissions of each current central processing unit core; The first equal distribution module is configured to evenly distribute each of the target virtual ports to the corresponding target central processing unit cores within each of the current central processing unit cores, wherein the number of the target central processing unit cores is multiple; The second equal distribution module is configured to evenly distribute the service data to the corresponding target central processing unit cores for service processing according to a service equalization processing mechanism, wherein the service equalization processing mechanism is determined based on the disk write number property of the service data and / or the utilization rate of each of the target central processing unit cores.
19. A service processing device, characterized in that, Comprising: A memory for storing a computer program; A processor for implementing the steps of the service processing method according to any one of claims 1 to 17 when executing the computer program.
20. 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 service processing method according to any one of claims 1 to 17 are implemented.
Citation Information
Patent Citations
VTL backup method and VTL nodes
CN103414588A
Resource access method and device
CN105677519A
NPIV implementation method based on multi-control MCS system
CN107911247A
Method for binding software service to CPU core and related device
CN114138471A
Multi-process data processing method and device, gateway and readable storage medium
CN115484129A