JP6688240B2 - Distributed synchronous processing system and distributed synchronous processing method - Google Patents
Distributed synchronous processing system and distributed synchronous processing method Download PDFInfo
- Publication number
- JP6688240B2 JP6688240B2 JP2017028610A JP2017028610A JP6688240B2 JP 6688240 B2 JP6688240 B2 JP 6688240B2 JP 2017028610 A JP2017028610 A JP 2017028610A JP 2017028610 A JP2017028610 A JP 2017028610A JP 6688240 B2 JP6688240 B2 JP 6688240B2
- Authority
- JP
- Japan
- Prior art keywords
- distributed processing
- processing unit
- priority
- distributed
- unit
- 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
- Multi Processors (AREA)
Description
本発明は、分散配置された複数のサーバを同期させて処理を実行する分散同期処理システムおよび分散同期処理方法に関する。 The present invention relates to a distributed synchronous processing system and a distributed synchronous processing method for synchronizing a plurality of distributedly arranged servers to execute processing.
ネットワーク上に複数のサーバを分散配置する分散処理システムのフレームワークとして、非特許文献1にはMapReduceが開示されている。但し、このMapReduceは、処理の度に、外部のデータストアからの入力データの読み込みや、結果の書き出し処理が必要であるため、ある処理の結果を次の処理で利用するようなイテレーティブな(反復する)処理には向いていない。この種の処理には、非特許文献2に開示されているBSP(Bulk Synchronous Parallel:バルク同期並列)が適している。
Non-Patent
このBSPは、「スーパーステップ(SS:superstep)」という処理単位を繰り返し実行することにより、分散環境でのデータ処理を実行する。図1は、BSP計算モデルを説明するための図である。 This BSP executes data processing in a distributed environment by repeatedly executing a processing unit called "super step (SS)". FIG. 1 is a diagram for explaining the BSP calculation model.
1つのスーパーステップは、図1に示すように、次の3つのフェーズ(PH:phase)、「ローカル計算(LC:Local computation)」(フェーズPH1)、「データ交換(Com:Communication)」(フェーズPH2)、「同期(Sync)」(フェーズPH3)から構成される。
具体的には、複数のノード(ノード1〜ノード4)のうちのいずれかのノードがデータを受信すると、そのノード(例えば、ノード1)がフェーズPH1において、そのデータについての計算処理(ローカル計算(LC))を実行する。続いて、フェーズPH2において、各ノードが保持しているローカル計算の結果であるデータについて、ノード間でのデータ交換を実行する。次に、フェーズPH3において、同期処理を行う、より詳細には、すべてのノード間でのデータ交換の終了を待つ。
そして、スーパーステップSS1として、一連のスーパーステップの処理(PH1〜PH3)が終了すると、各ノードはその計算結果を保持した上で、次の一連の処理であるスーパーステップSS2へと進む。
As shown in FIG. 1, one super step includes the following three phases (PH: phase), "local computation (LC)" (phase PH1), and "data exchange (Com: Communication)" (phase PH2) and "Sync" (phase PH3).
Specifically, when any one of the plurality of nodes (
Then, when a series of super step processes (PH1 to PH3) is completed as super step SS1, each node holds the calculation result and proceeds to the next series of processes, super step SS2.
このBSPを採用した分散処理フレームワークとして、非特許文献3にはPregelが開示されている。このPregel等のフレームワークでは、全体の処理をグラフG=(V,E)として表現し、これをBSPに適用して実行する。ここで、Vは「バーテックス(vertex:頂点)の集合」であり、Eは「エッジ(edge:辺)の集合」を意味する。
Non-Patent
ここで、図2を参照し、交通シミュレーションにBSPを適用した例を説明する。
図2においては、各交差点(v)が頂点(vertex)に対応付けられる(図2のv1〜v4)。また、各交差点を結ぶ道路(e)が辺(edge)に対応付けられる(図2のe1〜e6)。ここで、辺(edge)は一方通行であり、双方向の道路は2つの辺(edge)に対応付けられる。また、ある頂点(vertex)から見て、車両が出てゆく方向の辺(edge)を、「出力辺(outgoing edge)」と呼び、車両が流入する方向の辺(edge)を「入力辺(incoming edge)」と呼ぶ。例えば、図2において、頂点v2からみると、辺e1は入力辺であり、辺e2は出力辺になる。逆に、頂点v1からみると、辺e1は出力辺であり、辺e2は入力辺になる。
Here, an example in which the BSP is applied to the traffic simulation will be described with reference to FIG.
In FIG. 2, each intersection (v) is associated with a vertex (v 1 to v 4 in FIG. 2). Further, the road (e) that connects each intersection is associated with an edge (e 1 to e 6 in FIG. 2). Here, an edge is a one-way street, and a bidirectional road is associated with two edges. In addition, the edge (edge) in the direction in which the vehicle exits from a certain vertex is called the “outgoing edge”, and the edge in the direction in which the vehicle inflows is the “input edge (edge)”. incoming edge) ". For example, in FIG. 2, when viewed from the vertex v 2 , the side e 1 is the input side and the side e 2 is the output side. Conversely, when viewed from the vertex v 1 , the side e 1 is an output side and the side e 2 is an input side.
図1で示したスーパーステップでは、フェーズPH1(ローカル計算)において、頂点(vertex)毎に、経過時間(Δt)における、各頂点v1〜v4に対応付けられている交差点の状態(例えば、信号の色(青、黄、赤)や交差点内の車両の動き等)と、それに付随する出力辺としての道路内の状態(車両の動き(台数・平均速度等))とをシミュレートする。フェーズPH2(データ交換)では、ある頂点(vertex)は、出力辺を介して接する他の頂点(vertex)に対して、当該出力辺を介して出てゆく車両の動きの情報(台数等)を送信するとともに、入力辺を介して入ってくる車両の動きの情報(台数等)を受信する。フェーズPH3(同期)では、頂点(vertex)間で、シミュレーション時刻tを同期する。つまり、全ての頂点(vertex)間でデータ交換の完了を待つ。
この交通シミュレーションにおいては、このように交差点(頂点(vertex))単位で、並列処理することにより、計算時間を短縮することが可能となる。
In the super step shown in FIG. 1, in the phase PH1 (local calculation), the state of the intersection associated with each vertex v 1 to v 4 at the elapsed time (Δt) for each vertex (vertex) (for example, The color of the signal (blue, yellow, red) and the movement of the vehicle in the intersection) and the state of the road (vehicle movement (number of vehicles, average speed, etc.)) as an output side are simulated. In phase PH2 (data exchange), a certain vertex (vertex) sends information about the movement of the vehicle (the number of vehicles, etc.) that goes out through the output edge to another vertex (vertex) that contacts the output edge. While transmitting, it also receives information on the movement of the vehicle (the number of vehicles, etc.) coming in through the input side. In phase PH3 (synchronization), the simulation time t is synchronized between the vertices. In other words, wait for the completion of data exchange between all vertices.
In this traffic simulation, it is possible to reduce the calculation time by performing parallel processing on an intersection (vertex) basis.
しかしながら、上記のBSPを採用した分散同期処理システムの構成では、スーパーステップ毎に、全頂点(vertex)を同期するため、最も処理が遅い頂点(vertex)にあわせることとなる。よって、たった一つでも全体から著しく遅い頂点(vertex)があると、その影響が全体に及ぶ。つまり、最も処理が遅い頂点(vertex)にあわせて、全体が著しく遅延してしまう。 However, in the configuration of the distributed synchronization processing system that employs the above BSP, all vertices are synchronized for each superstep, so that the vertices that are the slowest to process are matched. Therefore, if there is only one vertex that is significantly slower than the whole, the effect will be global. In other words, the whole process will be significantly delayed according to the slowest vertex.
上記の問題を解決する手法として、非特許文献4に記載の技術が提案されている。
非特許文献4では、全体同期ではなく、隣接する頂点(vertex)の間で局所的に同期処理を行う。具体的には、「自頂点(vertex)および入力辺で接する全ての頂点(vertex)の計算・送信処理(ローカル計算(フェーズPH1)およびデータ交換(フェーズPH2))が完了していること」(以下、「隣接同期」と称する。)を満たしている場合に、各頂点(vertex)が次のスーパーステップに移行する。これにより、同期(Sync)(フェーズPH3)における待ち時間が削減されるため、システム全体としての処理速度の向上させることができる。
The technique described in
In
この非特許文献4に記載の分散同期処理システムは、全ての頂点(vertex)のローカル計算(フェーズPH1)を並列実行できるという前提で評価を行っていた。しかしながら、実際には、各頂点(vertex)のローカル計算(フェーズPH1)を実行する処理サーバ(後記する「worker」)は、各頂点(vertex)に個別のスレッドを割り当てて処理するため、CPU(Central Processing Unit)の1コアに複数のスレッドが割り当てられた場合(以下、「リソース制約」と称する。)に、予期せぬアイドル時間が生じる可能性がある。
The distributed synchronous processing system described in
本発明は、前記した問題を鑑みてなされたものであり、分散同期処理を行うシステムにおいて、リソース制約による予期せぬアイドル時間を抑制することができる、分散同期処理システムおよび分散同期処理方法を提供することを課題とする。 The present invention has been made in view of the above problems, and provides a distributed synchronization processing system and a distributed synchronization processing method capable of suppressing an unexpected idle time due to resource constraints in a system that performs distributed synchronization processing. The task is to do.
前記した課題を解決するため、請求項1に記載の発明は、複数の処理サーバと、前記処理サーバ上で動作する複数の分散処理部と、を有する分散同期処理システムであって、前記分散処理部のそれぞれには、当該分散処理部自身が属する処理サーバのCPUにおける1コアのスケジューリング対象として、個別の実行単位である1スレッドが割り当てられるものであり、前記処理サーバのそれぞれが、前記分散処理部による所定の計算ステップにおける計算処理、および、当該分散処理部の接続先となる他の分散処理部との間でのデータ送受信を完了し、当該分散処理部が、次の前記計算ステップについて実行可能な状態を示す実行可能状態であることを検出する隣接同期分散管理部と、前記実行可能状態となった分散処理部それぞれに、当該分散処理部の前記計算処理の遅れにより前記他の分散処理部のCPUを処理待ちにさせる影響が大きいほど、前記計算処理の遅れる分散処理部に高い優先度を設定する所定の優先度算出アルゴリズムを用いて前記優先度を設定し、前記優先度の高い分散処理部のスレッドを優先的に前記CPUの処理スケジュールに割り当てる優先度設定部と、を備えることを特徴とする。
In order to solve the above-mentioned problems, the invention according to
また、請求項7に記載の発明は、複数の処理サーバと、前記処理サーバ上で動作する複数の分散処理部と、を有する分散同期処理システムの分散同期処理方法であって、前記分散処理部のそれぞれには、当該分散処理部自身が属する処理サーバのCPUにおける1コアのスケジューリング対象として、個別の実行単位である1スレッドが割り当てられるものであり、前記処理サーバのそれぞれが、前記分散処理部による所定の計算ステップにおける計算処理、および、当該分散処理部の接続先となる他の分散処理部との間でのデータ送受信を完了し、当該分散処理部が、次の前記計算ステップについて実行可能な状態を示す実行可能状態であることを検出する手順と、前記実行可能状態となった分散処理部それぞれに、当該分散処理部の前記計算処理の遅れにより前記他の分散処理部のCPUを処理待ちにさせる影響が大きいほど、前記計算処理の遅れる分散処理部に高い優先度を設定する所定の優先度算出アルゴリズムを用いて前記優先度を設定し、前記優先度の高い分散処理部のスレッドを優先的に前記CPUの処理スケジュールに割り当てる手順と、を実行することを特徴とする。 The invention according to claim 7 is a distributed synchronization processing method for a distributed synchronization processing system, comprising: a plurality of processing servers; and a plurality of distributed processing units operating on the processing servers. One thread, which is an individual execution unit, is assigned as a scheduling target of one core in the CPU of the processing server to which the distributed processing unit itself belongs, and each of the processing servers has the distributed processing unit. Completion of the calculation processing in a predetermined calculation step by and the data transmission / reception to / from another distributed processing section to which the distributed processing section is connected, and the distributed processing section can execute the next calculation step. such a step of detecting that condition is executable state indicating, in distributed processing unit respectively became the executable state, the of the distributed processing unit The priority of the CPU of the other distributed processing units due to a delay of the calculation process the larger influence to the pending, using a predetermined priority calculation algorithm for setting a higher priority to the distributed processing unit delay of the calculation process Is set and the thread of the distributed processing unit having a high priority is preferentially assigned to the processing schedule of the CPU.
このようにすることで、分散処理システムの各処理サーバのリソース制約による予期せぬアイドル時間を抑制することができる。これにより、各処理サーバのリソース利用効率が向上し、同期処理計算の高速化(実行時間の短縮)を図ることができる。 By doing so, an unexpected idle time due to resource restrictions of each processing server of the distributed processing system can be suppressed. As a result, the resource utilization efficiency of each processing server is improved, and it is possible to speed up the synchronization processing calculation (reduce the execution time).
請求項2に記載の発明は、前記処理サーバのそれぞれが、計算対象となる各分散処理部の接続関係として、前記分散処理部と当該分散処理部が算出したデータの出力先となる他の分散処理部とが出力辺で繋がり、前記分散処理部と次の前記計算ステップで必要となるデータの入力元となる他の分散処理部とが入力辺で繋がることを示すグラフトポロジを記憶する記憶部を備えており、前記所定の優先度算出アルゴリズムは、前記実行可能状態となった分散処理部それぞれについての前記出力辺の数を算出し、前記算出した出力辺の数が多い前記分散処理部の優先度を高く設定するものであり、前記優先度設定部が、当該所定の優先度算出アルゴリズムを用いて前記分散処理部それぞれの優先度を設定し、設定した優先度のうち、より高い優先度が設定された分散処理部のスレッドを優先的に前記CPUの処理スケジュールに割り当てることを特徴とする。 According to a second aspect of the present invention, each of the processing servers has, as a connection relationship between the distributed processing units to be calculated, the distributed processing unit and another distribution that is an output destination of data calculated by the distributed processing unit. A storage unit that stores a graph topology indicating that the processing unit is connected by an output side, and the distributed processing unit and another distributed processing unit that is an input source of data required in the next calculation step are connected by an input side. The predetermined priority calculation algorithm calculates the number of the output sides for each of the distributed processing units in the executable state, and the predetermined number of output sides of the distributed processing units is large. The priority is set to a high priority, and the priority setting unit sets the priority of each of the distributed processing units using the predetermined priority calculation algorithm, and the higher priority among the set priorities is set. There and allocating threads configured distributed processing unit in the processing schedule preferentially the CPU.
このようにすることで、分散処理システムの処理サーバは、出力辺の数が多い、つまり、隣接する分散処理部が多く、他の分散処理部に影響を及ぼす分散処理部のスレッドを優先して処理することができる。これにより、リソース制約によるアイドル時間を抑制することができる。 By doing so, the processing server of the distributed processing system has a large number of output sides, that is, a large number of adjacent distributed processing units, and gives priority to threads of the distributed processing units that affect other distributed processing units. Can be processed. As a result, the idle time due to resource restrictions can be suppressed.
請求項3に記載の発明は、前記隣接同期分散管理部が、各前記分散処理部が実行している前記計算ステップのステップ番号を監視しており、前記所定の優先度算出アルゴリズムは、前記実行可能状態となった分散処理部それぞれについての前記計算ステップのステップ番号を参照し、他の前記分散処理部と比べ処理が遅延している分散処理部の優先度を高く設定するものであり、前記優先度設定部が、当該所定の優先度算出アルゴリズムを用いて前記分散処理部それぞれの優先度を設定し、設定した優先度のうち、より高い優先度が設定された分散処理部のスレッドを優先的に前記CPUの処理スケジュールに割り当てることを特徴とする。
In the invention according to
このようにすることで、分散処理システムの処理サーバは、各分散処理部のうち、実行している計算ステップが遅い分散処理部のスレッドを優先して処理することができる。これにより、リソース制約によるアイドル時間を抑制することができる。 By doing so, the processing server of the distributed processing system can preferentially process the thread of the distributed processing unit that is executing the slowest calculation step among the distributed processing units. As a result, the idle time due to resource restrictions can be suppressed.
請求項4に記載の発明は、前記処理サーバのそれぞれが、計算対象となる各分散処理部の接続関係として、前記分散処理部と当該分散処理部が算出したデータの出力先となる他の分散処理部とが出力辺で繋がり、前記分散処理部と次の前記計算ステップで必要となるデータの入力元となる他の分散処理部とが入力辺で繋がることを示すグラフトポロジを記憶する記憶部を備えており、前記分散処理部のそれぞれが、前記入力元となる他の分散処理部からのデータの送信がないため、次の前記計算ステップに移行できず入力待ち状態となっている場合に、当該入力元となる他の分散処理部に対し、入力待ち情報を送信することにより投票し、前記入力待ち情報を受信した入力元となる他の分散処理部は、受信した前記入力待ち情報の数を優先度投票値として集計し、前記所定の優先度算出アルゴリズムは、前記入力元となる他の分散処理部のうち、前記優先度投票値の多い分散処理部の優先度を高く設定するものであり、前記処理サーバそれぞれの前記優先度設定部が、当該所定の優先度算出アルゴリズムを用いて前記分散処理部それぞれの優先度を設定し、設定した優先度のうち、より高い優先度が設定された分散処理部のスレッドを優先的に前記CPUの処理スケジュールに割り当てることを特徴とする。
In the invention according to
このようにすることで、分散処理システムの処理サーバは、実際に隣接している分散処理部を入力待ち状態にさせている分散処理部のスレッドを優先して処理することができる。これにより、リソース制約によるアイドル時間を抑制することができる。 By doing so, the processing server of the distributed processing system can preferentially process the threads of the distributed processing units that actually put the adjacent distributed processing units in the input waiting state. As a result, the idle time due to resource restrictions can be suppressed.
請求項5に記載の発明は、前記入力待ち情報を受信した入力元となる他の分散処理部が、自身も前記入力待ち状態である場合に、前記集計した優先度投票値に自身の遅延分を加えた優先度投票値を付した前記入力待ち情報を、前記入力元となる他の分散処理部のさらに入力元であり遅延の原因である他の分散処理部に送信することを特徴とする。
In the invention according to
このようにすることで、分散処理システムの処理サーバは、隣接している分散処理部を入力待ち状態にさせている分散処理部だけでなく、その分散処理部をさらに入力待ち状態にさせている分散処理部も考慮して優先すべき分散処理部を決定することができる。これにより、リソース制約によるアイドル時間をさらに抑制することができる。 By doing so, the processing server of the distributed processing system puts the adjacent distributed processing unit in the input waiting state as well as the distributed processing unit in which the adjacent distributed processing unit is placed in the input waiting state. The distributed processing unit to be prioritized can be determined in consideration of the distributed processing unit. As a result, the idle time due to resource restrictions can be further suppressed.
請求項6に記載の発明は、複数の処理サーバと、前記処理サーバ上で動作する複数の分散処理部と、を有する分散同期処理システムであって、前記分散処理部のそれぞれには、当該分散処理部自身が属する処理サーバのCPUにおける1コアのスケジューリング対象として、個別の実行単位である1スレッドが割り当てられるものであり、前記処理サーバのそれぞれが、前記分散処理部による所定の計算ステップにおける計算処理、および、当該分散処理部の接続先となる他の分散処理部との間でのデータ送受信を完了し、当該分散処理部が、次の前記計算ステップについて実行可能な状態を示す実行可能状態であることを検出する隣接同期分散管理部と、前記実行可能状態となった分散処理部に優先度を付し、前記優先度の高い分散処理部のスレッドを優先的に前記CPUの処理スケジュールに割り当てる優先度設定部と、計算対象となる各分散処理部の接続関係として、前記分散処理部と当該分散処理部が算出したデータの出力先となる他の分散処理部とが出力辺で繋がり、前記分散処理部と次の前記計算ステップで必要となるデータの入力元となる他の分散処理部とが入力辺で繋がることを示すグラフトポロジを記憶する記憶部とを、備え、前記優先度設定部が、前記実行可能状態となった分散処理部それぞれについての前記出力辺の数を算出し、前記算出した出力辺の数が多い前記分散処理部のスレッドを優先して前記CPUの処理スケジュールに割り当てることの指標となる第1の優先度を求め、前記隣接同期分散管理部が、各前記分散処理部が実行している前記計算ステップのステップ番号を監視しており、前記優先度設定部が、前記実行可能状態となった分散処理部それぞれについての前記計算ステップのステップ番号を参照し、他の前記分散処理部と比べ処理が遅延している分散処理部のスレッドを優先して前記CPUの処理スケジュールに割り当てることの指標となる第2の優先度を求め、前記優先度設定部が、前記第1の優先度および前記第2の優先度の双方を用いた各前記分散処理部の優先度を算出し、前記算出した優先度が高い前記分散処理部のスレッドを優先して前記CPUの処理スケジュールを割り当てることを特徴とする。 A sixth aspect of the present invention is a distributed synchronous processing system having a plurality of processing servers and a plurality of distributed processing units operating on the processing servers, wherein each of the distributed processing units has the distributed processing unit. One thread, which is an individual execution unit, is assigned as a scheduling target of one core in the CPU of the processing server to which the processing unit itself belongs, and each of the processing servers calculates in a predetermined calculation step by the distributed processing unit. Executable state indicating that the processing and data transmission / reception to / from another distributed processing unit to which the distributed processing unit is connected are completed, and the distributed processing unit indicates an executable state for the next calculation step. The priority is given to the adjacent synchronization distributed management unit that detects that the distributed processing unit is in the executable state, and the distributed processing unit with the high priority is attached. As a connection relationship between the priority setting unit that preferentially assigns threads to the processing schedule of the CPU and each distributed processing unit to be calculated, the distributed processing unit and the output destination of the data calculated by the distributed processing unit Of the distributed processing unit is connected by an output side, and the distributed processing unit and another distributed processing unit that is an input source of data required in the next calculation step are connected by an input side, and a graph topology is stored. A storage unit, wherein the priority setting unit calculates the number of output sides for each of the distributed processing units in the executable state, and the distributed processing unit having a large number of calculated output sides A first priority, which is an index for prioritizing threads to be assigned to the processing schedule of the CPU, is obtained, and the adjacent synchronization distribution management unit executes the calculation scan executed by each of the distributed processing units. The step number of the calculation step is monitored, and the priority setting unit refers to the step number of the calculation step for each of the distributed processing units in the executable state, and compares it with the other distributed processing units. The priority of the thread of the distributed processing unit that is delayed is assigned to the processing schedule of the CPU, the second priority is obtained, and the priority setting unit determines the first priority and the first priority. The priority of each of the distributed processing units is calculated using both of the two priorities, and the thread of the distributed processing unit with the calculated high priority is prioritized and the processing schedule of the CPU is assigned. .
このようにすることで、分散処理システムの処理サーバは、各分散処理部の出力辺の数および実行している計算ステップの双方を考慮して優先度を算出し、算出した優先度の高い分散処理部のスレッドを優先して処理することができる。これにより、リソース制約によるアイドル時間を抑制することができる。 By doing so, the processing server of the distributed processing system calculates the priority in consideration of both the number of output sides of each distributed processing unit and the calculation step being executed, and the distribution of the calculated high priority The thread of the processing unit can be processed with priority. As a result, the idle time due to resource restrictions can be suppressed.
本発明によれば、分散同期処理を行うシステムにおいて、リソース制約による予期せぬアイドル時間を抑制することができる、分散同期処理システムおよび分散同期処理方法を提供することができる。
また、上記効果に伴い、分散同期処理システムを構成する処理サーバのリソース利用効率を向上させ、同期処理計算の高速化(実行時間の短縮)を図ることができる。
According to the present invention, it is possible to provide a distributed synchronization processing system and a distributed synchronization processing method capable of suppressing an unexpected idle time due to resource constraints in a system that performs distributed synchronization processing.
Further, along with the above effects, it is possible to improve the resource utilization efficiency of the processing servers that configure the distributed synchronous processing system, and speed up the synchronous processing calculation (shorten the execution time).
<比較例の分散同期処理手法の内容と課題の詳細な説明>
初めに、本実施形態に係る分散同期処理システム1および分散同期処理方法の特徴構成を説明するため、比較例として従来技術における分散同期処理システム1a,1bおよびその分散同期処理方法を、詳細に説明する。
まず、従来のBSPを用いた分散同期処理システム1a(図3〜図5参照)を説明し、その後、非特許文献4に記載の分散同期処理システム1b(図6参照)を説明する。
<Detailed description of the contents and problems of the distributed synchronization processing method of the comparative example>
First, in order to describe the characteristic configurations of the distributed
First, a distributed synchronous processing system 1a (see FIGS. 3 to 5) using a conventional BSP will be described, and then a distributed synchronous processing system 1b (see FIG. 6) described in
比較例の分散同期処理システム1aは、図3に示すように、複数のworker(処理サーバ)10aそれぞれが、複数の頂点(vertex)20aを備えて構成される。そして、この構成にBSPを適用するとき、各worker10aは、自身が備える全ての頂点(vertex)20aについて、現在のスーパーステップ(以下、単に「ステップ」と称することがある。)の状態を管理する。また、各worker10aは、自身が備える全ての頂点(vertex)20aの処理(フェーズPH1,2)が完了すると、その完了情報を他のworker10aに報告し、それぞれのworker10aは、全worker10aからの報告を受けると、スーパーステップを次のスーパーステップに移行する。
なお、各worker10aのうちの1つを代表worker10aとし、各worker10aから完了情報を取得し、全worker10aからの報告を受け、次のスーパーステップへの移行指示を各worker10aに送信するようにしてもよい。また、1つのmaster(管理サーバ)を設けて、各worker10aから完了情報を取得し、全worker10aからの報告を受け、次のスーパーステップへの移行指示を各worker10aに送信するようにしてもよい。
In the distributed synchronous processing system 1a of the comparative example, as shown in FIG. 3, each of a plurality of workers (processing servers) 10a includes a plurality of
It should be noted that one of the
ここで、頂点(vertex)に着目すると、各頂点(vertex)は、次に示す処理を実行する。
頂点(vertex)は、BSPのフェーズPH1において、現在のその頂点(vertex)の状態、出力辺の状態、および、前スーパーステップの入力メッセージにより取得した情報(入力辺の状態)をパラメータとして計算を行い、頂点(vertex)の状態および出力辺の状態を更新する。そして、頂点(vertex)は、フェーズPH2において、更新した出力辺の状態を出力メッセージとして、その出力辺に隣接する頂点(vertex)に送信する。また、頂点(vertex)は、入力辺で隣接する頂点(vertex)から、更新した入力辺の状態を入力メッセージとして受信する。
この各頂点(vertex)が実行する、フェーズPH1における計算処理およびフェーズPH2におけるデータ交換を、以下「計算・送信処理」と記載する。また、スーパーステップn(nは、正の整数)における計算・送信処理を、「計算・送信処理fn」と記載する。
Here, focusing on the vertices, each of the vertices executes the following processing.
In the phase PH1 of the BSP, the vertex is calculated by using the current state of the vertex, the state of the output side, and the information (the state of the input side) acquired by the input message of the previous super step as parameters. Perform and update the state of the vertices and the state of the output edge. Then, in phase PH2, the vertex transmits the updated state of the output side to the vertex adjacent to the output side as an output message. In addition, the vertex receives the updated state of the input edge as an input message from the adjacent vertex.
The calculation process in phase PH1 and the data exchange in phase PH2 executed by each vertex will be referred to as “calculation / transmission process” below. Further, the calculation / transmission processing in the super step n (n is a positive integer) is described as “calculation / transmission processing f n ”.
次に、図5を参照して、比較例の分散同期処理システム1aが実行する処理の流れについて説明する。なお、ここでは、計算対象が、図4に示すグラフトポロジ(グラフG)であるものとして説明する。また、図5に示すように、分散同期処理システム1aが2台のworker(worker1,worker2)で構成され、頂点(vertex)v1〜v6のうち、頂点(vertex)v1〜v3をworker1が担当し、頂点(vertex)v4〜v6をworker2が担当するものとする。以下、全体の処理の流れを通して説明する。
Next, a flow of processing executed by the distributed synchronous processing system 1a of the comparative example will be described with reference to FIG. Note that the description will be given here assuming that the calculation target is the graph topology (graph G) shown in FIG. Further, as shown in FIG. 5, is composed of a distributed synchronous processing system 1a is two worker (worker1, worker2), the apex (vertex) v of 1 to v 6, the vertex (vertex) v 1 ~v 3 It is assumed that the
まず、各worker(worker1,worker2)は、担当する頂点(vertex)のスーパーステップを実行する(ステップS101)。具体的には、フェーズPH1のローカル計算を実行し、スーパーステップの処理を開始する。 First, each worker (worker1, worker2) executes the superstep of the vertex in charge (step S101). Specifically, the local calculation of the phase PH1 is executed, and the super step process is started.
次に、各workerは、自身が担当する頂点(vertex)の処理の進行を監視し、各頂点(vertex)が、フェーズPH2のデータ交換まで完了したか否かを判定する。そして、各workerは、担当する全ての頂点(vertex)が、フェーズPH2までの処理を完了したと確認した場合に、その完了情報を他のworkerに送信する(ステップS102)。 Next, each worker monitors the progress of the processing of the vertex (vertex) that it is in charge of, and determines whether or not each vertex (vertex) has completed the data exchange of phase PH2. Then, when each worker confirms that all the vertices in charge have completed the processing up to the phase PH2, the worker sends the completion information to other workers (step S102).
続いて、各workerは、自身を含む全てのworker(ここでは、worker1,worker2)から完了情報を受信したか否かを確認する。そして、各workerは、全てのworkerから完了情報を受信した場合に、スーパーステップを「+1」に更新し(ステップS103)、担当する各頂点(vertex)に次のスーパーステップの実行を指示する(ステップS104)。
そして、各workerは、ステップS101〜S104を繰り返す。
Subsequently, each worker confirms whether or not the completion information has been received from all the workers (here, worker1 and worker2) including itself. Then, when each worker receives the completion information from all the workers, the worker updates the superstep to “+1” (step S103) and instructs each vertex in charge to execute the next superstep ( Step S104).
Then, each worker repeats steps S101 to S104.
比較例の分散同期処理システム1aにおいては、スーパーステップ毎に、計算対象となる全ての頂点(vertex)を同期する。具体的には、図5に示す全体同期ポイントにおいて同期するため、最も遅い頂点(vertex)にあわせることとなる。例えば、図5のスーパーステップSS1では、頂点(vertex)v1〜v6のうち、最も遅い頂点(vertex)v2にあわせることとなる。また、スーパーステップSS2では、最も遅い頂点(vertex)v6にあわせることとなる。よって、著しく遅い頂点(vertex)があると、その頂点(vertex)にあわせるために、頂点(vertex)の処理全体が著しく遅延してしまう。 In the distributed synchronization processing system 1a of the comparative example, all the vertices to be calculated are synchronized for each superstep. Specifically, since the synchronization is performed at the entire synchronization point shown in FIG. 5, it is adjusted to the slowest vertex. For example, the Super step SS1 in FIG. 5, the vertex (vertex) v of 1 to v 6, and thus to match the slowest vertex (vertex) v 2. Furthermore, the Super step SS2, and thus fit the slowest vertex (vertex) v 6. Therefore, if there is a remarkably slow vertex, the whole processing of the vertex will be significantly delayed in order to match that vertex.
このような問題を解決するため非特許文献4の分散同期処理システム1bでは、従来の全頂点(vertex)での同期を行わず、頂点(vertex)毎に次のスーパーステップへの移行を判断している。具体的には、非特許文献4の分散同期処理システム1bでは、「自頂点(vertex)および入力辺で接する全ての頂点(vertex)の計算・送信処理fn(ローカル計算(フェーズPH1)およびデータ交換(フェーズPH2))が完了していること」(隣接同期)を満たしている場合に、各頂点(vertex)が次のスーパーステップに移行するものとしている。
In order to solve such a problem, in the distributed synchronization processing system 1b of
図6は、図5において示した比較例の分散同期処理システム1aが実行する処理(図6(a)参照)と、非特許文献4の分散同期処理システム1bが実行する処理(図6(b)参照)とを示す図である。
非特許文献4の分散同期処理システム1bでは、上記のように、「自頂点(vertex)および入力辺で接する全ての頂点(vertex)の計算・送信処理fn(ローカル計算(フェーズPH1)およびデータ交換(フェーズPH2))が完了していること」(隣接同期)により、次のスーパーステップに移行する。
6 is a process executed by the distributed synchronous processing system 1a of the comparative example shown in FIG. 5 (see FIG. 6A) and a process executed by the distributed synchronous processing system 1b of Non-Patent Document 4 (see FIG. 6B). ) Reference).
In the distributed synchronous processing system 1b of
例えば、図6(b)の頂点(vertex)v2に着目すると、頂点(vertex)v2は、入力辺で接する頂点(vertex)v1,v3,v4の計算・送信処理fnと自身の計算・送信処理fnが終わった時点が隣接同期する隣接同期ポイントとなる。ここで頂点(vertex)v2は、スーパーステップSS1のとき、自身の計算・送信処理f1の終了が頂点(vertex)v1,v3,v4より遅く一番後であったので、その時点が隣接同期ポイントとなっている。
頂点(vertex)v3に着目すると、頂点(vertex)v3は、入力辺で接する頂点(vertex)v2,v4の計算・送信処理fnと自身の計算・送信処理fnが終わった時点が隣接同期する隣接同期ポイントとなる。ここで頂点(vertex)v3は、スーパーステップSS1のとき、自身の計算・送信処理f1が終わった時点では、頂点(vertex)v4の計算・送信処理f1は終わっているが、頂点(vertex)v2の計算・送信処理f1が終わっていないため、待機状態となり(図6(b)の符号α)、頂点(vertex)v2の計算・送信処理f1が終わった時点が隣接同期する隣接同期ポイントとなる。
また、頂点(vertex)v1に着目すると、頂点(vertex)v1は、入力辺で接する頂点(vertex)は存在しない、よって、スーパーステップSS1のとき、自頂点(vertex)の計算・送信処理f1が終了した時点が隣接同期する隣接同期ポイントとなる。
For example, paying attention to the vertex (vertex) v 2 in FIG. 6B, the vertex (vertex) v 2 is the calculation / transmission processing f n of the vertices (vertex) v 1 , v 3 , v 4 that are in contact with the input side. The point at which the calculation / transmission process f n of itself is completed is the adjacent synchronization point for adjacent synchronization. Here, since the end of the calculation / transmission process f 1 of the vertex (vertex) v 2 is later than that of the vertex (vertex) v 1 , v 3 , v 4 in the super step SS1, The time point is the adjacent synchronization point.
Focusing on the vertex (vertex) v 3, vertices (vertex) v 3 has finished apex (vertex) v 2, v 4 of calculation and transmission processing f n and their calculation and transmission processing f n in contact with the input side The time point becomes an adjacent synchronization point for adjacent synchronization. Here apex (vertex) v 3, when the super step SS1, at the time the end of the calculation and transmission processing f 1 itself, calculation and transmission processing f 1 vertex (vertex) v 4 is ending vertices Since the calculation / transmission process f 1 of (vertex) v 2 is not completed, the state becomes a standby state (reference numeral α in FIG. 6B), and the time when the calculation / transmission process f 1 of vertex (vertex) v 2 is completed is It becomes an adjacent synchronization point for adjacent synchronization.
Further, paying attention to the vertex (vertex) v 1, vertex (vertex) v 1 is the vertex in contact with the input side (vertex) is not present, therefore, when the super step SS1, calculation and transmission process of its own vertex (vertex) The time point when f 1 ends is the adjacent synchronization point for adjacent synchronization.
図6(b)に示すように、処理全体のある時点でみると、各頂点(vertex)間においてスーパーステップがずれる可能性がある。そのため、頂点(vertex)間でメッセージを送受信するときには上書きせずに、スーパーステップ毎に管理する。つまり、各workerは、スーパーステップの情報(ステップ番号)をあわせて記憶するようにする。 As shown in FIG. 6B, at some point in the entire process, there is a possibility that the supersteps will shift between the vertices. Therefore, when a message is sent and received between vertices, it is not overwritten but managed for each super step. That is, each worker stores the super step information (step number) together.
このようにすることで、図6(a)に示す、従来の分散同期処理システム1aに比べ、フェーズ3の同期待ちをする時間が大幅に削減されるため、システム全体としての処理速度や各workerの利用効率を改善することが可能となった。
By doing so, compared to the conventional distributed synchronous processing system 1a shown in FIG. 6A, the time for waiting for the synchronization of the
この図6(b)に示した非特許文献4に記載の分散同期処理システム1bでは、全ての頂点(vertex)のローカル計算(フェーズPH1)を並列実行できるという前提で評価を行っている。しかしながら、実際には、上記のように、各頂点(vertex)のローカル計算(フェーズPH1)を実行するworkerは、各頂点(vertex)に個別のスレッドを割り当てて処理するため、CPUの1コアに複数のスレッドが割り当てられた場合に、予期せぬアイドル時間が生じる可能性がある。以下、具体的に説明する。
In the distributed synchronous processing system 1b described in
図7は、本発明の課題を説明するための図である。
ここでは、図7(a)に示すように、頂点(vertex)v1,v2,v3をworker1が担当し、頂点(vertex)v4,v5,v6をworker2が担当する。そして、頂点(vertex)間の矢印で示すようなグラフトポロジ(グラフG)であるものとする。
また、前提として、各頂点(vertex)には個別のスレッドが割り当てられるものとする。なお、ここでは、プロセスも含め、CPUの1コアのスケジューリング対象として、個別の実行単位が割り当てられる処理単位をスレッドと称する。
FIG. 7: is a figure for demonstrating the subject of this invention.
Here, as shown in FIG. 7A, the
Further, as a premise, it is assumed that an individual thread is assigned to each vertex. In addition, here, a processing unit including a process, to which a single execution unit is assigned as a scheduling target of one core of the CPU is referred to as a thread.
図7(a)において、各頂点(vertex)それぞれには1つのスレッドが割り当てられる。図7等では、各workerにおけるスレッド(ここでは、3つのスレッド)を区別するために、濃いドット、薄いドット、ドットなしでスレッドを示している。また、各スレッドの矩形毎に付された番号は、スーパーステップの番号を示し、例えば、頂点(vertex)v1は、スーパーステップSS1〜3を実行することを示す。そして、矩形の1つが、そのworkerのCPUコアにおけるCPU時間の割り当て単位(Time Slice)を示す。例えば、頂点(vertex)v1は、スーパーステップSS1において、3単位(Time Slice)のCPU時間の割り当てが必要であり、スーパーステップSS2において、5単位(Time Slice)のCPU時間の割り当てが必要であり、スーパーステップSS3において、3単位(Time Slice)のCPU時間の割り当てが必要であることを示している。 In FIG. 7A, one thread is assigned to each vertex. In FIG. 7 and the like, in order to distinguish the threads (here, three threads) in each worker, threads are shown with dark dots, light dots, and no dots. Further, the number given to each rectangle of each thread indicates the super step number, and for example, the vertex v 1 indicates that the super steps SS1 to SS3 are executed. Then, one of the rectangles indicates a CPU time allocation unit (Time Slice) in the CPU core of the worker. For example, the vertex v 1 needs to be assigned CPU time of 3 units (Time Slice) in the super step SS1, and needs to be assigned CPU time of 5 units (Time Slice) in the super step SS2. Yes, it indicates that the CPU time of 3 units (Time Slice) needs to be allocated in the super step SS3.
図7(b)は、各workerのCPUが1コアである場合のスレッド処理のスケジューリングにおけるCPU消費を示している。
スレッド処理のスケジューリングは、通常、実行可能なスレッドの割り当て単位(Time Slice)毎にラウンドロビン等で決定されるため、例えば、図7(a)の処理を、worker1,2が非特許文献4に記載の隣接同期を用いて実行すると、図7(b)の符号αで示すように、頂点(vertex)v3のスーパーステップSS1が終わらないと、入力辺で接する頂点(vertex)v4,v5,v6は、次のスーパーステップSS2に進めない。よって、アイドル時間(矩形の中を斜線で示す)が発生してしまう。
また、図7(b)の符号βで示すように、頂点(vertex)v3のスーパーステップSS2が終わらないと、入力辺で接する頂点(vertex)v4,v5,v6は、次のスーパーステップSS3に進めない。よって、アイドル時間が発生してしまう。
FIG. 7B shows the CPU consumption in the thread processing scheduling when the CPU of each worker has one core.
Since the scheduling of thread processing is normally determined by a round robin or the like for each allocation unit (Time Slice) of an executable thread, for example, the processing of FIG. When the execution is performed using the described adjacency synchronization, as shown by the symbol α in FIG. 7B, if the superstep SS1 of the vertex (vertex) v 3 is not completed, the vertices (vertex) v 4 , v contacting with the input side 5, v 6 does not proceed to the next super step SS2. Therefore, idle time (indicated by diagonal lines in the rectangle) occurs.
Further, as indicated by reference numeral β in FIG. 7 (b), when the super step SS2 vertices (vertex) v 3 does not end, the apex being in contact with the input side (vertex) v 4, v 5 , v 6 is the following I can't proceed to Super Step SS3. Therefore, idle time occurs.
図7(b)においては、説明を容易にするため、各workerがシングルコアの例で説明しているが、1コアに複数のスレッドが割り当てられる場合には、マルチコアでも同様の問題が発生する。つまり、各workerのリソース制約により、予期せぬアイドル時間が生じる可能性がある。
本実施形態に係る分散同期処理システム1では、後記するように、各頂点(vertex)のスレッドに適切な優先度を付与し、優先度が高いスレッドから優先的にCPU時間を割り当てることにより、アイドル時間を削減することができる。
In FIG. 7B, each worker is described as an example of a single core in order to facilitate the description. However, when a plurality of threads are assigned to one core, the same problem occurs in multicore. . In other words, due to resource constraints of each worker, unexpected idle time may occur.
In the distributed
≪本実施形態に係る分散同期処理システム≫
次に、本実施形態に係る分散同期処理システム1について説明する。
まず、分散同期処理システム1の処理概要について図8を参照して説明する。
<< Distributed synchronous processing system according to the present embodiment >>
Next, the distributed
First, a processing outline of the distributed
図8は、本実施形態に係る分散同期処理システム1の処理概要を説明するための図である。図8(a),(b)は、図7(a),(b)において示した図と同様の図であり、非特許文献4の分散同期処理システム1bにおいて各頂点(vertex)毎に隣接同期処理を行った場合でのアイドル時間の発生を示している。
図8(c)は、本実施形態に係る分散同期処理システム1のworker(後記する「処理サーバ10」)が、各頂点(vertex)のスレッドに優先度を付与し、優先度が高いスレッドからCPU時間を割り当てることにより、アイドル時間を削減した例を示している。
FIG. 8 is a diagram for explaining the processing outline of the distributed
In FIG. 8C, the worker (the “processing
図8(c)においては、worker1が担当する各頂点(vertex)v1,v2,v3の優先度を、優先度の高い順にv3,v2,v1とし(以下、「v3>v2>v1」のように記載する。)、worker2が担当する各頂点(vertex)v4,v5,v6の優先度を、v5>v4>v6とした例を示している。各worker(処理サーバ10)がこの優先度を導出するための所定のアルゴリズムは後記して詳細に説明する。
In FIG. 8C, the priorities of the vertices v 1 , v 2 , v 3 that the
各worker(処理サーバ10)のCPUのスレッド処理のスケジュールにおいて、優先度の高いスレッドからCPU時間に割り当てることにより、CPUのアイドル時間を削減することができる。図8(c)では、頂点(vertex)v3の処理待ちのためのアイドル時間をなくして、頂点(vertex)v4が処理を実行することができる(図8(c)の符号α)。これにより、優先度による制御をしていない図8(b)の処理に比べ、worker(処理サーバ10)のリソース利用効率を向上させ、システム全体として更なる高速化(実行時間の短縮)を図ることができる。 In the thread processing schedule of the CPU of each worker (processing server 10), the CPU idle time can be reduced by allocating the CPU time from the thread with the highest priority. In FIG. 8C, the idle time for waiting for the processing of the vertex v 3 can be eliminated, and the processing of the vertex v 4 can be performed (reference numeral α in FIG. 8C). As a result, the resource utilization efficiency of the worker (processing server 10) is improved compared to the processing of FIG. 8 (b) in which control is not performed by priority, and further speedup (reduction of execution time) is achieved for the entire system. be able to.
<分散同期処理システムの構成>
次に、本実施形態に係る分散同期処理システム1の構成について説明する。
図9は、本実施形態に係る分散同期処理システム1の構成を示す図である。
図9に示すように、分散同期処理システム1は、複数の処理サーバ10(worker)と、各処理サーバ10上で動作する複数の分散処理部20(頂点(vertex))と、を備える。
<Structure of distributed synchronous processing system>
Next, the configuration of the distributed
FIG. 9 is a diagram showing the configuration of the distributed
As shown in FIG. 9, the distributed
処理サーバ10は、CPU、RAM(Random Access Memory)、ROM(Read Only Memory)、HDD(Hard Disk Drive)等、一般的なコンピュータとしてのハードウエアを備えており、HDDには、OS(Operating System)、アプリケーションプログラム、各種データ等が格納されている。OSおよびアプリケーションプログラムは、RAMに展開され、CPUによって実行される。なお、図9において、処理サーバ10および分散処理部20の内部は、RAMに展開されたアプリケーションプログラム等によって実現される機能(特徴構成)を、ブロックとして示している。
各処理サーバ10(worker)上では、個々の計算処理(ローカル計算)に対応した複数の分散処理部20がBSP(バルク同期並列)における頂点(vertex)として動作する。
以下、分散同期処理システム1を構成する各装置について詳細に説明する。
The
On each processing server 10 (worker), a plurality of distributed
Hereinafter, each device constituting the distributed
<分散処理部(頂点(vertex))>
分散処理部20(頂点(vertex))は、BSPにおける所定の単位に区分された計算処理を実行し、数値計算部21、メッセージ送受信部22および状態通知部23を含んで構成される。また、後記するように、処理サーバ10(worker)の優先度算出アルゴリズムの設定に伴い、処理待ち投票部24を備える場合がある。
<Distributed processing unit (vertex)>
The distributed processing unit 20 (vertex) executes calculation processing divided into predetermined units in the BSP, and includes a
数値計算部21は、BSPにおけるフェーズPH1(ローカル計算)の処理を実行する。この数値計算部21は、メッセージ送受信部22を介して処理サーバ10(worker)から受信する、次のスーパーステップへの移行指示(以下、「次ステップ移行指示」と称する。)に従い、次のスーパーステップへの移行を行う。なお、数値計算部21は、自身の計算・送信処理fnが完了した後、次ステップ移行指示を受信するまで待機する。
The
メッセージ送受信部22は、他の分散処理部20や処理サーバ10(worker)との間での情報の送受信を行う。具体的には、メッセージ送受信部22は、BSPにおけるフェーズPH2(データ交換)において、自身の出力辺の状態を出力メッセージとして、その出力辺で接続する分散処理部20(頂点(vertex))へ向けて送信する。なお、この出力メッセージには、その出力辺の状態に対応付けてその時点でのスーパーステップのステップ番号が付される。また、メッセージ送受信部22は、入力辺で接続する分散処理部20(頂点(vertex))から入力辺の状態を入力メッセージとして受信する。また、この入力メッセージには、その入力辺に状態に対応付けてその時点でのスーパーステップのステップ番号が付される。なお、メッセージ送受信部22は、この出力メッセージおよび入力メッセージを、処理サーバ(worker)10のメッセージ処理部12を介して送受信する。
また、このメッセージ送受信部22は、自身が属する処理サーバ10(worker)から、次ステップ移行指示を受信し、数値計算部21に出力する。
The message transmitting / receiving
Further, the message transmission /
状態通知部23は、BSPにおける自身の分散処理部20(頂点(vertex))の状態を監視し、処理サーバ10(worker)に状態情報として通知する。
具体的には、状態通知部23は、後記する処理サーバ10の優先度設定部14に設定された所定の優先度設定アルゴリズムで必要となる自身の状態情報を検出し、処理サーバ10に送信する。
例えば、状態通知部23は、「計算・送信処理」(フェーズPH1における計算処理およびフェーズPH2におけるデータ交換)の際、自身の計算処理と出力メッセージ(出力辺の状態)の送信が終わった時点において、入力辺で接する他の分散処理部20(頂点(vertex))からの入力メッセージがない状態(入力辺で接する全ての頂点(vertex)から入力メッセージを受信できていない状態)(以下、「入力待ち状態」と称する。)である場合に、自身が「入力待ち状態」であることを、処理サーバ10(worker)に通知する。
状態通知部23は、入力待ち状態であることを処理サーバ10に通知する際に、現在の自身のスーパーステップnのステップ番号を付して、通知するようにする。
The
Specifically, the
For example, the
When notifying the
処理サーバ10の後記する優先度設定部14に、優先度算出アルゴリズムとして「遅延頂点投票方式」が設定された場合、分散処理部20(頂点(vertex))には、処理待ち投票部24が設けられる。
When the “delayed vertex voting method” is set as the priority calculation algorithm in the priority setting unit 14 (described later) of the
処理待ち投票部24は、フェーズPH1における計算処理およびフェーズPH2における出力メッセージの送信処理が終わった時点において、入力辺で接する他の分散処理部20(頂点(vertex))からの入力メッセージがないために入力待ち状態となっている場合に、その入力辺で接する他の分散処理部20(頂点(vertex))に「入力待ち情報」を送信する。各分散処理部20(頂点(vertex))の処理待ち投票部24は、スレッド処理の優先順を決定する指標となる優先度投票値を状態情報(初期値=0)として保持しており、他の分散処理部20(頂点(vertex))から、入力待ち情報を1つ受信する度に、自身の優先度投票値を「+1」に更新する。そして、処理待ち投票部24は、更新した自身の優先度投票値を処理サーバ10に送信する。
なお、処理待ち投票部24の上記処理(詳細は、図13(a)を参照し後記する。)は、処理サーバ10の優先度設定部14に、優先度算出アルゴリズムとして「遅延頂点投票方式(パターン1)」が設定された場合の処理である。
Since the processing waiting
Note that the above-described processing of the processing waiting voting unit 24 (details will be described later with reference to FIG. 13A) is performed by the
処理待ち投票部24は、入力辺で接する他の分散処理部20(頂点(vertex))から入力待ち情報を受信した場合に、自身が「入力待ち状態」または「実行可能状態」(フェーズPH1のローカル計算とフェーズPH2のデータ交換が完了し、次のスーパーステップn+1のローカル計算を実行可能である状態)に該当するか否かを判定する。
そして、処理待ち投票部24は、自身が入力待ち状態である場合に、受信した入力待ち情報に付された他の分散処理部20(頂点(vertex))の優先度投票値を、自身が保持する優先度投票値に加える。そして、処理待ち投票部24は、自身の遅延分(「+1」)を加えて自身の優先度投票値を更新し、入力待ちとなっている他の分散処理部20(頂点(vertex))に、更新した優先度投票値を入力待ち情報に付して送信する。
また、処理待ち投票部24は、自身が実行可能状態である場合に、受信した入力待ち情報に付された他の分散処理部20(頂点(vertex))の優先度投票値を、自身が保持する優先度投票値に加える。そして、処理待ち投票部24は、自身が保持する優先度投票値を処理サーバ10に送信する。
なお、処理待ち投票部24の上記処理(詳細は、図13(b)参照し後記する。)は、処理サーバ10の優先度設定部14に、優先度算出アルゴリズムとして「遅延頂点投票方式(パターン2)」が設定された場合の処理である。
When the processing waiting
Then, when the processing waiting
Also, the processing waiting
Note that the above-described processing of the processing waiting voting unit 24 (details will be described later with reference to FIG. 13B) is performed by the
この処理待ち投票部24は、他の分散処理部20(頂点(vertex))から入力待ち情報を受信した時点におけるスーパーステップでの処理が完了すると、自身の優先度投票値をゼロに初期化する。
When the processing in the super step at the time of receiving the input waiting information from the other distributed processing unit 20 (vertex) is completed, the processing waiting
<処理サーバ(worker)>
処理サーバ10(worker)(図9参照)は、他の処理サーバ10(worker)と通信接続され、処理単位となる分散処理部20(頂点(vertex))を複数備える。この処理サーバ10(worker)は、自身が備える分散処理部20(vertex)の処理の進行状態等を管理するとともに、他の処理サーバ10(worker)との間での情報の送受信を行う。また、この処理サーバ10(worker)は、仮想化制御部11、メッセージ処理部12、隣接同期分散管理部13、優先度設定部14および記憶部15を含んで構成される。なお、この記憶部15には、計算対象となる各分散処理部20(頂点(vertex))の接続関係を示すグラフトポロジが記憶される。
<Processing server (worker)>
The processing server 10 (worker) (see FIG. 9) is communicatively connected to another processing server 10 (worker) and includes a plurality of distributed processing units 20 (vertex) that are processing units. The processing server 10 (worker) manages the progress of processing of the distributed processing unit 20 (vertex) included in the processing server 10 (worker) and transmits / receives information to / from another processing server 10 (worker). The processing server 10 (worker) includes a
仮想化制御部11は、仮想化技術に基づき、処理サーバ10上に仮想化プラットホームを構築し、複数の分散処理部20(仮想マシン)を配置する制御を行う。
The
メッセージ処理部12は、自身に属する各分散処理部20(頂点(vertex))から、BSPにおけるフェーズPH2(データ交換)の際に、出力辺の状態を示す出力メッセージを受け取り、計算対象のグラフGのグラフトポロジに基づき、その出力辺で接続する分散処理部20(頂点(vertex))に、受信した出力メッセージを、入力辺の状態を示す入力メッセージとして出力する。なお、以降、出力メッセージと入力メッセージとを特に区別しない場合、単に「メッセージ」と称する場合がある。
The
隣接同期分散管理部13は、自身に属する分散処理部20(頂点(vertex))を監視し、各分散処理部20(頂点(vertex))が、フェーズPH1における計算処理およびフェーズPH2における出力メッセージの送信処理が終わった時点において、入力辺で接する全ての分散処理部20(頂点(vertex))からの入力メッセージ(入力辺の状態)が揃っているか否かを判定する。
The adjacent synchronization
そして、隣接同期分散管理部13は、自身に属する分散処理部20(頂点(vertex))それぞれについて、入力メッセージ(入力辺の状態)が揃っている場合、つまり、隣接する分散処理部20(頂点(vertex))から、次の計算ステップ(次のスーパーステップ)において必要な計算結果の取得が完了している場合には、本実施形態における隣接同期の条件「自頂点(vertex)および入力辺で接する全ての頂点(vertex)の計算・送信処理fn(ローカル計算(フェーズPH1)およびデータ交換(フェーズPH2))が完了していること」(隣接同期)を満たすものとする。隣接同期分散管理部13は、この場合に、次のスーパーステップに移行する(スーパーステップを「+1」する。)ように、「次ステップ移行指示」を、その分散処理部20(頂点(vertex))に出力する。
また、隣接同期分散管理部13は、その分散処理部20(頂点(vertex))が隣接同期の条件を満たしたこと、つまり、実行可能状態であることを優先度設定部14に出力する。
Then, the adjacent synchronization
In addition, the adjacent synchronization
隣接同期分散管理部13は、入力辺で接する他の分散処理部20(頂点(vertex))からの入力メッセージの入力待ち状態となっている分散処理部20が、いずれかの分散処理部20)から入力メッセージ(入力辺の状態)を受信した場合には、その受信を契機として、再度、入力メッセージ(入力辺の状態)が揃っているか否か、つまり、隣接同期の条件を満たすか否かの判定を実行する。
In the adjacent synchronization
優先度設定部14は、実行可能状態となった各分散処理部20(頂点(vertex))のスレッドに所定の優先度算出アルゴリズムの方式で算出した優先度を付し、優先度の高いスレッドから順にCPU時間を割り当てるスケジューリングを行う。優先度設定部14がスケジューリングしたCPU時間の割り当てにそって、各分散処理部20(頂点(vertex))のCPUによる処理が実行させる。
The
優先度設定部14には、例えば、以下に示す優先度算出アルゴリズムのいずれかが設定される。
(1)出力辺数優先方式(LEF:Largest Edge First)
(2)遅延ステップ優先方式(LSF:Latest Step First)
(3)出力辺数および遅延ステップの複合優先方式(HL2:Hybrid of LEF and LSF)
(4)遅延投票数優先方式(MVF:Most Voted First)
以下、各方式について、具体的に説明する。
In the
(1) Output edge priority method (LEF: Largest Edge First)
(2) Delay step priority method (LSF: Latest Step First)
(3) Composite priority method of the number of output edges and delay steps (HL2: Hybrid of LEF and LSF)
(4) Delayed vote count priority method (MVF: Most Voted First)
Hereinafter, each method will be specifically described.
[出力辺数優先方式(LEF)]
出力辺数優先方式(LEF)は、実行可能状態(フェーズPH1のローカル計算とフェーズPH2のデータ交換が完了し、次のスーパーステップのローカル計算を実行可能である状態)の分散処理部20(頂点(vertex))のうち、出力辺の数が最も多い分散処理部20(頂点(vertex))にCPU時間を優先して割り当てる方式である。この出力辺数優先方式(LEF)は、出力辺の数が多い、つまり、隣接する頂点(vertex)が多いほど、より多くの頂点(vertex)に影響を及ぼすため、優先的にCPU時間を割り当てるべき、というロジックに基づく。
[Output edge priority method (LEF)]
The output edge number priority method (LEF) is a distributed processing unit 20 (vertex) in an executable state (a state in which the local calculation of the phase PH1 and the data exchange of the phase PH2 are completed and the local calculation of the next super step can be executed). (Vertex)), the CPU is preferentially allocated to the distributed processing unit 20 (vertex) having the largest number of output sides. In this output side number priority method (LEF), the more the number of output sides is, that is, the more adjacent vertices are, the more vertices are affected. Therefore, the CPU time is preferentially allocated. It should be based on the logic that it should.
例えば、図10に示すグラフトポロジ(グラフG)の場合では、worker1(処理サーバ10)の3つの頂点(vertex)v1,v2,v3の各出力辺の数は、「1:1:4」となるため、優先度を「v3>v2=v1」と設定する。また、worker2(処理サーバ10)の3つの頂点(vertex)v4,v5,v6の各出力辺の数は、「1:3:0」となるため、優先度を「v5>v4>v6」と設定する。
ここで、優先度設定部14は、算出した優先度が同じである場合には、ランダムにどちらかの頂点(vertex)を優先させて設定してもよいし、同じ優先度の頂点(vertex)のスレッドを、CPU時間の割り当て単位(Time Slice)毎に交互に実行するように設定してもよい。
For example, in the case of the graph topology (graph G) shown in FIG. 10, the number of output sides of the three vertices v 1 , v 2 , v 3 of worker 1 (processing server 10) is “1: 1: 4 ”, the priority is set as“ v 3 > v 2 = v 1 ”. Further, the number of output sides of the three vertices v 4 , v 5 , v 6 of the worker 2 (processing server 10) is “1: 3: 0”, so the priority is “v 5 > v 4 > v 6 ”.
Here, when the calculated priorities are the same, the
図8(c)に示すCPU消費の優先度制御の結果は、出力辺数優先方式(LEF)において、図10に示すように、頂点v2と頂点v1の優先度が同じ(v2=v1)であった場合に、頂点v2を頂点v1より優先するように設定し、全体の優先度を「v3>v2>v1」として設定した例を示している。
このように、優先度設定部14が、優先度を適切に設定することにより、CPUのアイドル時間を削減することが可能となる。
As shown in FIG. 10, the result of the priority control of the CPU consumption shown in FIG. 8C is that the vertexes v 2 and v 1 have the same priority (v 2 = v 1 ), the vertex v 2 is set to have priority over the vertex v 1 , and the overall priority is set as “v 3 > v 2 > v 1 ”.
In this way, the
[遅延ステップ優先方式(LSF)]
遅延ステップ優先方式(LEF)は、実行可能状態の分散処理部20(頂点(vertex))のうち、実行ステップ(現時点のスーパーステップ)が最も遅い分散処理部20(頂点(vertex))にCPU時間を優先して割り当てる方式である。この遅延ステップ優先方式(LEF)は、スーパーステップの処理が遅れている頂点(vertex)ほど、隣接する頂点(vertex)により大きな影響を及ぼすため、優先的にCPU時間を割り当てるべき、というロジックに基づく。
[Delay step priority method (LSF)]
In the delay step priority method (LEF), among the distributed processing units 20 (vertex) in the executable state, the distributed processing unit 20 (vertex) having the slowest execution step (current super step) has the CPU time. Is a method of prioritizing allocation. The delay step priority method (LEF) is based on the logic that the CPU time should be preferentially allocated because the vertex having the later superstep processing has a greater effect on the adjacent vertex. .
例えば、図11に示すグラフトポロジ(グラフG)の場合では、worker1(処理サーバ10)の3つの頂点(vertex)v1,v2,v3それぞれの現時点のスーパーステップnは、「4:5:5」となるため、優先度を「v1>v2=v3」と設定する。また、worker2(処理サーバ10)の3つの頂点(vertex)v4,v5,v6それぞれのスーパーステップnは、「5:5:4」となるため、優先度を「v6>v4=v5」と設定する。
ここで、優先度設定部14は、算出した優先度が同じである場合には、ランダムにどちらかの頂点(vertex)を優先させて設定してもよいし、同じ優先度の頂点(vertex)のスレッドを、CPU時間の割り当て単位(Time Slice)毎に交互に実行するように設定してもよい。
For example, in the case of the graph topology (graph G) shown in FIG. 11, the current super step n of each of the three vertices (vertex) v 1 , v 2 , v 3 of the worker 1 (processing server 10) is “4: 5. : 5 ”, the priority is set as“ v 1 > v 2 = v 3 ”. Further, since the superstep n of each of the three vertices v 4 , v 5 , v 6 of the worker 2 (processing server 10) is “5: 5: 4”, the priority is “v 6 > v 4 = V 5 ”.
Here, when the calculated priorities are the same, the
優先度設定部14は、実行可能状態の分散処理部20(頂点(vertex))について、その実行ステップ(現時点のスーパーステップ)が変わる度に、動的に優先度を算出し直して更新する。
The
[出力辺数および遅延ステップの複合優先方式(HL2)]
出力辺数および遅延ステップの複合優先方式(HL2)(以下「複合優先方式(HL2)」と略す。)は、実行可能状態の分散処理部20(頂点(vertex))のうち、出力辺の数と実行ステップの双方に基づき、各頂点(vertex)の優先度を算出し、優先度が最も高い頂点(vertex)にCPU時間を優先して割り当てる方式である。この複合優先方式(HL2)は、どの頂点(vertex)にCPU時間を優先して割り当てるべきかは、出力辺の数、実行ステップのいずれか一方のみではなく双方を考慮すべき、というロジックに基づく。
[Composite priority method of number of output edges and delay step (HL2)]
The composite priority method (HL2) of the number of output edges and the delay step (hereinafter abbreviated as “composite priority method (HL2)”) is the number of output edges of the executable distributed processing unit 20 (vertex). And the execution step, the priority of each vertex is calculated, and the CPU time is preferentially assigned to the vertex having the highest priority. This composite priority method (HL2) is based on the logic that which CPU should be preferentially allocated to which CPU time should be considered, not only the number of output edges or the execution step, but both of them. .
優先度設定部14は、出力辺数に基づく優先度(第1の優先度)、実行ステップに基づく優先度(第2の優先度)のそれぞれに重みをかけ、その和を算出する。複合優先方式(HL2)の優先度の算出式(式1)を、図12に示す。優先度設定部14は、(式1)を用いて、各頂点(vertex)の優先度を算出し、その算出した値が高い頂点(vertex)を優先してCPU時間を割り当てる。
The
[遅延投票数優先方式(MVF)]
遅延投票数優先方式は、遅延している頂点(vertex)に対し、その頂点(vertex)からの入力メッセージ待ちで待機状態(入力待ち状態)にある頂点(vertex)が投票し、投票数が最も多い頂点(vertex)にCPU時間を優先して割り当てる方式である。この遅延投票数優先方式(MVF)は、実際に隣接する頂点(vertex)を入力待ち状態にさせている頂点(vertex)に対し、優先的にCPU時間を割り当てるべき、というロジックに基づく。
[Delayed voting count priority method (MVF)]
In the delayed voting count priority method, a vertex (vertex) that is in a waiting state (input waiting state) waits for an input message from that vertex (vertex) to vote for the delayed vertex (vertex). In this method, CPU time is preferentially assigned to a large number of vertices. This delayed voting number priority method (MVF) is based on the logic that CPU time should be preferentially assigned to vertices that actually put adjacent vertices in an input waiting state.
この遅延投票数優先方式(MVF)では、各分散処理部20(頂点(vertex))の処理待ち投票部24から上記の優先度投票値を受信し、その値がより高い頂点(vertex)を優先してCPU時間を割り当てる。
具体的には、優先度設定部14は、各分散処理部20(頂点(vertex))の処理待ち投票部24と連携して以下の処理を実行する。
In this delayed voting count priority method (MVF), the above-mentioned priority voting value is received from the processing waiting
Specifically, the
(パターン1:自身の遅延のみを投票)
各分散処理部20(頂点(vertex))の処理待ち投票部24は、入力待ち状態となった、つまり、遅延の原因となっている頂点(vertex)に入力待ち情報を送信する。つまり、処理待ち投票部24が、遅延の原因となっている頂点(vertex)に1票を投票する。これにより、入力待ち情報を受信した分散処理部20(頂点(vertex))の処理待ち投票部24は、自身の優先度投票値(Pv)を「+1」に更新する。
図13(a)に示す例では、頂点v2が、頂点v1からの入力メッセージ待ちで待機状態(入力待ち状態)になると、遅延の原因となっている頂点v1に、入力待ち情報を送信(1票を投票)する(図13(a)の符号α1)。これにより、頂点v1の処理待ち投票部24は、優先度投票値(Pv1)を「+1」に更新する(図13(a)の符号α2)。
(Pattern 1: Vote for own delay only)
The process waiting
In the example shown in FIG. 13A, when the vertex v 2 enters a waiting state (input waiting state) waiting for an input message from the vertex v 1 , input waiting information is sent to the vertex v 1 causing the delay. Transmission (voting 1 vote) (reference numeral α 1 in FIG. 13A). As a result, the processing waiting
各分散処理部20(頂点(vertex))の処理待ち投票部24は、優先度投票値が更新されると、処理サーバ10の優先度設定部14に、その更新した優先度投票値を送信する。そして、優先度設定部14が、受信した優先度投票値が高い分散処理部20(頂点(vertex))のスレッドを優先するように優先度の設定を行い、CPU時間を割り当てる。
When the priority voting value is updated, the processing waiting
(パターン2:遅延の連鎖を投票)
各分散処理部20(頂点(vertex))の処理待ち投票部24は、自頂点(vertex)が遅延の原因となっており、入力待ち情報を受信して自身の優先度投票値を更新した場合、その更新した優先度投票値に、自身の遅延分(+1)を加えて、遅延の原因となっている頂点(vertex)に入力待ち情報を送信(優先度投票値を投票)する(図13の符号β1)。
(Pattern 2: Vote for delay chain)
When the processing waiting
図13(b)に示す例では、頂点v6が遅延の原因になっている頂点とすると、頂点v6からの入力メッセージ待ちで、頂点v4が遅延する。さらに、頂点v4からの入力メッセージ待ちで、頂点v2,v3,v5が遅延する(図13(b)の符号β2)。
よって、頂点v2は、頂点v4に入力待ち情報(1票)を送信する。また、頂点v2は、頂点v3にも入力待ち情報(1票)を送信する。頂点v3は、優先度投票値を更新(+1)し、自身の遅延分(+1)を加えた入力待ち情報(2票)を頂点v4に送信する。頂点v5は、頂点v4に入力待ち情報(1票)を送信する。そして、頂点v4は、受信した入力待ち情報を合計(1+2+1=4票)に、自身の遅延分(+1)を加えた入力待ち情報(5票)を、頂点v6に送信する。
In the example shown in FIG. 13B, assuming that the vertex v 6 is the cause of the delay, the vertex v 4 is delayed while waiting for an input message from the vertex v 6 . Furthermore, in the input message queue from the vertex v 4, vertex v 2, v 3, v 5 is delayed (sign beta 2 in FIG. 13 (b)).
Therefore, the vertex v 2 transmits the input waiting information (1 vote) to the vertex v 4 . The vertex v 2 also transmits the input waiting information (1 vote) to the vertex v 3 . The vertex v 3 updates the priority voting value (+1) and transmits the input waiting information (2 votes) to which the delay amount (+1) of itself is added to the vertex v 4 . The vertex v 5 transmits the input waiting information (1 vote) to the vertex v 4 . Then, the vertex v 4 transmits the input wait information (5 votes) obtained by adding the received delay information (1 + 2 + 1 = 4 votes) and its own delay (+1) to the vertex v 6 .
各分散処理部20(頂点(vertex))の処理待ち投票部24は、自身が実行可能状態である場合において、入力待ち情報を他の分散処理部20(頂点(vertex))から受信したときに、受信した入力待ち情報に付された優先度投票値を用いて自身の優先度投票値を更新する。そして、その処理待ち投票部24は、処理サーバ10の優先度設定部14に、その更新した優先度投票値を送信する。
図13(b)では、頂点v5の優先度投票値(初期値=0)の場合に、頂点v4から入力待ち情報(優先度投票値=5票)を受信したとき、頂点v5の処理待ち投票部24は、自身の優先度投票値を更新(0+5=5票)し、その更新した優先度投票値(5票)を、処理サーバ10の優先度設定部14に送信する。そして、優先度設定部14は、受信した優先度投票値が高い分散処理部20(頂点(vertex))のスレッドを優先するように優先度の設定を行い、CPU時間を割り当てる。
The process waiting
In FIG. 13 (b), when the priority vote value of vertex v 5 (initial value = 0), when receiving an input waiting information (priority voting value = 5 votes) from the vertex v 4, vertex v 5 The processing waiting
このように、遅延している頂点(vertex)に対し、その頂点(vertex)からの入力メッセージ待ちで待機状態(入力待ち状態)にある頂点(vertex)が投票し、投票数が最も多い頂点(vertex)にCPU時間を優先して割り当てる。これにより、より影響範囲の広い(影響度の高い)頂点(vertex)ほど優先度を高くすることができる。 In this way, for a delayed vertex (vertex), a vertex (vertex) in a waiting state (input waiting state) waits for an input message from that vertex (vertex), and the vertex with the highest number of votes ( CPU time is preferentially assigned to (vertex). As a result, the priority can be set higher for a vertex having a wider influence range (higher influence degree).
≪分散同期処理システムの動作≫
次に、本実施形態に係る分散同期処理システム1の動作について説明する。
図14は、本実施形態に係る分散同期処理システム1の処理の流れを示すフローチャートである。
なお、ここでは、予め対象とする計算処理に必要な個々の計算処理(頂点(vertex))の設定と、その個々の計算処理(頂点(vertex))の各処理サーバ10(worker)への割り振りが終わっているものとして説明する。この個々の計算処理(頂点)の設定と、各処理サーバ10(worker)への割り振りとは、例えば、これらの機能を、システム全体の管理サーバを備えさせたり、処理サーバ10の中の代表サーバに備えさせたりすることにより、事前に実行しておけばよい。
<< Operation of distributed synchronous processing system >>
Next, the operation of the distributed
FIG. 14 is a flowchart showing the flow of processing of the distributed
In addition, here, the setting of the individual calculation process (vertex (vertex)) necessary for the target calculation process in advance and the allocation of the individual calculation process (vertex (vertex)) to each processing server 10 (worker) are performed. Will be explained as if it has ended. The setting of each individual calculation process (vertex) and the allocation to each processing server 10 (worker) may be performed, for example, by providing these functions with a management server for the entire system or a representative server in the
まず、処理サーバ10の隣接同期分散管理部13は、自身に属する分散処理部20(頂点)を監視することにより、ある分散処理部20(頂点)について、フェーズPH1における計算処理およびフェーズPH2における出力メッセージの送信処理が完了したことを検出する(ステップS1)。
First, the adjacent synchronization
続いて、隣接同期分散管理部13は、その分散処理部20(頂点)について、入力辺で接する全ての分散処理部20(頂点)からの入力メッセージ(入力辺の状態)が揃っているか否かを判定する(ステップS2)。つまり、隣接同期分散管理部13は、隣接同期の条件を満たすか否かを判定する。
Next, the adjacent synchronization
ここで、隣接同期分散管理部13は、入力メッセージ(入力辺の状態)が揃っていないと判定した場合には(ステップS2→No)、その分散処理部20(頂点)が入力待ち状態であると把握する(ステップS3)。なお、隣接同期分散管理部13は、各分散処理部20(頂点)から入力待ち状態であることの通知を受信することにより、その分散処理部20(頂点)が入力待ち状態であることを把握してもよい。
Here, when the adjacent synchronization
続いて、隣接同期分散管理部13は、入力待ち状態で待機している分散処理部20(頂点)に対し、入力辺で接するいずれかの分散処理部20(頂点)から、当該分散処理部20(頂点)が入力メッセージ(入力辺の状態)を受信したか否かを判定する(ステップS4)。
そして、隣接同期分散管理部13は、入力待ち状態で待機している分散処理部20(頂点)が入力メッセージを受信していなければ(ステップS4→No)、受信するまで待つ。一方、隣接同期分散管理部13は、入力待ち状態で待機している分散処理部20(頂点)が入力メッセージを受信した場合には(ステップS4→Yes)、そのことを契機として、ステップS2に戻る。
Next, the adjacent synchronization
Then, if the distributed processing unit 20 (vertex) waiting in the input waiting state has not received the input message (step S4 → No), the adjacent synchronization
ステップS2において、隣接同期分散管理部13は、入力メッセージ(入力辺の状態)が揃っている(隣接同期の条件を満たす)と判定した場合には(ステップS2→Yes)、ステップS5に進む。
When it is determined in step S2 that the adjacent synchronization
ステップS5において、優先度設定部14は、実行可能状態となった分散処理部20(頂点)のスレッドに、所定の優先度算出アルゴリズムの方式で優先度を算出し、その算出した優先度の高いスレッドから順にCPU時間を割り当てるスケジューリングを行う(優先度設定処理を実行)。
In step S5, the
なお、優先度設定部14に、上記した、(1)出力辺数優先方式(LEF)、(2)遅延ステップ優先方式(LSF)、(3)出力辺数および遅延ステップの複合優先方式(HL2)、(4)遅延投票数優先方式(MVF)のいずれかが、予め設定されることにより、ステップS5の優先度設定処理が実行される。
In the
また、隣接同期分散管理部13は、ステップS2において隣接同期の条件を満たした分散処理部20(頂点)について、次のスーパーステップに移行するように、「次ステップ移行指示」を出力する(ステップS6)。これにより、「次ステップ移行指示」を受信した分散処理部20(頂点)の数値計算部21は、次のスーパーステップ(n+1)の計算・送信処理fn+1を実行する。
Further, the adjacent synchronization
以上説明したように、本実施形態に係る分散同期処理システム1および分散同期処理方法によれば、処理サーバ10(worker)のリソース制約による予期せぬアイドル時間を抑制することができる。
これにより、各処理サーバ10(worker)のリソース利用効率が向上し、同期処理計算の高速化(実行時間の短縮)を図ることができる。
As described above, according to the distributed
As a result, the resource utilization efficiency of each processing server 10 (worker) is improved, and it is possible to speed up the synchronization processing calculation (reduce the execution time).
なお、本実施形態においては、隣接同期の条件を満たすか否かの判定を、各処理サーバ10(worker)において、自律分散的に実行するものとした。しかしながら、分散同期処理システム1において、各処理サーバ10(worker)と通信接続される管理サーバ(master)を設け、その管理サーバ(master)が、各分散処理部20(頂点(vertex))について、隣接同期の条件を満たすか否かの判定を行うようにしてもよい。
In the present embodiment, each processing server 10 (worker) determines whether or not the adjacent synchronization condition is satisfied in an autonomously distributed manner. However, in the distributed
1 分散同期処理システム
10 処理サーバ(worker)
11 仮想化処理部
12 メッセージ処理部
13 隣接同期分散管理部
14 優先度設定部
15 記憶部
20 分散処理部20(頂点(vertex))
21 数値計算部
22 メッセージ送受信部
23 状態通知部
24 処理待ち投票部
1 distributed
11
21
Claims (7)
前記分散処理部のそれぞれには、当該分散処理部自身が属する処理サーバのCPUにおける1コアのスケジューリング対象として、個別の実行単位である1スレッドが割り当てられるものであり、
前記処理サーバのそれぞれは、
前記分散処理部による所定の計算ステップにおける計算処理、および、当該分散処理部の接続先となる他の分散処理部との間でのデータ送受信を完了し、当該分散処理部が、次の前記計算ステップについて実行可能な状態を示す実行可能状態であることを検出する隣接同期分散管理部と、
前記実行可能状態となった分散処理部それぞれに、当該分散処理部の前記計算処理の遅れにより前記他の分散処理部のCPUを処理待ちにさせる影響が大きいほど、前記計算処理の遅れる分散処理部に高い優先度を設定する所定の優先度算出アルゴリズムを用いて前記優先度を設定し、前記優先度の高い分散処理部のスレッドを優先的に前記CPUの処理スケジュールに割り当てる優先度設定部と、
を備えることを特徴とする分散同期処理システム。 A distributed synchronous processing system comprising: a plurality of processing servers; and a plurality of distributed processing units operating on the processing servers,
One thread, which is an individual execution unit, is assigned to each of the distributed processing units as a scheduling target of one core in the CPU of the processing server to which the distributed processing unit itself belongs,
Each of the processing servers
Completion of calculation processing in a predetermined calculation step by the distributed processing unit and data transmission / reception with another distributed processing unit to which the distributed processing unit is connected, and the distributed processing unit performs the next calculation. An adjacent synchronization distribution management unit that detects an executable state indicating an executable state for a step,
A distributed processing unit that delays the calculation process as the effect of causing the CPU of the other distributed processing unit to wait for the processing of the distributed processing unit in the executable state is delayed due to the delay of the calculation process of the distributed processing unit. A priority setting unit that sets the priority using a predetermined priority calculation algorithm that sets a high priority to, and preferentially allocates the threads of the distributed processing unit having the high priority to the processing schedule of the CPU;
A distributed synchronous processing system comprising:
計算対象となる各分散処理部の接続関係として、前記分散処理部と当該分散処理部が算出したデータの出力先となる他の分散処理部とが出力辺で繋がり、前記分散処理部と次の前記計算ステップで必要となるデータの入力元となる他の分散処理部とが入力辺で繋がることを示すグラフトポロジを記憶する記憶部を備えており、
前記所定の優先度算出アルゴリズムは、前記実行可能状態となった分散処理部それぞれについての前記出力辺の数を算出し、前記算出した出力辺の数が多い前記分散処理部の優先度を高く設定するものであり、
前記優先度設定部は、当該所定の優先度算出アルゴリズムを用いて前記分散処理部それぞれの優先度を設定し、設定した優先度のうち、より高い優先度が設定された分散処理部のスレッドを優先的に前記CPUの処理スケジュールに割り当てること
を特徴とする請求項1に記載の分散同期処理システム。 Each of the processing servers
As a connection relation of each distributed processing unit to be calculated, the distributed processing unit and another distributed processing unit that is an output destination of the data calculated by the distributed processing unit are connected by an output side, and the distributed processing unit and the following A storage unit is provided for storing a graph topology indicating that another distributed processing unit serving as an input source of data required in the calculation step is connected by an input side,
The predetermined priority calculation algorithm calculates the number of the output sides for each of the distributed processing units in the executable state, and sets the priority of the distributed processing unit having a large number of the calculated output sides to be high. Is what
The priority setting unit sets the priority of each of the distributed processing units by using the predetermined priority calculation algorithm, and among the set priorities, sets the threads of the distributed processing unit to which the higher priority is set. distributed synchronization system according to claim 1, characterized in that assigned to the preferential treatment schedule of the CPU.
前記所定の優先度算出アルゴリズムは、前記実行可能状態となった分散処理部それぞれについての前記計算ステップのステップ番号を参照し、他の前記分散処理部と比べ処理が遅延している分散処理部の優先度を高く設定するものであり、
前記優先度設定部は、当該所定の優先度算出アルゴリズムを用いて前記分散処理部それぞれの優先度を設定し、設定した優先度のうち、より高い優先度が設定された分散処理部のスレッドを優先的に前記CPUの処理スケジュールに割り当てること
を特徴とする請求項1に記載の分散同期処理システム。 The adjacent synchronization distribution management unit monitors the step number of the calculation step executed by each distributed processing unit,
The predetermined priority calculation algorithm refers to the step number of the calculation step for each of the distributed processing units in the executable state, and the processing of the distributed processing unit that is delayed compared to the other distributed processing units. To set a high priority,
The priority setting unit sets the priority of each of the distributed processing units by using the predetermined priority calculation algorithm, and among the set priorities, sets the threads of the distributed processing unit to which the higher priority is set. distributed synchronization system according to claim 1, characterized in that assigned to the preferential treatment schedule of the CPU.
計算対象となる各分散処理部の接続関係として、前記分散処理部と当該分散処理部が算出したデータの出力先となる他の分散処理部とが出力辺で繋がり、前記分散処理部と次の前記計算ステップで必要となるデータの入力元となる他の分散処理部とが入力辺で繋がることを示すグラフトポロジを記憶する記憶部を備えており、
前記分散処理部のそれぞれは、前記入力元となる他の分散処理部からのデータの送信がないため、次の前記計算ステップに移行できず入力待ち状態となっている場合に、当該入力元となる他の分散処理部に対し、入力待ち情報を送信することにより投票し、
前記入力待ち情報を受信した入力元となる他の分散処理部は、受信した前記入力待ち情報の数を優先度投票値として集計し、
前記所定の優先度算出アルゴリズムは、前記入力元となる他の分散処理部のうち、前記優先度投票値の多い分散処理部の優先度を高く設定するものであり、
前記処理サーバそれぞれの前記優先度設定部は、当該所定の優先度算出アルゴリズムを用いて前記分散処理部それぞれの優先度を設定し、設定した優先度のうち、より高い優先度が設定された分散処理部のスレッドを優先的に前記CPUの処理スケジュールに割り当てること
を特徴とする請求項1に記載の分散同期処理システム。 Each of the processing servers
As a connection relation of each distributed processing unit to be calculated, the distributed processing unit and another distributed processing unit that is an output destination of the data calculated by the distributed processing unit are connected by an output side, and the distributed processing unit and the following A storage unit is provided for storing a graph topology indicating that another distributed processing unit serving as an input source of data required in the calculation step is connected by an input side,
Since each of the distributed processing units does not transmit data from the other distributed processing unit serving as the input source, if it cannot enter the next calculation step and is in the input waiting state, Vote by sending input waiting information to other distributed processing units,
The other distributed processing unit that is the input source that has received the input waiting information aggregates the number of the received input waiting information as a priority vote value,
The predetermined priority calculation algorithm is to set a high priority to a distributed processing unit having a large number of the priority vote values among other distributed processing units serving as the input source ,
The priority setting unit of each of the processing servers sets the priority of each of the distributed processing units by using the predetermined priority calculation algorithm, and among the set priorities, the distribution in which the higher priority is set. The distributed synchronous processing system according to claim 1 , wherein threads of the processing unit are preferentially assigned to the processing schedule of the CPU.
を特徴とする請求項4に記載の分散同期処理システム。 The other distributed processing unit that is the input source that has received the input waiting information attaches a priority voting value obtained by adding its own delay amount to the aggregated priority voting value when it is also in the input waiting state. The distributed synchronization processing according to claim 4 , wherein the input waiting information is transmitted to another distributed processing unit that is an input source and causes a delay of the other distributed processing unit that is the input source. system.
前記分散処理部のそれぞれには、当該分散処理部自身が属する処理サーバのCPUにおける1コアのスケジューリング対象として、個別の実行単位である1スレッドが割り当てられるものであり、
前記処理サーバのそれぞれは、
前記分散処理部による所定の計算ステップにおける計算処理、および、当該分散処理部の接続先となる他の分散処理部との間でのデータ送受信を完了し、当該分散処理部が、次の前記計算ステップについて実行可能な状態を示す実行可能状態であることを検出する隣接同期分散管理部と、
前記実行可能状態となった分散処理部に優先度を付し、前記優先度の高い分散処理部のスレッドを優先的に前記CPUの処理スケジュールに割り当てる優先度設定部と、
計算対象となる各分散処理部の接続関係として、前記分散処理部と当該分散処理部が算出したデータの出力先となる他の分散処理部とが出力辺で繋がり、前記分散処理部と次の前記計算ステップで必要となるデータの入力元となる他の分散処理部とが入力辺で繋がることを示すグラフトポロジを記憶する記憶部とを、備え、
前記優先度設定部は、前記実行可能状態となった分散処理部それぞれについての前記出力辺の数を算出し、前記算出した出力辺の数が多い前記分散処理部のスレッドを優先して前記CPUの処理スケジュールに割り当てることの指標となる第1の優先度を求め、
前記隣接同期分散管理部は、各前記分散処理部が実行している前記計算ステップのステップ番号を監視しており、
前記優先度設定部は、前記実行可能状態となった分散処理部それぞれについての前記計算ステップのステップ番号を参照し、他の前記分散処理部と比べ処理が遅延している分散処理部のスレッドを優先して前記CPUの処理スケジュールに割り当てることの指標となる第2の優先度を求め、
前記優先度設定部は、前記第1の優先度および前記第2の優先度の双方を用いた各前記分散処理部の優先度を算出し、前記算出した優先度が高い前記分散処理部のスレッドを優先して前記CPUの処理スケジュールを割り当てること
を特徴とする分散同期処理システム。 A distributed synchronous processing system comprising: a plurality of processing servers; and a plurality of distributed processing units operating on the processing servers,
One thread, which is an individual execution unit, is assigned to each of the distributed processing units as a scheduling target of one core in the CPU of the processing server to which the distributed processing unit itself belongs,
Each of the processing servers
Completion of calculation processing in a predetermined calculation step by the distributed processing unit and data transmission / reception with another distributed processing unit to which the distributed processing unit is connected, and the distributed processing unit performs the next calculation. An adjacent synchronization distribution management unit that detects an executable state indicating an executable state for a step,
A priority setting unit that assigns a priority to the distributed processing unit in the executable state and preferentially allocates a thread of the distributed processing unit having a high priority to the processing schedule of the CPU;
As a connection relation of each distributed processing unit to be calculated, the distributed processing unit and another distributed processing unit that is an output destination of the data calculated by the distributed processing unit are connected by an output side, and the distributed processing unit and the following A storage unit that stores a graph topology indicating that another distributed processing unit that is an input source of data required in the calculation step is connected by an input side;
The priority setting unit calculates the number of the output sides for each of the distributed processing units in the executable state, and gives priority to the thread of the distributed processing unit having a large number of the calculated output sides, the CPU The first priority, which is an index for assigning to the processing schedule of
The adjacent synchronization distribution management unit monitors the step number of the calculation step executed by each distributed processing unit,
The priority setting unit refers to the step number of the calculation step for each of the distributed processing units in the executable state, and determines the threads of the distributed processing unit whose processing is delayed as compared with the other distributed processing units. The second priority, which is an index for giving priority to the processing schedule of the CPU, is obtained,
The priority setting unit calculates a priority of each of the distributed processing units using both the first priority and the second priority, and a thread of the distributed processing unit having a high calculated priority. Allocating the CPU processing schedule with priority to
Distributed synchronization processing system according to claim.
前記分散処理部のそれぞれには、当該分散処理部自身が属する処理サーバのCPUにおける1コアのスケジューリング対象として、個別の実行単位である1スレッドが割り当てられるものであり、
前記処理サーバのそれぞれは、
前記分散処理部による所定の計算ステップにおける計算処理、および、当該分散処理部の接続先となる他の分散処理部との間でのデータ送受信を完了し、当該分散処理部が、次の前記計算ステップについて実行可能な状態を示す実行可能状態であることを検出する手順と、
前記実行可能状態となった分散処理部それぞれに、当該分散処理部の前記計算処理の遅れにより前記他の分散処理部のCPUを処理待ちにさせる影響が大きいほど、前記計算処理の遅れる分散処理部に高い優先度を設定する所定の優先度算出アルゴリズムを用いて前記優先度を設定し、前記優先度の高い分散処理部のスレッドを優先的に前記CPUの処理スケジュールに割り当てる手順と、
を実行することを特徴とする分散同期処理方法。 A distributed synchronous processing method for a distributed synchronous processing system, comprising: a plurality of processing servers; and a plurality of distributed processing units operating on the processing servers.
One thread, which is an individual execution unit, is assigned to each of the distributed processing units as a scheduling target of one core in the CPU of the processing server to which the distributed processing unit itself belongs,
Each of the processing servers
Completion of calculation processing in a predetermined calculation step by the distributed processing unit and data transmission / reception with another distributed processing unit to which the distributed processing unit is connected, and the distributed processing unit performs the next calculation. A procedure for detecting that the step is in an executable state, which indicates an executable state,
A distributed processing unit that delays the calculation process as the effect of causing the CPU of the other distributed processing unit to wait for the processing of the distributed processing unit in the executable state is delayed due to the delay of the calculation process of the distributed processing unit. A procedure of setting the priority using a predetermined priority calculation algorithm that sets a high priority to, and preferentially assigning the thread of the distributed processing unit having the high priority to the processing schedule of the CPU,
A distributed synchronous processing method characterized by executing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017028610A JP6688240B2 (en) | 2017-02-20 | 2017-02-20 | Distributed synchronous processing system and distributed synchronous processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017028610A JP6688240B2 (en) | 2017-02-20 | 2017-02-20 | Distributed synchronous processing system and distributed synchronous processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2018136588A JP2018136588A (en) | 2018-08-30 |
JP6688240B2 true JP6688240B2 (en) | 2020-04-28 |
Family
ID=63365555
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017028610A Active JP6688240B2 (en) | 2017-02-20 | 2017-02-20 | Distributed synchronous processing system and distributed synchronous processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6688240B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102446717B1 (en) * | 2020-11-12 | 2022-09-27 | 한국과학기술정보연구원 | Appartus for processing container, method thereof and storage storing a program for processing container |
-
2017
- 2017-02-20 JP JP2017028610A patent/JP6688240B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2018136588A (en) | 2018-08-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Shi et al. | An energy-efficient scheduling scheme for time-constrained tasks in local mobile clouds | |
CN109416647B (en) | System and method for scheduling tasks and managing computing resource allocation for closed loop control systems | |
US9158565B2 (en) | Predictable computing in virtualizated distributed computer systems based on partitioning of computation and communication resources | |
EP2159694B1 (en) | Method and device for barrier synchronization, and multicore processor | |
US20180018197A1 (en) | Virtual Machine Resource Allocation Method and Apparatus | |
Chen et al. | Adaptive multiple-workflow scheduling with task rearrangement | |
Dehnavi et al. | A reliability-aware resource provisioning scheme for real-time industrial applications in a Fog-integrated smart factory | |
EP2269136B1 (en) | Method, system and computer program for workload scheduling | |
JP7050957B2 (en) | Task scheduling | |
Shi et al. | Real-time communication analysis with a priority share policy in on-chip networks | |
Okhovvat et al. | Task allocation to actors in wireless sensor actor networks: an energy and time aware technique | |
Zhang et al. | Reservation-based resource scheduling and code partition in mobile cloud computing | |
Edinger et al. | Decentralized low-latency task scheduling for ad-hoc computing | |
JP6688240B2 (en) | Distributed synchronous processing system and distributed synchronous processing method | |
CN117608760A (en) | Cloud application hybrid deployment method applied to Kubernetes | |
JP6535304B2 (en) | Distributed synchronous processing system and distributed synchronous processing method | |
Zhang et al. | Prophet: Speeding up distributed dnn training with predictable communication scheduling | |
Yang et al. | A novel hierarchical distributed vehicular edge computing framework for supporting intelligent driving | |
Chen et al. | Regular composite resource partition in open systems | |
CN106844021B (en) | Computing environment resource management system and management method thereof | |
Eltayeb et al. | Concurrent scheduling: efficient heuristics for online large-scale data transfers in distributed real-time environments | |
JP6572185B2 (en) | Distributed synchronous processing system and method | |
JP6778161B2 (en) | Distributed synchronous processing system, distributed synchronous processing method and distributed synchronous processing program | |
Goldman et al. | A model for parallel job scheduling on dynamical computer Grids | |
Kraemer et al. | Reducing the number of response time SLO violations by a cloud-HPC convergence scheduler |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190308 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20191224 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20200114 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20200316 |
|
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: 20200331 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20200403 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6688240 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |