A multi-control storage load balancing method, device and computer equipment
By dividing and associating logical unit data blocks to multiple controllers in a multi-control storage system, the problem of load imbalance in traditional multi-control storage systems is solved, achieving more efficient resource utilization and performance improvement.
Patent Information
- Application Number
- CN202210476877.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-30
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2042-04-30
AI Technical Summary
In traditional multi-control storage systems, specifying a preferred storage unit node for a single logical unit leads to load imbalance and a serious waste of hardware resources. Especially in single logical unit and multi-control storage system application scenarios, it is difficult to improve system storage performance.
The host sends a request to query the key products of the storage unit to determine whether the storage unit supports logical unit data block access. If it supports, the logical unit data is divided into multiple logical unit data blocks and is associated to multiple controllers in turn to achieve multi-control storage. Load balancing.
It effectively realizes load balancing of multi-control storage among controllers, improves system storage performance and makes full use of hardware resources.
Smart Images

Figure CN114780040B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a multi-control storage load balancing method, device and computer equipment. Background Art
[0002] When a multi-controller storage system receives a read data request from a host, the read data request reaches the backend disk through the controller and then returns to the host; if it is a write request, it is written to the backend disk through the controller. For a multi-controller storage system, especially a multi-controller storage system with one frame, there are four controller nodes under one controller frame. It is necessary to adopt a suitable strategy to determine which controller the data request should go through to send it to the backend disk. By adopting a suitable strategy, the load balance between the host and the storage system is guaranteed and the performance of the overall system is improved. Traditional strategies often adopt a single logical unit strategy, specifying a preferred storage unit node (i.e., prefer node) for a certain logical unit, and the belonging controller processes the request on the logical unit. In the scenario of a single logical unit, if the user adopts a multi-path grouping strategy (such as: group_by_prio multi-path grouping strategy), all input / output traffic will be sent to the backend disk through the belonging controller of the logical unit, while other controllers will have no input / output traffic, resulting in load imbalance and serious waste of hardware resources.
[0003] Therefore, for the application scenario of a single logic unit and multi-controller storage system, it is urgent to propose a multi-controller storage load balancing method that can improve the system storage performance. Summary of the invention
[0004] In order to solve at least one of the problems mentioned in the above background technology, the present invention provides a multi-controller storage load balancing method, apparatus and computer equipment, which can achieve load balancing of multi-controller storage among controllers.
[0005] The specific technical solutions provided by the embodiments of the present invention are as follows:
[0006] In a first aspect, a multi-controller storage load balancing method is provided, the method comprising: a host sends a storage unit key product query request to the storage unit to determine whether the storage unit supports logical unit data blocks to access the storage unit; if the storage unit supports logical unit data blocks to access the storage unit, then based on the logical unit data, the logical unit data is divided into a plurality of logical unit data blocks and each of the logical unit data blocks is associated with any controller to achieve multi-controller storage load balancing.
[0007] Furthermore, associating each of the logical unit data blocks with any controller includes: based on the logical unit data, obtaining the arrangement order of the logical unit data blocks; based on the arrangement order of the logical unit data blocks, associating each of the logical unit data blocks with any controller in turn, and repeatedly traversing the controllers until each of the logical unit data blocks is associated with any of the controllers.
[0008] Furthermore, based on the logical unit data, before dividing the logical unit data into a number of logical unit data blocks, the method also includes: the host sends a storage unit key product information data page query request to the storage unit, and the storage unit returns a storage unit key information data page to the host; the host sends a report target port group command to the storage unit, and the storage unit returns a target port group descriptor to the host; the host sends a report logical unit data block access storage unit information request to the storage unit, and the storage unit returns the logical unit data block access storage unit information to the host.
[0009] Furthermore, the key product information data of the storage unit includes: address parameters of each logical unit data block.
[0010] Furthermore, the logical unit data block access storage unit information includes: a descriptor format of a user data segment.
[0011] Furthermore, each logical unit data block is 32M.
[0012] Furthermore, the storage unit access information of the logic unit data block is obtained by the storage unit from a lower layer input / output stack.
[0013] In a second aspect, a multi-controller storage load balancing device is provided, the device comprising: an information confirmation unit, a host sends query request information to the storage unit, the information confirmation unit is used to determine whether the storage unit supports logical unit data blocks to access the storage unit; a data partitioning unit, the data partitioning unit is communicatively connected to the information confirmation unit, if the information confirmation unit determines that the storage unit supports logical unit data blocks to access the storage unit, then the data partitioning unit divides the logical unit data into a plurality of logical unit data blocks based on the logical unit data to achieve multi-controller storage load balancing; an association unit, the association unit is communicatively connected to the data partitioning unit, the association unit is used to associate each of the logical unit data blocks to any controller.
[0014] Furthermore, the device also includes: an information sending unit, which is used for the host to send a storage unit key product information data page query request to the storage unit, and is also used for the host to send a report target port group command to the storage unit, and is also used for the host to send a report logical unit data block access storage unit information request to the storage unit; an information returning unit, which is used for the storage unit to return a storage unit key information data page to the host, and is also used for the storage unit to return a target port group descriptor to the host, and is also used for the storage unit to return logical unit data block access storage unit information to the host.
[0015] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:
[0016] Step A: the host sends a storage unit key product query request to the storage unit to determine whether the storage unit supports logical unit data block access to the storage unit;
[0017] Step B: if the storage unit supports logical unit data block access to the storage unit, then based on the logical unit data, dividing the logical unit data into a plurality of logical unit data blocks;
[0018] Step C: Associating each of the logic unit data blocks with any controller to achieve multi-controller storage load balancing.
[0019] The embodiments of the present invention have the following beneficial effects: the present invention provides a multi-control storage load balancing method, the method comprising: the host sends a query storage unit key product request to the storage unit to determine whether the storage unit supports the logical unit data block to access the storage unit; if the storage unit supports the logical unit data block to access the storage unit, then based on the logical unit data, the logical unit data is divided into a plurality of logical unit data blocks; each of the logical unit data blocks is associated with any controller to achieve multi-control storage load balancing. Based on the multi-control storage load method described in the present application, the logical unit blocks can be attributed to a certain controller node, which can effectively achieve load balancing of multi-control storage between controllers. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. 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 creative work.
[0021] Figure 1 A schematic diagram showing the flow of the multi-control storage load balancing method of the present application is shown;
[0022] Figure 2 A structural diagram showing the association of the logic unit data block and the controller of the present application;
[0023] Figure 3 A structural diagram showing the association of the logic unit data block and the controller of the present application;
[0024] Figure 4 A schematic diagram showing the communication between the host and the storage unit of the present application;
[0025] Figure 5 A schematic diagram showing the user data segment description format of the present application is shown;
[0026] Figure 6 A schematic diagram showing the structure of the multi-control storage load balancing device of the present application is shown;
[0027] Figure 7 A schematic diagram showing the structure of the computer device of the present application is shown. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all 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.
[0029] Embodiment 1
[0030] A multi-controller storage load balancing method, refer to Figure 1 , including the following steps: the host sends a storage unit key product query request to the storage unit, that is, the host queries the EVPD to determine whether the storage unit supports the logical unit data block to access the storage unit; if the storage unit supports the logical unit data block to access the storage unit, then based on the logical unit data, the logical unit data is divided into a number of logical unit data blocks; each of the logical unit data blocks is associated with any controller to achieve multi-control storage load balancing. It should be understood that in actual application scenarios, the storage unit and the host realize the reading and writing of logical unit data through the controller.
[0031] In one embodiment, associating each of the logical unit data blocks with any controller includes: obtaining an arrangement order of the logical unit data blocks based on the logical unit data; associating each of the logical unit data blocks with any controller in turn based on the arrangement order of the logical unit data blocks, and repeatedly traversing the controllers until each of the logical unit data blocks is associated with any of the controllers.
[0032] Specifically, Figure 2 and Figure 3 As shown, when the number of controllers in the multi-controller storage load balancing method is four, associating each of the logical unit data blocks with any controller includes: based on the logical unit data, obtaining the arrangement order of the logical unit data blocks, that is, dividing the logical unit into a plurality of logical unit data blocks, wherein any two logical unit data blocks are connected end to end, that is, logical unit data blocks arranged in a certain order constitute a logical unit; based on the arrangement order of the logical unit data blocks, associating each of the logical unit data blocks with any controller in turn, and repeatedly traversing the controllers until each of the logical unit data blocks is associated with any of the controllers. That is to say, the number of the logical unit data blocks may be inconsistent with the number of controllers. When the number of the logical unit data blocks is consistent with the number of controllers, each controller corresponds to a logical unit data block. When the number of controllers is consistent with the number of the logical unit data blocks, for example, the number of the logical unit data blocks is 10 and the number of the controllers is 4, then according to the arrangement order of the logical unit data blocks, starting from the first logical unit data block, each logical unit data block is sequentially associated with any controller. Since the number of the controllers is only 4, when the fifth logical unit data block is associated, the controller has been traversed once. At this time, the controllers must be re-traversed, and each logical unit data block is sequentially associated with any controller starting from the fifth logical unit data block. Therefore, it is necessary to understand that in a specific application scenario, a controller can be associated with multiple logical unit data blocks, but a logical unit data block can only be associated with one controller. Wherein, determining whether the storage unit supports logical unit data access to the storage unit is to determine whether the storage unit supports the SCSI protocol referrals feature. The SCSI protocol referrals feature is that a certain logical unit is returned to the host in a block access manner, allowing a certain segment of a certain logical unit to be attributed to a certain storage unit for access, and the storage unit can correspond to a controller in the multi-controller storage.
[0033] In one embodiment, Figure 4As shown, based on the logical unit data, before dividing the logical unit data into a plurality of logical unit data blocks, the method further includes: the host sends a storage unit key product information data page query request to the storage unit, and the storage unit returns a storage unit key information data page to the host; the host sends a report target port group command to the storage unit, and the storage unit returns a target port group descriptor to the host; the host sends a report logical unit data block access storage unit information request to the storage unit, and the storage unit returns a logical unit data block access storage unit information to the host. Among them, the storage unit key product information data page is the referrals VPD page, and the report target port group command is the Report targetport groups command.
[0034] In one embodiment, the storage unit key product information data includes: each of the logical unit data block address parameters.
[0035] In one embodiment, Figure 5 As shown, the logical unit data block access storage unit information includes: a descriptor format of a user data segment.
[0036] In one embodiment, each logical unit data block is 32M.
[0037] In one embodiment, the logical unit data block access storage unit information is obtained by the storage unit from a lower layer input / output stack.
[0038] Embodiment 2
[0039] Corresponding to the above embodiment, the present application provides a multi-control storage load balancing device, referring to Figure 6 The device includes: an information confirmation unit, a host sends a query request information to the storage unit, and the information confirmation unit is used to determine whether the storage unit supports the logical unit data block to access the storage unit; a data partitioning unit, the data partitioning unit is communicatively connected to the information confirmation unit, if the information confirmation unit determines that the storage unit supports the logical unit data block to access the storage unit, then the data partitioning unit divides the logical unit data into a plurality of logical unit data blocks based on the logical unit data to achieve multi-control storage load balancing; an association unit, the association unit is communicatively connected to the data partitioning unit, and the association unit is used to associate each of the logical unit data blocks to any controller.
[0040] In one embodiment, the device also includes: an information sending unit, which is used to send a storage unit key product information data page query request from the host to the storage unit, and is also used to send a host report target port group command to the storage unit, and is also used to send a host report logical unit data block access storage unit information request to the storage unit; an information returning unit, which is used to return the storage unit key information data page to the host, and is also used to return the storage unit target port group descriptor to the host, and is also used to return the storage unit logical unit data block access storage unit information to the host.
[0041] Embodiment 3
[0042] A computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0043] Step A: the host sends a storage unit key product query request to the storage unit to determine whether the storage unit supports logical unit data block access to the storage unit;
[0044] Step B: if the storage unit supports logical unit data block access to the storage unit, then based on the logical unit data, dividing the logical unit data into a plurality of logical unit data blocks;
[0045] Step C: Associating each of the logic unit data blocks with any controller to achieve multi-controller storage load balancing.
[0046] In one embodiment, the processor implements the following steps when executing a computer program: based on the logic unit data, obtaining the arrangement order of the logic unit data blocks; based on the arrangement order of the logic unit data blocks, sequentially associating each of the logic unit data blocks to any controller, and repeatedly traversing the controllers until each of the logic unit data blocks is associated with any of the controllers.
[0047] In one embodiment, the processor implements the following steps when executing a computer program: the host sends a storage unit key product information data page query request to the storage unit, and the storage unit returns a storage unit key information data page to the host; the host sends a report target port group command to the storage unit, and the storage unit returns a target port group descriptor to the host; the host sends a report logical unit data block access storage unit information request to the storage unit, and the storage unit returns the logical unit data block access storage unit information to the host.
[0048] In one embodiment, when the processor executes the computer program, the following steps are implemented: the storage unit obtains the logic unit data block access storage unit information from the lower input / output stack.
[0049] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store logical unit data block data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a multi-control storage load balancing method is implemented.
[0050] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0051] Embodiment 4
[0052] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0053] Step A: the host sends a storage unit key product query request to the storage unit to determine whether the storage unit supports logical unit data block access to the storage unit;
[0054] Step B: if the storage unit supports logical unit data block access to the storage unit, then based on the logical unit data, dividing the logical unit data into a plurality of logical unit data blocks;
[0055] Step C: Associating each of the logic unit data blocks with any controller to achieve multi-controller storage load balancing.
[0056] In one embodiment, when the computer program is executed by a processor, the following steps are implemented: based on the logic unit data, an arrangement order of the logic unit data blocks is obtained; based on the arrangement order of the logic unit data blocks, each of the logic unit data blocks is associated with any controller in turn, and the controllers are repeatedly traversed until each of the logic unit data blocks is associated with any controller.
[0057] In one embodiment, when the computer program is executed by a processor, the following steps are implemented: the host sends a storage unit key product information data page query request to the storage unit, and the storage unit returns a storage unit key information data page to the host; the host sends a report target port group command to the storage unit, and the storage unit returns a target port group descriptor to the host; the host sends a report logical unit data block access storage unit information request to the storage unit, and the storage unit returns the logical unit data block access storage unit information to the host.
[0058] In one embodiment, when the computer program is executed by a processor, the following steps are implemented: the storage unit obtains the logic unit data block access storage unit information from the lower input / output stack.
[0059] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0060] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0061] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A multi-control storage load balancing method, characterized in that: The storage unit and the host implement logical unit data reading and writing through multiple controllers, and the method includes: The host sends a query storage unit key product request to the storage unit to determine whether the storage unit supports logical unit data block access to the storage unit; If the storage unit supports logical unit data block access to the storage unit, dividing the logical unit data into a plurality of logical unit data blocks based on the logical unit data; Associating each of the logic unit data blocks with any controller to achieve multi-controller storage load balancing; Wherein, associating each of the logic unit data blocks with any controller includes: Based on the logic unit data, obtaining the arrangement order of the logic unit data blocks; Based on the arrangement order of the logic unit data blocks, sequentially associating each of the logic unit data blocks with any controller, and repeatedly traversing the controllers until each of the logic unit data blocks is associated with any of the controllers; Based on the logical unit data, before dividing the logical unit data into a plurality of logical unit data blocks, the method further includes: The host sends a storage unit key product information data page query request to the storage unit, and the storage unit returns the storage unit key information data page to the host; The host sends a report target port group command to the storage unit, and the storage unit returns a target port group descriptor to the host; The host sends a request for reporting logical unit data block access storage unit information to the storage unit, and the storage unit returns the logical unit data block access storage unit information to the host.
2. The multi-control storage load balancing method according to claim 1, characterized in that: The key product information data of the storage unit includes: each of the logical unit data block address parameters.
3. The multi-control storage load balancing method according to claim 2, characterized in that: The logical unit data block access storage unit information includes: a descriptor format of a user data segment.
4. The multi-control storage load balancing method according to claim 3, characterized in that: Each logical unit data block is 32M.
5. The multi-control storage load balancing method according to claim 4, characterized in that: The logical unit data block access storage unit information is obtained by the storage unit from a lower layer input / output stack.
6. A multi-controller storage load balancing device for implementing the multi-controller storage load balancing method according to any one of claims 1 to 5, characterized in that: The device comprises: An information confirmation unit, to which the host sends query request information, and the information confirmation unit is used to determine whether the storage unit supports logical unit data blocks to access the storage unit; A data partitioning unit, the data partitioning unit being in communication connection with the information confirmation unit, and if the information confirmation unit determines that the storage unit supports the logical unit data block to access the storage unit, the data partitioning unit partitions the logical unit data into a plurality of logical unit data blocks based on the logical unit data to achieve multi-control storage load balancing; An association unit is communicatively connected with the data partitioning unit, and is used for associating each of the logical unit data blocks to any controller.
7. The multi-control storage load balancing device according to claim 6, characterized in that: The device also includes: An information sending unit, the information sending unit is used to send a storage unit key product information data page query request from a host to the storage unit, and is also used to send a report target port group command from a host to the storage unit, and is also used to send a report logical unit data block access storage unit information request from a host to the storage unit; An information return unit is used to return the storage unit key information data page to the host, to return the target port group descriptor to the host, and to return the logical unit data block access storage unit information to the host.
8. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Load balancing method and device of multi-control storage system
CN107861691A
Network load balancing method and device, computer equipment and storage medium
CN113746930A
