JP2010160544A - Cache memory system and method for controlling cache memory - Google Patents
Cache memory system and method for controlling cache memory Download PDFInfo
- Publication number
- JP2010160544A JP2010160544A JP2009000748A JP2009000748A JP2010160544A JP 2010160544 A JP2010160544 A JP 2010160544A JP 2009000748 A JP2009000748 A JP 2009000748A JP 2009000748 A JP2009000748 A JP 2009000748A JP 2010160544 A JP2010160544 A JP 2010160544A
- Authority
- JP
- Japan
- Prior art keywords
- data
- chunk
- cache
- cache memory
- storage device
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000003860 storage Methods 0.000 claims abstract description 96
- 238000012546 transfer Methods 0.000 claims abstract description 24
- 238000010926 purge Methods 0.000 claims description 23
- 238000012545 processing Methods 0.000 claims description 17
- 238000011010 flushing procedure Methods 0.000 claims description 10
- 230000004044 response Effects 0.000 claims description 3
- 238000010845 search algorithm Methods 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 12
- 238000007726 management method Methods 0.000 description 5
- 238000013523 data management Methods 0.000 description 4
- 239000004065 semiconductor Substances 0.000 description 4
- 238000007796 conventional method Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 210000000707 wrist Anatomy 0.000 description 3
- 230000007423 decrease Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 101100480513 Caenorhabditis elegans tag-52 gene Proteins 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 230000006378 damage Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000007430 reference method Methods 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
本発明は、コンピュータとストレージ装置の間に設ける、キャッシュメモリシステムに関し、更に詳しくはストレージ装置へのアクセス速度を高速化するキャッシュメモリシステムに関する。 The present invention relates to a cache memory system provided between a computer and a storage apparatus, and more particularly to a cache memory system that increases the access speed to a storage apparatus.
コンピュータ上で動作するアプリケーションの処理速度を向上させる方策の1つとして、コンピュータがアクセスするストレージ装置のアクセス速度を高速化することが行われている。 As one of the measures for improving the processing speed of an application operating on a computer, the access speed of a storage device accessed by the computer is increased.
ストレージのアクセス速度を高速化するものとしては、DRAM半導体ディスク装置と呼ばれるDRAMを記憶媒体としたランダムアドレスアクセスを高速で行うことが出来るストレージ装置がある。一方、シーケンシャルアドレスアクセスに対してのスループットが超高速(1GB/s以上)なストレージ装置もある。また近年では、フラッシュメモリ型SSDを搭載したRAID装置が存在する。 As a device for increasing the access speed of storage, there is a storage device called a DRAM semiconductor disk device that can perform random address access using a DRAM as a storage medium at high speed. On the other hand, there is also a storage device that has a very high throughput (1 GB / s or more) for sequential address access. In recent years, there is a RAID device equipped with a flash memory type SSD.
しかしながら、DRAM半導体ディスク装置は、容量に制限があり、実際のアプリケーションに適応するには、アクセス頻度の高いデータ(ホットデータ)とアクセス頻度の低いデータ(コールドデータ)を解析分離し、ホットデータのみをDRAM半導体ディスク装置へ格納するといった、非常に面倒な作業を必要とする。そのため、なかなか導入に至らないケースが多かった。フラッシュメモリ型のSSDはランダムリードアクセスは非常に高速だが、ランダムライトアクセスは磁気ディスクと同程度の性能しか出ない。したがってランダム書き込みが多いアプリケーションで用いるストレージ装置としては、不向きである。 However, the capacity of DRAM semiconductor disk devices is limited, and in order to adapt to actual applications, data with high access frequency (hot data) and data with low access frequency (cold data) are analyzed and separated, and only hot data is stored. Is very troublesome, such as storing the data in a DRAM semiconductor disk device. For this reason, there were many cases where it was difficult to introduce. The flash memory type SSD has a very high random read access speed, but the random write access has the same performance as a magnetic disk. Therefore, it is not suitable as a storage device used in an application with many random writes.
また、超高速なスループットを実現したストレージ装置は、ハイビジョン映像編集用途には適応しているが、ランダムアクセスの多いエンタープライズ市場向けアプリケーションに対しては、あまり高速化の効果が得られない。そこで、通常の磁気ディスク装置またはフラッシュ型SSDとホストコンピュータの間に、それらの弱点であるランダムライトアクセスを高速化する大容量キャッシュメモリシステムを設けることが提案されている。このキャッシュメモリシステムを設けることにより、様々なアプリケーションの実行処理速度を高速化することができる。 In addition, a storage device that realizes ultra-high-speed throughput is suitable for high-definition video editing applications, but is not very effective in speeding up applications for the enterprise market with many random accesses. Therefore, it has been proposed to provide a large-capacity cache memory system between a normal magnetic disk device or a flash SSD and a host computer for speeding up random write access, which is a weak point thereof. By providing this cache memory system, the execution processing speed of various applications can be increased.
図14に一般的なキャッシュメモリシステムする構成を示す。
図14のキャッシュメモリシステム120は、ホストサーバ110と複数のハードディスク装置131−1〜131−l等のソースデバイスを備えたストレージ装置130の間に設けられ、ホストサーバ110がストレージ装置130へアクセスするアクセス速度を向上させる。
FIG. 14 shows a configuration of a general cache memory system.
The cache memory system 120 of FIG. 14 is provided between the host server 110 and the storage apparatus 130 including source devices such as a plurality of hard disk apparatuses 131-1 to 131-l, and the host server 110 accesses the storage apparatus 130. Improve access speed.
図14のキャッシュメモリシステム120は、キャッシュメモリシステム120全体を制御する制御CPU121、ホストサーバ110との接続を行うインタフェースであるSCSIインタフェース122、SCSIインタフェース122を制御するI/O制御部123、ストレージ装置130との接続を行うインタフェースであるSCSIインタフェース124、SCSIインタフェース124を制御するI/O制御部124、キャッシュデータを記憶保持するキャッシュメモリ126、及びキャッシュメモリ126を制御するメモリ制御部127を有する。 14 includes a control CPU 121 that controls the entire cache memory system 120, a SCSI interface 122 that is an interface for connecting to the host server 110, an I / O control unit 123 that controls the SCSI interface 122, and a storage apparatus. A SCSI interface 124 that is an interface for connecting to the I / O 130; an I / O control unit 124 that controls the SCSI interface 124; a cache memory 126 that stores and holds cache data; and a memory control unit 127 that controls the cache memory 126.
ホストサーバ110からストレージ装置130に対して読出しが要求されたデータは、ハードディスク装置131などのソースデバイスから該当データを読み出してホストサーバ110へ転送すると同時にキャッシュメモリシステム120のキャッシュメモリ126上に格納される(ムーブイン)。またホストサーバ110から要求されたデータが、キャッシュメモリ126上に存在する場合は、キャッシュメモリシステム120は、キャッシュメモリ126上のデータを直接ホストサーバ110へ転送する(リードキャッシュヒット)。 The data requested to be read from the host server 110 to the storage device 130 is read from the source device such as the hard disk device 131 and transferred to the host server 110, and simultaneously stored in the cache memory 126 of the cache memory system 120. (Move in). When the data requested from the host server 110 exists on the cache memory 126, the cache memory system 120 transfers the data on the cache memory 126 directly to the host server 110 (read cache hit).
またホストサーバ110からストレージ装置130に書き込まれるデータは、一旦キャッシュメモリシステム120上に格納され(ムーブイン)、ホストサーバ110からのライトコマンドを終了する(ライトバック)。キャッシュメモリ126上の更新されたデータは後ほどストレージ装置130に書き戻される(フラッシュ)。このとき書き込むデータが、キャッシュメモリ126上に存在するデータであったときは、キャッシュメモリシステム120はキャッシュメモリ126上の既にあるデータへ上書きして、ライトコマンドを完了する(ライトキャッシュヒット)。一方で、キャッシュメモリシステム120は、更新されたキャッシュメモリ126上のデータを、ストレージ装置130のソースデバイスへ順次同期させる(フラッシュ)。 Data written from the host server 110 to the storage device 130 is temporarily stored on the cache memory system 120 (move-in), and the write command from the host server 110 is terminated (write-back). The updated data on the cache memory 126 is written back to the storage apparatus 130 later (flash). If the data to be written at this time is data existing on the cache memory 126, the cache memory system 120 overwrites the existing data on the cache memory 126 and completes the write command (write cache hit). On the other hand, the cache memory system 120 sequentially synchronizes the updated data on the cache memory 126 with the source device of the storage apparatus 130 (flash).
キャッシュメモリシステム120は、書き込みデータを一旦キャッシュメモリ126上に格納する際に、該当するデータがキャッシュ上に存在せずかつ空きメモリがない場合はいずれかのキャッシュデータを捨てる(パージ)必要がある。選択したキャッシュデータがストレージ装置130と同期されていない場合はフラッシュとパージを同時に行う必要がある。また、捨てるデータが既にフラッシュされている場合はパージのみを行う。 The cache memory system 120 needs to discard (purge) any cache data when the corresponding data does not exist in the cache and there is no free memory when the write data is temporarily stored in the cache memory 126. . If the selected cache data is not synchronized with the storage apparatus 130, flushing and purging must be performed simultaneously. If the data to be discarded has already been flushed, only purge is performed.
なおキャッシュメモリシステム120において、制御CPU121によりRAID(Redundant Array of Industrial Disks)機能もあわせて実現すれば、キャッシュメモリシステム120及びストレージ装置130は所謂キャッシュ機能つきRAID装置となる。 In the cache memory system 120, if the control CPU 121 also realizes a RAID (Redundant Array of Industrial Disks) function, the cache memory system 120 and the storage device 130 become a so-called RAID device with a cache function.
このキャッシュメモリシステムについての文献としては、例えば非特許文献1にはキャッシュデータの管理方法として、キャッシュメモリをセグメント単位で管理し、コンピュータ(ホストサーバ)からのアクセスサイズに対応してセグメントサイズを変更する方式が開示されている。 As a literature on this cache memory system, for example, in Non-Patent Document 1, as a cache data management method, the cache memory is managed in units of segments, and the segment size is changed according to the access size from the computer (host server) The method to do is disclosed.
この非特許文献1の方式では、セグメントサイズを調整することにより、セグメントサイズより小さなデータによる無効領域の軽減を行っている。しかしこの非特許文献1にはLBA(Logical Block Address)がセグメント境界の途中から始まっているデータについての救済方法に関しては開示されていない。 In the method of Non-Patent Document 1, the invalid area is reduced by data smaller than the segment size by adjusting the segment size. However, this Non-Patent Document 1 does not disclose a relief method for data in which LBA (Logical Block Address) starts in the middle of a segment boundary.
また、非特許文献2には、各種キャッシュアルゴリズムを測定比較し、新たなキャッシュアルゴリズムが提案されている。
この非特許文献2には、ホストサーバから書き込まれてデータを効率的にソースデバイスへフラッシュするために、LBAオーダーに書き込む書き込み方式が開示されている。
Non-Patent Document 2 proposes a new cache algorithm by measuring and comparing various cache algorithms.
This non-patent document 2 discloses a writing method in which data is written from the host server and written in the LBA order in order to efficiently flush the data to the source device.
従来のキャッシュメモリシステムには以下のような問題点がある。
1.ジャンクデータの発生
キャッシュメモリシステムが、キャッシュメモリ上に存在するデータへの書き込み命令を受け取った場合、キャッシュメモリシステムは、キャッシュメモリ上の該当するキャッシュデータに、受信したデータを上書きする(ライトキャッシュヒット)。その際にパリティエラーや転送エラー等の理由で、データ転送が失敗してしまう場合がある。
The conventional cache memory system has the following problems.
1. Occurrence of junk data When the cache memory system receives a write command to data existing on the cache memory, the cache memory system overwrites the received data on the corresponding cache data on the cache memory (write cache hit ). At this time, data transfer may fail due to a parity error or transfer error.
従来のキャッシュメモリシステムの制御方法では、データ転送が失敗した場合に、キャッシュ上のデータにジャンクデータ(意味のないデータ)を上書きしてしまうという問題がある。 The conventional cache memory system control method has a problem that, when data transfer fails, junk data (meaningless data) is overwritten on the data in the cache.
図15は、ジャンクデータの発生問題を示す図である。
キャッシュメモリ126上にホストサーバからの書き込みデータを格納する際、そのデータは、メモリ制御部によってキャッシュメモリ上にDMA(Direct Memory Access)転送されるが、そのDMA転送の途中でパリティエラーや転送エラーが発生すると、キャッシュメモリ126上にジャンクデータが残ってしまう。
2.アドレス境界の問題
図16に一般的なキャッシュデータ管理方式を示す。
FIG. 15 is a diagram illustrating a problem of occurrence of junk data.
When the write data from the host server is stored on the cache memory 126, the data is transferred to the cache memory by the memory control unit by DMA (Direct Memory Access), but a parity error or transfer error occurs during the DMA transfer. When this occurs, junk data remains on the cache memory 126.
2. Address boundary problem FIG. 16 shows a general cache data management system.
キャッシュメモリ126上のデータはセグメント(以下本明細書ではチャンク(chunk)と呼ぶ)単位で管理されている。このデータ管理では、ストレージ装置上のアドレス(LBA)の0アドレスから順にチャンクサイズ単位で分割したアドレス単位でデータの読出しや書き込みを行う。そしてキャッシュメモリ126の各チャンク201は、ハッシュテーブル200によって管理される。 Data on the cache memory 126 is managed in units of segments (hereinafter referred to as “chunks” in this specification). In this data management, data is read and written in units of addresses divided in units of chunk size in order from 0 address of the address (LBA) on the storage device. Each chunk 201 of the cache memory 126 is managed by the hash table 200.
しかしながら、ホストコンピュータはキャッシュメモリ126上のチャンクサイズとは無関係に、チャンクのアドレス境界をまたいでアクセスしてきてしまう。その場合、複数のチャンク上の一部のデータのみを書き込むことになる。 However, regardless of the chunk size on the cache memory 126, the host computer accesses across the chunk address boundary. In that case, only some data on a plurality of chunks is written.
例えば、図16では、チャンク201−1と201−2にまたがったデータ202が書き込まれているが、チャンク201−1では前半部分、チャンク201−2では後半部分が更新されていない。したがってこの場合チャンク201−1と201−2は半分の無効領域を持ってしまう問題がある。 For example, in FIG. 16, data 202 is written across chunks 201-1 and 201-2, but the first half part is not updated in chunk 201-1 and the second half part is not updated in chunk 201-2. Therefore, in this case, there is a problem that the chunks 201-1 and 201-2 have half the invalid area.
非特許文献1では、セグメントサイズを変更して、無効な領域を軽減する方式が示されているが、この非特許文献1の方式でもアクセスされるLBAアドレスが境界アドレスから始まっていない場合は、同様に無効領域が発生してしまう。 Non-Patent Document 1 shows a method of reducing the invalid area by changing the segment size. However, when the LBA address accessed by this non-patent document 1 does not start from a boundary address, Similarly, an invalid area occurs.
そして無効領域が多いとキャッシュ容量が有効に使用されず、キャッシュヒット率が低下してしまう。また無効領域をなくす方法として、一部データのみしか有効でないチャンクは、データを破棄してしまうという方法をとることにより、この問題を回避することができる。しかし、この方法では最近書き込んだデータがキャッシュに存在しないため、キャッシュヒット率が低下してしまう。
3.データフラッシュの効率化における問題
キャッシュメモリシステムでは、新たにデータをキャッシュメモリ上へ格納(ムーブイン)したいが、キャッシュメモリ上に空きチャンクがない場合、LRU(Least Recently Used)等に基づいて破棄するチャンクデータを選択し、新しいチャンクデータと入れ替えることを行う。
If there are many invalid areas, the cache capacity is not used effectively, and the cache hit rate decreases. Further, as a method of eliminating the invalid area, this problem can be avoided by taking a method in which a chunk in which only some data is valid is discarded. However, with this method, recently written data does not exist in the cache, so the cache hit rate decreases.
3. Problems in data flash efficiency In a cache memory system, if you want to store data in the cache memory (move-in), but there is no empty chunk in the cache memory, the chunk to be discarded based on LRU (Least Recently Used) etc. Select data and replace with new chunk data.
このときもし選択したチャンクデータが、ストレージ装置への書き込み(同期)がまだ行われていないダーティデータである場合は、選択されたダーティチャンクデータがソースデバイスへの書き込み(フラッシュ)が終了するまで、キャッシュメモリのデータの入れ替えを行うことができない。 At this time, if the selected chunk data is dirty data that has not yet been written (synchronized) to the storage device, until the selected dirty chunk data finishes writing (flushing) to the source device, The data in the cache memory cannot be replaced.
一方で、キャッシュメモリシステムからストレージ装置へのデータの書き込み性能を向上させるため、ダーティチャンクデータをLBA順にソートしてした後にストレージ装置書き込む(フラッシュ)ことにより、ストレージ装置のヘッダシーク時間を短縮することで書き込み性能の向上が期待できる。しかしながら、キャッシュメモリシステムでチャンクの破棄に用いられるLRUオーダーと、ストレージ装置のLBAオーダーには依存関係が無い。 On the other hand, in order to improve the performance of writing data from the cache memory system to the storage device, the dirty seek data is sorted in LBA order and then written to the storage device (flash) to reduce the storage device header seek time. Can improve write performance. However, there is no dependency between the LRU order used for chunk destruction in the cache memory system and the LBA order of the storage apparatus.
図17は、このために生じる問題を示す図である。同図において網がけ部分はダーティデータを示しており、また(1)〜(8)は、キャッシュメモリ内のデータのホストサーバからアクセスされた順番、すなわちLRUに基づいた順番を示している。 FIG. 17 is a diagram illustrating a problem caused by this. In the figure, the shaded portion indicates dirty data, and (1) to (8) indicate the order in which the data in the cache memory is accessed from the host server, that is, the order based on the LRU.
図17においては、LRUオーダーに従い、チャンクデータ(1)、チャンクデータ(2)、・・・の順にキャッシュパージキュー301に積まれる。そして、最も古くにアクセスされたデータチャンク(1)を最初に破棄(パージ)することになる。しかしながらデータチャンク(1)はダーティデータのため、ストレージ装置130にフラッシュする必要がある。よってチャンクデータ(1)はキャッシュフラッシュキュー302に積まれているが、LBAオーダーではチャンクデータ(5)とチャンク(7)がチャンクデータ(1)より若いアドレスのため、キャッシュフラッシュキュー302にはこれらが先に積まれている。したがってこの2つのチャンクデータ(5)、(7)を先にストレージ装置130にフラッシュするまでチャンクデータ(1)のフラッシュが待たされ、その間新しいキャッシュデータのムーブインが待たされてしまう。よって、キャッシュメモリ126の更新に時間がかかる(ライトコマンドの潜伏時間が長い)という問題がある。 In FIG. 17, in accordance with the LRU order, the chunk data (1), the chunk data (2),. The oldest accessed data chunk (1) is discarded (purged) first. However, since the data chunk (1) is dirty data, it must be flushed to the storage device 130. Therefore, the chunk data (1) is loaded in the cache flush queue 302. However, in the LBA order, the chunk data (5) and the chunk (7) are younger addresses than the chunk data (1). Is loaded first. Accordingly, until the two chunk data (5) and (7) are first flushed to the storage apparatus 130, the flush of the chunk data (1) is waited, and a new cache data move-in is waited during that time. Therefore, there is a problem that it takes time to update the cache memory 126 (the latency time of the write command is long).
そこで上記問題点を鑑み、本発明はデータ保全性とキャッシュヒット率、及びフラッシュ効率を向上させるキャッシュメモリシステム、及びキャッシュメモリの制御方法を提供することを目的とする。 In view of the above problems, an object of the present invention is to provide a cache memory system and a cache memory control method that improve data integrity, cache hit rate, and flash efficiency.
本発明によるキャッシュメモリシステムは、データ処理を行うコンピュータとデータを保存するストレージ装置間で当該ストレージ装置に記憶されるデータをキャッシュするキャッシュメモリシステムにおいて、キャッシュデータをチャンク単位で管理するキャッシュメモリと、前記チャンクの内、前記キャッシュデータを書き込みが可能なチャンクを登録するフリーチャンクリストと、前記キャッシュメモリへの書き込み要求に対して、前記フリーチャンクリストに登録されているチャンクにデータを書き込むデータを転送し、当該転送が完了後、当該データを転送されたチャンクを前記フリーチャンクリストの登録から外すデータ書き込み部と、を備えることを特徴とする。 A cache memory system according to the present invention is a cache memory system that caches data stored in a storage device between a computer that performs data processing and a storage device that stores data, and a cache memory that manages cache data in units of chunks; Among the chunks, a free chunk list for registering a chunk to which the cache data can be written, and data for writing data to the chunk registered in the free chunk list are transferred in response to a write request to the cache memory. And a data writing unit that removes the chunk to which the data has been transferred from the registration of the free chunk list after the transfer is completed.
本発明の第2のキャッシュメモリシステムは、データ処理を行うコンピュータとデータを保存するストレージ装置間で当該ストレージ装置に記憶されるデータをキャッシュするキャッシュメモリシステムにおいて、キャッシュデータをチャンク単位で管理するキャッシュメモリと、各前記チャンクそれぞれに対応し、当該対応するチャンク内の有効なデータの大きさを示す情報をそれぞれ記憶する複数のチャンクヘッダと、を備えることを特徴とする。 A second cache memory system of the present invention is a cache memory system that caches data stored in a storage device between a computer that performs data processing and a storage device that stores the data, and a cache that manages cache data in units of chunks. The apparatus includes a memory and a plurality of chunk headers corresponding to each of the chunks and storing information indicating the size of valid data in the corresponding chunk.
本発明の第3のキャッシュメモリシステムは、データ処理を行うコンピュータとデータを保存するストレージ装置間で当該ストレージ装置に記憶されるデータをキャッシュするキャッシュメモリシステムにおいて、キャッシュデータをチャンク単位で管理するキャッシュメモリと、特定のアルゴリズムに従ってパージする前記チャンクを登録するキャッシュパージキューと、前記キャッシュパージキューの特定範囲より早く前記パージの対象となっている前記チャンクは前記特定のアルゴリズムの順番で登録され、続いて前記特定範囲内の前記チャンクが前記ストレージ装置への書き込みが早くなる順番で登録されるキャッシュフラッシュキューと、前記キャッシュフラッシュキューに登録されている順番で前記チャンク内のデータを前記ストレージ装置にフラッシュするフラッシュ制御部と、を備えることを特徴とする。 A third cache memory system of the present invention is a cache memory system that caches data stored in a storage device between a computer that performs data processing and a storage device that stores the data, and a cache that manages cache data in units of chunks. A memory, a cache purge queue for registering the chunk to be purged according to a specific algorithm, and the chunk to be purged earlier than a specific range of the cache purge queue are registered in the order of the specific algorithm, and then The cache flush queue in which the chunks in the specific range are registered in the order in which writing to the storage device is earlier, and the data in the chunks in the order registered in the cache flush queue A flash controller to flush the storage device, characterized in that it comprises a.
又本発明は、キャッシュメモリの制御方法もその範囲に含む。 The present invention also includes a cache memory control method within its scope.
本実施形態のキャッシュメモリシステムによれば、データ保全性とキャッシュヒット率、及びフラッシュ効率を向上させることが出来る。 According to the cache memory system of this embodiment, data integrity, cache hit rate, and flash efficiency can be improved.
以下に図面を参照しながら本発明の一実施形態について説明する。
図1は、本実施形態のキャッシュメモリシステムが前提となるコンピュータシステムを示す図である。
An embodiment of the present invention will be described below with reference to the drawings.
FIG. 1 is a diagram showing a computer system on which the cache memory system of the present embodiment is a prerequisite.
図1に示すように本実施形態のコンピュータシステム1は、アプリケーションプログラムが稼働している1乃至複数のコンピュータ10−1〜10−mと1乃至複数のストレージ装置30−1〜30−nの間にキャッシュメモリシステム20を設ける構成となっている。そしてキャッシュメモリシステム20は、コンピュータ10−1〜10−mがストレージ装置30−1〜30−nにアクセスする際にキャッシュメモリとして働く。 As shown in FIG. 1, the computer system 1 according to the present embodiment is configured between one or more computers 10-1 to 10-m on which an application program is running and one to a plurality of storage apparatuses 30-1 to 30-n. The cache memory system 20 is provided in the configuration. The cache memory system 20 functions as a cache memory when the computers 10-1 to 10-m access the storage devices 30-1 to 30-n.
なおストレージ装置30−1〜30−nはそれぞれ、RAID構成のものを使用しても良い。
キャッシュメモリシステム20は、制御CPU21、SCSIインタフェース22、I/O制御部23、SCSIインタフェース24、I/O制御部25、キャッシュメモリ26、及びメモリ制御部27を有する。
The storage apparatuses 30-1 to 30-n may each have a RAID configuration.
The cache memory system 20 includes a control CPU 21, a SCSI interface 22, an I / O control unit 23, a SCSI interface 24, an I / O control unit 25, a cache memory 26, and a memory control unit 27.
制御CPU21は、キャッシュメモリシステム20全体を制御する制御ユニットである。SCSIインタフェース22は、ホストサーバ10−1〜10−mとの接続を行うインタフェースである。I/O制御部23は、SCSIインタフェース122によるホストサーバ10−1〜10−mとの接続を制御する制御ユニットである。SCSIインタフェース24は、ストレージ装置30−1〜30−nとの接続を行うインタフェースである。I/O制御部25は、SCSIインタフェース24によるストレージ装置30−1〜30−nとの接続を制御する制御ユニットである。キャッシュメモリ26は、ストレージ装置30−1〜30−nに対するキャッシュデータを記憶保持するメモリである。メモリ制御部27は、キャッシュメモリ26へのアクセスを制御する制御ユニットである。 The control CPU 21 is a control unit that controls the entire cache memory system 20. The SCSI interface 22 is an interface for connecting to the host servers 10-1 to 10-m. The I / O control unit 23 is a control unit that controls connection with the host servers 10-1 to 10-m via the SCSI interface 122. The SCSI interface 24 is an interface for connecting to the storage apparatuses 30-1 to 30-n. The I / O control unit 25 is a control unit that controls connection with the storage apparatuses 30-1 to 30-n via the SCSI interface 24. The cache memory 26 is a memory that stores and holds cache data for the storage devices 30-1 to 30-n. The memory control unit 27 is a control unit that controls access to the cache memory 26.
本実施形態のキャッシュメモリシステム20によるキャッシュメモリの制御は、制御CPU21が、自己のメモリに記憶されたプログラムを実行することによって実現する。
なおキャッシュメモリシステム20の構成は、図1に示したような制御CPU21がプログラムを実行するプログラム実行型の構成ではなく、専用のハードウエアをロジックで組んだ構成としても良い。
Control of the cache memory by the cache memory system 20 of the present embodiment is realized by the control CPU 21 executing a program stored in its own memory.
The configuration of the cache memory system 20 is not a program execution type configuration in which the control CPU 21 executes a program as shown in FIG.
次に本実施形態のコンピュータシステム1におけるコンピュータ10が、ストレージ装置30からデータを読み出す際のデータの流れを図2に示す。
本実施形態のコンピュータシステム1では、コンピュータ10がストレージ装置30に対してデータの読出しを要求すると、そのデータがキャッシュメモリシステム20に格納されていない場合、要求されたデータはフロー31に示すように一旦キャッシュメモリシステム20のキャッシュメモリ26に格納され、次にフロー32に示すようにキャッシュメモリシステム20からコンピュータ10にデータが渡される。またコンピュータ10が要求したデータが既にキャッシュメモリシステム20に格納されていれば、フロー32のように、データをキャッシュメモリシステム20から読み出す。
Next, FIG. 2 shows a data flow when the computer 10 in the computer system 1 of the present embodiment reads data from the storage device 30.
In the computer system 1 of this embodiment, when the computer 10 requests the storage device 30 to read data, if the data is not stored in the cache memory system 20, the requested data is as shown in a flow 31. The data is once stored in the cache memory 26 of the cache memory system 20, and then data is transferred from the cache memory system 20 to the computer 10 as shown in a flow 32. If the data requested by the computer 10 is already stored in the cache memory system 20, the data is read from the cache memory system 20 as in flow 32.
なおキャッシュメモリシステム20格納されていない場合の本実施形態のコンピュータシステム1におけるストレージ装置30からの読出し時のデータの流れは、このようなものには限定されるものではなく、コンピュータ10がストレージ装置30からデータの読出しを行うと、そのデータはフロー31に示すようにキャッシュメモリシステム20に格納されると同時に、フロー33に示すようにストレージ装置30から直接コンピュータ10にデータが渡される構成としても良い。 Note that the flow of data at the time of reading from the storage device 30 in the computer system 1 of the present embodiment when the cache memory system 20 is not stored is not limited to this, and the computer 10 is not limited to the storage device. When data is read from 30, the data is stored in the cache memory system 20 as shown in the flow 31, and at the same time, the data is directly passed from the storage device 30 to the computer 10 as shown in the flow 33. good.
次に本実施形態のコンピュータシステム1におけるコンピュータ10がストレージ装置30にデータの書き込む際のデータの流れについて図3を用いて説明する。
図3に示すように、コンピュータ2は、アプリケーションプログラム実行中は、ストレージ装置30に対してランダムに書き込みを行う。このときのデータは、一度キャッシュメモリシステム20に格納(ムーブイン)され、後述する手順によるソートが行われた後、ストレージ装置30に格納(フラッシュ)される。
Next, a data flow when the computer 10 in the computer system 1 of the present embodiment writes data to the storage apparatus 30 will be described with reference to FIG.
As shown in FIG. 3, the computer 2 randomly writes to the storage device 30 during execution of the application program. The data at this time is once stored (move-in) in the cache memory system 20, sorted by a procedure described later, and then stored (flashed) in the storage device 30.
したがって、コンピュータ10が最近書き込んだデータは全てキャッシュメモリシステム20内に存在するので、そのデータをコンピュータ10が読み出すときは、キャッシュメモリシステム20上のデータを高速に読み出すことが可能となる。 Therefore, since all the data recently written by the computer 10 exists in the cache memory system 20, when the computer 10 reads the data, the data on the cache memory system 20 can be read at high speed.
次に本実施形態のキャッシュメモリシステム20に対するデータの書き込みについて説明する。
キャッシュメモリシステム20に対するデータの書き込みは、コンピュータ10がストレージ装置30からキャッシュメモリシステム20内に無いデータを読み出そうとしたとき、及びコンピュータ10がストレージ装置30に対してデータを書き込んだときに行われる。
Next, data writing to the cache memory system 20 of this embodiment will be described.
Data is written to the cache memory system 20 when the computer 10 tries to read data that is not in the cache memory system 20 from the storage device 30 and when the computer 10 writes data to the storage device 30. Is called.
このキャッシュメモリシステム20に対するデータの書き込み時には、パリティエラーや転送エラー等の理由で、データ転送が失敗して、ジャンクデータが発生してしまうことがある。 When data is written to the cache memory system 20, data transfer may fail and junk data may be generated due to a parity error or transfer error.
それに対処するため、本実施形態のキャッシュメモリシステム20では、キャッシュメモリシステム20内のキャッシュメモリ126上の未使用で書き込みが可能なチャンクを管理するフリーチャンクリストを備える。 In order to cope with this, the cache memory system 20 of the present embodiment includes a free chunk list that manages unused and writable chunks on the cache memory 126 in the cache memory system 20.
図4はフリーチャンクリストによる未使用のチャンクの管理を示す図である。
本実施形態のキャッシュメモリシステム20では、キャッシュメモリ26上の領域はチャンク単位で管理されるが、そのうちの現在未使用なチャンクをフリーチャンクリスト40によって管理する。
FIG. 4 is a diagram showing management of unused chunks by the free chunk list.
In the cache memory system 20 of the present embodiment, the area on the cache memory 26 is managed in units of chunks, and currently unused chunks are managed by the free chunk list 40.
コンピュータ10から、書き込みコマンドやキャッシュメモリ126上に無いデータの読出しコマンドを受け取ると、キャッシュメモリシステム20は、フリーチャンクリスト40にあるチャンクから現在未使用なチャンクの位置情報を得る((1)ゲットフリーチャンク)。そして次に(1)で得た位置のチャンクにコンピュータ10から若しくはストレージ装置30からのデータをDMA転送する((2)DMA)。このデータ転送が成功した後、このチャンクとキャッシュ上の該当する(同一LBAアドレスのデータ)チャンクとを入れ替える((3)すり替え)。(3)で空きとなったチャンクをフリーチャンクリストへ戻す((4)プットフリーチャンク)。なお(3)で該当するLBAアドレスのチャンクが無いときはLRUオーダーに基づいて最も古いデータのチャンクと入れ替える。 When a write command or a read command for data not on the cache memory 126 is received from the computer 10, the cache memory system 20 obtains the position information of the currently unused chunk from the chunks in the free chunk list 40 ((1) get). Free chunk). Then, the data from the computer 10 or the storage device 30 is DMA-transferred to the chunk at the position obtained in (1) ((2) DMA). After this data transfer is successful, this chunk and the corresponding chunk (data with the same LBA address) on the cache are replaced ((3) replacement). Return the chunk that became empty in (3) to the free chunk list ((4) put free chunk). When there is no corresponding LBA address chunk in (3), the oldest data chunk is replaced based on the LRU order.
本実施形態では、空きのチャンクへデータ転送を行った後に、そのチャンクとキャッシュ内で有効となっているチャンクを入れ換えることにより、ジャンクデータの発生を防ぐ。 In the present embodiment, after data is transferred to an empty chunk, the occurrence of junk data is prevented by exchanging the chunk and a chunk that is valid in the cache.
図5は、フリーチャンクリスト40の構成を示す図である。
図5において、フリーチャンクリスト40は、ポインター情報42及びチャンクヘッダ42−1〜42−oからなる。
FIG. 5 is a diagram showing the configuration of the free chunk list 40.
In FIG. 5, the free chunk list 40 includes pointer information 42 and chunk headers 42-1 to 42-o.
ポインター情報41は、リスト構造を持つチャンクヘッダ42の先頭(ヘッド)と最後(テイル)を示すポインター情報である。フリーチャンクリスト40がこのポインター情報を持つことにより、フリーチャンクリスト40へのポストやフリーチャンクリストからのチャンクヘッダの引き出しを高速に行うことができる。チャンクヘッダ42−1〜42−oは、キャッシュメモリ26上の現在未使用のチャンクについて情報を持つリスト構造を持つデータである。このチャンクヘッダ42は、キャッシュメモリ26上の現在未使用のチャンク43へのポインター情報をチャンク情報として記憶している。又チャンクヘッダ42−1〜42−oはリスト後続を持つので、新規のチャンクヘッダ43を加えたり、使用中となったチャンク43のチャンクヘッダ42の削除を高速に行うことが出来る。 The pointer information 41 is pointer information indicating the beginning (head) and the end (tail) of the chunk header 42 having a list structure. Since the free chunk list 40 has this pointer information, posting to the free chunk list 40 and extraction of a chunk header from the free chunk list can be performed at high speed. The chunk headers 42-1 to 42-o are data having a list structure having information on currently unused chunks on the cache memory 26. The chunk header 42 stores pointer information to the currently unused chunk 43 on the cache memory 26 as chunk information. Also, since the chunk headers 42-1 to 42-o have a list following, it is possible to add a new chunk header 43 or to delete the chunk header 42 of the chunk 43 that is in use at high speed.
図6は、キャッシュメモリ26上のチャンク43の管理の仕方を示す図である。
各キャッシュメモリ26上のチャンク43内のデータが有効なデータかどうかは、チャンクヘッダ42によって管理する。チャンクヘッダ42がフリーチャンクリスト40に登録されていれば、対応するチャンク43は無効なデータを保持していることを意味し、チャンクヘッダ42がキャッシュリスト44に登録されていれば、対応するチャンクは有効なデータを保持していることを意味する。
FIG. 6 is a diagram showing how to manage the chunk 43 on the cache memory 26.
Whether the data in the chunk 43 on each cache memory 26 is valid data is managed by the chunk header 42. If the chunk header 42 is registered in the free chunk list 40, it means that the corresponding chunk 43 holds invalid data. If the chunk header 42 is registered in the cache list 44, the corresponding chunk 43 Means holding valid data.
キャッシュメモリ26にデータを書き込む際は、まずフリーチャンクリスト40の先頭からチャンクヘッダ42を取り出し(ゲットフリーチャンク(図8のS2))、このチャンクヘッダ42のチャンク情報からキャッシュメモリ26内の空きのチャンク43の位置を認識し、そのチャンク43に書き込むデータをDMA転送する(DMA転送(図8のS3))。そしてフリーチャンクリスト40から取り出したチャンクヘッド42をキャッシュリスト44に送る(プットキャッシュチャンク(図8のS4))。このチャンクヘッダ42と同一のLBAアドレスのチャンクがあればそのチャンクと置き換えて、無ければそのままキャッシュリスト44に登録する(チャンク入れ替え(図8のS5))。そしてキャッシュリスト44で置き換えられたチャンクヘッド42は、フリーチャンクリスト40に登録される(プットフリーチャンク(図8のS6))。 When writing data to the cache memory 26, first, the chunk header 42 is extracted from the head of the free chunk list 40 (get free chunk (S2 in FIG. 8)), and the free space in the cache memory 26 is determined from the chunk information of the chunk header 42. The position of the chunk 43 is recognized, and the data to be written in the chunk 43 is DMA-transferred (DMA transfer (S3 in FIG. 8)). Then, the chunk head 42 extracted from the free chunk list 40 is sent to the cache list 44 (put cache chunk (S4 in FIG. 8)). If there is a chunk with the same LBA address as the chunk header 42, it is replaced with that chunk, and if not, it is registered in the cache list 44 as it is (chunk replacement (S5 in FIG. 8)). Then, the chunk head 42 replaced with the cache list 44 is registered in the free chunk list 40 (put free chunk (S6 in FIG. 8)).
図6に示すように、各チャンク43内のデータがキャッシュデータとして有効なのかフリーリストのチャンクデータなのかは、そのチャンク43に対応するチャンクヘッダ42がフリーチャンクリスト40に登録されているのかキャッシュリスト44に登録されているのかによって判断することが出来る。よってキャッシュメモリ26上の各チャンク43はデータを保持しているチャンク43と空きチャンク43を混在させたまま管理することが出来る。 As shown in FIG. 6, whether the data in each chunk 43 is valid as cache data or is free list chunk data, whether the chunk header 42 corresponding to the chunk 43 is registered in the free chunk list 40 or not. It can be determined depending on whether it is registered in the list 44. Therefore, each chunk 43 on the cache memory 26 can be managed while the chunk 43 holding data and the empty chunk 43 are mixed.
なおこのフリーチャンクリスト40及びキャッシュリスト44は、制御CPU21内の不図示のメモリ内に構築しても、あるいはキャッシュメモリ26上に構築しても良い。
次にキャッシュメモリ26へのデータの書き込みに失敗した場合について説明する。
The free chunk list 40 and the cache list 44 may be built in a memory (not shown) in the control CPU 21 or may be built on the cache memory 26.
Next, a case where data writing to the cache memory 26 has failed will be described.
図7は、キャッシュメモリ26へのデータの書き込みに失敗した場合のキャッシュメモリシステム20の動作例を示す図である。
キャッシュメモリ26にデータを書き込む際は、フリーチャンクリスト40の先頭から書き込み可能なチャンク43のチャンクヘッダ42を取り出して(ゲットフリーチャンク(図6のS2))、このチャンクヘッダ42のチャンク情報からキャッシュメモリ26内の空きのチャンク43の位置を認識し、そのチャンク43に書き込むデータをDMA転送する(DMA転送(図6のS3))。このDMA転送を失敗して、チャンク43に不正な書き込まれた場合は、書き込みコマンドを失敗とたことを、書き込みデータをキャッシュメモリシステム20に送ってきたホストサーバ10若しくはストレージ装置30に書き込みが失敗したことを通知する。そして書き込みが失敗したチャンク43のチャンクヘッダ42をフリーチャンクリスト40に再登録する。失敗を通知されたホストサーバ10若しくはストレージ30はデータを再転送して、キャッシュメモリ26への書き込みを成功させる。
FIG. 7 is a diagram illustrating an operation example of the cache memory system 20 when data writing to the cache memory 26 fails.
When data is written to the cache memory 26, the chunk header 42 of the writable chunk 43 is extracted from the top of the free chunk list 40 (get free chunk (S2 in FIG. 6)), and the cache information is cached from the chunk information of the chunk header 42. The position of an empty chunk 43 in the memory 26 is recognized, and the data to be written in the chunk 43 is DMA-transferred (DMA transfer (S3 in FIG. 6)). If this DMA transfer fails and the chunk 43 is illegally written, the write command has failed, and the write to the host server 10 or storage device 30 that sent the write data to the cache memory system 20 has failed. Notify you. Then, the chunk header 42 of the chunk 43 that has failed to be written is re-registered in the free chunk list 40. The host server 10 or the storage 30 notified of the failure retransfers the data and succeeds in writing to the cache memory 26.
これにより、キャッシュメモリ26への書き込みに失敗してジャンクデータが生じても、そのジャンクデータが書き込まれたチャンク43は、空きチャンクとしてフリーチャンクリスト40に登録される。したがってキャッシュメモリ26上にジャンクデータが有効なデータとして残ってしまうことはない。 Thereby, even if writing to the cache memory 26 fails and junk data is generated, the chunk 43 in which the junk data is written is registered in the free chunk list 40 as an empty chunk. Therefore, junk data does not remain as valid data on the cache memory 26.
図8は、本実施形態のキャッシュメモリシステム20のキャッシュメモリ26にデータを書き込む際の動作を示すフローチャートである。なお同図の処理は、制御CPU21が制御CPU21内の不図示のメモリ上のプログラムを実行することによって実現する。 FIG. 8 is a flowchart showing an operation when data is written to the cache memory 26 of the cache memory system 20 of the present embodiment. The processing shown in FIG. 7 is realized by the control CPU 21 executing a program on a memory (not shown) in the control CPU 21.
キャッシュメモリシステム20は、コマンド受信待ち状態から、ストレージ装置30へのアクセスコマンドを受信すると、そのコマンドがキャッシュメモリ26に書き込みを行うものかどうかを判断する。コンピュータ10からのコマンドが、ストレージ装置30への書き込みコマンド、若しくはキャッシュメモリ上26に無いデータの読出しコマンドであったなら、制御CPU21は、受信コマンドをキャッシュメモリ26への書き込みコマンドと判定する(ステップS1)。そして制御CPU21は、ステップS2として、フリーチャンクリスト40の先頭から書き込み可能なチャンクヘッダ42を取得する。次に制御CPU21は、ステップS3としてステップS2で取得したチャンクヘッダ42のチャンク情報からキャッシュメモリ26内の対応するチャンク43へ受信データを転送する。 When the cache memory system 20 receives an access command to the storage apparatus 30 from the command reception waiting state, the cache memory system 20 determines whether or not the command writes to the cache memory 26. If the command from the computer 10 is a write command to the storage device 30 or a data read command not in the cache memory 26, the control CPU 21 determines that the received command is a write command to the cache memory 26 (step). S1). Then, the control CPU 21 acquires a writable chunk header 42 from the top of the free chunk list 40 as step S2. Next, the control CPU 21 transfers the received data from the chunk information of the chunk header 42 acquired in step S2 to the corresponding chunk 43 in the cache memory 26 as step S3.
そしてこのステップS3のデータ転送に失敗したならば(ステップS3、失敗)、制御CPU21はステップS7として、ステップS2で取得したチャンクヘッダ42をフリーチャンクリスト40に再登録する。 If the data transfer in step S3 fails (step S3, failure), the control CPU 21 re-registers the chunk header 42 acquired in step S2 in the free chunk list 40 as step S7.
またステップS3において、チャンク43へのデータ転送に成功したならば(ステップS3、成功)、ステップS4として、制御CPU21はステップS2で取得したチャンクヘッダ42をキャッシュリスト44へ移動する。そして制御CPU21は、ステップS5としてこのチャンク43と同じLBAアドレスのチャンク43に対応するチャンクヘッダ42がキャッシュリスト44に登録されているかどうかを探す。そして登録されていれば、制御CPU21は、ステップS5としてそのチャンクヘッダ42とステップS4で移動させた新しいチャンクヘッダとを入れ替える。また登録されていなければステップS4で移動させた新しいチャンクヘッダをそのままキャッシュリスト44に登録する。 If the data transfer to the chunk 43 succeeds in step S3 (step S3, success), the control CPU 21 moves the chunk header 42 acquired in step S2 to the cache list 44 as step S4. In step S5, the control CPU 21 searches whether the chunk header 42 corresponding to the chunk 43 having the same LBA address as that of the chunk 43 is registered in the cache list 44. If registered, the control CPU 21 replaces the chunk header 42 with the new chunk header moved in step S4 as step S5. If not registered, the new chunk header moved in step S4 is registered in the cache list 44 as it is.
そしてステップS6として、制御CPU21は、ステップS5で入れ替えた古いチャンクヘッダ42をフリーチャンクリスト40に登録後、コマンド受信待ち状態に戻す。
このように、本実施形態のキャッシュメモリシステム20では、キャッシュメモリ26上の有効なチャンク26へ直接データ転送することを回避する。そしてフリーチャンクリスト40から取得したチャンクヘッダ42に対応する空きチャンク42へデータ転送を行い、転送に成功した場合のみ、チャンクヘッダ42をキャッシュリス44とへ移動して有効なデータと、データ転送に失敗した場合はチャンクヘッダ42をフリーチャンクリスト40へ戻します。この管理の仕方により、データ転送が失敗した場合でも、該当するキャッシュ上のチャンク42に存在する元のデータを破壊することを防ぐことが出来る。
In step S6, the control CPU 21 registers the old chunk header 42 replaced in step S5 in the free chunk list 40, and then returns to the command reception waiting state.
Thus, in the cache memory system 20 of this embodiment, direct data transfer to the valid chunks 26 on the cache memory 26 is avoided. Then, data transfer is performed to the empty chunk 42 corresponding to the chunk header 42 acquired from the free chunk list 40, and only when the transfer is successful, the chunk header 42 is moved to the cache list 44 for valid data and data transfer. If it fails, the chunk header 42 is returned to the free chunk list 40. By this management method, even when data transfer fails, it is possible to prevent the original data existing in the chunk 42 on the corresponding cache from being destroyed.
次に、本実施形態のキャッシュメモリシステム20によるアドレス境界の問題に対する対処について説明する。
まず従来行われているハッシュテーブルによる検索管理について説明する。
Next, how to deal with the address boundary problem by the cache memory system 20 of this embodiment will be described.
First, search management using a hash table that is conventionally performed will be described.
図9は一般的な4way連想方式によるキャッシュ検索方法を示す図である。
図9の例では、4wayなのでハッシュテーブル51を4個、チャンクサイズを16KB(32ブロック分、1ブロックは512(B)バイト)、最大LBAアドレスを65,536(2の16乗、16(b)ビット)、各ハッシュテーブルで64個のチャンクを管理とした場合の例を示している。この場合、全チャンク数は64×4=256、また各チャンクは16Kバイトなので、16KB×256=4MBのキャッシュシステムとなっている。
FIG. 9 is a diagram showing a cache search method based on a general 4-way associative method.
In the example of FIG. 9, since 4 ways, the hash table 51 is 4 pieces, the chunk size is 16 KB (32 blocks, 1 block is 512 (B) bytes), the maximum LBA address is 65,536 (2 to the 16th power, 16 (b ) Bit), an example in which 64 chunks are managed in each hash table. In this case, since the total number of chunks is 64 × 4 = 256 and each chunk is 16K bytes, the cache system is 16KB × 256 = 4MB.
LBAアドレス54の内、ビット0からビット4はチャンクサイズ(16KB)分のため、参照する必要は無い。LBAアドレス54のビット5からビット9の64個分は、チャンク番号に対応させる。LBAアドレス54のビット10からビット11は、ハッシュテーブルID(0〜3)を対応させる。LBAアドレス54のビット12からビット15は、ハッシュテーブル内にLBAアドレスタグ52として格納する。 Of the LBA address 54, bit 0 to bit 4 are equivalent to the chunk size (16 KB) and need not be referred to. 64 bits 5 to 9 of the LBA address 54 correspond to the chunk number. Bits 10 to 11 of the LBA address 54 correspond to hash table IDs (0 to 3). Bits 12 to 15 of the LBA address 54 are stored as the LBA address tag 52 in the hash table.
このような構成において、ホストサーバから参照されたLBAアドレスのビット5からビット9を使って各ハッシュテーブル51参照して、該当するキャッシュデータ候補のLBAアドレスビットを読み出す。そしてこのLBAアドレスビットと要求されたLBAアドレスを比較し、一致していれば、キャッシュヒットと認識する。そしてキャッシュヒットした場合は、セグメントIDとハッシュテーブルIDから該当するキャッシュデータを識別することができる。 In such a configuration, the LBA address bits of the corresponding cache data candidate are read by referring to each hash table 51 using bits 5 to 9 of the LBA address referenced from the host server. Then, this LBA address bit is compared with the requested LBA address, and if they match, it is recognized as a cache hit. When a cache hit occurs, the corresponding cache data can be identified from the segment ID and the hash table ID.
この図9に示したような構成のハッシュテーブルを持ち、このハッシュテーブルを参照することにより、容易にキャッシュ検索を実現できる。
このようなハッシュテーブル参照方式はキャッシュメモリの容量が非常に小さい場合は有効である。しかしキャッシュメモリのサイズが非常に大きい場合は、チャンクの数が大きくなるため、テーブルサイズが非常に大きくなってしまう。そのため、ハッシュテーブル上の該当するチャンク情報を検索する時間が大きくなってしまう。
A cache search can be easily realized by having a hash table configured as shown in FIG. 9 and referring to this hash table.
Such a hash table reference method is effective when the capacity of the cache memory is very small. However, if the size of the cache memory is very large, the number of chunks becomes large, and the table size becomes very large. This increases the time for searching for the corresponding chunk information on the hash table.
本実施形態のキャッシュメモリシステム20は、大容量キャッシュメモリ26を搭載することを前提としているので、ハッシュテーブル方式を採用するのは効率的ではない。
そこで本実施形態のキャッシュメモリシステム20では、B+木検索等のツリー検索を応用する。
Since the cache memory system 20 of the present embodiment is premised on the installation of the large-capacity cache memory 26, it is not efficient to adopt the hash table method.
Therefore, in the cache memory system 20 of the present embodiment, tree search such as B + tree search is applied.
図10は、本実施形態のキャッシュメモリシステム20で用いられるキャッシュリスト44の構成例を示す図である。
本実施形態のキャッシュリスト44は、図10に示すようにB+木構造を持つ。このB+構造のキャッシュリスト44を参照することによって、アクセス要求されたデータがキャッシュメモリ26上に存在するか否か(キャッシュヒットまたはキャッシュミス)を判定する。
FIG. 10 is a diagram showing a configuration example of the cache list 44 used in the cache memory system 20 of the present embodiment.
The cache list 44 of this embodiment has a B + tree structure as shown in FIG. By referring to this B + structure cache list 44, it is determined whether or not the access requested data exists in the cache memory 26 (cache hit or cache miss).
図10のキャッシュリスト44には、B+木の末端レコードにチャンクヘッダ(CH)42を設ける。
そして各チャンクヘッダ42には、チャンク情報として次のフリーチャンクのアドレス(NEXT_CHUNK)、スタートアドレス(START_LBA)、有効データ長(N_LBA)、及びデータアドレス(DATA_ADDRESS)が記録されている。
In the cache list 44 of FIG. 10, a chunk header (CH) 42 is provided at the end record of the B + tree.
In each chunk header 42, the next free chunk address (NEXT_CHUNK), start address (START_LBA), effective data length (N_LBA), and data address (DATA_ADDRESS) are recorded as chunk information.
これらのチャンク情報の内、次のフリーチャンクのアドレス(NEXT_CHUNK)は、キャッシュリスト44内のチャンクヘッダ42どうしがリスト構造を持つためのポインターで、図6を用いて説明したキャッシュリスト44内でのチャンクヘッダ42の入れ替えに用いる。またスタートアドレス(START_LBA)は、そのチャンクヘッダ42に対応するチャンク43内のデータ(チャンクデータ)のストレージ装置30でのアドレス(LBAアドレス)を示す。有効データ長(N_LBA)は、対応するチャンク43内のデータのうち有効なデータは先頭から何ブロックかを示す情報である。データアドレス(DATA_ADDRESS)は、そのチャンクヘッド42に対応するチャンク43のキャッシュメモリ26上のアドレス情報である。 Among these pieces of chunk information, the address of the next free chunk (NEXT_CHUNK) is a pointer for the chunk headers 42 in the cache list 44 to have a list structure, and in the cache list 44 described with reference to FIG. Used to replace the chunk header 42. The start address (START_LBA) indicates an address (LBA address) in the storage device 30 of data (chunk data) in the chunk 43 corresponding to the chunk header 42. The effective data length (N_LBA) is information indicating how many blocks are valid data from the top of the data in the corresponding chunk 43. The data address (DATA_ADDRESS) is address information on the cache memory 26 of the chunk 43 corresponding to the chunk head 42.
図11は、図10のような構成のキャッシュリスト44を用いた場合のキャッシュメモリ26へのデータの書き込みを説明する図である。
図11は、コンピュータ10が任意のアドレスへの任意のサイズの書き込みコマンドを受信した場合の例として、コンピュータ10からアドレス128への書き込みサイズ40ブロック(1ブロックは512バイト)のライトコマンドを発行した場合を例として示している。
FIG. 11 is a diagram for explaining the writing of data to the cache memory 26 when the cache list 44 configured as shown in FIG. 10 is used.
In FIG. 11, as an example of the case where the computer 10 receives a write command of an arbitrary size to an arbitrary address, a write command of write size 40 blocks (one block is 512 bytes) to the address 128 is issued from the computer 10 The case is shown as an example.
このときキャッシュメモリシステム20では、チャンク43の大きさを8KB(16ブロック分、1ブロックは512B)とすると、B+木構造のキャッシュリスト44には3つの3つのチャンクヘッダ42が登録され、キャッシュメモリ26上の3つのチャンク43にデータが転送される。 At this time, in the cache memory system 20, if the size of the chunk 43 is 8 KB (16 blocks, one block is 512 B), three three chunk headers 42 are registered in the B + tree structure cache list 44, and the cache memory The data is transferred to the three chunks 43 on H.26.
このとき3つのチャンク43のうちチャンク(1)及び(2)は、データを記憶するのに全ての領域を使用するが、チャンク(3)は8ブロック分しか使用しない。したがってチャンク(1)とチャンク(2)に対応するチャンクヘッダ42内の有効データ長(N_LBA)は16(ブロック)となるが、チャンク(3)の有効データ長(N_LBA)は8(ブロック)となり、チャンク(1)とチャンク(2)は全チャンクデータを使用しているが、チャンク3は有効データ長が全チャンクデータでないことを示す。 At this time, among the three chunks 43, chunks (1) and (2) use all areas to store data, but chunk (3) uses only 8 blocks. Therefore, the effective data length (N_LBA) in the chunk header 42 corresponding to the chunk (1) and the chunk (2) is 16 (block), but the effective data length (N_LBA) of the chunk (3) is 8 (block). Chunk (1) and chunk (2) use all chunk data, but chunk 3 indicates that the effective data length is not all chunk data.
このように、各チャンク43に対応するチャンクヘッダ42にデータ開始アドレス(START_LBA)とチャンクのデータ有効長(N_LBA)を保持することにより、ホストサーバからの任意のアドレスの任意の長さのデータをキャッシュメモリ26上に保持することが可能となる。 In this way, by holding the data start address (START_LBA) and the data valid length (N_LBA) of the chunk in the chunk header 42 corresponding to each chunk 43, data of an arbitrary length at an arbitrary address from the host server can be obtained. It can be held on the cache memory 26.
また上述した例の場合、チャンク(3)のデータのみは全データが有効とは成らないが、従来の方式は書き込みコマンドのアドレスがチャンク43の境界の先頭にならない限り、無効となってしまうので、それに比べ本方式では最後のチャンクデータが端数の場合のみ無効領域が発生することになります。そのため、従来方式よりキャッシュメモリ26領域の使用効率を向上させることが出来る。 In the case of the above-described example, only the data of chunk (3) is not valid, but the conventional method is invalid unless the address of the write command is at the head of the chunk 43 boundary. In contrast, in this method, an invalid area is generated only when the last chunk data is a fraction. Therefore, the usage efficiency of the cache memory 26 area can be improved compared to the conventional method.
次に本実施形態のキャッシュメモリシステム20における、キャッシュメモリ26上のデータをストレージ装置30にフラッシュバックする際の処理について説明する。
キャッシュメモリ26上のデータの内。コンピュータ10によって書き換えられたダーティデータを全て選択し、これらをLBAオーダーにソートした後にストレージ装置30にフラッシュバックするのが、ストレージ装置30のシーク時間等から、フラッシュバックの効率を最も良くすることが知られています。
Next, processing when data in the cache memory 26 is flashed back to the storage device 30 in the cache memory system 20 of this embodiment will be described.
Of the data on the cache memory 26. Selecting all the dirty data rewritten by the computer 10 and sorting them in the LBA order and then flashing them back to the storage device 30 can improve the efficiency of flashback from the seek time of the storage device 30 and the like. is known.
しかし、同時にキャッシュメモリ26上の空きチャンクが不足(Cacheフル)している場合、LRUオーダーに従い、パージするチャンク43を緊急にフラッシュする必要が発生する。このとき、パージする予定のチャンク43が既にLBAオーダーでフラッシュ対象のキューに積まれてしまっていると、そのフラッシュが終了するまで受信したライトコマンドの実行を待たせることになる。 However, at the same time, if there are not enough free chunks (Cache full) on the cache memory 26, it is necessary to urgently flush the purged chunks 43 in accordance with the LRU order. At this time, if the chunk 43 to be purged is already loaded in the flush target queue in the LBA order, execution of the received write command is made to wait until the flushing is completed.
したがって、フラッシュが終了するまで、新しいデータをチャンク43にムーブインすることができないため、次のコマンドを実行することができないので、コマンドの潜伏時間が長くなり、処理性能が低下してしまう問題がある。 Therefore, since new data cannot be moved into the chunk 43 until the flushing is completed, the next command cannot be executed, so that there is a problem that the latency time of the command becomes long and the processing performance deteriorates. .
本実施形態のキャッシュメモリシステム20では、この問題に対処するため下限値を設け、フラッシュを行う順番の決め方をこの下限値に基づいて変更する。
図12は、本実施形態のキャッシュメモリシステム20におけるフラッシュの仕方を説明する図である。同図において、(1)〜(10)は、チャンク43内のデータがアクセスされた順番を示しており、網がけのチャンク43はコンピュータ10によってデーが更新された後、まだストレージ装置30にパージされていないダーティデータを含むチャンク43を示している。
In the cache memory system 20 of the present embodiment, a lower limit value is provided to cope with this problem, and the method of determining the order of flushing is changed based on this lower limit value.
FIG. 12 is a diagram for explaining a flushing method in the cache memory system 20 of the present embodiment. In the figure, (1) to (10) indicate the order in which the data in the chunk 43 is accessed, and the netted chunk 43 is still purged to the storage apparatus 30 after the data is updated by the computer 10. A chunk 43 including dirty data that has not been processed is shown.
キャッシュメモリ25からパージされるチャンク43は、そのチャンクヘッド42がキャッシュパージキュー61に登録される。この登録はLRUオーダーの順で行われるので、(1)、(2)、・・・となる。なおキャッシュパージキュー61に登録されたチャンクヘッダ42はリスト構造を取り、次のチャンクヘッダ42へのポインターをNEXT_LRU_CHUNKとして記憶している。 The chunk 43 to be purged from the cache memory 25 has its chunk head 42 registered in the cache purge queue 61. Since this registration is performed in the order of the LRU order, (1), (2),... The chunk header 42 registered in the cache purge queue 61 has a list structure, and a pointer to the next chunk header 42 is stored as NEXT_LRU_CHUNK.
そして本実施形態のキャッシュパージキュー61には下限値Aと上限値Bが設けてある。
一方キャッシュメモリ26からストレージ装置30にフラッシュされるデータを含むチャンク43は、そのチャンクヘッド42がキャッシュフラッシュキュー62に登録される。なおキャッシュフラッシュキュー62に登録されたチャンクヘッダ42もリスト構造を取り、次のチャンクヘッダ42へのポインターをNEXT_FLUSH_CHUNKとして記憶している。
The cache purge queue 61 of this embodiment has a lower limit value A and an upper limit value B.
On the other hand, the chunk head 42 including the data to be flushed from the cache memory 26 to the storage device 30 has its chunk head 42 registered in the cache flush queue 62. Note that the chunk header 42 registered in the cache flush queue 62 also has a list structure, and a pointer to the next chunk header 42 is stored as NEXT_FLUSH_CHUNK.
従来の方式では、キャッシュフラッシュキュー62への登録はLBAオーダー順にソートして行われていたが、本実施形態のキャッシュメモリシステム20では、キャッシュパージキュー61の下限A値より古いダーティデータを含むチャンク43はLBAオーダーにソートせずに、LRU順にキャッシュフラッシュキュー62に積む。そしてキャッシュパージキュー61の下限値Aから上限値Bの範囲にあるダーティデータを含むチャンク43はLBAオーダーにソートしてキャッシュフラッシュキュー62に積む。 In the conventional method, registration in the cache flush queue 62 is performed by sorting in the order of LBA order. However, in the cache memory system 20 of this embodiment, chunks including dirty data older than the lower limit A value of the cache purge queue 61 are included. 43 are not sorted in the LBA order but are loaded in the cache flush queue 62 in the LRU order. Then, the chunks 43 including the dirty data in the range of the lower limit value A to the upper limit value B of the cache purge queue 61 are sorted in the LBA order and loaded on the cache flush queue 62.
これにより、近いうちにパージされると考えられるチャンク43内のデータを優先的にストレージ装置30にフラッシュすることができる。またそれ以外のダーティデータを含むチャンク43はLBAオーダーにソートしてフラッシュすることで、ストレージ装置30のヘッダシーク時間を軽減してフラッシュを効率よく行うことが出来る。 As a result, data in the chunk 43 that is considered to be purged soon can be preferentially flushed to the storage device 30. Further, the chunks 43 including other dirty data are sorted into the LBA order and flushed, thereby reducing the header seek time of the storage apparatus 30 and performing flushing efficiently.
このように本実施形態のキャッシュメモリシステム20によれば、ストレージ装置30へのフラッシュの高効率を維持しながら、キャッシュムーブインをブロックする現象を低減することが出来る。 As described above, according to the cache memory system 20 of the present embodiment, it is possible to reduce the phenomenon of blocking the cache move-in while maintaining the high efficiency of flushing to the storage apparatus 30.
なお各チャンクヘッダ42には、チャンク情報としてこれまで説明したNEXT_FLUSH_CHANK、NEXT_LRU_CHUNK、START_LBA、N_LBA、DATA_ADDRESSの他に、フリーチャンクリスト40のために次のチャンクヘッダのアドレス(NEXT_FREE_CHUNK)を備える。これらの情報を使って、これまで述べてきたフリーチャンクリスト40、キャッシュパージキュー61及びキャッシュフラッシュキュー62を同時に実現する。 Each chunk header 42 includes, as chunk information, the next chunk header address (NEXT_FREE_CHUNK) for the free chunk list 40 in addition to the NEXT_FLUSH_CHANK, NEXT_LRU_CHUNK, START_LBA, N_LBA, and DATA_ADDRESS described above. Using these pieces of information, the free chunk list 40, the cache purge queue 61, and the cache flush queue 62 described so far are realized simultaneously.
図13は、キャッシュメモリ26上のダーティデータをストレージ装置30にフラッシュするときのキャッシュメモリシステム20の動作を示すフローチャートである。同図の処理は、制御CPU21が制御CPU21内のメモリ上のプログラムを実行して実現する。 FIG. 13 is a flowchart showing the operation of the cache memory system 20 when the dirty data on the cache memory 26 is flushed to the storage device 30. The processing in FIG. 5 is realized by the control CPU 21 executing a program on a memory in the control CPU 21.
同図の処理では、LBAオーダーにソートして効率的にフラッシュするためにダーティデータをある程度貯める為、最初にx秒のインターバル時間を設けてある(ステップS11、NO)。 In the process shown in the figure, an interval time of x seconds is first provided in order to store dirty data to some extent for efficient flushing by sorting into LBA orders (step S11, NO).
最初にライトコマンドを受信してからx秒経過すると(ステップS11、YES)、制御CPU21は、まずステップS12として、キャッシュパージキュー61のポインターPを0にリセットする。 When x seconds have elapsed since the first write command was received (step S11, YES), the control CPU 21 first resets the pointer P of the cache purge queue 61 to 0 as step S12.
そしてポインターPが指すキャッシュパージキュー61がダーティデータのチャンク43のチャンクヘッド42のときは(ステップS13、YES)、制御CPU21はステップS14としてキャッシュパージキュー61のポインターPが指すチャンクヘッダ42をキャッシュフラッシュキュー61にポストする。またそしてポインターPが指すキャッシュパージキュー61がダーティデータのチャンク43のチャンクヘッド42でないときは(ステップS13、NO)、制御CPU21はステップS14をスキップする。 When the cache purge queue 61 pointed to by the pointer P is the chunk head 42 of the dirty data chunk 43 (YES in step S13), the control CPU 21 cache flushes the chunk header 42 pointed to by the pointer P of the cache purge queue 61 in step S14. Post to queue 61. If the cache purge queue 61 pointed to by the pointer P is not the chunk head 42 of the dirty data chunk 43 (step S13, NO), the control CPU 21 skips step S14.
次に制御CPU21は、ポインターPを+1インクリメントする(ステップS15)。そその結果ポインターPの値が下限値Aを超えないのならば(ステップS16<NO)、ステップS13に処理を戻して、制御CPU21は、ポインターPが指すキャッシュパージキュー61の次のヘッダを確認する。 Next, the control CPU 21 increments the pointer P by +1 (step S15). As a result, if the value of the pointer P does not exceed the lower limit A (step S16 <NO), the process returns to step S13, and the control CPU 21 confirms the next header of the cache purge queue 61 pointed to by the pointer P. To do.
ステップS16において、ポインターPの値が下限値Aを超えたならば(ステップS16、YES)、制御CPU21は、ステップS17として、キャッシュパージキュー61の下限値Aと上限値Bの間のチャンクヘッダ42をLBAオーダーに並び替え(LABオーダーソート)、その順番でチャンクヘッダ42をキャッシュフラッシュキュー62へポスト後、処理を最初に戻す。 If the value of the pointer P exceeds the lower limit value A in step S16 (step S16, YES), the control CPU 21 determines the chunk header 42 between the lower limit value A and the upper limit value B of the cache purge queue 61 as step S17. Are rearranged into the LBA order (LAB order sort), the chunk header 42 is posted to the cache flush queue 62 in that order, and the process is returned to the beginning.
キャッシュフラッシュキュー62にポストされたチャンクヘッダ42に対応するチャンク43内のデータは、順次ストレージ装置30へフラッシュされる。
このように、本実施形態のキャッシュメモリシステム20によるストレージ装置30へのフラッシュ方法によれば、LRUオーダーを優先するチャンクデータとLBAオーダーで効率的にフラッシュするチャンクデータを調整することが可能となり、チャンクのパージに処理がまたされることが無くなると共にフラッシュの高速化を実現できる。
Data in the chunk 43 corresponding to the chunk header 42 posted to the cache flush queue 62 is sequentially flushed to the storage device 30.
As described above, according to the flush method to the storage apparatus 30 by the cache memory system 20 of the present embodiment, it becomes possible to adjust the chunk data that prioritizes the LRU order and the chunk data that is efficiently flushed by the LBA order. The processing is not repeated for the purge of chunks, and the speed of the flash can be increased.
以上のように本実施形態のキャッシュメモリシステム20によれば、磁気ディスクあるいはSSD(フラッシュメモリディスク)によるストレージ装置30の弱点であるランダムアクセス書き込みに対する低速性を高速化させることができます。 As described above, according to the cache memory system 20 of the present embodiment, it is possible to increase the speed of random access writing, which is a weak point of the storage device 30 using a magnetic disk or SSD (flash memory disk).
またキャッシュヒット率を向上させ、LRU等に従いパージするデータを優先的にフラッシュしつつ、かつランダムアドレス書き込みによるデータをアドレスオーダー順に並び替えてストレージ装置へ効率よくライトバックすることにより、ストレージ装置への書き込みを向上させシステム性能を画期的に向上させることが出来る。 In addition, the cache hit rate is improved, the data to be purged according to LRU is preferentially flushed, and the data by random address writing is rearranged in the order of the address order and efficiently written back to the storage device. Writing can be improved and system performance can be dramatically improved.
更には書き込みデータ用にキャッシュデータを事前にパージする必要がないので、リードデータのキャッシュヒット率を向上させることになり、大容ストレージ装置30をあたかも、DRAMベースの超高速半導体ディスク装置のように振舞うことが可能となる。そのため、コンピュータ10からのあらゆるパターンのデータアクセスを高速に処理することが可能となり、ディスクIOのボトルネックを低減し、ランダムアクセスが頻繁に発生するデータベースアプリケーションのバッチジョブ等、処理時間を大幅に短縮させることが出来る。 Furthermore, since cache data need not be purged in advance for write data, the cache hit rate of read data is improved, and the large capacity storage device 30 is as if it is a DRAM-based ultrahigh-speed semiconductor disk device. It is possible to behave. Therefore, it is possible to process all patterns of data access from the computer 10 at high speed, reduce disk IO bottlenecks, and significantly reduce processing time for batch jobs of database applications that frequently generate random access. It can be made.
10、110 コンピュータ
20、120 キャッシュメモリシステム
21、121 制御CPU
22、24、122、124 SCSIインタフェース
23、25、123、125 I/O制御部
26、126 キャッシュメモリ
27、127 メモリ制御部
30 ストレージ装置
40 フリーチャンクリスト
41 ポインター情報
42 チャンクヘッダ
43 チャンク
44 キャッシュリスト
61 キャッシュパージキュー
62 キャッシュフラッシュキュー
10, 110 Computer 20, 120 Cache memory system 21, 121 Control CPU
22, 24, 122, 124 SCSI interface 23, 25, 123, 125 I / O control unit 26, 126 Cache memory 27, 127 Memory control unit 30 Storage device 40 Free chunk list 41 Pointer information 42 Chunk header 43 Chunk 44 Cache list 61 Cache purge queue 62 Cache flush queue
Claims (9)
キャッシュデータをチャンク単位で管理するキャッシュメモリと、
前記チャンクの内、前記キャッシュデータを書き込みが可能なチャンクを登録するフリーチャンクリストと、
前記キャッシュメモリへの書き込み要求に対して、前記フリーチャンクリストに登録されているチャンクにデータを書き込むデータを転送し、当該転送が完了後、当該データを転送されたチャンクを前記フリーチャンクリストの登録から外すデータ書き込み部と、
を備えることを特徴とするキャッシュメモリシステム。 In a cache memory system that caches data stored in a storage device between a computer that performs data processing and a storage device that stores data,
A cache memory that manages cache data in units of chunks;
Among the chunks, a free chunk list for registering chunks to which the cache data can be written,
In response to a write request to the cache memory, data to be written is transferred to a chunk registered in the free chunk list, and after the transfer is completed, the chunk to which the data is transferred is registered in the free chunk list. A data writing unit to be removed from,
A cache memory system comprising:
キャッシュデータをチャンク単位で管理するキャッシュメモリと、
各前記チャンクそれぞれに対応し、当該対応するチャンク内の有効なデータの大きさを示す情報をそれぞれ記憶する複数のチャンクヘッダと、
を備えることを特徴とするキャッシュメモリシステム。 In a cache memory system that caches data stored in a storage device between a computer that performs data processing and a storage device that stores data,
A cache memory that manages cache data in units of chunks;
A plurality of chunk headers corresponding to each of the chunks, each storing information indicating the size of valid data in the corresponding chunk;
A cache memory system comprising:
キャッシュヒットまたはキャッシュミスの判定を、前記複数のチャンクヘッダに対して木検索アルゴリズムを用いて行う制御部を更に備えることを特徴とする請求項2に記載のキャッシュメモリシステム。 The plurality of chunk headers store information indicating an address of the information in the corresponding chunk on the storage device and information indicating a position of the corresponding chunk in the cache memory, and a B + tree structure Have
The cache memory system according to claim 2, further comprising a control unit that performs a cache hit or cache miss determination on the plurality of chunk headers using a tree search algorithm.
キャッシュデータをチャンク単位で管理するキャッシュメモリと、
特定のアルゴリズムに従ってパージする前記チャンクを登録するキャッシュパージキューと、
前記キャッシュパージキューの特定範囲より早く前記パージの対象となっている前記チャンクは前記特定のアルゴリズムの順番で登録され、続いて前記特定範囲内の前記チャンクが前記ストレージ装置への書き込みが早くなる順番で登録されるキャッシュフラッシュキューと、
前記キャッシュフラッシュキューに登録されている順番で前記チャンク内のデータを前記ストレージ装置にフラッシュするフラッシュ制御部と、
を備えることを特徴とするキャッシュメモリシステム。 In a cache memory system that caches data stored in a storage device between a computer that performs data processing and a storage device that stores data,
A cache memory that manages cache data in units of chunks;
A cache purge queue that registers the chunks to be purged according to a specific algorithm;
The chunks to be purged earlier than the specific range of the cache purge queue are registered in the order of the specific algorithm, and then the order in which the chunks in the specific range are written to the storage device earlier The cache flush queue registered in
A flush controller that flushes the data in the chunk to the storage device in the order registered in the cache flush queue;
A cache memory system comprising:
前記キャッシュメモリ上のキャッシュデータをチャンク単位で管理し、
前記チャンクの内、前記キャッシュデータを書き込みが可能なチャンクをフリーチャンクリストに登録し、
前記キャッシュメモリへの書き込み要求に対して、前記フリーチャンクリストに登録されているチャンクにデータを書き込むデータを転送し、当該転送が完了後、当該データを転送されたチャンクを前記フリーチャンクリストの登録から外す
ことを特徴とするキャッシュメモリの制御方法。 In a cache memory control method for caching data stored in a storage device between a computer that performs data processing and a storage device that stores data,
Managing cache data in the cache memory in units of chunks;
Of the chunks, register a chunk that can write the cache data in a free chunk list,
In response to a write request to the cache memory, the data to be written is transferred to a chunk registered in the free chunk list, and after the transfer is completed, the chunk to which the data is transferred is registered in the free chunk list. A method for controlling a cache memory, characterized in that it is excluded from the above.
前記キャッシュメモリ上のキャッシュデータをチャンク単位で管理し、
各前記チャンクそれぞれに対応するチャンクヘッダに、当該対応するチャンク内の有効なデータの大きさを示す情報をそれぞれ記憶させる
ことを特徴とするキャッシュメモリの制御方法。 In a cache memory control method for caching data stored in a storage device between a computer that performs data processing and a storage device that stores data,
Managing cache data in the cache memory in units of chunks;
A cache memory control method, wherein information indicating the size of valid data in a corresponding chunk is stored in a chunk header corresponding to each chunk.
前記キャッシュメモリ上のキャッシュデータをチャンク単位で管理し、
特定のアルゴリズムに従ってパージする前記チャンクをキャッシュパージキューに登録し、
前記キャッシュパージキューの特定範囲より早く前記パージの対象となっている前記チャンクを前記特定のアルゴリズムの順番でキャッシュフラッシュキューに登録し、
続いて前記特定範囲内の前記チャンクが前記ストレージ装置への書き込みが早くなる順番で前記キャッシュフラッシュキューに登録し、
前記キャッシュフラッシュキューに登録されている順番で前記チャンク内のデータを前記ストレージ装置にフラッシュする、
ことを特徴とするキャッシュメモリの制御方法。 In a cache memory control method for caching data stored in a storage device between a computer that performs data processing and a storage device that stores data,
Managing cache data in the cache memory in units of chunks;
Register the chunk to be purged according to a specific algorithm in the cache purge queue,
Register the chunks to be purged earlier than a specific range of the cache purge queue in the cache flush queue in the order of the specific algorithm,
Subsequently, the chunks within the specific range are registered in the cache flush queue in the order in which writing to the storage device is accelerated,
Flushing the data in the chunk to the storage device in the order registered in the cache flush queue;
A cache memory control method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009000748A JP2010160544A (en) | 2009-01-06 | 2009-01-06 | Cache memory system and method for controlling cache memory |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009000748A JP2010160544A (en) | 2009-01-06 | 2009-01-06 | Cache memory system and method for controlling cache memory |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2010160544A true JP2010160544A (en) | 2010-07-22 |
Family
ID=42577684
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009000748A Pending JP2010160544A (en) | 2009-01-06 | 2009-01-06 | Cache memory system and method for controlling cache memory |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2010160544A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016503209A (en) * | 2012-12-26 | 2016-02-01 | 華為技術有限公司Huawei Technologies Co.,Ltd. | Disk array flash method and disk array flash apparatus |
JP2017010396A (en) * | 2015-06-24 | 2017-01-12 | 富士通株式会社 | Storage device, cache write control method, and cache write control program |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0520192A (en) * | 1991-07-17 | 1993-01-29 | Nec Corp | Cache memory store system |
JPH06266622A (en) * | 1993-03-12 | 1994-09-22 | Fuji Xerox Co Ltd | Cache controller |
JPH09244931A (en) * | 1996-03-06 | 1997-09-19 | Mitsubishi Electric Corp | Real-time file system |
JP2002023966A (en) * | 2000-06-30 | 2002-01-25 | Toshiba Corp | Disk system for making transfer data as redundant data |
JP2002049517A (en) * | 2000-05-25 | 2002-02-15 | Hitachi Ltd | Storage system |
JP2003337727A (en) * | 2002-03-15 | 2003-11-28 | Fujitsu Prime Software Technologies Ltd | Cache control program |
JP2008034085A (en) * | 2006-07-27 | 2008-02-14 | Hitachi Global Storage Technologies Netherlands Bv | Disk drive with non-volatile memory having multiple operating modes |
JP2008269636A (en) * | 2008-06-03 | 2008-11-06 | Hitachi Ltd | Storage subsystem and storage subsystem control method |
WO2008139521A1 (en) * | 2007-04-27 | 2008-11-20 | Fujitsu Limited | Remote file system, terminal device, and server device |
-
2009
- 2009-01-06 JP JP2009000748A patent/JP2010160544A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0520192A (en) * | 1991-07-17 | 1993-01-29 | Nec Corp | Cache memory store system |
JPH06266622A (en) * | 1993-03-12 | 1994-09-22 | Fuji Xerox Co Ltd | Cache controller |
JPH09244931A (en) * | 1996-03-06 | 1997-09-19 | Mitsubishi Electric Corp | Real-time file system |
JP2002049517A (en) * | 2000-05-25 | 2002-02-15 | Hitachi Ltd | Storage system |
JP2002023966A (en) * | 2000-06-30 | 2002-01-25 | Toshiba Corp | Disk system for making transfer data as redundant data |
JP2003337727A (en) * | 2002-03-15 | 2003-11-28 | Fujitsu Prime Software Technologies Ltd | Cache control program |
JP2008034085A (en) * | 2006-07-27 | 2008-02-14 | Hitachi Global Storage Technologies Netherlands Bv | Disk drive with non-volatile memory having multiple operating modes |
WO2008139521A1 (en) * | 2007-04-27 | 2008-11-20 | Fujitsu Limited | Remote file system, terminal device, and server device |
JP2008269636A (en) * | 2008-06-03 | 2008-11-06 | Hitachi Ltd | Storage subsystem and storage subsystem control method |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016503209A (en) * | 2012-12-26 | 2016-02-01 | 華為技術有限公司Huawei Technologies Co.,Ltd. | Disk array flash method and disk array flash apparatus |
US9582433B2 (en) | 2012-12-26 | 2017-02-28 | Huawei Technologies Co., Ltd. | Disk array flushing method and disk array flushing apparatus |
JP2017010396A (en) * | 2015-06-24 | 2017-01-12 | 富士通株式会社 | Storage device, cache write control method, and cache write control program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11579773B2 (en) | Memory system and method of controlling memory system | |
JP7046669B2 (en) | Hardware-based map acceleration with inverse cache table | |
JP3697149B2 (en) | How to manage cache memory | |
US11347428B2 (en) | Solid state tier optimization using a content addressable caching layer | |
TWI233552B (en) | A log-structured write cache for data storage devices and systems | |
Jo et al. | FAB: Flash-aware buffer management policy for portable media players | |
US10402091B1 (en) | Managing data in log-structured storage systems | |
EP2476055B1 (en) | Apparatus, system, and method for caching data on a solid-state storage device | |
US9772948B2 (en) | Determining a criterion for movement of data from a primary cache to a secondary cache | |
US9779027B2 (en) | Apparatus, system and method for managing a level-two cache of a storage appliance | |
JP6870246B2 (en) | Storage device and storage control device | |
US11449430B2 (en) | Key-value store architecture for key-value devices | |
CN105302744A (en) | Invalidation data area for cache | |
JP2012141946A (en) | Semiconductor storage device | |
JP2018520420A (en) | Cache architecture and algorithm for hybrid object storage devices | |
Hoseinzadeh | A survey on tiering and caching in high-performance storage systems | |
CN108228088B (en) | Method and apparatus for managing storage system | |
US9471252B2 (en) | Use of flash cache to improve tiered migration performance | |
JP4189342B2 (en) | Storage apparatus, storage controller, and write-back cache control method | |
JP2010160544A (en) | Cache memory system and method for controlling cache memory | |
TW202409839A (en) | Apparatus and method for accessing data in versions of memory pages | |
KR101153688B1 (en) | Nand flash memory system and method for providing invalidation chance to data pages | |
Nguyen et al. | PB-NVM: A high performance partitioned buffer on NVDIMM | |
US20180307615A1 (en) | Storage control apparatus and storage control method | |
TW202447417A (en) | Device and method for cache configuration based on storage placement |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110801 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120726 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120807 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20121001 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130319 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130513 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20130806 |