Method, apparatus and computer program product for managing address mapping of a storage system
Through the distinction between active shards and inactive shards and shard adjustment, the problems of address mapping management complexity and performance degradation in the storage system are solved, and more efficient load balancing and performance improvement are achieved.
Patent Information
- Application Number
- CN201910860170.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-11
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2039-09-11
AI Technical Summary
When existing storage systems manage address mapping, it is difficult to effectively balance the workload of shards, resulting in increased management complexity and reduced performance, especially when the amount of data is large and access fluctuates.
Adopt the concepts of active sharding and inactive sharding, map data objects to buckets in active shards through hash values, adjust the number of shards and merge shards when necessary, and use processor resources to manage the storage system in a parallel manner .
It implements simpler and more effective address mapping management, balances sharding workloads, improves the performance and scalability of storage systems, and reduces management complexity.
Smart Images

Figure CN112486860B
Abstract
Description
Technical Field
[0001] Implementations of the present disclosure relate to management of storage systems, and more particularly, to methods, devices, and computer program products for managing address mappings in storage systems. Background Art
[0002] With the development of data storage technology, various data storage devices have been able to provide users with higher and higher data storage capabilities. At present, the concept of distributed storage system has been proposed, and user data can be distributed on various nodes included in the distributed storage system. Furthermore, while improving the data storage capacity, users have also put forward higher and higher requirements for the response time of the storage system. At present, a technical solution has been developed to establish an index for the address mapping of data objects stored in the storage system to accelerate the data access speed.
[0003] For example, shading technology can be used to divide the storage space in the storage system into multiple shades. The multiple shades can perform operations such as data writing / reading in parallel, thereby improving the performance of the storage system. As the amount of data in the storage system increases, the amount of data involved in the shades will become larger and larger, resulting in more arduous management work. At this time, how to manage address mapping in a more effective way and improve the performance of the storage system has become a research hotspot. Summary of the invention
[0004] Therefore, it is expected to develop and implement a technical solution for managing address mapping of a storage system in a more efficient manner. It is expected that the technical solution can be compatible with existing storage systems and manage the storage system in a more efficient manner by modifying various configurations of the existing storage system.
[0005] According to a first aspect of the present disclosure, a method for managing address mapping of a storage system is provided. A group of data objects in the storage system is mapped to a group of buckets in an address mapping, the group of buckets being divided into a first group of active shards, and the first group of active shards are respectively associated with a group of storage devices in the storage system. In the method, a first write request to write a first data object to the storage system is received. The address mapping is updated to map the first data object to a first bucket in a group of buckets. The storage system is instructed to store the first data object to a first storage device in a group of storage devices, the first storage device being associated with a first active shard where the first bucket is located. The storage system is managed based on the updated address mapping.
[0006] According to a second aspect of the present disclosure, a device for managing address mapping of a storage system is provided. A group of data objects in the storage system are mapped to a group of buckets in the address mapping, and the group of buckets is divided into a first group of active shards, and the first group of active shards are respectively associated with a group of storage devices in the storage system. The device includes: at least one processor; a volatile memory; and a memory coupled to the at least one processor, the memory having instructions stored therein, and the instructions cause the device to perform an action when executed by the at least one processor. The action includes: receiving a first write request to write a first data object to the storage system; updating the address mapping to map the first data object to a first bucket in a group of buckets; instructing the storage system to store the first data object to a first storage device in a group of storage devices, the first storage device being associated with a first active shard where the first bucket is located; and managing the storage system based on the updated address mapping.
[0007] According to a third aspect of the present disclosure, there is provided a computer program product, which is tangibly stored on a non-transitory computer-readable medium and comprises machine-executable instructions for executing the method according to the first aspect of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] The features, advantages and other aspects of various implementations of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings, which illustrate several implementations of the present disclosure in an exemplary and non-limiting manner. In the accompanying drawings:
[0009] Figure 1 A schematic diagram schematically illustrates a storage system in which the method of the present disclosure may be implemented;
[0010] Figure 2 A block diagram schematically shows address mapping of a storage system according to a technical solution;
[0011] Figure 3 A block diagram schematically illustrates an address mapping for managing a storage system according to an implementation of the present disclosure;
[0012] Figure 4 A flowchart of a method for managing address mapping of a storage system according to an implementation of the present disclosure is schematically shown;
[0013] Figure 5 A block diagram schematically illustrates a group of active shards after the number of shards is adjusted according to an implementation of the present disclosure;
[0014] Figure 6 A block diagram for performing merging on multiple shards according to an implementation of the present disclosure is schematically shown;
[0015] Figure 7 A block diagram schematically illustrates a method of querying a target data object in a storage system according to an implementation of the present disclosure; and
[0016] Figure 8 A block diagram schematically shows a device for managing address mapping of a storage system according to an exemplary implementation of the present disclosure. DETAILED DESCRIPTION
[0017] The preferred implementations of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the preferred implementations of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the implementations set forth herein. On the contrary, these implementations are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0018] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "based at least in part on". The terms "an example implementation" and "an implementation" mean "at least one example implementation". The term "another implementation" means "at least one additional implementation". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0019] Currently, a variety of storage systems have been developed. For example, in a distributed storage system, multiple storage devices may be included, and data objects from users may be stored in a storage device among the multiple storage devices based on address mapping. Figure 1 A schematic diagram 100 of a storage system in which the method of the present disclosure may be implemented is schematically shown. Figure 1 As shown, the storage system 110 may include a plurality of storage devices 120, 122, ..., and 124. Further, the storage system 110 may also include an address map 130, which may map a data object 140 from a user to one or more storage devices.
[0020] It will be understood that the data object 140 herein may be of different types. For example, the data object 140 may be a video file, an audio file, a text file, etc. Further, the data object 140 may also be of different sizes. If the data object 140 is large (e.g., a high-definition movie), the data object 140 may be divided into a plurality of smaller blocks, and the plurality of blocks may be stored in a plurality of storage devices in the storage system 110, respectively. At this point, the address map 130 may record the mapping relationship between the data object 140 and one or more blocks of the data object 140. In other words, the address map 130 needs to record which storage device(s) in the storage system 110 each block in the data object 140 is stored in and needs to record the address of that storage device(s).
[0021] In order to facilitate management, sharding technology has been proposed. Figure 2 A block diagram 200 of address mapping of a storage system according to a technical solution is schematically shown. Figure 2 As shown, a hash value of the data object can be obtained based on the data object 140. The address map 130 can include multiple slices, where the number of slices can depend on the number of storage devices in the storage system 110. For example, the number of slices can be proportional to the number of storage devices, and a maximum value can be set for the number of slices.
[0022] will understand, although Figure 2 1 shows a case where one shard corresponds to one storage device. In other examples, a shard may correspond to one or more storage devices in the storage system 110. In further examples, there may be a many-to-many relationship between shards and storage devices. Figure 2 As shown, after performing a hash operation on the data object 140 of the user from the storage system 110, a hash value 210 can be obtained. Based on the hash value 210, it can be determined that the data object 140 corresponds to the shard 220, and then the data object 140 can be stored in the storage device 122 associated with the shard 220.
[0023] In order to ensure load balancing of the storage system 110, it should be ensured that the multiple shards have similar sizes, and it is expected that the access load of the storage device associated with each shard is similar. However, due to the large fluctuations in access from users and the possible changes in the number of storage devices in the storage system 110, complex algorithms are required to ensure the balance of the storage system. At this time, how to manage the address mapping 130 of the storage system 110 in a simpler and more effective manner so as to balance the workload for managing each shard has become a research hotspot.
[0024] In order to solve the above-mentioned defects, the implementation of the present disclosure provides a method, device and computer program product for managing the address mapping 130 of the storage system 110. According to the exemplary implementation of the present disclosure, the address mapping 130 may include a set of buckets, and a bucket may be associated with an address range in the storage system 110, for example, an address range in a storage device. The number of buckets may depend on the size of the storage space in the storage system 110, and a maximum value may be set for the number of buckets. For example, the storage space in the entire storage system 110 may be divided into 2 m Buckets (for example, when m=7, there are 128 buckets).
[0025] An identifier (e.g., 0 to 127) may be set for a group of buckets, and the data object 140 may be mapped to a corresponding bucket based on the hash value of the data object 140. For example, if the hash value of a data object is 11, the data object may be mapped to the 11th bucket. Multiple data objects may be mapped to the same or different buckets. As the storage system 110 runs, the number of data objects included in each bucket will increase. A group of buckets may be divided into a group of shards, for example, 2 m Assume that m=7 and n=3, then 128 buckets can be divided into 3 shards.
[0026] For the convenience of description, the following description will only be based on the case where the data object 140 includes only one block. When the data object 140 includes more data, the data object 140 can be divided into multiple blocks. At this time, the processing for each block in the data object 140 is similar. Figure 3 A block diagram 300 for managing the address map 130 of the storage system 110 according to one implementation of the present disclosure is schematically shown. Figure 3 As shown, multiple buckets can be managed in a ring manner. When divided in a more even manner, 128 buckets can be divided into 3 slices. Slice 310 can include buckets 0 to 43, slice 312 can include buckets 44 to 86, and slice 314 can include buckets 87 to 127. It will be understood that the way of dividing the buckets here is only illustrative, and it can also be divided in other ways.
[0027] According to the exemplary implementation of the present disclosure, the concept of active shards is proposed. The active shards herein refer to shards in the address map 130 that can be changed. In other words, the address map 130 can be updated by mapping new data objects to buckets in the active shards. Figure 3As shown, after receiving a write request to write a new data object to the storage system 110, the data object can be mapped to a bucket 320 in an active shard 310 based on the hash value of the data object. With respect to active shards, the address map 130 can also include inactive shards. Here, an inactive shard refers to a shard in the address map 130 that cannot be changed. In other words, a new data object cannot be mapped to a bucket in an inactive shard, but only a query operation can be performed on the inactive shard.
[0028] At this point, the storage system 110 may be instructed to store the data object 140 in a first storage device in a set of storage devices, the first storage device being associated with the first active shard where the first bucket is located. Then, the storage system 110 may be managed based on the updated address mapping. Figure 4 Further details regarding managing the address map 130 of the storage system 110 are described.
[0029] Figure 4 The flowchart of a method 400 for managing the address mapping 130 of the storage system 110 according to one implementation of the present disclosure is schematically shown. It will be understood that a group of data objects in the storage system 110 are mapped to a group of buckets in the address mapping, and the group of buckets is divided into a first group of active shards, and the first group of active shards are respectively associated with a group of storage devices in the storage system. Figure 4 As shown in box 410 in , a first write request to write a first data object to the storage system 110 may be received. The first data object herein is a new data object to be written to the storage system. It will be understood that the operation for a write request is described below only by way of example. According to an exemplary implementation of the present disclosure, the storage system 110 may receive one or more write requests and may also receive one or more read requests. At this time, these requests are served based on different shards in the address mapping, respectively: the write request may be served by using the active shard, and the read request may be served by using both the active shard and the inactive shard.
[0030] At block 420, the address map 130 may be updated to map the first data object to a first bucket in the set of buckets. Here, a hash operation may be performed on the first data object to determine a hash value of the first data object. For example, a predetermined hash function may be used and the hash value 210 may be obtained based on an identifier of the first data object. For another example, the corresponding hash value may be generated based on an identifier of the first data object, a user identifier of the owner, data in the data object, and a timestamp.
[0031] At box 430, the storage system 110 can be instructed to store the first data object to a first storage device in a group of storage devices. Here, the first storage device is associated with the first active shard where the first bucket is located. In other words, the information associated with the first data object can be written to the bucket in the active shard. For example, if the hash value of the first data object is 11, since 0<11<43, the first data object can be stored in the storage device associated with shard 310. For another example, if the hash value of the first data object is 57, since 44<57<86, the first data object can be stored in the storage device associated with shard 312. For example, if the hash value of the first data object is 93, since 87<93<127, the first data object can be stored in the storage device associated with shard 314. At this time, Figure 3 Shards 310, 312, and 314 are all active shards.
[0032] At block 440, the storage system 110 may be managed based on the updated address map 130. It will be appreciated that the updated address map 130 already includes information of the first data object that has just been stored in the storage system 110. Based on the updated address map, it may be determined from which address in the storage system 110 to read the just stored data object. During operation of the storage system 110, if a write request is received to write other data objects to the storage system 110, the current address map 130 may be further updated so as to add information of the data object to be written to the address map 130.
[0033] It will be understood that in the initial operation stage of the storage system 110, the address mapping 130 may include only one set of active shards, and as the storage system 110 operates, more and more data objects will be involved in the buckets in each active shard. Since the resources involved in managing the shards will increase, other shards can be generated by regeneration operations at this time to manage write operations of new data objects to the storage system 110. According to an exemplary implementation of the present disclosure, the current first set of active shards can also be converted into inactive shards. The inactive shards here can be used to manage read operations of reading data objects from the storage system 110. Using the exemplary implementation of the present disclosure, operations for managing different shards can be assigned to different devices (for example, the processing can be performed by processors in different storage devices). Therefore, the address mapping 130 can be managed in a more parallel and efficient manner.
[0034] According to an exemplary implementation of the present disclosure, if it is determined that the state of the storage system 110 satisfies a predetermined regeneration condition, the first group of active shards may be identified as the first group of inactive shards. For example, a first generation identifier may be used to indicate the generation to which the multiple active shards belong. Assuming that a group of active shards is set during the initial startup of the storage system 110, the group of active shards may be assigned a corresponding generation identifier (e.g., represented by "Generation01").
[0035] Further, each shard may be assigned a shard identifier, for example, "Shard01" may be used to represent the first shard, "Shard02" may be used to represent the second shard, and so on. At this point, for each shard, each shard may be uniquely represented by a tuple (generation identifier, shard identifier). For example, (Generation01, Shard01) may represent the first shard in the first generation. It will be understood that although the generation identifier is used as an example to describe how to distinguish between generations, according to the exemplary implementation of the present disclosure, the distinction may also be based on other methods. For example, it may be implemented based on the timestamp of the data object.
[0036] As the storage system 110 runs, when a predetermined regeneration condition is met, the initial set of active shards can be marked as inactive, and a further set of active shards can be generated. For example, the newly generated set of active shards can be assigned a generational identifier "Generation02". At this time, the individual shards in the newly generated set of active shards can be represented as (Generation02, Shard01), (Generation02, Shard02), (Generation02, Shard03), respectively. An identifier can be set for a group of shards that are currently in an active state. Alternatively and / or additionally, a group of shards with the largest generational identifier can also be defined as being in an active state, while another group or multiple groups of shards with smaller generational identifiers are in an inactive state.
[0037] During the operation of the storage system 110, when the storage system 110 receives a write request, the data object to be written can be mapped to a bucket in the current set of active shards, and the data object to be written can be written to the storage device associated with the bucket in the storage system 110. In other words, a set of active shards in the address map 130 can be updated at this time to serve the write request. When the storage system 110 receives a read request, all shards (including active shards and inactive shards) in the address map 130 can be queried to find the shard associated with the data object to be read, and then read the data from the storage device corresponding to the found shard.
[0038] It will be understood that as the storage system runs, more and more data objects will be written to a set of storage devices in the storage system. This causes each active shard to involve more and more data objects. As the number of data objects associated with a shard increases, the number of resources involved in managing the shard will also increase, and the complexity of management will also increase. According to an exemplary implementation of the present disclosure, the predetermined regeneration condition may include a threshold number that the number of data objects associated with a shard exceeds.
[0039] Specifically, during the operation of the storage system 110, the number of data objects involved in each active shard can be counted. For example, for a given active shard in the first group of active shards, the number of objects of data objects associated with the given active shard can be determined at predetermined time intervals. Alternatively and / or additionally, statistics can also be performed each time an active shard is to be updated, or a dedicated counter can be set for each active shard to store the number of data objects involved in the active shard. Whether to perform regeneration can be determined based on the relationship between the number of determined objects and a threshold number. If the determined number is higher than the threshold number, a regeneration operation can be performed, at which time the current set of active shards can be identified as inactive shards, and a set of buckets can be divided into a new second set of active shards.
[0040] continue Figure 3 In the example of, among the three shards 310, 312 and 314, if the number of data objects involved in shard 310 is higher than a predetermined threshold number, a regeneration operation can be performed. Assuming that the identifiers of the three shards 310, 312 and 314 are (Generation01, Shard01), (Generation01, Shard01), (Generation01, Shard03), respectively, a new set of active shards (Generation02, Shard01), (Generation02, Shard01), (Generation02, Shard03) can be generated. At this time, different processors can be allocated to manage different groups of shards. For example, the processor in the storage device 120 can be allocated to manage the shard with the generation identifier "Generation01", and the processor in the storage device 122 can be allocated to manage the shard with the generation identifier "Generation02". According to the exemplary implementation of the present disclosure, different processors can also be allocated to manage different shards with the same generation identifier. With the exemplary implementation of the present disclosure, processing resources in the storage system 110 may be more fully utilized to manage the address map 130 of the storage system 110 in a more parallel manner.
[0041] It will be understood that the above merely schematically illustrates an example of the number of data objects involved in the shard as a regeneration condition. According to the exemplary implementation of the present disclosure, the regeneration condition may also involve more examples, as long as the regeneration condition may indicate an indicator associated with the processing resources required to manage the shard. For example, the regeneration condition may include the amount of data objects involved in the shard, the amount of data occupied by the shard itself, and so on.
[0042] It will be understood that the frequency of access requests (including read / write requests) received by the storage system 110 may also change continuously as the storage system 110 operates. For example, the storage system 110 may frequently receive write requests over a period of time, at which time a large number of data objects will be mapped to active shards, which will cause a sharp increase in the workload of managing the active shards. For another example, the storage system 110 may only receive a small number of write requests or even no write requests over a period of time, at which time the workload of managing a certain active shard will remain at a low level.
[0043] In view of the above, according to an exemplary implementation of the present disclosure, a threshold load can be set for the active shard. Specifically, the load threshold can indicate the recommended number of requests that the active shard can process within a predetermined time period. The load threshold may include an upper threshold and a lower threshold to indicate the range of the recommended number. For example, the load threshold can be defined as the range of the number of requests that can be processed per second in the active shard as (low, high). At this point, the access load of the storage system 110 can be first counted, and based on the relationship between the access load and the upper threshold and the lower threshold, it can be determined how to adjust the number of active shards.
[0044] According to an exemplary implementation of the present disclosure, the number of write requests received by the storage system 110 in a recent period of time can be counted, and the access load of the storage system 110 can be determined based on the number. If the access load is higher than the upper threshold high, it means that the current set of active shards is facing a higher workload. Therefore, the number of current active shards should be increased. For example, the number of current active shards can be incremented based on a predetermined step size. According to an exemplary implementation of the present disclosure, if the access load of the storage system 110 is lower than the lower threshold low, it means that the current set of active shards is facing a lower workload. Therefore, the number of current active shards should be reduced. For example, the number of current active shards can be decremented based on a predetermined step size. In the following, reference will be made to Figure 5 Describes more details on adjusting the number of currently active shards.
[0045] Figure 5 A block diagram 500 schematically shows a group of active shards after the number of shards is adjusted according to an implementation of the present disclosure. Figure 3 For example, if you determine Figure 3 If the workload associated with the three active shards shown is high, the number of active shards can be adjusted. For example, the number of active shards can be adjusted to 5. Figure 5 As shown, a group of buckets may be divided into five active shards: shard 510 may include buckets 0 to 26, shard 512 may include buckets 27 to 52, shard 514 may include buckets 53 to 77, shard 516 may include buckets 78 to 103, and shard 518 may include buckets 104 to 127. It will be appreciated that although Figure 5 Only an example of adjusting the number of currently active shards to 5 is schematically shown. According to the exemplary implementation of the present disclosure, the adjusted target number can also be determined based on the relationship between the access load of the storage system 110 and the upper threshold / lower threshold.
[0046] According to an exemplary implementation of the present disclosure, assuming that there are currently N active shards, the range of the number of access requests that an active shard can process is (low, high), and the number of access requests that the i-th shard needs to process is s i When it is determined that the access load is high and the number of active shards needs to be increased, the target number Num can be determined based on the following formula 1: high :
[0047]
[0048] In Formula 1, Num high represents the number of active shards after adjustment, N represents the number of active shards before adjustment, high represents the upper limit of access requests that an active shard can process, s i Indicates the number of access requests that the i-th shard needs to process.
[0049] Similarly, when it is determined that the access load is low and the number of active shards needs to be reduced, the target number Num can be determined based on the following formula 2: low :
[0050]
[0051] In Formula 2, Num low represents the number of active shards after adjustment, N represents the number of active shards before adjustment, low represents the lower limit of access requests that an active shard can process, and s i Indicates the number of access requests that the i-th shard needs to process.
[0052] As the storage system 110 runs, the number of active shards may be adjusted to different values, which may result in smaller shards (referred to as “fragmented shards”). Thus, these fragmented shards may be merged to form larger shards to facilitate management of the shards in the storage system 110.
[0053] According to an exemplary implementation of the present disclosure, a corresponding data distribution of a plurality of data objects associated with a corresponding active shard in a first set of active shards is determined. Further, based on the corresponding data distribution, the consecutive active shards in a set of active shards may be merged. In the following, more details about merging shards will be described with reference to the pseudo code shown in Table 1 below.
[0054]
[0055] As shown in Table 1 above, the fragments in the same generation can be sorted according to the distribution on the ring, and then the adjacent small fragments can be merged into larger fragments close to the target size. Figure 6 Describes more details about the merge. Figure 6 A block diagram 600 for performing a merge on multiple shards according to an implementation of the present disclosure is schematically shown. Figure 6 As shown, assuming that there are multiple shards 610, 620, etc., the adjacent shards can be merged into a larger shard based on the distribution of each shard on the ring. For example, shard 610 and shard 620 can be merged into a larger shard.
[0056] According to an exemplary implementation of the present disclosure, data objects may be continuously written to the storage system 110. A second write request to write a second data object to the storage system 110 may be received; an address mapping may be updated to map the second data object to a second bucket in a set of buckets; and the storage system may be instructed to store the second data object to a second storage device in a set of storage devices, the second storage device being associated with a second active shard where the second bucket is located. Here, the first write request may be processed in a manner similar to the method 400 described above.
[0057] According to an exemplary implementation of the present disclosure, for each stored data object in the storage system 110, a generation identifier of the data object may be stored in the address map 130. For example, for a specific data object A, when the data object A is written to a storage device in the storage system 110, assuming that the data object A is managed by using the active shard of the first generation, the generation identifier of the data object A may be "Generation01". In this way, when a read request for the data object A is received, it is convenient to quickly find the generation where the address mapping of the data object A is located, and then find the corresponding shard information.
[0058] It will be understood that the address map 130 may include only one set of active shards, and may include one or more sets of inactive shards. In this case, the active shards are used to serve write requests, while both the active shards and the inactive shards are used to serve read requests. In this case, the task of managing multiple shards may be assigned to different processors. Using the exemplary implementation of the present disclosure, multiple processors in the storage system may be used as much as possible to serve multiple write / read requests in parallel. In the following, reference will be made to FIG. Figure 7 Describe how to read data from the storage system 110.
[0059] Figure 7 A block diagram 700 for reading a target data object in a storage system 110 according to an implementation of the present disclosure is schematically shown. According to an exemplary implementation of the present disclosure, a corresponding identifier may be set for each generation of shards. For example, a generation identifier 732 and a shard identifier 734 may be used to uniquely identify each shard 730. At this time, the address map 130 may include a first generation shard 710 (in an inactive state) and a second generation shard 720 (in an active state). It will be understood that although Figure 7 The case where one group of inactive shards and one group of active shards are included is only schematically shown. According to an exemplary implementation of the present disclosure, multiple groups of inactive shards and one group of active shards may also be included.
[0060] According to an exemplary implementation of the present disclosure, a read request for reading a target data object from the storage system 110 may be received. A target shard associated with the target data object is determined based on the association relationship included in the address map 130. The target data object is read from the storage system 110 based on the target shard.
[0061] Specifically, after receiving a read request for the storage system 110, the hash value of the data object to be read can be determined based on the identifier of the data object to be read specified in the read request. Then, the generation to which the data object belongs can be determined first. Assuming that the data object with a hash value of 11 belongs to the generation "Generation01", the shard corresponding to the data object can be searched in a group of shards with a generation identifier of "Generation01". Furthermore, index information about the data object can be determined based on the found shards, and the data object can be retrieved from the storage device 110. For another example, assuming that the data object with a hash value of 11 belongs to the generation "Generation02", the shard corresponding to the data object can be searched in a group of shards with a generation identifier of "Generation02".
[0062] See above for Figures 2 to 7An example of the method 400 according to the present disclosure is described in detail, and the implementation of the corresponding device will be described below. According to an exemplary implementation of the present disclosure, a device for managing the address mapping of a storage system is provided. A group of data objects in the storage system are mapped to a group of buckets in the address mapping, and the group of buckets is divided into a first group of active shards, and the first group of active shards are respectively associated with a group of storage devices in the storage system. The device includes: a receiving module, configured to receive a first write request to write a first data object to the storage system; an update module, configured to update the address mapping to map the first data object to a first bucket in a group of buckets; an indication module, configured to indicate the storage system to store the first data object to a first storage device in a group of storage devices, and the first storage device is associated with a first active shard where the first bucket is located; and a management module, configured for the module, configured to manage the storage system based on the updated address mapping.
[0063] According to an exemplary implementation of the present disclosure, the management module includes: a regeneration module, configured to identify a first group of active shards as a first group of inactive shards based on determining that a state of the storage system satisfies a predetermined regeneration condition; and a partitioning module, configured to partition a group of buckets into a second group of active shards.
[0064] According to an exemplary implementation of the present disclosure, the regeneration condition includes a threshold number of data objects associated with a shard, and the partitioning module further includes: a determination module configured to determine, for a given active shard in the first group of active shards, the number of objects of the data objects associated with a given active shard; and an adjustment module configured to partition a group of buckets into a second group of active shards based on determining that the number of objects is higher than the threshold number.
[0065] According to an exemplary implementation of the present disclosure, the apparatus further includes: a load module configured to adjust the number of active shards in the first group of active shards based on an access load of the storage system and a load threshold condition of the storage system.
[0066] According to an exemplary implementation of the present disclosure, the load threshold condition includes a lower threshold, and the adjustment module includes: a reduction module configured to reduce the number of shards based on determining that the access load of the storage system is lower than the lower threshold.
[0067] According to an exemplary implementation of the present disclosure, the load threshold condition includes an upper threshold, and the adjustment module includes: an improvement module configured to improve the sharding based on determining that the access load of the storage system is higher than the upper threshold.
[0068] According to an exemplary implementation of the present disclosure, the management module includes: a distribution determination module, configured to determine the data distribution of multiple data objects in a first group of active shards; and a merging module, configured to merge successive active shards in a group of active shards based on the data distribution.
[0069] According to an exemplary implementation of the present disclosure, the receiving module is further configured to receive a second write request to write a second data object to the storage system; the updating module is further configured to update the address mapping to map the second data object to a second bucket in a group of buckets; the indicating module is further configured to instruct the storage system to store the second data object to a second storage device in a group of storage devices, and the second storage device is associated with a second active shard where the second bucket is located.
[0070] According to an exemplary implementation of the present disclosure, the management module includes: an identifier determination module, configured to determine a first generation identifier and a first shard identifier of a first active shard associated with a first data object based on a first group of active shards; and an adding module, configured to add a first association relationship between the first data object and the first active shard to an address mapping, the first active shard being represented by the first generation identifier and the first shard identifier.
[0071] According to an exemplary implementation of the present disclosure, the receiving module is further configured to receive a read request for reading a target data object from a storage system; the shard determination module is configured to determine a target shard associated with the target data object based on an association relationship included in an address mapping; and the reading module is configured to read the target data object from the storage system based on the target shard.
[0072] Figure 8 A block diagram of a device 800 for managing address mapping of a storage system according to an exemplary implementation of the present disclosure is schematically shown. As shown, the device 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 802 or computer program instructions loaded from a storage unit 808 to a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The CPU 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0073] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0074] The various processes and processing described above, such as method 400, can be performed by processing unit 801. For example, in some implementations, method 400 can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 808. In some implementations, part or all of the computer program can be loaded and / or installed on device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by CPU 801, one or more steps of method 400 described above can be performed. Alternatively, in other implementations, CPU 801 can also be configured in any other suitable manner to implement the above process / method.
[0075] According to an exemplary implementation of the present disclosure, a device for managing address mapping of a storage system is provided, wherein a group of data objects in the storage system are mapped to a group of buckets in the address mapping, the group of buckets is divided into a first group of active shards, and the first group of active shards are respectively associated with a group of storage devices in the storage system. The device includes: at least one processor; a volatile memory; and a memory coupled to the at least one processor, the memory having instructions stored therein, and the instructions, when executed by the at least one processor, cause the device to perform an action. The action includes: receiving a first write request to write a first data object to the storage system; updating the address mapping to map the first data object to a first bucket in a group of buckets; instructing the storage system to store the first data object to a first storage device in a group of storage devices, the first storage device being associated with a first active shard where the first bucket is located; and managing the storage system based on the updated address mapping.
[0076] According to an exemplary implementation of the present disclosure, managing a storage system based on an updated address mapping includes: identifying a first group of active shards as a first group of inactive shards based on determining that a state of the storage system satisfies a predetermined regeneration condition; and dividing a group of buckets into a second group of active shards.
[0077] According to an exemplary implementation of the present disclosure, the predetermined regeneration condition includes a threshold number of data objects associated with a shard, and the device further includes: determining, for a given active shard in a first group of active shards, the object number of data objects associated with a given active shard; and based on determining that the object number is higher than the threshold number, dividing a group of buckets into a second group of active shards.
[0078] According to an exemplary implementation of the present disclosure, the device further includes: adjusting the number of active shards in the first group of active shards based on an access load of the storage system and a load threshold condition of the storage system.
[0079] According to an exemplary implementation of the present disclosure, the load threshold condition includes a lower threshold, and wherein adjusting the number of active shards in the first group of active shards includes: reducing the number of shards based on determining that the access load of the storage system is lower than the lower threshold.
[0080] According to an exemplary implementation of the present disclosure, the load threshold condition includes an upper threshold, and wherein adjusting the number of active shards in the first group of active shards includes: increasing the shards based on determining that the access load of the storage system is higher than the upper threshold.
[0081] According to an exemplary implementation of the present disclosure, managing a storage system based on an updated address mapping includes: determining data distribution of multiple data objects in a first group of active shards; and merging successive active shards in a group of active shards based on the data distribution.
[0082] According to an exemplary implementation of the present disclosure, managing a storage system based on an updated address mapping includes: receiving a second write request to write a second data object to the storage system; updating the address mapping to map the second data object to a second bucket in a group of buckets; and instructing the storage system to store the second data object to a second storage device in a group of storage devices, the second storage device being associated with a second active shard where the second bucket is located.
[0083] According to an exemplary implementation of the present disclosure, managing a storage system based on an updated address mapping includes: determining a first generation identifier and a first shard identifier of a first active shard associated with a first data object based on a first group of active shards; and adding a first association relationship between the first data object and the first active shard to the address mapping, the first active shard being represented by the first generation identifier and the first shard identifier.
[0084] According to an exemplary implementation of the present disclosure, managing a storage system based on an updated address mapping includes: receiving a read request to read a target data object from the storage system; determining a target shard associated with the target data object based on an association relationship included in the address mapping; and reading the target data object from the storage system based on the target shard.
[0085] According to an exemplary implementation of the present disclosure, a computer program product is provided, which is tangibly stored on a non-transitory computer-readable medium and includes machine-executable instructions for executing a method according to the present disclosure.
[0086] According to an exemplary implementation of the present disclosure, a computer-readable medium is provided. The computer-readable medium stores machine-executable instructions, and when the machine-executable instructions are executed by at least one processor, the at least one processor implements the method according to the present disclosure.
[0087] The present disclosure may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.
[0088] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0089] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0090] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some implementations, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0091] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0092] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0093] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0094] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
[0095] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the marketplace, or to enable other persons of ordinary skill in the art to understand the implementations disclosed herein.
Claims
1. A method for managing address mapping of a storage system, wherein a group of data objects in the storage system is mapped to a group of buckets in the address mapping, the group of buckets is divided into a first group of active shards, and the first group of active shards are respectively associated with a group of storage devices in the storage system, the method comprising: receiving a first write request to write a first data object to the storage system; Adjusting the number of shards of active shards in the first set of active shards based on an access load of the storage system and a load threshold condition of the storage system, wherein the load threshold condition includes an upper threshold, and adjusting the number of shards of active shards in the first set of active shards includes: increasing the number of shards based on determining that the access load of the storage system is higher than the upper threshold; updating the address mapping to map the first data object to a first bucket in the set of buckets, generating an updated address mapping; instructing the storage system to store the first data object in a first storage device in the set of storage devices, the first storage device being associated with a first active shard where the first bucket is located; and The storage system is managed based on the updated address map.
2. The method of claim 1 , wherein managing the storage system based on the updated address mapping comprises: According to determining that the state of the storage system satisfies a predetermined regeneration condition, Identify the first group of active shards as a first group of inactive shards; as well as The set of buckets is divided into a second set of active shards.
3. The method of claim 2, wherein the predetermined regeneration condition comprises a threshold number of data objects associated with a shard, and the method further comprises: For a given active shard in the first set of active shards, determining an object quantity of data objects associated with the given active shard; as well as Based on determining that the number of objects is greater than the threshold number, the set of buckets is divided into a second set of active shards.
4. The method of claim 1 , wherein the load threshold condition comprises a lower threshold, and wherein adjusting the number of active shards in the first set of active shards comprises: According to determining that the access load of the storage system is lower than the lower threshold, the number of shards is reduced.
5. The method of claim 1 , wherein managing the storage system based on the updated address mapping comprises: determining a data distribution of a plurality of data objects in the first set of active shards; as well as Based on the data distribution, consecutive active shards in the set of active shards are merged.
6. The method of claim 2, wherein managing the storage system based on the updated address mapping comprises: receiving a second write request to write a second data object to the storage system; updating the address map to map the second data object to a second bucket in the set of buckets; The storage system is instructed to store the second data object in a second storage device in the set of storage devices, the second storage device being associated with a second active shard where the second bucket is located.
7. The method of claim 1 , wherein managing the storage system based on the updated address mapping comprises: determining, based on the first set of active shards, a first generation identifier and a first shard identifier of a first active shard associated with the first data object; as well as A first association relationship between the first data object and the first active shard is added to the address map, the first active shard being represented by the first generation identifier and the first shard identifier.
8. The method of claim 7, wherein managing the storage system based on the updated address mapping comprises: receiving a read request to read a target data object from the storage system; Determining a target slice associated with the target data object based on the association relationship included in the address mapping; as well as Based on the target shard, the target data object is read from the storage system.
9. A device for managing address mapping of a storage system, wherein a group of data objects in the storage system is mapped to a group of buckets in the address mapping, the group of buckets is divided into a first group of active shards, the first group of active shards are respectively associated with a group of storage devices in the storage system, the device comprising: at least one processor; Volatile memory; as well as a memory coupled to the at least one processor, the memory having instructions stored therein, the instructions, when executed by the at least one processor, causing the device to perform actions, the actions comprising: receiving a first write request to write a first data object to the storage system; Adjusting the number of shards of active shards in the first set of active shards based on an access load of the storage system and a load threshold condition of the storage system, wherein the load threshold condition includes an upper threshold, and adjusting the number of shards of active shards in the first set of active shards includes: increasing the number of shards based on determining that the access load of the storage system is higher than the upper threshold; updating the address mapping to map the first data object to a first bucket in the set of buckets, generating an updated address mapping; instructing the storage system to store the first data object in a first storage device in the set of storage devices, the first storage device being associated with a first active shard where the first bucket is located; and The storage system is managed based on the updated address map.
10. The apparatus of claim 9, wherein managing the storage system based on the updated address mapping comprises: According to determining that the state of the storage system satisfies a predetermined regeneration condition, Identify the first group of active shards as a first group of inactive shards; as well as The set of buckets is divided into a second set of active shards.
11. The apparatus of claim 10, wherein the predetermined regeneration condition comprises a threshold number of data objects associated with a shard, and the actions further comprise: For a given active shard in the first set of active shards, determining an object quantity of data objects associated with the given active shard; as well as Based on determining that the number of objects is greater than the threshold number, the set of buckets is divided into a second set of active shards.
12. The apparatus of claim 9, wherein the load threshold condition comprises a lower threshold, and wherein adjusting the number of active shards in the first set of active shards comprises: According to determining that the access load of the storage system is lower than the lower threshold, the number of shards is reduced.
13. The apparatus of claim 9, wherein managing the storage system based on the updated address mapping comprises: determining a data distribution of a plurality of data objects in the first set of active shards; as well as Based on the data distribution, consecutive active shards in the set of active shards are merged.
14. The apparatus of claim 10, wherein managing the storage system based on the updated address mapping comprises: receiving a second write request to write a second data object to the storage system; updating the address map to map the second data object to a second bucket in the set of buckets; The storage system is instructed to store the second data object in a second storage device in the set of storage devices, the second storage device being associated with a second active shard where the second bucket is located.
15. The apparatus of claim 9, wherein managing the storage system based on the updated address mapping comprises: determining, based on the first set of active shards, a first generation identifier and a first shard identifier of a first active shard associated with the first data object; as well as A first association relationship between the first data object and the first active shard is added to the address map, the first active shard being represented by the first generation identifier and the first shard identifier.
16. A computer program product tangibly stored on a non-transitory computer readable medium and comprising machine executable instructions for performing the method according to any one of claims 1-8.
Citation Information
Patent Citations
Data storage method and storage device
CN101656094A
Adaptive sub-patches system, apparatus and method
CN108734638A
distributed parallel database based on analysis class scenes and a storage method
CN109918450A
Data compression method for supporting virtual memory management in a demand paging system
US20070157001A1
Replication of virtualized infrastructure within distributed computing environments
US20160048408A1
