JP5758449B2 - Data rearrangement apparatus, method and program - Google Patents
Data rearrangement apparatus, method and program Download PDFInfo
- Publication number
- JP5758449B2 JP5758449B2 JP2013147463A JP2013147463A JP5758449B2 JP 5758449 B2 JP5758449 B2 JP 5758449B2 JP 2013147463 A JP2013147463 A JP 2013147463A JP 2013147463 A JP2013147463 A JP 2013147463A JP 5758449 B2 JP5758449 B2 JP 5758449B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- server
- block
- rearrangement
- relocation
- 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 data rearrangement apparatus, method, and program.
近年、分散ファイルシステム(Distributed File System)が広く利用されるようになっている。分散ファイルシステムは、ネットワークで接続された多数のサーバで構成され、巨大な記憶装置を実現する。典型的には、分散ファイルシステムは、複数のラックにまたがる数十台から数百台、それ以上のサーバを接続することで構成される。 In recent years, a distributed file system has been widely used. The distributed file system is composed of a large number of servers connected via a network, and realizes a huge storage device. Typically, a distributed file system is configured by connecting several tens to several hundreds of servers that extend over a plurality of racks.
このような分散ファイルシステムの例としては、Google File System(以下、GFS、非特許文献1参照)やHadoop Distributed File System(以下、HDFS、非特許文献2参照)が知られている。これらのシステムでは、ファイルを固定長のブロックに分割して、分散ファイルシステムを構成する各サーバに格納する。可用性や耐障害性を高めるために、各ブロックは定められた冗長度の数のサーバに複製して格納される。これにより、あるサーバに障害が発生しても、他のサーバに格納されているブロックを用いて処理を継続することができる。また、ブロックをサーバに格納するときは、可用性や耐障害性、読み書き性能が最大になるように格納先のサーバを決定する。 As examples of such a distributed file system, Google File System (hereinafter referred to as GFS, Non-Patent Document 1) and Hadoop Distributed File System (hereinafter referred to as HDFS, Non-Patent Document 2) are known. In these systems, a file is divided into fixed-length blocks and stored in each server constituting the distributed file system. In order to increase availability and fault tolerance, each block is duplicated and stored in a server of a predetermined redundancy number. Thereby, even if a failure occurs in a certain server, the processing can be continued using the block stored in another server. Also, when storing a block in a server, the storage destination server is determined so that availability, fault tolerance, and read / write performance are maximized.
従来の分散ファイルシステムにおいては、外部アプリケーションがデータを読み出す場合、当該外部アプリケーションが動作しているサーバ(動作サーバとも呼ぶ。)に対して、ネットワークトポロジ的に最も距離の近いサーバからブロックを読み出す。これによって、ブロックのネットワーク転送にかかる時間や処理量を抑制する。 In a conventional distributed file system, when an external application reads data, a block is read from a server having the closest network topology to a server (also referred to as an operation server) on which the external application is operating. This suppresses the time and processing amount required for network transfer of blocks.
しかし、分散ファイルシステムを長期間にわたって運用すると、サーバ間のストレージ使用が不均等になり、読み書きの処理負荷に偏りが生じる可能性がある。そこで、データ格納量が多いサーバから少ないサーバへとデータを移動させ、分散ファイルシステム全体としてサーバのストレージ使用を平準化するデータ再配置技術が提案されている。 However, when a distributed file system is operated for a long period of time, the storage usage between servers becomes uneven, and there is a possibility that the read / write processing load is biased. Thus, a data relocation technique has been proposed in which data is moved from a server with a large amount of data storage to a server with a small amount of data, and the storage use of the server is leveled as a whole distributed file system.
従来のデータ再配置技術においては、処理の結果として動作サーバに格納されていたブロックが他のサーバに移動する場合がある。その結果、外部アプリケーションがブロックを読み出そうとすると、動作サーバ以外のサーバからブロック転送を実行することになる。このため、読み出し性能が低下する。 In the conventional data rearrangement technique, a block stored in the operation server as a result of processing may move to another server. As a result, when an external application attempts to read a block, block transfer is executed from a server other than the operation server. For this reason, the reading performance is degraded.
開示の技術は、上記に鑑みてなされたものであって、外部アプリケーションの読み出し性能の低下を防止することができる分散ファイルシステムのデータ再配置装置、方法およびプログラムを提供することを目的とする。 The disclosed technique has been made in view of the above, and an object thereof is to provide a data rearrangement apparatus, method, and program for a distributed file system that can prevent a decrease in read performance of an external application.
上述した課題を解決し、目的を達成するために、実施形態に係るデータ再配置装置、方法およびプログラムは、外部アプリケーションが書き込むファイルデータを固定長のブロックに分割して予め定められた冗長度の数のサーバに格納する際に、各サーバに格納されるブロック各々について、データ再配置処理の優先度を示す再配置優先度を付与し、再配置優先度に基づいて、ブロックのデータ再配置処理を実行することを特徴とする。 In order to solve the above-described problems and achieve the object, the data relocation apparatus, method, and program according to the embodiment divide file data written by an external application into fixed-length blocks and have a predetermined redundancy. When data is stored in a number of servers, a relocation priority indicating the priority of data relocation processing is assigned to each block stored in each server, and block data relocation processing is performed based on the relocation priority. It is characterized by performing.
開示するデータ再配置装置、方法およびプログラムは、外部アプリケーションの読み出し性能の低下を防止することができるという効果を奏する。 The disclosed data rearrangement apparatus, method, and program have an effect of preventing a decrease in read performance of an external application.
以下に、開示するデータ再配置装置、方法およびプログラムの実施形態を図面に基づいて詳細に説明する。なお、実施形態は開示の技術を限定するものではない。また、各実施形態は、適宜組み合わせることができる。 Hereinafter, embodiments of a disclosed data rearrangement apparatus, method, and program will be described in detail with reference to the drawings. The embodiments do not limit the disclosed technology. Moreover, each embodiment can be combined suitably.
[GFSおよびHDFSにおけるブロックの格納処理]
まず、実施形態の前提として、GFSおよびHDFSにおけるブロックの格納処理の一例について説明する。
[Block storage processing in GFS and HDFS]
First, an example of block storage processing in GFS and HDFS will be described as a premise of the embodiment.
GFSでは、どのサーバにブロックを格納するか決定する場合、以下のように処理を行う。
(1)ブロックは、ストレージ使用率が低いサーバに作成する。
(2)特定のサーバに負荷が偏らないようにするために、各サーバにおける最近のブロック生成の数に上限を設ける。
(3)ブロックは、ラック間をまたがり複数のサーバに作成する。
In GFS, when deciding which server stores a block, the following processing is performed.
(1) A block is created on a server with a low storage usage rate.
(2) In order to prevent the load from being concentrated on a specific server, an upper limit is set on the number of recent block generations at each server.
(3) A block is created in a plurality of servers across racks.
また、HDFSでは、例えば、冗長度が3の場合、ブロックを作成するサーバは次のように選択する。まず、1つ目のブロックは書き込みを要求した外部アプリケーションが動作しているサーバと同一のサーバに作成する。そして、2つ目のブロックは1つ目のサーバとは異なるラックの任意のサーバに作成する。さらに、3つ目のブロックは2つ目のサーバと同じラックに存在するサーバだが2つ目のサーバとは異なる任意のサーバに作成する。 In HDFS, for example, when the redundancy is 3, the server that creates the block is selected as follows. First, the first block is created on the same server as the server on which the external application that requested writing is operating. The second block is created on an arbitrary server in a rack different from that of the first server. Further, the third block is created in an arbitrary server that is in the same rack as the second server but is different from the second server.
[外部アプリケーションによるデータ読み出し処理]
GFSやHDFSでは、外部アプリケーションがデータを読み出すとき、ブロックのネットワーク転送を抑制するために、外部アプリケーションが動作しているサーバに対してネットワークトポロジ的に最も距離の近いサーバからブロックを読み出す。
[Data read processing by external application]
In GFS and HDFS, when an external application reads data, in order to suppress the network transfer of the block, the block is read from the server closest in network topology to the server on which the external application is operating.
例えば、HDFSでは、外部アプリケーションがデータを書き込み、その後、当該データを読み出す場合、当該データの1つ目のブロックは外部アプリケーションが動作するサーバと同一のサーバに格納されている。このため、データ読み出し時にブロックのネットワーク転送が発生しない。したがって、外部アプリケーションが動作しているサーバとは異なるサーバからネットワークを介してブロックを読み出す場合と比べて高速な読み出しが可能である。 For example, in HDFS, when an external application writes data and then reads the data, the first block of the data is stored in the same server as the server on which the external application operates. For this reason, network transfer of blocks does not occur during data reading. Therefore, reading can be performed at a higher speed than when reading a block from a server different from the server on which the external application is operating via the network.
このようにブロックを効率的に格納し読み出すように処理が行われるが、他方、分散ファイルシステムの長期間運用によって、ファイルの生成や削除、サーバの追加や削除が行われる。すると、サーバ間でストレージ使用が不均等になり、サーバによって読み書きの負荷に偏りが生じることがある。そこで、分散ファイルシステムでは、負荷を平準化するためにデータの再配置を実行する。すなわち、大量のデータを格納しているサーバから少量のデータしか格納していないサーバにデータを移動させ、分散ファイルシステム全体でサーバのストレージ使用を平準化するデータ再配置処理を実行する。GFSでは、自動的にデータ再配置処理が実行される。HDFSでは、データ再配置処理を実行するためのコマンドが提供されている。 In this way, processing is performed so that blocks are efficiently stored and read. On the other hand, file generation and deletion, and server addition and deletion are performed by long-term operation of the distributed file system. Then, the storage usage among servers becomes uneven, and the load of reading and writing may be biased by the servers. Therefore, in the distributed file system, data rearrangement is executed in order to level the load. That is, data is relocated from a server that stores a large amount of data to a server that stores only a small amount of data, and a data relocation process is performed to level the storage usage of the server in the entire distributed file system. In GFS, a data rearrangement process is automatically executed. In HDFS, a command for executing data relocation processing is provided.
(第1の実施形態)
図1は、第1の実施形態に係るデータ再配置システムの構成例を示す図である。第1の実施形態では、分散ファイルシステムにおけるマスタサーバおよびデータサーバとしてデータ再配置装置を説明する。
(First embodiment)
FIG. 1 is a diagram illustrating a configuration example of a data rearrangement system according to the first embodiment. In the first embodiment, a data relocation apparatus will be described as a master server and a data server in a distributed file system.
[第1の実施形態のデータ再配置システムの構成の一例]
図1に示すように、第1の実施形態のデータ再配置装置は、分散ファイルシステムすなわちデータ再配置システムを構成するマスタサーバ100と、複数のデータサーバ200、300、400、500、600として構成される。図1では、例として、5つのデータサーバを示しているが、データサーバの数は5つに限定されない。外部アプリケーション700はファイルの読み出しや書き込みを要求する。
[Example of Configuration of Data Relocation System of First Embodiment]
As shown in FIG. 1, the data relocation apparatus according to the first embodiment is configured as a
データサーバ200〜600には各データサーバを一意に識別するためのデータサーバ識別子(ID:Identifier)が割り当てられる。例えば、データサーバ200〜600が動作するサーバに割り当てられたIPアドレスをデータサーバ識別子とする。図1の例では、データサーバ200、300、400、500、600にはそれぞれデータサーバ識別子ds2、ds3、ds4、ds5、ds6が割り当てられている。
A data server identifier (ID: Identifier) for uniquely identifying each data server is assigned to each of the
外部アプリケーション700がデータサーバに書き込むファイルデータは固定長のブロックに分割され、各ブロックに当該ブロックを一意に識別するためのブロック識別子が割り当てられる。各ブロックはそれぞれ定められた冗長度の数のデータサーバに格納される。
File data written to the data server by the
ファイルデータの例を図2に示す。図2は、第1の実施形態におけるファイルデータと固定長のブロックの関係を示す図である。図2の例では、ファイルデータ710は固定長のブロック711、712、713に分割される。ブロック711、712、713にはそれぞれブロック識別子b1、b2、b3が割り当てられる。なお、ファイルのサイズが固定長の倍数でない場合、末尾ブロック713のサイズは固定長よりも小さくなる。また、ファイル中にデータが存在しない区間がある場合、固定長よりも小さいブロックとなることがある。
An example of file data is shown in FIG. FIG. 2 is a diagram illustrating the relationship between file data and fixed-length blocks in the first embodiment. In the example of FIG. 2, the
[第1の実施形態のマスタサーバ100の構成の一例]
図3は、第1の実施形態におけるマスタサーバ100の構成例を示す図である。マスタサーバ100は、ブロック位置管理部110、データサーバ状態管理部120、再配置優先度付与部130およびデータ再配置制御部140を備える。ブロック位置管理部110は、ブロック位置管理テーブル111を保持する。データサーバ状態管理部120は、データサーバ状態管理テーブル121を保持する。データ再配置制御部140は、再配置元ブロック情報テーブル141および再配置先データサーバ識別子リスト142を備える。なお、再配置元ブロック情報テーブル141および再配置先データサーバ識別子リスト142はデータ再配置実行処理時に作成され、それ以外のときには格納されないものとする。
[Example of Configuration of
FIG. 3 is a diagram illustrating a configuration example of the
以下、マスタサーバ100による処理および格納される情報の詳細につき説明する。
Hereinafter, the details of the processing and stored information by the
ブロック位置管理部110は、データサーバ200〜600へのブロックの割り当てを管理する。ブロック位置管理部110は、データサーバ200〜600へのブロックの割り当てを管理するための情報を記憶するブロック位置管理テーブル111を管理する。
The block
図4は、第1の実施形態におけるブロック位置管理テーブル111の構成例を示す図である。ブロック位置管理テーブル111は、各ブロックに対応付けて、当該ブロックを一意に識別するためのブロック識別子と、当該ブロックを格納する複数のデータサーバ各々を一意に識別するためのデータサーバ識別子のリストであるデータサーバ識別子リストと、を保持する。例えば、図4の例では、ブロック識別子「b1」で識別されるブロックは、データサーバ識別子「ds2」、「ds4」、「ds5」で識別される3つのデータサーバに格納されていることが示されている。また、ブロック識別子「b2」で識別されるブロックは、データサーバ識別子「ds2」、「ds4」、「ds6」で識別される3つのデータサーバに格納されていることが示されている。また、ブロック識別子「b3」で識別されるブロックは、データサーバ識別子「ds2」、「ds3」、「ds6」で識別される3つのデータサーバに格納されていることが示されている。また、ブロック識別子「b4」で識別されるブロックは、データサーバ識別子「ds2」、「ds4」、「ds5」で識別される3つのデータサーバに格納されていることが示されている。 FIG. 4 is a diagram illustrating a configuration example of the block position management table 111 according to the first embodiment. The block position management table 111 is a list of a block identifier for uniquely identifying the block in association with each block and a data server identifier for uniquely identifying each of a plurality of data servers storing the block. A data server identifier list is maintained. For example, in the example of FIG. 4, it is indicated that the block identified by the block identifier “b1” is stored in three data servers identified by the data server identifiers “ds2,” “ds4,” and “ds5”. Has been. Further, it is indicated that the block identified by the block identifier “b2” is stored in three data servers identified by the data server identifiers “ds2”, “ds4”, and “ds6”. In addition, it is indicated that the block identified by the block identifier “b3” is stored in three data servers identified by the data server identifiers “ds2”, “ds3”, and “ds6”. Further, it is indicated that the block identified by the block identifier “b4” is stored in three data servers identified by the data server identifiers “ds2”, “ds4”, and “ds5”.
データサーバ状態管理部120は、データサーバ200〜600の状態を管理する。データサーバ状態管理部120は、データサーバ200〜600の状態に関する情報を格納するデータサーバ状態管理テーブル121を管理する。
The data server
図5は、第1の実施形態におけるデータサーバ状態管理テーブル121の構成例を示す図である。データサーバ状態管理テーブル121は、各データサーバのデータサーバ識別子に対応付けて、当該データサーバのデータ記憶部(後述)に格納可能なデータの最大容量と、データ記憶部の空き容量と、を保持する。図5の例では、データサーバ識別子「ds2」で識別されるデータサーバのデータ記憶部に格納可能なデータの最大容量は2.0テラバイト(TB)であり、現在の空き容量は1.0テラバイト(TB)であることが示されている。 FIG. 5 is a diagram illustrating a configuration example of the data server state management table 121 according to the first embodiment. The data server state management table 121 stores the maximum capacity of data that can be stored in the data storage unit (described later) of the data server and the free capacity of the data storage unit in association with the data server identifier of each data server. To do. In the example of FIG. 5, the maximum capacity of data that can be stored in the data storage unit of the data server identified by the data server identifier “ds2” is 2.0 terabytes (TB), and the current free capacity is 1.0 terabytes. (TB).
再配置優先度付与部130は、各ブロックに再配置優先度を付与する。再配置優先度は後述するデータサーバのブロック情報テーブルに格納される(図9)。再配置優先度付与部130による再配置優先度付与処理の詳細については後述する。
The rearrangement
データ再配置制御部140は、再配置元データサーバと再配置先データサーバを選択し、ブロックに付与された再配置優先度に基づいて、再配置元データサーバから再配置先データサーバへのブロックの再配置を制御する。 The data rearrangement control unit 140 selects a rearrangement source data server and a rearrangement destination data server, and blocks from the rearrangement source data server to the rearrangement destination data server based on the rearrangement priority assigned to the block. Control the relocation of
また、データ再配置制御部140は、データ再配置実行処理の実行時に、データ再配置実行処理の対象となるブロックについての情報を格納する再配置元ブロック情報テーブル141を管理する。また、データ再配置制御部140は、データ再配置実行処理の対象であるブロックの再配置先候補である再配置先データサーバのリストである再配置先データサーバ識別子リスト142を管理する。図6は、第1の実施形態における再配置元ブロック情報テーブル141の構成例を示す図である。図7は、第1の実施形態における再配置先データサーバ識別子リスト142の構成例を示す図である。再配置元ブロック情報テーブル141の構成は、後述するブロック情報テーブル(図9)と同様である。データ再配置制御部140によるデータ再配置実行処理、再配置元ブロック情報テーブル141および再配置先データサーバ識別子リスト142に関連する処理の詳細については後述する。
In addition, the data relocation control unit 140 manages a relocation source block information table 141 that stores information about a block that is a target of the data relocation execution process when the data relocation execution process is executed. In addition, the data relocation control unit 140 manages a relocation destination data
[第1の実施形態のデータサーバの構成例]
図8は、第1の実施形態におけるデータサーバの構成例を示す図である。なお、データサーバ200〜600の構成はいずれも同様であるものとし、以下、データサーバ200を代表例として説明する。以下の説明では、必要に応じて対応する他のデータサーバ300〜600の構成要素の参照符号を、括弧を付して併記する。
[Configuration Example of Data Server of First Embodiment]
FIG. 8 is a diagram illustrating a configuration example of the data server in the first embodiment. The configurations of the
データサーバ200(300,400,500,600)は、データ記憶部210(310,410,510,610)、データアクセス部220(320,420,520,620)、データ再配置実行部230(330,430,530,630)および状態通知部240(340,440,540,640)を備える。 The data server 200 (300, 400, 500, 600) includes a data storage unit 210 (310, 410, 510, 610), a data access unit 220 (320, 420, 520, 620), and a data rearrangement execution unit 230 (330). , 430, 530, 630) and a status notification unit 240 (340, 440, 540, 640).
データ記憶部210(310,410,510,610)はデータサーバ200(300,400,500,600)が格納するすべてのブロック、および当該ブロックに対応するブロック情報テーブル211(311,411,511,611)を保持する。 The data storage unit 210 (310, 410, 510, 610) stores all blocks stored in the data server 200 (300, 400, 500, 600) and a block information table 211 (311, 411, 511) corresponding to the block. 611).
図9は、第1の実施形態におけるブロック情報テーブル211(311,411,511,611)の構成例を示す図である。第1の実施形態に係るブロック情報テーブル211(311,411,511,611)は、格納する各ブロックについて、当該ブロックを一意に識別するためのブロック識別子と、データ記憶部210(310,410,510,610)内での当該ブロックの格納場所と、を対応付けて保持する。また、ブロック情報テーブル211(311,411,511,611)はさらに、各ブロックについて、当該ブロックのサイズと、当該ブロックに付与される再配置優先度と、を保持する。例えば、図9の例では、ブロック識別子「b1」で識別されるブロックは、データ記憶部210内の「p1」で識別される位置に格納されていることが示されている。また、当該ブロックのサイズは、64メガバイト(MB)であること、付与される再配置優先度は「低」であることが示されている。 FIG. 9 is a diagram illustrating a configuration example of the block information table 211 (311, 411, 511, 611) according to the first embodiment. The block information table 211 (311, 411, 511, 611) according to the first embodiment includes, for each block to be stored, a block identifier for uniquely identifying the block, and a data storage unit 210 (310, 410, 510, 610) and the storage location of the block in association with each other. The block information table 211 (311, 411, 511, 611) further holds, for each block, the size of the block and the rearrangement priority assigned to the block. For example, in the example of FIG. 9, it is indicated that the block identified by the block identifier “b1” is stored at the position identified by “p1” in the data storage unit 210. In addition, it is indicated that the size of the block is 64 megabytes (MB), and the reallocation priority given is “low”.
データアクセス部220(320,420,520,620)は、データ記憶部210(310,410,510,610)から当該データ記憶部210(310,410,510,610)に存在するブロックの読み出しを実行する。また、データアクセス部220(320,420,520,620)は、ブロック情報テーブル211(311,411,511,611)からの情報の読み出しを実行する。さらに、データアクセス部220(320,420,520,620)は、データ記憶部210(310,410,510,610)へのブロックの書き込みやブロック情報テーブル211(311,411,511,611)への情報の書き込みを行う。 The data access unit 220 (320, 420, 520, 620) reads blocks existing in the data storage unit 210 (310, 410, 510, 610) from the data storage unit 210 (310, 410, 510, 610). Run. Further, the data access unit 220 (320, 420, 520, 620) executes reading of information from the block information table 211 (311, 411, 511, 611). Further, the data access unit 220 (320, 420, 520, 620) writes a block to the data storage unit 210 (310, 410, 510, 610) or to the block information table 211 (311, 411, 511, 611). Write the information.
データ再配置実行部230(330,430,530,630)は、当該データサーバ200(300,400,500,600)に係るデータ再配置実行処理を実行する。データ再配置実行部230(330,430,530,630)によるデータ再配置実行処理の詳細については後述する。 The data rearrangement execution unit 230 (330, 430, 530, 630) executes a data rearrangement execution process related to the data server 200 (300, 400, 500, 600). Details of the data rearrangement execution processing by the data rearrangement execution unit 230 (330, 430, 530, 630) will be described later.
状態通知部240(340,440,540,640)は、データ記憶部210(310,410,510,610)の状態を監視し、マスタサーバ100に通知する。具体的には、状態通知部240(340,440,540,640)は、データ記憶部210(310,410,510,610)に格納可能な最大容量とデータ記憶部210(310,410,510,610)の空き容量とを定期的に検知する。そして、状態通知部240(340,440,540,640)は、検知した最大容量と空き容量とを定期的にマスタサーバ100のデータサーバ状態管理部120へ通知する。なお、ここでは定期的に状態を検知し通知するものとするが、なんらかのイベントの発生に応じて、またはオペレータの入力等に応じて検知および通知を実行するものとしてもよい。
The status notification unit 240 (340, 440, 540, 640) monitors the status of the data storage unit 210 (310, 410, 510, 610) and notifies the
[第1の実施形態におけるデータ再配置処理の流れの一例]
第1の実施形態に係るデータ再配置装置によるデータ再配置処理につき説明する。第1の実施形態におけるデータ再配置処理は、再配置優先度付与処理とデータ再配置実行処理とを含む。
[Example of Flow of Data Relocation Processing in First Embodiment]
Data relocation processing by the data relocation apparatus according to the first embodiment will be described. The data rearrangement process in the first embodiment includes a rearrangement priority assignment process and a data rearrangement execution process.
再配置優先度付与処理とは、データサーバに格納する各ブロックに対して、当該ブロックに対するデータ再配置処理の優先度を示す再配置優先度を付与する処理である。以下に説明する例において、再配置優先度付与処理は、ブロック生成処理の一部として実行される。ブロック生成処理は、マスタサーバ100のブロック位置管理部110によるブロックの登録と、再配置優先度付与部130による前記ブロックへの再配置優先度の付与と、データサーバによるブロックの生成処理と、を含む。
The rearrangement priority assigning process is a process for assigning a rearrangement priority indicating the priority of the data rearrangement process for each block to each block stored in the data server. In the example described below, the rearrangement priority assignment process is executed as part of the block generation process. The block generation processing includes block registration by the block
データ再配置実行処理は、各ブロックに付与された再配置優先度に基づいて当該ブロックの再配置を実行する処理である。以下に説明する例において、データ再配置実行処理は、マスタサーバ100のデータ再配置制御部140によるデータ再配置の制御と、データサーバ200(300,400,500,600)のデータ再配置実行部230(330,430,530,630)によるデータ再配置の実行と、を含む。
The data rearrangement execution process is a process for executing the rearrangement of the block based on the rearrangement priority assigned to each block. In the example described below, the data rearrangement execution process includes the data rearrangement control by the data rearrangement control unit 140 of the
[ブロック生成処理の流れ]
ブロック生成処理についてさらに詳細に説明する。
[Block generation process flow]
The block generation process will be described in more detail.
[マスタサーバ100における処理]
図10は、第1の実施形態におけるブロック生成処理において、マスタサーバ100のブロック位置管理部110が外部アプリケーション700からブロック生成要求を受信したときの動作の一例を示すフローチャートである。まず、ブロック生成処理においてマスタサーバ100が実行する処理について、図10を参照して説明する。
[Processing in Master Server 100]
FIG. 10 is a flowchart illustrating an example of an operation when the block
ブロック生成処理においては、まず外部アプリケーション700は、ファイルデータの書き込み時にマスタサーバ100のブロック位置管理部110へブロック生成要求を送信する。ブロック位置管理部110はブロック生成要求を受信すると、冗長度の数のデータサーバにブロックを生成し、当該ブロックのブロック識別子と当該ブロックを格納するデータサーバのデータサーバ識別子リストをブロック位置管理テーブル111に登録する。
In the block generation process, first, the
以下、図10に即して、ブロック生成処理においてマスタサーバ100のブロック位置管理部110が外部アプリケーション700からブロック生成要求を受信したときの動作を説明する。
The operation when the block
まず、外部アプリケーション700は、マスタサーバ100に対してブロック生成要求を送信する。マスタサーバ100はブロック生成要求を受信する(ステップS1201)と当該ブロック生成要求をブロック位置管理部110に送る。
First, the
そして、ブロック位置管理部110は、データサーバ状態管理部120のデータサーバ状態管理テーブル121から各データサーバにおけるデータ記憶部の空き容量を取得する。そして、ブロック位置管理部110は、データ記憶部の空き容量が定められた閾値以上のデータサーバの中から予め定められた冗長度の数のデータサーバを選択する(ステップS1202)。
Then, the block
ブロック位置管理部110は、各データサーバの空き容量と当該データサーバが配置されるラックに基づいて、ブロックの格納先となるサーバを選択する。すなわち、ブロック位置管理部110は、データ記憶部の空き容量が予め定められた閾値以上のデータサーバを選択する。また、ブロック位置管理部110は、ブロックを格納するデータサーバが複数のラックにまたがるようにデータサーバを選択する。
The block
例えば、予め定められた冗長度が3であり、ブロックをそれぞれ異なるラックに配置されるサーバで動作するデータサーバに格納するものとする。この場合、ブロック位置管理部110は、1つ目のデータサーバとして、ブロック生成要求を送信した外部アプリケーション700が動作しているサーバと同一のサーバで動作しているデータサーバを選択する。そしてブロック位置管理部110は、2つ目のデータサーバとして、1つ目のデータサーバとは異なるラックのサーバで動作しているデータサーバを選択する。さらに、ブロック位置管理部110は、3つ目のデータサーバとして1つ目のラックと2つ目のラックとは異なるラックのサーバで動作しているデータサーバを選択する。
For example, assume that the predetermined redundancy is 3, and the blocks are stored in data servers that operate on servers arranged in different racks. In this case, the block
そして、ブロック位置管理部110は、ブロックを格納するデータサーバのデータサーバ識別子リストを生成する。なお、ブロック位置管理部110は、空き容量不足等により予め定められた冗長度の数のデータサーバを選択できない場合は、外部アプリケーション700へブロック生成失敗を送信する。
Then, the block
次に、ブロック位置管理部110は、格納するブロックのブロック識別子を生成し(ステップS1203)、再配置優先度付与部130に対して再配置優先度の算出を指示する。
Next, the block
再配置優先度付与部130は、指示に応じて、再配置優先度を算出する(ステップS1204)。例えば、再配置優先度付与部130は、ブロック生成要求を送信した外部アプリケーションが動作しているサーバと同一のサーバで動作しているデータサーバに保持させるブロックには低い再配置優先度を算出し付与する。また、再配置優先度付与部130は、その他のサーバで動作しているデータサーバに保持させるブロックには高い再配置優先度を算出し付与する。
The rearrangement
再配置優先度の算出が終わると、マスタサーバ100は、ブロック位置管理部110が生成したデータサーバ識別子リストにある各データサーバ識別子が示すデータサーバのデータアクセス部へブロック生成要求を送信する(ステップS1205)。このとき、マスタサーバ100は、ブロック生成要求とともに、ステップS1203で生成したブロック識別子と、ステップS1204で算出した再配置優先度と、を送信する。
When the calculation of the rearrangement priority is completed, the
上述の通り、第1の実施形態では、データサーバ識別子として、データサーバのIPアドレスを用いる。このため、マスタサーバ100は、データサーバ識別子に基づいて、当該IPアドレスが示すデータサーバのデータアクセス部にアクセス可能である。しかし、IPアドレス以外の情報をデータサーバ識別子としている場合は、別途、データサーバ識別子とIPアドレスとの対応付けを行うための機構を用意する。
As described above, in the first embodiment, the IP address of the data server is used as the data server identifier. Therefore, the
マスタサーバ100は、該当するデータサーバにブロック生成要求を送信した後、それぞれのデータサーバからブロック生成応答を受信する(ステップS1206)。ブロック生成応答を受信すると、マスタサーバ100は、生成されたブロックを識別するブロック識別子と当該ブロックを生成し格納した複数のデータサーバを示すデータサーバ識別子リストとをブロック位置管理テーブル111に登録する(ステップS1207)。そして、マスタサーバ100は、外部アプリケーション700へ生成されたブロックを識別するブロック識別子と当該ブロックを生成し格納した複数のデータサーバを示すデータサーバ識別子リストとを送信する(ステップS1208)。
After transmitting a block generation request to the corresponding data server, the
外部アプリケーション700は、ブロック識別子とデータサーバ識別子リストとを受信すると、当該データサーバ識別子リストのデータサーバが保持している、当該ブロック識別子で識別されるブロックへデータを書き込む。これでマスタサーバ100での処理が終了する。
When the
[データサーバ200における処理]
次に、ブロック生成処理におけるデータサーバ側の処理について説明する。図11は、第1の実施形態におけるブロック生成処理において、データサーバのデータアクセス部がブロック生成要求を受信したときの動作の一例を示すフローチャートである。ここでは、データサーバ200がブロック生成要求を受信したとして説明する。
[Processing in Data Server 200]
Next, processing on the data server side in the block generation processing will be described. FIG. 11 is a flowchart illustrating an example of an operation when the data access unit of the data server receives a block generation request in the block generation process according to the first embodiment. Here, it is assumed that the
まず、データサーバ200は、マスタサーバ100のブロック位置管理部110からブロック生成要求、ブロック識別子、再配置優先度を受信する(ステップS1301)。すると、データアクセス部220は、空のブロックを生成し、データ記憶部210に格納する(ステップS1302)。データアクセス部220はまた、マスタサーバ100から受信したブロック識別子と再配置優先度、ブロックのサイズ(この時点では0)をブロック情報テーブル211に登録する(ステップS1302)。
First, the
そして、データサーバ200は、マスタサーバ100のブロック位置管理部110へブロック生成応答を送信し(ステップS1303)、処理を終了する。
Then, the
[データ再配置実行処理の流れ]
次に、データ再配置実行処理について説明する。第1の実施形態のデータ再配置装置においては、データ再配置実行処理は定期的に行われる。
[Flow of data relocation execution processing]
Next, the data rearrangement execution process will be described. In the data rearrangement apparatus of the first embodiment, the data rearrangement execution process is periodically performed.
[マスタサーバ100における処理]
図12は、第1の実施形態におけるデータ再配置実行処理でのマスタサーバ100のデータ再配置制御部140の動作の一例を示すフローチャートである。図12を参照して、マスタサーバ100における処理について説明する。
[Processing in Master Server 100]
FIG. 12 is a flowchart illustrating an example of the operation of the data relocation control unit 140 of the
まず、マスタサーバ100のデータ再配置制御部140は、データ再配置実行処理が必要かどうかを判定する(ステップS1401)。データ再配置制御部140は、データ再配置実行処理が必要と判定した場合(ステップS1401、肯定)、ステップS1402へ遷移する。他方、データ再配置制御部140は、データ再配置実行処理が必要ではないと判定した場合(ステップS1401、否定)、処理を終了する。
First, the data relocation control unit 140 of the
例えば、データ再配置制御部140は、データサーバ状態管理部120からデータサーバ状態管理テーブル121を取得し、以下の条件(1)および(2)を満たす場合、データ再配置実行処理が必要であると判定する。
For example, the data relocation control unit 140 acquires the data server state management table 121 from the data server
(1)個々のデータサーバにおけるデータ記憶部の空き容量を、全データサーバについて合計した値が、予め定められた一定容量とデータサーバ数の積よりも大きい。
(2)前記データサーバ状態管理テーブル121の値を基に各データサーバにおけるデータ記憶部の使用率を算出し、データ記憶部の使用率が予め定められた閾値以上になっているデータサーバが1つ以上存在する、かつ、当該データサーバのデータ記憶部の空き容量と予め定められた空き容量の余裕値との合計よりもデータ記憶部の空き容量が大きいデータサーバが1つ以上存在する。
(1) The value obtained by summing the free capacity of the data storage unit in each data server for all data servers is larger than the product of a predetermined fixed capacity and the number of data servers.
(2) The usage rate of the data storage unit in each data server is calculated based on the value of the data server state management table 121, and 1 data server has a usage rate of the data storage unit equal to or greater than a predetermined threshold. There are one or more data servers in which there is at least one and the free capacity of the data storage unit is larger than the sum of the free capacity of the data storage unit of the data server and a predetermined free capacity margin.
データ再配置実行処理が必要と判定した場合(ステップS1401、肯定)、次に、データ再配置制御部140は、再配置元データサーバを選択する(ステップS1402)。例えば、データ再配置制御部140は、データサーバ状態管理部120からデータサーバ状態管理テーブル121を取得する。そして、データ再配置制御部140は、データサーバ状態管理テーブル121の値を基に各データサーバにおけるデータ記憶部の使用率を算出する。データ再配置制御部140は、算出した使用率が予め定められた閾値以上となるデータサーバのなかからランダムに1つのデータサーバを選択する。そして、データ再配置制御部140は、選択したデータサーバを、再配置元データサーバとする。例として、ここでは、データサーバ200を再配置元データサーバとして選択したとする。
When it is determined that the data rearrangement execution process is necessary (Yes at Step S1401), the data rearrangement control unit 140 selects a rearrangement source data server (Step S1402). For example, the data relocation control unit 140 acquires the data server state management table 121 from the data server
次に、データ再配置制御部140は、最大再配置量を設定し、累積再配置量をゼロに初期化する(ステップS1403)。ここで、最大再配置量とは、一度のデータ再配置実行処理で再配置するデータ量である。最大再配置量は、予め決定しておいてもよく、データ再配置実行処理を実行するごとに決定するものとしてもよい。また、累積再配置量とは、一度のデータ再配置実行処理において、それまでに再配置を完了したデータ量を指す。 Next, the data relocation control unit 140 sets a maximum relocation amount and initializes the cumulative relocation amount to zero (step S1403). Here, the maximum rearrangement amount is a data amount to be rearranged by a single data rearrangement execution process. The maximum rearrangement amount may be determined in advance, or may be determined every time the data rearrangement execution process is executed. The cumulative rearrangement amount refers to the amount of data that has been rearranged so far in a single data rearrangement execution process.
そして、データ再配置制御部140は、再配置元データサーバ200のデータ再配置実行部230へブロック情報テーブル取得要求を送信する(ステップS1404)。データ再配置制御部140は、再配置元データサーバ200のデータ再配置実行部230からブロック情報テーブル211を受信する(ステップS1405)。 Then, the data rearrangement control unit 140 transmits a block information table acquisition request to the data rearrangement execution unit 230 of the rearrangement source data server 200 (step S1404). The data rearrangement control unit 140 receives the block information table 211 from the data rearrangement execution unit 230 of the rearrangement source data server 200 (step S1405).
データ再配置制御部140は、再配置元データサーバ200のブロック情報テーブル211の各エントリを再配置優先度の降順にソートし、再配置元ブロック情報テーブル141(図6)とする(ステップS1406)。
The data rearrangement control unit 140 sorts the entries in the block information table 211 of the rearrangement
次に、データ再配置制御部140は、再配置元ブロック情報テーブル141の最後のエントリの処理が完了しているか否かを判定する(ステップS1407)。最後のエントリの処理が完了していると判定した場合(ステップS1407、肯定)、データ再配置制御部140は、処理を終了する。データ再配置制御部140が最後のエントリの処理が完了していないと判定した場合(ステップS1407、否定)、ステップS1408へ遷移する。なお、データ再配置制御部140は、再配置元ブロック情報テーブル141の先頭のエントリに設定されたブロックから順にデータ再配置処理を実行する。 Next, the data relocation control unit 140 determines whether or not the processing of the last entry in the relocation source block information table 141 has been completed (step S1407). If it is determined that the processing of the last entry has been completed (Yes at step S1407), the data rearrangement control unit 140 ends the processing. When the data rearrangement control unit 140 determines that the process of the last entry has not been completed (No at Step S1407), the process proceeds to Step S1408. The data rearrangement control unit 140 executes data rearrangement processing in order from the block set in the head entry of the rearrangement source block information table 141.
データ再配置制御部140は、再配置元ブロック情報テーブル141の現在のエントリのブロックについて再配置先データサーバ識別子リスト142(図7)を作成し、当該リストが空か否かを判定する(ステップS1408)。 The data relocation control unit 140 creates a relocation destination data server identifier list 142 (FIG. 7) for the block of the current entry in the relocation source block information table 141, and determines whether or not the list is empty (Step S1). S1408).
データ再配置制御部140が、再配置先データサーバ識別子リスト142は空であると判定した場合(ステップS1408、肯定)、処理はステップS1414へ遷移する。
When the data relocation control unit 140 determines that the relocation destination data
他方、データ再配置制御部140が、再配置先データサーバ識別子リスト142は空でないと判定した場合(ステップS1408、否定)、処理はステップS1409に遷移する。
On the other hand, when the data relocation control unit 140 determines that the relocation destination data
再配置先データサーバ識別子リスト142は、所定のブロックの再配置先となりうる再配置先データサーバのリストである。データ再配置制御部140は、例えば、以下の条件に従い、再配置先データサーバ識別子リスト142を作成する。
The relocation destination data
例えば、ブロックをそれぞれ別々のラックのサーバで動作するデータサーバに格納すると仮定する。この場合、データ再配置実行処理の対象であるブロックに対して、以下の条件をすべて満たすデータサーバを再配置先データサーバ識別子リスト142に登録する。
For example, assume that the blocks are stored in data servers that each run on a separate rack server. In this case, a data server that satisfies all of the following conditions is registered in the relocation destination data
(1)当該データサーバは、データ再配置実行処理の対象であるブロックを保持していないデータサーバである。
(2)当該データサーバのデータ記憶部の空き容量は、再配置元データサーバのデータ記憶部の空き容量と予め定められた空き容量の余裕値との合計よりも大きい。
(3)当該データサーバが動作しているサーバのラックは、当該ブロックを保持しているデータサーバのうち、再配置元データサーバを除いたデータサーバが動作しているサーバを含まない。
(1) The data server is a data server that does not hold a block that is a target of data relocation execution processing.
(2) The free capacity of the data storage unit of the data server is larger than the sum of the free capacity of the data storage unit of the relocation source data server and a predetermined free capacity margin.
(3) The rack of servers on which the data server is operating does not include the servers on which the data servers other than the relocation source data server are operating among the data servers holding the block.
ステップS1409において、データ再配置制御部140は、再配置先データサーバ識別子リスト142にデータサーバ識別子が登録されているデータサーバの中から再配置先データサーバを選択する。
In step S1409, the data relocation control unit 140 selects a relocation destination data server from data servers whose data server identifiers are registered in the relocation destination data
例えば、データ再配置制御部140は、再配置先データサーバ識別子リスト142のデータサーバから再配置コストが最も低いデータサーバを再配置先データサーバとする。再配置コストとは、データ再配置実行処理に要する処理負荷を示すパラメータである。
For example, the data relocation control unit 140 sets the data server having the lowest relocation cost from the data servers in the relocation destination data
例えば、再配置コストは以下のように算出する。再配置先データサーバ識別子リスト142にあるデータサーバ識別子が示すデータサーバの数が2以上であるとする。このとき、データサーバdsの再配置コストCdsは次式により算出される。
Cds=Fds+W×Dds
ここで、Fdsは空き容量コスト、Ddsは距離コスト、Wは予め定められた重み係数である。
For example, the rearrangement cost is calculated as follows. Assume that the number of data servers indicated by the data server identifiers in the relocation destination data
Cds = Fds + W × Dds
Here, Fds is a free capacity cost, Dds is a distance cost, and W is a predetermined weighting factor.
空き容量コストFdsは次式により算出される。
Fds=(Fmax−fds+1)/(Fmax−Fmin+1)
ここで、FmaxとFminはそれぞれすべてのデータサーバの空き容量の最大値と最小値、fdsは当該データサーバの空き容量である。
The free capacity cost Fds is calculated by the following equation.
Fds = (Fmax−fds + 1) / (Fmax−Fmin + 1)
Here, Fmax and Fmin are the maximum value and the minimum value of the free capacity of all data servers, respectively, and fds is the free capacity of the data server.
距離コストDdsは次式により算出される。
Dds=(1.0−cos(π×i/(n−1)))/2
ここで、nは再配置先データサーバ識別子リスト142のデータサーバの数、iは再配置元データサーバからの距離を用いて再配置先データサーバ識別子リスト142の各データサーバ識別子が示すデータサーバを昇順にソートしたときの0から始まる順番である。2つのデータサーバ間の距離は、当該2つのデータサーバに割り当てられているそれぞれのIPアドレスの排他的論理和の自然対数に1を加算した値とする。
The distance cost Dds is calculated by the following equation.
Dds = (1.0−cos (π × i / (n−1))) / 2
Here, n is the number of data servers in the relocation destination data
例として、ここでは、データサーバ300を再配置先データサーバとして選択したとする。
As an example, here, it is assumed that the
データ再配置制御部140は次に、累積再配置量と現在のエントリのブロックのサイズの合計が最大再配置量以下であるか否かを判定する(ステップS1410)。データ再配置制御部140は合計が最大再配置量より大きいと判定した場合(ステップS1410、否定)、処理を終了する。合計が最大配置量以下であると判定した場合(ステップS1410、肯定)、データ再配置制御部140は、ステップS1411の処理へ進む。 Next, the data relocation control unit 140 determines whether the sum of the cumulative relocation amount and the block size of the current entry is equal to or smaller than the maximum relocation amount (step S1410). If the data rearrangement control unit 140 determines that the total is larger than the maximum rearrangement amount (No in step S1410), the process is terminated. When it is determined that the total is equal to or less than the maximum arrangement amount (Yes at Step S1410), the data rearrangement control unit 140 proceeds to the process at Step S1411.
ステップS1411において、データ再配置制御部140は、累積再配置量に現在のエントリのブロックサイズを加算する。そして、データ再配置制御部140は、ブロック位置管理部110のブロック位置管理テーブル111から、現在のエントリのブロック識別子が付与されたブロックを格納しているデータサーバのデータサーバ識別子リストを取得し、ブロックコピー元データサーバ識別子リストとする(ステップS1412)。
In step S1411, the data rearrangement control unit 140 adds the block size of the current entry to the cumulative rearrangement amount. Then, the data rearrangement control unit 140 acquires the data server identifier list of the data server storing the block to which the block identifier of the current entry is assigned from the block location management table 111 of the block
そして、データ再配置制御部140は、再配置先データサーバ300のデータ再配置実行部330へデータ再配置要求、現在のエントリのブロック識別子、再配置元データサーバ識別子、ブロックコピー元データサーバ識別子リストを送信する(ステップS1413)。次に、データ再配置制御部140は、再配置元ブロック情報テーブル141の次のエントリの処理へ進む(ステップS1414)。そして、処理はステップS1407に戻り、最後のエントリの処理が完了していなければ(ステップS1407、否定)、データ再配置制御部140は、ステップS1408からステップS1414の処理を繰り返す。最後のエントリの処理が完了したとき(ステップS1407、肯定)、処理は終了する。
Then, the data relocation control unit 140 sends a data relocation request to the data relocation execution unit 330 of the relocation
[再配置元データサーバ200における処理]
図13は、第1の実施形態におけるデータ再配置実行処理での再配置元データサーバ200のデータ再配置実行部230がブロック情報テーブル取得要求を受信したときの動作の一例を示すフローチャートである。図13を参照し、データ再配置実行処理での再配置元データサーバ200のデータ再配置実行部230がブロック情報テーブル取得要求を受信したときの動作の一例につき説明する。
[Processing in Relocation Source Data Server 200]
FIG. 13 is a flowchart illustrating an example of an operation when the data rearrangement execution unit 230 of the rearrangement
まず、再配置元データサーバ200のデータ再配置実行部230は、マスタサーバ100のデータ再配置制御部140からブロック情報テーブル取得要求を受信する(ステップS1501、図12のステップS1404、S1405参照)。
First, the data relocation execution unit 230 of the relocation
ブロック情報テーブル取得要求に応じて、データ再配置実行部230は、データアクセス部220に指示し、データ記憶部210からブロック情報テーブル211を取得する(ステップS1502)。そして、データ再配置実行部230は、マスタサーバ100のデータ再配置制御部140へブロック情報テーブル211を送信し(ステップS1503)、処理を終了する。 In response to the block information table acquisition request, the data rearrangement execution unit 230 instructs the data access unit 220 to acquire the block information table 211 from the data storage unit 210 (step S1502). Then, the data rearrangement execution unit 230 transmits the block information table 211 to the data rearrangement control unit 140 of the master server 100 (step S1503), and ends the process.
[再配置先データサーバ300における処理]
図14は、第1の実施形態におけるデータ再配置実行処理での再配置先データサーバ300のデータ再配置実行部330がデータ再配置要求を受信したときの動作の一例を示すフローチャートである。図14を参照し、データ再配置実行処理において再配置先データサーバ300のデータ再配置実行部330がデータ再配置要求を受信したときの動作の一例を説明する。
[Processing in Relocation Destination Data Server 300]
FIG. 14 is a flowchart illustrating an example of an operation when the data rearrangement execution unit 330 of the rearrangement
まず、再配置先データサーバ300のデータ再配置実行部330は、マスタサーバ100のデータ再配置制御部140からデータ再配置要求、再配置の対象となるブロックのブロック識別子、再配置元データサーバ識別子、ブロックコピー元データサーバ識別子リストを受信する(ステップS1601、図12のステップS1413参照)。
First, the data relocation execution unit 330 of the relocation
データ再配置実行部330は、受信したブロックコピー元データサーバ識別子リストに含まれるデータサーバの中からブロックコピー元データサーバ、すなわち、ブロックのコピー元とするデータサーバを選択する(ステップS1602)。例えば、再配置先データサーバ300から最も距離の近いデータサーバをブロックコピー元データサーバとする。
The data rearrangement execution unit 330 selects a block copy source data server, that is, a data server as a block copy source, from the data servers included in the received block copy source data server identifier list (step S1602). For example, the data server closest to the relocation
ここで、例えば、2つのデータサーバ間の距離は、当該2つのデータサーバに割り当てられているそれぞれのIPアドレスの排他的論理和の自然対数に1を加算した値とする。なお、ブロックコピー元データサーバは必ずしも再配置元データサーバと同一である必要はない。例として、ここでは、データサーバ400をブロックコピー元データサーバとして選択したとする。このように、ブロックコピー元データサーバと再配置先データサーバとの距離を最短とすることで、効率的なブロックコピーを実現し処理を高速化することができる。ただし、別の基準に基づいてブロックコピー元データサーバを選択することもできる。
Here, for example, the distance between two data servers is a value obtained by adding 1 to the natural logarithm of the exclusive OR of the IP addresses assigned to the two data servers. The block copy source data server is not necessarily the same as the relocation source data server. As an example, here, it is assumed that the
データ再配置実行部330は、ブロックコピー元データサーバ400のデータアクセス部420へブロックコピー要求と再配置の対象となるブロックのブロック識別子とを送信する(ステップS1603)。そして、データ再配置実行部330は、ブロックコピー元データサーバ400のデータアクセス部420からブロックを受信する(ステップS1604)。データ再配置実行部330は、データアクセス部320に指示し、受信したブロックをブロック記憶部310に格納する(ステップS1605)。また、データ再配置実行部330は、データアクセス部320に指示し、格納したブロックに対応するエントリをブロック情報テーブル311に追加して、ブロック情報テーブル311を更新する(ステップS1605)。データ再配置実行部330は、当該ブロックのサイズとして、受信したブロックのサイズを登録し、再配置優先度は「高」とする。 The data rearrangement execution unit 330 transmits the block copy request and the block identifier of the block to be rearranged to the data access unit 420 of the block copy source data server 400 (step S1603). The data rearrangement execution unit 330 receives a block from the data access unit 420 of the block copy source data server 400 (step S1604). The data rearrangement execution unit 330 instructs the data access unit 320 to store the received block in the block storage unit 310 (step S1605). Also, the data rearrangement execution unit 330 instructs the data access unit 320 to add an entry corresponding to the stored block to the block information table 311 and update the block information table 311 (step S1605). The data rearrangement execution unit 330 registers the received block size as the size of the block, and sets the rearrangement priority to “high”.
データ再配置実行部330は、マスタサーバ100のブロック位置管理部110へブロック登録要求、格納したブロックのブロック識別子、再配置元データサーバ200のデータサーバ識別子を送信する(ステップS1606)。これで、再配置先データサーバ300での処理が終了する。
The data rearrangement execution unit 330 transmits a block registration request, the block identifier of the stored block, and the data server identifier of the rearrangement
[ブロックコピー元データサーバ400における処理]
図15は、第1の実施形態におけるデータ再配置実行処理でのブロックコピー元データサーバ400のデータアクセス部420がブロックコピー要求を受信したときの動作の一例を示すフローチャートである。図15を参照し、データ再配置実行処理でのブロックコピー元データサーバ400のデータアクセス部420がブロックコピー要求を受信したときの動作の一例につき説明する。
[Processing in Block Copy Source Data Server 400]
FIG. 15 is a flowchart illustrating an example of an operation when the data access unit 420 of the block copy
ブロックコピー元データサーバ400のデータアクセス部420はまず、再配置先データサーバ300のデータ再配置実行部330からブロックコピー要求とブロック識別子とを受信する(ステップS1701、図14のステップS1603参照)。そして、データアクセス部420は、受信したブロック識別子が付与されたブロックをデータ記憶部410から読み出す(ステップS1702)。データアクセス部420は、読み出したブロックを再配置先データサーバ300のデータ再配置実行部330へ送信する(ステップS1703)。これで、ブロックコピー元データサーバ400における処理が終了する。
First, the data access unit 420 of the block copy
[マスタサーバ100におけるブロック登録要求に対する処理]
図16は、第1の実施形態におけるデータ再配置実行処理でのマスタサーバ100のブロック位置管理部110がブロック登録要求を受信したときの動作の一例を示すフローチャートである。図16を参照し、データ再配置実行処理でのマスタサーバ100のブロック位置管理部110がブロック登録要求を受信したときの動作の一例を説明する。
[Processing for Block Registration Request in Master Server 100]
FIG. 16 is a flowchart illustrating an example of an operation when the block
まず、マスタサーバ100のブロック位置管理部110は、再配置先データサーバ300のデータ再配置実行部330からブロック登録要求、ブロック識別子、再配置元データサーバ識別子を受信する(ステップS1801、図14のステップS1606参照)。ブロック位置管理部110は、ブロック位置管理テーブル111中、受信したブロック識別子に対応付けられるデータサーバ識別子リストに再配置先データサーバ300のデータサーバ識別子を追加する(ステップS1802)。また、ブロック位置管理部110は、データサーバ識別子リストから再配置元データサーバ200のデータサーバ識別子を削除する(ステップS1802)。
First, the block
そして、ブロック位置管理部110は、再配置元データサーバ200のデータアクセス部220へブロック削除要求と、再配置先データサーバ300から受信したブロック識別子を送信する(ステップS1803)。ブロック位置管理部110は、再配置元データサーバ200のデータアクセス部220からブロック削除応答を受信する(ステップS1804)。これによって、ブロック登録要求に対応するマスタサーバ100での処理が終了する。
Then, the block
[再配置元データサーバでのブロック削除要求に対する処理]
図17は、第1の実施形態におけるデータ再配置実行処理での再配置元データサーバ200のデータアクセス部220がブロック削除要求を受信したときの動作の一例を示すフローチャートである。図17を参照し、データ再配置実行処理での再配置元データサーバ200のデータアクセス部220がブロック削除要求を受信したときの動作の一例につき説明する。
[Processing for block deletion request at the relocation source data server]
FIG. 17 is a flowchart illustrating an example of an operation when the data access unit 220 of the relocation
まず、再配置元データサーバ200のデータアクセス部220は、マスタサーバ100のデータ再配置制御部140からブロック削除要求、ブロック識別子を受信する(ステップS1901、図16のステップS1803参照)。そして、データアクセス部220は、受信したブロック識別子に対応するエントリをブロック情報テーブル211から削除する(ステップS1902)。また、データアクセス部220は、受信したブロック識別子が付与されたブロックをブロック記憶部210から削除する(ステップS1902)。そして、データアクセス部220は、マスタサーバ100のデータ再配置制御部140へブロック削除応答を送信する(ステップS1903)。これによって、再配置元データサーバ200におけるブロック削除要求に対応した処理が終了する。
First, the data access unit 220 of the relocation
[第1の実施形態の効果]
このように、第1の実施形態のデータ再配置装置は、外部アプリケーションが書き込むファイルデータを固定長のブロックに分割して予め定められた冗長度の数のサーバに格納する際に、各サーバに格納されるブロック各々について、データ再配置処理の優先度を示す再配置優先度を付与する再配置優先度付与部と、再配置優先度に基づいて、ブロックのデータ再配置処理を実行するデータ再配置実行部と、を備える。このため、再配置優先度に基づいて再配置が好ましくないブロックの移動を抑制することができ、外部アプリケーションの読み出し性能の低下を防止することができる。
[Effect of the first embodiment]
As described above, the data rearrangement device according to the first exemplary embodiment allows each server to store the file data written by the external application into fixed-length blocks and store them in a predetermined number of redundancy servers. For each block to be stored, a rearrangement priority assigning unit that assigns a rearrangement priority indicating the priority of the data rearrangement process, and a data rearrangement process that executes block data rearrangement processing based on the rearrangement priority An arrangement execution unit. For this reason, it is possible to suppress the movement of the blocks whose rearrangement is not preferable based on the rearrangement priority, and to prevent the reading performance of the external application from being deteriorated.
また、第1の実施形態に係るデータ再配置装置1によれば、再配置優先度付与部は、外部アプリケーションが書き込むファイルデータを固定長に分割して得られたブロックのうち、外部アプリケーションが動作するサーバと同一のサーバが保持するブロックには低い再配置優先度、外部アプリケーションが動作するサーバとは異なるサーバが保持するブロックには高い再配置優先度を付与する。そして、データ再配置実行部は、再配置優先度が高いブロックからデータ再配置処理を実行する。 Further, according to the data rearrangement device 1 according to the first embodiment, the rearrangement priority assigning unit operates the external application among the blocks obtained by dividing the file data written by the external application into a fixed length. A low relocation priority is assigned to a block held by the same server as the server to be executed, and a high relocation priority is assigned to a block held by a server different from the server on which the external application operates. Then, the data rearrangement execution unit executes the data rearrangement process from the block having the higher rearrangement priority.
このため、外部アプリケーションが動作するサーバと同一のサーバに格納されるブロックは、データ再配置処理を実施しても同一のサーバにとどまりやすくなる。したがって、外部アプリケーションは、データを読み出す際に自身が動作するサーバと同一のサーバからブロックを読み出す確率が、他のサーバからブロックを読み出す確率よりも高くなり、再配置優先度に基づかないでデータ再配置処理を実行する場合と比較して、外部アプリケーションによる読み出しを高速化することができる。 For this reason, the block stored in the same server as the server on which the external application operates is likely to remain in the same server even if the data rearrangement process is performed. Therefore, when an external application reads data, the probability of reading a block from the same server as the server on which it operates is higher than the probability of reading a block from another server. Reading by an external application can be speeded up as compared with the case where the arrangement process is executed.
(第2の実施形態)
これまで本発明の実施形態について説明したが、本発明は上述した実施形態以外にも、その他の実施形態にて実施されてもよい。以下に、その他の実施形態を説明する。
(Second Embodiment)
Although the embodiments of the present invention have been described so far, the present invention may be implemented in other embodiments besides the above-described embodiments. Other embodiments will be described below.
[他の分散ファイルシステムへの応用]
上記実施形態は、GFSおよびHDFSのように、ブロックの位置を管理するマスタサーバとブロックを保持するデータサーバとで構成される分散ファイルシステムにおける処理を前提として説明した。しかし、本発明はこれに限定されず、データの格納位置が予め限定されているような記憶システムや分散ファイルシステムでなければ任意の記憶システムまたは分散ファイルシステムに適用することができる。
[Application to other distributed file systems]
The above embodiment has been described on the premise of processing in a distributed file system including a master server that manages the position of a block and a data server that holds the block, such as GFS and HDFS. However, the present invention is not limited to this, and can be applied to any storage system or distributed file system as long as the data storage location is not limited to a storage system or distributed file system.
[システム構成]
また、本実施例において説明した各処理のうち、自動的に行われるものとして説明した処理の全部又は一部を手動的に行うこともでき、あるいは、手動的に行われるものとして説明した処理の全部又は一部を公知の方法で自動的に行うこともできる。この他、上述文書中や図面中に示した処理手順、制御手順、具体的名称、各種のデータやパラメータを含む情報については、特記する場合を除いて任意に変更することができる。
[System configuration]
Also, among the processes described in this embodiment, all or part of the processes described as being performed automatically can be performed manually, or the processes described as being performed manually can be performed. All or a part can be automatically performed by a known method. In addition, the processing procedures, control procedures, specific names, and information including various data and parameters shown in the above-described document and drawings can be arbitrarily changed unless otherwise specified.
また、図示した各装置の各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的形態は図示のものに限られず、その全部又は一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的又は物理的に分散・統合して構成することができる。例えば、図9に示す例では、再配置優先度はブロック情報テーブル211(311,411,511,611)に格納するものとして説明したが、再配置優先度をマスタサーバ100側で管理するように構成してもよい。
Further, each component of each illustrated apparatus is functionally conceptual, and does not necessarily need to be physically configured as illustrated. That is, the specific form of distribution / integration of each device is not limited to the one shown in the figure, and all or a part of the distribution / integration may be functionally or physically distributed in arbitrary units according to various loads or usage conditions. Can be integrated and configured. For example, in the example shown in FIG. 9, the relocation priority is described as being stored in the block information table 211 (311, 411, 511, 611), but the relocation priority is managed on the
[プログラム]
図18は、データ再配置装置による一連の処理を実行するプログラムであるデータ再配置プログラムによる情報処理が、コンピュータを用いて具体的に実現されることを示す図である。図18に例示するように、コンピュータ1000は、例えば、メモリ1010と、CPU(Central Processing Unit)1020と、ハードディスクドライブ1080と、ネットワークインタフェース1070とを有する。コンピュータ1000の各部はバス1100によって接続される。
[program]
FIG. 18 is a diagram illustrating that the information processing by the data rearrangement program, which is a program for executing a series of processes by the data rearrangement apparatus, is specifically realized using a computer. As illustrated in FIG. 18, the computer 1000 includes, for example, a
メモリ1010は、図18に例示するように、ROM1011およびRAM1012を含む。ROM1011は、例えば、BIOS(Basic Input Output System)等のブートプログラムを記憶する。
The
ここで、図18に例示するように、ハードディスクドライブ1080は、例えば、OS1081、アプリケーションプログラム1082、プログラムモジュール1083、プログラムデータ1084を記憶する。すなわち、開示の技術に係るデータ再配置プログラムは、コンピュータによって実行される指令が記述されたプログラムモジュール1083として、例えばハードディスクドライブ1080に記憶される。例えば、マスタサーバ100、データサーバ200〜600の各部と同様の情報処理を実行する手順各々が記述されたプログラムモジュール1083が、ハードディスクドライブ1080に記憶される。
Here, as illustrated in FIG. 18, the
また、マスタサーバ100、データサーバ200〜600に記憶されるデータのように、データ再配置プログラムによる情報処理に用いられるデータは、プログラムデータ1084として、例えばハードディスクドライブ1080に記憶される。そして、CPU1020が、ハードディスクドライブ1080に記憶されたプログラムモジュール1083やプログラムデータ1084を必要に応じてRAM1012に読み出し、各種の手順を実行する。
Further, data used for information processing by the data rearrangement program, such as data stored in the
なお、データ再配置プログラムに係るプログラムモジュール1083やプログラムデータ1084は、ハードディスクドライブ1080に記憶される場合に限られない。例えば、プログラムモジュール1083やプログラムデータ1084は、着脱可能な記憶媒体に記憶されてもよい。この場合、CPU1020は、ディスクドライブなどの着脱可能な記憶媒体を介してデータを読み出す。また、同様に、更新プログラムに係るプログラムモジュール1083やプログラムデータ1084は、ネットワーク(LAN(Local Area Network)、WAN(Wide Area Network)等)を介して接続された他のコンピュータに記憶されてもよい。この場合、CPU1020は、ネットワークインタフェース1070を介して他のコンピュータにアクセスすることで各種データを読み出す。
Note that the
[その他]
なお、本実施例で説明したデータ再配置プログラムは、インターネット等のネットワークを介して配布することができる。また、データ再配置プログラムは、ハードディスク、フレキシブルディスク(FD)、CD−ROM、MO、DVDなどのコンピュータで読取可能な記録媒体に記録され、コンピュータによって記録媒体から読み出されることによって実行することもできる。
[Others]
The data rearrangement program described in this embodiment can be distributed via a network such as the Internet. The data rearrangement program can also be executed by being recorded on a computer-readable recording medium such as a hard disk, a flexible disk (FD), a CD-ROM, an MO, and a DVD, and being read from the recording medium by the computer. .
100 マスタサーバ
110 ブロック位置管理部
111 ブロック位置管理テーブル
120 データサーバ状態管理部
121 データサーバ状態管理テーブル
130 再配置優先度付与部
140 データ再配置制御部
141 再配置元ブロック情報テーブル
142 再配置先データサーバ識別子リスト
200,300,400,500,600 データサーバ
210,310,410,510,610 データ記憶部
211,311,411,511,611 ブロック情報テーブル
220,320,420,520,620 データアクセス部
230,330,430,530,630 データ再配置実行部
240,340,440,540,640 状態通知部
700 外部アプリケーション
710 ファイルデータ
711,712,713 ブロック
1000 コンピュータ
1010 メモリ
1011 ROM
1012 RAM
1020 CPU
1070 ネットワークインタフェース
1080 ハードディスクドライブ
1081 OS
1082 アプリケーションプログラム
1083 プログラムモジュール
1084 プログラムデータ
1100 バス
DESCRIPTION OF
1012 RAM
1020 CPU
1070
1082
Claims (3)
少なくとも前記各サーバのデータ記憶部の空き容量および使用率に基づき、各サーバに記憶されるブロックを移動させるデータ再配置処理を実行するか否かを判定し、前記データ再配置処理を実行すると判定した場合に、前記データ再配置処理の再配置元であるサーバに記憶される各ブロックを前記再配置優先度の降順に再配置し、データ再配置処理を完了したデータ量が所定のデータ量に達すると、前記データ再配置処理を終了するデータ再配置制御部と、
を備えることを特徴とするデータ再配置装置。 When the file data written by the external application is divided into fixed-length blocks and stored in a predetermined number of redundant servers , the block written by the external application is stored for each block stored in each server. If the server and the server running the external application are the same, move the block from the server than when the server storing the block written by the external application is different from the server running the external application. A rearrangement priority assigning unit that assigns a rearrangement priority indicating the priority of the data rearrangement process by setting the rearrangement priority indicating the priority to be low ,
Based on at least the free capacity and the usage rate of the data storage unit of each server, it is determined whether or not to execute a data rearrangement process for moving a block stored in each server, and it is determined to execute the data rearrangement process In this case, each block stored in the server that is the rearrangement source of the data rearrangement process is rearranged in descending order of the rearrangement priority, and the data amount that has completed the data rearrangement process becomes a predetermined data amount. A data rearrangement control unit that terminates the data rearrangement process,
A data rearrangement device comprising:
少なくとも前記各サーバのデータ記憶部の空き容量および使用率に基づき、各サーバに記憶されるブロックを移動させるデータ再配置処理を実行するか否かを判定し、前記データ再配置処理を実行すると判定した場合に、前記データ再配置処理の再配置元であるサーバに記憶される各ブロックを前記再配置優先度の降順に再配置し、データ再配置処理を完了したデータ量が所定のデータ量に達すると、前記データ再配置処理を終了するデータ再配置制御工程と、
を含むことを特徴とするデータ再配置方法。 When the file data written by the external application is divided into fixed-length blocks and stored in a predetermined number of redundant servers , the block written by the external application is stored for each block stored in each server. If the server and the server running the external application are the same, move the block from the server than when the server storing the block written by the external application is different from the server running the external application. A rearrangement priority assigning step for assigning a rearrangement priority indicating the priority of the data rearrangement process by setting the rearrangement priority indicating the priority to be low ;
Based on at least the free capacity and the usage rate of the data storage unit of each server, it is determined whether or not to execute a data rearrangement process for moving a block stored in each server, and it is determined to execute the data rearrangement process In this case, each block stored in the server that is the rearrangement source of the data rearrangement process is rearranged in descending order of the rearrangement priority, and the data amount that has completed the data rearrangement process becomes a predetermined data amount. A data rearrangement control step for ending the data rearrangement process upon reaching,
A data rearrangement method comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013147463A JP5758449B2 (en) | 2013-07-16 | 2013-07-16 | Data rearrangement apparatus, method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013147463A JP5758449B2 (en) | 2013-07-16 | 2013-07-16 | Data rearrangement apparatus, method and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2015022327A JP2015022327A (en) | 2015-02-02 |
JP5758449B2 true JP5758449B2 (en) | 2015-08-05 |
Family
ID=52486770
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013147463A Active JP5758449B2 (en) | 2013-07-16 | 2013-07-16 | Data rearrangement apparatus, method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5758449B2 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6315608B2 (en) * | 2015-07-01 | 2018-04-25 | 日本電信電話株式会社 | Distributed storage system, data relocation method, and data relocation program |
KR101718739B1 (en) * | 2015-12-10 | 2017-04-04 | 숭실대학교산학협력단 | System and Method for Replicating Dynamic Data for Heterogeneous Hadoop |
JP6859293B2 (en) * | 2018-07-13 | 2021-04-14 | Kddi株式会社 | Data management system, data management method and data management program |
JP2021012464A (en) | 2019-07-04 | 2021-02-04 | 富士通株式会社 | Switching program, device, and method |
JP2021124952A (en) | 2020-02-05 | 2021-08-30 | 富士通株式会社 | Information processing apparatus, information processing system, and access control method |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4549787B2 (en) * | 2004-09-10 | 2010-09-22 | 株式会社日立製作所 | Storage device |
JP2007264823A (en) * | 2006-03-27 | 2007-10-11 | Nifty Corp | File sharing program |
-
2013
- 2013-07-16 JP JP2013147463A patent/JP5758449B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2015022327A (en) | 2015-02-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8239621B2 (en) | Distributed data storage system, data distribution method, and apparatus and program to be used for the same | |
US9298734B2 (en) | Storage system, computer system and data migration method | |
US10977124B2 (en) | Distributed storage system, data storage method, and software program | |
US10042869B1 (en) | Method for data transfer between compute clusters and file system | |
CN107092442B (en) | Storage system resource allocation method and device | |
JP4068473B2 (en) | Storage device, assignment range determination method and program | |
JP5561425B2 (en) | Storage system | |
JP5758449B2 (en) | Data rearrangement apparatus, method and program | |
JP2010277289A (en) | Management program, management device and management method | |
CN107615261B (en) | Method and apparatus for shared storage between multiple cloud environments | |
JPWO2008114441A1 (en) | Storage management program, storage management method, and storage management device | |
US10609174B2 (en) | Parallel prefetching log/meta stream sub-portions to recreate partition states in a distributed computing system | |
JP6222227B2 (en) | Storage node, storage node management apparatus, storage node logical capacity setting method, program, recording medium, and distributed data storage system | |
JP2004280485A (en) | Computer system | |
JP2013114624A (en) | Storage system and control method for pool capacity reduction | |
JP2015517147A (en) | System, method and computer program product for scheduling processing to achieve space savings | |
US10990433B2 (en) | Efficient distributed arrangement of virtual machines on plural host machines | |
JP2010198056A (en) | Allocation control program and allocation control device | |
JP2016118821A (en) | Storage management device, storage management method and storage management program | |
US20220066786A1 (en) | Pre-scanned data for optimized boot | |
CN1602480A (en) | Managing storage resources attached to a data network | |
JP6653370B2 (en) | Storage system | |
JP2018181190A (en) | Storage device and storage control program | |
WO2016110936A1 (en) | Computer system and data management method | |
US20210103400A1 (en) | Storage system and data migration method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150127 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150309 |
|
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: 20150602 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20150603 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5758449 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |