Data storage optimization method, device, equipment and medium based on tile overlap
By selecting the tile block group with the least effective data in the hanging space of the tile magnetic recording disk for resetting and restoring, and using column rewriting strategy, the system blocking problem when the suspension space is full, and the performance recovery time is reduced effect.
Patent Information
- Application Number
- CN202311439636.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-31
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2043-10-31
AI Technical Summary
The reset back-storage process of the stacked tile magnetic recording disk when the suspension space is fully loaded causes read and write requests to hang, which easily causes system blockage and cannot effectively reduce the performance recovery time.
By determining whether there are available tile groups in the hanging space, if not, select the tile group with the least valid data for resetting and storage, and adopt a column overwriting strategy to limit the rewritten area to one column to reduce redundant operations .
Reduces the reset-restore scale when the suspension space is fully loaded, reduces the overhead of reset-restore, and thus reduces the performance recovery time and improves the user experience.
Smart Images

Figure CN117591011B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of tile data processing, and in particular to a data storage optimization method, device, equipment and medium based on tile overlap. Background Art
[0002] With the rapid development of technologies such as cloud computing, the world has entered an era of high growth in computing power. At the same time, there is a demand for lower-cost and higher-density storage for computers. Shingled magnetic recording disks have achieved increased storage density by overlapping tracks within each disk platter, making them an effective solution to the growing storage demand by replacing traditional magnetic recording disks. The current mainstream shingled magnetic recording disks use a small portion of the shingled magnetic recording disk space to build the suspension space on the disk. Writes to the shingled magnetic recording disk are specified in the suspension space, and then the suspension space resources are reused by repeatedly calling the reset and storage process of the entire suspension space scale. However, many read and write requests will be suspended during this process, which will eventually cause system blockage.
[0003] Therefore, there is an urgent need for a data storage optimization method based on tile overlap, which can reduce the reset storage scale when the suspension space is fully loaded, reduce the reset storage overhead, and thus achieve the effect of reducing its performance recovery time, and ultimately improve the user experience. Summary of the invention
[0004] In view of this, the present invention provides a data storage optimization method, device, equipment and medium based on tile overlap to solve the problem in the related art that the suspension space resources are reused due to repeated calls to the reset storage process of the entire suspension space scale, but many read and write requests will be in a suspended state during this process, which may easily cause system blocking.
[0005] In a first aspect, the present invention provides a data storage optimization method based on tile overlap, comprising:
[0006] Determine whether there is an available tile group in the suspension space of the shingled magnetic recording disk; the available tile group is a tile group that can be used for data writing; the suspension space includes multiple tile groups, each tile group includes multiple tiles;
[0007] If the available tile group does not exist in the hanging space, a first tile group is selected from the hanging space; the first tile group is a tile group with the least valid data;
[0008] The first tile group is reset and stored back to the magnetic recording data area of the shingled magnetic recording disk.
[0009] The data storage optimization method based on tile overlap provided by the present invention selects the first tile group from the suspension space when there is no available tile group in the suspension space; the first tile group is the tile group with the least valid data; and the first tile group is reset and stored to the magnetic recording data area of the shingled magnetic recording disk. It can reduce the reset and storage scale when the suspension space is fully loaded, so that the reset and storage overhead is reduced, thereby achieving the effect of reducing its performance recovery time, and finally improving the user experience.
[0010] In an optional embodiment, the method further includes:
[0011] When there are multiple first tile groups, a first tile group with the most connected valid data among the multiple first tile groups is used as the second tile group;
[0012] The second tile group is reset and stored back to the magnetic recording data area of the shingled magnetic recording disk.
[0013] In an optional implementation, when there are multiple first tile groups, taking a first tile group having the most connected valid data among the multiple first tile groups as the second tile group includes:
[0014] Determine a reset recovery factor for each first tile group through a hanging space state diagram; the hanging space state diagram is used to indicate the validity of tile data, and the reset recovery factor is a factor for comparing the number of valid data between tile groups;
[0015] A first tile group having a largest reset and restore factor among the plurality of first tile groups is used as a second tile group.
[0016] In an optional implementation, determining the reset recovery factor of each first tile group through the suspension space state diagram includes:
[0017]
[0018] Where α represents the reset factor of the first tile group, n represents the number of invalid connected tiles in the first tile group, and θ i represents the invalid value of each invalid connected tile, i represents the sequence number of the invalid connected tile, kn represents the number of other tiles in the first tile group except the invalid connected tiles, inv j represents the invalid value of each other tile, and j represents the number of other tiles.
[0019] The data storage optimization method based on tile overlap provided by the present invention determines the reset storage factor of each first tile group through the suspension space state diagram, takes the first tile group with the largest reset storage factor among multiple first tile groups as the second tile group, and resets and stores it to the magnetic recording data area of the shingled magnetic recording disk. It can accurately find multiple adjacent tiles with the least valid data and reset and store them, and can make maximum use of the suspension space. Ultimately, it can postpone the triggering of the reset storage process as much as possible and shorten the time required for reset storage.
[0020] In an optional implementation, resetting the first tile group back to the magnetic recording data area of the shingled magnetic recording disk includes:
[0021] Determine whether a first target column exists in all columns of the magnetic recording data area; wherein each column includes a plurality of available tiles; and the number of available tiles of the first target column is greater than the number of available tiles of the first tile group;
[0022] When the first target column does not exist in all the columns, multiple columns with the largest number of available tiles are selected from all the columns as second target columns;
[0023] The first tile group is reset and stored back into a second target column of the magnetic recording data area.
[0024] In an optional embodiment, the method further includes:
[0025] When there are multiple first target columns in all the columns, determining a column tile value of each first target column;
[0026] Using the first target column with the highest column tile value among the plurality of first target columns as the third target column;
[0027] The first tile group is reset and stored back into the third target column of the magnetically recorded data area.
[0028] In an optional implementation, determining the column tile value of each first target column includes:
[0029]
[0030] Wherein, β represents the column tile value of each first target column, σ represents the number of available tiles for each of all columns, and ω represents the number of available tiles for the first tile group.
[0031] The data storage optimization method based on tile overlap provided by the present invention can limit the affected area in the data area of the magnetic recording disk to one column through a rewrite strategy (i.e., column rewrite strategy) of selecting a suitable unit as the rewrite unit of the data area of the magnetic recording disk, thereby avoiding a large number of redundant operations, thereby reducing the overhead during reset and storage, and significantly reducing the performance recovery time.
[0032] In a second aspect, the present invention provides a data storage optimization device based on tile overlap, comprising:
[0033] An available tile group determination module is used to determine whether there is an available tile group in the suspension space of the shingled magnetic recording disk; the available tile group is a tile group that can be used for data writing; the suspension space includes multiple tile groups, each tile group includes multiple tiles, and the tile is the smallest read and write unit of the shingled magnetic recording disk;
[0034] A first tile group selection module, configured to select a first tile group from the hanging space if the available tile group does not exist in the hanging space; the first tile group is a tile group with the least valid data;
[0035] The resetting and restoring module is used for resetting and restoring the first tile group to the magnetic recording data area of the shingled magnetic recording disk.
[0036] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the data storage optimization method based on tile overlap according to the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0037] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the data storage optimization method based on tile overlap according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 It is a flowchart of a data storage optimization method based on tile overlap according to an embodiment of the present invention;
[0040] Figure 2is a flow chart of another data storage optimization method based on tile overlap according to an embodiment of the present invention;
[0041] Figure 3 is a flow chart of another data storage optimization method based on tile overlap according to an embodiment of the present invention;
[0042] Figure 4 is a flow chart of another data storage optimization method based on tile overlap according to an embodiment of the present invention;
[0043] Figure 5 is a flow chart of another data storage optimization method based on tile overlap according to an embodiment of the present invention;
[0044] Figure 6 is a flow chart of another data storage optimization method based on tile overlap according to an embodiment of the present invention;
[0045] Figure 7 is a structural block diagram of a data storage optimization device based on tile overlap according to an embodiment of the present invention;
[0046] Figure 8 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0048] With the rapid development of technologies such as cloud computing, the world has entered an era of high growth in computing power. At the same time, there is a demand for lower-cost and higher-density storage for computers. Shingled magnetic recording disks have achieved increased storage density by overlapping tracks within each disk platter, making them an effective solution to the growing storage demand by replacing traditional magnetic recording disks. The current mainstream shingled magnetic recording disks use a small portion of the shingled magnetic recording disk space to build the suspension space on the disk. Writes to the shingled magnetic recording disk are specified in the suspension space, and then the suspension space resources are reused by repeatedly calling the reset and storage process of the entire suspension space scale. However, many read and write requests will be suspended during this process, which will eventually cause system blockage.
[0049] Based on the above background, the present invention provides a data storage optimization method and system based on multi-tile overlapping reset. The system targets the write operation of the hanging space and the reset and storage operation of the data in the hanging space, and reduces the reset and storage scale when the hanging space is fully loaded by specifying the tile position and number of tiles for writing and resetting the storage of the hanging space, thereby reducing the reset and storage overhead, thereby achieving the effect of reducing its performance recovery time, and ultimately improving the user experience.
[0050] In order to reduce the disadvantage of shingled magnetic recording disks in space reset and storage compared with traditional magnetic recording disks, existing research mainly focuses on improving the operating performance of shingled magnetic recording disks, but the existing research has the following shortcomings:
[0051] 1. No method is proposed to reduce the overhead of resetting and restoring storage, that is, the performance recovery time is not reduced. The system blocking still brings a lot of delay time, which makes the writing of shingled magnetic recording disk unable to obtain the optimal performance.
[0052] 2. Failure to select an appropriate reset and restore unit, that is, the reset and restore process of the hanging space is not broken down and refined. When the hanging space is full, the entire hanging space is still reset and restored, resulting in system blockage and serious impact on user experience.
[0053] 3. No strategy is selected to replace the whole area rewrite strategy with a strategy that can reduce system congestion, that is, the entire magnetic recording disk area is still rewritten when the data in the suspended space is stored back to the magnetic recording data area.
[0054] According to an embodiment of the present invention, an embodiment of a data storage back optimization method based on tile overlap is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0055] In this embodiment, a data storage optimization method based on tile overlap is provided. Figure 1 is a flow chart of a data storage optimization method based on tile overlap according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0056] Step S101, determining whether there is an available tile group in the suspension space of the shingled magnetic recording disk.
[0057] Specifically, Shingled Magnetic Recording (SMR) is a high-capacity magnetic disk that uses a new type of magnetic storage technology. SMR disks partially overlap the data tracks on the disk, just like tiles on a roof. This technology is called shingled magnetic recording technology.
[0058] The available tile group is the tile group that can be used for data writing. The hanging space can be understood as a part of the shingled magnetic recording disk space; the hanging space contains multiple tile groups, and each tile group contains multiple tiles. A tile is the smallest read and write unit of the shingled magnetic recording disk. The hanging space is used as a circular buffer queue to cache all the data to be written. As long as the hanging space is not full, the data will continue to be written to the hanging space.
[0059] Due to the characteristics of shingled magnetic recording disks, the ratio x between the read head and the write head indicates that when writing a tile, the other x-1 tiles will be affected. Therefore, the x adjacent tiles along the shingling direction of the disk can be defined as a tile group. When this tile group is filled with invalid data, the first tile of these x tiles is the writable area. In addition, the last tile of all the columns along the shingling direction in the suspension space is also a writable area. This tile is a tile group, and this type of tile is called a protection tile.
[0060] In some optional embodiments, the method further comprises:
[0061] A hanging space state graph is pre-constructed, wherein the hanging space state graph uses 1 bit to record the validity and invalidity of each data position as digital information, and the digital information is called invalid bit inv, 1 represents invalidity, and 0 represents validity. This graph ensures the feasibility of finding multiple consecutive tiles covered by invalid data in the tile group write strategy.
[0062] In some optional implementations, the corresponding tile group may be selected for data writing in the following manner:
[0063] When there are multiple tile groups that overlap each other in the same column along the shingling direction, writing from top to bottom along the shingling direction always makes better use of space than randomly selecting a tile group for writing. Here, the row number of the first tile in the tile group can be recorded as tileRow, and the tileRow of the topmost tile along the shingling direction is set to 0. All writable tile groups are compared based on the size of the tileRow value, and the tile group with a smaller tileRow value is always preferred for data writing. This is also true for protection tiles, because making protection tiles always write last will make better use of space.
[0064] Step S102: If the available tile group does not exist in the hanging space, a first tile group is selected from the hanging space; the first tile group is a tile group with the least valid data.
[0065] Specifically, when the suspension space is full, that is, when no available multiple adjacent tiles can be found, the tile group reset back storage method data cleaning process must be started.
[0066] More specifically, in the tile group reset and storage strategy, unlike other existing technologies that write back all valid data in the suspended space, the tile group reset and storage strategy in the present invention only selects to write back the valid data in a single tile group, so as to decompose the reset and storage scale. The selection of a single tile group depends on the amount of valid data in the tile group. Since selecting the tile group with the least valid data can make a larger number of available continuous tiles appear as much as possible, it is necessary to select the tile group with the least valid data tiles for reset and storage.
[0067] Step S103, resetting the first tile group back to the magnetic recording data area of the shingled magnetic recording disk.
[0068] Specifically, after the first tile group is selected for reset and storage, the tile group needs to be written back to the data area of the magnetic recording disk. Different from the traditional shingled magnetic recording disk technology that rewrites the entire magnetic recording disk data area, the present invention selects a column rewrite strategy, that is, the rewritten area is limited to a column along the shingling direction, thereby reducing redundant rewrite operations and greatly reducing the reset and storage overhead.
[0069] The technical effects of the present invention are as follows:
[0070] 1. The present invention adopts a tile group writing strategy based on multiple adjacent tiles, where a tile is the minimum read and write unit of a shingled magnetic recording disk. This strategy specifies how to select multiple adjacent tiles as a group for writing. Under this strategy, whether to reset and restore the suspended space depends on whether there are still writable tile groups in the suspended space, making full use of the space of the suspended space, thereby delaying the triggering of the reset and restore process as much as possible.
[0071] 2. The present invention adopts a strategy for resetting and restoring the suspended space of a tile group based on multiple adjacent tiles. Under this strategy, it is specified how to find multiple adjacent tiles with the least valid data and perform reset and restoring. This strategy makes it more likely that more available tile groups will appear, thereby making the best use of the suspended space, and ultimately delaying the triggering of the reset and restoring process as much as possible and shortening the time required for reset and restoring.
[0072] 3. The present invention adopts a strategy of selecting a suitable unit to rewrite the data area of the magnetic recording disk, which is called a column rewriting strategy. Under this strategy, it is specified how to find a suitable column as the rewriting unit of the magnetic recording disk data area. This strategy maximizes the use of the space of the selected column, while also minimizing the movement of the magnetic head, and ultimately reducing the time cost.
[0073] In this embodiment, a data storage optimization method based on tile overlap is provided. Figure 2 is a flow chart of a data storage optimization method based on tile overlap according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0074] Step S201, determining whether there is an available tile group in the suspension space of the shingled magnetic recording disk; the available tile group is a tile group that can be used for data writing; the suspension space includes multiple tile groups, each tile group includes multiple tiles.
[0075] For details, please see Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0076] Step S202: If the available tile group does not exist in the hanging space, a first tile group is selected from the hanging space; the first tile group is a tile group with the least valid data.
[0077] For details, please see Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0078] Step S203: when there are multiple first tile groups, use the first tile group with the most connected valid data among the multiple first tile groups as the second tile group.
[0079] Specifically, the present invention takes into account that the movement of the magnetic head is very time-consuming, and when the valid data areas are connected together, the head movement overhead will be relatively small. Therefore, when there are two first tile groups with the least valid data, the first tile group with more connected valid data areas can be selected, that is, the one with less head movement overhead.
[0080] like Figure 3 As shown, the above step S203 also includes steps S2031 to S2032:
[0081] Step S2031, determining a reset recall factor of each first tile group through a hanging space state diagram; the hanging space state diagram is used to indicate the validity of tile data, and the reset recall factor is a factor for comparing the amount of valid data between tile groups.
[0082] Specifically, the invalid bit corresponding to each first tile group can be found according to the suspension space state diagram, and then the invalid value θ of the connected tile can be determined according to the invalid bit; then the reset recovery factor α of the first tile group can be determined according to its invalid value; the reset recovery factor of each first tile group can be determined according to the following formula:
[0083]
[0084] Where α represents the reset factor of the first tile group, n represents the number of invalid connected tiles in the first tile group, and θ i represents the invalid value of each invalid connected tile, i represents the sequence number of the invalid connected tile, kn represents the number of other tiles in the first tile group except the invalid connected tiles, inv j represents the invalid value of each other tile, and j represents the number of other tiles; where, It means the sum of invalid bits inv of other tiles except the invalid connected tiles;
[0085] The above θ i It can be understood as the invalid value of the i-th invalid connected tile, which can be determined by the following formula:
[0086] θ i =2 m -1
[0087] Where m represents the number of connected tiles.
[0088] Specifically, the invalid bits corresponding to each first tile group are found according to the hanging space state diagram. Because when the amount of invalid data is constant, the more invalid data are connected, the more valid data are connected. Therefore, according to the invalid bits, the invalid value θ of the connected tiles is introduced. Assuming that there are n invalid connected tiles, their respective invalid values of connected tiles are θ i , where i∈[1,n]. Assume that for the i-th connected tile, the number of connected tiles is m, then θ i =2 m -1; in, It represents the sum of invalid bits inv of other tiles except the invalid connected tiles. After calculating α, the tile group with larger α is selected for reset and storage.
[0089] Step S2032: Use the first tile group with the largest reset recovery factor among the plurality of first tile groups as the second tile group.
[0090] Specifically, after calculating the reset recovery factor of each first tile group, the size relationship of the reset recovery factors can be compared, that is, the first tile group with the largest reset recovery factor can be used as the second tile group. For example, including the first tile group 1-α1, the first tile group 2-α2, and the first tile group 3-α3, when the size relationship is α2>α3>α1, then the first tile group 1 can be used as the second tile group.
[0091] Step S204, resetting the second tile group back to the magnetic recording data area of the shingled magnetic recording disk.
[0092] For details, please see Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0093] In some optional embodiments, such as Figure 4 As shown, the above step S103 also includes:
[0094] Step S1031, determining whether there is a first target column in all columns of the magnetic recording data area; wherein each column includes a plurality of available tiles; and the number of available tiles of the first target column is greater than the number of available tiles of the first tile group.
[0095] Step S1032: when there is no first target column among all the columns, multiple columns with the largest number of available tiles are selected from all the columns as second target columns.
[0096] Step S1033: resetting and storing the first tile group back into the second target column of the magnetic recording data area.
[0097] In the above steps S1031 to S1033, after the tile group is selected for reset and storage, the tile group needs to be written back to the data area of the magnetic recording disk. Different from the traditional shingled magnetic recording disk technology that rewrites the entire magnetic recording disk data area, we choose a column rewrite strategy to limit the rewritten area to a column along the shingling direction, thereby reducing redundant rewrite operations and greatly reducing the reset and storage overhead.
[0098] In order to select a suitable column from all the columns in the magnetic recording data area for reset and storage, it is necessary to first determine the number of available tiles σ of each column in the magnetic recording data area, and then determine the number of available tiles ω of the first tile group that needs to be reset and stored; then determine the size relationship between the two, and select the second target column for rewriting based on the size relationship, that is: when the number of available tiles σ of all columns is less than the number of available tiles ω of the first tile group, that is, σ<ω, several columns with the largest number of available tiles σ can be selected for writing; when the number of available tiles σ of a certain column is greater than the number of available tiles ω of the first tile group, that is, σ>ω, the column can be selected as the second target column for writing the first tile group.
[0099] In some optional embodiments, such as Figure 5 As shown, the method also includes:
[0100] Step S501 : when there are multiple first target columns in all the columns, determine the column tile value of each first target column.
[0101] Specifically, the column tile value of each first target column can be determined by the following formula:
[0102]
[0103] Wherein, β represents the column tile value of each first target column, σ represents the number of available tiles for each of all columns, and ω represents the number of available tiles for the first tile group.
[0104] Step S502: taking the first target column with the highest column tile value among the plurality of first target columns as the third target column.
[0105] Step S503: resetting and storing the first tile group back into the third target column of the magnetic recording data area.
[0106] In the above steps S501 to S503, since the tile group reset and storage strategy selects the tile group with the least amount of valid data for reset and storage, this means that the tile group reset and stored in the future will contain a larger ω. If the space remaining after the selected column is written is less than the amount of data written this time ω, but greater than ω / 2, we believe that selecting this column will be detrimental to the subsequent use of space. We believe that selecting a column with less than ω / 2 remaining available tiles after writing is less than selecting a column with more than ω remaining available tiles after writing. Therefore, the present invention uses the column tile value β to select the column:
[0107] where σ-ω≥0,
[0108] β is calculated for all the columns that have passed the initial screening, and the columns with higher β values are selected as the selected columns. The disk is organized when the system is idle, and the overall rewriting and organization of the magnetic recording disk data area is performed, thereby effectively reducing the delay.
[0109] In some optional embodiments, such as Figure 6 As shown, resetting the first tile group back to the magnetic recording data area of the shingled magnetic recording disk includes:
[0110] First, the α values corresponding to all possible tile groups in the suspension space state diagram are calculated according to the calculation formula of the priority reset storage factor α;
[0111] Secondly, the tile group with the largest priority reset and storage factor α is selected for reset and storage. If all bits in the hanging space state graph are 0, that is, the priority reset and storage factors α of all possible tile groups are 0, the protection tile is selected for reset and storage first;
[0112] Finally, a column rewrite strategy is used to write the reset and restored tile group into the data area of the magnetic recording disk.
[0113] The technical effects of the present invention are as follows:
[0114] 1. Aiming at the large amount of performance recovery time and the delay caused by the writing of shingled magnetic recording disks, the present invention designs a read-write reset and storage strategy based on multiple adjacent tiles according to the inherent mechanical characteristics of the inconsistent track width of the read-write head of the shingled magnetic recording disk. This strategy decomposes the reset and storage process at the suspension space level into a more fine-grained tile group reset and storage process, significantly delaying the triggering of the reset and storage process, thereby significantly reducing the performance recovery time.
[0115] 2. The present invention optimizes the redundant operations when rewriting the data area of the magnetic recording disk in the shingled magnetic recording disk, and designs a rewriting strategy for selecting a suitable unit as the rewriting unit of the data area of the magnetic recording disk, which is called a column rewriting strategy. This strategy limits the affected area in the data area of the magnetic recording disk to one column. This invention avoids a large number of redundant operations, thereby reducing the overhead when resetting and restoring, and significantly reducing the performance recovery time.
[0116] 3. The present invention is invented by utilizing the inherent mechanical characteristics of shingled magnetic recording disks. Since drive-managed shingled magnetic recording disks occupy a dominant position in the current market, the present invention can be mainly applied to drive-managed shingled magnetic recording disks. The present invention aims at the performance recovery time caused by the space reset and storage of shingled magnetic recording disks, and decomposes the overall reset and storage process into a number of finer-grained tile group reset and storage processes, thereby reducing performance delays and improving the user experience of shingled magnetic recording disks.
[0117] In this embodiment, a data storage optimization device based on tile overlap is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0118] This embodiment provides a data storage optimization device based on tile overlap, such as Figure 7 As shown, including:
[0119] An available tile group determination module is used to determine whether there is an available tile group in the suspension space of the shingled magnetic recording disk; the available tile group is a tile group that can be used for data writing; the suspension space includes multiple tile groups, each tile group includes multiple tiles, and the tile is the smallest read and write unit of the shingled magnetic recording disk;
[0120] A first tile group selection module, configured to select a first tile group from the hanging space if the available tile group does not exist in the hanging space; the first tile group is a tile group with the least valid data;
[0121] The resetting and restoring module is used for resetting and restoring the first tile group to the magnetic recording data area of the shingled magnetic recording disk.
[0122] In some optional embodiments, the device further comprises:
[0123] A second tile group determination module, configured to, when there are multiple first tile groups, use a first tile group with the most connected valid data among the multiple first tile groups as a second tile group;
[0124] The second tile group resetting and storage module is used to resetting and storage the second tile group to the magnetic recording data area of the shingled magnetic recording disk.
[0125] In some optional implementations, the second tile group determination module includes:
[0126] a reset recovery factor determination unit, used to determine a reset recovery factor of each first tile group through a hanging space state diagram; the hanging space state diagram is used to indicate the validity of tile data, and the reset recovery factor is a factor for comparing the number of valid data between tile groups;
[0127] The second tile group determining unit is configured to select a first tile group having a largest reset recovery factor among the plurality of first tile groups as a second tile group.
[0128] In some optional implementations, the reset recovery factor determination unit determines the reset recovery factor of each first tile group by the following formula, including:
[0129]
[0130] Where α represents the reset factor of the first tile group, n represents the number of invalid connected tiles in the first tile group, and θ i represents the invalid value of each invalid connected tile, i represents the sequence number of the invalid connected tile, kn represents the number of other tiles in the first tile group except the invalid connected tiles, inv j represents the invalid value of each other tile, and j represents the number of other tiles.
[0131] In some optional implementations, resetting the storage module includes:
[0132] A first target column determination unit is used to determine whether a first target column exists in all columns of the magnetic recording data area; wherein each column includes a plurality of available tiles; and the number of available tiles of the first target column is greater than the number of available tiles of the first tile group;
[0133] A second target column selection unit, configured to select a plurality of columns with the largest number of available tiles from all the columns as second target columns when the first target column does not exist in all the columns;
[0134] The first resetting and restoring unit is used for resetting and restoring the first tile group to a second target column of the magnetic recording data area.
[0135] In some optional embodiments, the device further comprises:
[0136] a column tile value determining unit, configured to determine a column tile value of each first target column when there are multiple first target columns in all the columns;
[0137] A third target column determining unit, configured to use a first target column with the highest column tile value among the plurality of first target columns as a third target column;
[0138] The second resetting and restoring unit is used for resetting and restoring the first tile group to the third target column of the magnetic recording data area.
[0139] In some optional implementations, the column tile value determining unit determines the column tile value of each first target column by using the following formula, including:
[0140]
[0141] Wherein, β represents the column tile value of each first target column, σ represents the number of available tiles for each of all columns, and ω represents the number of available tiles for the first tile group.
[0142] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0143] The data storage optimization device based on tile overlap in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0144] The embodiment of the present invention also provides a computer device having the above Figure 7 The data storage optimization device based on tile overlap is shown.
[0145] See also Figure 8 , Figure 8 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 8 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 10 is taken as an example.
[0146] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0147] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0148] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0149] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0150] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0151] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0152] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A data storage optimization method based on tile overlap, characterized in that: include: Determining whether there is an available tile group in the suspension space of the shingled magnetic recording disk; the available tile group is a tile group that can be used for data writing; The hanging space includes a plurality of tile groups, each tile group includes a plurality of tiles; If the available tile group does not exist in the hanging space, a first tile group is selected from the hanging space; the first tile group is a tile group with the least valid data; the absence of the available tile group in the hanging space indicates that the hanging space is full; resetting the first tile group back to the magnetic recording data area of the shingled magnetic recording disk; Resetting the first tile group back to the magnetic recording data area of the shingled magnetic recording disk comprises: Determine whether a first target column exists in all columns of the magnetic recording data area; wherein each column includes a plurality of available tiles; and the number of available tiles of the first target column is greater than the number of available tiles of the first tile group; When the first target column does not exist in all the columns, multiple columns with the largest number of available tiles are selected from all the columns as second target columns; resetting the first tile group back to a second target column of the magnetic recording data area; The method further comprises: When there are multiple first target columns in all the columns, determining a column tile value of each first target column; Using the first target column with the highest column tile value among the plurality of first target columns as the third target column; The first tile group is reset and stored back into the third target column of the magnetically recorded data area.
2. The method according to claim 1, characterized in that The method further comprises: When there are multiple first tile groups, a first tile group with the most connected valid data among the multiple first tile groups is used as the second tile group; The second tile group is reset and stored back to the magnetic recording data area of the shingled magnetic recording disk.
3. The method according to claim 2, characterized in that When there are multiple first tile groups, a first tile group with the most connected valid data among the multiple first tile groups is used as a second tile group, including: Determine a reset recovery factor for each first tile group through a hanging space state diagram; the hanging space state diagram is used to indicate the validity of tile data, and the reset recovery factor is a factor for comparing the number of valid data between tile groups; A first tile group having a largest reset and restore factor among the plurality of first tile groups is used as a second tile group.
4. The method according to claim 3, characterized in that The reset recovery factor of each first tile group is determined by the hanging space state diagram, including: Where α represents the reset factor of the first tile group, n represents the number of invalid connected tiles in the first tile group, and θ i represents the invalid value of each invalid connected tile, i represents the sequence number of the invalid connected tile, kn represents the number of other tiles in the first tile group except the invalid connected tiles, inv j represents the invalid value of each other tile, and j represents the number of other tiles.
5. The method according to claim 1, characterized in that Determine a column tile value for each first target column, including: Wherein, β represents the column tile value of each first target column, σ represents the number of available tiles for each of all columns, and ω represents the number of available tiles for the first tile group.
6. A data storage optimization device based on tile overlap, characterized in that: The device comprises: An available tile group determination module is used to determine whether there is an available tile group in the suspension space of the shingled magnetic recording disk; the available tile group is a tile group that can be used for data writing; the suspension space includes multiple tile groups, each tile group includes multiple tiles, and the tile is the smallest read and write unit of the shingled magnetic recording disk; A first tile group selection module is configured to select a first tile group from the hanging space if the available tile group does not exist in the hanging space; the first tile group is a tile group with the least valid data; the absence of the available tile group in the hanging space indicates that the hanging space is full; A resetting and storage module, used for resetting and storing the first tile group to a magnetic recording data area of the shingled magnetic recording disk; The reset and storage module comprises: A first target column determination unit is used to determine whether a first target column exists in all columns of the magnetic recording data area; wherein each column includes a plurality of available tiles; and the number of available tiles of the first target column is greater than the number of available tiles of the first tile group; A second target column selection unit, configured to select a plurality of columns with the largest number of available tiles from all the columns as second target columns when the first target column does not exist in all the columns; A first resetting and restoring unit, used for resetting and restoring the first tile group to a second target column of the magnetic recording data area; The device also includes: a column tile value determining unit, configured to determine a column tile value of each first target column when there are multiple first target columns in all the columns; A third target column determining unit, configured to use a first target column with the highest column tile value among the plurality of first target columns as a third target column; The second resetting and restoring unit is used for resetting and restoring the first tile group to the third target column of the magnetic recording data area.
7. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the data storage optimization method based on tile overlap according to any one of claims 1 to 5 by executing the computer instructions.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the data storage optimization method based on tile overlap according to any one of claims 1 to 5.
Citation Information
Patent Citations
Data storage device and stored data migration method
CN112214169A
Space recovery method, device and equipment
CN113687774A