JP5575828B2 - Garbage collection execution device, garbage collection execution method, and garbage collection execution program - Google Patents
Garbage collection execution device, garbage collection execution method, and garbage collection execution program Download PDFInfo
- Publication number
- JP5575828B2 JP5575828B2 JP2012084005A JP2012084005A JP5575828B2 JP 5575828 B2 JP5575828 B2 JP 5575828B2 JP 2012084005 A JP2012084005 A JP 2012084005A JP 2012084005 A JP2012084005 A JP 2012084005A JP 5575828 B2 JP5575828 B2 JP 5575828B2
- Authority
- JP
- Japan
- Prior art keywords
- garbage collection
- execution
- collection process
- area
- partial table
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
この発明は、ガベージコレクション実行装置、ガベージコレクション実行方法及びガベージコレクション実行プログラムに関する。 The present invention relates to a garbage collection execution device, a garbage collection execution method, and a garbage collection execution program.
従来、クラウドコンピューティングの進展とともに、分散Key−Valueストアを利用したさまざまなシステムが提案されている。分散Key−Valueストアは、「Key(キー)」と「Value(値)」とのペアによってデータを管理するデータベースであり、例えば、Google(登録商標)社のBigtableや、オープンソースのHBase、Hypertableなどが知られている。 Conventionally, various systems using a distributed key-value store have been proposed with the progress of cloud computing. The distributed key-value store is a database that manages data by a pair of “key (key)” and “value (value)”. For example, Google (registered trademark) Bigtable, open source HBase, Hypertable Etc. are known.
例えば、BigtableのPCクラスタ上のサーバ群それぞれで、いくつかの範囲に分割したテーブル(部分テーブル)を管理する。そして、各サーバにおいては、ログ先行書き込み用ログファイル(以下、WAL(Write Ahead Logging)ログと記す)が備えられ、書き込み要求に対する永続性が担保される。Bigtable(分散Key−Valueストア)は、GFS(分散ファイルシステム)上にファイルを作成する。 For example, each server group on the Bigtable PC cluster manages a table (partial table) divided into several ranges. Each server is provided with a log file for log advance writing (hereinafter referred to as a WAL (Write Ahead Logging) log) to ensure the durability of the write request. Bigtable (Distributed Key-Value Store) creates a file on GFS (Distributed File System).
ここで、分散ファイルシステムを利用した分散Key−Valueストアにおいては、一度追加された(Key, Value)は、削除などのオペレーションが実行されたとしても削除フラグの付いた(Key, Value)が新たに追加されるだけで、元の(Key, Value)が削除されない。そのため、不要な(Key, Value)が分散ファイルシステムのディスク容量を無駄に占有し、検索処理効率を低下させてしまう。 Here, in the distributed key-value store using the distributed file system, once added (Key, Value), even if an operation such as deletion is executed, (Key, Value) with a deletion flag is newly added. The original (Key, Value) is not deleted. Therefore, unnecessary (Key, Value) unnecessarily occupies the disk capacity of the distributed file system and decreases the search processing efficiency.
そこで、このような分散Key−Valueストアにおいては、各サーバにおいてガベージコレクション処理を実行することによってディスク占有量の適正化を実行する。例えば、分散Key−Valueストアにおけるガベージコレクション処理では、永続化された全ての追加、更新、削除ファイルを一端読み込み、削除するべきレコード群をすべて削除した上で、新たな永続化ファイルを分散ファイルシステム上に作成する。すなわち、ガベージコレクション処理は、全ての情報を分散ファイルシステムから読み込み、ほぼ全ての情報(削除を実行した後のファイル)を分散ファイルシステムに書き込む。 Accordingly, in such a distributed key-value store, the disk occupancy is optimized by executing a garbage collection process in each server. For example, in the garbage collection process in the distributed key-value store, all the added, updated, and deleted files that have been persisted are read once, all the records to be deleted are deleted, and then a new persistent file is distributed to the distributed file system. Create on top. That is, in the garbage collection process, all information is read from the distributed file system, and almost all information (file after execution of deletion) is written to the distributed file system.
上述したように、分散Key−Valueストアにおけるガベージコレクション処理は、不要なファイルを削除することで、分散ファイルシステムのディスク占有量を削減して検索処理効率を向上させるが、全てのファイルを対象として処理が実行されるため、処理負荷が極めて高く、単純に頻度を上げて実行することができない。すなわち、ガベージコレクション処理の実行時には、ディスク占有量とリソース負荷(例えば、ディスクI/O、ネットワーク、CPU(Central Processing Unit)などへの負荷)との間のトレードオフの関係が重要となる。 As described above, the garbage collection process in the distributed key-value store reduces the disk occupancy of the distributed file system by deleting unnecessary files and improves the search processing efficiency. Since the processing is executed, the processing load is extremely high, and it is not possible to execute the processing simply by increasing the frequency. That is, at the time of executing the garbage collection process, a trade-off relationship between the disk occupation amount and the resource load (for example, the load on the disk I / O, the network, the CPU (Central Processing Unit), etc.) becomes important.
そこで、このような問題に対して、ガベージコレクション処理の実行間隔を設定する手法や、ユーザに対してガベージコレクション処理の実行コマンドを提供する手法、追加されるレコードの増加に伴って実行される部分テーブルの分割時にガベージコレクション処理を実行する手法などが知られている。 So, for such problems, a method for setting the garbage collection processing execution interval, a method for providing the user with a garbage collection processing execution command, and a part that is executed as the number of records added increases. A technique for executing a garbage collection process when a table is divided is known.
しかしながら、上述した従来技術では、ガベージコレクション処理が短期間に集中して発生することで、リソース負荷が増大する場合があった。例えば、ガベージコレクション処理の実行間隔を設定する手法では、全部分テーブルを対象として1つの実行間隔しか設定することができないため、部分テーブルごとに実行されるガベージコレクション処理の実行タイミングが重なり、負荷分散ができない。また、ユーザに対してガベージコレクション実行コマンドを提供する手法では、ユーザが分散Key−Valueストアに関する十分なスキルを有していない場合、適切なタイミングでガベージコレクション処理を実行することができない。また、上述した部分テーブルの分割時にガベージコレクション処理を実行する手法では、追加されるファイルが増加するに従って部分テーブルの分割が短期間に集中して発生することから、結果的に、ガベージコレクション処理も短期間に集中して発生することとなり、負荷分散ができない。 However, in the above-described conventional technology, there are cases where the resource load increases due to the occurrence of garbage collection processing concentrated in a short period of time. For example, in the method of setting the execution interval of the garbage collection process, only one execution interval can be set for all the partial tables. Therefore, the execution timing of the garbage collection process executed for each partial table overlaps, and load distribution is performed. I can't. In the method of providing a garbage collection execution command to the user, if the user does not have sufficient skills regarding the distributed key-value store, the garbage collection processing cannot be executed at an appropriate timing. In addition, in the method of executing the garbage collection process at the time of the partial table division described above, the partial table division occurs in a short time as the number of files to be added increases. As a result, the garbage collection process is also performed. It will occur in a short period of time and load balancing will not be possible.
そこで、本願に係る技術は、上述した従来技術の問題に鑑みてなされたものであって、ガベージコレクションの発生を分散させることで、リソース負荷を分散することを可能にするガベージコレクション実行装置、ガベージコレクション実行方法及びガベージコレクション実行プログラムを提供することを目的とする。 Accordingly, the technology according to the present application has been made in view of the above-described problems of the prior art, and the garbage collection execution device and the garbage that make it possible to distribute the resource load by distributing the occurrence of garbage collection It is an object to provide a collection execution method and a garbage collection execution program.
上述した課題を解決し、目的を達成するため、本願に係るガベージコレクション実行装置は、分散Key−Valueストアに含まれる複数のサーバそれぞれにおいて所定の容量で形成された複数の部分テーブルによって分散して管理されたキー情報及び値情報を含むレコードに対するガベージコレクション処理を、前記サーバそれぞれで前記部分テーブルごとに時系列上分散して実行されるように前記部分テーブルごとの実行時期を決定する決定部と、前記決定部によって決定された実行時期に、対象となる部分テーブルに対するガベージコレクション処理を実行する実行部とを備えたことを特徴とする。 In order to solve the above-described problems and achieve the object, the garbage collection execution apparatus according to the present application is distributed by a plurality of partial tables formed with a predetermined capacity in each of a plurality of servers included in a distributed key-value store. A determination unit that determines an execution time for each partial table so that garbage collection processing for records including managed key information and value information is distributed in time series for each partial table in each of the servers; And an execution unit that executes a garbage collection process on the target partial table at the execution time determined by the determination unit.
本願に係るガベージコレクション実行装置は、ガベージコレクションの発生を分散させることで、リソース負荷を分散することを可能にする。 The garbage collection execution apparatus according to the present application makes it possible to distribute the resource load by distributing the occurrence of garbage collection.
以下に添付図面を参照して、本願に係るガベージコレクション実行装置、ガベージコレクション実行方法及びガベージコレクション実行プログラムの実施形態を詳細に説明する。なお、以下では、分散Key−Valueストアに含まれるスレーブサーバを本願に係るガベージコレクション実行装置として機能させた場合を例に挙げて説明する。また、本願に係るガベージコレクション実行装置、ガベージコレクション実行方法及びガベージコレクション実行プログラムは、以下の実施形態により限定されるものではない。 Exemplary embodiments of a garbage collection execution device, a garbage collection execution method, and a garbage collection execution program according to the present application will be described below in detail with reference to the accompanying drawings. In the following description, a case where a slave server included in the distributed key-value store functions as a garbage collection execution device according to the present application will be described as an example. In addition, the garbage collection execution device, the garbage collection execution method, and the garbage collection execution program according to the present application are not limited to the following embodiments.
(第1の実施形態)
まず、分散ファイルシステムを利用した分散Key−Valueストアの一例を説明する。図1は、第1の実施形態に係る分散ファイルシステムを利用した分散Key−Valueストアの構成の一例を示す図である。図1に示すように、第1の実施形態に係る分散ファイルシステムを利用した分散Key−Valueストアは、スレーブサーバ100A〜100Cと、マスターサーバ200と、ネットワークスイッチ300とを有し、スレーブサーバ100A〜100Cとマスターサーバ200とがネットワークスイッチ300を介してそれぞれ接続される。なお、図1においては、スレーブサーバ100A〜100Cが図示されているが、実際には、さらに複数のスレーブサーバがネットワークスイッチ300に接続されている。
(First embodiment)
First, an example of a distributed key-value store using a distributed file system will be described. FIG. 1 is a diagram illustrating an example of a configuration of a distributed key-value store using the distributed file system according to the first embodiment. As shown in FIG. 1, the distributed key-value store using the distributed file system according to the first embodiment includes
そして、分散Key−Valueストアは、例えば、ネットワークスイッチ300を介してアクセスされるユーザのデータを「Key(キー情報)」と「Value(値情報)」とのペアを含むレコードを、スレーブサーバ上に形成された部分テーブル(以下、エリアと記す)で管理する。一例を挙げると、分散Key−Valueストアは、図1に示すように、Keyによってソートされたレコードのテーブルを分割して、スレーブサーバ100A〜100Cで管理する。ここで、テーブルの分割は、レコードのエントリ数に基づいて実行される場合であってもよく、或いは、データサイズに基づいて実行される場合であってもよい。
The distributed key-value store stores, for example, a record including a pair of “key (key information)” and “value (value information)” on the slave server as data of a user accessed via the
ネットワークスイッチ300は、ユーザによって操作される図示しないクライアント装置のアクセス先のスレーブサーバを切り替える。マスターサーバ200は、スレーブサーバ100A〜100Cへの各種指示要求を行う。例えば、マスターサーバ200は、テーブルにおけるどのエリアをどのスレーブサーバに配置するかを決定して、各スレーブサーバに指示要求を行う。一例を挙げると、マスターサーバ200は、図1に示すように、Key1からKey99までのエリアと、Key300からKey399までのエリアとをスレーブサーバ100Aに配置する。
The
スレーブサーバ100A〜100Cは、マスターサーバ200によって配置されたエリアを管理し、自身が管理するエリアに対する検索・更新といったレコードに対する処理をユーザからの指示に従って実行する。例えば、スレーブサーバ100Aは、Key1からKey99までのエリアに対する検索の指示要求をユーザから受付けて、受付けた指示要求を実行する。なお、分散ファイルシステムにおいては、複数のサーバに各レコードのレプリケーションが格納されている。
The
ここで、分散Key−Valueストアでは、一度追加されたレコードに対して削除や更新などのオペレーションが実行された場合でも、当該レコードが削除されたり、更新されたりすることはない。例えば、ユーザがスレーブサーバ100Aによって管理された(Key302,Value302)に対して削除のオペレーションを実行した場合に、スレーブサーバ100Aは、図1に示すように、D(Key302,Value302) を管理する。すなわち、分散Key−Valueストアは、レコードの更新や削除がユーザから要求された場合、既に格納済みの(Key,Value)ペアを更新するのではなく、更新や削除を意味する新たな(Key’,Value’)を追加する。以下、D(Key,Value)は、(Key,Value)を削除することを意味することとする。また、U(Key,Value’)は、Key に対応する(Key,Value)を(Key,Value’)に更新することを意味することとする。なお、削除と同様に、格納されたデータを更新するのではなく、内部的にはU(Key,Value’)という新たなペアを追加する。スレーブサーバ100A〜スレーブサーバ100Cは、検索があった場合、同一のKeyに関する追加、更新、削除を示す(Key,Value)群から必要な(Key,Value)のみをユーザに返却する。
Here, in the distributed key-value store, even when an operation such as deletion or update is executed on a record once added, the record is not deleted or updated. For example, when the user performs a delete operation on (Key 302, Value 302) managed by the
次に、スレーブサーバに対するレコードの管理の詳細について図2を用いて説明する。なお、分散Key−Valueストアに含まれるスレーブサーバは、それぞれ同様の管理を行うため、図2においては、図1に示すスレーブサーバ100Aを例に挙げて説明する。図2は、第1の実施形態に係るスレーブサーバ100Aによるレコードの管理を説明するための図である。
Next, details of record management for the slave server will be described with reference to FIG. Since the slave servers included in the distributed key-value store perform the same management, the
例えば、スレーブサーバ100Aは、図2に示すように、1つのWALログ(ログ先行書き込み用ログファイル)と、複数のエリア(エリア1及びエリア2)とを有する。エリア1及びエリア2は、図2に示すように、メモリ上のバッファと、複数のソート済みKeyValueファイルを有する。そして、エリア1及びエリア2は、所定の容量が設定され、格納されたレコードの容量が所定の容量を超える場合に、分割される。例えば、エリア1に格納されたレコードの容量が所定の容量を超える場合に、エリア1が分割され、エリア1に格納されたレコードは分割後のエリアで管理される。
For example, the
ここで、図2の(1)に示すように、ユーザから(newKey,newValue)の追加要求を受付けると、スレーブサーバ100Aは、まず、(2)に示すように、(newKey,newValue)をWALログへ書き込む。このWALログへの書き込みは、ファイルの最後尾に追記されることで実現され、書き込みが成功した場合に、レコードの永続性が保証される。
Here, as shown in (1) of FIG. 2, when receiving a request for adding (newKey, newValue) from the user, the
その後、図2の(3)に示すように、スレーブサーバ100Aは、(newKey,newValue)をエリア1内のメモリ上バッファへ書き込む。さらに、メモリ上バッファ内の容量が大きくなると、(4)に示すように、スレーブサーバ100Aは、メモリ上バッファのレコード(newKey,newValue)を、Keyによってソートした後、分散ファイルシステム上のソート済みKeyValueファイルに書き出し、メモリ上バッファをクリアする。なお、図2においては、ソート済みKeyValueファイルを別ファイルに書き込んでいるが、実施形態はこれに限定されることはなく、例えば、1つのファイルに追記で書き込む場合であってもよい。
Thereafter, as shown in (3) of FIG. 2, the
上述したように、スレーブサーバ100Aは、メモリ上の一時的な(Key,Value)群を分散ファイルシステム上のソート済みKeyValueファイルに書き込むことでレコードを永続化させる。なお、ユーザからレコードの検索要求を受信した場合、スレーブサーバ100Aは、メモリ上バッファと、ソート済みKeyValueファイルとを読み込み、検索結果をユーザへ返却する。
As described above, the
上述したレコードの追加は、削除や更新を示すレコードも同様に実行される。例えば、スレーブサーバ100Aは、図2に示すように、D(Key10,Value10)をエリア2内のメモリ上バッファへ書き込む。そして、スレーブサーバ100Aは、メモリ上バッファのD(Key10,Value10)を、Key1によってソートした後、分散ファイルシステム上のソート済みKeyValueファイルに格納する。
The above-described record addition is executed in the same manner for records indicating deletion or update. For example, the
これは、削除対象である(Key10,Value10)が既にソート済みKeyValueファイルとして永続化されており、全てのソート済みKeyValueファイルを読み込まない限り削除対象の(Key10,Value10)がどこに存在するかわからないためである。これにより、ソート済みKeyValueファイルへの書き込み時に対象となる(Key10,Value10)を検索・更新する必要がないため、書き込みスループットを向上させることができる。 This is because (Key10, Value10) to be deleted has already been made permanent as a sorted KeyValue file, and it is not known where (Key10, Value10) to be deleted exists unless all the sorted KeyValue files are read. It is. This eliminates the need to search and update the target (Key10, Value10) when writing to the sorted KeyValue file, thereby improving the write throughput.
次に、スレーブサーバによるガベージコレクション処理について図3を用いて説明する。なお、分散Key−Valueストアに含まれるスレーブサーバは、それぞれ同様のガベージコレクションを行うため、図3においては、図1に示すスレーブサーバ100Aを例に挙げて説明する。図3は、第1の実施形態に係るスレーブサーバ100Aによるガベージコレクション処理を説明するための図である。
Next, garbage collection processing by the slave server will be described with reference to FIG. Since slave servers included in the distributed key-value store perform similar garbage collection, FIG. 3 will be described by taking the
例えば、スレーブサーバ100Aは、図3の(1)に示すように、エリア1の全てのレコード(メモリ上バッファ内の(Key,Value)、及び、ソート済みKeyValueファイル)を読み込み、削除するべきレコード(例えば、D(Key,Value)及び対象となる(Key,Value))を削除したうえで新しいファイルを作成する。そして、(2)に示すように、スレーブサーバ100Aは、既存のファイルとメモリ上の(Key,Value)をすべて削除する。
For example, as shown in (1) of FIG. 3, the
上述したように、ガベージコレクション処理は、エリアごとに既存の全てのレコードを読み込み、削除するべきレコードを削除したうえで、削除後の全てのレコードを書き込む。したがって、ガベージコレクション処理は、ディスクI/Oや、CPU、ネットワークなどのリソースを大量に消費する。従って、従来、ガベージコレクション処理の実行タイミングに関する種々の手法が開示されているが、いずれの手法においても十分な負荷分散を実行することができない。以下、従来技術に係る課題について説明する。図4は、従来技術に係る課題を説明するための図である。 As described above, the garbage collection process reads all existing records for each area, deletes records to be deleted, and writes all the records after deletion. Therefore, the garbage collection process consumes a large amount of resources such as disk I / O, CPU, and network. Therefore, various methods related to the execution timing of the garbage collection processing have been disclosed, but sufficient load distribution cannot be executed by any of the methods. Hereinafter, problems related to the prior art will be described. FIG. 4 is a diagram for explaining a problem related to the prior art.
図4においては、(A)にガベージコレクション処理の実行間隔を設定する手法について示し、(B)にユーザにガベージコレクション処理の実行コマンドを提供する手法について示し、(C)にエリアの分割時にガベージコレクションを実行する手法について示す。また、図4の上段の矩形と矢印で示された図は、矩形がエリアを示し、矩形の長さが分割サイズを示し、レコードの追加に伴ってエリアが分割されていく状態を示す。また、図4の中段の図は、横軸が時間(t)を示し、縦軸がガベージコレクション(GC)の発生数を示す。 In FIG. 4, (A) shows a method for setting an execution interval of garbage collection processing, (B) shows a method for providing a user with an execution command for garbage collection processing, and (C) shows garbage collection at the time of area division. A method for performing collection will be described. Further, in the figure indicated by the upper rectangle and the arrow in FIG. 4, the rectangle indicates the area, the length of the rectangle indicates the division size, and the area is divided as the record is added. In the middle diagram of FIG. 4, the horizontal axis indicates time (t), and the vertical axis indicates the number of occurrences of garbage collection (GC).
まず、ガベージコレクション処理の実行間隔を設定する手法では、ガベージコレクション処理の実行間隔を、全てのエリアで1つしか設定することができないため、図4の(A)に示すように、エリア群の各ガベージコレクション処理の実行タイミングが重なってしまい、時間軸に対する負荷分散ができない。すなわち、ガベージコレクション処理の実行間隔を設定する手法では、ディスクI/Oや、ネットワーク、CPUの負荷が高い状態が一定の間隔で発生するということに他ならない。実際、分散ファイルシステムの初期の段階では、ガベージコレクション処理を実行した場合の負荷の高い状態が1時間程度で終了するが、管理されるデータ量(レコード量)が増大するに従い、負荷が高い状態が長くなるという問題も指摘されている。これは、データ量の増加に伴いエリアが増加し、ガベージコレクション処理の発生数が増加するためである。 First, in the method of setting the garbage collection processing execution interval, since only one garbage collection processing execution interval can be set for all areas, as shown in FIG. The execution timing of each garbage collection process overlaps, and load distribution on the time axis cannot be performed. That is, in the method of setting the execution interval of the garbage collection process, there is nothing but a state in which the load on the disk I / O, the network, and the CPU is high at a constant interval. In fact, at the initial stage of the distributed file system, the high load state when the garbage collection process is executed is completed in about one hour, but the load increases as the amount of managed data (record amount) increases. Has also been pointed out. This is because the area increases as the amount of data increases, and the number of garbage collection processes increases.
また、ユーザにガベージコレクション処理の実行コマンドを提供する手法では、図4の(B)に示すように、ガベージコレクション処理の実行時(GC実行)にエリア数の同数のガベージコレクション処理が実行され、負荷分散ができない。さらに、ユーザにガベージコレクション処理の実行コマンドを提供する手法では、ユーザがシステムの内部を十分に理解していない限り、きわめて難しい。例えば、システムの内部を十分に理解していない場合、ガベージコレクション処理を実行し過ぎて、CPU やディスクI/O に対する負荷を高めてしまい、本来ユーザに提供するべき、(Key,Value)の追加、更新、削除、検索といった機能のスループットやレスポンスタイムが悪化させる場合がある。逆に、ガベージコレクション処理の実行が少な過ぎて、分散ファイルシステム上のディスク占有量が減少せずにディスクフルなどの問題を引き起こす場合がある。 In the method of providing the user with a garbage collection process execution command, as shown in FIG. 4B, when the garbage collection process is executed (GC execution), the same number of garbage collection processes as the number of areas are executed. Load balancing is not possible. Furthermore, it is very difficult to provide a user with a garbage collection process execution command unless the user fully understands the inside of the system. For example, if you do not fully understand the inside of the system, garbage collection processing will be executed too much, increasing the load on the CPU and disk I / O, and adding (Key, Value) that should be provided to the user In some cases, the throughput and response time of functions such as update, deletion, and search deteriorate. On the other hand, there are cases where the garbage collection process is executed too little and the disk occupancy on the distributed file system does not decrease, causing a problem such as disk full.
また、エリアの分割時(分割前)にガベージコレクション処理を実行する手法では、レコードのエリアへの書き込みがランダムに行われ、各エリアへのレコードの蓄積状況も平準化されるため、図4の(C)に示すように、各エリアで発生する分割のタイミングがほぼ同時となる(一定期間内に集中する)。その結果、エリアの分割時にガベージコレクション処理を実行する手法では、ほぼ同時に発生するエリアの分割時にディスクI/Oや、ネットワーク、CPUの負荷が高い状態となる。すなわち、管理されるデータが増加するに従って、短時間に集中して発生するガベージコレクション処理の発生数が増加し、リソース負荷も増加することとなる。なお、図4の(C)において、エリアが分割される時間がT→T2→T4 となっているのは、一度分割が行われるとエリアの数が2倍になり、同じ速度で(Key,Value)を投入した場合には、エリア分割までに、2倍の時間を要するためである。 Further, in the method of executing the garbage collection process at the time of area division (before division), writing to the area of the record is performed at random, and the accumulation state of the record in each area is also equalized. As shown in (C), the timing of division occurring in each area is almost simultaneous (concentrates within a certain period). As a result, in the method of executing the garbage collection process at the time of area division, the load on the disk I / O, the network, and the CPU is high when the areas are divided almost simultaneously. In other words, as the amount of managed data increases, the number of garbage collection processes occurring in a concentrated manner in a short time increases, and the resource load also increases. In FIG. 4C, the time during which the area is divided is T → T2 → T4. Once the division is performed, the number of areas is doubled at the same speed (Key, This is because it takes twice as long to divide the area when (Value) is input.
上述したように、従来技術においては、いずれの手法においても、短時間に集中して発生するガベージコレクション処理数が大きい。そこで、本願に係るスレーブサーバは、ガベージコレクションの発生を分散させることで、リソース負荷を抑制する。図5は、第1の実施形態に係るスレーブサーバ100Aの構成の一例を示す図である。なお、分散ファイルシステムに含まれるスレーブサーバは同様の構成を有していることから、図1においてはスレーブサーバ100Aを例に挙げて説明する。
As described above, in any of the conventional techniques, the number of garbage collection processes that occur intensively in a short time is large. Therefore, the slave server according to the present application suppresses the resource load by distributing the occurrence of garbage collection. FIG. 5 is a diagram illustrating an example of the configuration of the
図5に示すように、スレーブサーバ100Aは、通信制御I/F部110と、入力部120と、表示部130と、記憶部140と、制御部150とを有する。通信制御I/F部110は、ユーザによって操作されるユーザ端末装置と、制御部150との間でやり取りする各種情報に関する通信を制御する。例えば、通信制御I/F部110は、レコードの検索・追加・更新・削除などに係る通信を制御する。また、通信制御I/F部110は、マスターサーバ200と制御部150との間でやり取りする各種情報に関する通信を制御する。また、通信制御I/F部110は、入力部120及び表示部130と、制御部150との間での各種情報のやり取りを制御する。
As illustrated in FIG. 5, the
入力部120は、例えば、キーボードやマウスなどであり、分散Key−Valueストアの管理者による種々の情報の入力処理を受付ける。表示部130は、例えば、ディスプレイなどであり、分散Key−Valueストアの管理者に対して処理結果を表示出力する。
The
記憶部140は、図5に示すように、データ記憶領域141と、ソート済みファイル記憶領域142とを有する。記憶部140は、例えば、ハードディスク、光ディスクなどの記憶装置、または、RAM(Random Access Memory)、フラッシュメモリ(Flash Memory)などの半導体メモリ素子であり、スレーブサーバ100Aによって実行される各種プログラムなどを記憶する。
As shown in FIG. 5, the
データ記憶領域141は、レコード(Key,Value)を記憶する記憶領域であり、例えば、図2に示すメモリ上バッファである。ソート済みファイル記憶領域142は、Keyによってソートされたレコードを記憶する記憶領域であり、例えば、図2に示すソート済みKeyValueファイルである。そして、これらソート済みKeyValueファイルが分散ファイルシステムに該当し、これらのファイルのレプリカが複数のサーバで管理されることで、信頼性を保持する。
The data storage area 141 is a storage area for storing records (Key, Value), and is, for example, a memory buffer shown in FIG. The sorted
制御部150は、図5に示すように、ガベージコレクション決定部151と、ガベージコレクション実行部152とを有する。制御部150は、例えば、CPUやMPU(Micro Processing Unit)などの電子回路やASIC(Application Specific Integrated Circuit)やFPGA(Field Programmable Gate Array)などの集積回路であり、スレーブサーバ100Aの全体制御を実行する。なお、図示していないが、制御部150は、レコードの検索・追加・削除・更新などの処理を実行する機能部や、レコードをソートする機能部、エリアを分割する機能部などを有する。
As illustrated in FIG. 5, the
ガベージコレクション決定部151は、分散Key−Valueストアに含まれる複数のサーバそれぞれにおいて所定の容量で形成された複数のエリアによって分散して管理されたKey及びValueを含むレコードに対するガベージコレクション処理を、サーバそれぞれでエリアごとに時系列上分散して実行されるようにエリアごとの実行時期を決定する。具体的には、ガベージコレクション決定部151は、エリアの分割時にガベージコレクション処理が実行される場合に、所定の容量が所定の範囲内で変化するようにエリアを分割させる。
The garbage
例えば、ガベージコレクション決定部151は、ユーザによってレコードの追加が実行されるごとに、エリアが分割される閾値となるエリアベースサイズと、エリアベースサイズにランダムな変化を与える変動サイズと、現在のエリアサイズとを取得する。そして、ガベージコレクション決定部151は、取得した変動サイズ以下で0以上のランダムな値(R)を生成する。
For example, each time a record is added by the user, the garbage
ここで、ガベージコレクション決定部151は、エリアベースサイズの値に、生成したRを加算した値が現在のエリアサイズの値を上回っているか否かを判定して、上回っている場合に、ガベージコレクション処理をスケジューリングする。すなわち、ガベージコレクション決定部151は、現在のエリアサイズの値が、エリアを分割する閾値にランダムな値を加えた値を上回った場合に、エリアを分割するように決定するとともに、ガベージコレクション処理を実行するように、後述するガベージコレクション実行部152に通知する。
Here, the garbage
これにより、分割されるエリアサイズをランダムに変化させことができ、エリアの分割の発生を時系列上分散させることができる。その結果、ガベージコレクション処理の実行も時系列上分散させることができ、リソース負荷を分散することができる。なお、変動サイズは、分散ファイルシステムの管理者、或いは、ユーザによって任意に設定することができる。 Thereby, the area size to be divided can be changed at random, and the occurrence of area division can be distributed over time. As a result, the execution of the garbage collection process can also be distributed over time, and the resource load can be distributed. The variable size can be arbitrarily set by the administrator of the distributed file system or the user.
ガベージコレクション実行部152は、ガベージコレクション決定部151によって決定された実行時期に、対象となるエリアに対するガベージコレクション処理を実行する。具体的には、ガベージコレクション実行部152は、エリアの分割時にガベージコレクション処理を実行する。すなわち、ガベージコレクション実行部152は、ガベージコレクション決定部151によってエリアサイズがランダムに変化された各エリアの分割時にガベージコレクション処理を実行する。
The garbage
図6は、第1の実施形態に係るスレーブサーバ100Aによって実行されるエリア分割とガベージコレクション処理の一例を説明するための図である。ここで、図6の上段の矩形と矢印で示された図は、矩形がエリアを示し、矩形の長さが分割サイズを示し、レコードの追加に伴ってエリアが分割されていく状態を示す。また、図6の下段の図は、横軸が時間(t)を示し、縦軸がガベージコレクション(GC)の発生数を示す。
FIG. 6 is a diagram for explaining an example of area division and garbage collection processing executed by the
例えば、スレーブサーバ100Aによって実行されるエリア分割は、図6の上段に示すように、分割されるごとにエリアサイズがランダムに変化する。上述したように、各エリアへのレコードの蓄積状況は平準化されることから、エリアの分割が発生するタイミングはエリアごとに異なったものとなる。従って、エリアの分割時にガベージコレクション処理を実行すると、図6の下段に示すように、ガベージコレクション処理が時系列上分散されて実行されることとなる。言い換えると、スレーブサーバ100Aは、一定時間間隔ごとに発生するガベージコレクション処理の数を均一化する(特定時間間隔内の集中的なガベージコレクション処理の発生を抑止する)ことができる。
For example, in the area division executed by the
次に、第1の実施形態に係るスレーブサーバ100Aによる処理の手順について、図7及び図8を用いて説明する。図7は、第1の実施形態に係るガベージコレクション決定部151による処理の手順を示すフローチャートである。第1の実施形態に係るガベージコレクション決定部151は、ユーザによってレコードが追加されると、図7に示すように、エリアベースサイズ、変動サイズ、現在のエリアサイズを取得する(ステップS101)。
Next, a processing procedure performed by the
そして、ガベージコレクション決定部151は、0以上変動サイズ以下で、ランダム値(R)を生成して(ステップS102)、エリアベースサイズ+Rが現在のエリアサイズを下回っているか否かを判定する(ステップS103)。ここで、エリアベースサイズ+Rが現在のエリアサイズを下回っている場合には(ステップS103肯定)、ガベージコレクション決定部151は、ガベージコレクション処理をスケジューリングして(ステップS104)、処理を終了する。
Then, the garbage
一方、エリアベースサイズ+Rが現在のエリアサイズを下回っていない場合には(ステップS103否定)、ガベージコレクション決定部151は、ガベージコレクション処理をスケジューリングせずに、処理を終了する。
On the other hand, if the area base size + R is not smaller than the current area size (No at Step S103), the garbage
図8は、第1の実施形態に係るガベージコレクション実行部152による処理の手順を示すフローチャートである。なお、図8においては、ガベージコレクション決定部151によってガベージコレクション処理がスケジューリングされた後の処理について示す。
FIG. 8 is a flowchart illustrating a processing procedure performed by the garbage
第1の実施形態に係るガベージコレクション実行部152は、ガベージコレクション決定部151によってガベージコレクション処理がスケジューリングされると、図8に示すように、スケジューリングされたガベージコレクションタスクを取得する(ステップS201)。具体的には、ガベージコレクション実行部152は、ガベージコレクション処理を実行する対象となるエリアの情報を取得する。
When the garbage
そして、ガベージコレクション実行部152は、取得したエリアにおける既存のソート済みKeyValueファイル群から更新・削除を反映したうえで、新たなソート済みKeyValueファイルを生成して(ステップS202)、処理を終了する。
Then, the garbage
[第1の実施形態の効果]
上述したように、第1の実施形態によれば、ガベージコレクション決定部151は、分散Key−Valueストアに含まれる複数のサーバそれぞれにおいて所定の容量で形成された複数のエリアによって分散して管理されたKey及びValueを含むレコードに対するガベージコレクション処理を、サーバそれぞれでエリアごとに時系列上分散して実行されるようにエリアごとの実行時期を決定する。そして、ガベージコレクション実行部152は、ガベージコレクション決定部151によって決定された実行時期に、対象となるエリアに対するガベージコレクション処理を実行する。従って、第1の実施形態に係るスレーブサーバ100Aは、ガベージコレクション処理の実行を時系列上分散して実行させることができ、リソース負荷を分散することを可能にする。
[Effect of the first embodiment]
As described above, according to the first embodiment, the garbage
また、第1の実施形態によれば、ガベージコレクション決定部151は、エリアの分割時にガベージコレクション処理が実行される場合に、所定の容量が所定の範囲内で変化するようにエリアを分割させる。そして、ガベージコレクション実行部152は、エリアの分割時にガベージコレクション処理を実行する。従って、第1の実施形態に係るスレーブサーバ100Aは、既存の技術を用いて容易にガベージコレクション処理の実行を時系列上分散させることができ、リソース負荷の分散を容易に実行することを可能にする。
In addition, according to the first embodiment, the garbage
(第2の実施形態)
上述した第1の実施形態においては、エリアサイズをランダムに変化させることで、エリアの分割のタイミングを分散させ、エリアの分割時にガベージコレクションを実行する場合について説明した。第2の実施形態では、ガベージコレクション処理によって削減される容量を予測し、予測結果に応じて、ガベージコレクション処理を実行する場合について説明する。なお、第2の実施形態に係るスレーブサーバは、第1の実施形態に係るスレーブサーバ100Aと比較して、ガベージコレクション決定部151及びガベージコレクション実行部152による処理内容のみが異なる。以下、これらを中心に説明する。
(Second Embodiment)
In the first embodiment described above, the case has been described in which the area division timing is distributed by randomly changing the area size, and the garbage collection is executed when the area is divided. In the second embodiment, a case will be described in which the capacity to be reduced by the garbage collection process is predicted, and the garbage collection process is executed according to the prediction result. Note that the slave server according to the second embodiment differs from the
第2の実施形態に係るガベージコレクション決定部151は、所定の時間間隔でエリアごとにガベージコレクション処理を実行した場合の削減容量を予測し、予測した削減容量が最大となるエリアをガベージコレクション処理の対象と決定する。具体的には、ガベージコレクション決定部151は、レコードがエリアに登録された時点から所定の期間が経過した場合に、当該レコードがガベージコレクション処理によって削除されうる削除対象レコードと判定し、エリアに含まれる削除対象レコードの合計容量を削除容量として予測する。
The garbage
ここで、第2の実施形態に係るスレーブサーバ100Aでは、(Key,Value)に(Key,Value)が登録された時刻を示すTimestampを加えたレコードを用いる。すなわち、第2の実施形態に係るスレーブサーバ100Aは、記憶部140に(Key,Timestamp,Value)タプルを格納する。なお、Timestampは、(Key,Value)が追加される際に、ユーザによって設定される場合であってもよく、或いは、制御部150によって登録される場合であってもよい。制御部150によって登録される場合には、制御部150は、(Key,Value)が追加された時刻を登録する機能部をさらに有する。
Here, the
例えば、ガベージコレクション決定部151は、所定の時間が経過するごとに、以下に示す式(1)により、エリアごとにガベージコレクション処理による削除容量を予測する。なお、式(1)における「tpds:Total Prediction of Deleting Size」は、削除されると予測される全容量を示す関数である。また、式(1)における「Area[i]」は、スレーブサーバ内の各エリアを示し、(1≦i≦N:正の整数)である。また、式(1)における「Area[i].SortedKVF[j]」は、各エリアに格納されたソート済みKeyValueファイルを示し、(1≦j≦M:正の整数)である。また、式(1)における「pds」は、削除されると予測される容量を示す関数である。
For example, the garbage
すなわち、ガベージコレクション決定部151は、式(1)に示すように、エリアごとに、削除されうるソート済みKeyValueファイルの合計値を算出することで、削除容量を予測する。
That is, the garbage
ここで、式(1)に含まれる「pds」は、以下の式(2)によって定義される。なお、式(2)における「SortedKVF[j].size」は、レコードサイズを示す。また、式(2)における「SortedKVF[j].maxts」は、エリア内の最新のレコードを示し、「SortedKVF[j].mints」は、エリア内の最古のレコードを示す。これは、登録されている各レコードが(Key,Timestamp,Value)を要素とする集合であることから原理上、最大のTimestampを有するもの(最新)と最小のTimestampを有するもの(最古)とがあり、それを用いることができる。また、式(2)における「CT:Current Time」は、現時点での時刻を示し、「PV:Period of Validity」は、レコードの有効期限を示す。 Here, “pds” included in the equation (1) is defined by the following equation (2). Note that “SortedKVF [j] .size” in Expression (2) indicates the record size. Further, “SortedKVF [j] .maxts” in Expression (2) indicates the latest record in the area, and “SortedKVF [j] .mints” indicates the oldest record in the area. This is because, in principle, each registered record is a set having (Key, Timestamp, Value) as an element, and in principle, the record having the maximum Timestamp (latest) and the one having the minimum Timestamp (oldest) Can be used. In addition, “CT: Current Time” in Equation (2) indicates the current time, and “PV: Period of Validity” indicates the validity period of the record.
すなわち、ガベージコレクション決定部151は、式(2)に示すように、レコードの有効期限が切れている場合(SortedKVF[j].maxts≦CT−PV)には、レコードのサイズを削除容量とし、レコードの有効期限が切れていない場合(CT−PV≦SortedKVF[j].mints)には、削除容量を「0」とする。ここで、ガベージコレクション決定部151は、有効期限が切れている容量を線形に予測する。すなわち、ガベージコレクション決定部151は、時間経過に従って、削除できる量が線形に増加するという前提に従って、削除容量を予測する。
That is, the garbage
図9は、第2の実施形態に係るガベージコレクション決定部151による削除容量の予測を説明するための図である。ここで、図9の(A)においては、横軸が時刻(t)を示す。そして、図9の(A)においては、1つのエリアに含まれる全ての「SortedKVF[j](1≦j≦M)」をそれぞれ示す線分を横軸上に示す。すなわち、図9の(A)に示す線分は、図9の(B)に示すように、左端が「SortedKVF[j].mints」を示し、右端が「SortedKVF[j].maxts」を示し、長さが「SortedKVF[j].size」を示す。
FIG. 9 is a diagram for explaining prediction of deletion capacity by the garbage
例えば、ガベージコレクション決定部151は、図9の(A)において有効期間(「CT」と「CT−PV」との間)にあるソート済みKeyValueファイルについては、削除対象とはせず、削除容量を「0」とする。一方、無効期間にあるソート済みKeyValueファイルについては、削除容量をソート済みKeyValueファイルのサイズとする。そして、ガベージコレクション決定部151は、無効期間と有効期間との両方にかかるソート済みKeyValueファイルについては、式(2)の第2式を用いて削除容量を算出する。すなわち、式(2)に示すように、(SortedKVF[j].mints≦CT−PV≦SortedKVF[j].maxts)の場合には、ガベージコレクション決定部151は、期限切れとなった割合を算出して、全体のレコードサイズにおける当該割合のサイズを削除容量として算出する。
For example, the garbage
ガベージコレクション決定部151は、式(1)及び式(2)を用いて各エリアの削除容量を算出して、以下の式(3)によりガベージコレクション処理の対象となるエリアを抽出する。なお、式(3)における「gct:garbage collection target」は、現時点でガベージコレクション処理を実行した場合に最も削除量が大きいエリアを返却する関数である。また、式(3)における「Areas」は、{Area[j]|1≦j≦M}で表される集合を示す。
The garbage
すなわち、ガベージコレクション決定部151は、「Area」を引数にもつ関数「gct」により、現時点でガベージコレクションを実行した場合に、最も削除量が大きいエリアを返却する。ここで、ガベージコレクション決定部151は、以下に示す式(4)により、削除容量が一定量を超えない場合にガベージコレクション処理を実行しないように制御する。なお、式(4)における「gtc_over_mds」は、返却されたエリアに対する削除量が一定量を満たさない場合に、ガベージコレクション処理を行わないことを示す「0」を示す関数である。また、式(4)における「MDS:Minimum Deleting Size」は、ガベージコレクション処理を実行するか否かの閾値を示す。
That is, the garbage
すなわち、ガベージコレクション決定部151は、現時点でガベージコレクション処理を実行した場合のエリアの削除容量がMDSを超えていた場合に、当該エリアに関する情報をガベージコレクション実行部152に通知する。一方、現時点でガベージコレクション処理を実行した場合のエリアの削除容量がMDS以下の場合には、ガベージコレクション決定部151は、ガベージコレクション処理を実行しないことを示す「0」をガベージコレクション実行部152に通知する。
That is, the garbage
上述したように、ガベージコレクション決定部151は、有効期限が切れているか否かに基づく削除容量をエリアごとに算出し、算出した削除容量が最大となるエリアをガベージコレクション処理の対象として決定する。そして、ガベージコレクション決定部151は、対象としたエリアの削除容量が一定量(MDS)を超えたことを条件にガベージコレクション処理を実行させる。なお、上述した有効期限及びMDSは、分散ファイルシステムの管理者、或いは、ユーザによって任意に設定することができる。例えば、有効期限として、Web情報などの保持期限などとして「30日」を設定する場合であってもよい。
As described above, the garbage
第2の実施形態に係るガベージコレクション実行部152は、ガベージコレクション決定部151によって決定されたエリアに対するガベージコレクション処理を実行する。具体的には、ガベージコレクション実行部152は、ガベージコレクション決定部151によってガベージコレクション処理の対象として決定されたエリアにおける削除容量がMDSを上回った場合に、当該エリアに対するガベージコレクション処理を実行する。すなわち、ガベージコレクション実行部152は、ガベージコレクション決定部151からエリアの情報が通知された場合に、通知されたエリアに対するガベージコレクション処理を実行する。
The garbage
図10は、第2の実施形態に係るスレーブサーバによって実行されるガベージコレクション処理の一例を説明するための図である。ここで、図10の上段の矩形と矢印で示された図は、矩形がエリアを示し、矩形の長さが分割サイズを示し、レコードの追加に伴ってエリアが分割されていく状態を示す。また、図10の下段の図は、横軸が時間(t)を示し、縦軸がガベージコレクション(GC)の発生数を示す。また、図10の下段に示す黒三角形は、ガベージコレクション処理が実行されたことを示し、点線の三角形は、ガベージコレクション処理が実行されていないことを示す。 FIG. 10 is a diagram for explaining an example of the garbage collection process executed by the slave server according to the second embodiment. Here, in the figure indicated by the upper rectangle and the arrow in FIG. 10, the rectangle indicates the area, the rectangle length indicates the division size, and the area is divided as the record is added. In the lower diagram of FIG. 10, the horizontal axis indicates time (t), and the vertical axis indicates the number of occurrences of garbage collection (GC). Further, the black triangle shown in the lower part of FIG. 10 indicates that the garbage collection process has been executed, and the dotted triangle indicates that the garbage collection process has not been executed.
例えば、第2の実施形態に係るスレーブサーバ100Aによって実行されるガベージコレクション処理は、図10の下段に示すように、1つのエリアに対するガベージコレクション処理が時系列上分散されて実行される。すなわち、スレーブサーバ100Aは、特定時間間隔内の集中的なガベージコレクション処理の発生を抑止することができる。
For example, in the garbage collection process executed by the
次に、第2の実施形態に係るスレーブサーバ100Aによる処理の手順について、図11を用いて説明する。なお、第2の実施形態に係るガベージコレクション実行部152によるガベージコレクション処理は、第1の実施形態と同様である(図8参照)。図11は、第2の実施形態に係るガベージコレクション決定部151による処理の手順を示すフローチャートである。第2の実施形態に係るガベージコレクション決定部151は、図11に示すように、一定時間が経過すると(ステップS301肯定)、各エリアについて、推定される削除データ量を算出する(ステップS302)。
Next, a processing procedure by the
そして、ガベージコレクション決定部151は、削除容量が最大となるエリアを抽出して(ステップS303)、抽出したエリアの削除容量がMDSを上回るか否かを判定する(ステップS304)。ここで、抽出したエリアの削除容量がMDSを上回る場合には(ステップS304肯定)、ガベージコレクション決定部151は、該当するエリアに対するガベージコレクション処理をスケジューリングして(ステップS305)、処理を終了する。
Then, the garbage
一方、抽出したエリアの削除容量がMDSを上回らない場合には(ステップS304否定)、ガベージコレクション決定部151は、ガベージコレクション処理をスケジューリングせずに、処理を終了する。なお、一定時間経過するまで、ガベージコレクション決定部151は、待機状態である(ステップS301否定)。
On the other hand, if the deleted capacity of the extracted area does not exceed MDS (No at step S304), the garbage
[第2の実施形態の効果]
上述したように、第2の実施形態によれば、ガベージコレクション決定部151は、所定の時間間隔でエリアごとにガベージコレクション処理を実行した場合の削減容量を予測し、削減容量が最大となるエリアをガベージコレクション処理の対象と決定する。そして、ガベージコレクション実行部152は、ガベージコレクション決定部151によって決定されたエリアに対するガベージコレクション処理を実行する。従って、第2の実施形態に係るスレーブサーバ100Aは、ディスク占有量とリソース負荷との間のトレードオフをコントロールすることができ、リソース負荷を分散することを可能にする。
[Effects of Second Embodiment]
As described above, according to the second embodiment, the garbage
また、第2の実施形態によれば、ガベージコレクション決定部151は、レコードがエリアに登録された時点から所定の期間が経過した場合に、当該レコードがガベージコレクション処理によって削除されうる削除対象レコードと判定し、エリアに含まれる削除対象レコードの合計容量を削除容量として予測する。従って、第2の実施形態に係るスレーブサーバ100Aは、不要なレコードを確実に削除するようにガベージコレクション処理を実行させることを可能にする。
Further, according to the second embodiment, the garbage
また、第2の実施形態によれば、ガベージコレクション実行部152は、ガベージコレクション決定部151によってガベージコレクション処理の対象として決定されたエリアにおける削除容量が所定の閾値を上回った場合に、当該エリアに対するガベージコレクション処理を実行する。従って、第2の実施形態に係るスレーブサーバ100Aは、効果的なガベージコレクション処理を実行することを可能にする。
In addition, according to the second embodiment, the garbage
(第3の実施形態)
これまで第1の実施形態及び第2の実施形態を説明したが、本願に係る実施形態は、第1の実施形態及び第2の実施形態に限定されるものではない。すなわち、これらの実施形態は、その他の様々な形態で実行されることが可能であり、種々の省略、置き換え、変更を行うことができる。
(Third embodiment)
Although the first embodiment and the second embodiment have been described so far, the embodiment according to the present application is not limited to the first embodiment and the second embodiment. That is, these embodiments can be executed in various other forms, and various omissions, replacements, and changes can be made.
例えば、各装置の分散・統合の具体的形態(例えば、図5の形態)は図示のものに限られず、その全部又は一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的又は物理的に分散・統合することができる。一例を挙げると、ガベージコレクション決定部151及びガベージコレクション実行部152とを一つの処理部として統合してもよく、一方、ガベージコレクション決定部151を、削除容量を予測する予測部と、削除対象エリアを抽出する抽出部とに分散してもよい。
For example, the specific form of distribution / integration of each device (for example, the form shown in FIG. 5) is not limited to the one shown in the figure, and all or a part thereof can be changed in arbitrary units according to various loads and usage conditions. Functionally or physically distributed and integrated. For example, the garbage
また、制御部150をスレーブサーバ100Aの外部装置としてネットワーク経由で接続するようにしてもよく、或いは、ガベージコレクション決定部151及びガベージコレクション実行部152とを別の装置がそれぞれ有し、ネットワークに接続されて協働することで、上述したスレーブサーバ100Aの機能を実現するようにしてもよい。
The
上述した実施形態で説明したスレーブサーバ100Aは、あらかじめ用意されたプログラムをコンピュータで実行することで実現することもできる。そこで、以下では、図5に示したスレーブサーバ100Aと同様の機能を実現するガベージコレクション実行プログラムを実行するコンピュータの一例を説明する。
The
図12は、第3の実施形態に係るガベージコレクション実行プログラムを実行するコンピュータ1000を示す図である。図12に示すように、コンピュータ1000は、例えば、メモリ1010と、CPU(Central Processing Unit)1020と、ハードディスクドライブインタフェース1030と、ディスクドライブインタフェース1040と、シリアルポートインタフェース1050と、ビデオアダプタ1060と、ネットワークインタフェース1070とを有する。これらの各部は、バス1080によって接続される。
FIG. 12 is a diagram illustrating a
メモリ1010は、ROM(Read Only Memory)1011およびRAM(Random Access Memory)1012を含む。ROM1011は、例えば、BIOS(Basic Input Output System)等のブートプログラムを記憶する。ハードディスクドライブインタフェース1030は、ハードディスクドライブ1090に接続される。ディスクドライブインタフェース1040は、ディスクドライブ1100に接続される。ディスクドライブ1100には、例えば、磁気ディスクや光ディスク等の着脱可能な記憶媒体が挿入される。シリアルポートインタフェース1050には、例えば、マウス1110およびキーボード1120が接続される。ビデオアダプタ1060には、例えば、ディスプレイ1130が接続される。
The
ここで、図12に示すように、ハードディスクドライブ1090は、例えば、OS(Operating System)1091、アプリケーションプログラム1092、プログラムモジュール1093およびプログラムデータ1094を記憶する。第3の実施形態に係るガベージコレクション実行プログラムは、例えば、コンピュータ1000によって実行される指令が記述されたプログラムモジュールとして、例えばハードディスクドライブ1090に記憶される。具体的には、上記実施形態で説明したガベージコレクション決定部151と同様の情報処理を実行するガベージコレクション決定ステップと、ガベージコレクション実行部152と同様の情報処理を実行するガベージコレクション実行ステップとが記述されたプログラムモジュールが、ハードディスクドライブ1090に記憶される。
Here, as shown in FIG. 12, the hard disk drive 1090 stores, for example, an OS (Operating System) 1091, an
また、上記実施形態で説明したデータベースに記憶されるデータのように、性能分析プログラムによる情報処理に用いられるデータは、プログラムデータとして、例えば、ハードディスクドライブ1090に記憶される。そして、CPU1020が、ハードディスクドライブ1090に記憶されたプログラムモジュールやプログラムデータを必要に応じてRAM1012に読み出して、ガベージコレクション決定ステップと、ガベージコレクション実行ステップとを実行する。
Further, like the data stored in the database described in the above embodiment, data used for information processing by the performance analysis program is stored as program data, for example, in the hard disk drive 1090. Then, the
なお、性能分析プログラムに係るプログラムモジュールやプログラムデータは、ハードディスクドライブ1090に記憶される場合に限られず、例えば、着脱可能な記憶媒体に記憶されて、ディスクドライブ1100等を介してCPU1020によって読み出されてもよい。あるいは、情報送受信プログラムに係るプログラムモジュールやプログラムデータは、LAN(Local Area Network)やWAN(Wide Area Network)等のネットワークを介して接続された他のコンピュータに記憶され、ネットワークインタフェース1070を介してCPU1020によって読み出されてもよい。
Note that the program module and program data related to the performance analysis program are not limited to being stored in the hard disk drive 1090, but are stored in, for example, a removable storage medium and read out by the
これらの実施形態やその変形は、本願が開示する技術に含まれると同様に、特許請求の範囲に記載された発明とその均等の範囲に含まれるものである。 These embodiments and modifications thereof are included in the invention disclosed in the claims and equivalents thereof as well as included in the technology disclosed in the present application.
100A、100B、100C スレーブサーバ
110 通信制御I/F部
120 入力部
130 表示部
140 記憶部
141 データ記憶領域
142 ソート済みファイル記憶領域
150 制御部
151 ガベージコレクション決定部
152 ガベージコレクション実行部
200 マスターサーバ
300 ネットワークスイッチ
100A, 100B,
Claims (7)
前記決定部によって決定された実行時期に、対象となる部分テーブルに対するガベージコレクション処理を実行する実行部と、
を備えたことを特徴とするガベージコレクション実行装置。 Garbage collection process for a plurality of server record containing their respective on thus distributed key information and value information is managed included in the distributed Key-Value store has each server respectively, changing the capacitance randomly for execution upon division of each of the plurality of parts tables, a determination unit that determines an execution timing of the garbage collection process for each of the partial table,
An execution unit that executes a garbage collection process on a target partial table at an execution time determined by the determination unit;
A garbage collection execution device characterized by comprising:
前記実行部は、前記部分テーブルの分割時にガベージコレクション処理を実行することを特徴とする請求項1に記載のガベージコレクション実行装置。 The determining unit divides the partial table so that the capacity after the division changes within a predetermined range when the garbage collection process is executed when the partial table is divided.
The garbage collection execution apparatus according to claim 1, wherein the execution unit executes a garbage collection process when the partial table is divided.
前記実行部は、前記決定部によって決定された部分テーブルに対するガベージコレクション処理を実行することを特徴とする請求項1に記載のガベージコレクション実行装置。 The determination unit predicts a reduction capacity when the garbage collection process is executed for each partial table at a predetermined time interval, determines a partial table having the maximum reduction capacity as a target of the garbage collection process,
The garbage collection execution apparatus according to claim 1, wherein the execution unit executes a garbage collection process on the partial table determined by the determination unit.
前記分散Key−Valueストアに含まれる複数のサーバそれぞれによって分散して管理されたキー情報及び値情報を含むレコードに対するガベージコレクション処理が、各サーバがそれぞれ有し、容量をランダムに変化させた複数の部分テーブルごとの分割時に実行されるように、前記部分テーブルごとのガベージコレクション処理の実行時期を決定する決定工程と、
前記決定工程によって決定された実行時期に、対象となる部分テーブルに対するガベージコレクション処理を実行する実行工程と、
を含んだことを特徴とするガベージコレクション実行方法。 A garbage collection execution method executed by a device included in a distributed Key-Value store,
Garbage collection processing for the record including a plurality of server key information and value information managed in their respective Accordingly dispersed contained in the dispersion Key-Value store has each server respectively, to change the capacity at random A determination step of determining the execution time of the garbage collection process for each partial table , so that it is executed at the time of division for each of the plurality of partial tables;
An execution step of performing a garbage collection process on the target partial table at the execution time determined by the determination step;
The garbage collection execution method characterized by including.
前記分散Key−Valueストアに含まれる複数のサーバそれぞれによって分散して管理されたキー情報及び値情報を含むレコードに対するガベージコレクション処理が、各サーバがそれぞれ有し、容量をランダムに変化させた複数の部分テーブルごとの分割時に実行されるように、前記部分テーブルごとのガベージコレクション処理の実行時期を決定する決定ステップと、
前記決定ステップによって決定された実行時期に、対象となる部分テーブルに対するガベージコレクション処理を実行する実行ステップと、
を前記装置に実行させることを特徴とするガベージコレクション実行プログラム。 A garbage collection execution program executed by a device included in a distributed Key-Value store,
Garbage collection processing for the record including a plurality of server key information and value information managed in their respective Accordingly dispersed contained in the dispersion Key-Value store has each server respectively, to change the capacity at random a plurality of as may be performed in time division for each partial table, determining step of determining the execution timing of the garbage collection process for each of the parts tables,
An execution step of executing a garbage collection process on the target partial table at the execution time determined by the determination step;
Is executed by the apparatus. A garbage collection execution program characterized in that
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012084005A JP5575828B2 (en) | 2012-04-02 | 2012-04-02 | Garbage collection execution device, garbage collection execution method, and garbage collection execution program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012084005A JP5575828B2 (en) | 2012-04-02 | 2012-04-02 | Garbage collection execution device, garbage collection execution method, and garbage collection execution program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013214201A JP2013214201A (en) | 2013-10-17 |
JP5575828B2 true JP5575828B2 (en) | 2014-08-20 |
Family
ID=49587482
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012084005A Active JP5575828B2 (en) | 2012-04-02 | 2012-04-02 | Garbage collection execution device, garbage collection execution method, and garbage collection execution program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5575828B2 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103577338B (en) | 2013-11-14 | 2016-06-29 | 华为技术有限公司 | A kind of method reclaiming junk data and storage device |
JP6215401B1 (en) * | 2016-06-27 | 2017-10-18 | 株式会社東芝 | Database management apparatus, database management method, and database management program |
JP6325728B2 (en) * | 2017-08-07 | 2018-05-16 | 株式会社東芝 | Database management apparatus, database management method, and database management program |
US20210224001A1 (en) * | 2018-08-30 | 2021-07-22 | Sony Corporation | Storage controller, storage system, and information processing system |
CN115904264B (en) * | 2023-03-13 | 2023-06-13 | 浪潮电子信息产业股份有限公司 | Garbage data recovery method, device and medium for blocks in storage system |
-
2012
- 2012-04-02 JP JP2012084005A patent/JP5575828B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2013214201A (en) | 2013-10-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10795905B2 (en) | Data stream ingestion and persistence techniques | |
CN110622152B (en) | Scalable database system for querying time series data | |
US10691716B2 (en) | Dynamic partitioning techniques for data streams | |
US11163728B2 (en) | Sharing container images utilizing a shared storage system | |
US9794135B2 (en) | Managed service for acquisition, storage and consumption of large-scale data streams | |
CN109947668B (en) | Method and device for storing data | |
US9276959B2 (en) | Client-configurable security options for data streams | |
US10635644B2 (en) | Partition-based data stream processing framework | |
US9304815B1 (en) | Dynamic replica failure detection and healing | |
US8352424B2 (en) | System and method for managing replicas of objects in a distributed storage system | |
EP3040886A1 (en) | Service oriented data management and architecture | |
Lai et al. | Towards a framework for large-scale multimedia data storage and processing on Hadoop platform | |
JP5575828B2 (en) | Garbage collection execution device, garbage collection execution method, and garbage collection execution program | |
US11030169B1 (en) | Data re-sharding | |
Chen et al. | Federation in cloud data management: Challenges and opportunities | |
Kougkas et al. | Labios: A distributed label-based i/o system | |
CN104519103A (en) | Synchronous network data processing method, server and related system | |
Li et al. | Coomr: Cross-task coordination for efficient data management in mapreduce programs | |
JP2015153123A (en) | Access control program, access control method, and access control device | |
Qi et al. | Big data management in digital forensics | |
Lillaney et al. | Agni: An efficient dual-access file system over object storage | |
CN111684779B (en) | Data migration in a hierarchical storage management system | |
Shen et al. | Ditto: An elastic and adaptive memory-disaggregated caching system | |
Mishra et al. | Bulk i/o storage management for big data applications | |
KR101718739B1 (en) | System and Method for Replicating Dynamic Data for Heterogeneous Hadoop |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20131203 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140129 |
|
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: 20140701 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20140702 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5575828 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |