JP6316503B2 - Computer system, accelerator, and database processing method - Google Patents
Computer system, accelerator, and database processing method Download PDFInfo
- Publication number
- JP6316503B2 JP6316503B2 JP2017518648A JP2017518648A JP6316503B2 JP 6316503 B2 JP6316503 B2 JP 6316503B2 JP 2017518648 A JP2017518648 A JP 2017518648A JP 2017518648 A JP2017518648 A JP 2017518648A JP 6316503 B2 JP6316503 B2 JP 6316503B2
- Authority
- JP
- Japan
- Prior art keywords
- database
- processing
- aggregation
- grouping
- data
- 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
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
Description
本発明は、データ記憶部およびデータベース集約処理部を有するストレージ装置を利用したデータ処理方法、計算機システム及びストレージシステムに関する。 The present invention relates to a data processing method, a computer system, and a storage system using a storage device having a data storage unit and a database aggregation processing unit.
データベース検索処理を代表とするデータ処理システムでは、データ処理の高速化を目的として、データ処理サーバで行っていた処理の一部分を大容量記憶媒体(ストレージ)の近傍に配置したハードウェアアクセラレータへオフロードする構成が提案されている(例えば、特許文献1)。 In data processing systems such as database search processing, a part of the processing performed on the data processing server is offloaded to a hardware accelerator located near the mass storage medium (storage) for the purpose of speeding up the data processing. The structure which performs is proposed (for example, patent document 1).
従来のデータ処理サーバで行っていたフィルタリング処理や、プロジェクション処理、グルーピング処理、あるいは集約演算処理を、上記ハードウェアアクセラレータへオフロードすることで、データ処理サーバの負荷を軽減し、検索時間などの処理時間を大幅に短縮する技術が知られている(非特許文献1)。 By offloading the filtering processing, projection processing, grouping processing, or aggregation calculation processing that was performed by the conventional data processing server to the hardware accelerator, the load on the data processing server is reduced and processing such as search time is performed. A technique for significantly reducing the time is known (Non-Patent Document 1).
さらに、データ処理サーバでは、ジョイン処理や、マージソート処理もハードウェアアクセラレータにオフロードすることが検討されている(特許文献2)。データベースの処理を高速化する技術としては、機能レベルでのパイプライン化や、機能の並列化を行うことが知られている(特許文献1、2)。
Furthermore, in the data processing server, it has been studied to offload join processing and merge sort processing to a hardware accelerator (Patent Document 2). As a technique for speeding up database processing, it is known to perform pipeline processing at the function level and parallelization of functions (
しかしながら、上記非特許文献1では、データベースの処理単位が“行”であり、処理単位が小さくデータベースの処理性能を向上させることが困難であった。さらに、非特許文献1においては、データベースを格納したSSD(Solid State Drive)からハードウェアアクセラレータに直接データを入力している為、データベースの処理性能が、SSDの読み出し性能により処理の制約を受けてしまい、ハードウェアアクセラレータへのデータ供給の速度がボトルネックになるという課題があった。
However, in Non-Patent
他方、上述のグルーピング処理では、ハッシュ演算を用いる例が知られている。ハッシュ演算を用いてグルーピングをした際には、異なるグループが同じハッシュ値を持ち、ハッシュ値の衝突(シノニム)が発生することがある。 On the other hand, in the above grouping process, an example using a hash operation is known. When grouping is performed using a hash operation, different groups may have the same hash value, and hash value collision (synonym) may occur.
シノニムが発生した場合、ハードウェアアクセラレータでハッシュ値の再計算を行うと次の行(データ)の計算が待たされるため、ハードウェアアクセラレータの処理性能が低下する、という問題があった。 When a synonym occurs, if the hardware accelerator recalculates the hash value, the calculation of the next line (data) is awaited, and the processing performance of the hardware accelerator is reduced.
そこで、本発明は上記問題点に鑑みてなされたもので、サーバと連携してデータベースの集約演算の性能を向上させるハードウェアを提供することを目的とする。 Therefore, the present invention has been made in view of the above problems, and an object of the present invention is to provide hardware that improves the performance of database aggregation operations in cooperation with a server.
本発明は、プロセッサと、メモリと、を含むサーバと、前記サーバに接続されてデータベース処理を行うアクセラレータと、前記アクセラレータに接続されてデータベースを格納するストレージ装置と、を有する計算機システムであって、前記サーバは、クエリを受け付けてデータベースコマンドを生成し、処理対象のデータベースの範囲と、前記データベースの範囲を分割してひとつのデータベースコマンドで処理する単位サイズを決定して、前記アクセラレータに指令するサーバコマンド処理部と、前記アクセラレータの出力を集計して前記クエリに対する処理結果を生成する再集約部と、を有し、前記アクセラレータは、前記サーバコマンド処理部からの指令に基づいて、前記単位サイズで前記ストレージ装置からデータベースの処理対象データを読み込み、前記処理対象データを所定の処理単位に分轄して、前記所定の処理単位ごとにグルーピング処理と、スタッキング処理と、集約処理とを含むデータベース処理を実行して集約結果を出力するデータベース処理部を有し、前記再集約部は、前記処理対象のデータベースの範囲についての集約結果を前記アクセラレータから受け付けると、当該集約結果を集計して前記クエリに対する処理結果として生成する。 The present invention is a computer system having a server including a processor, a memory, an accelerator connected to the server for database processing, and a storage device connected to the accelerator for storing a database. The server receives a query, generates a database command, determines a database range to be processed and a unit size to be processed by one database command by dividing the database range, and instructs the accelerator A command processing unit, and a re-aggregation unit that aggregates the output of the accelerator and generates a processing result for the query, and the accelerator has the unit size based on a command from the server command processing unit. Database processing from the storage device The processing target data is divided into predetermined processing units, database processing including grouping processing, stacking processing, and aggregation processing is executed for each predetermined processing unit, and an aggregation result is output. Having a database processing unit, the re-aggregation unit, when receiving an aggregation result for the range of the database to be processed from the accelerator, aggregates the aggregation result and generates it as a processing result for the query.
本発明によれば、サーバとアクセラレータが協調してデータベース処理を実行することにより、サーバの負荷軽減とアクセラレータのデータベース処理性能を向上させることができる。また、アクセラレータは、データベースコマンド単位で集約処理を実行し、サーバは、複数のデータベースコマンドに対する集約結果の再集約処理を行うことで、データベース処理システムの処理性能を向上することができる。 According to the present invention, the server and the accelerator execute database processing in cooperation, thereby reducing the load on the server and improving the database processing performance of the accelerator. In addition, the accelerator executes the aggregation process in units of database commands, and the server can improve the processing performance of the database processing system by performing the aggregation process of the aggregation results for a plurality of database commands.
以下、本発明の実施形態について添付図面を用いて説明する。 Embodiments of the present invention will be described below with reference to the accompanying drawings.
図1は、本発明に係るデータベース処理機能を有するFPGA(Field Programable Grid Array)2及びデータベース(以下DB)30を格納するストレージ装置3と、データベース管理システム(DataBase Manaagement System、以下DBMSとする)20が稼働するデータベースサーバ(以下、DBサーバ)1と、を含むデータベースシステムの一例を示すブロック図である。
1 shows a
DBサーバ1は、演算を実行するホストCPU11と、プログラムやデータを格納するホストメモリ12と、PCIスイッチ4を介してハードウェアアクセラレータとしてのFPGA2及びストレージ装置3に接続されるホストインターフェース13と、を含む。また、ホストインターフェース13は、PCIあるいはPCIexpressに準拠したインターフェースである。
The
DBサーバ1では、ホストメモリ12にロードされたDBMS20がホストCPU11によって実行され、図示しないクライアント計算機からのアクセス要求(クエリ)に応じて、FPGA2にデータベースコマンドを発行する。
In the
ストレージ装置3に搭載されたFPGA2は、SRAM200に加えてCPU126を含み、データベースコマンドに基づいてデータベース処理(フィルタ処理、グルーピング処理、プロジェクション処理、集約処理等)を実行するデータベース処理部250を有するハードウェアアクセラレータとして機能する。なお、FPGA2とストレージ装置3が独立して構成されて、それぞれがPCIスイッチ4に接続される構成であっても良い。
The
ストレージ装置3は、DB30を格納する記憶媒体としてSSD137とDRAM136とを有し、これらの記憶媒体を制御する制御部129は、SSDインターフェース130と、DRAMインターフェース131の2つが含まれる。
The
ストレージ装置3とFPGA2は、SSDインターフェース130及びDRAMインターフェース131で接続される。
The
本実施例1のストレージ装置3では、不揮発性記憶媒体のSSD137にDB30を格納しておき、制御部129は、処理対象のDB30の範囲についてSSD137からDRAM136に読み込んでおく。
In the
そして、FPGA2は、SSD137に比して読み出し速度が高速なDRAM136から所定の処理サイズ(例えば、数メガバイト)ずつデータを読み込むことで、SSD137の読み出し速度の制限を受けることなく、DRAM136からDB30の処理対象となるデータを高速に読み出すことができる。
The
ただし、本発明では、DB30の処理対象の部分のサイズが、FPGA2が演算処理を行う単位よりも大である。すなわち、DB30の処理対象の部分を一旦DRAM136へ読み込んだ後、DRAM136から所定のサイズずつFPGA2へデータを入力する。
However, in the present invention, the size of the processing target portion of the
<DBMS>
次に、DBMS20について説明する。DBサーバ1で稼働するDBMS20には、結果格納領域115と、メッセージ格納領域116と、シノニム格納領域117と、再集約モジュール118と、グルーピング及び集約モジュール120と、コマンド生成部103と、コマンド格納部123と、要求コマンドキュー121と、完了コマンドキュー122とを含む。グルーピング及び集約モジュール120には、FPGA2の集約処理でシノニムが発生したDB30のグルーピングを再度行うための、グルーピングと集約のモジュールを有する。<DBMS>
Next, the
DBMS20は、数TBまたは数GBのDB30を数MB毎に分割して、FPGA2にDB30の集約処理を指令する。このため、DBサーバ1は、DB30のうち集約処理の対象となるデータの範囲と、集約処理の内容からデータベースコマンドを生成する。
The
DBMS20は、クライアント計算機から受信したアクセス要求からコマンド生成部103でデータベースコマンドを生成して、コマンド格納部123に格納する。また、コマンド生成部103はコマンド格納部123に格納したデータベースコマンドの格納位置を示すコマンドポインタを要求コマンドキュー121に設定する。DBMS20は、要求コマンドキュー121に入力されたコマンドポインタに対応するデータベースコマンドを順次FPGA2へ投入する。これらのコマンド生成部103、コマンド格納部123、要求コマンドキュー121がサーバコマンド処理モジュール1030を構成する。
The
DBMS20は、FPGA2から受信したデータベースコマンドの集約結果を受け付けて、結果格納領域115に格納する。DBMS20は、FPGA2が実行したデータベースコマンドで集約したグループの数と、シノニムが発生した数と、演算オーバーフローの情報等をメッセージとして受け付けて、メッセージ格納領域116に格納する。DBMS20は、FPGA2のデータベースコマンドの実行でシノニムが発生した情報(シノニム114)を受け付けた場合には、シノニム格納領域117に格納する。また、DBMS20は、FPGA2から実行完了の通知を受信したデータベースコマンドを、完了コマンドキュー122へ格納する。
The
<FPGA>
図2は、FPGA2の構成の一例を示すブロック図である。FPGA2は、データベースコマンドに基づいてデータベース処理を制御するCPU126と、データベース処理を行うハードウェアの機能ブロックを有する。<FPGA>
FIG. 2 is a block diagram illustrating an example of the configuration of the
FPGA2のデータベース処理部250を構成する機能ブロックは、DB30のうち処理対象データをDRAM136から読み込むデータ読み込み部(以下、DATA I/F)105と、処理対象データについてフィルタ処理を実施するフィルタ処理部(以下、Filter)106−0、106−1と、処理対象データについてフィルタ処理を実施するフィルタ処理部(以下、Filter)106−0、106−1と、処理対象データについて射影処理を実施するプロジェクション処理部(以下、Projection)107−0、107−1と、フィルタ処理と射影処理の結果についてデータのグルーピング(グループ化)を行うグルーピング処理部(以下、Grouping)108−0、108−1と、フィルタ処理と射影処理の結果について演算を行うスタック処理部(以下、Stacking)109−0、109−1と、グループ化及び演算の結果を集約する集約処理部(以下、Aggregation)111、とを含む。
The functional blocks constituting the
FPGA2のCPU126は、コマンドキュー124からコマンドポインタを取得し、DMA(図示省略)を起動してDBサーバ1のコマンド格納部123からコマンドレジスタ104へデータベースコマンドを転送する。
The
次に、FPGA2のCPU126は、SSD137からDRAM136にデータベースコマンドで指定されたDB30の処理対象部分のデータを転送する。DB30の処理単位であるページデータがDRAM136に格納されると、CPU126はレジスタ104に集約処理開始の信号を書き込む。
Next, the
次に、CPU126は、DRAMインターフェース131からDATAインターフェース105にDRAM136のデータ転送を開始する。DRAMインターフェース131は、データインターフェース105の、4ブロックに分割されたSRAM D0〜D3(201〜204)に、DB30のページデータをそれぞれ格納する。なお、SRAM D0〜D3(201〜204)は、図1に示したFPGA2のSRAM200の所定の領域を割り当てたものである。なお、以下で説明する他のSRAM P0、P1、G0についてもSRAM200の所定の領域を割り当てたものである。
Next, the
DATAインターフェース105に格納されたDB30のページデータは、フィルタ処理とプロジェクション処理を行うパイプライン処理へページ単位で投入される。このページ単位のパイプライン処理は、Filter#0(106−0)とProjection#0(107−0)のパイプラインと、Filter#1(106−1)と、Projection#1(107−1)の2段のパイプラインで構成した例を示す。なお、Filter#0(106−0)と、Filter#1(106−1)の総称はFilter106として示す。他の構成要素も同様である。
The page data of the
ページ単位のパイプライン処理の結果は、グルーピング処理とスタッキング処理の並列処理へ投入される。この並列処理は、Projection#0(107−0)が出力する行データをGrouping#0(108−0)とStacking#0(109−0)で並列処理し、Projection#1(107−1)が出力する行データをGrouping#1(108−1)とStacking#1(109−1)で並列処理する。 The result of page-by-page pipeline processing is input to parallel processing of grouping processing and stacking processing. In this parallel processing, row data output by Projection # 0 (107-0) is processed in parallel by Grouping # 0 (108-0) and Stacking # 0 (109-0), and Projection # 1 (107-1) The row data to be output are processed in parallel by Grouping # 1 (108-1) and Stacking # 1 (109-1).
Arbiter110は、Grouping#0(108−0)とStacking#0(109−0)の結果と、Grouping#1(108−1)とStacking#1(109−1)の結果と、を順次受け付けて、Aggregation(111)に入力する。
The
Aggregation111は、グルーピング処理とスタッキング処理の並列処理の結果を入力としてデータベースコマンドで設定された集約処理を実行し、集約結果112と、メッセージ113と、シノニム114と、完了コマンド(1コマンド処理完了通知)138とを出力する。これら、集約結果112と、メッセージ113と、シノニム114及び完了コマンド138の出力は、PCIスイッチ4を介してDBサーバ1に送信される。
The
DBサーバ1のDBMS20は、後述するように、完了コマンドキュー122に格納された完了コマンド138と、結果格納領域115の集約結果と、シノニム格納領域117を用いて、再集約モジュール118による再集約と、シノニムが発生したデータについてグルーピング及び集約モジュール120によるグルーピングと集約処理を行う。DBサーバ1は、この処理を複数回(データベースサイズ/一度のコマンドでFPGA2が処理するデータサイズ=ページ単位)まで繰り返して、全てのDB30を処理する。
The
なお、グルーピング及び集約モジュール120は、シノニム格納領域117にシノニムの情報が書き込まれたときに処理を実行し、グルーピング及び集約処理を行ったデータを再集約モジュール118へ出力する。
The grouping /
再集約モジュール118は、結果格納領域115の集約結果とグルーピング及び集約モジュール120の出力に基づいて、グルーピング化列毎に集約結果を集計してクエリの結果を応答する。なお、グルーピング化列は、後述するように、処理対象データの複数の列を行方向で結合し、ハッシュ値の演算対象となるデータである。
The
図3は、DB30に対するクエリと処理内容の一例を示す図である。図3の例では、DBサーバ1が受信するクエリの一例としてとしてDB30のベンチマークTPC―H Query3を示している。
FIG. 3 is a diagram illustrating an example of a query and processing content for the
図3のQueryに出現するselect文がProjection処理301であり、Queryにより取り出すデータ列を記している。図2のFPGA2において、Projection(プロジェクション処理部)#0(107−0)及びProjection#1(107−1)がProjection処理301を行う。
A select statement appearing in the query of FIG. 3 is the
図3のQueryに出現するWhere文がFiltering処理302であり、Where文の条件に一致した行を抽出する。図2のFPGA2において、Filter(フィルタ処理部)#0(106−0)及びFilter#1(106−1)がFiltering処理302を行う。
The WHERE statement that appears in the query of FIG. 3 is the
図3のQueryに出現するGroup by文がGrouping処理303であり、Groupingで指定した列によりグルーピングを行う。図2のFPGA2において、Grouping(グルーピング処理部)#0(108−0)及びGrouping#1(108−1)がGrouping処理303を行う。
A Group by statement appearing in the query shown in FIG. 3 is a
図3のQueryに出現するSum文がAggregation処理305であり、集約演算を行う。図2のFPGA2において、Aggregation111が行う集約演算処理305には、合計、最大値、最小値、カウント等が含まれる。
The Sum statement that appears in the query of FIG. 3 is the aggregation process 305, and performs an aggregation operation. In the
図3のQueryに出現するSumの()内がStacking処理306であり、列に対する数値演算を行う。図2のFPGA2において、Stacking(スタッキング処理部)#0(109−0)及びStacking#1(109−1)がStacking処理306を行う。Stacking#0(109−0)、Stacking#1(109−1)が行う数値演算には、加算、減算、乗算が含まれる。尚、行の並べ替えを行うOrder byがordering処理304であり、この処理はDBサーバ1で実行するものとする。
The inside of () of the Sum that appears in the query of FIG. In the
図4は、FPGA2に対するデータベースコマンドの一例を示す図である。DB30の格納先のSSD137の情報としては、読み出し開始アドレス401と、読み出すデータサイズ402、とが含まれる。また、図示はしないが、ひとつのコマンドでFPGA2が処理するDB30のサイズ(単位サイズ:8MB)を指定しても良い。
FIG. 4 is a diagram illustrating an example of a database command for the
Filtering106の設定情報としては、DB30におけるフィルタ対象列403と、フィルタ条件404とが含まれる。Projection107の設定情報としては、取り出し列405が含まれる。Grouping108の設定情報としては、グルーピング化列406が含まれる。
The setting information of the filtering 106 includes a
Stacking109の設定情報としては、演算対象列407と、演算子408と、直値409とが含まれる。Aggregation(集約処理部)111の設定情報としては、演算子410を含むが含まれる。
The setting information of Stacking 109 includes a
図5は、サーバコマンド処理モジュール1030の処理と、FPGA2の集約処理(DATA I/F(105)〜Aggregation111)の関係を示すタイムチャートである。
FIG. 5 is a time chart showing the relationship between the processing of the server
サーバコマンド処理モジュール1030は、DBサーバ1が受信したクエリから、FPGA2が処理する複数(または1以上)のデータベースコマンド(501〜504)を生成し、データベースコマンドをコマンド格納部123に格納する。サーバコマンド処理モジュール1030は、データベースコマンドの格納が完了すると、要求コマンドキュー121にコマンドを格納した領域のポインタを書込み、FPGA2のCPU126に対してドアベルレジスタ(図示省略)を介してデータベースコマンドをスタックしたことを通知(図中の時刻505〜508)する。
The server
CPU126は、図示しないDMAを起動して、要求コマンドキュー121のポインタが指し示すコマンド格納部123のデータベースコマンドを、DBサーバ1からレジスタ104に転送する。
The
FPGA2では、上記データベースコマンドの取得と並行して、CPU126がSSD137からDRAM136にDB30の処理対象データを転送する。CPU126は、DB30処理単位のページデータがDRAM136に格納されると、レジスタ104に集約処理開始の信号を書き込み、DRAM136からDATA I/F105にデータ転送を開始し、4面あるSRAM0〜3にDB30のページ単位でデータ(ページデータ)を格納する。
In the
DATA I/F105に書き込まれた複数のページデータは、順次Filter106に投入され、Projection107、Grouping108、Stacking109、Aggregation111の各処理部で演算が行われる。
A plurality of page data written in the DATA I /
FPGA2の各演算が完了すると、CPU126は、DBサーバ1に対して完了コマンド138を発行して、1コマンド処理の完了を通知(図中512、513、514)する。そして、1コマンド処理の完了通知を受信したDBサーバ1は、当該完了通知が指し示すデータベースコマンドを完了コマンドキュー122に登録する。
When each operation of the
DBサーバ1の再集約モジュールは、1コマンド単位の完了通知(512、513、514)を受け取り、結果格納領域115のグルーピング化列を用いて、グループハッシュテーブル119を生成し、グルーピング処理と再集約処理を後述するように行う。
The re-aggregation module of the
図6は、DB30のページフォーマットの一例を示す。DB30はページ単位で構成され、ページデータの先頭にページヘッダ601が格納される。ページヘッダ601に続いて行データ602が1行目〜M行目まで順に格納されており、ページデータの終端から順番に行の先頭アドレスを指し示す行ポインタ603が格納される。
FIG. 6 shows an example of the page format of the
FPGA2のFilter106と、Projection107は、行ポインタ603と図4に示したデータベースコマンドの設定情報(403、405)を用いて、必要な列データを取得する。
The Filter 106 and the Projection 107 of the
図7は、FPGA2のデータベース処理部250の回路構成の詳細な例を示すブロック図である。DRAM136から読み出されたDB30のページデータは、DATA I/F105を介して、SRAM201〜204(SRAM D0〜D3)にページ単位で格納される。
FIG. 7 is a block diagram illustrating a detailed example of the circuit configuration of the
SRAM201は一組のSRAMで構成されて、同一のデータを2つのSRAM(例えばD1_0、D1−1)で保持し、並列処理を行うFilter106と、Projection107にそれぞれ同一のデータを供給する。他の、SRAM202〜204も同様である。
The
SRAM201〜204からFilter106とProjection107に供給されるデータは、セレクタ707、708、709、710によって選択される。Filter106の処理結果は、Projection107へ入力される。ここで、Filter106は、レジスタ104に設定されたデータベースコマンド(図4)のうちフィルタ対象列403とフィルタ条件404のフィルタ情報に基づいて処理を実行する。同様に、Projection107では、レジスタ104に設定されたプロジェクション情報に基づいて処理を実行する。
Data supplied from the
Projection107により処理された結果は、DB30の1ページ単位で、SRAM P0(205)と、SRAM P1(206)に格納される。SRAM P0(205)、SRAM P1(206)のProjection結果を用いて、Grouping108−0、108−1と、Stacking109−0、109−1がそれぞれ並列処理を実行する。
The results processed by the Projection 107 are stored in the SRAM P0 (205) and the SRAM P1 (206) in units of one page in the
Grouping108−0、108−1では、データベースコマンドのグルーピング化列406と、ハッシュテーブル728_0、728_1と、グルーピング列テーブル729_0、729_1を用いて演算が行われる。ハッシュテーブル728には、グルーピング対象のデータのハッシュ値が格納される。グルーピング列テーブル729には、グループ化された列データが格納される。これらのハッシュテーブル728及びグルーピング列テーブル729は、FPGA2のSRAM200内の所定の領域に設定される。
In the Grouping 108-0 and 108-1, the calculation is performed using the
Stacking109−0、109−1では、データベースコマンドの演算対象列407、演算子408、直値409に基づいて演算が行われる。
In Stacking 109-0 and 109-1, the calculation is performed based on the
これらのGrouping108とStacking109の出力は、Arbiter110により順次受け付けられ、SRAM G0(207)に書き込まれる。SRAM G0(207)の内容は、Aggregation111の集約演算の結果によって書き換えられる。
The outputs of these Grouping 108 and Stacking 109 are sequentially received by the
Aggregation111は、1コマンドのデータ処理が完了すると、集約結果112と、メッセージ113と、シノニム114とをDBサーバ1に出力する。メッセージ113には、集約したグループの数と、シノニムが発生した数と、演算オーバーフローの情報が格納されている。
When the data processing for one command is completed, the
図8は、FPGA2で行われるパイプライン処理のタイミングチャートを示している。時刻T0(801)においては、DATA I/F105がSRAM D0にページ1(図中P−1)のデータを書き込む。
FIG. 8 shows a timing chart of pipeline processing performed in the
時刻T1(802)において、DATA I/F105がSRAM D1にページ2(P−2)のデータを書き込み、Filter106−0、106−1がSRAM D0のデータを用いてFiltering処理を行う。
At time T1 (802), the DATA I /
時刻T2(803)においては、DATA I/F105がSRAM D2にページ3(P−3)のデータを書き込み、Filter106−0、106−1がSRAM D1のデータ(P−2)を用いてFiltering処理を行い、Projection107−0、107−1がSRAM D0(P−1)のデータを用いてProjeciton処理を行う。Filtering処理とProjeciton処理は、ページデータの行単位で実行される。
At time T2 (803), the DATA I /
また、プロジェクション処理の1行目のデータがSRAM P0に書き込まれる時刻T21においては、Grouping108−0、108−1と、Stacking109−0、109−1が開始される。これにより、Projection処理と並行して、SRAM P0に書き込まれたプロジェクション処理の結果に基づいてGrouping処理とStacking処理が並列して実行される。なお、他のGrouping処理とStacking処理も、SRAM P0、P1に1行のデータが書き込まれるまで待機する。 Further, at time T21 when data in the first row of the projection processing is written into the SRAM P0, Grouping 108-0 and 108-1 and Stacking 109-0 and 109-1 are started. Thereby, in parallel with the projecting process, the grouping process and the stacking process are executed in parallel based on the result of the projection process written in the SRAM P0. Other Grouping processing and Stacking processing also wait until one row of data is written in the SRAMs P0 and P1.
SRAM P0、P1にデータが書き込まれると、Aggregation111がAggregation処理を行い、SRAM G0に集約処理の結果を書き込む。
When data is written to the SRAMs P0 and P1, the
時刻T3(804)においては、DATA I/F105がSRAM D3にページ4(P−4)のデータを書き込み、Filter(106−0、106−1)がSRAM D2のデータ(P−3)を用いてFiltering処理を行う。また、Projection107−0、107−1がSRAM D1のデータ(P−2)を用いてProjeciton処理を行う。
At time T3 (804), the DATA I /
Grouping108−0、108−1と、Stacking109−0、109−1は、Projection処理と並行して、グルーピング処理とスタッキング処理を実行する。そして、グルーピング処理の結果と、スタッキング処理の結果に基づいてAggregation111が集約処理を行い、SRAM G0に集約結果を書き込む。以上のようなタイミングで、FPGA2ではパイプライン処理が実行される。
The Grouping 108-0 and 108-1, and the Stacking 109-0 and 109-1 execute a grouping process and a stacking process in parallel with the Projection process. Then, the
図9は、コマンド単位で、各処理における出力データ量の変化を示す図である。一回のデータベースコマンドで処理するDB30の処理対象データを図中符号901で示す。
FIG. 9 is a diagram illustrating a change in output data amount in each process in units of commands. The processing target data of the
このDB30の処理対象データ901をFiltering処理すると、フィルタ条件に一致した行データが抽出されて、図中2つの行データ902が処理結果として出力される。
When the filtering processing is performed on the
このフィルタリング処理の過程で残る行データ902のデータ量は、処理対象データ901のデータ量の約1/10である。行データ902を入力としてProjection処理を行い、Grouping処理に必要なGrouping列903と、Stacking処理に必要なStacking列904のデータを抽出する。
The data amount of the
このプロジェクション処理の過程で算出される列データ(903、904)のデータ量は、Filtering処理後の行データ902のデータ量の約1/10である。Grouping列903と、Stacking904のデータを用いて、Grouping処理と、Stacking処理を行うとデータ905が得られる。この処理過程で残るデータ905のデータ量は、Projection処理後の列データ(903、904)のデータ量の約1/10である。Grouping処理とStacking処理で得られたデータ905をAggregation処理し、最終的な集約結果906が得られる。
The data amount of the column data (903, 904) calculated in the process of the projection processing is about 1/10 of the data amount of the
本実施例のFPGA2では、入力する処理対象データ901に対して、出力する集約結果906のデータ量は約1/1000となる。
In the
図10は、FPGA2で行われる集約演算ローカル処理とDBサーバ1で行われる集約演算グローバル処理の関係を示す図である。
FIG. 10 is a diagram illustrating a relationship between the aggregate calculation local process performed by the
DBサーバ1は、サーバコマンド処理モジュール103により、SSD137に格納されている2TBサイズのDB30のデータ1000のうち、1回のデータベースコマンドで処理する処理対象データのサイズを8MBに決定する。そして、DBサーバ1は、1つのデータベースコマンドでFPGA2が8MBの処理対象データ901を処理するようにデータベースコマンド内で指定する(1004)。
The
FPGA2は、1つのデータベースコマンドを受け付けて、8MBに分割したDB30の処理対象データ901を処理する。FPGA2は、8MBの処理対象データ901について8KBのページ単位で処理を行う(1005)。
The
FPGA2は、1つのデータベースコマンドで8MB分の処理対象データ901について、ページ単位(8KB)でDRAM136から処理対象データ901を読み込んでグルーピング処理とスタッキング処理を実行する。そして、FPGA2はルーピング処理とスタッキング処理の結果に基づいて集約処理を実施する(1006)。
The
FPGA2は集約処理が完了すると、後述する図21のように、集約結果のグループの順序が不同な状態で、グルーピング化列と集約結果をDBサーバ1に返信する(1008)。
When the aggregation process is completed, the
グルーピング化列と集約結果を受け取ったDBサーバ1は、再集約モジュール118がグルーピング化列に基づいてグループハッシュテーブル119を生成し、ハッシュ値の順にデータを並べて、全てのデータベースコマンドに対するグローバル(全ての処理対象データ)の集約処理を実行する。
Upon receiving the grouping column and the aggregation result, the
図11は、グルーピング化列のグルーピングの手法の一例を示す図である。FPGA2のGrouping108−0、108−1ではグルーピング処理が行われる。このグルーピング処理では、1行の行データに含まれるグルーピング対象の列をグルーピング化列として連結しグルーピング列テーブル729に格納される。 FIG. 11 is a diagram illustrating an example of a grouping method for grouping columns. Grouping processing is performed in the FPGA 108 Grouping 108-0 and 108-1. In this grouping process, columns to be grouped included in one row of data are linked as grouped columns and stored in the grouping column table 729.
図示の例では、1行の行データの、グルーピング化列1、2、3(1101)を連結してグルーピング化データ1102を生成し、グルーピング列テーブル729に格納する。なお、グルーピング化データ1102の各行は、ハッシュ値の演算対象であるグルーピング化列のデータである。
In the illustrated example,
そして、Grouping108ではグルーピング化データ1102のグルーピング化列ごとにハッシュ値とグループIDを演算して、各グループを識別する。なお、Grouping108で演算されたハッシュ値とグループIDは、ハッシュテーブル728に格納される。
Then, the Grouping 108 calculates a hash value and a group ID for each grouping column of the
図22は、FPGA2内のハッシュテーブル728の一例を示す図である。ハッシュテーブル728は、SRAM200のアドレス2301をハッシュ値とし、1ビットのデータ2302をフラグビットとし、10ビットのデータ2303をハッシュ値に対応するグループIDとする例を示す。
FIG. 22 is a diagram illustrating an example of the hash table 728 in the
ハッシュテーブル728には、グルーピング処理の結果が格納され、グループID(2303)が割り当てられたアドレス2301のフラグビット(2302)には「1」(0b1)が設定される。なお、グループID(2303)は、新たなグループが出現する度に追加される。
The hash table 728 stores the result of the grouping process, and “1” (0b1) is set in the flag bit (2302) of the
図23は、FPGA2内のグルーピング列テーブル729の一例を示す図である。グルーピング列テーブル729は、SRAM200のアドレス2401(10ビット)をグループIDとし、64ビットのデータ2402をグルーピング化列とする例を示す。グルーピング列テーブル729は、グループID(2401)に対応したグルーピング化列(2402)が保持される。
FIG. 23 is a diagram illustrating an example of the grouping column table 729 in the
なお、本実施例1では、256Kbyteのグルーピング化列まで対応可能な例を示し、FPGA2には、例えば、8Byte幅のSRAMを32個搭載する。ハッシュ値とグループID(2401)の対応関係は、上述のハッシュテーブル728で定義される。また、本実施例1では、グループIDの最大値は1024となり、この最大値がハッシュ値を割り当て可能な数となる。
In the first embodiment, an example capable of supporting up to 256 Kbyte grouping columns is shown, and for example, 32 8-byte wide SRAMs are mounted in the
なお、ハッシュ値とグループIDの算出については、上記に限定されるものではなく、公知または周知の手法を適用すればよく、処理対象データ901のハッシュ値と、データが所属するグループIDが決定されれば良い。
The calculation of the hash value and the group ID is not limited to the above, and a publicly known or known method may be applied, and the hash value of the
図12は、グルーピング処理の一例を示すフローチャートである。この処理は、SRAM P0、P1に行の演算結果が書き込まれたときにFPGA2のGrouping108が起動する。
FIG. 12 is a flowchart illustrating an example of the grouping process. In this process, the Grouping 108 of the
Grouping108は、グルーピング化列(2402)のハッシュ値を算出(1201)する。Grouping108は、算出されたハッシュ値がハッシュテーブル728に登録されているか否かを判定する(1202)。 The Grouping 108 calculates (1201) the hash value of the grouping column (2402). The Grouping 108 determines whether or not the calculated hash value is registered in the hash table 728 (1202).
Grouping108は、算出されたハッシュ値がハッシュテーブル728に登録されていなければ、ステップ1205へ進む。ステップ1205では、Grouping108が、算出されたハッシュ値をハッシュテーブル728へ登録する。この場合、シノニムは発生していないのでステップ1206に進んで、Arbiter110からSRAM G0(207)に書き込まれる。
If the calculated hash value is not registered in the hash table 728, the grouping 108 proceeds to step 1205. In
一方、算出されたハッシュ値が既にハッシュテーブル728に登録されている場合は、ステップ1203へ進む。ステップ1203では、Grouping108が、ハッシュテーブル728において、同一のハッシュ値となったアドレス2301に対応するグルーピング列テーブル729のデータ2402(グルーピング化列)を取得する。Grouping108は算出されたハッシュ値の元のグルーピング化列と、取得したグルーピング化列が異なれば、ステップ1204へ進んでシノニム(ハッシュ値の衝突)と判定する。
On the other hand, if the calculated hash value is already registered in the hash table 728, the process proceeds to step 1203. In
シノニムの場合は、Aggregation111での集約処理は行われず、シノニムの情報が後述するようにシノニム114としてDBサーバ1へ送信される。なお、シノニムの情報としては、ハッシュ値やグルーピング化列を用いることができる。
In the case of a synonym, the aggregation processing in the
一方、非シノニムの場合は、SRAM G0(207)に書き込まれたGrouping108の結果と、後述のStacking109の結果に基づいてAggregation111で集約処理が行われる。
On the other hand, in the case of a non-synonym, aggregation processing is performed in the
図13は、スタッキング演算における、固定小数点のデータ格納方法の一例を示す図である。Stacking109が、固定小数点を容易に演算できるように、DB30への格納形式を整数としている。
FIG. 13 is a diagram illustrating an example of a fixed-point data storage method in the stacking calculation. The storage format in the
図13においては、スタッキング演算用の列は2つあり、N行目の第一列には、0.08を100倍して8としたデータ1031を格納する。N行目の第二列には、0.5を10倍して5としたデータ1302を格納する。
In FIG. 13, there are two columns for stacking calculation, and data 1031 is stored in the first column of the Nth row by multiplying 0.08 by 100. In the second column of the Nth row,
Stacking109は、固定小数点を意識することなく、整数として演算を行い、DBサーバ1が、結果格納領域115に格納された集約結果の値の桁をもとに戻して最終的な集約結果とする。なお、固定小数点の位置についてはDBMS20で予め設定されたものである。
The Stacking 109 performs an operation as an integer without regard to the fixed decimal point, and the
図14は、スタッキング演算用レジスタ及びSRAMの構成を示す図である。この構成は、Stacking109−0、109−1のハードウェア構成を示す。 FIG. 14 is a diagram illustrating a configuration of the stacking calculation register and the SRAM. This configuration shows the hardware configuration of Stacking 109-0 and 109-1.
スタッキング処理部を構成するStacking109は、後述するように、スタッキング演算は、値と演算子を積み上げて、演算子が出現すると直近の2つの値に対する演算を実行する。そこで、値を保持する回路の構成を2つのレジスタREG0(1401)、REG1(1402)と1つのSRAM(1403)とする。なお、SRAM(1403)は、図1に示したSRAM200内の所定の領域を示す。
As will be described later, the Stacking 109 constituting the stacking processing unit accumulates values and operators, and executes an operation on the two most recent values when the operators appear. Therefore, the configuration of the circuit that holds the values is assumed to be two registers REG0 (1401) and REG1 (1402) and one SRAM (1403). The SRAM (1403) indicates a predetermined area in the
図15は、FPGA2のStacking109で実行されるスタッキング演算の一例を示すフローチャートである。
FIG. 15 is a flowchart illustrating an example of the stacking calculation executed in the Stacking 109 of the
Stacking109−0、109−1は、Projection107がSRAM P0、P1(205、206)に演算結果を書き込むと処理を開始する(1501)。 The Stacking 109-0 and 109-1 start processing when the Projection 107 writes the operation result in the SRAMs P0 and P1 (205 and 206) (1501).
スタッキング演算を開始(1501)すると、Stacking109はレジスタ104からデータベースコマンドからスタック演算コマンドを1つ受け取り(1502)、コマンドの内容が数値か演算子であるかを判定する(1503)。 When the stacking operation is started (1501), the Stacking 109 receives one stack operation command from the database command from the register 104 (1502), and determines whether the content of the command is a numerical value or an operator (1503).
ステップ1503の判定において、コマンドの内容がProjection107の出力、もしくは、直値であれば、数値の格納先を判定するステップ1504に進む。ステップ1504において、Stacking109は、図14のスタックレジスタ1401、1402にデータが格納済みであれば、SRAM1403にREG0(1401)のデータを書込、REG1(1402)の値をREG0(1401)に書き込み、ステップ1503の入力データをREG1(1402)に書き込む。
If it is determined in
ステップ1504の判定において、スタックレジスタ1401、1402にデータが格納済みでなければ、ステップ1509へ進んで、Stacking109は、REG1(1402)のデータをREG0(1401)に書き込み、ステップ1503の入力データをREG1(1402)に書き込む。
If it is determined in
ステップ1503の判定において、スタック演算コマンドの内容が演算子であれば、Stacking109は、REG0(1401)、REG1(1402)の出力をスタック演算コマンドによって演算し、演算結果をREG1(1402)に書き戻す。
If it is determined in
さらに、SRAM(1403)にデータが存在すれば、Stacking109はSRAM(1403)からREG0(1401)にデータを書き込む。データの書き込みが完了すると、Stacking109は、レジスタ104を参照して、次のスタック演算コマンドが存在するか否かの判定を行う(1505)。
Furthermore, if data exists in the SRAM (1403), the Stacking 109 writes data from the SRAM (1403) to the REG0 (1401). When the data writing is completed, the Stacking 109 refers to the
ステップ1505において、スタック演算コマンドの内容が終了コマンドでなければ、Stacking109は、ステップ1502に戻って上記処理を繰り返す。一方、ステップ1505において、次のスタック演算コマンドが終了コマンドであれば、Stacking109はスタッキング演算を終了(1506)する。
In
上記処理によって、プロジェクション処理の結果がSRAM205、206へ書き込まれると、Stacking109によってスタッキング処理が実行されて、SRAM G0(207)へ書き込まれる。
When the result of the projection processing is written to the
図16Aは、スタッキング演算の一例を示す図である。また、図16Bは、スタッキング演算で使用されるコマンドの一例を示す図である。図16Aは、横軸を時刻としてスタッキング処理部109へ入力されるスタック演算コマンド1602、1605〜1608と、レジスタ1401、1402の状態を示す。スタック演算コマンド1605〜1608の内容は、図16Bのコード1612に対応する。図16Bのスタック演算コマンド1601は、NO1610と、Stacking109で実行するコマンド1611と、コード1612と、コマンドの意味1613から構成される。
FIG. 16A is a diagram illustrating an example of a stacking calculation. FIG. 16B is a diagram illustrating an example of commands used in the stacking calculation. FIG. 16A shows the states of the stack operation commands 1602 and 1605 to 1608 and the
図16Bで示すように、各コマンド1611には、コード1612が定められており、Stacking109は、コマンド1611に対応するコード1612を受け取り、スタッキング演算を実行する。
As shown in FIG. 16B, a
図16Aの時刻T0において、Stacking109は、コマンドとして、0X81(1605)のProjection列1の値1を受け取り、スタックレジスタREG1(1402)にProjection列1の値を格納する。ここで、スタック演算コマンド1605のコード1612が「0x81」で、図16Bの意味1613は、「スタックにプロジェクタ出力列1番を積み上げる」である。
At time T0 in FIG. 16A, the Stacking 109 receives the
すなわち、最初のスタック演算コマンドは、Projection107の出力列1番の値をレジスタREG1(1402)に格納する。なお、(64’d1)の「64’」はデータのビット数が64ビットで、データがd1であることを示す。また、図16Bのスタックは、スタックレジスタREG0(1401)、スタックレジスタREG1(1402)を示す。
That is, the first stack operation command stores the value of the
図16Aの時刻T1において、スタック演算コマンドとして、Stacking109は、0X10(1606)の直値0の値を受け取り、スタックレジスタREG1(1402)の値をREG0(1401)に書き込み、直値0の値をREG1(1402)に書き込む。
At time T1 in FIG. 16A, as a stack operation command, Stacking 109 receives the value of
なお、直値0の値は別途レジスタに設定しており、ここでは「2」とする。時刻T2において、Stacking109は、スタック演算コマンドとして、0X01(1607)の和演算子を受け取り、スタックレジスタ1401、1402の値を足して、REG1(1402)に書き込む。
The value of
時刻T3において、Stacking109は、コマンドとして0X7F(1608)のスタック演算終了を受け取り、最終的なスタック演算結果を出力する。 At time T3, the Stacking 109 receives the stack operation end of 0X7F (1608) as a command, and outputs the final stack operation result.
以上のように、Stacking109は、スタックレジスタ1401、1402を用いてスタック演算コマンドに応じた演算を実行する。 As described above, the Stacking 109 executes an operation according to the stack operation command using the stack registers 1401 and 1402.
図17は、Aggregation111の出力である集約結果112の一例を示す図である。集約結果112には、グルーピング化列0(1701)と、集約結果0(1702)と、集約結果1(1703)のように、グルーピング化列と、集約結果の順番に格納され、グループを示すグルーピング化列の数だけ同じフォーマットでデータが格納されている。集約結果112において、データが存在しない箇所1704は所定の領域までゼロの値で埋めている。
FIG. 17 is a diagram illustrating an example of the
図17の例では、1つのグルーピング化列に対してFPGA2が2つの集約結果1702、1703を出力する例を示したが、これに限定されるものではなく、集約結果の数はFPGA2の設定に応じて変更することができる。
In the example of FIG. 17, the example in which the
図18は、FPGA2で行われる集約処理の一例を示すタイミングチャートである。FPGA2では、Filter106によるフィルタリング処理と,Projection107によるプロジェクション処理はページ(8KB)単位で行っている。
FIG. 18 is a timing chart illustrating an example of aggregation processing performed in the
時刻T0からFPGAでは、フィルタリング処理FLT_0(1801)が実行される。フィルタリング処理が完了すると、フィルタリング処理FLT_0(1801)の結果を用いて、時刻T1ではプロジェクション処理PRJ_0(1802)が開始される。 From the time T0 to the FPGA, the filtering process FLT_0 (1801) is executed. When the filtering process is completed, the projection process PRJ_0 (1802) is started at time T1, using the result of the filtering process FLT_0 (1801).
プロジェクション処理PRJ_0の結果を用いて、Grouping108とStacking109では、グルーピング処理GRP_0(1803)とスタッキング処理STK_0(1804)が並列して実行される。なお、グルーピング処理GRP_0(1803)とスタッキング処理STK_0(1804)は、プロジェクション処理PRJ_0(1802)で行データが出力された時刻T1Aから開始される。 Using the result of the projection process PRJ_0, in the Grouping 108 and the Stacking 109, the grouping process GRP_0 (1803) and the stacking process STK_0 (1804) are executed in parallel. The grouping process GRP_0 (1803) and the stacking process STK_0 (1804) are started from time T1A when the row data is output in the projection process PRJ_0 (1802).
グルーピング処理GRP_0(1803)でシノニムが発生した場合には、グルーピング処理の結果と共に集約処理へシノニムの情報を通知する。 When a synonym occurs in the grouping process GRP_0 (1803), the synonym information is notified to the aggregation process together with the result of the grouping process.
グルーピング処理GRP_0(1803)とスタッキング処理STK_0(1804)が完了するとAggrergation111で集約処理A_0(1805)が実行される。なお、Aggregation111は、シノニムの情報がある場合にはシノニム処理S_0(1806)が行われる。シノニム処理S_0(1806)では、後述するシノニム114へグルーピング化列とスタック列を書き込む処理である。
When the grouping process GRP_0 (1803) and the stacking process STK_0 (1804) are completed, the aggregation process A_0 (1805) is executed in the
FPGA2では、処理対象データ901の最終ページの処理である、フィルタリング処理FLT_N(1807)と、プロジェクション処理PRJ_N(1808)と、グルーピング処理GRP_N(1809)と、スタッキング処理STK_N(1810)と、集約処理A_N(1811)と、シノニムS_N(1812)が終了すると、図17に示した集約結果112とシノニム114及びメッセージ113をDBサーバ1に転送する。また、FPGA2は、完了したデータベースコマンドについて実行完了をDBサーバ1へ通知する。なお、メッセージ113には、FPGA2が実行したデータベースコマンドで集約したグループの数と、シノニムが発生した数と、演算オーバーフローの情報等が含まれる。
In the
DBサーバ1は、FPGA2から受信した集約結果112を、結果格納領域115に格納し、受信したシノニム114をシノニム格納領域117に格納し、メッセージ113をメッセージ格納領域116に格納する。
The
なお、シノニムが多発した場合などではシノニム114のデータが埋まった時点で、DBサーバ1のシノニム格納領域117にシノニム114を転送してもよい。
When synonyms occur frequently, the
<FPGAとサーバの連携処理>
次に、FPGA2のグルーピング処理でシノニムが発生した場合の集約処理について説明する。図12において、シノニムと判定(1204)され、同じハッシュ値が異なるグルーピング化列に割り当てられた場合には、後述する図19のように、グルーピング化列とスタック列をDBサーバ1に転送し、DBサーバ1がグルーピング及び集約モジュール120において、グルーピングと集約演算を行う。<Cooperation between FPGA and server>
Next, an aggregation process when a synonym occurs in the grouping process of
図19は、Aggregation111の出力である、シノニム114のフォーマットの一例を示す図である。
FIG. 19 is a diagram illustrating an example of the format of the
グルーピング処理でシノニム結果を格納するシノニム114は、グルーピング化列0(2201)、スタック列0(2202)、スタック列1(2203)のように、グルーピング化列、スタック列の順番に格納され、グループ(グルーピング化列)の数だけ同じフォーマットでデータが格納されている。シノニム114において、データが存在しない箇所2204は所定の領域までゼロで埋められる(2204)。
The
グルーピング化列2201には、シノニムが発生したグルーピング化データ1102が格納される。スタック列には、当該グループのスタッキング処理の結果が格納される。
The
図20は、DBサーバ1で行われる処理の一例を示すフローチャートである。DBサーバ1のDBMS20は、図示しない計算機から受信したクエリに基づいてデータベースコマンドを生成してFPGA2に処理を依頼し、FPGA2は所定のページ単位でデータベース処理を行った集約結果をDBサーバ1に応答する。DBサーバ1のDBMS20は、ページ単位でグループ化された複数の集約結果を受信し、データベースコマンドで指定した全てのデータについて集約結果を受信すると集計してクエリの送信元の計算機(図示省略)に返信する。
FIG. 20 is a flowchart illustrating an example of processing performed in the
まず、DBMS20は、他の計算機(図示省略)からDB30に対するクエリを受け付ける(1901)。DBMS20は、受け付けたクエリに基づいて、図4で示したように、ストレージ装置3のDB30に対するデータベースコマンドを生成し、FPGA2にデータベースコマンドを発行する(1902)。すなわち、DBMS20は、クエリの処理対象となるDB30の処理範囲と、当該DB30の処理範囲を分割してFPGA2がひとつのデータベースコマンドで処理する単位サイズ(例えば、8MB)を決定して、各データベース処理の内容を決定してFPGA2に指令する。
First, the
DBMS20は、データベースコマンドに対する完了コマンドをFPGA2から受信したか否かを判定する(1903)。受信していなければ完了コマンドの受信を待機する。一方、完了コマンドを受信した場合には、ステップ1904へ進んで、データベースコマンドで指定したクエリの処理対象となる範囲の全てのデータについて完了コマンドを受信したか否かを判定する。
The
FPGA2は、所定のページ単位でデータベース処理の結果を応答するので、DBMS20は、データベースコマンドに対応する処理対象データが全て処理されるまで待機する。全てのデータについてデータベース処理が完了した場合にはステップ1905へ進み、そうでない場合にはステップ1903へ戻って完了コマンドを待つ。
Since the
ステップ1905では、DBMS20が結果格納領域115に格納されたコマンド単位の集約結果を取得する。結果格納領域115には図19で示した集約結果112がコマンド単位で格納されている。
In
DBMS20は、ステップ1905で読み込んだ集約結果からグルーピング化列のハッシュ値を演算してグループハッシュテーブル119を生成する。ハッシュ値の生成はFPGA2のGrouping108と同様であり、図17に示した集約結果112のグルーピング化列のハッシュ値を算出する。そして、DBMS20は、グルーピング化列のグループIDとハッシュ値を対応付けてグループハッシュテーブル119に格納する。なお、ハッシュ値の演算とグループIDの決定についてはFPGA2のGrouping108と同様の処理を行えば良い。
The
図24は、グループハッシュテーブル119の一例を示す図である。グループハッシュテーブル119は、図22に示したFPGA2のハッシュテーブル728と同様の構成である。
FIG. 24 is a diagram illustrating an example of the group hash table 119. The group hash table 119 has the same configuration as the hash table 728 of the
グループハッシュテーブル119は、ハッシュ値1191と、当該ハッシュ値が使用されているか否かを示すフラグ1192と、ハッシュ値に対応するグループID1193とからひとつのエントリが構成される。
The group hash table 119 includes one entry including a
ハッシュ値1191は、ステップ1905で読み込んだ集約結果のグルーピング化列1701(図17)から算出したハッシュ値を格納する。フラグ1192は、当該エントリのハッシュ値1191が使用されていれば“1”が設定され、使用されていなければ“0”が設定される。
The
次に、図20のステップ1907では、DBMS20がグループハッシュテーブル119のハッシュ値1191をソートする。DBMS20は、ソート後のグループハッシュテーブル119のグループID1193に従って、集約結果112のグルーピング化列1701の順序を並び替えて、各ページの集約結果についてグルーピング化列と集約結果の関係を揃える。
Next, in
ステップ1908では、DBMS20が上記ステップ1907までの処理でグルーピング化列と集約結果の関係を揃えたデータの集約結果を集計する。この処理により、コマンド単位で集約されて、グルーピング化列の順序が不同である集約結果が、クエリで指定されたDB30の処理対象範囲で集計されてクエリに対する処理結果が生成される。なお、この時点では、クエリに対する処理結果が、シノニム114を含まない集計結果である。
In
次に、DBMS20は、シノニム格納領域117のデータを読み込んで(1909)、FPGA2のデータベース処理でシノニムが発生したか否かを判定する(1910)。シノニム格納領域117にシノニム114が書き込まれていた場合には、ステップ1911へ進む。一方、シノニム格納領域117の情報が書き込まれていない場合には、ステップ1913へ進んで、DBMS20が集計結果をクエリの送信元に応答して処理を終了する。
Next, the
ステップ1911では、DBMS20がシノニム114のデータを再度グルーピング処理を行う。すなわち、DBMS20は、シノニム格納領域117に格納されているシノニム114のグルーピング化列(2201)を取得してハッシュ値を演算する。DBMS20は、グループハッシュテーブル119のハッシュ値1191から演算結果のハッシュ値に一致するエントリを検索する。DBMS20は、該当するエントリがなければ、当該ハッシュ値を新たなハッシュ値1191としてグループハッシュテーブル119に追加する。
In
ステップ1912では、DBMS20がハッシュ値を演算したシノニム114のデータに含まれるスタック列(2202、2203)を、ハッシュ値が一致または追加したグループハッシュテーブル119のグループID1193に対応する集計結果に加えて再計算する。そして、DBMS20は、ステップ1913で、シノニム114のデータで再計算された集計結果をクエリの送信元に応答して処理を終了する。
In
以上の処理により、FPGA2で所定の処理単位(ページ単位)で集約されたDB30の処理結果は、シノニム114を加味して集計されてクエリの送信元に送信される。また、上記ステップ1905〜1908の処理がDBMS20の再集約モジュール118の処理に相当し、ステップ1909〜1912の処理が、グルーピング及び集約モジュール120の処理に相当する。
Through the above processing, the processing results of the
図21は、DBサーバ1による集約結果112の再集約処理の一例を示す図である。この処理は、上記図20のステップ1905〜1908の処理に相当する。図示の例では、FPGA2に指令したデータベースコマンドが、コマンド1〜コマンドNで構成され、N個の集約結果2101−1〜2101−NがDBサーバ1に出力された例を示す。
FIG. 21 is a diagram illustrating an example of re-aggregation processing of the
FPGA2で処理されたコマンド1の集約結果が2101−1であり、コマンドNの集約結果が2101−Nである。集約結果2101−1と2101−Nではグルーピング化列の出現順が異なる。このため、DBサーバ1の再集約モジュール118では、これらの結果を用いてそのまま再集約を行うことが出来ない。
The aggregation result of the
そこで、DBサーバ1は、FPGA2から受信したN個のコマンドの集約結果に対して、グループハッシュテーブル119を生成し、グルーピングと並べ替えを行い、新たな集約結果2102−1〜2102−Nを演算する。
Therefore, the
集約結果2102−1と2102−Nにおいては、グルーピング化列の出現順が同一であり、DBサーバ1は、各コマンドの集約結果の合計や最大値を行方向で演算することが可能である。DBサーバ1の再集約モジュール118は、集約結果2102−1、2102−Nを用いて再集約演算を行い、最終的に図示の集約結果2103を演算する。
In the aggregation results 2102-1 and 2102-N, the order of appearance of the grouping columns is the same, and the
以上のように、実施例1によれば、DBサーバ1がDB30を分割して、数MB単位でハードウェアアクセラレータであるFPGA2に処理を依頼すると、DRAM136のバンド幅がSSD137のバンド幅よりも大きいことから、SSD137からのDB30の読み出しと、DRAM136からのデータ読み出しを並列して行える。制御部129が処理対象のDB30のデータをSSD137からDRAM136に複製した後には、FPGA2は、SSD137よりも読み出し速度の速いDRAM136から所定の処理サイズ(例えば、ページ)のデータを入力することで、処理性能を向上させることができる。
As described above, according to the first embodiment, when the
そして、FPGA2は、データベースコマンド単位で集約処理を実行し、DBサーバ1は、複数のデータベースコマンドに対する集約結果の再集約処理を行い、DBサーバ1とFPGA2が協調してデータベース処理を実行することにより、データベース処理システムの処理性能を向上することができる。
Then, the
また、FPGA2では、フィルタリング処理、プロジェクション処理でのデータベース処理単位を、DB30のページ単位とすることで、パイプライン処理を実現してハードウェアアクセラレータの性能をさらに向上させることが可能となる。
Further, in the
本実施例2においては、シノニムの発生頻度が高い場合におけるDBサーバ1の処理について説明する。本実施例では、シノニムの発生頻度が所定の閾値を超えた場合に、DBサーバ1が、FPGA2がひとつのコマンドで処理するデータサイズを縮小し、グルーピング処理においてシノニムの発生を抑制するものである。その他の構成は、前記実施例1と同様である。
In the second embodiment, processing of the
なお、シノニムの発生頻度は、例えば、シノニム114に含まれるグルーピング化列の数や、シノニム114に含まれるグルーピング化列の数と処理対象データ901の比率などを用いることができる。
As the synonym occurrence frequency, for example, the number of grouping columns included in the
図25は、シノニム多発時にFPGA2が処理するデータサイズを縮小する処理を示す図である。1004〜1008までについては、前記実施例1の図10と同様であり、DBサーバ1は、FPGA2がひとつのコマンドで処理するデータサイズを8MBに設定している。
FIG. 25 is a diagram showing processing for reducing the data size processed by the
Grouping108がグルーピングを行う際に、シノニムの発生頻度が高く、再集約モジュール118を実行するDBサーバ1の負荷が増大して、計算機システムとしてのDB処理性能が低下する。
When the grouping 108 performs grouping, the frequency of synonyms is high, the load on the
そこで、DBサーバ1は、シノニムの発生頻度が高いと判定した場合には、FPGA2が処理する1コマンドあたりのDB30の処理単位のサイズを縮小させる。サイズ縮小前においては、1コマンドあたりのデータサイズは8MB(1004)であるが、サイズ縮小後においては、1コマンドあたりのデータサイズは4MB(2006)に低減される。
Therefore, if the
FPGA2は、4MB(2006)のデータを1ページ単位(8KB)でDRAM136から読み込み、前記実施例1と同様に、グルーピング処理や、スタッキング処理(数値演算)や、集約演算等を実行する。
The
FPGA2は、1コマンドあたり8MB分の集約処理が完了すると、前記実施例1と同様に、グループ順不同で、グルーピング化列と集約結果をDBサーバ1に返信する。グルーピング化列と集約結果を受け取ったDBサーバ1は、前記実施例1と同様にして、再集約モジュール118において、グルーピング化列を用いてグループハッシュテーブル119を生成し、ハッシュ値の順に集約結果を並べ替えて、全てのコマンドに対するグローバルの集約処理を実行する。
When the aggregation process for 8 MB per command is completed, the
これにより、本実施例2では前記実施例1の効果に加えて、シノニム114が発生する頻度を低減して、DBサーバ1の処理性能の低下を抑制することができる。
Thereby, in the second embodiment, in addition to the effects of the first embodiment, the frequency at which the
<まとめ>
前記実施例1、2では、FPGA2を有するストレージ装置3が1つの例を示したが、PCIスイッチ4に複数のストレージ装置3を接続することができる。また、FPGA2とストレージ装置3を独立させても良く、各FPGA2には、複数のストレージ装置3を接続することができる。<Summary>
In the first and second embodiments, one
また、ストレージ装置3は、DB30を格納するSSD137と、SSD137から一旦データを読み込んでからFPGA2にデータを読み込ませるDRAM136で構成した例を示したがこれに限定されるものではない。ストレージ装置3は、例えば、不揮発性半導体記憶媒体で構成されてDB30を格納する第1の記憶部と、第1の記憶部よりも読み出し速度が高速な半導体記憶媒体で構成されてFPGA2にデータを読み込ませる第2の記憶部とを有すれば良い。
In addition, although the
なお、本発明は上記した実施例に限定されるものではなく、様々な変形例が含まれる。例えば、上記した実施例は本発明を分かりやすく説明するために詳細に記載したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、ある実施例の構成の一部を他の実施例の構成に置き換えることが可能であり、また、ある実施例の構成に他の実施例の構成を加えることも可能である。また、各実施例の構成の一部について、他の構成の追加、削除、又は置換のいずれもが、単独で、又は組み合わせても適用可能である。 In addition, this invention is not limited to an above-described Example, Various modifications are included. For example, the above-described embodiments are described in detail for easy understanding of the present invention, and are not necessarily limited to those having all the configurations described. Further, a part of the configuration of one embodiment can be replaced with the configuration of another embodiment, and the configuration of another embodiment can be added to the configuration of one embodiment. In addition, any of the additions, deletions, or substitutions of other configurations can be applied to a part of the configuration of each embodiment, either alone or in combination.
また、上記の各構成、機能、処理部、及び処理手段等は、それらの一部又は全部を、例えば集積回路で設計する等によりハードウェアで実現してもよい。また、上記の各構成、及び機能等は、プロセッサがそれぞれの機能を実現するプログラムを解釈し、実行することによりソフトウェアで実現してもよい。各機能を実現するプログラム、テーブル、ファイル等の情報は、メモリや、ハードディスク、SSD(Solid State Drive)等の記録装置、または、ICカード、SDカード、DVD等の記録媒体に置くことができる。 Each of the above-described configurations, functions, processing units, processing means, and the like may be realized by hardware by designing a part or all of them with, for example, an integrated circuit. In addition, each of the above-described configurations, functions, and the like may be realized by software by the processor interpreting and executing a program that realizes each function. Information such as programs, tables, and files for realizing each function can be stored in a memory, a recording device such as a hard disk or SSD (Solid State Drive), or a recording medium such as an IC card, SD card, or DVD.
また、制御線や情報線は説明上必要と考えられるものを示しており、製品上必ずしも全ての制御線や情報線を示しているとは限らない。実際には殆ど全ての構成が相互に接続されていると考えてもよい。 Further, the control lines and information lines indicate what is considered necessary for the explanation, and not all the control lines and information lines on the product are necessarily shown. Actually, it may be considered that almost all the components are connected to each other.
Claims (15)
前記サーバに接続されてデータベース処理を行うアクセラレータと、
前記アクセラレータに接続されてデータベースを格納するストレージ装置と、を有する計算機システムであって、
前記サーバは、
クエリを受け付けてデータベースコマンドを生成し、処理対象のデータベースの範囲と、前記データベースの範囲を分割してひとつのデータベースコマンドで処理する単位サイズを決定して、前記アクセラレータに指令するサーバコマンド処理部と、
前記アクセラレータの出力を集計して前記クエリに対する処理結果を生成する再集約部と、を有し、
前記アクセラレータは、
前記サーバコマンド処理部からの指令に基づいて、前記単位サイズで前記ストレージ装置からデータベースの処理対象データを読み込み、前記処理対象データを所定の処理単位に分轄して、前記所定の処理単位ごとにグルーピング処理と、スタッキング処理と、集約処理とを含むデータベース処理を実行して集約結果を出力するデータベース処理部を有し、
前記再集約部は、
前記処理対象のデータベースの範囲についての集約結果を前記アクセラレータから受け付けると、当該集約結果を集計して前記クエリに対する処理結果として生成することを特徴とする計算機システム。 A server including a processor and memory;
An accelerator connected to the server for database processing;
A storage system connected to the accelerator for storing a database, and a computer system comprising:
The server
A server command processing unit that receives a query, generates a database command, determines a database range to be processed, a unit size to be processed by one database command by dividing the database range, and instructs the accelerator; ,
A re-aggregation unit that aggregates the output of the accelerator and generates a processing result for the query,
The accelerator is
Based on a command from the server command processing unit, the processing target data of the database is read from the storage device in the unit size, the processing target data is divided into predetermined processing units, and grouped for each predetermined processing unit. A database processing unit that executes database processing including processing, stacking processing, and aggregation processing and outputs an aggregation result;
The re-aggregation unit
When a result of aggregation for the range of the database to be processed is received from the accelerator, the aggregation result is aggregated and generated as a processing result for the query.
前記データベース処理部は、
前記グルーピング処理と、前記スタッキング処理とを前記所定の処理単位で並列して実行することを特徴とする計算機システム。 The computer system according to claim 1,
The database processing unit
A computer system, wherein the grouping process and the stacking process are executed in parallel in the predetermined processing unit.
前記データベース処理部は、
前記所定の処理単位のデータ列についてグルーピング処理を行うグルーピング処理部を有し、
前記グルーピング処理部は、
前記データ列のデータについてハッシュ値とグループ情報を算出し、前記ハッシュ値とグループ情報を対にしてハッシュ情報に格納し、前記ハッシュ情報に同一のハッシュ値で異なるグループ情報がある場合にはハッシュ値が衝突したことを検知することを特徴とする計算機システム。 The computer system according to claim 1,
The database processing unit
A grouping processing unit that performs a grouping process on the data string of the predetermined processing unit;
The grouping processing unit
A hash value and group information are calculated for the data in the data string, the hash value and the group information are paired and stored in hash information, and if the hash information includes different group information with the same hash value, the hash value A computer system characterized by detecting a collision.
前記データベース処理部は、
前記グルーピング処理部が、前記ハッシュ値の衝突を検知したときには、前記グループ情報と、前記スタッキング処理の結果である数値を出力することを特徴とする計算機システム。 The computer system according to claim 3,
The database processing unit
When the grouping processing unit detects a collision of the hash values, the computer system outputs the group information and a numerical value that is a result of the stacking processing.
前記ストレージ装置は、
前記データベースを格納する第1の記憶部と、
前記第1の記憶部よりも読み出し速度が高速な半導体記憶媒体で構成されて前記アクセラレータにデータを読み込ませる第2の記憶部と、を有し、
前記アクセラレータは、
前記処理対象のデータベースの範囲について前記第1の記憶部から前記第2の記憶部へコピーさせ、前記第2の記憶部から前記単位サイズ毎に読み込むことを特徴とする計算機システム。 The computer system according to claim 1,
The storage device
A first storage unit for storing the database;
A second storage unit configured by a semiconductor storage medium having a higher reading speed than the first storage unit and causing the accelerator to read data;
The accelerator is
A computer system, wherein the range of the database to be processed is copied from the first storage unit to the second storage unit and read from the second storage unit for each unit size.
前記データベース処理部は、
前記グルーピング処理で、前記所定の処理単位のデータ列のデータについてハッシュ値とグループ情報を算出し、
前記スタッキング処理で、前記所定の処理単位のデータ列のデータについて数値を算出し、
前記集約処理で、前記グループ情報毎に前記数値を集約した数値情報を算出し、前記集約結果に前記グループ情報と、数値情報を含み、
前記再集約部は、
前記グループ情報からハッシュ値を算出してグループハッシュ情報に格納し、当該ハッシュ値に基づいて前記処理対象のデータベースの範囲についての集約結果を並び替えてから前記数値情報を集計して、前記クエリに対する処理結果を生成することを特徴とする計算機システム。 The computer system according to claim 1,
The database processing unit
In the grouping process, a hash value and group information are calculated for data in the data string of the predetermined processing unit,
In the stacking process, a numerical value is calculated for data in the data string of the predetermined processing unit,
In the aggregation process, numerical information obtained by aggregating the numerical values for each group information is calculated, and the group information and the numerical information are included in the aggregation result,
The re-aggregation unit
A hash value is calculated from the group information, stored in the group hash information, the aggregation result for the range of the database to be processed is rearranged based on the hash value, and then the numerical information is aggregated, to the query A computer system characterized by generating a processing result.
前記データベース処理部は、
前記グルーピング処理で、前記ハッシュ値とグループ情報を対にしてハッシュ情報に格納し、前記ハッシュ情報に同一のハッシュ値で異なるグループ情報がある場合にはハッシュ値が衝突したことを検知すると、前記グループ情報と、前記スタッキング処理の結果である数値を出力し、
前記再集約部は、
前記グループハッシュ情報を参照して、前記ハッシュ値が衝突した前記グループ情報と前記スタッキング処理の数値を再度集約して、前記クエリに対する処理結果を再計算することを特徴とする計算機システム。 A computer system according to claim 6, wherein
The database processing unit
In the grouping process, when the hash value and the group information are paired and stored in the hash information, and the hash information includes different group information with the same hash value, it is detected that the hash value collides, Output information and numerical values that are the result of the stacking process,
The re-aggregation unit
A computer system that refers to the group hash information, re-aggregates the group information with which the hash values collide, and the numerical value of the stacking process, and recalculates the processing result for the query.
前記サーバコマンド処理部は、
前記再集約部が受け付けたハッシュ値の衝突の発生頻度が予め設定した閾値を超えた場合には、前記データベースの範囲を分割してひとつのデータベースコマンドで処理する単位サイズを縮小することを特徴とする計算機システム。 The computer system according to claim 3,
The server command processing unit
When the frequency of occurrence of hash value collisions received by the re-aggregation unit exceeds a preset threshold, the database range is divided to reduce the unit size processed by one database command. Computer system to do.
処理対象のデータベースの範囲と、前記データベースの範囲を分割してひとつのデータベースコマンドで処理する単位サイズと、を受け付けて、前記単位サイズで前記ストレージ装置からデータベースの処理対象データを読み込み、前記処理対象データを所定の処理単位に分轄して、前記所定の処理単位ごとにグルーピング処理と、スタッキング処理と、集約処理とを含むデータベース処理を実行して集約結果を出力するデータベース処理部を有し、
前記データベース処理部は、
前記グルーピング処理と、前記スタッキング処理とを前記所定の処理単位で並列して実行することを特徴とするアクセラレータ。 An accelerator connected to a storage device for storing a database and receiving a database command to perform database processing,
Receiving a database range to be processed and a unit size to be processed by a single database command by dividing the database range, and reading the database processing target data from the storage device in the unit size, the processing target A database processing unit that divides data into predetermined processing units, executes database processing including grouping processing, stacking processing, and aggregation processing for each predetermined processing unit and outputs an aggregation result;
The database processing unit
An accelerator, wherein the grouping process and the stacking process are executed in parallel in the predetermined processing unit.
前記データベース処理部は、
前記所定の処理単位のデータ列についてグルーピング処理を行うグルーピング処理部を有し、
前記グルーピング処理部は、
前記データ列のデータについてハッシュ値とグループ情報を算出し、前記ハッシュ値とグループ情報を対にしてハッシュ情報に格納し、前記ハッシュ情報に同一のハッシュ値で異なるグループ情報がある場合にはハッシュ値が衝突したことを検知することを特徴とするアクセラレータ。 The accelerator according to claim 9, comprising:
The database processing unit
A grouping processing unit that performs a grouping process on the data string of the predetermined processing unit;
The grouping processing unit
A hash value and group information are calculated for the data in the data string, the hash value and the group information are paired and stored in hash information, and if the hash information includes different group information with the same hash value, the hash value Accelerator characterized by detecting the collision.
前記データベース処理部は、
前記グルーピング処理部が、前記ハッシュ値の衝突を検知したときには、前記グループ情報と、前記スタッキング処理の結果である数値を出力することを特徴とするアクセラレータ。 The accelerator according to claim 10, wherein
The database processing unit
When the grouping processing unit detects a collision of the hash values, the grouping processing unit outputs the group information and a numerical value that is a result of the stacking processing.
前記ストレージ装置は、
前記データベースを格納する第1の記憶部と、
前記第1の記憶部よりも読み出し速度が高速な半導体記憶媒体で構成されて前記アクセラレータにデータを読み込ませる第2の記憶部と、を有し、
前記データベース処理部は、
前記処理対象のデータベースの範囲について前記第1の記憶部から前記第2の記憶部へコピーさせ、前記第2の記憶部から前記単位サイズ毎に読み込むことを特徴とするアクセラレータ。 The accelerator according to claim 9, comprising:
The storage device
A first storage unit for storing the database;
A second storage unit configured by a semiconductor storage medium having a higher reading speed than the first storage unit and causing the accelerator to read data;
The database processing unit
An accelerator, wherein the range of the database to be processed is copied from the first storage unit to the second storage unit and read from the second storage unit for each unit size.
前記サーバが、クエリを受け付けてデータベースを生成し、処理対象のデータベースの範囲と、前記データベースの範囲を分割してひとつのデータベースコマンドで処理する単位サイズを決定して、前記アクセラレータに指令する第1のステップと、
前記アクセラレータが、前記サーバからの前記指令に基づいて、前記単位サイズで前記ストレージ装置からデータベースの処理対象データを読み込み、前記処理対象データを所定の処理単位に分轄して、前記所定の処理単位ごとにグルーピング処理と、スタッキング処理と、集約処理とを含むデータベース処理を実行して集約結果を出力する第2のステップと、
前記サーバが、前記アクセラレータの出力を集計して前記クエリに対する処理結果を生成する第3のステップと、を含み、
前記第3のステップは、
前記処理対象のデータベースの範囲についての集約結果を前記アクセラレータから受け付けると、当該集約結果を集計して前記クエリに対する処理結果として生成することを特徴とするデータベースの処理方法。 A server including a processor and a memory is a database processing method for causing an accelerator connected to the server to perform database processing to process a database of a storage device connected to the accelerator,
The server receives a query, generates a database, determines a database range to be processed and a unit size to be processed by one database command by dividing the database range, and instructs the accelerator And the steps
Based on the command from the server, the accelerator reads data to be processed in the database from the storage device in the unit size, and divides the data to be processed into predetermined processing units, for each predetermined processing unit. A second step of executing a database process including a grouping process, a stacking process, and an aggregation process to output an aggregation result;
A third step in which the server aggregates the output of the accelerator and generates a processing result for the query;
The third step includes
A database processing method, wherein when an aggregation result for the range of the database to be processed is received from the accelerator, the aggregation result is aggregated and generated as a processing result for the query.
前記第2のステップは、
前記グルーピング処理で、前記所定の処理単位のデータ列のデータについてハッシュ値とグループ情報を算出し、前記スタッキング処理で、前記所定の処理単位のデータ列のデータについて数値を算出し、前記集約処理で、前記グループ情報毎に前記数値を集約した数値情報を算出し、前記集約結果に前記グループ情報と、数値情報を含み、
前記第3のステップは、
前記グループ情報からハッシュ値を算出してグループハッシュ情報に格納し、当該ハッシュ値に基づいて前記処理対象のデータベースの範囲についての集約結果を並び替えてから前記数値情報を集計して、前記クエリに対する処理結果を生成することを特徴とするデータベースの処理方法。 The database processing method according to claim 13, comprising:
The second step includes
In the grouping process, a hash value and group information are calculated for the data string of the predetermined processing unit, and in the stacking process, a numerical value is calculated for the data string of the predetermined processing unit. , Calculating numerical information obtained by aggregating the numerical values for each group information, and including the group information and numerical information in the aggregation result,
The third step includes
A hash value is calculated from the group information, stored in the group hash information, the aggregation result for the range of the database to be processed is rearranged based on the hash value, and then the numerical information is aggregated, to the query A database processing method characterized by generating a processing result.
前記第2のステップは、
前記グルーピング処理で、前記ハッシュ値とグループ情報を対にしてハッシュ情報に格納し、前記ハッシュ情報に同一のハッシュ値で異なるグループ情報がある場合にはハッシュ値が衝突したことを検知すると、前記グループ情報と、前記スタッキング処理の結果である数値を出力し、
前記第3のステップは、
前記グループハッシュ情報を参照して、前記ハッシュ値が衝突した前記グループ情報と前記スタッキング処理の数値を再度集約して、前記クエリに対する処理結果を再計算することを特徴とするデータベースの処理方法。 The database processing method according to claim 14, comprising:
The second step includes
In the grouping process, when the hash value and the group information are paired and stored in the hash information, and the hash information includes different group information with the same hash value, it is detected that the hash value collides, Output information and numerical values that are the result of the stacking process,
The third step includes
A database processing method characterized by referring to the group hash information, re-aggregating the group information with which the hash values collide with numerical values of the stacking process, and recalculating the processing result for the query.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2015/064212 WO2016185542A1 (en) | 2015-05-18 | 2015-05-18 | Computer system, accelerator, and database processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
JPWO2016185542A1 JPWO2016185542A1 (en) | 2017-08-31 |
JP6316503B2 true JP6316503B2 (en) | 2018-04-25 |
Family
ID=57319665
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017518648A Expired - Fee Related JP6316503B2 (en) | 2015-05-18 | 2015-05-18 | Computer system, accelerator, and database processing method |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP6316503B2 (en) |
WO (1) | WO2016185542A1 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018142592A1 (en) * | 2017-02-03 | 2018-08-09 | 株式会社日立製作所 | Information processing system and information processing method |
US10417733B2 (en) * | 2017-05-24 | 2019-09-17 | Samsung Electronics Co., Ltd. | System and method for machine learning with NVMe-of ethernet SSD chassis with embedded GPU in SSD form factor |
US20180373760A1 (en) * | 2017-06-23 | 2018-12-27 | Xilinx, Inc. | Parallel compute offload to database accelerator |
US10963460B2 (en) * | 2018-12-06 | 2021-03-30 | Xilinx, Inc. | Integrated circuits and methods to accelerate data queries |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10803066B2 (en) * | 2010-06-29 | 2020-10-13 | Teradata Us, Inc. | Methods and systems for hardware acceleration of database operations and queries for a versioned database based on multiple hardware accelerators |
JP5561425B2 (en) * | 2011-02-28 | 2014-07-30 | 日本電気株式会社 | Storage system |
JP5891842B2 (en) * | 2012-02-24 | 2016-03-23 | 日本電気株式会社 | Storage system |
-
2015
- 2015-05-18 JP JP2017518648A patent/JP6316503B2/en not_active Expired - Fee Related
- 2015-05-18 WO PCT/JP2015/064212 patent/WO2016185542A1/en active Application Filing
Also Published As
Publication number | Publication date |
---|---|
WO2016185542A1 (en) | 2016-11-24 |
JPWO2016185542A1 (en) | 2017-08-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10963393B1 (en) | Storage system and a method for application aware processing | |
US10176092B2 (en) | System and method for executing data processing tasks using resilient distributed datasets (RDDs) in a storage device | |
US8819335B1 (en) | System and method for executing map-reduce tasks in a storage device | |
US10127275B2 (en) | Mapping query operations in database systems to hardware based query accelerators | |
TWI664541B (en) | Methods and systems for autonomous memory searching | |
KR102610636B1 (en) | Offload parallel compute to database accelerators | |
JP6316503B2 (en) | Computer system, accelerator, and database processing method | |
Watanabe et al. | Column-oriented database acceleration using fpgas | |
Becher et al. | A co-design approach for accelerated SQL query processing via FPGA-based data filtering | |
US10810174B2 (en) | Database management system, database server, and database management method | |
US20150234602A1 (en) | Data storage device for filtering page in two steps, system including the same, and method of operating the same | |
US9984124B2 (en) | Data management in relational databases | |
US10061747B2 (en) | Storage of a matrix on a storage compute device | |
US10324915B2 (en) | Information processing apparatus, processing apparatus, data search method | |
US20230222108A1 (en) | Data analysis acceleration architecture | |
US11210280B2 (en) | Systems and methods for fast bloom filter operations | |
US20180329756A1 (en) | Distributed processing system, distributed processing method, and storage medium | |
KR102425596B1 (en) | Systems and methods for low latency hardware memory management | |
Vemuri et al. | Execution primitives for scalable joins and aggregations in map reduce | |
US11099739B2 (en) | System and method for accessing redundant array of independent disks | |
JP6695973B2 (en) | Computer system and database management method | |
US20220245112A1 (en) | Hashing a data set with multiple hash engines | |
JP7024432B2 (en) | Database management system, data conversion program, data conversion method and data conversion device | |
US20200159729A1 (en) | Search Retrieval System and Method | |
TW202409838A (en) | Systems and methods for inference system caching |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20170228 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20170228 |
|
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: 20180320 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20180327 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6316503 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |