JP2019168733A - Information processing system, cache capacity distribution method, storage control apparatus, and method and program thereof - Google Patents

Information processing system, cache capacity distribution method, storage control apparatus, and method and program thereof Download PDF

Info

Publication number
JP2019168733A
JP2019168733A JP2016136338A JP2016136338A JP2019168733A JP 2019168733 A JP2019168733 A JP 2019168733A JP 2016136338 A JP2016136338 A JP 2016136338A JP 2016136338 A JP2016136338 A JP 2016136338A JP 2019168733 A JP2019168733 A JP 2019168733A
Authority
JP
Japan
Prior art keywords
capacity
page
partition
cache
access
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
Application number
JP2016136338A
Other languages
Japanese (ja)
Inventor
周吾 小川
Shugo Ogawa
周吾 小川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2016136338A priority Critical patent/JP2019168733A/en
Priority to PCT/JP2017/024617 priority patent/WO2018008676A1/en
Publication of JP2019168733A publication Critical patent/JP2019168733A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems

Abstract

To optimize a capacity to be allocated to a partition of a cache corresponding to each processing without measuring and improve an access performance to a storage medium.SOLUTION: A storage control apparatus includes a reduction candidate setting unit that sets a partition having a page which is not accessed over predetermined time or a page in which an access frequency is less than a predetermined value as a partition capable of reducing a capacity thereof, and a capacity control unit that reduces the capacity of the partition capable of reducing the capacity and adds it to the capacity of the partition where cache miss occurs when the page where the cache miss occurs is included in a history of pages evicted from the cache memory to the lower storage medium.SELECTED DRAWING: Figure 1

Description

本発明は、情報処理システム、キャッシュ容量配分方法、記憶制御装置およびその方法とプログラムに関する。   The present invention relates to an information processing system, a cache capacity distribution method, a storage control device, a method thereof, and a program.

上記技術分野において、特許文献1には、キャッシュヒット頻度に基づいて配分する容量を調整する技術が開示されている。また、特許文献2には、キャッシュの容量をパーティションに分割して独立したキャッシュとして扱う際に、各パーティションの容量を計算する技術が開示されている。また、非特許文献3には、新規に格納されるデータと、一度ヒットしたデータを異なるLRUキャッシュで管理し、各キャッシュ部に以前格納されていたデータがアクセスされた場合に、データがキャッシュ内でヒットするように他方のキャッシュから一定の容量を移動する技術が開示されている。   In the above technical field, Patent Document 1 discloses a technique for adjusting the capacity to be allocated based on the cache hit frequency. Patent Document 2 discloses a technique for calculating the capacity of each partition when the cache capacity is divided into partitions and handled as an independent cache. In Non-Patent Document 3, newly stored data and once hit data are managed by different LRU caches, and data stored in the cache is accessed when data previously stored in each cache unit is accessed. A technique of moving a certain capacity from the other cache so as to hit at the same time is disclosed.

国際公開WO2014/142337号公報International Publication WO2014 / 142337 特開2007−041904号公報JP 2007-041904 A

H. S. Stone, J. Turek and J. L. Wolf, "Optimal partitioning of cache memory," in IEEE Transactions on Computers, vol. 41, no. 9, pp. 1054-1068, Sep 1992.H. S. Stone, J. Turek and J. L. Wolf, "Optimal partitioning of cache memory," in IEEE Transactions on Computers, vol. 41, no. 9, pp. 1054-1068, Sep 1992. G. E. Suh, L. Rudolph, and S. Devadas. 2004. Dynamic Partitioning of Shared Cache Memory. J. Supercomput. 28, 1 (April 2004), 7-26.G. E. Suh, L. Rudolph, and S. Devadas. 2004. Dynamic Partitioning of Shared Cache Memory. J. Supercomput. 28, 1 (April 2004), 7-26. Nimrod Megiddo and Dharmendra S. Modha. 2003. ARC: A Self-Tuning, Low Overhead Replacement Cache. In Proceedings of the 2nd USENIX Conference on File and Storage Technologies (FAST '03). USENIX Association, Berkeley, CA, USA, 115-130.Nimrod Megiddo and Dharmendra S. Modha. 2003. ARC: A Self-Tuning, Low Overhead Replacement Cache.In Proceedings of the 2nd USENIX Conference on File and Storage Technologies (FAST '03) .USENIX Association, Berkeley, CA, USA, 115 -130.

しかしながら、上記文献に記載の技術では、キャッシュの各パーティションに割り当てる容量の適正化はキャッシュヒット率などの測定時間のある分配時に行なわれ、動作中に容量変更を行なう場合には測定時間がなく容量の適正化に対応できないため、アクセス性能を高めるには限界があった。   However, in the technique described in the above-mentioned document, optimization of the capacity allocated to each partition of the cache is performed at the time of distribution with a measurement time such as a cache hit rate, and there is no measurement time when capacity is changed during operation. There is a limit to improving access performance because it cannot cope with the optimization of network access.

本発明の目的は、上述の課題を解決する技術を提供することにある。   The objective of this invention is providing the technique which solves the above-mentioned subject.

上記目的を達成するため、本発明に係る記憶制御装置は、
キャッシュメモリにおいて、所定時間を超えてアクセスされていないページ、または、アクセス頻度が所定値を下回るページを含むパーティションを、容量を削減可能なパーティションと設定する削減候補設定手段と、
キャッシュミスが発生したページが、前記キャッシュメモリから下位の記憶媒体に追い出されたページの履歴に含まれている場合、前記容量を削減可能なパーティションの容量を削減して前記キャッシュミスが発生したパーティションの容量に追加する容量制御手段と、
を備える。
In order to achieve the above object, a storage control device according to the present invention provides:
In the cache memory, a reduction candidate setting means for setting a partition including a page that has not been accessed for a predetermined time or a page whose access frequency is lower than a predetermined value as a partition whose capacity can be reduced;
When the page in which the cache miss has occurred is included in the history of the page that has been evicted from the cache memory to a lower storage medium, the partition in which the cache miss has occurred by reducing the capacity of the partition that can reduce the capacity Capacity control means to be added to the capacity of
Is provided.

上記目的を達成するため、本発明に係る記憶制御方法は、
キャッシュメモリにおいて、所定時間を超えてアクセスされていないページ、または、アクセス頻度が所定値を下回るページを含むパーティションを、容量を削減可能なパーティションと設定する削減候補設定ステップと、
キャッシュミスが発生したページが、前記キャッシュメモリから下位の記憶媒体に追い出されたページの履歴に含まれている場合、前記容量を削減可能なパーティションの容量を削減して前記キャッシュミスが発生したパーティションの容量に追加する容量制御ステップと、
を含む。
In order to achieve the above object, a storage control method according to the present invention includes:
In a cache memory, a reduction candidate setting step for setting a partition that includes a page that has not been accessed for a predetermined time or a page whose access frequency is lower than a predetermined value as a partition whose capacity can be reduced;
When the page in which the cache miss has occurred is included in the history of the page that has been evicted from the cache memory to a lower storage medium, the partition in which the cache miss has occurred by reducing the capacity of the partition that can reduce the capacity A capacity control step to add to the capacity of
including.

上記目的を達成するため、本発明に係る記憶制御プログラムは、
キャッシュメモリにおいて、所定時間を超えてアクセスされていないページ、または、アクセス頻度が所定値を下回るページを含むパーティションを、容量を削減可能なパーティションと設定する削減候補設定ステップと、
キャッシュミスが発生したページが、前記キャッシュメモリから下位の記憶媒体に追い出されたページの履歴に含まれている場合、前記容量を削減可能なパーティションの容量を削減して前記キャッシュミスが発生したパーティションの容量に追加する容量制御ステップと、
をコンピュータに実行させる。
In order to achieve the above object, a storage control program according to the present invention provides:
In a cache memory, a reduction candidate setting step for setting a partition that includes a page that has not been accessed for a predetermined time or a page whose access frequency is lower than a predetermined value as a partition whose capacity can be reduced;
When the page in which the cache miss has occurred is included in the history of the page that has been evicted from the cache memory to a lower storage medium, the partition in which the cache miss has occurred by reducing the capacity of the partition that can reduce the capacity A capacity control step to add to the capacity of
Is executed on the computer.

上記目的を達成するため、本発明に係るシステムは、
記憶媒体と、
複数の処理からのアクセス要求に基づいて、前記記憶媒体へのアクセスを指示するアクセス手段と、
キャッシュメモリを有し、前記アクセス手段の前記記憶媒体へのアクセスを制御する記憶制御手段と、
を備えた情報処理システムであって、
前記記憶制御手段は、
前記キャッシュメモリにおいて、所定時間を超えてアクセスされていないページ、または、アクセス頻度が所定値を下回るページを含むパーティションを、容量を削減可能なパーティションと設定する削減候補設定手段と、
キャッシュミスが発生したページが、前記キャッシュメモリから下位の前記記憶媒体に追い出されたページの履歴に含まれている場合、前記容量を削減可能なパーティションの容量を削減して前記キャッシュミスが発生したパーティションの容量に追加する容量制御手段と、
を備える。
In order to achieve the above object, a system according to the present invention provides:
A storage medium;
Access means for instructing access to the storage medium based on access requests from a plurality of processes;
Storage control means for controlling access to the storage medium of the access means, having a cache memory;
An information processing system comprising:
The storage control means
In the cache memory, a reduction candidate setting means for setting a page that has not been accessed for a predetermined time or a partition including a page whose access frequency is lower than a predetermined value as a partition whose capacity can be reduced;
When the page in which a cache miss has occurred is included in the history of pages that have been evicted from the cache memory to the lower storage medium, the cache miss has occurred by reducing the capacity of the partition capable of reducing the capacity. Capacity control means to add to the capacity of the partition;
Is provided.

上記目的を達成するため、本発明に係るキャッシュ容量配分方法は、
複数の処理の各処理に対して、キャッシュメモリ内の少なくとも1つのページを含むパーティションを割り当てる割当ステップと、
前記キャッシュメモリにおいて、所定時間を超えてアクセスされていないページ、または、アクセス頻度が所定値を下回るページを含むパーティションを、容量を削減可能なパーティションと設定する削減候補設定ステップと、
キャッシュミスが発生したページが、前記キャッシュメモリから下位の記憶媒体に追い出されたページの履歴に含まれている場合、前記容量を削減可能なパーティションの容量を削減して前記キャッシュミスが発生したパーティションの容量に追加する容量制御ステップと、
前記削減候補設定ステップをバックグラウンドで実行しつつ、前記容量制御ステップを繰り返し、前記各処理に対するキャッシュ容量の配分を管理する配分管理ステップと、
を含む。
In order to achieve the above object, a cache capacity allocation method according to the present invention includes:
An assigning step of assigning a partition including at least one page in the cache memory to each of the plurality of processes;
In the cache memory, a reduction candidate setting step for setting a page that has not been accessed for a predetermined time or a partition including a page whose access frequency is lower than a predetermined value as a partition whose capacity can be reduced;
When the page in which the cache miss has occurred is included in the history of the page that has been evicted from the cache memory to a lower storage medium, the partition in which the cache miss has occurred by reducing the capacity of the partition that can reduce the capacity A capacity control step to add to the capacity of
While executing the reduction candidate setting step in the background, the capacity control step is repeated, and a distribution management step for managing the distribution of the cache capacity for each process;
including.

本発明によれば、各処理に対応したキャッシュのパーティションに割り当てるべき容量を測定することなしに処理中に適正化し、記憶媒体に対するアクセス性能を高めることができる。   ADVANTAGE OF THE INVENTION According to this invention, it can optimize during a process, without measuring the capacity | capacitance which should be allocated to the partition of the cache corresponding to each process, and can improve the access performance with respect to a storage medium.

本発明の第1実施形態に係る記憶制御装置の構成を示すブロック図である。1 is a block diagram illustrating a configuration of a storage control device according to a first embodiment of the present invention. 本発明の第2実施形態に係る記憶制御装置を含む情報処理システムの構成を示すブロック図である。It is a block diagram which shows the structure of the information processing system containing the storage control apparatus which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る記憶制御装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the storage control apparatus which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係るページ状態管理テーブルの構成を示す図である。It is a figure which shows the structure of the page state management table which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係るパーティション容量設定テーブルの構成を示す図である。It is a figure which shows the structure of the partition capacity | capacitance setting table which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る置換ページ履歴テーブルの構成を示す図である。It is a figure which shows the structure of the replacement page log | history table which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態における記憶制御装置のハードウェア構成を示したブロック図である。It is the block diagram which showed the hardware constitutions of the storage control apparatus in 2nd Embodiment of this invention. 本発明の第2実施形態における記憶制御装置の処理手順を示したフローチャートである。It is the flowchart which showed the process sequence of the storage control apparatus in 2nd Embodiment of this invention. 本発明の第2実施形態におけるアクセス処理の手順を示したフローチャートである。It is the flowchart which showed the procedure of the access process in 2nd Embodiment of this invention. 本発明の第2実施形態におけるキャッシュヒット時のアクセス処理の手順を示したフローチャートである。It is the flowchart which showed the procedure of the access processing at the time of the cache hit in 2nd Embodiment of this invention. 本発明の第2実施形態におけるキャッシュミス時のアクセス処理の手順を示したフローチャートである。It is the flowchart which showed the procedure of the access processing at the time of the cache miss in 2nd Embodiment of this invention. 本発明の第2実施形態におけるキャッシュミス時のアクセス処理の手順を示したフローチャートである。It is the flowchart which showed the procedure of the access processing at the time of the cache miss in 2nd Embodiment of this invention. 本発明の第2実施形態におけるパーティションの設定容量調整処理の手順を示したフローチャートである。It is the flowchart which showed the procedure of the setting capacity | capacitance adjustment process of the partition in 2nd Embodiment of this invention. 本発明の第2実施形態におけるパーティションの解放可能容量更新処理の手順を示したフローチャートである。It is the flowchart which showed the procedure of the partition releasable capacity update processing in 2nd Embodiment of this invention. 本発明の第3実施形態に係る記憶制御装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the storage control apparatus which concerns on 3rd Embodiment of this invention. 本発明の第4実施形態に係る記憶制御装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the storage control apparatus which concerns on 4th Embodiment of this invention. 本発明の第4実施形態における処理速度調整処理の手順を示したフローチャートである。It is the flowchart which showed the procedure of the processing speed adjustment process in 4th Embodiment of this invention. 本発明の第5実施形態に係る記憶制御装置を含む情報処理システムの構成を示すブロック図である。It is a block diagram which shows the structure of the information processing system containing the storage control apparatus which concerns on 5th Embodiment of this invention.

以下に、図面を参照して、本発明の実施の形態について例示的に詳しく説明する。ただし、以下の実施の形態に記載されている構成要素は単なる例示であり、本発明の技術範囲をそれらのみに限定する趣旨のものではない。なお、「ページ」とは、システムにおけるキャッシュへのアクセス単位であり、記憶媒体のアクセス単位は多くの場合にページより細かな単位となる。本明細書では、説明を分かりやすくするためにページ単位で全てのアクセスを行うよう記載しているが、実際はページよりも小さな単位でのアクセスが発生している。   Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the drawings. However, the constituent elements described in the following embodiments are merely examples, and are not intended to limit the technical scope of the present invention only to them. The “page” is a unit for accessing the cache in the system, and the unit for accessing the storage medium is often a unit finer than the page. In this specification, in order to make the explanation easy to understand, it is described that all accesses are performed in units of pages. However, in actuality, accesses are performed in units smaller than pages.

[第1実施形態]
本発明の第1実施形態としての記憶制御装置100について、図1を用いて説明する。記憶制御装置100は、キャッシュメモリを含む記憶媒体へのアクセスを制御する装置である。
[First Embodiment]
A storage control device 100 as a first embodiment of the present invention will be described with reference to FIG. The storage control device 100 is a device that controls access to a storage medium including a cache memory.

図1に示すように、記憶制御装置100は、削減候補設定部101と、容量制御部102と、を含む。削減候補設定部101は、キャッシュメモリ130において、所定時間を超えてアクセスされていないページ、または、アクセス頻度が所定値を下回るページを含むパーティション111を、容量を削減可能なパーティション121と設定する。容量制御部102は、キャッシュミスが発生したページ122が、キャッシュメモリ130から下位の記憶媒体140に追い出されたページの履歴123に含まれている場合、容量を削減可能なパーティション121の容量を削減してキャッシュミスが発生したパーティション124の容量に追加する。   As illustrated in FIG. 1, the storage control device 100 includes a reduction candidate setting unit 101 and a capacity control unit 102. The reduction candidate setting unit 101 sets, in the cache memory 130, a partition 111 that includes a page that has not been accessed for a predetermined time or a page whose access frequency is lower than a predetermined value, as a partition 121 that can be reduced in capacity. The capacity control unit 102 reduces the capacity of the partition 121 that can reduce the capacity when the page 122 in which the cache miss has occurred is included in the history 123 of the page that has been evicted from the cache memory 130 to the lower storage medium 140. Thus, it is added to the capacity of the partition 124 in which the cache miss has occurred.

本実施形態によれば、アクセスの少ないページを含むパーティションを、容量を削減可能なパーティション設定して、追い出されたページでキャッシュミスが発生したパーティションに容量を移動する。これにより、各処理に対応したキャッシュのパーティションに割り当てるべき容量を測定することなしに処理中に適正化し、記憶媒体に対するアクセス性能を高めることができる。   According to the present embodiment, a partition including a page with few accesses is set as a partition capable of reducing the capacity, and the capacity is moved to a partition in which a cache miss has occurred in the evicted page. Thereby, it is possible to optimize during processing without measuring the capacity to be allocated to the cache partition corresponding to each processing, and to improve the access performance to the storage medium.

[第2実施形態]
次に、本発明の第2実施形態に係るキャッシュメモリを制御する記憶制御装置について説明する。本実施形態の記憶制御装置は、アクセスの少ないページを含むパーティションを、容量を削減可能なパーティション設定して、追い出されたページでキャッシュミスが発生したパーティションへの容量の移動を繰り返す。
[Second Embodiment]
Next, a storage controller that controls the cache memory according to the second embodiment of the present invention will be described. The storage control apparatus of this embodiment sets a partition including a page with few accesses to a partition capable of reducing the capacity, and repeatedly moves the capacity to the partition where a cache miss has occurred in the evicted page.

ここで、削減可能なパーティションの設定については、所定時間を周期として、その間にアクセスされていないページを不要なページとして検出する不要ページ検出に基づいて、不要なページを含むパーティションを、容量を削減可能なパーティションと設定する。この不要ページ検出は、例えば、クロックアルゴリズムを用いて行なわれる。また、容量の移動において、容量を削減可能なパーティションが複数ある場合、下位の記憶媒体に追い出される可能性の最も高いページを含むパーティションを容量削減するパーティションとする。そして、容量削減をするパーティションにおいて、容量の移動先のパーティションで新たにデータの格納が必要になった場合、下位の記憶媒体に追い出される可能性の最も高いページを削減する。また、本実施形態のキャッシュ容量配分方法は、複数の処理の各処理に対して、キャッシュメモリ内の少なくとも1つのページを含むパーティションを割り当てる割当処理と、削減候補設定処理をバックグラウンドで実行しつつ、容量制御処理を繰り返し、各処理に配分するキャッシュ容量の配分を管理する配分管理処理と、を含む。   Here, with respect to the setting of partitions that can be reduced, the capacity of partitions containing unnecessary pages is reduced based on unnecessary page detection that detects pages that are not accessed as unnecessary pages in a specified time period. Set as possible partition. This unnecessary page detection is performed using, for example, a clock algorithm. In addition, when there are a plurality of partitions whose capacity can be reduced in capacity transfer, a partition including a page most likely to be evicted to a lower storage medium is set as a partition whose capacity is reduced. Then, in the partition whose capacity is to be reduced, when data storage is newly required in the partition to which the capacity is moved, the page that is most likely to be evicted to the lower storage medium is reduced. In addition, the cache capacity distribution method according to the present embodiment performs an allocation process for allocating a partition including at least one page in the cache memory and a reduction candidate setting process in the background for each of a plurality of processes. And a distribution management process for managing the distribution of the cache capacity allocated to each process by repeating the capacity control process.

《前提技術の説明》
近年、計算機の処理能力向上や記憶素子、記憶媒体の高密度化と共に、計算機において処理されるデータの容量が増加している。それに伴い、計算機の処理においてより大きな容量を持つ、低速な記憶媒体で構成された下位の記憶階層に対するアクセス量が増加している。例えば、処理で用いるデータ全体が計算機のメモリに収まらない場合、メモリより下位のHDD (Hard Disk Drive)やNANDフラッシュを用いたSSD (Solid State Drive)などの記憶媒体にデータを格納してアクセスを行う。また、多くの計算機においてプロセッサは自身に大きな記憶領域を持たず、大容量のデータを処理するためにDRAM (Dynamic Random Access Memory)等で構成された下位のメモリを使用する。通常、計算機において下位の記憶階層は低速であるため、上位の記憶媒体でデータをキャッシュすることで処理性能の向上を図る。キャッシュの効果を十分に得るためには、増加したアクセス量に対応した十分な容量のキャッシュが必要となる。
《Explanation of prerequisite technology》
In recent years, the capacity of data processed in a computer has increased with the improvement of the processing capability of the computer and the increase in the density of storage elements and storage media. Along with this, the amount of access to lower storage hierarchies composed of low-speed storage media having a larger capacity in computer processing is increasing. For example, if the entire data used in the process does not fit in the memory of the computer, the data is stored in a storage medium such as HDD (Hard Disk Drive) or SSD (Solid State Drive) using NAND flash. Do. In many computers, a processor does not have a large storage area, and uses a lower-order memory composed of a DRAM (Dynamic Random Access Memory) or the like in order to process a large amount of data. Since the lower storage hierarchy is usually slow in a computer, processing performance is improved by caching data in an upper storage medium. In order to obtain a sufficient cache effect, a cache having a sufficient capacity corresponding to the increased access amount is required.

一方で、近年の計算機で採用されるプロセッサでは、処理能力の向上を目的として同時に複数の処理を並列に実行するためにコア、スレッドと呼ばれる命令実行単位の数が増加している。これらのプロセッサの処理能力を活用して性能向上を図るには、各計算機上で並列に実行する処理数の増加が求められる。計算機上で実行される複数の処理は、通常異なるデータに対して異なる手順で処理を実行する。そのため、並列実行される各処理が利用可能なキャッシュ容量は処理数に反比例して減少する。   On the other hand, in processors adopted in recent computers, the number of instruction execution units called cores and threads is increasing in order to execute a plurality of processes in parallel for the purpose of improving processing capability. In order to improve the performance by utilizing the processing capability of these processors, it is required to increase the number of processes executed in parallel on each computer. The plurality of processes executed on the computer usually execute processes with different procedures for different data. Therefore, the cache capacity that can be used by each process executed in parallel decreases in inverse proportion to the number of processes.

つまり、各処理に対して余分なキャッシュ容量を割り当てることなく、並列に実行される処理全体のキャッシュの効果を最大化するように容量を配分する必要がある。並列実行される処理数が増加すると、十分に性能が得られるように各処理で使用するデータ量に対して余裕を持った容量を割り当てることは困難である。また、並列実行数の増加によって、各処理がキャッシュしたデータ間で競合の発生する可能性が増加する。例えば、処理の一つが大量のデータを参照する場合、キャッシュの容量を多く消費することで並列実行される他の処理が頻繁に参照するデータ(ワーキングセット)が追い出される。複数の処理間でワーキングセットに含まれるデータの追い出しが互いに行われることで、各処理において下位の記憶階層に対するアクセスが増加して大幅な性能低下につながる。   That is, it is necessary to allocate the capacity so as to maximize the cache effect of the entire processes executed in parallel without allocating an extra cache capacity for each process. As the number of processes executed in parallel increases, it is difficult to allocate a capacity with a margin for the amount of data used in each process so that sufficient performance can be obtained. In addition, an increase in the number of parallel executions increases the possibility of contention between data cached by each process. For example, when one of the processes refers to a large amount of data, data (working set) that is frequently referred to by other processes executed in parallel is expelled by consuming a large amount of cache capacity. Since the data included in the working set is mutually purged between the plurality of processes, the access to the lower storage hierarchy is increased in each process, leading to a significant performance degradation.

この問題に対して、例えば、非特許文献1に示された技術では、処理ごとにキャッシュをパーティションと呼ばれる領域に分割することで処理間の競合発生を防止している。各パーティションはそれぞれ割り当てられた容量の独立したキャッシュとして動作する。そのためパーティションを使用することで、キャッシュしたデータが他の処理のデータを追い出す、処理間の競合を回避可能である。また、処理ごとに最適なパーティション容量を設定することで、キャッシュ容量に対するヒット数を向上させている。キャッシュに含まれる、各処理の最適なパーティション容量は、計算機やストレージシステムのメモリ容量だけではなく、並列に実行される処理の組み合わせに依存する。また、ワーキングセットは各処理の実行が進むと共に変化する。   To deal with this problem, for example, in the technique disclosed in Non-Patent Document 1, a cache is divided into areas called partitions for each process to prevent contention between processes. Each partition operates as an independent cache of the allocated capacity. Therefore, by using partitions, it is possible to avoid contention between processes in which cached data drives out data of other processes. Moreover, the number of hits for the cache capacity is improved by setting an optimum partition capacity for each process. The optimum partition capacity of each process included in the cache depends on not only the memory capacity of the computer or storage system but also the combination of processes executed in parallel. The working set changes as the execution of each process proceeds.

そこで、例えば、非特許文献2に示された技術では、プロセッサのキャッシュにおいてアクセスの状況から動的に各パーティションの容量配分を最適化している。パーティション容量が変化した場合のヒット数をキャッシュの利用状況から予測し、パーティションに対してヒット数が最大化される容量配分を算出する。非特許文献2に示された技術では、容量変化時のヒット数を予測するために、各アクセスがヒットした際のパーティション内部における置換の優先順位を参照する。しかし、HDDやSSDのような記憶媒体に対するキャッシュのように、容量が大きく多数のデータを含む環境において、各パーティションでヒットしたアクセスに対する置換の優先順位を調べることは困難である。例えば、キャッシュ置換のアルゴリズムとしてLRU(Least Recently Used)を用いる場合、優先順位を表すデータ構造が多くの場合にリストの形式であるため、キャッシュヒットしたデータの置換の優先順位を調べるために先頭からリストを辿る必要がある。そのため、キャッシュヒット時の応答時間が増加してアクセス性能の低下につながる。   Therefore, for example, in the technique disclosed in Non-Patent Document 2, the capacity distribution of each partition is dynamically optimized based on the access status in the processor cache. The number of hits when the partition capacity changes is predicted from the cache usage status, and the capacity allocation that maximizes the number of hits for the partition is calculated. In the technique disclosed in Non-Patent Document 2, in order to predict the number of hits when the capacity changes, the priority of replacement in the partition when each access hits is referred to. However, in an environment having a large capacity and containing a large number of data, such as a cache for a storage medium such as an HDD or SSD, it is difficult to check the priority of replacement for an access hit in each partition. For example, when LRU (Least Recently Used) is used as a cache replacement algorithm, since the data structure representing the priority is in the form of a list in many cases, it is necessary to check the replacement priority of the data hit by the cache from the top. You need to follow the list. Therefore, the response time at the time of a cache hit increases, leading to a decrease in access performance.

また、非特許文献3では、キャッシュの部位毎の容量をアクセスに応じて動的に調整するキャッシュ置換アルゴリズムが示されている。このアルゴリズムでは、新規に格納されるデータと、一度ヒットしたデータを異なるLRUキャッシュで管理しており、各キャッシュ部に以前格納されていたデータがアクセスされた場合に、データがキャッシュ内でヒットするように他方のキャッシュから一定の容量を移動する。そのため、非特許文献2に示された技術のような容量変化時のヒット数の予測は不要である。しかし、3つ以上のキャッシュ間の容量調整には対応しておらず、それぞれ異なる処理に対して割り当てられたキャッシュまたはパーティション間の容量を最適化することは想定されていない。   Non-Patent Document 3 discloses a cache replacement algorithm that dynamically adjusts the capacity of each part of a cache according to access. In this algorithm, newly stored data and once hit data are managed by different LRU caches, and when data previously stored in each cache unit is accessed, the data hits in the cache To move a certain capacity from the other cache. Therefore, it is not necessary to predict the number of hits when the capacity changes as in the technique disclosed in Non-Patent Document 2. However, it does not support capacity adjustment between three or more caches, and it is not assumed that the capacity between caches or partitions assigned to different processes is optimized.

長期間アクセスされていないページを検出する動作自体は、キャッシュやメモリ管理において置換対象のデータを決定する一般的な技術において用いられるが、通常は検出されたページを直接置換の対象とするために用いられる。   The operation itself for detecting a page that has not been accessed for a long period of time is used in a general technique for determining data to be replaced in cache and memory management. Usually, in order to directly detect a detected page as a target for replacement. Used.

(課題)
並列に実行される複数処理において高い性能を実現するために、共有キャッシュにおいて処理間のキャッシュの競合を防ぐと同時に、各処理に対してキャッシュの効果を最大化するように容量を配分することが求められる。そのために、各処理のワーキングセットを基に最適なパーティションの容量を求める必要がある。各処理のワーキングセットを動的に測定するために、対応するパーティション毎のデータアクセスを監視し、繰り返しアクセスされるデータの総容量を調べる必要がある。
(Task)
In order to achieve high performance in multiple processes executed in parallel, it is possible to allocate a capacity so as to maximize the effect of the cache for each process while preventing cache contention between processes in the shared cache. Desired. Therefore, it is necessary to obtain an optimum partition capacity based on the working set of each process. In order to dynamically measure the working set of each process, it is necessary to monitor the data access for each corresponding partition and check the total capacity of the data that is repeatedly accessed.

しかし、一般的に各処理のワーキングセットを調べて、その結果が判明するまでに時間を要する。ワーキングセットに含まれる各データはアクセス頻度が高いほど、測定開始から早期にアクセスが検出される可能性が高いと言える。逆にワーキングセット内の相対的にアクセス頻度の低いデータは、測定開始から当該データに対するアクセスが検出されるまでに時間を要する可能性が高く、結果的にワーキングセット全体について漏れなく測定するために多くの時間を要する。   However, in general, it takes time to examine the working set of each process and find out the result. It can be said that the higher the access frequency of each data included in the working set, the higher the possibility that access will be detected earlier from the start of measurement. Conversely, data that is relatively infrequently accessed in the working set is likely to take time from the start of measurement until access to the data is detected, and as a result, to measure the entire working set without omission It takes a lot of time.

つまり、各処理のキャッシュのパーティションに割り当てる容量が決定するまでに時間を要することが課題である。例えば、計算機上で新たな処理の実行を開始、もしくは終了する際に、各処理のパーティションに対する最適な容量配分が変化する。また、多くの場合に各処理のワーキングセットは時間と共に変化する。しかし、ワーキングセットの確定に多くの時間を要することから、これらの容量配分変化への対応が困難である。特に、各パーティションにおける余剰分の容量を算出するために、ワーキングセットから外れたデータの検出が必要である。そのため、例えば、新たに実行を開始した処理のように即座にパーティションの容量追加が必要な場合に対応できず、性能が大きく低下する。   In other words, it is a problem that it takes time to determine the capacity allocated to the cache partition of each process. For example, when the execution of a new process is started or ended on the computer, the optimum capacity distribution for each process partition changes. In many cases, the working set of each process changes with time. However, since it takes a lot of time to determine the working set, it is difficult to cope with these capacity distribution changes. In particular, in order to calculate the surplus capacity in each partition, it is necessary to detect data out of the working set. For this reason, for example, it is not possible to deal with a case where the capacity of the partition needs to be immediately added as in a process that has been newly started, and the performance is greatly reduced.

すなわち、前提技術においては、キャッシュの動作中の各動作に割り当てられたパーティションの容量を変更する場合であっても、キャッシュミスの発生を検知して容量追加を要求する処理と、アクセスが少なく容量が削減可能なパーティションを見つける処理とが関連付けられている。そのため、容量変更の時間短縮が制限されて、データアクセスの性能が低下してしまう。   That is, in the base technology, even when the capacity of the partition allocated to each operation during the cache operation is changed, a process for detecting the occurrence of a cache miss and requesting an additional capacity, and a capacity with less access Is associated with the process of finding partitions that can be reduced. For this reason, the time for changing the capacity is limited, and the data access performance is degraded.

《本実施形態の説明》
本実施形態においては、並列に実行される複数の処理において、記憶媒体に対する各処理のキャッシュパーティションの容量をキャッシュヒット率が最大となるように、各パーティションの容量を動的に調整する方法を提供する。そのために、各パーティションを割り当てられた処理による、キャッシュを通した記憶媒体に対するアクセスの情報を基に、パーティションの容量削減の可否を判断しておく。そして、各パーティションの容量追加が必要になると、容量追加が必要と判断されたパーティションに対して、あらかじめ準備された容量削減が可能なパーティションから容量を移動する。
<< Description of this embodiment >>
In this embodiment, in a plurality of processes executed in parallel, a method is provided for dynamically adjusting the capacity of each partition so that the cache hit rate of the cache partition capacity of each process on the storage medium is maximized. To do. For this purpose, it is determined whether or not the capacity of the partition can be reduced on the basis of access information to the storage medium through the cache by the process assigned to each partition. Then, when the capacity of each partition needs to be added, the capacity is moved from the partition capable of capacity reduction prepared in advance to the partition determined to require the capacity addition.

本実施形態では、パーティションの容量削減の可否を判断する基準として、キャッシュに格納されているもののワーキングセットから外れたデータを検出する。また、各処理に対応するキャッシュパーティションを通した記憶媒体に対するアクセスの情報から、パーティションの容量追加の判断基準として、繰り返しアクセスされているにも関わらずキャッシュの容量不足により追い出されているデータを検出する。   In the present embodiment, as a criterion for determining whether or not the capacity of the partition can be reduced, data stored in the cache but out of the working set is detected. In addition, from the information on access to the storage medium through the cache partition corresponding to each process, as a criterion for adding the capacity of the partition, data that has been repeatedly accessed but detected due to insufficient cache capacity is detected. To do.

まず、本実施形態では、キャッシュに含まれる各ページに対するアクセスの有無を監視し、長期間アクセスされていないページを検出する。長期間アクセスされていないページは、アクセス頻度が低い可能性が高く、ワーキングセットに含まれないページである可能性が高いと考えられる。そのため、検出されたページの容量を、当該ページを含むパーティションから解放可能な容量とする。   First, in this embodiment, the presence or absence of access to each page included in the cache is monitored to detect a page that has not been accessed for a long time. A page that has not been accessed for a long period of time is likely to have a low access frequency and is likely to be a page that is not included in the working set. Therefore, the capacity of the detected page is set to a capacity that can be released from the partition including the page.

次に、本実施形態ではキャッシュから追い出された直近のページの履歴を保存し、各パーティションでキャッシュミスが発生した際に保存された履歴と照合する。キャッシュミスしたページが履歴に含まれている場合、キャッシュミスしたページは繰り返しアクセスされているもののキャッシュから追い出されたことが原因でミスになったと考えられる。そのため、アクセスを行った処理がキャッシュミスしたページをキャッシュに格納するために必要なパーティションの容量追加の要求を行う。   Next, in the present embodiment, the history of the most recent page evicted from the cache is stored, and collated with the history stored when a cache miss occurs in each partition. When the cache missed page is included in the history, it is considered that the cache missed page was repeatedly accessed but was missed because it was evicted from the cache. For this reason, a request is made to add a capacity of a partition necessary for storing in the cache a page that has been missed by the accessed process.

そして、容量追加の要求が行われたパーティションに対して、要求した容量を追加で割り当てる。一方で、容量の解放が可能なパーティションから1つのパーティションを選択し、選択されたパーティションに割り当てられた容量から追加を要求された分の容量を減算する。   Then, the requested capacity is additionally allocated to the partition for which the capacity addition request is made. On the other hand, one partition is selected from the partitions whose capacity can be released, and the capacity required to be added is subtracted from the capacity allocated to the selected partition.

容量が増加、減少した各パーティションでは、それぞれ増加後、減少後の容量に基づいてページの置き換えを行う。キャッシュミスに伴い新たなデータを格納する際に、データの格納先となるパーティションに含まれるページ数が容量よりも少ない場合、含まれるページ数が容量よりも多い他パーティションのページを置き換えて、パーティションのページ数を増加させる。以上の処理を繰り返すことで、各パーティションの容量を動的にキャッシュヒット率が最大となるように調整する。   In each partition whose capacity has increased or decreased, page replacement is performed based on the capacity after the increase or decrease. When storing new data due to a cache miss, if the number of pages included in the partition where the data is stored is less than the capacity, replace the page of the other partition with more pages than the capacity, and change the partition Increase the number of pages. By repeating the above processing, the capacity of each partition is dynamically adjusted so as to maximize the cache hit rate.

本実施形態は、ページ状態管理機能と、パーティション容量設定機能と、置換対象ページ選択機能と、置換ページ履歴管理機能と、不要ページ容量解放機能と、容量追加判定機能と、追加容量取得元選択機能と、を備える。   This embodiment includes a page status management function, a partition capacity setting function, a replacement target page selection function, a replacement page history management function, an unnecessary page capacity release function, a capacity addition determination function, and an additional capacity acquisition source selection function. And comprising.

ページ状態管理機能は、キャッシュ内の各ページに関する情報を管理する。すなわち、各処理に対応するキャッシュパーティションに対する容量削減、および、容量追加の判断を行い、パーティション間で容量の移動を行うことでキャッシュヒット率を最大化するために、各ページに対する最終アクセス時間、もしくは一定時間のアクセス有無、アクセス数を管理する。各ページを管理するための情報は、各ページに格納されたデータの記憶媒体における格納先アドレス等の識別子、置換の優先順位などの一般的なキャッシュが持つ管理情報以外に、各ページに対する最終アクセス時間、または一定時間内のアクセス有無、アクセス数に関する少なくともいずれか1つの情報を持つ。   The page state management function manages information about each page in the cache. In other words, in order to maximize the cache hit rate by determining the capacity reduction and capacity addition for the cache partition corresponding to each process and moving the capacity between partitions, the last access time for each page, or Manages the presence / absence and number of accesses for a certain period of time. The information for managing each page includes the last access to each page in addition to the general cache management information such as identifiers such as storage destination addresses in the storage medium of the data stored in each page and the priority of replacement. It has at least one information regarding time, presence / absence of access within a certain time, and number of accesses.

パーティション容量設定機能は、各パーティションの容量を動作中に設定可能であり、キャッシュ内に定義された各パーティションに対して割り当てられた容量、および、解放可能な容量の指定を管理する。   The partition capacity setting function can set the capacity of each partition during operation, and manages designation of the capacity allocated to each partition defined in the cache and the releasable capacity.

置換対象ページ選択機能は、データを格納するための置換対象となるページの決定、もしくは置換対象となるページの優先順位を制御する。すなわち、キャッシュ内に定義された、仮想的な独立したキャッシュとして動作する各パーティションに対して、パーティションに含まれる各ページの置換に関する優先順位とパーティション容量設定機能から取得したパーティション容量を基に、キャッシュミスにより新規データの格納先となるページを決定する。また、置換結果を基に新規データが格納されるパーティションの各ページの置換に関する優先順位を更新する。   The replacement target page selection function determines the page to be replaced for storing data, or controls the priority order of pages to be replaced. That is, for each partition that operates as a virtual independent cache defined in the cache, the cache is based on the priority for replacing each page in the partition and the partition capacity obtained from the partition capacity setting function. A page to store new data is determined by mistake. Further, the priority order for replacement of each page of the partition in which new data is stored is updated based on the replacement result.

置換ページ履歴管理機能は、過去にキャッシュに格納されており、他のデータによって置換されたページの履歴を管理する。すなわち、各パーティションにおいて過去一定期間に新規に格納されるデータによって置換されたページについて、置換されたページに格納されていたデータの、記憶媒体におけるアドレス等の格納先を指定する識別子の情報を管理する。   The replacement page history management function manages the history of pages that have been stored in the cache in the past and replaced by other data. That is, for pages replaced by data newly stored in a certain past period in each partition, information on identifiers that specify storage destinations such as addresses in the storage medium of data stored in the replaced pages is managed. To do.

不要ページ容量解放機能は、各ページに対応するアクセスの情報から一定時間アクセスが行われていないか、もしくはアクセス頻度の低い不要ページを検出し、不要ページが属するパーティションに割り当てられた容量に対して、解放可能な容量を計算する。すなわち、ページ状態管理機能で管理される各ページの情報を巡回して、最終アクセス時間、または一定時間内のアクセス有無、アクセス数の情報から一定時間アクセスが行われていない、もしくはアクセス頻度の低い不要ページを検出する。そして、不要ページが含まれるパーティションに対して、パーティション容量設定機能で管理される解放可能な容量に、不要ページの容量を加算する。   The unnecessary page capacity release function detects an unnecessary page that has not been accessed for a certain period of time from the access information corresponding to each page, or detects an infrequently accessed unnecessary page, and the capacity allocated to the partition to which the unnecessary page belongs Calculate the releasable capacity. That is, the information of each page managed by the page state management function is circulated, and access is not performed for a certain period of time from the last access time, the presence / absence of access within a certain period of time, the number of accesses, or the access frequency is low Detect unnecessary pages. Then, for the partition including the unnecessary page, the capacity of the unnecessary page is added to the releasable capacity managed by the partition capacity setting function.

容量追加判定機能は、キャッシュ内で置換されたページの履歴と各パーティションに対応する処理のキャッシュミスの情報から、パーティションに対する容量追加が必要か判定する。すなわち、キャッシュミスとなった記憶媒体に対するアクセスについて、アクセス先のアドレス等の識別子を、置換ページ履歴管理機能によって管理される識別子と比較する。アクセス先と一致する識別子が存在する場合は、キャッシュヒット率増加のためにパーティションの容量追加が必要と判定し、アクセス要求を行った処理に対応するパーティションを特定して、特定されたパーティションに対する容量追加要求を行う。   The capacity addition determination function determines whether or not capacity addition to a partition is necessary from the history of pages replaced in the cache and cache miss information of processing corresponding to each partition. That is, for an access to a storage medium that has caused a cache miss, an identifier such as an access destination address is compared with an identifier managed by the replacement page history management function. If there is an identifier that matches the access destination, it is determined that the capacity of the partition needs to be increased to increase the cache hit rate, the partition corresponding to the process that requested the access is specified, and the capacity for the specified partition Make additional requests.

追加容量取得元選択機能は、履歴管理機能が維持する履歴情報を参照してパーティションに対する容量追加、および容量の取得元となる解放可能な容量を持つパーティションを選択する。すなわち、容量追加判定機能によって行われた容量追加要求に対して、要求を満たすための追加容量を提供するパーティションを選択する。パーティションの選択条件は、パーティション容量設定機能において、追加要求を行った容量以上の解放可能な容量を持つパーティションである。選択条件を満たすパーティションが複数存在する場合は、例えばランダムで任意のパーティションを選択しても、その他の任意のアルゴリズムによって最適なパーティションを選択するものであってもよい。   The additional capacity acquisition source selection function refers to the history information maintained by the history management function, and selects a partition having a releasable capacity as a capacity acquisition source and a capacity acquisition source. That is, in response to a capacity addition request made by the capacity addition determination function, a partition that provides an additional capacity to satisfy the request is selected. The partition selection condition is a partition having a releasable capacity that is larger than the capacity requested for addition in the partition capacity setting function. When there are a plurality of partitions that satisfy the selection condition, for example, an arbitrary partition may be selected at random, or an optimal partition may be selected by any other algorithm.

《情報処理システム》
図2は、本実施形態に係る記憶制御装置としての記憶制御部220を含む情報処理システム200の構成を示すブロック図である。
《Information processing system》
FIG. 2 is a block diagram showing a configuration of an information processing system 200 including a storage control unit 220 as a storage control device according to the present embodiment.

図2を参照すると、情報処理システム200は、1台以上のホストコンピュータ210、記憶媒体240、および、ホストコンピュータ210と記憶媒体240とを接続するネットワーク250を含む。なお、記憶媒体240は、複数の記憶媒体に分散してネットワーク250に接続されていてもよい。   Referring to FIG. 2, the information processing system 200 includes one or more host computers 210, a storage medium 240, and a network 250 that connects the host computer 210 and the storage medium 240. Note that the storage medium 240 may be distributed over a plurality of storage media and connected to the network 250.

ホストコンピュータ210は、OS (Operating System)211およびOS211上で動作する複数のコアやソフトウェアであるスレッド212と、本実施形態の記憶制御部220と、を備える。記憶制御部220は、キャッシュ221を有し、OS211および複数のコアやスレッド212の処理における、記憶媒体240へのReadおよびWriteを含むアクセス処理を制御する。   The host computer 210 includes an OS (Operating System) 211, a plurality of cores operating on the OS 211 and a thread 212 that is software, and the storage control unit 220 of the present embodiment. The storage control unit 220 includes a cache 221 and controls access processing including reading and writing to the storage medium 240 in the processing of the OS 211 and the plurality of cores and threads 212.

記憶媒体240は、NANDフラッシュを記憶素子として用いたSSDやSMR(Shingled Magnetic Recording)を採用したHDDなどの追記形式の記憶媒体である。なお、記憶媒体240は、媒体本体241とバッファなどとを有してもよい。また、ネットワーク250の形態は特に限定されず、ホストコンピュータ210と記憶媒体240とが直接接続される形態であってもよい。また、ホストコンピュータ210はネットワーク250によって接続された複数の装置、あるいは、システムで構成されてもよい。   The storage medium 240 is a write-once storage medium such as an HDD employing SSD or SMR (Shingled Magnetic Recording) using a NAND flash as a storage element. Note that the storage medium 240 may include a medium body 241 and a buffer. Further, the form of the network 250 is not particularly limited, and the host computer 210 and the storage medium 240 may be directly connected. The host computer 210 may be configured by a plurality of devices or systems connected by the network 250.

《記憶制御装置の機能構成》
図3は、本実施形態に係る記憶制御装置としての記憶制御部220の機能構成を示すブロック図である。なお、図3において、図2と同様の構成要素には同じ参照番号を付している。
<< Functional configuration of storage controller >>
FIG. 3 is a block diagram showing a functional configuration of the storage control unit 220 as the storage control device according to the present embodiment. In FIG. 3, the same components as those in FIG. 2 are denoted by the same reference numerals.

図3を参照すると、記憶制御部220は、ページプールとしてのキャッシュ221と、アクセス制御部301と、キャッシュヒット/ミス判定部302と、ページ状態管理テーブル381を有するページ状態管理部308と、パーティション容量設定テーブル371を有するパーティション容量管理部307と、を備える。また、記憶制御部220は、置換対象ページ選択部303と、置換ページ履歴テーブル341を有する置換履歴管理部304と、容量追加判定部305と、追加容量取得元選択部306と、不要ページ容量解放部309と、を備える。   Referring to FIG. 3, the storage control unit 220 includes a cache 221 as a page pool, an access control unit 301, a cache hit / miss determination unit 302, a page state management unit 308 having a page state management table 381, and a partition. A partition capacity management unit 307 having a capacity setting table 371. The storage control unit 220 also includes a replacement target page selection unit 303, a replacement history management unit 304 having a replacement page history table 341, a capacity addition determination unit 305, an additional capacity acquisition source selection unit 306, and an unnecessary page capacity release. Unit 309.

なお、図3において、キャッシュヒット/ミス判定部302と、ページ状態管理部308と、パーティション容量管理部307と、置換対象ページ選択部303と、不要ページ容量解放部309と、が削減候補設定部として機能する。また、キャッシュヒット/ミス判定部302と、ページ状態管理部308と、パーティション容量管理部307と、置換対象ページ選択部303と、置換履歴管理部304と、容量追加判定部305と、追加容量取得元選択部306と、が容量制御部として機能する。   In FIG. 3, a cache hit / miss determination unit 302, a page state management unit 308, a partition capacity management unit 307, a replacement target page selection unit 303, and an unnecessary page capacity release unit 309 are included in a reduction candidate setting unit. Function as. In addition, the cache hit / miss determination unit 302, the page state management unit 308, the partition capacity management unit 307, the replacement target page selection unit 303, the replacement history management unit 304, the capacity addition determination unit 305, and the additional capacity acquisition The original selection unit 306 functions as a capacity control unit.

《キャッシュ》
ページプールとしてのキャッシュ221は、ホストコンピュータ210のコアやスレッドの記憶媒体240に対するアクセスについて、キャッシュされるデータをページ単位で格納する。
"cache"
A cache 221 serving as a page pool stores cached data in units of pages for access to the storage medium 240 of the core or thread of the host computer 210.

《アクセス制御部》
アクセス制御部301は、ホストコンピュータ210のソフトウェアからのアクセス要求を受け取り、記憶媒体240に対して必要なアクセス処理と、アクセス要求に対する結果の応答を行う。また、アクセス制御部301は、置換対象ページ選択部303の指示によって、記憶媒体240に対するアクセスの代わりにキャッシュ221の指定されたページにアクセス、もしくは、キャッシュ221に含まれるページのデータを記憶媒体240に書き込む。
《Access control unit》
The access control unit 301 receives an access request from the software of the host computer 210, and performs necessary access processing for the storage medium 240 and a response to the result of the access request. In addition, the access control unit 301 accesses a specified page of the cache 221 instead of accessing the storage medium 240 according to an instruction from the replacement target page selection unit 303, or stores data of a page included in the cache 221 as the storage medium 240. Write to.

《キャッシュヒット/ミス判定部》
キャッシュヒット/ミス判定部302は、アクセス制御部301の受け取ったアクセス要求における記憶媒体240のアクセス先アドレスの情報を受け取り、ページ状態管理テーブル381を参照して、アクセス先のデータがキャッシュ221に有るか否かを判定する。また、キャッシュヒット/ミス判定部302は、キャッシュヒットまたはキャッシュミスの判定結果を置換対象ページ選択部303に伝える。
<< Cash hit / miss judgment part >>
The cache hit / miss determination unit 302 receives information on the access destination address of the storage medium 240 in the access request received by the access control unit 301, refers to the page state management table 381, and the access destination data is in the cache 221. It is determined whether or not. Further, the cache hit / miss determination unit 302 notifies the replacement target page selection unit 303 of the determination result of cache hit or cache miss.

《ページ状態管理部》
ページ状態管理部308は、ページ状態管理テーブル381を用いて、キャッシュ221に含まれる各ページについて、記憶媒体240に対するキャッシュ機能の実現に必要な管理情報、および、パーティションの容量調整に必要な情報を管理する。
《Page status management unit》
The page state management unit 308 uses the page state management table 381 to obtain management information necessary for realizing the cache function for the storage medium 240 and information necessary for adjusting the capacity of the partition for each page included in the cache 221. to manage.

(ページ状態管理テーブル)
図4は、本実施形態に係るページ状態管理テーブル381の構成を示す図である。
(Page status management table)
FIG. 4 is a diagram showing a configuration of the page state management table 381 according to the present embodiment.

ページ状態管理テーブル381の各ページのエントリは、エントリに対応する当該ページが使用されていることを示す使用フラグ401と、記憶媒体240における当該ページのデータの格納先を示すアドレス402と、当該ページの所属するパーティションを示すパーティション番号403と、を有する。また、各ページのエントリは、各パーティションにおける置換の優先順位を示す置換優先順位404と、各ページがキャッシュヒットしたことを示すアクセスフラグ405と、を有する。さらに、各ページのエントリは、各ページがキャッシュ不要なページと判定されていることを示す不要候補フラグ406と、各ページが記憶媒体240の格納先に記録されたデータから更新されていることを示す更新フラグ407と、を有する。   The entry of each page of the page state management table 381 includes a use flag 401 indicating that the page corresponding to the entry is used, an address 402 indicating a storage location of the data of the page in the storage medium 240, and the page Partition number 403 indicating the partition to which the file belongs. Each page entry has a replacement priority 404 indicating the priority of replacement in each partition, and an access flag 405 indicating that each page has a cache hit. Further, each page entry indicates that each page is updated from data recorded in the storage destination of the storage medium 240 and an unnecessary candidate flag 406 indicating that each page is determined to be a cache-unnecessary page. An update flag 407.

なお、ページ状態管理テーブル381の各エントリに格納されるデータの形式は、図4に示した形式に限定されず、例えば、使用フラグ401を持つ代わりにアドレス402の値を記憶媒体240の記憶領域と対応しない特定の値に設定することで代用してもよい。また、置換優先順位404は、順位情報を数値で持つ代わりに例えばパーティション内のページの置換アルゴリズムとしてLRU(Least Recently Used)を用いる場合に、リンクリストの形式で表してもよい。加えて、例えば、不要ページ容量解放部309が各ページのアクセス時刻の情報を用いて不要なデータが格納されたページであるか判定を行う場合、各エントリにアクセスフラグ405の代わりに最終アクセス時刻の情報を持つようにしてもよい。   The format of data stored in each entry of the page state management table 381 is not limited to the format shown in FIG. 4. For example, instead of having the use flag 401, the value of the address 402 is stored in the storage area of the storage medium 240. It may be substituted by setting to a specific value that does not correspond to. Further, the replacement priority order 404 may be expressed in the form of a link list when, for example, LRU (Least Recently Used) is used as a replacement algorithm for pages in a partition instead of having numerical order information. In addition, for example, when the unnecessary page capacity releasing unit 309 determines whether the page stores unnecessary data using the information on the access time of each page, the last access time is used instead of the access flag 405 for each entry. You may make it have the information of.

《パーティション容量管理部》
パーティション容量管理部307は、パーティション容量設定テーブル371を用いて、各パーティションをキャッシュ内に定義され独立したキャッシュとして動作させ、パーティションに設定された容量の情報を管理する。
<Partition capacity management section>
The partition capacity management unit 307 uses the partition capacity setting table 371 to operate each partition as an independent cache defined in the cache, and manages information on the capacity set in the partition.

(パーティション容量設定テーブル)
図5は、本実施形態に係るパーティション容量設定テーブル371の構成を示す図である。
(Partition capacity setting table)
FIG. 5 is a diagram showing a configuration of the partition capacity setting table 371 according to the present embodiment.

パーティション容量設定テーブル371の各エントリは定義された個別のパーティションに対応しており、パーティションを識別するためのパーティション番号501と、エントリに対応する当該パーティションに割り当てられたページ数を示す設定容量502と、を有する。さらに、パーティション容量設定テーブル371の各エントリは、当該パーティションにおいて他パーティションに対して解放可能な容量を示す解放可能容量503と、実際にパーティションに含まれるページ数を表す実容量504と、を有する。   Each entry of the partition capacity setting table 371 corresponds to a defined individual partition, a partition number 501 for identifying the partition, and a set capacity 502 indicating the number of pages allocated to the partition corresponding to the entry. Have. Further, each entry of the partition capacity setting table 371 has a releasable capacity 503 indicating a capacity releasable from other partitions in the partition, and a real capacity 504 indicating the number of pages actually included in the partition.

なお、パーティション容量設定テーブル371の各エントリに格納されるデータの形式は、図5に示した形式に限定されず、例えば、パーティション番号501を持つ代わりに先頭から数えたエントリの順番をパーティション番号として使用してもよい。また、設定容量502、解放可能容量503、および、実容量504をページ数ではなく、バイト単位の容量で示してもよい。さらに、容量追加判定部305における各パーティションの容量追加要求を1回ずつ処理せずに、複数回の要求をまとめて処理する場合には、各パーティションに対応するエントリに、容量追加要求の回数を格納してもよい。   The format of the data stored in each entry of the partition capacity setting table 371 is not limited to the format shown in FIG. 5. For example, instead of having the partition number 501, the order of entries counted from the top is used as the partition number. May be used. In addition, the set capacity 502, the releasable capacity 503, and the real capacity 504 may be indicated by a capacity in bytes instead of the number of pages. Further, in the case where a plurality of requests are processed together without processing the capacity addition request for each partition in the capacity addition determination unit 305 once, the number of capacity addition requests is set in the entry corresponding to each partition. It may be stored.

《置換対象ページ選択部》
置換対象ページ選択部303は、キャッシュヒット/ミス判定部302によるキャッシュヒットまたはキャッシュミスの判定結果に基づき、アクセス制御部301に対してキャッシュ221または記憶媒体240に対する必要なアクセスの指示をする。そして、置換対象ページ選択部303は、ページ状態管理テーブル381に格納された各ページの置換優先順位404やデータに対応するアドレスの情報を更新する。また、置換対象ページ選択部303は、アクセス制御部301に対して、アクセス要求で指定されたアドレスに対応するページに対するアクセスを行い、応答するように指示する。
《Replacement target page selection part》
The replacement target page selection unit 303 instructs the access control unit 301 to access the cache 221 or the storage medium 240 based on the cache hit / cache miss determination result by the cache hit / miss determination unit 302. Then, the replacement target page selection unit 303 updates the replacement priority order 404 of each page stored in the page state management table 381 and the address information corresponding to the data. Further, the replacement target page selection unit 303 instructs the access control unit 301 to access and respond to the page corresponding to the address specified in the access request.

さらに、キャッシュミスが発生した場合に、置換対象ページ選択部303は、パーティション容量設定テーブル371の設定容量502を参照して、新しいデータを格納するために置換対象となるページを提供するパーティションを決定する。また、置換対象ページ選択部303は、置換対象となるページに既に格納されているデータのアドレス402を、置換履歴管理部304の置換ページ履歴テーブル341に追加する。そして、置換対象ページ選択部303は、置換対象となるページの更新フラグ407がセットされている場合、当該ページに格納されているデータを新しいデータで置き換える前に、あらかじめ記憶媒体240の格納先に書き込むように、アクセス制御部301に指示する。   Further, when a cache miss occurs, the replacement target page selection unit 303 refers to the set capacity 502 of the partition capacity setting table 371 and determines a partition that provides a page to be replaced in order to store new data. To do. In addition, the replacement target page selection unit 303 adds the address 402 of data already stored in the page to be replaced to the replacement page history table 341 of the replacement history management unit 304. Then, when the update flag 407 of the page to be replaced is set, the replacement target page selection unit 303 sets the storage target in the storage medium 240 before replacing the data stored in the page with new data. The access control unit 301 is instructed to write.

《置換履歴管理部》
置換履歴管理部304は、置換ページ履歴テーブル341を用いて、各パーティションにおいて過去の一定期間に新規に格納されるデータによって置換されたページについて、当該ページに格納されていたデータに関する、記憶媒体240の格納先アドレスを管理する。また、置換履歴管理部304は、置換ページ履歴テーブル341に格納されたページのアドレスから一定の期間を経過したアドレスを削除する。
《Replacement history management unit》
Using the replacement page history table 341, the replacement history management unit 304 uses the replacement page history table 341 to store the storage medium 240 regarding the data stored in the page with respect to the page replaced by the data newly stored in the past certain period. To manage the storage destination address. Further, the replacement history management unit 304 deletes an address that has passed a certain period from the page address stored in the replacement page history table 341.

(置換ページ履歴テーブル)
図6は、本実施形態に係る置換ページ履歴テーブル341の構成を示す図である。
(Replacement page history table)
FIG. 6 is a diagram showing a configuration of the replacement page history table 341 according to the present embodiment.

置換ページ履歴テーブル341は、パーティションごとに置換されたページの履歴である置換履歴610〜630を持ち、置換履歴610〜630はそれぞれ、置換された個別のページを表す置換アドレス611〜631を含む。なお、置換履歴610〜630のそれぞれに記憶される置換アドレス611〜631の数は、パーティションの容量変更を頻繁に行なうか否かを決定する要因となる。例えば、置換アドレス611〜631の数を多くするにつれて、キャッシュミス時にパーティションの容量追加の条件を満たす回数が増加する。   The replacement page history table 341 has replacement histories 610 to 630 that are the history of pages replaced for each partition, and the replacement histories 610 to 630 each include replacement addresses 611 to 631 representing individual replaced pages. Note that the number of replacement addresses 611 to 631 stored in each of the replacement histories 610 to 630 is a factor that determines whether or not the capacity of the partition is frequently changed. For example, as the number of replacement addresses 611 to 631 increases, the number of times that satisfies the condition for adding the capacity of the partition at the time of a cache miss increases.

なお、置換ページ履歴テーブル341の各エントリに格納されるデータの形式は、図6に示した形式に限定されない。例えば、置換履歴610〜630は、置換アドレス611〜631を格納する代わりに、Bloomフィルタのように特定のアドレスが置換履歴610〜630の集合に含まれるか判定するためのデータ形式を用いてもよい。この場合、置換履歴610〜630を複数のBloomフィルタから形成し、一定期間の経過ごとに新しいBloomフィルタと古いBloomフィルタを入れ替えることで、過去の一定期間内に置換されたページを判定する処理に対応可能である。   Note that the format of data stored in each entry of the replacement page history table 341 is not limited to the format shown in FIG. For example, instead of storing replacement addresses 611 to 631, the replacement histories 610 to 630 may use a data format for determining whether a specific address is included in the set of replacement histories 610 to 630, such as a Bloom filter. Good. In this case, the replacement history 610 to 630 is formed from a plurality of Bloom filters, and a new Bloom filter and an old Bloom filter are replaced every time a certain period elapses, thereby determining a page replaced within a past certain period. It is possible.

《容量追加判定部》
容量追加判定部305は、キャッシュミスとなったアクセスについて、格納先のアドレスを置換ページ履歴テーブル341に格納された、アクセスを行った処理に対応するパーティションの置換履歴610〜630に含まれているか判定する。そして、容量追加判定部305は、格納先のアドレスが置換履歴610〜630に含まれており、かつ、容量追加要求が行われていない場合は、当該パーティションに対する容量追加が必要と判定し、追加容量取得元選択部306に対して1ページ分の容量の追加指示を行う。
《Capacity addition judgment unit》
Is the capacity addition determination unit 305 included in the replacement history 610 to 630 of the partition corresponding to the accessed process in which the storage destination address is stored in the replacement page history table 341 for the cache missed access? judge. The capacity addition determination unit 305 determines that the capacity needs to be added to the partition when the storage destination address is included in the replacement histories 610 to 630 and no capacity addition request is made. A capacity addition source selection unit 306 is instructed to add capacity for one page.

なお、本実施形態においては、1ページ分の容量の追加を指示するが、複数ページ分の容量の追加であってもよい。追加するページ数を増加させるにつれて、1回のパーティションの容量変化が大きくなり容量適正化が迅速に進むが、逆に、容量の変化が激しく不安定になる傾向があり、キャッシュメモリの容量、パーティションの容量、アクセス頻度、などの条件を考慮して好適な数が設定されればよい。   In this embodiment, addition of a capacity for one page is instructed, but a capacity for a plurality of pages may be added. As the number of pages to be added increases, the capacity change of one partition increases and the capacity optimization progresses quickly, but conversely, the capacity change tends to become severe and unstable, the cache memory capacity, partition A suitable number may be set in consideration of conditions such as capacity, access frequency, and the like.

《追加容量取得元選択部》
追加容量取得元選択部306は、容量追加判定部305からのパーティションに対する容量追加指示を受けて、パーティション容量設定テーブル371の各パーティションに関する解放可能容量503を参照し、解放可能な容量を持つパーティションを抽出する。そして、抽出されたパーティションから、容量追加指示に対して容量を提供するパーティションを選択する。追加容量取得元選択部306は、選択されたパーティションについて、パーティション容量設定テーブル371の解放可能容量503から1ページ分を減算し、容量追加指示の対象のパーティションについて、パーティション容量設定テーブル371の設定容量502を1ページ分加算する。
<< Additional capacity acquisition source selection part >>
The additional capacity acquisition source selection unit 306 receives the capacity addition instruction for the partition from the capacity addition determination unit 305, refers to the releasable capacity 503 for each partition in the partition capacity setting table 371, and selects a partition having a releasable capacity. Extract. Then, a partition that provides capacity in response to the capacity addition instruction is selected from the extracted partitions. The additional capacity acquisition source selection unit 306 subtracts one page from the releasable capacity 503 of the partition capacity setting table 371 for the selected partition, and sets the set capacity of the partition capacity setting table 371 for the target partition for the capacity addition instruction. 502 is added for one page.

なお、容量追加判定部305が、複数ページの追加要求をする場合、追加容量取得元選択部306は、複数ページや複数パーティションからの減算をすることになる。   When the capacity addition determination unit 305 makes a request for adding a plurality of pages, the additional capacity acquisition source selection unit 306 performs subtraction from a plurality of pages or a plurality of partitions.

《不要ページ容量解放部》
不要ページ容量解放部309は、ページ状態管理テーブル381の各エントリを巡回し、アクセスフラグ405および不要候補フラグ406を確認する。エントリの巡回時にアクセスフラグ405がセットされている場合は、前回当該エントリを巡回した後に対応するページに対してアクセスがあったことを示すため、ワーキングセットに含まれるページと判断する。そして、アクセスフラグ405をリセットする。一方、エントリの巡回時にアクセスフラグ405がセットされてなく、かつ、不要候補フラグ406がセットされていない場合は、当該ページが一定期間アクセスされていないページ、つまりワーキングセットに含まれないページであると判断し、不要候補フラグ406をセットする。また、当該ページを含むパーティションについて、パーティション容量設定テーブル371の解放可能容量503に1ページ分を加算する。
<< Unnecessary page capacity release part >>
The unnecessary page capacity releasing unit 309 circulates each entry in the page state management table 381 and confirms the access flag 405 and the unnecessary candidate flag 406. When the access flag 405 is set when the entry is visited, it is determined that the page is included in the working set in order to indicate that the corresponding page has been accessed after the previous entry was visited. Then, the access flag 405 is reset. On the other hand, when the access flag 405 is not set at the time of entry circulation and the unnecessary candidate flag 406 is not set, the page is not accessed for a certain period of time, that is, a page not included in the working set. And the unnecessary candidate flag 406 is set. Further, for a partition including the page, one page is added to the releasable capacity 503 of the partition capacity setting table 371.

なお、本実施形態においては、例えば、クロックアルゴリズムを用いて不要ページ容量の検出を行なうが、他のアルゴリズムを使用してもよい。   In the present embodiment, for example, unnecessary page capacity is detected using a clock algorithm, but other algorithms may be used.

《記憶制御装置のハードウェア構成》
図7は、本実施形態における記憶制御装置としての記憶制御部220のハードウェア構成を示したブロック図である。なお、図7においては、記憶制御部220はホストコンピュータ210のソフトウェア処理として図示するが、記憶制御部220を、ホストコンピュータ210とは独立したワンチップのコンピュータで実現してもよい。
<< Hardware configuration of storage controller >>
FIG. 7 is a block diagram showing a hardware configuration of the storage control unit 220 as the storage control device in the present embodiment. In FIG. 7, the storage control unit 220 is illustrated as software processing of the host computer 210, but the storage control unit 220 may be realized by a one-chip computer independent of the host computer 210.

図7で、CPU(Central Processing Unit)710は演算制御用のプロセッサであり、プログラムを実行することで図3の記憶制御部220の機能構成部を実現する。ROM(Read Only Memory)720は、初期データおよびプログラムなどの固定データおよびプログラムを記憶する。また、キャッシュ221は、外部の記憶媒体240のアクセスにおいて頻繁にアクセスするデータを保持する。本実施形態では、各処理に対して少なくとも1つのページを含むパーティション単位に領域が割り当てられる。また、ネットワークインタフェース730は、ネットワーク250を介して記憶媒体240や他の装置と通信する。なお、CPU710は1つに限定されず、複数のCPU(コア)であってもよい。また、ネットワークインタフェース730は、CPU710とは独立したCPUを有して、RAM(Random Access Memory)740の領域に送受信データを書き込みあるいは読み出しするのが望ましい。また、RAM740とストレージ750との間でデータを転送するDMAC(Direct Memory Access Controller)を設けるのが望ましい(図示なし)。さらに、入出力インタフェース760は、CPU710とは独立したCPUを有して、RAM740の領域に入出力データを書き込みあるいは読み出しするのが望ましい。したがって、CPU710は、RAM740にデータが受信あるいは転送されたことを認識してデータを処理する。また、CPU710は、処理結果をRAM740に準備し、後の送信あるいは転送はネットワークインタフェース730やDMAC、あるいは入出力インタフェース760に任せる。   In FIG. 7, a CPU (Central Processing Unit) 710 is a processor for arithmetic control, and implements a functional component of the storage controller 220 of FIG. 3 by executing a program. A ROM (Read Only Memory) 720 stores fixed data and programs such as initial data and programs. The cache 221 holds data that is frequently accessed when accessing the external storage medium 240. In the present embodiment, an area is allocated to each process in units of partitions including at least one page. The network interface 730 communicates with the storage medium 240 and other devices via the network 250. Note that the number of CPUs 710 is not limited to one, and may be a plurality of CPUs (cores). The network interface 730 preferably includes a CPU independent of the CPU 710 and writes or reads transmission / reception data in a RAM (Random Access Memory) 740 area. It is desirable to provide a DMAC (Direct Memory Access Controller) that transfers data between the RAM 740 and the storage 750 (not shown). Further, the input / output interface 760 preferably has a CPU independent of the CPU 710 and writes or reads input / output data to / from the area of the RAM 740. Therefore, the CPU 710 recognizes that the data has been received or transferred to the RAM 740 and processes the data. Further, the CPU 710 prepares the processing result in the RAM 740 and leaves the subsequent transmission or transfer to the network interface 730, the DMAC, or the input / output interface 760.

RAM740は、CPU710が一時記憶のワークエリアとして使用するランダムアクセスメモリである。RAM740には、本実施形態の実現に必要なデータを記憶する領域が確保されている。アクセスアドレス741は、OS211またはコアやスレッド212から記憶媒体240にアクセスしたアドレスである。キャッシュヒットアドレス742は、アクセスアドレス741の内、キャッシュヒットしたアドレスである。キャッシュヒミスアドレス743は、アクセスアドレス741の内、キャッシュミスしたアドレスである。容量追加パーティション744は、キャッシュミスしたアドレスが置換された(記憶媒体に押し出された)アドレスと一致して、容量追加を要求するパーティションである。容量削減パーティション745は、アクセスの無いあるいは頻度の低いページを含み、削減候補となったパーティションで、容量追加パーティション744に容量を移動するために選択されたパーティションである。アクセス情報746は、記憶媒体240に対するアクセス(Read、Writeを含む)内容およびデータである。入出力データ747は、入出力インタフェース760を介して入出力されるデータである。送受信データ748は、ネットワークインタフェース730を介して記憶媒体240に送受信されるデータである。アプリケーション使用領域749は、記憶制御以外の処理でアプリケーションが使用するエリアである。   The RAM 740 is a random access memory that the CPU 710 uses as a work area for temporary storage. In the RAM 740, an area for storing data necessary for realizing the present embodiment is secured. The access address 741 is an address accessed from the OS 211 or the core or thread 212 to the storage medium 240. The cache hit address 742 is an address that has a cache hit among the access addresses 741. The cache miss address 743 is an address in the access address 741 that has a cache miss. The capacity addition partition 744 is a partition that requests addition of capacity when the cache missed address matches the replaced address (extruded to the storage medium). The capacity reduction partition 745 is a partition that includes a page with no access or low frequency and is a candidate for reduction, and is a partition selected to move the capacity to the capacity addition partition 744. The access information 746 is access (including Read and Write) contents and data to the storage medium 240. Input / output data 747 is data input / output via the input / output interface 760. The transmission / reception data 748 is data transmitted / received to / from the storage medium 240 via the network interface 730. The application use area 749 is an area used by the application in processing other than storage control.

ストレージ750には、データベースや各種のパラメータ、あるいは本実施形態の実現に必要な以下のデータまたはプログラムが記憶されている。ページ状態管理テーブル381は、図4に示した、キャッシュ221の各ページを管理するテーブルである。パーティション容量設定テーブル371は、図5に示した、各処理に割り当てられたキャッシュ221のパーティションを管理するテーブルである。置換ページ履歴テーブル341は、図6に示した、キャッシュ221から記憶媒体240に押し出されたページアドレスの履歴をパーティションごとに格納するテーブルである。解放容量算出アルゴリズム751は、使用してないあるいは使用頻度が低いキャッシュ内のページを検出して、容量を削減可能なパーティションを選定するアルゴリズムであって、本例ではクロックアルゴリズムを含む。ページ巡回周期(巡回速度)752は、クロックアルゴリズムによる巡回周期を格納する。   The storage 750 stores a database, various parameters, or the following data or programs necessary for realizing the present embodiment. The page state management table 381 is a table for managing each page of the cache 221 shown in FIG. The partition capacity setting table 371 is a table for managing the partition of the cache 221 allocated to each process shown in FIG. The replacement page history table 341 is a table for storing, for each partition, the history of page addresses pushed out from the cache 221 to the storage medium 240 shown in FIG. The released capacity calculation algorithm 751 is an algorithm for selecting a partition that can reduce the capacity by detecting a page in the cache that is not used or used less frequently, and includes a clock algorithm in this example. The page cyclic cycle (cyclic rate) 752 stores a cyclic cycle based on a clock algorithm.

ストレージ750には、以下のプログラムが格納される。OS211は、本ホストコンピュータ210の全体を制御する基礎プログラムである。複数のスレッド212は、現在、本ホストコンピュータ210が実行中のプログラムにおける処理単位である。記憶制御プログラム753は、OS211や複数のスレッド212からの記憶媒体240へのアクセスを受けて、本実施形態のアクセス制御を実現するプログラムである。アクセス処理モジュール754は、OS211や複数のスレッド212からの記憶媒体240へのアクセスを処理するモジュールであり、キャッシュヒット時の制御を行なうキャッシュヒット制御モジュール755と、キャッシュミス時の制御を行なうキャッシュミス制御モジュール756と、を含む。設定容量制御モジュール757は、容量削減可能なパーティションから容量追加を要求するパーティションへの設定容量の移動を制御するモジュールである。解放容量算出モジュール758は、解放容量算出アルゴリズム751に従って、使用してないあるいは使用頻度が低いキャッシュ内のページを検出して、容量を削減可能なパーティションを選定するためのモジュールである。   The storage 750 stores the following programs. The OS 211 is a basic program that controls the entire host computer 210. The plurality of threads 212 are processing units in a program that is currently being executed by the host computer 210. The storage control program 753 is a program that realizes access control of the present embodiment in response to access to the storage medium 240 from the OS 211 or the plurality of threads 212. The access processing module 754 is a module that processes access to the storage medium 240 from the OS 211 and the plurality of threads 212, and includes a cache hit control module 755 that performs control when a cache hit occurs, and a cache miss that performs control when a cache miss occurs. A control module 756. The set capacity control module 757 is a module that controls the movement of the set capacity from the partition whose capacity can be reduced to the partition that requests capacity addition. The free capacity calculation module 758 is a module for selecting a partition whose capacity can be reduced by detecting a page in the cache that is not used or used infrequently according to the free capacity calculation algorithm 751.

入出力インタフェース760は、入出力機器との入出力データをインタフェースする。入出力インタフェース760には、表示部761、操作部762、が接続されるが、これに限定されない。   The input / output interface 760 interfaces input / output data with input / output devices. Although the display unit 761 and the operation unit 762 are connected to the input / output interface 760, the present invention is not limited to this.

なお、図7のRAM740やストレージ750には、ホストコンピュータ210が有する汎用の機能や他の実現可能な機能に関連するプログラムやデータは図示されていない。   Note that the RAM 740 and the storage 750 in FIG. 7 do not show programs and data related to general-purpose functions and other realizable functions that the host computer 210 has.

《記憶制御装置の処理手順》
図8は、本実施形態における記憶制御装置としての記憶制御部220の処理手順を示したフローチャートである。このフローチャートは、図7のCPU(コア)710がRAM740を使用して実行し、図3の機能構成部を実現する。
<< Processing procedure of storage controller >>
FIG. 8 is a flowchart showing a processing procedure of the storage control unit 220 as the storage control device in the present embodiment. This flowchart is executed by the CPU (core) 710 in FIG. 7 using the RAM 740, and implements the functional configuration unit in FIG.

記憶制御部220は、ステップS801において、各テーブルの処理化などを含む初期化処理を行なう。記憶制御部220は、ステップS803において、ホストコンピュータ210における記憶媒体240へのアクセスを制御するための、アクセス処理をスタートさせる。また、記憶制御部220は、ステップS805において、キャッシュ221に各処理に対応して配分されたパーティションの設定容量を削減および追加するための、設定容量制御処理をスタートさせる。また、記憶制御部220は、ステップS807において、キャッシュ221に各処理に対応して配分されたパーティションから解放可能な容量(ページ数)を算出するための、解放容量算出処理をスタートさせる。   In step S801, the storage control unit 220 performs initialization processing including processing of each table. In step S <b> 803, the storage control unit 220 starts an access process for controlling access to the storage medium 240 in the host computer 210. In step S805, the storage control unit 220 starts the set capacity control process for reducing and adding the set capacity of the partition allocated to the cache 221 corresponding to each process. In step S807, the storage control unit 220 starts a released capacity calculation process for calculating a capacity (number of pages) that can be released from the partition allocated to the cache 221 corresponding to each process.

記憶制御部220は、ステップS809において、記憶制御処理の終了か否かを判定する。そして、記憶制御処理の終了と判定すれば、処理を終了する。なお、図8においては、アクセス処理と、設定容量制御処理と、解放容量算出処理と、は独立に並行して実行されるとして説明したが、それぞれを関連付けてシーケンスに実行してもよい。   In step S809, the storage control unit 220 determines whether the storage control process is finished. If it is determined that the storage control process is finished, the process is finished. In FIG. 8, it has been described that the access process, the set capacity control process, and the released capacity calculation process are performed independently and in parallel, but they may be executed in association with each other.

(アクセス処理)
図9は、本実施形態におけるアクセス処理の手順を示したフローチャートである。本フローチャートにおいては、ホストコンピュータ210のソフトウェアからのアクセス要求の処理を行う手順である。
(Access processing)
FIG. 9 is a flowchart showing a procedure of access processing in the present embodiment. This flowchart is a procedure for processing an access request from the software of the host computer 210.

記憶制御部220のアクセス制御部301は、ステップS901において、ホストコンピュータ210のソフトウェアからのアクセス要求を受け取ると、キャッシュヒット/ミス判定部302に対してアクセス要求の情報を伝える。記憶制御部220のキャッシュヒット/ミス判定部302は、ステップS903において、ページ状態管理テーブル381を参照し、アドレス402がアクセス要求の記憶媒体240に対する格納先と一致するページが存在するか確認する。そして、キャッシュヒット/ミス判定部302は、ステップS905において、キャッシュヒットかキャッシュミスかによって分岐する。   When the access control unit 301 of the storage control unit 220 receives an access request from the software of the host computer 210 in step S <b> 901, the access control unit 301 notifies the cache hit / miss determination unit 302 of access request information. In step S903, the cache hit / miss determination unit 302 of the storage control unit 220 refers to the page state management table 381 and checks whether there is a page whose address 402 matches the storage destination of the access request storage medium 240. In step S905, the cache hit / miss determination unit 302 branches depending on whether a cache hit or a cache miss occurs.

アクセス要求の記憶媒体240に対する格納先に一致するデータを格納するページが存在する場合(ステップS905のYes判定)、ステップS907において、キャッシュヒット/ミス判定部302は、アクセス要求のアドレス、および、アクセスがReadまたはWriteのいずれであるかの情報を置換対象ページ選択部303に伝える。そして、ステップS907において、記憶制御部220の置換対象ページ選択部303は、キャッシュヒット時の処理を実行し、実行が完了した後はステップS911以降の処理を実行する。   When there is a page that stores data that matches the storage location of the access request storage medium 240 (Yes in step S905), in step S907, the cache hit / miss determination unit 302 determines the access request address and the access Is transmitted to the replacement target page selection unit 303 as to whether it is Read or Write. In step S907, the replacement target page selection unit 303 of the storage control unit 220 executes processing at the time of a cache hit, and executes processing from step S911 onward after the execution is completed.

アクセス要求の記憶媒体240に対する格納先に一致するデータを格納するページが存在しない場合(ステップS905のNo判定)、ステップS909において、キャッシュヒット/ミス判定部302は、アクセス要求のアドレス、および、アクセスがReadまたはWriteのいずれであるかの情報を置換対象ページ選択部303に伝える。そして、ステップS909において、置換対象ページ選択部303は、キャッシュミス時の処理を実行する。   If there is no page storing data matching the storage location of the access request storage medium 240 (No in step S905), in step S909, the cache hit / miss determination unit 302 determines the access request address and the access Is transmitted to the replacement target page selection unit 303 as to whether it is Read or Write. In step S909, the replacement target page selection unit 303 executes processing at the time of a cache miss.

ステップS907、または、ステップS909にて置換対象ページ選択部303から指示された、記憶媒体240、および/または、キャッシュ221に対するアクセスを完了すると、アクセス制御部301は、ステップS911において、ホストコンピュータ210のアクセス要求を行ったソフトウェアに結果を通知し、アクセス要求の処理を完了する。   When the access to the storage medium 240 and / or the cache 221 instructed from the replacement target page selection unit 303 in step S907 or step S909 is completed, the access control unit 301 in the host computer 210 in step S911. The result is notified to the software that made the access request, and the processing of the access request is completed.

(キャッシュヒット時のアクセス処理)
図10は、本実施形態におけるキャッシュヒット時のアクセス処理(S907)の手順を示したフローチャートである。なお、本実施形態ではキャッシュ置換アルゴリズムとしてLRUを想定するが、他の置換アルゴリズムを用いてもよい。
(Access processing at the time of cache hit)
FIG. 10 is a flowchart showing the procedure of the access process (S907) at the time of cache hit in this embodiment. In this embodiment, LRU is assumed as the cache replacement algorithm, but other replacement algorithms may be used.

記憶制御部220の置換対象ページ選択部303は、ステップS1001において、キャッシュヒットしたアドレスをページ状態管理テーブル381のアドレス402と比較して、キャッシュヒットしたアドレスと対応するページを特定する。置換対象ページ選択部303は、ステップS1003において、アクセス制御部301に対して、ステップS1001で特定したキャッシュ221のページにアクセス要求の実行を指示する。   In step S1001, the replacement target page selection unit 303 of the storage control unit 220 compares the cache hit address with the address 402 of the page state management table 381 to identify the page corresponding to the cache hit address. In step S1003, the replacement target page selection unit 303 instructs the access control unit 301 to execute an access request for the page of the cache 221 identified in step S1001.

置換対象ページ選択部303は、ステップS1005において、ページ状態管理テーブル381における、キャッシュヒットしたページの置換優先順位404を最低値に更新する。また、置換対象ページ選択部303は、ステップS1005において、ページに対応するアクセスフラグ405をセットし、不要候補フラグ406をリセットする。置換対象ページ選択部303は、ステップS1007において、キャッシュヒットしたページと同一のパーティションに含まれる他の各ページについて、ページ状態管理テーブル381のキャッシュヒットしたページの置換優先順位404を1増加させる。   In step S1005, the replacement target page selection unit 303 updates the replacement priority 404 of the cache hit page in the page state management table 381 to the lowest value. Further, the replacement target page selection unit 303 sets the access flag 405 corresponding to the page and resets the unnecessary candidate flag 406 in step S1005. In step S1007, the replacement target page selection unit 303 increments the replacement priority 404 of the cache hit page in the page state management table 381 by 1 for each of the other pages included in the same partition as the cache hit page.

置換対象ページ選択部303は、ステップS1009において、キャッシュヒットしたアクセスがReadであるかWriteであるかを判定する。キャッシュヒットしたアクセスがReadである場合(ステップS1009のYes判定)、置換対象ページ選択部303は、ステップ1011において、ページ状態管理テーブル381のキャッシュヒットしたページの更新フラグ407をリセットして処理を終了する。キャッシュヒットしたアクセスがWriteである場合(ステップS1009のNo判定)、置換対象ページ選択部303は、ステップS1013において、ページ状態管理テーブル381のキャッシュヒットしたページの更新フラグ407をセットして処理を終了する。   In step S1009, the replacement target page selection unit 303 determines whether the cache hit access is Read or Write. If the cache hit access is Read (Yes in step S1009), the replacement target page selection unit 303 resets the cache hit page update flag 407 of the page state management table 381 and ends the processing in step 1011. To do. When the cache hit access is Write (No determination in step S1009), the replacement target page selection unit 303 sets the cache hit page update flag 407 in the page state management table 381 in step S1013 and ends the process. To do.

以上のステップS1001からS1013までの処理を行い、図9のステップS907において、記憶制御部220の置換対象ページ選択部303がキャッシュヒット時の処理を行う動作が完了する。ステップS1001からS1013の処理順序は、必ずしも図10に示した順序である必要はない。例えば、ステップS1003からS1013の処理は同時期に実行、あるいは、順序を入れ替えた実行が可能である。また、ステップS1001において、ページ状態管理テーブル381のアドレス402と比較してキャッシュヒットしたアドレスと対応するページを特定する処理は、キャッシュヒット/ミス判定部302からキャッシュヒットの判定を行った際に特定されたページ情報を直接に受け取る処理であってもよい。さらに、ステップS1005およびステップS1007の置換優先順位404に対する処理は、置換優先順位404がリンクリスト形式で表される場合は、リンクリストにおけるキャッシュヒットしたページの位置を、置換の優先順位が最低となるように移動する操作によって実現する。   The above processing from step S1001 to S1013 is performed, and in step S907 in FIG. 9, the operation for the replacement target page selection unit 303 of the storage control unit 220 to perform processing at the time of a cache hit is completed. The processing order of steps S1001 to S1013 is not necessarily the order shown in FIG. For example, the processing of steps S1003 to S1013 can be executed at the same time or executed with the order changed. In step S 1001, the process for specifying the page corresponding to the address hit by the cache hit compared to the address 402 of the page state management table 381 is specified when the cache hit / miss determination unit 302 determines the cache hit. It may be a process of directly receiving the processed page information. Further, the processing for the replacement priority 404 in step S1005 and step S1007 is such that, when the replacement priority 404 is represented in a linked list format, the position of the cache hit page in the linked list is the lowest in the replacement priority. It is realized by the movement operation.

(キャッシュミス時のアクセス処理)
図11Aおよび図11Bは、本実施形態におけるキャッシュミス時のアクセス処理(S909)の手順を示したフローチャートである。
(Access processing at the time of cache miss)
FIG. 11A and FIG. 11B are flowcharts showing the procedure of the access processing (S909) at the time of a cache miss in this embodiment.

記憶制御部220の置換対象ページ選択部303は、ステップS1101において、パーティション容量設定テーブル371にアクセスし、キャッシュミスが発生したアクセス要求を行った処理に対応するパーティションの設定容量502と実容量504とを取得して比較する。置換対象ページ選択部303は、ステップS1103において、比較結果に対応して分岐する。   In step S1101, the replacement target page selection unit 303 of the storage control unit 220 accesses the partition capacity setting table 371 and sets the partition setting capacity 502 and the actual capacity 504 corresponding to the process that made the access request in which the cache miss occurred. Get and compare. The replacement target page selection unit 303 branches in accordance with the comparison result in step S1103.

比較の結果、パーティションの実容量504が設定容量502を下回る場合(ステップS1103のYes判定)、置換対象ページ選択部303は、ステップS1105において、パーティション容量設定テーブル371にアクセスし、実容量504が設定容量502を上回るパーティションを抽出する。置換対象ページ選択部303は、ステップS1107において、ステップS1105で抽出したパーティションから、キャッシュミスに伴う新規データの格納に必要なページを提供する任意のパーティションを1つ選択する。そして、置換対象ページ選択部303は、ステップS1109において、ページ状態管理テーブル381を参照して、ステップS1107で選択されたパーティションに含まれるページのうち、置換優先順位404が最も高いページをキャッシュミスに伴う新規データの格納先として選択して、ステップS1113以降の処理を実行する。   As a result of the comparison, if the actual capacity 504 of the partition is less than the set capacity 502 (Yes in step S1103), the replacement target page selection unit 303 accesses the partition capacity setting table 371 in step S1105, and the actual capacity 504 is set. Partitions exceeding capacity 502 are extracted. In step S1107, the replacement target page selection unit 303 selects one arbitrary partition that provides a page necessary for storing new data associated with a cache miss from the partitions extracted in step S1105. In step S1109, the replacement target page selection unit 303 refers to the page state management table 381 and selects a page having the highest replacement priority 404 among the pages included in the partition selected in step S1107 as a cache miss. It selects as a storage location of the accompanying new data, and executes the processing after step S1113.

ステップ1101での比較の結果、パーティションの実容量504が設定容量502以上である場合(ステップS1103のNo判定)、置換対象ページ選択部303は、ステップS1111において、ページ状態管理テーブル381を参照する。そして、置換対象ページ選択部303は、ステップS1111において、キャッシュミスが発生した処理に対応するパーティションに含まれるページのうち、置換優先順位404が最も高いページをキャッシュミスに伴う新規データの格納先として選択する。   As a result of the comparison in step 1101, if the actual capacity 504 of the partition is greater than or equal to the set capacity 502 (No determination in step S1103), the replacement target page selection unit 303 refers to the page state management table 381 in step S1111. In step S1111, the replacement target page selection unit 303 sets the page having the highest replacement priority 404 among the pages included in the partition corresponding to the process in which the cache miss has occurred as the storage destination of new data associated with the cache miss. select.

置換対象ページ選択部303は、ステップS1113において、アクセス制御部301に対して、キャッシュミスに伴う新規データの格納先として選択したページについて、ページ状態管理テーブル381の使用フラグ401および更新フラグ407を参照して、選択したページのデータを記憶媒体240に反映するべきか確認する。置換対象ページ選択部303は、ステップS1115において、記憶媒体240に反映するべきか否かにより分岐する。新規データの格納先として選択したページについて、使用フラグ401および更新フラグ407の少なくとも1つがセットされていない場合(ステップS1115のNo判定)、置換対象ページ選択部303は図11BのステップS1119以降の処理を実行する。   In step S1113, the replacement target page selection unit 303 refers to the access flag 401 and the update flag 407 of the page state management table 381 for the page selected as the storage destination of new data due to a cache miss to the access control unit 301. Then, it is confirmed whether the data of the selected page should be reflected on the storage medium 240. In step S1115, the replacement target page selection unit 303 branches depending on whether or not it should be reflected in the storage medium 240. When at least one of the use flag 401 and the update flag 407 is not set for the page selected as the storage destination of the new data (No determination in step S1115), the replacement target page selection unit 303 performs the processing after step S1119 in FIG. 11B. Execute.

一方、新規データの格納先として選択したページについて、使用フラグ401および更新フラグ407の両方がセットされている場合(ステップS1115のYes判定)、置換対象ページ選択部303は、ステップS1117において、ページ状態管理テーブル381のキャッシュミスしたページに対応するアドレス402を取得する。そして、アクセス制御部301に対して、キャッシュミスしたページに現在格納されているデータを、記憶媒体240のアドレス402が示す領域に対して書き込むように指示する。   On the other hand, when both the use flag 401 and the update flag 407 are set for the page selected as the storage destination of the new data (Yes determination in step S1115), the replacement target page selection unit 303 determines the page status in step S1117. The address 402 corresponding to the cache missed page in the management table 381 is acquired. Then, the access control unit 301 is instructed to write the data currently stored in the cache missed page into the area indicated by the address 402 of the storage medium 240.

置換対象ページ選択部303は、ステップS1119において、キャッシュミスしたアクセス要求がReadかWriteかを判定する。ホストコンピュータ210のソフトウェアからのアクセス要求がReadである場合(ステップS1119のYes判定)、置換対象ページ選択部303は、ステップS1121において、アクセス制御部301に対して、記憶媒体240に要求されたReadアクセスを実行する。そして、ステップS1109またはステップS1111で選択したキャッシュ221のページにRead結果を格納するように指示する。置換対象ページ選択部303は、ステップS1123において、ステップS1121で結果を格納したページについて、ページ状態管理テーブル381の更新フラグ407をリセットして、ステップS1129以降を実行する。   In step S1119, the replacement target page selection unit 303 determines whether the access request with a cache miss is Read or Write. When the access request from the software of the host computer 210 is Read (Yes in step S1119), the replacement target page selection unit 303 requests the storage medium 240 to read the access control unit 301 in step S1121. Perform access. Then, an instruction is given to store the read result in the page of the cache 221 selected in step S1109 or step S1111. In step S1123, the replacement target page selection unit 303 resets the update flag 407 of the page state management table 381 for the page in which the result is stored in step S1121, and executes step S1129 and the subsequent steps.

ホストコンピュータ210のソフトウェアからのアクセス要求がWriteである場合(ステップS1119のNo判定)、置換対象ページ選択部303は、ステップS1125において、アクセス制御部301に対して、Writeを要求されたデータを、ステップS1109またはステップS1111で選択した、キャッシュ221のページに格納するように指示する。置換対象ページ選択部303は、ステップS1127において、ステップS1125でWrite結果を格納したページについて、ページ状態管理テーブル381の、キャッシュヒットしたページの更新フラグ407をセットする。   When the access request from the software of the host computer 210 is Write (No determination in step S1119), the replacement target page selection unit 303 sends the data requested to be written to the access control unit 301 in step S1125. An instruction is given to store in the page of the cache 221 selected in step S1109 or step S1111. In step S1127, the replacement target page selection unit 303 sets the update flag 407 of the cache hit page in the page state management table 381 for the page in which the write result is stored in step S1125.

置換対象ページ選択部303は、ステップS1129において、ステップS1109またはステップS1111で選択したページについて、ページ状態管理テーブル381のパーティション番号403を、キャッシュミスが発生したアクセス要求を行った処理に対応するパーティションを表す番号で更新し、置換優先順位404を最低値に更新する。置換対象ページ選択部303は、ステップS1131において、ステップS1109またはステップS1111で選択したページについて、ページ状態管理テーブル381のアクセスフラグ405をセットし、不要候補フラグ406をリセットする。そして、置換対象ページ選択部303は、ステップS1133において、キャッシュミスが発生したアクセス要求を行った処理に対応するパーティションに含まれる他の各ページについて、ページ状態管理テーブル381の置換優先順位404を1増加させる。   In step S1129, the replacement target page selection unit 303 sets the partition number 403 of the page state management table 381 for the page selected in step S1109 or step S1111, and the partition corresponding to the process that performed the access request in which the cache miss occurred. The replacement priority 404 is updated to the lowest value. In step S1131, the replacement target page selection unit 303 sets the access flag 405 of the page status management table 381 and resets the unnecessary candidate flag 406 for the page selected in step S1109 or step S1111. In step S1133, the replacement target page selection unit 303 sets the replacement priority 404 of the page state management table 381 to 1 for each of the other pages included in the partition corresponding to the process that performed the access request in which the cache miss occurred. increase.

置換対象ページ選択部303は、ステップS1135において、容量追加判定部305に、新規データの格納先となったページに直前まで格納されていたデータのアドレスを伝えて、対応するパーティションの置換履歴610〜630に新たな置換アドレス611〜631として設定する。   In step S1135, the replacement target page selection unit 303 notifies the capacity addition determination unit 305 of the address of the data stored immediately before in the page where the new data is stored, and replaces the corresponding partition replacement history 610-610. In 630, new replacement addresses 611 to 631 are set.

置換対象ページ選択部303は、ステップS1137において、ステップS1101での比較の結果に基づいて分岐する。パーティションの実容量504が設定容量502以上であった場合(ステップS1137のYes判定)、処理を終了する。一方、パーティションの実容量504が設定容量502を下回っていた場合(ステップS1137のNo判定)、置換対象ページ選択部303は、ステップS1139において、パーティション容量設定テーブル371にアクセスする。次に、キャッシュミスが発生したアクセス要求を行った処理に対応するパーティションの実容量504に1を加算する。そして、ステップS1109またはステップS1111で選択したページが含まれていたパーティションの実容量504から1を減算して、処理を終了する。   In step S1137, the replacement target page selection unit 303 branches based on the comparison result in step S1101. If the actual capacity 504 of the partition is greater than or equal to the set capacity 502 (Yes determination in step S1137), the process ends. On the other hand, if the actual capacity 504 of the partition is less than the set capacity 502 (No determination in step S1137), the replacement target page selection unit 303 accesses the partition capacity setting table 371 in step S1139. Next, 1 is added to the actual capacity 504 of the partition corresponding to the process that performed the access request in which the cache miss occurred. Then, 1 is subtracted from the actual capacity 504 of the partition in which the page selected in step S1109 or step S1111 was included, and the process ends.

以上のステップS1101からS1139までの処理を行い、図9のステップS909において、置換対象ページ選択部303がキャッシュミス時の処理を行う動作が完了する。ステップS1101からS1139の処理順序は、必ずしも図11Aおよび図11Bに示した順序である必要はない。例えば、ステップS1129からS1139の処理は同時期に実行、あるいは、順序を入れ替えた実行が可能である。また、ステップS1107においてキャッシュミスに伴う新規データの格納に必要なページを提供するパーティションを、例えば、ページ状態管理テーブル381を参照して各パーティションの置換優先順位404が最も高いページについて不要候補フラグ406を調べる。そして、不要候補フラグ406がセットされているパーティションを優先的に選択するようにしてもよい。   The above processing from step S1101 to S1139 is performed, and in step S909 in FIG. 9, the operation for the replacement target page selection unit 303 to perform processing at the time of cache miss is completed. The processing order of steps S1101 to S1139 is not necessarily the order shown in FIGS. 11A and 11B. For example, the processing of steps S1129 to S1139 can be executed at the same time, or can be executed with the order changed. Further, in step S1107, an unnecessary candidate flag 406 for a partition that provides a page necessary for storing new data due to a cache miss, for example, a page having the highest replacement priority 404 of each partition with reference to the page state management table 381. Check out. Then, a partition in which the unnecessary candidate flag 406 is set may be preferentially selected.

(設定容量調整処理)
図12は、本実施形態におけるパーティションの設定容量調整処理の手順を示したフローチャートである。本フローチャートにおいては、容量追加判定部305がパーティションの容量追加の必要性を判定し、追加容量取得元選択部306によって容量追加が必要なパーティションに対して容量を提供するパーティションを決定して、パーティションの設定容量を調整する。
(Set capacity adjustment processing)
FIG. 12 is a flowchart showing the procedure of the set capacity adjustment processing of the partition in this embodiment. In this flowchart, the capacity addition determination unit 305 determines the necessity of adding a partition capacity, the additional capacity acquisition source selection unit 306 determines a partition that provides capacity to the partition that needs capacity addition, and the partition Adjust the set capacity.

記憶制御部220の容量追加判定部305は、置換対象ページ選択部303からキャッシュミスとなったアクセス要求のアドレスを受け取る。すると、ステップS1201において、置換履歴管理部304が有する置換ページ履歴テーブル341の、アクセス要求を行った処理に対応するパーティションの置換履歴610〜630に、アクセス要求のアドレスと一致する置換アドレス611〜631が含まれているかを判定する。   The capacity addition determination unit 305 of the storage control unit 220 receives the address of the access request that caused the cache miss from the replacement target page selection unit 303. In step S1201, the replacement history 610 to 630 of the partition corresponding to the process that made the access request in the replacement page history table 341 of the replacement history management unit 304 is replaced with replacement addresses 611 to 631 that match the access request address. Is included.

容量追加判定部305は、ステップS1203において、アクセス要求のアドレスと一致する置換アドレス611〜631が含まれているか否かで分岐する。キャッシュミスとなったアドレスが処理に対応するパーティションの置換履歴610〜630に含まれていなかった場合(ステップS1203のNo判定)、処理を終了する。   In step S1203, the capacity addition determination unit 305 branches depending on whether replacement addresses 611 to 631 that match the address of the access request are included. If the cache miss address is not included in the replacement history 610 to 630 of the partition corresponding to the process (No determination in step S1203), the process ends.

キャッシュミスとなったアドレスが処理に対応するパーティションの置換履歴610〜630に含まれている場合(ステップS1203のYes判定)は、容量追加判定部305は、ステップS1205において、追加容量取得元選択部306に対してキャッシュミスが発生したアクセス要求を行ったパーティションへの1ページ分の容量の追加指示を行う。記憶制御部220の追加容量取得元選択部306は、ステップS1207において、パーティション容量設定テーブル371の各パーティションに関する解放可能容量503を参照し、解放可能な容量を持つパーティションを抽出する。   When the cache miss address is included in the replacement history 610 to 630 of the partition corresponding to the process (Yes determination in step S1203), the capacity addition determination unit 305, in step S1205, adds the additional capacity acquisition source selection unit. An instruction to add capacity for one page to the partition that issued the access request in which a cache miss has occurred is issued to 306. In step S1207, the additional capacity acquisition source selection unit 306 of the storage control unit 220 refers to the releasable capacity 503 for each partition in the partition capacity setting table 371 and extracts a partition having a releasable capacity.

追加容量取得元選択部306は、ステップS1209において、解放可能な容量を持つパーティションが抽出されたか否かで分岐する。抽出されたパーティションが無い場合(ステップS1209のNo判定)、追加容量取得元選択部306は、容量追加判定部305が指示したパーティションへの容量追加を行わずに処理を終了する。   In step S1209, the additional capacity acquisition source selection unit 306 branches depending on whether or not a partition having a releasable capacity has been extracted. If there is no extracted partition (No determination in step S1209), the additional capacity acquisition source selection unit 306 ends the process without adding the capacity to the partition instructed by the capacity addition determination unit 305.

抽出されたパーティションが有る場合(ステップS1209のYes判定)、追加容量取得元選択部306は、ステップS1211において、抽出したパーティションの中から、容量追加指示が行われたパーティションに1ページ分の容量を提供する任意のパーティションを1つ選択する。そして、追加容量取得元選択部306は、ステップS1211において、パーティション容量設定テーブル371における選択されたパーティションの設定容量502および解放可能容量503を1ページ分ずつ減算する。また、追加容量取得元選択部306は、ステップS1213において、パーティション容量設定テーブル371における、容量追加判定部305から容量の追加指示が行われたパーティションの設定容量502を1ページ分加算して処理を終了する。   If there is an extracted partition (Yes in step S1209), the additional capacity acquisition source selection unit 306, in step S1211, sets the capacity for one page to the partition for which capacity addition is instructed from the extracted partitions. Select one of the partitions to provide. In step S1211, the additional capacity acquisition source selection unit 306 subtracts the set capacity 502 and the releasable capacity 503 of the selected partition in the partition capacity setting table 371 by one page. In step S1213, the additional capacity acquisition source selection unit 306 adds one page of the set capacity 502 of the partition for which the capacity addition determination unit 305 has been instructed to add capacity in the partition capacity setting table 371. finish.

以上のステップS1201からS1213までの処理を行い、容量追加判定部305がパーティションの容量追加の必要性を判定し、追加容量取得元選択部306によって容量追加が必要な前記パーティションに対して容量を提供するパーティションを決定して、パーティションの設定容量を調整する動作を完了する。ステップS1201からS1213までの処理順序は、必ずしも図12に示した手順である必要はない。例えば、ステップS1211とS1213の処理は同時期に実行、あるいは、順序を入れ替えた実行が可能である。また、ステップS1211において容量を提供するパーティションを、例えば、パーティション容量設定テーブル371を参照して解放可能容量503が最も多いパーティションから選択するようにしてもよい。   The processing from the above steps S1201 to S1213 is performed, the capacity addition determination unit 305 determines the necessity of adding the capacity of the partition, and the additional capacity acquisition source selection unit 306 provides the capacity to the partition that needs the capacity addition. Determine the partition to be completed, and complete the operation to adjust the set capacity of the partition. The processing order from steps S1201 to S1213 is not necessarily the procedure shown in FIG. For example, the processes in steps S1211 and S1213 can be executed at the same time or executed in a different order. Further, in step S1211, the partition providing the capacity may be selected from the partition having the largest releasable capacity 503 with reference to the partition capacity setting table 371, for example.

なお、前述したように、パーティションの設定容量の調整が1ページ単位でなく複数ページ単位で行なわれてもよい。   As described above, the setting capacity of the partition may be adjusted not in units of one page but in units of a plurality of pages.

(解放可能容量算出処理)
図13は、本実施形態におけるパーティションの解放可能容量算出処理の手順を示したフローチャートである。本フローチャートにおいては、不要ページ容量解放部309がキャッシュ上に定義された各パーティションに含まれるページから、ワーキングセットに含まれていないと推測されるページを抽出し、各パーティションの解放可能容量503を更新する。
(Releasable capacity calculation processing)
FIG. 13 is a flowchart showing the procedure of partition releasable capacity calculation processing in the present embodiment. In this flowchart, an unnecessary page capacity releasing unit 309 extracts pages estimated to be not included in the working set from pages included in each partition defined on the cache, and sets the releasable capacity 503 of each partition. Update.

記憶制御部220の不要ページ容量解放部309は、ステップS1301において、ページ状態管理テーブル381の最初のエントリに着目する。   The unnecessary page capacity releasing unit 309 of the storage control unit 220 pays attention to the first entry of the page state management table 381 in step S1301.

不要ページ容量解放部309は、ステップS1303において、着目中のエントリにおけるアクセスフラグ405および不要候補フラグ406を参照する。そして、不要ページ容量解放部309は、ステップS1305において、アクセスフラグ405がセットされているか否かを判定する。   In step S1303, the unnecessary page capacity releasing unit 309 refers to the access flag 405 and the unnecessary candidate flag 406 in the entry of interest. Then, the unnecessary page capacity releasing unit 309 determines whether or not the access flag 405 is set in step S1305.

アクセスフラグ405がセットされていた場合(ステップS1305のYes判定)、不要ページ容量解放部309は、ステップS1307において、着目中のエントリのアクセスフラグ405をリセットして、ステップS1315以降の処理を実行する。一方、アクセスフラグ405がセットされていない場合(ステップS1305のNo判定)、不要ページ容量解放部309は、ステップS1309において、不要候補フラグ406がセットされているか否かを判定する。   If the access flag 405 has been set (Yes in step S1305), the unnecessary page capacity releasing unit 309 resets the access flag 405 of the entry of interest in step S1307, and executes the processing from step S1315 onward. . On the other hand, when the access flag 405 is not set (No determination in step S1305), the unnecessary page capacity releasing unit 309 determines whether or not the unnecessary candidate flag 406 is set in step S1309.

不要候補フラグ406がセットされている場合(ステップS1309のYes判定)は、ステップS1315以降の処理を実行する。不要候補フラグ406がセットされていない場合(ステップS1309のNo判定)、不要ページ容量解放部309は、ステップS1311において、着目中のエントリの不要候補フラグ406をセットする。そして、不要ページ容量解放部309は、ステップS1313において、パーティション容量設定テーブル371の、着目中のエントリに対応するページが含まれるパーティションの解放可能容量503に1ページ分の容量を加算する。   When the unnecessary candidate flag 406 is set (Yes determination in step S1309), the processing after step S1315 is executed. If the unnecessary candidate flag 406 is not set (No determination in step S1309), the unnecessary page capacity releasing unit 309 sets the unnecessary candidate flag 406 of the entry of interest in step S1311. In step S1313, the unnecessary page capacity releasing unit 309 adds the capacity of one page to the releasable capacity 503 of the partition including the page corresponding to the entry of interest in the partition capacity setting table 371.

不要ページ容量解放部309は、ステップS1315において、着目中のエントリがページ状態管理テーブル381の末尾のエントリか否かを判定する。現在着目中のエントリがページ状態管理テーブル381の最後のエントリである場合(ステップS1315のYes判定)、ステップS1301に戻って処理を繰り返す。現在着目中のエントリがページ状態管理テーブル381の最後のエントリではない場合(ステップS1317のNo判定)、不要ページ容量解放部309は、ステップS1317において、着目中のエントリをページ状態管理テーブル381における次のエントリに変更して、ステップS1303に戻り処理を繰り返す。   In step S <b> 1315, the unnecessary page capacity releasing unit 309 determines whether the entry under attention is the last entry in the page state management table 381. If the currently focused entry is the last entry in the page state management table 381 (Yes in step S1315), the process returns to step S1301 to repeat the process. When the currently focused entry is not the last entry in the page state management table 381 (No determination in step S1317), the unnecessary page capacity releasing unit 309 determines that the focused entry is the next entry in the page state management table 381 in step S1317. And return to step S1303 to repeat the process.

以上のステップS1301からS1317までの処理を行い、不要ページ容量解放部309がキャッシュ上に定義された各パーティションに含まれるページから、ワーキングセットに含まれていないと推測されるページを抽出し、各パーティションの解放可能容量503を更新する動作を実行する。ステップS1301からS1317までの処理順序は、必ずしも図13に示した順序である必要はない。例えば、ステップS1311とS1313の各処理は同時期に実行、あるいは、順序を入れ替えた実行が可能である。また、ステップS1301からS1317までのページ状態管理テーブル381の各エントリに対して処理を順番に行っていく手順は、任意の順序で各エントリに着目する手順であってもよい。加えて、各エントリに対応するページがワーキングセットに含まれない、長期間アクセスされていないページであると判定する方法として、アクセスフラグ405がセットされているかを確認する代わりに、例えば、各ページに対応するページ状態管理テーブル381のエントリに、各ページの最終アクセス時刻を記録する。そして、現在時刻と比較して一定の時間が経過している場合にワーキングセットに含まれないページと判断して不要候補フラグ406をセットする手順であってもよい。   The processing from the above steps S1301 to S1317 is performed, and the unnecessary page capacity release unit 309 extracts pages estimated to be not included in the working set from the pages included in each partition defined on the cache. An operation of updating the releasable capacity 503 of the partition is executed. The processing order from step S1301 to S1317 is not necessarily the order shown in FIG. For example, the processes in steps S1311 and S1313 can be executed at the same time, or can be executed with the order changed. Further, the procedure for sequentially performing the processing on each entry in the page state management table 381 from steps S1301 to S1317 may be a procedure for paying attention to each entry in an arbitrary order. In addition, as a method of determining that the page corresponding to each entry is not included in the working set and has not been accessed for a long period of time, instead of checking whether the access flag 405 is set, for example, each page The last access time of each page is recorded in the entry of the page state management table 381 corresponding to. Then, it may be a procedure for setting the unnecessary candidate flag 406 by determining that the page is not included in the working set when a certain time has elapsed from the current time.

本実施形態によれば、各処理に対応したキャッシュのパーティションに割り当てるべき容量を測定することなしに処理中に適正化し、記憶媒体に対するアクセス性能を高めることができる。   According to the present embodiment, it is possible to optimize during processing without measuring the capacity to be allocated to the cache partition corresponding to each processing, and to improve the access performance to the storage medium.

すなわち、キャッシュを通した記憶媒体に対するアクセスの情報を基に、パーティションの容量削減の可否を判断し、各パーティションの容量追加が必要な場合に削減可能なパーティションのいずれかから容量を移動する処理を繰り返す。これにより、各処理に対応したキャッシュのパーティションに割り当てるべき容量を直接測定せずに、各パーティションに割り当てる容量の最適化を実現し、ホストコンピュータで実行される処理全体の、記憶媒体に対するアクセス性能を高めることが可能である。   In other words, based on the access information to the storage medium through the cache, it is determined whether or not the capacity of the partition can be reduced. repeat. As a result, the capacity to be allocated to each partition is optimized without directly measuring the capacity to be allocated to the cache partition corresponding to each process, and the access performance to the storage medium of the entire process executed by the host computer is realized. It is possible to increase.

具体的には、検出されたページを直接置換対象とはせずにパーティションから解放可能な容量のみを計算しておき、実際に他のパーティションにおいて容量が不足した際に改めて置換するページを決定する。この動作により、本実施形態と任意のキャッシュ置換アルゴリズムの組み合わせも実現可能になる。加えて、各パーティションの容量の割り当てに変更が必要になるまでページの置換を遅らせることで、不要なページの誤検出に伴うキャッシュミスの発生を低減することが可能である。   Specifically, the detected page is not directly replaced, but only the capacity that can be released from the partition is calculated, and the page to be replaced when the capacity is actually insufficient in another partition is determined. . By this operation, a combination of this embodiment and an arbitrary cache replacement algorithm can be realized. In addition, it is possible to reduce the occurrence of cache misses due to erroneous detection of unnecessary pages by delaying page replacement until it is necessary to change the capacity allocation of each partition.

[第3実施形態]
次に、本発明の第3実施形態に係る記憶制御装置について説明する。本実施形態に係る記憶制御装置は、上記第2実施形態と比べると、不要ページ容量解放部309におけるページ巡回周期(巡回速度)を調整する機能を有する点で異なる。本実施形態において、不要ページ検出は、不要なページを検出する周期を調整する検出周期調整機能を含む、その他の構成および動作は、第2実施形態と同様であるため、同じ構成および動作については同じ符号を付してその詳しい説明を省略する。
[Third Embodiment]
Next, a storage control apparatus according to the third embodiment of the present invention will be described. The storage control device according to the present embodiment is different from the second embodiment in that it has a function of adjusting the page cycle period (cyclic rate) in the unnecessary page capacity releasing unit 309. In the present embodiment, unnecessary page detection includes a detection cycle adjustment function that adjusts a cycle for detecting an unnecessary page. Since other configurations and operations are the same as those in the second embodiment, the same configurations and operations are used. The same reference numerals are assigned and detailed description thereof is omitted.

《記憶制御装置の機能構成》
図14は、本実施形態に係る記憶制御装置としての記憶制御部1420の機能構成を示すブロック図である。なお、図14において、図3と同様の機能構成部には同じ参照番号を付して、重複する説明は省略する。
<< Functional configuration of storage controller >>
FIG. 14 is a block diagram illustrating a functional configuration of the storage control unit 1420 as the storage control device according to the present embodiment. In FIG. 14, the same functional components as those in FIG. 3 are denoted by the same reference numerals, and redundant description is omitted.

図14を参照すると、図3で表される第2実施形態と比較して、新たにページ巡回速度調整部1410を備える。   Referring to FIG. 14, a page patrol speed adjustment unit 1410 is newly provided as compared with the second embodiment shown in FIG. 3.

ページ巡回速度調整部1410は、不要ページ容量解放部309がページ状態管理テーブル381の各エントリを参照して、エントリに対応するページがワーキングセットに含まれているか判定する処理の速度を指示する。処理の速度は、各ページがワーキングセットに含まれるか判定する閾値に関係しており、速度を速く設定することで各エントリが一度巡回されてから再度巡回されるまでの時間が短くなり、ワーキングセットに含まれると判定されるページのアクセス頻度は高くなる。つまり、不要ページ容量解放部309によって積極的にワーキングセットに含まれない、不要である可能性の高いページが抽出される。逆に、処理速度を遅く設定することで、各エントリが再度巡回されるまでの時間が長くなり、不要ページ容量解放部309による不要なページの抽出が、より厳密に行われるように設定可能である。   The page circulation speed adjustment unit 1410 instructs the speed of processing in which the unnecessary page capacity release unit 309 refers to each entry in the page state management table 381 to determine whether a page corresponding to the entry is included in the working set. The processing speed is related to the threshold value for determining whether each page is included in the working set. Setting the speed faster shortens the time it takes for each entry to go around once and go around again. The access frequency of pages determined to be included in the set is increased. That is, the unnecessary page capacity releasing unit 309 extracts pages that are not actively included in the working set and that are likely to be unnecessary. Conversely, by setting the processing speed slower, the time until each entry is recirculated becomes longer, and the unnecessary page capacity releasing unit 309 can be set so that unnecessary pages are extracted more strictly. is there.

ページ巡回速度調整部1410による、不要ページ容量解放部309に対する処理速度の指示は、次の場合に用いることが可能である。例えば、キャッシュ内で定義されるパーティションにおいて解放可能容量503が不足しており、容量追加判定部305によるパーティションの容量追加の指示を満たせない場合に、処理速度を速くして不要ページを積極的に抽出し、解放可能容量503の不足を解消することができる。   The instruction of the processing speed to the unnecessary page capacity releasing unit 309 by the page circulation speed adjusting unit 1410 can be used in the following case. For example, when the releasable capacity 503 is insufficient in the partition defined in the cache, and the capacity addition determining unit 305 cannot satisfy the instruction for adding the capacity of the partition, the processing speed is increased and the unnecessary pages are actively added. Extraction can solve the shortage of the releasable capacity 503.

本実施形態によれば、さらに、キャッシュの容量やアクセス頻度などを考慮して、不要ページ容量解放部309による不要なページの抽出の頻度と厳密性との調整をすることができる。   According to the present embodiment, it is possible to further adjust the frequency and strictness of the unnecessary page extraction by the unnecessary page capacity releasing unit 309 in consideration of the cache capacity and the access frequency.

[第4実施形態]
次に、本発明の第4実施形態に係る記憶制御装置について説明する。本実施形態に係る記憶制御装置は、上記第2実施形態および第3実施形態と比べると、不要ページ容量解放部309におけるページ巡回周期(巡回速度)を調整するためのワーキングセットの検出時間を測定する機能を有する点で異なる。本実施形態においては、キャッシュメモリへのアクセスにおいて発生したキャッシュヒットを、アクセスの対象であるパーティションに関連付けて検出するキャッシュヒット検出機能と、キャッシュヒットの検出結果から、パーティションに対するアクセス頻度の高いページの検出に要する時間を測定する検出時間測定機能とを備える。そして、測定された時間に基づいて、不要ページの検出周期を調整する。その他の構成および動作は、第2実施形態と同様であるため、同じ構成および動作については同じ符号を付してその詳しい説明を省略する。
[Fourth Embodiment]
Next, a storage control apparatus according to the fourth embodiment of the present invention will be described. The storage control device according to the present embodiment measures the detection time of the working set for adjusting the page cycle period (cyclic rate) in the unnecessary page capacity release unit 309, compared with the second embodiment and the third embodiment. It differs in that it has the function to do. In the present embodiment, a cache hit detection function that detects a cache hit that occurs in access to the cache memory in association with the partition to be accessed, and a page that is frequently accessed to the partition based on the detection result of the cache hit. A detection time measuring function for measuring the time required for detection. Then, the unnecessary page detection cycle is adjusted based on the measured time. Since other configurations and operations are the same as those of the second embodiment, the same configurations and operations are denoted by the same reference numerals, and detailed description thereof is omitted.

《記憶制御装置の機能構成》
図15は、本実施形態に係る記憶制御装置としての記憶制御部1520の機能構成を示すブロック図である。なお、図15において、図3または図14と同様の機能構成部には同じ参照番号を付して、重複する説明は省略する。
<< Functional configuration of storage controller >>
FIG. 15 is a block diagram illustrating a functional configuration of the storage control unit 1520 as the storage control device according to the present embodiment. In FIG. 15, the same functional components as those in FIG. 3 or FIG. 14 are denoted by the same reference numerals, and redundant description is omitted.

図15を参照すると、図14で表される第3実施形態と比較して、新たにワーキングセット検出時間測定部1511を備える。   Referring to FIG. 15, a working set detection time measurement unit 1511 is newly provided as compared with the third embodiment shown in FIG.

ワーキングセット検出時間測定部1511は、キャッシュヒット/ミス判定部302から各アクセス要求のキャッシュヒットまたはキャッシュミスの判定結果を取得し、一定時間あたりのキャッシュヒット率を算出する。また、ワーキングセット検出時間測定部1511は、容量追加判定部305からパーティションの容量追加が必要と判定されたキャッシュミスの頻度を取得し、キャッシュミスが全アクセスにおいて発生している割合を算出する。加えて、ワーキングセット検出時間測定部1511は、算出したキャッシュヒット率と、パーティションの容量追加が必要と判定されたキャッシュミスの割合を比較して、パーティションの容量追加が必要と判定されたキャッシュミスの割合がキャッシュヒット率に比べて一定以上となるまでに要する時間を測定する。そして、ワーキングセット検出時間測定部1511は、不要ページ容量解放部309が各ページに対応するページ状態管理テーブル381のエントリを巡回する時間間隔が、測定結果の時間となるようにページ巡回速度調整部1410を通して速度を調整する。   The working set detection time measurement unit 1511 obtains the cache hit or cache miss determination result of each access request from the cache hit / miss determination unit 302 and calculates the cache hit rate per fixed time. Further, the working set detection time measurement unit 1511 obtains the frequency of cache misses for which it is determined from the capacity addition determination unit 305 that the capacity addition of the partition is necessary, and calculates the rate at which cache misses occur in all accesses. In addition, the working set detection time measurement unit 1511 compares the calculated cache hit rate with the ratio of cache misses determined to require the addition of the partition capacity, and determines the cache misses determined to require the addition of the partition capacity. Measure the time required for the ratio to reach a certain level compared to the cache hit rate. Then, the working set detection time measurement unit 1511 includes a page rotation speed adjustment unit so that the time interval for which the unnecessary page capacity release unit 309 cycles through the entries in the page state management table 381 corresponding to each page becomes the measurement result time. Adjust speed through 1410.

《処理速度調整処理》
図16は、本発明の第4実施形態における処理速度調整処理の手順を示したフローチャートである。本フローチャートは、不要ページ容量解放部309の処理速度を、ページ巡回速度調整部1410を通して最適に維持する。
<Processing speed adjustment processing>
FIG. 16 is a flowchart showing a procedure of processing speed adjustment processing in the fourth embodiment of the present invention. In this flowchart, the processing speed of the unnecessary page capacity releasing unit 309 is optimally maintained through the page circulation speed adjusting unit 1410.

記憶制御部220のワーキングセット検出時間測定部1511は、ステップS1601において、キャッシュヒット数、キャッシュミス数、および、パーティションの容量追加が必要と判定されたキャッシュミス数を計測するカウンタを0(ゼロ)にリセットする。ワーキングセット検出時間測定部1511は、ステップS1603において、事前に定められた一定の時間が経過するまで、キャッシュヒット/ミス判定部302から全てのアクセス要求のキャッシュヒット、キャッシュミスの判定結果を取得し、その頻度をカウンタで計測する。同様に、ワーキングセット検出時間測定部1511は、ステップS1603において、容量追加判定部305からパーティションの容量追加が必要と判定された全てのキャッシュミスの情報を取得して、その頻度をカウンタで計測する。   In step S1601, the working set detection time measurement unit 1511 of the storage control unit 220 sets a counter that measures the number of cache hits, the number of cache misses, and the number of cache misses determined to require additional partition capacity to 0 (zero). Reset to. In step S1603, the working set detection time measurement unit 1511 acquires the cache hit / cache miss determination results of all access requests from the cache hit / miss determination unit 302 until a predetermined time has elapsed. The frequency is measured with a counter. Similarly, in step S1603, the working set detection time measurement unit 1511 acquires information on all cache misses determined to require the addition of a partition capacity from the capacity addition determination unit 305, and measures the frequency using a counter. .

ワーキングセット検出時間測定部1511は、ステップS1605において、ステップS1603で計測したキャッシュヒット、キャッシュミスの頻度からキャッシュヒット率aを算出する。また、ワーキングセット検出時間測定部1511は、ステップS1607において、ステップS1603で計測した、パーティションの容量追加が必要と判定されたキャッシュミス数が、全アクセス要求に占める割合bを算出する。   In step S1605, the working set detection time measurement unit 1511 calculates the cache hit rate a from the cache hit and cache miss frequencies measured in step S1603. In step S1607, the working set detection time measurement unit 1511 calculates the ratio b of the number of cache misses determined in step S1603 that is determined to require additional partition capacity to the total access requests.

ワーキングセット検出時間測定部1511は、ステップS1609において、全アクセス要求に占める割合bが、キャッシュヒット率aと比べて一定の割合を上回るか否かを判定する。全アクセス要求に占める割合bが、キャッシュヒット率aと比べて一定の割合を上回る場合(ステップS1609のYes判定)、ワーキングセット検出時間測定部1511は、キャッシュにおけるワーキングセットの検出が不十分であると判断して、ステップS1601からの処理を再実行する。   In step S1609, the working set detection time measurement unit 1511 determines whether the ratio b of all access requests exceeds a certain ratio as compared to the cache hit ratio a. When the ratio b of all access requests exceeds a certain ratio as compared to the cache hit ratio a (Yes in step S1609), the working set detection time measurement unit 1511 has insufficient detection of the working set in the cache. And the processing from step S1601 is re-executed.

全アクセス要求に占める割合bが、キャッシュヒット率aと比べて一定の割合以下である場合(ステップS1609のNo判定)、ワーキングセット検出時間測定部1511は、ステップS1611において、キャッシュにおけるワーキングセットの検出が十分に行われていると判断して、最初にステップS1601の処理を開始してからの経過時間を算出する。   When the ratio b in the total access requests is equal to or less than a certain ratio compared to the cache hit ratio a (No in step S1609), the working set detection time measurement unit 1511 detects the working set in the cache in step S1611. Is calculated, and the elapsed time from the start of the process of step S1601 is calculated.

ワーキングセット検出時間測定部1511は、ステップS1613において、不要ページ容量解放部309がキャッシュに含まれるページに対応する、ページ状態管理テーブル381の全エントリを巡回する時間が、ステップS1611で算出した時間と等しくなるようなページ巡回速度を計算する。具体的には、ページ状態管理テーブル381のエントリ数をステップS1611において算出した時間で割ることで、一定時間あたりに巡回するべきページ状態管理テーブル381のエントリ数が算出される。   In step S1613, the working set detection time measurement unit 1511 determines that the time required for the unnecessary page capacity release unit 309 to go through all the entries in the page state management table 381 corresponding to the pages included in the cache is the time calculated in step S1611. Calculate page patrol speed to be equal. Specifically, the number of entries in the page state management table 381 to be circulated per certain time is calculated by dividing the number of entries in the page state management table 381 by the time calculated in step S1611.

ワーキングセット検出時間測定部1511は、ステップS1615において、ページ巡回速度調整部1410に対して、ステップS1613で算出されたエントリ数を不要ページ容量解放部309の処理速度として設定して処理を終了する。   In step S <b> 1615, the working set detection time measuring unit 1511 sets the number of entries calculated in step S <b> 1613 as the processing speed of the unnecessary page capacity releasing unit 309 and ends the processing.

以上のステップS1601からS1615までの処理を行い、不要ページ容量解放部309の処理速度を、ページ巡回速度調整部1410を通して最適に維持する動作を完了する。ステップS1601からS1615までの処理順序は、必ずしも図16に示した順序である必要はない。例えば、ステップS1605とS1607の各処理は同時期に実行、あるいは、順序を入れ替えた実行が可能である。   The processes from step S1601 to S1615 are performed, and the operation of maintaining the processing speed of the unnecessary page capacity releasing unit 309 optimally through the page circulation speed adjusting unit 1410 is completed. The processing order from steps S1601 to S1615 is not necessarily the order shown in FIG. For example, the processes in steps S1605 and S1607 can be executed at the same time, or can be executed with the order changed.

本実施形態によれば、実際の動作におけるキャッシュヒットの状況を参照して、ページ巡回速度を調整するので、キャッシュおよび記憶媒体の使用状況に応じた適正化ができ、記憶媒体に対するアクセス性能をより高めることができる。   According to the present embodiment, since the page patrol speed is adjusted by referring to the status of the cache hit in the actual operation, it can be optimized according to the usage status of the cache and the storage medium, and the access performance to the storage medium is further Can be increased.

[第5実施形態]
次に、本発明の第5実施形態に係る記憶制御装置について説明する。本実施形態に係る記憶制御装置は、上記第2実施形態乃至第4実施形態と比べると、記憶制御装置としての記憶制御部がホストコンピュータ内ではなく、ネットワークを介した外部に独立して、あるいは、記憶媒体に含まれる点で異なる。その他の構成および動作は、第2実施形態と同様であるため、同じ構成および動作については同じ符号を付してその詳しい説明を省略する。
[Fifth Embodiment]
Next, a storage control apparatus according to the fifth embodiment of the present invention will be described. The storage control device according to this embodiment is different from the second to fourth embodiments in that the storage control unit as the storage control device is not in the host computer, but outside the network, or However, they are different in that they are included in the storage medium. Since other configurations and operations are the same as those of the second embodiment, the same configurations and operations are denoted by the same reference numerals, and detailed description thereof is omitted.

《情報処理システム》
図17は、本実施形態に係る記憶制御装置としての記憶制御部1720、1742を含む情報処理システム1700の構成を示すブロック図である。なお、図17において、図2と同様の構成要素には同じ参照番号を付して、重複する説明は省略する。
《Information processing system》
FIG. 17 is a block diagram illustrating a configuration of an information processing system 1700 including storage control units 1720 and 1742 as storage control devices according to the present embodiment. In FIG. 17, the same components as those in FIG.

情報処理システム1700は、記憶制御部を有しないホストコンピュータ1710と、キャッシュ221を有する独立した記憶制御部1720と、キャッシュ221を有する記憶制御部1742を含む記憶媒体1740と、がネットワーク250を介して接続されている。   In the information processing system 1700, a host computer 1710 having no storage control unit, an independent storage control unit 1720 having a cache 221, and a storage medium 1740 including a storage control unit 1742 having a cache 221 are connected via a network 250. It is connected.

本実施形態によれば、第2乃至第4実施形態のようにホストコンピュータによる処理に限定されず、キャッシュをホストコンピュータ外で制御することで、ホストコンピュータの負荷を減らし記憶媒体へのアクセス性能の向上を図ることができる。   According to the present embodiment, the processing is not limited to processing by the host computer as in the second to fourth embodiments, and the cache is controlled outside the host computer, thereby reducing the load on the host computer and improving the access performance to the storage medium. Improvements can be made.

[他の実施形態]
以上、実施形態を参照して本発明を説明したが、本発明は上記実施形態に限定されるものではない。本発明の構成や詳細には、本発明のスコープ内で当業者が理解し得る様々な変更をすることができる。また、それぞれの実施形態に含まれる別々の特徴を如何様に組み合わせたシステムまたは装置も、本発明の範疇に含まれる。
[Other Embodiments]
The present invention has been described above with reference to the embodiments, but the present invention is not limited to the above embodiments. Various changes that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention. In addition, a system or an apparatus in which different features included in each embodiment are combined in any way is also included in the scope of the present invention.

また、本発明は、複数の機器から構成されるシステムに適用されてもよいし、単体の装置に適用されてもよい。さらに、本発明は、実施形態の機能を実現する情報処理プログラムが、システムあるいは装置に直接あるいは遠隔から供給される場合にも適用可能である。したがって、本発明の機能をコンピュータで実現するために、コンピュータにインストールされるプログラム、あるいはそのプログラムを格納した媒体、そのプログラムをダウンロードさせるWWW(World Wide Web)サーバも、本発明の範疇に含まれる。特に、少なくとも、上述した実施形態に含まれる処理ステップをコンピュータに実行させるプログラムを格納した非一時的コンピュータ可読媒体(non-transitory computer readable medium)は本発明の範疇に含まれる。   In addition, the present invention may be applied to a system composed of a plurality of devices, or may be applied to a single device. Furthermore, the present invention can also be applied to a case where an information processing program that implements the functions of the embodiments is supplied directly or remotely to a system or apparatus. Therefore, in order to realize the functions of the present invention on a computer, a program installed in the computer, a medium storing the program, and a WWW (World Wide Web) server that downloads the program are also included in the scope of the present invention. . In particular, at least a non-transitory computer readable medium storing a program for causing a computer to execute the processing steps included in the above-described embodiments is included in the scope of the present invention.

Claims (11)

キャッシュメモリにおいて、所定時間を超えてアクセスされていないページ、または、アクセス頻度が所定値を下回るページを含むパーティションを、容量を削減可能なパーティションと設定する削減候補設定手段と、
キャッシュミスが発生したページが、前記キャッシュメモリから下位の記憶媒体に追い出されたページの履歴に含まれている場合、前記容量を削減可能なパーティションの容量を削減して前記キャッシュミスが発生したパーティションの容量に追加する容量制御手段と、
を備える記憶制御装置。
In the cache memory, a reduction candidate setting means for setting a partition including a page that has not been accessed for a predetermined time or a page whose access frequency is lower than a predetermined value as a partition whose capacity can be reduced;
When the page in which the cache miss has occurred is included in the history of the page that has been evicted from the cache memory to a lower storage medium, the partition in which the cache miss has occurred by reducing the capacity of the partition that can reduce the capacity Capacity control means to be added to the capacity of
A storage control device comprising:
前記削減候補設定手段は、
前記所定時間を周期として、その間にアクセスされてないページを不要なページとして検出する不要ページ検出手段を有し、
前記不要なページを含むパーティションを、前記容量を削減可能なパーティションと設定する、請求項1に記載の記憶制御装置。
The reduction candidate setting means includes:
An unnecessary page detection unit that detects a page that has not been accessed as an unnecessary page with the predetermined time as a cycle,
The storage control device according to claim 1, wherein a partition including the unnecessary page is set as a partition capable of reducing the capacity.
前記不要ページ検出手段は、クロックアルゴリズムを用いて、前記所定時間にアクセスされてないページを検出する、請求項2に記載の記憶制御装置。   The storage control device according to claim 2, wherein the unnecessary page detection unit detects a page that has not been accessed for the predetermined time by using a clock algorithm. 前記不要ページ検出手段は、前記不要なページを検出する前記周期を調整する検出周期調整手段を含む、請求項2または3に記載の記憶制御装置。   The storage control device according to claim 2, wherein the unnecessary page detection unit includes a detection cycle adjustment unit that adjusts the cycle for detecting the unnecessary page. 前記キャッシュメモリへのアクセスにおいて発生したキャッシュヒットを、アクセスの対象であるパーティションに関連付けて検出するキャッシュヒット検出手段と、
前記キャッシュヒットの検出結果から、パーティションに対するアクセス頻度の高いページの検出に要する時間を測定する検出時間測定手段と、をさらに備え、
前記検出周期調整手段は、前記測定された時間を基づいて、前記不要ページの検出周期を調整する、請求項4に記載の記憶制御装置。
A cache hit detecting means for detecting a cache hit generated in accessing the cache memory in association with a partition to be accessed;
A detection time measuring means for measuring a time required for detecting a page having a high access frequency to the partition from the detection result of the cache hit, and further comprising:
The storage control device according to claim 4, wherein the detection cycle adjustment unit adjusts a detection cycle of the unnecessary page based on the measured time.
前記容量制御手段は、前記容量を削減可能なパーティションが複数ある場合、下位の記憶媒体に追い出される可能性の最も高いページを含むパーティションを、容量削減をするパーティションとする、請求項1乃至5のいずれか1項に記載の記憶制御装置。   6. The capacity control unit according to claim 1, wherein when there are a plurality of partitions capable of reducing the capacity, a partition including a page most likely to be evicted to a lower storage medium is set as a partition whose capacity is reduced. The storage control device according to any one of the above. 前記容量制御手段は、容量削減をするパーティションにおいて、下位の記憶媒体に追い出される可能性の最も高いページを削減する、請求項1乃至6のいずれか1項に記載の記憶制御装置。   The storage control device according to any one of claims 1 to 6, wherein the capacity control unit reduces a page most likely to be evicted to a lower storage medium in a partition whose capacity is to be reduced. キャッシュメモリにおいて、所定時間を超えてアクセスされていないページ、または、アクセス頻度が所定値を下回るページを含むパーティションを、容量を削減可能なパーティションと設定する削減候補設定ステップと、
キャッシュミスが発生したページが、前記キャッシュメモリから下位の記憶媒体に追い出されたページの履歴に含まれている場合、前記容量を削減可能なパーティションの容量を削減して前記キャッシュミスが発生したパーティションの容量に追加する容量制御ステップと、
を含む記憶制御方法。
In a cache memory, a reduction candidate setting step for setting a partition that includes a page that has not been accessed for a predetermined time or a page whose access frequency is lower than a predetermined value as a partition whose capacity can be reduced;
When the page in which the cache miss has occurred is included in the history of the page that has been evicted from the cache memory to a lower storage medium, the partition in which the cache miss has occurred by reducing the capacity of the partition that can reduce the capacity A capacity control step to add to the capacity of
A storage control method.
キャッシュメモリにおいて、所定時間を超えてアクセスされていないページ、または、アクセス頻度が所定値を下回るページを含むパーティションを、容量を削減可能なパーティションと設定する削減候補設定ステップと、
キャッシュミスが発生したページが、前記キャッシュメモリから下位の記憶媒体に追い出されたページの履歴に含まれている場合、前記容量を削減可能なパーティションの容量を削減して前記キャッシュミスが発生したパーティションの容量に追加する容量制御ステップと、
をコンピュータに実行させる記憶制御プログラム。
In a cache memory, a reduction candidate setting step for setting a partition that includes a page that has not been accessed for a predetermined time or a page whose access frequency is lower than a predetermined value as a partition whose capacity can be reduced;
When the page in which the cache miss has occurred is included in the history of the page that has been evicted from the cache memory to a lower storage medium, the partition in which the cache miss has occurred by reducing the capacity of the partition that can reduce the capacity A capacity control step to add to the capacity of
Storage control program for causing a computer to execute.
記憶媒体と、
複数の処理からのアクセス要求に基づいて、前記記憶媒体へのアクセスを指示するアクセス手段と、
キャッシュメモリを有し、前記アクセス手段の前記記憶媒体へのアクセスを制御する記憶制御手段と、
を備えた情報処理システムであって、
前記記憶制御手段は、
前記キャッシュメモリにおいて、所定時間を超えてアクセスされていないページ、または、アクセス頻度が所定値を下回るページを含むパーティションを、容量を削減可能なパーティションと設定する削減候補設定手段と、
キャッシュミスが発生したページが、前記キャッシュメモリから下位の前記記憶媒体に追い出されたページの履歴に含まれている場合、前記容量を削減可能なパーティションの容量を削減して前記キャッシュミスが発生したパーティションの容量に追加する容量制御手段と、
を備える情報処理システム。
A storage medium;
Access means for instructing access to the storage medium based on access requests from a plurality of processes;
Storage control means for controlling access to the storage medium of the access means, having a cache memory;
An information processing system comprising:
The storage control means
In the cache memory, a reduction candidate setting means for setting a page that has not been accessed for a predetermined time or a partition including a page whose access frequency is lower than a predetermined value as a partition whose capacity can be reduced;
When the page in which a cache miss has occurred is included in the history of pages that have been evicted from the cache memory to the lower storage medium, the cache miss has occurred by reducing the capacity of the partition capable of reducing the capacity. Capacity control means to add to the capacity of the partition;
An information processing system comprising:
複数の処理の各処理に対して、キャッシュメモリ内の少なくとも1つのページを含むパーティションを割り当てる割当ステップと、
前記キャッシュメモリにおいて、所定時間を超えてアクセスされていないページ、または、アクセス頻度が所定値を下回るページを含むパーティションを、容量を削減可能なパーティションと設定する削減候補設定ステップと、
キャッシュミスが発生したページが、前記キャッシュメモリから下位の記憶媒体に追い出されたページの履歴に含まれている場合、前記容量を削減可能なパーティションの容量を削減して前記キャッシュミスが発生したパーティションの容量に追加する容量制御ステップと、
前記削減候補設定ステップをバックグラウンドで実行しつつ、前記容量制御ステップを繰り返し、前記各処理に対するキャッシュ容量の配分を管理する配分管理ステップと、
を含むキャッシュ容量配分方法。
An assigning step of assigning a partition including at least one page in the cache memory to each of the plurality of processes;
In the cache memory, a reduction candidate setting step for setting a page that has not been accessed for a predetermined time or a partition including a page whose access frequency is lower than a predetermined value as a partition whose capacity can be reduced;
When the page in which the cache miss has occurred is included in the history of the page that has been evicted from the cache memory to a lower storage medium, the partition in which the cache miss has occurred by reducing the capacity of the partition that can reduce the capacity A capacity control step to add to the capacity of
While executing the reduction candidate setting step in the background, the capacity control step is repeated, and a distribution management step for managing the distribution of the cache capacity for each process;
Cache capacity allocation method including
JP2016136338A 2016-07-08 2016-07-08 Information processing system, cache capacity distribution method, storage control apparatus, and method and program thereof Pending JP2019168733A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2016136338A JP2019168733A (en) 2016-07-08 2016-07-08 Information processing system, cache capacity distribution method, storage control apparatus, and method and program thereof
PCT/JP2017/024617 WO2018008676A1 (en) 2016-07-08 2017-07-05 Information processing system, cache allocation method, memory control device, memory control method, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016136338A JP2019168733A (en) 2016-07-08 2016-07-08 Information processing system, cache capacity distribution method, storage control apparatus, and method and program thereof

Publications (1)

Publication Number Publication Date
JP2019168733A true JP2019168733A (en) 2019-10-03

Family

ID=60912824

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016136338A Pending JP2019168733A (en) 2016-07-08 2016-07-08 Information processing system, cache capacity distribution method, storage control apparatus, and method and program thereof

Country Status (2)

Country Link
JP (1) JP2019168733A (en)
WO (1) WO2018008676A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023121943A1 (en) * 2021-12-21 2023-06-29 Advanced Micro Devices, Inc. Stochastic optimization of surface cacheability in parallel processing units

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112737975B (en) * 2020-12-25 2023-05-09 珠海西山居数字科技有限公司 Buffer capacity adjustment method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4813843B2 (en) * 2005-08-04 2011-11-09 株式会社日立製作所 Storage device, disk cache control method, and disk cache capacity allocation method
WO2007099483A2 (en) * 2006-03-02 2007-09-07 Nxp B.V. Method and apparatus for dynamic resizing of cache partitions based on the execution phase of tasks
US20140258595A1 (en) * 2013-03-11 2014-09-11 Lsi Corporation System, method and computer-readable medium for dynamic cache sharing in a flash-based caching solution supporting virtual machines
JP6323445B2 (en) * 2013-03-15 2018-05-16 日本電気株式会社 Storage apparatus, method and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023121943A1 (en) * 2021-12-21 2023-06-29 Advanced Micro Devices, Inc. Stochastic optimization of surface cacheability in parallel processing units

Also Published As

Publication number Publication date
WO2018008676A1 (en) 2018-01-11

Similar Documents

Publication Publication Date Title
EP3210121B1 (en) Cache optimization technique for large working data sets
TWI627536B (en) System and method for a shared cache with adaptive partitioning
JP5944587B2 (en) Computer system and control method
US20150293881A1 (en) Network-attached memory
US20160041907A1 (en) Systems and methods to manage tiered cache data storage
JP6691669B2 (en) Information processing system, storage control device, storage control method, and storage control program
JP6106028B2 (en) Server and cache control method
JPWO2016175028A1 (en) Information processing system, storage control device, storage control method, and storage control program
KR20140082639A (en) Dynamically adjusted threshold for population of secondary cache
US9342456B2 (en) Storage control program for hierarchy relocation control, storage system with hierarchy relocation control and hierarchy control apparatus thereof
JP2019525330A (en) Cache transfer policy selection for prefetch data based on cache test area
US9727247B2 (en) Storage device and method, and storage medium
US20180113815A1 (en) Cache entry replacement based on penalty of memory access
US10853252B2 (en) Performance of read operations by coordinating read cache management and auto-tiering
US10176098B2 (en) Method and apparatus for data cache in converged system
JPWO2017006675A1 (en) Information processing system, storage control device, storage control method, and storage control program
US20170220476A1 (en) Systems and Methods for Data Caching in Storage Array Systems
WO2018008676A1 (en) Information processing system, cache allocation method, memory control device, memory control method, and recording medium
WO2016002325A1 (en) Information processing system, information processing method, storage control device, and control method and control program for storage control device
KR20130112755A (en) Method and device for management of storage
JP7011156B2 (en) Storage controller and program
US10853257B1 (en) Zero detection within sub-track compression domains
US11429518B2 (en) Paging in thin-provisioned disaggregated memory
US10007437B2 (en) Management apparatus, storage system, method, and computer readable medium
KR101976320B1 (en) Last level cache memory and data management method thereof