Storage system
By determining the priority of the storage node according to the transmission message duration in the storage system and storing the hottest data in the node with higher priority, the problem of the long access time of the service node is solved, and the storage system is improved Performance and efficiency.
Patent Information
- Application Number
- CN202311069301.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-06-20
- Filing Date
- 2023-08-22
- Publication Date
- 2024-12-20
AI Technical Summary
In a storage system, when a service node accesses data, due to the large number of routing storage nodes, the time required to access data is too long, and the prior art is difficult to effectively solve this problem.
By introducing multiple storage nodes in the storage system, each storage node determines its priority based on the transmission time between the message and the service node, store the hottest data in the storage node with higher priority, and manages it Nodes manage the priority of storage nodes to shorten the overall duration of data access by business nodes.
It effectively shortens the time for business nodes to access data, improves the performance and efficiency of the storage system, and optimizes the resource utilization of storage nodes by reasonably allocating data storage.
Smart Images

Figure CN119166034A_ABST
Abstract
Description
[0001] This application claims the priority of the Chinese patent application filed with the Intellectual Property Office of the People's Republic of China on June 20, 2023, with application number 202310740424.0 and invention name "A Storage System", all contents of which are incorporated by reference in this application. Technical Field
[0002] The embodiments of the present application relate to the field of storage, and in particular to a storage system. Background Art
[0003] With the continuous development of the Internet and the continuous improvement of storage networks, storage technology products have received great attention from industry experts. The use and management of data has become more stringent in terms of performance, reliability and economic value.
[0004] The storage system may include multiple storage nodes, which are networked through specific connections. Exemplarily, multiple storage nodes may form a torus network, a mesh network, etc. The service node is connected to a storage node in the storage system. When the service node needs to access certain data, the storage node where the data is located can be recorded as the target storage node to be accessed by the service node. Furthermore, if the service node and the target storage node are not directly connected (that is, connected via other storage nodes), the access request sent by the service node to the target storage node needs to be routed by other storage nodes in the storage system that are located between the service node and the target storage node. When there are many routing storage nodes, the time required for the service node to access the data is too long.
[0005] How to reduce the time required for business nodes to access data is a technical problem that needs to be solved urgently. Summary of the invention
[0006] The present application provides a storage system for reducing the time required for a service node to access data.
[0007] In a first aspect, the present application provides a storage system, including:
[0008] A plurality of storage nodes, a storage network composed of the plurality of storage nodes is connected to a first business node, and the priority of each storage node is determined by the time required for transmitting messages between the first business node and the storage node. It can be understood that the shorter the time required for transmitting messages between the storage node and the first business node, the higher the priority of the storage node; the longer the time required for transmitting messages between the storage node and the first business node, the lower the priority of the storage node. The plurality of storage nodes include a first storage node and a second storage node. The first storage node is used to: send the first data to the second storage node when the heat of the first data in the first storage node is higher than the upper limit of the first heat interval; wherein the priority of the second storage node is higher than the priority of the first storage node, and the first heat interval is the heat interval corresponding to the priority of the first storage node.
[0009] Exemplarily, the lower limit of the heat interval corresponding to the high priority is higher than or equal to the upper limit of the heat interval corresponding to the low priority. Exemplarily, in two adjacent priorities, the lower limit of the heat interval corresponding to the high priority is equal to the upper limit of the heat interval corresponding to the low priority.
[0010] In the above technical solution, the priority of each storage node is determined by the time required for the first business node to transmit a message to the storage node. Based on the popularity of the data and the priority of the storage node, the data with higher popularity is stored in the storage node with higher priority, that is, in the storage node with shorter message transmission time, which helps to shorten the overall time required for the first business node to access the data.
[0011] In one possible implementation, the first storage node is also used to send the second data to a third storage node when the heat of the second data in the first storage node is lower than the lower limit of the first heat interval, wherein the plurality of storage nodes also include a third storage node, and the priority of the third storage node is lower than the priority of the first storage node, that is, the upper limit of the heat interval corresponding to the priority of the third storage node is lower than or equal to the lower limit of the first heat interval. In the above technical solution, based on the heat of the data and the priority of the storage node, storing data with lower heat in storage nodes with lower priorities helps to ensure that storage nodes with higher priorities have sufficient storage space to store data with higher heat, thereby shortening the overall time required for the first business node to access the data.
[0012] In the first storage network networking form, the storage network is a torus network. In the second storage network networking form, the storage network includes a torus network and a first network, the torus network is composed of some storage nodes among the multiple storage nodes, the first network is composed of other storage nodes among the multiple storage nodes except the some storage nodes, and the torus network, the first network and the first service node are connected in sequence. Exemplarily, the first network is a fullmesh network.
[0013] In a possible implementation, the storage system further includes a management node. The management node is used to determine the priority of each storage node among the multiple storage nodes according to the topological relationship between the multiple storage nodes and the first service node. In the above technical solution, the priorities of the storage nodes in the storage system are managed by the management node, which helps to determine the priorities of each storage node applicable to the global storage system.
[0014] The first storage node sends the first data to the second storage node, which may be triggered by the management node or by the first storage node after self-determination. There are two cases as follows:
[0015] Case 1: triggered by the management node.
[0016] The management node is also used to: obtain the heat of the first data, and when it is determined that the heat of the first data is higher than the upper limit of the first heat interval, select a second storage node from multiple storage nodes according to the heat of the first data and the priority of each storage node, and instruct the first storage node to send the first data to the second storage node. The second storage node is used to: store the first data in the second storage node. The heat of the first data is in the second heat interval, and the second heat interval is the heat interval corresponding to the priority of the second storage node.
[0017] Exemplarily, when the management node selects the second storage node from multiple storage nodes based on the heat of the first data and the priority of each storage node, it is specifically used to: when the management node determines that the heat of the first data is in the second heat range, select the second storage node.
[0018] Exemplarily, the first storage node is further used to: count the heat of the first data, and send the heat of the first data to the management node. The management node is further used to: determine the heat of the first data based on the heat of the first data counted by the first storage node and the heat of the first data counted by other storage nodes (for example, the fifth storage node described below).
[0019] In the above technical solution, the management node records the heat intervals corresponding to each priority level and the priority level of each storage node. When the management node determines that the heat of the first data is higher than the upper limit of the first heat interval, it determines the second storage node and instructs the first storage node to send the first data to the second storage node. The first storage node and the second storage node do not need to make their own judgments, which helps to reduce the amount of calculation of each storage node. The management node can directly determine the storage node that matches the heat of the first data, thereby improving migration efficiency.
[0020] In one possible implementation, when multiple storage nodes include multiple storage nodes whose priority is the same as that of the second storage node, the management node is also used to select the second storage node from set A in at least one of the following ways: random selection; rotation selection; selection based on the access frequency of the storage nodes in set A; selection based on the storage ratio of the storage nodes in set A; wherein set A is composed of storage nodes among the multiple storage nodes whose priority is the same as that of the second storage node.
[0021] Exemplarily, each storage node in set A is further used to: count the access frequency of the storage node, and send the access frequency of the storage node to the management node. The management node is further used to: obtain the access frequency of each storage node in set A.
[0022] Exemplarily, each storage node in set A is further used to count the storage ratio of the storage node (for example, count the ratio between the amount of data stored in the storage node and the total amount of data that can be stored), and send the storage ratio of the storage node to the management node. The management node is further used to obtain the storage ratio of each storage node in set A. The storage ratio here can specifically be the storage ratio of the cache.
[0023] In the above technical solution, a method is provided for the management node to select a second storage node from multiple storage nodes with the same priority, and these methods are helpful to achieve a balance in the amount of stored data in multiple storage nodes with the same priority.
[0024] Case 2: triggered by the first storage node.
[0025] In a possible implementation, the management node is also used to send the priority of each storage node to each storage node in the multiple storage nodes. The first storage node is also used to receive the priority of the first storage node from the management node, and send the first data to the second storage node when it is determined that the heat of the first data is higher than the upper limit of the first heat interval. The second storage node is used to receive the priority of the second storage node from the management node, receive the first data from the first storage node, and store the first data in the second storage node when it is determined that the heat of the first data is in the second heat interval, or send the first data to the fourth storage node in the storage network when it is determined that the heat of the first data is higher than the upper limit of the second heat interval. The second heat interval is the heat interval corresponding to the priority of the second storage node, the second storage node is the next hop storage node of the first storage node in the storage network, and the priority of the second storage node is higher than the priority of the first storage node. Exemplarily, the upper limit of the first heat interval is equal to the lower limit of the second heat interval. The fourth storage node is the next-hop storage node of the second storage node in the storage network, and the priority of the fourth storage node is higher than the priority of the second storage node. Exemplarily, the upper limit of the second heat interval is equal to the lower limit of the heat interval corresponding to the priority of the fourth storage node.
[0026] In a possible implementation, when the multiple storage nodes include multiple storage nodes that have the same priority as the second storage node and are next hops of the first storage node:
[0027] In the first example, the first storage node is also used to select the second storage node from set B by at least one of the following methods: random selection; rotation selection; obtaining the access frequency of each storage node in set B from the management node, and selecting according to the access frequency of each storage node in set B; obtaining the storage share of each storage node in set B from the management node, and selecting according to the storage share of each storage node in set B.
[0028] In the second example, the first storage node is also used to obtain the identifier of the second storage node from the management node. Exemplarily, the management node is also used to select the second storage node from set B in at least one of the following ways: random selection; rotation selection; selection based on the access frequency of the storage nodes in set B; selection based on the storage ratio of the storage nodes in set B.
[0029] The set B is composed of a plurality of storage nodes whose priorities are the same as that of the second storage node and which are the next hops of the first storage node.
[0030] In the above technical solution, each storage node records its priority in the storage network, and can then determine the heat interval corresponding to the priority. When the storage node determines that the heat of the data it stores is higher than the upper limit of the heat interval, it can migrate the data to the next-hop storage node with a higher priority than itself. Each storage node determines whether to migrate the data by itself, which helps to reduce the computational workload of the management node and reduce the interaction between storage nodes and management nodes.
[0031] In a possible implementation, the management node is any storage node in the storage network; or, the management node is any device with computing capability connected to the storage network (ie, a device with computing capability located outside the storage network).
[0032] In a possible implementation, in a storage network, the first data may be persistently stored in one or more storage nodes, or may be cached in one or more storage nodes. Furthermore, when the first storage node sends the first data to the second storage node, it is specifically used to: send the first data in the cache of the first storage node to the second storage node. When the second storage node stores the first data in the second storage node, it is specifically used to: store the first data in the cache of the second storage node. In the above technical solution, migrating data in the caches of storage nodes of different priorities based on data popularity helps to shorten the overall time required for the first business node to access data.
[0033] In a possible implementation, when the storage network is also connected to the second business node, the priority of each storage node includes a first priority and a second priority. The first priority of each storage node is determined by the time required for the message to be transmitted between the first business node and the storage node, and the second priority of each storage node is determined by the time required for the message to be transmitted between the second business node and the storage node. The multiple storage nodes also include a fifth storage node, and when the second priority of the fifth storage node is the same as the first priority of the first storage node, the first data is stored in both the fifth storage node and the first storage node. In the above technical solution, it is set that the first data is stored in both the fifth storage node and the first storage node, so that the second business node can access the first data from the fifth storage node without accessing the first data from the first storage node, which helps to shorten the time required for the second business node to access the first data.
[0034] In a possible implementation, the fifth storage node is used to: send the first data stored in the fifth storage node to the sixth storage node; wherein the second priority of the sixth storage node is the same as the first priority of the second storage node, that is, the sixth storage node is the next-hop storage node of the fifth storage node, and the priority of the sixth storage node is higher than the priority of the fifth storage node. In the above technical solution, when the first data in the first storage node is migrated, the first data in the fifth storage node will also be migrated accordingly, ensuring that the first data is stored in the storage node corresponding to the priority that matches the popularity of the first data.
[0035] In a possible implementation, the management node is further used to: record the identifier of the storage node storing the first data. Accordingly, the management node is further used to: receive a query request from the first business node, the query request is used to query the identifier of the storage node storing the first data; send the identifier of the first storage node and the identifier of the fifth storage node to the first business node; the first storage node is further used to: receive an access request from the first business node, and modify the first data stored in the first storage node according to the access request; the fifth storage node is used to: receive an access request from the first business node, and modify the first data stored in the fifth storage node according to the access request.
[0036] In the above technical solution, when the first business node modifies the first data in the first storage node, it also needs to synchronously modify the first data in the fifth storage node, which helps to ensure the consistency of the first data stored in the first storage node and the fifth storage node.
[0037] In a second aspect, the present application provides a storage system, including:
[0038] A plurality of storage nodes, some of the storage nodes in the plurality of storage nodes form a torus network, the other storage nodes in the plurality of storage nodes except some of the storage nodes form a first network, the torus network, the first network and the first service node are connected in sequence; the storage nodes in the torus network are used to: when the heat of the third data stored in the storage nodes in the torus network is higher than the heat threshold, send the third data to the storage nodes in the first network. Exemplarily, the storage nodes in the first network are used to: store the third data in the persistent storage of the first network.
[0039] Exemplarily, the first network is a fullmesh network.
[0040] In the above technical solution, based on the heat of the data and the heat threshold used to separate the two networks, data with heat higher than the heat threshold is stored in the storage node of the first network, which helps to shorten the overall time required for the first business node to access the data.
[0041] In a possible implementation, the storage node in the first network is used to send the fourth data to the storage node in the torus network when the heat of the fourth data stored in the storage node in the first network is lower than or equal to the heat threshold. Exemplarily, the storage node in the torus network is used to store the fourth data in the persistent storage of the torus network.
[0042] In the above technical solution, data with a temperature lower than or equal to the temperature threshold is stored in the storage node of the torus network, which helps to ensure that the storage node of the first network has sufficient storage space to store data with a temperature higher than the temperature threshold, thereby shortening the overall time required for the first business node to access the data.
[0043] In a possible implementation, the storage system further includes a management node, and the management node can be used to determine whether each storage node is located in the torus network or in the first network.
[0044] The storage node in the torus network sends the third data to the storage node in the first network. Specifically, it can be triggered by the management node, or triggered by the storage node in the torus network after self-determination. There are two cases as follows:
[0045] Case 1: triggered by the management node.
[0046] The management node is also used to: obtain the heat of the third data; when it is determined that the heat of the third data is higher than the heat threshold, instruct the storage node in the torus network to send the third data to the storage node in the first network.
[0047] In one possible implementation, the management node may select a storage node for storing the third data from the first network by at least one of the following methods: random selection; rotation selection; selection based on the access frequency of the storage node in the first network; selection based on the storage ratio of the storage node in the first network.
[0048] Exemplarily, each storage node in the first network is further used to: count the access frequency of the storage node, and send the access frequency of the storage node to the management node. The management node is further used to: obtain the access frequency of each storage node in the first network.
[0049] Exemplarily, each storage node in the first network is further used to: count the storage ratio of the storage node (for example, count the ratio between the amount of data stored in the storage node and the total amount of data that can be stored), and send the storage ratio of the storage node to the management node. The management node is also used to: obtain the storage ratio of each storage node in the first network. The storage ratio here can specifically be the storage ratio of persistent storage.
[0050] Case 2: triggered by the storage node in the torus network.
[0051] In a possible implementation, the management node is further used to send, to each storage node in the plurality of storage nodes, an identifier and a heat threshold of the network to which the storage node belongs. The storage node in the torus network is further used to receive the identifier and the heat threshold of the torus network from the management node, and when determining that the heat of the third data is higher than the heat threshold, send the third data to the storage node in the first network.
[0052] In the first example, the storage nodes in the torus network can select storage nodes for storing third data from the first network by at least one of the following methods: random selection; rotation selection; obtaining the access frequency of each storage node in the first network from the management node, and selecting according to the access frequency of each storage node in the first network; obtaining the storage ratio of each storage node in the first network from the management node, and selecting according to the storage ratio of each storage node in the first network.
[0053] In the second example, the storage node in the torus network obtains the identifier of the storage node for storing the third data from the management node. Exemplarily, the management node is also used to select the storage node for storing the third data from the first network in at least one of the following ways: random selection; selection in a rotating manner; selection based on the access frequency of the storage node in the first network; selection based on the storage ratio of the storage node in the first network.
[0054] It is understandable that for technical solutions not fully described in the second aspect, reference may also be made to the description in the first aspect.
[0055] In a third aspect, the present application provides a storage method, which is applicable to a storage system, wherein the storage system includes multiple storage nodes, a storage network composed of multiple storage nodes is connected to a first service node, and the priority of each storage node is determined by the time required for transmitting a message between the first service node and the storage node. The multiple storage nodes include a first storage node and a second storage node.
[0056] The storage method includes: when the heat of the first data in the first storage node is higher than the upper limit of the first heat interval, the first storage node sends the first data to the second storage node; wherein the priority of the second storage node is higher than the priority of the first storage node, and the first heat interval is the heat interval corresponding to the priority of the first storage node.
[0057] In one possible implementation, the storage method also includes: when the heat of the second data in the first storage node is lower than the lower limit of the first heat range, the first storage node sends the second data to a third storage node, wherein the multiple storage nodes also include a third storage node, and the priority of the third storage node is lower than the priority of the first storage node.
[0058] In the first storage network networking form, the storage network is a torus network. In the second storage network networking form, the storage network includes a torus network and a first network, the torus network is composed of some storage nodes among the multiple storage nodes, the first network is composed of other storage nodes among the multiple storage nodes except the some storage nodes, and the torus network, the first network and the first business node are connected in sequence.
[0059] In a possible implementation, the storage system further includes a management node. The storage method further includes: the management node determining the priority of each storage node among the plurality of storage nodes according to a topological relationship between the plurality of storage nodes and the first service node.
[0060] The first storage node sends the first data to the second storage node, which may be triggered by the management node or by the first storage node after self-determination. There are two cases as follows:
[0061] Case 1: triggered by the management node.
[0062] Before the first storage node sends the first data to the second storage node, the method also includes: the management node obtains the heat of the first data, and when it is determined that the heat of the first data is higher than the upper limit of the first heat interval, the management node selects the second storage node from multiple storage nodes according to the heat of the first data and the priority of each storage node, and instructs the first storage node to send the first data to the second storage node. Correspondingly, after the first storage node sends the first data to the second storage node, the method also includes: the second storage node stores the first data in the second storage node. The heat of the first data is in the second heat interval, and the second heat interval is the heat interval corresponding to the priority of the second storage node.
[0063] Exemplarily, when the management node selects the second storage node from multiple storage nodes based on the heat of the first data and the priority of each storage node, the management node may specifically select the second storage node when determining that the heat of the first data is within the second heat range.
[0064] Exemplarily, the first storage node may also count the heat of the first data and send the heat of the first data to the management node. The management node also determines the heat of the first data based on the heat of the first data counted by the first storage node and the heat of the first data counted by other storage nodes (e.g., the fifth storage node described below).
[0065] In one possible implementation, when multiple storage nodes include multiple storage nodes whose priority is the same as that of the second storage node, the management node may select the second storage node from set A in at least one of the following ways: random selection; rotation selection; selection based on the access frequency of the storage nodes in set A; selection based on the storage ratio of the storage nodes in set A; wherein set A is composed of storage nodes among multiple storage nodes whose priority is the same as that of the second storage node.
[0066] Exemplarily, each storage node in set A also counts the access frequency of the storage node and sends the access frequency of the storage node to the management node. Correspondingly, the management node also obtains the access frequency of each storage node in set A.
[0067] Exemplarily, each storage node in set A also counts the storage ratio of the storage node (for example, counts the ratio between the amount of data already stored in the storage node and the total amount of data that can be stored), and sends the storage ratio of the storage node to the management node. Correspondingly, the management node also obtains the storage ratio of each storage node in set A. The storage ratio here can specifically be the storage ratio of the cache.
[0068] Case 2: triggered by the first storage node.
[0069] In a possible implementation, the management node also sends the priority of each storage node to each storage node in the plurality of storage nodes. Accordingly, the first storage node also receives the priority of the first storage node from the management node, and sends the first data to the second storage node when it is determined that the heat of the first data is higher than the upper limit of the first heat interval. Accordingly, the second storage node can also receive the priority of the second storage node from the management node, receive the first data from the first storage node, and the second storage node stores the first data in the second storage node when it is determined that the heat of the first data is in the second heat interval, or the second storage node sends the first data to the fourth storage node in the storage network when it is determined that the heat of the first data is higher than the upper limit of the second heat interval. Wherein, the second heat interval is the heat interval corresponding to the priority of the second storage node, the second storage node is the storage node of the next hop of the first storage node in the storage network, and the priority of the second storage node is higher than the priority of the first storage node. The fourth storage node is the storage node of the next hop of the second storage node in the storage network, and the priority of the fourth storage node is higher than the priority of the second storage node.
[0070] In a possible implementation, when the multiple storage nodes include multiple storage nodes that have the same priority as the second storage node and are next hops of the first storage node:
[0071] In the first example, the first storage node can also select the second storage node from set B in at least one of the following ways: random selection; rotation selection; the first storage node obtains the access frequency of each storage node in set B from the management node, and selects according to the access frequency of each storage node in set B; the first storage node obtains the storage share of each storage node in set B from the management node, and selects according to the storage share of each storage node in set B.
[0072] In the second example, the first storage node obtains the identifier of the second storage node from the management node. Exemplarily, the management node may also select the second storage node from set B in at least one of the following ways: random selection; rotation selection; selection based on the access frequency of the storage nodes in set B; selection based on the storage ratio of the storage nodes in set B.
[0073] The set B is composed of a plurality of storage nodes whose priorities are the same as that of the second storage node and which are the next hops of the first storage node.
[0074] In a possible implementation, the management node is any storage node in the storage network; or, the management node is any device with computing capability connected to the storage network (ie, a device with computing capability located outside the storage network).
[0075] In a possible implementation, in a storage network, the first data may be persistently stored in one or more storage nodes, or may be cached in one or more storage nodes. Further, when the first storage node sends the first data to the second storage node, it may specifically send the first data in the cache of the first storage node to the second storage node. When the second storage node stores the first data in the second storage node, it may specifically store the first data in the cache of the second storage node.
[0076] In a possible implementation, when the storage network is also connected to the second service node, the priority of each storage node includes a first priority and a second priority. The first priority of each storage node is determined by the time required for the message to be transmitted between the first service node and the storage node, and the second priority of each storage node is determined by the time required for the message to be transmitted between the second service node and the storage node. The plurality of storage nodes also include a fifth storage node, and when the second priority of the fifth storage node is the same as the first priority of the first storage node, the first data is stored in both the fifth storage node and the first storage node.
[0077] In one possible implementation, the fifth storage node can also send the first data stored in the fifth storage node to the sixth storage node; wherein the second priority of the sixth storage node is the same as the first priority of the second storage node, that is, the sixth storage node is the next-hop storage node of the fifth storage node, and the priority of the sixth storage node is higher than that of the fifth storage node.
[0078] In a possible implementation, the management node may also record the identifier of the storage node storing the first data. Accordingly, the first business node sends a query request to the management node, and the query request is used to query the identifier of the storage node storing the first data. The management node receives the query request from the first business node, and sends the identifier of the first storage node and the identifier of the fifth storage node to the first business node in response to the query request. Accordingly, the first business node sends an access request to the first storage node based on the identifier of the first storage node, and the first storage node receives the access request from the first business node, and modifies the first data stored in the first storage node based on the access request. The first business node sends an access request to the fifth storage node based on the identifier of the fifth storage node, and the fifth storage node receives the access request from the first business node, and modifies the first data stored in the fifth storage node based on the access request.
[0079] It is understandable that for technical solutions not described in detail in the third aspect, reference may also be made to the description in the first aspect.
[0080] In a fourth aspect, the present application provides a storage method, which is applicable to a storage system, wherein the storage system includes multiple storage nodes, some of the multiple storage nodes form a torus network, and other storage nodes except some of the storage nodes form a first network, and the torus network, the first network and the first service node are connected in sequence. Exemplarily, the first network is a fullmesh network.
[0081] The storage method includes: when the heat of third data stored by the storage node in the torus network is higher than the heat threshold, the storage node in the torus network sends the third data to the storage node in the first network. Exemplarily, the storage node in the first network stores the third data in the persistent storage of the first network. In a possible implementation, when the heat of fourth data stored by the storage node in the first network is lower than or equal to the heat threshold, the storage node in the first network sends the fourth data to the storage node in the torus network. Exemplarily, the storage node in the torus network stores the fourth data in the persistent storage of the torus network.
[0082] In a possible implementation, the storage system further includes a management node, and the management node can determine whether each storage node is located in the torus network or in the first network.
[0083] The storage node in the torus network sends the third data to the storage node in the first network. Specifically, it can be triggered by the management node, or triggered by the storage node in the torus network after self-determination. There are two cases as follows:
[0084] Case 1: triggered by the management node.
[0085] Before the storage node in the torus network sends the third data to the storage node in the first network, the management node also obtains the heat of the third data; when it is determined that the heat of the third data is higher than the heat threshold, it instructs the storage node in the torus network to send the third data to the storage node in the first network.
[0086] In one possible implementation, the management node may select a storage node for storing the third data from the first network by at least one of the following methods: random selection; rotation selection; selection based on the access frequency of the storage node in the first network; selection based on the storage ratio of the storage node in the first network.
[0087] Exemplarily, each storage node in the first network also counts the access frequency of the storage node and sends the access frequency of the storage node to the management node. Correspondingly, the management node also obtains the access frequency of each storage node in the first network.
[0088] Exemplarily, each storage node in the first network also counts the storage ratio of the storage node (for example, counts the ratio between the amount of data stored in the storage node and the total amount of data that can be stored), and sends the storage ratio of the storage node to the management node. Correspondingly, the management node also obtains the storage ratio of each storage node in the first network. The storage ratio here can specifically be the storage ratio of persistent storage.
[0089] Case 2: triggered by the storage node in the torus network.
[0090] In a possible implementation, the management node also sends an identifier and a heat threshold of the network to which the storage node belongs to each storage node in the multiple storage nodes. The storage node in the torus network also receives the identifier and the heat threshold of the torus network from the management node, and sends the third data to the storage node in the first network when determining that the heat of the third data is higher than the heat threshold.
[0091] In the first example, the storage nodes in the torus network can select storage nodes for storing third data from the first network by at least one of the following methods: random selection; rotation selection; the storage nodes in the torus network obtain the access frequency of each storage node in the first network from the management node, and select according to the access frequency of each storage node in the first network; the storage nodes in the torus network obtain the storage ratio of each storage node in the first network from the management node, and select according to the storage ratio of each storage node in the first network.
[0092] In the second example, the storage node in the torus network obtains the identifier of the storage node for storing the third data from the management node. Exemplarily, the management node also selects the storage node for storing the third data from the first network in at least one of the following ways: random selection; selection in a rotating manner; selection based on the access frequency of the storage node in the first network; selection based on the storage ratio of the storage node in the first network.
[0093] It can be understood that the technical solutions not described in detail in the fourth aspect can also refer to the descriptions in the first and second aspects.
[0094] In a fifth aspect, the present application provides a computing device, comprising a processor, the processor being connected to a memory, the memory being used to store a computer program, and the processor being used to execute the computer program stored in the memory, so that the computing device implements the function of a storage node in any possible implementation of the first aspect; or, so that the computing device implements the function of a management node in any possible implementation of the first aspect; or, so that the computing device implements the function of a storage node in any possible implementation of the second aspect; or, so that the computing device implements the function of a management node in any possible implementation of the second aspect.
[0095] In a sixth aspect, the present application provides a computing device, comprising a module for implementing the function of a storage node in any possible implementation of the first aspect; or, comprising a module for implementing the function of a management node in any possible implementation of the first aspect; or, comprising a module for implementing the function of a storage node in any possible implementation of the second aspect; or, comprising a module for implementing the function of a management node in any possible implementation of the second aspect.
[0096] In a seventh aspect, the present application provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is executed by a computing device, the computing device implements the function of a storage node in any possible implementation of the first aspect; or, the computing device implements the function of a management node in any possible implementation of the first aspect; or, the computing device implements the function of a storage node in any possible implementation of the second aspect; or, the computing device implements the function of a management node in any possible implementation of the second aspect.
[0097] In an eighth aspect, the present application provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a computing device, the computing device implements the function of a storage node in any possible implementation of the first aspect; or, the computing device implements the function of a management node in any possible implementation of the first aspect; or, the computing device implements the function of a storage node in any possible implementation of the second aspect; or, the computing device implements the function of a management node in any possible implementation of the second aspect.
[0098] The technical effects that can be achieved in any of the third to eighth aspects mentioned above can refer to the description of the beneficial effects in the first or second aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0099] Figure 1 is a schematic diagram of a one-dimensional torus network;
[0100] Figure 2 is a schematic diagram of a two-dimensional torus network;
[0101] Figure 3 is a schematic diagram of a three-dimensional torus network;
[0102] Figure 4 A schematic diagram of the architecture of a storage system provided for this application;
[0103] Figure 5 A schematic diagram of the first network provided in this application;
[0104] Figure 6 A schematic diagram of the architecture of the second storage system provided in this application;
[0105] Figure 7 A schematic diagram of the structure of a storage node provided for this application;
[0106] Figure 8 A schematic diagram of the priority of a storage node provided in this application;
[0107] Fig. 9 A flowchart of the first data migration provided for this application;
[0108] Fig.10 A flowchart of the second data migration provided for this application;
[0109] Fig.11 A schematic diagram of the architecture of the third storage system provided for this application;
[0110] Fig.12 A schematic diagram of a data migration scenario provided for this application;
[0111] Fig.13 A flowchart of the third data migration provided for this application;
[0112] Fig.14 A flowchart of the fourth data migration provided for this application;
[0113] Fig.15 A schematic diagram of the structure of a device provided in this application. DETAILED DESCRIPTION
[0114] A torus network is a network interconnection structure commonly used in supercomputers and data centers, with a completely symmetrical direct-connect network topology. Two storage nodes in a torus network can be connected to each other through their own network cards without going through switches, which helps reduce the number of switch ports and switches required in the network. Figure 1A schematic diagram of a one-dimensional torus network is shown as an example, which includes three storage nodes, two adjacent storage nodes are connected to each other, and the two storage nodes at the head and the tail are connected. Figure 2 A schematic diagram of a two-dimensional torus network is shown as an example, which includes 9 storage nodes, each storage node is connected to its adjacent storage node, and the storage nodes located on two opposite edges are connected by rolling the rectangular array into a "tube" form, and then the "tube" is bent into a "ring" to connect the storage nodes located on the other two edges. Figure 3 A schematic diagram of a three-dimensional torus network is shown as an example, which includes 27 storage nodes, namely 3×3×3 storage nodes. Figure 3 The three-dimensional torus network shown can be viewed as Figure 2 The two-dimensional torus network shown is formed by connecting corresponding storage nodes after being replicated three times. Figures 1 to 3 The blocks in the represent storage nodes.
[0115] Among them, the storage node refers to the device used to store user data. The storage node may include cache and persistent storage. When the business node needs to read data from the persistent storage, it can first read the data into the cache, and then read the data from the cache. It can be understood that a piece of data can be stored in both the persistent storage and the cache at the same time. The cache is, for example, the memory in the storage node, and the persistent storage is, for example, the hard disk in the storage node. The structure of the storage node can be seen below. Figure 7 Description of the related embodiments.
[0116] The present application exemplarily provides a first storage system, which includes N storage nodes and a first business node, where N is an integer greater than 1, the N storage nodes constitute a storage network, and the first business node can be connected to the storage network.
[0117] Specifically, N storage nodes can form a front-end torus network through their respective front-end network cards. The front-end torus network is used for the first business node to access the data stored in the N storage nodes. Exemplarily, the access request sent by the first business node to the storage node, and the access response sent by the storage node to the first business node, can be transmitted through the front-end torus network. The N storage nodes can also form a back-end storage network through their respective back-end network cards. The back-end storage network is used for communication between the N storage nodes, and the communication does not require the participation of the first business node. Exemplarily, messages can be transmitted between any two of the N storage nodes through the back-end storage network. It can be understood that since the back-end storage network is formed based on the back-end network card, and the front-end torus network is formed based on the front-end network card, the two do not affect each other.
[0118] like Figure 4 The schematic diagram of the architecture of the first storage system provided as an example for the present application includes 36 storage nodes and a first business node in the storage system, wherein each square represents a storage node and circle A represents the first business node. The 36 storage nodes can be respectively recorded as storage nodes 1 to 36. Furthermore, storage nodes 1 to 36 form a 6×6 two-dimensional torus network at the front end through their respective front-end network cards. The first business node is connected to the front-end network card of storage node 19. In addition, storage nodes 1 to 36 can also form a back-end storage network through their respective back-end network cards. Exemplarily, the back-end storage network can specifically be a 6×6 two-dimensional torus network. Exemplarily, each storage node is connected to the back-end switch through a back-end network card. It can be understood that the storage system includes storage nodes 1 to 36 for exemplary purposes only, and the present application does not limit the number of storage nodes.
[0119] The present application also exemplarily provides a second storage system, which includes N storage nodes and a first service node, where N is an integer greater than 1. M storage nodes among the N storage nodes form a torus network, and other NM storage nodes among the N storage nodes except the M storage nodes form a first network, where M and NM are both integers greater than 1.
[0120] Further, the torus network is connected to the first network, and the first service node is connected to the first network. The first service node can access the storage node in the first network, or access the storage node in the torus network through the first network. In this application, the torus network and the first network can be collectively referred to as a storage network, that is, the first service node is connected to the storage network.
[0121] The access performance of the first network is better than the access performance of the torus network. The access performance of a network can be determined by the time required for a service node connected to the network to access a storage node in the network. The longer the time required, the worse the access performance of the network; the shorter the time required, the better the access performance of the network. Exemplarily, the first network is a variant of mesh, fullmesh, variant of fullemsh, etc., wherein the variant can be considered as a slight change to the original network structure, such as connecting two storage nodes that are not connected in the original network, or disconnecting two storage nodes that are connected in the original network. For example, the networking methods of the variants of mesh, fullmesh, and variant of fullemsh can be referred to respectively. Figure 5 As shown, each block represents a storage node.
[0122] Furthermore, considering that the maintainability of the first network is slightly worse than that of the torus network, the total number of storage nodes in the first network can be set to be smaller than the total number of storage nodes in the torus network, that is, NM is smaller than M.
[0123] like Figure 6 The schematic diagram of the architecture of the second storage system provided as an example for the present application includes 40 storage nodes and a first business node in the storage system, wherein each square represents a storage node and circle A represents a first business node. The 40 storage nodes can be respectively recorded as storage nodes 1 to 40. Furthermore, storage nodes 1 to 36 form a 6×6 two-dimensional torus network at the front end through their respective front-end network cards. Storage nodes 37 to 40 form a first network at the front end through their respective front-end network cards, and the first network is specifically a fullmesh network. The first business node is connected to the front-end network card of storage node 37. In addition, storage nodes 1 to 40 can also form a back-end storage network through their respective back-end network cards. Exemplarily, each storage node is connected to the back-end switch through the back-end network card. It can be understood that the storage system includes storage nodes 1 to 40 for exemplary purposes only, and the present application does not limit the number of storage nodes.
[0124] In the first storage system and the second storage system described above:
[0125] The first service node may be a computer running an application program, and a user may access the storage node through the application program, such as reading data from the storage node or writing data to the storage node. Service nodes may include, but are not limited to, desktop computers, servers, laptops, and mobile devices. Storage nodes are used to store data, receive access requests from service nodes, and respond to access requests.
[0126] A storage node may include at least a processor, a memory, a network card, and a hard disk, wherein the processor, the memory, the network card, and the hard disk are connected via a bus, and the memory and the hard disk may be collectively referred to as storage. Figure 7 A schematic diagram of the structure of a storage node provided as an example for this application.
[0127] The processor and memory are used to provide computing resources. Specifically, the processor can be a central processing unit (CPU), which is used to process access requests from outside the storage node (business node or other storage node), and is also used to process requests generated inside the storage node. Exemplarily, when the processor receives a write data request from a business node, it temporarily stores the data in these write data requests in the memory. When the total amount of data in the memory reaches a certain threshold, the processor sends the data stored in the memory to the hard disk for persistent storage. In addition, the processor is also used to calculate or process data, such as metadata management, data compression, data verification, virtualized storage space, and address conversion. Figure 7 Only one processor is shown in the figure, but in actual applications, there are often multiple processors, wherein one processor has one or more processor cores. This application does not limit the number of processors and the number of processor cores.
[0128] Memory refers to an internal memory that directly exchanges data with the processor. It can read and write data at any time and at a very fast speed. It serves as a temporary data storage for the operating system or other running programs. Memory includes at least two types of memory. For example, memory can be either random access memory or read-only memory (ROM). For example, random access memory is dynamic random access memory (DRAM) or storage class memory (SCM). DRAM is a semiconductor memory, which, like most random access memories (RAM), is a volatile memory device. SCM is a composite storage technology that combines the characteristics of traditional storage devices and memory. SCM can provide faster read and write speeds than hard disks, but is slower than DRAM in access speed and cheaper than DRAM in cost. However, DRAM and SCM are only exemplary descriptions in this embodiment, and memory can also include other random access memories, such as static random access memory (SRAM). As for the read-only memory, for example, it can be a programmable read only memory (PROM), an erasable programmable read only memory (EPROM), etc. In addition, the memory can also be a dual in-line memory module or a dual-line memory module (DIMM), that is, a module composed of DRAM, or a solid state disk (SSD). In actual applications, multiple memories and different types of memories can be configured in a storage node. This embodiment does not limit the number and type of memory. In addition, the memory can also be configured to have a power-saving function. The power-saving function means that when the system loses power and then powers on again, the data stored in the memory will not be lost. Memory with a power-saving function is called a non-volatile memory.
[0129] A hard disk is used to provide storage resources, such as storing data. It can be a magnetic disk or other types of storage media, such as a solid-state drive or a shingled magnetic recording hard disk.
[0130] The network card is used for storage nodes to communicate with the outside. Exemplarily, the network card can be divided into a front-end network card and a back-end network card, wherein the front-end network card is used for storage nodes to communicate with service nodes, and the back-end network card is used for storage nodes to communicate with other storage nodes. For example, the network card is a data processing unit (DPU) card.
[0131] When the first service node needs to access certain data, the storage node where the data is located can be recorded as the target storage node to be accessed by the first service node. Figure 4 Here are some examples:
[0132] Example 1: storage node 19 is the target storage node, and the first service node sends an access request to storage node 19. Accordingly, storage node 19 sends an access response to the first service node in response to the access request.
[0133] Example 2, storage node 20 is the target storage node, and since the first service node and storage node 20 are not directly connected, the messages transmitted between the two need to be forwarded via storage node 19. Specifically, the first service node first sends an access request to storage node 19, and storage node 19 forwards the access request to storage node 20 after receiving the access request; storage node 20 generates an access response according to the access request and sends the access response to storage node 19, and storage node 19 forwards the access response to the first service node after receiving the access response.
[0134] By analogy, when the message transmitted between the target storage node and the first business node needs to be routed through more storage nodes, even if it is the shortest path, the time required for the first business node to access the data is also longer. For example, the target storage node is storage node 29. Even if it is the shortest path, the access request initiated by the first business node must pass through storage node 19, storage node 20, storage node 21, storage node 22, and storage node 23 in sequence before it can be transmitted to storage node 29. Similarly, the access response initiated by storage node 29 must also pass through storage node 23, storage node 22, storage node 21, storage node 20, and storage node 19 in sequence before it can be transmitted to the first business node. In this way, there is a problem that it takes a long time for the first business node to access the data in the storage system.
[0135] Based on the above-mentioned first storage system and second storage system, the present application provides a first storage method, which pre-migrates the data that is accessed more frequently by the first business node to a storage node that is closer to the first business node, shortens the path length between the first business node and the target storage node, and reduces the time required for the first business node to access the data.
[0136] It is noted in advance that the storage system also includes a management node. When the storage system is started, the management node can determine the priority of each storage node among the N storage nodes. The priority can be used to indicate the time required for transmitting a message between the first service node and the storage node.
[0137] The management node is one of the N storage nodes included in the storage network. The structure of the management node can still be found in Figure 7 As shown; or, the management node is any device with computing capability connected to the storage network (that is, a device with computing capability located outside the storage network), and the management node may include a processor, a memory, and a network card, and the processor, the memory, and the network card are connected through a bus; or, the management node may include a processor, a memory, a network card, and a hard disk, and the processor, the memory, the network card, and the hard disk are connected through a bus; the description of the processor, the memory, the network card, and the hard disk can be found in Figure 7 In the description of the relevant embodiments, the network card of the management node is connected to the back-end network card of the storage node to enable the management node to access the back-end network of the storage. Further, when the management node is one of the N storage nodes included in the storage network, it can be that when the storage system is started, each storage node is elected from the N storage nodes included in the storage network based on a preset election algorithm, wherein the preset election algorithm is, for example, to select a storage node with an index number of 0 as the management node; or, the management node is manually designated by the management personnel from the N storage nodes included in the storage network.
[0138] When the management node determines the priority of each storage node among the N storage nodes, specifically, the management node may determine the priority of each storage node among the N storage nodes according to a topological relationship between the N storage nodes and the first service node.
[0139] When the management node obtains the topological relationship, in one example, the manager manually inputs the topological relationship into the management node, and accordingly, the management node obtains the topological relationship. In another example, each storage node in the N storage nodes senses the identifier of the adjacent node (i.e., the adjacent storage node and / or the first service node), and sends the identifier of the adjacent node sensed by each to the management node. Accordingly, the management node can obtain the identifier of the adjacent node of each storage node in the N storage nodes, and then determine the topological relationship according to the identifier of the adjacent node of each storage node in the N storage nodes. Among them, the topological relationship includes the identifiers of the N storage nodes, the identifier of the first service node, the connection relationship between the storage nodes, and the connection relationship between the first service node and the storage node. The node identifier is, for example, a node number, a port number, an Internet protocol (IP) address, etc. Among them, two nodes are adjacent, and it can also be considered that the two nodes are connected to each other, the two nodes are directly connected, the front-end network cards of the two nodes are connected to each other, etc.
[0140] The management node determines the priority of each storage node in the following implementation modes 1 to 3:
[0141] Implementation method 1: The management node determines the time required for message transmission between each of the N storage nodes and the first business node based on the topological relationship between the N storage nodes and the first business node, and then determines the priority of each storage node based on the time required for message transmission between each storage node and the first business node.
[0142] Taking the first storage node among N storage nodes as an example, when the management node determines the priority of the first storage node, it may be that the management node determines the total number of storage nodes (recorded as the first total number) included in the transmission path of the message when the message is transmitted between the first business node and the first storage node based on the topological relationship between the N storage nodes and the first business node. Then, the management node determines the duration (recorded as the first duration) required for the message to be transmitted between the first business node and the first storage node based on the first total number. Exemplarily, the larger the first total number, the longer the first duration; the smaller the first total number, the shorter the first duration. Exemplarily, the management node may determine the first duration based on the first total number, and one or more of the following parameters: the bandwidth between two adjacent nodes in the path, and the transmission distance between two adjacent nodes in the path.
[0143] The storage nodes included in the message transmission path may specifically be one or more storage nodes including the first storage node, or one or more storage nodes other than the first storage node (which may be referred to as routing storage nodes). Figure 4 In the example, the first storage node is storage node 20, and the path between the first service node and storage node 20 is Then the path includes storage node 19 and storage node 20, or the path includes storage node 19 (ie, routing storage node). For the convenience of description, the routing storage node is used as an example.
[0144] It should be noted that there may be multiple paths between the first service node and the first storage node, and the first total number corresponding to each path may be the same as or different from the first total number corresponding to other paths. Figure 4 In the example, the first storage node is storage node 20, and there are at least paths 1 to 3 between the first service node and storage node 20, where path 1: The routing storage node is storage node 19; Path 2: The routing storage nodes are storage node 19, storage node 13, storage node 14; path 3: The routing storage nodes are storage node 19, storage node 25, and storage node 26. Here, there are other paths between the first service node and the storage node 20, which are not listed one by one in this application.
[0145] Further, in one possible example, the management node selects the shortest path among multiple paths, and then records the total number of routing storage nodes included in the shortest path as the first total number. In combination with the above example, the management node can determine that the shortest path is path 1, and the total number of routing storage nodes included in path 1 is 1. In another possible example, the management node determines the total number of routing storage nodes included in each path, and rounds up the average of the total number of these routing storage nodes to obtain the first total number. In combination with the above example, the management node determines that the total number of routing storage nodes in path 1 is 1, the total number of routing storage nodes in path 2 is 3, and the total number of routing storage nodes in path 3 is 3, so the management node determines that the first total number is 3. Among them, the first total number is 0, which can indicate that the first service node is directly connected to the first storage node.
[0146] Combination Figure 4 In the example, the management node is storage node 1. Storage node 2 determines that the identifiers of its neighboring nodes are 1, 3, 8, and 32, and sends 1, 3, 8, and 32 to storage node 1; storage node 19 determines that the identifiers of its neighboring nodes are 13, 20, 25, and A, and sends 13, 20, 25, and A to storage node 1, etc. Storage node 1 determines that the identifiers of its neighboring nodes are 2, 7, 31, and 6, and determines the topological relationship between the 36 storage nodes and the first service node based on the identifiers of the neighboring nodes of each storage node from storage node 1 to storage node 36. The topological relationship is shown as follows: Figure 4Further, storage node 1 determines the total number of routing storage nodes included in the shortest path between the first service node and each storage node based on the topological relationship, and then determines the time required for message transmission between the first service node and each storage node, and obtains the priority of each storage node. Figure 8 The priority of each storage node is exemplarily shown, and the priority of each storage node is marked in brackets after the storage node number, for example, the priority of storage node 19 is 1, the priority of storage node 20 is 2, etc. Further, the priority difference between any two adjacent storage nodes may be 1.
[0147] In the present application, the management node can also determine the number of hops for transmitting messages between the first service node and the first storage node based on the topological relationship between the N storage nodes and the first service node, and then determine the first duration based on the number of hops for transmitting messages between the first service node and the first storage node, and then determine the priority of the first storage node based on the first duration. In combination with the above example, the first storage node is storage node 20, path 1: Then the number of hops for transmitting the message between the first service node and the storage node 20 is 2; Path 2: Then the number of hops for transmitting the message between the first service node and the storage node 20 is 4; Path 3: Then the number of hops for transmitting the message between the first service node and the storage node 20 is 4. It can be understood that the number of hops for transmitting the message is similar to the definition of the total number of routing storage nodes included in the path, and the method of determining the first duration according to the number of hops for transmitting the message is also similar to the method of determining the first duration according to the total number of routing storage nodes included in the path.
[0148] Implementation method 2: The management node determines the number of hops for transmitting messages between the first storage node and the first service node based on the topological relationship between the N storage nodes and the first service node, and then determines the priority of the first storage node based on the number of hops for transmitting messages. The greater the number of hops for transmitting messages, the lower the priority; the smaller the number of hops for transmitting messages, the higher the priority.
[0149] Among them, the description of the topological relationship and the number of hops for transmitting messages can be found in Implementation Mode 1, which will not be repeated here.
[0150] Implementation method 3: The management node determines the total number of storage nodes included in the transmission path of the message when the message is transmitted between the first storage node and the first service node based on the topological relationship between the N storage nodes and the first service node, and then determines the priority of the first storage node based on the total number of storage nodes included in the transmission path. The more the total number of storage nodes included in the transmission path, the lower the priority; the fewer the total number of storage nodes included in the transmission path, the higher the priority.
[0151] The description of the topological relationship and the total number of storage nodes included in the transmission path can be found in Implementation 1, which will not be repeated here.
[0152] It can be understood that the above is only an example of the management node determining the priority of the first storage node among N storage nodes. The management node can also determine the priority of each storage node among the N storage nodes except the first storage node. The determination method can refer to the method for the management node to determine the priority of the first storage node.
[0153] On the basis of determining the priority of each storage node, the heat interval of each storage node can be determined. Generally, the heat interval corresponds to the priority, that is, the heat interval of each storage node can be determined according to the priority of the storage node.
[0154] Specifically, the administrator can pre-set the corresponding heat interval for each priority, where the lower limit of the heat interval corresponding to the high priority is higher than or equal to the upper limit of the heat interval corresponding to the low priority. For example, in two adjacent priorities, the lower limit of the heat interval corresponding to the high priority is equal to the upper limit of the heat interval corresponding to the low priority. The heat interval can be expressed as [a, b), where a is the lower limit of the heat interval and b is the upper limit of the heat interval. Figure 8 In the example, the management node can determine that there are a total of 7 priorities in the storage network (i.e., priority 1 to priority 7, where the higher the priority number, the lower the priority, and the lower the priority number, the higher the priority). Furthermore, the management personnel set the corresponding heat interval for each priority, for example, setting the heat interval of priority 1 to [100, 149), setting the heat interval of priority 2 to [50, 100), setting the heat interval of priority 3 to [25, 50), setting the heat interval of priority 4 to [15, 25), setting the heat interval of priority 5 to [8, 15), setting the heat interval of priority 6 to [4, 8), and setting the heat interval of priority 7 to [1, 4). Of course, this is only an exemplary description and does not limit the specific range of the heat interval in this application.
[0155] In order to reduce the overall time required for the first business node to access data, high-hot data can be stored in a high-priority storage node. Here, the heat of the data can be determined based on one or more of the following: the frequency with which the data is accessed, the number of times the data is accessed within a preset period of time, the interval between the two most recent accesses to the data, the average interval between data accesses, etc. The heat of data on a storage node is usually within the heat interval of the storage node. When the heat of a piece of data on a storage node changes, causing the heat of the data to exceed the heat interval of the storage node, the system can move the data from the storage node to a storage node with other heat intervals (i.e., to a storage node of other priority) to improve overall access efficiency. Therefore, the heat interval of a storage node can be used as a basis for judging whether the data on the storage node needs to be moved to other storage nodes.
[0156] In order to better explain the embodiments of the present application, the first storage node among the N storage nodes is still taken as an example below. The heat interval corresponding to the priority of the first storage node can be recorded as the first heat interval.
[0157] The first storage node stores the first data, and when the heat of the first data is within the first heat interval, the first storage node can continue to store the first data. When the heat of the first data is higher than the upper limit of the first heat interval, the first storage node can send the first data to the second storage node. Among them, the second storage node is the other storage node among the N storage nodes except the first storage node, and the priority of the second storage node is higher than the priority of the first storage node, that is, the lower limit of the heat interval corresponding to the priority of the second storage node is higher than or equal to the upper limit of the first heat interval. In this way, storing data with higher heat in storage nodes with higher priorities, that is, in storage nodes with shorter message transmission time, helps to shorten the overall time required for the first business node to access data.
[0158] Optionally, the first storage node also stores second data, and when the heat of the second data is within the first heat interval, the first storage node can continue to store the second data. When the heat of the second data is lower than the lower limit of the first heat interval, the first storage node can send the second data to the third storage node. Among them, the third storage node is the other storage node among the N storage nodes except the first storage node and the second storage node, and the priority of the third storage node is lower than the priority of the first storage node, that is, the upper limit of the heat interval corresponding to the priority of the third storage node is lower than or equal to the lower limit of the first heat interval. In this way, storing data with lower heat in storage nodes with lower priority helps to ensure that storage nodes with higher priority have sufficient storage space to store data with higher heat.
[0159] Optionally, the first data is specifically stored in the cache of the first storage node. When the first data needs to be migrated, it can be specifically migrated from the cache of the first storage node to the cache of the second storage node. Similarly, the second data is specifically stored in the cache of the first storage node. When the second data needs to be migrated, it can be specifically migrated from the cache of the first storage node to the cache of the third storage node. Here, copies of the first data or the second data are also stored in the storage network, and each copy of the data can be one or more, and different copies can be stored in the persistent storage of different storage nodes. Exemplarily, Figure 7 The memory of the storage node in is used as a cache; and Figure 7 The hard disk of the storage node is used as persistent storage.
[0160] Furthermore, the migration of the first data or the second data by the first storage node may be triggered by the management node or by the first storage node itself. The migration of the first data by the first storage node is described as an example below:
[0161] Case 1: Data migration is triggered by the management node.
[0162] For details, please refer to Fig. 9 The flowchart of the first data migration is shown as an example:
[0163] Step 901: The management node obtains the heat of first data.
[0164] The first storage node can count the heat of the first data and send the heat of the first data counted by the first storage node to the management node. It should be noted that the first data can be cached not only in the first storage node, but also in other storage nodes (see Fig.11 The other storage nodes may also count the heat of the first data and send the heat of the first data counted by the other storage nodes to the management node. Accordingly, the management node receives the heat of the first data counted by the multiple storage nodes, and obtains the heat of the first data according to the heat of the first data counted by the multiple storage nodes.
[0165] Among them, when the first storage node counts the popularity of the first data, specifically, the first storage node receives an access request for the first data from the first business node, and counts the popularity of the first data according to the number of the access requests within a statistical period. There may be one or more routing storage nodes in the path between the first business node and the first storage node, and the access request may be forwarded to the first storage node by the one or more routing storage nodes. The way in which other storage nodes count the popularity of the first data is similar to that of the first storage node.
[0166] Step 902: When the management node determines that the heat of the first data is higher than the upper limit of the first heat range, the management node selects a second storage node from N storage nodes according to the heat of the first data and the priority of each storage node.
[0167] It is pointed out in advance that the management node records the priority of each storage node, and the heat range corresponding to each priority, which is equivalent to one or more of the following:
[0168] (a) The management node records N mapping relationships corresponding to N storage nodes, and the mapping relationship corresponding to each storage node includes the identifier of the storage node, the priority of the storage node, and the heat interval corresponding to the priority of the storage node;
[0169] (b) The management node records the heat intervals corresponding to N storage nodes;
[0170] (c) The management node records N mapping relationships corresponding to the N storage nodes, respectively. The mapping relationship corresponding to each storage node includes an identifier of the storage node and a heat interval corresponding to the priority of the storage node.
[0171] When the management node determines that the heat of the first data is higher than the upper limit of the first heat interval, it can further determine that the heat of the first data is in the heat interval corresponding to the second storage node (recorded as the second heat interval) based on the heat of the first data and the heat interval corresponding to each storage node, and then select the second storage node from the N storage nodes.
[0172] In one possible manner, when the N storage nodes include multiple storage nodes whose priorities are the same as the priority of the second storage node, the management node is further configured to select the second storage node from set A in at least one of the following manners (1) to (4). The set A is composed of storage nodes whose priorities are the same as the priority of the second storage node among the multiple storage nodes.
[0173] Method (1) uses random selection.
[0174] Method (2) uses a rotation method to select. Figure 8 In the example, the first storage node is storage node 14, and set A includes storage node 13, storage node 20, and storage node 25. The management node may select a storage node from storage node 13, storage node 20, and storage node 25 in a round-robin manner. For example, the round-robin order is storage node 13, storage node 20, and storage node 25, and the management node determines that the data in storage node 14 was migrated to storage node 13 last time, then the management node migrates the first data to storage node 20 this time.
[0175] Mode (3) is selected based on the access frequency of the storage nodes in set A. Exemplarily, each storage node in set A also counts the access frequency of the storage node and sends the access frequency of the storage node to the management node. Accordingly, the management node obtains the access frequency of each storage node in set A. The management node selects the second storage node based on the access frequency of each storage node in set A. For example, the management node selects the storage node with the lowest access frequency in set A as the second storage node.
[0176] Method (4), selecting according to the storage ratio of the storage nodes in set A. Exemplarily, each storage node in set A also counts the storage ratio of the storage node and sends the storage ratio of the storage node to the management node. Accordingly, the management node obtains the storage ratio of each storage node in set A. The management node selects the second storage node according to the storage ratio of each storage node in set A. For example, the management node selects the storage node with the lowest storage ratio in set A as the second storage node. The storage ratio of the storage node may specifically be the ratio between the amount of data already cached in the cache of the storage node and the total amount of data that can be cached.
[0177] It is understandable that methods (1) to (4) can also be used in combination. For example, the management node comprehensively considers the access frequency and storage ratio of the storage nodes in set A and selects the second storage node from set A. For another example, the management node comprehensively considers the access frequency and rotation order of the storage nodes in set A and selects the second storage node from set A.
[0178] Step 903: The management node sends a data migration instruction to the first storage node. Correspondingly, the first storage node receives the data migration instruction from the management node. The data migration instruction is used to instruct the first storage node to send the first data to the second storage node. Exemplarily, the data migration instruction includes an identifier of the first data and an identifier of the second storage node.
[0179] Step 904: The first storage node sends the first data to the second storage node in response to the data migration instruction. Correspondingly, the second storage node receives the first data from the first storage node.
[0180] Optionally, after sending the first data to the second storage node, the first storage node may also delete the first data in the cache of the first storage node. Optionally, the data migration instruction is also used to instruct the first storage node to delete the first data in the cache of the first storage node.
[0181] Step 905: The second storage node stores the first data in a cache of the second storage node.
[0182] Combination Figure 8For example, the first storage node is storage node 21, whose priority is priority 3, and the heat interval corresponding to priority 3 (i.e., the first heat interval) is [25, 50). In the t-1th statistical period, the management node determines that the heat of the first data in the t-1th statistical period is 49, that is, the heat of the first data is within the first heat interval [25, 50), and the first data is stored in storage node 21. As the heat of the first data increases, in the tth statistical period, the management node determines that the heat of the first data in the tth statistical period becomes 55, that is, it determines that the heat 55 of the first data is higher than the upper limit 50 of the first heat interval, so the management node can determine that the heat 55 of the first data is in the heat interval [50, 100) corresponding to priority 2 (that is, the second heat interval), and the management node determines that the storage nodes corresponding to priority 2 in the storage network include storage node 20, storage node 25, and storage node 13. The management node further determines that the access frequency of storage node 20 among storage node 20, storage node 25, and storage node 13 is the lowest, so the management node determines that the second storage node is storage node 20, and then the management node instructs storage node 21 to migrate the first data to storage node 20.
[0183] Case 2: data migration is triggered by the first storage node.
[0184] In a first possible implementation, the management node sends N mapping relationships corresponding to the N storage nodes to the first storage node. Correspondingly, the first storage node receives N mapping relationships corresponding to the N storage nodes from the management node. Among them, the mapping relationship corresponding to each storage node may include the identifier of the storage node, the priority of the storage node and the heat interval corresponding to the priority of the storage node, or, the mapping relationship corresponding to each storage node includes the identifier of the storage node and the heat interval corresponding to the priority of the storage node. Subsequently, the first storage node obtains the heat of the first data from the management node (the manner in which the management node obtains the heat of the first data can be referred to the description in step 901). The first storage node determines whether to continue to store the first data in the cache of the first storage node or to send the first data to the second storage node based on the heat of the first data and the N mapping relationships. This implementation method is the same as Fig. 9 The related embodiments are similar and will not be described in detail.
[0185] Furthermore, when the first storage node selects the second storage node from set A according to method (3), the first storage node may first obtain the access frequency of each storage node in set A from the management node; when the first storage node selects the second storage node from set A according to method (4), the first storage node may first obtain the storage share of each storage node in set A from the management node.
[0186] In addition, the first storage node may also request the management node for the identifier of the second storage node. Accordingly, the management node determines the second storage node from set A according to one or more of methods (1) to (4), and sends the identifier of the second storage node to the first storage node.
[0187] In a second possible implementation, the management node sends the first heat interval to the first storage node. Subsequently, the first storage node obtains the heat of the first data from the management node (the manner in which the management node obtains the heat of the first data can be referred to as described in step 901). According to the first heat interval and the heat of the first data, it is determined whether to continue to store the first data in the cache of the first storage node or to send the first data to the second storage node. For details, see Fig.10 The flowchart of the second data migration is shown as an example:
[0188] Step 1001: The management node sends a first heat interval to a first storage node, and sends a second heat interval to a second storage node.
[0189] It can be understood that the management node sends the heat interval corresponding to each priority to the storage node corresponding to the priority; in other words, the management node can determine the heat interval of each storage node based on the priority of each storage node and the heat intervals corresponding to multiple priorities, and send the heat interval of each storage node to the corresponding storage node.
[0190] In addition, each storage node may also pre-store multiple priorities and heat intervals corresponding to the multiple priorities. In this case, the management node may directly send the priority of each storage node to each storage node. Accordingly, each storage node may determine its own corresponding heat interval based on the priority from the management node and the multiple priorities and heat intervals corresponding to the multiple priorities pre-stored by itself. Exemplarily, the multiple priorities and heat intervals corresponding to the multiple priorities may be pre-sent to each storage node by the management node, or may be pre-set in each storage node by the management personnel.
[0191] Step 1002: The management node obtains the heat of the first data. The specific implementation of step 1002 may refer to the description of step 901 above.
[0192] Step 1003: The management node sends the heat of the first data to the first storage node.
[0193] Step 1004: When the first storage node determines that the heat of the first data is higher than the upper limit of the first heat interval, the first storage node selects a second storage node from the N storage nodes. Here, the second storage node is the storage node of the next hop of the first storage node in the storage network, and the priority of the second storage node is higher than the priority of the first storage node. It can also be understood that the second storage node is directly connected to the first storage node, and the priority of the second storage node is one level higher than that of the first storage node. The upper limit of the first heat interval is equal to the lower limit of the second heat interval.
[0194] Step 1005: The first storage node sends the first data and the heat of the first data to the second storage node. Correspondingly, the second storage node receives the first data and the heat of the first data from the first storage node.
[0195] Optionally, the first storage node deletes the first data in the cache of the first storage node.
[0196] Step 1006: The second storage node determines whether the heat of the first data is within a second heat range.
[0197] If the second storage node determines that the heat of the first data is within the second heat interval, the first data is stored in the cache of the second storage node; if the second storage node determines that the heat of the first data is higher than the upper limit of the second heat interval, the first data and the heat of the first data are sent to the fourth storage node. Among them, the fourth storage node is the storage node of the next hop of the second storage node in the storage network, and the priority of the fourth storage node is higher than the priority of the second storage node. It can also be understood that the fourth storage node is directly connected to the second storage node, and the priority of the fourth storage node is one level higher than the priority of the second storage node. The upper limit of the second heat interval is equal to the lower limit of the heat interval corresponding to the priority of the fourth storage node. Subsequently, the fourth storage node continues to determine whether the heat of the first data is within the heat interval corresponding to the priority of the fourth storage node, and so on, until a storage node stores the first data in the cache of the storage node.
[0198] Combination Figure 8 For example, the first storage node, the second storage node, and the fourth storage node are storage node 21, storage node 20, and storage node 19 respectively. Storage node 21, storage node 20, and storage node 19 correspond to priority 3, priority 2, and priority 1 respectively. The heat interval of priority 3 is [25, 50) , the heat interval of priority 2 is [50, 100) , and the heat interval of priority 3 is [100, 149) .
[0199] Example 1: Storage node 21 determines that the heat of the first data is 70, and determines that the heat 70 of the first data is higher than the upper limit of the heat interval [25, 50), so the first data and the heat 70 of the first data are sent to storage node 20; storage node 20 determines that the heat 70 of the first data is within the heat interval [50, 100), and stores the first data in the cache of storage node 20.
[0200] Example 2: Storage node 21 counts the heat of the first data to be 120, and determines that the heat 120 of the first data is higher than the upper limit of the heat interval [25, 50), so the first data and the heat 120 of the first data are sent to storage node 20; storage node 20 determines that the heat 120 of the first data is higher than the upper limit of the heat interval [50, 100), so the first data and the heat 120 of the first data are sent to storage node 19, storage node 19 determines that the heat 120 of the first data is within the heat interval [100, 149), and writes the first data to the cache of storage node 19.
[0201] It should be supplemented that the management node may also periodically obtain the heat of the first data counted by the storage node that stores the first data, and then determine the heat of the first data based on the heat of the first data counted by each storage node. That is, each statistical period may correspond to the heat of one first data. Furthermore, in the above step 1005, the first storage node may send the first data to the second storage node without sending the heat of the first data to the second storage node. The management node may also determine the heat of the first data in the next statistical period, and accordingly, the second storage node obtains the heat of the first data in the next statistical period from the management node. Furthermore, if the second storage node determines that the heat of the first data in the next statistical period is within the second heat interval, the first data is stored in the cache of the second storage node; if the second storage node determines that the heat of the first data in the next statistical period is higher than the upper limit of the second heat interval, the first data is sent to the fourth storage node. The specific implementation can be found in the description of step 1006 above. The difference is that, in this embodiment, the first storage node does not need to send the heat of the first data to the second storage node, but the second storage node obtains the heat of the first data in the next statistical period determined by the management node from the management node.
[0202] Combination Figure 8For example, the first storage node, the second storage node, and the fourth storage node are storage node 21, storage node 20, and storage node 19, respectively. Storage node 21, storage node 20, and storage node 19 correspond to priority 3, priority 2, and priority 1, respectively. The heat interval of priority 3 is [25, 50), the heat interval of priority 2 is [50, 100), and the heat interval of priority 3 is [100, 149). Storage node 21 obtains the heat of the first data in the t-th statistical period from the management node as 120, determines that the heat of the first data 120 is higher than the upper limit of the heat interval [25, 50), and sends the first data to storage node 20; storage node 20 obtains the heat of the first data in the t+1-th statistical period from the management node as 121, determines that the heat of the first data 121 is higher than the upper limit of the heat interval [50, 100), and sends the first data to storage node 19. The storage node 19 obtains from the management node that the heat of the first data in the t+2th statistical period is 123, determines that the heat of the first data 123 is within the heat interval [100, 149), and writes the first data into the cache of the storage node 19, where t is a positive integer.
[0203] In one possible manner, when the N storage nodes include multiple storage nodes whose priority is the same as that of the second storage node and are the next hops of the first storage node, the first storage node is further used to select the second storage node from set B by at least one of the following manners (1) to (4): manner (1), using random selection. manner (2), using a rotational selection. manner (3), selecting based on the access frequency of the storage nodes in set B. manner (4), selecting based on the storage ratio of the storage nodes in set B. wherein set B is composed of multiple storage nodes whose priority is the same as that of the second storage node and are the next hops of the first storage node.
[0204] For the specific implementation of the first storage node selecting the second storage node from set B, please refer to the method for the management node to select the second storage node from set A in step 902. The difference between the two is that the storage nodes in set B may be different from the storage nodes in set A. Further, when the first storage node selects the second storage node from set B according to method (3), the first storage node may first obtain the access frequency of each storage node in set B from the management node; when the first storage node selects the second storage node from set B according to method (4), the first storage node may first obtain the storage ratio of each storage node in set B from the management node.
[0205] In addition, the first storage node may also request the management node for the identifier of the second storage node. Accordingly, the management node determines the second storage node from set B according to one or more of methods (1) to (4), and sends the identifier of the second storage node to the first storage node.
[0206] The following points need to be added:
[0207] Supplement 1: The storage network may be externally connected to K service nodes, where K is an integer greater than 1. The K service nodes include a first service node and K-1 other service nodes, and the second service node among the K-1 other service nodes is used as an example for explanation below.
[0208] like Fig.11 Schematic diagram of the architecture of the third storage system, which includes 36 storage nodes, a first service node and a second service node, wherein circle A represents the first service node and circle B represents the second service node. The second service node is connected to the front-end network card of the storage node 24. For a description of the second service node, see Figure 4 For the description of the first service node in the related embodiments and the description of the third storage system, please refer to Figure 4 The description of the first storage system in the relevant embodiments will not be repeated here.
[0209] The management node may also determine the priority of each storage node according to the time required for communication between the second service node and each storage node. For the convenience of description, the priority of the storage node determined by the management node according to the time required for communication between the first service node and the storage node is referred to as the first priority, and the priority of the storage node determined by the management node according to the time required for communication between the second service node and the storage node is referred to as the second priority. It is understandable that a storage node has at least two priorities, namely the first priority and the second priority. It should be understood that the first priority and the second priority of a storage node can be used to indicate the delay of the storage node from the first service node (the time required to transmit the message) and the delay of the storage node from the second service node, respectively. Therefore, the first priority and the second priority of a storage node may be the same or different. Among them, the management node determines the implementation method of the second priority of each storage node according to the time required for communication between the second service node and each storage node, which can be referred to the implementation method of the management node determining the first priority of each storage node according to the time required for communication between the first service node and each storage node.
[0210] Combination Fig.11In the example, the management node can determine the first priority of the storage node 19 based on the time required for communication between the storage node 19 and the first service node, and determine the second priority of the storage node 19 based on the time required for communication between the storage node 19 and the second service node. Exemplarily, the first priority of the storage node 19 is 1, and the second priority of the storage node 19 is 6.
[0211] In a possible implementation, the storage network further includes a fifth storage node. When the second priority of the fifth storage node is the same as the first priority of the first storage node, the fifth storage node also stores the first data. Fig.11 In the example, when the first data is written to the storage network by a business node, it is specifically written to the persistent storage of a storage node (referred to as storage node A) in the storage network. Furthermore, when the first business node needs to read the first data, it will read the first data from the persistent storage of storage node A to the cache of the first storage node with a higher priority; similarly, when the second business node needs to read the first data, it will read the first data from the persistent storage of storage node A to the cache of the second storage node with a higher priority. Fig.11 In the example, storage node A is storage node 27, the first service node reads the first data into the cache of storage node 20, and the second service node reads the first data into the cache of storage node 23. Exemplarily, the first storage node is storage node 20, and the fifth storage node is storage node 23.
[0212] Furthermore, since the popularity of the first data is determined by the management node based on multiple business nodes jointly accessing the first data, when the first storage node needs to migrate the first data in the cache of the first storage node to the second storage node, the fifth storage node also needs to migrate the first data in the cache of the fifth storage node to the sixth storage node, wherein the first priority of the second storage node is the same as the second priority of the sixth storage node. It can be understood that the process of migrating the first data from the fifth storage node to the sixth storage node is similar to the process of migrating the first data from the first storage node to the second storage node, and will not be repeated.
[0213] Continue to combine Fig.11 In the example, the first storage node is storage node 20, and the fifth storage node is storage node 23. When the heat of the first data is higher than the heat interval corresponding to the priority of storage node 20 (or storage node 23), storage node 20 can migrate the first data cached in storage node 20 to storage node 19, and at the same time, storage node 23 can migrate the first data cached in storage node 23 to storage node 24. Here, storage node 19 and storage node 24 are the second storage node and the sixth storage node, respectively.
[0214] In addition, the management node can not only determine the priority and heat interval of each storage node, but also record the metadata information of the data stored in each storage node, wherein the metadata information may be the identifier of the data, the data size, the storage address of the data, etc. In this case, there may be two management nodes, one of which is used to determine the priority and heat interval of each storage node, and the management node may be located in the storage network, and the management node may also be called the primary storage node. Correspondingly, the other storage nodes in the storage network except the primary storage node may be called the backup storage nodes; the other management node is used to record the metadata information of the data stored in each storage node, and the management node may be located in the storage network or outside the storage network, and the management node may also be called the metadata server.
[0215] The first service node may send a query request to the management node, where the query request is used to query the identifier of a storage node storing the first data in the storage network. The query request may include the identifier of the first data.
[0216] In a specific implementation, when the first business node determines that the first data needs to be modified, it sends a first query request to the management node, and the first query request is used to query the identifier of the storage node storing the first data in the storage network. Correspondingly, after receiving the first query request, the management node sends the identifier of the storage node storing the first data in the storage network to the first business node. Among them, the identifier of the storage node storing the first data in the storage network may include the identifier of the first storage node, the identifier of the fifth storage node, and the identifier of storage node A. Subsequently, the first business node sends a first access request to the first storage node according to the identifier of the first storage node, and the first storage node modifies the first data cached in the first storage node according to the first access request. The first business node sends a second access request to the fifth storage node according to the identifier of the fifth storage node, and the fifth storage node modifies the first data cached in the fifth storage node according to the second access request. The first business node sends a third access request to storage node A according to the identifier of storage node A, and storage node A modifies the first data in the persistent storage of storage node A according to the third access request. In this way, the first service node can synchronously modify all the first data in the entire storage network to ensure the consistency of the first data stored (cached or persistently stored) in different storage nodes in the entire storage network.
[0217] Of course, when the first data in the cache of the first storage node is migrated to the second storage node, and when the first data in the cache of the fifth storage node is migrated to the sixth storage node, the first service node may also send a first query request to the management node, and accordingly, the management node may return to the first service node the identifier of the second storage node, the identifier of the sixth storage node, and the identifier of storage node A. Subsequently, the first service node sends a first access request to the second storage node according to the identifier of the second storage node, sends a second access request to the sixth storage node according to the identifier of the sixth storage node, and sends a third access request to the sixth storage node according to the identifier of storage node A.
[0218] In addition, the first business node may also send a second query request to the management node, and the second query request is used to query the identifier of the storage node with the highest first priority storing the first data in the storage network. Accordingly, after receiving the second query request, the management node sends the identifier of the storage node with the highest first priority storing the first data in the storage network to the first business node. The first business node can read the first data from the storage node based on the obtained identifier of the storage node, which helps to reduce the time it takes for the first business node to read the first data.
[0219] In addition, the K-1 other business nodes may also include a third business node, a fourth business node, etc. Correspondingly, the priority of the storage node also includes a third priority, a fourth priority, etc., which are similar to the second business node and the second priority, and will not be repeated here.
[0220] Supplement 2, Fig. 9 and Fig.10 The related method embodiments are all described by taking the first storage node migrating the first data to the second storage node as an example. In the present application, the first storage node may also migrate the second data to the third storage node.
[0221] In the case of triggering by the management node:
[0222] The management node can also obtain the heat of the second data. When it is determined that the heat of the second data is lower than the lower limit of the first heat interval, the management node selects a third storage node from multiple storage nodes according to the heat of the second data and the priority of each storage node. The management node sends a data migration instruction to the first storage node. Correspondingly, the first storage node sends the second data to the third storage node in response to the data migration instruction. The third storage node stores the second data in the third storage node. For specific implementation, see Fig. 9 In the description of the relevant embodiments, "first data" can be replaced with "second data", "second storage node" can be replaced with "third storage node", "higher than the upper limit of the first heat interval" can be replaced with "lower than the lower limit of the first heat interval", etc.
[0223] In the case of triggering by the first storage node:
[0224] The first storage node can also obtain the heat of the second data from the management node, and when it is determined that the heat of the second data is lower than the lower limit of the first heat interval, it sends the second data (or the heat of the second data and the second data) to the third storage node. Among them, the heat interval corresponding to the priority of the third storage node is the third heat interval, the third storage node is the storage node of the next hop of the first storage node in the storage network, and the priority of the third storage node is lower than the priority of the first storage node. It can also be understood that the third storage node is directly connected to the first storage node, and the priority of the third storage node is one level lower than the priority of the first storage node. The lower limit of the first heat interval is equal to the upper limit of the third heat interval. Correspondingly, when the third storage node determines that the heat of the second data is in the third heat interval, it stores the second data; when the third storage node determines that the heat of the second data is lower than the lower limit of the third heat interval, it sends the second data (or the heat of the second data and the second data) to the seventh storage node. The relationship between the seventh storage node and the third storage node is similar to the relationship between the third storage node and the first storage node. For specific implementation, please refer to Fig.10 In the description of the relevant embodiments, "first data" can be replaced with "second data", "second storage node" can be replaced with "third storage node", "fourth storage node" can be replaced with "seventh storage node", "higher than the upper limit of the first heat interval" can be replaced with "lower than the lower limit of the first heat interval", "higher than the upper limit of the second heat interval" can be replaced with "lower than the lower limit of the third heat interval", etc.
[0225] Supplement 3: The transmission of messages between the first storage node and the management node, the transmission of messages between the second storage node and the management node, and the transmission of messages between the first storage node and the second storage node are all based on the backend storage network. Figure 4The two-dimensional torus network shown. In the first example, the first storage node and the second storage node are adjacent. When the first storage node sends the first data to the second storage node, it can be specifically: the first storage node sends the first data to the second storage node through the back-end network card of the first storage node, and correspondingly, the second storage node receives the first data from the first storage node through the back-end network card of the second storage node. In the second example, the first storage node and the second storage node are not adjacent and there is a routing storage node between them. When the first storage node sends the first data to the second storage node, it can be specifically: step 1, the first storage node sends the first data to the routing storage node through the back-end network card of the first storage node, and correspondingly, the routing storage node can receive the first data from the first storage node through the back-end network card of the routing storage node; step 2, the routing storage node sends the first data to the second storage node through the back-end network card of the routing storage node, and correspondingly, the second storage node can receive the first data from the routing storage node through the back-end network card of the second storage node. Of course, there can also be multiple routing storage nodes between the first storage node and the second storage node. The specific implementation can refer to the description in the above second example.
[0226] Supplement 4: The heat intervals corresponding to the multiple priorities set in the management node can be dynamically changed. The management node can count the overall situation of the business node accessing the data, and then dynamically adjust the heat intervals corresponding to the multiple priorities according to the overall situation. Optionally, the management node can also send the heat interval corresponding to each priority to the storage node corresponding to each priority.
[0227] Supplement 5: The above is only Figure 4 The first storage system shown is used as an example to illustrate the first storage method of the present application. The first storage method can also be applied to Figure 6 A second storage system is shown.
[0228] Supplement 6, when the first business node reads certain data, the data can be directly stored in the cache of the highest priority storage node. When the highest priority storage node determines that the amount of data stored in the local cache reaches the storage capacity threshold of the local cache, it migrates the lowest temperature data in the local cache to the cache of the storage node one level lower than the highest priority. Furthermore, when the storage node one level lower than the highest priority determines that the amount of data stored in the local cache reaches the storage capacity threshold of the local cache, it migrates the lowest temperature data in the local cache to the cache of the storage node two levels lower than the highest priority, and so on. Among them, the first storage node and the third storage node are two adjacent storage nodes among the N storage nodes, and the priority of the first storage node is one level higher than the priority of the third storage node. Exemplarily, the first storage node is the highest priority storage node, and the third storage node is the storage node one level lower than the highest priority.
[0229] Combination Figure 8 In the scene, such as Fig.12 A schematic diagram of a data migration scenario is provided as an example for the present application, in which the first data is stored in the cache of the storage node 7. When the first business node needs to read the first data, the first data will be migrated to the cache of the storage node 19 with a priority of 1, and accordingly, the storage node 7 deletes the first data in the local cache. The storage node 19 feeds back the first data to the first business node. Furthermore, when the amount of data stored in the cache of the storage node 19 reaches the storage threshold, the management node determines that the first data is the lowest temperature data in the cache, and then instructs the storage node 19 to migrate the first data to the storage node 25 with a priority of 2; or, the storage node 19 determines that the first data is the lowest temperature data in the cache, and then migrates the first data to the storage node 25 with a priority of 2. In this example, the first storage node and the third storage node are storage node 19 and storage node 25, respectively.
[0230] based on Figure 6 The second storage system shown, the present application also provides a second storage method, the second storage method can be applied to migrate the data in the persistent storage of the storage node.
[0231] When the heat of the third data stored persistently by the storage node in the torus network is higher than the heat threshold, the storage node in the torus network sends the third data to the storage node in the first network. The storage node in the first network stores the third data in the persistent storage of the first network. This helps to shorten the overall time required for the first service node to access the data.
[0232] Optionally, when the heat of the fourth data in the persistent storage of the storage node in the first network is lower than or equal to the heat threshold, the storage node in the first network sends the fourth data to the storage node in the torus network. Exemplarily, the storage node in the torus network stores the fourth data in the persistent storage of the torus network. In this way, the storage node of the first network can have enough persistent storage space to store data with a heat higher than the heat threshold, thereby shortening the overall time required for the first business node to access the data.
[0233] In a specific implementation, the management node can obtain the topological relationship and determine the identifier of the network to which each storage node belongs (i.e., the identifier of the torus network or the identifier of the first network) based on the topological relationship. The way in which the management node obtains the topological relationship can be found in the description of the first storage method above. In another specific implementation, the management staff can directly input the identifier of the network to which each storage node belongs into the management node, and the management node then sends the identifier of the network to which each storage node belongs to each storage node to each storage node.
[0234] Furthermore, the migration of the third data by the storage node in the torus network may be triggered by the management node or by the storage node in the torus network itself. The following exemplary cases 1 and 2 are provided:
[0235] Case 1: Data migration is triggered by the management node.
[0236] For details, please refer to Fig.13 The flowchart of the third data migration is shown as an example:
[0237] Step 1301: The management node obtains the heat of the third data.
[0238] For specific implementation, please refer to the description of the management node acquiring the heat of the first data in the above step 901.
[0239] Step 1302: When the management node determines that the heat of the third data is higher than the heat threshold, the management node sends a data migration instruction to the storage node in the torus network. Correspondingly, the storage node in the torus network receives the data migration instruction from the management node.
[0240] Here, the third data is stored in the persistent storage of the storage node of the torus network.
[0241] The data migration instruction is used to instruct the storage node in the torus network to send the third data to the storage node in the first network. Exemplarily, the data migration instruction includes an identifier of the third data and an identifier of the storage node in the first network.
[0242] When the management node selects a storage node for storing the third data from the first network, the management node may specifically obtain the storage ratio of the persistent storage of each storage node in the first network (for example, the ratio between the amount of data already stored in the persistent storage of the storage node and the total amount of data that can be stored), and then select a storage node with a low storage ratio.
[0243] Step 1303: The storage node in the torus network sends the third data to the storage node in the first network in response to the data migration instruction. Correspondingly, the storage node in the first network receives the third data from the first storage node.
[0244] Optionally, after sending the third data to the storage node in the first network, the storage node in the torus network also deletes the third data in the local persistent storage.
[0245] Optionally, the data migration instruction is also used to instruct the storage node in the torus network to delete the third data in the local persistent storage.
[0246] Step 1304: The storage node in the first network stores the third data in a local persistent storage.
[0247] Case 2: Data migration is triggered by storage nodes in the torus network.
[0248] Step 1401: The management node sends a thermal threshold to a storage node in the torus network.
[0249] Step 1402: The management node obtains the heat of the third data.
[0250] For specific implementation, please refer to the description of the management node acquiring the heat of the first data in the above step 901.
[0251] Step 1403: The management node sends the heat of the third data to the storage node in the torus network.
[0252] Step 1404: When determining that the heat of the third data is higher than the heat threshold, the storage node in the torus network sends the third data to the storage node in the first network.
[0253] Step 1405: The storage node in the first network stores the third data in a local persistent storage.
[0254] Similarly, the migration of the fourth data by the storage node in the first network can be triggered by the management node or by the storage node in the first network itself, as respectively referred to in Case 1 and Case 2 above. The "third data" can be replaced with the "fourth data", "higher than the heat threshold" can be replaced with "lower than or equal to the heat threshold", "storage node in the torus network" can be replaced with "storage node in the first network", and "storage node in the first network" can be replaced with "storage node in the torus network" for understanding.
[0255] It should be added that the heat threshold can be dynamically changed, and the management node can count the overall situation of business nodes accessing data, and then dynamically adjust the heat threshold according to the overall situation. Optionally, the management node can also send the updated heat threshold to each storage node.
[0256] It should also be added that the second storage method is also applicable to data in the cache of the migration storage node. For specific implementation, see Fig.13 and Fig.14 The description in the relevant embodiments can be understood by replacing "persistent storage" with "cache". At this time, it can be considered that the data in the persistent storage is not migrated. The heat threshold can be dynamically changed, and the management node can count the overall situation of the business node accessing the data, and then dynamically adjust the heat threshold according to the overall situation. Optionally, the management node can also send the updated heat threshold to each storage node.
[0257] Based on the above content and the same concept, the present application provides a device, including a module for implementing the function of the storage node in the above method embodiment; or, including a module for implementing the function of the management node in the above method embodiment.
[0258] like Fig.15 As shown, the device 1500 includes a processing module 1501 and a transceiver module 1502 .
[0259] When the device 1500 is used to implement the function of the management node in the above method embodiment:
[0260] Exemplarily, the processing module 1501 is used to determine the priority of each storage node among the multiple storage nodes according to the topological relationship between the multiple storage nodes and the first service node.
[0261] When the management node triggers the migration of the first data in the first storage node, the processing module 1501 is also used to obtain the heat of the first data; when it is determined that the heat of the first data is higher than the upper limit of the first heat range, a second storage node is selected from multiple storage nodes according to the heat of the first data and the priority of each storage node; the transceiver module 1502 is used to send a migration indication to the first storage node, and the migration indication is used to instruct the first storage node to send the first data to the second storage node.
[0262] In the case where the first storage node triggers the migration of the first data in the first storage node, the transceiver module 1502 is used to send the priority of each storage node to each storage node in the multiple storage nodes.
[0263] Exemplarily, the processing module 1501 is further used to record the identifier of the storage node storing the first data. The transceiver module 1502 is further used to receive a query request from the first business node, wherein the query request is used to query the identifier of the storage node storing the first data; the transceiver module 1502 is further used to send the identifier of the first storage node and the identifier of the fifth storage node to the first business node.
[0264] When the device 1500 is used to implement the function of the first storage node in the above method embodiment:
[0265] Exemplarily, when the heat of the first data in the first storage node is higher than the upper limit of the first heat range, the processing module 1501 is used to control the transceiver module 1502 to send the first data to the second storage node.
[0266] Exemplarily, when the heat of the second data in the first storage node is lower than the lower limit of the first heat range, the processing module 1501 is further used to control the transceiver module 1502 to send the second data to the third storage node.
[0267] In the case where the management node triggers the migration of the first data in the first storage node, the transceiver module 1502 is further configured to receive a migration instruction from the management node, and send the first data to the second storage node according to the migration instruction.
[0268] When the first storage node triggers the migration of the first data in the first storage node, the transceiver module 1502 is also used to receive the priority from the management node, and the processing module 1501 is also used to control the transceiver module 1502 to send the first data to the second storage node when it is determined that the heat of the first data is higher than the upper limit of the first heat range.
[0269] Exemplarily, the transceiver module 1502 is further used to receive an access request from the first service node, and the processing module 1501 is further used to modify the first data stored in the first storage node according to the access request.
[0270] A more detailed description of the processing module 1501 and the transceiver module 1502 can be directly obtained based on the relevant description in the above method embodiment, and will not be repeated here.
[0271] Based on the above content and the same concept, the present application provides a computing device, including a processor, the processor is connected to a memory, the memory is used to store computer programs, and the processor is used to execute the computer programs stored in the memory, so that the computing device implements the function of the storage node in the above method embodiment, or so that the computing device implements the function of the management node in the above method embodiment.
[0272] Based on the above content and the same concept, the present application provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is executed by a computing device, the computing device implements the function of the storage node in the above method embodiment, or the computing device implements the function of the management node in the above method embodiment.
[0273] Based on the above content and the same concept, the present application provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a computing device, the computing device implements the function of the storage node in the above method embodiment; or, the computing device implements the function of the management node in the above method embodiment.
[0274] In some possible situations of the present application, "lower than" can be replaced with "lower than or equal to", "higher than or equal to" can be replaced with "higher than"; "lower than or equal to" can be replaced with "lower than", "higher than" can be replaced with "higher than or equal to"; "[a, b)" in the heat interval can be replaced with "(a, b]", etc. Such simple replacements are all within the protection scope of the present application.
[0275] It is to be understood that the various digital numbers involved in the embodiments of the present application are only for the convenience of description and are not used to limit the scope of the embodiments of the present application. The size of the sequence number of each of the above processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic. Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of protection of the present application. In this way, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these changes and variations.
Claims
1. A storage system, characterized in that: include: A plurality of storage nodes, a storage network formed by the plurality of storage nodes is connected to a first service node, and a priority of each storage node is determined by a time required for transmitting a message between the first service node and the storage node; The plurality of storage nodes include a first storage node and a second storage node; The first storage node is used to: send the first data to the second storage node when the heat of the first data in the first storage node is higher than the upper limit of a first heat interval; wherein the priority of the second storage node is higher than the priority of the first storage node, and the first heat interval is the heat interval corresponding to the priority of the first storage node.
2. The system according to claim 1, characterized in that The first storage node is further used for: When the heat of the second data in the first storage node is lower than the lower limit of the first heat range, the second data is sent to a third storage node, wherein the plurality of storage nodes also include the third storage node, and the priority of the third storage node is lower than the priority of the first storage node.
3. The system according to claim 1 or 2, characterized in that: The storage network is a torus network.
4. The system according to claim 1 or 2, characterized in that: The storage network includes a torus network and a first network, the torus network is composed of some storage nodes among the multiple storage nodes, the first network is composed of other storage nodes among the multiple storage nodes except the some storage nodes, and the torus network, the first network and the first business node are connected in sequence.
5. The system according to claim 4, characterized in that The first network is a fullmesh network.
6. The system according to any one of claims 1 to 5, characterized in that: The storage system also includes a management node; The management node is used to determine the priority of each storage node among the multiple storage nodes according to the topological relationship between the multiple storage nodes and the first service node.
7. The system according to claim 6, characterized in that The management node is further used to: obtain the heat of the first data; when it is determined that the heat of the first data is higher than the upper limit of the first heat interval, select the second storage node from the multiple storage nodes according to the heat of the first data and the priority of each storage node, the heat of the first data is in a second heat interval, and the second heat interval is a heat interval corresponding to the priority of the second storage node; and, instructing the first storage node to send the first data to the second storage node; The second storage node is used to store the first data in the second storage node.
8. The system according to claim 7, characterized in that When the plurality of storage nodes include a plurality of storage nodes whose priorities are the same as that of the second storage node; The management node is further configured to select the second storage node from set A in at least one of the following ways: Use random selection; The selection is made in a rotating manner; Selecting according to the access frequency of the storage nodes in the set A; Select according to the storage ratio of the storage nodes in the set A; The set A is composed of storage nodes among the multiple storage nodes whose priorities are the same as that of the second storage node.
9. The system according to claim 6, characterized in that The management node is further used to: send the priority of each storage node to each storage node among the multiple storage nodes; The first storage node is further configured to: receive the priority of the first storage node from the management node, and send the first data to the second storage node when determining that the heat of the first data is higher than an upper limit of the first heat range; The second storage node is used to: receive the priority of the second storage node from the management node, receive the first data from the first storage node, and when determining that the heat of the first data is within a second heat interval, store the first data in the second storage node, or when determining that the heat of the first data is higher than an upper limit of the second heat interval, send the first data to a fourth storage node in the storage network; Among them, the second heat interval is the heat interval corresponding to the priority of the second storage node, the second storage node is the storage node of the next hop of the first storage node in the storage network, and the priority of the second storage node is higher than the priority of the first storage node; the fourth storage node is the storage node of the next hop of the second storage node in the storage network, and the priority of the fourth storage node is higher than the priority of the second storage node.
10. The system according to any one of claims 7 to 9, characterized in that: When storing the first data in the second storage node, the second storage node is specifically configured to: store the first data in a cache of the second storage node.
11. The system according to any one of claims 1 to 10, characterized in that: In the case where the storage network is also connected to a second service node, the priority of each storage node includes a first priority and a second priority; wherein the first priority of each storage node is determined by the time required for message transmission between the first service node and the storage node, and the second priority of each storage node is determined by the time required for message transmission between the second service node and the storage node; The plurality of storage nodes further include a fifth storage node. When the second priority of the fifth storage node is the same as the first priority of the first storage node, the first data is stored in both the fifth storage node and the first storage node.
12. The system according to claim 11, characterized in that The fifth storage node is used to send the first data stored in the fifth storage node to a sixth storage node; wherein the second priority of the sixth storage node is the same as the first priority of the second storage node.
13. The system according to claim 11 or 12, characterized in that The storage system further includes a management node, and the management node is used to record an identifier of a storage node storing the first data; The management node is further used to: receive a query request from the first service node, the query request being used to query the identifier of the storage node storing the first data; and send the identifier of the first storage node and the identifier of the fifth storage node to the first service node; The first storage node is further used to: receive an access request from the first service node, and modify the first data stored in the first storage node according to the access request; The fifth storage node is used to: receive an access request from the first service node, and modify the first data stored in the fifth storage node according to the access request.
