NVIDIA GQE を用いた GPU アクセラレーションされたクエリエンジンの設計
NVIDIA は、GPU を活用した高速データ検索を実現する「GQE(GPU Query Engine)」の設計手法を公開し、大規模データ処理のパフォーマンス向上に向けた具体的なアプローチを示した。
キーポイント
GPU アクセラレーションによるクエリ速度の劇的向上
従来の CPU ベースのクエリエンジンと比較し、NVIDIA の GQE 技術によりデータ検索と分析の処理速度を大幅に短縮する設計原則が提示された。
大規模データ処理への最適化アーキテクチャ
ペタバイト級のデータを扱う際にも、GPU の並列計算能力を最大限に活用し、レイテンシを低減するシステム設計の指針が含まれている。
開発者向け実装ガイドラインの提供
NVIDIA Developer Blog において、実際のクエリエンジンを構築するための具体的な技術的アプローチやベストプラクティスが共有された。
影響分析・編集コメントを表示
影響分析
本記事は、データ分析や検索エンジン分野におけるハードウェア利用のパラダイムシフトを示唆しており、CPU から GPU への計算負荷移行が標準化される流れを後押しする内容です。特に大規模データを扱う企業にとって、処理コストの削減と意思決定速度の向上に直結する重要な技術指針となります。
編集コメント
GPU の並列処理能力をクエリエンジンに適用する試みは、データ分析のスピード感を根本から変える可能性があり、実用化への期待が高まります。ただし、実際の導入においては既存システムとの互換性や移行コストも併せて検討する必要があります。
GPU アクセラレーションされたクエリエンジンは、しばしばメモリと I/O バンド幅によって制約されます。NVIDIA のハードウェアの進展——高帯域幅メモリ(HBM)、NVIDIA NVLink-C2C、および NVIDIA GB200 NVL4 に特徴的な専用デコンプレッションエンジン——は、有効なストレージ容量の増加、CPU と GPU 間のデータ移動の加速、ストリーミングマルチプロセッサ(SM)リソースを消費せずにデータアクセスを高速化することで、これらのボトルネックを取り除くのに役立ちます。
本稿では、データベースがこれらの技術をどのように活用して GPU でのクエリ実行を加速できるかを示します。効率的な CPU-GPU データ移動、圧縮、パーティションプルーニング、計算とのデータ転送のオーバーラップに関する技術について学びます。
GQE のアーキテクチャ概要
GQE(GPU Query Engine)は、最新の NVIDIA ハードウェア上で大規模データセットに対して SQL クエリを高性能で実行するために設計された参照アーキテクチャです。内部では、GQE は NVIDIA cuDF および他の NVIDIA CUDA-X ライブラリ——CCCL、nvCOMP、nvSHMEM など——を使用しています。
GQE は、クエリエンジンに対して以下のような影響を与える可能性があります:
- 実行を GPU へ移行する。
- デコンプレッションを nvCOMP へ移管する。
- データ形式を GPU に親和的なものにする。
- GPU 上で実行する際のエンドツーエンドのパフォーマンスギャップを埋める。
image*図 1. SQL クエリは GQE の 3 つのアーキテクチャ層(クエリ、データ、実行)を流れ、GPU アクセラレーションされたものとなる*
図 1 では、GQE をクエリ層、データ層、実行層に分解することで、システム設計の概要を示しています。これらは、SQL クエリと入力データをハードウェアレベルの実行へと移行させる役割を担います。各層は以下のように連携します。
クエリ層は、SQL パーサとクエリオプティマイザを備え、実行エンジンを補完します。この層は、GQE での実行のためにオープンソースのクエリプラン形式である Substrait プラン(Substrait)をネイティブに受け入れます。Substrait を用いることで、既存のデータベース製品からクエリプランをエクスポートし、それを GQE で実行することで、GPU 実行のメリットを検証することが可能になります。図 2 では、Apache DataFusion が SQL 文字列を Substrait プランに変換します。GQE はこのプランを最適化された論理クエリプランとして取り込み、GQE 固有の改良を加えて、物理プランへと変換します。
データレイヤーは、実行エンジンによる高速アクセスのためにユーザーデータを保存・整理します。GQE では、ストレージは抽象化され、異なるデータ形式やストレージ媒体を処理するプラグイン可能な専用リーダーに分割されています。現在、GPU メモリ、CPU メモリ、ディスクをサポートしています。本稿では、高性能な GQE のメモリ内テーブルフォーマットに焦点を当て、このデータが CPU メモリに保存されていると仮定します。GQE は必要なときにデータチャンクを GPU へ転送し、フルセットのデータを GPU メモリに保持することなく、GPU に負荷を飽和させます。チャンクが GPU に到着すると、データレイヤーは実行レイヤーに引き継ぎます。
実行レイヤーは、物理的なクエリプランを実行してクエリ結果を生成します。GQE は物理プランをタスクグラフとして生成し、これが実行スケジュールを定義します。このタスクグラフには、オープンソースの NVIDIA cuDF ライブラリ に基づいて構築された関係演算子が含まれており、同ライブラリは高度に最適化された CUDA C++ コードでこれらの演算子を実装しています。データレイヤーがチャンク単位で転送するため、GQE は演算子を分解し、パイプライン処理される CUDA ストリーム上でそれらのチャンクに対してタスクを並列実行できます。
要約すると、GQE は GPU ネイティブな設計を通じて、ハードウェアの高いスループットを引き出します。
データレイアウトと転送オーケストレーション
GQE データレイヤーは、ホストメモリからデバイスメモリへのデータ転送を効率的に行うように最適化されています。スループットの最大化と移動するデータの量削減により、データ転送の遅延を最小限に抑えています。以下では、転送遅延の最小化に不可欠な、インメモリーデータレイアウトとホストからデバイスへの転送オーケストレーションの概要を示します。
GQE の設計目標
GQE は cuDF を基盤としているため、GPU 内のデータは cuDF ネイティブテーブルとして構造化されていることを前提としています。一方、ホストメモリのレイアウトは、NVIDIA NVLink C2C や PCIe 向けの転送を最適化できます。Memcpy(cudaMemcpy)は標準的な転送方法です。このアプローチでは、CPU が GPU の実行をオーケストレーションし、データをバッチ転送します。これにより、圧縮転送の基礎も形成されます。
データレイアウト
image*図 2. GQE のインメモリーテーブル形式は、GPU への効率的な転送のために列データを行グループとパーティションに整理します*
図 2 は、表データレイアウトを示しており、これは水平方向に行グループに細分化されています。各行グループは列で構成され、メタデータをカプセル化しています。行グループ内では、GQE は列を非連続的なパーティションとして保存します。転送時には、ストレージレイヤーが一連のパーティションを cuDF カラムに変換します。これにより、データレイヤーは圧縮とパーティションプルーニングの実装詳細を実行層から隠蔽します。
転送オーケストレーション
image*図 3. パイプライン並列化により、行グループ全体にわたってスケジューリング、データ転送、デコンプレッション、GPU 実行を重畳させ、転送速度を向上させる*
図 3 では、CPU が転送をどのようにオーケストレーションするかを示しています。CUDA のベストプラクティスに従い、転送にはパイプライン並列化(pipeline parallelism)を使用してハードウェアコンポーネントを効率的に活用します。パイプライン化された転送は複数のステージで構成されます。圧縮されパーティション分割されたデータの場合、4 つのステージがあります。
- ステージ 0 では、ホストスレッドがスケジューリングを実行します。スケジューリングには、転送するメモリー範囲の計算、宛先バッファの割り当て、必要な CUDA メソッドの呼び出しが含まれます。
- ステージ 1 では、GPU が H2D(Host to Device)転送を実行します。
- ステージ 2 でデータのデコンプレッションを行います。
- ステージ 3 はデータレイヤーの外側に追加されたもので、CUDA カーネルがクエリを計算するステージです。
これら 4 つのステージは重畳(オーバーラップ)させるべきです。理想的には、クエリ実行時間は最長の実行時間を要するステージに等しくなり、残りのすべてのステージはパイプラインによって隠蔽されます。
データ転送最適化
高速なデータアクセスは、GQE が達成したパフォーマンス上の優位性において重要な役割を果たします。主に採用されているデータアクセスの最適化手法として、圧縮(compression)とパーティションプルーニング(partition pruning)があります。以下でこれらの最適化がどのように機能するかを説明します。
圧縮
GQE は圧縮から主に 2 つの恩恵を受けます。すなわち、クエリ処理可能なデータセット容量の拡大とクエリの高速化です。圧縮により、与えられたメモリ割り当て量で処理できるデータセットサイズを、メモリアップロード全体の削減によって拡張できます。圧縮されたバッファ間のデータ転送に GPU による高速なデコンプレッション(復元)を組み合わせることで、NVLink C2C のような高速な相互接続上であっても転送速度が向上します。GQE は、従来のフォーマットと比較して圧縮率の向上と優れた GPU デコンプレッション速度を提供する、GPU 最適化されたフォーマットでデータセットを圧縮します。
NVIDIA nvCOMP ライブラリ
NVIDIA nvCOMP は、GPU 加速による圧縮およびデコンプレッション(復元)のためのライブラリです。標準的なフォーマットと GPU 最適化された圧縮フォーマットの範囲を提供しています。ユーザーは、圧縮率、圧縮処理速度、およびデコンプレッションスループットをバランスさせるために、サポートされているアルゴリズムから選択できます。nvCOMP は、その高レベルインターフェース内で lz4hc などの CPU ライブラリをラップし、追加の構成オプションを提供します。GQE では、圧縮およびデコンプレッションルーチンに nvCOMP を使用しています。
NVIDIA Blackwell デコンプレッションエンジン
NVIDIA は、NVIDIA Blackwell アーキテクチャにおいて新しいデコンプレッションエンジン(DE: Decompression Engine)を導入しました。これにより、nvCOMP は SM(Streaming Multiprocessor)リソースを使用せずに、LZ77 ベースの LZ4、Snappy、Deflate などのフォーマットを高速にデコンプレッションできます。複数の CUDA ストリームを使用する場合、DE によるデコンプレッション、SM カーネル、および CE コピーは完全にオーバーラップさせることが可能です。
単一の NVIDIA Blackwell B200 GPU 上の DE は、データベースアプリケーションにおいて最大 400 GB/s に達します。例えば、圧縮率が 4 倍の場合、有効なホストからデバイスへのスループットが約 400 GB/s を達成しつつも、100 GB/s の C2C(Chip-to-Chip)ホストからデバイスへの帯域幅を確保できます。残りの帯域幅は、SM でデコンプレッションされるエンコードデータを含む他のデータの転送に活用できます。
NVIDIA GQE の圧縮アプローチ
図 4 はハイブリッド圧縮アプローチを示しており、構造化データ内の特定のパターンを可能な限り利用するために軽量アルゴリズム(Cascaded など)を使用し、良好な圧縮率を達成するために LZ ベースのアルゴリズムが必要となる場合には DE を使用します。
image*図 4. nvCOMP Cascaded フォーマットチェーンは、デルタエンコーディング、ランレングスエンコーディング、ビットパッキングを組み合わせて、カラム型データを効率的に圧縮します*
与えられた列を圧縮する方法を検討する際、クエリエンジンにはいくつかの選択肢があります。各列に対してユーザーにアルゴリズムを指定させることも可能ですが、非常に大規模なデータベースではこの方法は扱いにくくなります。私たちが採用したアプローチは、LZ4 と Cascaded の両方のアルゴリズムを試すことです。LZ4 は他の LZ77 専用圧縮器と比較して高い圧縮率を実現し、デコンプレッションエンジン(Decompression Engine)でもサポートされているため、汎用データに対する私たちの選択となっています。
使用する圧縮アルゴリズムを決定するために、データを LZ4 と Cascaded の両方のアルゴリズムで圧縮します。Cascaded は B200 上で約 500 GB/s という極めて高速な圧縮レートを実現できます。これにより、データ読み込み段階でのオーバーヘッドを大幅に増やすことなく、追加のアルゴリズムを試すことが可能になります。
Cascaded と LZ4 のどちらを使用するかは、以下の2つのヒューリスティック(経験則)を用いてバランスを取ります:
- Cascaded と LZ4 は異なる圧縮率の閾値を持っており、それぞれそのアルゴリズムを使用するための最小条件を定めています。
- Cascaded が LZ4 よりも選択されるためには、LZ4 の圧縮率よりも高い圧縮率を達成する必要があります。トリガーとなるのは、LZ4 の圧縮率に対して設定可能な倍数です。
私たちはアルゴリズムの選択を通じて、C2C バンド幅(GPU 間通信帯域)、デコンプレッションエンジン(DE)、および SM(ストリーミングマルチプロセッサ)リソースのバランス調整を図っています。
パーティションプルーニング
データを CPU から GPU に転送する前に、GQE はフィルタプルーニングを採用し、クエリの結果に寄与しないパーティションをスキップします。このメカニズムは、テーブルの内容を要約したメタデータと、SQL クエリで定義された述語(predicates)に基づいています。
メタデータとストレージ
GQE はゾーンマップを使用してフィルタプルーニングをサポートします。データをメモリ内テーブルとして読み込む際、GQE はテーブルを水平方向に分割し、行グループと固定サイズのパーティション(デフォルトは 10M 行)を作成します。各パーティションに対して GQE は全列の最小値および最大値を計算し、このメタデータを GPU メモリ内の cuDF テーブルとして保存することで、プルーニング処理がボトルネックとならないようにしています。ゾーンマップの計算には初期の Parquet 読み込み時間に約 1% の追加コストがかかりますが、これは一度だけ実行され、クエリ実行中には行われません。
プルーニングとタスクオーケストレーション
image*図 5. フィルタープルーニングは、パーティションレベルのゾーンマップに対してクエリ述語を評価し、転送前に不要なデータをスキップすることで、GPU へのデータ移動量を削減します*
図 5 はフィルタプルーニングのプロセスを示しています。タスクグラフ構築中に、GQE はクエリ述語を行グループのゾーンマップに対する比較に変換することで、プルーニング式を導出します。クエリの結果に貢献できないパーティションはプルーニングされます。この例では、ゾーンマップがこのパーティションに格納されているすべての値が 9 よりも小さく、したがって下限である 15 よりも小さいことを示しているため、パーティション 1 がプルーニングされます。残りのパーティションは GPU メモリへ転送され、必要に応じてデコンプレッションされます。プルーニング後に CPU メモリ内でパーティションが不連続であっても(例えば複数の行グループに含まれている場合)、それらは転送されて GPU 上で cuDF テーブルとしてラップされた連続したメモリブロックに組み立てられます。
GQE におけるフィルタプルーニングは非常に効果的です。1 TB スケールのデータセットを使用した TPC-H ベンチマークでは、22 クエリ全体でデータの 31% がスキップされます。その結果、エンドツーエンドの速度向上が 1.43 倍となりました。
ゾーンマップの評価によるオーバーヘッドは平均してわずか 2.2 ms で、1 TB のデータに対するベンチマーククエリにおいて最小限に抑えられています。
データ転送最適化
GQE では、パーティション向けの革新的なバッチ転送最適化を考案しました。
複数のパーティションは cudaMemcpyBatchAsync を使用して単一のバッチで GPU に転送され、細粒度のパーティションに対するオーバーヘッドが削減されます。バッチ処理はまた、インターリーブされた CUDA ストリームに起因する遅延を回避するのに役立ちます。パーティションを個別に転送する場合、他のストリームからの転送が次のカーネル起動を遅らせる可能性があります。同じバッチ内でパーティションを移動させることで、この遅延を回避できます。
パフォーマンスのハイライト
上記の B200 GPU 機能を Grace Blackwell システム全体で評価するため、NVIDIA GB200 NVL4 サーバー内の 2 つの B200 GPU のいずれかを使用して、Grace CPU と NVLink-C2C で接続された環境で TPC-H をスケールファクター 1000(1TB)でベンチマークしました。ベースラインとして Turin Epyc 9755 CPU 上で DuckDB 1.4.1 を使用しました。各クエリは、両側で圧縮とプルーニングを有効にした状態で、ホットキャッシュ状態での 5 回の実行の平均値です。GQE のパラメータ(並列度のレベルや物理演算子の計画など)は、クエリごとに調整しています。
TPC-H データセットは、lineitem テーブルを l_shipdate でクラスタリングし、orders テーブルを o_orderdate でクラスタリングしてパーティションプルーニングと圧縮に最適化されており、両方のテーブルを月単位でパーティショニングしています。内部では、各パーティションはそれぞれ l_orderkey と o_orderkey に対してソートされています。
図6では、22件のクエリのランタイムを示しています。GQEは22件中20件でDuckDBを上回っており、特にQ11、Q14、Q15において大きな改善が見られました。これらはパーティションプルーニングと圧縮により、NVLink C2C間でのデータ転送が劇的に削減された結果です。GQEは、これらの最適化を適用することで、帯域幅を多く消費するクエリであるQ1やQ6でさえもGPU上で高速に実行できることを示しています。総じて、GQEは全クエリを9.0秒で完了しますが、DuckDBのシングルソケット構成では74.0秒、デュアルソケット構成では70.6秒を要します。
image*図6。NVIDIAによるテスト結果。GB200 GPU 1基上のGQEは、TPC-Hベンチマーク(スケールファクタ1TB)において、デュアルソケットAMD Turin CPUのDuckDBを90%以上のクエリで上回ります*
image*図7。GQEは最適なCPU構成に対して集計で7.5倍の高速化を実現し、個別のクエリごとの改善幅はほぼ同等から25倍以上に及ぶ*
速度向上の結果を図7に示します。GQEはDuckDBの最良のCPUソケット構成に対し最大25.5倍の高速化を達成し、22件中20件で上回りました。また、17件のクエリで3倍以上の改善を実現しています。全クエリを集計すると、GB200上のGQEは総実行時間で7.5倍の高速化を達成します。
*本ブログ記事におけるテスト結果はTPC-H意思決定支援ベンチマークに基づいており、公開されたTPC-Hの結果とは比較できません。これは、本ブログ内のテスト結果がTPC-H仕様に準拠していないためです。*
GQE のベストプラクティスをデータプラットフォームに適用する
データベースエンジンでは、ターゲットを絞った最適化を行うことで、NVIDIA Grace Blackwell ハードウェアの機能を測定可能なクエリパフォーマンスの向上に変換できます。GQE では、パーティションプルーニングとハイブリッド圧縮により転送量を最小限に抑えつつ、NVLink-C2C と DE ハードウェアが転送スループットを向上させます。これらの最適化は転送時間を短縮し、NVIDIA cuDF、NVIDIA nvCOMP、およびその他の CUDA-X ライブラリを用いた洗練されたクエリ実行へと統合されます。
TPC-H SF1000 ベンチマークにおいて、GQE は最先端の CPU データベースと比較して総実行時間で 7.5 倍の高速化を達成しました。これは、データレイアウト、圧縮戦略、および実行方法を現代のデータベースエンジン向けに一体的に設計できることを示しています。
GQE の オープンソース参照アーキテクチャ を活用し、設計とパフォーマンス最適化を検討して、GQE がどのようにデータプラットフォームを加速できるかを探求してください。
謝辞
著者らは、GQE に対する技術的貢献と本稿のレビューを行っていただいた Tanmay Gujar に感謝いたします。また、Hao Gao、Yadu Kiran、James Xia、Eyal Soha、Lingyan Yin、Daniel Juenger、Siyuan Lin、Bret Alfieri、Nico Iskos、Zhengru Wang、Rui Bao、Dhruv Sundararaman、Jiachun Li、Kate Cheng といった GQE のすべての貢献者の方々にも、技術的貢献に対して心から感謝申し上げます。最後に、レビューを行っていただいた Nikolay Sakharnykh と Nuttiiya Seekhao にもお礼を申し上げます。
原文を表示
GPU-accelerated query engines are often constrained by memory and I/O bandwidth. NVIDIA hardware advances—including high bandwidth memory (HBM), NVIDIA NVLink-C2C, and dedicated decompression engines featured in NVIDIA GB200 NVL4—help remove these bottlenecks by increasing effective storage capacity, accelerating data movement between CPUs and GPUs, and speeding data access without consuming streaming multiprocessor (SM) resources.
In this post, we show how databases can use these technologies to accelerate GPU query execution. You’ll learn techniques for efficient CPU-GPU data movement, compression, partition pruning, and overlapping data transfer with computation.
Architecture overview of GQE
GQE (GPU Query Engine) is a reference architecture designed to execute SQL queries at high performance over large data sets on modern NVIDIA hardware. Under the hood, GQE uses NVIDIA cuDF and other NVIDIA CUDA-X libraries, including CCCL, nvCOMP, and nvSHMEM.
GQE can help influence query engines to:
- Move execution to GPUs.
- Move decompression to nvCOMP.
- Make data formats GPU-friendly.
- Close end-to-end performance gaps when running on GPUs.

In Figure 1, we give an overview of the system design by breaking down GQE into a query, data, and execution layer. These manage the transition from a SQL query and input data to hardware-level execution. The layers fit together as follows.
The query layer complements the execution engine with a SQL parser and a query optimizer. The query layer natively accepts Substrait plans, an open-source query plan format, for execution in GQE. Substrait makes it possible to evaluate the benefits of GPU execution by exporting query plans from an existing database product and running the plan in GQE. In Figure 2, Apache DataFusion transforms a SQL string into a Substrait plan. GQE consumes that plan as an optimized logical query plan, adds GQE-specific refinements, and transforms the query into a physical plan.
The data layer stores and organizes user data for fast access by the executor. In GQE, storage is abstracted into pluggable, specialized readers that handle different data formats and storage mediums—it currently supports GPU memory, CPU memory, and disk. In this post, we focus on the high-performance GQE in-memory table format and assume this data is stored in CPU memory. GQE transfers data chunks to the GPU on-demand to saturate the GPU with work without storing the full dataset in GPU memory. When a chunk arrives on the GPU, the data layer hands off to the execution layer.
The execution layer executes the physical query plan against the data to produce query results. GQE generates the physical plan into a task graph, which defines the execution schedule. The task graph contains relational operators built on the open-source NVIDIA cuDF library, which implements the operators in highly optimized CUDA C++ code. Because the data layer transfers in chunks, GQE can decompose operators and execute tasks on those chunks concurrently as pipelined CUDA streams.
In summary, GQE unlocks the high throughput of the hardware through a GPU-native design.
Data layout and transfer orchestration
The GQE data layer is optimized to efficiently transfer data from host memory to device memory. We minimize data transfer latency by maximizing throughput and reducing the amount of data moved. In the following, we give an overview of our in-memory data layout and the host-to-device transfer orchestration, which are instrumental to minimizing transfer latency.
GQE design goals
As GQE builds on cuDF, the design assumes that in-GPU data is structured as cuDF-native tables. However, the host memory layout can optimize transfers for NVIDIA NVLink C2C and PCIe. cudaMemcpy is the standard transfer method. In this approach, the CPU orchestrates GPU execution and copies data in a bulk transfer. This also forms the basis for compressed transfers.
Data layout

Figure 2 shows the table data layout, which is horizontally subdivided into row groups. Each row group consists of columns and encapsulates metadata. Within a row group, GQE stores columns as non-contiguous partitions. During a transfer, the storage layer converts a set of partitions into a cuDF column. Thus, the data layer hides the implementation details of compression and partition pruning from the execution layer.
Transfer Orchestration

In Figure 3, we show how the CPU orchestrates a transfer. Following best CUDA practice, transfers use pipeline parallelism to efficiently utilize hardware components. A pipelined transfer consists of multiple stages. In compressed, partitioned data, there are four stages.
- In Stage 0, a host thread performs scheduling. Scheduling involves computing the memory range to transfer, allocating a destination buffer, and invoking the necessary CUDA methods.
- In Stage 1, the GPU performs the H2D transfer.
- Stage 2 decompresses the data.
- Stage 3, added outside the data layer, in which the CUDA kernels compute the query.
These four stages should overlap. Ideally, the query runtime equals the longest-running stage, and all remaining stages are hidden by the pipeline.
Data transfer optimizations
Fast data access plays a significant role in the performance advantage achieved by GQE. The main data access optimizations employed are compression and partition pruning. In the following, we describe how these optimizations work.
Compression
GQE receives two main benefits from compression: query dataset capacity and query acceleration. Compression enables a query engine to expand the dataset size that can be processed using a given memory allotment by reducing the overall in-memory footprint. Data transfer of compressed buffers, combined with fast decompression by the GPU, speeds up transfers even on fast interconnects like NVLink C2C. GQE compresses the datasets with GPU-optimized formats that improve compression ratios and provide superior GPU decompression speeds compared to using legacy formats.
NVIDIA nvCOMP library
NVIDIA nvCOMP is a library for GPU-accelerated compression and decompression. It provides a range of standard and GPU-optimized compression formats. The user can pick from the supported algorithms to balance compression ratio, compression, and decompression throughput. nvCOMP can wrap CPU libraries such as lz4hc within its high-level interface, providing additional configuration options. GQE uses nvCOMP for its compression and decompression routines.
NVIDIA Blackwell Decompression Engine
NVIDIA introduced a new Decompression Engine (DE) in the NVIDIA Blackwell architecture that enables nvCOMP to quickly decompress LZ77-based formats like LZ4, Snappy, and Deflate without using SM resources. Decompression with DE, SM kernels, and CE copies can fully overlap when using multiple CUDA streams.
DE on a single NVIDIA Blackwell B200 GPU can reach up to 400 GB/s in database applications. For example, at a 4x compression ratio, it achieves roughly 400 GB/s effective host-to-device throughput while leaving 100 GB/s C2C host-to-device bandwidth available. The remaining bandwidth can be harnessed to transfer other data, including encoded data that is decompressed on the SMs.
NVIDIA GQE’s compression approach
Figure 4 shows the hybrid compression approach, which uses lightweight algorithms, such as Cascaded, to use specific patterns in the structured data where possible, and the DE when LZ-based algorithms are needed to achieve good compression ratios.

When considering how to compress a given column, a query engine has a few options. It could require users to specify an algorithm for each column, but this is unwieldy for very large databases. The approach we’ve taken is to attempt both LZ4 and Cascaded. LZ4 is our choice for generic data because it achieves high ratios compared to other LZ77-only compressors, and is supported by the Decompression Engine.
To determine the compression algorithm to use, we compress the data using both LZ4 and Cascaded algorithms. Cascaded can achieve extremely fast compression rates, at approximately 500 GB/s on B200. This enables us to try the extra algorithm without significant overhead in the data loading stage.
We balance when to use Cascaded vs LZ4 using two heuristics:
- Cascaded and LZ4 have different compression ratio thresholds, which establish minimums for us to use that algorithm.
- Cascaded must achieve a higher compression ratio than LZ4 to be chosen over LZ4. The trigger is a configurable multiple of the LZ4 compression ratio.
We use the choice of algorithm to help balance C2C bandwidth, DE, and SM resources.
Partition pruning
Before transferring data from the CPU to the GPU, GQE employs filter pruning to skip partitions that don’t contribute to the query result. This mechanism relies on metadata summarizing the table contents and the predicates defined in the SQL query.
Metadata and storage
GQE uses zone maps to support filter pruning. When data is loaded as in-memory tables, GQE horizontally splits the table into row groups and fixed-size partitions with a default of 10M rows. For each partition, GQE computes the minimum and maximum values for every column and stores this metadata as cuDF tables in GPU memory, so pruning can run without becoming a bottleneck. Computing the zone maps adds about 1% to the initial Parquet load time and happens only once, not during query execution.
Pruning and task orchestration

Figure 5 shows the filter pruning process. During task graph construction, GQE derives a pruning expression by transforming query predicates into comparisons against the row groups’ zone maps. Partitions that can’t contribute to the query result are pruned. In this example, partition 1 is pruned because the zone map indicates that all values stored in this partition are less than 9, and therefore also less than 15, the lower bound. The remaining partitions are transferred to GPU memory and decompressed if necessary. Even when partitions are discontiguous in CPU memory after pruning, e.g., because they are contained in multiple row groups, they are transferred and assembled into a contiguous memory block wrapped as a cuDF table on the GPU.
Filter pruning in GQE is highly effective. In the TPC-H benchmark using the 1 TB scale dataset, filter pruning skips 31% of data across all 22 queries. The impact is an end-to-end speedup of 1.43×.
The evaluation of zone maps adds minimal overhead, on average, 2.2 ms for benchmark queries on 1 TB of data.
Data transfer optimizations
In GQE, we conceive a novel batched transfer optimization for partitions.
Multiple partitions are transferred to the GPU in a single batch using cudaMemcpyBatchAsync, reducing overhead for fine-grained partitions. Batching also helps avoid delays from interleaved CUDA streams. When partitions are transferred individually, transfers from other streams can delay the next kernel launch. Moving partitions in the same batch avoids this delay.
Performance highlights
To evaluate the B200 GPU features discussed above in a full Grace Blackwell system, we benchmarked GQE on TPC-H at Scale Factor 1000 (1TB) using one of the two B200 GPUs in an NVIDIA GB200 NVL4 server, where B200 GPUs are connected to the Grace CPU with NVLink-C2C. We used DuckDB 1.4.1 on the Turin Epyc 9755 CPU as the baseline. Each query was averaged over 5 hot-cache runs, with compression and pruning enabled on both sides. We tune the GQE parameters per query, including the degree of parallelism and physical operator planning.
The TPC-H dataset is optimized for partition pruning and compression by clustering the lineitem table on l_shipdate and the orders table on o_orderdate, and partitioning both tables by month. Internally, each partition is sorted on l_orderkey and o_orderkey, respectively.
In Figure 6, we show the runtime of the 22 queries. GQE outperforms DuckDB on 20 of 22 queries, with the largest gains on Q11, Q14, and Q15, where partition pruning and compression sharply cut data movement across NVLink C2C. GQE showcases that even bandwidth-heavy queries like Q1 and Q6 execute quickly on the GPU with these optimizations. In sum, GQE runs all queries in 9.0 s, compared to 74.0 s and 70.6 s for DuckDB in single and dual-socket configurations, respectively.


We present the speedups in Figure 7. GQE delivers up to 25.5x over DuckDB’s best CPU socket configuration, outperforming it on 20 of 22 queries and reaching 3x or higher on 17. Aggregated across all queries, GQE on the GB200 achieves a 7.5x speedup on total execution time.
*The test results in this blog post are derived from TPC-H decision support benchmark and aren’t comparable to published TPC-H results, as the test results in this blog do not comply with the TPC-H specification.*
Apply GQE best practices to data platforms
Database engines can translate NVIDIA Grace Blackwell hardware features into measurable query performance gains with targeted optimizations. In GQE, partition pruning and hybrid compression minimize transfer volume while NVLink-C2C and DE hardware increase transfer throughput. These optimizations reduce transfer time and compose into sophisticated query execution using NVIDIA cuDF, NVIDIA nvCOMP, and other CUDA-X libraries.
On TPC-H SF1000, GQE achieved a 7.5x speedup on total execution time over a state-of-the-art CPU database, showing how data layout, compression strategy, and execution can be designed together for modern database engines.
Leverage the GQE open-source reference architecture and design, and performance optimizations, and explore how GQE can accelerate your data platforms.
Acknowledgements
*The authors would like to thank Tanmay Gujar for his technical contributions to GQE and his review of this post. We also extend our thanks to all GQE contributors—Hao Gao, Yadu Kiran, James Xia, Eyal Soha, Lingyan Yin, Daniel Juenger, Siyuan Lin, Bret Alfieri, Nico Iskos, Zhengru Wang, Rui Bao, Dhruv Sundararaman, Jiachun Li, and Kate Cheng—for their technical contributions. Finally, we’d like to thank Nikolay Sakharnykh and Nuttiiya Seekhao for their review.*
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み