JP6668785B2 - Information processing system, storage control device, storage control method, and storage control program - Google Patents
Information processing system, storage control device, storage control method, and storage control program Download PDFInfo
- Publication number
- JP6668785B2 JP6668785B2 JP2016015069A JP2016015069A JP6668785B2 JP 6668785 B2 JP6668785 B2 JP 6668785B2 JP 2016015069 A JP2016015069 A JP 2016015069A JP 2016015069 A JP2016015069 A JP 2016015069A JP 6668785 B2 JP6668785 B2 JP 6668785B2
- Authority
- JP
- Japan
- Prior art keywords
- fragmentation
- logical address
- defragmentation
- storage medium
- stored
- 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.)
- Active
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
本発明は、情報処理システム、記憶制御装置、記憶制御方法および記憶制御プログラムに関する。 The present invention relates to an information processing system, a storage control device, a storage control method, and a storage control program.
近年、記憶素子にNANDフラッシュメモリ(以下、NANDフラッシュと称す)を用いたSSD(Solid State Drive)が記憶媒体として普及している。また、従来から記憶媒体として用いられるHDD(Hard Disk Drive)についても、大容量化技術としてSMR(Shingled Magnetic Recording)を採用したHDDが普及しつつある。これらの記憶媒体で用いられる記憶素子は、記憶領域に対してデータを非連続に格納することが困難である。そのため、これらの記憶媒体の多くは、計算機からのデータアクセスを容易にするために、記憶領域に対して追記形式でデータを格納する。 In recent years, SSDs (Solid State Drives) using NAND flash memories (hereinafter referred to as NAND flash) as storage elements have become widespread as storage media. As for HDDs (Hard Disk Drives) conventionally used as storage media, HDDs employing SMR (Shingled Magnetic Recording) as a technology for increasing the capacity are becoming widespread. It is difficult for storage elements used in these storage media to store data discontinuously in a storage area. Therefore, many of these storage media store data in a storage area in a write-once format in order to facilitate data access from a computer.
このような追記形式では、記憶媒体を使用するホストコンピュータから指定された格納先のアドレスによらず、データを空き領域に対して連続的に格納する。そのため、記憶媒体は、外部のホストコンピュータが参照するアドレス空間と、記憶素子上の物理的な記憶領域との対応関係を管理する。更新または削除などによって無効化されたデータを格納した記憶領域は、外部のホストコンピュータが参照するアドレス空間と対応しない、空き領域として再利用される。 In such a write-once format, data is continuously stored in a free area irrespective of the storage destination address specified by the host computer using the storage medium. Therefore, the storage medium manages the correspondence between the address space referenced by the external host computer and the physical storage area on the storage element. The storage area storing the data invalidated by updating or deletion is reused as a free area that does not correspond to the address space referenced by the external host computer.
しかし、追記形式でデータを格納する記憶媒体において、空き領域をそのまま再利用することは不可能である。例えば、SSDで用いられるNANDフラッシュでは、データの更新時に格納済の古いデータを消去(Erase)して初期化を行う必要がある。このNANDフラッシュに対するEraseは、ReadおよびWriteの最小単位であるページを複数含んだ、ブロックを単位として行う。SMRを採用したHDDでも同様に、ゾーンと呼ばれる連続的にデータを格納する領域を再利用する前に、ゾーン全体の初期化が必要である。つまり、初期化対象の記憶領域は有効なデータが含まれない、連続した空き領域であることが求められる。 However, it is impossible to reuse an empty area in a storage medium for storing data in a write-once format. For example, in a NAND flash used in an SSD, it is necessary to perform initialization by erasing (Erase) old stored data when updating data. Erase for the NAND flash is performed in units of blocks including a plurality of pages which are the minimum units of read and write. Similarly, in an HDD employing SMR, it is necessary to initialize the entire zone before reusing an area called a zone for continuously storing data. That is, the storage area to be initialized is required to be a continuous free area that does not include valid data.
そのため、追記形式でデータを格納するSSDやSMRを採用したHDDなどの記憶媒体では、空き領域を回収して再利用可能な連続した空き領域を確保するGC(Garbage Collection:ガベージコレクション)が行われる。GCでは連続した空き領域を確保するために、回収対象の記憶領域に含まれる有効なデータを事前に用意した他の書き込み可能な記憶領域に移動して、移動元の記憶領域を空き領域に変更する。記憶媒体内のGCに伴うデータの移動量は、回収対象の記憶領域に含まれる有効なデータ量に比例するため、回収対象領域の有効データ量の増加に従いホストコンピュータからのデータを格納するために使用可能な容量が減少する。つまり、記憶媒体に格納されたデータ容量の増加、もしくはデータの格納、更新を繰り返して記憶媒体内の空き領域の断片化が進行すると、回収対象の記憶領域に含まれる有効なデータ量が増加することで、ホストコンピュータから格納されるデータ量に対するGCの頻度が増加する。GC頻度の増加は記憶媒体内のデータ移動に伴う、ホストコンピュータから記憶媒体に対するアクセス性能の低下を引き起こす。 For this reason, in a storage medium such as an HDD or the like that employs an SSD or an SMR that stores data in a write-once format, a garbage collection (GC) that collects free space and secures a reusable continuous free space is performed. . In the GC, in order to secure a continuous free area, valid data included in the storage area to be collected is moved to another writable storage area prepared in advance, and the source storage area is changed to a free area. I do. Since the amount of data movement due to GC in the storage medium is proportional to the amount of valid data included in the storage area to be collected, it is necessary to store data from the host computer as the amount of valid data in the collection target area increases. Available capacity is reduced. That is, when the amount of data stored in the storage medium increases, or when the storage and update of data are repeated to fragment free space in the storage medium, the effective data amount included in the storage area to be collected increases. As a result, the frequency of GC for the amount of data stored from the host computer increases. An increase in the GC frequency causes a decrease in access performance from the host computer to the storage medium due to data movement in the storage medium.
記憶媒体内のGC頻度の増加による性能低下を防ぐ方法として、記憶領域で発生した断片化を事前に解消する方法が挙げられる。具体的には、記憶媒体がホストコンピュータに対して提供する論理アドレス空間上で連続に格納されたデータを、記憶素子上の連続した領域に再格納することで、データおよび空き領域の断片化を解消できる。例えば、特許文献1や非特許文献1では、SSDがホストコンピュータに提供する論理アドレス空間を分割した領域ごとに書き込みの頻度が低い領域の再書き込みを行うことで、断片化を解消してSSD内部の断片化解消処理の頻度を低減するための方法が示されている。記憶媒体内部において記憶領域の断片化を解消して、空き領域の分散を防ぎ連続した空き領域が発生しやすい状態とすることで、回収対象の記憶領域に含まれる有効なデータ量を削減する。その結果、回収対象の記憶領域における有効なデータ量の削減によって、ホストコンピュータからのデータを格納可能な容量が増加して、GCの頻度低減が実現される。
As a method of preventing performance degradation due to an increase in GC frequency in a storage medium, a method of eliminating fragmentation occurring in a storage area in advance can be cited. Specifically, the data stored continuously on the logical address space provided to the host computer by the storage medium is re-stored in a continuous area on the storage element, thereby fragmenting the data and the free area. Can be resolved. For example, in
例えば、特許文献1に示された技術では、記憶媒体がホストコンピュータに対して提供する論理アドレス空間を分割した領域毎の書き込み頻度を用いて断片化解消を行う領域を決定する。また、非特許文献1では、SSDに対してランダムWriteが行われた場合の、外部から書き込まれたデータ量に対するSSD内部で行われるGCに伴うデータ移動量の比率について、確率モデルを用いた計算方法を示している。
For example, in the technique disclosed in
しかしながら、追記形式でデータを格納する記憶媒体に対して断片化解消処理を行う上記文献に記載の技術では、断片化解消処理の効果とコストの見積もりとによる、断片化解消対象の領域の決定は実施されていない。例えば、特許文献1に示された技術では、各領域の断片化を解消した場合のGCに与える影響は考慮されていない。また、非特許文献1では、ホストコンピュータからのデータ格納が一様かつランダムに行われることを仮定しており、アプリケーション等によって異なるホストコンピュータからのWriteアクセスパターンの変化、およびSSD内部のデータ格納状況に応じた計算は困難である。
However, in the technology described in the above-mentioned document that performs defragmentation processing on a storage medium that stores data in a write-once format, it is not possible to determine the area to be defragmented based on the effect of the defragmentation processing and the cost estimation. Not implemented. For example, in the technique disclosed in
本発明の目的は、上述の課題を解決する技術を提供することにある。 An object of the present invention is to provide a technique for solving the above-mentioned problem.
上記目的を達成するため、本発明に係る記憶制御装置は、
ホストコンピュータが記憶媒体にアクセスする際に用いる論理アドレス空間を一定サイズの単位で分割した各々の論理アドレス領域のデータが、前記記憶媒体の内部で使用される物理アドレス空間において複数の物理アドレス領域に断片化されて記憶されているか否かを推定し、断片化されて記憶されていると推定された前記論理アドレス領域の数を管理する断片化管理手段と、
断片化されて記憶されていると推定された前記論理アドレス領域の数が第1閾値を超えた場合に、断片化されて記憶されていると推定された前記論理アドレス領域に対する断片化解消処理を開始する断片化解消処理手段と、
を備え、
前記断片化解消処理手段は、断片化されて記憶されていると推定された前記論理アドレス領域の数が第2閾値を下回るまで前記断片化解消処理を継続し、
前記第1閾値および前記第2閾値は、前記断片化解消処理による前記記憶媒体の内部のガベージコレクション(GC)に伴うデータ移動が削減されるように設定される。
To achieve the above object, a storage control device according to the present invention comprises:
The data of each logical address area obtained by dividing the logical address space used when the host computer accesses the storage medium in units of a fixed size is stored in a plurality of physical address areas in the physical address space used inside the storage medium. Fragmentation management means for estimating whether or not fragmented and stored, and managing the number of the logical address areas estimated to be stored as fragmented,
When the number of the logical address areas estimated to be stored in a fragmented manner exceeds the first threshold value, a defragmentation process for the logical address area estimated to be stored in a fragmented state is performed. Defragmentation processing means to be started;
Equipped with a,
The defragmentation processing means continues the defragmentation process until the number of the logical address areas estimated to be stored in a fragmented state falls below a second threshold,
Wherein the first threshold and the second threshold value, the data move accompanying the interior of garbage collection (GC) of the storage medium by the defragmentation process Ru is set to be reduced.
上記目的を達成するため、本発明に係る記憶制御方法は、
ホストコンピュータが記憶媒体にアクセスする際に用いる論理アドレス空間を一定サイズの単位で分割した各々の論理アドレス領域のデータが、前記記憶媒体の内部で使用される物理アドレス空間において複数の物理アドレス領域に断片化されて記憶されているか否かを推定し、断片化されて記憶されていると推定された前記論理アドレス領域の数を管理する断片化管理ステップと、
断片化されて記憶されていると推定された前記論理アドレス領域の数が第1閾値を超えた場合に、断片化されて記憶されていると推定された前記論理アドレス領域に対して断片化解消処理を開始する断片化解消処理ステップと、
を含み、
前記断片化解消処理ステップにおいては、断片化されて記憶されていると推定された前記論理アドレス領域の数が第2閾値を下回るまで前記断片化解消処理を継続し、
前記第1閾値および前記第2閾値は、前記断片化解消処理による前記記憶媒体の内部のガベージコレクション(GC)に伴うデータ移動が削減されるように設定される。
In order to achieve the above object, a storage control method according to the present invention comprises:
The data of each logical address area obtained by dividing the logical address space used when the host computer accesses the storage medium in units of a fixed size is stored in a plurality of physical address areas in the physical address space used inside the storage medium. Estimating whether or not it is stored in a fragmented manner, a fragmentation management step of managing the number of the logical address areas estimated to be stored in a fragmented manner,
When the number of the logical address areas estimated to be stored in a fragmented manner exceeds a first threshold value, defragmentation is performed on the logical address area estimated to be stored in a fragmented state. A defragmentation processing step for starting processing;
Only including,
In the defragmentation processing step, the defragmentation processing is continued until the number of the logical address areas estimated to be fragmented and stored falls below a second threshold,
The first threshold value and the second threshold value are set such that data movement due to garbage collection (GC) inside the storage medium due to the fragmentation eliminating process is reduced .
上記目的を達成するため、本発明に係る記憶制御プログラムは、
ホストコンピュータが記憶媒体にアクセスする際に用いる論理アドレス空間を一定サイズの単位で分割した各々の論理アドレス領域のデータが、前記記憶媒体の内部で使用される物理アドレス空間において複数の物理アドレス領域に断片化されて記憶されているか否かを推定し、断片化されて記憶されていると推定された前記論理アドレス領域の数を管理する断片化管理ステップと、
断片化されて記憶されていると推定された前記論理アドレス領域の数が第1閾値を超えた場合に、断片化されて記憶されていると推定された前記論理アドレス領域に対して断片化解消処理を開始する断片化解消処理ステップと、
をコンピュータに実行させる記憶制御プログラムであって、
前記断片化解消処理ステップにおいては、断片化されて記憶されていると推定された前記論理アドレス領域の数が第2閾値を下回るまで前記断片化解消処理を継続し、
前記第1閾値および前記第2閾値は、前記断片化解消処理による前記記憶媒体の内部のガベージコレクション(GC)に伴うデータ移動が削減されるように設定される。
In order to achieve the above object, a storage control program according to the present invention comprises:
The data of each logical address area obtained by dividing the logical address space used when the host computer accesses the storage medium in units of a fixed size is stored in a plurality of physical address areas in the physical address space used inside the storage medium. Estimating whether or not it is stored in a fragmented manner, a fragmentation management step of managing the number of the logical address areas estimated to be stored in a fragmented manner,
When the number of the logical address areas estimated to be stored in a fragmented manner exceeds a first threshold value, defragmentation is performed on the logical address area estimated to be stored in a fragmented state. A defragmentation processing step for starting processing;
A storage control program that causes a computer to execute
In the defragmentation processing step, the defragmentation processing is continued until the number of the logical address areas estimated to be fragmented and stored falls below a second threshold,
The first threshold value and the second threshold value are set such that data movement due to garbage collection (GC) inside the storage medium due to the fragmentation eliminating process is reduced .
上記目的を達成するため、本発明に係るシステムは、
記憶媒体と、
論理アドレス空間の論理アドレス領域を指定して、前記記憶媒体へのアクセスを行うアクセス手段と、
前記アクセス手段において指定された論理アドレス領域に基づいて、前記記憶媒体からのデータの読み出しおよび前記記憶媒体へのデータの書き込みを行う記憶制御手段と、
を備えた情報処理システムであって、
前記記憶制御手段は、
前記アクセス手段が前記記憶媒体にアクセスする際に用いる論理アドレス空間を一定サイズの単位で分割した各々の論理アドレス領域のデータが、前記記憶媒体の内部で使用される物理アドレス空間において複数の物理アドレス領域に断片化されて記憶されているか否かを推定し、断片化されて記憶されていると推定された前記論理アドレス領域の数を管理する断片化管理手段と、
断片化されて記憶されていると推定された前記論理アドレス領域の数が第1閾値を超えた場合に、断片化されて記憶されていると推定された前記論理アドレス領域に対する断片化解消処理を開始し、断片化されて記憶されていると推定された前記論理アドレス領域の数が第2閾値を下回るまで、前記断片化解消処理を継続する断片化解消処理手段と、
を備え、
前記断片化解消処理手段は、断片化されて記憶されていると推定された前記論理アドレス領域の数が第2閾値を下回るまで前記断片化解消処理を継続し、
前記第1閾値および前記第2閾値は、前記断片化解消処理による前記記憶媒体の内部のガベージコレクション(GC)に伴うデータ移動が削減されるように設定される。
In order to achieve the above object, a system according to the present invention comprises:
A storage medium,
An access unit that specifies a logical address area of a logical address space and accesses the storage medium;
Storage control means for reading data from the storage medium and writing data to the storage medium based on the logical address area designated by the access means;
An information processing system comprising:
The storage control means,
The data of each logical address area obtained by dividing the logical address space used when the access unit accesses the storage medium by a unit of a fixed size is a plurality of physical addresses in the physical address space used inside the storage medium. Fragmentation management means for estimating whether the area is fragmented and stored, and managing the number of the logical address areas estimated to be fragmented and stored;
When the number of the logical address areas estimated to be stored in a fragmented manner exceeds the first threshold value, a defragmentation process for the logical address area estimated to be stored in a fragmented state is performed. A defragmentation processing unit that starts and continues the defragmentation processing until the number of the logical address areas estimated to be stored in a fragmented state falls below a second threshold value;
Equipped with a,
The defragmentation processing means continues the defragmentation process until the number of the logical address areas estimated to be stored in a fragmented state falls below a second threshold,
Wherein the first threshold and the second threshold value, the data move accompanying the interior of garbage collection (GC) of the storage medium by the defragmentation process Ru is set to be reduced.
本発明によれば、断片化解消処理によって得られる記憶媒体内のGCによるデータ移動の削減効果を高め、記憶媒体のアクセス性能の向上および長寿命化を図ることができる。 ADVANTAGE OF THE INVENTION According to this invention, the reduction effect of the data movement by GC in a storage medium obtained by defragmentation processing can be improved, and the access performance of a storage medium can be improved and long life can be achieved.
以下に、図面を参照して、本発明の実施の形態について例示的に詳しく説明する。ただし、以下の実施の形態に記載されている構成要素は単なる例示であり、本発明の技術範囲をそれらのみに限定する趣旨のものではない。 Hereinafter, embodiments of the present invention will be illustratively described in detail with reference to the drawings. However, the components described in the following embodiments are merely examples, and are not intended to limit the technical scope of the present invention thereto.
なお、本明細書で使用される文言「チャンク」は、ホストコンピュータなどの記憶媒体へのアクセス部における論理アドレス空間を一定サイズの単位で分割した各々の論理アドレス領域を示す。例えば、記憶媒体がSSDの場合は数10Mバイト単位、記憶媒体がSMRを採用したHDDの場合は数100Mバイト単位で分割した各々の論理アドレス領域を示す。また、本明細書では、GCで回収した記憶領域に対する、ホストコンピュータからWriteされたデータの格納に使用可能な容量の比率を、「回収効率」と定義する。 The term “chunk” used in this specification indicates each logical address area obtained by dividing a logical address space in a unit for accessing a storage medium such as a host computer into units of a certain size. For example, when the storage medium is an SSD, each logical address area is divided into several tens of megabytes, and when the storage medium is an HDD employing SMR, each logical address area is divided into several hundreds of megabytes. In this specification, the ratio of the capacity available for storing data written from the host computer to the storage area collected by the GC is defined as “collection efficiency”.
[第1実施形態]
本発明の第1実施形態としての記憶制御装置100について、図1を用いて説明する。記憶制御装置100は、記憶媒体のデータの記憶を制御する装置である。
[First Embodiment]
A
図1に示すように、記憶制御装置100は、断片化管理部101と、断片化解消処理部102と、を含む。断片化管理部101は、ホストコンピュータが記憶媒体110にアクセスする際に用いる論理アドレス空間を一定サイズの単位で分割した各々の論理アドレス領域のデータが、記憶媒体110の内部で使用される物理アドレス空間において複数の物理アドレス領域に断片化されて記憶されているか否かを推定し、断片化されて記憶されていると推定された論理アドレス領域の数を管理する。断片化解消処理部102は、断片化されて記憶されていると推定された論理アドレス領域の数が第1閾値を超えた場合に、断片化されて記憶されていると推定された論理アドレス領域に対する断片化解消処理を開始する。
As shown in FIG. 1, the
本実施形態によれば、論理アドレス空間を一定サイズの単位で分割した各々の論理アドレス領域の断片化状態をホストコンピュータから推定し、断片化状態の論理アドレス領域の数に基づいて断片化解消処理をする。これにより、断片化解消処理によって得られる記憶媒体内のGCによるデータ移動の削減効果を高め、記憶媒体のアクセス性能の向上および長寿命化を図ることができる。 According to the present embodiment, the fragmentation state of each logical address area obtained by dividing the logical address space in units of a fixed size is estimated from the host computer, and the fragmentation eliminating process is performed based on the number of fragmented logical address areas. do. As a result, the effect of reducing data movement by GC in the storage medium obtained by the defragmentation process can be enhanced, and the access performance of the storage medium can be improved and the service life can be extended.
[第2実施形態]
次に、本発明の第2実施形態に係る記憶制御装置について説明する。本実施形態に係る記憶制御装置は、ホストコンピュータが記憶媒体にアクセスする際に用いる論理アドレス空間を一定サイズの単位で分割した各々の論理アドレス領域である各チャンクのデータが、断片化されて記憶されているか否かを推定し、断片化されて記憶されていると推定されたチャンク数を管理する。そして、チャンク数が断片化解消処理開始条件を超えた場合に、断片化されて記憶されていると推定されたチャンクに対する断片化解消処理を開始し、チャンク数が断片化解消処理終了条件を下回るまで、断片化解消処理を継続する。なお、本実施形態においては、チャンク数が断片化解消処理終了条件を下回るまで断片化解消処理を継続する場合を説明するが、チャンク数が断片化解消処理開始条件を超えた場合に、断片化されて記憶されていると推定されたチャンクに対する断片化解消処理を開始する構成により、本実施形態の効果を奏することができる。
[Second embodiment]
Next, a storage control device according to a second embodiment of the present invention will be described. The storage control device according to the present embodiment stores data of each chunk, which is a logical address area obtained by dividing a logical address space used when a host computer accesses a storage medium in units of a fixed size, in a fragmented manner. The number of chunks estimated to be stored in a fragmented manner is managed. Then, when the number of chunks exceeds the defragmentation processing start condition, the defragmentation processing for the chunk estimated to be fragmented and stored is started, and the number of chunks falls below the defragmentation processing end condition. Until the defragmentation process is continued. In the present embodiment, a case will be described in which the fragmentation elimination processing is continued until the number of chunks falls below the fragmentation elimination processing end condition. However, when the number of chunks exceeds the fragmentation elimination processing start condition, fragmentation is performed. The configuration of starting the fragmentation elimination processing for the chunk estimated to be stored and stored can provide the effect of the present embodiment.
《本実施形態の技術的概要》
以下、本実施形態の技術的概要について、説明する。
<< Technical outline of this embodiment >>
Hereinafter, a technical outline of the present embodiment will be described.
記憶媒体内における記憶領域の断片化解消処理は、記憶素子に対するデータの再格納で実現される。すなわち、断片化解消処理を行ったデータ量に比例した、記憶素子に対する書き込みがコストとして発生する。断片化解消処理に伴う書き込みは、ホストコンピュータからのアクセス要求に対する処理の妨げによる性能低下を引き起こす。例えば、記憶媒体がSSDである場合、記憶素子として使用されるNANDフラッシュのErase処理の回数制限に由来する寿命が存在する。つまり、SSDに対する断片化解消処理では性能低下に加えて寿命の消費が発生する。特に低コストのSSDを中心に寿命の短いNANDフラッシュが使用されるため、格納データ量の削減による長寿命化が求められる。 The defragmentation process of the storage area in the storage medium is realized by restoring data in the storage element. That is, writing to the storage element in proportion to the amount of data subjected to the fragmentation eliminating processing occurs as a cost. The writing associated with the defragmentation process causes a decrease in performance due to the interruption of the process for the access request from the host computer. For example, when the storage medium is an SSD, there is a lifetime due to the limitation on the number of times of Erase processing of the NAND flash used as the storage element. That is, in the defragmentation process for the SSD, the life is consumed in addition to the performance degradation. In particular, since a NAND flash having a short life is used mainly for a low-cost SSD, a long life is required by reducing the amount of stored data.
本実施形態においては、断片化解消処理の実行に伴う記憶媒体の性能低下、および寿命消費の課題を解決する。断片化解消処理は、GCにおける空き領域の回収効率を高めることで、記憶媒体内部のGCに伴うデータ移動量を削減する効果を持つ一方で、断片化解消処理を行ったデータの容量に比例した再格納が行われる。つまり、記憶媒体における断片化解消処理によって得られる効果とコストとを比較し、効果がコストを上回るように断片化解消処理を実行する必要がある。また、断片化解消処理の効果を高めるためには、断片化解消処理を行う対象となるデータに対して効果とコストとを正確に見積もる必要がある。 In the present embodiment, the problems of performance degradation of the storage medium and life consumption due to the execution of the defragmentation processing are solved. The defragmentation process has the effect of reducing the amount of data movement accompanying the GC inside the storage medium by increasing the collection efficiency of the free space in the GC, but is proportional to the capacity of the data subjected to the defragmentation process. Re-storage is performed. That is, it is necessary to compare the effect obtained by the defragmentation processing on the storage medium with the cost, and execute the defragmentation processing so that the effect exceeds the cost. Further, in order to enhance the effect of the fragmentation eliminating process, it is necessary to accurately estimate the effect and cost of the data to be subjected to the fragmentation eliminating process.
追記形式でデータ格納を行うSSDやSMRを採用したHDDなどの記憶媒体において、断片化解消処理によって得られる効果を高めるため、記憶媒体に対する断片化解消処理による効果から断片化解消処理に伴うコストを差し引いた効果が最大化されるように、断片化解消処理を行う論理アドレス領域を決定する。そのため、記憶媒体における格納データの断片化状況、および、ホストコンピュータから記憶媒体に対するアクセスの状況を基に、断片化解消処理がもたらすGCに伴うデータ移動量の削減効果を推測する。 In order to enhance the effect obtained by the defragmentation processing on a storage medium such as an HDD or the like that employs an SSD or SMR that stores data in a write-once format, the cost associated with the defragmentation processing is reduced based on the effect of the defragmentation processing on the storage medium. The logical address area to be subjected to the defragmentation processing is determined so that the effect of the subtraction is maximized. Therefore, based on the fragmentation state of the storage data in the storage medium and the state of access from the host computer to the storage medium, the effect of reducing the amount of data movement due to GC caused by the fragmentation elimination process is estimated.
本実施形態においては、記憶媒体における格納データの書き込み、断片化の状況を管理するために、記憶媒体がホストコンピュータに対して提供する論理アドレス空間を一定のサイズごとに分割したチャンクを定義し、チャンクごとに格納データの断片化、更新、削除の状況を管理する。 In the present embodiment, in order to manage storage data writing and fragmentation in the storage medium, a chunk is defined by dividing a logical address space provided by the storage medium to the host computer for each fixed size, Manage the status of fragmentation, update, and deletion of stored data for each chunk.
まず、記憶媒体上のデータに対するWrite要求、もしくは、削除要求を検出すると、Write要求が格納、更新の対象とするチャンクを特定する。記憶媒体に対する削除要求は、例えばTRIM(ATA: Advanced Technology Attachmentプロトコルの場合)またはUNMAP(SCSI:Small Computer System Interfaceプロトコルの場合)と呼ばれる、当該論理アドレスの範囲が表すデータが不要であることを記憶媒体に通知するコマンドである。そして特定したチャンクに対する断片化状況、および更新、削除状況を表す情報を更新する。次に、チャンク毎の格納データの断片化、更新、削除の状況を表す情報を参照して、記憶媒体内の各チャンクについて断片化解消処理の必要有無を決定し、断片化解消処理が必要なチャンク数を算出する。併せて断片化解消処理が必要と判断されたチャンクについて、断片化解消処理の優先順位を決定する。そして、断片化解消処理が必要なチャンク数と、事前に決定した断片化解消処理の開始を判断するための基準値となるチャンク数とを比較して、断片化が発生したチャンク数が開始の基準値を上回る場合は、記憶媒体におけるデータの断片化が進んだ結果GCによる空き領域の回収効率が低下した状態と判断して、優先順位の高いチャンクから断片化解消処理を開始する。断片化解消処理を開始した後は、断片化した状態のチャンク数と、事前に決定した断片化解消処理の終了を判断するための基準値となるチャンク数とを比較して、断片化が発生したチャンク数が終了の基準値を下回る場合に断片化解消処理を終了する。 First, upon detecting a write request or a delete request for data on a storage medium, the write request specifies a chunk to be stored and updated. The deletion request for the storage medium indicates that data represented by the range of the logical address, such as TRIM (for ATA: Advanced Technology Attachment protocol) or UNMAP (for SCSI: Small Computer System Interface protocol), is unnecessary. This is a command to notify the medium. Then, the information indicating the fragmentation status, the update status, and the deletion status for the specified chunk is updated. Next, by referring to the information indicating the state of fragmentation, update, and deletion of the stored data for each chunk, it is determined whether or not the fragmentation removal processing is necessary for each chunk in the storage medium. Calculate the number of chunks. At the same time, the priority of the fragmentation eliminating process is determined for the chunk determined to require the fragmentation eliminating process. Then, by comparing the number of chunks that need to be defragmented with the number of chunks that is a reference value for determining the start of the defragmentation process determined in advance, the number of chunks where fragmentation has occurred If the value exceeds the reference value, it is determined that the efficiency of free space collection by GC has been reduced as a result of fragmentation of data in the storage medium, and fragmentation elimination processing is started from chunks with higher priorities. After the defragmentation process is started, fragmentation occurs by comparing the number of chunks in a fragmented state with the number of chunks that is a reference value for judging the end of the defragmentation process determined in advance. When the number of performed chunks is smaller than the reference value for termination, the fragmentation elimination processing is terminated.
ここで、断片化解消処理の実行開始、終了を判断する断片化状態のチャンク数の基準値は、断片化解消処理によるGC処理のデータ移動量削減効果からチャンクの再格納に伴う総Write量を差し引いた、断片解消処理のコスト考慮後の効果が最大化されるように、記憶媒体ごとに設定する。また、記憶媒体における断片化に伴う性能低下を防ぐことを目的として本実施形態を用いる場合に、例えば、記憶媒体に関する断片化したチャンク数に対する性能の実測値等を基にして決定したチャンク数を基準値として設定してもよい。 Here, the reference value of the number of chunks in the fragmentation state for judging the start and end of the defragmentation processing is determined by the total write amount accompanying the re-storage of the chunks from the data movement reduction effect of the GC processing by the defragmentation processing. The setting is made for each storage medium so that the effect after consideration of the cost of the defragmentation process, which has been subtracted, is maximized. Further, when the present embodiment is used for the purpose of preventing performance degradation due to fragmentation in a storage medium, for example, the number of chunks determined based on an actual measured value of the performance with respect to the number of fragmented chunks of the storage medium is used. It may be set as a reference value.
断片解消処理を行う対象のチャンクは、各チャンクにおける断片化、更新、削除の状況を表す情報から算出される優先度に基づいて決定する。例えば、各チャンクの更新、削除の頻度に着目すると、更新頻度の高いチャンクは断片化解消処理を行った後に再び断片化を引き起こしやすいため、断片化解消処理の効果が低いと言える。そのため、更新、削除の頻度が低いチャンクから優先的に断片化解消処理の対象として選択することで、断片化解消処理の効果を高めることができる。また、各チャンクに格納されたデータの更新について、更新されたデータのセクタ数を併せて考慮することで、断片化解消処理の効果の高いチャンクをより正確に選択可能である。更新頻度が一定である場合、更新されたセクタ数が多いチャンクであるほど断片化が進んでおり、断片化解消処理の効果が高いと言える。 The chunk to be subjected to fragmentation processing is determined based on the priority calculated from information indicating the fragmentation, update, and deletion status of each chunk. For example, focusing on the frequency of update and deletion of each chunk, chunks with a high update frequency are likely to cause fragmentation again after performing the fragmentation resolution processing, and thus it can be said that the effect of the fragmentation resolution processing is low. Therefore, the effect of the defragmentation processing can be enhanced by preferentially selecting the chunks that are not updated or deleted frequently as targets of the defragmentation processing. In addition, when updating the data stored in each chunk, by taking into account the number of sectors of the updated data, it is possible to more accurately select a chunk having a high defragmentation processing effect. When the update frequency is constant, fragmentation progresses as the number of updated sectors increases, and it can be said that the effect of the fragmentation elimination process is high.
(本実施形態の構成および動作の概要)
本実施形態の記憶制御部においては、ホストコンピュータが記憶媒体にアクセスする際に用いる論理アドレス空間を一定サイズの単位で分割した各々の論理アドレス領域であるチャンクのデータが、記憶媒体の内部で使用される物理アドレス空間において複数の物理アドレス領域に断片化されて記憶されているか否かを推定し、断片化されて記憶されていると推定されたチャンク数を管理する。そして、断片化されて記憶されていると推定されたチャンク数が断片化解消処理開始条件(第1閾値)を超えた場合に、断片化されて記憶されていると推定されたチャンクに対する断片化解消処理を開始し、断片化されて記憶されていると推定されたチャンク数が断片化解消処理終了条件(第2閾値)を下回るまで、断片化解消処理を継続する。
(Summary of configuration and operation of this embodiment)
In the storage control unit according to the present embodiment, data of chunks, which are logical address areas obtained by dividing a logical address space used when a host computer accesses a storage medium in units of a certain size, are used inside the storage medium. In the physical address space to be stored, it is estimated whether or not a plurality of physical address areas are fragmented and stored, and the number of chunks that are estimated to be fragmented and stored is managed. Then, when the number of chunks estimated to be stored in a fragmented manner exceeds the defragmentation processing start condition (first threshold), the fragmentation for the chunk estimated to be stored in a fragmented state is performed. The defragmentation process is started, and the defragmentation process is continued until the number of chunks estimated to be fragmented and stored falls below the defragmentation process end condition (second threshold).
ここで、第1閾値および第2閾値は、断片化解消処理による記憶媒体の内部のガベージコレクション(GC)に伴うデータ移動が削減されるように設定される。例えば、記憶媒体に含まれる論理アドレス領域の総数と、記憶媒体に含まれる有効なデータが格納されている論理アドレス領域の数と、記憶媒体に対する単位時間当たりの書き込みデータ量に相当する論理アドレス領域の数と、記憶媒体に含まれる断片化されて記憶されていると判定された論理アドレス領域のデータの平均更新間隔と、を考慮して算出される。また、第1閾値と第2閾値とが同じ数に設定されて、断片化されて記憶されていると推定されたチャンク数が同じ数となるように断片化解消処理を行なう。 Here, the first threshold value and the second threshold value are set so as to reduce data movement due to garbage collection (GC) in the storage medium due to fragmentation eliminating processing. For example, the total number of logical address areas included in the storage medium, the number of logical address areas storing valid data included in the storage medium, and the logical address area corresponding to the amount of data written per unit time to the storage medium And the average update interval of the data of the logical address area included in the storage medium and determined to be stored in a fragmented manner. Further, the first threshold value and the second threshold value are set to the same number, and the defragmentation process is performed so that the number of chunks estimated to be fragmented and stored is the same.
また、断片化されて記憶されていると推定されたチャンクについて、断片化解消処理を行なう優先順位をさらに設定し、優先順位にしたがって断片化解消処理を行なう。ここで、優先順位は、チャンクのデータを更新する更新頻度の低い順に設定される。 In addition, for the chunk estimated to be stored in a fragmented state, the priority order for performing the defragmentation process is further set, and the defragmentation process is performed according to the priority order. Here, the priorities are set in ascending order of update frequency for updating chunk data.
また、各々のチャンクを再分割した再分割領域に対するWrite処理または削除処理の発生分布に基づいて、チャンクのデータが断片化されて記憶されていると推定する。すなわち、再分割領域への初めてのWrite処理または削除処理が発生した回数を断片化発生数として累積し、断片化発生数が断片化推定条件(第3閾値)を上回る場合にチャンクのデータが断片化されて記憶されていると推定する。 In addition, it is estimated that chunk data is fragmented and stored based on the occurrence distribution of the write process or the delete process for the subdivision area obtained by subdividing each chunk. That is, the number of times that the first Write process or the deletion process to the re-divided area has occurred is accumulated as the number of fragmentation occurrences. If the number of fragmentation occurrences exceeds the fragmentation estimation condition (third threshold), the chunk data is fragmented. It is presumed that it is stored in the form of
また、断片化解消処理においては、断片化されて記憶されているチャンクのデータを読み出して、同じチャンクへの再格納をする。その場合、断片化解消処理中、他の書き込みを制限する。本実施形態が適用される記憶媒体は、追記形式で記憶素子に対するデータ格納を行う記憶媒体であり、SSDとSMRを採用したHDDとを含む。 In the defragmentation process, data of a chunk that has been fragmented and stored is read out and re-stored in the same chunk. In that case, other writing is restricted during the fragmentation eliminating process. The storage medium to which this embodiment is applied is a storage medium that stores data in a storage element in a write-once format, and includes an SSD and an HDD that employs an SMR.
《情報処理システム》
図2は、本実施形態に係る記憶制御装置としての記憶制御部220を含む情報処理システム200の構成を示すブロック図である。
《Information processing system》
FIG. 2 is a block diagram illustrating a configuration of an
図2を参照すると、本実施形態の情報処理システム200は、1台以上のホストコンピュータ210と、記憶媒体240と、ホストコンピュータ210と記憶媒体240とを接続するネットワーク250を含む。なお、記憶媒体240は、複数の記憶媒体に分散してネットワークに接続されていてもよい。
Referring to FIG. 2, the
ホストコンピュータ210は、OS (Operating System)211およびOS211上で動作するソフトウェアであるアプリケーション212と、本実施形態の記憶制御部220と、を備える。記憶制御部220は、OS211およびアプリケーション212の処理における、記憶媒体240へのReadおよびWriteを含むアクセス処理を制御する。
The
記憶媒体240は、NANDフラッシュを記憶素子として用いたSSDやSMRを採用したHDDなどの追記形式の記憶媒体である。なお、記憶媒体240は、媒体本体241とキャッシュメモリ242とを有してもよい。また、ネットワーク250の形態は特に限定されず、ホストコンピュータ210と記憶媒体240とが直接接続される形態であってもよい。また、ホストコンピュータ210はネットワーク250によって接続された複数の装置、あるいは、システムで構成されてもよい。
The
《記憶制御装置の機能構成》
図3は、本実施形態に係る記憶制御装置としての記憶制御部220の機能構成を示すブロック図である。
<< Functional configuration of storage controller >>
FIG. 3 is a block diagram illustrating a functional configuration of the
図3を参照すると、記憶制御部220は、アクセス実行部310と、断片化管理部320と、断片化解消処理部330と、を備える。
Referring to FIG. 3, the
《アクセス実行部》
アクセス実行部310は、ホストコンピュータ210で動作するOS211またはアプリケーション212からのアクセス要求を受け取り、記憶媒体240に対して必要なアクセス処理を行う。Write要求の場合は、Writeキュー311を介して記憶媒体240に対してWrite処理を実行する。また、アクセス実行部310は、断片化解消処理部330によって指示された記憶媒体240上の領域に対してデータを読み出して、再格納処理を行う。記憶媒体240の領域に対するデータの読み出しは、記憶媒体240に対して直接要求を行う以外に、不図示の記憶媒体240に対するキャッシュメモリに対して要求を行うことでも代用できる。
《Access execution section》
The
《断片化管理部》
断片化管理部320は、アクセス実行部310により、記憶媒体240へのWrite要求または削除要求による更新を監視して、各チャンクの断片化を推定し、断片化と推定されたチャンクのリストを生成して、管理する。
《Fragmentation management》
The
図3において、断片化管理部320は、更新監視部321と、更新頻度管理テーブル322と、断片化状態管理テーブル323と、断片化解消対象推定部324と、断片化解消対象リスト325と、を備える。
3, the
(更新監視部)
更新監視部321は、ホストコンピュータ210で動作するソフトウェア、OSから記憶媒体240に対するWrite要求、および削除要求を監視して、記憶媒体240におけるアクセス先の論理アドレス、およびアクセスのサイズからアクセス先のチャンクを特定する。そして、特定したチャンクに対応する更新頻度管理テーブル322のエントリに格納された更新頻度の情報を更新する。また、断片化状態管理テーブル323のチャンクに対応するエントリについても、アクセス実行部310が受け取ったWrite要求によってチャンク内の断片化発生有無、断片化の状態を表す情報を更新する。
(Update monitoring section)
The
(更新頻度管理テーブル)
更新頻度管理テーブル322は、記憶媒体内の各チャンクに対するエントリを持ち、チャンク内のデータに対して更新または削除が行われた頻度によって表される更新頻度の情報を管理する更新頻度管理機能を果たす。更新頻度管理テーブル322は、記憶媒体240の論理アドレス空間上の各チャンクに対する一定時間毎の更新頻度の情報を格納するエントリを持ち、各エントリの更新頻度の情報は一定時間間隔でリセットされる。
(Update frequency management table)
The update frequency management table 322 has an entry for each chunk in the storage medium, and performs an update frequency management function of managing information on the update frequency represented by the frequency of updating or deleting data in the chunk. . The update frequency management table 322 has entries for storing information on the update frequency of each chunk in the logical address space of the
図4Aは、本実施形態に係る更新頻度管理テーブル322の構成を示す図である。更新頻度管理テーブル322の各エントリは、チャンクID411に対応付けて、一定時間内の更新または削除の頻度を表す更新頻度412を記憶する。
FIG. 4A is a diagram illustrating a configuration of the update frequency management table 322 according to the present embodiment. Each entry of the update frequency management table 322 stores an
なお、更新頻度管理テーブル322の各エントリに格納されるデータの形式は、図4Aに示した形式に限定されず、例えば更新頻度412の代わりに最終更新時刻を持ち、各チャンクに関する更新頻度の多少を判断する形式であってもよい。この場合は、一定時間毎の更新頻度のリセットは不要である。また、更新頻度412や最終更新時刻以外の情報を持ち、更新頻度よりも詳細な各チャンクの更新履歴を管理する形式であってもよい。
The format of the data stored in each entry of the update frequency management table 322 is not limited to the format shown in FIG. 4A. For example, the data may have a last update time instead of the
(断片化状態管理テーブル)
断片化状態管理テーブル323は、記憶媒体内の各チャンクに対するエントリを持ち、チャンク全体の連続的なデータの格納または断片化解消処理の実行以降に、チャンク内のデータに対する更新、削除に伴い断片化が発生しているか表す情報を管理する断片化状態管理機能を果たす。断片化状態管理テーブル323は、記憶媒体240の論理アドレス空間上の各チャンクのデータに対する断片化の発生数、および断片化が発生したアドレスの分布に関する情報を格納するエントリを持つ。また、各エントリは、対応するチャンクについて断片化解消対象推定部324による断片化解消対象の判定、および断片化解消対象の優先順位の必要があるかを表す、断片化状態の変化を表すフラグを持つ。
(Fragmentation state management table)
The fragmentation state management table 323 has an entry for each chunk in the storage medium, and after the continuous storage of the entire chunk or the execution of the defragmentation processing, the fragmentation associated with the update or deletion of the data in the chunk is performed. It performs a fragmentation state management function of managing information indicating whether or not an error has occurred. The fragmentation state management table 323 has entries for storing information on the number of occurrences of fragmentation for the data of each chunk in the logical address space of the
図4Bは、本実施形態に係る断片化状態管理テーブル323の構成を示す図である。断片化状態管理テーブル323の各エントリは、チャンクID421に対応付けて、チャンク内における断片化の発生数を表した断片化発生数422と、チャンクをさらに細分化した領域毎の断片化の発生有無を表す断片化分布情報423と、断片化状態の変化を表す状態変化フラグ424とを記憶する。
FIG. 4B is a diagram showing a configuration of the fragmentation state management table 323 according to the present embodiment. Each entry of the fragmentation state management table 323 is associated with the
更新監視部321は、Writeまたは削除対象のチャンクについて、更新、削除先のアドレスに対応するチャンクを細分化した領域を特定し、断片化が発生した領域と判断して断片化分布情報423における、対応したビットがセットされていない状態であればセットする。また、断片化分布情報423において新たにセットされたビット数の分だけ断片化発生数422を更新する。加えて、更新監視部321は更新、削除先のチャンクに対応するエントリについて断片化発生数422と断片化分布情報423とが変更されており、かつ、状態変化フラグ424がセットされていない場合は、状態変化フラグ424をセットする。
The
なお、断片化状態管理テーブル323の各エントリに格納されるデータの形式は、図4Bに示した形式に限定されず、例えば断片化分布情報423はチャンク内を細分化した分割領域毎の断片化有無をビットマップで表す形式以外に、細分化した分割領域について、断片化が発生した領域を識別可能な情報を列挙する形式であってもよい。また、例えば断片化発生数422と断片化分布情報423とによってチャンク内の断片化度合を表す形式ではなく、断片化発生数422を省略して、断片化分布情報423においてセットされたビット数によって断片化発生数422の代わりとする形式であってもよい。あるいは、より単純にチャンクに対するWriteアクセスの有無によって断片化の有無のみを表す形式であってもよい。さらに、図4Bには断片化状態管理テーブル323が更新頻度管理テーブル322と独立して示されているが、単体の一体化されたテーブルで構成されていてもよい。
Note that the format of the data stored in each entry of the fragmentation state management table 323 is not limited to the format shown in FIG. 4B. For example, the
(断片化解消対象リスト)
断片化解消対象リスト325は、断片化解消対象推定部324によって断片化解消対象に決定された、記憶媒体240の論理アドレス空間上のチャンクを断片化解消処理の優先度順に格納する。また、断片化解消対象リスト325は、断片化解消対象推定部324によって格納された、断片化解消対象のチャンク数を管理する。
(Fragmentation removal target list)
The
図4Cは、本実施形態に係る断片化解消対象リスト325の構成を示す図である。断片化解消対象リスト325は、断片化解消対象のチャンク数を表す断片化解消対象数431と、断片化解消処理の対象となる各チャンクについて、記憶媒体240の各チャンクを一意に示すチャンクID432と、各チャンクの断片化解消処理の優先順位を表す優先順位433とを記憶する。
FIG. 4C is a diagram illustrating a configuration of the fragmentation
なお、断片化解消対象リスト325のデータの形式は、図4Cに示した形式に限定されず、例えばチャンクID432を断片化解消処理の優先順位で整列したリストを作成することで、優先順位433を省略できる。
Note that the format of the data of the fragmentation
(断片化解消対象推定部)
断片化解消対象推定部324は、更新頻度管理テーブル322および断片化状態管理テーブル323が管理する、各チャンクの更新または削除の履歴および断片化状態の情報を参照して、記憶媒体240の論理アドレス空間の各チャンクについて、断片化解消処理が必要か否かの推定を行う断片化解消対象推定機能を果たす。また、断片化解消処理が必要と推定されたチャンクについて、断片化解消処理の優先順位を決定し、断片化解消処理対象のチャンク数を算出する。
(Fragmentation resolution target estimation unit)
The fragmentation elimination
まず、断片化解消対象推定部324は各チャンクに対して断片化状態管理テーブル323に格納された断片化発生数422を参照し、事前に定めた一定の基準値を上回るチャンクを断片化解消処理が必要と判定する。次に、チャンクについて断片化解消処理が必要と判定された場合に、チャンクについて断片化発生数422、および更新頻度管理テーブル322の対応するエントリに格納された更新頻度412や最終更新時刻を参照して、断片化解消処理の優先順位を決定する。そして、断片化解消対象推定部324は、チャンクを表す番号と決定された優先順位とを、それぞれチャンクID432と優先順位433として断片化解消対象リスト325に格納し、断片化解消対象数431の値を加算する。
First, the fragmentation elimination
なお、断片化解消対象推定部324における、各チャンクに対する断片化解消処理の必要性の判定基準は必ずしも基準値との比較に限定されない。例えば、優先順位の決定よりも前に各チャンクの更新頻度412や最終更新時刻を参照して、更新頻度が一定以上に高いチャンクは断片化を解消しても再度断片化が発生する可能性が高く断片化解消の効果が低いため、断片化が必要なチャンクから除外してもよい。
Note that the criterion for determining the necessity of defragmentation processing for each chunk in the defragmentation
また、各チャンクの断片化発生数422と比較する基準値については、例えば記憶媒体240内部のGCアルゴリズムによるデータ移動対象となりうるチャンクに限定することが可能である。具体的には、記憶媒体240が用いるGCアルゴリズムがデータ移動を最小化するように回収対象の領域を選択する場合、記憶媒体240の論理アドレス空間のサイズに対する記憶素子の余剰容量の割合をPとすると、必ず空き領域の割合がP以上の領域が回収対象に選択される。そこで、断片化発生数422を参照して、各チャンクの細分化した領域のうち断片化したデータ量の割合を計算し、計算結果がP未満となる場合に断片化解消対象から除外されるように基準値を設定することで、GCによるデータ移動の対象となり得ないチャンクを断片化解消対象から除外できる。
Further, the reference value to be compared with the
《断片化解消処理部》
図3において、断片化解消処理部330は、断片化解消対象リスト325と、断片化解消条件設定部331と、断片化解消処理制御部332と、再格納制御部333と、を備える。なお、断片化解消対象リスト325は、断片化管理部320と共有され、断片化解消対象のチャンク情報を受け取る。
《Defragmentation processing section》
In FIG. 3, the
(断片化解消条件設定部)
断片化解消条件設定部331は、断片化解消処理制御部332が記憶媒体240に対する断片化解消処理の開始、終了を判定するために必要な、記憶媒体240に含まれる断片化状態のチャンク数の基準値を管理し、設定する断片化解消条件設定機能を果たす。断片化解消条件設定部331は、基準値のチャンク数を、記憶媒体240内部のGCに伴うデータ移動の削減量から、断片化解消処理におけるチャンクの再格納に伴う総Write量を差し引いた、断片解消処理に関するコスト考慮後の効果の推測結果が最大となるように計算する。あるいは、ユーザから指定された記憶媒体の性能条件を満たすチャンク数の算出結果が設定される。
(Fragmentation resolution condition setting section)
The defragmentation
断片化解消処理の実行開始、実行停止の判断基準となる、断片化が発生したチャンク数の算出は、記憶媒体上の各チャンクに対してGCが行われた場合の空き領域の回収効率に基づき決定する。GCにおける空き領域の回収効率は、GCによって新たに格納可能となるホストコンピュータからのWriteデータ量と記憶媒体内部のデータ移動量の比率を表す。記憶媒体内部でGCに伴い移動の対象となるデータは、更新、削除によって断片化した状態で格納されたデータである。一方で、断片化解消処理を行った後に更新や削除が行われていないチャンクのデータは、断片化が発生せずに連続的に格納されているため、GCによる移動対象のデータに含まれない。つまり、GCにおける移動の対象となりうるデータの総容量は記憶媒体内の断片化が発生した状態のチャンク数で表される。 The calculation of the number of chunks in which fragmentation has occurred, which is a criterion for determining whether to start or stop execution of fragmentation resolution processing, is based on the efficiency of collecting free space when GC is performed on each chunk on the storage medium. decide. The collection efficiency of the free space in the GC indicates the ratio between the amount of write data from the host computer that can be newly stored by the GC and the amount of data movement inside the storage medium. The data to be moved along with the GC in the storage medium is data stored in a fragmented state by updating and deleting. On the other hand, chunk data that has not been updated or deleted after the defragmentation processing is performed is continuously stored without fragmentation, and thus is not included in data to be moved by GC. . That is, the total amount of data that can be moved in the GC is represented by the number of chunks in the storage medium in a state where fragmentation has occurred.
また、GCによる空き領域の回収効率から、断片化解消処理によるGCのデータ移動量の削減効果を計算できる。まず、空き領域の回収効率を用いてホストコンピュータからのWriteデータ量に対するGCの発生頻度を計算する。計算された発生頻度と、データの新規格納から更新または削除までの期間の情報を用いることで、GCに伴うデータ移動量を計算可能である。より具体的にはチャンク毎の更新頻度管理テーブル322に格納された更新頻度412の情報を利用して、各チャンクのデータが格納されてから更新または削除されるまでの平均期間を求められる。平均期間を断片化状態のチャンク数とGC処理の発生頻度、すなわちGC処理の平均発生間隔で割ることで各チャンクのデータがGC処理における移動対象となる回数の期待値の形で、GCに伴うデータ移動量を求められる。
In addition, the effect of reducing the data movement amount of the GC by the fragmentation eliminating process can be calculated from the efficiency of collecting the free space by the GC. First, the occurrence frequency of GC with respect to the amount of write data from the host computer is calculated using the collection efficiency of the free area. By using the calculated occurrence frequency and information on the period from the new storage of data to the update or deletion, it is possible to calculate the amount of data movement accompanying GC. More specifically, using the information on the
さらに、GCに伴うデータ移動量の差を断片化解消処理の前後で計算することで、断片化解消処理におるデータ移動量の削減量を計算できる。加えて断片化解消処理に必要なコストは、チャンクサイズ分のデータの記憶媒体240に対する格納である。コストを考慮することで、断片化解消処理による記憶媒体内部のGCに伴うデータ移動の削減量から、断片化解消処理におけるチャンクの再格納に伴う総Write量を差し引いた値を断片解消処理のコスト考慮後の効果が求められる。この効果が最大となるように、実行開始、停止の判断基準である断片化状態のチャンク数を設定すればよい。
Furthermore, by calculating the difference in the amount of data movement due to GC before and after the defragmentation processing, the amount of reduction in the amount of data movement in the defragmentation processing can be calculated. In addition, the cost required for the defragmentation processing is storage of the chunk size data in the
(断片化解消処理制御部)
断片化解消処理制御部332は、断片化解消処理が停止した状態では、断片化解消条件設定部331から断片化解消処理の開始条件となるチャンク数の情報を取得して、断片化解消処理が必要なチャンク数が開始条件のチャンク数を上回る場合は優先順位の高いチャンクから順番に断片化解消処理を開始する。一方、断片化解消処理を開始した状態では、断片化解消条件設定部331から断片化解消処理の終了条件となるチャンク数の情報を取得して、断片化解消処理が必要なチャンク数が停止条件のチャンク数を下回る場合は、断片化解消処理を終了する断片化解消処理制御機能を果たす。
(Fragmentation resolution processing control unit)
In a state where the defragmentation processing has been stopped, the fragmentation resolution
断片化解消処理制御部332は、断片化解消処理が停止した状態では断片化解消対象リスト325の断片化解消対象数431を参照して、断片化解消条件設定部331によって設定された断片化解消処理の開始条件となるチャンク数を比較する。比較の結果、算出されたチャンク数が断片化解消処理の開始条件となるチャンク数を上回る場合は、断片化解消処理を開始状態として、チャンクID432および優先順位433を参照して優先順位が高く設定されたチャンクから順番に断片化解消処理の対象としてチャンクの情報を再格納制御部333に通知する。一方で、断片化解消処理を開始した状態では断片化解消対象リスト325の断片化解消対象数431を参照して、断片化解消条件設定部331によって設定された断片化解消処理の停止条件となるチャンク数を比較する。比較の結果、算出されたチャンク数が断片化解消処理の停止条件となるチャンク数を下回る場合は、断片化解消処理を停止状態として断片化解消処理を終了する。
In a state where the defragmentation processing is stopped, the defragmentation
(再格納制御部)
再格納制御部333は、断片化解消処理の対象となったチャンクのデータを記憶媒体から読み出すためのRead要求、およびRead要求によって読み出されたチャンクのデータを記憶媒体の同一チャンクに再格納するためのWrite要求の発行を制御して、断片化解消処理を実行する再格納制御機能を果たす。
(Restorage control unit)
The
再格納制御部333は、断片化解消処理制御部332から通知された断片化解消処理対象のチャンクについて、対応するデータを記憶媒体240から読み出すためのRead要求を行うようにアクセス実行部310に対して指示する。また、Read要求によって読み出されたデータを記憶媒体240に再格納するためのWrite要求の発行をアクセス実行部310に対して指示することで、チャンクの断片化解消処理を実施する。記憶媒体240からのデータの読み出しは、記憶媒体240に対して直接Read要求を行う以外に、記憶媒体240に対するキャッシュメモリ242に対して要求を行うことでも代用できる。
The
(断片化推定テーブルおよび断片化解消処理管理テーブル)
図4Dは、本実施形態に係る断片化推定テーブル440および断片化解消処理管理テーブル450の構成を示す図である。なお、断片化推定テーブル440および断片化解消処理管理テーブル450における断片化推定条件(第3閾値)や断片化解消処理開始条件(第1閾値)および断片化解消処理終了条件(第2閾値)は、最初に設定された固定値であっても、随時、環境変化に応じて算出される更新値であってもよい。
(Fragmentation estimation table and fragmentation resolution processing management table)
FIG. 4D is a diagram showing a configuration of the fragmentation estimation table 440 and the fragmentation resolution processing management table 450 according to the present embodiment. The fragmentation estimation condition (third threshold value), the fragmentation resolution process start condition (first threshold value), and the fragmentation resolution process end condition (second threshold value) in the fragmentation estimation table 440 and the fragmentation resolution process management table 450 are as follows. , May be a fixed value initially set, or may be an updated value calculated as needed according to an environmental change.
断片化推定テーブル440は、断片化解消対象推定部324が断片化解消対象となるチャンクを断片化推定条件(第3閾値)に基づいて推定するために使用される。また、断片化推定テーブル440は、断片化解消対象推定部324が断片化していると推定したチャンクの断片化解消処理を行なう優先順位を設定するために使用される。
The fragmentation estimation table 440 is used by the defragmentation
断片化推定テーブル440は、チャンクID441に対応付けて、チャンク容量442や断片化発生数443などの断片化推定のためのパラメータを記憶する。そして、断片化推定条件(第3閾値)444に基づいて推定された断片化有無フラグ445を記憶する。本実施形態においては、断片化推定条件(第3閾値)444は断片化発生数の基準値であり、断片化発生数443と断片化推定条件(第3閾値)444との大小によりチャンクの断片化が推定される。
The fragmentation estimation table 440 stores parameters for fragmentation estimation, such as the
そして、本実施形態においては、断片化推定テーブル440は、断片化と推定されたチャンクの更新頻度446の、他の断片化と推定されたチャンクの更新頻度との比較に基づいて、断片化解消処理の優先順位447が設定される。
In the present embodiment, the fragmentation estimation table 440 stores the fragmentation resolution based on the comparison of the
断片化解消処理管理テーブル450は、断片化解消処理制御部332が断片化解消条件設定部331からの断片化解消処理開始条件(第1閾値)と断片化解消処理終了条件(第2閾値)とに基づいて、断片化解消処理の開始または終了を制御するために使用される。
The defragmentation process management table 450 includes a defragmentation process start condition (first threshold) and a defragmentation process end condition (second threshold) from the defragmentation
断片化解消処理管理テーブル450は、断片化解消対象リスト325の断片化解消対象数431からの断片化チャンク数451と、断片化解消処理開始条件(第1閾値)452との比較に対応して、断片化解消処理開始フラグ453を設定する。また、断片化解消処理管理テーブル450は、断片化チャンク数451と、断片化解消処理終了条件(第2閾値)454との比較に対応して、断片化解消処理終了フラグ455を設定する。
The fragmentation resolution processing management table 450 corresponds to the comparison between the number of
(断片化推定条件設定テーブルおよび断片化解消処理条件設定テーブル)
図4Eは、本実施形態に係る断片化推定条件設定テーブル460および断片化解消処理条件設定テーブル470の構成を示す図である。
(Fragmentation estimation condition setting table and fragmentation elimination processing condition setting table)
FIG. 4E is a diagram showing a configuration of the fragmentation estimation condition setting table 460 and the fragmentation elimination processing condition setting table 470 according to the present embodiment.
断片化推定条件設定テーブル460は、断片化解消対象推定部324が断片化推定条件(第3閾値)を設定するために使用される。断片化推定条件設定テーブル460は、断片化推定条件設定パラメータ461に基づいて、断片化推定条件設定アルゴリズム462に従って生成された、断片化推定条件(第3閾値)463を記憶する。なお、断片化推定条件設定パラメータ461として、チャンク容量、チャンク分割数、分割領域容量などを示したが、これに限定されない。
The fragmentation estimation condition setting table 460 is used by the fragmentation elimination
断片化解消処理条件設定テーブル470は、断片化解消条件設定部331が断片化解消処理開始条件(第1閾値)と断片化解消処理終了条件(第2閾値)とを設定するために使用される。断片化解消処理条件設定テーブル470は、断片化解消条件設定パラメータ471に基づいて、断片化解消条件設定アルゴリズム472に従って生成された、断片化解消処理開始条件(第1閾値)473と断片化解消処理終了条件(第2閾値)474を記憶する。なお、断片化解消条件設定パラメータ471として、記憶媒体のチャンク総数(C)、有効データ格納チャンク数(A)、断片化状態チャンク数(B)、単位時間当りのWriteデータ量(W)、チャンクの平均更新間隔(T)などを示したが、これに限定されない。
The defragmentation processing condition setting table 470 is used by the defragmentation
《ホストコンピュータのハードウェア構成》
図5は、本実施形態に係る記憶制御部220を含むホストコンピュータのハードウェア構成を示すブロック図である。なお、図5においては、記憶制御部220はホストコンピュータ210のソフトウェア処理として図示するが、記憶制御部220を、ホストコンピュータ210とは独立したワンチップのコンピュータで実現してもよい。
《Hardware configuration of host computer》
FIG. 5 is a block diagram illustrating a hardware configuration of a host computer including the
図5で、CPU(Central Processing Unit)510は演算制御用のプロセッサであり、プログラムを実行することで図3の記憶制御部220の機能構成部を実現する。ROM(Read Only Memory)520は、初期データおよびプログラムなどの固定データおよびプログラムを記憶する。また、通信制御部530は、ネットワーク250を介して記憶媒体240や他の装置と通信する。なお、CPU510は1つに限定されず、複数のCPUであっても、あるいは画像処理用のGPU(Graphics Processing Unit)を含んでもよい。また、通信制御部530は、CPU510とは独立したCPUを有して、RAM(Random Access Memory)540の領域に送受信データを書き込みあるいは読み出しするのが望ましい。また、RAM540とストレージ550との間でデータを転送するDMAC(Direct Memory Access Controller)を設けるのが望ましい(図示なし)。さらに、入出力インタフェース560は、CPU510とは独立したCPUを有して、RAM540の領域に入出力データを書き込みあるいは読み出しするのが望ましい。したがって、CPU510は、RAM540にデータが受信あるいは転送されたことを認識してデータを処理する。また、CPU510は、処理結果をRAM540に準備し、後の送信あるいは転送は通信制御部530やDMAC、あるいは入出力インタフェース560に任せる。
In FIG. 5, a CPU (Central Processing Unit) 510 is a processor for arithmetic control, and implements the functional components of the
RAM540は、CPU510が一時記憶のワークエリアとして使用するランダムアクセスメモリである。RAM540には、本実施形態の実現に必要なデータを記憶する領域が確保されている。論理アドレス541は、OS211またはアプリケーション212から記憶媒体240にアクセスしたアドレスである。断片化推定条件463は、断片化解消対象推定部324が各チャンクを断片化したと推定するための閾値である。断片化推定テーブル440は、図4Dに示した、断片化解消対象推定部324が各チャンクを断片化したと推定するために使用するテーブルである。断片化解消処理条件473/474は、断片化解消処理制御部332が断片化解消処理を開始または終了するための閾値である。断片化解消処理管理テーブル450は、図4Dに示した、断片化解消処理制御部332が断片化解消処理を開始または終了するために使用するテーブルである。読み出し情報545は、OS211またはアプリケーション212からの要求に基づき記憶媒体240からReadした情報である。読み込み情報546は、OS211またはアプリケーション212からの要求に基づき記憶媒体240にWriteする情報である。入出力データ547は、入出力インタフェース560を介して入出力されるデータである。送受信データ548は、通信制御部530を介して送受信されるデータである。アプリケーション使用領域549は、記憶制御以外の処理でアプリケーションが使用するエリアである。
ストレージ550には、データベースや各種のパラメータ、あるいは本実施形態の実現に必要な以下のデータまたはプログラムが記憶されている。更新頻度管理テーブル322は、図4Aに示した、各チャンクの更新頻度を管理するためのテーブルである。断片化状態管理テーブル323は、図4Bに示した、各チャンクの断片化状態を管理するためのテーブルである。断片化解消対象リスト325は、図4Cに示した、断片化解消対象のチャンク数と、断片化解消処理の優先順位を記憶するリストである。断片化推定条件設定アルゴリズム462は、図4Eに示した、断片化推定条件を生成するためのアルゴリズムである。断片化解消条件設定アルゴリズム472は、図4Eに示した、断片化解消処理の開始条件または終了条件を生成するためのアルゴリズムである。
The
ストレージ550には、以下のプログラムが格納される。OS211は、本ホストコンピュータ210の全体を制御する基礎プログラムである。アプリケーション212は、現在、本ホストコンピュータ210が実行中のプログラムである。記憶制御プログラム552は、OS211やアプリケーション212からの記憶媒体240へのアクセスを受けて、本実施形態のアクセス制御を実現するプログラムである。Read制御モジュール553は、記憶制御プログラム552における、記憶媒体240からのReadを制御するモジュールである。Write制御モジュール554は、記憶制御プログラム552における、記憶媒体へのWriteを制御するモジュールである。断片化管理モジュール555は、各チャンクの断片化状態を監視して、断片化状態と推定されるチャンク数を管理するためのモジュールである。断片化解消処理モジュール556は、断片化状態と推定されるチャンク数に基づいて断片化解消処理を制御して、断片化状態を解消するために各チャンクにおける再配置を行なうモジュールである。
The
入出力インタフェース560は、入出力機器との入出力データをインタフェースする。入出力インタフェース560には、表示部561、操作部562、が接続される。また、入出力インタフェース560には、さらに、記憶媒体240が接続されてもよい。さらに、音声出力部であるスピーカや、音声入力部であるマイク、あるいは、GPS位置判定部が接続されてもよい。
The input /
なお、図5のRAM540やストレージ550には、ホストコンピュータ210が有する汎用の機能や他の実現可能な機能に関連するプログラムやデータは図示されていない。
Note that programs and data related to general-purpose functions and other realizable functions of the
《記憶制御部の処理手順》
図6は、本実施形態に係る記憶制御部220の処理手順を示すフローチャートである。このフローチャートは、図5のCPU510がRAM540を使用して実行し、図3の機能構成部を実現する。
<< Processing procedure of storage control unit >>
FIG. 6 is a flowchart illustrating a processing procedure of the
ホストコンピュータ210の記憶制御部220は、ステップS601において、各チャンクの断片化推定のために閾値、および、チャンク数に基づいて断片化解消処理を開始または終了する閾値を設定する、閾値設定処理を実行する。閾値はあらかじめ算出された固定閾値であっても、現在のホストコンピュータ210や記憶媒体240の状態に基づいて動的に算出された閾値であってもよい。
In step S601, the
記憶制御部220は、ステップS611において、OS211またはアプリケーション212からのRead要求であるか否かを判定する。Read要求であれば、記憶制御部220は、ステップS613において、記憶媒体240からのRead処理を実行する。Read要求でなければ、記憶制御部220は、ステップS621において、OS211またはアプリケーション212からのWrite要求であるか否かを判定する。Write要求であれば、記憶制御部220は、ステップS623において、記憶媒体240へのWrite処理を実行する。
In step S611, the
Read要求でもWrite要求でもなければ、記憶制御部220は、ステップS631において、断片化管理のタイミングであるか否かを判定する。断片化管理のタイミングであれば、記憶制御部220は、ステップS633において、断片化管理処理を実行する。Read要求でもWrite要求でも断片化管理タイミングでもなければ、記憶制御部220は、ステップS641において、断片化解消のタイミングであるか否かを判定する。断片化解消のタイミングであれば、記憶制御部220は、ステップS643において、断片化解消処理を実行する。
If neither a read request nor a write request, the
なお、図6においては、シーケンスに処理を実行するように示したが、各処理を並列に独立して実行してもよい。また、断片化管理タイミングや断片化解消タイミングは任意のタイミングであっても、他の処理と関連したタイミングであってもよい。例えば、断片化管理タイミングは、ステップS623のWrite処理の完了時であってもよい(Writeキュー311を参照して行なう)。また、断片化解消タイミングは、ステップS633の断片化管理処理に引き続いたタイミングであってもよい(Writeキュー311を参照して行なう)。 In FIG. 6, the processing is executed in sequence, but each processing may be executed independently in parallel. Further, the fragmentation management timing and the fragmentation elimination timing may be arbitrary timings or timings related to other processes. For example, the fragmentation management timing may be when the Write process in step S623 is completed (performed with reference to the Write queue 311). Further, the fragmentation elimination timing may be a timing subsequent to the fragmentation management processing in step S633 (performed with reference to the write queue 311).
(閾値設定処理)
ステップS601における閾値設定処理においては、断片化解消処理開始条件(第1閾値)および断片化解消処理終了条件(第2閾値)と、断片化推定条件(第3閾値)と、が設定される。なお、断片化解消処理開始条件(第1閾値)および断片化解消処理終了条件(第2閾値)は同じ閾値であってもよい。
(Threshold setting processing)
In the threshold setting process in step S601, a fragmentation elimination process start condition (first threshold), a fragmentation elimination process end condition (second threshold), and a fragmentation estimation condition (third threshold) are set. The defragmentation processing start condition (first threshold) and the defragmentation processing end condition (second threshold) may be the same threshold.
断片化解消処理開始条件(第1閾値)は、断片化解消処理(S643)において、断片化解消処理を開始するための閾値(断片化と推定されたチャンク数の上限基準値)であり、断片化解消処理終了条件(第2閾値)は、断片化解消処理を終了するための閾値(断片化と推定されたチャンク数の下限基準値)である。また、断片化推定条件(第3閾値)は、断片化管理処理(S633)において、各チャンクが断片化解消対象であるか否かの推定のための閾値(各チャンクの断片化発生数の基準値)である。 The defragmentation processing start condition (first threshold) is a threshold (upper reference value of the number of chunks estimated to be fragmented) for starting the defragmentation processing in the defragmentation processing (S643). The fragmentation elimination process end condition (second threshold) is a threshold value (lower reference value for the number of chunks estimated to be fragmented) for ending the fragmentation elimination process. Further, the fragmentation estimation condition (third threshold) is a threshold for estimating whether or not each chunk is a target for defragmentation in the fragmentation management process (S633) (a reference for the number of fragmentation occurrences of each chunk). Value).
なお、ステップS601における閾値設定処理においては、あらかじめ算出された固定閾値を設定してもよいし、後述する算出アルゴリズムに従って、取得した条件パラメータに基づいて閾値を動的に算出して、設定してもよい。 In the threshold value setting process in step S601, a fixed threshold value calculated in advance may be set, or the threshold value may be dynamically calculated and set based on the acquired condition parameters according to a calculation algorithm described later. Is also good.
(Read処理)
図7は、本実施形態に係るRead処理(S613)の手順を示すフローチャートである。図7は、図6のステップS613において、例えば、OSからRead要求を受け取り、要求されたデータを返す手順である。
(Read processing)
FIG. 7 is a flowchart illustrating a procedure of the read process (S613) according to the present embodiment. FIG. 7 shows a procedure in which, for example, a read request is received from the OS and the requested data is returned in step S613 of FIG.
記憶制御部220のアクセス実行部310は、ホストコンピュータ210で動作するソフトウェアやOSからのRead要求を受け取ると、記憶媒体240に対して要求先のアドレスについてデータのReadを行い、結果をアクセス元のソフトウェアやOSに返して処理を終了する(ステップS701)。
Upon receiving a Read request from software or an OS running on the
以上のステップS701の処理を行い、本実施形態においてホストコンピュータ210で動作するソフトウェアやOSからRead要求を受け取り、要求されたデータを返す動作が完了する。
By performing the processing in step S701 described above, the operation of receiving a Read request from the software or OS operating on the
(Write処理)
図8は、本実施形態に係るWrite処理(S623)の手順を示すフローチャートである。図8は、例えば、図6のステップS623において、ホストコンピュータ210で動作するソフトウェア、OSから発行されたWrite要求または削除要求の処理を行う手順である。
(Write processing)
FIG. 8 is a flowchart illustrating the procedure of the write process (S623) according to the present embodiment. FIG. 8 shows a procedure for performing processing of a write request or a deletion request issued from the software or the OS running on the
記憶制御部220のアクセス実行部310は、ホストコンピュータ210で動作するソフトウェア、OSからのWrite要求または削除要求を受け取ると、更新監視部321に対してWriteまたは削除要求の情報を伝える(ステップS801)。更新監視部321は、アクセス実行部310から受け取ったアクセス要求に関する、記憶媒体240のアクセス先の論理アドレスとサイズとからアクセス先となる論理アドレス空間上のチャンクを特定する(ステップS803)。
Upon receiving a write request or a deletion request from the software or OS running on the
更新監視部321は、ステップS803で特定したチャンクに対応する、更新頻度管理テーブル322のエントリに格納された更新頻度412の値を1つ加算する(ステップS805)。更新監視部321は、アクセス実行部310から受け取ったアクセス要求に関する、記憶媒体240のアクセス先の論理アドレスとサイズとから、アクセス先についてチャンクを細分化した領域の単位で特定する。そして、ステップS803で特定したチャンクに対応する、断片化状態管理テーブル323のエントリに格納された断片化分布情報423において、アクセス先の領域に対応するビットがセットされているか確認する(ステップS807)。
The
ステップS807の確認の結果、ステップS803で特定したチャンクに対応する、断片化状態管理テーブル323に格納された、アクセス先の領域に対応する断片化分布情報423のビットが全てセットされていた場合(ステップS809のNo判定)、ステップS813の処理を実行する。S807の確認の結果、ステップS803で特定したチャンクに対応する、断片化状態管理テーブル323のエントリに格納された、アクセス先の領域に対応する断片化分布情報423のビットにセットされていないビットが存在する場合(ステップS809のYes判定)、更新監視部321は、断片化分布情報423のアクセス先領域に対応するビットをセットする。また、対応するエントリに格納された断片化状態管理テーブル323の断片化発生数422の値について、断片化分布情報423において新たにセットしたビット数を加算する。さらに、更新監視部321は、対応するエントリの状態変化フラグ424をセットする(ステップS811)。
As a result of the confirmation in step S807, if all the bits of the
アクセス実行部310は、ステップS801で受け取ったアクセス要求を記憶媒体240に発行し、記憶媒体240から完了応答を受け取ると、アクセス要求元であるホストコンピュータ210で動作するソフトウェア、OSに完了応答を返して処理を終了する(ステップS813)。
The
以上のステップS801からS813までの処理を行い、ホストコンピュータ210で動作するソフトウェア、OSから発行されたWrite要求または削除要求の処理を行う動作が完了する。ステップS801からS813の処理順序は、必ずしも図8に示した順序である必要はない。例えば、ステップS801からS811、およびステップS813の処理は同時期に実行、あるいは順序を入れ替えた実行が可能である。また、ステップS805、およびステップS807からS811の処理についても同時期の実行、あるいは順序を入れ替えた実行が可能である。
The processing from steps S801 to S813 described above is performed, and the operation of processing the software running on the
(断片化推定処理)
図9は、本実施形態に係る断片化推定処理(S633)の手順を示すフローチャートである。断片化推定処理においては、断片化解消が必要なチャンクを推定し、断片化解消処理の優先順位を設定する。
(Fragmentation estimation processing)
FIG. 9 is a flowchart illustrating the procedure of the fragmentation estimation process (S633) according to the present embodiment. In the fragmentation estimating process, the chunks that need to be defragmented are estimated, and the priorities of the defragmentation processes are set.
記憶制御部220の断片化解消対象推定部324は、任意のタイミングで、記憶媒体240の論理アドレス空間における先頭のチャンクに着目し、断片化解消処理が必要であるか判定を開始する(ステップS901)。断片化解消対象推定部324は、現在着目中のチャンクに対応する断片化状態管理テーブル323のエントリの状態変化フラグ424を参照する(ステップS903)。
The fragmentation elimination
着目中のチャンクに対応する状態変化フラグ424がセットされていない場合(ステップS905のNo判定)、ステップS919以降の処理を実行する。着目中のチャンクに対応する状態変化フラグ424がセットされている場合(ステップS905のYes判定)、断片化解消対象推定部324は、現在着目中のチャンクに対応する断片化状態管理テーブル323のエントリの断片化発生数422を参照して、事前に定めた一定の断片数の基準値と比較する(ステップS907)。なお、断片数の基準値は、断片化解消対象推定部324に関する上記説明における方法で事前に設定する。
If the
ステップS907の比較結果で、断片化発生数422が基準値未満の場合(ステップS909のNo判定)、ステップS919以降の処理を実行する。ステップS907の比較結果で、断片化発生数422が基準値以上の場合(ステップS909のYes判定)、断片化解消対象推定部324は、着目中のチャンクに対応する更新頻度管理テーブル322のエントリに格納された更新頻度412を参照する(ステップS911)。
If the
断片化解消対象推定部324は、断片化解消対象リスト325に格納されたチャンクID432で表される各チャンクに対応した、更新頻度管理テーブル322に格納された更新頻度412を参照し、各チャンクと、現在着目中のチャンクについて、更新頻度の少ない順番にソートする(ステップS913)。そして、断片化解消対象推定部324は、現在着目中のチャンクに対応する番号を断片化解消対象リスト325における新たなチャンクID432として追加する。また、ステップS913におけるソート結果に基づき、断片化解消対象リスト325に登録された各チャンク番号に対応する優先順位433を更新する(ステップS915)。
The fragmentation elimination
断片化解消対象推定部324は、現在着目中のチャンクに対応する断片化状態管理テーブル323のエントリの状態変化フラグ424をリセットする(ステップS917)。断片化解消対象推定部324は、現在着目中のチャンクが記憶媒体240の論理アドレス空間における末尾のチャンクであるか確認する(ステップS919)。
The fragmentation elimination
現在着目中のチャンクが、記憶媒体240の論理アドレス空間における末尾のチャンクではない場合(ステップS921のNo判定)、断片化解消対象推定部324は、着目するチャンクを記憶媒体240の論理アドレス空間における直後のアドレスに対応するチャンクに変更して、ステップS903から処理を再実行する(ステップS923)。現在着目中のチャンクが、記憶媒体240の論理アドレス空間における末尾のチャンクである場合(ステップS921のYes判定)、断片化解消が必要なチャンクを判定し、断片化解消処理の優先順位を決定する処理を終了する。
If the currently focused chunk is not the last chunk in the logical address space of the storage medium 240 (No in step S921), the fragmentation elimination
以上のステップS901からS923までの処理を行い、断片化解消が必要なチャンクを判定し、断片化解消処理の優先順位を決定する動作が完了する。ステップS901からS923までの処理順序は、必ずしも図9に示した手順である必要はない。例えば、ステップS901およびステップS923において断片化状態管理テーブル323のエントリの状態変化フラグ424を確認して、着目するチャンクとして断片化状態が変化したチャンクを直接指定できれば、ステップS903およびS905のNo判定の処理を省略できる。
The above-described steps S901 to S923 are performed to determine the chunk that needs to be defragmented, and the operation of determining the priority of the defragmentation process is completed. The processing order from steps S901 to S923 does not necessarily have to be the procedure shown in FIG. For example, the
(断片化解消処理)
図10は、本実施形態に係る断片化解消処理(S643)の手順を示すフローチャートである。断片化解消処理では、断片化解消対象のチャンクに対する断片化解消処理の開始、実行、停止を行う。
(Defragmentation processing)
FIG. 10 is a flowchart illustrating the procedure of the fragmentation eliminating process (S643) according to the present embodiment. In the defragmentation process, the defragmentation process for the chunk to be defragmented is started, executed, and stopped.
記憶制御部220の断片化解消処理制御部332は、任意のタイミングで、断片化解消対象リスト325から断片化解消対象数431を参照して、記憶媒体240の断片化解消対象のチャンク数を取得する(ステップS1001)。断片化解消処理制御部332は、ステップS1001で取得した断片化解消処理対象のチャンク数と、断片化解消条件設定部331が設定した断片化解消処理の開始条件となるチャンク数(第1閾値)とを比較する(ステップS1003)。
The defragmentation
断片化解消対象のチャンク数が断片化解消処理の開始条件のチャンク数を下回る場合(ステップS1005のNo判定)、断片化解消処理を終了する。なお、本断片化解消処理が独立して並列に実行される場合は、ステップS1001からの処理を再実行する。断片化解消対象のチャンク数が断片化解消処理の開始条件のチャンク数以上の場合(ステップS1005のYes判定)、断片化解消処理制御部332は、断片化解消対象リスト325から優先順位433が最も高いチャンクID432を抽出し、再格納制御部333に通知する(ステップS1007)。
When the number of chunks to be defragmented is smaller than the number of chunks as the condition for starting the defragmentation process (No in step S1005), the defragmentation process is terminated. If the fragmentation elimination processing is executed independently and in parallel, the processing from step S1001 is executed again. If the number of chunks to be defragmented is equal to or greater than the number of chunks in the start condition of the defragmentation processing (Yes in step S1005), the defragmentation
再格納制御部333は、ステップS1007で通知されたチャンクのデータを読み出すためのRead要求、およびRead要求で読み出されたデータを再格納するためのWrite要求を断片化解消処理としてアクセス実行部310を介して実行する(ステップS1009)。
The
断片化解消処理制御部332は、ステップS1007で通知したチャンクに対する再格納処理が完了すると、断片化解消対象リスト325から対応するチャンクID432、優先順位433の情報を削除し、断片化解消対象数431の値を1つ減算する(ステップS1011)。断片化解消処理制御部332は、断片化状態管理テーブル323の断片化解消処理が終了したチャンクに対応するエントリに格納された断片化発生数422、断片化分布情報423の各ビット、状態変化フラグ424を全て0“ゼロ”にリセットする(ステップS1013)。
When the re-storing process for the chunk notified in step S1007 is completed, the fragmentation resolution
断片化解消処理制御部332は、ステップS1011で減算した断片化解消対象数431の値と、断片化解消条件設定部331が設定した断片化解消処理の停止条件となるチャンク数(第2閾値)とを比較する(ステップS1015)。断片化解消対象数431が断片化解消処理の停止条件のチャンク数を上回る場合(ステップS1017のNo判定)、ステップS1007からの断片化解消の処理を再実行する。
The defragmentation
断片化解消対象数431が断片化解消処理の停止条件のチャンク数以下の場合(ステップS1017のYes判定)、断片化解消処理を終了する。なお、本断片化解消処理が独立して並列に実行される場合は、ステップS1001からの処理を再実行する。
When the fragmentation
以上のステップS1001からS1017までの処理を行い、断片化解消処理の対象のチャンクに対する断片化解消処理の実行、停止を行う動作を実行する。ステップS1001からS1017までの処理順序は、必ずしも図10に示した順序である必要はない。例えば、ステップS1007からS1009、ステップS1011、ステップS1013の各処理は同時期に実行、あるいは順序を入れ替えた実行が可能である。また、ステップS1005の判定において、断片化解消対象のチャンク数が断片化解消処理の開始条件のチャンク数を上回る場合にYes判定、断片化解消処理の開始条件のチャンク数以下の場合にNo判定としてもよい。同様に、ステップS1017の判定において断片化解消対象のチャンク数が断片化解消処理の停止条件のチャンク数を下回る場合にYes判定、断片化解消処理の停止条件のチャンク数以上の場合にNo判定としてもよい。 The processing from the above steps S1001 to S1017 is performed, and the operation of executing and stopping the fragmentation eliminating process for the chunk to be subjected to the fragmentation eliminating process is executed. The processing order from steps S1001 to S1017 does not necessarily need to be the order shown in FIG. For example, each processing of steps S1007 to S1009, step S1011 and step S1013 can be executed at the same time or executed in a different order. In addition, in the determination of step S1005, a Yes determination is made when the number of chunks to be defragmented exceeds the number of chunks as a condition for starting the defragmentation process. Is also good. Similarly, if the number of chunks to be defragmented is smaller than the number of chunks for stopping the defragmentation processing in the determination of step S1017, the determination is Yes, and if the number of chunks is equal to or larger than the number of chunks for the stop condition for fragmentation resolution processing, the determination is No. Is also good.
《閾値の設定方法》
以下、閾値の設定方法の具体例を説明する。しかし、本実施形態の閾値は、これらの設定方法に限定されるものではない。
《Setting method of threshold value》
Hereinafter, a specific example of the threshold setting method will be described. However, the threshold value of the present embodiment is not limited to these setting methods.
(各チャンクの断片化推定条件)
図9のステップS907において、断片化発生数443と比較する断片化推定条件(第3閾値)444は、例えば以下の手順で決定する。
(Estimation conditions for fragmentation of each chunk)
In step S907 of FIG. 9, the fragmentation estimation condition (third threshold value) 444 to be compared with the
まず、記憶媒体内部の記憶素子の総物理容量に対する、記憶媒体の使用容量の割合αを算出する。記憶媒体に格納されたデータが記憶素子上に均等に分散した状態で格納された場合、記憶媒体の各領域に含まれる有効なデータの割合はαで表される。つまり、記憶媒体内部でGCが効率的に動作する場合に、回収される記憶領域に含まれる有効なデータの割合は必ずα以下で表される。 First, the ratio α of the used capacity of the storage medium to the total physical capacity of the storage elements inside the storage medium is calculated. When the data stored in the storage medium is stored in a state of being uniformly distributed on the storage elements, the ratio of valid data included in each area of the storage medium is represented by α. That is, when the GC operates efficiently in the storage medium, the ratio of valid data included in the collected storage area is always represented by α or less.
よって、断片化を判定するチャンクに含まれる分割領域について、更新によって断片化状態となった分割領域の割合が(1−α)未満のチャンクのデータは断片化の度合が低く、GCによる回収対象とならない。チャンクに含まれる分割領域数をNとすると、チャンクの断片化を判断するための断片化数である断片化推定条件444を{(1−α)×N}とすれば、断片化が進んだチャンクのみを断片化状態であると判定できる。
Therefore, with respect to the divided areas included in the chunk for which the fragmentation is determined, the chunk data in which the ratio of the divided areas that have become fragmented by the update is less than (1-α) has a low degree of fragmentation, and is subject to collection by GC. Does not. Assuming that the number of divided regions included in a chunk is N, the fragmentation proceeds if the
(断片化解消処理開始条件/断片化解消処理停止条件)
図10のステップS1005およびステップS1017において、断片化解消対象数431と比較する断片化解消処理の開始条件および停止条件のチャンク数は、断片化解消条件設定部331によって、例えば以下の手順で決定する。なお、以下の手順では、断片化解消処理の開始条件および停止条件のチャンク数を同様にする例を説明する。
(Fragmentation resolution processing start condition / fragmentation resolution processing stop condition)
In steps S1005 and S1017 of FIG. 10, the number of chunks of the start condition and the stop condition of the defragmentation process to be compared with the number of
記憶媒体240に含まれる物理的な記憶素子の総容量をチャンク数に換算した、総チャンク数をCと定義する。まず、断片化解消条件設定部331は、記憶媒体240の論理アドレス空間の使用状況から、有効なデータを格納するチャンク数Aを算出する。記憶媒体240に含まれるチャンクにおいて、更新によって断片化状態であるチャンクの数をBとした場合、有効なデータが格納されており、なおかつ更新が行われない、すなわち記憶媒体240内部のGCにおいて回収対象とならないチャンクの数は(A−B)で求められる。よって、記憶媒体240においてGCによる回収の対象となる記憶素子の総容量は、チャンク数に換算すると{C−(A−B)}=C−A+Bで表される。つまり、断片化状態であるB個のチャンクに含まれるデータを、C−A+B個のチャンクの総容量に相当する記憶素子に追記形式で格納することになる。各チャンクに対して均等に更新が行われると仮定した場合、記憶媒体240のGC処理における回収効率をEと定義すると、E=(C−A+B−B)/(C−A+B)=(C−A)/(C−A+B)で表される。
The total number of chunks obtained by converting the total capacity of the physical storage elements included in the
ホストコンピュータ210の記憶媒体240に対する単位時間あたりのWriteデータ量をチャンク数に換算した値をWとすると、記憶媒体240の内部ではGCにおいて単位時間あたりにW/E個のチャンクに対する回収処理が発生する。記憶媒体240の物理素子に対してGCによる記憶領域の回収が均等に行われる場合、記憶領域2に含まれる断片化状態の各チャンクに含まれるデータがGCに伴う移動処理の対象となる時間間隔をRとすると、R=(C−A+B)/(W/E)=(C−A)/Wで表される。
Assuming that a value obtained by converting the amount of write data per unit time to the
続いて、断片化解消条件設定部331は、記憶媒体240に含まれる各チャンクのデータの平均更新頻度から、記憶媒体240に含まれる断片化状態の各チャンクが更新されてから次に更新されるまでの平均更新間隔Tを算出する。断片化状態のチャンクに含まれるデータが、次に更新されるまでの間に記憶媒体240内部のGCに伴う移動処理の対象となる回数の期待値は、T/R=T・W/(C−A)で表される。また、断片化状態の各チャンクに関する、更新されるまでの間にGCに伴って移動されるデータの総容量をチャンク数で表すと、GCによる1回のデータ移動処理によって1−Eチャンク分のデータが移動する。そのため、各チャンクのデータが更新されるまでのGCによる総データ移動量Mをチャンク数で表すと、M=(1−E)・(T/R)=B・T・W/{(C−A+B)・(C−A)}で表される。
Subsequently, the fragmentation elimination
一方で、断片化状態のチャンクに対して、断片化状態を解消するためにチャンク全体を記憶媒体240に対して再格納した場合、記憶媒体240に対してチャンクのサイズに等しいWriteが発生する。つまり、断片化状態のチャンクに対する、更新されるまでのGCによる総データ移動量Mに対してM>1が成り立つ場合に、断片化解消処理を行うことで記憶媒体240に対する格納データ量を削減できる。よって、記憶媒体240における記憶素子の総容量を表すチャンク数Cが既知であり、記憶媒体240における、有効なデータを格納するチャンク数A、ホストコンピュータ210からの単位時間あたりのWriteデータ量をチャンク数に換算した値W、断片化状態の各チャンクが更新されてから次に更新されるまでの平均更新間隔Tが事前に求められている場合、断片化解消条件設定部331は更新によって断片化状態であるチャンクの数Bについて、M>1が成り立つ最小の整数値を基準として、図10のステップS1005およびステップS1017で用いる断片化解消処理の開始および停止条件のチャンク数を決定できる。
On the other hand, when the entire chunk is re-stored in the
また、断片化解消条件設定部331は、A、W、Tについて事前の計測結果を用いて開始条件、停止条件のチャンク数を算出するだけでなく、更新監視部321による記憶媒体240に対するWrite要求の監視結果を基に、動的に算出してホストコンピュータ210から記憶媒体240に対するWrite要求の状況に合わせて断片化解消処理の開始条件、停止条件を最適化することが可能である。例えば、有効なデータを格納するチャンク数A、およびホストコンピュータ210からの単位時間あたりのWriteデータ量を表すWは、更新監視部321による記憶媒体240に対するWrite、消去要求を監視することで算出可能である。加えて、各チャンクの平均更新間隔Tは、更新頻度管理テーブル322から記憶媒体240の各チャンクの更新頻度412を取得することで動的に算出可能である。
The fragmentation elimination
なお、上記算出された断片化解消条件のチャンク数を、開始条件および終了条件の共通の閾値として使用して、閾値のチャンク数Bとなるように制御することもできるが、開始条件(第1閾値)と終了条件(第2閾値)とを次のように異なるチャンク数に設定することもできる。 The calculated number of chunks of the fragmentation elimination condition can be used as a common threshold for the start condition and the end condition, and can be controlled to be the threshold chunk number B. The threshold value) and the end condition (second threshold value) can be set to different numbers of chunks as follows.
(1)例えば、開始判定のチャンク数Bから事前に定めた一定数X(0≦X≦B)を減算した値(B−X)を終了判定のチャンク数とする。例えばX=10とすると、開始から終了までの間に10個のチャンクに対して断片化解消処理を行うことになる。
(2)開始判定のチャンク数Bから事前に定めた一定の割合p(0≦p≦1)を掛けた値である(B×p)を終了判定のチャンク数とする。
(1) For example, a value (BX) obtained by subtracting a predetermined number X (0 ≦ X ≦ B) from the number of chunks B for start determination is set as the number of chunks for end determination. For example, if X = 10, fragmentation elimination processing will be performed on 10 chunks from the start to the end.
(2) The number (B × p), which is a value obtained by multiplying the predetermined number p (0 ≦ p ≦ 1) of the number B of chunks for start determination, is set as the number of chunks for end determination.
終了条件の設定は、上記の2種類の方法に限定されず他の方法による設定も可能である。例えば、上記例では算出された断片化解消条件のチャンク数をそのまま開始条件の閾値としたが、算出されたチャンク数に制御されるように、開始条件を(B+y)、終了条件を(B−z)、y+z=10などとすることも考えられる。 The setting of the end condition is not limited to the above two types of methods, but can be set by another method. For example, in the above example, the calculated number of chunks of the fragmentation elimination condition is directly used as the threshold value of the start condition. However, the start condition is set to (B + y) and the end condition is set to (B−y) so as to be controlled by the calculated number of chunks. z), y + z = 10, and the like.
また、本実施形態においては、断片化解消処理開始条件、および/または、断片化解消処理停止条件や、断片化推定条件を条件パラメータに従って算出した。しかし、ホストコンピュータ側のOSやアプリケーションなどに応じたチャンク数やチャンク容量を含む過去の条件パラメータおよび条件(閾値や基準値とも称す)と、条件設定による効果との組み合わせの履歴を対応付けて蓄積しておき、新たな条件パラメータを参照して適切な条件設定を設定してもよい。 In the present embodiment, the defragmentation processing start condition and / or the defragmentation processing stop condition and the fragmentation estimation condition are calculated according to the condition parameters. However, a history of combinations of past condition parameters and conditions (also referred to as thresholds and reference values) including the number of chunks and chunk capacities according to the OS and applications of the host computer and the effects of the condition setting are stored in association with each other. In advance, appropriate condition settings may be set with reference to new condition parameters.
本実施形態によれば、論理アドレス空間を一定サイズの単位で分割した各々の論理アドレス領域の断片化状態をホストコンピュータから推定し、断片化状態の論理アドレス領域の数に基づいて断片化解消処理の開始および終了を制御する。これにより、記憶媒体における一定のアクセス性能維持に必要となる、追記形式の記憶領域に対する断片化解消処理の頻度を最小化するように、断片化解消対象の記憶領域を推定することができる。したがって、断片化解消処理に伴うデータ再格納のコストを考慮したうえで、断片化解消処理によって得られる追記形式の記憶媒体内のGCによるデータ移動の削減効果を高めることができ、記憶媒体のアクセス性能の向上および長寿命化を図ることができる。 According to the present embodiment, the fragmentation state of each logical address area obtained by dividing the logical address space in units of a fixed size is estimated from the host computer, and the fragmentation eliminating process is performed based on the number of fragmented logical address areas. Control the start and end of the This makes it possible to estimate the storage area to be defragmented so as to minimize the frequency of defragmentation processing on the write-once storage area, which is necessary for maintaining a constant access performance in the storage medium. Therefore, in consideration of the cost of data re-storage accompanying the fragmentation eliminating process, the effect of reducing data movement by GC in the write-once storage medium obtained by the fragmentation eliminating process can be enhanced, and the access of the storage medium can be improved. It is possible to improve the performance and extend the service life.
[第3実施形態]
次に、本発明の第3実施形態に係る記憶制御装置について説明する。本実施形態に係る記憶制御装置は、上記第2実施形態と比べると、断片化解消対象のチャンクが優先順位を有しない点で異なる。その他の構成および動作は、第2実施形態と同様であるため、同じ構成および動作については同じ符号を付してその詳しい説明を省略する。
[Third embodiment]
Next, a storage control device according to a third embodiment of the present invention will be described. The storage control device according to the present embodiment is different from the second embodiment in that the chunks to be defragmented have no priority. Other configurations and operations are the same as those of the second embodiment, and thus the same configurations and operations are denoted by the same reference numerals and detailed description thereof will be omitted.
《記憶制御装置の機能構成》
図11は、本実施形態に係る記憶制御装置1100の機能構成を示すブロック図である。なお、図11において、図3と同様の機能構成部には同じ参照番号を付して、重複する説明を省略する。
<< Functional configuration of storage controller >>
FIG. 11 is a block diagram illustrating a functional configuration of the
断片化管理部1120は、更新頻度管理テーブル322を有しない。また、断片化解消対象推定部1124は、断片化解消対象のチャンクに更新頻度による優先順位を設定しない、断片化解消対象リスト1125を生成する。
The
また、断片化解消処理部1130の断片化解消処理制御部1132は、断片化解消条件設定部1131の条件に従って、優先順位の設定されていない断片化解消対象リスト1125から任意のチャンクを選択して、再格納制御部333に再配置を指示する。
In addition, the fragmentation resolution
なお、断片化解消条件設定部1131において、断片化解消処理の開始条件のみを設定し、断片化解消処理制御部1132により断片化解消処理の開始のみを判定する構成であってもよい。
Note that the defragmentation
(断片化解消対象リスト)
図12は、本実施形態に係る断片化解消対象リスト1125の構成を示す図である。なお、図12において、図4Cと同様の構成要素には同じ参照番号を付して、重複する説明を省略する。
(Fragmentation removal target list)
FIG. 12 is a diagram showing the configuration of the fragmentation
断片化解消対象リスト1125は、断片化解消対象に推定されたチャンクのチャンクID432をリストし、各チャンクへの断片化解消処理の優先順位はリストされていない。
The
本実施形態においては、図4Aの更新頻度412による優先順位の設定は行なわれない。したがって、図9に示した断片化管理処理のフローチャートにおいて、ステップS911〜S915をスルーする。また、図10に示した断片化解消処理のフローチャートにおいて、ステップS1007では優先順位を考慮せず任意の断片化解消対象のチャンクが再格納制御部333に通知される。
In the present embodiment, the priority order is not set based on the
本実施形態によれば、記憶制御装置の構成を簡略化して、簡単な構成によりチャンクの断片化状態を再配置により解消することができる。 According to this embodiment, the configuration of the storage control device can be simplified, and the fragmented state of chunks can be eliminated by rearrangement with a simple configuration.
[第4実施形態]
次に、本発明の第4実施形態に係る記憶制御装置を記憶制御部としてホストコンピュータ内に含む情報処理システムについて説明する。本実施形態に係る情報処理システムは、上記第2実施形態および第3実施形態と比べると、断片化が著しいと推定される領域へのWrite処理を代替するためのバッファを有する点で異なる。その他の構成および動作は、第2実施形態、第3実施形態と同様であるため、同じ構成および動作については同じ符号を付してその詳しい説明を省略する。
[Fourth embodiment]
Next, an information processing system including a storage control device according to a fourth embodiment of the present invention as a storage control unit in a host computer will be described. The information processing system according to the present embodiment is different from the second embodiment and the third embodiment in that the information processing system includes a buffer for substituting a Write process for an area where fragmentation is estimated to be remarkable. Other configurations and operations are the same as those of the second embodiment and the third embodiment. Therefore, the same configurations and operations are denoted by the same reference numerals, and detailed description thereof will be omitted.
《情報処理システム》
図13は、本実施形態に係る記憶制御部1320を含む情報処理システム1300の構成を示す図である。なお、図13において、図2と同様の構成要素には同じ参照番号を付して、重複する説明を省略する。
《Information processing system》
FIG. 13 is a diagram illustrating a configuration of an
図13の情報処理システム1300は、バッファ1360を含む。バッファ1360は、記憶媒体240に対するWriteデータのうち、断片化頻度の高いチャンクに対するWrite要求に対応したデータを格納する。バッファ1360は、DRAM(Dynamic Random Access Memory)などの記憶媒体240より高性能な記憶媒体を用いる以外に、記憶媒体240と同様にSSDやSMRを採用したHDDなどを用いることも可能である。また、バッファ1360は、記憶媒体240の一部領域を割り当てた形でもよい。
The
ホストコンピュータ1310は、第2実施形態の処理に加えて、記憶媒体240またはバッファ1360へのWrite処理を制御する記憶制御部1320を有する。
The
本実施形態によれば、断片化発生頻度の高い領域に対するWriteデータをバッファとして用意した記憶領域に格納して、あらかじめ断片化の発生頻度が高いと推定されたチャンクへの格納を回避することにより、さらに記憶媒体のアクセス性能の向上および長寿命化を図ることができる。 According to the present embodiment, by storing Write data for an area where fragmentation occurs frequently in a storage area prepared as a buffer and avoiding storing in a chunk in which fragmentation is estimated to occur frequently in advance. Further, the access performance of the storage medium can be improved and the service life can be extended.
[第5実施形態]
次に、本発明の第5実施形態に係る記憶制御装置を記憶制御部としてホストコンピュータ内に含む情報処理システムについて説明する。本実施形態に係る情報処理システムは、上記第2実施形態乃至第4実施形態と比べると、記憶制御部が記憶媒体側にある点、あるいは、ネットワークを介してホストコンピュータの外部にある点で異なる。その他の構成および動作は、第2実施形態から第4実施形態と同様であるため、同じ構成および動作については同じ符号を付してその詳しい説明を省略する。
[Fifth Embodiment]
Next, an information processing system including a storage control device according to a fifth embodiment of the present invention as a storage control unit in a host computer will be described. The information processing system according to the present embodiment is different from the second to fourth embodiments in that the storage control unit is provided on the storage medium side or is provided outside the host computer via a network. . Other configurations and operations are the same as those of the second to fourth embodiments. Therefore, the same configurations and operations are denoted by the same reference numerals, and detailed description thereof will be omitted.
《情報処理システムの構成》
図14は、本実施形態に係る記憶制御部1443または1420を含む情報処理システム1400の構成を示す図である。なお、図14において、図2と同様の構成要素には同じ参照番号を付して、重複する説明を省略する。
《Configuration of information processing system》
FIG. 14 is a diagram illustrating a configuration of an
図14においては、ホストコンピュータ1410は本実施形態の記憶制御部を有しない。一例として、本実施形態の記憶制御部1443は、記憶媒体1440に搭載されている。また、他の例として、本実施形態の記憶制御部1420は、ネットワーク250を介して独立した装置として接続されている。かかる記憶制御部1443または1420は、ソフトウェアで実現されても、ワンチップのプロセッサで実現されてもよい。
In FIG. 14, the
本実施形態によれば、第2乃至第4実施形態のようにホストコンピュータによる処理に限定されず、記憶媒体への書き込みにおけるチャンクの断片化状態を推定して、断片化状態を再配置により解消することで、記憶媒体のアクセス性能の向上、長寿命化を図ることができる。 According to this embodiment, the processing is not limited to the processing by the host computer as in the second to fourth embodiments, but the fragmentation state of the chunk in writing to the storage medium is estimated, and the fragmentation state is eliminated by relocation. By doing so, it is possible to improve the access performance of the storage medium and extend the life.
[他の実施形態]
以上、実施形態を参照して本発明を説明したが、本発明は上記実施形態に限定されるものではない。本発明の構成や詳細には、本願発明のスコープ内で当業者が理解し得る様々な変更をすることができる。また、それぞれの実施形態に含まれる別々の特徴を如何様に組み合わせたシステムまたは装置も、本発明の範疇に含まれる。
[Other embodiments]
As described above, the present invention has been described with reference to the exemplary embodiments. However, the present invention is not limited to the exemplary embodiments. Various changes that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention. In addition, a system or an apparatus in which different features included in each embodiment are combined in any way is also included in the scope of the present invention.
また、本発明は、複数の機器から構成されるシステムに適用されてもよいし、単体の装置に適用されてもよい。さらに、本発明は、実施形態の機能を実現する情報処理プログラムが、システムあるいは装置に直接あるいは遠隔から供給される場合にも適用可能である。したがって、本発明の機能をコンピュータで実現するために、コンピュータにインストールされるプログラム、あるいはそのプログラムを格納した媒体、そのプログラムをダウンロードさせるWWW(World Wide Web)サーバも、本発明の範疇に含まれる。特に、少なくとも、上述した実施形態に含まれる処理ステップをコンピュータに実行させるプログラムを格納した非一時的コンピュータ可読媒体(non-transitory computer readable medium)は本発明の範疇に含まれる。 Further, the present invention may be applied to a system including a plurality of devices, or may be applied to a single device. Further, the present invention is also applicable to a case where an information processing program for realizing the functions of the embodiments is directly or remotely supplied to a system or an apparatus. Therefore, a program installed in the computer to realize the functions of the present invention by the computer, a medium storing the program, and a WWW (World Wide Web) server for downloading the program are also included in the scope of the present invention. . In particular, at least a non-transitory computer readable medium that stores a program that causes a computer to execute the processing steps included in the above-described embodiments is included in the scope of the present invention.
Claims (13)
断片化されて記憶されていると推定された前記論理アドレス領域の数が第1閾値を超えた場合に、断片化されて記憶されていると推定された前記論理アドレス領域に対する断片化解消処理を開始する断片化解消処理手段と、
を備え、
前記断片化解消処理手段は、断片化されて記憶されていると推定された前記論理アドレス領域の数が第2閾値を下回るまで前記断片化解消処理を継続し、
前記第1閾値および前記第2閾値は、前記断片化解消処理による前記記憶媒体の内部のガベージコレクション(GC)に伴うデータ移動が削減されるように設定される記憶制御装置。 The data of each logical address area obtained by dividing the logical address space used when the host computer accesses the storage medium in units of a fixed size is stored in a plurality of physical address areas in the physical address space used inside the storage medium. Fragmentation management means for estimating whether or not fragmented and stored, and managing the number of the logical address areas estimated to be stored as fragmented,
When the number of the logical address areas estimated to be stored in a fragmented manner exceeds the first threshold value, a defragmentation process for the logical address area estimated to be stored in a fragmented state is performed. Defragmentation processing means to be started;
Equipped with a,
The defragmentation processing means continues the defragmentation process until the number of the logical address areas estimated to be stored in a fragmented state falls below a second threshold,
Wherein the first threshold and the second threshold value, set Ru storage controller so that data movement is reduced due to the interior of the garbage collection of the storage medium by the defragmentation process (GC).
前記断片化解消処理手段は、断片化されて記憶されていると推定された前記論理アドレス領域の数が前記同じ数となるように前記断片化解消処理を行なう、請求項1または2に記載の記憶制御装置。 The first threshold and the second threshold are set to the same number,
3. The defragmentation processing unit according to claim 1, wherein the defragmentation processing unit performs the defragmentation processing such that the number of the logical address areas estimated to be stored in a fragmented state is the same number. Storage controller.
前記断片化解消処理手段は、前記優先順位にしたがって前記断片化解消処理を行なう、請求項1乃至3のいずれか1項に記載の記憶制御装置。 The fragmentation management means further sets a priority for performing the defragmentation process for the logical address area estimated to be stored fragmented,
The defragmentation processing means, the priority in accordance performing the defragmentation process, the storage control device according to any one of claims 1 to 3.
断片化されて記憶されていると推定された前記論理アドレス領域の数が第1閾値を超えた場合に、断片化されて記憶されていると推定された前記論理アドレス領域に対して断片化解消処理を開始する断片化解消処理ステップと、
を含み、
前記断片化解消処理ステップにおいては、断片化されて記憶されていると推定された前記論理アドレス領域の数が第2閾値を下回るまで前記断片化解消処理を継続し、
前記第1閾値および前記第2閾値は、前記断片化解消処理による前記記憶媒体の内部のガベージコレクション(GC)に伴うデータ移動が削減されるように設定される記憶制御方法。 The data of each logical address area obtained by dividing the logical address space used when the host computer accesses the storage medium in units of a fixed size is stored in a plurality of physical address areas in the physical address space used inside the storage medium. Estimating whether or not it is stored in a fragmented manner, a fragmentation management step of managing the number of the logical address areas estimated to be stored in a fragmented manner,
When the number of the logical address areas estimated to be stored in a fragmented manner exceeds a first threshold value, defragmentation is performed on the logical address area estimated to be stored in a fragmented state. A defragmentation processing step for starting processing;
Only including,
In the defragmentation processing step, the defragmentation processing is continued until the number of the logical address areas estimated to be fragmented and stored falls below a second threshold,
The storage control method, wherein the first threshold value and the second threshold value are set such that data movement accompanying garbage collection (GC) in the storage medium due to the fragmentation eliminating process is reduced .
断片化されて記憶されていると推定された前記論理アドレス領域の数が第1閾値を超えた場合に、断片化されて記憶されていると推定された前記論理アドレス領域に対して断片化解消処理を開始する断片化解消処理ステップと、
をコンピュータに実行させる記憶制御プログラムであって、
前記断片化解消処理ステップにおいては、断片化されて記憶されていると推定された前記論理アドレス領域の数が第2閾値を下回るまで前記断片化解消処理を継続し、
前記第1閾値および前記第2閾値は、前記断片化解消処理による前記記憶媒体の内部のガベージコレクション(GC)に伴うデータ移動が削減されるように設定される記憶制御プログラム。 The data of each logical address area obtained by dividing the logical address space used when the host computer accesses the storage medium in units of a fixed size is stored in a plurality of physical address areas in the physical address space used inside the storage medium. Estimating whether or not it is stored in a fragmented manner, a fragmentation management step of managing the number of the logical address areas estimated to be stored in a fragmented manner,
When the number of the logical address areas estimated to be stored in a fragmented manner exceeds a first threshold value, defragmentation is performed on the logical address area estimated to be stored in a fragmented state. A defragmentation processing step for starting processing;
A storage control program that causes a computer to execute
In the defragmentation processing step, the defragmentation processing is continued until the number of the logical address areas estimated to be fragmented and stored falls below a second threshold,
A storage control program wherein the first threshold value and the second threshold value are set such that data movement accompanying garbage collection (GC) inside the storage medium due to the fragmentation eliminating process is reduced .
論理アドレス空間の論理アドレス領域を指定して、前記記憶媒体へのアクセスを行うアクセス手段と、
前記アクセス手段において指定された論理アドレス領域に基づいて、前記記憶媒体からのデータの読み出しおよび前記記憶媒体へのデータの書き込みを行う記憶制御手段と、
を備えた情報処理システムであって、
前記記憶制御手段は、
前記アクセス手段が前記記憶媒体にアクセスする際に用いる論理アドレス空間を一定サイズの単位で分割した各々の論理アドレス領域のデータが、前記記憶媒体の内部で使用される物理アドレス空間において複数の物理アドレス領域に断片化されて記憶されているか否かを推定し、断片化されて記憶されていると推定された前記論理アドレス領域の数を管理する断片化管理手段と、
断片化されて記憶されていると推定された前記論理アドレス領域の数が第1閾値を超えた場合に、断片化されて記憶されていると推定された前記論理アドレス領域に対する断片化解消処理を開始し、断片化されて記憶されていると推定された前記論理アドレス領域の数が第2閾値を下回るまで、前記断片化解消処理を継続する断片化解消処理手段と、
を備え、
前記断片化解消処理手段は、断片化されて記憶されていると推定された前記論理アドレス領域の数が第2閾値を下回るまで前記断片化解消処理を継続し、
前記第1閾値および前記第2閾値は、前記断片化解消処理による前記記憶媒体の内部のガベージコレクション(GC)に伴うデータ移動が削減されるように設定される情報処理システム。 A storage medium,
An access unit that specifies a logical address area of a logical address space and accesses the storage medium;
Storage control means for reading data from the storage medium and writing data to the storage medium based on the logical address area designated by the access means;
An information processing system comprising:
The storage control means,
The data of each logical address area obtained by dividing the logical address space used when the access unit accesses the storage medium by a unit of a fixed size is a plurality of physical addresses in the physical address space used inside the storage medium. Fragmentation management means for estimating whether the area is fragmented and stored, and managing the number of the logical address areas estimated to be fragmented and stored;
When the number of the logical address areas estimated to be stored in a fragmented manner exceeds the first threshold value, a defragmentation process for the logical address area estimated to be stored in a fragmented state is performed. A defragmentation processing unit that starts and continues the defragmentation processing until the number of the logical address areas estimated to be stored in a fragmented state falls below a second threshold value;
Equipped with a,
The defragmentation processing means continues the defragmentation process until the number of the logical address areas estimated to be stored in a fragmented state falls below a second threshold,
Wherein the first threshold and the second threshold value, the information processing system that will be set as internal data movement accompanying the garbage collection (GC) is reduced in the storage medium by the defragmentation process.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016015069A JP6668785B2 (en) | 2016-01-29 | 2016-01-29 | Information processing system, storage control device, storage control method, and storage control program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016015069A JP6668785B2 (en) | 2016-01-29 | 2016-01-29 | Information processing system, storage control device, storage control method, and storage control program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2017134700A JP2017134700A (en) | 2017-08-03 |
JP6668785B2 true JP6668785B2 (en) | 2020-03-18 |
Family
ID=59502922
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016015069A Active JP6668785B2 (en) | 2016-01-29 | 2016-01-29 | Information processing system, storage control device, storage control method, and storage control program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6668785B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109657015B (en) * | 2018-12-25 | 2023-05-02 | 四川效率源信息安全技术股份有限公司 | Data extraction method based on oracle line migration and line connection |
-
2016
- 2016-01-29 JP JP2016015069A patent/JP6668785B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2017134700A (en) | 2017-08-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9910597B2 (en) | Memory system having a plurality of writing modes | |
US10649890B2 (en) | Information processing system, storage control apparatus, storage control method, and storage control program | |
JP6691669B2 (en) | Information processing system, storage control device, storage control method, and storage control program | |
KR102094236B1 (en) | Storage device and computer system | |
JP6459644B2 (en) | Storage control device, control system, and control program | |
WO2015076354A1 (en) | Storage device, method, and program | |
EP2665065A2 (en) | Electronic device employing flash memory | |
JP2014522537A (en) | Use to manage data placement on flash-based storage | |
KR20130017748A (en) | Memory controller and data management method | |
KR20100037319A (en) | Variable space page mapping method and apparatus for flash memory device | |
JP6834955B2 (en) | Information processing system, memory control device, memory control method and memory control program | |
US11747979B2 (en) | Electronic device, computer system, and control method | |
KR101017067B1 (en) | Locality-Aware Garbage Collection Technique for NAND Flash Memory-Based Storage Systems | |
CN106557428B (en) | Mapping system selection for data storage devices | |
WO2016071954A1 (en) | Semiconductor memory device and storage apparatus comprising semiconductor memory device | |
WO2016002325A1 (en) | Information processing system, information processing method, storage control device, and control method and control program for storage control device | |
JP6668785B2 (en) | Information processing system, storage control device, storage control method, and storage control program | |
JP6107341B2 (en) | Data management program, data management device, and data management method | |
JP5638022B2 (en) | Disk array device | |
JP2018005371A (en) | Information processing system, information processing method, storage control device, storage control method and storage control program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20181206 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20190918 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20191010 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20191107 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20200128 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20200210 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6668785 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |