JP5382383B2 - Database processing apparatus, database processing method, program, and database data structure - Google Patents
Database processing apparatus, database processing method, program, and database data structure Download PDFInfo
- Publication number
- JP5382383B2 JP5382383B2 JP2012048079A JP2012048079A JP5382383B2 JP 5382383 B2 JP5382383 B2 JP 5382383B2 JP 2012048079 A JP2012048079 A JP 2012048079A JP 2012048079 A JP2012048079 A JP 2012048079A JP 5382383 B2 JP5382383 B2 JP 5382383B2
- Authority
- JP
- Japan
- Prior art keywords
- fragment
- data
- thread
- database
- processing
- 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/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
本発明は、GPGPU(General Purpose computing on Graphics Processing Units)を用いるデータベース技術に関する。 The present invention relates to a database technology using GPGPU (General Purpose Computing on Graphics Processing Units).
近年、GPU(Graphics Processing Unit)等の並列演算器に汎用的な演算処理を行わせるGPGPU技術が注目されている。GPUは、CPU(Central Processing
Unit)よりも演算器の並列度が高く、演算のスループットが高い。また、複数の演算器に対して命令供給を行うSIMD演算器に似た構成を有する。GPGPUを用いて高い処理性能を発揮するには、命令分岐が少なくなるようにし、且つ、ある演算器のセットへのデータ供給に関して、データの供給量が一致することと供給するデータが連続性を持つ状態にすることが必要である。
In recent years, attention has been paid to GPGPU technology that allows a general-purpose arithmetic processing to be performed by a parallel arithmetic unit such as a GPU (Graphics Processing Unit). GPU is CPU (Central Processing)
The degree of parallelism of the computing units is higher than that of Unit, and the computation throughput is high. Further, it has a configuration similar to a SIMD arithmetic unit that supplies instructions to a plurality of arithmetic units. In order to achieve high processing performance using GPGPU, the number of instruction branches should be reduced, and the data supply to a certain set of computing units must be consistent with the data supplied. It is necessary to have a state.
カラムストアによるデータ構造はGPGPUのような並列演算器による処理に適した構造と考えられる。固定長データのデータ処理は、カラムストアによってカラムごとに固定長の配列として表現されるため、これをGPGPUでデータ処理に供すればよい。 The data structure by the column store is considered to be a structure suitable for processing by a parallel computing unit such as GPGPU. Since data processing of fixed length data is expressed as a fixed length array for each column by the column store, this may be used for data processing by GPGPU.
例えば非特許文献1には、大規模な一つのテキストについて、その内容の全文検索をGPGPUを援用して行う技術が開示されている。
For example, Non-Patent
しかし、可変長データを含むデータ群を効率的に格納するデータベースやそのようなデータベースを効率的に処理できるデータベース処理方法は未だ実現されていない。 However, a database that efficiently stores a data group including variable-length data and a database processing method that can efficiently process such a database have not yet been realized.
本発明は、上記問題点に鑑みてなされたもので、並列演算器を用いて、可変長データについても効率的なデータベース処理を実現することができるデータベースシステム、データベース処理方法等を提供することを目的とする。 The present invention has been made in view of the above problems, and provides a database system, a database processing method, and the like that can implement efficient database processing for variable-length data using a parallel computing unit. Objective.
本発明は、並列演算器を有するデータベース処理装置であって、前記並列演算器のデータ処理単位に応じたフラグメント長を決定し、カラムストアデータベースにおいて、可変長データを含むタプルデータをフラグメントに格納するとともに、フラグメントヘッダとして前記フラグメントのメタデータを格納するデータ格納手段と、前記カラムストアデータベースに格納されたデータの処理に際して、前記メタデータを参照して各スレッドに割り当てるフラグメントを決定し、決定内容に基づいて各スレッドにフラグメントを割り当てて並列演算を実行させる並列演算手段と、を備え、前記並列演算手段は、各スレッドにおいて、割り振られたフラグメントについて文字列を検索し、検索結果としてフラグメントのバイト位置をビット反転したものを記録する手段と、前記並列演算器のデータ処理単位に応じた数の前記検索結果を各スレッドに割り当てて、各スレッドにおいて、割り当てられた前記検索結果についてビット反転を検出し、検出結果フラグをタプルレベルの検索結果として記録する手段と、を備えることを特徴とするデータベース処理装置である。 The present invention is a database processing apparatus having a parallel computing unit, which determines a fragment length according to a data processing unit of the parallel computing unit, and stores tuple data including variable length data in a fragment in a column store database. In addition, when processing the data stored in the column store database, the data storage means for storing the fragment metadata as a fragment header, the fragment to be assigned to each thread is determined with reference to the metadata, Parallel operation means for allocating fragments to each thread and executing parallel operations on the basis of each of the threads, the parallel operation means searches for a character string for the allocated fragment in each thread, and the byte position of the fragment as a search result Bit invert A means for recording things, and assigning a number of the search results corresponding to the data processing unit of the parallel computing unit to each thread, detecting bit inversion for the assigned search results in each thread, and a detection result flag And a means for recording as a tuple level search result .
本発明は、並列演算器を有するデータベース処理装置におけるデータ処理方法であって、前記並列演算器のデータ処理単位に応じたフラグメント長を決定し、カラムストアデータベースにおいて、可変長データを含むタプルデータをフラグメントに格納するとともに、フラグメントヘッダとして前記フラグメントのメタデータを格納するデータ格納ステップと、前記カラムストアデータベースに格納されたデータの処理に際して、前記メタデータを参照して各スレッドに割り当てるフラグメントを決定し、決定内容に基づいて各スレッドにフラグメントを割り当てて並列演算を実行させる並列演算ステップと、を備え、前記並列演算ステップは、各スレッドにおいて、割り振られたフラグメントについて文字列を検索し、検索結果としてフラグメントのバイト位置をビット反転したものを記録するステップと、前記並列演算器のデータ処理単位に応じた数の前記検索結果を各スレッドに割り当てて、各スレッドにおいて、割り当てられた前記検索結果についてビット反転を検出し、検出結果フラグをタプルレベルの検索結果として記録するステップと、を備えることを特徴とするデータベース処理方法である。 The present invention relates to a data processing method in a database processing apparatus having a parallel computing unit, wherein a fragment length is determined according to a data processing unit of the parallel computing unit, and tuple data including variable length data is stored in a column store database. A data storage step for storing the fragment metadata as a fragment header and processing the data stored in the column store database to determine a fragment to be assigned to each thread with reference to the metadata. A parallel operation step for assigning a fragment to each thread based on the determined content and executing a parallel operation , wherein the parallel operation step searches for a character string for the allocated fragment in each thread, and as a search result Hula A bit-inversion of the byte position of the event, and a number of the search results corresponding to the data processing unit of the parallel computing unit are allocated to each thread, and each thread has a bit for the search result allocated. A database processing method comprising: detecting inversion and recording a detection result flag as a tuple level search result .
本発明は、並列演算器を有するコンピュータに、前記並列演算器のデータ処理単位に応じたフラグメント長を決定し、カラムストアデータベースにおいて、可変長データを含むタプルデータをフラグメントに格納するとともに、フラグメントヘッダとして前記フラグメントのメタデータを格納するデータ格納ステップ、前記カラムストアデータベースに格納されたデータの処理に際して、前記メタデータを参照して各スレッドに割り当てるフラグメントを決定し、決定内容に基づいて各スレッドにフラグメントを割り当てて並列演算を実行させる並列演算ステップ、を実行させ、前記並列演算ステップは、各スレッドにおいて、割り振られたフラグメントについて文字列を検索し、検索結果としてフラグメントのバイト位置をビット反転したものを記録するステップと、前記並列演算器のデータ処理単位に応じた数の前記検索結果を各スレッドに割り当てて、各スレッドにおいて、割り当てられた前記検索結果についてビット反転を検出し、検出結果フラグをタプルレベルの検索結果として記録するステップと、を備えることを特徴とするプログラムである。 The present invention determines a fragment length according to a data processing unit of the parallel computing unit in a computer having a parallel computing unit, stores tuple data including variable length data in the fragment in the column store database, and also includes a fragment header. In the data storage step for storing the metadata of the fragment, in processing the data stored in the column store database, the fragment to be assigned to each thread is determined with reference to the metadata, and each thread is determined based on the determined content parallel operation step of executing a parallel operation by assigning a fragment, is executed, the parallel operation step, in each thread, search for the string for the allocated fragment, results byte position of a fragment obtained by bit inversion as And a number of the search results corresponding to the data processing unit of the parallel computing unit are allocated to each thread, and in each thread, bit inversion is detected for the allocated search results, and a detection result flag Recording a tuple level search result as a tuple level search result .
本発明は、カラムストアデータベースのデータ構造であって、並列演算器のデータ処理単位に応じてコンピュータにより決定された固定長のフラグメント長を有し、前記コンピュータにより可変長データを含むタプルデータが格納されたフラグメントと、前記コンピュータにより、各前記フラグメントに対して付与された、前記フラグメントの順番を示した番号と、前記フラグメント最後部データ位置のタプル先頭位置からのオフセットと、を示すフラグメントヘッダと、を備えるデータベースのデータ構造である。
The present invention provides a data structure of a column store database has a fragment length of a fixed length determined by the computer according to the data processing unit of the parallel arithmetic unit, tuple data containing variable length data is stored by the computer and fragments that have been, by the computer, which is assigned to each of said fragment, and numbers indicate the order of the fragments, and fragment header indicating an offset from the tuple head position of said fragment rearmost data position, Is a data structure of a database comprising
本発明によれば、並列演算器を用いて、可変長データについても効率的なデータベース処理を実現することができる。 According to the present invention, efficient database processing can be realized even for variable-length data using a parallel computing unit.
以下、本発明の実施形態について図面を参照して説明する。 Embodiments of the present invention will be described below with reference to the drawings.
図1は、本発明の実施形態に係るデータベースシステムのシステム構成の概略図である。図示されるように、本システムは、データベース10とデータベース処理装置20とを備え、これらはLAN(Local Area Network)等のネットワークにより接続されている。
FIG. 1 is a schematic diagram of a system configuration of a database system according to an embodiment of the present invention. As shown in the figure, this system includes a
データベース10は、カラムストアデータベースである。データベース10の管理単位は、タプル、カラム、テーブル、スキーマであり、それぞれ上位構造に対して複数を格納することができる。タプルは、データベース内部のある行のデータを含む。あるカラムストア内部には特定のカラムのデータがタプル単位で集められている。
The
データベース処理装置20は、ホストコンピュータとコプロセッサ(並列演算器)等から構成される。データベース処理装置20は、並列演算器環境検知部21、可変長データ格納長決定部22、可変長データ格納・処理部23、並列演算処理部24、データ処理結果・格納・再処理部25、を備える。
The
並列演算器環境検知部21は、本装置における並列演算器(GPU)の処理能力に関する情報(データ処理単位等)を取得する。可変長データ格納長決定部22は、並列演算器環境検知部21が取得した情報に基づいて、データベース10におけるデータ格納長(フラグメント長)を決定する。
The parallel computing unit
可変長データ格納・処理部23は、可変長データ格納長決定部22により決定されたデータ格納長に基づいて、データをデータベース10に格納する。カラム単位の、固定長データを含む可変長のタプルデータ(カラムタプル)は、固定長のフラグメントへ格納される。あるカラムのタプルデータは、必要に応じて複数のフラグメントからなるフラグメントセットへ格納される。
The variable length data storage /
データベース10のデータ構造の一例を図2に示す。図示されるように、データベース10に格納されるデータは、フラグメントと、当該フラグメントに付されたフラグメントヘッダを備える。フラグメントは、1つのカラムタプルの部分データもしくは全体を格納する。フラグメントヘッダは、カラムタプルに関するメタデータを格納する。同じタプルに属するフラグメントは必ず連続的に格納される。フラグメントヘッダは、カラムタプルの部分データを格納したフラグメントの順番を示した番号(ct id)と、当該フラグメント最後部データ位置のタプル先頭位置からのオフセット(Length)を示す。
An example of the data structure of the
フラグメント長は、フラグメントセット内のカラムごとには固定長となりうるが、カラムごとにまたはフラグメントセット毎に、独立に設定することができる。可変長データ格納長決定部22は、カラムもしくはフラグメントセット内に現れるデータ長を計測し、適当なアルゴリズムを用いて、並列演算器の処理能力に適合した、処理効率もしくは空間効率を向上できるフラグメント長を導くことができる。例えば、並列演算器のデータ処理単位に適したデータ長(4,8、16、32、64バイト等)を設定してもよい。また、可変長データのデータ長の平均値等を設定してもよく、また、その平均値近傍の並列演算器のデータ処理単位に適したデータ長を設定してもよい。
The fragment length can be a fixed length for each column in the fragment set, but can be set independently for each column or for each fragment set. The variable length data storage
並列演算処理部24は、データベース10に格納されたデータについて並列演算処理を行う。データ処理結果・格納・再処理部25は、並列演算処理部24による演算結果を処理する。
The parallel
次に、本実施形態に係るデータベースシステムの動作について、データベース21からある文字列を検索する場合を例に説明する。
Next, the operation of the database system according to this embodiment will be described by taking as an example a case where a character string is searched from the
検索の実行処理としては、1.フラグメントをまたがる処理が必要である場合と、2.フラグメントをまたがる処理が必要でない場合がある。 The search execution process includes: 1. When processing across fragments is necessary, Processing across fragments may not be necessary.
上記1.の場合は、検索対象の文字列(可変長バイト列)がフラグメントの処理格納単位バイト長よりも長く、かつ検索対象のタプルが複数のフラグメントから構成される場合を含む。この場合、各スレッドに対して担当フラグメントをオーバーラップさせ、多段処理する。N番目のスレッドは、N番目のフラグメントとN+1番目のフラグメント、N+1番目のスレッドは、N+1番目のフラグメントとN+2番目のフラグメントを担当する。一番最後になるスレッドはEND番目のフラグメントのみ担当する。 Above 1. In this case, the search target character string (variable length byte string) is longer than the fragment processing storage unit byte length, and the search target tuple is composed of a plurality of fragments. In this case, the responsible fragment is overlapped for each thread and multistage processing is performed. The Nth thread is responsible for the Nth fragment and the (N + 1) th fragment, and the (N + 1) th thread is responsible for the (N + 1) th fragment and the (N + 2) th fragment. The last thread is responsible only for the END-th fragment.
上記2.の場合は、フラグメントへのデータ投入最短長管理単位(Byte)一発の検索と、すべてのフラグメントは1つのみでそれぞれのタプルを構成できている場合の検索と、を含む。これらは上記1.の特殊例として処理することができ、処理段が複数化しないので高速処理が可能となる。よって、以降、上記1.の場合を中心に図3を参照して説明する。 2. In the case of (1), the search includes a single data input shortest length management unit (Byte) search to a fragment and a search in the case where each fragment can be configured with only one fragment. These are described in 1. above. Can be processed as a special example, and since a plurality of processing stages are not used, high-speed processing is possible. Therefore, hereinafter, the above 1. The case will be described with reference to FIG.
まず、並列演算処理部24は、検索処理の結果セットの格納領域を確保する(ステップS1)。検索の結果は、複数のヒット結果などに対応するため、フラグメント内部のバイトごとにビットで与えられる。具体的には、検索対象バイト列の最初のバイトにあたるビット位置を反転するものとする。
First, the
並列演算処理部24は、並列演算器で実行される各スレッドに割り当てるフラグメントを、フラグメントに付与されたメタデータを参照して決定する(ステップS2)。このとき、1つのスレッドに処理させるフラグメント数はフラグメント長によって変化させる。例えばバイトのビット長である8とフラグメントのバイト長の最小公倍数を設定することで結果セットを空隙なく、かつ全てのスレッドに同じ長さのデータを与えることができる。例えば、フラグメント長が4バイトのフラグメントについては2フラグメントをスレッドに与えてもよい。フラグメント長が8バイトのフラグメントについては1フラグメントをスレッドに与えてもよい。フラグメント長が16バイトのフラグメントについては1フラグメントをスレッドに与えてもよい。また、並列演算器のデータ処理単位に基づいて、各スレッドに割り当てるフラグメントを決定してもよい。演算器が32ビットの場合には、各スレッドに与えるデータ長を32ビットの倍数となるようにしてもよい。
The
ステップS2の決定内容に基づいて並列演算処理が実行される(ステップS3)。具体的には、各スレッドにより以下の処理が実行される。スレッドは、検索対象となる可変長バイト列が与えられると、検索対象バイト列の長さを算出する。また、当該スレッドの担当すべきフラグメントセットの位置が与えられる。スレッドは、指定されたフラグメントを順次読み込み、検索対象バイト列が、読み込んだフラグメントセットに現れているかを判別する検索処理を行う。 A parallel calculation process is executed based on the content determined in step S2 (step S3). Specifically, the following processing is executed by each thread. When a variable length byte string to be searched is given, the thread calculates the length of the search target byte string. In addition, the position of the fragment set to be handled by the thread is given. The thread sequentially reads the specified fragment and performs a search process to determine whether the search target byte string appears in the read fragment set.
なお、検索処理を行う条件として、現在までに与えられた逐次フラグメント内部に格納されているデータの合計長を算出し、所定の条件[(検索対象バイト列長−1)+逐次フラグメントデータ長以上]を満たす場合に、検索処理を実行してもよい。すなわち、検索処理を行う条件として、現在処理を実行しているフラグメント内部の、未処理であるデータ長が、検索対象バイト列よりも長い場合には検索処理を実行してもよい。条件を満たさない場合は、次のフラグメントを続けて読み込み、データ合計長を算出して上記条件を満たすか判定してもよい。 As a condition for performing the search process, the total length of data stored in the sequential fragments given up to now is calculated, and a predetermined condition [(search target byte string length-1) + sequential fragment data length or more ] May be executed when the above condition is satisfied. That is, as a condition for performing the search process, the search process may be executed when the unprocessed data length in the fragment currently executing the process is longer than the search target byte string. If the condition is not satisfied, the next fragment may be continuously read and the data total length may be calculated to determine whether the above condition is satisfied.
検索処理では、検索対象バイト列の先頭のオフセットがそのスレッドの担当する先頭フラグメントの内部にあり、かつ検索対象バイト列のマッチ領域に1つのタプルIDのみ検出された場合、検索対象バイト列を検出したとしてその開始位置のビットを反転し、検索処理結果とする。この検索処理結果はスレッド単位でバイトアライメントされた領域に記録される。所定記憶領域に記録される検索処理結果の例を図4に示す。 In the search process, if the first offset of the search target byte string is inside the first fragment assigned to the thread and only one tuple ID is detected in the match area of the search target byte string, the search target byte string is detected. As a result, the bit at the start position is inverted to obtain a search processing result. The search processing result is recorded in a byte-aligned area in units of threads. An example of the search processing result recorded in the predetermined storage area is shown in FIG.
次に、データ処理結果・格納・再処理部25は、上記検索処理結果の再計算処理を行うため、再計算処理の結果セットの格納領域を確保する(ステップS4)。再計算の結果は、タプルに対して1ビットの容量確保で済む。すなわち、タプル数*ビット数+アライメントの数となる。
Next, the data processing result / storage /
データ処理結果・格納・再処理部25は、各スレッドに割り当てるフラグメントを決定する(ステップS5)。このとき、1つのスレッドに割り当てるタプル数を、バイトのビット長である8倍数に設定することでタプルレベルの結果セットを空隙なく、かつ全てのスレッドに同じ長さを与えることができる。また、並列演算器のデータ処理単位に基づいて割り当てるフラグメントを決定してもよい。演算器のデータ処理単位が32ビットの場合には、各スレッドに与えるデータ長を32ビットの倍数となるようにしてもよい。
The data processing result / storage /
ステップS5の決定内容に基づいて並列演算処理が実行される(ステップS6)。具体的には、各スレッドにより以下の処理が実行される。スレッドは、担当するタプルIDと、検索処理の結果セットの読み取り担当位置、フラグメントセットの担当位置を通知される。 A parallel calculation process is executed based on the determination content of step S5 (step S6). Specifically, the following processing is executed by each thread. The thread is notified of the tuple ID in charge, the position in charge of reading the result set of the search process, and the position in charge of the fragment set.
各スレッドは、自分が担当するタプルIDについて次の処理を行う。通知された位置からフラグメントを読み込み、そのタプルIDを算出する。自分が担当するタプルIDか判断し、担当するタプルIDの場合は、対応する検索結果を読み込み、フラグが上がっている場合には、そのタプルに検索対象バイト列が存在するとして、タプルレベルのフラグを上げる。この処理結果はスレッド単位でバイトアライメントされた領域に記録される。所定記憶領域に記録された再処理結果の例を図5に示す。これにより、各タプルに検索対象バイト列が存在するか否かが示される。 Each thread performs the following processing for the tuple ID that it is responsible for. A fragment is read from the notified position, and its tuple ID is calculated. It is determined whether the tuple ID is in charge. If the tuple ID is in charge, the corresponding search result is read. If the flag is raised, the tuple level flag indicates that the search target byte string exists in the tuple. Raise. This processing result is recorded in a byte-aligned area in units of threads. An example of the reprocessing result recorded in the predetermined storage area is shown in FIG. This indicates whether or not a search target byte string exists in each tuple.
なお、上述した本データベースシステムの動作の概要を図6に例示する。図6の例では、データベースにおいて、"HELLO!"、"parallel"、"GPU"、"GPGPU"等のタプルデータが各フラグメントに格納されている。並列演算処理部24は、バイト列"GPU"を検索する処理について、検索処理の結果を格納する領域を確保し、並列演算器で実行される各スレッドに割り当てるフラグメントを、メタデータや並列演算器のデータ処理単位に基づいて決定する。この決定内容に基づいて各スレッドにフラグメントが割り当てられる。各スレッドは、割り当てられたフラグメントについて、バイト列”GPU”を検索する演算処理を行い、処理結果を記録する。図6では、演算結果の記録領域において、”GPU”が検出されたバイト列に対応する領域の先頭位置のビットが反転されている。次に、データ処理結果・格納部25は、演算結果を再計算した処理結果を格納する領域を確保し、各スレッドに割り当てるタプルを決定する。このとき、各スレッドに割り当てるタプルの数は8の倍数に設定する。各スレッドは、割り当てられたタプルに対応する演算結果を読み込み、読み込んだ演算結果にフラグが立っている場合、そのタプルの処理結果としてフラグを立てる。図6では、フラグが立っている演算結果である"100"と"00100"、の処理結果として、フラグ"1"がそれぞれ立てられている。
An outline of the operation of the database system described above is illustrated in FIG. In the example of FIG. 6, tuple data such as “HELLO!”, “Parallel”, “GPU”, and “GPGPU” is stored in each fragment in the database. The
次に、並列演算処理部24が各スレッドに割り当てるフラグメントを決定する処理(上記ステップS2)の詳細を、図7を参照して説明する。並列演算処理部24は、割り当て対象のフラグメントを処理対象データから特定し、そのフラグメント長を取得する(ステップS11)。並列演算処理部24は、割り当て対象のフラグメントのフラグメント長が、8の倍数である所定数(8とフラグメントの最小公倍数等)であるかを判定する(ステップS12)。フラグメント長が所定数でなければ(ステップS12:NO)、並列演算処理部24は、処理対象データにおける他のフラグメントを割り当て対象のフラグメントに追加し、再度、割り当て対象フラグメントのフラグメント長を算出して(ステップS13)、ステップS12に戻る。フラグメント長が所定数である場合(ステップS12:YES)、並列演算処理部24は、割り当て対象のフラグメントをスレッドの一つに割り当てる(ステップS14)。並列演算処理部24は、処理対象データにおける全てのフラグメントについて割り当てが完了したかを判定し(ステップS15)、完了した場合には(ステップS15:YES)、処理を終了する。割り当てが完了していない場合には(ステップS15:NO)、ステップS11に戻り、残りのフラグメントについての処理を続行する。なお、本処理は一例であり、他の割り当て処理を用いてもよい。
Next, the details of the process of determining the fragment to be assigned to each thread by the parallel processing unit 24 (step S2 above) will be described with reference to FIG. The
次に、可変長データ格納・処理部23がデータベース10にデータを格納する処理について図8を参照して説明する。可変長データ格納・処理部23は、格納対象のデータを読み込む(ステップS21)。読み込まれるデータは、カラム単位の固定長データを含む可変長のタプルデータである。可変長データ格納・処理部23は、読み込んだタプルデータをデータベース10におけるフラグメントに格納する(ステップS22)。フラグメントは固定長であり、その長さは可変長データ格納長決定部22により、本システムで用いる並列演算器のデータ処理単位等に基づいて決定されている。可変長データ格納・処理部23は、フラグメントに格納したタプルデータに対応するメタデータを、データベース10におけるフラグメントヘッダに格納する(ステップS23)。メタデータは、タプルデータを識別するIDと、当該フラグメント最後部のタプル先頭位置からのオフセットを含む。可変長データ格納・処理部23は、格納対象の全データについてデータベース10への格納が完了したかを判定し(ステップS24)、完了した場合には(ステップS24:YES)、処理を終了する。格納が完了していない場合には(ステップS24:NO)ステップS21に戻り、残りのデータについての処理を続行する。なお、本処理は一例であり、他の格納処理を用いてもよい。また、フラグメントのフラグメント長は、一般的な並列演算器のデータ処理単位に基づく、予め設定された値(例えば、4バイトや8バイトや16バイト等)を用いるようにしてもよい。
Next, processing in which the variable length data storage /
以上説明したように本実施形態によれば、可変長データのGPU上での効率的な処理を行えるようにするため、空間効率と処理効率のバランスをとることで効率的な処理を実現する。 As described above, according to the present embodiment, efficient processing is realized by balancing space efficiency and processing efficiency in order to perform efficient processing on the GPU of variable-length data.
上述した本発明の実施形態に係る並列演算器環境検知部21、可変長データ格納長決定部22、可変長データ格納・処理部23、並列演算処理部24、データ処理結果・格納・再処理部25は、データベース処理装置20のCPUやコプロセッサが記憶部に格納された動作プログラム等を読み出して実行することにより実現されてもよく、また、ハードウェアで構成されてもよい。上述した実施の形態の一部の機能のみをコンピュータプログラムにより実現することもできる。
Parallel computing unit
以上、好ましい実施の形態をあげて本発明を説明したが、本発明は必ずしも上記実施の形態に限定されるものではなく、その技術的思想の範囲内において様々に変形し実施することが出来る。本出願は、2011年3月24日に出願された日本出願特願2011−065171号を基礎とする優先権を主張し、その開示の全てをここに取り込む。 Although the present invention has been described with reference to the preferred embodiments, the present invention is not necessarily limited to the above-described embodiments, and various modifications can be made within the scope of the technical idea. This application claims the priority on the basis of Japanese application Japanese Patent Application No. 2011-065171 for which it applied on March 24, 2011, and takes in those the indications of all here.
10 データベース
20 データベース処理装置
21 並列演算器環境検知部
22 可変長データ格納長決定部
23 可変長データ格納・処理部
24 並列演算処理部
25 データ処理結果・格納・再処理部
DESCRIPTION OF
Claims (3)
前記並列演算器のデータ処理単位に応じたフラグメント長を決定し、カラムストアデータベースにおいて、可変長データを含むタプルデータをフラグメントに格納するとともに、フラグメントヘッダとして前記フラグメントのメタデータを格納するデータ格納手段と、
前記カラムストアデータベースに格納されたデータの処理に際して、前記メタデータを参照して各スレッドに割り当てるフラグメントを決定し、決定内容に基づいて各スレッドにフラグメントを割り当てて並列演算を実行させる並列演算手段と、
を備え、
前記並列演算手段は、各スレッドにおいて、割り振られたフラグメントについて文字列を検索し、検索結果としてフラグメントのバイト位置をビット反転したものを記録する手段と、前記並列演算器のデータ処理単位に応じた数の前記検索結果を各スレッドに割り当てて、各スレッドにおいて、割り当てられた前記検索結果についてビット反転を検出し、検出結果フラグをタプルレベルの検索結果として記録する手段と、を備える
ことを特徴とするデータベース処理装置。 A database processing apparatus having a parallel computing unit,
Data storage means for determining a fragment length according to a data processing unit of the parallel computing unit, storing tuple data including variable length data in the fragment in the column store database, and storing metadata of the fragment as a fragment header When,
Parallel processing means for determining a fragment to be assigned to each thread with reference to the metadata when processing the data stored in the column store database, and assigning the fragment to each thread based on the determined content and executing a parallel operation; ,
Equipped with a,
The parallel operation means searches the character string for the allocated fragment in each thread, records the result obtained by bit-inversion of the byte position of the fragment as a search result, and according to the data processing unit of the parallel operation unit Means for assigning a number of search results to each thread, detecting bit inversion for each assigned search result in each thread, and recording a detection result flag as a tuple level search result. A database processing apparatus characterized by that.
前記並列演算器のデータ処理単位に応じたフラグメント長を決定し、カラムストアデータベースにおいて、可変長データを含むタプルデータをフラグメントに格納するとともに、フラグメントヘッダとして前記フラグメントのメタデータを格納するデータ格納ステップと、
前記カラムストアデータベースに格納されたデータの処理に際して、前記メタデータを参照して各スレッドに割り当てるフラグメントを決定し、決定内容に基づいて各スレッドにフラグメントを割り当てて並列演算を実行させる並列演算ステップと、
を備え、
前記並列演算ステップは、各スレッドにおいて、割り振られたフラグメントについて文字列を検索し、検索結果としてフラグメントのバイト位置をビット反転したものを記録するステップと、前記並列演算器のデータ処理単位に応じた数の前記検索結果を各スレッドに割り当てて、各スレッドにおいて、割り当てられた前記検索結果についてビット反転を検出し、検出結果フラグをタプルレベルの検索結果として記録するステップと、を備える
ことを特徴とするデータベース処理方法。 A data processing method in a database processing apparatus having a parallel computing unit,
A data storage step of determining a fragment length according to a data processing unit of the parallel computing unit, storing tuple data including variable length data in the fragment in the column store database, and storing metadata of the fragment as a fragment header When,
A parallel operation step of determining a fragment to be assigned to each thread with reference to the metadata when processing the data stored in the column store database, and assigning the fragment to each thread based on the determined content and executing a parallel operation; ,
Equipped with a,
In the parallel operation step, in each thread, a character string is searched for the allocated fragment, and a result obtained by bit-inversion of the byte position of the fragment is recorded as a search result, and according to a data processing unit of the parallel operation unit Assigning a number of search results to each thread, detecting bit inversion for the assigned search results in each thread, and recording a detection result flag as a tuple level search result. A database processing method characterized by the above.
前記並列演算器のデータ処理単位に応じたフラグメント長を決定し、カラムストアデータベースにおいて、可変長データを含むタプルデータをフラグメントに格納するとともに、フラグメントヘッダとして前記フラグメントのメタデータを格納するデータ格納ステップ、
前記カラムストアデータベースに格納されたデータの処理に際して、前記メタデータを参照して各スレッドに割り当てるフラグメントを決定し、決定内容に基づいて各スレッドにフラグメントを割り当てて並列演算を実行させる並列演算ステップ、
を実行させ、
前記並列演算ステップは、各スレッドにおいて、割り振られたフラグメントについて文字列を検索し、検索結果としてフラグメントのバイト位置をビット反転したものを記録するステップと、前記並列演算器のデータ処理単位に応じた数の前記検索結果を各スレッドに割り当てて、各スレッドにおいて、割り当てられた前記検索結果についてビット反転を検出し、検出結果フラグをタプルレベルの検索結果として記録するステップと、を備える
ことを特徴とするプログラム。 For computers with parallel computing units,
A data storage step of determining a fragment length according to a data processing unit of the parallel computing unit, storing tuple data including variable length data in the fragment in the column store database, and storing metadata of the fragment as a fragment header ,
A parallel operation step of determining a fragment to be assigned to each thread with reference to the metadata when processing the data stored in the column store database, and assigning a fragment to each thread based on the determined content to execute a parallel operation;
Was executed,
In the parallel operation step, in each thread, a character string is searched for the allocated fragment, and a result obtained by bit-inversion of the byte position of the fragment is recorded as a search result, and according to a data processing unit of the parallel operation unit Assigning a number of search results to each thread, detecting bit inversion for the assigned search results in each thread, and recording a detection result flag as a tuple level search result. A program characterized by that.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012048079A JP5382383B2 (en) | 2011-03-24 | 2012-03-05 | Database processing apparatus, database processing method, program, and database data structure |
CN2012100740717A CN102708145A (en) | 2011-03-24 | 2012-03-20 | Database processing device, database processing method, and recording medium |
US13/426,543 US8838552B2 (en) | 2011-03-24 | 2012-03-21 | Database processing device, database processing method, and recording medium |
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011065171 | 2011-03-24 | ||
JP2011065171 | 2011-03-24 | ||
JP2012048079A JP5382383B2 (en) | 2011-03-24 | 2012-03-05 | Database processing apparatus, database processing method, program, and database data structure |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2012212427A JP2012212427A (en) | 2012-11-01 |
JP5382383B2 true JP5382383B2 (en) | 2014-01-08 |
Family
ID=46878177
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012048079A Expired - Fee Related JP5382383B2 (en) | 2011-03-24 | 2012-03-05 | Database processing apparatus, database processing method, program, and database data structure |
Country Status (3)
Country | Link |
---|---|
US (1) | US8838552B2 (en) |
JP (1) | JP5382383B2 (en) |
CN (1) | CN102708145A (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106293634A (en) * | 2015-05-13 | 2017-01-04 | 阿里巴巴集团控股有限公司 | The method and system that data process |
CN107885598A (en) * | 2017-09-26 | 2018-04-06 | 东软集团股份有限公司 | Storage device detection method, device and computer |
CN112286456B (en) * | 2020-10-27 | 2022-03-08 | 清华大学 | Storage method and device |
CN113742056B (en) * | 2020-11-19 | 2024-11-15 | 北京沃东天骏信息技术有限公司 | Data storage method, device, equipment and computer readable storage medium |
JP2023036140A (en) * | 2021-09-02 | 2023-03-14 | 株式会社日立製作所 | Business data analysis device, business data analysis system and business data analysis method |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4075704A (en) * | 1976-07-02 | 1978-02-21 | Floating Point Systems, Inc. | Floating point data processor for high speech operation |
US6343341B1 (en) * | 1999-08-20 | 2002-01-29 | Microsoft Corporation | Efficient access to variable-length data on a sequential access storage medium |
EP1552404B1 (en) * | 2002-10-15 | 2007-03-21 | Socket Communications, Inc. | Deferred tuple space programming of expansion modules |
WO2005041067A1 (en) * | 2003-10-27 | 2005-05-06 | Shinji Furusho | Distributed memory type information processing system |
US7623049B2 (en) * | 2006-06-08 | 2009-11-24 | Via Technologies, Inc. | Decoding of context adaptive variable length codes in computational core of programmable graphics processing unit |
US8037057B2 (en) * | 2009-01-07 | 2011-10-11 | Teradata Us, Inc. | Multi-column statistics usage within index selection tools |
US7868789B1 (en) * | 2009-06-28 | 2011-01-11 | Sap Ag | Dictionary-based order-preserving string compression for main memory column stores |
US8327109B2 (en) * | 2010-03-02 | 2012-12-04 | Advanced Micro Devices, Inc. | GPU support for garbage collection |
JP2012003618A (en) * | 2010-06-18 | 2012-01-05 | Sony Corp | Information processing system, information processing method and information processor |
-
2012
- 2012-03-05 JP JP2012048079A patent/JP5382383B2/en not_active Expired - Fee Related
- 2012-03-20 CN CN2012100740717A patent/CN102708145A/en active Pending
- 2012-03-21 US US13/426,543 patent/US8838552B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
US8838552B2 (en) | 2014-09-16 |
JP2012212427A (en) | 2012-11-01 |
US20120246128A1 (en) | 2012-09-27 |
CN102708145A (en) | 2012-10-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Schbath et al. | Mapping reads on a genomic sequence: an algorithmic overview and a practical comparative analysis | |
Ye et al. | Exploiting sparseness in de novo genome assembly | |
Ahmed et al. | Heterogeneous hardware/software acceleration of the BWA-MEM DNA alignment algorithm | |
Trapnell et al. | Optimizing data intensive GPGPU computations for DNA sequence alignment | |
JP5382383B2 (en) | Database processing apparatus, database processing method, program, and database data structure | |
US10453559B2 (en) | Method and system for rapid searching of genomic data and uses thereof | |
EP3120262A1 (en) | Parallel decision tree processor architecture | |
Zhang et al. | cublastp: Fine-grained parallelization of protein sequence search on cpu+ gpu | |
US20150262063A1 (en) | Decision tree processors | |
Liu et al. | GPU-accelerated BWT construction for large collection of short reads | |
Herruzo et al. | Accelerating sequence alignments based on FM-index using the Intel KNL processor | |
JP5458621B2 (en) | Method, apparatus, and program for calculating simultaneous linear equations of sparse positive symmetric matrix | |
Zhang et al. | FMAlign2: a novel fast multiple nucleotide sequence alignment method for ultralong datasets | |
Lu et al. | GSNP: a DNA single-nucleotide polymorphism detection system with GPU acceleration | |
Huang et al. | A lightweight BLASTP and its implementation on CUDA GPUs | |
Langarita et al. | Compressed sparse FM-index: Fast sequence alignment using large K-steps | |
Satish et al. | Mapreduce based parallel suffix tree construction for human genome | |
Tran et al. | Bit-parallel multiple pattern matching | |
Todd et al. | Parallel gene upstream comparison via multi-level hash tables on gpu | |
KR101075439B1 (en) | String Matching Device Based on Multi-Core Processor and Its String Matching Method | |
Chen et al. | An exact matching approach for high throughput sequencing based on bwt and gpus | |
Ames et al. | Design and optimization of a metagenomics analysis workflow for NVRAM | |
Abu-Doleh et al. | Extracting maximal exact matches on GPU | |
CN111415708A (en) | Method and system for realizing large-scale database clustering by double-buffer model | |
KR101155433B1 (en) | String matching device optimizing multi core processor and string matching method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20121128 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130125 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20130508 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130807 |
|
A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20130814 |
|
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: 20130904 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130917 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |