CN114327297A - Data request processing method, equipment and system for interleaved recording disk - Google Patents

Data request processing method, equipment and system for interleaved recording disk Download PDF

Info

Publication number
CN114327297A
CN114327297A CN202111681185.3A CN202111681185A CN114327297A CN 114327297 A CN114327297 A CN 114327297A CN 202111681185 A CN202111681185 A CN 202111681185A CN 114327297 A CN114327297 A CN 114327297A
Authority
CN
China
Prior art keywords
data
cache
track
request
recording disk
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111681185.3A
Other languages
Chinese (zh)
Other versions
CN114327297B (en
Inventor
陈新宇
崔金华
曾志敏
杨天若
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huazhong University of Science and Technology
Original Assignee
Huazhong University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huazhong University of Science and Technology filed Critical Huazhong University of Science and Technology
Priority to CN202111681185.3A priority Critical patent/CN114327297B/en
Publication of CN114327297A publication Critical patent/CN114327297A/en
Application granted granted Critical
Publication of CN114327297B publication Critical patent/CN114327297B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The invention discloses a data request processing method, equipment and a system of an interleaved recording disk, belonging to the field of computer storage and comprising the following steps: allocating a part of space in the top track as a data cache for caching the data of the bottom track, and allocating a part of space in the memory as a lazy cache for caching the updating times of the data in the bottom track; when the received data request is a write request and an update operation is requested to the underlying track, the following steps are executed: judging whether the request hits the data cache, if so, directly updating the data in the data cache, and returning; if not, updating the data in the bottom layer magnetic track according to the request, and updating the updating times of the data in the inert cache; and if the updating times of the updated data exceed the caching threshold, caching the updated data into the data cache. The invention can reduce the data write amplification of the interleaved recording disk and improve the performance of the interleaved recording disk.

Description

Data request processing method, equipment and system for interleaved recording disk
Technical Field
The present invention relates to the field of computer storage, and more particularly, to a method, device, and system for processing data requests of interleaved recording disks.
Background
With the advent of the big data age, the industry needs larger capacity and lower cost data storage systems, but due to the effect of superparamagnetic effect, the storage density of the conventional magnetic recording technology has reached 1Tb/in2The limit of (c). In order to further increase the storage capacity of the Magnetic disk and reduce the cost, academia and storage manufacturers are actively exploring new technologies, such as Shingled Magnetic Recording (SMR) and Interleaved Magnetic Recording (IMR).
In the shingled magnetic recording technique, tracks partially overlap like roof tiles, which is essential to achieve high-density storage by shortening the track width and overlapping the tracks. However, this technique suffers from the problem that shingled disks destroy data on adjacent tracks when random writing is performed. Further, the adjacent track is partially overlapped with the previous track, and so on, all the previous tracks must be rewritten. This directly results in very poor random write performance and also greatly limits the range of practical applications.
The interleaved magnetic recording technology is a new storage technology, in the interleaved recording disk, the tracks can be divided into bottom tracks and top tracks, and the bottom tracks and the top tracks are interleaved, and there is a partial overlap between the adjacent tracks, as shown in fig. 1, T-0, T-1, T-2, T-3, T-4 respectively represent 5 tracks, where T-0, T-2 and T-4 are top tracks, and T-1 and T-3 are bottom tracks. When the storage space is allocated, the bottom track is preferentially allocated, and after the bottom track is allocated, the top track is reallocated. In order to avoid damaging the data in the top track, when updating the data in the bottom track, the data in the top track adjacent to the updated top track needs to be read out first, and after the data in the bottom track is updated, the data in the top track is written back to the top track, in this process, write amplification occurs. Because the bottom track only affects two adjacent top tracks in the random writing process, the interleaved recording disk has a better application prospect compared with a shingled disk.
However, how to effectively alleviate the problem of write amplification in the interleaved recording disk and improve the storage performance is still a technical problem to be solved urgently.
Disclosure of Invention
In view of the defects and improvement requirements of the prior art, the present invention provides a data request processing method, device and system for an interleaved recording disk, and aims to reduce the data write amplification of the interleaved recording disk and improve the performance of the interleaved recording disk.
To achieve the above object, according to an aspect of the present invention, there is provided a data request processing method for an interleaved recording disk, including:
distributing a part of disk space in the top track as a data cache for caching data in the bottom track, and distributing a part of memory space in the memory as a lazy cache for caching the updating times of the data in the bottom track;
when the received data request is a write request and an update operation is requested to the underlying track, the request is processed according to the following steps:
(S1) judging whether the request hits the data cache, if so, directly updating the data in the data cache, and returning; if not, the process proceeds to step (S2);
(S2) updating the data in the underlying track according to the request, and updating the number of updates of the data in the lazy cache;
(S3) if the number of updates of the updated data exceeds the preset caching threshold, caching the updated data in the data cache.
The top track in the interleaved recording disk can be updated on the spot, therefore, the update operation to the top track will not cause the problem of write amplification, and has better read-write access performance; and dividing part of space from the memory as an inertia cache to maintain the update times of the data in the bottom track, and caching the data with more frequent update, namely the data with larger update times, into the data cache by virtue of the inertia cache.
Further, the data request processing method of the interleaved recording disk provided by the invention further comprises: and resetting the updating times of each data in the inert cache every time a preset time window passes.
The method clears the updating times of each data in the inert cache every time a preset time window passes, so that the data with higher updating times in a single time window can be cached, on one hand, only the updating times in the single time window are maintained, the memory overhead required by the inert cache is smaller, and the searching efficiency is higher; on the other hand, since data access has time locality, determining the cached data in this way can further improve the hit rate of the data cache and reduce write amplification.
Further, when the data access amount to the interleaved recording disk reaches the preset number of file pages, it is determined that a time window is reached.
The time window is defined according to the data access amount, the time window is adaptive to the behavior characteristics of the user access data, and compared with the method that the length of the time window is directly specified in the time dimension, the hit rate of the data cache can be further improved, and the write amplification is reduced.
Further, the step (S3) of caching the updated data in a data cache includes:
if the cache space of the data cache is full, after the data needing to be removed in the data cache is determined by adopting a preset cache replacement algorithm, distributing the cache space of the removed data in the data cache to the updated data; if the cache space of the data cache is not full, distributing a free cache space for the updated data;
and caching the updated data to the allocated cache space.
When the cache space of the data cache is full, the data in the data cache is removed by utilizing the cache replacement algorithm, and then the data to be cached is cached in the data cache, so that the subsequent data with high updating possibility can be cached, the hit rate of the data cache is effectively improved, and the write amplification is reduced.
Further, the cache replacement algorithm is an LRU algorithm.
The LRU algorithm, namely the Least Recently Used (Least Recently Used) algorithm, can remove the data which is not accessed for the long time in the cache when the cache space is full, and the cache replacement algorithm is consistent with the characteristic that the data in the interleaved recording disk is accessed, so that the cache hit rate can be effectively improved.
Further, the data request processing method of the interleaved recording disk provided by the invention further comprises:
when the received data request is a write request and an update operation is requested to the top track, performing in-place update in the top track;
when the received data request is a write request and new data is requested to be written, judging whether the bottom layer magnetic track is completely distributed or not, and if the bottom layer magnetic track is not completely distributed, distributing storage space in the bottom layer magnetic track and writing the data; if the bottom track is completely distributed, distributing storage space in the top track and writing data;
when the received data request is a read request and a read operation is requested to be performed on a bottom track, firstly accessing a data cache, and if the data request is hit, directly reading the data from the data cache and returning the data; if not, reading data from the bottom track and returning;
when the received data request is a read request and a read operation is requested to the top track, the data is read from the top track and returned.
According to another aspect of the present invention, there is provided a data request processing apparatus of an interleaved recording disk, comprising:
a computer-readable storage medium for storing a computer program;
and a processor for reading the computer program stored in the computer readable storage medium and executing the data request processing method of the interleaved recording disk provided by the invention.
According to yet another aspect of the present invention, there is provided an interleaved recording disk system comprising interleaved recording disks and a data request processing apparatus for interleaved recording disks provided by the present invention.
Generally, by the above technical solution conceived by the present invention, the following beneficial effects can be obtained:
(1) the invention distributes partial space from the top magnetic track as the data buffer of the bottom magnetic track, and divides partial space from the memory as the inert buffer, and maintains the updating times of the data in the bottom magnetic track.
(2) The invention clears the updating times of each data in the inert cache every time a preset time window passes, so that the data with higher updating times in a single time window can be cached, thereby reducing the memory overhead, further improving the hit rate of the data cache and reducing the write amplification.
(3) The invention defines the time window according to the data access amount, is adaptive to the behavior characteristics of the user access data, can further improve the hit rate of the data cache and reduce the write amplification.
Drawings
FIG. 1 is a schematic diagram of a track distribution in a conventional interleaved recording disk;
fig. 2 is a schematic diagram of a data request processing method for interleaved disk recording according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
In the present application, the terms "first," "second," and the like (if any) in the description and the drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The invention provides a data request processing method, equipment and a system of an interleaved recording disk, aiming at the problem that the random writing of a bottom track of the interleaved recording disk can cause writing amplification and influence the performance of the disk, wherein the overall thought of the method is as follows: according to the characteristics of track organization and a data access mechanism in the interleaved recording disk, the inertia cache is maintained in the memory, the updating times of data in the bottom track are maintained, partial space is divided from the top track to serve as the cache of the data in the bottom track, and the bottom track data with higher updating frequency is found out by means of the inertia cache to be cached, so that the hit rate of the data in the data cache in the updating operation of the bottom track is effectively improved, the writing amplification is reduced, and the overall performance of the disk is improved.
The following are examples.
Example 1:
a data request processing method for an interleaved recording disk comprises the following steps:
distributing a part of disk space in the top track as a data cache for caching data in the bottom track, and distributing a part of memory space in the memory as a lazy cache for caching the updating times of the data in the bottom track;
because the top track in the interleaved recording disk can be updated on the spot, the update operation of the top track does not cause the problem of write amplification, and the interleaved recording disk has better read-write access performance, in the embodiment, partial space is allocated from the top track to be used as the data cache of the bottom track, and the data of the bottom track which is updated frequently is cached in the data cache by means of the data update times maintained by the inertia cache in the memory, so that the update of the data can be completed in the top track in a spot update mode, and the problem of data write amplification can be effectively relieved by only using the smaller space of the top track as the data cache; the size of the top track space which is specifically divided as the data cache can be determined according to the actual data access requirement, optionally, in the embodiment, two top tracks are selected as the data cache, and the setting of the data cache has almost no influence on the storage efficiency of the whole disk; in addition, since the lazy cache in memory only maintains the number of updates in the underlying tracks, the memory space required is also small.
Dividing data requests of the interleaved recording disk into write requests and read requests; the write request is further divided into an update request and a request for writing new data; the updating request is divided into an updating request for a bottom track and a request for a top updating track, the bottom track and the top track have specific numbers in the interleaved recording disk, and the corresponding track can be judged to be the bottom track or the top track according to the track number of the request operation;
as shown in fig. 2, in this embodiment, when the received data request is a write request and an update operation is requested to be performed on an underlying track, the request is processed according to the following steps:
(S1) judging whether the request hits the data cache, if so, directly updating the data in the data cache and returning; if the data is not hit, that is, the data to be updated is not in the data cache, the step (S2) is performed;
(S2) updating the data in the underlying track according to the request, and updating the number of updates of the data in the lazy cache;
(S3) if the number of updates of the updated data exceeds a preset caching threshold, caching the updated data in the data cache;
the cache threshold value can be set correspondingly according to the load access characteristics of the interleaved recording disk, so that more frequent data can be accurately identified; optionally, in this embodiment, the cache threshold is set to 3;
considering that the cache space may be full when the data is cached in the data cache, at this time, a cache replacement algorithm needs to be first adopted to remove part of the data to allocate the cache space for the updated data, so in the step (S3) of this embodiment, caching the updated data in the data cache includes:
if the cache space of the data cache is full, after the data needing to be removed in the data cache is determined by adopting a preset cache replacement algorithm, distributing the cache space of the removed data in the data cache to the updated data; if the cache space of the data cache is not full, distributing a free cache space for the updated data;
caching the updated data into the allocated cache space;
in practical application, when cache replacement occurs, any cache replacement algorithm can be Used, as an optional implementation manner, the cache replacement algorithm specifically Used in this embodiment is an LRU algorithm, and the LRU algorithm, that is, the Least Recently Used (Least Recently Used) algorithm, will remove data that has not been accessed for the longest time in the cache when the cache space is full, and the cache replacement algorithm conforms to the characteristic that data in the interleaved recording disk is accessed, so that the cache hit rate can be effectively improved; in a specific implementation, a linked list can be maintained according to the time sequence of data update in the data cache, and two ends of the linked list are an LRU end and an mru (executed unused) end respectively; when the cache is hit in the updating operation, the hit data block is updated to the MRU end of the linked list, and when cache replacement is needed, the data needing to be removed is selected from the LRU end;
it should be noted that the LRU algorithm is only an alternative embodiment of the present invention, and should not be construed as the only limitation of the present invention, and in some other embodiments of the present invention, other cache replacement algorithms such as LFU (Least frequently used) algorithm may be used.
In order to minimize the write amplification of the underlying track by fully utilizing the limited buffer space in consideration of the limited buffer space, the embodiment further includes:
resetting the updating times of each data in the inert cache after each preset time window;
in this embodiment, the data update times are cleared according to the time window, so that the data with higher update times in a single time window can be cached, on one hand, only the update times in the single time window are maintained, the memory overhead required by the lazy cache is smaller, and the search efficiency is higher; on the other hand, since the data access has time locality, the cached data is determined according to the method, the hit rate of the data cache can be further improved, and the write amplification is reduced;
further consider that at different times, the user access behavior may be different, e.g., sometimes updating data in the underlying tracks more frequently, sometimes not updating the underlying track data for a longer period of time; in order to adapt to the data access behavior of the user, so as to further improve the hit rate of the data cache and reduce the write amplification, as a preferred implementation manner, in this embodiment, when the data access amount to the interleaved recording disk reaches the preset number of file pages, it is determined that a time window is reached.
As shown in FIG. 2, in this embodiment, when the received data request is a write request and an update operation is requested to the top track, the in-place update is performed in the top track.
As shown in fig. 2, in this embodiment, when the received data request is a write request and new data is requested to be written, it is determined whether the bottom track has been allocated, and if the bottom track has not been allocated, a storage space is allocated in the bottom track and the data is written; if the bottom track is completely distributed, distributing storage space in the top track and writing data;
in practical application, whether bottom layer magnetic tracks are distributed or not can be judged by utilizing a mapping table, and information such as storage positions of data, data sizes and the like is recorded in the mapping table; specifically, according to the mapping table, the total data size written in the bottom track can be determined, and whether the bottom track is completely allocated can be determined by comparing the total data size with the capacity of the bottom track.
As shown in fig. 2, in this embodiment, when the received data request is a read request and a read operation is requested to be performed on a bottom track, the data cache is accessed first, and if the data request is hit, the data is directly read from the data cache and returned; if not, the data is read from the underlying track and returned.
As shown in fig. 2, in this embodiment, when the received data request is a read request and a read operation is requested to the top track, the data is read from the top track and returned.
In general, in the embodiment, the data cache and the inert cache are arranged in a specific manner and are matched with each other to match data in a bottom layer magnetic track, so that write amplification caused by updating of bottom layer magnetic track data in the interleaved recording disk can be effectively reduced, and the overall performance of the disk is improved.
Example 2:
a data request processing apparatus for an interleaved recording disk, comprising:
a computer-readable storage medium for storing a computer program;
and a processor for reading a computer program stored in a computer-readable storage medium and executing the data request processing method of the interleaved recording disk provided in embodiment 1 above.
Example 3:
an interleaved recording disk system comprising an interleaved recording disk and the data request processing device of the interleaved recording disk provided in embodiment 2 above.
It will be understood by those skilled in the art that the foregoing is only a preferred embodiment of the present invention, and is not intended to limit the invention, and that any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (8)

1. A data request processing method for an interleaved recording disk, comprising:
distributing a part of disk space in the top track as a data cache for caching data in the bottom track, and distributing a part of memory space in the memory as a lazy cache for caching the updating times of the data in the bottom track;
when the received data request is a write request and an update operation is requested to the underlying track, the request is processed according to the following steps:
(S1) judging whether the request hits the data cache, if so, directly updating the data in the data cache, and returning; if not, the process proceeds to step (S2);
(S2) updating the data in the underlying track according to the request, and updating the number of updates of the data in the lazy cache;
(S3) if the number of updates of the updated data exceeds a preset caching threshold, caching the updated data in the data cache.
2. The data request processing method of an interleaved recording disk as claimed in claim 1, further comprising: and resetting the updating times of each data in the inert cache every time a preset time window passes.
3. The method of claim 2, wherein a time window is determined to be reached when the data access amount to the interleaved recording disk reaches a predetermined number of file pages.
4. A method for processing data request from interleaved recording disk according to any of claims 1 to 3 wherein said step (S3) of buffering updated data into said data buffer comprises:
if the cache space of the data cache is full, after the data needing to be removed in the data cache is determined by adopting a preset cache replacement algorithm, distributing the cache space of the removed data in the data cache to the updated data; if the cache space of the data cache is not full, distributing a free cache space for the updated data;
caching the updated data to the allocated cache space.
5. The data request processing method of interleaved recording disk as claimed in claim 4, wherein said cache replacement algorithm is LRU algorithm.
6. A data request processing method for an interleaved recording disk according to any of claims 1 to 3, further comprising:
when the received data request is a write request and an update operation is requested to the top track, performing in-place update in the top track;
when the received data request is a write request and new data is requested to be written, judging whether the bottom layer magnetic track is completely distributed or not, and if the bottom layer magnetic track is not completely distributed, distributing storage space in the bottom layer magnetic track and writing the data; if the bottom track is completely distributed, distributing storage space in the top track and writing data;
when the received data request is a read request and a read operation is requested to be performed on a bottom track, the data cache is accessed first, and if the data cache is hit, the data is directly read from the data cache and returned; if not, reading data from the bottom layer magnetic track and returning;
and when the received data request is a read request and a read operation is requested to the top track, reading the data from the top track and returning.
7. A data request processing apparatus for interleaved recording disks, comprising:
a computer-readable storage medium for storing a computer program;
and a processor for reading a computer program stored in the computer-readable storage medium, and executing the data request processing method of the interleaved recording disk according to any of claims 1 to 6.
8. An interleaved recording disk system comprising an interleaved recording disk and the data request processing apparatus of claim 7.
CN202111681185.3A 2021-12-28 2021-12-28 Data request processing method, equipment and system of staggered recording disk Active CN114327297B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111681185.3A CN114327297B (en) 2021-12-28 2021-12-28 Data request processing method, equipment and system of staggered recording disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111681185.3A CN114327297B (en) 2021-12-28 2021-12-28 Data request processing method, equipment and system of staggered recording disk

Publications (2)

Publication Number Publication Date
CN114327297A true CN114327297A (en) 2022-04-12
CN114327297B CN114327297B (en) 2024-03-19

Family

ID=81022541

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111681185.3A Active CN114327297B (en) 2021-12-28 2021-12-28 Data request processing method, equipment and system of staggered recording disk

Country Status (1)

Country Link
CN (1) CN114327297B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103257935A (en) * 2013-04-19 2013-08-21 华中科技大学 Cache management method and application thereof
CN105955664A (en) * 2016-04-29 2016-09-21 华中科技大学 Method for reading and writing segment-based shingle translation layer (SSTL)
CN109697033A (en) * 2018-12-19 2019-04-30 中国人民解放军国防科技大学 Tile record disk sensing storage caching method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103257935A (en) * 2013-04-19 2013-08-21 华中科技大学 Cache management method and application thereof
CN105955664A (en) * 2016-04-29 2016-09-21 华中科技大学 Method for reading and writing segment-based shingle translation layer (SSTL)
CN109697033A (en) * 2018-12-19 2019-04-30 中国人民解放军国防科技大学 Tile record disk sensing storage caching method and system

Also Published As

Publication number Publication date
CN114327297B (en) 2024-03-19

Similar Documents

Publication Publication Date Title
CN107622022B (en) Cache over-provisioning in a data storage device
CN102760101B (en) SSD-based (Solid State Disk) cache management method and system
US7447836B2 (en) Disk drive storage defragmentation system
CN108762664B (en) Solid state disk page-level cache region management method
US7818505B2 (en) Method and apparatus for managing a cache memory in a mass-storage system
CN109446117B (en) Design method for page-level flash translation layer of solid state disk
CN108845957B (en) Replacement and write-back self-adaptive buffer area management method
CN109918316B (en) Method and system for reducing FTL address mapping space
CN105975215A (en) STL mapping table management method based on Ondemand algorithm
CN103383666A (en) Method and system for improving cache prefetch data locality and cache assess method
CN111352593B (en) Solid state disk data writing method for distinguishing fast writing from normal writing
US20140258591A1 (en) Data storage and retrieval in a hybrid drive
US20200117601A1 (en) Storage controller, storage system, storage controller controlling method, and program
CN109002400B (en) Content-aware computer cache management system and method
US20170262485A1 (en) Non-transitory computer-readable recording medium, data management device, and data management method
US8732404B2 (en) Method and apparatus for managing buffer cache to perform page replacement by using reference time information regarding time at which page is referred to
US9846647B2 (en) Cache device and control method threreof
CN108664217A (en) A kind of caching method and system reducing the shake of solid-state disc storaging system write performance
KR20180135390A (en) Data journaling method for large solid state drive device
US20130282977A1 (en) Cache control device, cache control method, and program thereof
CN114327297B (en) Data request processing method, equipment and system of staggered recording disk
JPH08263380A (en) Disk cache control system
CN116048402A (en) Cache replacement method, device and storage medium
CN115509962A (en) Multi-level cache management method, device and equipment and readable storage medium
KR101353967B1 (en) Data process method for reading/writing data in non-volatile memory cache having ring structure

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant