JP6926866B2 - Storage controller and storage control program - Google Patents
Storage controller and storage control program Download PDFInfo
- Publication number
- JP6926866B2 JP6926866B2 JP2017175670A JP2017175670A JP6926866B2 JP 6926866 B2 JP6926866 B2 JP 6926866B2 JP 2017175670 A JP2017175670 A JP 2017175670A JP 2017175670 A JP2017175670 A JP 2017175670A JP 6926866 B2 JP6926866 B2 JP 6926866B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- area
- areas
- physical
- storage
- 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 a storage control device and a storage control program.
従来、未使用となったデータ領域を集めて、連続したデータ領域を確保するガベージコレクション処理がある。関連する先行技術として、例えば、画像データを、同じサイズで、かつ、ハードディスクの区画された等間隔で複数の記憶領域の大きさと等しいかまたは小さいサイズに分割し、圧縮するものがある。また、ファイルの管理情報と、ユーザ設定とに基づいて、圧縮対象ファイルの候補をユーザに提示し、指定されたファイルを圧縮対象ファイルとして圧縮し、圧縮したファイルを、元のファイルに上書きする技術がある。 Conventionally, there is a garbage collection process that collects unused data areas and secures a continuous data area. As a related prior art, for example, image data is divided into a size equal to or smaller than the size of a plurality of storage areas having the same size and at equal intervals divided by a hard disk, and compressed. In addition, a technology that presents candidates for compression target files to the user based on file management information and user settings, compresses the specified file as the compression target file, and overwrites the compressed file with the original file. There is.
しかしながら、従来技術によれば、ストレージの記憶領域を分割せずに、圧縮後のデータを前詰めで書き込んでいくと、ガベージコレクション処理を行うことになり、ガベージコレクション処理を実施するCPU(Central Processing Unit)の負荷とストレージの負荷とが増大する。そして、負荷の増大により、ガベージコレクション処理中のストレージの性能が低下する。また、ストレージの記憶領域を等間隔で分割したデータ領域に圧縮後のデータを書き込むと、前述のデータ領域に対して圧縮後のデータが小さいほど、データが書き込まれない領域が増えることになる。ここで、同一のサイズの複数のデータを圧縮しても、データの内容によって圧縮後のデータのサイズはそれぞれ異なる。従って、ストレージの記憶領域が十分に使用されなくなる。 However, according to the prior art, if the compressed data is written in advance without dividing the storage area of the storage, the garbage collection process is performed, and the CPU (Central Processing) that performs the garbage collection process is performed. Unit) load and storage load increase. Then, due to the increase in load, the performance of the storage during the garbage collection process deteriorates. Further, when the compressed data is written in the data area in which the storage area of the storage is divided at equal intervals, the smaller the compressed data with respect to the above-mentioned data area, the larger the area in which the data is not written. Here, even if a plurality of data of the same size are compressed, the size of the compressed data differs depending on the content of the data. Therefore, the storage area of the storage is not sufficiently used.
1つの側面では、本発明は、圧縮後のデータを書き込むストレージを効率的に使用することができるストレージ制御装置、およびストレージ制御プログラムを提供することを目的とする。 In one aspect, it is an object of the present invention to provide a storage control device and a storage control program that can efficiently use the storage for writing the compressed data.
1つの実施態様では、ストレージ制御装置、およびストレージ制御プログラムは、ストレージのアクセス単位のサイズの整数倍の複数のデータ領域を含む記憶領域を有するストレージに対して、所定のサイズの書き込みデータと書き込みデータの論理アドレスとを受け付けたことに応じて、記憶領域から割り当てた整数倍の第1のサイズの複数のデータ領域の各データ領域の物理アドレスを特定可能な情報と各データ領域の使用状況を示す情報とを有する第1の管理情報、および、記憶領域から割り当てた整数倍であって第1のサイズとは異なる第2のサイズの複数のデータ領域の各データ領域の物理アドレスを特定可能な情報と当該各データ領域の使用状況を示す情報とを有する第2の管理情報から、書き込みデータを圧縮した圧縮後のデータのサイズ以上のサイズに対応する管理情報を特定し、特定した管理情報から特定される複数のデータ領域のうちの未使用のデータ領域に圧縮後のデータを書き込むとともに、未使用のデータ領域の物理アドレスを特定可能な情報と書き込みデータの論理アドレスとを対応付けて、記憶領域のうちのデータを書き込んだデータ領域の物理アドレスを特定可能な情報にデータの論理アドレスを対応付けた論理アドレス情報に格納する。 In one embodiment, the storage controller, and the storage control program, write data and write data of a predetermined size for storage having a storage area including a plurality of data areas that are integral multiples of the size of the access unit of the storage. Indicates information that can identify the physical address of each data area of a plurality of data areas of a first size that is an integral multiple of the data area allocated from the storage area and the usage status of each data area according to the reception of the logical address of. First management information having information, and information capable of identifying the physical address of each data area of a plurality of data areas having a second size different from the first size, which is an integral multiple allocated from the storage area. From the second management information having the information indicating the usage status of each data area, the management information corresponding to the size larger than the size of the compressed data obtained by compressing the write data is specified, and the specified management information is specified. The compressed data is written to the unused data area among the plurality of data areas to be created, and the storage area is associated with the information that can identify the physical address of the unused data area and the logical address of the written data. The physical address of the data area in which the data is written is stored in the logical address information in which the logical address of the data is associated with the identifiable information.
一つの側面では、本発明は、圧縮後のデータを書き込むストレージを効率的に使用することができる。 In one aspect, the invention allows efficient use of storage for writing compressed data.
以下に図面を参照して、開示のストレージ制御装置、およびストレージ制御プログラムの実施の形態を詳細に説明する。 Hereinafter, embodiments of the disclosed storage control device and storage control program will be described in detail with reference to the drawings.
(実施の形態1)
図1は、実施の形態1にかかるストレージ制御装置101の動作例を示す説明図である。ストレージ制御装置101は、ストレージ102を制御するコンピュータである。具体的には、ストレージ制御装置101は、ストレージ102の記憶領域をユーザに提供する。ストレージ制御装置101は、例えば、サーバである。ストレージ制御装置101は、ユーザからのデータを分割し、分割した各分割データを圧縮し、圧縮後の各データをストレージ102に書き込むことにより、ストレージ102の使用効率を高めることができる。
(Embodiment 1)
FIG. 1 is an explanatory diagram showing an operation example of the
ここで、ストレージ102の記憶領域が、ヘッドによりアクセスされる記憶領域、例えば、ストレージ102がHDD(Hard Disk Drive)であれば、圧縮後の各データを前詰めで書き込むことが好ましい。圧縮後の各データを前詰めで書き込むことが好ましい理由は、HDDが、磁気ディスクの外周にある程高速にアクセスでき、また、連続した領域をアクセスするためシーケンシャルアクセスとなるためである。また、圧縮後の各データの間を開けずに詰めて書き込むことにより、ストレージ102の使用効率を高めることができる。
Here, if the storage area of the
ここで、データを前詰めした際に、データの上書きが発生した場合、既にストレージに書かれている旧データを未使用扱いとした上で、新たなデータをストレージに書き込むという運用を行うことができる。この運用を行うと、ストレージ上には、未使用領域が増加することになる。未使用領域が増加すると、ストレージの使用効率が低下するため、未使用領域を解消するために、ガベージコレクション処理を実施することが考えられる。ガベージコレクション処理では、未使用となったデータ以外を前詰めして再度書き込みを行う。 Here, if data is overwritten when the data is pre-packed, it is possible to treat the old data already written in the storage as unused and then write the new data to the storage. can. When this operation is performed, the unused area on the storage will increase. As the unused area increases, the storage usage efficiency decreases. Therefore, it is conceivable to perform garbage collection processing in order to eliminate the unused area. In the garbage collection process, data other than unused data is pre-packed and written again.
しかしながら、ガベージコレクション処理を行うと、データの再配置を行うため、ストレージの負荷と、ガベージコレクション処理を実施するCPUの負荷とが増大することになる。また、データの再配置には、ストレージから読み出したデータの一時保管場所として、メモリを使用するため、一時的にメモリを消費することになる。そして、負荷の増大により、ガベージコレクション処理中のストレージの性能が低下することになる。 However, when the garbage collection process is performed, the data is rearranged, so that the load on the storage and the load on the CPU that performs the garbage collection process increase. In addition, since the memory is used as a temporary storage location for the data read from the storage for data relocation, the memory is temporarily consumed. Then, due to the increase in load, the performance of the storage during the garbage collection process deteriorates.
また、ガベージコレクション処理の実施を抑制するため、ストレージの記憶領域を等間隔で分割したデータ領域に、圧縮後のデータを書き込むことが考えられる。しかしながら、同一のサイズの複数のデータを圧縮しても、データの内容によって圧縮後のデータのサイズはそれぞれ異なる。従って、ストレージの記憶領域を等間隔で分割したデータ領域に圧縮後のデータを書き込むと、前述のデータ領域に対して圧縮後のデータが小さいほど、データが書き込まれない領域が増えることになり、ストレージの記憶領域が十分に使用されなくなる。 Further, in order to suppress the execution of the garbage collection process, it is conceivable to write the compressed data to the data area in which the storage area of the storage is divided at equal intervals. However, even if a plurality of data of the same size are compressed, the size of the compressed data differs depending on the content of the data. Therefore, when the compressed data is written to the data area in which the storage area of the storage is divided at equal intervals, the smaller the compressed data with respect to the above-mentioned data area, the larger the area where the data is not written. Storage storage area is not fully used.
そこで、本実施の形態では、ストレージ102のアクセス単位の各整数倍の領域群を管理する各管理情報から、書き込みデータを圧縮した圧縮データのサイズ以上のデータ領域を特定し、前述のデータ領域に前述の圧縮データを書き込むことについて説明する。
Therefore, in the present embodiment, a data area larger than the size of the compressed data obtained by compressing the write data is specified from each management information that manages an area group that is an integral multiple of each access unit of the
図1を用いて、ストレージ制御装置101の動作例について説明する。ストレージ制御装置101は、ストレージ102を制御する。そして、ストレージ制御装置101は、管理情報110と、論理アドレス情報111とにアクセス可能である。管理情報110と、論理アドレス情報111とは、例えば、ストレージ制御装置101が有するメモリ内にあるが、他の装置が有する記憶領域内にあってもよい。
An operation example of the
管理情報110は、ストレージ102のアクセス単位のサイズの整数倍の第1のサイズと第2のサイズとのそれぞれに対応して、次に示す2つの情報を有する。1つ目の情報が、ストレージ102の記憶領域から割り当てた第1のサイズまたは第2のサイズの複数のデータ領域の各データ領域の物理アドレスを特定可能な情報である。2つ目の情報が、各データ領域の使用状況を示す情報である。アクセス単位のサイズの整数倍は、どのような倍数でもよい。図1の例では、アクセス単位のサイズが512[byte]であるとする。そして、図1の例では、ストレージ制御装置101は、第1のサイズに対応する第1の管理情報として、管理情報110−1と、第1のサイズとは異なる第2のサイズに対応する第2の管理情報として、管理情報110−2とにアクセス可能である。図1の例では、第1のサイズは、512[byte]の7倍である3584[byte]であり、第2のサイズは、512[byte]の3倍である1536[byte]である。
The management information 110 has the following two pieces of information corresponding to the first size and the second size, which are integral multiples of the size of the access unit of the
以下の説明では、同種の要素を区別する場合には、「管理情報110−1」、「管理情報110−2」のように参照符号を使用し、同種の要素を区別しない場合には、「管理情報110」のように参照符号のうちの共通番号だけを使用することがある。 In the following description, reference codes such as "management information 110-1" and "management information 110-2" are used to distinguish the same type of elements, and "management information 110-2" is used when the same type of elements are not distinguished. Only the common number among the reference codes may be used as in "Management information 110".
また、ストレージ102の記憶領域から割り当てたアクセス単位のサイズの整数倍の複数のデータ領域を、「コンテナ領域」と呼称する。コンテナ領域121には、複数のデータ領域122が存在する。データ領域122の個数は2以上の整数であればいくつでもよく、例えば、1[M個]である。また、データ領域122は、シーケンシャルアクセスできるように、連続した領域であることが好ましい。図1の例では、管理情報110−1に対応するコンテナ領域121−1は、3584[byte]の複数のデータ領域122−1−0〜2を有する。また、管理情報110−2に対応するコンテナ領域121−2は、1536[byte]の複数のデータ領域122−2−0〜2を有する。また、管理情報110は、対応するコンテナ領域121を特定するため、コンテナ領域121を識別するコンテナID(IDentifier)を有する。図1の例では、コンテナ領域121−1のコンテナIDが1であり、コンテナ領域121−2のコンテナIDが2であるとする。
Further, a plurality of data areas that are integral multiples of the size of the access unit allocated from the storage area of the
また、コンテナ領域121に含まれる各データ領域122の物理アドレスを特定可能な情報は、各データ領域122の物理アドレスそのものでもよいし、複数のデータ領域の先頭のデータ領域のアドレスと、データ領域のサイズとでもよい。図1の例では、管理情報110は、コンテナ領域121のコンテナ先頭アドレス112と、データ領域のサイズとして、コンテナ管理サイズ113とを有する。 Further, the information that can identify the physical address of each data area 122 included in the container area 121 may be the physical address itself of each data area 122, the address of the head data area of the plurality of data areas, and the information of the data area. It may be the size. In the example of FIG. 1, the management information 110 has a container start address 112 of the container area 121 and a container management size 113 as the size of the data area.
また、データ領域122の使用状況を示す情報は、具体的には、下記3つの識別子のいずれかである。1つ目の識別子は、該当のデータ領域122が確保されてから一度も使用されていない状況を示す「空」である。2つ目の識別子は、該当のデータ領域122にデータが格納されており、データ領域122が使用されている状況を示す「使用中」である。3つ目の識別子は、該当のデータ領域122に過去にデータが格納されたが、現在はデータが格納されていない状況を示す「未使用」である。図1の例では、データ領域122の使用状況を示す情報を、「データ領域使用状況」と呼称する。そして、図1の例では、管理情報110は、各データ領域122のデータ領域使用状況と、各データ領域における先頭のデータ領域からの順番を示すスロット番号とを有するコンテナ情報114を有する。スロット番号は、0から開始してもよいし、1から開始してもよいが、各データ領域の物理アドレスを特定するためには、0から開始することが好ましい。図1に示すコンテナ情報114−1は、レコード115−1−0〜2を有する。また、コンテナ情報114−2は、レコード115−2−0〜2を有する。 Further, the information indicating the usage status of the data area 122 is specifically one of the following three identifiers. The first identifier is "empty", which indicates a situation in which the corresponding data area 122 has never been used since it was secured. The second identifier is "in use" indicating a situation in which data is stored in the corresponding data area 122 and the data area 122 is being used. The third identifier is "unused", which indicates a situation in which data has been stored in the corresponding data area 122 in the past, but no data is currently stored. In the example of FIG. 1, the information indicating the usage status of the data area 122 is referred to as "data area usage status". Then, in the example of FIG. 1, the management information 110 has container information 114 having a data area usage status of each data area 122 and a slot number indicating the order from the first data area in each data area. The slot number may start from 0 or 1, but it is preferable to start from 0 in order to specify the physical address of each data area. The container information 114-1 shown in FIG. 1 has records 115-1-0 to 2. Further, the container information 114-2 has records 115-2-2 to 2.
論理アドレス情報111は、ストレージ102の記憶領域のうちのデータを書き込んだデータ領域122の物理アドレスを特定可能な情報に、前述のデータの論理アドレスを対応付けた情報である。データ領域122の物理アドレスを特定可能な情報は、データ領域122の物理アドレスそのものでもよいし、コンテナ番号とスロット番号とでもよい。コンテナ番号によって、該当のデータ領域122が属するコンテナ領域121の先頭のデータ領域122の物理アドレスと、該当のコンテナ領域121のコンテナ管理サイズ113を特定することができる。次に、スロット番号と、コンテナ管理サイズ113とによって、該当の先頭のデータ領域122から、特定しようとするデータ領域122の物理アドレスまでのオフセットを特定することができる。そして、該当の先頭のデータ領域122の物理アドレスに、前述のオフセットを加算することにより、特定しようとするデータ領域122の物理アドレスを特定することができる。
The
図1に示す論理アドレス情報111は、論理アドレスと、コンテナIDと、スロット番号とを有する。図1に示す論理アドレス情報111は、レコード116−0、1を有する。レコード116−0は、論理アドレスが0[KB]のデータが、コンテナID=1、スロット番号=0に格納されていることを示す。また、レコード116−1は、論理アドレスが0[KB]のデータが、コンテナID=1、スロット番号1に格納されていることを示す。
The
まず、ストレージ制御装置101は、所定のサイズの書き込みデータと、該当の書き込みデータの論理アドレスとを含む書き込み要求を受け付ける。所定のサイズは、ストレージ102のアクセス単位以上のサイズであれば、どのようなサイズでもよい。例えば、所定のサイズは、4096[byte]や8192[byte]等である。以下の例では、所定のサイズは、4096[byte]であるとする。また、書き込み要求を、「WriteI/O」と呼称する。また、書き込みデータを、「Writeデータ」と呼称する。同様に、読み出し要求を、「ReadI/O」と呼称する。ReadI/Oには、読み出し範囲の論理アドレスが含まれる。読み出し範囲を、「Read範囲」と呼称する。
First, the
また、ストレージ制御装置101は、所定のサイズ以上のWriteデータを含むWriteI/Oを受け付けてもよい。この場合、ストレージ制御装置101は、WriteI/Oに含まれるWriteデータを所定のデータに分割し、分割した所定のWriteデータと、分割した所定のWriteデータの論理アドレスとを受け付けたこととしてもよい。また、WriteI/Oの発行元は、ストレージ制御装置101のユーザであり、例えば、ホスト装置であるが、これに限らない。例えば、本実施の形態が適用されていないストレージから、本実施の形態が適用されるストレージ102にデータを移行させるとする。この場合、データの移行を行う装置は、本実施の形態が適用されていないストレージから読み出したデータを、Writeデータとして、ストレージ制御装置101にWriteI/Oを発行してもよい。
Further, the
図1の(1)で示すように、ストレージ制御装置101は、Writeデータwdを受け付ける。また、受け付けたWriteデータの先頭の論理アドレスは0[KB]である。図1の例では、Writeデータwdが、所定のサイズである4096[KB]以上であるため、ストレージ制御装置101は、Writeデータwdを4096[KB]ごとに分割する。以下、Writeデータを分割して得られたデータを、「分割Writeデータ」と呼称する。図1の例では、図1の(2)で示すように、ストレージ制御装置101は、Writeデータwdを分割して、分割Writeデータwds−0、1、…を得る。また、分割Writeデータwds−0の論理アドレスは、0[KB]となり、分割Writeデータwds−1の論理アドレスは、4[KB]となる。ここで、論理アドレス0[0KB]、4[KB]は、論理アドレス情報111に登録されているアドレスであるから、データの上書きとなる。
As shown in FIG. 1 (1), the
次に、ストレージ制御装置101は、所定のサイズとなった分割Writeデータwdsと、分割Writeデータwdsの論理アドレスとを受け付けたことに応じて、分割Writeデータwdsを圧縮する。以下、分割Writeデータを圧縮した圧縮後のデータを、「圧縮分割Writeデータ」と呼称する。図1の例では、図1の(3−1)、(3−2)で示すように、ストレージ制御装置101は、分割Writeデータwds−1、2をそれぞれ圧縮して、圧縮分割Writeデータwdsc−0、1を得る。ここで、圧縮分割Writeデータwdsc−0、1のそれぞれのサイズが、3584[byte]、1536[byte]となったとする。
Next, the
そして、ストレージ制御装置101は、管理情報110から、圧縮分割Writeデータwdscのサイズ以上のサイズに対応する管理情報110を特定する。管理情報110を特定することにより、圧縮分割Writeデータwdscの格納先となるコンテナ領域121を決定することになる。ここで、圧縮分割Writeデータwdscのサイズ以上のサイズは、圧縮分割Writeデータwdscのサイズ以上であって、最も小さいサイズであることが好ましい。図1の例では、図1の(4−1)で示すように、圧縮分割Writeデータwdsc−0のサイズが3584[byte]であるため、ストレージ制御装置101は、コンテナ管理サイズが3584[byte]である管理情報110−1を特定する。同様に、図1の(4−2)で示すように、圧縮分割Writeデータwdsc−1のサイズが1536[byte]であるため、ストレージ制御装置101は、コンテナ管理サイズが1536[byte]である管理情報110−2を特定する。
Then, the
ここで、圧縮分割Writeデータwdscが得られた時点で、圧縮分割Writeデータwdscのサイズ以上であって、最も小さいサイズに対応する管理情報110が存在しない可能性もある。この場合、ストレージ制御装置101は、前述した最も小さいサイズに対応する管理情報110を生成すればよい。より具体的には、ストレージ制御装置101は、ストレージ102から、前述した最も小さいサイズの複数のデータ領域122を有するコンテナ領域121を確保する。そして、ストレージ制御装置101は、管理情報110をメモリ上に生成し、生成した管理情報110のコンテナ先頭アドレス112を、確保したコンテナ領域121の複数のデータ領域122の先頭のアドレスに設定する。また、ストレージ制御装置101は、生成した管理情報110のコンテナ管理サイズ113を、前述した最も小さいサイズに設定し、コンテナ情報114の全てのレコード115のデータ領域使用状況を「空」に設定する。
Here, at the time when the compression division Write data wdsc is obtained, there is a possibility that the management information 110 that is larger than the size of the compression division Write data wdsc and corresponds to the smallest size does not exist. In this case, the
また、圧縮分割Writeデータwdscのサイズ以上であって、最も小さいサイズに対応する管理情報110が存在しても、コンテナ情報114の全てのレコード115のデータ領域使用状況が「使用中」である可能性もある。この場合にも、ストレージ制御装置101は、前述した最も小さいサイズに対応する新たな管理情報110を生成してもよい。このように、同一のサイズに対応する管理情報110は、複数あってもよい。
Further, even if the size of the compression division Write data wdsc is larger than the size of the compression division Witzc and the management information 110 corresponding to the smallest size exists, the data area usage status of all the records 115 of the container information 114 may be "in use". There is also sex. In this case as well, the
また、管理情報110は、最大で、アクセス単位のサイズの1倍から、所定のサイズまでのn種類生成されることになる。図1の例では、アクセス単位のサイズが512[byte]であり、所定のサイズが4096[byte]であるから、n=8となる。 Further, the management information 110 will be generated in n types from one times the size of the access unit to a predetermined size at the maximum. In the example of FIG. 1, since the size of the access unit is 512 [bytes] and the predetermined size is 4096 [bytes], n = 8.
次に、ストレージ制御装置101は、特定した管理情報110から特定される複数のデータ領域122の未使用のデータ領域122に、圧縮分割Writeデータwdscを書き込む。また、ストレージ制御装置101は、圧縮分割Writeデータwdscの書き込みとともに、前述の未使用のデータ領域の物理アドレスを特定可能な情報と分割Writeデータの論理アドレスとを対応付けて論理アドレス情報111に格納する。
Next, the
ここで、データの上書きであり、特定したコンテナIDと、レコード116が示す上書き前となる旧データのコンテナIDとが同一となることもある。この場合、ストレージ制御装置101は、旧データのスロット番号で示されるデータ領域122に、圧縮分割Writeデータwdscを上書きしてもよい。これにより、ストレージ制御装置101は、コンテナ情報114のデータ領域使用状況や論理アドレス情報111を更新しなくてよくなる。図1の場合、データの上書きであり、論理アドレス0[KB]については、特定したコンテナIDと、レコード116−0が示す上書き前となる旧データのコンテナIDとがともに1であり、同一である。この場合、ストレージ制御装置101は、図1の(5−1)で示すように、旧データのスロット番号0で示されるデータ領域122−1−0に、圧縮分割Writeデータwdscを書き込む。
Here, the data is overwritten, and the specified container ID and the container ID of the old data before overwriting indicated by the record 116 may be the same. In this case, the
また、論理アドレス4[KB]については、特定したコンテナIDが2であり、レコード116−1が示す上書き前となる旧データのコンテナIDが2であるから、異なるコンテナIDである。この場合、ストレージ制御装置101は、図1の(5−2)で示すように、特定したコンテナID=2の未使用のデータ領域122−2−2に、圧縮分割Writeデータwdscを書き込む。また、ストレージ制御装置101は、図1の(6−2)で示すように、レコード116−1について、コンテナID=2を格納するとともに、スロット番号2とを格納する。また、ストレージ制御装置101は、旧データのコンテナID=1のレコード115−1−1のデータ領域使用状況を「未使用」に更新し、コンテナID=2のレコード115−2−2のデータ領域使用状況を「使用中」に更新する。
Further, the logical address 4 [KB] is a different container ID because the specified container ID is 2 and the container ID of the old data before overwriting indicated by the record 116-1 is 2. In this case, as shown in (5-2) of FIG. 1, the
以上の処理により、ストレージ制御装置101は、ストレージ102を効率的に使用することができる。具体的には、1つのコンテナ領域121に含まれるデータ領域122は、全て同一サイズである。従って、ガベージコレクション処理では、例えば、後方にあるデータ領域122のデータを、前方にある未使用のデータ領域122に移動させればよく、他のデータ領域122には影響を与えない。従って、ストレージ制御装置101は、データ領域が可変長である場合に比べて、ガベージコレクション処理を実施するCPUの負荷とストレージ102の負荷とを抑制することができる。
By the above processing, the
また、ストレージ制御装置101は、圧縮分割Writeデータwdscのサイズに適したデータ領域122を使用することにより、データ領域122の記憶領域が十分に使用されるようになる。具体的には、データ領域122のサイズは、ストレージ102のアクセス単位の整数倍ごとに存在するため、圧縮分割Writeデータwdscが書き込まれたデータ領域122内で、データが書き込まれない領域のサイズは、常に512[byte]未満となる。一方、ストレージの記憶領域を等間隔で分割したデータ領域に圧縮後のデータを書き込む場合、1つのデータ領域で、圧縮後のデータが書き込まれない領域のサイズは、等間隔のデータサイズ未満となる。そして、同一のサイズの複数のデータを圧縮しても、データの内容によって圧縮後のデータのサイズはそれぞれ異なる。従って、圧縮してもデータサイズがほとんど小さくならなかった場合を担保するため、等間隔のデータサイズは、例えば圧縮前のデータサイズとなる。図1の例を用いると、圧縮前のデータサイズは、4096[byte]であるから、1つのデータ領域で、データが書き込まれない領域のサイズは、4096[byte]未満となり、本実施の形態に比べ、ストレージの記憶領域が十分に使用されていない。
Further, the
また、図1では、管理情報110−1、110−2という、2つの管理情報110しか表示していないが、ストレージ制御装置101は、3つ以上の管理情報110にアクセス可能でもよい。そして、3つ以上の管理情報110にアクセス可能なストレージ制御装置101は、3つ以上の管理情報110から、圧縮分割Writeデータwdscのサイズ以上のサイズに対応する管理情報110を特定する。
Further, in FIG. 1, only two management information 110s, that is, management information 110-1 and 110-2, are displayed, but the
また、図1で説明した方法は、ストレージ102が、重複排除が適用されたストレージであっても適用することができる。ここで、重複排除は、ストレージ内の複数のデータの中から同一のデータを検出し、複数の同一のデータのうちの1つのデータを残して他のデータを排除し、残したデータの物理アドレスに対応して、残したデータを参照する論理アドレスの数を管理する。ストレージ制御装置101を、ストレージシステムに適用した例を、図2を用いて説明する。
Further, the method described with reference to FIG. 1 can be applied even if the
図2は、ストレージシステム200のハードウェア構成例を示す説明図である。ストレージシステム200は、ディスクアレイ装置201と、ホスト装置202とを有する。そして、ディスクアレイ装置201は、1以上のCM(Controller Module)211と、1以上のディスク212と、1以上のCA(Channel Adapter)213とを含む。CM211は、CPU221と、DRAM222と、フラッシュROM(Read Only Memory)223とを有する。ここで、CM211は、図1に示したストレージ制御装置101に相当する。また、ディスク212は、図1に示したストレージ102に相当する。
FIG. 2 is an explanatory diagram showing a hardware configuration example of the
ディスクアレイ装置201は、複数のディスクを束ねた大容量のボリュームをユーザに提供する装置である。ホスト装置202は、ユーザが使用するホストコンピュータである。また、ホスト装置202は、ディスクアレイ装置201を利用するWebサーバ等でもよい。
The
CM211は、ディスク212、CA213、CPU221、DRAM222等の資源管理を行うコントローラ制御部である。ディスク212は、ユーザデータや制御情報を記憶する不揮発性の記憶装置である。例えば、ディスク212は、HDDや、SSD(Solid State Drive)である。そして、ディスク212は、全てがHDDでもよいし、全てがSSDでもよいし、HDDとSSDとが混在してもよい。
The CM211 is a controller control unit that manages resources of the
CPU221は、CM211の全体の制御を司る演算処理装置である。また、CPU221は、複数のコアを有してもよい。DRAM222は、CM211内の1次キャッシュメモリとして使用される揮発メモリである。従って、DRAM222は、ユーザデータや制御情報の一部を記憶する。フラッシュROM223は、本実施の形態におけるストレージ制御プログラムを記憶する不揮発性メモリである。不揮発性メモリの記憶媒体としては、例えば、NORフラッシュメモリや、NANDフラッシュメモリを採用することができる。
The
(CM211の機能構成例)
図3は、CM211の機能構成例を示す説明図である。CM211は、制御部300を有する。制御部300は、受け付け部301と、コンテナ領域決定部302と、書き込み部303と、特定部304と、読み出し部305とを含む。制御部300は、記憶装置に記憶されたプログラムをCPU221が実行することにより、各部の機能を実現する。記憶装置とは、具体的には、例えば、図2に示したフラッシュROM223などである。また、各部の処理結果は、DRAM222や、CPU221のレジスタ、CPU221のキャッシュメモリ等に格納される。
(Example of functional configuration of CM211)
FIG. 3 is an explanatory diagram showing an example of functional configuration of CM211. CM211 has a
また、CM211は、記憶部310にアクセス可能である。記憶部310は、例えば、DRAM222である。記憶部310は、ブロックマップテーブル311と、データサイズ別管理テーブル312−1、2、…とを有する。ブロックマップテーブル311は、図1に示した論理アドレス情報111に相当する。データサイズ別管理テーブル312は、図1で示した管理情報110に相当する。ここで、データサイズ別管理テーブル312は、各データ領域を参照する論理アドレスの数が含まれる。ブロックマップテーブル311の記憶内容については、図4で示す。また、データサイズ別管理テーブル312の記憶内容については、図5で示す。
Further, the
また、CM211は、ディスク212にアクセス可能である。そして、ディスク212には、データサイズ別管理テーブル312に対応するコンテナ領域121が確保される。ここで、図3では、1つのディスク212に複数のコンテナ領域121が確保されているが、これに限らない。例えば、1つのコンテナ領域121が、複数のディスク212に跨ってもよい。また、各データサイズ別管理テーブル312に含まれる複数のデータ領域122の各データ領域122は、重複排除により、互いに重複しないデータを有する。
Further, the
受け付け部301は、WriteI/Oや、ReadI/Oを受け付ける。
The
コンテナ領域決定部302は、受け付け部301がWriteI/Oを受け付けたことに応じて、Writeデータwdが4096[byte]以上であれば分割し、所定のサイズとなった分割Writeデータwdsを得る。そして、コンテナ領域決定部302は、分割Writeデータwdsを圧縮した圧縮分割Writeデータwdscのサイズ以上のサイズに対応するデータサイズ別管理テーブル312を特定する。データサイズ別管理テーブル312を特定することにより、圧縮分割Writeデータwdscの格納先となるコンテナ領域121を決定することになる。
The container
書き込み部303は、コンテナ領域決定部302が決定したコンテナ領域121のうちの未使用のデータ領域122に圧縮分割Writeデータwdscを書き込む。また、書き込み部303は、前述の圧縮分割Writeデータwdscの書き込みとともに、前述のデータ領域122のコンテナIDとスロット番頭とを対応付けてブロックマップテーブル311に格納する。また、書き込み部303は、コンテナ領域決定部302が決定したコンテナ領域121のうちの未使用のデータ領域122が複数あれば、先頭にある未使用のデータ領域122に圧縮分割Writeデータwdscを書き込んでもよい。
The
また、図1では、特定したコンテナIDと、上書き前となる旧データのコンテナIDとが同一となる場合、旧データのスロット番号で示されるデータ領域122に、圧縮分割Writeデータwdscを上書きしてもよいことを説明した。この方法を、重複排除に適用すると、書き込み部303は、さらに、ブロックマップテーブル311における分割Writeデータwdsの論理アドレスに対応するスロット番号で示されるデータ領域122を参照する論理アドレスの数が1であるか否かを判断する。該当の論理アドレスの数が1であれば、旧データのスロット番号で示されるデータ領域122は、複数の論理アドレスから参照されておらず、上書きすることが可能である。従って、該当のデータ領域122を参照する論理アドレスの数が1である場合、書き込み部303は、旧データのスロット番号で示されるデータ領域122に、圧縮分割Writeデータwdscを上書きする。
Further, in FIG. 1, when the specified container ID and the container ID of the old data before overwriting are the same, the compression division Write data wdsc is overwritten on the data area 122 indicated by the slot number of the old data. I explained that it is also good. When this method is applied to deduplication, the
特定部304は、ReadI/Oを受け付けたことに応じて、Read範囲の論理アドレスが4096[byte]以上であれば分割し、所定のサイズとなった分割Read範囲を得る。そして、特定部304は、ブロックマップテーブル311を参照して、分割Read範囲の論理アドレスに対応するコンテナIDと、スロット番号とを特定する。
The
読み出し部305は、分割Read範囲の論理アドレスに対応するデータが書き込まれたデータ領域122の物理アドレスを算出し、ディスク212の算出した物理アドレスからデータを読み出す。具体的には、読み出し部305は、特定したコンテナIDにおける複数のデータ領域122の先頭の物理アドレスと、特定したスロット番号と、特定したコンテナIDのコンテナ管理サイズとに基づいて、前述した物理アドレスを算出する。例えば、読み出し部305は、下記(1)式によって、前述した物理アドレスを算出する。
The
分割Read範囲に対応するデータ領域122の物理アドレス=特定したコンテナIDのコンテナ先頭アドレス+(特定したコンテナIDのコンテナ管理サイズ×特定したスロット番号) …(1) Physical address of data area 122 corresponding to the divided Read range = Container start address of the specified container ID + (Container management size of the specified container ID x Specified slot number) ... (1)
なお、(1)式におけるスロット番号は、0から始まる場合を想定する。スロット番号が1から始まる場合には、読み出し部305は、(1)式におけるスロット番号を1減じて算出すればよい。
It is assumed that the slot number in the equation (1) starts from 0. When the slot number starts from 1, the
図4は、ブロックマップテーブル311の記憶内容の一例を示す説明図である。図4に示すブロックマップテーブル311は、レコード401−0〜12を有する。 FIG. 4 is an explanatory diagram showing an example of the stored contents of the block map table 311. The block map table 311 shown in FIG. 4 has records 401-0 to 12.
ブロックマップテーブル311は、論理アドレスと、物理格納コンテナIDと、物理格納スロット番号というフィールドを含む。論理アドレスフィールドには、論理アドレスを示す値が格納される。物理格納コンテナIDフィールドには、該当の論理アドレスで特定されたデータが格納されたコンテナのIDが格納される。物理格納スロット番号フィールドには、該当の論理アドレスで特定されたデータが格納されたスロット番号が格納される。 The block map table 311 includes fields of a logical address, a physical storage container ID, and a physical storage slot number. A value indicating a logical address is stored in the logical address field. In the physical storage container ID field, the ID of the container in which the data specified by the corresponding logical address is stored is stored. The physical storage slot number field stores the slot number in which the data specified by the corresponding logical address is stored.
例えば、レコード401−0は、論理アドレス0[KB]で特定されるデータが、コンテナID2のスロット番号0で管理するデータ領域122に格納されたことを示す。
For example, record 401-0 indicates that the data specified by the logical address 0 [KB] is stored in the data area 122 managed by the
次に、データサイズ別管理テーブル312の一例として、データサイズ別管理テーブル312−1の記憶内容の一例を、図5を用いて説明する。 Next, as an example of the data size-based management table 312, an example of the stored contents of the data size-based management table 312-1 will be described with reference to FIG.
図5は、データサイズ別管理テーブル312−1の記憶内容の一例を示す説明図である。データサイズ別管理テーブル312は、コンテナIDと、コンテナ情報501と、未使用キュー502と、コンテナ管理サイズ503と、コンテナ先頭アドレス504とを有する。
FIG. 5 is an explanatory diagram showing an example of the stored contents of the data size management table 312-1. The data size management table 312 has a container ID,
コンテナIDは、CM211が管理するコンテナのIDである。コンテナ情報501は、CM211が管理するコンテナの情報を有する。図5に示すコンテナ情報501は、レコード511−0〜7を有する。
The container ID is the ID of the container managed by CM211. The
具体的には、コンテナ情報501は、スロット番号と、データ領域使用状況と、リファレンスカウンタというフィールドを含む。スロット番号フィールドには、該当のコンテナ内のスロット番号が格納される。データ領域使用状況フィールドには、スロット番号で管理するデータ領域122の使用状況を示す識別子が格納される。使用状況を示す識別子としては、図1に示した「空」、「使用中」、「未使用」である。
Specifically, the
リファレンスカウンタフィールドには、該当のデータ領域122のリファレンスカウンタが格納される。具体的には、リファレンスカウンタは、該当のデータ領域122を参照する論理アドレスの数となる。 The reference counter of the corresponding data area 122 is stored in the reference counter field. Specifically, the reference counter is the number of logical addresses that refer to the corresponding data area 122.
未使用キュー502は、該当のコンテナの中で、使用状況が「未使用」となるデータ領域122を管理するキューである。コンテナ管理サイズ503は、該当のコンテナ領域121の中のデータ領域122のサイズである。コンテナ先頭アドレス504は、該当のコンテナ領域121の中で、最も先頭にあるデータ領域122の先頭の物理アドレスである。
The
次に、Write受け付け時のCM211の動作例を、図6〜図8を用いて説明する。 Next, an operation example of CM211 at the time of receiving Write will be described with reference to FIGS. 6 to 8.
図6は、WriteI/O受け付け時の動作例を示す説明図(その1)である。CM211は、図6の(1)で示すように、ホスト装置202から受け付けたWrite要求に含まれるWriteデータwdを、4096[byte]ごとに分割する。以降の処理は、Writeデータwdを分割した分割Writeデータwdsの単位で処理を行う。図6の例では、CM211は、Writeデータwdを分割して、分割Writeデータwds−0〜5、…を得る。
FIG. 6 is an explanatory diagram (No. 1) showing an operation example at the time of receiving Write I / O. As shown in FIG. 6 (1), the
次に、CM211は、図6の(2)で示すように、ブロックマップテーブル311を参照し、各分割Writeデータwdsについて、旧データの格納位置を特定する。旧データの格納位置の特定例について具体的に説明する。例えば、Write要求が、先頭の論理アドレス0[KB]に対してWriteデータwdを書き込む、という要求であるとする。この場合、分割Writeデータwds−0の論理アドレスは、0[KB]となる。そして、CM211は、分割Writeデータwds−0について、図4に示すレコード401−0を参照して、分割Writeデータwds−0の旧データが、コンテナID2、スロット番号0であると特定する。また、分割Writeデータwds−1の論理アドレスは、4[KB]となる。この場合、分割Writeデータwds−1の論理アドレスは、0[KB]となる。そして、CM211は、分割Writeデータwds−1について、図4に示すレコード401−1を参照して、分割Writeデータwds−1の旧データが、コンテナID6、スロット番号0であると特定する。
Next, as shown in (2) of FIG. 6, CM211 refers to the block map table 311 and specifies the storage position of the old data for each divided Write data wds. A specific example of the storage position of the old data will be specifically described. For example, suppose that the Write request is a request to write the Write data wd to the first logical address 0 [KB]. In this case, the logical address of the divided Write data wds-0 is 0 [KB]. Then, the
そして、CM211は、図6の(3)で示すように、ディスク212に格納した圧縮データのうち、各分割Writeデータwdsと重複するデータがあるか否かを判断する。具体的には、CM211は、圧縮データの元データのハッシュ値を算出し、ディスク212に格納する際に、算出したハッシュ値を、物理格納コンテナIDと物理格納スロット番号とに対応付けて、DRAM222等に記憶しておく。そして、CM211は、各分割Writeデータwdsのハッシュ値を算出し、記憶したハッシュ値と比較することにより、重複するデータがあるか否かを判断する。具体的には、各分割Writeデータwdsのハッシュ値と、記憶したハッシュ値とが一致した場合、CM211は、重複するデータがあると判断する。一方、各分割Writeデータwdsのハッシュ値と、記憶した全てのハッシュ値とが異なる場合、CM211は、重複するデータがないと判断する。図6の例では、CM211は、分割Writeデータwds−0、2について、重複するデータがないと判断し、分割Writeデータwds−1について、重複するデータがあると判断する。
Then, as shown in FIG. 6 (3), the
各分割Writeデータwdsについて、重複するデータがないと判断した場合、CM211は、図6の(4−1)で示すように、各分割Writeデータwdsを圧縮し、各圧縮分割Writeデータwdscを得る。図6の例では、CM211は、分割Writeデータwds−0、2をそれぞれ圧縮し、圧縮分割Writeデータwdsc−0、2を得る。ここで、図6に示す圧縮分割Writeデータwdsc−0は、3584[byte]になり、圧縮分割Writeデータwdsc−2は、1536[byte]になる。
When it is determined that there is no duplicate data for each divided Write data wds, the
一方、各分割Writeデータwdsについて、重複するデータがあると判断した場合、図6の(4−2)で示すように、重複するデータに対するリファレンスカウンタを1加算する。リファレンスカウンタの加減算については、図9で説明する。 On the other hand, when it is determined that there is duplicated data for each divided Write data wds, the reference counter for the duplicated data is added by 1 as shown in (4-2) of FIG. The addition and subtraction of the reference counter will be described with reference to FIG.
図7は、WriteI/O受け付け時の動作例を示す説明図(その2)である。図7で示す状態は、図6の(4−1)の処理が完了した状態である。CM211は、図7の(1)で示すように、圧縮分割Writeデータwdscの圧縮後のデータサイズに応じて、ディスク書き込みサイズを決定し、決定したディスク書き込みサイズに対応するコンテナを、圧縮後のデータの格納先として決定する。具体的には、CM211は、圧縮後のデータサイズを、アクセス単位である512[byte]単位で切り上げたサイズを、ディスク書き込みサイズとして決定する。ここで、圧縮前のデータは、4096[byte]であるから、ディスク書き込みサイズは、nを1〜8のうちのいずれかの整数として、512xn[byte]となる。 FIG. 7 is an explanatory diagram (No. 2) showing an operation example at the time of receiving Write I / O. The state shown in FIG. 7 is a state in which the process of (4-1) in FIG. 6 is completed. As shown in (1) of FIG. 7, the CM211 determines the disk write size according to the compressed data size of the compressed divided Write data wdsc, and compresses the container corresponding to the determined disk write size after compression. Determine as the data storage destination. Specifically, the CM211 determines the size of the compressed data size rounded up in units of 512 [bytes], which is an access unit, as the disk write size. Here, since the data before compression is 4096 [byte], the disk write size is 512xn [byte], where n is an integer of any of 1 to 8.
図7の例では、CM211は、分割Writeデータwds−0の格納先を、コンテナ管理サイズが3584[byte]となるコンテナID=1のコンテナに決定する。同様に、CM211は、分割Writeデータwds−2の格納先を、コンテナ管理サイズが1536[byte]となるコンテナID=2のコンテナに決定する。 In the example of FIG. 7, the CM211 determines the storage destination of the divided Write data wds-0 to a container having a container ID = 1 having a container management size of 3584 [byte]. Similarly, the CM211 determines the storage destination of the divided Write data wds-2 to a container having a container ID = 2 having a container management size of 1536 [byte].
図8は、WriteI/O受け付け時の動作例を示す説明図(その3)である。図8で示す状態は、図7の(1)で示した処理が完了した後の状態を示す。CM211は、図8の(1)で示すように、格納先として決定したコンテナの未使用キュー502に接続されているデータ領域122があるか否かを判断する。図8の例では、CM211は、分割Writeデータwds−0の格納先として決定したコンテナID=1の未使用キュー502を参照して、未使用キュー502に接続されているデータ領域122があると判断する。また、CM211は、分割Writeデータwds−2の格納先として決定したコンテナID=2の未使用キュー502を参照して、未使用キュー502に接続されているデータ領域122がないと判断する。
FIG. 8 is an explanatory diagram (No. 3) showing an operation example at the time of receiving Write I / O. The state shown in FIG. 8 shows the state after the process shown in (1) of FIG. 7 is completed. As shown in FIG. 8 (1), the
次に、CM211は、未使用キュー502に接続されているデータ領域122があると判断した場合、図8の(2−1)で示すように、格納先として決定したコンテナの未使用キュー502の先頭のデータ領域122に圧縮分割Writeデータwdscを書き込む。図8の例では、CM211は、データサイズ別管理テーブル312−1の未使用キュー502の先頭となるスロット番号1で管理するデータ領域122に、圧縮分割Writeデータwdsc−0を書き込む。
Next, when the CM211 determines that there is a data area 122 connected to the
また、CM211は、未使用キュー502に接続されているデータ領域122がないと判断したとする。この場合、CM211は、図8の(2−2)で示すように、格納先として決定したコンテナの空のデータ領域122を獲得し、獲得した空のデータ領域122に、圧縮分割Writeデータwdscを書き込む。図8の例では、CM211は、データサイズ別管理テーブル312−2のコンテナ情報501のうち、使用状況が「空」となるスロット番号3で管理するデータ領域122に、圧縮分割Writeデータwdsc−2を書き込む。ここで、図8では、圧縮分割Writeデータwdsc−0、2を書き込んだ領域に網掛けを付与する。
Further, it is assumed that the
図9は、リファレンスカウンタ加減算処理の動作例を示す説明図である。図9で示す状態は、図8の(2−1)、(2−2)のそれぞれの処理が完了した状態である。CM211は、図9の(1)で示すように、今回圧縮分割Writeデータwdscを書き込んだデータ領域122のリファレンスカウンタを加算する。また、CM211は、今回圧縮分割Writeデータwdscを書き込む前に使用していたデータ領域122のリファレンスカウンタを減算する。
FIG. 9 is an explanatory diagram showing an operation example of the reference counter addition / subtraction process. The state shown in FIG. 9 is a state in which the respective processes of (2-1) and (2-2) of FIG. 8 have been completed. As shown in (1) of FIG. 9, CM211 adds the reference counter of the data area 122 in which the compression division Write data wdsc is written this time. Further, the
図9の例では、圧縮分割Writeデータwdsc−0を書き込む前に使用していたデータ領域122が、データサイズ別管理テーブル312−1のスロット番号5で管理するデータ領域122であるとする。また、圧縮分割Writeデータwdsc−2を書き込む前に使用していたデータ領域122が、データサイズ別管理テーブル312−2のスロット番号2で管理するデータ領域122であるとする。従って、CM211は、データサイズ別管理テーブル312−1のレコード511−1と、データサイズ別管理テーブル312−2のレコード511−3のリファレンスカウンタを1インクリメントする。また、CM211は、データサイズ別管理テーブル312−1のレコード511−5と、データサイズ別管理テーブル312−2のレコード511−2のリファレンスカウンタを1デクリメントする。
In the example of FIG. 9, it is assumed that the data area 122 used before writing the compression division Write data wdsc-0 is the data area 122 managed by the
図10は、ReadI/O受け付け時の動作例を示す説明図である。図10で示す状態は、図9の(1)の処理が完了した後に、ホスト装置202からRead要求を受け付けた状態である。CM211は、図10の(1)で示すように、ホスト装置202から受け付けたRead要求に含まれるRead範囲raを、4096[byte]ごとに分割する。以降の処理は、Read範囲raを分割した分割Read範囲rasの単位で処理を行う。図10の例では、CM211は、Read範囲raを分割して、分割Read範囲ras−0〜3、…を得る。また、図10では、分割Read範囲ras−3について示す。
FIG. 10 is an explanatory diagram showing an operation example when the Read I / O is accepted. The state shown in FIG. 10 is a state in which a Read request is received from the
次に、CM211は、図10の(2)で示すように、ブロックマップテーブル311を参照して、各分割Read範囲rasの圧縮分割データが格納されているデータ領域122のコンテナIDと、スロット番号とを特定する。図10の例では、CM211は、図4に示すレコード401−3を参照して、分割Read範囲ras−3のデータが格納されているデータ領域122のコンテナIDが1であり、スロット番号が5であると特定する。
Next, as shown in FIG. 10 (2), the
そして、CM211は、図10の(3)で示すように、特定したコンテナIDに対応するデータサイズ別管理テーブル312を参照して、各分割Read範囲rasの圧縮分割データが格納されているデータ領域122の物理アドレスを算出する。具体的には、CM211は、図3で示した(1)式に従って、各分割Read範囲rasに対応するデータ領域122の物理アドレスを算出する。 Then, as shown in (3) of FIG. 10, the CM211 refers to the data size-specific management table 312 corresponding to the specified container ID, and refers to the data area in which the compressed division data of each division Read range ras is stored. Calculate the physical address of 122. Specifically, CM211 calculates the physical address of the data area 122 corresponding to each divided Read range ras according to the equation (1) shown in FIG.
図10の例では、CM211は、分割Read範囲ras−3に対応するデータ領域122の物理アドレスを、(1)式に従って下記のように算出する。 In the example of FIG. 10, the CM211 calculates the physical address of the data area 122 corresponding to the divided Read range ras-3 as follows according to the equation (1).
分割Read範囲ras−3に対応するデータ領域122の物理アドレス=0x20000000+(3584×5)=0x20004600 Physical address of data area 122 corresponding to split Read range ras-3 = 0x2000000000 + (3584x5) = 0x20004600
次に、CM211は、図10の(4)で示すように、ディスク212上の算出した物理アドレスから、圧縮分割データを読み出す。図10の例では、CM211は、物理アドレス0x20004600から、圧縮分割データdsc−3を読み出す。この後、CM211は、読み出した圧縮分割データdsc−3を伸長し、伸長して得られたデータをホスト装置202に送信する。
Next, as shown in FIG. 10 (4), the
次に、CM211が実行する処理を示すフローチャートを、図11〜図13を用いて説明する。
Next, a flowchart showing the processing executed by the
図11は、WriteI/O受け付け時処理手順の一例を示すフローチャートである。CM211は、ホスト装置202からWriteI/Oを受け付ける(ステップS1101)。次に、CM211は、Writeデータwdを4096[byte]ごとに分割する(ステップS1102)。Writeデータwdが4096[byte]以上である場合、CM211は、ステップS1103〜S1105の処理を、Writeデータwdを分割することにより得られた分割Writeデータwdsごとに実施する。図11、図12の説明では、各分割Writeデータwdsのうちの1つの分割Writeデータwdsについて説明する。 FIG. 11 is a flowchart showing an example of the processing procedure at the time of receiving Write I / O. The CM211 receives the Write I / O from the host device 202 (step S1101). Next, the CM211 divides the Write data wd into 4096 [bytes] (step S1102). When the Write data wd is 4096 [byte] or more, the CM211 performs the processing of steps S1103 to S1105 for each of the divided Write data wds obtained by dividing the Write data wd. In the description of FIGS. 11 and 12, one of the divided Write data wds will be described.
そして、CM211は、ブロックマップテーブル311を参照し、分割Writeデータwdsについて、旧データの格納位置を特定する(ステップS1103)。次に、CM211は、分割Writeデータwdsと重複するデータがあるか否かを判断する(ステップS1104)。 Then, CM211 refers to the block map table 311 and specifies the storage position of the old data for the divided Write data wds (step S1103). Next, CM211 determines whether or not there is data that overlaps with the divided Write data wds (step S1104).
分割Writeデータwdsと重複するデータがない場合(ステップS1104:重複するデータなし)、CM211は、分割Writeデータwdsを圧縮する(ステップS1105)。次に、CM211は、分割Writeデータwdsを圧縮して得られた圧縮分割Writeデータwdscのサイズに応じて、ディスク書き込みサイズを決定する(ステップS1106)。そして、CM211は、ディスク書き込みサイズに対応するコンテナを、圧縮分割Writeデータwdscの格納先として決定する(ステップS1107)。次に、CM211は、格納先として決定したコンテナの未使用キューに接続されているデータ領域122があるか否かを判断する(ステップS1108)。
When there is no data that overlaps with the divided Write data wds (step S1104: no duplicate data), the
格納先として決定したコンテナの未使用キューに接続されているデータ領域122がない場合(ステップS1108:未使用キューにデータ領域の登録なし)、CM211は、格納先として決定したコンテナの空のデータ領域122を獲得する(ステップS1109)。そして、CM211は、獲得した空のデータ領域122に、圧縮分割Writeデータwdscを書き込む(ステップS1110)。
If there is no data area 122 connected to the unused queue of the container determined as the storage destination (step S1108: no data area is registered in the unused queue), the
また、格納先として決定したコンテナの未使用キューに接続されているデータ領域122がある場合(ステップS1108:未使用キューにデータ領域の登録あり)、CM211は、格納先として決定したコンテナの未使用キューの先頭のデータ領域122に、圧縮分割Writeデータwdscを書き込む(ステップS1111)。そして、CM211は、圧縮分割Writeデータwdscを書き込んだデータ領域122を、未使用キューから削除する(ステップS1112)。
If there is a data area 122 connected to the unused queue of the container determined as the storage destination (step S1108: the data area is registered in the unused queue), the
ステップS1110、または、ステップS1112の処理終了後、または、分割Writeデータwdsと重複するデータがある場合(ステップS1104:重複するデータあり)、CM211は、リファレンスカウンタ加減算処理を実行する(ステップS1113)。リファレンスカウンタ加減算処理は、図12で説明する。 After the processing of step S1110 or step S1112 is completed, or when there is data that overlaps with the divided Write data wds (step S1104: there is overlapping data), CM211 executes the reference counter addition / subtraction process (step S1113). The reference counter addition / subtraction process will be described with reference to FIG.
そして、CM211は、ブロックマップテーブル311を更新する(ステップS1114)。ステップS1114の処理について、より具体的に説明する。ここで、更新対象となる箇所は、ブロックマップテーブル311における、分割Writeデータwdsの論理アドレスに対応するレコードの物理格納コンテナIDおよび物理格納スロット番号である。以下、該当の物理格納コンテナIDおよび物理格納スロット番号を、「更新対象の該当の物理格納コンテナIDおよび物理格納スロット番号」と称する。 Then, CM211 updates the block map table 311 (step S1114). The process of step S1114 will be described more specifically. Here, the points to be updated are the physical storage container ID and the physical storage slot number of the record corresponding to the logical address of the divided Write data wds in the block map table 311. Hereinafter, the corresponding physical storage container ID and physical storage slot number will be referred to as "corresponding physical storage container ID and physical storage slot number to be updated".
例えば、CM211が、ステップS1104の処理で、重複するデータありと判断したとする。この場合、CM211は、更新対象の物理格納コンテナIDおよび物理格納スロット番号を、重複するデータが格納されている物理格納コンテナIDおよび物理格納スロット番号に更新する。
For example, it is assumed that CM211 determines that there is duplicate data in the process of step S1104. In this case, the
また、CM211が、ステップS1108の処理について、未使用キューにデータ領域122の登録なしと判断したとする。この場合、CM211は、更新対象の物理格納コンテナIDおよび物理格納スロット番号を、獲得したデータ領域122の物理格納コンテナIDおよび物理格納スロット番号に更新する。一方、CM211が、ステップS1108の処理について、未使用キューにデータ領域122の登録ありと判断したとする。この場合、CM211は、更新対象の物理格納コンテナIDおよび物理格納スロット番号を、圧縮分割Writeデータを書き込んだデータ領域122の物理格納コンテナIDおよび物理格納スロット番号に更新する。
Further, it is assumed that the
ステップS1114の処理終了後、CM211は、WriteI/O受け付け時処理を終了する。 After the processing in step S1114 is completed, the CM211 ends the Write I / O acceptance processing.
図12は、リファレンスカウンタ加減算処理手順の一例を示すフローチャートである。CM211は、今回の圧縮分割Writeデータwdscを書き込んだデータ領域122のリファレンスカウンタを1加算する(ステップS1201)。また、CM211は、今回の圧縮分割Writeデータを書き込む前に使用していたデータ領域122のリファレンスカウンタを1減算する(ステップS1202)。そして、CM211は、今回のリファレンスカウンタの更新により、リファレンスカウンタが0になったデータ領域122があるか否かを判断する(ステップS1203)。
FIG. 12 is a flowchart showing an example of the reference counter addition / subtraction processing procedure. The CM211 adds 1 to the reference counter of the data area 122 in which the current compression division Write data wdsc is written (step S1201). Further, the
リファレンスカウンタが0になったデータ領域122がある場合(ステップS1203:リファレンスカウンタが0になったデータ領域あり)、CM211は、対象のデータ領域122を未使用として、未使用キューに対象のデータ領域122を接続する(ステップS1204)。ステップS1204の処理終了後、または、リファレンスカウンタが0になったデータ領域122がない場合(ステップS1203:リファレンスカウンタが0になったデータ領域なし)、CM211は、リファレンスカウンタ加減算処理を終了する。
When there is a data area 122 in which the reference counter has become 0 (step S1203: there is a data area in which the reference counter has become 0), the
図13は、ReadI/O受け付け時処理手順の一例を示すフローチャートである。CM211は、ReadI/Oを受け付ける(ステップS1301)。次に、CM211は、Read範囲raを4096[byte]ごとに分割する(ステップS1302)。Read範囲raが4096[byte]以上である場合、CM211は、ステップS1303〜S1306の処理を、Read範囲raを分割することにより得られた分割Read範囲rasごとに実施する。図11、図12の説明では、各分割Writeデータwdsのうちの1つの分割Read範囲rasについて説明する。 FIG. 13 is a flowchart showing an example of the Read I / O reception processing procedure. CM211 accepts Read I / O (step S1301). Next, CM211 divides the Read range ra into 4096 [bytes] (step S1302). When the Read range ra is 4096 [byte] or more, the CM211 performs the processes of steps S1303 to S1306 for each divided Read range ras obtained by dividing the Read range ra. In the description of FIGS. 11 and 12, one divided Read range ras of each divided Write data wds will be described.
そして、CM211は、ブロックマップテーブル311を参照して、分割Read範囲rasについて、コンテナIDと、スロット番号とを特定する(ステップS1303)。次に、CM211は、特定したコンテナIDに対応するデータサイズ別管理テーブル312を参照して、分割Read範囲rasに対応するデータ領域122の物理アドレスを算出する(ステップS1304)。そして、CM211は、ディスク212上の算出したアドレスから、圧縮分割データを読み出す(ステップS1305)。次に、CM211は、読み出した圧縮分割データを伸長する(ステップS1306)。ステップS1306の処理終了後、CM211は、各圧縮分割データを伸長して得られた各分割データを結合し、結合したデータをReadデータとして、ホスト装置202に送信し、ReadI/O受け付け時処理を終了する。
Then, CM211 refers to the block map table 311 to specify the container ID and the slot number for the divided Read range ras (step S1303). Next, CM211 refers to the data size-specific management table 312 corresponding to the specified container ID, and calculates the physical address of the data area 122 corresponding to the divided Read range ras (step S1304). Then, the
以上説明したように、実施の形態1にかかるCM211は、データサイズ別管理テーブル312から、圧縮分割Writeデータwdscのサイズ以上のデータ領域122を特定し、特定したデータ領域122に前述の圧縮分割Writeデータwdscを書き込む。これにより、CM211は、ディスク212を効率的に使用することができる。具体的には、図1で述べたように、CM211は、データ領域122が可変長である場合に比べて、CPU221の負荷とディスク212の負荷とを抑制することができる。また、CM211は、ディスク212の記憶領域を十分に使用することができる。
As described above, the
また、CM211は、ディスク212がHDDである際に、コンテナ領域決定部302が決定したコンテナ領域121のうちの未使用のデータ領域122が複数あれば、先頭にある未使用のデータ領域122に圧縮分割Writeデータwdscを書き込んでもよい。これにより、CM211は、ガベージコレクション処理が不要になり、常に前詰め状態でWriteI/OやReadI/Oを継続することができる。また、上述の効果は、ディスク212の記憶領域が、ヘッドによってアクセスされればよく、例えば、ディスク212が、光ディスク等でもよい。ディスク212がHDDであれば、ヘッドは、磁気ヘッドである。また、ディスク212が、光ディスクであれば、ヘッドは、光ヘッドである。
Further, when the
また、CM211は、(1)式に基づいて、分割Read範囲rasに対応するデータ領域の物理アドレスを算出してもよい。これにより、CM211は、読み出し対象となる物理アドレスが容易に特定できるため、読み出し速度を向上することができる。具体的には、ストレージの記憶領域を分割せずに、圧縮後のデータを前詰めで書き込んでいく場合、圧縮後のデータは可変であるため、圧縮後のデータを格納したデータ領域の識別子と、データ領域の物理アドレスとを対応付けたテーブルを用意することになる。しかしながら、本実施の形態では、読み出し対象となる物理アドレスが、コンテナ管理サイズ×スロット番号で求められるため、前述したテーブルを参照しなくてよい。従って、CM211は、読み出し速度を向上することができる。
Further, the CM211 may calculate the physical address of the data area corresponding to the divided Read range ras based on the equation (1). As a result, the
また、重複排除を行わない場合、CM211は、特定したコンテナIDと、旧データのコンテナIDとが同一であれば、旧データのスロット番号で示されるデータ領域122に、圧縮分割Writeデータwdscを上書きしてもよい。これにより、CM211は、ブロックマップテーブル311やデータサイズ別管理テーブル312を更新しなくてよくなるため、CM211にかかる負荷を抑制することができる。 Further, when deduplication is not performed, if the specified container ID and the container ID of the old data are the same, the CM211 overwrites the data area 122 indicated by the slot number of the old data with the compression division Write data wdsc. You may. As a result, the CM211 does not have to update the block map table 311 and the data size management table 312, so that the load on the CM211 can be suppressed.
また、重複排除を行う場合、CM211は、重複排除を行わない場合の条件に加え、ブロックマップテーブル311における分割Writeデータwdsの論理アドレスに対応するスロット番号のリファレンスカウンタが1であるか否かを判断する。そして、リファレンスカウンタが1であれば、CM211は、旧データのスロット番号で示されるデータ領域122に、圧縮分割Writeデータwdscを上書きしてもよい。これにより、CM211は、ブロックマップテーブル311やデータサイズ別管理テーブル312を更新しなくてよくなるため、重複排除であっても、CM211にかかる負荷を抑制することができる。
Further, when deduplication is performed, the CM211 determines whether or not the reference counter of the slot number corresponding to the logical address of the divided Write data wds in the block map table 311 is 1, in addition to the condition when deduplication is not performed. to decide. Then, if the reference counter is 1, the
(実施の形態2)
次に、実施の形態2にかかるストレージ制御装置101(CM211)について説明する。なお、実施の形態1で説明した箇所と同一の箇所については、同一符号を付して図示および説明を省略する。
(Embodiment 2)
Next, the storage control device 101 (CM211) according to the second embodiment will be described. The same parts as those described in the first embodiment are designated by the same reference numerals, and the illustration and description thereof will be omitted.
ここで、ホスト装置202から書き込まれるデータの特徴(I/Oパターン)が変化する、すなわち、データパターン傾向が変化することで、圧縮後のデータサイズの傾向が変わることがある。実施の形態1では、このような環境下において、コンテナ(コンテナ領域121)のために、ディスク212の物理記憶領域を無駄に確保したままとなってしまう場合がある。
Here, the tendency of the data size after compression may change due to the change in the characteristics (I / O pattern) of the data written from the
図14は、データパターン傾向が変化した際のコンテナの状態を示す説明図である。図14において、まず、データパターン傾向が、書き込みデータが6ブロックのデータサイズに圧縮されるようなI/Oパターンだった場合を想定する。この場合、6ブロック用コンテナ内の各スロット(データ領域122)の使用状況は、図14の(14−1)に示すような状態となる。 FIG. 14 is an explanatory diagram showing a state of the container when the data pattern tendency changes. In FIG. 14, first, it is assumed that the data pattern tendency is an I / O pattern in which the write data is compressed to a data size of 6 blocks. In this case, the usage status of each slot (data area 122) in the 6-block container is as shown in (14-1) of FIG.
この後、データパターン傾向が、書き込みデータが7ブロックのデータサイズに圧縮されるようなI/Oパターンに変化した場合を想定する。この場合、6ブロック用コンテナ内の各スロットの使用状況、および、7ブロック用コンテナ内の各スロットの使用状況は、図14の(14−2)に示すような状態となる。 After that, it is assumed that the data pattern tendency changes to an I / O pattern in which the write data is compressed to a data size of 7 blocks. In this case, the usage status of each slot in the 6-block container and the usage status of each slot in the 7-block container are as shown in FIG. 14 (14-2).
(14−2)に示すような6ブロック用コンテナの状態では、大部分のスロットが未使用であるにもかかわらず、物理容量としては消費した状態となってしまう。結果的に、6ブロック用コンテナと7ブロック用コンテナの両方で物理容量を消費することになり、重複排除やデータ圧縮を実施しても、ディスク212を効率的に使用する効果が薄くなるおそれがある。
In the state of the 6-block container as shown in (14-2), although most of the slots are unused, the physical capacity is consumed. As a result, both the 6-block container and the 7-block container consume physical capacity, and even if deduplication and data compression are performed, the effect of efficiently using the
そこで、実施の形態2では、コンテナ単位でガベージコレクションの実施の要否を判断し、コンテナ内の未使用領域を物理解放可能にしてディスク212の使用効率を向上させるストレージ制御装置101(CM211)について説明する。まず、実施の形態2にかかるストレージ制御装置101(CM211)の機能構成例について説明する。
Therefore, in the second embodiment, the storage control device 101 (CM211) that determines whether or not garbage collection needs to be performed for each container and physically releases the unused area in the container to improve the usage efficiency of the
(CM211の機能構成例)
図15は、実施の形態2にかかるCM211の機能構成例を示す説明図である。CM211は、制御部300を有する。制御部300は、受け付け部301と、コンテナ領域決定部302と、書き込み部303と、特定部304と、読み出し部305と、物理解放制御部1501と、を含む。制御部300は、記憶装置に記憶されたプログラムをCPU221が実行することにより、各部の機能を実現する。また、各部の処理結果は、DRAM222や、CPU221のレジスタ、CPU221のキャッシュメモリ等に格納される。
(Example of functional configuration of CM211)
FIG. 15 is an explanatory diagram showing an example of functional configuration of CM211 according to the second embodiment. CM211 has a
物理解放制御部1501は、コンテナ領域121の物理解放単位領域の物理解放を制御する。ここで、物理解放単位領域は、コンテナ領域121が有する複数のデータ領域122を物理解放可能な単位で区分けした領域である。物理解放単位領域は、例えば、21[MB]の領域である。
The physical
具体的には、物理解放制御部1501は、コンテナ領域121のうち未使用のデータ領域122の数が閾値αを超えたか否かを判断する。以下の説明では、コンテナ領域121のうち未使用のデータ領域122の数を「未使用領域数」と表記する場合がある。ここで、閾値αは、任意に設定可能であり、例えば、コンテナ領域121が有するデータ領域122の総数の3割程度の値に設定される。
Specifically, the physical
一例として、コンテナ領域121の記憶容量を4[GB]とし、データ領域122の記憶容量を512[byte]とすると、コンテナ領域121が有するデータ領域122の総数は「8388608」である。この場合、閾値αは、例えば、総数「8388608」の3割程度の値「2768240」に設定される。 As an example, assuming that the storage capacity of the container area 121 is 4 [GB] and the storage capacity of the data area 122 is 512 [byte], the total number of data areas 122 of the container area 121 is "838608". In this case, the threshold value α is set to, for example, a value “2768240” which is about 30% of the total number “838608”.
より具体的には、例えば、物理解放制御部1501は、コンテナ領域121のいずれかのデータ領域122のリファレンスカウンタが減算されて「0」になったことに応じて、コンテナ領域121の未使用領域数が閾値αを超えたか否かを判断する。これにより、コンテナ領域121のいずれかのデータ領域122が未使用となったことに応じて、コンテナ領域121の未使用領域数が閾値αを超えたか否かを判断することができる。
More specifically, for example, the physical
また、物理解放制御部1501は、コンテナ領域121の未使用領域数が閾値αを超えた場合、コンテナ領域121の複数の物理解放単位領域それぞれについて、物理解放単位領域に含まれる使用中のデータ領域122の数を算出する。以下の説明では、物理解放単位領域に含まれる使用中のデータ領域122の数を「使用領域数」と表記する場合がある。
Further, when the number of unused areas in the container area 121 exceeds the threshold value α, the physical
具体的には、例えば、物理解放制御部1501は、コンテナ領域121のデータサイズ別管理テーブル312を参照して、コンテナ領域121の各物理解放単位領域の使用領域数を算出する。なお、物理解放制御部1501は、例えば、データサイズ別管理テーブル312のスロット番号から、どのデータ領域122がどの物理解放単位領域に含まれるかを特定することができる。
Specifically, for example, the physical
一例として、スロット番号が若い順に21[MB]単位で区分けした複数の物理解放単位領域を物理解放単位領域A,B,C,DおよびEとする。この場合、物理解放制御部1501は、物理解放単位領域A〜Eごとに、物理解放単位領域A〜Eの使用領域数を算出する。
As an example, a plurality of physical release unit areas divided in units of 21 [MB] in ascending order of slot numbers are referred to as physical release unit areas A, B, C, D, and E. In this case, the physical
また、物理解放制御部1501は、算出した物理解放単位領域ごとの使用領域数に基づいて、コンテナ領域121の物理解放単位領域間でデータ移行を行う。具体的には、例えば、まず、物理解放制御部1501は、算出した物理解放単位領域ごとの使用領域数に基づいて、コンテナ領域121の複数の物理解放単位領域から、第1および第2の物理解放単位領域を決定する。
Further, the physical
ここで、第1の物理解放単位領域は、データの移行元となる物理解放単位領域である。第2の物理解放単位領域は、データの移行先となる物理解放単位領域である。より具体的には、例えば、物理解放制御部1501は、コンテナ領域121の複数の物理解放単位領域のうち、使用領域数が最小の物理解放単位領域を、第1の物理解放単位領域に決定してもよい。また、物理解放制御部1501は、コンテナ領域121の複数の物理解放単位領域のうち、使用領域数が最大の物理解放単位領域を、第2の物理解放単位領域に決定してもよい。
Here, the first physical release unit area is a physical release unit area that is a data migration source. The second physical release unit area is the physical release unit area to which the data is transferred. More specifically, for example, the physical
一例として、物理解放単位領域A〜Eの使用領域数が下記のように算出されたとする。
物理解放単位領域Aの使用領域数「10」
物理解放単位領域Bの使用領域数「10」
物理解放単位領域Cの使用領域数「8」
物理解放単位領域Dの使用領域数「11」
物理解放単位領域Eの使用領域数「9」
As an example, it is assumed that the number of used areas of the physical release unit areas A to E is calculated as follows.
Number of used areas in the physical release unit area A "10"
Number of used areas in the physical release unit area B "10"
Number of used areas in the physical release unit area C "8"
Number of used areas "11" in the physical release unit area D
Number of used areas "9" in the physical release unit area E
この場合、物理解放制御部1501は、例えば、物理解放単位領域A〜Eのうち、使用領域数が最小の物理解放単位領域Cを、第1の物理解放単位領域に決定する。また、物理解放制御部1501は、例えば、物理解放単位領域A〜Eのうち、使用領域数が最大の物理解放単位領域Dを、第2の物理解放単位領域に決定する。
In this case, the physical
次に、物理解放制御部1501は、第1の物理解放単位領域に含まれる使用中のデータ領域122のデータを、第2の物理解放単位領域に含まれる未使用のデータ領域122に移行する。第1および第2の物理解放単位領域に含まれる各データ領域122の使用状況は、例えば、データサイズ別管理テーブル312から特定される。
Next, the physical
これにより、コンテナ領域121内の物理解放単位領域間でデータ移行することができる。この際、コンテナ領域121内のデータ領域122は全て同じデータサイズのため、データサイズが一定でない場合に比べて、データ移行を効率的に行うことができる。 As a result, data can be transferred between the physical release unit areas in the container area 121. At this time, since the data areas 122 in the container area 121 all have the same data size, data migration can be performed more efficiently than when the data size is not constant.
また、物理解放制御部1501は、第1の物理解放単位領域の使用領域数が、第2の物理解放単位領域に含まれる未使用のデータ領域122の数(未使用領域数)以下である場合に、第1および第2の物理解放単位領域間でのデータ移行を行うことにしてもよい。物理解放単位領域の未使用領域数は、例えば、物理解放単位領域に含まれるデータ領域122の総数から物理解放単位領域の使用領域数を減算することにより求めることができる。すなわち、物理解放制御部1501は、コンテナ領域121の複数の物理解放単位領域のうち、未使用領域数が第1の物理解放単位領域の使用領域数以上であって、かつ、使用領域数がより大きい物理解放単位領域を、第2の物理解放単位領域に決定してもよい。これにより、第1の物理解放単位領域に使用中のデータ領域122が残ってしまうのを防ぐことができる。
Further, the physical
ただし、物理解放制御部1501は、第1および第2の物理解放単位領域間でのデータ移行を行った結果、第1の物理解放単位領域に使用中のデータ領域122が残った場合、新たな第2の物理解放単位領域を決定することにしてもよい。この際、物理解放制御部1501は、コンテナ領域121の複数の物理解放単位領域のうち、第1および第2の物理解放単位領域に決定した物理解放単位領域を除く残余の物理解放単位領域から、新たな第2の物理解放単位領域を決定する。
However, if the physical
一例として、物理解放単位領域A〜Eのうち、物理解放単位領域Cから物理解放単位領域Dへのデータ移行が行われた結果、物理解放単位領域Cに使用中のデータ領域122が残ったとする。この場合、物理解放制御部1501は、例えば、物理解放単位領域A〜Eのうち、物理解放単位領域C,Dを除く残余の物理解放単位領域A,B,Eから、新たな第2の物理解放単位領域を決定する。より具体的には、例えば、物理解放制御部1501は、物理解放単位領域A,B,Eのうち、使用領域数が最大の物理解放単位領域Aを、新たな第2の物理解放単位領域に決定する。なお、使用領域数が同一の物理解放単位領域が複数存在する場合、物理解放制御部1501は、例えば、スロット番号が若いデータ領域122を含む物理解放単位領域を優先する。
As an example, it is assumed that, of the physical release unit areas A to E, the data area 122 in use remains in the physical release unit area C as a result of data migration from the physical release unit area C to the physical release unit area D. .. In this case, the physical
また、物理解放制御部1501は、第1の物理解放単位領域に含まれる使用中のデータ領域122のデータの移行が完了した場合に、第1の物理解放単位領域に対応する物理記憶領域を解放する。ここで、第1の物理解放単位領域に対応する物理記憶領域は、例えば、第1の物理解放単位領域に割り当てられたディスク212内の物理記憶領域である。
Further, the physical
具体的には、例えば、物理解放制御部1501は、第1の物理解放単位領域に含まれる使用中のデータ領域122のデータの移行が全て完了した場合、第1の物理解放単位領域に割り当てられたディスク212内の物理記憶領域をゼロクリアする。そして、物理解放制御部1501は、コンテナ領域121の物理記憶領域の割り当てに関する制御情報(不図示)を更新する。より詳細に説明すると、例えば、物理解放制御部1501は、第1の物理解放単位領域に対応付けられた物理記憶領域の物理アドレスをクリアする。
Specifically, for example, the physical
これにより、コンテナ領域121内の物理解放単位領域間でのデータ移行により使用中のデータ領域122がなくなった第1の物理解放単位領域を物理解放することができる。 As a result, the first physical release unit area in which the data area 122 in use has disappeared due to data migration between the physical release unit areas in the container area 121 can be physically released.
また、物理解放制御部1501は、第1の物理解放単位領域に含まれる使用中のデータ領域122のデータの移行が全て完了した場合、新たな第1および第2の物理解放単位領域を決定することにしてもよい。この際、使用中のデータ領域122のデータの移行が全て完了した物理解放単位領域は、決定対象から除外される。
Further, the physical
また、物理解放制御部1501は、第1の物理解放単位領域に含まれる使用中のデータ領域122のデータを、第2の物理解放単位領域に含まれる未使用のデータ領域122に移行したことに応じて、ブロックマップテーブル311およびデータサイズ別管理テーブル312を更新する。
Further, the physical
具体的には、例えば、物理解放制御部1501は、移行したデータについて、ブロックマップテーブル311内の物理格納スロット番号を、移行先のデータ領域122の物理格納スロット番号に更新する。また、物理解放制御部1501は、データサイズ別管理テーブル312内の移行元および移行先のデータ領域122のデータ領域使用状況およびリファレンスカウンタを更新する。より詳細に説明すると、例えば、物理解放制御部1501は、データサイズ別管理テーブル312内の移行元のデータ領域122のデータ領域使用状況を「未使用」とし、リファレンスカウンタを「0」とする。また、物理解放制御部1501は、データサイズ別管理テーブル312内の移行先のデータ領域122のデータ領域使用状況を「使用中」とし、リファレンスカウンタを移行元のデータ領域122のリファレンスカウンタの値とする。
Specifically, for example, the physical
なお、物理解放制御部1501は、物理解放単位領域を解放した際に、当該物理解放単位領域に含まれる各データ領域122の使用状況を「空」に変更することにしてもよい。これにより、CM211は、例えば、物理記憶領域を再割り当てする際に、最初のデータ領域122が「空」であることを確認すれば、再割り当て必要であると判断することができる。仮に全データ領域122の使用状況を「未使用」のままにしておくと、例えば、全データ領域122の使用状況が「未使用」であると確認してから、物理記憶領域の再割り当てを行うことになり負荷がかかる。
When the physical release unit area is released, the physical
(物理解放単位領域の物理解放例)
次に、図16〜図19を用いて、コンテナ領域121の物理解放単位領域の物理解放例について説明する。ここでは、データパターン傾向の変化により、使用状況が大きく変化したコンテナID「x」のコンテナ領域121を例に挙げて、物理解放単位領域の物理解放例について説明する。
(Example of physical release of physical release unit area)
Next, an example of physical release of the physical release unit area of the container area 121 will be described with reference to FIGS. 16 to 19. Here, an example of physical release of the physical release unit area will be described by taking as an example the container area 121 of the container ID “x” whose usage status has changed significantly due to a change in the data pattern tendency.
図16は、データサイズ別管理テーブル312−xの記憶内容の一例を示す説明図である。図16において、データサイズ別管理テーブル312−xは、コンテナIDと、コンテナ情報501と、未使用キュー502と、コンテナ管理サイズ503と、コンテナ先頭アドレス504とを有する。
FIG. 16 is an explanatory diagram showing an example of the stored contents of the data size management table 312-x. In FIG. 16, the data size management table 312-x has a container ID,
コンテナ情報501は、レコード511−0〜59を有する。すなわち、コンテナID「x」のコンテナ領域121は、スロット番号「0」〜「59」の60個のデータ領域122を有する。
図17〜図19は、コンテナ領域121の物理解放単位領域の物理解放例を示す説明図である。図17において、コンテナID「x」のコンテナ領域121の各データ領域122の使用状況が示されている。ここでは、左上をスロット番号「0」のデータ領域122とし、各行において、左から右に向かってスロット番号が昇順となるようにデータ領域122が並べられている。 17 to 19 are explanatory views showing an example of physical release of the physical release unit area of the container area 121. In FIG. 17, the usage status of each data area 122 of the container area 121 of the container ID “x” is shown. Here, the upper left is the data area 122 of the slot number “0”, and the data areas 122 are arranged in each line so that the slot numbers are in ascending order from left to right.
例えば、1番上の行は、左から右に向かって、スロット番号「0」〜「9」の10個のデータ領域122が並べられている。また、コンテナID「x」のコンテナ領域121の複数の物理解放単位領域を、20個のデータ領域122の単位で区分けした物理解放単位領域1701〜1703とする。また、閾値αを「α=20」とする。
For example, in the top row, 10 data areas 122 having slot numbers "0" to "9" are arranged from left to right. Further, the plurality of physical release unit areas of the container area 121 of the container ID "x" are divided into physical
図17の(17−1)では、図16に示したデータサイズ別管理テーブル312−xが示すコンテナID「x」のコンテナ領域121の各データ領域122の使用状況が示されている。この場合、物理解放制御部1501は、データサイズ別管理テーブル312−xを参照して、コンテナID「x」のコンテナ領域121の未使用領域数が閾値αを超えたか否かを判断する。
In FIG. 17 (17-1), the usage status of each data area 122 of the container area 121 of the container ID “x” shown in the data size management table 312-x shown in FIG. 16 is shown. In this case, the physical
ここで、コンテナID「x」のコンテナ領域121の未使用領域数は「45」である。このため、物理解放制御部1501は、コンテナID「x」のコンテナ領域121の未使用領域数が閾値αを超えたと判断する。次に、物理解放制御部1501は、データサイズ別管理テーブル312−xを参照して、物理解放単位領域1701〜1703の使用領域数を算出する。
Here, the number of unused areas in the container area 121 of the container ID “x” is “45”. Therefore, the physical
ここでは、物理解放単位領域1701の使用領域数は「2」、物理解放単位領域1702の使用領域数は「10」、物理解放単位領域1703の使用領域数は「3」である。この場合、物理解放制御部1501は、使用領域数が最小の物理解放単位領域1701を、第1の物理解放単位領域に決定する。また、物理解放制御部1501は、使用領域数が最大の物理解放単位領域1702を、第2の物理解放単位領域に決定する。
Here, the number of used areas of the physical
そして、物理解放制御部1501は、物理解放単位領域1701に含まれる使用中のデータ領域122のデータを、物理解放単位領域1702に含まれる未使用のデータ領域122に移行する。この際、物理解放制御部1501は、物理解放単位領域1702に含まれるスロット番号が若い未使用のデータ領域122に移行する。
Then, the physical
図17の(17−2)では、物理解放単位領域1701に含まれるスロット番号「1」のデータ領域122のデータが、物理解放単位領域1702に含まれるスロット番号「21」のデータ領域122に移行されている。
In (17-2) of FIG. 17, the data in the data area 122 of the slot number “1” included in the physical
図18の(17−3)では、物理解放単位領域1701に含まれるスロット番号「6」のデータ領域122のデータが、物理解放単位領域1702に含まれるスロット番号「23」のデータ領域122に移行されている。
In (17-3) of FIG. 18, the data in the data area 122 of the slot number “6” included in the physical
物理解放単位領域1701に含まれる使用中のデータ領域122のデータの移行が全て完了すると、物理解放制御部1501は、新たな第1および第2の物理解放単位領域を決定する。ここで、データ移行完了後の物理解放単位領域1702の使用領域数は「12」、物理解放単位領域1703の使用領域数は「3」である。
When all the data transfer of the data area 122 in use included in the physical
この場合、物理解放制御部1501は、使用領域数が最小の物理解放単位領域1703を、第1の物理解放単位領域に決定する。また、物理解放制御部1501は、使用領域数が最大の物理解放単位領域1702を、第2の物理解放単位領域に決定する。なお、データ移行が完了した物理解放単位領域1701は、決定対象から除外される。
In this case, the physical
そして、物理解放制御部1501は、物理解放単位領域1703に含まれる使用中のデータ領域122のデータを、物理解放単位領域1702に含まれる未使用のデータ領域122に移行する。この際、物理解放制御部1501は、物理解放単位領域1702に含まれるスロット番号が若い未使用のデータ領域122に移行する。
Then, the physical
図18の(17−4)では、物理解放単位領域1703に含まれるスロット番号「48」のデータ領域122のデータが、物理解放単位領域1702に含まれるスロット番号「24」のデータ領域122に移行されている。
In (17-4) of FIG. 18, the data in the data area 122 of the slot number “48” included in the physical
同様にして、物理解放単位領域1703に含まれるスロット番号「52,55」のデータ領域122のデータが、物理解放単位領域1702に含まれるスロット番号「26,28」のデータ領域122に移行されると、図19の(17−5)に示す状態となる。
Similarly, the data in the data area 122 of the slot number "52,55" included in the physical
そして、物理解放制御部1501は、使用中のデータ領域122のデータの移行が完了した物理解放単位領域に対応する物理記憶領域を解放する。図19の(17−6)では、物理解放単位領域1701,1703に対応する物理記憶領域が解放される。
Then, the physical
これにより、データパターン傾向の変化により未使用のデータ領域122が多くなったコンテナID「x」のコンテナ領域121のガベージコレクションを実施して、物理記憶領域の使用量を3分の1に減らすことができる。物理解放された領域は、他のコンテナ領域121等に利用可能となり、ディスク212の使用効率を向上させることができる。
As a result, garbage collection of the container area 121 of the container ID "x" in which the unused data area 122 has increased due to the change in the data pattern tendency is performed, and the usage amount of the physical storage area is reduced to one-third. Can be done. The physically released area can be used for other container areas 121 and the like, and the usage efficiency of the
また、コンテナ領域121内のデータ領域122は全て同じデータサイズのため、データサイズが一定でない場合に比べて、データ移行を効率的に行うことができる。例えば、データサイズが一定でなければ、使用中のデータ分移動させることになるのに対して、図17〜図19に示した例では、書き込み回数を5回に減らすことができる。 Further, since the data areas 122 in the container area 121 all have the same data size, data migration can be performed more efficiently than when the data size is not constant. For example, if the data size is not constant, the data in use will be moved, whereas in the examples shown in FIGS. 17 to 19, the number of writes can be reduced to five.
(CM211の各種処理手順)
次に、実施の形態2にかかるCM211の各種処理手順について説明する。まず、実施の形態2にかかるCM211のWriteI/O受け付け時処理手順について説明する。ただし、図11に示したステップS1113のリファレンスカウンタ加減算処理の具体的な処理手順以外は、実施の形態1にかかるCM211のWriteI/O受け付け時処理手順と同様である。このため、実施の形態1にかかるCM211と異なるリファレンスカウンタ加減算処理の具体的な処理手順について説明する。
(Various processing procedures of CM211)
Next, various processing procedures of CM211 according to the second embodiment will be described. First, the writing procedure at the time of receiving Write I / O of CM211 according to the second embodiment will be described. However, except for the specific processing procedure of the reference counter addition / subtraction processing in step S1113 shown in FIG. 11, the procedure is the same as the writing I / O reception processing procedure of CM211 according to the first embodiment. Therefore, a specific processing procedure of the reference counter addition / subtraction processing different from that of the CM211 according to the first embodiment will be described.
図20は、実施の形態2にかかるリファレンスカウンタ加減算処理手順の一例を示すフローチャートである。CM211は、今回の圧縮分割Writeデータwdscを書き込んだデータ領域122のリファレンスカウンタを1加算する(ステップS2001)。また、CM211は、今回の圧縮分割Writeデータを書き込む前に使用していたデータ領域122のリファレンスカウンタを1減算する(ステップS2002)。そして、CM211は、今回のリファレンスカウンタの更新により、リファレンスカウンタが0になったデータ領域122があるか否かを判断する(ステップS2003)。
FIG. 20 is a flowchart showing an example of the reference counter addition / subtraction processing procedure according to the second embodiment. The CM211 adds 1 to the reference counter of the data area 122 in which the current compression division Write data wdsc is written (step S2001). Further, the
リファレンスカウンタが0になったデータ領域122がある場合(ステップS2003:リファレンスカウンタが0になったデータ領域あり)、CM211は、対象のデータ領域122を未使用として、未使用キューに対象のデータ領域122を接続する(ステップS2004)。
When there is a data area 122 in which the reference counter has become 0 (step S2003: there is a data area in which the reference counter has become 0), the
次に、CM211は、対象のコンテナ領域121の未使用領域数が閾値αを超えたか否かを判断する(ステップS2005)。なお、対象のコンテナ領域121とは、ステップS2004において、未使用キューに対象のデータ領域122を接続したコンテナ領域121である。 Next, CM211 determines whether or not the number of unused areas of the target container area 121 exceeds the threshold value α (step S2005). The target container area 121 is a container area 121 in which the target data area 122 is connected to the unused queue in step S2004.
対象のコンテナ領域121の未使用領域数が閾値αを超えた場合(ステップS2005:閾値をオーバー)、CM211は、ガベージコレクション処理を呼び出す(ステップS2006)。ガベージコレクション処理の具体的な処理手順については、図21および図22を用いて後述する。
When the number of unused areas of the target container area 121 exceeds the threshold value α (step S2005: the threshold value is exceeded), the
ステップS2006の処理終了後、または、リファレンスカウンタが0になったデータ領域122がない場合(ステップS2003:リファレンスカウンタが0になったデータ領域なし)、または、対象のコンテナ領域121の未使用領域数が閾値α以下の場合(ステップS2005:閾値以下)、CM211は、リファレンスカウンタ加減算処理を終了する。 After the processing of step S2006 is completed, or when there is no data area 122 whose reference counter has become 0 (step S2003: no data area whose reference counter has become 0), or the number of unused areas of the target container area 121. When is equal to or less than the threshold value α (step S2005: equal to or less than the threshold value), CM211 ends the reference counter addition / subtraction process.
これにより、コンテナ領域121の未使用のデータ領域122が増加したタイミングで、コンテナ領域121のガベージコレクションの実施の要否を判断することができる。 As a result, it is possible to determine whether or not the garbage collection of the container area 121 needs to be performed at the timing when the unused data area 122 of the container area 121 increases.
図21および図22は、実施の形態2にかかるガベージコレクション処理手順の一例を示すフローチャートである。図21のフローチャートにおいて、まず、CM211は、対象のコンテナ領域121のデータサイズ別管理テーブル312を参照して、対象のコンテナ領域121の物理解放単位領域の使用領域数を算出する(ステップS2101)。
21 and 22 are flowcharts showing an example of the garbage collection processing procedure according to the second embodiment. In the flowchart of FIG. 21, first, the
次に、CM211は、対象のコンテナ領域121の物理解放単位領域を、算出した使用領域数が少ない順にガベージブロックリンクに接続する(ステップS2102)。そして、CM211は、ガベージブロックリンクの先頭の物理解放単位領域を移行元領域に決定する(ステップS2103)。移行元領域は、上述した第1の物理解放単位領域に対応する。
Next, the
なお、ガベージブロックリンクに接続される各領域は、prev情報とnext情報を有しており、直前の領域と次の領域とを特定可能な状態となっている。 Each area connected to the garbage block link has prev information and next information, and is in a state where the immediately preceding area and the next area can be specified.
次に、CM211は、ガベージブロックリンクの最後尾の物理解放単位領域を移行先領域に決定する(ステップS2104)。移行先領域は、上述した第2の物理解放単位領域に対応する。次に、CM211は、決定した移行元領域に使用中のデータ領域122があるか否かを判断する(ステップS2105)。
Next, CM211 determines the physical release unit area at the end of the garbage block link as the migration destination area (step S2104). The migration destination region corresponds to the second physical release unit region described above. Next, the
ここで、移行元領域に使用中のデータ領域122がある場合(ステップS2105:Yes)、CM211は、決定した移行先領域に未使用のデータ領域122があるか否かを判断する(ステップS2106)。ここで、移行先領域に未使用のデータ領域122がある場合(ステップS2106:Yes)、CM211は、図22に示すステップS2201に移行する。
Here, when there is a data area 122 in use in the migration source area (step S2105: Yes), the CM211 determines whether or not there is an unused data area 122 in the determined migration destination area (step S2106). .. Here, when there is an unused data area 122 in the migration destination area (step S2106: Yes), the
また、ステップS2105において、移行元領域に使用中のデータ領域122がない場合(ステップS2105:No)、CM211は、移行元領域のnext情報から、移行元領域の次に物理解放単位領域があるか否かを判断する(ステップS2107)。 Further, in step S2105, when there is no data area 122 in use in the migration source area (step S2105: No), the CM211 has a physical release unit area next to the migration source area based on the next information of the migration source area. It is determined whether or not (step S2107).
ここで、次に物理解放単位領域がある場合(ステップS2107:Yes)、CM211は、次の物理解放単位領域を移行元領域に変更し(ステップS2108)、ステップS2105に移行する。一方、次に物理解放単位領域がない場合(ステップS2107:No)、CM211は、図22に示すステップS2207に移行する。 Here, when there is a physical release unit area next (step S2107: Yes), CM211 changes the next physical release unit area to the migration source area (step S2108), and proceeds to step S2105. On the other hand, if there is no physical release unit area next (step S2107: No), CM211 shifts to step S2207 shown in FIG.
また、ステップS2106において、移行先領域に未使用のデータ領域122がない場合(ステップS2106:No)、CM211は、移行先領域のprev情報から、移行先領域の直前に物理解放単位領域があるか否かを判断する(ステップS2109)。 Further, in step S2106, when there is no unused data area 122 in the migration destination area (step S2106: No), does CM211 have a physical release unit area immediately before the migration destination area based on the prev information of the migration destination area? It is determined whether or not (step S2109).
ここで、直前に物理解放単位領域がある場合(ステップS2109:Yes)、CM211は、直前の物理解放単位領域を移行先領域に変更し(ステップS2110)、ステップS2106に移行する。一方、直前に物理解放単位領域がない場合(ステップS2109:No)、CM211は、図22に示すステップS2207に移行する。 Here, if there is a physical release unit area immediately before (step S2109: Yes), the CM211 changes the immediately preceding physical release unit area to the migration destination area (step S2110), and proceeds to step S2106. On the other hand, when there is no physical release unit area immediately before (step S2109: No), CM211 shifts to step S2207 shown in FIG.
図22のフローチャートにおいて、まず、CM211は、移行元領域と移行先領域が別領域であるか否かを判断する(ステップS2201)。ここで、移行元領域と移行先領域が別領域の場合(ステップS2201:Yes)、CM211は、移行元領域の使用領域数が移行先領域の使用領域数以下であるか否かを判断する(ステップS2202)。 In the flowchart of FIG. 22, first, CM211 determines whether or not the migration source region and the migration destination region are different regions (step S2201). Here, when the migration source area and the migration destination area are different areas (step S2201: Yes), the CM211 determines whether or not the number of used areas of the migration source area is equal to or less than the number of used areas of the migration destination area (step S2201: Yes). Step S2202).
ここで、移行元領域の使用領域数が移行先領域の使用領域数以下の場合(ステップS2202:Yes)、CM211は、移行元領域に含まれる使用中のデータ領域122のデータを、移行先領域に含まれる未使用のデータ領域122にコピーする(ステップS2203)。 Here, when the number of used areas of the migration source area is equal to or less than the number of used areas of the migration destination area (step S2202: Yes), the CM211 transfers the data of the data area 122 in use included in the migration source area to the migration destination area. It is copied to the unused data area 122 included in (step S2203).
そして、CM211は、ブロックマップテーブル311およびデータサイズ別管理テーブル312を更新する(ステップS2204)。次に、CM211は、移行元領域に使用中のデータ領域122があるか否かを判断する(ステップS2205)。 Then, CM211 updates the block map table 311 and the data size management table 312 (step S2204). Next, CM211 determines whether or not there is a data area 122 in use in the migration source area (step S2205).
ここで、移行元領域に使用中のデータ領域122がない場合(ステップS2205:No)、CM211は、図21に示したステップS2107に移行する。一方、移行元領域に使用中のデータ領域122がある場合(ステップS2205:Yes)、CM211は、移行先領域に未使用のデータ領域122があるか否かを判断する(ステップS2206)。 Here, when there is no data area 122 in use in the migration source area (step S2205: No), CM211 shifts to step S2107 shown in FIG. On the other hand, when there is a data area 122 in use in the migration source area (step S2205: Yes), the CM211 determines whether or not there is an unused data area 122 in the migration destination area (step S2206).
ここで、移行先領域に未使用のデータ領域122がない場合(ステップS2206:No)、CM211は、図21に示したステップS2109に移行する。一方、移行先領域に未使用のデータ領域122がある場合(ステップS2206:Yes)、CM211は、ステップS2203に戻る。 Here, when there is no unused data area 122 in the migration destination area (step S2206: No), CM211 shifts to step S2109 shown in FIG. On the other hand, when there is an unused data area 122 in the migration destination area (step S2206: Yes), CM211 returns to step S2203.
また、ステップS2201において、移行元領域と移行先領域が同一領域の場合(ステップS2201:No)、または、ステップS2202において、移行元領域の使用領域数が移行先領域の使用領域数より大きい場合(ステップS2202:No)、CM211は、ステップS2207に移行する。これにより、移行元領域の使用領域数のほうが移行先領域の使用領域数よりも大きくなった際に、データ移行が行われてしまうのを防ぐことができる。 Further, in step S2201, when the migration source area and the migration destination area are the same area (step S2201: No), or in step S2202, the number of used areas of the migration source area is larger than the number of used areas of the migration destination area (step S2201: No). Step S2202: No), CM211 shifts to step S2207. As a result, it is possible to prevent data migration when the number of used areas in the migration source area becomes larger than the number of used areas in the migration destination area.
そして、CM211は、全てのデータ領域122が未使用となった物理解放単位領域に対して、物理解放を実施して(ステップS2207)、本フローチャートによる一連の処理を終了する。これにより、コンテナ単位でガベージコレクションを実施して、データパターン傾向の変化により使用されなくなった領域を物理解放することができる。
Then, the
以上説明したように、実施の形態2にかかるCM211は、コンテナ領域121の未使用領域数が閾値αを超えたか否かを判断する。具体的には、例えば、CM211は、コンテナ領域121のいずれかのデータ領域122のリファレンスカウンタが減算されて「0」になったことに応じて、コンテナ領域121の未使用領域数が閾値αを超えたか否かを判断する。
As described above, the
これにより、コンテナ領域121のいずれかのデータ領域122が未使用となったことに応じて、コンテナ領域121の未使用領域数が閾値αを超えたか否かを判断することができる。換言すれば、コンテナ領域121の未使用のデータ領域122が増加したタイミングで、コンテナ領域121のガベージコレクションの実施の要否を判断できる。 Thereby, it is possible to determine whether or not the number of unused areas of the container area 121 exceeds the threshold value α according to the fact that any of the data areas 122 of the container area 121 is unused. In other words, it is possible to determine whether or not the garbage collection of the container area 121 needs to be performed at the timing when the unused data area 122 of the container area 121 increases.
また、CM211は、コンテナ領域121の未使用領域数が閾値αを超えた場合、コンテナ領域121の複数の物理解放単位領域それぞれについて、物理解放単位領域に含まれる使用中のデータ領域の使用領域数を算出する。また、CM211は、算出した物理解放単位領域ごとの使用領域数に基づいて、複数の物理解放単位領域のうち、第1の物理解放単位領域に含まれる使用中のデータ領域122のデータを、第2の物理解放単位領域に含まれる未使用のデータ領域122に移行する。そして、CM211は、第1の物理解放単位領域に含まれる使用中のデータ領域122のデータの移行が完了した場合に、第1の物理解放単位領域に対応する物理記憶領域を解放する。
Further, in the
これにより、データパターン傾向が変化してコンテナ領域121の未使用領域数が閾値αを超えたときに、コンテナ領域121内の物理解放単位領域間でデータ移行し、まとまった未使用領域を作り出して物理解放(ガベージコレクション)を行うことができる。 As a result, when the data pattern tendency changes and the number of unused areas in the container area 121 exceeds the threshold value α, data is transferred between the physical release unit areas in the container area 121 to create a cohesive unused area. Physical release (garbage collection) can be performed.
また、CM211は、コンテナ領域121の複数の物理解放単位領域のうち、使用領域数が最小の物理解放単位領域を、第1の物理解放単位領域に決定し、使用領域数が最大の物理解放単位領域を、第2の物理解放単位領域に決定することができる。これにより、コンテナ領域121内でまとまった未使用領域を効率的に作り出すことができる。
Further, the
また、CM211は、第1の物理解放単位領域の使用領域数が、第2の物理解放単位領域の未使用領域数以下である場合に、第1の物理解放単位領域に含まれる使用中のデータ領域122のデータを、第2の物理解放単位領域に含まれる未使用のデータ領域122に移行することができる。これにより、第2の物理解放単位領域にデータを移行しきれずに、第1の物理解放単位領域に使用中のデータ領域122が残ってしまうのを防ぐことができる。
Further, the
これらのことから、実施の形態2にかかるCM211によれば、データパターン傾向の変化により未使用領域が多くなったコンテナ領域121のガベージコレクションを実施して、ディスク212の使用効率を向上させることができる。また、コンテナ領域121内のデータ領域122は全て同じデータサイズのため、データサイズが一定でない場合に比べて、データ移行を効率的に行うことができる。このため、ディスク212に用いるSSD等の寿命に与える影響を抑えつつガベージコレクションを実施することができる。
Based on these facts, according to the
なお、本実施の形態で説明したストレージ制御方法は、予め用意されたプログラムをパーソナル・コンピュータやワークステーション等のコンピュータで実行することにより実現することができる。本ストレージ制御プログラムは、ハードディスク、フレキシブルディスク、CD−ROM(Compact Disc−Read Only Memory)、DVD(Digital Versatile Disk)等のコンピュータで読み取り可能な記録媒体に記録され、コンピュータによって記録媒体から読み出されることによって実行される。また本ストレージ制御プログラムは、インターネット等のネットワークを介して配布してもよい。 The storage control method described in the present embodiment can be realized by executing a program prepared in advance on a computer such as a personal computer or a workstation. This storage control program is recorded on a computer-readable recording medium such as a hard disk, a flexible disk, a CD-ROM (Compact Disc-Read Only Memory), or a DVD (Digital Versaille Disk), and is read from the recording medium by the computer. Is executed by. Further, this storage control program may be distributed via a network such as the Internet.
上述した実施の形態に関し、さらに以下の付記を開示する。 The following additional notes are further disclosed with respect to the above-described embodiment.
(付記1)ストレージのアクセス単位のサイズの整数倍の複数のデータ領域を含む記憶領域を有する前記ストレージにおいて、前記記憶領域から割り当てた前記整数倍の第1のサイズの複数のデータ領域の各データ領域の物理アドレスを特定可能な情報と前記各データ領域の使用状況を示す情報とを有する第1の管理情報と、前記記憶領域から割り当てた前記整数倍であって前記第1のサイズとは異なる第2のサイズの複数のデータ領域の各データ領域の物理アドレスを特定可能な情報と当該各データ領域の使用状況を示す情報とを有する第2の管理情報と、前記記憶領域のうちのデータを書き込んだデータ領域の物理アドレスを特定可能な情報に前記データの論理アドレスを対応付けた論理アドレス情報とを有する記憶部と、
所定のサイズの書き込みデータと前記書き込みデータの論理アドレスとを受け付けたことに応じて、前記第1の管理情報および前記第2の管理情報から、前記書き込みデータを圧縮した圧縮後のデータのサイズ以上のサイズに対応する管理情報を特定し、特定した前記管理情報から特定される複数のデータ領域のうちの未使用のデータ領域に前記圧縮後のデータを書き込むとともに、前記未使用のデータ領域の物理アドレスを特定可能な情報と前記書き込みデータの論理アドレスとを対応付けて前記論理アドレス情報に格納する制御部と、
を有することを特徴とするストレージ制御装置。
(Appendix 1) In the storage having a storage area including a plurality of data areas which are integral multiples of the size of the access unit of the storage, each data of the plurality of data areas of the first size which is the integral multiple allocated from the storage area. The first management information having information capable of specifying the physical address of the area and information indicating the usage status of each data area, and the integral multiple of the storage area allocated, which is different from the first size. The second management information having the information that can specify the physical address of each data area of the plurality of data areas of the second size and the information indicating the usage status of each data area, and the data in the storage area. A storage unit having logical address information in which the logical address of the data is associated with information that can identify the physical address of the written data area, and
Depending on the acceptance of the write data of a predetermined size and the logical address of the write data, the size of the compressed data obtained by compressing the write data or more from the first management information and the second management information The management information corresponding to the size of is specified, the compressed data is written to the unused data area among the plurality of data areas specified from the specified management information, and the physical of the unused data area is written. A control unit that stores the information in which the address can be specified and the logical address of the write data in the logical address information in association with each other.
A storage control device characterized by having.
(付記2)前記記憶領域は、ヘッドによりアクセスされる記憶領域であって、
前記整数倍の複数のデータ領域は、連続した領域であって、
前記制御部は、
特定した前記管理情報から特定される複数のデータ領域のうちの未使用のデータ領域が複数あれば、先頭にある未使用のデータ領域に前記圧縮後のデータを書き込む、
ことを特徴とする付記1に記載のストレージ制御装置。
(Appendix 2) The storage area is a storage area accessed by the head.
The plurality of data areas of an integral multiple are continuous areas, and the plurality of data areas are continuous areas.
The control unit
If there are a plurality of unused data areas among the plurality of data areas specified from the specified management information, the compressed data is written to the unused data area at the head.
The storage control device according to
(付記3)前記第1の管理情報における複数のデータ領域の物理アドレスを特定可能な情報は、当該複数のデータ領域の先頭の物理アドレスと、前記複数のデータ領域の各データ領域における先頭のデータ領域からの順番と、前記第1のサイズとであって、
前記第2の管理情報における複数のデータ領域の物理アドレスを特定可能な情報は、当該複数のデータ領域の先頭の物理アドレスと、前記複数のデータ領域の各データ領域における先頭のデータ領域からの順番と、前記第2のサイズとであって、
前記論理アドレス情報は、前記記憶領域のうちのデータを書き込んだデータ領域が属する管理情報と、当該データ領域を含む複数のデータ領域の先頭からの当該データ領域の順番と、当該データの論理アドレスとを対応付けており、
前記制御部は、
所定のサイズの読み出し範囲の論理アドレスを受け付けたことに応じて、前記論理アドレス情報を参照して、前記読み出し範囲の論理アドレスに対応する管理情報および順番を特定し、
特定した前記管理情報における複数のデータ領域の先頭の物理アドレスと、特定した前記順番と、当該管理情報に対応するサイズとに基づいて、前記読み出し範囲の論理アドレスに対応するデータが書き込まれたデータ領域の物理アドレスを算出し、
前記記憶領域の前記物理アドレスからデータを読み出す、
ことを特徴とする付記1または2に記載のストレージ制御装置。
(Appendix 3) The information that can identify the physical addresses of the plurality of data areas in the first management information includes the first physical address of the plurality of data areas and the first data in each data area of the plurality of data areas. The order from the area and the first size,
The information that can identify the physical addresses of the plurality of data areas in the second management information is the order from the first physical address of the plurality of data areas and the first data area in each data area of the plurality of data areas. And the second size,
The logical address information includes management information to which the data area in which the data is written belongs, the order of the data area from the beginning of a plurality of data areas including the data area, and the logical address of the data. Is associated with
The control unit
In response to receiving the logical address of the read range of a predetermined size, the management information and the order corresponding to the logical address of the read range are specified by referring to the logical address information.
Data in which data corresponding to the logical address of the read range is written based on the physical address at the beginning of a plurality of data areas in the specified management information, the specified order, and the size corresponding to the management information. Calculate the physical address of the area and
Read data from the physical address in the storage area,
The storage control device according to
(付記4)前記第1の管理情報における複数のデータ領域の物理アドレスを特定可能な情報は、当該複数のデータ領域の先頭の物理アドレスと、前記複数のデータ領域の各データ領域における先頭のデータ領域からの順番と、前記第1のサイズとであって、
前記第2の管理情報における複数のデータ領域の物理アドレスを特定可能な情報は、当該複数のデータ領域の先頭の物理アドレスと、前記複数のデータ領域の各データ領域における先頭のデータ領域からの順番と、前記第2のサイズとであって、
前記論理アドレス情報は、前記記憶領域のうちのデータを書き込んだデータ領域が属する管理情報と、当該データ領域を含む複数のデータ領域の先頭からの当該データ領域の順番と、当該データの論理アドレスとを対応付けており、
前記制御部は、
前記論理アドレス情報における前記書き込みデータの論理アドレスに対応する管理情報と、特定した前記管理情報とが同一である場合、特定した前記管理情報から特定される複数のデータ領域のうちの前記論理アドレス情報における前記書き込みデータの論理アドレスに対応する順番で示されるデータ領域に、前記圧縮後のデータを書き込む、
ことを特徴とする付記1〜3のいずれか一つに記載のストレージ制御装置。
(Appendix 4) The information that can identify the physical addresses of the plurality of data areas in the first management information includes the first physical address of the plurality of data areas and the first data in each data area of the plurality of data areas. The order from the area and the first size,
The information that can identify the physical addresses of the plurality of data areas in the second management information is the order from the first physical address of the plurality of data areas and the first data area in each data area of the plurality of data areas. And the second size,
The logical address information includes management information to which the data area in which the data is written belongs, the order of the data area from the beginning of a plurality of data areas including the data area, and the logical address of the data. Is associated with
The control unit
When the management information corresponding to the logical address of the write data in the logical address information and the specified management information are the same, the logical address information among the plurality of data areas specified from the specified management information. The compressed data is written in the data area indicated in the order corresponding to the logical address of the write data in the above.
The storage control device according to any one of
(付記5)前記第1の管理情報における複数のデータ領域の各データ領域は、互いに重複しないデータを有し、
前記第1の管理情報は、さらに、前記第1の管理情報における複数のデータ領域の各データ領域に対応して、当該各データ領域を参照する論理アドレスの数を有し、
前記第2の管理情報における複数のデータ領域の各データ領域は、互いに重複しないデータを有し、
前記第2の管理情報は、さらに、前記第2の管理情報における複数のデータ領域の各データ領域に対応して、当該各データ領域を参照する論理アドレスの数を有し、
前記制御部は、
前記論理アドレス情報における前記書き込みデータの論理アドレスに対応する管理情報と、特定した前記管理情報とが同一であり、かつ、前記論理アドレス情報における前記書き込みデータの論理アドレスに対応する順番で示されるデータ領域を参照する論理アドレスの数が1である場合、特定した前記管理情報から特定される複数のデータ領域のうちの前記論理アドレス情報における前記書き込みデータの論理アドレスに対応する順番で示されるデータ領域に、前記圧縮後のデータを書き込む、
ことを特徴とする付記4に記載のストレージ制御装置。
(Appendix 5) Each data area of the plurality of data areas in the first management information has data that does not overlap with each other.
The first management information further has a number of logical addresses that refer to each data area corresponding to each data area of the plurality of data areas in the first management information.
Each data area of the plurality of data areas in the second management information has data that does not overlap with each other.
The second management information further has a number of logical addresses that refer to each data area corresponding to each data area of the plurality of data areas in the second management information.
The control unit
Data in which the management information corresponding to the logical address of the write data in the logical address information and the specified management information are the same and are shown in the order corresponding to the logical address of the write data in the logical address information. When the number of logical addresses that refer to the area is 1, the data area indicated in the order corresponding to the logical address of the write data in the logical address information among the plurality of data areas specified from the specified management information. Write the compressed data to
The storage control device according to
(付記6)前記制御部は、
前記複数のデータ領域のうち未使用のデータ領域の数が閾値を超えた場合、前記複数のデータ領域を物理解放可能な単位で区分けした複数の物理解放単位領域それぞれについて、前記物理解放単位領域に含まれる使用中のデータ領域の使用領域数を算出し、
算出した前記物理解放単位領域ごとの使用領域数に基づいて、前記複数の物理解放単位領域のうち、第1の物理解放単位領域に含まれる使用中のデータ領域のデータを、第2の物理解放単位領域に含まれる未使用のデータ領域に移行し、
前記第1の物理解放単位領域に含まれる使用中のデータ領域のデータの移行が完了した場合に、前記第1の物理解放単位領域に対応する物理記憶領域を解放する、
ことを特徴とする付記1〜5のいずれか一つに記載のストレージ制御装置。
(Appendix 6) The control unit is
When the number of unused data areas among the plurality of data areas exceeds the threshold value, each of the plurality of physical release unit areas in which the plurality of data areas are divided into units that can be physically released is assigned to the physical release unit area. Calculate the number of used areas of the included data area in use,
Based on the calculated number of used areas for each physical release unit area, the data of the data area in use included in the first physical release unit area among the plurality of physical release unit areas is released to the second physical release unit area. Migrate to the unused data area contained in the unit area,
When the data transfer of the data area in use included in the first physical release unit area is completed, the physical storage area corresponding to the first physical release unit area is released.
The storage control device according to any one of
(付記7)前記第1の物理解放単位領域は、前記複数の物理解放単位領域のうち使用領域数が最小の物理解放単位領域であり、
前記第2の物理解放単位領域は、前記複数の物理解放単位領域のうち使用領域数が最大の物理解放単位領域である、
ことを特徴とする付記6に記載のストレージ制御装置。
(Appendix 7) The first physical release unit area is a physical release unit area having the smallest number of used areas among the plurality of physical release unit areas.
The second physical release unit area is a physical release unit area having the largest number of used areas among the plurality of physical release unit areas.
The storage control device according to
(付記8)前記制御部は、
前記第1の物理解放単位領域の使用領域数が、前記第2の物理解放単位領域に含まれる未使用のデータ領域の数以下である場合に、前記第1の物理解放単位領域に含まれる使用中のデータ領域のデータを、前記第2の物理解放単位領域に含まれる未使用のデータ領域に移行する、
ことを特徴とする付記6または7に記載のストレージ制御装置。
(Appendix 8) The control unit is
Use included in the first physical release unit area when the number of used areas of the first physical release unit area is equal to or less than the number of unused data areas included in the second physical release unit area. The data in the data area inside is transferred to the unused data area included in the second physical release unit area.
The storage control device according to
(付記9)前記制御部は、
前記第1の物理解放単位領域に含まれる使用中のデータ領域のデータを、前記第2の物理解放単位領域に含まれる未使用のデータ領域に移行したことに応じて、前記管理情報および前記論理アドレス情報を更新する、
ことを特徴とする付記6〜8のいずれか一つに記載のストレージ制御装置。
(Appendix 9) The control unit is
The management information and the logic in response to the transfer of the data in the used data area included in the first physical release unit area to the unused data area included in the second physical release unit area. Update address information,
The storage control device according to any one of
(付記10)コンピュータに、
ストレージのアクセス単位のサイズの整数倍の複数のデータ領域を含む記憶領域を有する前記ストレージに対して、所定のサイズの書き込みデータと前記書き込みデータの論理アドレスとを受け付けたことに応じて、前記記憶領域から割り当てた前記整数倍の第1のサイズの複数のデータ領域の各データ領域の物理アドレスを特定可能な情報と前記各データ領域の使用状況を示す情報とを有する第1の管理情報、および、前記記憶領域から割り当てた前記整数倍であって前記第1のサイズとは異なる第2のサイズの複数のデータ領域の各データ領域の物理アドレスを特定可能な情報と当該各データ領域の使用状況を示す情報とを有する第2の管理情報から、前記書き込みデータを圧縮した圧縮後のデータのサイズ以上のサイズに対応する管理情報を特定し、
特定した前記管理情報から特定される複数のデータ領域のうちの未使用のデータ領域に前記圧縮後のデータを書き込むとともに、前記未使用のデータ領域の物理アドレスを特定可能な情報と前記書き込みデータの論理アドレスとを対応付けて、前記記憶領域のうちのデータを書き込んだデータ領域の物理アドレスを特定可能な情報に前記データの論理アドレスを対応付けた論理アドレス情報に格納する、
処理を実行させることを特徴とするストレージ制御プログラム。
(Appendix 10) To the computer
The storage in response to the reception of write data of a predetermined size and the logical address of the write data for the storage having a storage area including a plurality of data areas that are integral multiples of the size of the access unit of the storage. The first management information having information that can specify the physical address of each data area of the plurality of data areas of the first size of the integral multiple allocated from the area and information indicating the usage status of each data area, and Information that can specify the physical address of each data area of a plurality of data areas of a second size that is an integral multiple of the storage area and is different from the first size, and the usage status of each data area. From the second management information having the information indicating the above, the management information corresponding to the size equal to or larger than the size of the compressed data obtained by compressing the written data is specified.
The compressed data is written to the unused data area among the plurality of data areas specified from the specified management information, and the information capable of specifying the physical address of the unused data area and the written data The physical address of the data area in which the data is written in the storage area is stored in the logical address information in which the logical address of the data is associated with the identifiable information by associating with the logical address.
A storage control program characterized by executing processing.
(付記11)前記第1の管理情報における複数のデータ領域の物理アドレスを特定可能な情報は、当該複数のデータ領域の先頭の物理アドレスと、前記複数のデータ領域の各データ領域における先頭のデータ領域からの順番と、前記第1のサイズとであって、
前記第2の管理情報における複数のデータ領域の物理アドレスを特定可能な情報は、当該複数のデータ領域の先頭の物理アドレスと、前記複数のデータ領域の各データ領域における先頭のデータ領域からの順番と、前記第2のサイズとであって、
前記論理アドレス情報は、前記記憶領域のうちのデータを書き込んだデータ領域が属する管理情報と、当該データ領域を含む複数のデータ領域の先頭からの当該データ領域の順番と、当該データの論理アドレスとを対応付けており、
前記コンピュータに、
所定のサイズの読み出し範囲の論理アドレスを受け付けたことに応じて、前記論理アドレス情報を参照して、前記読み出し範囲の論理アドレスに対応する管理情報および順番を特定し、
特定した前記管理情報における複数のデータ領域の先頭の物理アドレスと、特定した前記順番と、当該管理情報に対応するサイズとに基づいて、前記読み出し範囲の論理アドレスに対応するデータが書き込まれたデータ領域の物理アドレスを算出し、
前記記憶領域の前記物理アドレスからデータを読み出す、
処理を実行させることを特徴とする付記10に記載のストレージ制御プログラム。
(Appendix 11) The information that can identify the physical addresses of the plurality of data areas in the first management information includes the first physical address of the plurality of data areas and the first data in each data area of the plurality of data areas. The order from the area and the first size,
The information that can identify the physical addresses of the plurality of data areas in the second management information is the order from the first physical address of the plurality of data areas and the first data area in each data area of the plurality of data areas. And the second size,
The logical address information includes management information to which the data area in which the data is written belongs, the order of the data area from the beginning of a plurality of data areas including the data area, and the logical address of the data. Is associated with
On the computer
In response to receiving the logical address of the read range of a predetermined size, the management information and the order corresponding to the logical address of the read range are specified by referring to the logical address information.
Data in which data corresponding to the logical address of the read range is written based on the physical address at the beginning of a plurality of data areas in the specified management information, the specified order, and the size corresponding to the management information. Calculate the physical address of the area and
Read data from the physical address in the storage area,
The storage control program according to Appendix 10, wherein the process is executed.
101 ストレージ制御装置
102 ストレージ
110 管理情報
111 論理アドレス情報
121 コンテナ領域
122 データ領域
300 制御部
301 受け付け部
302 コンテナ領域決定部
303 書き込み部
304 特定部
305 読み出し部
310 記憶部
311 ブロックマップテーブル
312 データサイズ別管理テーブル
1501 物理解放制御部
1701,1702,1703 物理解放単位領域
101
Claims (8)
所定のサイズの書き込みデータと前記書き込みデータの論理アドレスとを受け付けたことに応じて、前記第1の管理情報および前記第2の管理情報から、前記書き込みデータを圧縮した圧縮後のデータのサイズ以上のサイズに対応する管理情報を特定し、特定した前記管理情報から特定される複数のデータ領域のうちの未使用のデータ領域に前記圧縮後のデータを書き込むとともに、前記未使用のデータ領域の物理アドレスを特定可能な情報と前記書き込みデータの論理アドレスとを対応付けて前記論理アドレス情報に格納し、
前記複数のデータ領域のうち未使用のデータ領域の数が閾値を超えた場合、前記複数のデータ領域を物理解放可能な単位で区分けした複数の物理解放単位領域それぞれについて、前記物理解放単位領域に含まれる使用中のデータ領域の使用領域数を算出し、
算出した前記物理解放単位領域ごとの使用領域数に基づいて、前記複数の物理解放単位領域のうち、第1の物理解放単位領域に含まれる使用中のデータ領域のデータを、第2の物理解放単位領域に含まれる未使用のデータ領域に移行し、
前記第1の物理解放単位領域に含まれる使用中のデータ領域のデータの移行が完了した場合に、前記第1の物理解放単位領域に対応する物理記憶領域を解放する制御部と、
を有することを特徴とするストレージ制御装置。 In the storage having a storage area including a plurality of data areas that are integral multiples of the size of the access unit of the storage, the physical address of each data area of the plurality of data areas of the first size that is the integral multiples allocated from the storage area. A first management information having information that can identify the data and information indicating the usage status of each data area, and a second size that is an integral multiple of the storage area and is different from the first size. Second management information having information that can identify the physical address of each data area of the plurality of data areas and information indicating the usage status of each data area, and a data area in which the data in the storage area is written. A storage unit having logical address information in which the logical address of the data is associated with information that can identify the physical address of the data.
Depending on the acceptance of the write data of a predetermined size and the logical address of the write data, the size of the compressed data obtained by compressing the write data or more from the first management information and the second management information The management information corresponding to the size of is specified, the compressed data is written to the unused data area among the plurality of data areas specified from the specified management information, and the physical of the unused data area is written. The information whose address can be specified is associated with the logical address of the written data and stored in the logical address information.
When the number of unused data areas among the plurality of data areas exceeds the threshold value, each of the plurality of physical release unit areas in which the plurality of data areas are divided into units that can be physically released is assigned to the physical release unit area. Calculate the number of used areas of the included data area in use,
Based on the calculated number of used areas for each physical release unit area, the data of the data area in use included in the first physical release unit area among the plurality of physical release unit areas is released to the second physical release unit area. Migrate to the unused data area contained in the unit area,
A control unit that releases the physical storage area corresponding to the first physical release unit area when the data transfer of the data area in use included in the first physical release unit area is completed.
A storage control device characterized by having.
前記整数倍の複数のデータ領域は、連続した領域であって、
前記制御部は、
特定した前記管理情報から特定される複数のデータ領域のうちの未使用のデータ領域が複数あれば、先頭にある未使用のデータ領域に前記圧縮後のデータを書き込む、
ことを特徴とする請求項1に記載のストレージ制御装置。 The storage area is a storage area accessed by the head.
The plurality of data areas of an integral multiple are continuous areas, and the plurality of data areas are continuous areas.
The control unit
If there are a plurality of unused data areas among the plurality of data areas specified from the specified management information, the compressed data is written to the unused data area at the head.
The storage control device according to claim 1.
前記第1の管理情報における複数のデータ領域の物理アドレスを特定可能な情報は、当該複数のデータ領域の先頭の物理アドレスと、前記複数のデータ領域の各データ領域における先頭のデータ領域からの順番と、前記第1のサイズとであって、
前記第2の管理情報における複数のデータ領域の物理アドレスを特定可能な情報は、当該複数のデータ領域の先頭の物理アドレスと、前記複数のデータ領域の各データ領域における先頭のデータ領域からの順番と、前記第2のサイズとであって、
前記論理アドレス情報は、前記記憶領域のうちのデータを書き込んだデータ領域が属する管理情報と、当該データ領域を含む複数のデータ領域の先頭からの当該データ領域の順番と、当該データの論理アドレスとを対応付けており、
前記制御部は、
所定のサイズの読み出し範囲の論理アドレスを受け付けたことに応じて、前記論理アドレス情報を参照して、前記読み出し範囲の論理アドレスに対応する管理情報および順番を特定し、
特定した前記管理情報における複数のデータ領域の先頭の物理アドレスと、特定した前記順番と、当該管理情報に対応するサイズとに基づいて、前記読み出し範囲の論理アドレスに対応するデータが書き込まれたデータ領域の物理アドレスを算出し、
前記記憶領域の前記物理アドレスからデータを読み出す、
ことを特徴とする請求項1または2に記載のストレージ制御装置。 The plurality of data areas of an integral multiple are continuous areas, and the plurality of data areas are continuous areas.
The information that can identify the physical addresses of the plurality of data areas in the first management information is the order from the first physical address of the plurality of data areas and the first data area in each data area of the plurality of data areas. And the first size
The information that can identify the physical addresses of the plurality of data areas in the second management information is the order from the first physical address of the plurality of data areas and the first data area in each data area of the plurality of data areas. And the second size,
The logical address information includes management information to which the data area in which the data is written belongs, the order of the data area from the beginning of a plurality of data areas including the data area, and the logical address of the data. Is associated with
The control unit
In response to receiving the logical address of the read range of a predetermined size, the management information and the order corresponding to the logical address of the read range are specified by referring to the logical address information.
Data in which data corresponding to the logical address of the read range is written based on the physical address at the beginning of a plurality of data areas in the specified management information, the specified order, and the size corresponding to the management information. Calculate the physical address of the area and
Read data from the physical address in the storage area,
The storage control device according to claim 1 or 2.
前記第1の管理情報における複数のデータ領域の物理アドレスを特定可能な情報は、当該複数のデータ領域の先頭の物理アドレスと、前記複数のデータ領域の各データ領域における先頭のデータ領域からの順番と、前記第1のサイズとであって、
前記第2の管理情報における複数のデータ領域の物理アドレスを特定可能な情報は、当該複数のデータ領域の先頭の物理アドレスと、前記複数のデータ領域の各データ領域における先頭のデータ領域からの順番と、前記第2のサイズとであって、
前記論理アドレス情報は、前記記憶領域のうちのデータを書き込んだデータ領域が属する管理情報と、当該データ領域を含む複数のデータ領域の先頭からの当該データ領域の順番と、当該データの論理アドレスとを対応付けており、
前記制御部は、
前記論理アドレス情報における前記書き込みデータの論理アドレスに対応する管理情報と、特定した前記管理情報とが同一である場合、特定した前記管理情報から特定される複数のデータ領域のうちの前記論理アドレス情報における前記書き込みデータの論理アドレスに対応する順番で示されるデータ領域に、前記圧縮後のデータを書き込む、
ことを特徴とする請求項1〜3のいずれか一つに記載のストレージ制御装置。 The plurality of data areas of an integral multiple are continuous areas, and the plurality of data areas are continuous areas.
The information that can identify the physical addresses of the plurality of data areas in the first management information is the order from the first physical address of the plurality of data areas and the first data area in each data area of the plurality of data areas. And the first size
The information that can identify the physical addresses of the plurality of data areas in the second management information is the order from the first physical address of the plurality of data areas and the first data area in each data area of the plurality of data areas. And the second size,
The logical address information includes management information to which the data area in which the data is written belongs, the order of the data area from the beginning of a plurality of data areas including the data area, and the logical address of the data. Is associated with
The control unit
When the management information corresponding to the logical address of the write data in the logical address information and the specified management information are the same, the logical address information among the plurality of data areas specified from the specified management information. The compressed data is written in the data area indicated in the order corresponding to the logical address of the write data in the above.
The storage control device according to any one of claims 1 to 3.
前記第1の管理情報は、さらに、前記第1の管理情報における複数のデータ領域の各データ領域に対応して、当該各データ領域を参照する論理アドレスの数を有し、
前記第2の管理情報における複数のデータ領域の各データ領域は、互いに重複しないデータを有し、
前記第2の管理情報は、さらに、前記第2の管理情報における複数のデータ領域の各データ領域に対応して、当該各データ領域を参照する論理アドレスの数を有し、
前記制御部は、
前記論理アドレス情報における前記書き込みデータの論理アドレスに対応する管理情報と、特定した前記管理情報とが同一であり、かつ、前記論理アドレス情報における前記書き込みデータの論理アドレスに対応する順番で示されるデータ領域を参照する論理アドレスの数が1である場合、特定した前記管理情報から特定される複数のデータ領域のうちの前記論理アドレス情報における前記書き込みデータの論理アドレスに対応する順番で示されるデータ領域に、前記圧縮後のデータを書き込む、
ことを特徴とする請求項4に記載のストレージ制御装置。 Each data area of the plurality of data areas in the first management information has data that does not overlap with each other.
The first management information further has a number of logical addresses that refer to each data area corresponding to each data area of the plurality of data areas in the first management information.
Each data area of the plurality of data areas in the second management information has data that does not overlap with each other.
The second management information further has a number of logical addresses that refer to each data area corresponding to each data area of the plurality of data areas in the second management information.
The control unit
Data in which the management information corresponding to the logical address of the write data in the logical address information and the specified management information are the same and are shown in the order corresponding to the logical address of the write data in the logical address information. When the number of logical addresses that refer to the area is 1, the data area indicated in the order corresponding to the logical address of the write data in the logical address information among the plurality of data areas specified from the specified management information. Write the compressed data to
The storage control device according to claim 4.
前記第2の物理解放単位領域は、前記複数の物理解放単位領域のうち使用領域数が最大の物理解放単位領域である、 The second physical release unit area is a physical release unit area having the largest number of used areas among the plurality of physical release unit areas.
ことを特徴とする請求項1に記載のストレージ制御装置。 The storage control device according to claim 1.
前記第1の物理解放単位領域の使用領域数が、前記第2の物理解放単位領域に含まれる未使用のデータ領域の数以下である場合に、前記第1の物理解放単位領域に含まれる使用中のデータ領域のデータを、前記第2の物理解放単位領域に含まれる未使用のデータ領域に移行する、 Use included in the first physical release unit area when the number of used areas of the first physical release unit area is equal to or less than the number of unused data areas included in the second physical release unit area. The data in the data area inside is transferred to the unused data area included in the second physical release unit area.
ことを特徴とする請求項6に記載のストレージ制御装置。 The storage control device according to claim 6.
ストレージのアクセス単位のサイズの整数倍の複数のデータ領域を含む記憶領域を有する前記ストレージに対して、所定のサイズの書き込みデータと前記書き込みデータの論理アドレスとを受け付けたことに応じて、前記記憶領域から割り当てた前記整数倍の第1のサイズの複数のデータ領域の各データ領域の物理アドレスを特定可能な情報と前記各データ領域の使用状況を示す情報とを有する第1の管理情報、および、前記記憶領域から割り当てた前記整数倍であって前記第1のサイズとは異なる第2のサイズの複数のデータ領域の各データ領域の物理アドレスを特定可能な情報と当該各データ領域の使用状況を示す情報とを有する第2の管理情報から、前記書き込みデータを圧縮した圧縮後のデータのサイズ以上のサイズに対応する管理情報を特定し、 The storage in response to the reception of write data of a predetermined size and the logical address of the write data for the storage having a storage area including a plurality of data areas that are integral multiples of the size of the access unit of the storage. The first management information having information that can specify the physical address of each data area of the plurality of data areas of the first size of the integral multiple allocated from the area and information indicating the usage status of each data area, and Information that can specify the physical address of each data area of a plurality of data areas of a second size that is an integral multiple of the storage area and is different from the first size, and the usage status of each data area. From the second management information having the information indicating the above, the management information corresponding to the size equal to or larger than the size of the compressed data obtained by compressing the written data is specified.
特定した前記管理情報から特定される複数のデータ領域のうちの未使用のデータ領域に前記圧縮後のデータを書き込むとともに、前記未使用のデータ領域の物理アドレスを特定可能な情報と前記書き込みデータの論理アドレスとを対応付けて、前記記憶領域のうちのデータを書き込んだデータ領域の物理アドレスを特定可能な情報に前記データの論理アドレスを対応付けた論理アドレス情報に格納し、 The compressed data is written to the unused data area among the plurality of data areas specified from the specified management information, and the information capable of specifying the physical address of the unused data area and the written data By associating with the logical address, the physical address of the data area in which the data is written in the storage area is stored in the logical address information in which the logical address of the data is associated with the identifiable information.
前記複数のデータ領域のうち未使用のデータ領域の数が閾値を超えた場合、前記複数のデータ領域を物理解放可能な単位で区分けした複数の物理解放単位領域それぞれについて、前記物理解放単位領域に含まれる使用中のデータ領域の使用領域数を算出し、 When the number of unused data areas among the plurality of data areas exceeds the threshold value, each of the plurality of physical release unit areas in which the plurality of data areas are divided into units that can be physically released is assigned to the physical release unit area. Calculate the number of used areas of the included data area in use,
算出した前記物理解放単位領域ごとの使用領域数に基づいて、前記複数の物理解放単位領域のうち、第1の物理解放単位領域に含まれる使用中のデータ領域のデータを、第2の物理解放単位領域に含まれる未使用のデータ領域に移行し、 Based on the calculated number of used areas for each physical release unit area, the data of the data area in use included in the first physical release unit area among the plurality of physical release unit areas is released to the second physical release unit area. Migrate to the unused data area contained in the unit area,
前記第1の物理解放単位領域に含まれる使用中のデータ領域のデータの移行が完了した場合に、前記第1の物理解放単位領域に対応する物理記憶領域を解放する、 When the data transfer of the data area in use included in the first physical release unit area is completed, the physical storage area corresponding to the first physical release unit area is released.
処理を実行させることを特徴とするストレージ制御プログラム。 A storage control program characterized by executing processing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US15/862,756 US10402108B2 (en) | 2017-01-20 | 2018-01-05 | Efficient control of data storage areas based on a size of compressed data to be written |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017008165 | 2017-01-20 | ||
JP2017008165 | 2017-01-20 |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2018120571A JP2018120571A (en) | 2018-08-02 |
JP6926866B2 true JP6926866B2 (en) | 2021-08-25 |
Family
ID=63045210
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017175670A Active JP6926866B2 (en) | 2017-01-20 | 2017-09-13 | Storage controller and storage control program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6926866B2 (en) |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06309111A (en) * | 1993-04-23 | 1994-11-04 | Fujitsu Ltd | Magnetic disk control method |
JP2831602B2 (en) * | 1995-01-13 | 1998-12-02 | 富士通株式会社 | Compressed data management device and compressed data management method |
JP2011192260A (en) * | 2010-02-16 | 2011-09-29 | Toshiba Corp | Semiconductor storage device |
-
2017
- 2017-09-13 JP JP2017175670A patent/JP6926866B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2018120571A (en) | 2018-08-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10635310B2 (en) | Storage device that compresses data received from a host before writing therein | |
JP6304406B2 (en) | Storage apparatus, program, and information processing method | |
US9361034B2 (en) | Transferring storage resources between snapshot storage pools and volume storage pools in a distributed network | |
WO2013164878A1 (en) | Management apparatus and management method for computer system | |
JP5816303B2 (en) | Storage system including flash memory and storage control method | |
EP2367100A2 (en) | Controller, data storage device, and program product | |
WO2015076354A1 (en) | Storage device, method, and program | |
US20210081116A1 (en) | Extending ssd longevity | |
US20110314205A1 (en) | Storage system | |
JP6298932B2 (en) | Storage device | |
JP2008507756A (en) | FAT analysis for optimized sequential cluster management | |
JP2015517697A (en) | Storage system and storage control method using storage area based on secondary storage as cache area | |
US9262339B2 (en) | Managing write operations in a computerized memory | |
US10402108B2 (en) | Efficient control of data storage areas based on a size of compressed data to be written | |
JP2018181202A (en) | Device, method, and program for storage control | |
US8868853B2 (en) | Data processing device, data recording method and data recording program | |
US10929299B2 (en) | Storage system, method and non-transitory computer-readable storage medium | |
JP3431581B2 (en) | Disk control system and data relocation method | |
JP6926866B2 (en) | Storage controller and storage control program | |
JP2005202942A (en) | Information recording medium, data processor and data processing method | |
US9483199B1 (en) | Data deduplication using multiple devices | |
WO2010119478A1 (en) | Storage system and control method therefor | |
Wu et al. | Fluidsmr: Adaptive management for hybrid smr drives | |
WO2021015174A1 (en) | Storage management device, storage management method and program | |
JP6107341B2 (en) | Data management program, data management device, and data management method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20200611 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20210322 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20210427 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210611 |
|
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: 20210706 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210719 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6926866 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |