JP6229577B2 - Cache storage program, information processing apparatus, and cache storage method - Google Patents

Cache storage program, information processing apparatus, and cache storage method Download PDF

Info

Publication number
JP6229577B2
JP6229577B2 JP2014079678A JP2014079678A JP6229577B2 JP 6229577 B2 JP6229577 B2 JP 6229577B2 JP 2014079678 A JP2014079678 A JP 2014079678A JP 2014079678 A JP2014079678 A JP 2014079678A JP 6229577 B2 JP6229577 B2 JP 6229577B2
Authority
JP
Japan
Prior art keywords
data
chunk
duplication
cache memory
cache
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2014079678A
Other languages
Japanese (ja)
Other versions
JP2015201050A (en
Inventor
真一 佐沢
真一 佐沢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2014079678A priority Critical patent/JP6229577B2/en
Publication of JP2015201050A publication Critical patent/JP2015201050A/en
Application granted granted Critical
Publication of JP6229577B2 publication Critical patent/JP6229577B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Description

本発明は、キャッシュ保存プログラムなどに関する。   The present invention relates to a cache storage program and the like.

データのグローバル化およびクラウドやモバイルの利用が進む中、通信の高速化の要望が増大している。通信の高速化の要望に対して、通信装置は、データを転送する際、転送するデータを最適化することで、転送するデータ量を削減する。すなわち、通信装置は、過去に転送したデータを重複データとして転送するデータから除去し、転送するデータのデータ量を削減する。   With the globalization of data and the use of cloud and mobile, the demand for faster communication is increasing. In response to the demand for high-speed communication, the communication device reduces the amount of data to be transferred by optimizing the data to be transferred when transferring the data. That is, the communication apparatus removes data transferred in the past from data to be transferred as duplicate data, and reduces the amount of data to be transferred.

ここで、従来の重複データの除去技術について、図11を参照して説明する。図11は、従来の重複データの除去技術を示す図である。図11に示すように、送信側の通信装置は、入力データをチャンクと呼ばれる可変長ブロックに分割し、チャンク単位で、キャッシュメモリに記憶された過去の入力データとの重複判定を行う。ここで、チャンクとは、データがバウンダリで分割されることにより得られる可変長ブロックのことをいう。そして、送信側の通信装置は、重複判定によって、チャンクに対応するデータがキャッシュメモリになければ、データ(生データ)をキャッシュメモリに保存するとともに、生データを、ネットワークを介して受信側の通信装置へ転送する。一方、送信側の通信装置は、重複判定によって、チャンクに対応するデータがキャッシュメモリにあれば、データのインデックス(ID:identification)のみを、ネットワークを介して受信側の通信装置へ転送する。   Here, a conventional duplicate data removal technique will be described with reference to FIG. FIG. 11 is a diagram showing a conventional duplicate data removal technique. As illustrated in FIG. 11, the communication device on the transmission side divides input data into variable-length blocks called chunks, and performs duplication determination with past input data stored in the cache memory in units of chunks. Here, a chunk refers to a variable length block obtained by dividing data on a boundary. Then, if the data corresponding to the chunk is not in the cache memory due to the duplication determination, the transmitting communication device saves the data (raw data) in the cache memory and transmits the raw data to the receiving side via the network. Transfer to device. On the other hand, if there is data corresponding to the chunk in the cache memory by duplication determination, the transmitting communication device transfers only the data index (ID: identification) to the receiving communication device via the network.

受信側の通信装置では、生データを受信した場合、受信した生データをキャッシュメモリに保存するとともに、生データを受信データとする。一方、受信側の通信装置では、データのインデックスを受信した場合、キャッシュメモリを用いてデータを復元し、復元したデータを受信データとする。   When receiving the raw data, the communication device on the receiving side stores the received raw data in the cache memory and uses the raw data as received data. On the other hand, when receiving the data index, the communication device on the receiving side restores the data using the cache memory, and uses the restored data as received data.

送信側の通信装置のキャッシュメモリが満杯になった場合には、使われていない一番古いデータ(LRU:Least Recently Used)から順番に、キャッシュメモリに記憶されたデータを削除する。   When the cache memory of the communication device on the transmission side becomes full, the data stored in the cache memory is deleted in order from the oldest unused data (LRU: Least Recently Used).

また、データをキャッシュメモリに保存する技術が開示されている。かかる技術では、複数のキャッシュを有するプロキシサーバが、ウェブサーバから送信されたデータの大きさに応じて、当該データを記憶させるキャッシュを決定し、決定されたキャッシュにそのデータを記憶する技術が開示されている(例えば、特許文献1参照)。   Further, a technique for storing data in a cache memory is disclosed. In such a technique, a technique is disclosed in which a proxy server having a plurality of caches determines a cache for storing the data according to the size of the data transmitted from the web server, and stores the data in the determined cache. (For example, refer to Patent Document 1).

特開2001−256098号公報JP 2001-256098 A

しかしながら、通信装置は、キャッシュメモリを効率的にヒットさせることができないという問題がある。例えば、通信装置は、転送するデータの重複の特性を考慮しないで、キャッシュメモリにデータを保存するので、キャッシュメモリを効率的にヒットさせることができない。ここで、データの重複の特性の一例について、図12A、図12Bを参照して説明する。   However, there is a problem that the communication device cannot efficiently hit the cache memory. For example, the communication device stores the data in the cache memory without considering the duplication characteristics of the data to be transferred, and thus cannot efficiently hit the cache memory. Here, an example of data duplication characteristics will be described with reference to FIGS. 12A and 12B.

図12Aは、重複データの一例を示す図である。図12Aでは、転送するデータの流れを示し、Xが、重複データであるとする。図12Aが示す送信データでは、重複データXの継続する長さは短いが、重複データXは頻繁に発生している。このような転送するデータの重複の特性は、FSC(frequent and short chunk series)と呼ばれる。   FIG. 12A is a diagram illustrating an example of duplicate data. FIG. 12A shows the flow of data to be transferred, and X is duplicate data. In the transmission data shown in FIG. 12A, the continuous length of the duplicate data X is short, but the duplicate data X occurs frequently. Such a characteristic of duplication of data to be transferred is called FSC (frequent and short chunk series).

図12Bは、重複データの別の例を示す図である。図12Bでは、転送するデータの流れを示し、Xが、重複データであるとする。図12Bが示す送信データでは、重複データXの継続する長さは長いが、重複データXは稀に発生している。このような転送するデータの重複の特性は、RLC(rare and long chunk series)と呼ばれる。   FIG. 12B is a diagram illustrating another example of duplicate data. FIG. 12B shows the flow of data to be transferred, and X is duplicate data. In the transmission data shown in FIG. 12B, the continuous length of the duplicate data X is long, but the duplicate data X occurs rarely. Such a characteristic of duplication of data to be transferred is called RLC (rare and long chunk series).

このように、データには、重複の特性があるにもかかわらず、通信装置は、転送するデータの重複の特性を考慮しないで、キャッシュメモリにデータを保存しているので、キャッシュメモリを効率的にヒットさせることができない。   In this way, the communication device stores data in the cache memory without considering the duplication characteristics of the data to be transferred, even though the data has duplication characteristics. Can not be hit.

なお、上記課題は、データを転送する通信装置の場合だけではなく、データを処理する情報処理装置の場合にも同様に生じる課題である。   The above-mentioned problem is not only caused in the case of a communication apparatus that transfers data, but also occurs in the case of an information processing apparatus that processes data.

1つの側面では、キャッシュメモリを効率的にヒットさせることを目的とする。   In one aspect, an object is to efficiently hit a cache memory.

本願の開示するキャッシュ保存プログラムは、コンピュータに、処理対象のデータが新規である場合に、前記処理対象のデータを第1のキャッシュメモリに記憶し、前記第1のキャッシュメモリに記憶されたデータ毎に、処理対象のデータと重複する重複回数および処理対象のデータと重複する際に継続して重複する長さを示す継続重複長を重複履歴として管理し、新規のデータを処理する際、前記第1のキャッシュメモリに記憶されたデータの数が上限である場合に、所定の削除対象のデータを抽出し、前記重複履歴で管理された前記削除対象のデータの重複回数および継続重複長に応じて、前記削除対象のデータを、第2のキャッシュメモリおよび第3のキャッシュメモリのいずれかのキャッシュメモリに移動する処理を実行させる。   The cache storage program disclosed in the present application stores, in a computer, when data to be processed is new, stores the data to be processed in a first cache memory, and stores each data stored in the first cache memory. In addition, the number of times of duplication that overlaps with the data to be processed and the continuous duplication length that indicates the length of duplication that continues when overlapping with the data to be processed are managed as duplication history, and when the new data is processed, When the number of data stored in one cache memory is the upper limit, a predetermined deletion target data is extracted, and the deletion target data managed in the duplication history is duplicated and the continuous duplication length Then, a process of moving the data to be deleted to one of the second cache memory and the third cache memory is executed.

本願の開示するキャッシュ保存プログラムの1つの態様によれば、キャッシュメモリを効率的にヒットさせることが可能となる。   According to one aspect of the cache storage program disclosed in the present application, it is possible to efficiently hit the cache memory.

図1は、実施例1に係る通信装置の構成を示す機能ブロック図である。FIG. 1 is a functional block diagram illustrating the configuration of the communication apparatus according to the first embodiment. 図2は、実施例1に係る通信装置のキャッシュ保存処理の一例を示す図である。FIG. 2 is a diagram illustrating an example of cache storage processing of the communication apparatus according to the first embodiment. 図3は、入力データと送信するデータのデータ構造を示す図である。FIG. 3 is a diagram illustrating a data structure of input data and data to be transmitted. 図4は、実施例1に係る重複管理情報のデータ構造の一例を示す図である。FIG. 4 is a diagram illustrating an example of a data structure of duplication management information according to the first embodiment. 図5Aは、実施例1に係るキャッシュ保存処理のフローチャートを示す図(1)である。FIG. 5A is a diagram (1) illustrating the flowchart of the cache storage process according to the first embodiment. 図5Bは、実施例1に係るキャッシュ保存処理のフローチャートを示す図(2)である。FIG. 5B is a diagram (2) illustrating the flowchart of the cache saving process according to the first embodiment. 図5Cは、実施例1に係るキャッシュ保存処理のフローチャートを示す図(3)である。FIG. 5C is a diagram (3) illustrating a flowchart of the cache storage process according to the first embodiment. 図6は、実施例2に係る通信装置の構成を示す機能ブロック図である。FIG. 6 is a functional block diagram illustrating the configuration of the communication apparatus according to the second embodiment. 図7は、実施例2に係る通信装置のキャッシュ保存処理の一例を示す図である。FIG. 7 is a diagram illustrating an example of cache storage processing of the communication apparatus according to the second embodiment. 図8は、実施例2に係る重複管理情報のデータ構造の一例を示す図である。FIG. 8 is a diagram illustrating an example of a data structure of duplication management information according to the second embodiment. 図9Aは、実施例2に係るキャッシュ保存処理のフローチャートを示す図(1)である。FIG. 9A is a diagram (1) illustrating the flowchart of the cache storage process according to the second embodiment. 図9Bは、実施例2に係るキャッシュ保存処理のフローチャートを示す図(2)である。FIG. 9B is a diagram (2) illustrating the flowchart of the cache saving process according to the second embodiment. 図9Cは、実施例2に係るキャッシュ保存処理のフローチャートを示す図(3)である。FIG. 9C is a diagram (3) illustrating the flowchart of the cache storage process according to the second embodiment. 図9Dは、実施例2に係るキャッシュ保存処理のフローチャートを示す図(4)である。FIG. 9D is a diagram (4) illustrating the flowchart of the cache saving process according to the second embodiment. 図10は、キャッシュ保存プログラムを実行するコンピュータの一例を示す図である。FIG. 10 is a diagram illustrating an example of a computer that executes a cache storage program. 図11は、従来の重複データの除去技術を示す図である。FIG. 11 is a diagram showing a conventional duplicate data removal technique. 図12Aは、重複データの一例を示す図である。FIG. 12A is a diagram illustrating an example of duplicate data. 図12Bは、重複データの別の例を示す図である。FIG. 12B is a diagram illustrating another example of duplicate data.

以下に、本願の開示するキャッシュ保存プログラム、情報処理装置およびキャッシュ保存方法の実施例を図面に基づいて詳細に説明する。なお、実施例によりこの発明が限定されるものではない。   Embodiments of a cache storage program, an information processing apparatus, and a cache storage method disclosed in the present application will be described below in detail with reference to the drawings. The present invention is not limited to the embodiments.

[通信装置の構成]
図1は、実施例1に係る通信装置の構成を示す機能ブロック図である。通信装置1は、通信装置間で送受信されるデータを送信する通信装置である。通信装置1は、過去に送信したデータを記憶するキャッシュ保存領域を階層化し、上位のキャッシュが満杯であるタイミングで、データの重複の特性に応じて、データを所定の下位のキャッシュに移動する。
[Configuration of communication device]
FIG. 1 is a functional block diagram illustrating the configuration of the communication apparatus according to the first embodiment. The communication device 1 is a communication device that transmits data transmitted and received between communication devices. The communication device 1 hierarchizes a cache storage area for storing data transmitted in the past, and moves data to a predetermined lower cache at a timing when the upper cache is full according to the data duplication characteristics.

通信装置1は、記憶部10および制御部20を有する。記憶部10は、例えばフラッシュメモリ(Flash Memory)やFRAM(登録商標)(Ferroelectric Random Access Memory)等の不揮発性の半導体メモリ素子等の記憶装置に対応する。記憶部10は、キャッシュメモリとしての役割を担うキャッシュ保存領域を含む。キャッシュ保存領域は、メモリ11と、ディスク12と、SSD(Solid State Drive)13とを有し、メモリ11の配下にディスク12およびSSD13を配置する。   The communication device 1 includes a storage unit 10 and a control unit 20. The storage unit 10 corresponds to a storage device such as a nonvolatile semiconductor memory element such as a flash memory or a FRAM (registered trademark) (Ferroelectric Random Access Memory). The storage unit 10 includes a cache storage area that serves as a cache memory. The cache storage area includes a memory 11, a disk 12, and an SSD (Solid State Drive) 13, and the disk 12 and the SSD 13 are arranged under the memory 11.

ここで、実施例1に係る通信装置1のキャッシュ保存処理の一例を、図2を参照して説明する。図2は、実施例1に係る通信装置のキャッシュ保存処理の一例を示す図である。図2に示すように、通信装置1は、入力データをチャンクと呼ばれる可変長ブロックに分割し、チャンク単位で、メモリ11に記憶された過去の入力データとの重複判定を行う。
通信装置1は、重複判定によって、チャンクに対応するデータがメモリ11にあれば、重複したデータを除去すべく、データのインデックス(ID:identification)のみを、ネットワークを介して受信側の通信装置へ転送する。
Here, an example of the cache storage process of the communication apparatus 1 according to the first embodiment will be described with reference to FIG. FIG. 2 is a diagram illustrating an example of cache storage processing of the communication apparatus according to the first embodiment. As illustrated in FIG. 2, the communication device 1 divides input data into variable-length blocks called chunks, and performs duplication determination with past input data stored in the memory 11 in units of chunks.
If there is data corresponding to the chunk in the memory 11 as a result of the duplication determination, the communication device 1 sends only the data index (ID: identification) to the receiving communication device via the network in order to remove the duplicate data. Forward.

一方、通信装置1は、重複判定によって、チャンクに対応するデータがメモリ11になければ、データ(生データ)をメモリ11に保存するとともに、生データを、ネットワークを介して受信側の通信装置へ送信する。通信装置1は、データをメモリ11に保存する際にメモリ11が満杯になった場合には、メモリ11に記憶されたチャンクのうち、使われていない一番古いチャンク(LRU:Least Recently Used)を抽出する。そして、通信装置1は、抽出したチャンクを削除対象とする。   On the other hand, if there is no data corresponding to the chunk in the memory 11 due to the duplication determination, the communication device 1 stores the data (raw data) in the memory 11 and sends the raw data to the receiving communication device via the network. Send. When the memory 11 becomes full when the data is stored in the memory 11, the communication device 1 among the chunks stored in the memory 11 is the oldest unused chunk (LRU: Least Recently Used). To extract. Then, the communication device 1 sets the extracted chunk as a deletion target.

通信装置1は、削除対象のデータについて、重複が稀にあり、重複が長い間継続すると判定する場合には、削除対象のデータをキャッシュ保存領域のメモリ11からディスク12に移動する。すなわち、データの重複の特性が、RLC(rare and long chunk series)である場合には、通信装置1は、当該データを、階層化されたキャッシュの低速のディスク12に移動する。   If the communication device 1 determines that the data to be deleted has duplication rarely and the duplication continues for a long time, the communication device 1 moves the data to be deleted from the memory 11 in the cache storage area to the disk 12. That is, when the data duplication characteristic is RLC (rare and long chunk series), the communication device 1 moves the data to the low-speed disk 12 of the hierarchical cache.

また、通信装置1は、削除対象のデータについて、重複が頻繁にあり、重複が短い間継続すると判定する場合には、削除対象のデータをキャッシュ保存領域のメモリ11からSSD13に移動する。すなわち、データの重複の特性が、FSC(frequent and short chunk series)である場合には、通信装置1は、当該データを、階層化されたキャッシュの高速のSSD13に移動する。   If the communication device 1 determines that the data to be deleted frequently overlaps and continues for a short time, the communication device 1 moves the data to be deleted from the memory 11 in the cache storage area to the SSD 13. That is, when the data duplication characteristic is FSC (frequent and short chunk series), the communication device 1 moves the data to the high-speed SSD 13 of the hierarchical cache.

これにより、通信装置1は、データの重複の特性を考慮して、キャッシュ保存領域にデータを保存するので、キャッシュ保存領域を効率的にヒットさせることが可能となる。   As a result, the communication device 1 stores data in the cache storage area in consideration of data duplication characteristics, and thus it is possible to efficiently hit the cache storage area.

図3は、入力データと送信するデータのデータ構造を示す図である。なお、図3で示すA、B、C、Dは、それぞれチャンクを表すものとする。すなわち、入力データは、A、B、C、B、Dの各チャンクに分割されている。図3に示すように、入力データの各チャンクの出現位置は、継続している。ここでいう「出現位置」は、新規のチャンクが出現する都度増大し、チャンクが重複する時には増大しない一種のアドレスのことをいう。入力データのデータ量は、チャンクAの1200、チャンクBの1000、チャンクCの1100、チャンクBの1000、チャンクDの900の総数5200となる。ところが、チャンクBが重複しているので、送信するデータのデータ量は、チャンクAの1200、チャンクBの1000、チャンクCの1100、チャンクDの900の総数4200となる。すなわち、チャンクBは重複しているため、IDを除いてデータ量が0となるとともに、出現位置は0となる。   FIG. 3 is a diagram illustrating a data structure of input data and data to be transmitted. Note that A, B, C, and D shown in FIG. 3 each represent a chunk. That is, the input data is divided into A, B, C, B, and D chunks. As shown in FIG. 3, the appearance position of each chunk of input data continues. The “appearance position” here refers to a kind of address that increases each time a new chunk appears and does not increase when the chunks overlap. The data amount of the input data is a total number 5200 of chunk A 1200, chunk B 1000, chunk C 1100, chunk B 1000, and chunk D 900. However, since chunk B is duplicated, the amount of data to be transmitted is 1200 for chunk A, 1000 for chunk B, 1100 for chunk C, and a total of 4200 for 900 for chunk D. That is, since the chunk B is duplicated, the data amount is 0 except for the ID, and the appearance position is 0.

図1に戻って、メモリ11は、重複管理情報111を記憶する。重複管理情報111は、既に記憶したチャンクについて、入力データとの重複の履歴を管理する。すなわち、重複管理情報111は、既に送信したデータを分割した複数のチャンク毎に、入力したデータとの重複時のデータ長および重複の回数を重複履歴として管理する。なお、重複管理情報111のデータ構造については、後述する。   Returning to FIG. 1, the memory 11 stores duplication management information 111. The duplication management information 111 manages the duplication history with the input data for the already stored chunks. That is, the duplication management information 111 manages, as duplication history, the data length and the number of times of duplication with the input data for each of a plurality of chunks obtained by dividing already transmitted data. The data structure of the duplication management information 111 will be described later.

制御部20は、各種の処理手順を規定したプログラムや制御データを格納するための内部メモリを有し、これらによって種々の処理を実行する。そして、制御部20は、例えば、ASIC(Application Specific Integrated Circuit)やFPGA(Field Programmable Gate Array)などの集積回路の電子回路に対応する。または、制御部20は、CPU(Central Processing Unit)やMPU(Micro Processing Unit)などの電子回路に対応する。さらに、制御部20は、チャンク分割部21、ハッシュ計算部22、重複判定部23、新規登録部24、重複管理部25、キャッシュ移動部26および送信部27を有する。   The control unit 20 has an internal memory for storing programs defining various processing procedures and control data, and executes various processes using these. And the control part 20 respond | corresponds to the electronic circuit of integrated circuits, such as ASIC (Application Specific Integrated Circuit) and FPGA (Field Programmable Gate Array). Alternatively, the control unit 20 corresponds to an electronic circuit such as a CPU (Central Processing Unit) or an MPU (Micro Processing Unit). Furthermore, the control unit 20 includes a chunk division unit 21, a hash calculation unit 22, a duplication determination unit 23, a new registration unit 24, a duplication management unit 25, a cache migration unit 26, and a transmission unit 27.

チャンク分割部21は、入力データを複数のチャンクに分割する。ここで、チャンクとは、データがバウンダリで区別されることにより得られる可変長ブロックのことをいう。入力データを複数のチャンクに分割する方法は、以下のように実行される。   The chunk division unit 21 divides input data into a plurality of chunks. Here, a chunk means a variable length block obtained by distinguishing data by boundary. A method of dividing input data into a plurality of chunks is executed as follows.

例えば、チャンク分割部21は、入力データを固定長のウィンドウサイズでスキャンする。また、チャンク分割部21は、ウィンドウデータのハッシュ値をラビン(Rabin)のフィンガープリント(fingerprint)と呼ばれる方法(「fp」と略記)で計算する。一例として、ウィンドウサイズをn、ウィンドウ内のデータをw、w、・・・、wn−1とすると、fpは、以下の式(1)で表わされる。なお、式(1)で示されるpは、比較的大きな素数である。

Figure 0006229577
For example, the chunk division unit 21 scans input data with a fixed window size. Further, the chunk division unit 21 calculates a hash value of the window data by a method called “Rabin” fingerprint (abbreviated as “fp”). As an example, assuming that the window size is n and the data in the window is w 0 , w 1 ,..., W n−1 , fp is expressed by the following equation (1). In addition, p shown by Formula (1) is a comparatively big prime number.
Figure 0006229577

また、チャンク分割部21は、式(1)の結果および式(2)を用いて、1バイトずつ延長したfpをそれぞれ計算する。

Figure 0006229577
Further, the chunk division unit 21 calculates fp extended by 1 byte by using the result of Expression (1) and Expression (2).
Figure 0006229577

また、チャンク分割部21は、計算で得られた複数のfpのうち、後方(あるいは前方)のmビットが予め定められたビットパターンと一致するfpを探索する。探索できたfpによってデータのバウンダリが得られる。fpのmビットが一致する確率は、1/2の確率であるので、例えばmが「10」であれば平均して210(1KB)に1回の割合でデータのバウンダリが得られる。チャンク分割部21は、探索できたfpのデータを1つのチャンクとして分割する。なお、入力データを複数のチャンクに分割する方法は、これに限定されず、公知のいかなる技術を用いても良い。 Further, the chunk division unit 21 searches for a fp in which m bits in the rear (or front) match a predetermined bit pattern among a plurality of fps obtained by calculation. The boundary of data is obtained by fp that can be searched. Since the probability that the m bits of fp match is a probability of 1/2 m , for example, if m is “10”, a data boundary is obtained at a rate of once every 2 10 (1 KB) on average. The chunk division unit 21 divides the found fp data as one chunk. Note that the method of dividing the input data into a plurality of chunks is not limited to this, and any known technique may be used.

ハッシュ計算部22は、チャンク分割部21によって分割されたチャンクに対して、ハッシュ値を算出する。例えば、チャンク算出部22は、チャンク分割部21によって分割されたチャンクを順次選択する。チャンク算出部22は、SHA1(Secure Hash Algorithm 1)を用いて、選択したチャンクに対して、ハッシュ値を算出する。   The hash calculator 22 calculates a hash value for the chunk divided by the chunk divider 21. For example, the chunk calculation unit 22 sequentially selects the chunks divided by the chunk division unit 21. The chunk calculation unit 22 calculates a hash value for the selected chunk using SHA1 (Secure Hash Algorithm 1).

重複判定部23は、選択されたチャンクが、メモリ11に記憶された複数のチャンクのうちいずれかのチャンクと重複するか否かを判定する。例えば、重複判定部23は、重複管理情報111を用いて、選択されたチャンクの算出されたハッシュ値が既にメモリ11に記憶されたチャンクのハッシュ値と一致するか否かを判定する。   The duplication determination unit 23 determines whether or not the selected chunk overlaps any one of the plurality of chunks stored in the memory 11. For example, the duplication determination unit 23 uses the duplication management information 111 to determine whether the calculated hash value of the selected chunk matches the hash value of the chunk already stored in the memory 11.

新規登録部24は、選択されたチャンクが、メモリ11に記憶された複数のチャンクのうちいずれのチャンクとも重複しないと判定された場合に、選択されたチャンクをメモリ11に新規登録する。例えば、新規登録部24は、重複判定部23によって、選択されたチャンクの算出されたハッシュ値が既にメモリ11に記憶されたチャンクのいずれのハッシュ値とも一致しないと判定された場合に、チャンクをメモリ11に保存する。また、新規登録部24は、選択されたチャンクの情報を重複管理情報111に登録する。   When it is determined that the selected chunk does not overlap any of the plurality of chunks stored in the memory 11, the new registration unit 24 newly registers the selected chunk in the memory 11. For example, when the new registration unit 24 determines that the calculated hash value of the selected chunk does not match any hash value of the chunk already stored in the memory 11 by the duplication determination unit 23, Save in the memory 11. Further, the new registration unit 24 registers the information of the selected chunk in the duplication management information 111.

ここで、重複管理情報111のデータ構造について、図4を参照して説明する。図4は、実施例1に係る重複管理情報のデータ構造の一例を示す図である。図4に示すように、重複管理情報111は、出現位置111b、長さ111c、出現回数111dおよび継続111eを、ハッシュ値(SHA1)111aに対応付けて記憶する。ハッシュ値(SHA1)111aは、チャンクのSHA1によって算出されたハッシュ値を示す。出現位置111bは、チャンクの出現位置を示す。長さ111cは、チャンクの長さを示す。出現回数111dは、チャンクが既に出現した回数を示す。継続111eは、入力データが分割された複数のチャンクで重複が継続するチャンクの数を示す。継続111eには、入力データの先頭のチャンクに対応する部分に設定される。なお、出現回数111dおよび継続111eは、後述する重複管理部25によって設定される。また、出現回数111d、継続111eは、一例として、それぞれ、継続重複長、重複回数に対応する。   Here, the data structure of the duplication management information 111 will be described with reference to FIG. FIG. 4 is a diagram illustrating an example of a data structure of duplication management information according to the first embodiment. As shown in FIG. 4, the duplication management information 111 stores the appearance position 111b, the length 111c, the number of appearances 111d, and the continuation 111e in association with the hash value (SHA1) 111a. The hash value (SHA1) 111a indicates a hash value calculated by the SHA1 of the chunk. The appearance position 111b indicates the appearance position of the chunk. The length 111c indicates the length of the chunk. The appearance count 111d indicates the number of times the chunk has already appeared. The continuation 111e indicates the number of chunks in which duplication continues in a plurality of chunks into which input data is divided. The continuation 111e is set to a portion corresponding to the first chunk of the input data. Note that the appearance count 111d and the continuation 111e are set by the duplication management unit 25 described later. Further, the appearance count 111d and the continuation 111e correspond to the continuation overlap length and the overlap count, respectively, as an example.

一例として、チャンクa、b、cが含まれる入力データが入力され、後続してチャンクa、bが含まれる入力データが入力された場合の各チャンクの情報が記憶されている。ハッシュ値(SHA1)111aが「aaa」である情報は、チャンクaの情報である。ハッシュ値(SHA1)111aが「bbb」である情報は、チャンクbの情報である。ハッシュ値(SHA1)111aが「ccc」である情報は、チャンクcの情報である。チャンクaが入力データの先頭である。ハッシュ値(SHA1)111aが「aaa」である場合に、出現位置111bとして「0」、長さ111cとして「1200」、出現回数111dとして「2」と記憶している。そして、継続111eとして「2」と記憶している。これは、重複が継続するチャンクの数がa、bの2つであるからである。   As an example, information of each chunk when input data including chunks a, b, and c is input and subsequently input data including chunks a and b is input is stored. The information whose hash value (SHA1) 111a is “aaa” is the information of chunk a. The information whose hash value (SHA1) 111a is “bbb” is the information of chunk b. The information whose hash value (SHA1) 111a is “ccc” is the information of chunk c. Chunk a is the head of the input data. When the hash value (SHA1) 111a is “aaa”, “0” is stored as the appearance position 111b, “1200” is stored as the length 111c, and “2” is stored as the appearance count 111d. Then, “2” is stored as the continuation 111e. This is because the number of chunks in which duplication continues is two, a and b.

図1に戻って、新規登録部24は、選択されたチャンクについて、ハッシュ値(SHA1)111aとしてハッシュ計算部22によって算出されたハッシュ値、出現位置111bとして新規のチャンクのデータ量を加算して得られたオフセット値を設定する。新規登録部24は、長さ111cとして当該チャンクの長さ、出現回数111dとして「1」、継続111eとして「0」を設定する。   Returning to FIG. 1, the new registration unit 24 adds the hash value calculated by the hash calculation unit 22 as the hash value (SHA1) 111a and the data amount of the new chunk as the appearance position 111b for the selected chunk. Set the obtained offset value. The new registration unit 24 sets the length of the chunk as the length 111c, “1” as the number of appearances 111d, and “0” as the continuation 111e.

重複管理部25は、選択されたチャンクが、メモリ11に記憶された複数のチャンクのうちいずれかのチャンクと重複すると判定された場合に、選択されたチャンクの重複を管理する。例えば、重複管理部25は、重複判定部23によって、選択されたチャンクの算出されたハッシュ値が既にメモリ11に記憶されたチャンクのいずれかのハッシュ値と一致すると判定された場合に、以下の処理を行う。重複管理部25は、入力データの先頭のチャンクが認識されていない場合に、選択されたチャンクを入力データの先頭のチャンクとして認識し、選択されたチャンクに対応する継続111eに1を加算する。重複管理部25は、入力データの先頭のチャンクが既に認識されている場合に、選択されたチャンクが直前に重複したチャンクと継続していれば、先頭のチャンクに対応する継続111eに1を加算する。重複管理部25は、入力データの先頭のチャンクが既に認識されている場合に、選択されたチャンクが直近に重複したチャンクと継続していなければ、選択されたチャンクを入力データの先頭のチャンクとして認識し、選択されたチャンクに対応する継続111eに1を加算する。また、重複管理部25は、選択されたチャンクの出現回数111dに1を加算する。また、重複管理部25は、選択されたチャンクの情報を重複管理情報111の先頭に設定する。   The duplication management unit 25 manages duplication of the selected chunk when it is determined that the selected chunk overlaps any one of the plurality of chunks stored in the memory 11. For example, when the duplication management unit 25 determines that the calculated hash value of the selected chunk matches the hash value of one of the chunks already stored in the memory 11, Process. If the leading chunk of the input data is not recognized, the duplication management unit 25 recognizes the selected chunk as the leading chunk of the input data, and adds 1 to the continuation 111e corresponding to the selected chunk. The duplication management unit 25 adds 1 to the continuation 111e corresponding to the first chunk if the first chunk of the input data has already been recognized and the selected chunk continues with the previously duplicated chunk. To do. When the first chunk of the input data is already recognized, the duplication management unit 25 determines that the selected chunk is the first chunk of the input data if the selected chunk does not continue with the most recently duplicated chunk. Recognize and add 1 to the continuation 111e corresponding to the selected chunk. Further, the duplication management unit 25 adds 1 to the appearance count 111d of the selected chunk. In addition, the duplication management unit 25 sets information on the selected chunk at the head of the duplication management information 111.

キャッシュ移動部26は、新規のチャンクをメモリ11に登録する際、メモリ11に記憶されたチャンクの数が上限である場合に、メモリ11に記憶されたチャンクのうちLRUのチャンクを抽出する。抽出されたチャンクは、削除対象となる。キャッシュ移動部26は、削除対象のチャンクにおける重複時の予測継続長および重複の出現回数に応じて、削除対象のチャンクを含むデータを、ディスク12およびSSD13のいずれかのキャッシュに移動する。例えば、キャッシュ移動部26は、重複管理情報111の末尾のチャンクを削除対象とする。また、キャッシュ移動部26は、削除対象のチャンクの継続111eが所定の継続閾値より大きい場合に、当該チャンクから継続する継続111e分のチャンクのデータをディスク12に移動する。すなわち、チャンクの重複の特性が、RLC(rare and long chunk series)である場合に、キャッシュ移動部26は、該当するデータを、階層化されたキャッシュの低速のディスク12に移動する。また、キャッシュ移動部26は、削除対象のチャンクの継続111eが所定の継続閾値以下である場合に、削除対象のチャンクの出現回数111dが所定の出現回数閾値より大きい場合に、削除対象のチャンクを含むデータをSSD13に移動する。すなわち、チャンクの重複の特性が、FSC(frequent and short chunk series)である場合に、キャッシュ移動部26は、該当するデータを、階層化されたキャッシュの高速のSSD13に移動する。また、キャッシュ移動部26は、移動したチャンクをメモリ11から削除するとともに、移動したチャンクの情報を重複管理情報111から削除する。   When registering a new chunk in the memory 11, the cache moving unit 26 extracts an LRU chunk from the chunks stored in the memory 11 when the number of chunks stored in the memory 11 is the upper limit. The extracted chunk is a deletion target. The cache moving unit 26 moves the data including the deletion target chunk to one of the caches of the disk 12 and the SSD 13 according to the predicted continuation length at the time of duplication in the deletion target chunk and the number of occurrences of the duplication. For example, the cache transfer unit 26 sets the last chunk of the duplication management information 111 as a deletion target. In addition, when the continuation 111e of the chunk to be deleted is larger than a predetermined continuation threshold, the cache transfer unit 26 moves the chunk data for the continuation 111e that continues from the chunk to the disk 12. That is, when the chunk duplication characteristic is RLC (rare and long chunk series), the cache mover 26 moves the corresponding data to the low-speed disk 12 of the hierarchical cache. In addition, when the deletion target chunk continuation 111e is equal to or smaller than a predetermined continuation threshold value, the cache transfer unit 26 determines that the deletion target chunk is greater than a predetermined appearance frequency threshold value. The included data is moved to the SSD 13. In other words, when the characteristic of chunk overlap is FSC (frequent and short chunk series), the cache mover 26 moves the corresponding data to the high-speed SSD 13 of the hierarchical cache. Further, the cache transfer unit 26 deletes the moved chunk from the memory 11 and deletes the moved chunk information from the duplication management information 111.

送信部27は、選択したチャンクについて、重複している場合には、内容が重複しているチャンクのIDのみを送信する。また、送信部27は、選択したチャンクについて、重複していない場合には、チャンクに対応するデータ(生データ)を送信する。   If the selected chunk is duplicated, the transmitting unit 27 transmits only the ID of the chunk whose contents are duplicated. Moreover, the transmission part 27 transmits the data (raw data) corresponding to a chunk, when it does not overlap about the selected chunk.

[キャッシュ保存処理の手順]
次に、実施例1に係るキャッシュ保存処理の手順を、図5A〜図5Cを参照して説明する。図5A〜図5Cは、実施例1に係るキャッシュ保存処理のフローチャートを示す図である。なお、重複中の先頭のチャンクは「重複先頭チャンク」といい、「HEADCHUNK」で表わすものとする。重複チャンクの直前の重複チャンクは「直前重複チャンク」といい、「PRECHUNK」で表わすものとする。現在の出現位置は、「現出現位置」といい、「OFFSET」で表わすものとする。メモリ11に記憶されたチャンクの数は、「datanum」で表わすものとする。HEADCHUNK、PRECHUNK、OFFSETおよびdatanumは、記憶部10に一時的に記憶されるローカルエリアである。
[Cache saving processing procedure]
Next, the procedure of the cache storage process according to the first embodiment will be described with reference to FIGS. 5A to 5C. 5A to 5C are flowcharts illustrating the cache storage process according to the first embodiment. Note that the first chunk being duplicated is referred to as “duplicate first chunk” and is represented by “HEADCHUNK”. The duplicate chunk immediately before the duplicate chunk is called “immediate duplicate chunk”, and is represented by “PRECHUNK”. The current appearance position is referred to as “current appearance position” and is represented by “OFFSET”. The number of chunks stored in the memory 11 is represented by “datanum”. HEADCHUNK, PRECHUNK, OFFSET, and dataum are local areas temporarily stored in the storage unit 10.

図5Aに示すように、チャンク分割部21は、HEADCHUNKおよびPRECHUNKにnullを設定し、OFFSETおよびdatanumに0を設定する(ステップS11)。チャンク分割部21は、データの受信を待つ(ステップS12)。   As shown in FIG. 5A, the chunk division unit 21 sets null to HEADCHUNK and PRECHUNK, and sets 0 to OFFSET and dataum (step S11). The chunk division unit 21 waits for data reception (step S12).

チャンク分割部21は、データが終了であるか否かを判定する(ステップS13)。データが終了である場合には(ステップS13;Yes)、チャンク分割部21は、キャッシュ保存処理を終了する。   The chunk division unit 21 determines whether the data is complete (step S13). When the data is finished (step S13; Yes), the chunk division unit 21 finishes the cache storage process.

一方、データが終了でない場合には(ステップS13;No)、チャンク分割部21は、データ(入力データ)を受信する(ステップS14)。チャンク分割部21は、受信した入力データを複数のチャンクに分割する(ステップS15)。そして、チャンク分割部21は、分割したチャンクのうち、1つのチャンクを選択する(ステップS16)。   On the other hand, when the data is not finished (step S13; No), the chunk division unit 21 receives the data (input data) (step S14). The chunk division unit 21 divides the received input data into a plurality of chunks (step S15). Then, the chunk dividing unit 21 selects one chunk from the divided chunks (step S16).

続いて、制御部20は、選択したチャンクに対して、キャッシュ保存処理を行う(ステップS17)。なお、キャッシュ保存処理のフローチャートについては、図5Bおよび図5Cで説明する。そして、制御部20は、全てのチャンクにおける処理が終了したか否かを判定する(ステップS18)。全てのチャンクにおける処理が終了していない場合には(ステップS18;No)、制御部20は、次のチャンクを選択させるべく、ステップS16に移行する。   Subsequently, the control unit 20 performs a cache storage process on the selected chunk (step S17). Note that the flowchart of the cache storage process will be described with reference to FIGS. 5B and 5C. And the control part 20 determines whether the process in all the chunks was complete | finished (step S18). If the processing has not been completed for all the chunks (step S18; No), the control unit 20 proceeds to step S16 to select the next chunk.

一方、全てのチャンクにおける処理が終了した場合には(ステップS18;Yes)、制御部20は、次のデータの受信待ちをさせるべく、ステップS12に移行する。   On the other hand, when the processing in all the chunks is completed (step S18; Yes), the control unit 20 proceeds to step S12 so as to wait for reception of the next data.

図5Bに示すように、ハッシュ計算部22は、選択したチャンクに対して、SHA1を用いてハッシュ値を算出する(ステップS21)。ハッシュ計算部22は、算出したハッシュ値をローカルエリアであるSHAVALに設定する。そして、重複判定部23は、選択したチャンクの重複を探索する(ステップS22)。   As shown in FIG. 5B, the hash calculator 22 calculates a hash value for the selected chunk using SHA1 (step S21). The hash calculation unit 22 sets the calculated hash value in the SHAVAL that is the local area. And the duplication determination part 23 searches for duplication of the selected chunk (step S22).

そして、重複判定部23は、選択したチャンクが新規であるか否かを判定する(ステップS23)。例えば、重複判定部23は、選択したチャンクのハッシュ値が重複管理情報111に記憶されたいずれのハッシュ値(SHA1)111aとも一致しないかどうかを判定する。   And the duplication determination part 23 determines whether the selected chunk is new (step S23). For example, the duplication determination unit 23 determines whether the hash value of the selected chunk does not match any hash value (SHA1) 111a stored in the duplication management information 111.

そして、選択したチャンクが新規である場合には(ステップS23;Yes)、新規登録部24は、新規のチャンクの情報を重複管理情報111に登録する(ステップS24)。例えば、ハッシュ値(SHA1)111aに、SHAVALに設定された値が設定される。出現位置111bに、OFFSETに設定された値が設定される。長さ111cに、チャンクの長さが設定される。出現回数111dに、「1」が設定される。継続111eに、「0」が設定される。   If the selected chunk is new (step S23; Yes), the new registration unit 24 registers the new chunk information in the duplication management information 111 (step S24). For example, the value set in SHAVAL is set in the hash value (SHA1) 111a. A value set to OFFSET is set at the appearance position 111b. The chunk length is set to the length 111c. “1” is set in the appearance count 111d. “0” is set in the continuation 111e.

そして、新規登録部24は、ローカルエリアであるHEADCHUNK(重複先頭チャンク)、OFFSET(現出現位置)およびdatanum(メモリ11に記憶されたチャンクの数)を調整する(ステップS25)。例えば、HEADCHUNKに、nullが設定される。OFFSETに、選択したチャンクの長さを加算して得られた値が設定される。datanumに、選択したチャンク分の1を加算して得られた値が設定される。   Then, the new registration unit 24 adjusts HEADCHUNK (overlapping head chunk), OFFSET (current appearance position), and dataum (number of chunks stored in the memory 11), which are local areas (step S25). For example, null is set in HEADCHUNK. A value obtained by adding the length of the selected chunk to OFFSET is set. A value obtained by adding 1 to the selected chunk is set to dataum.

そして、新規登録部24は、新規のチャンクの情報を重複管理情報111の先頭に設定する(ステップS26)。この新規のチャンクが最新で使われたからである。そして、新規登録部24は、キャッシュ保存処理におけるキャッシュ移動処理をさせるべく、ステップS41に移行する。なお、キャッシュ保存処理におけるキャッシュ移動処理のフローチャートについては、図5Cで説明する。   Then, the new registration unit 24 sets the new chunk information at the head of the duplication management information 111 (step S26). This is because this new chunk has been used recently. Then, the new registration unit 24 proceeds to step S41 in order to perform the cache transfer process in the cache storage process. Note that a flowchart of the cache transfer process in the cache storage process will be described with reference to FIG. 5C.

ステップS23において、選択したチャンクが新規でない場合には(ステップS23;No)、重複管理部25は、重複管理情報111に登録済みの、選択したチャンク(以降、登録済チャンク)の情報を取得する(ステップS27)。続いて、重複管理部25は、HEADCHUNK(重複先頭チャンク)がnullであるか否かを判定する(ステップS28)。すなわち、重複管理部25は、入力データの先頭のチャンクが認識されていないか否かを判定する。   If the selected chunk is not new in step S23 (step S23; No), the duplication management unit 25 acquires information on the selected chunk (hereinafter, registered chunk) registered in the duplication management information 111. (Step S27). Subsequently, the duplication management unit 25 determines whether or not HEADCHUNK (duplication head chunk) is null (step S28). That is, the duplication management unit 25 determines whether or not the leading chunk of the input data is recognized.

HEADCHUNK(重複先頭チャンク)がnullである場合には(ステップS28;Yes)、重複管理部25は、HEADCHUNKに登録済チャンクのハッシュ値を設定(ステップS29)する。すなわち、重複管理部25は、登録済チャンクを重複の先頭のチャンクとして認識する。そして、重複管理部25は、ステップS32に移行する。   If HEADCHUNK (duplicate head chunk) is null (step S28; Yes), the duplication management unit 25 sets the hash value of the registered chunk in HEADCHUNK (step S29). That is, the duplication management unit 25 recognizes the registered chunk as the first chunk of duplication. And the duplication management part 25 transfers to step S32.

一方、HEADCHUNK(重複先頭チャンク)がnullでない場合には(ステップS28;No)、重複管理部25は、PRECHNK(直前重複チャンク)の出現位置と長さを加算して得た値が登録済チャンクの出現位置であるか否かを判定する(ステップS30)。すなわち、重複管理部25は、登録済チャンクが直前に重複したチャンクと継続しているか否かを判定する。   On the other hand, when HEADCHUNK (duplicate head chunk) is not null (step S28; No), the duplication management unit 25 adds the appearance position and length of PRECHNK (preceding duplicate chunk) to the registered chunk. It is determined whether it is the appearance position of (step S30). That is, the duplication management unit 25 determines whether the registered chunk is continued with the chunk that was duplicated immediately before.

PRECHUNK(直前重複チャンク)の出現位置と長さを加算して得た値が登録済チャンクの出現位置でない場合には(ステップS30;No)、重複管理部25は、HEADCHUNKに登録済チャンクのハッシュ値を設定する(ステップS31)。すなわち、重複管理部25は、登録済チャンクが直前に重複したチャンクと継続していないので、登録済チャンクを重複の先頭のチャンクとして認識する。そして、重複管理部25は、ステップS32に移行する。   When the value obtained by adding the appearance position and the length of PRECHUNK (preceding duplicate chunk) is not the appearance position of the registered chunk (step S30; No), the duplication management unit 25 hashes the chunks registered in HEADCHUNK. A value is set (step S31). That is, since the registered chunk does not continue with the previously duplicated chunk, the duplication management unit 25 recognizes the registered chunk as a duplicated first chunk. And the duplication management part 25 transfers to step S32.

PRECHNK(直前重複チャンク)の出現位置と長さを加算して得た値が登録済チャンクの出現位置である場合には(ステップS30;Yes)、重複管理部25は、重複の先頭のチャンクが既に認識されているので、ステップS32に移行する。   When the value obtained by adding the appearance position and the length of PRECHNK (preceding duplicate chunk) is the appearance position of the registered chunk (step S30; Yes), the duplication management unit 25 determines that the first chunk of duplication is Since it has already been recognized, the process proceeds to step S32.

ステップS32において、重複管理部25は、HEADCHUNKの継続111eに1を加算する(ステップS32)。すなわち、重複管理部25は、重複の先頭のチャンクに対応する継続111eに1を加算する。そして、重複管理部25は、登録済チャンクの出現回数111dに1を加算する(ステップS33)。重複管理部25は、PRECHUNK(直前重複チャンク)に登録済チャンクのハッシュ値を設定する(ステップS34)。   In step S32, the duplication management unit 25 adds 1 to the HEADCHUNK continuation 111e (step S32). That is, the duplication management unit 25 adds 1 to the continuation 111e corresponding to the first chunk of duplication. And the duplication management part 25 adds 1 to the appearance count 111d of the registered chunk (step S33). The duplication management unit 25 sets the hash value of the registered chunk in PRECHUNK (previous duplication chunk) (step S34).

そして、重複管理部25は、登録済チャンクの情報を重複管理情報111の先頭に設定する(ステップS35)。この登録済チャンクが最新で使われたからである。そして、重複管理部25は、次のチャンクを選択すべく、ステップS18に戻る。   And the duplication management part 25 sets the information of the registered chunk to the head of duplication management information 111 (step S35). This is because the registered chunk was used the latest. Then, the duplication management unit 25 returns to step S18 to select the next chunk.

図5Cに示すように、キャッシュ移動部26は、以下のように、キャッシュ移動処理を実行する。キャッシュ移動部26は、datanum(メモリ11に記憶されたチャンクの数)が上限値を超えたか否かを判定する(ステップS41)。datanumが上限値を超えていない場合には(ステップS41;No)、キャッシュ移動部26は、キャッシュ移動処理を終了し、ステップS18に戻る。   As shown in FIG. 5C, the cache transfer unit 26 executes a cache transfer process as follows. The cache migration unit 26 determines whether or not the dataum (number of chunks stored in the memory 11) exceeds the upper limit value (step S41). If the dataumum does not exceed the upper limit (step S41; No), the cache transfer unit 26 ends the cache transfer process and returns to step S18.

一方、datanumが上限値を超えた場合には(ステップS41;Yes)、キャッシュ移動部26は、重複管理情報111の末尾のチャンクを削除チャンクとする(ステップS42)。すなわち、キャッシュ移動部26は、重複管理情報111の末尾のチャンクを削除対象とする。   On the other hand, when the dataumum exceeds the upper limit value (step S41; Yes), the cache transfer unit 26 sets the last chunk of the duplication management information 111 as a deletion chunk (step S42). That is, the cache transfer unit 26 sets the last chunk of the duplication management information 111 as a deletion target.

そして、キャッシュ移動部26は、削除チャンクの継続111eが継続閾値より大きいか否かを判定する(ステップS43)。削除チャンクの継続111eが継続閾値より大きい場合には(ステップS43;Yes)、キャッシュ移動部26は、削除チャンクを含むデータをディスク12に退避する(ステップS44)。例えば、キャッシュ移動部26は、削除チャンクから継続する継続111e分のチャンクのデータをディスク12に移動する。すなわち、チャンクの重複の特性が、RLC(rare and long chunk series)である場合に、キャッシュ移動部26は、該当するデータを、階層化されたキャッシュの低速のディスク12に移動する。そして、キャッシュ移動部26は、ステップS48に移行する。   Then, the cache migration unit 26 determines whether or not the deletion chunk continuation 111e is larger than the continuation threshold (step S43). When the deletion chunk continuation 111e is larger than the continuation threshold (step S43; Yes), the cache transfer unit 26 saves the data including the deletion chunk to the disk 12 (step S44). For example, the cache transfer unit 26 moves the chunk data for 111e continuing from the deleted chunk to the disk 12. That is, when the chunk duplication characteristic is RLC (rare and long chunk series), the cache mover 26 moves the corresponding data to the low-speed disk 12 of the hierarchical cache. Then, the cache transfer unit 26 proceeds to Step S48.

削除チャンクの継続111eが継続閾値以下である場合には(ステップS43;No)、キャッシュ移動部26は、削除チャンクの出現回数111dが出現回数閾値より大きいか否かを判定する(ステップS45)。削除チャンクの出現回数111dが出現回数閾値より大きい場合には(ステップS45;Yes)、キャッシュ移動部26は、削除チャンクを含むデータをSSD13に退避する(ステップS46)。例えば、キャッシュ移動部26は、削除チャンクから継続する継続111e分のチャンクのデータをSSD13に移動する。すなわち、チャンクの重複の特性が、FSC(frequent and short chunk series)である場合に、キャッシュ移動部26は、該当するデータを、階層化されたキャッシュの高速のSSD13に移動する。そして、キャッシュ移動部26は、ステップS48に移行する。   When the deletion chunk continuation 111e is equal to or less than the continuation threshold (step S43; No), the cache migration unit 26 determines whether or not the deletion chunk appearance count 111d is larger than the appearance count threshold (step S45). When the appearance count 111d of the deleted chunk is larger than the appearance count threshold (step S45; Yes), the cache transfer unit 26 saves the data including the deleted chunk to the SSD 13 (step S46). For example, the cache moving unit 26 moves the chunk data for 111e continuing from the deleted chunk to the SSD 13. In other words, when the characteristic of chunk overlap is FSC (frequent and short chunk series), the cache mover 26 moves the corresponding data to the high-speed SSD 13 of the hierarchical cache. Then, the cache transfer unit 26 proceeds to Step S48.

一方、削除チャンクの出現回数111dが出現回数閾値以下である場合には(ステップS45;No)、キャッシュ移動部26は、削除チャンクを破棄する(ステップS47)。そして、キャッシュ移動部26は、ステップS48に移行する。   On the other hand, when the deleted chunk appearance count 111d is equal to or smaller than the appearance count threshold (step S45; No), the cache transfer unit 26 discards the deleted chunk (step S47). Then, the cache transfer unit 26 proceeds to Step S48.

ステップS48において、キャッシュ移動部26は、datanum(メモリ11に記憶されたチャンクの数)から1を減算する(ステップS48)。そして、キャッシュ移動部26は、キャッシュ移動処理を終了し、ステップS18に戻る。   In step S48, the cache transfer unit 26 subtracts 1 from dataum (number of chunks stored in the memory 11) (step S48). Then, the cache transfer unit 26 ends the cache transfer process and returns to step S18.

[実施例1の効果]
上記実施例1によれば、通信装置1は、処理対象のデータが新規である場合に、処理対象のデータをメモリ11に記憶する。通信装置1は、メモリ11に記憶されたデータ毎に、処理対象のデータと重複する重複回数および処理対象のデータと重複する際に継続して重複する長さを示す継続重複長を重複履歴として管理する。通信装置1は、新規のデータを処理する際、メモリ11に記憶されたデータの数が上限である場合に、所定の削除対象のデータを抽出する。そして、通信装置1は、削除対象のデータを、ディスク12およびSSD13のいずれかのキャッシュに移動する。かかる構成によれば、通信装置1は、メモリ11のデータ数が上限である場合に、削除対象のデータをディスク12およびSSD13のいずれかのキャッシュに移動するので、以降の処理対象のデータについて、キャッシュを効率的にヒットさせることが可能となる。
[Effect of Example 1]
According to the first embodiment, the communication device 1 stores the processing target data in the memory 11 when the processing target data is new. For each piece of data stored in the memory 11, the communication device 1 uses, as the duplication history, the number of times of duplication that overlaps with the data to be processed and the continuous duplication length that indicates the length of duplication that continues when the data to be processed overlaps to manage. When processing new data, the communication device 1 extracts predetermined data to be deleted when the number of data stored in the memory 11 is the upper limit. Then, the communication device 1 moves the data to be deleted to one of the caches of the disk 12 and the SSD 13. According to such a configuration, when the number of data in the memory 11 is the upper limit, the communication device 1 moves the data to be deleted to one of the caches of the disk 12 and the SSD 13. It becomes possible to hit the cache efficiently.

また、上記実施例1によれば、通信装置1は、削除対象のデータの継続重複長が第1の閾値より大きい場合に、削除対象のデータをディスク12およびSSD13のうち低速のディスク12に移動する。かかる構成によれば、通信装置1は、削除対象のデータの重複の特性(RLC)に合わせて、削除対象のデータを最適なキャッシュに保存することができる。   Further, according to the first embodiment, the communication device 1 moves the deletion target data to the low-speed disk 12 among the disk 12 and the SSD 13 when the continuous overlap length of the deletion target data is larger than the first threshold. To do. According to such a configuration, the communication device 1 can store the deletion target data in an optimum cache in accordance with the duplication characteristic (RLC) of the deletion target data.

また、上記実施例1によれば、通信装置1は、削除対象のデータの継続重複長が第1の閾値以下である場合、且つ削除対象のデータの重複回数が第2の閾値より大きい場合に、削除対象のデータをディスク12およびSSD13のうち高速のSSD13に移動する。かかる構成によれば、通信装置1は、削除対象のデータの重複の特性(FSC)に合わせて、削除対象のデータを最適なキャッシュに保存することができる。   Further, according to the first embodiment, the communication device 1 determines that the continuous duplication length of the data to be deleted is equal to or smaller than the first threshold and the duplication count of the data to be deleted is larger than the second threshold. The data to be deleted is moved to the high-speed SSD 13 out of the disk 12 and the SSD 13. According to such a configuration, the communication device 1 can store the deletion target data in an optimal cache in accordance with the duplication characteristic (FSC) of the deletion target data.

また、上記実施例1によれば、通信装置1は、削除対象のデータの継続重複長が第1の閾値以下である場合、且つ削除対象のデータの重複回数が第2の閾値以下である場合に、削除対象のデータを破棄する。かかる構成によれば、通信装置1は、キャッシュから不要なデータを破棄することで、重要なデータを記憶する容量を増加させることができる。   Further, according to the first embodiment, the communication device 1 has a case where the continuous duplication length of the data to be deleted is equal to or smaller than the first threshold and the number of times of duplication of the data to be deleted is equal to or smaller than the second threshold. In addition, the data to be deleted is discarded. According to this configuration, the communication device 1 can increase the capacity for storing important data by discarding unnecessary data from the cache.

ところで、実施例1では、通信装置1は、過去に送信したデータを記憶するキャッシュ保存領域を階層化する場合を説明した。すなわち、通信装置1は、メモリ11に記憶されたデータが満杯になった場合に、メモリ11に記憶された所定のデータの重複の特性に応じて、階層化されたキャッシュに所定のデータを移動する。しかしながら、通信装置1は、これに限定されず、さらに、キャッシュとして使用可能なメモリ11の容量が小さい場合に、過去に送信したデータを間引きながらメモリ11に記憶するようにしても良い。   By the way, in the first embodiment, the communication apparatus 1 has described the case where the cache storage area for storing data transmitted in the past is hierarchized. That is, when the data stored in the memory 11 is full, the communication device 1 moves the predetermined data to the hierarchical cache according to the duplication characteristics of the predetermined data stored in the memory 11. To do. However, the communication apparatus 1 is not limited to this, and when the capacity of the memory 11 that can be used as a cache is small, the communication apparatus 1 may store the data transmitted in the past in the memory 11 while thinning out the data.

そこで、実施例2では、通信装置1は、さらに、キャッシュとして使用可能なメモリ11の容量が小さい場合に、過去に送信したデータを間引きながらメモリ11に記憶する場合について説明する。   Therefore, in the second embodiment, a case will be described in which the communication device 1 further stores data transmitted in the past in the memory 11 when the capacity of the memory 11 usable as a cache is small.

[通信装置の構成]
図6は、実施例2に係る通信装置の構成を示す機能ブロック図である。なお、図1に示す通信装置1と同一の構成については同一符号を示すことで、その重複する構成および動作の説明については省略する。実施例1と実施例2とが異なるところは、重複判定部23を重複判定部31に変更した点にある。実施例1と実施例2とが異なるところは、新規登録部24をサンプリングチャンク登録部32に変更した点にある。実施例1と実施例2とが異なるところは、ディスク14を追加した点にある。ディスク14は、重複管理情報211を記憶する。
[Configuration of communication device]
FIG. 6 is a functional block diagram illustrating the configuration of the communication apparatus according to the second embodiment. In addition, about the same structure as the communication apparatus 1 shown in FIG. 1, the same code | symbol is shown, and the description of the overlapping structure and operation | movement is abbreviate | omitted. The difference between the first embodiment and the second embodiment is that the overlap determination unit 23 is changed to the overlap determination unit 31. The difference between the first embodiment and the second embodiment is that the new registration unit 24 is changed to the sampling chunk registration unit 32. The difference between the first embodiment and the second embodiment is that a disk 14 is added. The disk 14 stores duplication management information 211.

ここで、実施例2に係る通信装置1のキャッシュ保存処理の一例を、図7を参照して説明する。図7は、実施例2に係る通信装置のキャッシュ保存処理の一例を示す図である。図7に示すように、通信装置1は、入力データAをチャンクと呼ばれる可変長ブロックに分割する。そして、通信装置1は、分割した各チャンクを、メモリ11の利用比率に応じて、メモリ11およびディスク14に保存する。例えば、メモリ11の利用比率が1/2である場合に、通信装置1は、新規のチャンクが出現するたびに、カウンタを1増やし、このカウンタをメモリ11の利用比率の分母である2で割った余りでチャンクの保存先を変更する。一例として、余りが0であるチャンクの保存先をメモリ11(またはディスク14)とし、余りが1であるチャンクの保存先をディスク14(またはメモリ11)とする。   Here, an example of the cache storage process of the communication device 1 according to the second embodiment will be described with reference to FIG. FIG. 7 is a diagram illustrating an example of cache storage processing of the communication apparatus according to the second embodiment. As shown in FIG. 7, the communication device 1 divides the input data A into variable length blocks called chunks. Then, the communication device 1 stores the divided chunks in the memory 11 and the disk 14 according to the usage ratio of the memory 11. For example, when the usage ratio of the memory 11 is ½, the communication device 1 increments the counter by 1 each time a new chunk appears, and divides this counter by 2, which is the denominator of the usage ratio of the memory 11. Change the chunk storage location using the remainder. As an example, the storage destination of the chunk with a remainder of 0 is the memory 11 (or disk 14), and the storage destination of the chunk with a remainder of 1 is the disk 14 (or memory 11).

図7では、通信装置1は、入力データAのキャッシュ1回目で、入力データAの分割された各チャンクについて、偶数番目のチャンクを1次キャッシュであるメモリ11に保存し、奇数番目のチャンクを2次キャッシュであるディスク14に保存する。なお、メモリ11の利用比率が1/2の場合について説明したが、これに限定されず、メモリ11の容量に応じてメモリ11の利用比率が決定されれば良い。一例として、メモリ11の利用比率が3/10の場合には、10で割った余りが0〜2であるチャンクの保存先をメモリ11とし、10で割った余りが3〜9であるチャンクの保存先をディスク14とすれば良い。   In FIG. 7, the communication device 1 stores the even-numbered chunk in the memory 11 that is the primary cache for each divided chunk of the input data A at the first cache of the input data A, and stores the odd-numbered chunk. Save to the disk 14 which is a secondary cache. Although the case where the usage ratio of the memory 11 is ½ has been described, the present invention is not limited to this, and the usage ratio of the memory 11 may be determined according to the capacity of the memory 11. As an example, when the usage ratio of the memory 11 is 3/10, the storage destination of the chunk whose remainder is 0 to 2 divided by 10 is the memory 11, and the chunk whose remainder is 3 to 9 is divided by 10 The storage destination may be the disk 14.

そして、通信装置1は、データをメモリ11に保存する際にメモリ11が満杯になった場合には、メモリ11に記憶されたチャンクのうち、使われていない一番古いチャンク(LRU:Least Recently Used)を抽出する。そして、通信装置1は、抽出したチャンクを削除対象とする。   When the memory 11 becomes full when data is stored in the memory 11, the communication device 1 stores the oldest unused chunk (LRU: Least Recently) among the chunks stored in the memory 11. Used) is extracted. Then, the communication device 1 sets the extracted chunk as a deletion target.

ここでは、削除対象のチャンクが入力データAのチャンクc1であるとする。すると、通信装置1は、削除対象のチャンクc1から継続する継続分のチャンクc1〜c7のデータをディスク12またはSSD13に移動する。通信装置1は、継続分のチャンクの数が継続閾値より大きい場合には、データを、階層化されたキャッシュの低速のディスク12に移動する。通信装置1は、削除対象のチャンクc1のデータをメモリ11から削除する。   Here, it is assumed that the chunk to be deleted is the chunk c1 of the input data A. Then, the communication device 1 moves the continuation chunk data c1 to c7 from the deletion target chunk c1 to the disk 12 or the SSD 13. When the number of chunks for the continuation is larger than the continuation threshold, the communication device 1 moves the data to the low-speed disk 12 of the hierarchical cache. The communication device 1 deletes the data of the deletion target chunk c1 from the memory 11.

この後、通信装置1は、入力データAのキャッシュ2回目において、キャッシュ保存領域に入力データAのチャンクc1〜c7が全て記憶されているので、キャッシュヒットする。そして、通信装置1は、重複する入力データAの重複したチャンクc1〜c7を除去して送信することができる。   Thereafter, in the second cache of the input data A, the communication device 1 makes a cache hit because all the chunks c1 to c7 of the input data A are stored in the cache storage area. And the communication apparatus 1 can remove and transmit the duplicate chunks c1-c7 of the duplicate input data A.

これにより、通信装置1は、1次キャッシュのメモリ11の容量が小さい場合であっても、2次キャッシュのディスク14をともに用いてデータを記憶する。したがって、通信装置1は、データの重複の特性がRLC(rare and long chunk series)であるデータの一部を失わないで、データ送信の重複除去を実現することができる。   As a result, the communication device 1 stores the data using the disk 14 of the secondary cache together even when the capacity of the memory 11 of the primary cache is small. Therefore, the communication device 1 can realize data transmission deduplication without losing a part of data whose data duplication characteristic is RLC (rare and long chunk series).

図6に戻って、重複判定部31は、選択されたチャンクが、メモリ11に記憶された複数のチャンクのうちいずれかのチャンクと重複するか否かを判定する。例えば、重複判定部31は、重複管理情報111を用いて、選択されたチャンクの算出されたハッシュ値が既にメモリ11に記憶されたチャンクのハッシュ値と一致するか否かを判定する。   Returning to FIG. 6, the duplication determination unit 31 determines whether or not the selected chunk overlaps any one of the plurality of chunks stored in the memory 11. For example, the duplication determination unit 31 uses the duplication management information 111 to determine whether the calculated hash value of the selected chunk matches the hash value of the chunk already stored in the memory 11.

また、重複判定部31は、メモリ11に記憶された複数のチャンクのうちいずれかのチャンクと重複する場合には、選択されたチャンクが見つかったと判断する。そして、重複判定部31は、選択されたチャンクを間引きチャンク探索用のチャンクとする。   In addition, the duplication determination unit 31 determines that the selected chunk has been found when it overlaps with any one of the plurality of chunks stored in the memory 11. Then, the duplication determination unit 31 sets the selected chunk as a chunk for thinning-out chunk search.

また、重複判定部31は、メモリ11に記憶された複数のチャンクのいずれのチャンクとも重複しない場合には、選択されたチャンクが、ディスク14に記憶された複数のチャンクのうちいずれかのチャンクと重複するか否かを判定する。例えば、重複判定部31は、重複管理情報111に記憶された間引きチャンク探索用のチャンクの間引きチャンク位置および重複管理情報211を用いて、選択されたチャンクの算出されたハッシュ値がディスク14に記憶されたチャンクのハッシュ値と一致するか否かを判定する。   In addition, when there is no duplication with any of the plurality of chunks stored in the memory 11, the duplication determination unit 31 selects the selected chunk as one of the plurality of chunks stored in the disk 14. Determine whether they overlap. For example, the duplication determination unit 31 stores the calculated hash value of the selected chunk in the disk 14 using the decimation chunk position for decimation chunk search and the duplication management information 211 stored in the duplication management information 111. It is determined whether or not it matches the hash value of the designated chunk.

また、重複判定部31は、選択されたチャンクが、ディスク14に記憶された複数のチャンクのうちいずれかのチャンクと重複する場合には、選択されたチャンクが見つかったと判断する。また、重複判定部31は、選択されたチャンクが、ディスク14に記憶された複数のチャンクのいずれのチャンクとも重複しない場合には、選択されたチャンクが見つからなかったと判断する。   The duplication determination unit 31 determines that the selected chunk has been found when the selected chunk overlaps any one of the plurality of chunks stored in the disk 14. The duplication determination unit 31 determines that the selected chunk has not been found when the selected chunk does not overlap with any of the plurality of chunks stored in the disk 14.

ここで、メモリ11に記憶された重複管理情報111、ディスク14に記憶された重複管理情報211のデータ構造について、図8を参照して説明する。図8は、実施例2に係る重複管理情報のデータ構造の一例を示す図である。   Here, the data structures of the duplication management information 111 stored in the memory 11 and the duplication management information 211 stored in the disk 14 will be described with reference to FIG. FIG. 8 is a diagram illustrating an example of a data structure of duplication management information according to the second embodiment.

図8上図は、メモリ11に記憶される重複管理情報111のデータ構造の一例を示す図である。メモリ11に記憶される重複管理情報111に関し、図4に示す重複管理情報111と同一の構成については同一符号を示すことで、その重複する構成の説明については省略する。図8上図に示す重複管理情報111が、図4に示す重複管理情報111と異なるところは、間引きチャンク位置111fを追加した点にある。図8下図は、ディスク14に記憶される重複管理情報211のデータ構造の一例を示す図である。図8下図に示すディスク14に記憶される重複管理情報111は、図4に示す重複管理情報111と同一の構成であるので、その重複する構成の説明については省略する。   The upper part of FIG. 8 is a diagram illustrating an example of the data structure of the duplication management information 111 stored in the memory 11. Regarding the duplication management information 111 stored in the memory 11, the same components as those in the duplication management information 111 shown in FIG. 8 differs from the duplication management information 111 shown in FIG. 4 in that a thinned chunk position 111f is added. The lower part of FIG. 8 is a diagram showing an example of the data structure of the duplication management information 211 stored in the disk 14. Since the duplication management information 111 stored in the disk 14 shown in the lower diagram of FIG. 8 has the same configuration as that of the duplication management information 111 shown in FIG. 4, description of the duplicate configuration is omitted.

間引きチャンク位置111fは、間引きしたチャンクの情報について、ディスク14の重複管理情報211に記憶された位置を示す。すなわち、間引きチャンク位置111fは、間引きしたチャンクの情報への位置を示す。図8には、入力データに含まれるチャンクx、yの各チャンクの情報が記憶されている。ハッシュ値(SHA1)111aが「xxx」である情報は、チャンクxの情報である。ハッシュ値(SHA1)211aが「yyy」である情報は、チャンクyの情報である。チャンクxの間引きチャンク位置111fには、チャンクyの情報への位置が設定されている。重複判定部31は、チャンクxのハッシュ値がメモリ11上の重複管理情報111で見つかったので、チャンクxを間引きチャンク探索用のチャンクとする。重複判定部31は、チャンクyのハッシュ値がメモリ11上の重複管理情報111で見つからなかったので、間引きチャンク探索用のチャンクxの間引きチャンク位置111fからディスク14に記憶されたチャンクの情報を辿る。そして、重複判定部31は、チャンクyの算出されたハッシュ値がディスク14上の重複管理情報211のハッシュ値と一致するか否かを判定し、チャンクyの情報を見つける。   The thinned chunk position 111f indicates the position stored in the duplication management information 211 of the disk 14 regarding the thinned chunk information. That is, the thinned chunk position 111f indicates the position of the thinned chunk information. In FIG. 8, information on each chunk x and y included in the input data is stored. The information whose hash value (SHA1) 111a is “xxx” is the information of chunk x. The information whose hash value (SHA1) 211a is “yyy” is chunk y information. The position to the information of the chunk y is set in the thinned chunk position 111f of the chunk x. Since the hash value of the chunk x is found in the duplicate management information 111 on the memory 11, the duplication determination unit 31 sets the chunk x as a chunk for thinning-out chunk search. Since the hash value of chunk y was not found in the duplicate management information 111 on the memory 11, the duplication determination unit 31 traces the chunk information stored in the disk 14 from the thinned chunk position 111f for the thinned chunk search chunk x. . Then, the duplication determination unit 31 determines whether the calculated hash value of the chunk y matches the hash value of the duplication management information 211 on the disk 14, and finds information on the chunk y.

図6に戻って、サンプリングチャンク登録部32は、選択されたチャンクが重複判定部31によって見つからなかった場合には、選択されたチャンクの保存先を決定する。例えば、サンプリングチャンク登録部32は、新規のチャンクが出現するたびに1ずつ加算されるカウンタの値を、予め定められたメモリ11の利用比率の分母の値で割った余りを算出する。また、サンプリングチャンク登録部32は、余りが0以上であって予め定められたメモリ11の利用比率の分子の値より小さい場合には、選択されたチャンクをメモリ11に保存する。また、サンプリングチャンク登録部32は、余りが予め定められたメモリ11の利用比率の分子の値以上である場合には、選択されたチャンクをディスク14に保存する。   Returning to FIG. 6, when the selected chunk is not found by the duplication determination unit 31, the sampling chunk registration unit 32 determines the storage destination of the selected chunk. For example, the sampling chunk registration unit 32 calculates the remainder obtained by dividing the value of the counter that is incremented by one each time a new chunk appears by the value of the denominator of the predetermined usage ratio of the memory 11. In addition, the sampling chunk registration unit 32 stores the selected chunk in the memory 11 when the remainder is 0 or more and is smaller than the predetermined numerator value of the usage ratio of the memory 11. Further, the sampling chunk registration unit 32 stores the selected chunk in the disk 14 when the remainder is equal to or greater than a predetermined numerator value of the usage ratio of the memory 11.

[キャッシュ保存処理の手順]
次に、実施例2に係るキャッシュ保存処理の手順を、図9A〜図9Dを参照して説明する。図9A〜図9Dは、実施例2に係るキャッシュ保存処理のフローチャートを示す図である。図9Aおよび図9Bに示すフローチャートに関し、図5Aおよび図5Bに示すフローチャートと同一の動作については同一符号を示すことで、その重複する動作の説明については略記する。なお、重複中の先頭のチャンクは「重複先頭チャンク」といい、「HEADCHUNK」で表わすものとする。重複チャンクの直前の重複チャンクは「直前重複チャンク」といい、「PRECHUNK」で表わすものとする。現在の出現位置は、「現出現位置」といい、「OFFSET」で表わすものとする。メモリ11に記憶されたチャンクの数は、「datanum」で表わすものとする。新規のチャンクの数は、「チャンクカウンタ」といい、「counter」で表わすものとする。HEADCHUNK、PRECHUNK、OFFSET、datanumおよびcounterは、記憶部10に一時的に記憶されるローカルエリアである。また、メモリ11の利用比率は、n/m(n,m:正の整数)であるとする。
[Cache saving processing procedure]
Next, the procedure of the cache storage process according to the second embodiment will be described with reference to FIGS. 9A to 9D. 9A to 9D are flowcharts of the cache storage process according to the second embodiment. Regarding the flowcharts shown in FIGS. 9A and 9B, the same operations as those in the flowcharts shown in FIGS. 5A and 5B are denoted by the same reference numerals, and the description of the overlapping operations will be omitted. Note that the first chunk being duplicated is referred to as “duplicate first chunk” and is represented by “HEADCHUNK”. The duplicate chunk immediately before the duplicate chunk is called “immediate duplicate chunk”, and is represented by “PRECHUNK”. The current appearance position is referred to as “current appearance position” and is represented by “OFFSET”. The number of chunks stored in the memory 11 is represented by “datanum”. The number of new chunks is referred to as “chunk counter” and is represented by “counter”. HEADCHUNK, PRECHUNK, OFFSET, dataumum and counter are local areas temporarily stored in the storage unit 10. Further, the usage ratio of the memory 11 is assumed to be n / m (n, m: a positive integer).

図9Aに示すように、チャンク分割部21は、HEADCHUNKおよびPRECHUNKにnullを設定し、OFFSET、datanumおよびcounterに0を設定する(ステップS11A)。チャンク分割部21は、データの受信を待つ(ステップS12)。   As shown in FIG. 9A, the chunk division unit 21 sets null to HEADCHUNK and PRECHUNK, and sets 0 to OFFSET, datatum, and counter (step S11A). The chunk division unit 21 waits for data reception (step S12).

チャンク分割部21は、データが終了であるか否かを判定する(ステップS13)。データが終了である場合には(ステップS13;Yes)、チャンク分割部21は、キャッシュ保存処理を終了する。   The chunk division unit 21 determines whether the data is complete (step S13). When the data is finished (step S13; Yes), the chunk division unit 21 finishes the cache storage process.

一方、データが終了でない場合には(ステップS13;No)、チャンク分割部21は、データ(入力データ)を受信する(ステップS14)。チャンク分割部21は、受信した入力データを複数のチャンクに分割する(ステップS15)。そして、チャンク分割部21は、分割したチャンクのうち、1つのチャンクを選択する(ステップS16)。   On the other hand, when the data is not finished (step S13; No), the chunk division unit 21 receives the data (input data) (step S14). The chunk division unit 21 divides the received input data into a plurality of chunks (step S15). Then, the chunk dividing unit 21 selects one chunk from the divided chunks (step S16).

続いて、制御部20は、選択したチャンクに対して、キャッシュ保存処理を行う(ステップS17)。なお、キャッシュ保存処理のフローチャートについては、図9B〜図9Dで説明する。そして、制御部20は、全てのチャンクにおける処理が終了したか否かを判定する(ステップS18)。全てのチャンクにおける処理が終了していない場合には(ステップS18;No)、制御部20は、次のチャンクを選択させるべく、ステップS16に移行する。   Subsequently, the control unit 20 performs a cache storage process on the selected chunk (step S17). The flowchart of the cache storage process will be described with reference to FIGS. 9B to 9D. And the control part 20 determines whether the process in all the chunks was complete | finished (step S18). If the processing has not been completed for all the chunks (step S18; No), the control unit 20 proceeds to step S16 to select the next chunk.

一方、全てのチャンクにおける処理が終了した場合には(ステップS18;Yes)、制御部20は、次のデータの受信待ちをさせるべく、ステップS12に移行する。   On the other hand, when the processing in all the chunks is completed (step S18; Yes), the control unit 20 proceeds to step S12 so as to wait for reception of the next data.

図9Bに示すように、ハッシュ計算部22は、選択したチャンクに対して、SHA1を用いてハッシュ値を算出する(ステップS21)。ハッシュ計算部22は、算出したハッシュ値をローカルエリアであるSHAVALに設定する。   As shown in FIG. 9B, the hash calculator 22 calculates a hash value for the selected chunk using SHA1 (step S21). The hash calculation unit 22 sets the calculated hash value in the SHAVAL that is the local area.

そして、重複判定部31は、選択したチャンクの重複を探索する(ステップS22A)。なお、チャンクの重複探索処理のフローチャートについては、図9Dで説明する。   And the duplication determination part 31 searches for duplication of the selected chunk (step S22A). A flowchart of the chunk duplication search process will be described with reference to FIG. 9D.

そして、重複判定部31は、チャンクの重複探索処理に基づいて、選択したチャンクが新規であるか否かを判定する(ステップS23)。例えば、重複判定部31は、チャンクの重複探索処理により、選択したチャンクが見つからなかったか否かを判定する。選択したチャンクが見つからなかった場合には、選択したチャンクは新規である。選択したチャンクがみつかった場合には、選択したチャンクは新規でない。   And the duplication determination part 31 determines whether the selected chunk is new based on the duplication search process of a chunk (step S23). For example, the duplication determination unit 31 determines whether the selected chunk was not found by the chunk duplication search process. If the selected chunk is not found, the selected chunk is new. If the selected chunk is found, the selected chunk is not new.

そして、選択したチャンクが新規である場合には(ステップS23;Yes)、サンプリングチャンク登録部32は、サンプリングチャンク登録処理を実行する(ステップS24A)。すなわち、サンプリングチャンク登録処理は、選択したチャンクをサンプリングし、サンプリングに応じてメモリ11またはディスク14へ登録する。なお、サンプリングチャンク登録処理のフローチャートについては、図9Cで説明する。   If the selected chunk is new (step S23; Yes), the sampling chunk registration unit 32 executes a sampling chunk registration process (step S24A). That is, in the sampling chunk registration process, the selected chunk is sampled and registered in the memory 11 or the disk 14 according to the sampling. A flowchart of the sampling chunk registration process will be described with reference to FIG. 9C.

そして、サンプリングチャンク登録部32は、ローカルエリアであるHEADCHUNK(重複先頭チャンク)、OFFSET(現出現位置)、datanum(メモリ11に記憶されたチャンクの数)およびcounter(チャンクカウンタ)を調整する(ステップS25A)。例えば、HEADCHUNKに、nullが設定される。OFFSETに、選択したチャンクの長さを加算して得られた値が設定される。datanumに、選択したチャンク分の1を加算して得られた値が設定される。counterに、選択したチャンク分の1を加算して得られた値が設定される。   Then, the sampling chunk registration unit 32 adjusts HEADCHUNK (overlapping head chunk), OFFSET (current appearance position), dataum (number of chunks stored in the memory 11), and counter (chunk counter), which are local areas (step). S25A). For example, null is set in HEADCHUNK. A value obtained by adding the length of the selected chunk to OFFSET is set. A value obtained by adding 1 to the selected chunk is set to dataum. A value obtained by adding 1 to the selected chunk is set in the counter.

そして、新規登録部24は、新規のチャンクの情報を重複管理情報111の先頭に設定する(ステップS26)。この新規のチャンクが最新で使われたからである。そして、新規登録部24は、キャッシュ保存処理におけるキャッシュ移動処理をさせる。なお、キャッシュ保存処理におけるキャッシュ移動処理のフローチャートについては、図5Cで説明したので、その重複する動作の説明については省略する。   Then, the new registration unit 24 sets the new chunk information at the head of the duplication management information 111 (step S26). This is because this new chunk has been used recently. Then, the new registration unit 24 performs a cache transfer process in the cache saving process. Since the flowchart of the cache transfer process in the cache storage process has been described with reference to FIG. 5C, the description of the overlapping operation is omitted.

ステップS23において、選択したチャンクが新規でない場合には(ステップS23;No)、重複管理部25は、重複管理処理を実行する。なお、重複管理処理のフローチャート(ステップS27〜S35)については、図5Bで説明したので、その重複する動作の説明については省略する。   In step S23, when the selected chunk is not new (step S23; No), the duplication management unit 25 executes duplication management processing. In addition, since the flowchart (steps S27 to S35) of the duplication management process has been described with reference to FIG. 5B, description of the overlapping operation is omitted.

図9Cに示すように、サンプリングチャンク登録部32は、以下のように、サンプリングチャンク登録処理を実行する。サンプリングチャンク登録部32は、選択したチャンクの保存先を決定すべく、counter(チャンクカウンタ)をメモリ11の利用比率の分母の値mで割った余りを算出する(ステップS51)。   As illustrated in FIG. 9C, the sampling chunk registration unit 32 performs the sampling chunk registration process as follows. The sampling chunk registration unit 32 calculates a remainder obtained by dividing the counter (chunk counter) by the denominator value m of the usage ratio of the memory 11 in order to determine the storage destination of the selected chunk (step S51).

そして、サンプリングチャンク登録部32は、余りが0以上且つメモリ11の利用比率の分子の値であるnより小さいか否かを判定する(ステップS52)。余りが0以上且つメモリ11の利用比率の分子の値であるnより小さい場合には(ステップS52;Yes)、サンプリングチャンク登録部32は、選択したチャンクをメモリ11に保存する(ステップS53)。   Then, the sampling chunk registration unit 32 determines whether or not the remainder is 0 or more and smaller than n which is the numerator value of the usage ratio of the memory 11 (step S52). If the remainder is not less than 0 and smaller than n, which is the numerator value of the usage ratio of the memory 11 (step S52; Yes), the sampling chunk registration unit 32 stores the selected chunk in the memory 11 (step S53).

そして、サンプリングチャンク登録部32は、選択したチャンクの情報をメモリ11上の重複管理情報111に登録する(ステップS54)。例えば、ハッシュ値(SHA1)111aに、SHAVALに設定された値が設定される。出現位置111bに、OFFSETに設定された値が設定される。長さ111cに、チャンクの長さが設定される。出現回数111dに、「1」が設定される。継続111eに、「0」が設定される。   Then, the sampling chunk registration unit 32 registers the information of the selected chunk in the duplication management information 111 on the memory 11 (Step S54). For example, the value set in SHAVAL is set in the hash value (SHA1) 111a. A value set to OFFSET is set at the appearance position 111b. The chunk length is set to the length 111c. “1” is set in the appearance count 111d. “0” is set in the continuation 111e.

そして、サンプリングチャンク登録部32は、余りがメモリ11の利用比率の分子の値であるnを1減じた値であるか否かを判定する(ステップS55)。すなわち、サンプリングチャンク登録部32は、今回受信した入力データの複数チャンクの中でメモリ11に記憶される最後のチャンクであるか否かを判定する。一例として、メモリ11の利用比率が2/5である場合とする。分割されたチャンクa,b,cの余りが0,1,2であるとする。すると、チャンクbの余りは1であり、チャンクbの余りが、メモリ11の利用比率の分子の値である2を1減じた値1である。したがって、今回受信した入力データの複数チャンクの中でチャンクbがメモリ11に記憶される最後のチャンクである。   Then, the sampling chunk registration unit 32 determines whether or not the remainder is a value obtained by subtracting 1 which is a numerator value of the usage ratio of the memory 11 (step S55). That is, the sampling chunk registration unit 32 determines whether or not it is the last chunk stored in the memory 11 among the plurality of chunks of the input data received this time. As an example, it is assumed that the usage ratio of the memory 11 is 2/5. It is assumed that the remainders of the divided chunks a, b, and c are 0, 1, and 2. Then, the remainder of the chunk b is 1, and the remainder of the chunk b is a value 1 obtained by subtracting 1 which is 2 that is the numerator value of the utilization ratio of the memory 11. Therefore, chunk b is the last chunk stored in memory 11 among the plurality of chunks of input data received this time.

そして、余りがメモリ11の利用比率の分子の値であるnを1減じた値である場合には(ステップS55;Yes)、サンプリングチャンク登録部32は、選択したチャンクを、間引きチャンク位置保存用のチャンクとする(ステップS56)。すなわち、サンプリングチャンク登録部32は、選択したチャンクを、後続するチャンクの間引き位置を更新するチャンクとする。そして、サンプリングチャンク登録部32は、サンプリングチャンク登録処理し、ステップS25Aに戻る。   If the remainder is a value obtained by subtracting n, which is the numerator value of the utilization ratio of the memory 11 (step S55; Yes), the sampling chunk registration unit 32 stores the selected chunk for thinning chunk position storage. (Step S56). That is, the sampling chunk registration unit 32 sets the selected chunk as a chunk for updating the thinning position of the subsequent chunk. And the sampling chunk registration part 32 performs a sampling chunk registration process, and returns to step S25A.

一方、余りがメモリ11の利用比率の分子の値であるnを1減じた値でない場合には(ステップS55;No)、サンプリングチャンク登録部32は、選択したチャンクを、間引きチャンク位置保存用のチャンクとしない。そして、サンプリングチャンク登録部32は、サンプリングチャンク登録処理を終了し、ステップS25Aに戻る。   On the other hand, when the remainder is not a value obtained by subtracting 1 which is the numerator value of the usage ratio of the memory 11 (step S55; No), the sampling chunk registration unit 32 stores the selected chunk for saving the thinned chunk position. Don't chunk. And the sampling chunk registration part 32 complete | finishes a sampling chunk registration process, and returns to step S25A.

ステップS52において、余りが0以上且つメモリ11の利用比率の分子の値であるnより小さくない場合には(ステップS52;No)、サンプリングチャンク登録部32は、選択したチャンクをディスク14に保存する(ステップS57)。   In step S52, when the remainder is not less than 0 and not smaller than n which is the numerator value of the utilization ratio of the memory 11 (step S52; No), the sampling chunk registration unit 32 stores the selected chunk in the disk 14. (Step S57).

そして、サンプリングチャンク登録部32は、選択したチャンクの情報をディスク14上の重複管理情報211に登録する(ステップS58)。例えば、ハッシュ値(SHA1)211aに、SHAVALに設定された値が設定される。出現位置211bに、OFFSETに設定された値が設定される。長さ211cに、チャンクの長さが設定される。出現回数211dに、「1」が設定される。継続211eに、「0」が設定される。   Then, the sampling chunk registration unit 32 registers the selected chunk information in the duplication management information 211 on the disk 14 (step S58). For example, the value set in SHAVAL is set in the hash value (SHA1) 211a. A value set to OFFSET is set in the appearance position 211b. The chunk length is set in the length 211c. “1” is set in the appearance count 211d. In the continuation 211e, “0” is set.

そして、サンプリングチャンク登録部32は、間引きチャンク位置保存用のチャンクの間引き位置を更新する(ステップS59)。例えば、重複管理情報111の、間引きチャンク位置保存用のチャンクに対する間引きチャンク位置111fに、選択したチャンクの重複管理情報211への位置が設定される。そして、サンプリングチャンク登録部32は、サンプリングチャンク登録処理を終了し、ステップS25Aに戻る。   Then, the sampling chunk registration unit 32 updates the thinning position of the chunk for saving the thinned chunk position (step S59). For example, the position of the selected chunk in the duplication management information 211 is set in the thinning chunk position 111f for the chunk for saving the thinned chunk position of the duplication management information 111. And the sampling chunk registration part 32 complete | finishes a sampling chunk registration process, and returns to step S25A.

図9Dに示すように、重複判定部31は、以下のように、チャンクの重複探索処理を実行する。重複判定部31は、メモリ11で、選択したチャンクの重複を探索する(ステップS61)。例えば、重複判定部31は、メモリ11上の重複管理情報111と、選択したチャンクのハッシュ値とを用いて、選択したチャンクの重複を探索する。   As illustrated in FIG. 9D, the duplication determination unit 31 performs chunk duplication search processing as follows. The duplication determination unit 31 searches the memory 11 for duplication of the selected chunk (step S61). For example, the duplication determination unit 31 searches for duplication of the selected chunk using the duplication management information 111 on the memory 11 and the hash value of the selected chunk.

そして、重複判定部31は、メモリ11で、選択したチャンクが見つかったか否かを判定する(ステップS62)。選択したチャンクが見つかった場合には(ステップS62;Yes)、重複判定部31は、選択したチャンクを間引きチャンク探索用のチャンクとする(ステップS63)。そして、重複判定部31は、選択したチャンクが見つかったことをパラメータとしてステップS23に戻る。   And the duplication determination part 31 determines whether the selected chunk was found in the memory 11 (step S62). When the selected chunk is found (step S62; Yes), the duplication determination unit 31 sets the selected chunk as a chunk for thinning-out chunk search (step S63). Then, the duplication determination unit 31 returns to step S23 with the fact that the selected chunk has been found as a parameter.

一方、選択したチャンクが見つからなかった場合には(ステップS62;No)、重複判定部31は、間引きチャンク探索用のチャンクの間引きチャンク位置を探索する(ステップS64)。すなわち、重複判定部31は、ディスク14で、選択したチャンクの重複を探索する。例えば、重複判定部31は、重複管理情報111に記憶された間引きチャンク探索用のチャンクの間引きチャンク位置111fと、ディスク14上の重複管理情報211とを用いて、選択したチャンクの重複を探索する。   On the other hand, when the selected chunk is not found (step S62; No), the duplication determination unit 31 searches for a thinned-out chunk position for the thinned-out chunk search chunk (step S64). That is, the duplication judgment unit 31 searches the disc 14 for duplication of the selected chunk. For example, the duplication determination unit 31 searches for duplication of the selected chunk using the decimation chunk position 111f for the decimation chunk search chunk stored in the duplication management information 111 and the duplication management information 211 on the disk 14. .

そして、重複判定部31は、ディスク14で、選択したチャンクが見つかったか否かを判定する(ステップS65)。選択したチャンクが見つからなかった場合には(ステップS65;No)、重複判定部31は、選択したチャンクが見つからなかったことをパラメータとしてステップS23に戻る。選択したチャンクが見つかった場合には(ステップS65;Yes)、重複判定部31は、選択したチャンクが見つかったことをパラメータとしてステップS23に戻る。   Then, the duplication determination unit 31 determines whether or not the selected chunk has been found on the disk 14 (step S65). When the selected chunk is not found (step S65; No), the duplication determination unit 31 returns to step S23 with the parameter that the selected chunk is not found as a parameter. When the selected chunk is found (step S65; Yes), the duplication determination unit 31 returns to step S23 with the fact that the selected chunk is found as a parameter.

[実施例2の効果]
上記実施例2によれば、通信装置1は、メモリ11およびディスク14を有する。通信装置1は、メモリ11の利用比率に応じて、処理対象のデータを、メモリ11およびディスク14のいずれかのキャッシュに記憶する。かかる構成によれば、通信装置1は、メモリ11の容量が小さい場合であっても、ディスク14をともに用いてデータを記憶する。したがって、通信装置1は、データの重複の特性がRLC(rare and long chunk series)であるデータの一部を失わないで、重複除去を実現することができる。
[Effect of Example 2]
According to the second embodiment, the communication device 1 includes the memory 11 and the disk 14. The communication device 1 stores the data to be processed in one of the caches of the memory 11 and the disk 14 in accordance with the usage ratio of the memory 11. According to such a configuration, the communication device 1 uses the disk 14 to store data even when the capacity of the memory 11 is small. Therefore, the communication device 1 can realize deduplication without losing a part of data whose data duplication characteristic is RLC (rare and long chunk series).

[その他]
なお、通信装置1は、既知のパーソナルコンピュータ、ワークステーション等の情報処理装置に、上記した重複判定部23、新規登録部24、重複管理部25、キャッシュ移動部26などの各機能を搭載することによって実現することができる。
[Others]
Note that the communication device 1 is equipped with functions such as the above-described duplication determination unit 23, new registration unit 24, duplication management unit 25, and cache migration unit 26 in an information processing apparatus such as a known personal computer or workstation. Can be realized.

また、上記実施例1,2では、通信装置1は、過去に送信したデータを記憶するキャッシュ保存領域を階層化する。そして、通信装置1が、上位のキャッシュ(例えばメモリ11)が満杯であるタイミングで、データの重複の特性に応じて、データを所定の下位のキャッシュ(例えば、ディスク12、SSD13)に移動する場合を説明した。しかしながら、通信装置1の場合に限定されず、情報処理装置が、過去に処理したデータを記憶するキャッシュ保存領域を階層化する。そして、情報処理装置が、上位のキャッシュ(例えばメモリ11)が満杯であるタイミングで、データの重複の特性に応じて、データを所定の下位のキャッシュ(例えば、ディスク12、SSD13)に移動する場合であっても良い。例えば、情報処理装置内の、CPUと主記憶装置との間にあるキャッシュメモリに適用しても良い。このキャッシュメモリをキャッシュ保存領域とすれば良い。   Moreover, in the said Example 1, 2, the communication apparatus 1 hierarchizes the cache preservation | save area | region which memorize | stores the data transmitted in the past. When the communication device 1 moves the data to a predetermined lower cache (for example, the disk 12 or the SSD 13) according to the data duplication characteristic at the timing when the upper cache (for example, the memory 11) is full. Explained. However, the present invention is not limited to the case of the communication device 1, and the information processing device hierarchizes a cache storage area for storing data processed in the past. When the information processing apparatus moves the data to a predetermined lower cache (for example, the disk 12 or the SSD 13) according to the data duplication characteristic at the timing when the upper cache (for example, the memory 11) is full. It may be. For example, the present invention may be applied to a cache memory between the CPU and the main storage device in the information processing apparatus. This cache memory may be used as a cache storage area.

また、図示した装置の各構成要素は、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、装置の分散・統合の具体的態様は図示のものに限られず、その全部または一部を、各種の負荷や使用状況等に応じて、任意の単位で機能的または物理的に分散・統合して構成することができる。例えば、チャンク分割部21とハッシュ計算部22とを1個の部として統合しても良い。一方、キャッシュ移動部26を、キャッシュが満杯であるか否かを判定する判定部と、キャッシュが満杯である場合に該当データを移動する移動部とに分散しても良い。また、記憶部10を通信装置1の外部装置に記憶するようにしても良いし、記憶部10を記憶した外部装置を通信装置1とネットワーク経由で接続するようにしても良い。   In addition, each component of the illustrated apparatus does not necessarily need to be physically configured as illustrated. In other words, the specific mode of device distribution / integration is not limited to that shown in the figure, and all or part of the device is functionally or physically distributed / integrated in an arbitrary unit according to various loads or usage conditions. Can be configured. For example, the chunk division unit 21 and the hash calculation unit 22 may be integrated as one unit. On the other hand, the cache transfer unit 26 may be distributed to a determination unit that determines whether or not the cache is full and a transfer unit that moves the corresponding data when the cache is full. In addition, the storage unit 10 may be stored in an external device of the communication device 1, or the external device storing the storage unit 10 may be connected to the communication device 1 via a network.

また、上記実施例で説明した各種の処理は、あらかじめ用意されたプログラムをパーソナルコンピュータやワークステーション等のコンピュータで実行することによって実現することができる。そこで、以下では、図1に示した通信装置1と同様の機能を実現するキャッシュ保存プログラムを実行するコンピュータの一例を説明する。図10は、キャッシュ保存プログラムを実行するコンピュータの一例を示す図である。   The various processes described in the above embodiments can be realized by executing a program prepared in advance on a computer such as a personal computer or a workstation. Therefore, in the following, an example of a computer that executes a cache storage program that realizes the same function as that of the communication device 1 illustrated in FIG. 1 will be described. FIG. 10 is a diagram illustrating an example of a computer that executes a cache storage program.

図10に示すように、コンピュータ200は、各種演算処理を実行するCPU203と、ユーザからのデータの入力を受け付ける入力装置215と、表示装置209を制御する表示制御部207とを有する。また、コンピュータ200は、記憶媒体からプログラムなどを読取るドライブ装置213と、ネットワークを介して他のコンピュータとの間でデータの授受を行う通信制御部217とを有する。また、コンピュータ200は、各種情報を一時記憶するメモリ201と、HDD205を有する。そして、メモリ201、CPU203、HDD205、表示制御部207、ドライブ装置213、入力装置215、通信制御部217は、バス219で接続されている。   As illustrated in FIG. 10, the computer 200 includes a CPU 203 that executes various arithmetic processes, an input device 215 that receives input of data from the user, and a display control unit 207 that controls the display device 209. The computer 200 also includes a drive device 213 that reads a program and the like from a storage medium, and a communication control unit 217 that exchanges data with other computers via a network. The computer 200 also includes a memory 201 that temporarily stores various types of information and an HDD 205. The memory 201, CPU 203, HDD 205, display control unit 207, drive device 213, input device 215, and communication control unit 217 are connected by a bus 219.

ドライブ装置213は、例えばリムーバブルディスク141用の装置である。HDD205は、キャッシュ保存プログラム205aおよびキャッシュ保存関連情報205bを記憶する。   The drive device 213 is a device for a removable disk 141, for example. The HDD 205 stores a cache storage program 205a and cache storage related information 205b.

CPU203は、キャッシュ保存プログラム205aを読み出して、メモリ201に展開し、プロセスとして実行する。かかるプロセスは、通信装置1の各機能部に対応する。キャッシュ保存関連情報205bは、重複管理情報111に対応する。そして、例えばリムーバブルディスク141が、重複管理情報111などの各情報を記憶する。   The CPU 203 reads the cache storage program 205a, expands it in the memory 201, and executes it as a process. Such a process corresponds to each functional unit of the communication device 1. The cache storage related information 205 b corresponds to the duplication management information 111. For example, the removable disk 141 stores each piece of information such as the duplication management information 111.

なお、キャッシュ保存プログラム205aについては、必ずしも最初からHDD205に記憶させておかなくても良い。例えば、コンピュータ200に挿入されるフレキシブルディスク(FD)、CD−ROM、DVDディスク、光磁気ディスク、ICカード等の「可搬用の物理媒体」に当該プログラムを記憶させておく。そして、コンピュータ200がこれらからキャッシュ保存プログラム205aを読み出して実行するようにしても良い。   Note that the cache storage program 205a is not necessarily stored in the HDD 205 from the beginning. For example, the program is stored in a “portable physical medium” such as a flexible disk (FD), a CD-ROM, a DVD disk, a magneto-optical disk, or an IC card inserted into the computer 200. Then, the computer 200 may read and execute the cache storage program 205a from these.

以上の実施例を含む実施形態に関し、さらに以下の付記を開示する。   The following supplementary notes are further disclosed with respect to the embodiments including the above examples.

(付記1)コンピュータに、
処理対象のデータが新規である場合に、前記処理対象のデータを第1のキャッシュメモリに記憶し、
前記第1のキャッシュメモリに記憶されたデータ毎に、処理対象のデータと重複する重複回数および処理対象のデータと重複する際に継続して重複する長さを示す継続重複長を重複履歴として管理し、
新規のデータを処理する際、前記第1のキャッシュメモリに記憶されたデータの数が上限である場合に、所定の削除対象のデータを抽出し、
前記重複履歴で管理された前記削除対象のデータの重複回数および継続重複長に応じて、前記削除対象のデータを、第2のキャッシュメモリおよび第3のキャッシュメモリのいずれかのキャッシュメモリに移動する
処理を実行させることを特徴とするキャッシュ保存プログラム。
(Supplementary note 1)
If the data to be processed is new, store the data to be processed in the first cache memory;
For each data stored in the first cache memory, the number of times of duplication that overlaps the data to be processed and the continuous duplication length that indicates the length of duplication that continues when overlapping with the data to be processed are managed as a duplication history And
When processing new data, if the number of data stored in the first cache memory is the upper limit, the predetermined data to be deleted is extracted,
The data to be deleted is moved to one of the second cache memory and the third cache memory according to the number of times of duplication and the continuous duplication length of the data to be deleted managed in the duplication history. A cache storage program characterized by causing processing to be executed.

(付記2)前記移動する処理は、前記削除対象のデータの継続重複長が第1の閾値より大きい場合に、前記削除対象のデータを第2のキャッシュメモリおよび第3のキャッシュメモリのうち低速の第2のキャッシュメモリに移動する
処理を実行させることを特徴とする付記1に記載のキャッシュ保存プログラム。
(Additional remark 2) When the continuous duplication length of the data to be deleted is larger than a first threshold, the process to move the data to be deleted at a lower speed among the second cache memory and the third cache memory. The cache storage program according to appendix 1, wherein a process of moving to a second cache memory is executed.

(付記3)前記移動する処理は、前記削除対象のデータの継続重複長が第1の閾値以下である場合、且つ前記削除対象のデータの重複回数が第2の閾値より大きい場合に、前記削除対象のデータを第2のキャッシュメモリおよび第3のキャッシュメモリのうち高速の第3のキャッシュメモリに移動する
処理を実行させることを特徴とする付記1に記載のキャッシュ保存プログラム。
(Supplementary Note 3) The moving process is performed when the continuous duplication length of the data to be deleted is equal to or less than a first threshold and the duplication count of the data to be deleted is larger than a second threshold. The cache storage program according to appendix 1, wherein a process of moving target data to a high-speed third cache memory among the second cache memory and the third cache memory is executed.

(付記4)前記移動する処理は、前記削除対象のデータの継続重複長が第1の閾値以下である場合、且つ前記削除対象のデータの重複回数が第2の閾値以下である場合に、前記削除対象のデータを破棄する
処理を実行させることを特徴とする付記1に記載のキャッシュ保存プログラム。
(Supplementary Note 4) The process of moving, when the continuous duplication length of the data to be deleted is less than or equal to a first threshold, and when the number of duplications of the data to be deleted is less than or equal to a second threshold, The cache storage program according to appendix 1, wherein processing for discarding data to be deleted is executed.

(付記5)前記第1のキャッシュメモリが、1次キャッシュメモリと2次キャッシュメモリを有する場合に、前記処理対象のデータを前記第1のキャッシュメモリに記憶する際、前記1次キャッシュメモリの利用比率に応じて、前記処理対象のデータを、前記1次キャッシュメモリおよび前記2次キャッシュメモリのいずれかのキャッシュメモリに記憶する
処理を実行させることを特徴とする付記1に記載のキャッシュ保存プログラム。
(Supplementary Note 5) When the first cache memory has a primary cache memory and a secondary cache memory, when the processing target data is stored in the first cache memory, use of the primary cache memory The cache storage program according to appendix 1, wherein a process of storing the data to be processed in either the primary cache memory or the secondary cache memory is executed according to a ratio.

(付記6)コンピュータが、
処理対象のデータが新規である場合に、前記処理対象のデータを第1のキャッシュメモリに記憶し、
前記第1のキャッシュメモリに記憶されたデータ毎に、処理対象のデータと重複する重複回数および処理対象のデータと重複する際に継続して重複する長さを示す継続重複長を重複履歴として管理し、
新規のデータを処理する際、前記第1のキャッシュメモリに記憶されたデータの数が上限である場合に、所定の削除対象のデータを抽出し、
前記重複履歴で管理された前記削除対象のデータの重複回数および継続重複長に応じて、前記削除対象のデータを、第2のキャッシュメモリおよび第3のキャッシュメモリのいずれかのキャッシュメモリに移動する
各処理を実行することを特徴とするキャッシュ保存方法。
(Appendix 6)
If the data to be processed is new, store the data to be processed in the first cache memory;
For each data stored in the first cache memory, the number of times of duplication that overlaps the data to be processed and the continuous duplication length that indicates the length of duplication that continues when overlapping with the data to be processed are managed as a duplication history And
When processing new data, if the number of data stored in the first cache memory is the upper limit, the predetermined data to be deleted is extracted,
The data to be deleted is moved to one of the second cache memory and the third cache memory according to the number of times of duplication and the continuous duplication length of the data to be deleted managed in the duplication history. A cache storage method characterized by executing each processing.

(付記7)処理対象のデータが新規である場合に、前記処理対象のデータを第1のキャッシュメモリに登録する登録部と、
前記第1のキャッシュメモリに記憶されたデータ毎に、処理対象のデータと重複する重複回数および処理対象のデータと重複する際に継続して重複する長さを示す継続重複長を重複履歴として管理する管理部と、
新規のデータを処理する際、前記第1のキャッシュメモリに記憶されたデータの数が上限である場合に、所定の削除対象のデータを抽出する抽出部と、
前記重複履歴で管理された前記削除対象のデータの重複回数および継続重複長に応じて、前記削除対象のデータを、第2のキャッシュメモリおよび第3のキャッシュメモリのいずれかのキャッシュメモリに移動する移動部と、
を有することを特徴とする情報処理装置。
(Supplementary Note 7) When the data to be processed is new, a registration unit that registers the data to be processed in the first cache memory;
For each data stored in the first cache memory, the number of times of duplication that overlaps the data to be processed and the continuous duplication length that indicates the length of duplication that continues when overlapping with the data to be processed are managed as a duplication history A management department to
When processing new data, when the number of data stored in the first cache memory is an upper limit, an extraction unit that extracts predetermined deletion target data;
The data to be deleted is moved to one of the second cache memory and the third cache memory according to the number of times of duplication and the continuous duplication length of the data to be deleted managed in the duplication history. A moving part;
An information processing apparatus comprising:

(付記8)送信対象のデータが新規である場合に、前記送信対象のデータを第1のキャッシュメモリに登録する登録部と、
前記第1のキャッシュメモリに記憶されたデータ毎に、送信対象のデータと重複する重複回数および送信対象のデータと重複する際に継続して重複する長さを示す継続重複長を重複履歴として管理する管理部と、
新規のデータを処理する際、前記第1のキャッシュメモリに記憶されたデータの数が上限である場合に、所定の削除対象のデータを抽出する抽出部と、
前記重複履歴で管理された前記削除対象のデータの重複回数および継続重複長に応じて、前記削除対象のデータを、第2のキャッシュメモリおよび第3のキャッシュメモリのいずれかのキャッシュメモリに移動する移動部と、
を有することを特徴とする通信装置。
(Supplementary Note 8) When the data to be transmitted is new, a registration unit that registers the data to be transmitted in the first cache memory;
For each data stored in the first cache memory, the number of times of duplication overlapping with the data to be transmitted and the continuous duplication length indicating the length of duplication when overlapping with the data to be transmitted are managed as a duplication history. A management department to
When processing new data, when the number of data stored in the first cache memory is an upper limit, an extraction unit that extracts predetermined deletion target data;
The data to be deleted is moved to one of the second cache memory and the third cache memory according to the number of times of duplication and the continuous duplication length of the data to be deleted managed in the duplication history. A moving part;
A communication apparatus comprising:

1 通信装置
10 記憶部
11 メモリ
111,211 重複管理情報
12 ディスク
13 SSD
20 制御部
21 チャンク分割部
22 ハッシュ計算部
23,31 重複判定部
24 新規登録部
25 重複管理部
26 キャッシュ移動部
27 送信部
32 サンプリングチャンク登録部
DESCRIPTION OF SYMBOLS 1 Communication apparatus 10 Memory | storage part 11 Memory 111,211 Duplication management information 12 Disk 13 SSD
DESCRIPTION OF SYMBOLS 20 Control part 21 Chunk division part 22 Hash calculation part 23,31 Duplication determination part 24 New registration part 25 Duplication management part 26 Cache movement part 27 Transmission part 32 Sampling chunk registration part

Claims (7)

コンピュータに、
処理対象のデータが新規である場合に、前記処理対象のデータを第1のキャッシュメモリに記憶し、
前記第1のキャッシュメモリに記憶されたデータ毎に、処理対象のデータと重複する重複回数および処理対象のデータと重複する際に継続して重複する長さを示す継続重複長を重複履歴として管理し、
新規のデータを処理する際、前記第1のキャッシュメモリに記憶されたデータの数が上限である場合に、所定の削除対象のデータを抽出し、
前記重複履歴で管理された前記削除対象のデータの重複回数および継続重複長に応じて、前記削除対象のデータを、第2のキャッシュメモリおよび第3のキャッシュメモリのいずれかのキャッシュメモリに移動する
処理を実行させることを特徴とするキャッシュ保存プログラム。
On the computer,
If the data to be processed is new, store the data to be processed in the first cache memory;
For each data stored in the first cache memory, the number of times of duplication that overlaps the data to be processed and the continuous duplication length that indicates the length of duplication that continues when overlapping with the data to be processed are managed as a duplication history And
When processing new data, if the number of data stored in the first cache memory is the upper limit, the predetermined data to be deleted is extracted,
The data to be deleted is moved to one of the second cache memory and the third cache memory according to the number of times of duplication and the continuous duplication length of the data to be deleted managed in the duplication history. A cache storage program characterized by causing processing to be executed.
前記移動する処理は、前記削除対象のデータの継続重複長が第1の閾値より大きい場合に、前記削除対象のデータを第2のキャッシュメモリおよび第3のキャッシュメモリのうち低速の第2のキャッシュメモリに移動する
処理を実行させることを特徴とする請求項1に記載のキャッシュ保存プログラム。
In the moving process, when the continuous duplication length of the data to be deleted is larger than a first threshold value, the data to be deleted is transferred to a second cache having a low speed among the second cache memory and the third cache memory. The cache storage program according to claim 1, wherein a process of moving to a memory is executed.
前記移動する処理は、前記削除対象のデータの継続重複長が第1の閾値以下である場合、且つ前記削除対象のデータの重複回数が第2の閾値より大きい場合に、前記削除対象のデータを第2のキャッシュメモリおよび第3のキャッシュメモリのうち高速の第3のキャッシュメモリに移動する
処理を実行させることを特徴とする請求項1に記載のキャッシュ保存プログラム。
The moving process is performed when the continuous duplication length of the data to be deleted is equal to or smaller than a first threshold and the duplication frequency of the data to be deleted is larger than a second threshold. The cache storage program according to claim 1, wherein a process of moving to a high-speed third cache memory out of the second cache memory and the third cache memory is executed.
前記移動する処理は、前記削除対象のデータの継続重複長が第1の閾値以下である場合、且つ前記削除対象のデータの重複回数が第2の閾値以下である場合に、前記削除対象のデータを破棄する
処理を実行させることを特徴とする請求項1に記載のキャッシュ保存プログラム。
The moving process includes the deletion target data when the continuous duplication length of the deletion target data is equal to or smaller than a first threshold and when the number of times of duplication of the deletion target data is equal to or smaller than a second threshold. The cache storage program according to claim 1, wherein a process for discarding is executed.
前記第1のキャッシュメモリが、1次キャッシュメモリと2次キャッシュメモリを有する場合に、前記処理対象のデータを前記第1のキャッシュメモリに記憶する際、前記1次キャッシュメモリの利用比率に応じて、前記処理対象のデータを、前記1次キャッシュメモリおよび前記2次キャッシュメモリのいずれかのキャッシュメモリに記憶する
処理を実行させることを特徴とする請求項1に記載のキャッシュ保存プログラム。
When the first cache memory includes a primary cache memory and a secondary cache memory, when storing the data to be processed in the first cache memory, the first cache memory depends on a usage ratio of the primary cache memory. The cache storage program according to claim 1, wherein a process of storing the processing target data in any one of the primary cache memory and the secondary cache memory is executed.
コンピュータが、
処理対象のデータが新規である場合に、前記処理対象のデータを第1のキャッシュメモリに記憶し、
前記第1のキャッシュメモリに記憶されたデータ毎に、処理対象のデータと重複する重複回数および処理対象のデータと重複する際に継続して重複する長さを示す継続重複長を重複履歴として管理し、
新規のデータを処理する際、前記第1のキャッシュメモリに記憶されたデータの数が上限である場合に、所定の削除対象のデータを抽出し、
前記重複履歴で管理された前記削除対象のデータの重複回数および継続重複長に応じて、前記削除対象のデータを、第2のキャッシュメモリおよび第3のキャッシュメモリのいずれかのキャッシュメモリに移動する
各処理を実行することを特徴とするキャッシュ保存方法。
Computer
If the data to be processed is new, store the data to be processed in the first cache memory;
For each data stored in the first cache memory, the number of times of duplication that overlaps the data to be processed and the continuous duplication length that indicates the length of duplication that continues when overlapping with the data to be processed are managed as a duplication history And
When processing new data, if the number of data stored in the first cache memory is the upper limit, the predetermined data to be deleted is extracted,
The data to be deleted is moved to one of the second cache memory and the third cache memory according to the number of times of duplication and the continuous duplication length of the data to be deleted managed in the duplication history. A cache storage method characterized by executing each processing.
処理対象のデータが新規である場合に、前記処理対象のデータを第1のキャッシュメモリに登録する登録部と、
前記第1のキャッシュメモリに記憶されたデータ毎に、処理対象のデータと重複する重複回数および処理対象のデータと重複する際に継続して重複する長さを示す継続重複長を重複履歴として管理する管理部と、
新規のデータを処理する際、前記第1のキャッシュメモリに記憶されたデータの数が上限である場合に、所定の削除対象のデータを抽出する抽出部と、
前記重複履歴で管理された前記削除対象のデータの重複回数および継続重複長に応じて、前記削除対象のデータを、第2のキャッシュメモリおよび第3のキャッシュメモリのいずれかのキャッシュメモリに移動する移動部と、
を有することを特徴とする情報処理装置。
A registration unit for registering the processing target data in the first cache memory when the processing target data is new;
For each data stored in the first cache memory, the number of times of duplication that overlaps the data to be processed and the continuous duplication length that indicates the length of duplication that continues when overlapping with the data to be processed are managed as a duplication history A management department to
When processing new data, when the number of data stored in the first cache memory is an upper limit, an extraction unit that extracts predetermined deletion target data;
The data to be deleted is moved to one of the second cache memory and the third cache memory according to the number of times of duplication and the continuous duplication length of the data to be deleted managed in the duplication history. A moving part;
An information processing apparatus comprising:
JP2014079678A 2014-04-08 2014-04-08 Cache storage program, information processing apparatus, and cache storage method Active JP6229577B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014079678A JP6229577B2 (en) 2014-04-08 2014-04-08 Cache storage program, information processing apparatus, and cache storage method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014079678A JP6229577B2 (en) 2014-04-08 2014-04-08 Cache storage program, information processing apparatus, and cache storage method

Publications (2)

Publication Number Publication Date
JP2015201050A JP2015201050A (en) 2015-11-12
JP6229577B2 true JP6229577B2 (en) 2017-11-15

Family

ID=54552257

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014079678A Active JP6229577B2 (en) 2014-04-08 2014-04-08 Cache storage program, information processing apparatus, and cache storage method

Country Status (1)

Country Link
JP (1) JP6229577B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6870246B2 (en) 2016-09-07 2021-05-12 富士通株式会社 Storage device and storage control device
JP6898085B2 (en) * 2016-12-14 2021-07-07 株式会社半導体エネルギー研究所 Data management method
JP7024578B2 (en) 2018-04-24 2022-02-24 富士通株式会社 Communication device, communication control method, and communication control program
CN110442404B (en) * 2019-08-13 2022-07-05 武汉斗鱼鱼乐网络科技有限公司 Object release method, device, equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0812643B2 (en) * 1993-03-15 1996-02-07 日本電気株式会社 Page save / restore device
JPH08249234A (en) * 1995-03-10 1996-09-27 Nec Corp Memory load control system
JP4067293B2 (en) * 2001-10-17 2008-03-26 富士通株式会社 Cache control program and cache processing computer
JP2005242414A (en) * 2004-02-24 2005-09-08 Sony Corp Information processor and information processing method and program
JP2008090554A (en) * 2006-09-29 2008-04-17 Toshiba Corp Information processor, controller, and memory management method
JP6146087B2 (en) * 2013-03-28 2017-06-14 富士通株式会社 Storage control program, storage control method, storage system, and hierarchical control apparatus thereof

Also Published As

Publication number Publication date
JP2015201050A (en) 2015-11-12

Similar Documents

Publication Publication Date Title
JP6229577B2 (en) Cache storage program, information processing apparatus, and cache storage method
TW201841123A (en) Merge tree modifications for maintenance operations
WO2015112249A1 (en) Methods for combining access history and sequentiality for intelligent prefetching and devices thereof
JP2014514618A (en) Data management method and data management system
US10771358B2 (en) Data acquisition device, data acquisition method and storage medium
US10225321B2 (en) Distributed file transfer with high performance
EP3376393A1 (en) Data storage method and apparatus
US20100228914A1 (en) Data caching system and method for implementing large capacity cache
US10579262B2 (en) Optimization of data deduplication
CN105917304A (en) Apparatus and method for de-duplication of data
US10637969B2 (en) Data transmission method and data transmission device
US11755540B2 (en) Chunking method and apparatus
CN107948220A (en) The synchronous method and device of address list cloud service
WO2021190501A1 (en) Data pre-fetching method and apparatus, and storage device
JP6056857B2 (en) Communication control device and communication control method
US9858204B2 (en) Cache device, cache system, and cache method
CN109697136B (en) Data recovery method, device and system
JP5514220B2 (en) Search device and system
JP2018511131A (en) Hierarchical cost-based caching for online media
CN108984123A (en) A kind of data de-duplication method and device
JP7024578B2 (en) Communication device, communication control method, and communication control program
US20240211154A1 (en) Method, device, and computer program product for de-duplicating data
JP5778640B2 (en) Frame search processing apparatus and method
CN118244968A (en) Method, apparatus and computer program product for deduplicating data
CN112463021A (en) Data processing method and device and chip

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170110

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170823

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20170919

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20171002

R150 Certificate of patent or registration of utility model

Ref document number: 6229577

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150