JP5826390B2 - Transfer method and graph processing system - Google Patents
Transfer method and graph processing system Download PDFInfo
- Publication number
- JP5826390B2 JP5826390B2 JP2014523509A JP2014523509A JP5826390B2 JP 5826390 B2 JP5826390 B2 JP 5826390B2 JP 2014523509 A JP2014523509 A JP 2014523509A JP 2014523509 A JP2014523509 A JP 2014523509A JP 5826390 B2 JP5826390 B2 JP 5826390B2
- Authority
- JP
- Japan
- Prior art keywords
- graph
- intermediate data
- information
- vertex
- group
- 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.)
- Expired - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
- G06F16/9024—Graphs; Linked lists
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Description
本発明は、複数の計算ノードを用いたグラフ処理に関し、特にグラフ情報の計算ノード間での転送に関するものである。 The present invention relates to graph processing using a plurality of calculation nodes, and more particularly to transfer of graph information between calculation nodes.
グラフ処理における情報圧縮技術として、非特許文献1に記載されている技術がある。非特許文献1に記載の技術は、非ゼロの値を格納したベクトルA、非ゼロの箇所の列番号を格納したベクトルB、各行の先頭の非ゼロの箇所がベクトルAの何番目の値に対応するかを格納したベクトルCでグラフ構造データを表現することで情報を圧縮するものである。
As an information compression technique in graph processing, there is a technique described in
非特許文献1に記載の技術では、グラフ構造データを圧縮することは可能であるが、グラフ処理時の中間データであるグラフの頂点間を伝搬する情報は圧縮できない。本願発明者らは、複数の計算ノードを用いたグラフ処理の場合に、処理対象となるグラフの規模が大きくなるほど、計算ノード間で転送される中間データ量が多くなるために、中間データの転送に要する時間が長くなり、ひいてはグラフ処理全体の速度が遅くなるという問題があることを見出した。
With the technique described in Non-Patent
そこで本発明は、効率的なグラフ処理の中間データの転送を目的とする。 Accordingly, an object of the present invention is to transfer intermediate data for efficient graph processing.
本発明は、複数の計算ノードによるグラフ処理での、送信元のグラフ頂点の情報と送信先のグラフ頂点の情報の組を有する中間データの転送を、各計算ノードに中間データを蓄積する送信バッファを設け、送信元のグラフ頂点の情報または送信先のグラフ頂点の情報のいずれかソート後に圧縮率が高くなる情報に基づいて、蓄積された中間データの群の中の中間データの並びをソートし、ソート後に、蓄積された中間データの群を圧縮し、中間データの群を転送することで、前述の課題を解決する。 The present invention relates to a transmission buffer that accumulates intermediate data in each computation node for transfer of intermediate data having a pair of information of a graph vertex of a transmission source and information of a graph vertex of a transmission destination in graph processing by a plurality of computation nodes. And sort the sequence of intermediate data in the group of accumulated intermediate data based on the information that increases the compression rate after sorting either the source graph vertex information or the destination graph vertex information After the sorting , the above-mentioned problem is solved by compressing the accumulated intermediate data group and transferring the intermediate data group.
本発明によれば、複数計算ノードでグラフ処理を行う際に、効率的な中間データの転送を実現できる。 According to the present invention, it is possible to realize efficient transfer of intermediate data when performing graph processing with a plurality of computation nodes.
図1は、本発明の実施の形態に係るグラフ処理システム10の構成を概略的に示す図である。図1に示されるように、グラフ処理システム10は、インターネット200を介して通信可能なPCや携帯端末といったクライアント100、インターネット200を介してクライアント100からの要求を受け付けるウェブサーバ(Webサーバ)300、Webサーバ300からの要求によりグラフ解析を行うアプリケーションサーバ(Apサーバ)400、およびデータベースへのアクセスを行うデータベースサーバ(DBサーバ)500を有している。但し、クライアント100とWebサーバ300を結ぶネットワークはインターネット200に限定されず、例えばLANでも良い。また、本実施例では、Webサーバ300、Apサーバ400、およびDBサーバ500を備えるウェブ3層構成のシステムを記載しているが、本発明はこの構成に限定されるものではない。例えばグラフ解析も行うWebサーバ300とDBサーバ500の2層構成などでも良い。
FIG. 1 is a diagram schematically showing a configuration of a
図2は、図1のApサーバ400のシステム構成を示す図である。図2に示されるようにApサーバ400はサーバ装置420、430、440、450と、それらを結ぶネットワーク装置410とを有している。サーバ装置420−450のそれぞれは、グラフ処理における計算ノードとして働く。サーバ装置の台数はサーバ装置の性能やタスクの負荷によって決められるものであるため、4台の構成に制限されず他の台数であっても良い。サーバ装置420−450は、並列処理を行い互いに通信しながら、最短経路問題を解く等のグラフ処理を実行する。サーバ装置420−450には、それぞれサーバ識別情報(サーバID)が与えられる。本実施例では、3台のサーバ装置をグラフ処理に用い、サーバ装置420のサーバIDは「1」、サーバ装置430のサーバIDは「2」、サーバ装置440のサーバIDは「3」である。
FIG. 2 is a diagram showing a system configuration of the
図3は、図2に示されるサーバ装置420の内部構成を示すブロック図である。サーバ装置430、440、450の内部構成は、サーバ装置420の内部構成と同等の機能を有していれば良く、例えば、サーバ毎に異なるメーカや性能であってもかまわない。以降、サーバ装置420を代表として取り上げて説明する。
FIG. 3 is a block diagram showing an internal configuration of the
サーバ装置420は、中央処理装置(CPU)600、メモリ装置610、ストレージ装置620、入力装置630、出力装置640、ネットワークインタフェース(I/F)650、およびバス660を備える。サーバ装置420内の構成要素間のデータ転送は主にバス660を介して行われる。CPU600はメモリ装置610を使用してグラフ解析プログラムを実行するとともにサーバ装置420全体の動作を制御する。メモリ装置610は、SDRAMなどの1次記憶装置であり、CPU600がプログラムを実行する際に必要な命令やデータを保持する。ストレージ装置620は、HDDやSSDといった2次記憶装置であり、プログラムやデータを長期間保持する他、メモリ装置610のスワップ領域としても利用される。入力装置630は、マウスやキーボードなどであり、出力装置640は表示装置やスピーカーなどである。ネットワークインタフェース650は他のサーバ装置との通信に利用されるものであり、InfiniBandなどを用いることができる。
The
図4は、メモリ装置610のメモリ領域に確保された送信バッファ611と、受信バッファ612と、処理キュー613と、グラフ演算モジュール614と、頂点割当て情報615と、次の回の処理を蓄積するNEXTキュー616と、圧縮モジュール617と、伸長モジュール618とを示す図である。送信バッファ611は、サーバ装置間で通信を行う際に送信するデータを一時保管するためのメモリ領域である。受信バッファ612は、サーバ装置間で通信を行う際に受信するデータを一時保管するためのメモリ領域である。サーバ装置間で転送されるグラフ処理の中間データは、送信バッファ611や受信バッファ612に一時保管される。送信バッファ611に蓄えられたデータは、CPU600の送信指示によりネットワークインタフェース650へ転送された後、ネットワーク装置410を介して別のサーバ装置へ送信される。送信データは、別のサーバ装置のネットワークインタフェース650で受信された後、別のサーバ装置の受信バッファ612に蓄えられる。処理キュー613は、グラフ処理のあるフェーズにおいて演算可能なデータを一時保管するためのメモリ領域であり、NEXTキュー616は、その次のフェーズにおいて演算可能なデータを一時保管するためのメモリ領域である。グラフ演算モジュールは、最短経路探索などのグラフ処理の演算を行うプログラムモジュールである。圧縮モジュール617は、後述するが、サーバ装置間で転送されるグラフ処理の中間データを圧縮するプログラムモジュールである。伸長モジュール618は、後述するが、サーバ装置間で転送されるグラフ処理の中間データを伸長するプログラムモジュールである。頂点割当て情報615は、後述するが、複数のサーバ装置に対するグラフ処理の割当てを示す情報である。
FIG. 4 shows a NEXT that stores a
図5は、本実施例のグラフ処理システム10の動作を説明するために具体例としてあげたグラフの図である。図5中の円はグラフの頂点を表しており、円内には頂点の識別番号(以下、頂点番号)を示している。頂点間の線はグラフの辺である。グラフは様々な事柄の関係性を表現するのに適している。例えば、グラフの頂点を駅や交差点とみなすと辺は線路や道路を表し、頂点を人や企業とみなした場合には、辺は人や企業間の相互関係を示す。辺は頂点間の関係を示す重みを持ち、前者の例では時間や距離、後者の例では結びつきの強さを示す。
FIG. 5 is a graph showing a specific example for explaining the operation of the
図6および図7は、図5に示したグラフをグラフ構造データとして表現したもので、図5のグラフと同じグラフ構造を示している。図6は図5のグラフを行列形式で表現したものであり、図7は図5のグラフをCSR(Compressed Sparse Row)形式で表現したものである。図6の表中の値は辺の重みを示し、値が0(最短経路問題など解くべき問題によっては∞と表現した方が都合の良いものもある)の箇所は辺が存在しないことを意味する。図7のCSR形式は、非ゼロの値を格納したvalues、非ゼロの箇所の列番号を格納したcolumns、各行の先頭の非ゼロの箇所がvaluesの何番目の値に対応するかを格納したrowindexから成る。CSR形式は本図のような疎行列を表現するのに適している。行列形式ではn×mの行列を表現するのにn×mの記憶容量が必要になるが、CSR形式では、非ゼロの数をlとすると2×l+n+1の記憶容量で済む。例えば、ビッググラフに代表されるスケールフリー性を持っているグラフは、疎行列となるため、一般にCSR形式やCSC(Compressed Sparse Column)形式(CSR形式に対して行と列を入れ替えたもの)といった圧縮格納形式でグラフ構造データが保存される。 6 and 7 represent the graph shown in FIG. 5 as graph structure data, and show the same graph structure as the graph of FIG. 6 represents the graph of FIG. 5 in a matrix format, and FIG. 7 represents the graph of FIG. 5 in a CSR (Compressed Sparse Row) format. The values in the table of FIG. 6 indicate edge weights, meaning that there are no edges at locations where the value is 0 (it may be more convenient to express ∞ depending on the problem to be solved such as the shortest path problem). To do. The CSR format in FIG. 7 stores values storing non-zero values, columns storing column numbers of non-zero locations, and what values of values correspond to the first non-zero location of each row. It consists of rowindex. The CSR format is suitable for expressing a sparse matrix as shown in the figure. In the matrix format, an n × m storage capacity is required to represent an n × m matrix. However, in the CSR format, if the number of non-zeros is 1, a storage capacity of 2 × l + n + 1 is sufficient. For example, a graph having a scale-free property represented by a big graph is a sparse matrix, and therefore generally has a CSR format or a CSC (Compressed Sparse Column) format (in which the rows and columns are replaced with respect to the CSR format). Graph structure data is saved in a compressed storage format.
図8は、頂点間で転送される情報を示したもので、各行は送信先の頂点(target頂点)の頂点番号(target)、送信元の頂点(source頂点)の頂点番号(source)、送信データ(data)の組で構成される。ここでは、例として頂点3から頂点7、8、9へ転送される情報を示している。targetと送信先のサーバ装置、およびsourceと送信元サーバ装置の関係は、頂点割当て情報615として各サーバ装置のメモリ装置610に保存されている。
FIG. 8 shows information transferred between the vertices. Each row indicates the vertex number (target) of the destination vertex (target vertex), the vertex number (source) of the source vertex (source vertex), and the transmission. It consists of a set of data. Here, as an example, information transferred from the
図9は、本実施例の頂点割当て情報615を示す図である。頂点割当て情報615は、頂点番号と該頂点番号の頂点の演算が割り当てられているサーバ装置のサーバIDとの組をエントリとする。頂点割当て情報615は、各サーバ装置への頂点の割当ての際に生成することができる。本実施例では、サーバIDの昇順に、頂点番号が若い頂点の群を配置しているが、頂点の配置の構成はこれに限定されず、頂点が各サーバに分散配置されていれば本発明を適用できる。 FIG. 9 is a diagram showing the vertex assignment information 615 of the present embodiment. In the vertex assignment information 615, a pair of a vertex number and a server ID of a server device to which a vertex calculation of the vertex number is assigned is an entry. The vertex assignment information 615 can be generated when assigning vertices to each server device. In the present embodiment, a group of vertices with younger vertex numbers are arranged in ascending order of server IDs, but the configuration of the arrangement of vertices is not limited to this, and the present invention can be used if the vertices are distributed and arranged in each server. Can be applied.
図10に本実施例のグラフ処理システム10によるグラフ処理の動作例をフローチャートで示す。本実施例では、図7のグラフ構造データが処理対象としてストレージ装置620に格納されており、各サーバ装置のメモリ装置610に図7のグラフ構造データが転送された状態で、図9に示した割当てで各サーバ装置にそれぞれが演算する頂点が割当てられているとして説明する。各サーバ装置で演算する頂点の割当ては、各サーバ装置のメモリ装置610に頂点割当て情報615として、保存されている。また、グラフ解析の始点となる頂点は、サーバ装置420に割当てられるとして説明する。
FIG. 10 is a flowchart showing an example of the graph processing operation performed by the
まず、サーバ装置420のグラフ演算モジュール614が、グラフ解析の始点となる頂点をtarget頂点として選択する(ステップS100、S101)。次に、サーバ装置420のグラフ演算モジュール614が、選択したtarget頂点に対するsource頂点とdataの組を作り、処理キュー613へ入れる(ステップS102)。ここでは、target頂点が始点であるため、source頂点、dataはダミーデータ(例えば、source=target、data=Z)とする。
First, the graph calculation module 614 of the
ステップS103では、各サーバ装置のグラフ演算モジュール614が、各サーバ装置の処理キュー613が空であるか否かの判定を行い、各サーバ装置の動作は、空であればステップS108へ進み、空でなければステップS104へ進む。ステップS104では、各サーバ装置のグラフ演算モジュール614が、各サーバ装置の処理キュー613から(target、source、data)情報の組を取り出し、target頂点に対する演算を実施する。 In step S103, the graph calculation module 614 of each server device determines whether or not the processing queue 613 of each server device is empty. If the operation of each server device is empty, the process proceeds to step S108. Otherwise, the process proceeds to step S104. In step S104, the graph operation module 614 of each server device extracts a set of (target, source, data) information from the processing queue 613 of each server device, and performs an operation on the target vertex.
次に、ステップS105で各サーバ装置のグラフ演算モジュール614が、処理キュー613にあったtarget頂点を次のsource頂点として選択し、メモリ装置610にある図7のグラフ構造データを参照して、グラフ処理の中間データとなる、source頂点と、グラフ構造データから読み出したtarget頂点と、dataの組を生成する。ステップ106で、各サーバ装置のグラフ演算モジュール614が、ステップ105で生成した組のtarget頂点を自サーバ装置が処理する場合は生成した組の情報をNextキュー616に入れ、他サーバが処理する場合は生成した組の情報を送信バッファ611へ入れる。送信バッファ611は、target頂点を処理するサーバ装置毎に分けておくことが望ましい。
Next, in step S105, the graph calculation module 614 of each server device selects the target vertex that was in the processing queue 613 as the next source vertex, and refers to the graph structure data in FIG. A set of source vertices, target vertices read from the graph structure data, and data, which are intermediate data of processing, is generated. When the graph calculation module 614 of each server device processes the target vertex of the set generated in step 105 in step 106, the server device puts the generated set information in the Next queue 616 and the other server processes it Puts the generated set of information into the
ステップS107では、送信情報をまとめて効率よく転送するために、各サーバ装置で、送信バッファ611に格納された情報の量が予め設定された送信基準サイズを超えたか否かの判定が行われる。基準のサイズを超えた場合は送信を開始するために、各サーバ装置の動作はステップS200へ進み、基準のサイズを超えていない場合はステップS103へ戻る。ステップ108では、各サーバ装置で、処理キュー613が空になった状態で未送信の情報が送信バッファ611に残っているか否かの判定が行われる。送信バッファ611が空でない場合は未送信情報を送信するために、各サーバ装置の動作はステップS200へ進み、送信バッファが空の場合は未送信情報がないため、受信を開始するためにステップS300へ進む。
In step S107, in order to efficiently transmit the transmission information collectively, each server device determines whether or not the amount of information stored in the
図11に、ステップS200の詳細なステップであるステップS201−S205を示す。まず、ステップS200では、各サーバ装置の圧縮モジュール617が、送信バッファ611内のtarget頂点、source頂点、dataのカラム毎に共通な値の数をカウントアップする(ステップS201、ステップS202)。その後、各サーバ装置の圧縮モジュール617は、各カラムで共通な値は連続するものとしてランレングス符号化を行った場合に最も圧縮率の高いカラムをキーとして送信バッファ611内のデータのソートを行う(ステップS203)。この際、target頂点、source頂点、dataの組の対応は保持した形でソートが行われる。このように、送信バッファ611に蓄積されている中間データであるtarget頂点、source頂点、dataの組の群の中で、組の並びのソートが行われることで、効率的な送信データの圧縮が可能となり、効率的なデータ転送を実現でき、ひいてはグラフ処理を高速化できる。さらに、target頂点、source頂点、dataの内で最も圧縮率が高くなるカラムをキーとすることで、さらに効率的な送信データの圧縮が可能となる。なお、target頂点、source頂点のカラム毎に共通な値の数をカウントアップし、target頂点またはsource頂点のいずれか圧縮率の高い方のカラムをキーとしてソートしてもよい。例えば、辺に重みが無いグラフ処理の場合には、dataの送信は不要である。
FIG. 11 shows steps S201 to S205 which are detailed steps of step S200. First, in step S200, the compression module 617 of each server apparatus counts up the number of common values for each column of the target vertex, the source vertex, and the data in the transmission buffer 611 (step S201, step S202). Thereafter, the compression module 617 of each server device sorts the data in the
各サーバ装置の圧縮モジュール617は、ソートを行った後、キーとしたカラムに対しランレングス符号化を行う(ステップS204)。予めソートがおこなわれることで、共通の数値が連続するようになり、ランレングス符号化での圧縮率を高めることができる。また、伸長モジュール618による復号時にどのカラムをキーとして圧縮を行ったかが分かるように、各サーバ装置の圧縮モジュール617は、送信情報の先頭にキーとしたカラムを示す情報を付加する。ステップS200に続くステップS109では、各サーバ装置は、ステップS200で処理された送信データを、頂点割当て情報615を参照し、Target頂点の演算を割当てられているサーバ装置へ送信する。
After performing the sorting, the compression module 617 of each server device performs run-length encoding on the key column (step S204). By performing the sorting in advance, common numerical values become continuous, and the compression rate in the run-length encoding can be increased. Further, the compression module 617 of each server device adds information indicating the column as the key to the head of the transmission information so that it can be understood which column was used as the key when decoding by the
図12に、ステップS300の詳細なステップであるステップS301−S306を示す。伸長処理ステップS300では、各サーバ装置の伸長モジュール618が、まず受信バッファ612から情報を取り出し、その先頭の情報からどのカラムに復号を行えば良いかの特定を行う(ステップS301、S302)。伸長モジュール618は、特定したカラムに対し、ランレングス複合化を行い、もとの情報に伸長する(ステップS303)。ステップS304では、伸長モジュール618は、特定したカラムがtarget頂点か否かの判定を行う。特定したカラムがtarget頂点でない場合は、伸長モジュール618は、target頂点をキーとしてソートを行う(ステップS305)。この際も、target頂点、source頂点、dataの組の対応は保持した形でソートが行われる。このように、受信バッファ612に到着した中間データの群の中で、中間データの並びのソートが行われる。特定したカラムがtarget頂点の場合は、送信前に既にソート済みであるためソートは行われず処理が終了する(S306)。
FIG. 12 shows steps S301 to S306 which are detailed steps of step S300. In the decompression processing step S300, the
ステップS110では、各サーバ装置は、別のサーバ装置から送信された情報を受信バッファ612から取り出してNextキュー616へ入れる。各サーバ装置は、受信する情報が無い場合はステップS110で何もしない。ここには記載しないが、受信すべき情報があるか否かは別途サーバ装置間で通信し合う。その後ステップS111では、各サーバ装置は、グラフ処理を行っている全サーバ装置でNextキュー616が空か否かの判定を行う。グラフ処理を行っている全サーバ装置でNextキュー616が空か否かは、サーバ装置のそれぞれが、自身のNextキュー616が空になった場合に、他のサーバ装置に自身のNextキュー616が空になったことを通知することで、各サーバ装置が判定できる。Nextキュー616が空でない場合は、各サーバ装置は、Nextキュー616から処理キュー613へ情報を移動させ(ステップS112)、各サーバ装置の動作はステップS103へ戻る。全サーバ装置のNextキュー616が空の場合は、全ての頂点に対する処理が完了する(ステップS113)。 In step S <b> 110, each server device extracts information transmitted from another server device from the reception buffer 612 and puts it in the Next queue 616. If there is no information to be received, each server device does nothing in step S110. Although not described here, whether or not there is information to be received is separately communicated between the server apparatuses. Thereafter, in step S111, each server device determines whether or not the Next queue 616 is empty in all the server devices performing the graph processing. Whether or not the Next queue 616 is empty in all the server devices performing the graph processing depends on whether each Server device has its own Next queue 616 in another server device when its Next queue 616 is empty. Each server device can determine by notifying that it has become empty. If the Next queue 616 is not empty, each server device moves information from the Next queue 616 to the processing queue 613 (Step S112), and the operation of each server device returns to Step S103. If the Next queue 616 of all server devices is empty, the processing for all vertices is completed (step S113).
ステップS200とステップS300の圧縮・伸長の処理により、受信した情報はtarget頂点をキーとしてソートされた状態で処理キュー613へ入れられる。処理キュー613への格納順は頂点に対する各サーバ装置の演算順となるため、target頂点順としておくことで、同じtarget頂点に対する処理が連続に行われる。連続に処理が行われることで、中間データがCPU600のキャッシュからメモリ装置610へリプレースされたり、メモリ装置610からストレージ装置620へのスワップが発生したりする確率を下げることができる。以降、具体例を用いて圧縮・伸長動作について説明する。
By the compression / decompression process of steps S200 and S300, the received information is put into the process queue 613 in a state of being sorted using the target vertex as a key. Since the storage order in the processing queue 613 is the calculation order of each server device with respect to the vertices, the processing for the same target vertex is continuously performed by setting the target vertex order. By performing the processing continuously, it is possible to reduce the probability that the intermediate data is replaced from the cache of the
図13は、図5のグラフの各頂点がどのサーバ装置で処理されるかの例を示した図である。この図では頂点1〜10をグループ700、頂点11〜15をグループ710、頂点16〜25をグループ720に分割している。本実施例では、グループ700はサーバ装置420で、グループ710はサーバ装置430で、グループ720はサーバ装置440で処理する場合を考える。
FIG. 13 is a diagram showing an example of which server device processes each vertex of the graph of FIG. In this figure,
図14は、図13に対し、頂点3を始点としてグラフ解析を行った場合の頂点間の情報の流れを矢印で示した図である。以下、頂点3を始点としたグラフ解析について処理の流れを説明する。まず、サーバ装置420のグラフ演算モジュール614が、頂点3をtarget頂点として選択し、(target、source、data)=(3、3、Z)(sourceおよびdataはダミーデータ)を処理キュー613へ入れる。サーバ装置420のグラフ演算モジュール614は、処理キュー613から(target、source、data)=(3、3、Z)を取り出し、頂点3に対する演算を実行する。サーバ装置420のグラフ演算モジュール614は、頂点3をsource頂点としてグラフ構造データを参照し、次に処理すべきtarget頂点が頂点7、8、9であることを得る。頂点7、8、9は全てグループ700に属しているため、サーバ装置420のグラフ演算モジュール614は、自身のNextキュー616に(target、source、data)=(7、3、c)、(8、3、d)、(9、3、e)を入れる。送受信される情報は存在しないため、サーバ装置420のグラフ演算モジュール614は、Nextキュー616の内容を処理キュー613へ移動させ、頂点7、8、9について演算を行い、グラフ構造データを参照する。各頂点が所属するグループの分類により、サーバ装置420のグラフ演算モジュール614は、頂点7ではNextキュー616へ(target、source、data)=(1、7、a)、(2、7、b)、送信バッファ611へ(target、source、data)=(11、7、i)、頂点8では送信バッファ611へ(target、source、data)=(11、8、j)、頂点9ではNextキュー616へ(target、source、data)=(4、9、f)、送信バッファ611へ(target、source、data)=(12、9、l)、(11、9、k)を入れる。サーバ装置420の圧縮モジュール617は、処理キュー613が空になったため、送信バッファ611の内容を圧縮して転送を行う。
FIG. 14 is a diagram showing the flow of information between vertices with arrows when graph analysis is performed with
図15(a)に送信バッファ611の内容のソート前の状態、図15(b)に送信バッファ611の内容をソート後の状態、図15(c)に送信バッファ611の内容をソートし圧縮した後の状態をそれぞれ示す。送信開始に先立ち、サーバ装置420の圧縮モジュール617は、(target、source、data)の各カラムをソートしてランレングス符号化を行った場合に最も圧縮率の高いものを選択する。ここでは、targetが頂点11に対し3個共通、sourceが頂点9に対し2個共通、dataは共通なしであり、targetをロウ方向に圧縮することが選択される。その後、サーバ装置420の圧縮モジュール617は、ロウ方向のソートを行い(図15(b))、targetに対してランレングス符号化を行う(図15(c))。図15(c)では頂点11が3個共通ということを11x3と表現しているが、これを例えば、最上位ビットが1となっている数を繰り返し数として表現することができる。target、source、data、繰り返し数をそれぞれ4バイトの変数で表現した場合、圧縮前のサイズが48バイトに対し、圧縮後のサイズは44バイトとなる。さらに転送情報の先頭にtargetを圧縮したという情報が1バイト付加され、45バイトの情報がサーバ装置430へ送信される。サーバ装置430では、受理した情報の伸長が行われ、伸長されたデータがNextキュー616へ入れられる。サーバ装置420、430では、Nextキュー616から処理キュー613へ(target、source、data)情報が移動され、別の頂点についても処理が進められる。以後、各頂点に対する上述の処理の繰り返しなので、説明は省略する。
FIG. 15A shows the state before sorting the contents of the
なお、各頂点に対する演算は上述のように処理キュー613から取り出されたtarget頂点の順に行われるが、同じtarget頂点に対する演算が連続に行われない場合、他のtarget頂点への演算により、中間データがキャッシュからメモリ装置にリプレースされたり、メモリ装置からストレージ装置へのスワップが発生したりすることで処理性能が低下してしまう。そこで、sourceまたはdataで圧縮が行われた場合は、受信側で伸長を行った後に、targetでソートが行われるフローとしている。 As described above, the calculation for each vertex is performed in the order of the target vertices extracted from the processing queue 613. However, when the calculation for the same target vertex is not performed continuously, the intermediate data is obtained by the calculation for other target vertices. However, if the cache is replaced with a memory device or a swap from the memory device to the storage device occurs, the processing performance deteriorates. Therefore, when compression is performed by source or data, a flow is performed in which sorting is performed by target after decompression at the receiving side.
以上のように、本実施例の転送方法では、グラフ頂点間で転送される中間データの群の中で、中間データの並びのソートが行われることで、効率的な送信データの圧縮が可能となり、効率的なデータ転送を実現でき、ひいてはグラフ処理を高速化できる。さらに、各カラムをロウ方向ソートして圧縮した場合の圧縮率の比較を行うことで、サーバ間で転送される情報の量をさらに効率よく削減することができる。また、カラムのうち、sourceまたはdataをキーとしてソートし、圧縮をかけて転送した場合には、受信側で伸長後にtargetで再ソートを行うことでメモリ装置やストレージ装置に待避する中間データ量を減らし、グラフ解析をさらに高速に行うことが可能になる。 As described above, in the transfer method of the present embodiment, it is possible to efficiently compress the transmission data by sorting the arrangement of the intermediate data in the group of intermediate data transferred between the graph vertices. Efficient data transfer can be realized, and the graph processing can be speeded up. Further, by comparing the compression rates when the columns are sorted and compressed in the row direction, the amount of information transferred between servers can be more efficiently reduced. Also, if the source or data is sorted using the source or data as a key and transferred after compression, the amount of intermediate data to be saved in the memory device or storage device can be reduced by re-sorting with the target after decompression on the receiving side. This makes it possible to perform graph analysis at higher speed.
100:クライアント、200:インターネット、300:Webサーバ、400:Apサーバ、500:DBサーバ、410:ネットワーク装置、420〜450:サーバ装置、600:CPU、610:メモリ装置、611:送信バッファ、612:受信バッファ、613:処理キュー、614:グラフ演算モジュール、615:頂点割当て情報、616:NEXTキュー、617:圧縮モジュール、618:伸長モジュール、620:ストレージ装置、630:入力装置、640:出力装置、650:ネットワークインタフェース、660:バス 100: client, 200: Internet, 300: Web server, 400: Ap server, 500: DB server, 410: network device, 420 to 450: server device, 600: CPU, 610: memory device, 611: transmission buffer, 612 : Reception buffer, 613: processing queue, 614: graph operation module, 615: vertex assignment information, 616: NEXT queue, 617: compression module, 618: decompression module, 620: storage device, 630: input device, 640: output device 650: Network interface 660: Bus
Claims (9)
各計算ノードは送信バッファを有し、
各計算ノードには、処理対象のグラフ頂点が割当てられ、
前記中間データには、送信元のグラフ頂点の情報と送信先のグラフ頂点の情報の組が含まれ、
前記中間データを前記送信バッファに蓄積し、
前記送信元のグラフ頂点の情報または前記送信先のグラフ頂点の情報のいずれかソート後に圧縮率が高くなる情報に基づいて、蓄積された前記中間データの群の中の前記中間データの並びをソートし、
前記ソート後に、蓄積された前記中間データの群を圧縮し、
前記中間データの群を転送することを特徴とするグラフ処理の中間データの転送方法。 A method for transferring intermediate data in graph processing by a plurality of computation nodes,
Each compute node has a send buffer,
Each compute node is assigned a graph vertex to be processed,
The intermediate data includes a pair of information on the graph vertex of the transmission source and information on the graph vertex of the transmission destination,
Storing the intermediate data in the transmission buffer;
Sorting the array of the intermediate data in the accumulated group of intermediate data based on information that increases the compression rate after sorting either the information of the graph vertex of the transmission source or the information of the graph vertex of the transmission destination And
After the sorting, compress the accumulated group of intermediate data,
A method of transferring intermediate data for graph processing, wherein the group of intermediate data is transferred.
各計算ノードは受信バッファを有し、
各計算ノードは、
転送された前記中間データの群が前記送信元のグラフ頂点の情報に基づいてソートされている場合には、
前記送信先のグラフ頂点の情報に基づいて、前記受信バッファに到着した前記中間データの群の中の前記中間データの並びをソートすることを特徴とするグラフ処理の中間データの転送方法。 The method for transferring intermediate data for graph processing according to claim 1,
Each compute node has a receive buffer,
Each compute node
When the group of transferred intermediate data is sorted based on the information of the source graph vertex,
A method of transferring intermediate data in graph processing, wherein the arrangement of the intermediate data in the group of intermediate data that has arrived at the reception buffer is sorted based on information on the graph vertex of the transmission destination.
前記計算ノードは、サーバ装置であることを特徴とするグラフ処理の中間データの転送方法。 The method for transferring intermediate data for graph processing according to claim 1,
The method for transferring intermediate data of graph processing, wherein the computing node is a server device.
各計算ノードは送信バッファを有し、
各計算ノードには、処理対象のグラフ頂点が割当てられ、
前記中間データには、送信元のグラフ頂点の情報、送信先のグラフ頂点の情報、および前記送信元のグラフ頂点と前記送信先のグラフ頂点の間の依存関係の情報の組が含まれ、
前記中間データを前記送信バッファに蓄積し、
前記送信元のグラフ頂点の情報、前記送信先のグラフ頂点の情報、または前記依存関係の情報のいずれかソート後に圧縮率が最も高くなる情報に基づいて、蓄積された前記中間データの群の中の前記中間データの並びをソートし、
前記ソート後に、蓄積された前記中間データの群を圧縮し、
前記中間データの群を転送することを特徴とするグラフ処理の中間データの転送方法。 A method for transferring intermediate data in graph processing by a plurality of computation nodes,
Each compute node has a send buffer,
Each compute node is assigned a graph vertex to be processed,
The intermediate data includes a set of information on the graph vertex of the transmission source, information on the graph vertex of the transmission destination, and information on dependency between the graph vertex of the transmission source and the graph vertex of the transmission destination,
Storing the intermediate data in the transmission buffer;
Among the group of accumulated intermediate data based on the information that the compression rate becomes the highest after sorting, either the information of the graph vertex of the transmission source, the information of the graph vertex of the transmission destination, or the information of the dependency relationship Sort the sequence of the intermediate data of
After the sorting, compress the accumulated group of intermediate data,
A method of transferring intermediate data for graph processing, wherein the group of intermediate data is transferred.
各計算ノードは受信バッファを有し、
各計算ノードは、
転送された前記中間データの群が前記送信元のグラフ頂点の情報または前記依存関係の情報に基づいてソートされている場合には、
前記送信先のグラフ頂点の情報に基づいて、前記受信バッファに到着した前記中間データの群の中の前記中間データの並びをソートすることを特徴とするグラフ処理の中間データの転送方法。 The method for transferring intermediate data for graph processing according to claim 4 ,
Each compute node has a receive buffer,
Each compute node
When the group of transferred intermediate data is sorted based on the information of the source graph vertex or the dependency information,
A method of transferring intermediate data in graph processing, wherein the arrangement of the intermediate data in the group of intermediate data that has arrived at the reception buffer is sorted based on information on the graph vertex of the transmission destination.
前記計算ノードは、サーバ装置であることを特徴とするグラフ処理の中間データの転送方法。 The method for transferring intermediate data for graph processing according to claim 4 ,
The method for transferring intermediate data of graph processing, wherein the computing node is a server device.
各計算ノードは、
送信元のグラフ頂点の情報と送信先のグラフ頂点の情報の組を有するグラフ処理の中間データを保存する送信バッファと、
前記送信元のグラフ頂点の情報または前記送信先のグラフ頂点の情報のいずれかソート後に圧縮率が高くなる情報に基づいて、前記送信バッファに蓄積された前記中間データの群の中の前記中間データの並びをソートするモジュールと、
前記ソート後に、蓄積された前記中間データの群を圧縮するモジュールと、 前記中間データの群を転送するモジュールとを有することを特徴とするグラフ処理システム。 A graph processing system having a plurality of computation nodes,
Each compute node
A transmission buffer for storing intermediate data of graph processing having a pair of information on the graph vertex of the transmission source and information on the graph vertex of the transmission destination;
On the basis of the compression ratio becomes higher information after any sort of information the information or graph vertices of the destination of the transmission source graph vertices, the intermediate of the group of the intermediate data stored in the transmission buffer A module to sort the data sequence;
A graph processing system comprising: a module for compressing the group of intermediate data stored after the sorting; and a module for transferring the group of intermediate data.
各計算ノードは、
受信バッファと、
前記送信先のグラフ頂点の情報に基づいて、前記受信バッファに到着した前記中間データの群の中の前記中間データの並びをソートするモジュールとを有することを特徴とするグラフ処理システム。 The graph processing system according to claim 7 ,
Each compute node
A receive buffer;
A graph processing system comprising: a module that sorts the arrangement of the intermediate data in the group of intermediate data that has arrived at the reception buffer based on the information on the graph vertex of the transmission destination.
前記計算ノードは、サーバ装置であることを特徴とするグラフ処理システム。 The graph processing system according to claim 7 ,
The graph processing system, wherein the computation node is a server device.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2012/067270 WO2014006735A1 (en) | 2012-07-06 | 2012-07-06 | Transfer method and graph processing system |
Publications (2)
Publication Number | Publication Date |
---|---|
JP5826390B2 true JP5826390B2 (en) | 2015-12-02 |
JPWO2014006735A1 JPWO2014006735A1 (en) | 2016-06-02 |
Family
ID=49881524
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014523509A Expired - Fee Related JP5826390B2 (en) | 2012-07-06 | 2012-07-06 | Transfer method and graph processing system |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP5826390B2 (en) |
WO (1) | WO2014006735A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10362112B2 (en) * | 2014-03-06 | 2019-07-23 | Verizon Patent And Licensing Inc. | Application environment for lighting sensory networks |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05504644A (en) * | 1990-06-14 | 1993-07-15 | スィンキング マシンズ コーポレーション | Generating communication configurations for massively parallel processing systems |
JP2003338830A (en) * | 2002-03-12 | 2003-11-28 | Matsushita Electric Ind Co Ltd | Media transmitting method, media receiving method, media transmitter and media receiver |
JP2010244563A (en) * | 2002-10-10 | 2010-10-28 | Ab Initio Software Llc | Method for executing graph-based computation, computer readable storage medium for storing instruction executing this method, and system for executing the method |
-
2012
- 2012-07-06 JP JP2014523509A patent/JP5826390B2/en not_active Expired - Fee Related
- 2012-07-06 WO PCT/JP2012/067270 patent/WO2014006735A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05504644A (en) * | 1990-06-14 | 1993-07-15 | スィンキング マシンズ コーポレーション | Generating communication configurations for massively parallel processing systems |
JP2003338830A (en) * | 2002-03-12 | 2003-11-28 | Matsushita Electric Ind Co Ltd | Media transmitting method, media receiving method, media transmitter and media receiver |
JP2010244563A (en) * | 2002-10-10 | 2010-10-28 | Ab Initio Software Llc | Method for executing graph-based computation, computer readable storage medium for storing instruction executing this method, and system for executing the method |
Also Published As
Publication number | Publication date |
---|---|
WO2014006735A1 (en) | 2014-01-09 |
JPWO2014006735A1 (en) | 2016-06-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104346433B (en) | Method and system for the scalable acceleration of database query operations | |
KR101980365B1 (en) | Matrix processing apparatus | |
CN104040541A (en) | Techniques for more efficient usage of memory - to - CPU bandwidth | |
CN109981744B (en) | Data distribution method and device, storage medium and electronic equipment | |
CN103970604A (en) | Method and device for realizing image processing based on MapReduce framework | |
KR101936396B1 (en) | Matrix processing apparatus | |
US11334758B2 (en) | Method and apparatus of data processing using multiple types of non-linear combination processing | |
TW202147188A (en) | Method of training neural network model and related product | |
CN111694643B (en) | Task scheduling execution system and method for graph neural network application | |
CN104205035A (en) | File map compression | |
CN106161633A (en) | A kind of based on the transmission method of packaging file under cloud computing environment and system | |
CN109962711B (en) | Data compression method, electronic equipment and storage medium | |
US20230037783A1 (en) | Resource scheduling method and related apparatus | |
CN115357571A (en) | Data deduplication method, device, equipment and medium | |
CN102446100A (en) | Type and length abstraction for data types | |
JP5826390B2 (en) | Transfer method and graph processing system | |
CN111860893B (en) | Data processing method and device | |
US20190199832A1 (en) | Data transmitting program, data transmitting device, and data transmitting method | |
US11586633B2 (en) | Secondary tagging in a data heap | |
CN111245906B (en) | Service request distribution method | |
JP2017073123A (en) | Bulk data transfer device and method | |
CN107408127A (en) | Dynamic threshold door for index queue | |
CN106874272B (en) | Distributed connection method and system | |
WO2023169007A1 (en) | Point cloud prediction processing method and apparatus, computer, and storage medium | |
CN115361032B (en) | Antenna unit for 5G communication |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
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: 20150915 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20151013 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 5826390 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
LAPS | Cancellation because of no payment of annual fees |