From c248cad205375d25f814fccf3fc05a0f2099c465 Mon Sep 17 00:00:00 2001
From: KaiGai Kohei
Date: Tue, 9 Jul 2024 13:47:10 +0900
Subject: [PATCH] documentation update: CUDA version for Volta/Pascal GPU
issue at #807
---
docs/index.html | 2 +-
docs/install/index.html | 4 ++--
docs/ja/index.html | 2 +-
docs/ja/install/index.html | 4 ++--
docs/ja/search/search_index.json | 2 +-
docs/search/search_index.json | 2 +-
man/install.md | 8 ++++----
7 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/docs/index.html b/docs/index.html
index 668557b9..2d6a32d7 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -248,5 +248,5 @@ Support Policy
diff --git a/docs/install/index.html b/docs/install/index.html
index b4a581b8..a343e79d 100644
--- a/docs/install/index.html
+++ b/docs/install/index.html
@@ -397,8 +397,8 @@
Tips
Use of Volta or former GPUs
The open source edition of the nvidia driver does not support Volta generation GPUs or former.
-Therefore, if you want to use PG-Strom with Volta or Pascal generation GPUs, you need to use CUDA 12.2, whose proprietary driver supports GPUDirect Storage.
-The CUDA 12.2 package can be obtained here .
+Therefore, if you want to use PG-Strom with Volta or Pascal generation GPUs, you need to use CUDA 12.2 Update 1, whose proprietary driver supports GPUDirect Storage.
+The CUDA 12.2 Update 1 package can be obtained here .
Next, install the driver module nvidia-gds
for the GPU-Direct Storage (GDS).
Please specify the same version name as the CUDA Toolkit version after the package name.
diff --git a/docs/ja/index.html b/docs/ja/index.html
index 1a22fb2c..0fb487df 100644
--- a/docs/ja/index.html
+++ b/docs/ja/index.html
@@ -240,5 +240,5 @@ サポートポリシー
diff --git a/docs/ja/install/index.html b/docs/ja/install/index.html
index d632c85b..b6276e6e 100644
--- a/docs/ja/install/index.html
+++ b/docs/ja/install/index.html
@@ -397,8 +397,8 @@
Tips
Volta以前のGPUの利用について
オープンソース版nvidiaドライバは、Volta世代以前のGPUには対応していません。
-したがって、VoltaまたはPascal世代のGPUでPG-Stromを利用する場合は、プロプラエタリ版のドライバがGPUDirect Storageに対応しているCUDA 12.2を利用する必要があります。
-CUDA 12.2のパッケージはこちら から入手する事ができます。
+したがって、VoltaまたはPascal世代のGPUでPG-Stromを利用する場合は、プロプラエタリ版のドライバであってもGPUDirect Storageに対応しているCUDA 12.2 Update 1を利用する必要があります。
+CUDA 12.2 Update 1のパッケージはこちら から入手する事ができます。
続いて、GPU-Direct Storage(GDS)を利用するためのドライバモジュールnvidia-gds
をインストールします。
パッケージ名に続いてCUDA Toolkitのバージョンと同一のバージョン名を指定してください。
diff --git a/docs/ja/search/search_index.json b/docs/ja/search/search_index.json
index ea4938ab..5de0067f 100644
--- a/docs/ja/search/search_index.json
+++ b/docs/ja/search/search_index.json
@@ -1 +1 @@
-{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"\u306f\u3058\u3081\u306b \u672c\u7ae0\u3067\u306fPG-Strom\u306e\u6982\u8981\u3001\u304a\u3088\u3073\u958b\u767a\u8005\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 PG-Strom\u3068\u306f? PG-Strom\u306fPostgreSQL v15\u304a\u3088\u3073\u4ee5\u964d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u5411\u3051\u306b\u8a2d\u8a08\u3055\u308c\u305f\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3001\u30c1\u30c3\u30d7\u3042\u305f\u308a\u6570\u5343\u500b\u306e\u30b3\u30a2\u3092\u6301\u3064GPU(Graphic Processor Unit)\u30c7\u30d0\u30a4\u30b9\u3092\u5229\u7528\u3059\u308b\u4e8b\u3067\u3001\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u5bfe\u3059\u308b\u96c6\u8a08\u30fb\u89e3\u6790\u51e6\u7406\u3084\u30d0\u30c3\u30c1\u51e6\u7406\u5411\u3051\u306eSQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u9ad8\u901f\u5316\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u3055\u308c\u3066\u3044\u307e\u3059\u3002 PG-Strom\u306e\u4e2d\u6838\u3068\u306a\u308b\u6a5f\u80fd\u306f\u3001SQL\u547d\u4ee4\u304b\u3089\u81ea\u52d5\u7684\u306bGPU\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u751f\u6210\u3059\u308b\u30b3\u30fc\u30c9\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\u3068\u3001SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092GPU\u4e0a\u3067\u975e\u540c\u671f\u304b\u3064\u4e26\u5217\u306b\u5b9f\u884c\u3059\u308b\u5b9f\u884c\u30a8\u30f3\u30b8\u30f3\u3067\u3059\u3002\u73fe\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306fSCAN\uff08WHERE\u53e5\u306e\u8a55\u4fa1\uff09\u3001JOIN\u304a\u3088\u3073GROUP BY\u306e\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u5bfe\u5fdc\u3057\u3066\u304a\u308a\u3001GPU\u51e6\u7406\u306b\u30a2\u30c9\u30d0\u30f3\u30c6\u30fc\u30b8\u304c\u3042\u308b\u5834\u5408\u306b\u306fPostgreSQL\u6a19\u6e96\u306e\u5b9f\u88c5\u3092\u7f6e\u304d\u63db\u3048\u308b\u4e8b\u3067\u3001\u30e6\u30fc\u30b6\u3084\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304b\u3089\u306f\u900f\u904e\u7684\u306b\u52d5\u4f5c\u3057\u307e\u3059\u3002 PG-Strom\u306f\uff12\u3064\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002\u4e00\u3064\u306f\u884c\u5f62\u5f0f\u3067\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308bPostgreSQL\u306eheap\u30b9\u30c8\u30ec\u30fc\u30b8\u30b7\u30b9\u30c6\u30e0\u3067\u3001\u3053\u308c\u306f\u5fc5\u305a\u3057\u3082\u96c6\u8a08\u30fb\u89e3\u6790\u7cfb\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u6700\u9069\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u4e00\u65b9\u3067\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7cfb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089\u30c7\u30fc\u30bf\u3092\u79fb\u52d5\u3059\u308b\u4e8b\u306a\u304f\u96c6\u8a08\u51e6\u7406\u3092\u5b9f\u884c\u3067\u304d\u308b\u3068\u3044\u3046\u30a2\u30c9\u30d0\u30f3\u30c6\u30fc\u30b8\u304c\u3042\u308a\u307e\u3059\u3002\u3082\u3046\u4e00\u3064\u306f\u3001\u5217\u5f62\u5f0f\u306e\u69cb\u9020\u5316\u30c7\u30fc\u30bf\u5f62\u5f0f\u3067\u3042\u308b Apache Arrow \u30d5\u30a1\u30a4\u30eb\u3067\u3001\u884c\u5358\u4f4d\u306e\u30c7\u30fc\u30bf\u66f4\u65b0\u306b\u306f\u4e0d\u5411\u304d\u3067\u3042\u308b\u3082\u306e\u306e\u3001\u52b9\u7387\u7684\u306b\u5927\u91cf\u30c7\u30fc\u30bf\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u4e8b\u304c\u3067\u304d\u3001\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1(FDW)\u3092\u901a\u3057\u3066\u52b9\u7387\u7684\u306a\u30c7\u30fc\u30bf\u306e\u691c\u7d22\u30fb\u96c6\u8a08\u304c\u53ef\u80fd\u3067\u3059\u3002 PG-Strom\u306e\u7279\u5fb4\u7684\u306a\u6a5f\u80fd\u306e\u4e00\u3064\u304c\u3001NVME/NVME-oF\u30c7\u30d0\u30a4\u30b9\u304b\u3089CPU/RAM\u3092\u30d0\u30a4\u30d1\u30b9\u3057\u3066GPU\u306b\u76f4\u63a5\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u3057\u3001GPU\u3067SQL\u51e6\u7406\u3092\u5b9f\u884c\u3059\u308b\u4e8b\u3067\u30c7\u30d0\u30a4\u30b9\u306e\u5e2f\u57df\u3092\u6700\u5927\u9650\u306b\u5f15\u304d\u51fa\u3059GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u6a5f\u80fd\u3067\u3059\u3002v3.0\u3067\u306f\u65b0\u305f\u306bNVIDIA GPUDirect Storage\u306b\u3082\u5bfe\u5fdc\u3057\u3001\u30ed\u30fc\u30ab\u30ebNVME-SSD\u3060\u3051\u3067\u306a\u304f\u3001NVME-oF\u3092\u4ecb\u3057\u305fSDS(Software Defined Storage)\u30c7\u30d0\u30a4\u30b9\u3084\u3001\u5171\u6709\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u304b\u3089\u306e\u8aad\u307f\u51fa\u3057\u306b\u3082\u5bfe\u5fdc\u3057\u307e\u3059\u3002 v3.0\u3067\u306f\u4e00\u90e8\u306ePostGIS\u95a2\u6570\u3068\u3001\u30b8\u30aa\u30e1\u30c8\u30ea\u30c7\u30fc\u30bf\u306eGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u63a2\u7d22\u3092GPU\u5074\u3067\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u66f4\u65b0\u306e\u591a\u3044\u30c6\u30fc\u30d6\u30eb\u306e\u5185\u5bb9\u3092\u4e88\u3081GPU\u306b\u8907\u88fd\u3057\u3066\u304a\u304fGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u6a5f\u80fd\u3068\u4f75\u305b\u3066\u3001\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306a\u4f4d\u7f6e\u60c5\u5831\u306b\u57fa\u3065\u304f\u691c\u7d22\u3001\u5206\u6790\u51e6\u7406\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059\u3002 v5.0\u3067\u306f\u30d7\u30ed\u30bb\u30b9\u30e2\u30c7\u30eb\u306e\u66f4\u65b0\uff08\u30de\u30eb\u30c1\u30d7\u30ed\u30bb\u30b9\u21d2\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\uff09\u3084\u3001\u30cd\u30a4\u30c6\u30a3\u30d6\u30b3\u30fc\u30c9\u304b\u3089\u7591\u4f3c\u30b3\u30fc\u30c9\u3078\u306e\u5207\u308a\u66ff\u3048\u306a\u3069\u3001\u6839\u672c\u7684\u306a\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u8a2d\u8a08\u306e\u5909\u66f4\u304c\u884c\u308f\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u5168\u822c\u7684\u306a\u51e6\u7406\u901f\u5ea6\u3084\u5b89\u5b9a\u6027\u306e\u6539\u5584\u304c\u56f3\u3089\u308c\u307e\u3057\u305f\u3002 \u30e9\u30a4\u30bb\u30f3\u30b9\u3068\u8457\u4f5c\u6a29 PG-Strom\u306fPostgreSQL\u30e9\u30a4\u30bb\u30f3\u30b9\u306b\u57fa\u3065\u3044\u3066\u516c\u958b\u30fb\u914d\u5e03\u3055\u308c\u3066\u3044\u308b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3067\u3059\u3002 \u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u8a73\u7d30\u306f LICENSE \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u30b3\u30df\u30e5\u30cb\u30c6\u30a3 PG-Strom\u306b\u95a2\u3059\u308b\u8cea\u554f\u3084\u8981\u671b\u3001\u969c\u5bb3\u5831\u544a\u306a\u3069\u306f\u3001 GitHub\u306eDiscussion \u30da\u30fc\u30b8\u306b\u6295\u7a3f\u3059\u308b\u3088\u3046\u304a\u9858\u3044\u3057\u307e\u3059\u3002 \u672c\u63b2\u793a\u677f\u306f\u3001\u4e16\u754c\u4e2d\u306b\u516c\u958b\u3055\u308c\u305f\u30d1\u30d6\u30ea\u30c3\u30af\u306e\u63b2\u793a\u677f\u3067\u3042\u308b\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3064\u307e\u308a\u3001\u81ea\u5df1\u8cac\u4efb\u306e\u4e0b\u3001\u79d8\u5bc6\u60c5\u5831\u304c\u8aa4\u3063\u3066\u6295\u7a3f\u3055\u308c\u306a\u3044\u3088\u3046\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u672c\u63b2\u793a\u677f\u306e\u512a\u5148\u8a00\u8a9e\u306f\u82f1\u8a9e\u3067\u3059\u3002\u305f\u3060\u4e00\u65b9\u3067\u3001\u6b74\u53f2\u7684\u7d4c\u7def\u306b\u3088\u308aPG-Strom\u30e6\u30fc\u30b6\u306e\u591a\u304f\u306e\u5272\u5408\u304c\u65e5\u672c\u4eba\u3067\u3042\u308b\u4e8b\u306f\u627f\u77e5\u3057\u3066\u304a\u308a\u3001Discussion\u4e0a\u3067\u65e5\u672c\u8a9e\u3092\u5229\u7528\u3057\u305f\u8b70\u8ad6\u304c\u884c\u308f\u308c\u308b\u3053\u3068\u3082\u53ef\u80fd\u3068\u3057\u307e\u3059\u3002\u305d\u306e\u5834\u5408\u3001Subject(\u4ef6\u540d)\u306b (JP) \u3068\u3044\u3046\u63a5\u982d\u53e5\u3092\u4ed8\u3051\u308b\u4e8b\u3092\u5fd8\u308c\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306f\u975e\u65e5\u672c\u8a9e\u8a71\u8005\u304c\u4e0d\u8981\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8aad\u307f\u98db\u3070\u3059\u305f\u3081\u306b\u6709\u7528\u3067\u3059\u3002 \u30d0\u30b0\u3084\u969c\u5bb3\u306e\u5831\u544a \u7d50\u679c\u4e0d\u6b63\u3084\u30b7\u30b9\u30c6\u30e0\u30af\u30e9\u30c3\u30b7\u30e5/\u30ed\u30c3\u30af\u30a2\u30c3\u30d7\u3001\u305d\u306e\u4ed6\u306e\u7591\u308f\u3057\u3044\u52d5\u4f5c\u3092\u767a\u898b\u3057\u305f\u5834\u5408\u306f\u3001 PG-Strom Issue Tracker \u3067\u65b0\u3057\u3044\u30a4\u30b7\u30e5\u30fc\u3092\u30aa\u30fc\u30d7\u30f3\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u30d0\u30b0\u30ec\u30dd\u30fc\u30c8\u306e\u4f5c\u6210\u306b\u969b\u3057\u3066\u306f\u3001\u4e0b\u8a18\u306e\u70b9\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 - \u540c\u3058\u554f\u984c\u3092\u6700\u65b0\u7248\u3067\u518d\u73fe\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u304b\u3069\u3046\u304b? - PG-Strom\u306e\u6700\u65b0\u7248\u3060\u3051\u3067\u306a\u304f\u3001OS\u3001CUDA\u3001PostgreSQL\u304a\u3088\u3073\u95a2\u9023\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u6700\u65b0\u7248\u3067\u30c6\u30b9\u30c8\u3059\u308b\u4e8b\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002 - PG-Strom\u304c\u7121\u52b9\u5316\u3055\u308c\u305f\u72b6\u614b\u3067\u3082\u540c\u3058\u554f\u984c\u3092\u518d\u73fe\u3067\u304d\u308b\u304b\u3069\u3046\u304b? - GUC\u30d1\u30e9\u30e1\u30fc\u30bf pg_strom.enabled \u306b\u3088\u3063\u3066PG-Strom\u306e\u6709\u52b9/\u7121\u52b9\u3092\u5207\u308a\u66ff\u3048\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 - \u540c\u3058\u65e2\u77e5\u554f\u984c\u304c\u65e2\u306bGitHub\u306e\u30a4\u30b7\u30e5\u30fc\u30c8\u30e9\u30c3\u30ab\u30fc\u306b\u5b58\u5728\u3059\u308b\u304b\u3069\u3046\u304b\uff1f - close \u72b6\u614b\u306e\u30a4\u30b7\u30e5\u30fc\u3092\u691c\u7d22\u3059\u308b\u306e\u3092\u5fd8\u308c\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306a\u60c5\u5831\u306f\u30d0\u30b0\u5831\u544a\u306b\u304a\u3044\u3066\u6709\u7528\u3067\u3059\u3002 \u554f\u984c\u3092\u518d\u73fe\u3059\u308b\u624b\u9806\uff08\u30c7\u30fc\u30bf\u304a\u3088\u3073\u30af\u30a8\u30ea\uff09 \u554f\u984c\u30af\u30a8\u30ea\u306e EXPLAIN VERBOSE \u51fa\u529b \u95a2\u9023\u3059\u308b\u30c6\u30fc\u30d6\u30eb\u306e\u30c7\u30fc\u30bf\u69cb\u9020\uff08 psql \u4e0a\u3067 \\d+ \u3092\u5b9f\u884c\u3057\u3066\u5f97\u3089\u308c\u308b\uff09 \u51fa\u529b\u3055\u308c\u305f\u30ed\u30b0\u30e1\u30c3\u30bb\u30fc\u30b8\uff08verbose\u51fa\u529b\u304c\u671b\u307e\u3057\u3044\uff09 \u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u304b\u3089\u5909\u66f4\u3057\u3066\u3044\u308bGUC\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u5024 \u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u8a2d\u5b9a\uff08\u7279\u306bGPU\u306e\u578b\u756a\u3068RAM\u5bb9\u91cf\uff09 \u3042\u306a\u305f\u306e\u74b0\u5883\u3067\u767a\u751f\u3057\u305f\u7591\u308f\u3057\u3044\u52d5\u4f5c\u304c\u30d0\u30b0\u304b\u3069\u3046\u304b\u5b9a\u304b\u3067\u306f\u306a\u3044\u5834\u5408\u3001\u65b0\u3057\u3044\u30a4\u30b7\u30e5\u30fc\u306e\u30c1\u30b1\u30c3\u30c8\u3092\u30aa\u30fc\u30d7\u30f3\u3059\u308b\u524d\u306bDiscussion\u63b2\u793a\u677f\u3078\u5831\u544a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u8ffd\u52a0\u7684\u306a\u60c5\u5831\u63a1\u53d6\u306e\u4f9d\u983c\u306a\u3069\u3001\u958b\u767a\u8005\u306f\u6b21\u306b\u53d6\u308b\u3079\u304d\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u63d0\u6848\u3057\u3066\u304f\u308c\u308b\u3067\u3057\u3087\u3046\u3002 \u65b0\u6a5f\u80fd\u306e\u63d0\u6848 \u4f55\u304b\u65b0\u6a5f\u80fd\u306e\u30a2\u30a4\u30c7\u30a2\u304c\u3042\u308b\u5834\u5408\u3001 PG-Strom Issue Tracker \u3067\u65b0\u3057\u3044\u30a4\u30b7\u30e5\u30fc\u3092\u30aa\u30fc\u30d7\u30f3\u3057 feature \u30bf\u30b0\u3092\u4ed8\u3051\u3066\u304f\u3060\u3055\u3044\u3002\u7d9a\u3044\u3066\u3001\u4ed6\u306e\u958b\u767a\u8005\u3068\u8b70\u8ad6\u3092\u884c\u3044\u307e\u3057\u3087\u3046\u3002 \u671b\u307e\u3057\u3044\u65b0\u6a5f\u80fd\u63d0\u6848\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8981\u7d20\u3092\u542b\u3093\u3067\u3044\u307e\u3059\u3002 \u3042\u306a\u305f\u306f\u3069\u306e\u3088\u3046\u306a\u554f\u984c\u3092\u89e3\u6c7a/\u6539\u5584\u3057\u305f\u3044\u306e\u304b\uff1f \u3042\u306a\u305f\u306e\u30ef\u30fc\u30af\u30ed\u30fc\u30c9/\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u306b\u3068\u3063\u3066\u3069\u306e\u7a0b\u5ea6\u6df1\u523b\u306a\u306e\u304b\uff1f \u3069\u306e\u3088\u3046\u306b\u305d\u308c\u3092\u5b9f\u88c5\u3059\u308b\u306e\u304b\uff1f \uff08\u3082\u3057\u3042\u308c\u3070\uff09\u4e88\u60f3\u3055\u308c\u308b\u6b20\u70b9\u30fb\u30c8\u30ec\u30fc\u30c9\u30aa\u30d5 \u958b\u767a\u8005\u306e\u9593\u3067\u305d\u306e\u5fc5\u8981\u6027\u306b\u95a2\u3057\u3066\u30b3\u30f3\u30bb\u30f3\u30b5\u30b9\u304c\u5f97\u3089\u308c\u308b\u3068\u3001\u30b3\u30fc\u30c7\u30a3\u30cd\u30fc\u30bf\u30fc\u306f\u30a4\u30b7\u30e5\u30fc\u30c1\u30b1\u30c3\u30c8\u306b accepted \u30bf\u30b0\u3092\u4ed8\u3051\u3001\u305d\u306e\u30c1\u30b1\u30c3\u30c8\u306f\u305d\u306e\u5f8c\u306e\u958b\u767a\u4f5c\u696d\u306e\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0\u306e\u305f\u3081\u306b\u5229\u7528\u3055\u308c\u307e\u3059\u3002\u305d\u308c\u4ee5\u5916\u306e\u5834\u5408\u3001\u30a4\u30b7\u30e5\u30fc\u30c1\u30b1\u30c3\u30c8\u306b\u306f rejected \u30bf\u30b0\u3092\u4ed8\u3051\u3066\u30af\u30ed\u30fc\u30ba\u3055\u308c\u307e\u3059\u3002 \u4e00\u5ea6\u30d7\u30ed\u30dd\u30fc\u30b6\u30eb\u304c\u5374\u4e0b\u3055\u308c\u305f\u3068\u3057\u3066\u3082\u3001\u5c06\u6765\u306b\u304a\u3044\u3066\u307e\u305f\u7570\u306a\u3063\u305f\u6c7a\u5b9a\u304c\u3042\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u5468\u8fba\u72b6\u6cc1\u304c\u5909\u308f\u3063\u305f\u5834\u5408\u3001\u65b0\u6a5f\u80fd\u306e\u518d\u63d0\u6848\u3092\u8e8a\u8e87\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u958b\u767a\u6bb5\u968e\u3067\u306f\u3001\u30d1\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30b7\u30e5\u30fc\u30c1\u30b1\u30c3\u30c8\u306b\u6dfb\u4ed8\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002pull-request\u306f\u4f7f\u7528\u3057\u307e\u305b\u3093\u3002 \u30b5\u30dd\u30fc\u30c8\u30dd\u30ea\u30b7\u30fc PG-Strom development team\u306fHeteroDB Software Distribution Center\u304b\u3089\u914d\u5e03\u3055\u308c\u305f\u6700\u65b0\u7248\u306e\u307f\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002 \u30c8\u30e9\u30d6\u30eb\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u3001\u307e\u305a\u305d\u306e\u554f\u984c\u306f\u6700\u65b0\u7248\u306e\u30ea\u30ea\u30fc\u30b9\u3067\u518d\u73fe\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u304b\u3081\u3066\u304f\u3060\u3055\u3044\u3002 \u307e\u305f\u3001\u3053\u308c\u306f\u30dc\u30e9\u30f3\u30c6\u30a3\u30a2\u30d9\u30fc\u30b9\u306e\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u30b5\u30dd\u30fc\u30c8\u306e\u30dd\u30ea\u30b7\u30fc\u3067\u3042\u308b\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3064\u307e\u308a\u3001\u30b5\u30dd\u30fc\u30c8\u306f\u30d9\u30b9\u30c8\u30a8\u30d5\u30a9\u30fc\u30c8\u3067\u304b\u3064\u3001SLA\u306e\u5b9a\u7fa9\u3082\u3042\u308a\u307e\u305b\u3093\u3002 \u3082\u3057\u5546\u7528\u306e\u30b5\u30dd\u30fc\u30c8\u304c\u5fc5\u8981\u3067\u3042\u308b\u5834\u5408\u3001HeteroDB\u793e\uff08contact@heterodbcom\uff09\u306b\u30b3\u30f3\u30bf\u30af\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\u3002","title":"\u306f\u3058\u3081\u306b"},{"location":"#_1","text":"\u672c\u7ae0\u3067\u306fPG-Strom\u306e\u6982\u8981\u3001\u304a\u3088\u3073\u958b\u767a\u8005\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002","title":"\u306f\u3058\u3081\u306b"},{"location":"#pg-strom","text":"PG-Strom\u306fPostgreSQL v15\u304a\u3088\u3073\u4ee5\u964d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u5411\u3051\u306b\u8a2d\u8a08\u3055\u308c\u305f\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3001\u30c1\u30c3\u30d7\u3042\u305f\u308a\u6570\u5343\u500b\u306e\u30b3\u30a2\u3092\u6301\u3064GPU(Graphic Processor Unit)\u30c7\u30d0\u30a4\u30b9\u3092\u5229\u7528\u3059\u308b\u4e8b\u3067\u3001\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u5bfe\u3059\u308b\u96c6\u8a08\u30fb\u89e3\u6790\u51e6\u7406\u3084\u30d0\u30c3\u30c1\u51e6\u7406\u5411\u3051\u306eSQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u9ad8\u901f\u5316\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u3055\u308c\u3066\u3044\u307e\u3059\u3002 PG-Strom\u306e\u4e2d\u6838\u3068\u306a\u308b\u6a5f\u80fd\u306f\u3001SQL\u547d\u4ee4\u304b\u3089\u81ea\u52d5\u7684\u306bGPU\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u751f\u6210\u3059\u308b\u30b3\u30fc\u30c9\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\u3068\u3001SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092GPU\u4e0a\u3067\u975e\u540c\u671f\u304b\u3064\u4e26\u5217\u306b\u5b9f\u884c\u3059\u308b\u5b9f\u884c\u30a8\u30f3\u30b8\u30f3\u3067\u3059\u3002\u73fe\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306fSCAN\uff08WHERE\u53e5\u306e\u8a55\u4fa1\uff09\u3001JOIN\u304a\u3088\u3073GROUP BY\u306e\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u5bfe\u5fdc\u3057\u3066\u304a\u308a\u3001GPU\u51e6\u7406\u306b\u30a2\u30c9\u30d0\u30f3\u30c6\u30fc\u30b8\u304c\u3042\u308b\u5834\u5408\u306b\u306fPostgreSQL\u6a19\u6e96\u306e\u5b9f\u88c5\u3092\u7f6e\u304d\u63db\u3048\u308b\u4e8b\u3067\u3001\u30e6\u30fc\u30b6\u3084\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304b\u3089\u306f\u900f\u904e\u7684\u306b\u52d5\u4f5c\u3057\u307e\u3059\u3002 PG-Strom\u306f\uff12\u3064\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002\u4e00\u3064\u306f\u884c\u5f62\u5f0f\u3067\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308bPostgreSQL\u306eheap\u30b9\u30c8\u30ec\u30fc\u30b8\u30b7\u30b9\u30c6\u30e0\u3067\u3001\u3053\u308c\u306f\u5fc5\u305a\u3057\u3082\u96c6\u8a08\u30fb\u89e3\u6790\u7cfb\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u6700\u9069\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u4e00\u65b9\u3067\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7cfb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089\u30c7\u30fc\u30bf\u3092\u79fb\u52d5\u3059\u308b\u4e8b\u306a\u304f\u96c6\u8a08\u51e6\u7406\u3092\u5b9f\u884c\u3067\u304d\u308b\u3068\u3044\u3046\u30a2\u30c9\u30d0\u30f3\u30c6\u30fc\u30b8\u304c\u3042\u308a\u307e\u3059\u3002\u3082\u3046\u4e00\u3064\u306f\u3001\u5217\u5f62\u5f0f\u306e\u69cb\u9020\u5316\u30c7\u30fc\u30bf\u5f62\u5f0f\u3067\u3042\u308b Apache Arrow \u30d5\u30a1\u30a4\u30eb\u3067\u3001\u884c\u5358\u4f4d\u306e\u30c7\u30fc\u30bf\u66f4\u65b0\u306b\u306f\u4e0d\u5411\u304d\u3067\u3042\u308b\u3082\u306e\u306e\u3001\u52b9\u7387\u7684\u306b\u5927\u91cf\u30c7\u30fc\u30bf\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u4e8b\u304c\u3067\u304d\u3001\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1(FDW)\u3092\u901a\u3057\u3066\u52b9\u7387\u7684\u306a\u30c7\u30fc\u30bf\u306e\u691c\u7d22\u30fb\u96c6\u8a08\u304c\u53ef\u80fd\u3067\u3059\u3002 PG-Strom\u306e\u7279\u5fb4\u7684\u306a\u6a5f\u80fd\u306e\u4e00\u3064\u304c\u3001NVME/NVME-oF\u30c7\u30d0\u30a4\u30b9\u304b\u3089CPU/RAM\u3092\u30d0\u30a4\u30d1\u30b9\u3057\u3066GPU\u306b\u76f4\u63a5\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u3057\u3001GPU\u3067SQL\u51e6\u7406\u3092\u5b9f\u884c\u3059\u308b\u4e8b\u3067\u30c7\u30d0\u30a4\u30b9\u306e\u5e2f\u57df\u3092\u6700\u5927\u9650\u306b\u5f15\u304d\u51fa\u3059GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u6a5f\u80fd\u3067\u3059\u3002v3.0\u3067\u306f\u65b0\u305f\u306bNVIDIA GPUDirect Storage\u306b\u3082\u5bfe\u5fdc\u3057\u3001\u30ed\u30fc\u30ab\u30ebNVME-SSD\u3060\u3051\u3067\u306a\u304f\u3001NVME-oF\u3092\u4ecb\u3057\u305fSDS(Software Defined Storage)\u30c7\u30d0\u30a4\u30b9\u3084\u3001\u5171\u6709\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u304b\u3089\u306e\u8aad\u307f\u51fa\u3057\u306b\u3082\u5bfe\u5fdc\u3057\u307e\u3059\u3002 v3.0\u3067\u306f\u4e00\u90e8\u306ePostGIS\u95a2\u6570\u3068\u3001\u30b8\u30aa\u30e1\u30c8\u30ea\u30c7\u30fc\u30bf\u306eGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u63a2\u7d22\u3092GPU\u5074\u3067\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u66f4\u65b0\u306e\u591a\u3044\u30c6\u30fc\u30d6\u30eb\u306e\u5185\u5bb9\u3092\u4e88\u3081GPU\u306b\u8907\u88fd\u3057\u3066\u304a\u304fGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u6a5f\u80fd\u3068\u4f75\u305b\u3066\u3001\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306a\u4f4d\u7f6e\u60c5\u5831\u306b\u57fa\u3065\u304f\u691c\u7d22\u3001\u5206\u6790\u51e6\u7406\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059\u3002 v5.0\u3067\u306f\u30d7\u30ed\u30bb\u30b9\u30e2\u30c7\u30eb\u306e\u66f4\u65b0\uff08\u30de\u30eb\u30c1\u30d7\u30ed\u30bb\u30b9\u21d2\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\uff09\u3084\u3001\u30cd\u30a4\u30c6\u30a3\u30d6\u30b3\u30fc\u30c9\u304b\u3089\u7591\u4f3c\u30b3\u30fc\u30c9\u3078\u306e\u5207\u308a\u66ff\u3048\u306a\u3069\u3001\u6839\u672c\u7684\u306a\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u8a2d\u8a08\u306e\u5909\u66f4\u304c\u884c\u308f\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u5168\u822c\u7684\u306a\u51e6\u7406\u901f\u5ea6\u3084\u5b89\u5b9a\u6027\u306e\u6539\u5584\u304c\u56f3\u3089\u308c\u307e\u3057\u305f\u3002","title":"PG-Strom\u3068\u306f?"},{"location":"#_2","text":"PG-Strom\u306fPostgreSQL\u30e9\u30a4\u30bb\u30f3\u30b9\u306b\u57fa\u3065\u3044\u3066\u516c\u958b\u30fb\u914d\u5e03\u3055\u308c\u3066\u3044\u308b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3067\u3059\u3002 \u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u8a73\u7d30\u306f LICENSE \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002","title":"\u30e9\u30a4\u30bb\u30f3\u30b9\u3068\u8457\u4f5c\u6a29"},{"location":"#_3","text":"PG-Strom\u306b\u95a2\u3059\u308b\u8cea\u554f\u3084\u8981\u671b\u3001\u969c\u5bb3\u5831\u544a\u306a\u3069\u306f\u3001 GitHub\u306eDiscussion \u30da\u30fc\u30b8\u306b\u6295\u7a3f\u3059\u308b\u3088\u3046\u304a\u9858\u3044\u3057\u307e\u3059\u3002 \u672c\u63b2\u793a\u677f\u306f\u3001\u4e16\u754c\u4e2d\u306b\u516c\u958b\u3055\u308c\u305f\u30d1\u30d6\u30ea\u30c3\u30af\u306e\u63b2\u793a\u677f\u3067\u3042\u308b\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3064\u307e\u308a\u3001\u81ea\u5df1\u8cac\u4efb\u306e\u4e0b\u3001\u79d8\u5bc6\u60c5\u5831\u304c\u8aa4\u3063\u3066\u6295\u7a3f\u3055\u308c\u306a\u3044\u3088\u3046\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u672c\u63b2\u793a\u677f\u306e\u512a\u5148\u8a00\u8a9e\u306f\u82f1\u8a9e\u3067\u3059\u3002\u305f\u3060\u4e00\u65b9\u3067\u3001\u6b74\u53f2\u7684\u7d4c\u7def\u306b\u3088\u308aPG-Strom\u30e6\u30fc\u30b6\u306e\u591a\u304f\u306e\u5272\u5408\u304c\u65e5\u672c\u4eba\u3067\u3042\u308b\u4e8b\u306f\u627f\u77e5\u3057\u3066\u304a\u308a\u3001Discussion\u4e0a\u3067\u65e5\u672c\u8a9e\u3092\u5229\u7528\u3057\u305f\u8b70\u8ad6\u304c\u884c\u308f\u308c\u308b\u3053\u3068\u3082\u53ef\u80fd\u3068\u3057\u307e\u3059\u3002\u305d\u306e\u5834\u5408\u3001Subject(\u4ef6\u540d)\u306b (JP) \u3068\u3044\u3046\u63a5\u982d\u53e5\u3092\u4ed8\u3051\u308b\u4e8b\u3092\u5fd8\u308c\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306f\u975e\u65e5\u672c\u8a9e\u8a71\u8005\u304c\u4e0d\u8981\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8aad\u307f\u98db\u3070\u3059\u305f\u3081\u306b\u6709\u7528\u3067\u3059\u3002","title":"\u30b3\u30df\u30e5\u30cb\u30c6\u30a3"},{"location":"#_4","text":"\u7d50\u679c\u4e0d\u6b63\u3084\u30b7\u30b9\u30c6\u30e0\u30af\u30e9\u30c3\u30b7\u30e5/\u30ed\u30c3\u30af\u30a2\u30c3\u30d7\u3001\u305d\u306e\u4ed6\u306e\u7591\u308f\u3057\u3044\u52d5\u4f5c\u3092\u767a\u898b\u3057\u305f\u5834\u5408\u306f\u3001 PG-Strom Issue Tracker \u3067\u65b0\u3057\u3044\u30a4\u30b7\u30e5\u30fc\u3092\u30aa\u30fc\u30d7\u30f3\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u30d0\u30b0\u30ec\u30dd\u30fc\u30c8\u306e\u4f5c\u6210\u306b\u969b\u3057\u3066\u306f\u3001\u4e0b\u8a18\u306e\u70b9\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 - \u540c\u3058\u554f\u984c\u3092\u6700\u65b0\u7248\u3067\u518d\u73fe\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u304b\u3069\u3046\u304b? - PG-Strom\u306e\u6700\u65b0\u7248\u3060\u3051\u3067\u306a\u304f\u3001OS\u3001CUDA\u3001PostgreSQL\u304a\u3088\u3073\u95a2\u9023\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u6700\u65b0\u7248\u3067\u30c6\u30b9\u30c8\u3059\u308b\u4e8b\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002 - PG-Strom\u304c\u7121\u52b9\u5316\u3055\u308c\u305f\u72b6\u614b\u3067\u3082\u540c\u3058\u554f\u984c\u3092\u518d\u73fe\u3067\u304d\u308b\u304b\u3069\u3046\u304b? - GUC\u30d1\u30e9\u30e1\u30fc\u30bf pg_strom.enabled \u306b\u3088\u3063\u3066PG-Strom\u306e\u6709\u52b9/\u7121\u52b9\u3092\u5207\u308a\u66ff\u3048\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 - \u540c\u3058\u65e2\u77e5\u554f\u984c\u304c\u65e2\u306bGitHub\u306e\u30a4\u30b7\u30e5\u30fc\u30c8\u30e9\u30c3\u30ab\u30fc\u306b\u5b58\u5728\u3059\u308b\u304b\u3069\u3046\u304b\uff1f - close \u72b6\u614b\u306e\u30a4\u30b7\u30e5\u30fc\u3092\u691c\u7d22\u3059\u308b\u306e\u3092\u5fd8\u308c\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306a\u60c5\u5831\u306f\u30d0\u30b0\u5831\u544a\u306b\u304a\u3044\u3066\u6709\u7528\u3067\u3059\u3002 \u554f\u984c\u3092\u518d\u73fe\u3059\u308b\u624b\u9806\uff08\u30c7\u30fc\u30bf\u304a\u3088\u3073\u30af\u30a8\u30ea\uff09 \u554f\u984c\u30af\u30a8\u30ea\u306e EXPLAIN VERBOSE \u51fa\u529b \u95a2\u9023\u3059\u308b\u30c6\u30fc\u30d6\u30eb\u306e\u30c7\u30fc\u30bf\u69cb\u9020\uff08 psql \u4e0a\u3067 \\d+ \u3092\u5b9f\u884c\u3057\u3066\u5f97\u3089\u308c\u308b\uff09 \u51fa\u529b\u3055\u308c\u305f\u30ed\u30b0\u30e1\u30c3\u30bb\u30fc\u30b8\uff08verbose\u51fa\u529b\u304c\u671b\u307e\u3057\u3044\uff09 \u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u304b\u3089\u5909\u66f4\u3057\u3066\u3044\u308bGUC\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u5024 \u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u8a2d\u5b9a\uff08\u7279\u306bGPU\u306e\u578b\u756a\u3068RAM\u5bb9\u91cf\uff09 \u3042\u306a\u305f\u306e\u74b0\u5883\u3067\u767a\u751f\u3057\u305f\u7591\u308f\u3057\u3044\u52d5\u4f5c\u304c\u30d0\u30b0\u304b\u3069\u3046\u304b\u5b9a\u304b\u3067\u306f\u306a\u3044\u5834\u5408\u3001\u65b0\u3057\u3044\u30a4\u30b7\u30e5\u30fc\u306e\u30c1\u30b1\u30c3\u30c8\u3092\u30aa\u30fc\u30d7\u30f3\u3059\u308b\u524d\u306bDiscussion\u63b2\u793a\u677f\u3078\u5831\u544a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u8ffd\u52a0\u7684\u306a\u60c5\u5831\u63a1\u53d6\u306e\u4f9d\u983c\u306a\u3069\u3001\u958b\u767a\u8005\u306f\u6b21\u306b\u53d6\u308b\u3079\u304d\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u63d0\u6848\u3057\u3066\u304f\u308c\u308b\u3067\u3057\u3087\u3046\u3002","title":"\u30d0\u30b0\u3084\u969c\u5bb3\u306e\u5831\u544a"},{"location":"#_5","text":"\u4f55\u304b\u65b0\u6a5f\u80fd\u306e\u30a2\u30a4\u30c7\u30a2\u304c\u3042\u308b\u5834\u5408\u3001 PG-Strom Issue Tracker \u3067\u65b0\u3057\u3044\u30a4\u30b7\u30e5\u30fc\u3092\u30aa\u30fc\u30d7\u30f3\u3057 feature \u30bf\u30b0\u3092\u4ed8\u3051\u3066\u304f\u3060\u3055\u3044\u3002\u7d9a\u3044\u3066\u3001\u4ed6\u306e\u958b\u767a\u8005\u3068\u8b70\u8ad6\u3092\u884c\u3044\u307e\u3057\u3087\u3046\u3002 \u671b\u307e\u3057\u3044\u65b0\u6a5f\u80fd\u63d0\u6848\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8981\u7d20\u3092\u542b\u3093\u3067\u3044\u307e\u3059\u3002 \u3042\u306a\u305f\u306f\u3069\u306e\u3088\u3046\u306a\u554f\u984c\u3092\u89e3\u6c7a/\u6539\u5584\u3057\u305f\u3044\u306e\u304b\uff1f \u3042\u306a\u305f\u306e\u30ef\u30fc\u30af\u30ed\u30fc\u30c9/\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u306b\u3068\u3063\u3066\u3069\u306e\u7a0b\u5ea6\u6df1\u523b\u306a\u306e\u304b\uff1f \u3069\u306e\u3088\u3046\u306b\u305d\u308c\u3092\u5b9f\u88c5\u3059\u308b\u306e\u304b\uff1f \uff08\u3082\u3057\u3042\u308c\u3070\uff09\u4e88\u60f3\u3055\u308c\u308b\u6b20\u70b9\u30fb\u30c8\u30ec\u30fc\u30c9\u30aa\u30d5 \u958b\u767a\u8005\u306e\u9593\u3067\u305d\u306e\u5fc5\u8981\u6027\u306b\u95a2\u3057\u3066\u30b3\u30f3\u30bb\u30f3\u30b5\u30b9\u304c\u5f97\u3089\u308c\u308b\u3068\u3001\u30b3\u30fc\u30c7\u30a3\u30cd\u30fc\u30bf\u30fc\u306f\u30a4\u30b7\u30e5\u30fc\u30c1\u30b1\u30c3\u30c8\u306b accepted \u30bf\u30b0\u3092\u4ed8\u3051\u3001\u305d\u306e\u30c1\u30b1\u30c3\u30c8\u306f\u305d\u306e\u5f8c\u306e\u958b\u767a\u4f5c\u696d\u306e\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0\u306e\u305f\u3081\u306b\u5229\u7528\u3055\u308c\u307e\u3059\u3002\u305d\u308c\u4ee5\u5916\u306e\u5834\u5408\u3001\u30a4\u30b7\u30e5\u30fc\u30c1\u30b1\u30c3\u30c8\u306b\u306f rejected \u30bf\u30b0\u3092\u4ed8\u3051\u3066\u30af\u30ed\u30fc\u30ba\u3055\u308c\u307e\u3059\u3002 \u4e00\u5ea6\u30d7\u30ed\u30dd\u30fc\u30b6\u30eb\u304c\u5374\u4e0b\u3055\u308c\u305f\u3068\u3057\u3066\u3082\u3001\u5c06\u6765\u306b\u304a\u3044\u3066\u307e\u305f\u7570\u306a\u3063\u305f\u6c7a\u5b9a\u304c\u3042\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u5468\u8fba\u72b6\u6cc1\u304c\u5909\u308f\u3063\u305f\u5834\u5408\u3001\u65b0\u6a5f\u80fd\u306e\u518d\u63d0\u6848\u3092\u8e8a\u8e87\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u958b\u767a\u6bb5\u968e\u3067\u306f\u3001\u30d1\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30b7\u30e5\u30fc\u30c1\u30b1\u30c3\u30c8\u306b\u6dfb\u4ed8\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002pull-request\u306f\u4f7f\u7528\u3057\u307e\u305b\u3093\u3002","title":"\u65b0\u6a5f\u80fd\u306e\u63d0\u6848"},{"location":"#_6","text":"PG-Strom development team\u306fHeteroDB Software Distribution Center\u304b\u3089\u914d\u5e03\u3055\u308c\u305f\u6700\u65b0\u7248\u306e\u307f\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002 \u30c8\u30e9\u30d6\u30eb\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u3001\u307e\u305a\u305d\u306e\u554f\u984c\u306f\u6700\u65b0\u7248\u306e\u30ea\u30ea\u30fc\u30b9\u3067\u518d\u73fe\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u304b\u3081\u3066\u304f\u3060\u3055\u3044\u3002 \u307e\u305f\u3001\u3053\u308c\u306f\u30dc\u30e9\u30f3\u30c6\u30a3\u30a2\u30d9\u30fc\u30b9\u306e\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u30b5\u30dd\u30fc\u30c8\u306e\u30dd\u30ea\u30b7\u30fc\u3067\u3042\u308b\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3064\u307e\u308a\u3001\u30b5\u30dd\u30fc\u30c8\u306f\u30d9\u30b9\u30c8\u30a8\u30d5\u30a9\u30fc\u30c8\u3067\u304b\u3064\u3001SLA\u306e\u5b9a\u7fa9\u3082\u3042\u308a\u307e\u305b\u3093\u3002 \u3082\u3057\u5546\u7528\u306e\u30b5\u30dd\u30fc\u30c8\u304c\u5fc5\u8981\u3067\u3042\u308b\u5834\u5408\u3001HeteroDB\u793e\uff08contact@heterodbcom\uff09\u306b\u30b3\u30f3\u30bf\u30af\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\u3002","title":"\u30b5\u30dd\u30fc\u30c8\u30dd\u30ea\u30b7\u30fc"},{"location":"arrow_fdw/","text":"Apache Arrow (\u5217\u6307\u5411\u30c7\u30fc\u30bf\u30b9\u30c8\u30a2) \u6982\u8981 PostgreSQL\u306e\u30c6\u30fc\u30d6\u30eb\u306f\u5185\u90e8\u7684\u306b8KB\u306e\u30d6\u30ed\u30c3\u30af 1 \u3068\u547c\u3070\u308c\u308b\u5358\u4f4d\u3067\u7de8\u6210\u3055\u308c\u3001\u30d6\u30ed\u30c3\u30af\u306f\u5168\u3066\u306e\u5c5e\u6027\u53ca\u3073\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u542b\u3080\u30bf\u30d7\u30eb\u3068\u547c\u3070\u308c\u308b\u30c7\u30fc\u30bf\u69cb\u9020\u3092\u884c\u5358\u4f4d\u3067\u683c\u7d0d\u3057\u307e\u3059\u3002\u884c\u3092\u69cb\u6210\u3059\u308b\u30c7\u30fc\u30bf\u304c\u8fd1\u508d\u306b\u5b58\u5728\u3059\u308b\u305f\u3081\u3001\u3053\u308c\u306fINSERT\u3084UPDATE\u306e\u591a\u3044\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u6709\u52b9\u3067\u3059\u304c\u3001\u4e00\u65b9\u3067\u5927\u91cf\u30c7\u30fc\u30bf\u306e\u96c6\u8a08\u30fb\u89e3\u6790\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u306f\u4e0d\u5411\u304d\u3067\u3042\u308b\u3068\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u901a\u5e38\u3001\u5927\u91cf\u30c7\u30fc\u30bf\u306e\u96c6\u8a08\u306b\u304a\u3044\u3066\u306f\u30c6\u30fc\u30d6\u30eb\u5185\u306e\u5168\u3066\u306e\u5217\u3092\u53c2\u7167\u3059\u308b\u4e8b\u306f\u73cd\u3057\u304f\u3001\u591a\u304f\u306e\u5834\u5408\u306b\u306f\u4e00\u90e8\u306e\u5217\u3060\u3051\u3092\u53c2\u7167\u3059\u308b\u3068\u3044\u3063\u305f\u51e6\u7406\u306b\u306a\u308a\u304c\u3061\u3067\u3059\u3002\u3053\u306e\u5834\u5408\u3001\u5b9f\u969b\u306b\u306f\u53c2\u7167\u3055\u308c\u306a\u3044\u5217\u306e\u30c7\u30fc\u30bf\u3092\u30b9\u30c8\u30ec\u30fc\u30b8\u304b\u3089\u30ed\u30fc\u30c9\u3059\u308b\u305f\u3081\u306b\u6d88\u8cbb\u3055\u308c\u308bI/O\u306e\u5e2f\u57df\u306f\u5168\u304f\u7121\u99c4\u3067\u3059\u304c\u3001\u884c\u5358\u4f4d\u3067\u7de8\u6210\u3055\u308c\u305f\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u7279\u5b9a\u306e\u5217\u3060\u3051\u3092\u53d6\u308a\u51fa\u3059\u3068\u3044\u3046\u64cd\u4f5c\u306f\u56f0\u96e3\u3067\u3059\u3002 \u9006\u306b\u5217\u5358\u4f4d\u3067\u30c7\u30fc\u30bf\u3092\u7de8\u6210\u3057\u305f\u5834\u5408\u3001INSERT\u3084UPDATE\u306e\u591a\u3044\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u5bfe\u3057\u3066\u306f\u6975\u7aef\u306b\u4e0d\u5229\u3067\u3059\u304c\u3001\u5927\u91cf\u30c7\u30fc\u30bf\u306e\u96c6\u8a08\u30fb\u89e3\u6790\u3092\u884c\u3046\u969b\u306b\u306f\u88ab\u53c2\u7167\u5217\u3060\u3051\u3092\u30b9\u30c8\u30ec\u30fc\u30b8\u304b\u3089\u30ed\u30fc\u30c9\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u308b\u305f\u3081\u3001I/O\u306e\u5e2f\u57df\u3092\u6700\u5927\u9650\u306b\u6d3b\u7528\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 \u307e\u305f\u30d7\u30ed\u30bb\u30c3\u30b5\u306e\u51e6\u7406\u52b9\u7387\u306e\u89b3\u70b9\u304b\u3089\u3082\u3001\u5217\u5358\u4f4d\u306b\u7de8\u6210\u3055\u308c\u305f\u30c7\u30fc\u30bf\u306f\u5358\u7d14\u306a\u914d\u5217\u3067\u3042\u308b\u304b\u306e\u3088\u3046\u306b\u898b\u3048\u308b\u305f\u3081\u3001GPU\u306b\u3068\u3063\u3066\u306fCoalesced Memory Access\u3068\u3044\u3046\u30e1\u30e2\u30ea\u30d0\u30b9\u306e\u6027\u80fd\u3092\u6700\u5927\u9650\u306b\u5f15\u304d\u51fa\u3059\u30a2\u30af\u30bb\u30b9\u30d1\u30bf\u30fc\u30f3\u3068\u306a\u308b\u4e8b\u304c\u671f\u5f85\u3067\u304d\u307e\u3059\u3002 Apache Arrow\u3068\u306f Apache Arrow\u3068\u306f\u3001\u69cb\u9020\u5316\u30c7\u30fc\u30bf\u3092\u5217\u5f62\u5f0f\u3067\u8a18\u9332\u3001\u4ea4\u63db\u3059\u308b\u305f\u3081\u306e\u30c7\u30fc\u30bf\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u3059\u3002 \u4e3b\u306b\u30d3\u30c3\u30b0\u30c7\u30fc\u30bf\u51e6\u7406\u306e\u305f\u3081\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u304c\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u307b\u304b\u3001C\u3084C++\u3001Python\u306a\u3069\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u5411\u3051\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u6574\u5099\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u81ea\u4f5c\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304b\u3089Apache Arrow\u5f62\u5f0f\u3092\u6271\u3046\u3088\u3046\u8a2d\u8a08\u3059\u308b\u4e8b\u3082\u5bb9\u6613\u3067\u3059\u3002 Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u5185\u90e8\u306b\u306f\u3001\u30c7\u30fc\u30bf\u69cb\u9020\u3092\u5b9a\u7fa9\u3059\u308b\u30b9\u30ad\u30fc\u30de\uff08Schema\uff09\u90e8\u5206\u3068\u3001\u30b9\u30ad\u30fc\u30de\u306b\u57fa\u3065\u3044\u3066\u5217\u30c7\u30fc\u30bf\u3092\u8a18\u9332\u3059\u308b1\u500b\u4ee5\u4e0a\u306e\u30ec\u30b3\u30fc\u30c9\u30d0\u30c3\u30c1\uff08RecordBatch\uff09\u90e8\u5206\u304c\u5b58\u5728\u3057\u307e\u3059\u3002\u30c7\u30fc\u30bf\u578b\u3068\u3057\u3066\u306f\u3001\u6574\u6570\u3084\u6587\u5b57\u5217\uff08\u53ef\u5909\u9577\uff09\u3001\u65e5\u4ed8\u6642\u523b\u578b\u306a\u3069\u306b\u5bfe\u5fdc\u3057\u3066\u304a\u308a\u3001\u500b\u3005\u306e\u5217\u30c7\u30fc\u30bf\u306f\u3053\u308c\u3089\u30c7\u30fc\u30bf\u578b\u306b\u5fdc\u3058\u305f\u5185\u90e8\u8868\u73fe\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002 Apache Arrow\u5f62\u5f0f\u306b\u304a\u3051\u308b\u30c7\u30fc\u30bf\u8868\u73fe\u306f\u3001\u5fc5\u305a\u3057\u3082\u5168\u3066\u306e\u5834\u5408\u3067PostgreSQL\u306e\u30c7\u30fc\u30bf\u8868\u73fe\u3068\u4e00\u81f4\u3057\u3066\u3044\u308b\u8a33\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u4f8b\u3048\u3070\u3001Arrow\u5f62\u5f0f\u3067\u306f\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u578b\u306e\u30a8\u30dd\u30c3\u30af\u306f 1970-01-01 \u3067\u8907\u6570\u306e\u7cbe\u5ea6\u3092\u6301\u3064\u4e8b\u304c\u3067\u304d\u307e\u3059\u304c\u3001PostgreSQL\u306e\u30a8\u30dd\u30c3\u30af\u306f 2001-01-01 \u3067\u30de\u30a4\u30af\u30ed\u79d2\u306e\u7cbe\u5ea6\u3092\u6301\u3061\u307e\u3059\u3002 Arrow_Fdw\u306f\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u7528\u3044\u3066Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092PostgreSQL\u4e0a\u3067\u8aad\u307f\u51fa\u3059\u4e8b\u3092\u53ef\u80fd\u306b\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u5217\u3054\u3068\u306b100\u4e07\u4ef6\u306e\u5217\u30c7\u30fc\u30bf\u304c\u5b58\u5728\u3059\u308b\u30ec\u30b3\u30fc\u30c9\u30d0\u30c3\u30c1\u30928\u500b\u5185\u5305\u3059\u308bArrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092Arrow_Fdw\u3092\u7528\u3044\u3066\u30de\u30c3\u30d7\u3057\u305f\u5834\u5408\u3001\u3053\u306e\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u4ecb\u3057\u3066Arrow\u30d5\u30a1\u30a4\u30eb\u4e0a\u306e800\u4e07\u4ef6\u306e\u30c7\u30fc\u30bf\u3078\u30a2\u30af\u30bb\u30b9\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 \u904b\u7528 \u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u5b9a\u7fa9 \u901a\u5e38\u3001\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3059\u308b\u306b\u306f\u4ee5\u4e0b\u306e3\u30b9\u30c6\u30c3\u30d7\u304c\u5fc5\u8981\u3067\u3059\u3002 CREATE FOREIGN DATA WRAPPER \u30b3\u30de\u30f3\u30c9\u306b\u3088\u308a\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u3092\u5b9a\u7fa9\u3059\u308b CREATE SERVER \u30b3\u30de\u30f3\u30c9\u306b\u3088\u308a\u5916\u90e8\u30b5\u30fc\u30d0\u3092\u5b9a\u7fa9\u3059\u308b CREATE FOREIGN TABLE \u30b3\u30de\u30f3\u30c9\u306b\u3088\u308a\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u5b9a\u7fa9\u3059\u308b \u3053\u306e\u3046\u3061\u3001\u6700\u521d\u306e2\u30b9\u30c6\u30c3\u30d7\u306f CREATE EXTENSION pg_strom \u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u306b\u542b\u307e\u308c\u3066\u304a\u308a\u3001\u500b\u5225\u306b\u5b9f\u884c\u304c\u5fc5\u8981\u306a\u306e\u306f\u6700\u5f8c\u306e CREATE FOREIGN TABLE \u306e\u307f\u3067\u3059\u3002 CREATE FOREIGN TABLE flogdata ( ts timestamp, sensor_id int, signal1 smallint, signal2 smallint, signal3 smallint, signal4 smallint, ) SERVER arrow_fdw OPTIONS (file '/path/to/logdata.arrow'); CREATE FOREIGN TABLE \u69cb\u6587\u3067\u6307\u5b9a\u3057\u305f\u5217\u306e\u30c7\u30fc\u30bf\u578b\u306f\u3001\u30de\u30c3\u30d7\u3059\u308bArrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u3068\u53b3\u5bc6\u306b\u4e00\u81f4\u3057\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u308c\u4ee5\u5916\u306b\u3082\u3001Arrow_Fdw\u306f IMPORT FOREIGN SCHEMA \u69cb\u6587\u3092\u7528\u3044\u305f\u4fbf\u5229\u306a\u65b9\u6cd5\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u3001Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u6301\u3064\u30b9\u30ad\u30fc\u30de\u60c5\u5831\u3092\u5229\u7528\u3057\u3066\u3001\u81ea\u52d5\u7684\u306b\u30c6\u30fc\u30d6\u30eb\u5b9a\u7fa9\u3092\u751f\u6210\u3059\u308b\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u540d\u3068\u30a4\u30f3\u30dd\u30fc\u30c8\u5148\u306e\u30b9\u30ad\u30fc\u30de\u3001\u304a\u3088\u3073OPTION\u53e5\u3067Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u306b\u306f\u3001\u5217\u3054\u3068\u306e\u30c7\u30fc\u30bf\u578b\u3068\u5217\u540d\uff08\u30aa\u30d7\u30b7\u30e7\u30f3\uff09\u304c\u542b\u307e\u308c\u3066\u304a\u308a\u3001\u3053\u308c\u3092\u7528\u3044\u3066\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u5b9a\u7fa9\u3092\u884c\u3044\u307e\u3059\u3002 IMPORT FOREIGN SCHEMA flogdata FROM SERVER arrow_fdw INTO public OPTIONS (file '/path/to/logdata.arrow'); \u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u30aa\u30d7\u30b7\u30e7\u30f3 Arrow_Fdw\u306f\u4ee5\u4e0b\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002\u73fe\u72b6\u3001\u5168\u3066\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u6307\u5b9a\u3059\u308b\u3082\u306e\u3067\u3059\u3002 file=PATHNAME \u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u30de\u30c3\u30d7\u3059\u308bArrow\u30d5\u30a1\u30a4\u30eb\u30921\u500b\u6307\u5b9a\u3057\u307e\u3059\u3002 files=PATHNAME1[,PATHNAME2...] \u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u30de\u30c3\u30d7\u3059\u308bArrow\u30d5\u30a1\u30a4\u30eb\u3092\u30ab\u30f3\u30de(,\uff09\u533a\u5207\u308a\u3067\u8907\u6570\u6307\u5b9a\u3057\u307e\u3059\u3002 dir=DIRNAME \u6307\u5b9a\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u5168\u3066\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u30de\u30c3\u30d7\u3057\u307e\u3059\u3002 suffix=SUFFIX dir \u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u6307\u5b9a\u6642\u3001\u4f8b\u3048\u3070 .arrow \u306a\u3069\u3001\u7279\u5b9a\u306e\u63a5\u5c3e\u53e5\u3092\u6301\u3064\u30d5\u30a1\u30a4\u30eb\u3060\u3051\u3092\u30de\u30c3\u30d7\u3057\u307e\u3059\u3002 parallel_workers=N_WORKERS \u3053\u306e\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u4e26\u5217\u30b9\u30ad\u30e3\u30f3\u306b\u4f7f\u7528\u3059\u308b\u4e26\u5217\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\u306e\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u4e00\u822c\u7684\u306a\u30c6\u30fc\u30d6\u30eb\u306b\u304a\u3051\u308b parallel_workers \u30b9\u30c8\u30ec\u30fc\u30b8\u30d1\u30e9\u30e1\u30fc\u30bf\u3068\u540c\u7b49\u306e\u610f\u5473\u3092\u6301\u3061\u307e\u3059\u3002 writable=(true|false) \u3053\u306e\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3059\u308b INSERT \u6587\u306e\u5b9f\u884c\u3092\u8a31\u53ef\u3057\u307e\u3059\u3002\u8a73\u7d30\u306f\u300e\u66f8\u304d\u8fbc\u307f\u53ef\u80fdArrow_Fdw\u300f\u306e\u7bc0\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u30c7\u30fc\u30bf\u578b\u306e\u5bfe\u5fdc Arrow\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u578b\u3068\u3001PostgreSQL\u306e\u30c7\u30fc\u30bf\u578b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002 Int bitWidth \u5c5e\u6027\u306e\u5024\u306b\u5fdc\u3058\u3066\u3001\u305d\u308c\u305e\u308c int1 \u3001 int2 \u3001 int4 \u3001 int8 \u306e\u3044\u305a\u308c\u304b\u306b\u5bfe\u5fdc\u3002 is_signed \u5c5e\u6027\u306e\u5024\u306f\u7121\u8996\u3055\u308c\u307e\u3059\u3002 int1 \u306fPG-Strom\u306b\u3088\u308b\u72ec\u81ea\u62e1\u5f35 FloatingPoint precision \u5c5e\u6027\u306e\u5024\u306b\u5fdc\u3058\u3066\u3001\u305d\u308c\u305e\u308c float2 \u3001 float4 \u3001 float8 \u306e\u3044\u305a\u308c\u304b\u306b\u5bfe\u5fdc\u3002 float2 \u306fPG-Strom\u306b\u3088\u308b\u72ec\u81ea\u62e1\u5f35 Binary bytea \u578b\u306b\u5bfe\u5fdc Decimal numeric \u578b\u306b\u5bfe\u5fdc Date date \u578b\u306b\u5bfe\u5fdc\u3002 unit=Day \u76f8\u5f53\u3068\u306a\u308b\u3088\u3046\u306b\u88dc\u6b63\u3055\u308c\u308b\u3002 Time time \u578b\u306b\u5bfe\u5fdc\u3002 unit=MicroSecond \u76f8\u5f53\u306b\u306a\u308b\u3088\u3046\u306b\u88dc\u6b63\u3055\u308c\u308b\u3002 Timestamp timestamp \u578b\u306b\u5bfe\u5fdc\u3002 unit=MicroSecond \u76f8\u5f53\u306b\u306a\u308b\u3088\u3046\u306b\u88dc\u6b63\u3055\u308c\u308b\u3002 Interval interval \u578b\u306b\u5bfe\u5fdc List \u8981\u7d20\u578b\u306e1\u6b21\u5143\u914d\u5217\u578b\u3068\u3057\u3066\u8868\u73fe\u3055\u308c\u308b\u3002 Struct \u8907\u5408\u578b\u3068\u3057\u3066\u8868\u73fe\u3055\u308c\u308b\u3002\u5bfe\u5fdc\u3059\u308b\u8907\u5408\u578b\u306f\u4e88\u3081\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002 FixedSizeBinary byteWidth \u5c5e\u6027\u306e\u5024\u306b\u5fdc\u3058\u3066 char(n) \u3068\u3057\u3066\u8868\u73fe\u3055\u308c\u308b\u3002 \u30e1\u30bf\u30c7\u30fc\u30bf pg_type=TYPENAME \u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u8a72\u5f53\u3059\u308b\u30c7\u30fc\u30bf\u578b\u3092\u5272\u308a\u5f53\u3066\u308b\u5834\u5408\u304c\u3042\u308b\u3002\u73fe\u6642\u70b9\u3067\u306f\u3001 inet \u304a\u3088\u3073 macaddr \u578b\u3002 Union \u3001 Map \u3001 Duration \u3001 LargeBinary \u3001 LargeUtf8 \u3001 LargeList \u73fe\u6642\u70b9\u3067\u306fPostgreSQL\u30c7\u30fc\u30bf\u578b\u3078\u306e\u5bfe\u5fdc\u306f\u306a\u3057\u3002 EXPLAIN\u51fa\u529b\u306e\u8aad\u307f\u65b9 EXPLAIN \u30b3\u30de\u30f3\u30c9\u3092\u7528\u3044\u3066\u3001Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u51fa\u3057\u306b\u95a2\u3059\u308b\u60c5\u5831\u3092\u51fa\u529b\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u7d04503GB\u306e\u5927\u304d\u3055\u3092\u6301\u3064Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092\u30de\u30c3\u30d7\u3057\u305ff_lineorder\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u542b\u3080\u30af\u30a8\u30ea\u5b9f\u884c\u8a08\u753b\u306e\u51fa\u529b\u3067\u3059\u3002 =# EXPLAIN SELECT sum(lo_extendedprice*lo_discount) as revenue FROM f_lineorder,date1 WHERE lo_orderdate = d_datekey AND d_year = 1993 AND lo_discount between 1 and 3 AND lo_quantity < 25; QUERY PLAN -------------------------------------------------------------------------------- Aggregate (cost=14535261.08..14535261.09 rows=1 width=8) -> Custom Scan (GpuPreAgg) on f_lineorder (cost=14535261.06..14535261.07 rows=1 width=32) GPU Projection: pgstrom.psum(((f_lineorder.lo_extendedprice * f_lineorder.lo_discount))::bigint) GPU Scan Quals: ((f_lineorder.lo_discount >= 1) AND (f_lineorder.lo_discount <= 3) AND (f_lineorder.lo_quantity < 25)) [rows: 5999990000 -> 9999983] GPU Join Quals [1]: (f_lineorder.lo_orderdate = date1.d_datekey) ... [nrows: 9999983 -> 1428010] GPU Outer Hash [1]: f_lineorder.lo_orderdate GPU Inner Hash [1]: date1.d_datekey referenced: lo_orderdate, lo_quantity, lo_extendedprice, lo_discount file0: /opt/nvme/f_lineorder_s999.arrow (read: 89.41GB, size: 502.92GB) GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 (cost=0.00..78.95 rows=365 width=4) Filter: (d_year = 1993) (12 rows) \u3053\u308c\u3092\u898b\u308b\u3068Custom Scan (GpuPreAgg)\u304c f_lineorder \u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u3066\u3044\u308b\u4e8b\u304c\u308f\u304b\u308a\u307e\u3059\u3002 file0 \u306b\u306f\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u80cc\u5f8c\u306b\u3042\u308b\u30d5\u30a1\u30a4\u30eb\u540d /opt/nvme/f_lineorder_s999.arrow \u3068\u305d\u306e\u30b5\u30a4\u30ba\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u8907\u6570\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u30de\u30c3\u30d7\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306b\u306f\u3001 file1 \u3001 file2 \u3001... \u3068\u5404\u30d5\u30a1\u30a4\u30eb\u6bce\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002 referenced \u306b\u306f\u5b9f\u969b\u306b\u53c2\u7167\u3055\u308c\u3066\u3044\u308b\u5217\u306e\u4e00\u89a7\u304c\u5217\u6319\u3055\u308c\u3066\u304a\u308a\u3001\u3053\u306e\u30af\u30a8\u30ea\u306b\u304a\u3044\u3066\u306f lo_orderdate \u3001 lo_quantity \u3001 lo_extendedprice \u304a\u3088\u3073 lo_discount \u5217\u304c\u53c2\u7167\u3055\u308c\u3066\u3044\u308b\u4e8b\u304c\u308f\u304b\u308a\u307e\u3059\u3002 \u307e\u305f\u3001 GPU-Direct SQL: enabled (GPU-0) \u306e\u8868\u793a\u304c\u3042\u308b\u4e8b\u304b\u3089\u3001 f_lineorder \u306e\u30b9\u30ad\u30e3\u30f3\u306b\u306fGPU-Direct SQL\u6a5f\u69cb\u304c\u7528\u3044\u3089\u308c\u308b\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3059\u3002 VERBOSE\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4ed8\u4e0e\u3059\u308b\u4e8b\u3067\u3001\u3088\u308a\u8a73\u7d30\u306a\u60c5\u5831\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002 =# EXPLAIN VERBOSE SELECT sum(lo_extendedprice*lo_discount) as revenue FROM f_lineorder,date1 WHERE lo_orderdate = d_datekey AND d_year = 1993 AND lo_discount between 1 and 3 AND lo_quantity < 25; QUERY PLAN -------------------------------------------------------------------------------- Aggregate (cost=14535261.08..14535261.09 rows=1 width=8) Output: pgstrom.sum_int((pgstrom.psum(((f_lineorder.lo_extendedprice * f_lineorder.lo_discount))::bigint))) -> Custom Scan (GpuPreAgg) on public.f_lineorder (cost=14535261.06..14535261.07 rows=1 width=32) Output: (pgstrom.psum(((f_lineorder.lo_extendedprice * f_lineorder.lo_discount))::bigint)) GPU Projection: pgstrom.psum(((f_lineorder.lo_extendedprice * f_lineorder.lo_discount))::bigint) GPU Scan Quals: ((f_lineorder.lo_discount >= 1) AND (f_lineorder.lo_discount <= 3) AND (f_lineorder.lo_quantity < 25)) [rows: 5999990000 -> 9999983] GPU Join Quals [1]: (f_lineorder.lo_orderdate = date1.d_datekey) ... [nrows: 9999983 -> 1428010] GPU Outer Hash [1]: f_lineorder.lo_orderdate GPU Inner Hash [1]: date1.d_datekey referenced: lo_orderdate, lo_quantity, lo_extendedprice, lo_discount file0: /opt/nvme/f_lineorder_s999.arrow (read: 89.41GB, size: 502.92GB) lo_orderdate: 22.35GB lo_quantity: 22.35GB lo_extendedprice: 22.35GB lo_discount: 22.35GB GPU-Direct SQL: enabled (GPU-0) KVars-Slot: , , , , , KVecs-Buffer: nbytes: 51200, ndims: 3, items=[kvec0=<0x0000-27ff, type='int4', expr='lo_discount'>, kvec1=<0x2800-4fff, type='int4', expr='lo_quantity'>, kvec2=<0x5000-77ff, type='int4', expr='lo_extendedprice'>, kvec3=<0x7800-9fff, type='int4', expr='lo_orderdate'>, kvec4=<0xa000-c7ff, type='int4', expr='d_datekey'>] LoadVars OpCode: {Packed items[0]={LoadVars(depth=0): kvars=[, , , ]}, items[1]={LoadVars(depth=1): kvars=[]}} MoveVars OpCode: {Packed items[0]={MoveVars(depth=0): items=[, , ]}}, items[1]={MoveVars(depth=1): items=[, ]}}} Scan Quals OpCode: {Bool::AND args=[{Func(bool)::int4ge args=[{Var(int4): slot=0, expr='lo_discount'}, {Const(int4): value='1'}]}, {Func(bool)::int4le args=[{Var(int4): slot=0, expr='lo_discount'}, {Const(int4): value='3'}]}, {Func(bool)::int4lt args=[{Var(int4): slot=1, expr='lo_quantity'}, {Const(int4): value='25'}]}]} Join Quals OpCode: {Packed items[1]={JoinQuals: {Func(bool)::int4eq args=[{Var(int4): kvec=0x7800-a000, expr='lo_orderdate'}, {Var(int4): slot=5, expr='d_datekey'}]}}} Join HashValue OpCode: {Packed items[1]={HashValue arg={Var(int4): kvec=0x7800-a000, expr='lo_orderdate'}}} Partial Aggregation OpCode: {AggFuncs arg={SaveExpr: arg={Func(int8)::int8 arg={Func(int4)::int4mul args=[{Var(int4): kvec=0x5000-7800, expr='lo_extendedprice'}, {Var(int4): kvec=0x0000-2800, expr='lo_discount'}]}}}} Partial Function BufSz: 16 -> Seq Scan on public.date1 (cost=0.00..78.95 rows=365 width=4) Output: date1.d_datekey Filter: (date1.d_year = 1993) (28 rows) \u88ab\u53c2\u7167\u5217\u3092\u30ed\u30fc\u30c9\u3059\u308b\u969b\u306b\u8aad\u307f\u51fa\u3059\u3079\u304d\u5217\u30c7\u30fc\u30bf\u306e\u5927\u304d\u3055\u3092\u3001\u5217\u3054\u3068\u306b\u8868\u793a\u3057\u3066\u3044\u307e\u3059\u3002 lo_orderdate \u3001 lo_quantity \u3001 lo_extendedprice \u304a\u3088\u3073 lo_discount \u5217\u306e\u30ed\u30fc\u30c9\u306b\u306f\u5408\u8a08\u306789.41GB\u306e\u8aad\u307f\u51fa\u3057\u304c\u5fc5\u8981\u3067\u3001\u3053\u308c\u306f\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba502.93GB\u306e17.8%\u306b\u76f8\u5f53\u3057\u307e\u3059\u3002 Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210\u65b9\u6cd5 \u672c\u7bc0\u3067\u306f\u3001\u65e2\u306bPostgreSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u3092Apache Arrow\u5f62\u5f0f\u306b\u5909\u63db\u3059\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002 PyArrow+Pandas Arrow\u958b\u767a\u8005\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u304c\u958b\u767a\u3092\u884c\u3063\u3066\u3044\u308b PyArrow \u30e2\u30b8\u30e5\u30fc\u30eb\u3068Pandas\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306e\u7d44\u5408\u305b\u3092\u7528\u3044\u3066\u3001PostgreSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u5185\u5bb9\u3092Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3078\u3068\u66f8\u304d\u51fa\u3059\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u30c6\u30fc\u30d6\u30ebt0\u306b\u683c\u7d0d\u3055\u308c\u305f\u30c7\u30fc\u30bf\u3092\u5168\u3066\u8aad\u8fbc\u307f\u3001\u30d5\u30a1\u30a4\u30eb/tmp/t0.arrow\u3078\u3068\u66f8\u304d\u51fa\u3059\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002 import pyarrow as pa import pandas as pd X = pd.read_sql(sql=\"SELECT * FROM t0\", con=\"postgresql://localhost/postgres\") Y = pa.Table.from_pandas(X) f = pa.RecordBatchFileWriter('/tmp/t0.arrow', Y.schema) f.write_table(Y,1000000) # RecordBatch for each million rows f.close() \u305f\u3060\u3057\u4e0a\u8a18\u306e\u65b9\u6cd5\u306f\u3001SQL\u3092\u4ecb\u3057\u3066PostgreSQL\u304b\u3089\u8aad\u307f\u51fa\u3057\u305f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u5185\u5bb9\u3092\u4e00\u5ea6\u30e1\u30e2\u30ea\u306b\u4fdd\u6301\u3059\u308b\u305f\u3081\u3001\u5927\u91cf\u306e\u884c\u3092\u4e00\u5ea6\u306b\u5909\u63db\u3059\u308b\u5834\u5408\u306b\u306f\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002 Pg2Arrow \u4e00\u65b9\u3001PG-Strom Development Team\u304c\u958b\u767a\u3092\u884c\u3063\u3066\u3044\u308b pg2arrow \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u3001PostgreSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u5185\u5bb9\u3092Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3078\u3068\u66f8\u304d\u51fa\u3059\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u3053\u306e\u30c4\u30fc\u30eb\u306f\u6bd4\u8f03\u7684\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092NVME-SSD\u306a\u3069\u30b9\u30c8\u30ec\u30fc\u30b8\u306b\u66f8\u304d\u51fa\u3059\u4e8b\u3092\u5ff5\u982d\u306b\u8a2d\u8a08\u3055\u308c\u3066\u304a\u308a\u3001PostgreSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089 -s|--segment-size \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3057\u305f\u30b5\u30a4\u30ba\u306e\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u3059\u305f\u3073\u306b\u3001Arrow\u5f62\u5f0f\u306e\u30ec\u30b3\u30fc\u30c9\u30d0\u30c3\u30c1\uff08Record Batch\uff09\u3068\u3057\u3066\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u51fa\u3057\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30e1\u30e2\u30ea\u6d88\u8cbb\u91cf\u306f\u6bd4\u8f03\u7684\u30ea\u30fc\u30ba\u30ca\u30d6\u30eb\u306a\u5024\u3068\u306a\u308a\u307e\u3059\u3002 pg2arrow \u30b3\u30de\u30f3\u30c9\u306fPG-Strom\u306b\u540c\u68b1\u3055\u308c\u3066\u304a\u308a\u3001PostgreSQL\u95a2\u9023\u30b3\u30de\u30f3\u30c9\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u683c\u7d0d\u3055\u308c\u307e\u3059\u3002 $ pg2arrow --help Usage: pg2arrow [OPTION] [database] [username] General options: -d, --dbname=DBNAME Database name to connect to -c, --command=COMMAND SQL command to run -t, --table=TABLENAME Equivalent to '-c SELECT * FROM TABLENAME' (-c and -t are exclusive, either of them must be given) --inner-join=SUB_COMMAND --outer-join=SUB_COMMAND -o, --output=FILENAME result file in Apache Arrow format --append=FILENAME result Apache Arrow file to be appended (--output and --append are exclusive. If neither of them are given, it creates a temporary file.) -S, --stat[=COLUMNS] embeds min/max statistics for each record batch COLUMNS is a comma-separated list of the target columns if partially enabled. Arrow format options: -s, --segment-size=SIZE size of record batch for each Connection options: -h, --host=HOSTNAME database server host -p, --port=PORT database server port -u, --user=USERNAME database user name -w, --no-password never prompt for password -W, --password force password prompt Other options: --dump=FILENAME dump information of arrow file --progress shows progress of the job --set=NAME:VALUE config option to set before SQL execution --help shows this message Report bugs to . PostgreSQL\u3078\u306e\u63a5\u7d9a\u30d1\u30e9\u30e1\u30fc\u30bf\u306fpsql\u3084pg_dump\u3068\u540c\u69d8\u306b\u3001 -h \u3084 -U \u306a\u3069\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002 \u57fa\u672c\u7684\u306a\u30b3\u30de\u30f3\u30c9\u306e\u4f7f\u7528\u65b9\u6cd5\u306f\u3001 -c|--command \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3057\u305fSQL\u3092PostgreSQL\u4e0a\u3067\u5b9f\u884c\u3057\u3001\u305d\u306e\u7d50\u679c\u3092 -o|--output \u3067\u6307\u5b9a\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3078Arrow\u5f62\u5f0f\u3067\u66f8\u304d\u51fa\u3057\u307e\u3059\u3002 -o|--output \u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u4ee3\u308f\u308a\u306b --append \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u3001\u3053\u308c\u306f\u65e2\u5b58\u306eApache Arrow\u30d5\u30a1\u30a4\u30eb\u3078\u306e\u8ffd\u8a18\u3092\u610f\u5473\u3057\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001\u8ffd\u8a18\u3055\u308c\u308bApache Arrow\u30d5\u30a1\u30a4\u30eb\u306f\u6307\u5b9a\u3057\u305fSQL\u306e\u5b9f\u884c\u7d50\u679c\u3068\u5b8c\u5168\u306b\u4e00\u81f4\u3059\u308b\u30b9\u30ad\u30fc\u30de\u69cb\u9020\u3092\u6301\u305f\u306d\u3070\u306a\u308a\u307e\u305b\u3093\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u30c6\u30fc\u30d6\u30eb t0 \u306b\u683c\u7d0d\u3055\u308c\u305f\u30c7\u30fc\u30bf\u3092\u5168\u3066\u8aad\u8fbc\u307f\u3001\u30d5\u30a1\u30a4\u30eb /tmp/t0.arrow \u3078\u3068\u66f8\u304d\u51fa\u3059\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002 $ pg2arrow -U kaigai -d postgres -c \"SELECT * FROM t0\" -o /tmp/t0.arrow \u958b\u767a\u8005\u5411\u3051\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3059\u304c\u3001 --dump \u3067Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u3084\u30ec\u30b3\u30fc\u30c9\u30d0\u30c3\u30c1\u306e\u4f4d\u7f6e\u3068\u30b5\u30a4\u30ba\u3092\u53ef\u8aad\u306a\u5f62\u5f0f\u3067\u51fa\u529b\u3059\u308b\u4e8b\u3082\u3067\u304d\u307e\u3059\u3002 --progress \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3059\u308b\u3068\u3001\u51e6\u7406\u306e\u9014\u4e2d\u7d4c\u904e\u3092\u8868\u793a\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002\u3053\u308c\u306f\u5de8\u5927\u306a\u30c6\u30fc\u30d6\u30eb\u3092Apache Arrow\u5f62\u5f0f\u306b\u5909\u63db\u3059\u308b\u969b\u306b\u6709\u7528\u3067\u3059\u3002 \u5148\u9032\u7684\u306a\u4f7f\u3044\u65b9 SSDtoGPU\u30c0\u30a4\u30ec\u30af\u30c8SQL Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u30de\u30c3\u30d7\u3055\u308c\u305f\u5168\u3066\u306eArrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u304c\u4ee5\u4e0b\u306e\u6761\u4ef6\u3092\u6e80\u305f\u3059\u5834\u5408\u306b\u306f\u3001\u5217\u30c7\u30fc\u30bf\u306e\u8aad\u307f\u51fa\u3057\u306bSSD-to-GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u3092\u4f7f\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u304cNVME-SSD\u533a\u753b\u4e0a\u306b\u7f6e\u304b\u308c\u3066\u3044\u308b\u3002 NVME-SSD\u533a\u753b\u306fExt4\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3067\u69cb\u7bc9\u3055\u308c\u3066\u3044\u308b\u3002 Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u7dcf\u8a08\u304c pg_strom.nvme_strom_threshold \u8a2d\u5b9a\u3092\u4e0a\u56de\u3063\u3066\u3044\u308b\u3002 \u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u8a2d\u5b9a Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u4e00\u90e8\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u901a\u5e38\u306ePostgreSQL\u30c6\u30fc\u30d6\u30eb\u3068\u6df7\u5728\u3059\u308b\u4e8b\u3082\u53ef\u80fd\u3067\u3059\u304c\u3001Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306f\u66f8\u304d\u8fbc\u307f\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u4e8b\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u307e\u305f\u3001\u30de\u30c3\u30d7\u3055\u308c\u305fArrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306b\u542b\u307e\u308c\u308b\u30c7\u30fc\u30bf\u306f\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u5883\u754c\u6761\u4ef6\u3068\u77db\u76fe\u3057\u306a\u3044\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u7ba1\u7406\u8005\u306e\u8cac\u4efb\u3067\u3059\u3002 \u5178\u578b\u7684\u306a\u5229\u7528\u30b7\u30fc\u30f3\u306f\u3001\u9577\u671f\u9593\u306b\u308f\u305f\u308a\u84c4\u7a4d\u3057\u305f\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u51e6\u7406\u3067\u3059\u3002 \u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u30c7\u30fc\u30bf\u3068\u7570\u306a\u308a\u3001\u4e00\u822c\u7684\u306b\u30ed\u30b0\u30c7\u30fc\u30bf\u306f\u4e00\u5ea6\u8a18\u9332\u3055\u308c\u305f\u3089\u305d\u306e\u5f8c\u66f4\u65b0\u524a\u9664\u3055\u308c\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u3057\u305f\u304c\u3063\u3066\u3001\u4e00\u5b9a\u671f\u9593\u304c\u7d4c\u904e\u3057\u305f\u30ed\u30b0\u30c7\u30fc\u30bf\u306f\u3001\u8aad\u307f\u51fa\u3057\u5c02\u7528\u3067\u306f\u3042\u308b\u3082\u306e\u306e\u96c6\u8a08\u51e6\u7406\u304c\u9ad8\u901f\u306aArrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u79fb\u3057\u66ff\u3048\u308b\u3053\u3068\u3067\u3001\u96c6\u8a08\u30fb\u89e3\u6790\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u51e6\u7406\u52b9\u7387\u3092\u5f15\u304d\u4e0a\u3052\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u30ed\u30b0\u30c7\u30fc\u30bf\u306b\u306f\u307b\u307c\u9593\u9055\u3044\u306a\u304f\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u304c\u4ed8\u4e0e\u3055\u308c\u3066\u3044\u308b\u4e8b\u304b\u3089\u3001\u6708\u5358\u4f4d\u3001\u9031\u5358\u4f4d\u306a\u3069\u3001\u4e00\u5b9a\u671f\u9593\u3054\u3068\u306b\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u3092\u8ffd\u52a0\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001PostgreSQL\u30c6\u30fc\u30d6\u30eb\u3068Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u6df7\u5728\u3055\u305b\u305f\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u3092\u5b9a\u7fa9\u3057\u305f\u3082\u306e\u3067\u3059\u3002 \u66f8\u304d\u8fbc\u307f\u304c\u53ef\u80fd\u306aPostgreSQL\u30c6\u30fc\u30d6\u30eb\u3092\u30c7\u30d5\u30a9\u30eb\u30c8\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3068\u3057\u3066\u6307\u5b9a\u3057\u3066\u304a\u304f\u4e8b\u3067\u3001\u4e00\u5b9a\u671f\u9593\u306e\u7d4c\u904e\u5f8c\u3001DB\u904b\u7528\u3092\u7d99\u7d9a\u3057\u306a\u304c\u3089\u904e\u53bb\u306e\u30ed\u30b0\u30c7\u30fc\u30bf\u3060\u3051\u3092Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3078\u79fb\u3059\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 CREATE TABLE lineorder ( lo_orderkey numeric, lo_linenumber integer, lo_custkey numeric, lo_partkey integer, lo_suppkey numeric, lo_orderdate integer, lo_orderpriority character(15), lo_shippriority character(1), lo_quantity numeric, lo_extendedprice numeric, lo_ordertotalprice numeric, lo_discount numeric, lo_revenue numeric, lo_supplycost numeric, lo_tax numeric, lo_commit_date character(8), lo_shipmode character(10) ) PARTITION BY RANGE (lo_orderdate); CREATE TABLE lineorder__now PARTITION OF lineorder default; CREATE FOREIGN TABLE lineorder__1993 PARTITION OF lineorder FOR VALUES FROM (19930101) TO (19940101) SERVER arrow_fdw OPTIONS (file '/opt/tmp/lineorder_1993.arrow'); CREATE FOREIGN TABLE lineorder__1994 PARTITION OF lineorder FOR VALUES FROM (19940101) TO (19950101) SERVER arrow_fdw OPTIONS (file '/opt/tmp/lineorder_1994.arrow'); CREATE FOREIGN TABLE lineorder__1995 PARTITION OF lineorder FOR VALUES FROM (19950101) TO (19960101) SERVER arrow_fdw OPTIONS (file '/opt/tmp/lineorder_1995.arrow'); CREATE FOREIGN TABLE lineorder__1996 PARTITION OF lineorder FOR VALUES FROM (19960101) TO (19970101) SERVER arrow_fdw OPTIONS (file '/opt/tmp/lineorder_1996.arrow'); \u3053\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3059\u308b\u554f\u3044\u5408\u308f\u305b\u306e\u5b9f\u884c\u8a08\u753b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 \u691c\u7d22\u6761\u4ef6 lo_orderdate between 19950701 and 19960630 \u304c\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u5883\u754c\u6761\u4ef6\u3092\u542b\u3093\u3067\u3044\u308b\u4e8b\u304b\u3089\u3001\u5b50\u30c6\u30fc\u30d6\u30eb lineorder__1993 \u3068 lineorder__1994 \u306f\u691c\u7d22\u5bfe\u8c61\u304b\u3089\u6392\u9664\u3055\u308c\u3001\u4ed6\u306e\u30c6\u30fc\u30d6\u30eb\u3060\u3051\u3092\u8aad\u307f\u51fa\u3059\u3088\u3046\u5b9f\u884c\u8a08\u753b\u304c\u4f5c\u3089\u308c\u3066\u3044\u307e\u3059\u3002 =# EXPLAIN SELECT sum(lo_extendedprice*lo_discount) as revenue FROM lineorder,date1 WHERE lo_orderdate = d_datekey AND lo_orderdate between 19950701 and 19960630 AND lo_discount between 1 and 3 ABD lo_quantity < 25; QUERY PLAN -------------------------------------------------------------------------------- Aggregate (cost=172088.90..172088.91 rows=1 width=32) -> Hash Join (cost=10548.86..172088.51 rows=77 width=64) Hash Cond: (lineorder__1995.lo_orderdate = date1.d_datekey) -> Append (cost=10444.35..171983.80 rows=77 width=67) -> Custom Scan (GpuScan) on lineorder__1995 (cost=10444.35..33671.87 rows=38 width=68) GPU Filter: ((lo_orderdate >= 19950701) AND (lo_orderdate <= 19960630) AND (lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) referenced: lo_orderdate, lo_quantity, lo_extendedprice, lo_discount files0: /opt/tmp/lineorder_1995.arrow (size: 892.57MB) -> Custom Scan (GpuScan) on lineorder__1996 (cost=10444.62..33849.21 rows=38 width=68) GPU Filter: ((lo_orderdate >= 19950701) AND (lo_orderdate <= 19960630) AND (lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) referenced: lo_orderdate, lo_quantity, lo_extendedprice, lo_discount files0: /opt/tmp/lineorder_1996.arrow (size: 897.87MB) -> Custom Scan (GpuScan) on lineorder__now (cost=11561.33..104462.33 rows=1 width=18) GPU Filter: ((lo_orderdate >= 19950701) AND (lo_orderdate <= 19960630) AND (lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) -> Hash (cost=72.56..72.56 rows=2556 width=4) -> Seq Scan on date1 (cost=0.00..72.56 rows=2556 width=4) (16 rows) \u3053\u306e\u5f8c\u3001 lineorder__now \u30c6\u30fc\u30d6\u30eb\u304b\u30891997\u5e74\u306e\u30c7\u30fc\u30bf\u3092\u629c\u304d\u51fa\u3057\u3001\u3053\u308c\u3092Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u5074\u306b\u79fb\u3059\u306b\u306f\u4ee5\u4e0b\u306e\u64cd\u4f5c\u3092\u884c\u3044\u307e\u3059 $ pg2arrow -d sample -o /opt/tmp/lineorder_1997.arrow \\ -c \"SELECT * FROM lineorder WHERE lo_orderdate between 19970101 and 19971231\" pg2arrow \u30b3\u30de\u30f3\u30c9\u306b\u3088\u308a\u3001 lineorder \u30c6\u30fc\u30d6\u30eb\u304b\u30891997\u5e74\u306e\u30c7\u30fc\u30bf\u3060\u3051\u3092\u629c\u304d\u51fa\u3057\u3066\u3001\u65b0\u3057\u3044Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3078\u66f8\u304d\u51fa\u3057\u307e\u3059\u3002 BEGIN; -- -- remove rows in 1997 from the read-writable table -- DELETE FROM lineorder WHERE lo_orderdate BETWEEN 19970101 AND 19971231; -- -- define a new partition leaf which maps log-data in 1997 -- CREATE FOREIGN TABLE lineorder__1997 PARTITION OF lineorder FOR VALUES FROM (19970101) TO (19980101) SERVER arrow_fdw OPTIONS (file '/opt/tmp/lineorder_1997.arrow'); COMMIT; \u3053\u306e\u64cd\u4f5c\u306b\u3088\u308a\u3001PostgreSQL\u30c6\u30fc\u30d6\u30eb\u3067\u3042\u308b lineorder__now \u304b\u30891997\u5e74\u306e\u30c7\u30fc\u30bf\u3092\u524a\u9664\u3057\u3001\u4ee3\u308f\u308a\u306b\u540c\u4e00\u5185\u5bb9\u306eArrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb /opt/tmp/lineorder_1997.arrow \u3092\u5916\u90e8\u30c6\u30fc\u30d6\u30eb lineorder__1997 \u3068\u3057\u3066\u30de\u30c3\u30d7\u3057\u307e\u3057\u305f\u3002 \u6b63\u78ba\u306b\u306f\u30014KB\uff5e32KB\u306e\u7bc4\u56f2\u3067\u30d3\u30eb\u30c9\u6642\u306b\u6307\u5b9a\u3067\u304d\u307e\u3059 \u21a9","title":"Apache Arrow"},{"location":"arrow_fdw/#apache-arrow","text":"","title":"Apache Arrow (\u5217\u6307\u5411\u30c7\u30fc\u30bf\u30b9\u30c8\u30a2)"},{"location":"arrow_fdw/#_1","text":"PostgreSQL\u306e\u30c6\u30fc\u30d6\u30eb\u306f\u5185\u90e8\u7684\u306b8KB\u306e\u30d6\u30ed\u30c3\u30af 1 \u3068\u547c\u3070\u308c\u308b\u5358\u4f4d\u3067\u7de8\u6210\u3055\u308c\u3001\u30d6\u30ed\u30c3\u30af\u306f\u5168\u3066\u306e\u5c5e\u6027\u53ca\u3073\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u542b\u3080\u30bf\u30d7\u30eb\u3068\u547c\u3070\u308c\u308b\u30c7\u30fc\u30bf\u69cb\u9020\u3092\u884c\u5358\u4f4d\u3067\u683c\u7d0d\u3057\u307e\u3059\u3002\u884c\u3092\u69cb\u6210\u3059\u308b\u30c7\u30fc\u30bf\u304c\u8fd1\u508d\u306b\u5b58\u5728\u3059\u308b\u305f\u3081\u3001\u3053\u308c\u306fINSERT\u3084UPDATE\u306e\u591a\u3044\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u6709\u52b9\u3067\u3059\u304c\u3001\u4e00\u65b9\u3067\u5927\u91cf\u30c7\u30fc\u30bf\u306e\u96c6\u8a08\u30fb\u89e3\u6790\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u306f\u4e0d\u5411\u304d\u3067\u3042\u308b\u3068\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u901a\u5e38\u3001\u5927\u91cf\u30c7\u30fc\u30bf\u306e\u96c6\u8a08\u306b\u304a\u3044\u3066\u306f\u30c6\u30fc\u30d6\u30eb\u5185\u306e\u5168\u3066\u306e\u5217\u3092\u53c2\u7167\u3059\u308b\u4e8b\u306f\u73cd\u3057\u304f\u3001\u591a\u304f\u306e\u5834\u5408\u306b\u306f\u4e00\u90e8\u306e\u5217\u3060\u3051\u3092\u53c2\u7167\u3059\u308b\u3068\u3044\u3063\u305f\u51e6\u7406\u306b\u306a\u308a\u304c\u3061\u3067\u3059\u3002\u3053\u306e\u5834\u5408\u3001\u5b9f\u969b\u306b\u306f\u53c2\u7167\u3055\u308c\u306a\u3044\u5217\u306e\u30c7\u30fc\u30bf\u3092\u30b9\u30c8\u30ec\u30fc\u30b8\u304b\u3089\u30ed\u30fc\u30c9\u3059\u308b\u305f\u3081\u306b\u6d88\u8cbb\u3055\u308c\u308bI/O\u306e\u5e2f\u57df\u306f\u5168\u304f\u7121\u99c4\u3067\u3059\u304c\u3001\u884c\u5358\u4f4d\u3067\u7de8\u6210\u3055\u308c\u305f\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u7279\u5b9a\u306e\u5217\u3060\u3051\u3092\u53d6\u308a\u51fa\u3059\u3068\u3044\u3046\u64cd\u4f5c\u306f\u56f0\u96e3\u3067\u3059\u3002 \u9006\u306b\u5217\u5358\u4f4d\u3067\u30c7\u30fc\u30bf\u3092\u7de8\u6210\u3057\u305f\u5834\u5408\u3001INSERT\u3084UPDATE\u306e\u591a\u3044\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u5bfe\u3057\u3066\u306f\u6975\u7aef\u306b\u4e0d\u5229\u3067\u3059\u304c\u3001\u5927\u91cf\u30c7\u30fc\u30bf\u306e\u96c6\u8a08\u30fb\u89e3\u6790\u3092\u884c\u3046\u969b\u306b\u306f\u88ab\u53c2\u7167\u5217\u3060\u3051\u3092\u30b9\u30c8\u30ec\u30fc\u30b8\u304b\u3089\u30ed\u30fc\u30c9\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u308b\u305f\u3081\u3001I/O\u306e\u5e2f\u57df\u3092\u6700\u5927\u9650\u306b\u6d3b\u7528\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 \u307e\u305f\u30d7\u30ed\u30bb\u30c3\u30b5\u306e\u51e6\u7406\u52b9\u7387\u306e\u89b3\u70b9\u304b\u3089\u3082\u3001\u5217\u5358\u4f4d\u306b\u7de8\u6210\u3055\u308c\u305f\u30c7\u30fc\u30bf\u306f\u5358\u7d14\u306a\u914d\u5217\u3067\u3042\u308b\u304b\u306e\u3088\u3046\u306b\u898b\u3048\u308b\u305f\u3081\u3001GPU\u306b\u3068\u3063\u3066\u306fCoalesced Memory Access\u3068\u3044\u3046\u30e1\u30e2\u30ea\u30d0\u30b9\u306e\u6027\u80fd\u3092\u6700\u5927\u9650\u306b\u5f15\u304d\u51fa\u3059\u30a2\u30af\u30bb\u30b9\u30d1\u30bf\u30fc\u30f3\u3068\u306a\u308b\u4e8b\u304c\u671f\u5f85\u3067\u304d\u307e\u3059\u3002","title":"\u6982\u8981"},{"location":"arrow_fdw/#apache-arrow_1","text":"Apache Arrow\u3068\u306f\u3001\u69cb\u9020\u5316\u30c7\u30fc\u30bf\u3092\u5217\u5f62\u5f0f\u3067\u8a18\u9332\u3001\u4ea4\u63db\u3059\u308b\u305f\u3081\u306e\u30c7\u30fc\u30bf\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u3059\u3002 \u4e3b\u306b\u30d3\u30c3\u30b0\u30c7\u30fc\u30bf\u51e6\u7406\u306e\u305f\u3081\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u304c\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u307b\u304b\u3001C\u3084C++\u3001Python\u306a\u3069\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u5411\u3051\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u6574\u5099\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u81ea\u4f5c\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304b\u3089Apache Arrow\u5f62\u5f0f\u3092\u6271\u3046\u3088\u3046\u8a2d\u8a08\u3059\u308b\u4e8b\u3082\u5bb9\u6613\u3067\u3059\u3002 Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u5185\u90e8\u306b\u306f\u3001\u30c7\u30fc\u30bf\u69cb\u9020\u3092\u5b9a\u7fa9\u3059\u308b\u30b9\u30ad\u30fc\u30de\uff08Schema\uff09\u90e8\u5206\u3068\u3001\u30b9\u30ad\u30fc\u30de\u306b\u57fa\u3065\u3044\u3066\u5217\u30c7\u30fc\u30bf\u3092\u8a18\u9332\u3059\u308b1\u500b\u4ee5\u4e0a\u306e\u30ec\u30b3\u30fc\u30c9\u30d0\u30c3\u30c1\uff08RecordBatch\uff09\u90e8\u5206\u304c\u5b58\u5728\u3057\u307e\u3059\u3002\u30c7\u30fc\u30bf\u578b\u3068\u3057\u3066\u306f\u3001\u6574\u6570\u3084\u6587\u5b57\u5217\uff08\u53ef\u5909\u9577\uff09\u3001\u65e5\u4ed8\u6642\u523b\u578b\u306a\u3069\u306b\u5bfe\u5fdc\u3057\u3066\u304a\u308a\u3001\u500b\u3005\u306e\u5217\u30c7\u30fc\u30bf\u306f\u3053\u308c\u3089\u30c7\u30fc\u30bf\u578b\u306b\u5fdc\u3058\u305f\u5185\u90e8\u8868\u73fe\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002 Apache Arrow\u5f62\u5f0f\u306b\u304a\u3051\u308b\u30c7\u30fc\u30bf\u8868\u73fe\u306f\u3001\u5fc5\u305a\u3057\u3082\u5168\u3066\u306e\u5834\u5408\u3067PostgreSQL\u306e\u30c7\u30fc\u30bf\u8868\u73fe\u3068\u4e00\u81f4\u3057\u3066\u3044\u308b\u8a33\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u4f8b\u3048\u3070\u3001Arrow\u5f62\u5f0f\u3067\u306f\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u578b\u306e\u30a8\u30dd\u30c3\u30af\u306f 1970-01-01 \u3067\u8907\u6570\u306e\u7cbe\u5ea6\u3092\u6301\u3064\u4e8b\u304c\u3067\u304d\u307e\u3059\u304c\u3001PostgreSQL\u306e\u30a8\u30dd\u30c3\u30af\u306f 2001-01-01 \u3067\u30de\u30a4\u30af\u30ed\u79d2\u306e\u7cbe\u5ea6\u3092\u6301\u3061\u307e\u3059\u3002 Arrow_Fdw\u306f\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u7528\u3044\u3066Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092PostgreSQL\u4e0a\u3067\u8aad\u307f\u51fa\u3059\u4e8b\u3092\u53ef\u80fd\u306b\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u5217\u3054\u3068\u306b100\u4e07\u4ef6\u306e\u5217\u30c7\u30fc\u30bf\u304c\u5b58\u5728\u3059\u308b\u30ec\u30b3\u30fc\u30c9\u30d0\u30c3\u30c1\u30928\u500b\u5185\u5305\u3059\u308bArrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092Arrow_Fdw\u3092\u7528\u3044\u3066\u30de\u30c3\u30d7\u3057\u305f\u5834\u5408\u3001\u3053\u306e\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u4ecb\u3057\u3066Arrow\u30d5\u30a1\u30a4\u30eb\u4e0a\u306e800\u4e07\u4ef6\u306e\u30c7\u30fc\u30bf\u3078\u30a2\u30af\u30bb\u30b9\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002","title":"Apache Arrow\u3068\u306f"},{"location":"arrow_fdw/#_2","text":"","title":"\u904b\u7528"},{"location":"arrow_fdw/#_3","text":"\u901a\u5e38\u3001\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3059\u308b\u306b\u306f\u4ee5\u4e0b\u306e3\u30b9\u30c6\u30c3\u30d7\u304c\u5fc5\u8981\u3067\u3059\u3002 CREATE FOREIGN DATA WRAPPER \u30b3\u30de\u30f3\u30c9\u306b\u3088\u308a\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u3092\u5b9a\u7fa9\u3059\u308b CREATE SERVER \u30b3\u30de\u30f3\u30c9\u306b\u3088\u308a\u5916\u90e8\u30b5\u30fc\u30d0\u3092\u5b9a\u7fa9\u3059\u308b CREATE FOREIGN TABLE \u30b3\u30de\u30f3\u30c9\u306b\u3088\u308a\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u5b9a\u7fa9\u3059\u308b \u3053\u306e\u3046\u3061\u3001\u6700\u521d\u306e2\u30b9\u30c6\u30c3\u30d7\u306f CREATE EXTENSION pg_strom \u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u306b\u542b\u307e\u308c\u3066\u304a\u308a\u3001\u500b\u5225\u306b\u5b9f\u884c\u304c\u5fc5\u8981\u306a\u306e\u306f\u6700\u5f8c\u306e CREATE FOREIGN TABLE \u306e\u307f\u3067\u3059\u3002 CREATE FOREIGN TABLE flogdata ( ts timestamp, sensor_id int, signal1 smallint, signal2 smallint, signal3 smallint, signal4 smallint, ) SERVER arrow_fdw OPTIONS (file '/path/to/logdata.arrow'); CREATE FOREIGN TABLE \u69cb\u6587\u3067\u6307\u5b9a\u3057\u305f\u5217\u306e\u30c7\u30fc\u30bf\u578b\u306f\u3001\u30de\u30c3\u30d7\u3059\u308bArrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u3068\u53b3\u5bc6\u306b\u4e00\u81f4\u3057\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u308c\u4ee5\u5916\u306b\u3082\u3001Arrow_Fdw\u306f IMPORT FOREIGN SCHEMA \u69cb\u6587\u3092\u7528\u3044\u305f\u4fbf\u5229\u306a\u65b9\u6cd5\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u3001Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u6301\u3064\u30b9\u30ad\u30fc\u30de\u60c5\u5831\u3092\u5229\u7528\u3057\u3066\u3001\u81ea\u52d5\u7684\u306b\u30c6\u30fc\u30d6\u30eb\u5b9a\u7fa9\u3092\u751f\u6210\u3059\u308b\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u540d\u3068\u30a4\u30f3\u30dd\u30fc\u30c8\u5148\u306e\u30b9\u30ad\u30fc\u30de\u3001\u304a\u3088\u3073OPTION\u53e5\u3067Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u306b\u306f\u3001\u5217\u3054\u3068\u306e\u30c7\u30fc\u30bf\u578b\u3068\u5217\u540d\uff08\u30aa\u30d7\u30b7\u30e7\u30f3\uff09\u304c\u542b\u307e\u308c\u3066\u304a\u308a\u3001\u3053\u308c\u3092\u7528\u3044\u3066\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u5b9a\u7fa9\u3092\u884c\u3044\u307e\u3059\u3002 IMPORT FOREIGN SCHEMA flogdata FROM SERVER arrow_fdw INTO public OPTIONS (file '/path/to/logdata.arrow');","title":"\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u5b9a\u7fa9"},{"location":"arrow_fdw/#_4","text":"Arrow_Fdw\u306f\u4ee5\u4e0b\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002\u73fe\u72b6\u3001\u5168\u3066\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u6307\u5b9a\u3059\u308b\u3082\u306e\u3067\u3059\u3002 file=PATHNAME \u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u30de\u30c3\u30d7\u3059\u308bArrow\u30d5\u30a1\u30a4\u30eb\u30921\u500b\u6307\u5b9a\u3057\u307e\u3059\u3002 files=PATHNAME1[,PATHNAME2...] \u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u30de\u30c3\u30d7\u3059\u308bArrow\u30d5\u30a1\u30a4\u30eb\u3092\u30ab\u30f3\u30de(,\uff09\u533a\u5207\u308a\u3067\u8907\u6570\u6307\u5b9a\u3057\u307e\u3059\u3002 dir=DIRNAME \u6307\u5b9a\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u5168\u3066\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u30de\u30c3\u30d7\u3057\u307e\u3059\u3002 suffix=SUFFIX dir \u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u6307\u5b9a\u6642\u3001\u4f8b\u3048\u3070 .arrow \u306a\u3069\u3001\u7279\u5b9a\u306e\u63a5\u5c3e\u53e5\u3092\u6301\u3064\u30d5\u30a1\u30a4\u30eb\u3060\u3051\u3092\u30de\u30c3\u30d7\u3057\u307e\u3059\u3002 parallel_workers=N_WORKERS \u3053\u306e\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u4e26\u5217\u30b9\u30ad\u30e3\u30f3\u306b\u4f7f\u7528\u3059\u308b\u4e26\u5217\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\u306e\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u4e00\u822c\u7684\u306a\u30c6\u30fc\u30d6\u30eb\u306b\u304a\u3051\u308b parallel_workers \u30b9\u30c8\u30ec\u30fc\u30b8\u30d1\u30e9\u30e1\u30fc\u30bf\u3068\u540c\u7b49\u306e\u610f\u5473\u3092\u6301\u3061\u307e\u3059\u3002 writable=(true|false) \u3053\u306e\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3059\u308b INSERT \u6587\u306e\u5b9f\u884c\u3092\u8a31\u53ef\u3057\u307e\u3059\u3002\u8a73\u7d30\u306f\u300e\u66f8\u304d\u8fbc\u307f\u53ef\u80fdArrow_Fdw\u300f\u306e\u7bc0\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002","title":"\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u30aa\u30d7\u30b7\u30e7\u30f3"},{"location":"arrow_fdw/#_5","text":"Arrow\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u578b\u3068\u3001PostgreSQL\u306e\u30c7\u30fc\u30bf\u578b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002 Int bitWidth \u5c5e\u6027\u306e\u5024\u306b\u5fdc\u3058\u3066\u3001\u305d\u308c\u305e\u308c int1 \u3001 int2 \u3001 int4 \u3001 int8 \u306e\u3044\u305a\u308c\u304b\u306b\u5bfe\u5fdc\u3002 is_signed \u5c5e\u6027\u306e\u5024\u306f\u7121\u8996\u3055\u308c\u307e\u3059\u3002 int1 \u306fPG-Strom\u306b\u3088\u308b\u72ec\u81ea\u62e1\u5f35 FloatingPoint precision \u5c5e\u6027\u306e\u5024\u306b\u5fdc\u3058\u3066\u3001\u305d\u308c\u305e\u308c float2 \u3001 float4 \u3001 float8 \u306e\u3044\u305a\u308c\u304b\u306b\u5bfe\u5fdc\u3002 float2 \u306fPG-Strom\u306b\u3088\u308b\u72ec\u81ea\u62e1\u5f35 Binary bytea \u578b\u306b\u5bfe\u5fdc Decimal numeric \u578b\u306b\u5bfe\u5fdc Date date \u578b\u306b\u5bfe\u5fdc\u3002 unit=Day \u76f8\u5f53\u3068\u306a\u308b\u3088\u3046\u306b\u88dc\u6b63\u3055\u308c\u308b\u3002 Time time \u578b\u306b\u5bfe\u5fdc\u3002 unit=MicroSecond \u76f8\u5f53\u306b\u306a\u308b\u3088\u3046\u306b\u88dc\u6b63\u3055\u308c\u308b\u3002 Timestamp timestamp \u578b\u306b\u5bfe\u5fdc\u3002 unit=MicroSecond \u76f8\u5f53\u306b\u306a\u308b\u3088\u3046\u306b\u88dc\u6b63\u3055\u308c\u308b\u3002 Interval interval \u578b\u306b\u5bfe\u5fdc List \u8981\u7d20\u578b\u306e1\u6b21\u5143\u914d\u5217\u578b\u3068\u3057\u3066\u8868\u73fe\u3055\u308c\u308b\u3002 Struct \u8907\u5408\u578b\u3068\u3057\u3066\u8868\u73fe\u3055\u308c\u308b\u3002\u5bfe\u5fdc\u3059\u308b\u8907\u5408\u578b\u306f\u4e88\u3081\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002 FixedSizeBinary byteWidth \u5c5e\u6027\u306e\u5024\u306b\u5fdc\u3058\u3066 char(n) \u3068\u3057\u3066\u8868\u73fe\u3055\u308c\u308b\u3002 \u30e1\u30bf\u30c7\u30fc\u30bf pg_type=TYPENAME \u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u8a72\u5f53\u3059\u308b\u30c7\u30fc\u30bf\u578b\u3092\u5272\u308a\u5f53\u3066\u308b\u5834\u5408\u304c\u3042\u308b\u3002\u73fe\u6642\u70b9\u3067\u306f\u3001 inet \u304a\u3088\u3073 macaddr \u578b\u3002 Union \u3001 Map \u3001 Duration \u3001 LargeBinary \u3001 LargeUtf8 \u3001 LargeList \u73fe\u6642\u70b9\u3067\u306fPostgreSQL\u30c7\u30fc\u30bf\u578b\u3078\u306e\u5bfe\u5fdc\u306f\u306a\u3057\u3002","title":"\u30c7\u30fc\u30bf\u578b\u306e\u5bfe\u5fdc"},{"location":"arrow_fdw/#explain","text":"EXPLAIN \u30b3\u30de\u30f3\u30c9\u3092\u7528\u3044\u3066\u3001Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u51fa\u3057\u306b\u95a2\u3059\u308b\u60c5\u5831\u3092\u51fa\u529b\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u7d04503GB\u306e\u5927\u304d\u3055\u3092\u6301\u3064Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092\u30de\u30c3\u30d7\u3057\u305ff_lineorder\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u542b\u3080\u30af\u30a8\u30ea\u5b9f\u884c\u8a08\u753b\u306e\u51fa\u529b\u3067\u3059\u3002 =# EXPLAIN SELECT sum(lo_extendedprice*lo_discount) as revenue FROM f_lineorder,date1 WHERE lo_orderdate = d_datekey AND d_year = 1993 AND lo_discount between 1 and 3 AND lo_quantity < 25; QUERY PLAN -------------------------------------------------------------------------------- Aggregate (cost=14535261.08..14535261.09 rows=1 width=8) -> Custom Scan (GpuPreAgg) on f_lineorder (cost=14535261.06..14535261.07 rows=1 width=32) GPU Projection: pgstrom.psum(((f_lineorder.lo_extendedprice * f_lineorder.lo_discount))::bigint) GPU Scan Quals: ((f_lineorder.lo_discount >= 1) AND (f_lineorder.lo_discount <= 3) AND (f_lineorder.lo_quantity < 25)) [rows: 5999990000 -> 9999983] GPU Join Quals [1]: (f_lineorder.lo_orderdate = date1.d_datekey) ... [nrows: 9999983 -> 1428010] GPU Outer Hash [1]: f_lineorder.lo_orderdate GPU Inner Hash [1]: date1.d_datekey referenced: lo_orderdate, lo_quantity, lo_extendedprice, lo_discount file0: /opt/nvme/f_lineorder_s999.arrow (read: 89.41GB, size: 502.92GB) GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 (cost=0.00..78.95 rows=365 width=4) Filter: (d_year = 1993) (12 rows) \u3053\u308c\u3092\u898b\u308b\u3068Custom Scan (GpuPreAgg)\u304c f_lineorder \u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u3066\u3044\u308b\u4e8b\u304c\u308f\u304b\u308a\u307e\u3059\u3002 file0 \u306b\u306f\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u80cc\u5f8c\u306b\u3042\u308b\u30d5\u30a1\u30a4\u30eb\u540d /opt/nvme/f_lineorder_s999.arrow \u3068\u305d\u306e\u30b5\u30a4\u30ba\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u8907\u6570\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u30de\u30c3\u30d7\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306b\u306f\u3001 file1 \u3001 file2 \u3001... \u3068\u5404\u30d5\u30a1\u30a4\u30eb\u6bce\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002 referenced \u306b\u306f\u5b9f\u969b\u306b\u53c2\u7167\u3055\u308c\u3066\u3044\u308b\u5217\u306e\u4e00\u89a7\u304c\u5217\u6319\u3055\u308c\u3066\u304a\u308a\u3001\u3053\u306e\u30af\u30a8\u30ea\u306b\u304a\u3044\u3066\u306f lo_orderdate \u3001 lo_quantity \u3001 lo_extendedprice \u304a\u3088\u3073 lo_discount \u5217\u304c\u53c2\u7167\u3055\u308c\u3066\u3044\u308b\u4e8b\u304c\u308f\u304b\u308a\u307e\u3059\u3002 \u307e\u305f\u3001 GPU-Direct SQL: enabled (GPU-0) \u306e\u8868\u793a\u304c\u3042\u308b\u4e8b\u304b\u3089\u3001 f_lineorder \u306e\u30b9\u30ad\u30e3\u30f3\u306b\u306fGPU-Direct SQL\u6a5f\u69cb\u304c\u7528\u3044\u3089\u308c\u308b\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3059\u3002 VERBOSE\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4ed8\u4e0e\u3059\u308b\u4e8b\u3067\u3001\u3088\u308a\u8a73\u7d30\u306a\u60c5\u5831\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002 =# EXPLAIN VERBOSE SELECT sum(lo_extendedprice*lo_discount) as revenue FROM f_lineorder,date1 WHERE lo_orderdate = d_datekey AND d_year = 1993 AND lo_discount between 1 and 3 AND lo_quantity < 25; QUERY PLAN -------------------------------------------------------------------------------- Aggregate (cost=14535261.08..14535261.09 rows=1 width=8) Output: pgstrom.sum_int((pgstrom.psum(((f_lineorder.lo_extendedprice * f_lineorder.lo_discount))::bigint))) -> Custom Scan (GpuPreAgg) on public.f_lineorder (cost=14535261.06..14535261.07 rows=1 width=32) Output: (pgstrom.psum(((f_lineorder.lo_extendedprice * f_lineorder.lo_discount))::bigint)) GPU Projection: pgstrom.psum(((f_lineorder.lo_extendedprice * f_lineorder.lo_discount))::bigint) GPU Scan Quals: ((f_lineorder.lo_discount >= 1) AND (f_lineorder.lo_discount <= 3) AND (f_lineorder.lo_quantity < 25)) [rows: 5999990000 -> 9999983] GPU Join Quals [1]: (f_lineorder.lo_orderdate = date1.d_datekey) ... [nrows: 9999983 -> 1428010] GPU Outer Hash [1]: f_lineorder.lo_orderdate GPU Inner Hash [1]: date1.d_datekey referenced: lo_orderdate, lo_quantity, lo_extendedprice, lo_discount file0: /opt/nvme/f_lineorder_s999.arrow (read: 89.41GB, size: 502.92GB) lo_orderdate: 22.35GB lo_quantity: 22.35GB lo_extendedprice: 22.35GB lo_discount: 22.35GB GPU-Direct SQL: enabled (GPU-0) KVars-Slot: , , , , , KVecs-Buffer: nbytes: 51200, ndims: 3, items=[kvec0=<0x0000-27ff, type='int4', expr='lo_discount'>, kvec1=<0x2800-4fff, type='int4', expr='lo_quantity'>, kvec2=<0x5000-77ff, type='int4', expr='lo_extendedprice'>, kvec3=<0x7800-9fff, type='int4', expr='lo_orderdate'>, kvec4=<0xa000-c7ff, type='int4', expr='d_datekey'>] LoadVars OpCode: {Packed items[0]={LoadVars(depth=0): kvars=[, , , ]}, items[1]={LoadVars(depth=1): kvars=[]}} MoveVars OpCode: {Packed items[0]={MoveVars(depth=0): items=[, , ]}}, items[1]={MoveVars(depth=1): items=[, ]}}} Scan Quals OpCode: {Bool::AND args=[{Func(bool)::int4ge args=[{Var(int4): slot=0, expr='lo_discount'}, {Const(int4): value='1'}]}, {Func(bool)::int4le args=[{Var(int4): slot=0, expr='lo_discount'}, {Const(int4): value='3'}]}, {Func(bool)::int4lt args=[{Var(int4): slot=1, expr='lo_quantity'}, {Const(int4): value='25'}]}]} Join Quals OpCode: {Packed items[1]={JoinQuals: {Func(bool)::int4eq args=[{Var(int4): kvec=0x7800-a000, expr='lo_orderdate'}, {Var(int4): slot=5, expr='d_datekey'}]}}} Join HashValue OpCode: {Packed items[1]={HashValue arg={Var(int4): kvec=0x7800-a000, expr='lo_orderdate'}}} Partial Aggregation OpCode: {AggFuncs arg={SaveExpr: arg={Func(int8)::int8 arg={Func(int4)::int4mul args=[{Var(int4): kvec=0x5000-7800, expr='lo_extendedprice'}, {Var(int4): kvec=0x0000-2800, expr='lo_discount'}]}}}} Partial Function BufSz: 16 -> Seq Scan on public.date1 (cost=0.00..78.95 rows=365 width=4) Output: date1.d_datekey Filter: (date1.d_year = 1993) (28 rows) \u88ab\u53c2\u7167\u5217\u3092\u30ed\u30fc\u30c9\u3059\u308b\u969b\u306b\u8aad\u307f\u51fa\u3059\u3079\u304d\u5217\u30c7\u30fc\u30bf\u306e\u5927\u304d\u3055\u3092\u3001\u5217\u3054\u3068\u306b\u8868\u793a\u3057\u3066\u3044\u307e\u3059\u3002 lo_orderdate \u3001 lo_quantity \u3001 lo_extendedprice \u304a\u3088\u3073 lo_discount \u5217\u306e\u30ed\u30fc\u30c9\u306b\u306f\u5408\u8a08\u306789.41GB\u306e\u8aad\u307f\u51fa\u3057\u304c\u5fc5\u8981\u3067\u3001\u3053\u308c\u306f\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba502.93GB\u306e17.8%\u306b\u76f8\u5f53\u3057\u307e\u3059\u3002","title":"EXPLAIN\u51fa\u529b\u306e\u8aad\u307f\u65b9"},{"location":"arrow_fdw/#arrow","text":"\u672c\u7bc0\u3067\u306f\u3001\u65e2\u306bPostgreSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u3092Apache Arrow\u5f62\u5f0f\u306b\u5909\u63db\u3059\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002","title":"Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210\u65b9\u6cd5"},{"location":"arrow_fdw/#pyarrowpandas","text":"Arrow\u958b\u767a\u8005\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u304c\u958b\u767a\u3092\u884c\u3063\u3066\u3044\u308b PyArrow \u30e2\u30b8\u30e5\u30fc\u30eb\u3068Pandas\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306e\u7d44\u5408\u305b\u3092\u7528\u3044\u3066\u3001PostgreSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u5185\u5bb9\u3092Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3078\u3068\u66f8\u304d\u51fa\u3059\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u30c6\u30fc\u30d6\u30ebt0\u306b\u683c\u7d0d\u3055\u308c\u305f\u30c7\u30fc\u30bf\u3092\u5168\u3066\u8aad\u8fbc\u307f\u3001\u30d5\u30a1\u30a4\u30eb/tmp/t0.arrow\u3078\u3068\u66f8\u304d\u51fa\u3059\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002 import pyarrow as pa import pandas as pd X = pd.read_sql(sql=\"SELECT * FROM t0\", con=\"postgresql://localhost/postgres\") Y = pa.Table.from_pandas(X) f = pa.RecordBatchFileWriter('/tmp/t0.arrow', Y.schema) f.write_table(Y,1000000) # RecordBatch for each million rows f.close() \u305f\u3060\u3057\u4e0a\u8a18\u306e\u65b9\u6cd5\u306f\u3001SQL\u3092\u4ecb\u3057\u3066PostgreSQL\u304b\u3089\u8aad\u307f\u51fa\u3057\u305f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u5185\u5bb9\u3092\u4e00\u5ea6\u30e1\u30e2\u30ea\u306b\u4fdd\u6301\u3059\u308b\u305f\u3081\u3001\u5927\u91cf\u306e\u884c\u3092\u4e00\u5ea6\u306b\u5909\u63db\u3059\u308b\u5834\u5408\u306b\u306f\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002","title":"PyArrow+Pandas"},{"location":"arrow_fdw/#pg2arrow","text":"\u4e00\u65b9\u3001PG-Strom Development Team\u304c\u958b\u767a\u3092\u884c\u3063\u3066\u3044\u308b pg2arrow \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u3001PostgreSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u5185\u5bb9\u3092Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3078\u3068\u66f8\u304d\u51fa\u3059\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u3053\u306e\u30c4\u30fc\u30eb\u306f\u6bd4\u8f03\u7684\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092NVME-SSD\u306a\u3069\u30b9\u30c8\u30ec\u30fc\u30b8\u306b\u66f8\u304d\u51fa\u3059\u4e8b\u3092\u5ff5\u982d\u306b\u8a2d\u8a08\u3055\u308c\u3066\u304a\u308a\u3001PostgreSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089 -s|--segment-size \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3057\u305f\u30b5\u30a4\u30ba\u306e\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u3059\u305f\u3073\u306b\u3001Arrow\u5f62\u5f0f\u306e\u30ec\u30b3\u30fc\u30c9\u30d0\u30c3\u30c1\uff08Record Batch\uff09\u3068\u3057\u3066\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u51fa\u3057\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30e1\u30e2\u30ea\u6d88\u8cbb\u91cf\u306f\u6bd4\u8f03\u7684\u30ea\u30fc\u30ba\u30ca\u30d6\u30eb\u306a\u5024\u3068\u306a\u308a\u307e\u3059\u3002 pg2arrow \u30b3\u30de\u30f3\u30c9\u306fPG-Strom\u306b\u540c\u68b1\u3055\u308c\u3066\u304a\u308a\u3001PostgreSQL\u95a2\u9023\u30b3\u30de\u30f3\u30c9\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u683c\u7d0d\u3055\u308c\u307e\u3059\u3002 $ pg2arrow --help Usage: pg2arrow [OPTION] [database] [username] General options: -d, --dbname=DBNAME Database name to connect to -c, --command=COMMAND SQL command to run -t, --table=TABLENAME Equivalent to '-c SELECT * FROM TABLENAME' (-c and -t are exclusive, either of them must be given) --inner-join=SUB_COMMAND --outer-join=SUB_COMMAND -o, --output=FILENAME result file in Apache Arrow format --append=FILENAME result Apache Arrow file to be appended (--output and --append are exclusive. If neither of them are given, it creates a temporary file.) -S, --stat[=COLUMNS] embeds min/max statistics for each record batch COLUMNS is a comma-separated list of the target columns if partially enabled. Arrow format options: -s, --segment-size=SIZE size of record batch for each Connection options: -h, --host=HOSTNAME database server host -p, --port=PORT database server port -u, --user=USERNAME database user name -w, --no-password never prompt for password -W, --password force password prompt Other options: --dump=FILENAME dump information of arrow file --progress shows progress of the job --set=NAME:VALUE config option to set before SQL execution --help shows this message Report bugs to . PostgreSQL\u3078\u306e\u63a5\u7d9a\u30d1\u30e9\u30e1\u30fc\u30bf\u306fpsql\u3084pg_dump\u3068\u540c\u69d8\u306b\u3001 -h \u3084 -U \u306a\u3069\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002 \u57fa\u672c\u7684\u306a\u30b3\u30de\u30f3\u30c9\u306e\u4f7f\u7528\u65b9\u6cd5\u306f\u3001 -c|--command \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3057\u305fSQL\u3092PostgreSQL\u4e0a\u3067\u5b9f\u884c\u3057\u3001\u305d\u306e\u7d50\u679c\u3092 -o|--output \u3067\u6307\u5b9a\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3078Arrow\u5f62\u5f0f\u3067\u66f8\u304d\u51fa\u3057\u307e\u3059\u3002 -o|--output \u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u4ee3\u308f\u308a\u306b --append \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u3001\u3053\u308c\u306f\u65e2\u5b58\u306eApache Arrow\u30d5\u30a1\u30a4\u30eb\u3078\u306e\u8ffd\u8a18\u3092\u610f\u5473\u3057\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001\u8ffd\u8a18\u3055\u308c\u308bApache Arrow\u30d5\u30a1\u30a4\u30eb\u306f\u6307\u5b9a\u3057\u305fSQL\u306e\u5b9f\u884c\u7d50\u679c\u3068\u5b8c\u5168\u306b\u4e00\u81f4\u3059\u308b\u30b9\u30ad\u30fc\u30de\u69cb\u9020\u3092\u6301\u305f\u306d\u3070\u306a\u308a\u307e\u305b\u3093\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u30c6\u30fc\u30d6\u30eb t0 \u306b\u683c\u7d0d\u3055\u308c\u305f\u30c7\u30fc\u30bf\u3092\u5168\u3066\u8aad\u8fbc\u307f\u3001\u30d5\u30a1\u30a4\u30eb /tmp/t0.arrow \u3078\u3068\u66f8\u304d\u51fa\u3059\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002 $ pg2arrow -U kaigai -d postgres -c \"SELECT * FROM t0\" -o /tmp/t0.arrow \u958b\u767a\u8005\u5411\u3051\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3059\u304c\u3001 --dump \u3067Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u3084\u30ec\u30b3\u30fc\u30c9\u30d0\u30c3\u30c1\u306e\u4f4d\u7f6e\u3068\u30b5\u30a4\u30ba\u3092\u53ef\u8aad\u306a\u5f62\u5f0f\u3067\u51fa\u529b\u3059\u308b\u4e8b\u3082\u3067\u304d\u307e\u3059\u3002 --progress \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3059\u308b\u3068\u3001\u51e6\u7406\u306e\u9014\u4e2d\u7d4c\u904e\u3092\u8868\u793a\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002\u3053\u308c\u306f\u5de8\u5927\u306a\u30c6\u30fc\u30d6\u30eb\u3092Apache Arrow\u5f62\u5f0f\u306b\u5909\u63db\u3059\u308b\u969b\u306b\u6709\u7528\u3067\u3059\u3002","title":"Pg2Arrow"},{"location":"arrow_fdw/#_6","text":"","title":"\u5148\u9032\u7684\u306a\u4f7f\u3044\u65b9"},{"location":"arrow_fdw/#ssdtogpusql","text":"Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u30de\u30c3\u30d7\u3055\u308c\u305f\u5168\u3066\u306eArrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u304c\u4ee5\u4e0b\u306e\u6761\u4ef6\u3092\u6e80\u305f\u3059\u5834\u5408\u306b\u306f\u3001\u5217\u30c7\u30fc\u30bf\u306e\u8aad\u307f\u51fa\u3057\u306bSSD-to-GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u3092\u4f7f\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u304cNVME-SSD\u533a\u753b\u4e0a\u306b\u7f6e\u304b\u308c\u3066\u3044\u308b\u3002 NVME-SSD\u533a\u753b\u306fExt4\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3067\u69cb\u7bc9\u3055\u308c\u3066\u3044\u308b\u3002 Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u7dcf\u8a08\u304c pg_strom.nvme_strom_threshold \u8a2d\u5b9a\u3092\u4e0a\u56de\u3063\u3066\u3044\u308b\u3002","title":"SSDtoGPU\u30c0\u30a4\u30ec\u30af\u30c8SQL"},{"location":"arrow_fdw/#_7","text":"Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u4e00\u90e8\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u901a\u5e38\u306ePostgreSQL\u30c6\u30fc\u30d6\u30eb\u3068\u6df7\u5728\u3059\u308b\u4e8b\u3082\u53ef\u80fd\u3067\u3059\u304c\u3001Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306f\u66f8\u304d\u8fbc\u307f\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u4e8b\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u307e\u305f\u3001\u30de\u30c3\u30d7\u3055\u308c\u305fArrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306b\u542b\u307e\u308c\u308b\u30c7\u30fc\u30bf\u306f\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u5883\u754c\u6761\u4ef6\u3068\u77db\u76fe\u3057\u306a\u3044\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u7ba1\u7406\u8005\u306e\u8cac\u4efb\u3067\u3059\u3002 \u5178\u578b\u7684\u306a\u5229\u7528\u30b7\u30fc\u30f3\u306f\u3001\u9577\u671f\u9593\u306b\u308f\u305f\u308a\u84c4\u7a4d\u3057\u305f\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u51e6\u7406\u3067\u3059\u3002 \u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u30c7\u30fc\u30bf\u3068\u7570\u306a\u308a\u3001\u4e00\u822c\u7684\u306b\u30ed\u30b0\u30c7\u30fc\u30bf\u306f\u4e00\u5ea6\u8a18\u9332\u3055\u308c\u305f\u3089\u305d\u306e\u5f8c\u66f4\u65b0\u524a\u9664\u3055\u308c\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u3057\u305f\u304c\u3063\u3066\u3001\u4e00\u5b9a\u671f\u9593\u304c\u7d4c\u904e\u3057\u305f\u30ed\u30b0\u30c7\u30fc\u30bf\u306f\u3001\u8aad\u307f\u51fa\u3057\u5c02\u7528\u3067\u306f\u3042\u308b\u3082\u306e\u306e\u96c6\u8a08\u51e6\u7406\u304c\u9ad8\u901f\u306aArrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u79fb\u3057\u66ff\u3048\u308b\u3053\u3068\u3067\u3001\u96c6\u8a08\u30fb\u89e3\u6790\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u51e6\u7406\u52b9\u7387\u3092\u5f15\u304d\u4e0a\u3052\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u30ed\u30b0\u30c7\u30fc\u30bf\u306b\u306f\u307b\u307c\u9593\u9055\u3044\u306a\u304f\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u304c\u4ed8\u4e0e\u3055\u308c\u3066\u3044\u308b\u4e8b\u304b\u3089\u3001\u6708\u5358\u4f4d\u3001\u9031\u5358\u4f4d\u306a\u3069\u3001\u4e00\u5b9a\u671f\u9593\u3054\u3068\u306b\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u3092\u8ffd\u52a0\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001PostgreSQL\u30c6\u30fc\u30d6\u30eb\u3068Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u6df7\u5728\u3055\u305b\u305f\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u3092\u5b9a\u7fa9\u3057\u305f\u3082\u306e\u3067\u3059\u3002 \u66f8\u304d\u8fbc\u307f\u304c\u53ef\u80fd\u306aPostgreSQL\u30c6\u30fc\u30d6\u30eb\u3092\u30c7\u30d5\u30a9\u30eb\u30c8\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3068\u3057\u3066\u6307\u5b9a\u3057\u3066\u304a\u304f\u4e8b\u3067\u3001\u4e00\u5b9a\u671f\u9593\u306e\u7d4c\u904e\u5f8c\u3001DB\u904b\u7528\u3092\u7d99\u7d9a\u3057\u306a\u304c\u3089\u904e\u53bb\u306e\u30ed\u30b0\u30c7\u30fc\u30bf\u3060\u3051\u3092Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3078\u79fb\u3059\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 CREATE TABLE lineorder ( lo_orderkey numeric, lo_linenumber integer, lo_custkey numeric, lo_partkey integer, lo_suppkey numeric, lo_orderdate integer, lo_orderpriority character(15), lo_shippriority character(1), lo_quantity numeric, lo_extendedprice numeric, lo_ordertotalprice numeric, lo_discount numeric, lo_revenue numeric, lo_supplycost numeric, lo_tax numeric, lo_commit_date character(8), lo_shipmode character(10) ) PARTITION BY RANGE (lo_orderdate); CREATE TABLE lineorder__now PARTITION OF lineorder default; CREATE FOREIGN TABLE lineorder__1993 PARTITION OF lineorder FOR VALUES FROM (19930101) TO (19940101) SERVER arrow_fdw OPTIONS (file '/opt/tmp/lineorder_1993.arrow'); CREATE FOREIGN TABLE lineorder__1994 PARTITION OF lineorder FOR VALUES FROM (19940101) TO (19950101) SERVER arrow_fdw OPTIONS (file '/opt/tmp/lineorder_1994.arrow'); CREATE FOREIGN TABLE lineorder__1995 PARTITION OF lineorder FOR VALUES FROM (19950101) TO (19960101) SERVER arrow_fdw OPTIONS (file '/opt/tmp/lineorder_1995.arrow'); CREATE FOREIGN TABLE lineorder__1996 PARTITION OF lineorder FOR VALUES FROM (19960101) TO (19970101) SERVER arrow_fdw OPTIONS (file '/opt/tmp/lineorder_1996.arrow'); \u3053\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3059\u308b\u554f\u3044\u5408\u308f\u305b\u306e\u5b9f\u884c\u8a08\u753b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 \u691c\u7d22\u6761\u4ef6 lo_orderdate between 19950701 and 19960630 \u304c\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u5883\u754c\u6761\u4ef6\u3092\u542b\u3093\u3067\u3044\u308b\u4e8b\u304b\u3089\u3001\u5b50\u30c6\u30fc\u30d6\u30eb lineorder__1993 \u3068 lineorder__1994 \u306f\u691c\u7d22\u5bfe\u8c61\u304b\u3089\u6392\u9664\u3055\u308c\u3001\u4ed6\u306e\u30c6\u30fc\u30d6\u30eb\u3060\u3051\u3092\u8aad\u307f\u51fa\u3059\u3088\u3046\u5b9f\u884c\u8a08\u753b\u304c\u4f5c\u3089\u308c\u3066\u3044\u307e\u3059\u3002 =# EXPLAIN SELECT sum(lo_extendedprice*lo_discount) as revenue FROM lineorder,date1 WHERE lo_orderdate = d_datekey AND lo_orderdate between 19950701 and 19960630 AND lo_discount between 1 and 3 ABD lo_quantity < 25; QUERY PLAN -------------------------------------------------------------------------------- Aggregate (cost=172088.90..172088.91 rows=1 width=32) -> Hash Join (cost=10548.86..172088.51 rows=77 width=64) Hash Cond: (lineorder__1995.lo_orderdate = date1.d_datekey) -> Append (cost=10444.35..171983.80 rows=77 width=67) -> Custom Scan (GpuScan) on lineorder__1995 (cost=10444.35..33671.87 rows=38 width=68) GPU Filter: ((lo_orderdate >= 19950701) AND (lo_orderdate <= 19960630) AND (lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) referenced: lo_orderdate, lo_quantity, lo_extendedprice, lo_discount files0: /opt/tmp/lineorder_1995.arrow (size: 892.57MB) -> Custom Scan (GpuScan) on lineorder__1996 (cost=10444.62..33849.21 rows=38 width=68) GPU Filter: ((lo_orderdate >= 19950701) AND (lo_orderdate <= 19960630) AND (lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) referenced: lo_orderdate, lo_quantity, lo_extendedprice, lo_discount files0: /opt/tmp/lineorder_1996.arrow (size: 897.87MB) -> Custom Scan (GpuScan) on lineorder__now (cost=11561.33..104462.33 rows=1 width=18) GPU Filter: ((lo_orderdate >= 19950701) AND (lo_orderdate <= 19960630) AND (lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) -> Hash (cost=72.56..72.56 rows=2556 width=4) -> Seq Scan on date1 (cost=0.00..72.56 rows=2556 width=4) (16 rows) \u3053\u306e\u5f8c\u3001 lineorder__now \u30c6\u30fc\u30d6\u30eb\u304b\u30891997\u5e74\u306e\u30c7\u30fc\u30bf\u3092\u629c\u304d\u51fa\u3057\u3001\u3053\u308c\u3092Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u5074\u306b\u79fb\u3059\u306b\u306f\u4ee5\u4e0b\u306e\u64cd\u4f5c\u3092\u884c\u3044\u307e\u3059 $ pg2arrow -d sample -o /opt/tmp/lineorder_1997.arrow \\ -c \"SELECT * FROM lineorder WHERE lo_orderdate between 19970101 and 19971231\" pg2arrow \u30b3\u30de\u30f3\u30c9\u306b\u3088\u308a\u3001 lineorder \u30c6\u30fc\u30d6\u30eb\u304b\u30891997\u5e74\u306e\u30c7\u30fc\u30bf\u3060\u3051\u3092\u629c\u304d\u51fa\u3057\u3066\u3001\u65b0\u3057\u3044Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3078\u66f8\u304d\u51fa\u3057\u307e\u3059\u3002 BEGIN; -- -- remove rows in 1997 from the read-writable table -- DELETE FROM lineorder WHERE lo_orderdate BETWEEN 19970101 AND 19971231; -- -- define a new partition leaf which maps log-data in 1997 -- CREATE FOREIGN TABLE lineorder__1997 PARTITION OF lineorder FOR VALUES FROM (19970101) TO (19980101) SERVER arrow_fdw OPTIONS (file '/opt/tmp/lineorder_1997.arrow'); COMMIT; \u3053\u306e\u64cd\u4f5c\u306b\u3088\u308a\u3001PostgreSQL\u30c6\u30fc\u30d6\u30eb\u3067\u3042\u308b lineorder__now \u304b\u30891997\u5e74\u306e\u30c7\u30fc\u30bf\u3092\u524a\u9664\u3057\u3001\u4ee3\u308f\u308a\u306b\u540c\u4e00\u5185\u5bb9\u306eArrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb /opt/tmp/lineorder_1997.arrow \u3092\u5916\u90e8\u30c6\u30fc\u30d6\u30eb lineorder__1997 \u3068\u3057\u3066\u30de\u30c3\u30d7\u3057\u307e\u3057\u305f\u3002 \u6b63\u78ba\u306b\u306f\u30014KB\uff5e32KB\u306e\u7bc4\u56f2\u3067\u30d3\u30eb\u30c9\u6642\u306b\u6307\u5b9a\u3067\u304d\u307e\u3059 \u21a9","title":"\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u8a2d\u5b9a"},{"location":"brin/","text":"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5bfe\u5fdc \u6982\u8981 PostgreSQL\u306f\u4f55\u7a2e\u985e\u304b\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5f62\u5f0f\u306b\u5bfe\u5fdc\u3057\u3066\u304a\u308a\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u9078\u629e\u3055\u308c\u308bB-tree\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u7279\u5b9a\u306e\u5024\u3092\u6301\u3064\u30ec\u30b3\u30fc\u30c9\u3092\u9ad8\u901f\u306b\u691c\u7d22\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002\u3053\u308c\u4ee5\u5916\u306b\u3082\u3001Hash\u3001BRIN\u3001GiST\u3001GIN\u306a\u3069\u7279\u6027\u306e\u7570\u306a\u308b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5f62\u5f0f\u304c\u63d0\u4f9b\u3055\u308c\u3066\u304a\u308a\u3001\u73fe\u5728\u306e\u3068\u3053\u308dPG-Strom\u306fBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u306e\u307f\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002 BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u3001\u6642\u7cfb\u5217\u30c7\u30fc\u30bf\u306b\u304a\u3051\u308b\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u5024\u306a\u3069\u3001\u7269\u7406\u7684\u306b\u8fd1\u508d\u306b\u4f4d\u7f6e\u3059\u308b\u30ec\u30b3\u30fc\u30c9\u540c\u58eb\u304c\u8fd1\u3057\u3044\u5024\u3092\u6301\u3063\u3066\u3044\u308b\u4e8b\u304c\u671f\u5f85\u3067\u304d\u308b\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u5bfe\u3057\u3066\u6709\u52b9\u306b\u4f5c\u7528\u3057\u307e\u3059\u3002\u672c\u6765\u306f\u5168\u4ef6\u30b9\u30ad\u30e3\u30f3\u304c\u5fc5\u8981\u306a\u64cd\u4f5c\u3067\u3042\u3063\u3066\u3082\u3001\u660e\u3089\u304b\u306b\u6761\u4ef6\u53e5\u306b\u30de\u30c3\u30c1\u3057\u306a\u3044\u9818\u57df\u3092\u8aad\u307f\u98db\u3070\u3057\u3001\u5168\u4ef6\u30b9\u30ad\u30e3\u30f3\u306b\u4f34\u3046I/O\u91cf\u3092\u524a\u6e1b\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 PG-Strom\u306b\u304a\u3044\u3066\u3082BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u7279\u6027\u3092\u6d3b\u7528\u3057\u3001GPU\u306b\u30ed\u30fc\u30c9\u3059\u3079\u304d\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u306e\u3046\u3061\u660e\u3089\u304b\u306b\u4e0d\u8981\u3067\u3042\u308b\u3082\u306e\u3092\u8aad\u307f\u98db\u3070\u3059\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002 \u8a2d\u5b9a BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u7279\u5225\u306a\u8a2d\u5b9a\u306f\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002 CREATE INDEX\u69cb\u6587\u3092\u7528\u3044\u3066\u5bfe\u8c61\u5217\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u304a\u308a\u3001\u304b\u3064\u3001\u691c\u7d22\u6761\u4ef6\u304cBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u9069\u5408\u3059\u308b\u3082\u306e\u3067\u3042\u308c\u3070\u81ea\u52d5\u7684\u306b\u9069\u7528\u3055\u308c\u307e\u3059\u3002 BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u81ea\u4f53\u306e\u8aac\u660e\u306f\u3001 PostgreSQL\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8 \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u4ee5\u4e0b\u306eGUC\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3088\u308a\u3001PG-Strom\u304cBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002\u30c7\u30d0\u30c3\u30b0\u3084\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u5834\u5408\u3092\u9664\u304d\u3001\u901a\u5e38\u306f\u521d\u671f\u8a2d\u5b9a\u306e\u307e\u307e\u3067\u69cb\u3044\u307e\u305b\u3093\u3002 \u30d1\u30e9\u30e1\u30fc\u30bf\u540d \u578b \u521d\u671f\u5024 \u8aac\u660e pg_strom.enable_brin bool on BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002 \u64cd\u4f5c EXPLAIN \u69cb\u6587\u306b\u3088\u308aBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 postgres=# EXPLAIN ANALYZE SELECT * FROM dt WHERE ymd BETWEEN '2018-01-01' AND '2018-12-31' AND cat LIKE '%aaa%'; QUERY PLAN -------------------------------------------------------------------------------- Custom Scan (GpuScan) on dt (cost=94810.93..176275.00 rows=169992 width=44) (actual time=1777.819..1901.537 rows=175277 loops=1) GPU Filter: ((ymd >= '2018-01-01'::date) AND (ymd <= '2018-12-31'::date) AND (cat ~~ '%aaa%'::text)) Rows Removed by GPU Filter: 4385491 BRIN cond: ((ymd >= '2018-01-01'::date) AND (ymd <= '2018-12-31'::date)) BRIN skipped: 424704 Planning time: 0.529 ms Execution time: 2323.063 ms (7 rows) \u4e0a\u8a18\u306e\u4f8b\u3067\u306f ymd \u5217\u306bBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u304a\u308a\u3001 BRIN cond \u306e\u8868\u793a\u306fBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u3088\u308b\u7d5e\u308a\u8fbc\u307f\u6761\u4ef6\u3092\u3001 BRIN skipped \u306e\u8868\u793a\u306fBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u3088\u308a\u5b9f\u969b\u306b\u8aad\u307f\u98db\u3070\u3055\u308c\u305f\u30d6\u30ed\u30c3\u30af\u306e\u6570\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002 \u3053\u306e\u4f8b\u3067\u306f424704\u30d6\u30ed\u30c3\u30af\u304c\u8aad\u307f\u98db\u3070\u3055\u308c\u3001\u3055\u3089\u306b\u3001\u8aad\u307f\u8fbc\u3093\u3060\u30d6\u30ed\u30c3\u30af\u306b\u542b\u307e\u308c\u3066\u3044\u308b\u30ec\u30b3\u30fc\u30c9\u306e\u3046\u30614385491\u884c\u304c\u6761\u4ef6\u53e5\u306b\u3088\u3063\u3066\u30d5\u30a3\u30eb\u30bf\u3055\u308c\u305f\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 \u30c7\u30fc\u30bf\u8ee2\u9001\u306e\u30ed\u30b9\u3092\u6e1b\u3089\u3059\u305f\u3081\u3001GpuJoin\u3084GpuPreAgg\u304c\u76f4\u4e0b\u306e\u30c6\u30fc\u30d6\u30eb\u30b9\u30ad\u30e3\u30f3\u3092\u5f15\u304d\u4e0a\u3052\u3001\u81ea\u3089\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u51e6\u7406\u3092\u884c\u3046\u4e8b\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3067\u3082\u3001BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u5229\u7528\u53ef\u80fd\u3067\u3042\u308c\u3070\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u3088\u308b\u7d5e\u308a\u8fbc\u307f\u3092\u884c\u3044\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001GROUP BY\u3092\u542b\u3080\u51e6\u7406\u3067BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u30b1\u30fc\u30b9\u3067\u3059\u3002 postgres=# EXPLAIN ANALYZE SELECT cat,count(*) FROM dt WHERE ymd BETWEEN '2018-01-01' AND '2018-12-31' GROUP BY cat; QUERY PLAN -------------------------------------------------------------------------------- GroupAggregate (cost=6149.78..6151.86 rows=26 width=12) (actual time=427.482..427.499 rows=26 loops=1) Group Key: cat -> Sort (cost=6149.78..6150.24 rows=182 width=12) (actual time=427.465..427.467 rows=26 loops=1) Sort Key: cat Sort Method: quicksort Memory: 26kB -> Custom Scan (GpuPreAgg) on dt (cost=6140.68..6142.95 rows=182 width=12) (actual time=427.331..427.339 rows=26 loops=1) Reduction: Local Outer Scan: dt (cost=4000.00..4011.99 rows=4541187 width=4) (actual time=78.573..415.961 rows=4560768 loops=1) Outer Scan Filter: ((ymd >= '2018-01-01'::date) AND (ymd <= '2018-12-31'::date)) Rows Removed by Outer Scan Filter: 15564 BRIN cond: ((ymd >= '2018-01-01'::date) AND (ymd <= '2018-12-31'::date)) BRIN skipped: 424704 Planning time: 30.992 ms Execution time: 818.994 ms (14 rows)","title":"BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9"},{"location":"brin/#_1","text":"","title":"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5bfe\u5fdc"},{"location":"brin/#_2","text":"PostgreSQL\u306f\u4f55\u7a2e\u985e\u304b\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5f62\u5f0f\u306b\u5bfe\u5fdc\u3057\u3066\u304a\u308a\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u9078\u629e\u3055\u308c\u308bB-tree\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u7279\u5b9a\u306e\u5024\u3092\u6301\u3064\u30ec\u30b3\u30fc\u30c9\u3092\u9ad8\u901f\u306b\u691c\u7d22\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002\u3053\u308c\u4ee5\u5916\u306b\u3082\u3001Hash\u3001BRIN\u3001GiST\u3001GIN\u306a\u3069\u7279\u6027\u306e\u7570\u306a\u308b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5f62\u5f0f\u304c\u63d0\u4f9b\u3055\u308c\u3066\u304a\u308a\u3001\u73fe\u5728\u306e\u3068\u3053\u308dPG-Strom\u306fBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u306e\u307f\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002 BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u3001\u6642\u7cfb\u5217\u30c7\u30fc\u30bf\u306b\u304a\u3051\u308b\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u5024\u306a\u3069\u3001\u7269\u7406\u7684\u306b\u8fd1\u508d\u306b\u4f4d\u7f6e\u3059\u308b\u30ec\u30b3\u30fc\u30c9\u540c\u58eb\u304c\u8fd1\u3057\u3044\u5024\u3092\u6301\u3063\u3066\u3044\u308b\u4e8b\u304c\u671f\u5f85\u3067\u304d\u308b\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u5bfe\u3057\u3066\u6709\u52b9\u306b\u4f5c\u7528\u3057\u307e\u3059\u3002\u672c\u6765\u306f\u5168\u4ef6\u30b9\u30ad\u30e3\u30f3\u304c\u5fc5\u8981\u306a\u64cd\u4f5c\u3067\u3042\u3063\u3066\u3082\u3001\u660e\u3089\u304b\u306b\u6761\u4ef6\u53e5\u306b\u30de\u30c3\u30c1\u3057\u306a\u3044\u9818\u57df\u3092\u8aad\u307f\u98db\u3070\u3057\u3001\u5168\u4ef6\u30b9\u30ad\u30e3\u30f3\u306b\u4f34\u3046I/O\u91cf\u3092\u524a\u6e1b\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 PG-Strom\u306b\u304a\u3044\u3066\u3082BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u7279\u6027\u3092\u6d3b\u7528\u3057\u3001GPU\u306b\u30ed\u30fc\u30c9\u3059\u3079\u304d\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u306e\u3046\u3061\u660e\u3089\u304b\u306b\u4e0d\u8981\u3067\u3042\u308b\u3082\u306e\u3092\u8aad\u307f\u98db\u3070\u3059\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002","title":"\u6982\u8981"},{"location":"brin/#_3","text":"BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u7279\u5225\u306a\u8a2d\u5b9a\u306f\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002 CREATE INDEX\u69cb\u6587\u3092\u7528\u3044\u3066\u5bfe\u8c61\u5217\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u304a\u308a\u3001\u304b\u3064\u3001\u691c\u7d22\u6761\u4ef6\u304cBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u9069\u5408\u3059\u308b\u3082\u306e\u3067\u3042\u308c\u3070\u81ea\u52d5\u7684\u306b\u9069\u7528\u3055\u308c\u307e\u3059\u3002 BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u81ea\u4f53\u306e\u8aac\u660e\u306f\u3001 PostgreSQL\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8 \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u4ee5\u4e0b\u306eGUC\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3088\u308a\u3001PG-Strom\u304cBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002\u30c7\u30d0\u30c3\u30b0\u3084\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u5834\u5408\u3092\u9664\u304d\u3001\u901a\u5e38\u306f\u521d\u671f\u8a2d\u5b9a\u306e\u307e\u307e\u3067\u69cb\u3044\u307e\u305b\u3093\u3002 \u30d1\u30e9\u30e1\u30fc\u30bf\u540d \u578b \u521d\u671f\u5024 \u8aac\u660e pg_strom.enable_brin bool on BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002","title":"\u8a2d\u5b9a"},{"location":"brin/#_4","text":"EXPLAIN \u69cb\u6587\u306b\u3088\u308aBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 postgres=# EXPLAIN ANALYZE SELECT * FROM dt WHERE ymd BETWEEN '2018-01-01' AND '2018-12-31' AND cat LIKE '%aaa%'; QUERY PLAN -------------------------------------------------------------------------------- Custom Scan (GpuScan) on dt (cost=94810.93..176275.00 rows=169992 width=44) (actual time=1777.819..1901.537 rows=175277 loops=1) GPU Filter: ((ymd >= '2018-01-01'::date) AND (ymd <= '2018-12-31'::date) AND (cat ~~ '%aaa%'::text)) Rows Removed by GPU Filter: 4385491 BRIN cond: ((ymd >= '2018-01-01'::date) AND (ymd <= '2018-12-31'::date)) BRIN skipped: 424704 Planning time: 0.529 ms Execution time: 2323.063 ms (7 rows) \u4e0a\u8a18\u306e\u4f8b\u3067\u306f ymd \u5217\u306bBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u304a\u308a\u3001 BRIN cond \u306e\u8868\u793a\u306fBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u3088\u308b\u7d5e\u308a\u8fbc\u307f\u6761\u4ef6\u3092\u3001 BRIN skipped \u306e\u8868\u793a\u306fBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u3088\u308a\u5b9f\u969b\u306b\u8aad\u307f\u98db\u3070\u3055\u308c\u305f\u30d6\u30ed\u30c3\u30af\u306e\u6570\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002 \u3053\u306e\u4f8b\u3067\u306f424704\u30d6\u30ed\u30c3\u30af\u304c\u8aad\u307f\u98db\u3070\u3055\u308c\u3001\u3055\u3089\u306b\u3001\u8aad\u307f\u8fbc\u3093\u3060\u30d6\u30ed\u30c3\u30af\u306b\u542b\u307e\u308c\u3066\u3044\u308b\u30ec\u30b3\u30fc\u30c9\u306e\u3046\u30614385491\u884c\u304c\u6761\u4ef6\u53e5\u306b\u3088\u3063\u3066\u30d5\u30a3\u30eb\u30bf\u3055\u308c\u305f\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 \u30c7\u30fc\u30bf\u8ee2\u9001\u306e\u30ed\u30b9\u3092\u6e1b\u3089\u3059\u305f\u3081\u3001GpuJoin\u3084GpuPreAgg\u304c\u76f4\u4e0b\u306e\u30c6\u30fc\u30d6\u30eb\u30b9\u30ad\u30e3\u30f3\u3092\u5f15\u304d\u4e0a\u3052\u3001\u81ea\u3089\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u51e6\u7406\u3092\u884c\u3046\u4e8b\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3067\u3082\u3001BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u5229\u7528\u53ef\u80fd\u3067\u3042\u308c\u3070\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u3088\u308b\u7d5e\u308a\u8fbc\u307f\u3092\u884c\u3044\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001GROUP BY\u3092\u542b\u3080\u51e6\u7406\u3067BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u30b1\u30fc\u30b9\u3067\u3059\u3002 postgres=# EXPLAIN ANALYZE SELECT cat,count(*) FROM dt WHERE ymd BETWEEN '2018-01-01' AND '2018-12-31' GROUP BY cat; QUERY PLAN -------------------------------------------------------------------------------- GroupAggregate (cost=6149.78..6151.86 rows=26 width=12) (actual time=427.482..427.499 rows=26 loops=1) Group Key: cat -> Sort (cost=6149.78..6150.24 rows=182 width=12) (actual time=427.465..427.467 rows=26 loops=1) Sort Key: cat Sort Method: quicksort Memory: 26kB -> Custom Scan (GpuPreAgg) on dt (cost=6140.68..6142.95 rows=182 width=12) (actual time=427.331..427.339 rows=26 loops=1) Reduction: Local Outer Scan: dt (cost=4000.00..4011.99 rows=4541187 width=4) (actual time=78.573..415.961 rows=4560768 loops=1) Outer Scan Filter: ((ymd >= '2018-01-01'::date) AND (ymd <= '2018-12-31'::date)) Rows Removed by Outer Scan Filter: 15564 BRIN cond: ((ymd >= '2018-01-01'::date) AND (ymd <= '2018-12-31'::date)) BRIN skipped: 424704 Planning time: 30.992 ms Execution time: 818.994 ms (14 rows)","title":"\u64cd\u4f5c"},{"location":"fluentd/","text":"Fluentd\u9023\u643a \u672c\u7ae0\u3067\u306f\u3001Apache Arrow\u30c7\u30fc\u30bf\u5f62\u5f0f\u3092\u4ecb\u3057\u305fFluentd\u3068\u306e\u9023\u643a\u3068\u3001IoT/M2M\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u52b9\u7387\u7684\u306a\u53d6\u308a\u8fbc\u307f\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u6982\u8981 IoT/M2M\u3068\u3088\u3070\u308c\u308b\u6280\u8853\u9818\u57df\u306b\u304a\u3044\u3066\u306f\u3001PC\u3084\u30b5\u30fc\u30d0\u3060\u3051\u3067\u306a\u304f\u3001\u643a\u5e2f\u96fb\u8a71\u3084\u81ea\u52d5\u8eca\u3001\u5404\u7a2e\u30bb\u30f3\u30b5\u30fc\u306a\u3069\u306e\u30c7\u30d0\u30a4\u30b9\u304c\u751f\u6210\u3057\u305f\u5927\u91cf\u306e\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u84c4\u7a4d\u3057\u3001\u3053\u308c\u3092\u5206\u6790\u3059\u308b\u305f\u3081\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u304c\u6570\u591a\u304f\u958b\u767a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u5927\u91cf\u306e\u30c7\u30d0\u30a4\u30b9\u304c\u6642\u3005\u523b\u3005\u3068\u751f\u6210\u3059\u308b\u30c7\u30fc\u30bf\u306f\u975e\u5e38\u306b\u5927\u304d\u306a\u30b5\u30a4\u30ba\u306b\u306a\u308a\u304c\u3061\u3067\u3001\u3053\u308c\u3092\u5b9f\u7528\u7684\u306a\u6642\u9593\u5185\u306b\u51e6\u7406\u3059\u308b\u306b\u306f\u3001\u7279\u5225\u306a\u5de5\u592b\u304c\u5fc5\u8981\u3068\u306a\u308b\u304b\u3089\u3067\u3059\u3002 PG-Strom\u306e\u5404\u7a2e\u6a5f\u80fd\u306f\u3001\u3053\u3046\u3044\u3063\u305f\u898f\u6a21\u306e\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u9ad8\u901f\u306b\u51e6\u7406\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u30fb\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u3057\u304b\u3057\u4e00\u65b9\u3067\u3001\u3053\u3046\u3057\u305f\u898f\u6a21\u306e\u30c7\u30fc\u30bf\u306e\u691c\u7d22\u30fb\u96c6\u8a08\u304c\u53ef\u80fd\u306a\u72b6\u614b\u306b\u3059\u308b\u305f\u3081\u306b\u30c7\u30fc\u30bf\u3092\u79fb\u9001\u3057\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u53d6\u308a\u8fbc\u3080\u306b\u306f\u6642\u9593\u304c\u304b\u304b\u308a\u304c\u3061\u3067\u3059\u3002 \u305d\u3053\u3067\u3001PG-Strom\u306b\u306fFluentd\u5411\u3051\u306bApache Arrow\u5f62\u5f0f\u3067\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b fluent-plugin-arrow-file \u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u540c\u68b1\u3057\u3001\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u30a4\u30f3\u30dd\u30fc\u30c8\u3068\u3044\u3046\u554f\u984c\u306b\u5bfe\u51e6\u3092\u8a66\u307f\u3066\u3044\u307e\u3059\u3002 Fluentd\u306f\u53e4\u6a4b\u8c9e\u4e4b\u6c0f\u306b\u3088\u3063\u3066\u958b\u767a\u3055\u308c\u305f\u30ed\u30b0\u53ce\u96c6\u30c4\u30fc\u30eb\u3067\u3001Syslog\u306e\u3088\u3046\u306a\u30b5\u30fc\u30d0\u30ed\u30b0\u304b\u3089IoT/M2M\u6a5f\u5668\u306e\u30c7\u30d0\u30a4\u30b9\u30ed\u30b0\u306b\u81f3\u308b\u307e\u3067\u3001\u591a\u7a2e\u591a\u69d8\u306a\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u96c6\u7a4d\u30fb\u4fdd\u5b58\u3059\u308b\u305f\u3081\u306b\u4e8b\u5b9f\u4e0a\u306e\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u3068\u3057\u3066\u5229\u7528\u3055\u308c\u3066\u3044\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3067\u3059\u3002 Ruby\u3067\u8a18\u8ff0\u3055\u308c\u305f\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8ffd\u52a0\u306b\u3088\u308a\u3001\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u5165\u51fa\u529b\u3084\u52a0\u5de5\u3092\u81ea\u5728\u306b\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u30012022\u5e74\u73fe\u5728\u3001800\u7a2e\u985e\u3092\u8d8a\u3048\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u516c\u5f0fWeb\u30b5\u30a4\u30c8\u3067\u7d39\u4ecb\u3055\u308c\u3066\u3044\u307e\u3059\u3002 PG-Strom\u304c\u53d6\u308a\u6271\u3046\u3053\u3068\u306e\u3067\u304d\u308b\u30c7\u30fc\u30bf\u5f62\u5f0f\u306f\u3001PostgreSQL Heap\u5f62\u5f0f\uff08\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30ca\u30eb\u884c\u30c7\u30fc\u30bf\uff09\u3068Apache Arrow\u5f62\u5f0f\uff08\u69cb\u9020\u5316\u5217\u30c7\u30fc\u30bf\uff09\u306e\uff12\u7a2e\u985e\u3067\u3059\u304c\u3001IoT/M2M\u9818\u57df\u3067\u60f3\u5b9a\u3055\u308c\u308b\u3088\u3046\u306a\u3001\u6642\u3005\u523b\u3005\u3068\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u304c\u767a\u751f\u3059\u308b\u3088\u3046\u306a\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u5bfe\u3057\u3066\u306f\u3001Apache Arrow\u5f62\u5f0f\u3092\u7528\u3044\u305f\u65b9\u304c\u5408\u7406\u7684\u3067\u3059\u3002 arrow-file \u30d7\u30e9\u30b0\u30a4\u30f3 \u4ee5\u4e0b\u3067\u306f\u3001Fluentd\u304c\u53ce\u96c6\u3057\u305f\u30ed\u30b0\u30c7\u30fc\u30bf\u3092Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u51fa\u529b\u3057\u3001\u3053\u308c\u3092PG-Strom\u3067\u53c2\u7167\u3059\u308b\u3068\u3044\u3046\u30a2\u30d7\u30ed\u30fc\u30c1\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u307e\u305f\u3001Fluentd\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u306f\u3001Treasure Data\u793e\u306e\u63d0\u4f9b\u3059\u308b\u5b89\u5b9a\u7248 td-agent \u3092\u4f7f\u7528\u3059\u308b\u3082\u306e\u3068\u3057\u307e\u3059\u3002 PG-Strom\u306b\u540c\u68b1\u306eFluentd\u5411\u3051Output\u30d7\u30e9\u30b0\u30a4\u30f3\u306e fluent-plugin-arrow-file \u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u5229\u7528\u3059\u308b\u3068\u3001Fluentd\u304c\u53ce\u96c6\u3057\u305f\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u3001\u6307\u5b9a\u3057\u305f\u30b9\u30ad\u30fc\u30de\u69cb\u9020\u3092\u6301\u3064Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u66f8\u304d\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002PG-Strom\u306eArrow_Fdw\u6a5f\u80fd\u3092\u4f7f\u7528\u3059\u308c\u3070\u3053\u306eApache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3068\u3057\u3066\u53c2\u7167\u3059\u308b\u4e8b\u304c\u3067\u304d\u3001\u307e\u305f\u4fdd\u5b58\u5148\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u304c\u9069\u5207\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308c\u3070\u3001GPU-Direct SQL\u3092\u7528\u3044\u305f\u9ad8\u901f\u306a\u8aad\u307f\u51fa\u3057\u3082\u53ef\u80fd\u3067\u3059\u3002 \u3053\u306e\u65b9\u6cd5\u306b\u306f\u4ee5\u4e0b\u306e\u30e1\u30ea\u30c3\u30c8\u304c\u3042\u308a\u307e\u3059\u3002 - Fluentd \u304c\u51fa\u529b\u3057\u305f\u30c7\u30fc\u30bf\u3092\u305d\u306e\u307e\u307ePG-Strom\u3067\u8aad\u307f\u51fa\u305b\u308b\u305f\u3081\u3001\u6539\u3081\u3066DB\u3078\u30c7\u30fc\u30bf\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044\u3002 - \u5217\u30c7\u30fc\u30bf\u5f62\u5f0f\u3067\u3042\u308b\u305f\u3081\u3001\u691c\u7d22\u30fb\u96c6\u8a08\u51e6\u7406\u306b\u4f34\u3046\u30c7\u30fc\u30bf\u306e\u8aad\u307f\u51fa\u3057\uff08I/O\u8ca0\u8377\uff09\u3092\u5fc5\u8981\u6700\u5c0f\u9650\u306b\u6291\u3048\u308b\u4e8b\u304c\u3067\u304d\u308b\u3002 - \u53e4\u304f\u306a\u3063\u305f\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u3082\u3001OS\u4e0a\u306e\u30d5\u30a1\u30a4\u30eb\u79fb\u52d5\u306e\u307f\u3067\u5b8c\u4e86\u3067\u304d\u308b\u3002 \u4e00\u65b9\u3067\u3001Apache Arrow\u5f62\u5f0f\u3067\u6027\u80fd\u4e0a\u306e\u30e1\u30ea\u30c3\u30c8\u3092\u5f97\u308b\u306b\u306f\u3001Record Batch\u306e\u30b5\u30a4\u30ba\u3092\u3042\u308b\u7a0b\u5ea6\u5927\u304d\u304f\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u305f\u3081\u3001\u30ed\u30b0\u306e\u767a\u751f\u983b\u5ea6\u304c\u5c0f\u3055\u304f\u3001\u4e00\u5b9a\u30b5\u30a4\u30ba\u306e\u30ed\u30b0\u304c\u6e9c\u307e\u308b\u307e\u3067\u306b\u6642\u9593\u306e\u304b\u304b\u308b\u5834\u5408\u306b\u306f\u3001PostgreSQL\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u51fa\u529b\u3055\u305b\u308b\u306a\u3069\u3001\u5225\u306e\u65b9\u6cd5\u3092\u8a66\u3057\u305f\u65b9\u304c\u3088\u308a\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306b\u8fd1\u3044\u30ed\u30b0\u5206\u6790\u304c\u53ef\u80fd\u3067\u3057\u3087\u3046\u3002 \u5185\u90e8\u69cb\u9020 Fluentd\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u306f\u3044\u304f\u3064\u304b\u30ab\u30c6\u30b4\u30ea\u304c\u3042\u308a\u3001\u5916\u90e8\u304b\u3089\u30ed\u30b0\u3092\u53d7\u3051\u53d6\u308bInput\u30d7\u30e9\u30b0\u30a4\u30f3\u3001\u30ed\u30b0\u3092\u6210\u5f62\u3059\u308bParser\u30d7\u30e9\u30b0\u30a4\u30f3\u3001\u53d7\u4fe1\u3057\u305f\u30ed\u30b0\u3092\u4e00\u6642\u7684\u306b\u84c4\u7a4d\u3059\u308bBuffer\u30d7\u30e9\u30b0\u30a4\u30f3\u3001\u30ed\u30b0\u3092\u51fa\u529b\u3059\u308bOutput\u30d7\u30e9\u30b0\u30a4\u30f3\u3001\u306a\u3069\u306e\u7a2e\u985e\u304c\u3042\u308a\u307e\u3059\u3002 arrow-file\u306fOutput\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u4e00\u3064\u3067\u3059\u304c\u3001\u3053\u308c\u306fBuffer\u30d7\u30e9\u30b0\u30a4\u30f3\u304b\u3089\u6e21\u3055\u308c\u305f\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u56fa\u307e\u308a(chunk)\u3092\u3001\u30b3\u30f3\u30d5\u30a3\u30b0\u3067\u6307\u5b9a\u3055\u308c\u305f\u30b9\u30ad\u30fc\u30de\u69cb\u9020\u3092\u6301\u3064Apache Arrow\u5f62\u5f0f\u3067\u66f8\u304d\u51fa\u3059\u5f79\u5272\u3092\u62c5\u3063\u3066\u3044\u307e\u3059\u3002 Input/Parser\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u5f79\u5272\u306f\u3001\u5916\u90e8\u304b\u3089\u53d7\u3051\u53d6\u3063\u305f\u30ed\u30b0\u3092\u5171\u901a\u306e\u5f62\u5f0f\u306b\u5909\u63db\u3057\u3001Buffer\u30d7\u30e9\u30b0\u30a4\u30f3\u3084Output\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u5165\u529b\u30c7\u30fc\u30bf\u306e\u5f62\u5f0f\u3092\u610f\u8b58\u3059\u308b\u3053\u3068\u306a\u304f\u6271\u3048\u308b\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u3067\u3059\u3002 \u3053\u308c\u306f\u5185\u90e8\u7684\u306b\u306f\u3001\u30ed\u30b0\u306e\u632f\u308a\u5206\u3051\u306b\u5229\u7528\u3059\u308b\u3053\u3068\u306e\u3067\u304d\u308b\u8b58\u5225\u5b50\u306e tag \u3001\u30ed\u30b0\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7 time \u3001\u304a\u3088\u3073\u751f\u30ed\u30b0\u3092\u6210\u5f62\u3057\u305f\u9023\u60f3\u914d\u5217\u3067\u3042\u308b record \u306e\u7d44\u3067\u3059\u3002 arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u3001 tag \u3001 time \u306e\u5404\u30d5\u30a3\u30fc\u30eb\u30c9\u3068\u3001 record \u9023\u60f3\u914d\u5217\u306e\u5404\u8981\u7d20\uff08\u4e00\u90e8\u3092\u7701\u7565\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\uff09\u3092\u5217\u3068\u3057\u3066\u6301\u3064Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3078\u306e\u66f8\u304d\u51fa\u3057\u3092\u884c\u3044\u307e\u3059\u3002 \u305d\u306e\u305f\u3081\u3001\u51fa\u529b\u5148\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u3068\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u60c5\u5831\uff08\u9023\u60f3\u914d\u5217\u306e\u8981\u7d20\u3068\u5217/\u578b\u306e\u30de\u30c3\u30d4\u30f3\u30b0\uff09\u306f\u5fc5\u9808\u306e\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u3067\u3059\u3002 \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u4f7f\u7528\u3057\u3066\u3044\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u7528\u306e td-agent \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 \u307e\u305f\u3001arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u306f rake-compiler \u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u306e\u3067\u3001\u4e88\u3081\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304d\u307e\u3059\u3002 \u8a73\u3057\u304f\u306f \u3053\u3061\u3089 \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 $ curl -L https://toolbelt.treasuredata.com/sh/install-redhat-td-agent4.sh | sh $ sudo /opt/td-agent/bin/fluent-gem install rake-compiler \u6b21\u306b\u3001PG-Strom\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3001 fluentd \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u306e\u7269\u4ef6\u3092\u30d3\u30eb\u30c9\u3057\u307e\u3059\u3002 $ git clone https://github.com/heterodb/pg-strom.git $ cd pg-strom/fluentd $ make TD_AGENT=1 gem $ sudo make TD_AGENT=1 install Fluentd\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u4e8b\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 $ /opt/td-agent/bin/fluent-gem list | grep arrow fluent-plugin-arrow-file (0.2) \u8a2d\u5b9a \u524d\u8ff0\u306e\u901a\u308a\u3001arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u52d5\u4f5c\u3055\u305b\u308b\u306b\u306f\u3001\u51fa\u529b\u5148\u306e\u30d1\u30b9\u540d\u3068\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u6700\u4f4e\u9650\u5fc5\u8981\u3067\u3059\u3002 \u3053\u308c\u306b\u52a0\u3048\u3066\u3001Apache Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u69cb\u9020\u4e0a\u3001Record Batch\u3068\u547c\u3070\u308c\u308b\u30c7\u30fc\u30bf\u306e\u56fa\u307e\u308a\u306f\u3042\u308b\u7a0b\u5ea6\u5927\u304d\u306a\u30b5\u30a4\u30ba\u3067\u533a\u5207\u3063\u3066\u304a\u3044\u305f\u65b9\u304c\u3001\u691c\u7d22\u30fb\u96c6\u8a08\u51e6\u7406\u3092\u884c\u3046\u969b\u306e\u51e6\u7406\u6027\u80fd\u3092\u5f15\u304d\u51fa\u3057\u3084\u3059\u3044\u3067\u3059\u3002 arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u3001Buffer\u30d7\u30e9\u30b0\u30a4\u30f3\u304b\u3089\u6e21\u3055\u308c\u308bchunk\u3054\u3068\u306bRecord Batch\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u3001Buffer\u30d7\u30e9\u30b0\u30a4\u30f3\u5074\u306e\u30d0\u30c3\u30d5\u30a1\u30b5\u30a4\u30ba\u306f\u3053\u308c\u306b\u6e96\u3058\u305f\u8a2d\u5b9a\u3092\u884c\u3046\u3079\u304d\u3067\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f 256MB \u306e\u30d0\u30c3\u30d5\u30a1\u30b5\u30a4\u30ba\u3092\u53d6\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002 arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 path [type: String ] (\u5fc5\u9808\u30d1\u30e9\u30e1\u30fc\u30bf) arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u30ed\u30b0\u3092\u51fa\u529b\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u3053\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306f\u5fc5\u9808\u3067\u3001\u4ee5\u4e0b\u306e\u66f8\u5f0f\u6587\u5b57\u3092\u542b\u3081\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u66f8\u5f0f \u8aac\u660e %Y \u73fe\u5728\u306e\u5e74\u3092\u897f\u66a64\u6841\u3067\u8868\u73fe\u3057\u305f\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %y \u73fe\u5728\u306e\u5e74\u306e\u897f\u66a6\u4e0b2\u6841\u3067\u8868\u73fe\u3057\u305f\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %m \u73fe\u5728\u306e\u6708\u3092 01\uff5e12 \u3067\u8868\u3057\u305f2\u6841\u306e\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %d \u73fe\u5728\u306e\u65e5\u3092 01\uff5e31 \u3067\u8868\u3057\u305f2\u6841\u306e\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %H \u73fe\u5728\u6642\u523b\u306e\u6642\u309200\uff5e23\u3067\u8868\u3057\u305f2\u6841\u306e\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %M \u73fe\u5728\u6642\u523b\u306e\u5206\u309200\uff5e59\u3067\u8868\u3057\u305f2\u6841\u306e\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %S \u73fe\u5728\u6642\u523b\u306e\u79d2\u309200\uff5e59\u3067\u8868\u3057\u305f2\u6841\u306e\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %p \u73fe\u5728\u306e Fluentd \u30d7\u30ed\u30bb\u30b9\u306ePID\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 \u66f8\u5f0f\u6587\u5b57\u5217\u306f\u30c1\u30e3\u30f3\u30af\u3092\u66f8\u304d\u51fa\u3059\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u8a55\u4fa1\u3055\u308c\u3001\u540c\u540d\u306eApache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u306b\u306f\u3001Record Batch\u3092\u8ffd\u8a18\u3057\u307e\u3059\u3002\u5b58\u5728\u3057\u306a\u3044\u5834\u5408\u306fApache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092\u65b0\u898f\u4f5c\u6210\u3057\u3001\u6700\u521d\u306eRecord Batch\u3092\u66f8\u304d\u51fa\u3057\u307e\u3059\u3002 \u305f\u3060\u3057\u3001\u65e2\u5b58\u306eApache Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u30b5\u30a4\u30ba\u304c\u5f8c\u8ff0\u306e filesize_threshold \u8a2d\u5b9a\u5024\u3092\u8d8a\u3048\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u65e2\u5b58\u30d5\u30a1\u30a4\u30eb\u3092\u30ea\u30cd\u30fc\u30e0\u3057\u305f\u5f8c\u3001\u65b0\u898f\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \uff08\u4f8b\uff09`path /tmp/arrow_logs/my_logs_%y%m%d.%p.log` \u51fa\u529b\u5148\u306eApache Arrow\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u30c1\u30e3\u30f3\u30af\u3092\u66f8\u304d\u51fa\u3059\u305f\u3073\u306b\u30d5\u30c3\u30bf\u9818\u57df\u3092\u66f4\u65b0\u3057\u3066\u5168\u3066\u306eRecord Batch\u3092\u30dd\u30a4\u30f3\u30c8\u3057\u307e\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u751f\u6210\u3055\u308c\u305fApache Arrow\u30d5\u30a1\u30a4\u30eb\u306f\u5373\u5ea7\u306b\u8aad\u307f\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c\u3001\u30a2\u30af\u30bb\u30b9\u7af6\u5408\u3092\u907f\u3051\u308b\u305f\u3081\u306b\u306f lockf(3) \u3092\u7528\u3044\u3066\u6392\u4ed6\u51e6\u7406\u3092\u884c\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 schema_defs [type: String ] (\u5fc5\u9808\u30d1\u30e9\u30e1\u30fc\u30bf) fluent-plugin-arrow-file \u304c\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b\u969b\u306e\u3001Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u3053\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306f\u5fc5\u9808\u3067\u3001\u4ee5\u4e0b\u306e\u5f62\u5f0f\u3067\u8a18\u8ff0\u3055\u308c\u305f\u6587\u5b57\u5217\u306b\u3088\u308a\u30b9\u30ad\u30fc\u30de\u69cb\u9020\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002 schema_defs := column_def1[,column_def2 ...] column_def := =[;] \u306f\u5217\u306e\u540d\u524d\u3067\u3059\u3002Fluentd\u304b\u3089arrow-file\u306b\u6e21\u3055\u308c\u308b\u9023\u60f3\u914d\u5217\u306e\u30ad\u30fc\u5024\u3068\u4e00\u81f4\u3057\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u306f\u5217\u306e\u30c7\u30fc\u30bf\u578b\u3067\u3059\u3002\u4ee5\u4e0b\u306e\u8868\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u306f\u5217\u306e\u4ed8\u52a0\u5c5e\u6027\u3067\u3059\u3002\u73fe\u6642\u70b9\u3067\u306f\u4ee5\u4e0b\u306e\u5c5e\u6027\u306e\u307f\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002 stat_enabled ... \u5217\u306e\u7d71\u8a08\u60c5\u5831\u3092\u53ce\u96c6\u3057\u3001Record Batch\u3054\u3068\u306e\u6700\u5927\u5024/\u6700\u5c0f\u5024\u3092 max_values=... \u304a\u3088\u3073 min_values=... \u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30c7\u30fc\u30bf\u3068\u3057\u3066\u57cb\u3081\u8fbc\u307f\u307e\u3059\u3002 \uff08\u4f8b\uff09 schema_defs \"ts=Timestamp;stat_enabled,dev_id=Uint32,temperature=Float32,humidity=Float32\" arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u30c7\u30fc\u30bf\u578b \u30c7\u30fc\u30bf\u578b \u8aac\u660e Int8 Int16 Int32 Int64 \u7b26\u53f7\u4ed8\u304d\u6574\u6570\u578b\u3067\u3001\u305d\u308c\u305e\u308c\u6307\u5b9a\u3057\u305f\u30d3\u30c3\u30c8\u5e45\u3092\u6301\u3061\u307e\u3059\u3002 Uint8 Uint16 Uint32 Uint64 \u7b26\u53f7\u306a\u3057\u6574\u6570\u578b\u3067\u3001\u305d\u308c\u305e\u308c\u6307\u5b9a\u3057\u305f\u30d3\u30c3\u30c8\u5e45\u3092\u6301\u3061\u307e\u3059\u3002 Float16 Float32 Float64 \u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u3067\u3001\u305d\u308c\u305e\u308c\u534a\u7cbe\u5ea6(16bit)\u3001\u5358\u7cbe\u5ea6(32bit)\u3001\u500d\u7cbe\u5ea6(64bit)\u306e\u5e45\u3092\u6301\u3061\u307e\u3059\u3002 Decimal Decimal128 128bit\u56fa\u5b9a\u5c0f\u6570\u70b9\u578b\u3067\u3059\u3002256bit\u56fa\u5b9a\u5c0f\u6570\u70b9\u578b\u306f\u73fe\u5728\u672a\u30b5\u30dd\u30fc\u30c8\u3067\u3059\u3002 Timestamp Timestamp[sec] Timestamp[ms] Timestamp[us] Timestamp[ns] \u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u578b\u3067\u3059\u3002\u7cbe\u5ea6\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u7701\u7565\u3057\u305f\u5834\u5408\u306f\u6697\u9ed9\u306b [us] \u3092\u4ed8\u52a0\u3057\u305f\u3082\u306e\u3068\u3057\u3066\u6271\u308f\u308c\u307e\u3059\u3002 Time Time[sec] Time[ms] Time[us] Time[ns] \u6642\u523b\u578b\u3067\u3059\u3002\u7cbe\u5ea6\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u7701\u7565\u3057\u305f\u5834\u5408\u306f\u6697\u9ed9\u306b [sec] \u3092\u4ed8\u52a0\u3057\u305f\u3082\u306e\u3068\u3057\u3066\u6271\u308f\u308c\u307e\u3059\u3002 Date Date[Day] Date[ms] \u65e5\u4ed8\u578b\u3067\u3059\u3002\u7cbe\u5ea6\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u7701\u7565\u3057\u305f\u5834\u5408\u306f\u6697\u9ed9\u306b [day] \u3092\u4ed8\u52a0\u3057\u305f\u3082\u306e\u3068\u3057\u3066\u6271\u308f\u308c\u307e\u3059\u3002 Utf8 \u6587\u5b57\u5217\u578b\u3067\u3059\u3002 Ipaddr4 IPv4\u30a2\u30c9\u30ec\u30b9\u578b\u3067\u3059\u3002\u5b9f\u969b\u306b\u306f byteWidth=4 \u3067\u3042\u308b FixedSizeBinary \u578b\u306b\u3001 pg_type=pg_catalog.inet \u3068\u3044\u3046\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u4ed8\u4e0e\u3057\u307e\u3059\u3002 Ipaddr6 IPv6\u30a2\u30c9\u30ec\u30b9\u578b\u3067\u3059\u3002\u5b9f\u969b\u306b\u306f byteWidth=16 \u3067\u3042\u308b FixedSizeBinary \u578b\u306b\u3001 pg_type=pg_catalog.inet \u3068\u3044\u3046\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u4ed8\u4e0e\u3057\u307e\u3059\u3002 ts_column [type: String / default: \u306a\u3057] \u6307\u5b9a\u3057\u305f\u5217\u306e\u5024\u3092\uff08 record \u9023\u60f3\u914d\u5217\u304b\u3089\u3067\u306f\u306a\u304f\uff09Fluentd\u304b\u3089\u6e21\u3055\u308c\u305f\u30ed\u30b0\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u5024\u3088\u308a\u53d6\u5f97\u3057\u307e\u3059\u3002 \u901a\u5e38\u3001\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3059\u308b\u5217\u306f Timestamp \u306a\u3069\u306e\u65e5\u4ed8\u6642\u523b\u578b\u3092\u6301\u3063\u3066\u304a\u308a\u3001\u307e\u305f stat_enabled \u5c5e\u6027\u3068\u4f75\u7528\u3059\u308b\u3053\u3068\u3067\u691c\u7d22\u51e6\u7406\u306e\u9ad8\u901f\u5316\u304c\u671f\u5f85\u3067\u304d\u307e\u3059\u3002 tag_column [type: String / default: \u306a\u3057] \u6307\u5b9a\u3057\u305f\u5217\u306e\u5024\u3092\uff08 record \u9023\u60f3\u914d\u5217\u304b\u3089\u3067\u306f\u306a\u304f\uff09Fluentd\u304b\u3089\u6e21\u3055\u308c\u305f\u30ed\u30b0\u306e\u30bf\u30b0\u5024\u3088\u308a\u53d6\u5f97\u3057\u307e\u3059\u3002 \u901a\u5e38\u3001\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3059\u308b\u5217\u306f Utf8 \u306a\u3069\u306e\u6587\u5b57\u5217\u578b\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002 filesize_threshold [type: Integer / default: 10000] fluent-plugin-arrow-file \u304c\u51fa\u529b\u5148\u30d5\u30a1\u30a4\u30eb\u3092\u5207\u308a\u66ff\u3048\u308b\u95be\u5024\u3092MB\u5358\u4f4d\u3067\u8a2d\u5b9a\u3057\u307e\u3059\u3002 \u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u304c\u7d0410GB\u3092\u8d8a\u3048\u305f\u8fba\u308a\u3067\u51fa\u529b\u5148\u3092\u5207\u308a\u66ff\u3048\u307e\u3059\u3002 \u4f7f\u7528\u4f8b \u7c21\u5358\u306a\u4f8b\u3068\u3057\u3066\u3001\u30ed\u30fc\u30ab\u30eb\u306eApache Httpd\u30b5\u30fc\u30d0\u306e\u30ed\u30b0\u3092\u76e3\u8996\u3057\u3001\u305d\u308c\u3092\u30d5\u30a3\u30fc\u30eb\u30c9\u6bce\u306b\u30d1\u30fc\u30b9\u3057\u3066Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002 \u3067 /var/log/httpd/access_log \u3092\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3068\u3057\u3066\u6307\u5b9a\u3057\u3066\u3044\u308b\u307b\u304b\u3001 apache2 \u306eParse\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u7528\u3044\u3066\u3001host, user, time, method, path, code, size, referer, agent\u306e\u5404\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u5207\u308a\u51fa\u3057\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u3089\u306farrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u9023\u60f3\u914d\u5217\u3068\u3057\u3066\u6e21\u3055\u308c\u3001 \u5185\u306e schema_defs \u306b\u306f\u3001\u3053\u308c\u3089\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u5bfe\u5fdc\u3059\u308bApache Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u5217\u5b9a\u7fa9\u3092\u8a18\u8ff0\u3057\u3066\u3044\u307e\u3059\u3002 \u307e\u305f\u3001\u3053\u3053\u3067\u306f\u7c21\u5358\u306a\u4f7f\u7528\u4f8b\u3092\u793a\u3059\u3053\u3068\u304c\u76ee\u7684\u3067\u3059\u306e\u3067\u3001 \u30bf\u30b0\u3067\u30c1\u30e3\u30f3\u30af\u30b5\u30a4\u30ba\u3092\u6700\u59274MB / 200\u884c\u306b\u7e2e\u5c0f\u3057\u3001\u6700\u5927\u3067\u308210\u79d2\u3067Output\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u6e21\u3059\u3088\u3046\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002 /etc/td-agent/td-agent.conf \u306e\u8a2d\u5b9a\u4f8b @type tail path /var/log/httpd/access_log pos_file /var/log/td-agent/httpd_access.pos tag httpd format apache2 @type apache2 expression /^(?[^ ]*) [^ ]* (?[^ ]*) \\[(?[^\\]]*)\\] \"(?\\S+)(?: +(?(?:[^\\\"]|\\\\.)*?)(?: +\\S*)?)?\" (?[^ ]*) (?[^ ]*)(?: \"(?(?:[^\\\"]|\\\\.)*)\" \"(?(?:[^\\\"]|\\\\.)*)\")?$/ time_format %d/%b/%Y:%H:%M:%S %z
@type arrow_file path /tmp/mytest%Y%m%d.%p.arrow schema_defs \"ts=Timestamp[sec],host=Utf8,method=Utf8,path=Utf8,code=Int32,size=Int32,referer=Utf8,agent=Utf8\" ts_column \"ts\" flush_interval 10s chunk_limit_size 4MB chunk_limit_records 200 td-agent \u3092\u8d77\u52d5\u3057\u307e\u3059\u3002 $ sudo systemctl start td-agent \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001Apache Httpd\u306e\u30ed\u30b0\u304c path \u3067\u8a2d\u5b9a\u3057\u305f /tmp/mytest%Y%m%d.%p.arrow \u304c\u5c55\u958b\u3055\u308c\u305f\u5148\u3067\u3042\u308b /tmp/mytest20220124.3206341.arrow \u306b\u66f8\u304d\u51fa\u3055\u308c\u3066\u3044\u307e\u3059\u3002 $ arrow2csv /tmp/mytest20220124.3206341.arrow --head --offset 300 --limit 10 \"ts\",\"host\",\"method\",\"path\",\"code\",\"size\",\"referer\",\"agent\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/js/theme_extra.js\",200,195,\"http://buri/docs/ja/fluentd/\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/js/theme.js\",200,4401,\"http://buri/docs/ja/fluentd/\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/img/fluentd_overview.png\",200,121459,\"http://buri/docs/ja/fluentd/\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/search/main.js\",200,3027,\"http://buri/docs/ja/fluentd/\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/fonts/Lato/lato-regular.woff2\",200,182708,\"http://buri/docs/ja/css/theme.css\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/fonts/fontawesome-webfont.woff2?v=4.7.0\",200,77160,\"http://buri/docs/ja/css/theme.css\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/fonts/RobotoSlab/roboto-slab-v7-bold.woff2\",200,67312,\"http://buri/docs/ja/css/theme.css\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/fonts/Lato/lato-bold.woff2\",200,184912,\"http://buri/docs/ja/css/theme.css\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:43\",\"192.168.77.95\",\"GET\",\"/docs/ja/search/worker.js\",200,3724,\"http://buri/docs/ja/fluentd/\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:43\",\"192.168.77.95\",\"GET\",\"/docs/ja/img/favicon.ico\",200,1150,\"http://buri/docs/ja/fluentd/\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \u3053\u308c\u3092 PG-Strom \u306eArrow_Fdw\u3092\u7528\u3044\u3066PostgreSQL\u306b\u30de\u30c3\u30d4\u30f3\u30b0\u3057\u3066\u307f\u307e\u3059\u3002 postgres=# IMPORT FOREIGN SCHEMA mytest FROM SERVER arrow_fdw INTO public OPTIONS (file '/tmp/mytest20220124.3206341.arrow'); IMPORT FOREIGN SCHEMA postgres=# SELECT ts, host, path FROM mytest WHERE code = 404; ts | host | path ---------------------+---------------+---------------------- 2022-01-24 12:02:06 | 192.168.77.73 | /~kaigai/ja/fluentd/ (1 row) postgres=# EXPLAIN SELECT ts, host, path FROM mytest WHERE code = 404; QUERY PLAN ------------------------------------------------------------------------------ Custom Scan (GpuScan) on mytest (cost=4026.12..4026.12 rows=3 width=72) GPU Filter: (code = 404) referenced: ts, host, path, code files0: /tmp/mytest20220124.3206341.arrow (read: 128.00KB, size: 133.94KB) (4 rows) \u751f\u6210\u3055\u308c\u305f Apache Arrow \u30d5\u30a1\u30a4\u30eb\u3092\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3068\u3057\u3066\u30de\u30c3\u30d4\u30f3\u30b0\u3057\u3001\u3053\u308c\u3092SQL\u304b\u3089\u53c2\u7167\u3057\u3066\u3044\u307e\u3059\u3002 Fluentd\u5074\u3067\u6210\u5f62\u3055\u308c\u305f\u30ed\u30b0\u306e\u5404\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u53c2\u7167\u3059\u308b\u691c\u7d22\u6761\u4ef6\u3092\u4e0e\u3048\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4e0a\u8a18\u306e\u4f8b\u3067\u306f\u3001HTTP\u30b9\u30c6\u30fc\u30bf\u30b9\u30b3\u30fc\u30c9404\u306e\u30ed\u30b0\u3092\u691c\u7d22\u3057\u30011\u4ef6\u304c\u30d2\u30c3\u30c8\u3057\u3066\u3044\u307e\u3059\u3002","title":"Fluentd\u9023\u643a"},{"location":"fluentd/#fluentd","text":"\u672c\u7ae0\u3067\u306f\u3001Apache Arrow\u30c7\u30fc\u30bf\u5f62\u5f0f\u3092\u4ecb\u3057\u305fFluentd\u3068\u306e\u9023\u643a\u3068\u3001IoT/M2M\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u52b9\u7387\u7684\u306a\u53d6\u308a\u8fbc\u307f\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002","title":"Fluentd\u9023\u643a"},{"location":"fluentd/#_1","text":"IoT/M2M\u3068\u3088\u3070\u308c\u308b\u6280\u8853\u9818\u57df\u306b\u304a\u3044\u3066\u306f\u3001PC\u3084\u30b5\u30fc\u30d0\u3060\u3051\u3067\u306a\u304f\u3001\u643a\u5e2f\u96fb\u8a71\u3084\u81ea\u52d5\u8eca\u3001\u5404\u7a2e\u30bb\u30f3\u30b5\u30fc\u306a\u3069\u306e\u30c7\u30d0\u30a4\u30b9\u304c\u751f\u6210\u3057\u305f\u5927\u91cf\u306e\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u84c4\u7a4d\u3057\u3001\u3053\u308c\u3092\u5206\u6790\u3059\u308b\u305f\u3081\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u304c\u6570\u591a\u304f\u958b\u767a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u5927\u91cf\u306e\u30c7\u30d0\u30a4\u30b9\u304c\u6642\u3005\u523b\u3005\u3068\u751f\u6210\u3059\u308b\u30c7\u30fc\u30bf\u306f\u975e\u5e38\u306b\u5927\u304d\u306a\u30b5\u30a4\u30ba\u306b\u306a\u308a\u304c\u3061\u3067\u3001\u3053\u308c\u3092\u5b9f\u7528\u7684\u306a\u6642\u9593\u5185\u306b\u51e6\u7406\u3059\u308b\u306b\u306f\u3001\u7279\u5225\u306a\u5de5\u592b\u304c\u5fc5\u8981\u3068\u306a\u308b\u304b\u3089\u3067\u3059\u3002 PG-Strom\u306e\u5404\u7a2e\u6a5f\u80fd\u306f\u3001\u3053\u3046\u3044\u3063\u305f\u898f\u6a21\u306e\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u9ad8\u901f\u306b\u51e6\u7406\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u30fb\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u3057\u304b\u3057\u4e00\u65b9\u3067\u3001\u3053\u3046\u3057\u305f\u898f\u6a21\u306e\u30c7\u30fc\u30bf\u306e\u691c\u7d22\u30fb\u96c6\u8a08\u304c\u53ef\u80fd\u306a\u72b6\u614b\u306b\u3059\u308b\u305f\u3081\u306b\u30c7\u30fc\u30bf\u3092\u79fb\u9001\u3057\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u53d6\u308a\u8fbc\u3080\u306b\u306f\u6642\u9593\u304c\u304b\u304b\u308a\u304c\u3061\u3067\u3059\u3002 \u305d\u3053\u3067\u3001PG-Strom\u306b\u306fFluentd\u5411\u3051\u306bApache Arrow\u5f62\u5f0f\u3067\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b fluent-plugin-arrow-file \u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u540c\u68b1\u3057\u3001\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u30a4\u30f3\u30dd\u30fc\u30c8\u3068\u3044\u3046\u554f\u984c\u306b\u5bfe\u51e6\u3092\u8a66\u307f\u3066\u3044\u307e\u3059\u3002 Fluentd\u306f\u53e4\u6a4b\u8c9e\u4e4b\u6c0f\u306b\u3088\u3063\u3066\u958b\u767a\u3055\u308c\u305f\u30ed\u30b0\u53ce\u96c6\u30c4\u30fc\u30eb\u3067\u3001Syslog\u306e\u3088\u3046\u306a\u30b5\u30fc\u30d0\u30ed\u30b0\u304b\u3089IoT/M2M\u6a5f\u5668\u306e\u30c7\u30d0\u30a4\u30b9\u30ed\u30b0\u306b\u81f3\u308b\u307e\u3067\u3001\u591a\u7a2e\u591a\u69d8\u306a\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u96c6\u7a4d\u30fb\u4fdd\u5b58\u3059\u308b\u305f\u3081\u306b\u4e8b\u5b9f\u4e0a\u306e\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u3068\u3057\u3066\u5229\u7528\u3055\u308c\u3066\u3044\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3067\u3059\u3002 Ruby\u3067\u8a18\u8ff0\u3055\u308c\u305f\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8ffd\u52a0\u306b\u3088\u308a\u3001\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u5165\u51fa\u529b\u3084\u52a0\u5de5\u3092\u81ea\u5728\u306b\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u30012022\u5e74\u73fe\u5728\u3001800\u7a2e\u985e\u3092\u8d8a\u3048\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u516c\u5f0fWeb\u30b5\u30a4\u30c8\u3067\u7d39\u4ecb\u3055\u308c\u3066\u3044\u307e\u3059\u3002 PG-Strom\u304c\u53d6\u308a\u6271\u3046\u3053\u3068\u306e\u3067\u304d\u308b\u30c7\u30fc\u30bf\u5f62\u5f0f\u306f\u3001PostgreSQL Heap\u5f62\u5f0f\uff08\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30ca\u30eb\u884c\u30c7\u30fc\u30bf\uff09\u3068Apache Arrow\u5f62\u5f0f\uff08\u69cb\u9020\u5316\u5217\u30c7\u30fc\u30bf\uff09\u306e\uff12\u7a2e\u985e\u3067\u3059\u304c\u3001IoT/M2M\u9818\u57df\u3067\u60f3\u5b9a\u3055\u308c\u308b\u3088\u3046\u306a\u3001\u6642\u3005\u523b\u3005\u3068\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u304c\u767a\u751f\u3059\u308b\u3088\u3046\u306a\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u5bfe\u3057\u3066\u306f\u3001Apache Arrow\u5f62\u5f0f\u3092\u7528\u3044\u305f\u65b9\u304c\u5408\u7406\u7684\u3067\u3059\u3002","title":"\u6982\u8981"},{"location":"fluentd/#arrow-file","text":"\u4ee5\u4e0b\u3067\u306f\u3001Fluentd\u304c\u53ce\u96c6\u3057\u305f\u30ed\u30b0\u30c7\u30fc\u30bf\u3092Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u51fa\u529b\u3057\u3001\u3053\u308c\u3092PG-Strom\u3067\u53c2\u7167\u3059\u308b\u3068\u3044\u3046\u30a2\u30d7\u30ed\u30fc\u30c1\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u307e\u305f\u3001Fluentd\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u306f\u3001Treasure Data\u793e\u306e\u63d0\u4f9b\u3059\u308b\u5b89\u5b9a\u7248 td-agent \u3092\u4f7f\u7528\u3059\u308b\u3082\u306e\u3068\u3057\u307e\u3059\u3002 PG-Strom\u306b\u540c\u68b1\u306eFluentd\u5411\u3051Output\u30d7\u30e9\u30b0\u30a4\u30f3\u306e fluent-plugin-arrow-file \u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u5229\u7528\u3059\u308b\u3068\u3001Fluentd\u304c\u53ce\u96c6\u3057\u305f\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u3001\u6307\u5b9a\u3057\u305f\u30b9\u30ad\u30fc\u30de\u69cb\u9020\u3092\u6301\u3064Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u66f8\u304d\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002PG-Strom\u306eArrow_Fdw\u6a5f\u80fd\u3092\u4f7f\u7528\u3059\u308c\u3070\u3053\u306eApache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3068\u3057\u3066\u53c2\u7167\u3059\u308b\u4e8b\u304c\u3067\u304d\u3001\u307e\u305f\u4fdd\u5b58\u5148\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u304c\u9069\u5207\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308c\u3070\u3001GPU-Direct SQL\u3092\u7528\u3044\u305f\u9ad8\u901f\u306a\u8aad\u307f\u51fa\u3057\u3082\u53ef\u80fd\u3067\u3059\u3002 \u3053\u306e\u65b9\u6cd5\u306b\u306f\u4ee5\u4e0b\u306e\u30e1\u30ea\u30c3\u30c8\u304c\u3042\u308a\u307e\u3059\u3002 - Fluentd \u304c\u51fa\u529b\u3057\u305f\u30c7\u30fc\u30bf\u3092\u305d\u306e\u307e\u307ePG-Strom\u3067\u8aad\u307f\u51fa\u305b\u308b\u305f\u3081\u3001\u6539\u3081\u3066DB\u3078\u30c7\u30fc\u30bf\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044\u3002 - \u5217\u30c7\u30fc\u30bf\u5f62\u5f0f\u3067\u3042\u308b\u305f\u3081\u3001\u691c\u7d22\u30fb\u96c6\u8a08\u51e6\u7406\u306b\u4f34\u3046\u30c7\u30fc\u30bf\u306e\u8aad\u307f\u51fa\u3057\uff08I/O\u8ca0\u8377\uff09\u3092\u5fc5\u8981\u6700\u5c0f\u9650\u306b\u6291\u3048\u308b\u4e8b\u304c\u3067\u304d\u308b\u3002 - \u53e4\u304f\u306a\u3063\u305f\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u3082\u3001OS\u4e0a\u306e\u30d5\u30a1\u30a4\u30eb\u79fb\u52d5\u306e\u307f\u3067\u5b8c\u4e86\u3067\u304d\u308b\u3002 \u4e00\u65b9\u3067\u3001Apache Arrow\u5f62\u5f0f\u3067\u6027\u80fd\u4e0a\u306e\u30e1\u30ea\u30c3\u30c8\u3092\u5f97\u308b\u306b\u306f\u3001Record Batch\u306e\u30b5\u30a4\u30ba\u3092\u3042\u308b\u7a0b\u5ea6\u5927\u304d\u304f\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u305f\u3081\u3001\u30ed\u30b0\u306e\u767a\u751f\u983b\u5ea6\u304c\u5c0f\u3055\u304f\u3001\u4e00\u5b9a\u30b5\u30a4\u30ba\u306e\u30ed\u30b0\u304c\u6e9c\u307e\u308b\u307e\u3067\u306b\u6642\u9593\u306e\u304b\u304b\u308b\u5834\u5408\u306b\u306f\u3001PostgreSQL\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u51fa\u529b\u3055\u305b\u308b\u306a\u3069\u3001\u5225\u306e\u65b9\u6cd5\u3092\u8a66\u3057\u305f\u65b9\u304c\u3088\u308a\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306b\u8fd1\u3044\u30ed\u30b0\u5206\u6790\u304c\u53ef\u80fd\u3067\u3057\u3087\u3046\u3002","title":"arrow-file \u30d7\u30e9\u30b0\u30a4\u30f3"},{"location":"fluentd/#_2","text":"Fluentd\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u306f\u3044\u304f\u3064\u304b\u30ab\u30c6\u30b4\u30ea\u304c\u3042\u308a\u3001\u5916\u90e8\u304b\u3089\u30ed\u30b0\u3092\u53d7\u3051\u53d6\u308bInput\u30d7\u30e9\u30b0\u30a4\u30f3\u3001\u30ed\u30b0\u3092\u6210\u5f62\u3059\u308bParser\u30d7\u30e9\u30b0\u30a4\u30f3\u3001\u53d7\u4fe1\u3057\u305f\u30ed\u30b0\u3092\u4e00\u6642\u7684\u306b\u84c4\u7a4d\u3059\u308bBuffer\u30d7\u30e9\u30b0\u30a4\u30f3\u3001\u30ed\u30b0\u3092\u51fa\u529b\u3059\u308bOutput\u30d7\u30e9\u30b0\u30a4\u30f3\u3001\u306a\u3069\u306e\u7a2e\u985e\u304c\u3042\u308a\u307e\u3059\u3002 arrow-file\u306fOutput\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u4e00\u3064\u3067\u3059\u304c\u3001\u3053\u308c\u306fBuffer\u30d7\u30e9\u30b0\u30a4\u30f3\u304b\u3089\u6e21\u3055\u308c\u305f\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u56fa\u307e\u308a(chunk)\u3092\u3001\u30b3\u30f3\u30d5\u30a3\u30b0\u3067\u6307\u5b9a\u3055\u308c\u305f\u30b9\u30ad\u30fc\u30de\u69cb\u9020\u3092\u6301\u3064Apache Arrow\u5f62\u5f0f\u3067\u66f8\u304d\u51fa\u3059\u5f79\u5272\u3092\u62c5\u3063\u3066\u3044\u307e\u3059\u3002 Input/Parser\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u5f79\u5272\u306f\u3001\u5916\u90e8\u304b\u3089\u53d7\u3051\u53d6\u3063\u305f\u30ed\u30b0\u3092\u5171\u901a\u306e\u5f62\u5f0f\u306b\u5909\u63db\u3057\u3001Buffer\u30d7\u30e9\u30b0\u30a4\u30f3\u3084Output\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u5165\u529b\u30c7\u30fc\u30bf\u306e\u5f62\u5f0f\u3092\u610f\u8b58\u3059\u308b\u3053\u3068\u306a\u304f\u6271\u3048\u308b\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u3067\u3059\u3002 \u3053\u308c\u306f\u5185\u90e8\u7684\u306b\u306f\u3001\u30ed\u30b0\u306e\u632f\u308a\u5206\u3051\u306b\u5229\u7528\u3059\u308b\u3053\u3068\u306e\u3067\u304d\u308b\u8b58\u5225\u5b50\u306e tag \u3001\u30ed\u30b0\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7 time \u3001\u304a\u3088\u3073\u751f\u30ed\u30b0\u3092\u6210\u5f62\u3057\u305f\u9023\u60f3\u914d\u5217\u3067\u3042\u308b record \u306e\u7d44\u3067\u3059\u3002 arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u3001 tag \u3001 time \u306e\u5404\u30d5\u30a3\u30fc\u30eb\u30c9\u3068\u3001 record \u9023\u60f3\u914d\u5217\u306e\u5404\u8981\u7d20\uff08\u4e00\u90e8\u3092\u7701\u7565\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\uff09\u3092\u5217\u3068\u3057\u3066\u6301\u3064Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3078\u306e\u66f8\u304d\u51fa\u3057\u3092\u884c\u3044\u307e\u3059\u3002 \u305d\u306e\u305f\u3081\u3001\u51fa\u529b\u5148\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u3068\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u60c5\u5831\uff08\u9023\u60f3\u914d\u5217\u306e\u8981\u7d20\u3068\u5217/\u578b\u306e\u30de\u30c3\u30d4\u30f3\u30b0\uff09\u306f\u5fc5\u9808\u306e\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u3067\u3059\u3002","title":"\u5185\u90e8\u69cb\u9020"},{"location":"fluentd/#_3","text":"\u4f7f\u7528\u3057\u3066\u3044\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u7528\u306e td-agent \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 \u307e\u305f\u3001arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u306f rake-compiler \u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u306e\u3067\u3001\u4e88\u3081\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304d\u307e\u3059\u3002 \u8a73\u3057\u304f\u306f \u3053\u3061\u3089 \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 $ curl -L https://toolbelt.treasuredata.com/sh/install-redhat-td-agent4.sh | sh $ sudo /opt/td-agent/bin/fluent-gem install rake-compiler \u6b21\u306b\u3001PG-Strom\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3001 fluentd \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u306e\u7269\u4ef6\u3092\u30d3\u30eb\u30c9\u3057\u307e\u3059\u3002 $ git clone https://github.com/heterodb/pg-strom.git $ cd pg-strom/fluentd $ make TD_AGENT=1 gem $ sudo make TD_AGENT=1 install Fluentd\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u4e8b\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 $ /opt/td-agent/bin/fluent-gem list | grep arrow fluent-plugin-arrow-file (0.2)","title":"\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"fluentd/#_4","text":"\u524d\u8ff0\u306e\u901a\u308a\u3001arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u52d5\u4f5c\u3055\u305b\u308b\u306b\u306f\u3001\u51fa\u529b\u5148\u306e\u30d1\u30b9\u540d\u3068\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u6700\u4f4e\u9650\u5fc5\u8981\u3067\u3059\u3002 \u3053\u308c\u306b\u52a0\u3048\u3066\u3001Apache Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u69cb\u9020\u4e0a\u3001Record Batch\u3068\u547c\u3070\u308c\u308b\u30c7\u30fc\u30bf\u306e\u56fa\u307e\u308a\u306f\u3042\u308b\u7a0b\u5ea6\u5927\u304d\u306a\u30b5\u30a4\u30ba\u3067\u533a\u5207\u3063\u3066\u304a\u3044\u305f\u65b9\u304c\u3001\u691c\u7d22\u30fb\u96c6\u8a08\u51e6\u7406\u3092\u884c\u3046\u969b\u306e\u51e6\u7406\u6027\u80fd\u3092\u5f15\u304d\u51fa\u3057\u3084\u3059\u3044\u3067\u3059\u3002 arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u3001Buffer\u30d7\u30e9\u30b0\u30a4\u30f3\u304b\u3089\u6e21\u3055\u308c\u308bchunk\u3054\u3068\u306bRecord Batch\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u3001Buffer\u30d7\u30e9\u30b0\u30a4\u30f3\u5074\u306e\u30d0\u30c3\u30d5\u30a1\u30b5\u30a4\u30ba\u306f\u3053\u308c\u306b\u6e96\u3058\u305f\u8a2d\u5b9a\u3092\u884c\u3046\u3079\u304d\u3067\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f 256MB \u306e\u30d0\u30c3\u30d5\u30a1\u30b5\u30a4\u30ba\u3092\u53d6\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002 arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 path [type: String ] (\u5fc5\u9808\u30d1\u30e9\u30e1\u30fc\u30bf) arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u30ed\u30b0\u3092\u51fa\u529b\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u3053\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306f\u5fc5\u9808\u3067\u3001\u4ee5\u4e0b\u306e\u66f8\u5f0f\u6587\u5b57\u3092\u542b\u3081\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u66f8\u5f0f \u8aac\u660e %Y \u73fe\u5728\u306e\u5e74\u3092\u897f\u66a64\u6841\u3067\u8868\u73fe\u3057\u305f\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %y \u73fe\u5728\u306e\u5e74\u306e\u897f\u66a6\u4e0b2\u6841\u3067\u8868\u73fe\u3057\u305f\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %m \u73fe\u5728\u306e\u6708\u3092 01\uff5e12 \u3067\u8868\u3057\u305f2\u6841\u306e\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %d \u73fe\u5728\u306e\u65e5\u3092 01\uff5e31 \u3067\u8868\u3057\u305f2\u6841\u306e\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %H \u73fe\u5728\u6642\u523b\u306e\u6642\u309200\uff5e23\u3067\u8868\u3057\u305f2\u6841\u306e\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %M \u73fe\u5728\u6642\u523b\u306e\u5206\u309200\uff5e59\u3067\u8868\u3057\u305f2\u6841\u306e\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %S \u73fe\u5728\u6642\u523b\u306e\u79d2\u309200\uff5e59\u3067\u8868\u3057\u305f2\u6841\u306e\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %p \u73fe\u5728\u306e Fluentd \u30d7\u30ed\u30bb\u30b9\u306ePID\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 \u66f8\u5f0f\u6587\u5b57\u5217\u306f\u30c1\u30e3\u30f3\u30af\u3092\u66f8\u304d\u51fa\u3059\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u8a55\u4fa1\u3055\u308c\u3001\u540c\u540d\u306eApache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u306b\u306f\u3001Record Batch\u3092\u8ffd\u8a18\u3057\u307e\u3059\u3002\u5b58\u5728\u3057\u306a\u3044\u5834\u5408\u306fApache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092\u65b0\u898f\u4f5c\u6210\u3057\u3001\u6700\u521d\u306eRecord Batch\u3092\u66f8\u304d\u51fa\u3057\u307e\u3059\u3002 \u305f\u3060\u3057\u3001\u65e2\u5b58\u306eApache Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u30b5\u30a4\u30ba\u304c\u5f8c\u8ff0\u306e filesize_threshold \u8a2d\u5b9a\u5024\u3092\u8d8a\u3048\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u65e2\u5b58\u30d5\u30a1\u30a4\u30eb\u3092\u30ea\u30cd\u30fc\u30e0\u3057\u305f\u5f8c\u3001\u65b0\u898f\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \uff08\u4f8b\uff09`path /tmp/arrow_logs/my_logs_%y%m%d.%p.log` \u51fa\u529b\u5148\u306eApache Arrow\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u30c1\u30e3\u30f3\u30af\u3092\u66f8\u304d\u51fa\u3059\u305f\u3073\u306b\u30d5\u30c3\u30bf\u9818\u57df\u3092\u66f4\u65b0\u3057\u3066\u5168\u3066\u306eRecord Batch\u3092\u30dd\u30a4\u30f3\u30c8\u3057\u307e\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u751f\u6210\u3055\u308c\u305fApache Arrow\u30d5\u30a1\u30a4\u30eb\u306f\u5373\u5ea7\u306b\u8aad\u307f\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c\u3001\u30a2\u30af\u30bb\u30b9\u7af6\u5408\u3092\u907f\u3051\u308b\u305f\u3081\u306b\u306f lockf(3) \u3092\u7528\u3044\u3066\u6392\u4ed6\u51e6\u7406\u3092\u884c\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 schema_defs [type: String ] (\u5fc5\u9808\u30d1\u30e9\u30e1\u30fc\u30bf) fluent-plugin-arrow-file \u304c\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b\u969b\u306e\u3001Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u3053\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306f\u5fc5\u9808\u3067\u3001\u4ee5\u4e0b\u306e\u5f62\u5f0f\u3067\u8a18\u8ff0\u3055\u308c\u305f\u6587\u5b57\u5217\u306b\u3088\u308a\u30b9\u30ad\u30fc\u30de\u69cb\u9020\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002 schema_defs := column_def1[,column_def2 ...] column_def := =[;] \u306f\u5217\u306e\u540d\u524d\u3067\u3059\u3002Fluentd\u304b\u3089arrow-file\u306b\u6e21\u3055\u308c\u308b\u9023\u60f3\u914d\u5217\u306e\u30ad\u30fc\u5024\u3068\u4e00\u81f4\u3057\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u306f\u5217\u306e\u30c7\u30fc\u30bf\u578b\u3067\u3059\u3002\u4ee5\u4e0b\u306e\u8868\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u306f\u5217\u306e\u4ed8\u52a0\u5c5e\u6027\u3067\u3059\u3002\u73fe\u6642\u70b9\u3067\u306f\u4ee5\u4e0b\u306e\u5c5e\u6027\u306e\u307f\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002 stat_enabled ... \u5217\u306e\u7d71\u8a08\u60c5\u5831\u3092\u53ce\u96c6\u3057\u3001Record Batch\u3054\u3068\u306e\u6700\u5927\u5024/\u6700\u5c0f\u5024\u3092 max_values=... \u304a\u3088\u3073 min_values=... \u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30c7\u30fc\u30bf\u3068\u3057\u3066\u57cb\u3081\u8fbc\u307f\u307e\u3059\u3002 \uff08\u4f8b\uff09 schema_defs \"ts=Timestamp;stat_enabled,dev_id=Uint32,temperature=Float32,humidity=Float32\" arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u30c7\u30fc\u30bf\u578b \u30c7\u30fc\u30bf\u578b \u8aac\u660e Int8 Int16 Int32 Int64 \u7b26\u53f7\u4ed8\u304d\u6574\u6570\u578b\u3067\u3001\u305d\u308c\u305e\u308c\u6307\u5b9a\u3057\u305f\u30d3\u30c3\u30c8\u5e45\u3092\u6301\u3061\u307e\u3059\u3002 Uint8 Uint16 Uint32 Uint64 \u7b26\u53f7\u306a\u3057\u6574\u6570\u578b\u3067\u3001\u305d\u308c\u305e\u308c\u6307\u5b9a\u3057\u305f\u30d3\u30c3\u30c8\u5e45\u3092\u6301\u3061\u307e\u3059\u3002 Float16 Float32 Float64 \u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u3067\u3001\u305d\u308c\u305e\u308c\u534a\u7cbe\u5ea6(16bit)\u3001\u5358\u7cbe\u5ea6(32bit)\u3001\u500d\u7cbe\u5ea6(64bit)\u306e\u5e45\u3092\u6301\u3061\u307e\u3059\u3002 Decimal Decimal128 128bit\u56fa\u5b9a\u5c0f\u6570\u70b9\u578b\u3067\u3059\u3002256bit\u56fa\u5b9a\u5c0f\u6570\u70b9\u578b\u306f\u73fe\u5728\u672a\u30b5\u30dd\u30fc\u30c8\u3067\u3059\u3002 Timestamp Timestamp[sec] Timestamp[ms] Timestamp[us] Timestamp[ns] \u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u578b\u3067\u3059\u3002\u7cbe\u5ea6\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u7701\u7565\u3057\u305f\u5834\u5408\u306f\u6697\u9ed9\u306b [us] \u3092\u4ed8\u52a0\u3057\u305f\u3082\u306e\u3068\u3057\u3066\u6271\u308f\u308c\u307e\u3059\u3002 Time Time[sec] Time[ms] Time[us] Time[ns] \u6642\u523b\u578b\u3067\u3059\u3002\u7cbe\u5ea6\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u7701\u7565\u3057\u305f\u5834\u5408\u306f\u6697\u9ed9\u306b [sec] \u3092\u4ed8\u52a0\u3057\u305f\u3082\u306e\u3068\u3057\u3066\u6271\u308f\u308c\u307e\u3059\u3002 Date Date[Day] Date[ms] \u65e5\u4ed8\u578b\u3067\u3059\u3002\u7cbe\u5ea6\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u7701\u7565\u3057\u305f\u5834\u5408\u306f\u6697\u9ed9\u306b [day] \u3092\u4ed8\u52a0\u3057\u305f\u3082\u306e\u3068\u3057\u3066\u6271\u308f\u308c\u307e\u3059\u3002 Utf8 \u6587\u5b57\u5217\u578b\u3067\u3059\u3002 Ipaddr4 IPv4\u30a2\u30c9\u30ec\u30b9\u578b\u3067\u3059\u3002\u5b9f\u969b\u306b\u306f byteWidth=4 \u3067\u3042\u308b FixedSizeBinary \u578b\u306b\u3001 pg_type=pg_catalog.inet \u3068\u3044\u3046\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u4ed8\u4e0e\u3057\u307e\u3059\u3002 Ipaddr6 IPv6\u30a2\u30c9\u30ec\u30b9\u578b\u3067\u3059\u3002\u5b9f\u969b\u306b\u306f byteWidth=16 \u3067\u3042\u308b FixedSizeBinary \u578b\u306b\u3001 pg_type=pg_catalog.inet \u3068\u3044\u3046\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u4ed8\u4e0e\u3057\u307e\u3059\u3002 ts_column [type: String / default: \u306a\u3057] \u6307\u5b9a\u3057\u305f\u5217\u306e\u5024\u3092\uff08 record \u9023\u60f3\u914d\u5217\u304b\u3089\u3067\u306f\u306a\u304f\uff09Fluentd\u304b\u3089\u6e21\u3055\u308c\u305f\u30ed\u30b0\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u5024\u3088\u308a\u53d6\u5f97\u3057\u307e\u3059\u3002 \u901a\u5e38\u3001\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3059\u308b\u5217\u306f Timestamp \u306a\u3069\u306e\u65e5\u4ed8\u6642\u523b\u578b\u3092\u6301\u3063\u3066\u304a\u308a\u3001\u307e\u305f stat_enabled \u5c5e\u6027\u3068\u4f75\u7528\u3059\u308b\u3053\u3068\u3067\u691c\u7d22\u51e6\u7406\u306e\u9ad8\u901f\u5316\u304c\u671f\u5f85\u3067\u304d\u307e\u3059\u3002 tag_column [type: String / default: \u306a\u3057] \u6307\u5b9a\u3057\u305f\u5217\u306e\u5024\u3092\uff08 record \u9023\u60f3\u914d\u5217\u304b\u3089\u3067\u306f\u306a\u304f\uff09Fluentd\u304b\u3089\u6e21\u3055\u308c\u305f\u30ed\u30b0\u306e\u30bf\u30b0\u5024\u3088\u308a\u53d6\u5f97\u3057\u307e\u3059\u3002 \u901a\u5e38\u3001\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3059\u308b\u5217\u306f Utf8 \u306a\u3069\u306e\u6587\u5b57\u5217\u578b\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002 filesize_threshold [type: Integer / default: 10000] fluent-plugin-arrow-file \u304c\u51fa\u529b\u5148\u30d5\u30a1\u30a4\u30eb\u3092\u5207\u308a\u66ff\u3048\u308b\u95be\u5024\u3092MB\u5358\u4f4d\u3067\u8a2d\u5b9a\u3057\u307e\u3059\u3002 \u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u304c\u7d0410GB\u3092\u8d8a\u3048\u305f\u8fba\u308a\u3067\u51fa\u529b\u5148\u3092\u5207\u308a\u66ff\u3048\u307e\u3059\u3002","title":"\u8a2d\u5b9a"},{"location":"fluentd/#_5","text":"\u7c21\u5358\u306a\u4f8b\u3068\u3057\u3066\u3001\u30ed\u30fc\u30ab\u30eb\u306eApache Httpd\u30b5\u30fc\u30d0\u306e\u30ed\u30b0\u3092\u76e3\u8996\u3057\u3001\u305d\u308c\u3092\u30d5\u30a3\u30fc\u30eb\u30c9\u6bce\u306b\u30d1\u30fc\u30b9\u3057\u3066Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002 \u3067 /var/log/httpd/access_log \u3092\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3068\u3057\u3066\u6307\u5b9a\u3057\u3066\u3044\u308b\u307b\u304b\u3001 apache2 \u306eParse\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u7528\u3044\u3066\u3001host, user, time, method, path, code, size, referer, agent\u306e\u5404\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u5207\u308a\u51fa\u3057\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u3089\u306farrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u9023\u60f3\u914d\u5217\u3068\u3057\u3066\u6e21\u3055\u308c\u3001 \u5185\u306e schema_defs \u306b\u306f\u3001\u3053\u308c\u3089\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u5bfe\u5fdc\u3059\u308bApache Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u5217\u5b9a\u7fa9\u3092\u8a18\u8ff0\u3057\u3066\u3044\u307e\u3059\u3002 \u307e\u305f\u3001\u3053\u3053\u3067\u306f\u7c21\u5358\u306a\u4f7f\u7528\u4f8b\u3092\u793a\u3059\u3053\u3068\u304c\u76ee\u7684\u3067\u3059\u306e\u3067\u3001 \u30bf\u30b0\u3067\u30c1\u30e3\u30f3\u30af\u30b5\u30a4\u30ba\u3092\u6700\u59274MB / 200\u884c\u306b\u7e2e\u5c0f\u3057\u3001\u6700\u5927\u3067\u308210\u79d2\u3067Output\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u6e21\u3059\u3088\u3046\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002 /etc/td-agent/td-agent.conf \u306e\u8a2d\u5b9a\u4f8b @type tail path /var/log/httpd/access_log pos_file /var/log/td-agent/httpd_access.pos tag httpd format apache2 @type apache2 expression /^(?[^ ]*) [^ ]* (?[^ ]*) \\[(?[^\\]]*)\\] \"(?\\S+)(?: +(?(?:[^\\\"]|\\\\.)*?)(?: +\\S*)?)?\" (?[^ ]*) (?[^ ]*)(?: \"(?(?:[^\\\"]|\\\\.)*)\" \"(?(?:[^\\\"]|\\\\.)*)\")?$/ time_format %d/%b/%Y:%H:%M:%S %z
@type arrow_file path /tmp/mytest%Y%m%d.%p.arrow schema_defs \"ts=Timestamp[sec],host=Utf8,method=Utf8,path=Utf8,code=Int32,size=Int32,referer=Utf8,agent=Utf8\" ts_column \"ts\" flush_interval 10s chunk_limit_size 4MB chunk_limit_records 200 td-agent \u3092\u8d77\u52d5\u3057\u307e\u3059\u3002 $ sudo systemctl start td-agent \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001Apache Httpd\u306e\u30ed\u30b0\u304c path \u3067\u8a2d\u5b9a\u3057\u305f /tmp/mytest%Y%m%d.%p.arrow \u304c\u5c55\u958b\u3055\u308c\u305f\u5148\u3067\u3042\u308b /tmp/mytest20220124.3206341.arrow \u306b\u66f8\u304d\u51fa\u3055\u308c\u3066\u3044\u307e\u3059\u3002 $ arrow2csv /tmp/mytest20220124.3206341.arrow --head --offset 300 --limit 10 \"ts\",\"host\",\"method\",\"path\",\"code\",\"size\",\"referer\",\"agent\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/js/theme_extra.js\",200,195,\"http://buri/docs/ja/fluentd/\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/js/theme.js\",200,4401,\"http://buri/docs/ja/fluentd/\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/img/fluentd_overview.png\",200,121459,\"http://buri/docs/ja/fluentd/\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/search/main.js\",200,3027,\"http://buri/docs/ja/fluentd/\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/fonts/Lato/lato-regular.woff2\",200,182708,\"http://buri/docs/ja/css/theme.css\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/fonts/fontawesome-webfont.woff2?v=4.7.0\",200,77160,\"http://buri/docs/ja/css/theme.css\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/fonts/RobotoSlab/roboto-slab-v7-bold.woff2\",200,67312,\"http://buri/docs/ja/css/theme.css\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/fonts/Lato/lato-bold.woff2\",200,184912,\"http://buri/docs/ja/css/theme.css\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:43\",\"192.168.77.95\",\"GET\",\"/docs/ja/search/worker.js\",200,3724,\"http://buri/docs/ja/fluentd/\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:43\",\"192.168.77.95\",\"GET\",\"/docs/ja/img/favicon.ico\",200,1150,\"http://buri/docs/ja/fluentd/\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \u3053\u308c\u3092 PG-Strom \u306eArrow_Fdw\u3092\u7528\u3044\u3066PostgreSQL\u306b\u30de\u30c3\u30d4\u30f3\u30b0\u3057\u3066\u307f\u307e\u3059\u3002 postgres=# IMPORT FOREIGN SCHEMA mytest FROM SERVER arrow_fdw INTO public OPTIONS (file '/tmp/mytest20220124.3206341.arrow'); IMPORT FOREIGN SCHEMA postgres=# SELECT ts, host, path FROM mytest WHERE code = 404; ts | host | path ---------------------+---------------+---------------------- 2022-01-24 12:02:06 | 192.168.77.73 | /~kaigai/ja/fluentd/ (1 row) postgres=# EXPLAIN SELECT ts, host, path FROM mytest WHERE code = 404; QUERY PLAN ------------------------------------------------------------------------------ Custom Scan (GpuScan) on mytest (cost=4026.12..4026.12 rows=3 width=72) GPU Filter: (code = 404) referenced: ts, host, path, code files0: /tmp/mytest20220124.3206341.arrow (read: 128.00KB, size: 133.94KB) (4 rows) \u751f\u6210\u3055\u308c\u305f Apache Arrow \u30d5\u30a1\u30a4\u30eb\u3092\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3068\u3057\u3066\u30de\u30c3\u30d4\u30f3\u30b0\u3057\u3001\u3053\u308c\u3092SQL\u304b\u3089\u53c2\u7167\u3057\u3066\u3044\u307e\u3059\u3002 Fluentd\u5074\u3067\u6210\u5f62\u3055\u308c\u305f\u30ed\u30b0\u306e\u5404\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u53c2\u7167\u3059\u308b\u691c\u7d22\u6761\u4ef6\u3092\u4e0e\u3048\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4e0a\u8a18\u306e\u4f8b\u3067\u306f\u3001HTTP\u30b9\u30c6\u30fc\u30bf\u30b9\u30b3\u30fc\u30c9404\u306e\u30ed\u30b0\u3092\u691c\u7d22\u3057\u30011\u4ef6\u304c\u30d2\u30c3\u30c8\u3057\u3066\u3044\u307e\u3059\u3002","title":"\u4f7f\u7528\u4f8b"},{"location":"gpucache/","text":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5 \u6982\u8981 GPU\u306b\u306f\u30db\u30b9\u30c8\u30b7\u30b9\u30c6\u30e0\u306eRAM\u3068\u306f\u72ec\u7acb\u306a\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u304c\u642d\u8f09\u3055\u308c\u3066\u304a\u308a\u3001GPU\u3067\u8a08\u7b97\u3059\u308b\u306b\u306fPCI-E\u30d0\u30b9\u306a\u3069\u3092\u901a\u3058\u3066\u3001\u4e00\u65e6\u3001\u30db\u30b9\u30c8\u30b7\u30b9\u30c6\u30e0\u3084\u30b9\u30c8\u30ec\u30fc\u30b8\u30c7\u30d0\u30a4\u30b9\u304b\u3089\u30c7\u30fc\u30bf\u3092GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u5074\u3078\u8ee2\u9001\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 PG-Strom\u304cSQL\u30af\u30a8\u30ea\u3092GPU\u3067\u51e6\u7406\u3059\u308b\u5834\u5408\u3082\u4f8b\u5916\u3067\u306f\u306a\u304f\u3001\u5185\u90e8\u7684\u306b\u306f\u3001PostgreSQL\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u8aad\u307f\u51fa\u3057\u305f\u30ec\u30b3\u30fc\u30c9\u3092GPU\u3078\u3068\u8ee2\u9001\u3057\u3001\u305d\u306e\u4e0a\u3067GPU\u3067SQL\u306e\u5404\u7a2e\u51e6\u7406\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 \u3057\u304b\u3057\u3053\u308c\u3089\u306e\u51e6\u7406\u306b\u306f\u3001\u591a\u304b\u308c\u5c11\u306a\u304b\u308c\u30c6\u30fc\u30d6\u30eb\u306e\u8aad\u307f\u51fa\u3057\u3084\u30c7\u30fc\u30bf\u306e\u8ee2\u9001\u306b\u6642\u9593\u3092\u8981\u3057\u307e\u3059\uff08\u591a\u304f\u306e\u5834\u5408\u3001GPU\u3067\u306e\u51e6\u7406\u3088\u308a\u3082\u9065\u304b\u306b\u9577\u3044\u6642\u9593\u306e\uff01\uff09\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\uff08GPU Cache\uff09\u3068\u306f\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u306b\u4e88\u3081\u9818\u57df\u3092\u78ba\u4fdd\u3057\u3066\u304a\u304d\u3001\u305d\u3053\u306bPostgreSQL\u30c6\u30fc\u30d6\u30eb\u306e\u8907\u88fd\u3092\u4fdd\u6301\u3057\u3066\u304a\u304f\u6a5f\u80fd\u3067\u3059\u3002 \u6bd4\u8f03\u7684\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\u306e\u5c0f\u3055\u306a\uff08\uff5e10GB\u7a0b\u5ea6\uff09\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3067\u3001\u66f4\u65b0\u983b\u5ea6\u304c\u9ad8\u3044\u3046\u3048\u306b\u3001\u3057\u3070\u3057\u3070\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306e\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u691c\u7d22/\u5206\u6790\u7cfb\u306eSQL\u3092\u5b9f\u884c\u3059\u308b\u3068\u3044\u3046\u30d1\u30bf\u30fc\u30f3\u3092\u610f\u56f3\u3057\u3066\u3044\u307e\u3059\u3002 \u5f8c\u8ff0\u3059\u308b\u30ed\u30b0\u30d9\u30fc\u30b9\u306e\u540c\u671f\u30e1\u30ab\u30cb\u30ba\u30e0\u306b\u3088\u308a\u3001\u4e26\u5217\u5ea6\u306e\u9ad8\u3044\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30ca\u30eb\u306a\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u59a8\u3052\u308b\u3053\u3068\u306a\u304fGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6700\u65b0\u306e\u72b6\u614b\u306b\u4fdd\u3064\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 \u305d\u306e\u4e00\u65b9\u3067\u3001\u691c\u7d22/\u5206\u6790\u7cfb\u306eSQL\u3092\u5b9f\u884c\u3059\u308b\u969b\u306b\u306f\u65e2\u306bGPU\u4e0a\u306b\u30c7\u30fc\u30bf\u304c\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u6539\u3081\u3066\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u30ec\u30b3\u30fc\u30c9\u3092\u8aad\u307f\u51fa\u3057\u305f\u308a\u3001PCI-E\u30d0\u30b9\u3092\u4ecb\u3057\u3066\u30c7\u30fc\u30bf\u3092\u8ee2\u9001\u3057\u305f\u308a\u3059\u308b\u4e8b\u306a\u304f\u3001SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u5178\u578b\u7684\u306a\u5229\u7528\u30b7\u30fc\u30f3\u3068\u3057\u3066\u306f\u3001\u81ea\u52d5\u8eca\u3084\u643a\u5e2f\u96fb\u8a71\u3068\u3044\u3063\u305f\u30e2\u30d0\u30a4\u30eb\u30c7\u30d0\u30a4\u30b9\u306e\u4f4d\u7f6e\u60c5\u5831\uff08\u73fe\u5728\u4f4d\u7f6e\uff09\u3092\u6642\u3005\u523b\u3005\u53ce\u96c6\u3057\u3001 GPU\u7248PostGIS \u306a\u3069\u3092\u7528\u3044\u3066\u4ed6\u306e\u30c7\u30fc\u30bf\u3068\u7a81\u304d\u5408\u308f\u305b\u308b\u3068\u3044\u3063\u305f\u30b1\u30fc\u30b9\u304c\u8003\u3048\u3089\u308c\u307e\u3059\u3002 \u591a\u6570\u306e\u30c7\u30d0\u30a4\u30b9\u304b\u3089\u9001\u51fa\u3055\u308c\u308b\u4f4d\u7f6e\u60c5\u5831\u306e\u66f4\u65b0\u306f\u6975\u3081\u3066\u66f4\u65b0\u30d8\u30d3\u30fc\u306a\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3067\u3059\u304c\u3001\u4e00\u65b9\u3067\u3001\u6700\u65b0\u306e\u4f4d\u7f6e\u60c5\u5831\u306b\u57fa\u3065\u3044\u3066\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u3082\u3042\u308b\u305f\u3081\u3001\u3053\u308c\u3089\u66f4\u65b0\u30c7\u30fc\u30bf\u3092\u9045\u6ede\u306a\u304fGPU\u5074\u3078\u9069\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\u306b\u306f\u5236\u7d04\u304c\u3042\u308a\u307e\u3059\u304c\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u9ad8\u983b\u5ea6\u306e\u66f4\u65b0\u3068\u3001\u9ad8\u6027\u80fd\u306a\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u3092\u4e21\u7acb\u3059\u308b\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3059\u3002 \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3067\u306f\u3001\u4e26\u5217\u5ea6\u306e\u9ad8\u3044\u66f4\u65b0\u7cfb\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u5bfe\u5fdc\u3059\u308b\u3053\u3068\u3068\u3001\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u304c\u5e38\u306b\u6700\u65b0\u306e\u30c7\u30fc\u30bf\u3092\u53c2\u7167\u3059\u308b\u3068\u3044\u30462\u3064\u306e\u8981\u4ef6\u3092\u30af\u30ea\u30a2\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u591a\u304f\u306e\u30b7\u30b9\u30c6\u30e0\u3067\u306fCPU\u3068GPU\u306fPCI-E\u30d0\u30b9\u3092\u4ecb\u3057\u3066\u63a5\u7d9a\u3055\u308c\u3001\u305d\u306e\u901a\u4fe1\u306b\u306f\u76f8\u5fdc\u306e\u30ec\u30a4\u30c6\u30f3\u30b7\u304c\u767a\u751f\u3057\u307e\u3059\u3002 \u305d\u306e\u305f\u3081\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u5bfe\u8c61\u30c6\u30fc\u30d6\u30eb\u304c1\u884c\u66f4\u65b0\u3055\u308c\u308b\u305f\u3073\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u540c\u671f\u3057\u3066\u3044\u3066\u306f\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u6027\u80fd\u306b\u5927\u304d\u306a\u5f71\u97ff\u3092\u4e0e\u3048\u3066\u3057\u307e\u3044\u307e\u3059\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u4f5c\u6210\u3059\u308b\u3068\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u306b\u30ad\u30e3\u30c3\u30b7\u30e5\u7528\u306e\u30e1\u30e2\u30ea\u9818\u57df\u3092\u78ba\u4fdd\u3059\u308b\u3060\u3051\u3067\u306a\u304f\u3001\u30db\u30b9\u30c8\u5074\u5171\u6709\u30e1\u30e2\u30ea\u4e0a\u306bREDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \u30c6\u30fc\u30d6\u30eb\u306e\u66f4\u65b0\u3092\u4f34\u3046SQL\u30b3\u30de\u30f3\u30c9\uff08INSERT\u3001UPDATE\u3001DELETE\uff09\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001AFTER ROW\u30c8\u30ea\u30ac\u306b\u3088\u3063\u3066\u66f4\u65b0\u5185\u5bb9\u304cREDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u30b3\u30d4\u30fc\u3055\u308c\u307e\u3059\u304c\u3001\u3053\u306e\u51e6\u7406\u306fGPU\u3078\u306e\u547c\u3073\u51fa\u3057\u3092\u4f34\u308f\u306a\u3044\u3001CPU\u3068RAM\u3060\u3051\u3067\u5b8c\u7d50\u3059\u308b\u51e6\u7406\u3067\u3059\u306e\u3067\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u6027\u80fd\u3078\u306e\u5f71\u97ff\u306f\u307b\u3068\u3093\u3069\u3042\u308a\u307e\u305b\u3093\u3002 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u672a\u9069\u7528\u306eREDO\u30ed\u30b0\u304c\u4e00\u5b9a\u91cf\u305f\u307e\u308b\u304b\u3001\u6700\u5f8c\u306e\u66f8\u304d\u8fbc\u307f\u304b\u3089\u4e00\u5b9a\u6642\u9593\u304c\u7d4c\u904e\u3059\u308b\u3068\u3001\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\uff08GPU memory keeper\uff09\u306b\u3088\u3063\u3066\u672a\u9069\u7528\u306eREDO\u30ed\u30b0\u306fGPU\u3078\u30ed\u30fc\u30c9\u3055\u308c\u3001\u66f4\u65b0\u5dee\u5206\u3092GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306b\u9069\u7528\u3057\u307e\u3059\u3002 \u3053\u306e\u6642\u3001REDO\u30ed\u30b0\u306f\u307e\u3068\u3081\u3066GPU\u306b\u8ee2\u9001\u3055\u308c\u3001\u3055\u3089\u306bGPU\u306e\u6570\u5343\u30d7\u30ed\u30bb\u30c3\u30b5\u30b3\u30a2\u304c\u4e26\u5217\u306bREDO\u30ed\u30b0\u3092\u9069\u7528\u3059\u308b\u305f\u3081\u3001\u901a\u5e38\u306f\u51e6\u7406\u9045\u5ef6\u304c\u554f\u984c\u3068\u306a\u308b\u4e8b\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u5bfe\u8c61\u30c6\u30fc\u30d6\u30eb\u3092\u53c2\u7167\u3059\u308b\u969b\u306b\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u3057\u3066GPU\u306b\u30ed\u30fc\u30c9\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u65e2\u306bGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u306b\u5272\u5f53\u3066\u6e08\u307f\u306eGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u30de\u30c3\u30d4\u30f3\u30b0\u3057\u3066\u5229\u7528\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u5148\u7acb\u3063\u3066\u3001\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u958b\u59cb\u6642\u70b9\u3067\u672a\u9069\u7528\u306eREDO\u30ed\u30b0\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u3001\u3053\u308c\u3089\u306f\u5168\u3066\u3001\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u524d\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3078\u9069\u7528\u3055\u308c\u307e\u3059\u3002 \u305d\u306e\u305f\u3081\u3001\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u304c\u5bfe\u8c61\u306eGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u305f\u7d50\u679c\u306f\u3001\u76f4\u63a5\u30c6\u30fc\u30d6\u30eb\u3092\u53c2\u7167\u3057\u305f\u5834\u5408\u3068\u540c\u3058\u7d50\u679c\u3092\u8fd4\u3059\u4e8b\u3068\u306a\u308a\u3001\u554f\u3044\u5408\u308f\u305b\u306e\u4e00\u8cab\u6027\u306f\u5e38\u306b\u4fdd\u6301\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u8a2d\u5b9a GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6709\u52b9\u306b\u3059\u308b\u306b\u306f\u3001\u5bfe\u8c61\u3068\u306a\u308b\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066 pgstrom.gpucache_sync_trigger() \u95a2\u6570\u3092\u5b9f\u884c\u3059\u308bAFTER INSERT OR UPDATE OR DELETE\u306e\u884c\u30c8\u30ea\u30ac\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002 \u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30b9\u30ec\u30fc\u30d6\u5074\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001\u3053\u306e\u30c8\u30ea\u30ac\u306e\u767a\u884c\u30e2\u30fc\u30c9\u304c ALWAYS \u3067\u3042\u308b\u4e8b\u304c\u5fc5\u8981\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u30c6\u30fc\u30d6\u30eb dpoints \u306b\u5bfe\u3057\u3066GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3059\u308b\u4f8b\u3067\u3059\u3002 =# create trigger row_sync after insert or update or delete on dpoints_even for row execute function pgstrom.gpucache_sync_trigger(); =# alter table dpoints_even enable always trigger row_sync; Note PostgreSQL v12.x \u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u304a\u3051\u308b\u8ffd\u52a0\u8a2d\u5b9a PostgreSQL v12\u304a\u3088\u3073\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u3001\u4e0a\u8a18\u306e\u30c8\u30ea\u30ac\u306b\u52a0\u3048\u3066\u3001 pgstrom.gpucache_sync_trigger() \u95a2\u6570\u3092\u5b9f\u884c\u3059\u308bBEFORE TRUNCATE\u306e\u69cb\u6587\u30c8\u30ea\u30ac\u306e\u8a2d\u5b9a\u304c\u5fc5\u8981\u3067\u3059\u3002 \u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30b9\u30ec\u30fc\u30d6\u5074\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u5b9f\u884c\u3059\u308b\u5834\u5408\u3001\u540c\u69d8\u306b\u3001\u3053\u306e\u30c8\u30ea\u30ac\u306e\u767a\u884c\u30e2\u30fc\u30c9\u304c ALWAYS \u3067\u3042\u308b\u4e8b\u304c\u5fc5\u8981\u3067\u3059\u3002 PostgreSQL v13\u3067\u306fObject Access Hook\u304c\u62e1\u5f35\u3055\u308c\u3001\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u30c8\u30ea\u30ac\u8a2d\u5b9a\u306a\u3057\u3067 TRUNCATE\u306e\u5b9f\u884c\u3092\u6355\u6349\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u3057\u304b\u3057\u305d\u308c\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u3001TRUNCATE\u3092\u6355\u6349\u3057\u3066GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u4e00\u8cab\u6027\u3092\u4fdd\u3064\u306b\u306f\u3001 BEFORE TRUNCATE\u306e\u69cb\u6587\u30c8\u30ea\u30ac\u304c\u5fc5\u8981\u3067\u3059\u3002 \u4ee5\u4e0b\u306f\u3001PostgreSQL v12\u4ee5\u524d\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092 dpoints \u30c6\u30fc\u30d6\u30eb\u306b\u8a2d\u5b9a\u3059\u308b\u4f8b\u3067\u3059\u3002 =# create trigger row_sync after insert or update or delete on dpoints_even for row execute function pgstrom.gpucache_sync_trigger(); =# create trigger stmt_sync before truncate on dpoints_even for statement execute function pgstrom.gpucache_sync_trigger(); =# alter table dpoints_even enable always trigger row_sync; =# alter table dpoints_even enable always trigger stmt_sync; GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u884c\u30c8\u30ea\u30ac\u306b\u5f15\u6570\u3068\u3057\u3066 KEY=VALUE \u5f62\u5f0f\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u6587\u5b57\u5217\u3092\u4e0e\u3048\u308b\u4e8b\u3067\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u69cb\u6587\u30c8\u30ea\u30ac\u306e\u65b9\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u306e\u3067\u3054\u6ce8\u610f\u304f\u3060\u3055\u3044\u3002 \u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306eGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u884c\u6570\u306e\u6700\u5927\u5024\u304c250\u4e07\u884c\u3001REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306e\u30b5\u30a4\u30ba\u3092100MB\u3068\u3057\u3066\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059\u3002 =# create trigger row_sync after insert or update or delete on dpoints_even for row execute function pgstrom.gpucache_sync_trigger('max_num_rows=2500000,redo_buffer_size=100m'); \u884c\u30c8\u30ea\u30ac\u306e\u5f15\u6570\u306b\u4e0e\u3048\u308b\u4e8b\u306e\u3067\u304d\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 gpu_device_id=GPU_ID (default: 0) GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u78ba\u4fdd\u3059\u308b\u5bfe\u8c61\u306eGPU\u30c7\u30d0\u30a4\u30b9ID\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 max_num_rows=NROWS (default: 10485760) GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306b\u78ba\u4fdd\u3067\u304d\u308b\u884c\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 PostgreSQL\u30c6\u30fc\u30d6\u30eb\u3068\u540c\u69d8\u306b\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3067\u3082\u53ef\u8996\u6027\u5236\u5fa1\u306e\u305f\u3081\u306b\u30b3\u30df\u30c3\u30c8\u524d\u306e\u66f4\u65b0\u884c\u3092\u4fdd\u6301\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u305f\u3081\u3001\u3042\u308b\u7a0b\u5ea6\u306e\u4f59\u88d5\u3092\u6301\u3063\u3066 max_num_rows \u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u306a\u304a\u3001\u66f4\u65b0/\u524a\u9664\u3055\u308c\u305f\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u884c\u306f\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u30b3\u30df\u30c3\u30c8\u5f8c\u306b\u89e3\u653e\u3055\u308c\u307e\u3059\u3002 redo_buffer_size=SIZE \u3000\uff08default: 160m\uff09 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306e\u30b5\u30a4\u30ba\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u5358\u4f4d\u3068\u3057\u3066\u3001k\u3001m\u3001g\u3092\u6307\u5b9a\u3067\u304d\u308b\u3002 gpu_sync_interval=SECONDS \u3000\uff08default: 5\uff09 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u3078\u306e\u6700\u5f8c\u306e\u66f8\u304d\u8fbc\u307f\u304b\u3089 SECONDS \u79d2\u7d4c\u904e\u3059\u308b\u3068\u3001\u305f\u3068\u3048\u66f4\u65b0\u884c\u6570\u304c\u5c11\u306a\u304f\u3068\u3082\u3001REDO\u30ed\u30b0\u3092GPU\u5074\u3078\u53cd\u6620\u3057\u307e\u3059\u3002 gpu_sync_threshold=SIZE \u3000\uff08default: redo_buffer_size \u306e25%\uff09 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306e\u66f8\u304d\u8fbc\u307f\u306e\u3046\u3061\u3001\u672a\u53cd\u6620\u5206\u306e\u5927\u304d\u3055\u304c SIZE \u30d0\u30a4\u30c8\u306b\u9054\u3059\u308b\u3068\u3001GPU\u5074\u306bREDO\u30ed\u30b0\u3092\u53cd\u6620\u3057\u307e\u3059\u3002 \u5358\u4f4d\u3068\u3057\u3066k\u3001m\u3001g\u3092\u6307\u5b9a\u3067\u304d\u308b\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u30aa\u30d7\u30b7\u30e7\u30f3 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306b\u95a2\u9023\u3057\u3066\u3001\u4ee5\u4e0b\u306ePostgreSQL\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002 pg_strom.enable_gpucache \u3000\uff08default: on\uff09 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u5229\u7528\u53ef\u80fd\u3067\u3042\u308b\u5834\u5408\u3001\u691c\u7d22/\u5206\u6790\u7cfb\u306e\u30af\u30a8\u30ea\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u4f7f\u7528\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3057\u307e\u3059\u3002 \u3053\u306e\u5024\u304c off \u306b\u306a\u3063\u3066\u3044\u308b\u3068\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u5b58\u5728\u3057\u3066\u3044\u3066\u3082\u3053\u308c\u3092\u7121\u8996\u3057\u3001\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u90fd\u5ea6\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u305d\u3046\u3068\u3057\u307e\u3059\u3002 \u306a\u304a\u3001\u672c\u8a2d\u5b9a\u306f\u30c8\u30ea\u30ac\u306b\u3088\u308bREDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u3078\u306e\u8ffd\u8a18\u306b\u306f\u5f71\u97ff\u3057\u307e\u305b\u3093\u3002 pg_strom.gpucache_auto_preload \u3000\uff08default: NULL\uff09 PostgreSQL\u306e\u8d77\u52d5\u6642/\u518d\u8d77\u52d5\u6642\u306b\u3001\u672c\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u3067\u6307\u5b9a\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u306eGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u4e88\u3081\u69cb\u7bc9\u3057\u3066\u304a\u304d\u307e\u3059\u3002 \u66f8\u5f0f\u306f DATABASE_NAME.SCHEMA_NAME.TABLE_NAME \u3067\u3001\u8907\u6570\u500b\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u6307\u5b9a\u3059\u308b\u5834\u5408\u306f\u3053\u308c\u3092\u30ab\u30f3\u30de\u533a\u5207\u308a\u3067\u4e26\u3079\u307e\u3059\u3002 \u307e\u3060GPU\u30c7\u30d0\u30a4\u30b9\u4e0a\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u69cb\u7bc9\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u3001\u5bfe\u8c61\u30c6\u30fc\u30d6\u30eb\u3092\u30d5\u30eb\u30b9\u30ad\u30e3\u30f3\u3057\u3066GPU\u5074\u3078\u8ee2\u9001\u3059\u308b\u306e\u306f\u3001\u6700\u521d\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3088\u3046\u3068\u8a66\u307f\u305fPostgreSQL\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u30d7\u30ed\u30bb\u30b9\u306e\u5f79\u5272\u3067\u3059\u3002\u3053\u308c\u306f\u901a\u5e38\u3001\u76f8\u5fdc\u306e\u6642\u9593\u3092\u8981\u3059\u308b\u51e6\u7406\u3067\u3059\u304c\u3001\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u30ed\u30fc\u30c9\u3059\u3079\u304d\u30c6\u30fc\u30d6\u30eb\u3092\u8a18\u8f09\u3057\u3066\u304a\u304f\u3053\u3068\u3067\u3001\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u306e\u521d\u56de\u5b9f\u884c\u6642\u306b\u9577\u3005\u3068\u5f85\u305f\u3055\u308c\u308b\u4e8b\u3092\u6291\u6b62\u3067\u304d\u307e\u3059\u3002 \u306a\u304a\u3001\u3053\u306e\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u306b '*' \u3068\u6307\u5b9a\u3057\u305f\u5834\u5408\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6301\u3064\u5168\u3066\u306e\u30c6\u30fc\u30d6\u30eb\u306e\u5185\u5bb9\u3092\u9806\u306bGPU\u3078\u30ed\u30fc\u30c9\u3057\u3088\u3046\u3068\u8a66\u307f\u307e\u3059\u3002\u3053\u306e\u6642\u3001\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u306f\u5168\u3066\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u9806\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u304f\u4e8b\u3068\u306a\u308a\u307e\u3059\u304c\u3001postmaster\u306b\u518d\u8d77\u52d5\u3092\u4fc3\u3059\u305f\u3081\u7d42\u4e86\u30b3\u30fc\u30c9 1 \u3092\u8fd4\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u30b5\u30fc\u30d0\u306e\u8d77\u52d5\u30ed\u30b0\u306b\u300cGPUCache Startup Preloader\u300d\u304c\u7d42\u4e86\u30b3\u30fc\u30c9 1 \u3067\u7d42\u4e86\u3057\u305f\u3068\u51fa\u529b\u3055\u308c\u307e\u3059\u304c\u3001\u3053\u308c\u306f\u7570\u5e38\u3067\u306f\u3042\u308a\u307e\u305b\u3093 LOG: database system is ready to accept connections LOG: background worker \"GPUCache Startup Preloader\" (PID 856418) exited with exit code 1 LOG: background worker \"GPUCache Startup Preloader\" (PID 856427) exited with exit code 1 LOG: create GpuCacheSharedState dpoints:164c95f71 LOG: gpucache: AllocMemory dpoints:164c95f71 (main_sz=772505600, extra_sz=0) LOG: gpucache: auto preload 'public.dpoints' (DB: postgres) LOG: create GpuCacheSharedState mytest:1773a589b LOG: gpucache: auto preload 'public.mytest' (DB: postgres) LOG: gpucache: AllocMemory mytest:1773a589b (main_sz=675028992, extra_sz=0) \u904b\u7528 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u5229\u7528\u3092\u78ba\u8a8d\u3059\u308b GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u53c2\u7167\u306f\u900f\u904e\u7684\u306b\u884c\u308f\u308c\u307e\u3059\u3002\u30e6\u30fc\u30b6\u306f\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u6709\u7121\u3092\u610f\u8b58\u3059\u308b\u5fc5\u8981\u306f\u306a\u304f\u3001PG-Strom\u304c\u81ea\u52d5\u7684\u306b\u5224\u5b9a\u3057\u3066\u51e6\u7406\u3092\u5207\u308a\u66ff\u3048\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u30af\u30a8\u30ea\u5b9f\u884c\u8a08\u753b\u306f\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u8a2d\u5b9a\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb dpoints \u3078\u306e\u53c2\u7167\u3092\u542b\u3080\u3082\u306e\u3067\u3059\u3002\u4e0b\u304b\u30893\u884c\u76ee\u306e\u300cGPU Cache\u300d\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u3001\u3053\u306e\u30c6\u30fc\u30d6\u30eb\u306eGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u57fa\u672c\u7684\u306a\u60c5\u5831\u304c\u8868\u793a\u3055\u308c\u3066\u304a\u308a\u3001\u3053\u306e\u30af\u30a8\u30ea\u3067\u306f dpoints \u30c6\u30fc\u30d6\u30eb\u3092\u8aad\u307f\u51fa\u3059\u306e\u3067\u306f\u306a\u304f\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u53c2\u7167\u3057\u3066\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u308f\u304b\u308a\u307e\u3059\u3002 \u306a\u304a\u3001 max_num_rows \u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u306e\u306fGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u4fdd\u6301\u3067\u304d\u308b\u6700\u5927\u306e\u884c\u6570\u3001 main \u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u306e\u306fGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u56fa\u5b9a\u9577\u30d5\u30a3\u30fc\u30eb\u30c9\u7528\u306e\u9818\u57df\u306e\u5927\u304d\u3055\u3001 extra \u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u306e\u306f\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u7528\u306e\u9818\u57df\u306e\u5927\u304d\u3055\u3067\u3059\u3002 =# explain select pref, city, count(*) from giscity g, dpoints d where pref = 'Tokyo' and st_contains(g.geom,st_makepoint(d.x, d.y)) group by pref, city; QUERY PLAN -------------------------------------------------------------------------------------------------------- HashAggregate (cost=5638809.75..5638859.99 rows=5024 width=29) Group Key: g.pref, g.city -> Custom Scan (GpuPreAgg) (cost=5638696.71..5638759.51 rows=5024 width=29) Reduction: Local Combined GpuJoin: enabled GPU Preference: GPU0 (NVIDIA Tesla V100-PCIE-16GB) -> Custom Scan (GpuJoin) on dpoints d (cost=631923.57..5606933.23 rows=50821573 width=21) Outer Scan: dpoints d (cost=0.00..141628.18 rows=7999618 width=16) Depth 1: GpuGiSTJoin(nrows 7999618...50821573) HeapSize: 3251.36KB IndexFilter: (g.geom ~ st_makepoint(d.x, d.y)) on giscity_geom_idx JoinQuals: st_contains(g.geom, st_makepoint(d.x, d.y)) GPU Preference: GPU0 (NVIDIA Tesla V100-PCIE-16GB) GPU Cache: NVIDIA Tesla V100-PCIE-16GB [max_num_rows: 12000000, main: 772.51M, extra: 0] -> Seq Scan on giscity g (cost=0.00..8929.24 rows=6353 width=1883) Filter: ((pref)::text = 'Tokyo'::text) (16 rows) GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u72b6\u614b\u3092\u78ba\u8a8d\u3059\u308b GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u73fe\u5728\u306e\u72b6\u614b\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306f pgstrom.gpucache_info \u30d3\u30e5\u30fc\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 =# select * from pgstrom.gpucache_info ; database_oid | database_name | table_oid | table_name | signature | refcnt | corrupted | gpu_main_sz | gpu_extra_sz | redo_write_ts | redo_write_nitems | redo_write_pos | redo_read_nitems | redo_read_pos | redo_sync_pos | config_options --------------+---------------+-----------+------------+------------+--------+-----------+-------------+--------------+----------------------------+-------------------+----------------+------------------+---------------+---------------+------------------------------------------------------------------------------------------------------------------------ 12728 | postgres | 25244 | mytest | 6295279771 | 3 | f | 675028992 | 0 | 2021-05-14 03:00:18.623503 | 500000 | 36000000 | 500000 | 36000000 | 36000000 | gpu_device_id=0,max_num_rows=10485760,redo_buffer_size=167772160,gpu_sync_interval=5000000,gpu_sync_threshold=41943040 12728 | postgres | 25262 | dpoints | 5985886065 | 3 | f | 772505600 | 0 | 2021-05-14 03:00:18.524627 | 8000000 | 576000192 | 8000000 | 576000192 | 576000192 | gpu_device_id=0,max_num_rows=12000000,redo_buffer_size=167772160,gpu_sync_interval=5000000,gpu_sync_threshold=41943040 (2 rows) \u3053\u306e\u30d3\u30e5\u30fc\u3067\u8868\u793a\u3055\u308c\u308bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u72b6\u614b\u306f\u3001\u305d\u306e\u6642\u70b9\u3067\u521d\u671f\u30ed\u30fc\u30c9\u304c\u7d42\u308f\u3063\u3066\u304a\u308a\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u306b\u9818\u57df\u304c\u78ba\u4fdd\u3055\u308c\u3066\u3044\u308b\u3082\u306e\u3060\u3051\u3067\u3042\u308b\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u3064\u307e\u308a\u3001\u30c8\u30ea\u30ac\u95a2\u6570\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u304c\u521d\u671f\u30ed\u30fc\u30c9\u304c\u7d42\u308f\u3063\u3066\u3044\u306a\u3044\uff08\u307e\u3060\u8ab0\u3082\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u306a\u3044\uff09\u5834\u5408\u3001\u6f5c\u5728\u7684\u306b\u78ba\u4fdd\u3055\u308c\u3046\u308bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u307e\u3060 pgstrom.gpucache_info \u306b\u306f\u73fe\u308c\u307e\u305b\u3093\u3002 \u5404\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u610f\u5473\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 database_oid GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u5c5e\u3059\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306eOID\u3067\u3059 database_name GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u5c5e\u3059\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u540d\u524d\u3067\u3059 table_oid GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306eOID\u3067\u3059\u3002\u5fc5\u305a\u3057\u3082\u73fe\u5728\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306f\u9650\u3089\u306a\u3044\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 table_name GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u540d\u524d\u3067\u3059\u3002\u5fc5\u305a\u3057\u3082\u73fe\u5728\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306f\u9650\u3089\u306a\u3044\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 signature GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u4e00\u610f\u6027\u3092\u793a\u3059\u30cf\u30c3\u30b7\u30e5\u5024\u3067\u3059\u3002\u4f8b\u3048\u3070 ALTER TABLE \u306e\u524d\u5f8c\u306a\u3069\u3067\u3053\u306e\u5024\u304c\u5909\u308f\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 refcnt GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u53c2\u7167\u30ab\u30a6\u30f3\u30bf\u3067\u3059\u3002\u3053\u308c\u306f\u5fc5\u305a\u3057\u3082\u6700\u65b0\u306e\u5024\u3092\u53cd\u6620\u3057\u3066\u3044\u308b\u3068\u306f\u9650\u308a\u307e\u305b\u3093\u3002 corrupted GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u5185\u5bb9\u304c\u7834\u640d\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u793a\u3057\u307e\u3059\u3002 gpu_main_sz GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306b\u78ba\u4fdd\u3055\u308c\u305f\u56fa\u5b9a\u9577\u30c7\u30fc\u30bf\u7528\u306e\u9818\u57df\u306e\u30b5\u30a4\u30ba\u3067\u3059\u3002 gpu_extra_sz GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306b\u78ba\u4fdd\u3055\u308c\u305f\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u7528\u306e\u9818\u57df\u306e\u30b5\u30a4\u30ba\u3067\u3059\u3002 redo_write_ts REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u3092\u6700\u5f8c\u306b\u66f4\u65b0\u3057\u305f\u6642\u523b\u3067\u3059\u3002 redo_write_nitems REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u6570\u3067\u3059\u3002 redo_write_pos REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u30d0\u30a4\u30c8\u6570\u3067\u3059\u3002 redo_read_nitems REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u304b\u3089\u8aad\u307f\u51fa\u3057\u3001GPU\u306b\u9069\u7528\u3055\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u6570\u3067\u3059\u3002 redo_read_pos REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u304b\u3089\u8aad\u307f\u51fa\u3057\u3001GPU\u306b\u9069\u7528\u3055\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u30d0\u30a4\u30c8\u6570\u3067\u3059\u3002 redo_sync_pos REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305fREDO\u30ed\u30b0\u306e\u3046\u3061\u3001\u65e2\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3078\u306e\u9069\u7528\u3092\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u305f\u4f4d\u7f6e\u3067\u3059\u3002 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306e\u6b8b\u308a\u5bb9\u91cf\u304c\u903c\u8feb\u3057\u3066\u304d\u305f\u969b\u306b\u3001\u591a\u6570\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u540c\u6642\u306b\u975e\u540c\u671f\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u767a\u751f\u3055\u305b\u308b\u4e8b\u3092\u907f\u3051\u308b\u305f\u3081\u3001\u5185\u90e8\u7684\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002 config_options GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u6587\u5b57\u5217\u3067\u3059\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u7834\u640d\u3068\u5fa9\u5143 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306b max_num_rows \u3067\u6307\u5b9a\u3057\u305f\u4ee5\u4e0a\u306e\u884c\u6570\u3092\u633f\u5165\u3057\u3088\u3046\u3068\u3057\u305f\u308a\u3001\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u306e\u30d0\u30c3\u30d5\u30a1\u9577\u304c\u80a5\u5927\u5316\u3057\u3059\u304e\u305f\u308a\u3001 \u3068\u3044\u3063\u305f\u7406\u7531\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306bREDO\u30ed\u30b0\u3092\u9069\u7528\u3067\u304d\u306a\u304b\u3063\u305f\u5834\u5408\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u7834\u640d\uff08corrupted\uff09\u72b6\u614b\u306b\u79fb\u884c\u3057\u307e\u3059\u3002 \u4e00\u5ea6GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u7834\u640d\u3059\u308b\u3068\u3001\u3053\u308c\u3092\u624b\u52d5\u3067\u5fa9\u65e7\u3059\u308b\u307e\u3067\u306f\u3001\u691c\u7d22/\u5206\u6790\u7cfb\u306e\u30af\u30a8\u30ea\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u53c2\u7167\u3059\u308b\u4e8b\u306f\u306a\u304f\u306a\u308a\u3001 \u307e\u305f\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u66f4\u65b0\u306b\u969b\u3057\u3066\u3082REDO\u30ed\u30b0\u306e\u8a18\u9332\u3092\u884c\u308f\u306a\u304f\u306a\u308a\u307e\u3059\u3002 \uff08\u904b\u60aa\u304f\u3001\u691c\u7d22/\u5206\u6790\u7cfb\u306e\u30af\u30a8\u30ea\u304c\u5b9f\u884c\u3092\u958b\u59cb\u3057\u305f\u5f8c\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u7834\u640d\u3057\u305f\u5834\u5408\u3001\u305d\u306e\u30af\u30a8\u30ea\u306f\u30a8\u30e9\u30fc\u3092\u8fd4\u3059\u4e8b\u304c\u3042\u308a\u307e\u3059\u3002\uff09 GPU\u30d0\u30c3\u30d5\u30a1\u3092\u7834\u640d\u72b6\u614b\u304b\u3089\u5fa9\u5143\u3059\u308b\u306e\u306f pgstrom.gpucache_recovery(regclass) \u95a2\u6570\u3067\u3059\u3002 REDO\u30ed\u30b0\u3092\u9069\u7528\u3067\u304d\u306a\u304b\u3063\u305f\u539f\u56e0\u3092\u53d6\u308a\u9664\u3044\u305f\u4e0a\u3067\u3053\u306e\u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u518d\u5ea6\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u521d\u671f\u30ed\u30fc\u30c9\u3092\u884c\u3044\u3001\u5143\u306e\u72b6\u614b\u3078\u306e \u5fa9\u65e7\u3092\u8a66\u307f\u307e\u3059\u3002 \u4f8b\u3048\u3070\u3001 max_num_rows \u3067\u6307\u5b9a\u3057\u305f\u4ee5\u4e0a\u306e\u884c\u6570\u3092\u633f\u5165\u3057\u3088\u3046\u3068\u3057\u305f\u5834\u5408\u3067\u3042\u308c\u3070\u3001\u30c8\u30ea\u30ac\u306e\u5b9a\u7fa9\u3092\u5909\u66f4\u3057\u3066 max_num_rows \u8a2d\u5b9a\u3092 \u62e1\u5927\u3059\u308b\u304b\u3001\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u4e00\u90e8\u306e\u884c\u3092\u524a\u9664\u3057\u305f\u5f8c\u3067\u3001 pgstrom.gpucache_recovery() \u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u3068\u3044\u3046\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002","title":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5"},{"location":"gpucache/#gpu","text":"","title":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5"},{"location":"gpucache/#_1","text":"GPU\u306b\u306f\u30db\u30b9\u30c8\u30b7\u30b9\u30c6\u30e0\u306eRAM\u3068\u306f\u72ec\u7acb\u306a\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u304c\u642d\u8f09\u3055\u308c\u3066\u304a\u308a\u3001GPU\u3067\u8a08\u7b97\u3059\u308b\u306b\u306fPCI-E\u30d0\u30b9\u306a\u3069\u3092\u901a\u3058\u3066\u3001\u4e00\u65e6\u3001\u30db\u30b9\u30c8\u30b7\u30b9\u30c6\u30e0\u3084\u30b9\u30c8\u30ec\u30fc\u30b8\u30c7\u30d0\u30a4\u30b9\u304b\u3089\u30c7\u30fc\u30bf\u3092GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u5074\u3078\u8ee2\u9001\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 PG-Strom\u304cSQL\u30af\u30a8\u30ea\u3092GPU\u3067\u51e6\u7406\u3059\u308b\u5834\u5408\u3082\u4f8b\u5916\u3067\u306f\u306a\u304f\u3001\u5185\u90e8\u7684\u306b\u306f\u3001PostgreSQL\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u8aad\u307f\u51fa\u3057\u305f\u30ec\u30b3\u30fc\u30c9\u3092GPU\u3078\u3068\u8ee2\u9001\u3057\u3001\u305d\u306e\u4e0a\u3067GPU\u3067SQL\u306e\u5404\u7a2e\u51e6\u7406\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 \u3057\u304b\u3057\u3053\u308c\u3089\u306e\u51e6\u7406\u306b\u306f\u3001\u591a\u304b\u308c\u5c11\u306a\u304b\u308c\u30c6\u30fc\u30d6\u30eb\u306e\u8aad\u307f\u51fa\u3057\u3084\u30c7\u30fc\u30bf\u306e\u8ee2\u9001\u306b\u6642\u9593\u3092\u8981\u3057\u307e\u3059\uff08\u591a\u304f\u306e\u5834\u5408\u3001GPU\u3067\u306e\u51e6\u7406\u3088\u308a\u3082\u9065\u304b\u306b\u9577\u3044\u6642\u9593\u306e\uff01\uff09\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\uff08GPU Cache\uff09\u3068\u306f\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u306b\u4e88\u3081\u9818\u57df\u3092\u78ba\u4fdd\u3057\u3066\u304a\u304d\u3001\u305d\u3053\u306bPostgreSQL\u30c6\u30fc\u30d6\u30eb\u306e\u8907\u88fd\u3092\u4fdd\u6301\u3057\u3066\u304a\u304f\u6a5f\u80fd\u3067\u3059\u3002 \u6bd4\u8f03\u7684\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\u306e\u5c0f\u3055\u306a\uff08\uff5e10GB\u7a0b\u5ea6\uff09\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3067\u3001\u66f4\u65b0\u983b\u5ea6\u304c\u9ad8\u3044\u3046\u3048\u306b\u3001\u3057\u3070\u3057\u3070\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306e\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u691c\u7d22/\u5206\u6790\u7cfb\u306eSQL\u3092\u5b9f\u884c\u3059\u308b\u3068\u3044\u3046\u30d1\u30bf\u30fc\u30f3\u3092\u610f\u56f3\u3057\u3066\u3044\u307e\u3059\u3002 \u5f8c\u8ff0\u3059\u308b\u30ed\u30b0\u30d9\u30fc\u30b9\u306e\u540c\u671f\u30e1\u30ab\u30cb\u30ba\u30e0\u306b\u3088\u308a\u3001\u4e26\u5217\u5ea6\u306e\u9ad8\u3044\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30ca\u30eb\u306a\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u59a8\u3052\u308b\u3053\u3068\u306a\u304fGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6700\u65b0\u306e\u72b6\u614b\u306b\u4fdd\u3064\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 \u305d\u306e\u4e00\u65b9\u3067\u3001\u691c\u7d22/\u5206\u6790\u7cfb\u306eSQL\u3092\u5b9f\u884c\u3059\u308b\u969b\u306b\u306f\u65e2\u306bGPU\u4e0a\u306b\u30c7\u30fc\u30bf\u304c\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u6539\u3081\u3066\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u30ec\u30b3\u30fc\u30c9\u3092\u8aad\u307f\u51fa\u3057\u305f\u308a\u3001PCI-E\u30d0\u30b9\u3092\u4ecb\u3057\u3066\u30c7\u30fc\u30bf\u3092\u8ee2\u9001\u3057\u305f\u308a\u3059\u308b\u4e8b\u306a\u304f\u3001SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u5178\u578b\u7684\u306a\u5229\u7528\u30b7\u30fc\u30f3\u3068\u3057\u3066\u306f\u3001\u81ea\u52d5\u8eca\u3084\u643a\u5e2f\u96fb\u8a71\u3068\u3044\u3063\u305f\u30e2\u30d0\u30a4\u30eb\u30c7\u30d0\u30a4\u30b9\u306e\u4f4d\u7f6e\u60c5\u5831\uff08\u73fe\u5728\u4f4d\u7f6e\uff09\u3092\u6642\u3005\u523b\u3005\u53ce\u96c6\u3057\u3001 GPU\u7248PostGIS \u306a\u3069\u3092\u7528\u3044\u3066\u4ed6\u306e\u30c7\u30fc\u30bf\u3068\u7a81\u304d\u5408\u308f\u305b\u308b\u3068\u3044\u3063\u305f\u30b1\u30fc\u30b9\u304c\u8003\u3048\u3089\u308c\u307e\u3059\u3002 \u591a\u6570\u306e\u30c7\u30d0\u30a4\u30b9\u304b\u3089\u9001\u51fa\u3055\u308c\u308b\u4f4d\u7f6e\u60c5\u5831\u306e\u66f4\u65b0\u306f\u6975\u3081\u3066\u66f4\u65b0\u30d8\u30d3\u30fc\u306a\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3067\u3059\u304c\u3001\u4e00\u65b9\u3067\u3001\u6700\u65b0\u306e\u4f4d\u7f6e\u60c5\u5831\u306b\u57fa\u3065\u3044\u3066\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u3082\u3042\u308b\u305f\u3081\u3001\u3053\u308c\u3089\u66f4\u65b0\u30c7\u30fc\u30bf\u3092\u9045\u6ede\u306a\u304fGPU\u5074\u3078\u9069\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\u306b\u306f\u5236\u7d04\u304c\u3042\u308a\u307e\u3059\u304c\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u9ad8\u983b\u5ea6\u306e\u66f4\u65b0\u3068\u3001\u9ad8\u6027\u80fd\u306a\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u3092\u4e21\u7acb\u3059\u308b\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3059\u3002","title":"\u6982\u8981"},{"location":"gpucache/#_2","text":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3067\u306f\u3001\u4e26\u5217\u5ea6\u306e\u9ad8\u3044\u66f4\u65b0\u7cfb\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u5bfe\u5fdc\u3059\u308b\u3053\u3068\u3068\u3001\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u304c\u5e38\u306b\u6700\u65b0\u306e\u30c7\u30fc\u30bf\u3092\u53c2\u7167\u3059\u308b\u3068\u3044\u30462\u3064\u306e\u8981\u4ef6\u3092\u30af\u30ea\u30a2\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u591a\u304f\u306e\u30b7\u30b9\u30c6\u30e0\u3067\u306fCPU\u3068GPU\u306fPCI-E\u30d0\u30b9\u3092\u4ecb\u3057\u3066\u63a5\u7d9a\u3055\u308c\u3001\u305d\u306e\u901a\u4fe1\u306b\u306f\u76f8\u5fdc\u306e\u30ec\u30a4\u30c6\u30f3\u30b7\u304c\u767a\u751f\u3057\u307e\u3059\u3002 \u305d\u306e\u305f\u3081\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u5bfe\u8c61\u30c6\u30fc\u30d6\u30eb\u304c1\u884c\u66f4\u65b0\u3055\u308c\u308b\u305f\u3073\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u540c\u671f\u3057\u3066\u3044\u3066\u306f\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u6027\u80fd\u306b\u5927\u304d\u306a\u5f71\u97ff\u3092\u4e0e\u3048\u3066\u3057\u307e\u3044\u307e\u3059\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u4f5c\u6210\u3059\u308b\u3068\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u306b\u30ad\u30e3\u30c3\u30b7\u30e5\u7528\u306e\u30e1\u30e2\u30ea\u9818\u57df\u3092\u78ba\u4fdd\u3059\u308b\u3060\u3051\u3067\u306a\u304f\u3001\u30db\u30b9\u30c8\u5074\u5171\u6709\u30e1\u30e2\u30ea\u4e0a\u306bREDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \u30c6\u30fc\u30d6\u30eb\u306e\u66f4\u65b0\u3092\u4f34\u3046SQL\u30b3\u30de\u30f3\u30c9\uff08INSERT\u3001UPDATE\u3001DELETE\uff09\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001AFTER ROW\u30c8\u30ea\u30ac\u306b\u3088\u3063\u3066\u66f4\u65b0\u5185\u5bb9\u304cREDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u30b3\u30d4\u30fc\u3055\u308c\u307e\u3059\u304c\u3001\u3053\u306e\u51e6\u7406\u306fGPU\u3078\u306e\u547c\u3073\u51fa\u3057\u3092\u4f34\u308f\u306a\u3044\u3001CPU\u3068RAM\u3060\u3051\u3067\u5b8c\u7d50\u3059\u308b\u51e6\u7406\u3067\u3059\u306e\u3067\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u6027\u80fd\u3078\u306e\u5f71\u97ff\u306f\u307b\u3068\u3093\u3069\u3042\u308a\u307e\u305b\u3093\u3002 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u672a\u9069\u7528\u306eREDO\u30ed\u30b0\u304c\u4e00\u5b9a\u91cf\u305f\u307e\u308b\u304b\u3001\u6700\u5f8c\u306e\u66f8\u304d\u8fbc\u307f\u304b\u3089\u4e00\u5b9a\u6642\u9593\u304c\u7d4c\u904e\u3059\u308b\u3068\u3001\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\uff08GPU memory keeper\uff09\u306b\u3088\u3063\u3066\u672a\u9069\u7528\u306eREDO\u30ed\u30b0\u306fGPU\u3078\u30ed\u30fc\u30c9\u3055\u308c\u3001\u66f4\u65b0\u5dee\u5206\u3092GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306b\u9069\u7528\u3057\u307e\u3059\u3002 \u3053\u306e\u6642\u3001REDO\u30ed\u30b0\u306f\u307e\u3068\u3081\u3066GPU\u306b\u8ee2\u9001\u3055\u308c\u3001\u3055\u3089\u306bGPU\u306e\u6570\u5343\u30d7\u30ed\u30bb\u30c3\u30b5\u30b3\u30a2\u304c\u4e26\u5217\u306bREDO\u30ed\u30b0\u3092\u9069\u7528\u3059\u308b\u305f\u3081\u3001\u901a\u5e38\u306f\u51e6\u7406\u9045\u5ef6\u304c\u554f\u984c\u3068\u306a\u308b\u4e8b\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u5bfe\u8c61\u30c6\u30fc\u30d6\u30eb\u3092\u53c2\u7167\u3059\u308b\u969b\u306b\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u3057\u3066GPU\u306b\u30ed\u30fc\u30c9\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u65e2\u306bGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u306b\u5272\u5f53\u3066\u6e08\u307f\u306eGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u30de\u30c3\u30d4\u30f3\u30b0\u3057\u3066\u5229\u7528\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u5148\u7acb\u3063\u3066\u3001\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u958b\u59cb\u6642\u70b9\u3067\u672a\u9069\u7528\u306eREDO\u30ed\u30b0\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u3001\u3053\u308c\u3089\u306f\u5168\u3066\u3001\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u524d\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3078\u9069\u7528\u3055\u308c\u307e\u3059\u3002 \u305d\u306e\u305f\u3081\u3001\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u304c\u5bfe\u8c61\u306eGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u305f\u7d50\u679c\u306f\u3001\u76f4\u63a5\u30c6\u30fc\u30d6\u30eb\u3092\u53c2\u7167\u3057\u305f\u5834\u5408\u3068\u540c\u3058\u7d50\u679c\u3092\u8fd4\u3059\u4e8b\u3068\u306a\u308a\u3001\u554f\u3044\u5408\u308f\u305b\u306e\u4e00\u8cab\u6027\u306f\u5e38\u306b\u4fdd\u6301\u3055\u308c\u3066\u3044\u307e\u3059\u3002","title":"\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3"},{"location":"gpucache/#_3","text":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6709\u52b9\u306b\u3059\u308b\u306b\u306f\u3001\u5bfe\u8c61\u3068\u306a\u308b\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066 pgstrom.gpucache_sync_trigger() \u95a2\u6570\u3092\u5b9f\u884c\u3059\u308bAFTER INSERT OR UPDATE OR DELETE\u306e\u884c\u30c8\u30ea\u30ac\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002 \u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30b9\u30ec\u30fc\u30d6\u5074\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001\u3053\u306e\u30c8\u30ea\u30ac\u306e\u767a\u884c\u30e2\u30fc\u30c9\u304c ALWAYS \u3067\u3042\u308b\u4e8b\u304c\u5fc5\u8981\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u30c6\u30fc\u30d6\u30eb dpoints \u306b\u5bfe\u3057\u3066GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3059\u308b\u4f8b\u3067\u3059\u3002 =# create trigger row_sync after insert or update or delete on dpoints_even for row execute function pgstrom.gpucache_sync_trigger(); =# alter table dpoints_even enable always trigger row_sync; Note PostgreSQL v12.x \u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u304a\u3051\u308b\u8ffd\u52a0\u8a2d\u5b9a PostgreSQL v12\u304a\u3088\u3073\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u3001\u4e0a\u8a18\u306e\u30c8\u30ea\u30ac\u306b\u52a0\u3048\u3066\u3001 pgstrom.gpucache_sync_trigger() \u95a2\u6570\u3092\u5b9f\u884c\u3059\u308bBEFORE TRUNCATE\u306e\u69cb\u6587\u30c8\u30ea\u30ac\u306e\u8a2d\u5b9a\u304c\u5fc5\u8981\u3067\u3059\u3002 \u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30b9\u30ec\u30fc\u30d6\u5074\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u5b9f\u884c\u3059\u308b\u5834\u5408\u3001\u540c\u69d8\u306b\u3001\u3053\u306e\u30c8\u30ea\u30ac\u306e\u767a\u884c\u30e2\u30fc\u30c9\u304c ALWAYS \u3067\u3042\u308b\u4e8b\u304c\u5fc5\u8981\u3067\u3059\u3002 PostgreSQL v13\u3067\u306fObject Access Hook\u304c\u62e1\u5f35\u3055\u308c\u3001\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u30c8\u30ea\u30ac\u8a2d\u5b9a\u306a\u3057\u3067 TRUNCATE\u306e\u5b9f\u884c\u3092\u6355\u6349\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u3057\u304b\u3057\u305d\u308c\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u3001TRUNCATE\u3092\u6355\u6349\u3057\u3066GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u4e00\u8cab\u6027\u3092\u4fdd\u3064\u306b\u306f\u3001 BEFORE TRUNCATE\u306e\u69cb\u6587\u30c8\u30ea\u30ac\u304c\u5fc5\u8981\u3067\u3059\u3002 \u4ee5\u4e0b\u306f\u3001PostgreSQL v12\u4ee5\u524d\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092 dpoints \u30c6\u30fc\u30d6\u30eb\u306b\u8a2d\u5b9a\u3059\u308b\u4f8b\u3067\u3059\u3002 =# create trigger row_sync after insert or update or delete on dpoints_even for row execute function pgstrom.gpucache_sync_trigger(); =# create trigger stmt_sync before truncate on dpoints_even for statement execute function pgstrom.gpucache_sync_trigger(); =# alter table dpoints_even enable always trigger row_sync; =# alter table dpoints_even enable always trigger stmt_sync;","title":"\u8a2d\u5b9a"},{"location":"gpucache/#gpu_1","text":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u884c\u30c8\u30ea\u30ac\u306b\u5f15\u6570\u3068\u3057\u3066 KEY=VALUE \u5f62\u5f0f\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u6587\u5b57\u5217\u3092\u4e0e\u3048\u308b\u4e8b\u3067\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u69cb\u6587\u30c8\u30ea\u30ac\u306e\u65b9\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u306e\u3067\u3054\u6ce8\u610f\u304f\u3060\u3055\u3044\u3002 \u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306eGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u884c\u6570\u306e\u6700\u5927\u5024\u304c250\u4e07\u884c\u3001REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306e\u30b5\u30a4\u30ba\u3092100MB\u3068\u3057\u3066\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059\u3002 =# create trigger row_sync after insert or update or delete on dpoints_even for row execute function pgstrom.gpucache_sync_trigger('max_num_rows=2500000,redo_buffer_size=100m'); \u884c\u30c8\u30ea\u30ac\u306e\u5f15\u6570\u306b\u4e0e\u3048\u308b\u4e8b\u306e\u3067\u304d\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 gpu_device_id=GPU_ID (default: 0) GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u78ba\u4fdd\u3059\u308b\u5bfe\u8c61\u306eGPU\u30c7\u30d0\u30a4\u30b9ID\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 max_num_rows=NROWS (default: 10485760) GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306b\u78ba\u4fdd\u3067\u304d\u308b\u884c\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 PostgreSQL\u30c6\u30fc\u30d6\u30eb\u3068\u540c\u69d8\u306b\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3067\u3082\u53ef\u8996\u6027\u5236\u5fa1\u306e\u305f\u3081\u306b\u30b3\u30df\u30c3\u30c8\u524d\u306e\u66f4\u65b0\u884c\u3092\u4fdd\u6301\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u305f\u3081\u3001\u3042\u308b\u7a0b\u5ea6\u306e\u4f59\u88d5\u3092\u6301\u3063\u3066 max_num_rows \u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u306a\u304a\u3001\u66f4\u65b0/\u524a\u9664\u3055\u308c\u305f\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u884c\u306f\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u30b3\u30df\u30c3\u30c8\u5f8c\u306b\u89e3\u653e\u3055\u308c\u307e\u3059\u3002 redo_buffer_size=SIZE \u3000\uff08default: 160m\uff09 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306e\u30b5\u30a4\u30ba\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u5358\u4f4d\u3068\u3057\u3066\u3001k\u3001m\u3001g\u3092\u6307\u5b9a\u3067\u304d\u308b\u3002 gpu_sync_interval=SECONDS \u3000\uff08default: 5\uff09 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u3078\u306e\u6700\u5f8c\u306e\u66f8\u304d\u8fbc\u307f\u304b\u3089 SECONDS \u79d2\u7d4c\u904e\u3059\u308b\u3068\u3001\u305f\u3068\u3048\u66f4\u65b0\u884c\u6570\u304c\u5c11\u306a\u304f\u3068\u3082\u3001REDO\u30ed\u30b0\u3092GPU\u5074\u3078\u53cd\u6620\u3057\u307e\u3059\u3002 gpu_sync_threshold=SIZE \u3000\uff08default: redo_buffer_size \u306e25%\uff09 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306e\u66f8\u304d\u8fbc\u307f\u306e\u3046\u3061\u3001\u672a\u53cd\u6620\u5206\u306e\u5927\u304d\u3055\u304c SIZE \u30d0\u30a4\u30c8\u306b\u9054\u3059\u308b\u3068\u3001GPU\u5074\u306bREDO\u30ed\u30b0\u3092\u53cd\u6620\u3057\u307e\u3059\u3002 \u5358\u4f4d\u3068\u3057\u3066k\u3001m\u3001g\u3092\u6307\u5b9a\u3067\u304d\u308b\u3002","title":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba"},{"location":"gpucache/#gpu_2","text":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306b\u95a2\u9023\u3057\u3066\u3001\u4ee5\u4e0b\u306ePostgreSQL\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002 pg_strom.enable_gpucache \u3000\uff08default: on\uff09 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u5229\u7528\u53ef\u80fd\u3067\u3042\u308b\u5834\u5408\u3001\u691c\u7d22/\u5206\u6790\u7cfb\u306e\u30af\u30a8\u30ea\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u4f7f\u7528\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3057\u307e\u3059\u3002 \u3053\u306e\u5024\u304c off \u306b\u306a\u3063\u3066\u3044\u308b\u3068\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u5b58\u5728\u3057\u3066\u3044\u3066\u3082\u3053\u308c\u3092\u7121\u8996\u3057\u3001\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u90fd\u5ea6\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u305d\u3046\u3068\u3057\u307e\u3059\u3002 \u306a\u304a\u3001\u672c\u8a2d\u5b9a\u306f\u30c8\u30ea\u30ac\u306b\u3088\u308bREDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u3078\u306e\u8ffd\u8a18\u306b\u306f\u5f71\u97ff\u3057\u307e\u305b\u3093\u3002 pg_strom.gpucache_auto_preload \u3000\uff08default: NULL\uff09 PostgreSQL\u306e\u8d77\u52d5\u6642/\u518d\u8d77\u52d5\u6642\u306b\u3001\u672c\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u3067\u6307\u5b9a\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u306eGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u4e88\u3081\u69cb\u7bc9\u3057\u3066\u304a\u304d\u307e\u3059\u3002 \u66f8\u5f0f\u306f DATABASE_NAME.SCHEMA_NAME.TABLE_NAME \u3067\u3001\u8907\u6570\u500b\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u6307\u5b9a\u3059\u308b\u5834\u5408\u306f\u3053\u308c\u3092\u30ab\u30f3\u30de\u533a\u5207\u308a\u3067\u4e26\u3079\u307e\u3059\u3002 \u307e\u3060GPU\u30c7\u30d0\u30a4\u30b9\u4e0a\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u69cb\u7bc9\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u3001\u5bfe\u8c61\u30c6\u30fc\u30d6\u30eb\u3092\u30d5\u30eb\u30b9\u30ad\u30e3\u30f3\u3057\u3066GPU\u5074\u3078\u8ee2\u9001\u3059\u308b\u306e\u306f\u3001\u6700\u521d\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3088\u3046\u3068\u8a66\u307f\u305fPostgreSQL\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u30d7\u30ed\u30bb\u30b9\u306e\u5f79\u5272\u3067\u3059\u3002\u3053\u308c\u306f\u901a\u5e38\u3001\u76f8\u5fdc\u306e\u6642\u9593\u3092\u8981\u3059\u308b\u51e6\u7406\u3067\u3059\u304c\u3001\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u30ed\u30fc\u30c9\u3059\u3079\u304d\u30c6\u30fc\u30d6\u30eb\u3092\u8a18\u8f09\u3057\u3066\u304a\u304f\u3053\u3068\u3067\u3001\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u306e\u521d\u56de\u5b9f\u884c\u6642\u306b\u9577\u3005\u3068\u5f85\u305f\u3055\u308c\u308b\u4e8b\u3092\u6291\u6b62\u3067\u304d\u307e\u3059\u3002 \u306a\u304a\u3001\u3053\u306e\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u306b '*' \u3068\u6307\u5b9a\u3057\u305f\u5834\u5408\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6301\u3064\u5168\u3066\u306e\u30c6\u30fc\u30d6\u30eb\u306e\u5185\u5bb9\u3092\u9806\u306bGPU\u3078\u30ed\u30fc\u30c9\u3057\u3088\u3046\u3068\u8a66\u307f\u307e\u3059\u3002\u3053\u306e\u6642\u3001\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u306f\u5168\u3066\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u9806\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u304f\u4e8b\u3068\u306a\u308a\u307e\u3059\u304c\u3001postmaster\u306b\u518d\u8d77\u52d5\u3092\u4fc3\u3059\u305f\u3081\u7d42\u4e86\u30b3\u30fc\u30c9 1 \u3092\u8fd4\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u30b5\u30fc\u30d0\u306e\u8d77\u52d5\u30ed\u30b0\u306b\u300cGPUCache Startup Preloader\u300d\u304c\u7d42\u4e86\u30b3\u30fc\u30c9 1 \u3067\u7d42\u4e86\u3057\u305f\u3068\u51fa\u529b\u3055\u308c\u307e\u3059\u304c\u3001\u3053\u308c\u306f\u7570\u5e38\u3067\u306f\u3042\u308a\u307e\u305b\u3093 LOG: database system is ready to accept connections LOG: background worker \"GPUCache Startup Preloader\" (PID 856418) exited with exit code 1 LOG: background worker \"GPUCache Startup Preloader\" (PID 856427) exited with exit code 1 LOG: create GpuCacheSharedState dpoints:164c95f71 LOG: gpucache: AllocMemory dpoints:164c95f71 (main_sz=772505600, extra_sz=0) LOG: gpucache: auto preload 'public.dpoints' (DB: postgres) LOG: create GpuCacheSharedState mytest:1773a589b LOG: gpucache: auto preload 'public.mytest' (DB: postgres) LOG: gpucache: AllocMemory mytest:1773a589b (main_sz=675028992, extra_sz=0)","title":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u30aa\u30d7\u30b7\u30e7\u30f3"},{"location":"gpucache/#_4","text":"","title":"\u904b\u7528"},{"location":"gpucache/#gpu_3","text":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u53c2\u7167\u306f\u900f\u904e\u7684\u306b\u884c\u308f\u308c\u307e\u3059\u3002\u30e6\u30fc\u30b6\u306f\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u6709\u7121\u3092\u610f\u8b58\u3059\u308b\u5fc5\u8981\u306f\u306a\u304f\u3001PG-Strom\u304c\u81ea\u52d5\u7684\u306b\u5224\u5b9a\u3057\u3066\u51e6\u7406\u3092\u5207\u308a\u66ff\u3048\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u30af\u30a8\u30ea\u5b9f\u884c\u8a08\u753b\u306f\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u8a2d\u5b9a\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb dpoints \u3078\u306e\u53c2\u7167\u3092\u542b\u3080\u3082\u306e\u3067\u3059\u3002\u4e0b\u304b\u30893\u884c\u76ee\u306e\u300cGPU Cache\u300d\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u3001\u3053\u306e\u30c6\u30fc\u30d6\u30eb\u306eGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u57fa\u672c\u7684\u306a\u60c5\u5831\u304c\u8868\u793a\u3055\u308c\u3066\u304a\u308a\u3001\u3053\u306e\u30af\u30a8\u30ea\u3067\u306f dpoints \u30c6\u30fc\u30d6\u30eb\u3092\u8aad\u307f\u51fa\u3059\u306e\u3067\u306f\u306a\u304f\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u53c2\u7167\u3057\u3066\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u308f\u304b\u308a\u307e\u3059\u3002 \u306a\u304a\u3001 max_num_rows \u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u306e\u306fGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u4fdd\u6301\u3067\u304d\u308b\u6700\u5927\u306e\u884c\u6570\u3001 main \u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u306e\u306fGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u56fa\u5b9a\u9577\u30d5\u30a3\u30fc\u30eb\u30c9\u7528\u306e\u9818\u57df\u306e\u5927\u304d\u3055\u3001 extra \u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u306e\u306f\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u7528\u306e\u9818\u57df\u306e\u5927\u304d\u3055\u3067\u3059\u3002 =# explain select pref, city, count(*) from giscity g, dpoints d where pref = 'Tokyo' and st_contains(g.geom,st_makepoint(d.x, d.y)) group by pref, city; QUERY PLAN -------------------------------------------------------------------------------------------------------- HashAggregate (cost=5638809.75..5638859.99 rows=5024 width=29) Group Key: g.pref, g.city -> Custom Scan (GpuPreAgg) (cost=5638696.71..5638759.51 rows=5024 width=29) Reduction: Local Combined GpuJoin: enabled GPU Preference: GPU0 (NVIDIA Tesla V100-PCIE-16GB) -> Custom Scan (GpuJoin) on dpoints d (cost=631923.57..5606933.23 rows=50821573 width=21) Outer Scan: dpoints d (cost=0.00..141628.18 rows=7999618 width=16) Depth 1: GpuGiSTJoin(nrows 7999618...50821573) HeapSize: 3251.36KB IndexFilter: (g.geom ~ st_makepoint(d.x, d.y)) on giscity_geom_idx JoinQuals: st_contains(g.geom, st_makepoint(d.x, d.y)) GPU Preference: GPU0 (NVIDIA Tesla V100-PCIE-16GB) GPU Cache: NVIDIA Tesla V100-PCIE-16GB [max_num_rows: 12000000, main: 772.51M, extra: 0] -> Seq Scan on giscity g (cost=0.00..8929.24 rows=6353 width=1883) Filter: ((pref)::text = 'Tokyo'::text) (16 rows)","title":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u5229\u7528\u3092\u78ba\u8a8d\u3059\u308b"},{"location":"gpucache/#gpu_4","text":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u73fe\u5728\u306e\u72b6\u614b\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306f pgstrom.gpucache_info \u30d3\u30e5\u30fc\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 =# select * from pgstrom.gpucache_info ; database_oid | database_name | table_oid | table_name | signature | refcnt | corrupted | gpu_main_sz | gpu_extra_sz | redo_write_ts | redo_write_nitems | redo_write_pos | redo_read_nitems | redo_read_pos | redo_sync_pos | config_options --------------+---------------+-----------+------------+------------+--------+-----------+-------------+--------------+----------------------------+-------------------+----------------+------------------+---------------+---------------+------------------------------------------------------------------------------------------------------------------------ 12728 | postgres | 25244 | mytest | 6295279771 | 3 | f | 675028992 | 0 | 2021-05-14 03:00:18.623503 | 500000 | 36000000 | 500000 | 36000000 | 36000000 | gpu_device_id=0,max_num_rows=10485760,redo_buffer_size=167772160,gpu_sync_interval=5000000,gpu_sync_threshold=41943040 12728 | postgres | 25262 | dpoints | 5985886065 | 3 | f | 772505600 | 0 | 2021-05-14 03:00:18.524627 | 8000000 | 576000192 | 8000000 | 576000192 | 576000192 | gpu_device_id=0,max_num_rows=12000000,redo_buffer_size=167772160,gpu_sync_interval=5000000,gpu_sync_threshold=41943040 (2 rows) \u3053\u306e\u30d3\u30e5\u30fc\u3067\u8868\u793a\u3055\u308c\u308bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u72b6\u614b\u306f\u3001\u305d\u306e\u6642\u70b9\u3067\u521d\u671f\u30ed\u30fc\u30c9\u304c\u7d42\u308f\u3063\u3066\u304a\u308a\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u306b\u9818\u57df\u304c\u78ba\u4fdd\u3055\u308c\u3066\u3044\u308b\u3082\u306e\u3060\u3051\u3067\u3042\u308b\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u3064\u307e\u308a\u3001\u30c8\u30ea\u30ac\u95a2\u6570\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u304c\u521d\u671f\u30ed\u30fc\u30c9\u304c\u7d42\u308f\u3063\u3066\u3044\u306a\u3044\uff08\u307e\u3060\u8ab0\u3082\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u306a\u3044\uff09\u5834\u5408\u3001\u6f5c\u5728\u7684\u306b\u78ba\u4fdd\u3055\u308c\u3046\u308bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u307e\u3060 pgstrom.gpucache_info \u306b\u306f\u73fe\u308c\u307e\u305b\u3093\u3002 \u5404\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u610f\u5473\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 database_oid GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u5c5e\u3059\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306eOID\u3067\u3059 database_name GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u5c5e\u3059\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u540d\u524d\u3067\u3059 table_oid GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306eOID\u3067\u3059\u3002\u5fc5\u305a\u3057\u3082\u73fe\u5728\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306f\u9650\u3089\u306a\u3044\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 table_name GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u540d\u524d\u3067\u3059\u3002\u5fc5\u305a\u3057\u3082\u73fe\u5728\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306f\u9650\u3089\u306a\u3044\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 signature GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u4e00\u610f\u6027\u3092\u793a\u3059\u30cf\u30c3\u30b7\u30e5\u5024\u3067\u3059\u3002\u4f8b\u3048\u3070 ALTER TABLE \u306e\u524d\u5f8c\u306a\u3069\u3067\u3053\u306e\u5024\u304c\u5909\u308f\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 refcnt GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u53c2\u7167\u30ab\u30a6\u30f3\u30bf\u3067\u3059\u3002\u3053\u308c\u306f\u5fc5\u305a\u3057\u3082\u6700\u65b0\u306e\u5024\u3092\u53cd\u6620\u3057\u3066\u3044\u308b\u3068\u306f\u9650\u308a\u307e\u305b\u3093\u3002 corrupted GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u5185\u5bb9\u304c\u7834\u640d\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u793a\u3057\u307e\u3059\u3002 gpu_main_sz GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306b\u78ba\u4fdd\u3055\u308c\u305f\u56fa\u5b9a\u9577\u30c7\u30fc\u30bf\u7528\u306e\u9818\u57df\u306e\u30b5\u30a4\u30ba\u3067\u3059\u3002 gpu_extra_sz GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306b\u78ba\u4fdd\u3055\u308c\u305f\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u7528\u306e\u9818\u57df\u306e\u30b5\u30a4\u30ba\u3067\u3059\u3002 redo_write_ts REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u3092\u6700\u5f8c\u306b\u66f4\u65b0\u3057\u305f\u6642\u523b\u3067\u3059\u3002 redo_write_nitems REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u6570\u3067\u3059\u3002 redo_write_pos REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u30d0\u30a4\u30c8\u6570\u3067\u3059\u3002 redo_read_nitems REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u304b\u3089\u8aad\u307f\u51fa\u3057\u3001GPU\u306b\u9069\u7528\u3055\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u6570\u3067\u3059\u3002 redo_read_pos REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u304b\u3089\u8aad\u307f\u51fa\u3057\u3001GPU\u306b\u9069\u7528\u3055\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u30d0\u30a4\u30c8\u6570\u3067\u3059\u3002 redo_sync_pos REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305fREDO\u30ed\u30b0\u306e\u3046\u3061\u3001\u65e2\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3078\u306e\u9069\u7528\u3092\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u305f\u4f4d\u7f6e\u3067\u3059\u3002 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306e\u6b8b\u308a\u5bb9\u91cf\u304c\u903c\u8feb\u3057\u3066\u304d\u305f\u969b\u306b\u3001\u591a\u6570\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u540c\u6642\u306b\u975e\u540c\u671f\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u767a\u751f\u3055\u305b\u308b\u4e8b\u3092\u907f\u3051\u308b\u305f\u3081\u3001\u5185\u90e8\u7684\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002 config_options GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u6587\u5b57\u5217\u3067\u3059\u3002","title":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u72b6\u614b\u3092\u78ba\u8a8d\u3059\u308b"},{"location":"gpucache/#gpu_5","text":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306b max_num_rows \u3067\u6307\u5b9a\u3057\u305f\u4ee5\u4e0a\u306e\u884c\u6570\u3092\u633f\u5165\u3057\u3088\u3046\u3068\u3057\u305f\u308a\u3001\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u306e\u30d0\u30c3\u30d5\u30a1\u9577\u304c\u80a5\u5927\u5316\u3057\u3059\u304e\u305f\u308a\u3001 \u3068\u3044\u3063\u305f\u7406\u7531\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306bREDO\u30ed\u30b0\u3092\u9069\u7528\u3067\u304d\u306a\u304b\u3063\u305f\u5834\u5408\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u7834\u640d\uff08corrupted\uff09\u72b6\u614b\u306b\u79fb\u884c\u3057\u307e\u3059\u3002 \u4e00\u5ea6GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u7834\u640d\u3059\u308b\u3068\u3001\u3053\u308c\u3092\u624b\u52d5\u3067\u5fa9\u65e7\u3059\u308b\u307e\u3067\u306f\u3001\u691c\u7d22/\u5206\u6790\u7cfb\u306e\u30af\u30a8\u30ea\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u53c2\u7167\u3059\u308b\u4e8b\u306f\u306a\u304f\u306a\u308a\u3001 \u307e\u305f\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u66f4\u65b0\u306b\u969b\u3057\u3066\u3082REDO\u30ed\u30b0\u306e\u8a18\u9332\u3092\u884c\u308f\u306a\u304f\u306a\u308a\u307e\u3059\u3002 \uff08\u904b\u60aa\u304f\u3001\u691c\u7d22/\u5206\u6790\u7cfb\u306e\u30af\u30a8\u30ea\u304c\u5b9f\u884c\u3092\u958b\u59cb\u3057\u305f\u5f8c\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u7834\u640d\u3057\u305f\u5834\u5408\u3001\u305d\u306e\u30af\u30a8\u30ea\u306f\u30a8\u30e9\u30fc\u3092\u8fd4\u3059\u4e8b\u304c\u3042\u308a\u307e\u3059\u3002\uff09 GPU\u30d0\u30c3\u30d5\u30a1\u3092\u7834\u640d\u72b6\u614b\u304b\u3089\u5fa9\u5143\u3059\u308b\u306e\u306f pgstrom.gpucache_recovery(regclass) \u95a2\u6570\u3067\u3059\u3002 REDO\u30ed\u30b0\u3092\u9069\u7528\u3067\u304d\u306a\u304b\u3063\u305f\u539f\u56e0\u3092\u53d6\u308a\u9664\u3044\u305f\u4e0a\u3067\u3053\u306e\u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u518d\u5ea6\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u521d\u671f\u30ed\u30fc\u30c9\u3092\u884c\u3044\u3001\u5143\u306e\u72b6\u614b\u3078\u306e \u5fa9\u65e7\u3092\u8a66\u307f\u307e\u3059\u3002 \u4f8b\u3048\u3070\u3001 max_num_rows \u3067\u6307\u5b9a\u3057\u305f\u4ee5\u4e0a\u306e\u884c\u6570\u3092\u633f\u5165\u3057\u3088\u3046\u3068\u3057\u305f\u5834\u5408\u3067\u3042\u308c\u3070\u3001\u30c8\u30ea\u30ac\u306e\u5b9a\u7fa9\u3092\u5909\u66f4\u3057\u3066 max_num_rows \u8a2d\u5b9a\u3092 \u62e1\u5927\u3059\u308b\u304b\u3001\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u4e00\u90e8\u306e\u884c\u3092\u524a\u9664\u3057\u305f\u5f8c\u3067\u3001 pgstrom.gpucache_recovery() \u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u3068\u3044\u3046\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002","title":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u7834\u640d\u3068\u5fa9\u5143"},{"location":"install/","text":"\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u672c\u7ae0\u3067\u306fPG-Strom\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8 \u30cf\u30fc\u30c9\u30a6\u30a7\u30a2 CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u3092\u52d5\u4f5c\u53ef\u80fd\u306a x86_64 \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u304c\u5fc5\u8981\u3067\u3059\u3002 CPU\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u3001\u304a\u3088\u3073\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30c7\u30d0\u30a4\u30b9\u306b\u306f\u7279\u5225\u306a\u8981\u4ef6\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001 note002:HW Validation List \u306f\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u9078\u5b9a\u306e\u4e0a\u3067\u53c2\u8003\u306b\u306a\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u3092\u5229\u7528\u3059\u308b\u306b\u306fNVME\u898f\u683c\u306b\u5bfe\u5fdc\u3057\u305fSSD\u3001\u307e\u305f\u306fRoCE\u306b\u5bfe\u5fdc\u3057\u305f\u9ad8\u901fNIC\u304c\u5fc5\u8981\u3067\u3001GPU\u3068\u540c\u4e00\u306ePCIe Root Complex\u914d\u4e0b\u306b\u63a5\u7d9a\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 GPU\u30c7\u30d0\u30a4\u30b9 PG-Strom\u3092\u5b9f\u884c\u3059\u308b\u306b\u306f\u5c11\u306a\u304f\u3068\u3082\u4e00\u500b\u306eGPU\u30c7\u30d0\u30a4\u30b9\u304c\u30b7\u30b9\u30c6\u30e0\u4e0a\u306b\u5fc5\u8981\u3067\u3059\u3002\u3053\u308c\u3089\u306fCUDA Toolkit\u3067\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u304a\u308a\u3001computing capability \u304c6.0\u4ee5\u964d\u306e\u30e2\u30c7\u30eb\uff08Pascal\u4e16\u4ee3\u4ee5\u964d\uff09\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 002: HW Validation List - List of supported GPU models \u3092\u53c2\u8003\u306bGPU\u3092\u9078\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 Operating System PG-Strom\u306e\u5b9f\u884c\u306b\u306f\u3001CUDA Toolkit\u306b\u3088\u308a\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308bx86_64\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u5411\u3051\u306eLinux OS\u304c\u5fc5\u8981\u3067\u3059\u3002\u63a8\u5968\u74b0\u5883\u306fRed Hat Enterprise Linux\u307e\u305f\u306fRocky Linux\u30d0\u30fc\u30b8\u30e7\u30f3 8.x\u3067\u3059\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\uff08cuFile\u30c9\u30e9\u30a4\u30d0\uff09\u3092\u5229\u7528\u3059\u308b\u306b\u306f\u3001CUDA Toolkit\u306b\u542b\u307e\u308c\u308bnvidia-fs\u30c9\u30e9\u30a4\u30d0\u3068\u3001Mellanox OFED (OpenFabrics Enterprise Distribution) \u30c9\u30e9\u30a4\u30d0\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u3002 PostgreSQL PG-Strom v5.0\u306e\u5b9f\u884c\u306b\u306fPostgreSQL\u30d0\u30fc\u30b8\u30e7\u30f315\u4ee5\u964d\u304c\u5fc5\u8981\u3067\u3059\u3002 PG-Strom\u304c\u5185\u90e8\u7684\u306b\u5229\u7528\u3057\u3066\u3044\u308bAPI\u306e\u4e2d\u306b\u306f\u3001\u3053\u308c\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u63d0\u4f9b\u3055\u308c\u3066\u3044\u306a\u3044\u3082\u306e\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002 CUDA Toolkit PG-Strom\u306e\u5b9f\u884c\u306b\u306fCUDA Toolkit \u30d0\u30fc\u30b8\u30e7\u30f312.2update2\u4ee5\u964d\u304c\u5fc5\u8981\u3067\u3059\u3002 PG-Strom\u304c\u5185\u90e8\u7684\u306b\u5229\u7528\u3057\u3066\u3044\u308bAPI\u306e\u4e2d\u306b\u306f\u3001\u3053\u308c\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u63d0\u4f9b\u3055\u308c\u3066\u3044\u306a\u3044\u3082\u306e\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002 \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806 \u4e00\u9023\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3068\u306a\u308a\u307e\u3059\u3002 H/W\u306e\u521d\u671f\u8a2d\u5b9a OS\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb MOFED\u30c9\u30e9\u30a4\u30d0\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb CUDA Toolkit \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb HeteroDB\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb PostgreSQL\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb PG-Strom\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb PostgreSQL\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff08\u5fc5\u8981\u306b\u5fdc\u3058\u3066\uff09 PostGIS contrib/cube OS\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u3092\u9078\u629e\u3057\u3001\u500b\u3005\u306e\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30d7\u30ed\u30bb\u30b9\u306b\u5f93\u3063\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4f5c\u696d\u3092\u884c\u3063\u3066\u304f\u3060\u3055\u3044\u3002 CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u306f\u3001 NVIDIA DEVELOPER ZONE \u306b\u304a\u3044\u3066\u7d39\u4ecb\u3055\u308c\u3066\u3044\u307e\u3059\u3002 Red Hat Enterprise Linux 8.x\u7cfb\u5217\uff08Rocky Linux 8.x\u7cfb\u5217\u3092\u542b\u3080\uff09\u306e\u5834\u5408\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u69cb\u6210\u306f\u3001\u30d9\u30fc\u30b9\u74b0\u5883\u3068\u3057\u3066\u300c\u6700\u5c0f\u9650\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u300d\u3092\u9078\u629e\u3057\u3001\u3055\u3089\u306b\u8ffd\u52a0\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3068\u3057\u3066\u300c\u958b\u767a\u30c4\u30fc\u30eb\u300d\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 Red Hat Enterprise Linux 9.x\u7cfb\u5217\uff08Rocky Linux 9.x\u7cfb\u5217\u3092\u542b\u3080\uff09\u306e\u5834\u5408\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u69cb\u6210\u306f\u3001\u30d9\u30fc\u30b9\u74b0\u5883\u3068\u3057\u3066\u300c\u6700\u5c0f\u9650\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u300d\u3092\u9078\u629e\u3057\u3001\u3055\u3089\u306b\u8ffd\u52a0\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3068\u3057\u3066\u300c\u6a19\u6e96\u300d\u300c\u958b\u767a\u30c4\u30fc\u30eb\u300d\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u30b5\u30fc\u30d0\u30fc\u3078\u306eOS\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u3001\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u30fc\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u305f\u3081\u306b\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002 \u306a\u304a\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u3067\u300c\u958b\u767a\u30c4\u30fc\u30eb\u300d\u3092\u9078\u629e\u3057\u306a\u304b\u3063\u305f\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067OS\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u306b\u8ffd\u52a0\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 # dnf groupinstall 'Development Tools' Tip \u30b5\u30fc\u30d0\u306b\u642d\u8f09\u3055\u308c\u3066\u3044\u308bGPU\u304c\u65b0\u3057\u3059\u304e\u308b\u5834\u5408\u3001OS\u8d77\u52d5\u4e2d\u306b\u30af\u30e9\u30c3\u30b7\u30e5\u7b49\u306e\u554f\u984c\u304c\u767a\u751f\u3059\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 \u305d\u306e\u5834\u5408\u3001\u30ab\u30fc\u30cd\u30eb\u8d77\u52d5\u30aa\u30d7\u30b7\u30e7\u30f3\u306b nouveau.modeset=0 \u3092\u8ffd\u52a0\u3057\u3066\u6a19\u6e96\u306e\u30b0\u30e9\u30d5\u30a3\u30c3\u30af\u30b9\u30c9\u30e9\u30a4\u30d0\u3092\u7121\u52b9\u5316\u3059\u308b\u4e8b\u3067 \u554f\u984c\u3092\u56de\u907f\u3067\u304d\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 nouveau\u30c9\u30e9\u30a4\u30d0\u306e\u7121\u52b9\u5316 NVIDIA\u88fdGPU\u5411\u3051\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306e\u4e92\u63db\u30c9\u30e9\u30a4\u30d0\u3067\u3042\u308bnouveau\u30c9\u30e9\u30a4\u30d0\u304c\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001nvidia\u30c9\u30e9\u30a4\u30d0\u3092\u30ed\u30fc\u30c9\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3002 \u3053\u306e\u5834\u5408\u306f\u3001nouveau\u30c9\u30e9\u30a4\u30d0\u306e\u7121\u52b9\u5316\u8a2d\u5b9a\u3092\u884c\u3063\u305f\u4e0a\u3067\u30b7\u30b9\u30c6\u30e0\u3092\u4e00\u5ea6\u518d\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002 nouveau\u30c9\u30e9\u30a4\u30d0\u3092\u7121\u52b9\u5316\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092 /etc/modprobe.d/disable-nouveau.conf \u3068\u3044\u3046\u540d\u524d\u3067\u4fdd\u5b58\u3057\u3001 dracut \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066Linux kernel\u306e\u30d6\u30fc\u30c8\u30a4\u30e1\u30fc\u30b8\u306b\u53cd\u6620\u3057\u307e\u3059\u3002 \u305d\u306e\u5f8c\u3001\u30b7\u30b9\u30c6\u30e0\u3092\u4e00\u5ea6\u518d\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002 # cat > /etc/modprobe.d/disable-nouveau.conf </kernel/drivers/nvme/host/nvme-rdma.ko.xz \uff09\u3067\u306f\u306a\u304f\u3001\u8ffd\u52a0\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f /lib/modules//extra/mlnx-nvme/host/nvme-rdma.ko \u304c\u512a\u5148\u3057\u3066\u4f7f\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002 $ modinfo nvme-rdma filename: /lib/modules/5.14.0-427.18.1.el9_4.x86_64/extra/mlnx-nvme/host/nvme-rdma.ko license: GPL v2 rhelversion: 9.4 srcversion: 16C0049F26768D6EA12771B depends: nvme-core,rdma_cm,ib_core,nvme-fabrics,mlx_compat retpoline: Y name: nvme_rdma vermagic: 5.14.0-427.18.1.el9_4.x86_64 SMP preempt mod_unload modversions parm: register_always:Use memory registration even for contiguous memory regions (bool) \u65e2\u306b\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308b\u30ab\u30fc\u30cd\u30eb\u30e2\u30b8\u30e5\u30fc\u30eb\uff08\u4f8b: nvme \uff09\u3092\u7f6e\u304d\u63db\u3048\u308b\u305f\u3081\u3001\u3053\u3053\u3067\u4e00\u5ea6\u30b7\u30b9\u30c6\u30e0\u306e\u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3\u3068\u518d\u8d77\u52d5\u3092\u884c\u3044\u307e\u3059\u3002 mlnxofedinstall \u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5b8c\u4e86\u5f8c\u306b\u3001 dracut -f \u3092\u5b9f\u884c\u3059\u308b\u306e\u3092\u5fd8\u308c\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002 Tips Linux kernel\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3068MOFED\u30c9\u30e9\u30a4\u30d0 RHEL\u7cfb\u5217\u306e\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u306b\u304a\u3044\u3066\u3001MODED\u30c9\u30e9\u30a4\u30d0\u306fDKMS(Dynamic Kernel Module Support)\u3092\u4f7f\u7528\u3057\u307e\u305b\u3093\u3002 \u305d\u306e\u305f\u3081\u3001Linux kernel\u3092\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3057\u305f\u5834\u5408\u306b\u306f\u3001\u4e0a\u8a18\u306e\u624b\u9806\u3092\u518d\u5ea6\u5b9f\u884c\u3057\u3001\u65b0\u3057\u3044Linux kernel\u306b\u5bfe\u5fdc\u3057\u305fMOFED\u30c9\u30e9\u30a4\u30d0\u3092\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u5f8c\u8ff0\u306eCUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306a\u3069\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u66f4\u65b0\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067Linux kernel\u304c\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u308b\u4e8b\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u305d\u306e\u5834\u5408\u3067\u3082\u540c\u69d8\u3067\u3059\u3002 heterodb-swdc\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb PG-Strom\u307b\u304b\u95a2\u9023\u30d1\u30c3\u30b1\u30fc\u30b8\u306f HeteroDB Software Distribution Center \u304b\u3089\u914d\u5e03\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3092\u5165\u624b\u3059\u308b\u305f\u3081\u306b\u3001HeteroDB-SWDC\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u5b9a\u7fa9\u3092yum\u30b7\u30b9\u30c6\u30e0\u306b\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 HeteroDB-SWDC\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u5b9a\u7fa9\u306fheterodb-swdc\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u3088\u308a\u63d0\u4f9b\u3055\u308c\u307e\u3059\u3002 Web\u30d6\u30e9\u30a6\u30b6\u306a\u3069\u3067 HeteroDB Software Distribution Center \u3078\u30a2\u30af\u30bb\u30b9\u3057\u3001\u30da\u30fc\u30b8\u306e\u5148\u982d\u306b\u30ea\u30f3\u30af\u306e\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b heterodb-swdc-1.3-1.el9.noarch.rpm \u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002\uff08RHEL8\u306e\u5834\u5408\u306f heterodb-swdc-1.3-1.el8.noarch.rpm \uff09 heterodb-swdc\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u308b\u3068\u3001HeteroDB-SWDC\u304b\u3089\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3092\u5165\u624b\u3059\u308b\u305f\u3081\u306eyum\u30b7\u30b9\u30c6\u30e0\u3078\u306e\u8a2d\u5b9a\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306bheterodb-swdc\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 # dnf install https://heterodb.github.io/swdc/yum/rhel8-noarch/heterodb-swdc-1.2-1.el8.noarch.rpm CUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u672c\u7bc0\u3067\u306fCUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u65e2\u306b\u6700\u65b0\u306eCUDA Toolkit\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u3067\u3042\u308b\u5834\u5408\u3001\u672c\u7bc0\u306e\u521d\u671f\u8a2d\u5b9a\u3068\u5408\u81f4\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 NVIDIA\u306fCUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\uff12\u901a\u308a\u306e\u65b9\u6cd5\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002\u4e00\u3064\u306f\u81ea\u5df1\u5b9f\u884c\u578b\u30a2\u30fc\u30ab\u30a4\u30d6\uff08runfile\uff09\u306b\u3088\u308b\u3082\u306e\u3002\u3082\u3046\u4e00\u3064\u306fRPM\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u3088\u308b\u3082\u306e\u3067\u3001PG-Strom\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306b\u306fRPM\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u3088\u308b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u63a8\u5968\u3057\u307e\u3059\u3002 CUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u7528\u30d1\u30c3\u30b1\u30fc\u30b8\u306fNVIDIA DEVELOPER ZONE\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u9069\u5207\u306aOS\u3001\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3001\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u3001\u300erpm(network)\u300f\u7248\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u300erpm(network)\u300f\u3092\u9078\u629e\u3059\u308b\u3068\u3001\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u767b\u9332\u3057\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7d4c\u7531\u3067\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u305f\u3081\u306e\u30b7\u30a7\u30eb\u30b3\u30de\u30f3\u30c9\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u30ac\u30a4\u30c0\u30f3\u30b9\u901a\u308a\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u9032\u3081\u3066\u304f\u3060\u3055\u3044\u3002 # dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo # dnf clean all # dnf install cuda-toolkit-12-5 CUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u7d9a\u3044\u3066\u3001\u30c9\u30e9\u30a4\u30d0\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u305f\u3081\u306e\u30b3\u30de\u30f3\u30c9\u304c\uff12\u7a2e\u985e\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u3053\u3053\u3067\u306f \u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u7248\u306envidia-driver \u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u7248\u306e\u307f\u304cGPUDirect Storage\u6a5f\u80fd\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u304a\u308a\u3001PG-Strom\u306eGPU-Direct SQL\u306f\u672c\u6a5f\u80fd\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002 Tips Volta\u4ee5\u524d\u306eGPU\u306e\u5229\u7528\u306b\u3064\u3044\u3066 \u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u7248nvidia\u30c9\u30e9\u30a4\u30d0\u306f\u3001Volta\u4e16\u4ee3\u4ee5\u524d\u306eGPU\u306b\u306f\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u305b\u3093\u3002 \u3057\u305f\u304c\u3063\u3066\u3001Volta\u307e\u305f\u306fPascal\u4e16\u4ee3\u306eGPU\u3067PG-Strom\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u306f\u3001\u30d7\u30ed\u30d7\u30e9\u30a8\u30bf\u30ea\u7248\u306e\u30c9\u30e9\u30a4\u30d0\u304cGPUDirect Storage\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u308bCUDA 12.2\u3092\u5229\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 CUDA 12.2\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306f \u3053\u3061\u3089 \u304b\u3089\u5165\u624b\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u7d9a\u3044\u3066\u3001GPU-Direct Storage(GDS)\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306e\u30c9\u30e9\u30a4\u30d0\u30e2\u30b8\u30e5\u30fc\u30eb nvidia-gds \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 \u30d1\u30c3\u30b1\u30fc\u30b8\u540d\u306b\u7d9a\u3044\u3066CUDA Toolkit\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u540c\u4e00\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u540d\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 # dnf module install nvidia-driver:open-dkms # dnf install nvidia-gds-12-5 \u6b63\u5e38\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3001 /usr/local/cuda \u914d\u4e0b\u306bCUDA Toolkit\u304c\u5c0e\u5165\u3055\u308c\u3066\u3044\u307e\u3059\u3002 $ ls /usr/local/cuda/ bin/ gds/ nsightee_plugins/ targets/ compute-sanitizer/ include@ nvml/ tools/ CUDA_Toolkit_Release_Notes.txt lib64@ nvvm/ version.json DOCS libnvvp/ README EULA.txt LICENSE share/ extras/ man/ src/ \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001GPU\u304c\u6b63\u3057\u304f\u8a8d\u8b58\u3055\u308c\u3066\u3044\u308b\u4e8b\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 nvidia-smi \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u51fa\u529b\u4f8b\u306e\u3088\u3046\u306b\u3001\u30b7\u30b9\u30c6\u30e0\u306b\u642d\u8f09\u3055\u308c\u3066\u3044\u308bGPU\u306e\u60c5\u5831\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002 $ nvidia-smi Mon Jun 3 09:56:41 2024 +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 555.42.02 Driver Version: 555.42.02 CUDA Version: 12.5 | |-----------------------------------------+------------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+========================+======================| | 0 NVIDIA A100-PCIE-40GB Off | 00000000:41:00.0 Off | 0 | | N/A 58C P0 66W / 250W | 1MiB / 40960MiB | 0% Default | | | | Disabled | +-----------------------------------------+------------------------+----------------------+ +-----------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=========================================================================================| | No running processes found | +-----------------------------------------------------------------------------------------+ GPUDirect Storage\u306e\u78ba\u8a8d \u4e0a\u8a18\u306e\u624b\u9806\u3067CUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3001GPUDirect Storage\u304c\u5229\u7528\u53ef\u80fd\u306a\u72b6\u614b\u3068\u306a\u3063\u3066\u3044\u308b\u306f\u305a\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u901a\u308a\u3001 gdscheck \u30c4\u30fc\u30eb\u3092\u7528\u3044\u3066\u30b9\u30c8\u30ec\u30fc\u30b8\u30c7\u30d0\u30a4\u30b9\u6bce\u306e\u30b3\u30f3\u30d5\u30a3\u30b0\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \uff08\u3053\u306e\u4f8b\u3067\u306f\u3001 nvme \u3060\u3051\u3067\u306a\u304f\u3001 nvme-rdma \u3084 rpcrdma \u30ab\u30fc\u30cd\u30eb\u30e2\u30b8\u30e5\u30fc\u30eb\u3082\u30ed\u30fc\u30c9\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u95a2\u9023\u3059\u308b\u6a5f\u80fd\u304c Supported \u3068\u306a\u3063\u3066\u3044\u307e\u3059\uff09 # /usr/local/cuda/gds/tools/gdscheck -p GDS release version: 1.10.0.4 nvidia_fs version: 2.20 libcufile version: 2.12 Platform: x86_64 ============ ENVIRONMENT: ============ ===================== DRIVER CONFIGURATION: ===================== NVMe : Supported NVMeOF : Supported SCSI : Unsupported ScaleFlux CSD : Unsupported NVMesh : Unsupported DDN EXAScaler : Unsupported IBM Spectrum Scale : Unsupported NFS : Supported BeeGFS : Unsupported WekaFS : Unsupported Userspace RDMA : Unsupported --Mellanox PeerDirect : Disabled --rdma library : Not Loaded (libcufile_rdma.so) --rdma devices : Not configured --rdma_device_status : Up: 0 Down: 0 ===================== CUFILE CONFIGURATION: ===================== properties.use_compat_mode : true properties.force_compat_mode : false properties.gds_rdma_write_support : true properties.use_poll_mode : false properties.poll_mode_max_size_kb : 4 properties.max_batch_io_size : 128 properties.max_batch_io_timeout_msecs : 5 properties.max_direct_io_size_kb : 16384 properties.max_device_cache_size_kb : 131072 properties.max_device_pinned_mem_size_kb : 33554432 properties.posix_pool_slab_size_kb : 4 1024 16384 properties.posix_pool_slab_count : 128 64 32 properties.rdma_peer_affinity_policy : RoundRobin properties.rdma_dynamic_routing : 0 fs.generic.posix_unaligned_writes : false fs.lustre.posix_gds_min_kb: 0 fs.beegfs.posix_gds_min_kb: 0 fs.weka.rdma_write_support: false fs.gpfs.gds_write_support: false profile.nvtx : false profile.cufile_stats : 0 miscellaneous.api_check_aggressive : false execution.max_io_threads : 4 execution.max_io_queue_depth : 128 execution.parallel_io : true execution.min_io_threshold_size_kb : 8192 execution.max_request_parallelism : 4 properties.force_odirect_mode : false properties.prefer_iouring : false ========= GPU INFO: ========= GPU index 0 NVIDIA A100-PCIE-40GB bar:1 bar size (MiB):65536 supports GDS, IOMMU State: Disabled ============== PLATFORM INFO: ============== IOMMU: disabled Nvidia Driver Info Status: Supported(Nvidia Open Driver Installed) Cuda Driver Version Installed: 12050 Platform: AS -2014CS-TR, Arch: x86_64(Linux 5.14.0-427.18.1.el9_4.x86_64) Platform verification succeeded Tips RAID\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306e\u8ffd\u52a0\u8a2d\u5b9a GPUDirect Storage\u3092\u5229\u7528\u3057\u3066Software RAID (md-raid0) \u533a\u753b\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u3059\u5834\u5408\u3001 \u4ee5\u4e0b\u306e\u4e00\u884c\u3092 /lib/udev/rules.d/63-md-raid-arrays.rules \u8a2d\u5b9a\u306b\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 IMPORT{\u200bprogram}=\"/usr/sbin/mdadm --detail --export $devnode\" \u305d\u306e\u5f8c\u3001\u8a2d\u5b9a\u3092\u53cd\u6620\u3055\u305b\u308b\u305f\u3081\u306b\u30b7\u30b9\u30c6\u30e0\u3092\u518d\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u8a73\u3057\u304f\u306f NVIDIA GPUDirect Storage Installation and Troubleshooting Guide \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 PCI Bar1\u30e1\u30e2\u30ea\u306e\u8a2d\u5b9a GPU-Direct SQL\u306f\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u3092\u30db\u30b9\u30c8\u30b7\u30b9\u30c6\u30e0\u4e0a\u306ePCI BAR1\u9818\u57df\uff08\u7269\u7406\u30a2\u30c9\u30ec\u30b9\u7a7a\u9593\uff09\u306b\u30de\u30c3\u30d7\u3057\u3001\u305d\u3053\u3092Destination\u3068\u3059\u308bP2P-RDMA\u8981\u6c42\u3092NVME\u6a5f\u5668\u306b\u5bfe\u3057\u3066\u884c\u3046\u4e8b\u3067\u3001\u30ed\u30b9\u306e\u306a\u3044\u9ad8\u901f\u306a\u30c7\u30fc\u30bf\u8aad\u51fa\u3057\u3092\u5b9f\u73fe\u3057\u307e\u3059\u3002 \u5341\u5206\u306a\u591a\u91cd\u5ea6\u3092\u6301\u3063\u305fP2P-RDMA\u3092\u884c\u3046\u306b\u306f\u3001GPU\u304c\u30d0\u30c3\u30d5\u30a1\u3092\u30de\u30c3\u30d7\u3059\u308b\u306e\u306b\u5341\u5206\u306aPCI BAR1\u9818\u57df\u3092\u6709\u3057\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u5927\u534a\u306eGPU\u3067\u306fPCI BAR1\u9818\u57df\u306e\u5927\u304d\u3055\u306f\u56fa\u5b9a\u3067\u3001PG-Strom\u306b\u304a\u3044\u3066\u306f\u3001\u305d\u308c\u304cGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u30b5\u30a4\u30ba\u3092\u4e0a\u56de\u3063\u3066\u3044\u308b\u88fd\u54c1\u3092\u63a8\u5968\u3057\u3066\u3044\u307e\u3059\u3002 \u3057\u304b\u3057\u3001\u4e00\u90e8\u306eGPU\u88fd\u54c1\u306b\u304a\u3044\u3066\u306f\u300e\u52d5\u4f5c\u30e2\u30fc\u30c9\u300f\u3092\u5207\u308a\u66ff\u3048\u308b\u4e8b\u3067PCI BAR1\u9818\u57df\u306e\u30b5\u30a4\u30ba\u3092\u5207\u308a\u66ff\u3048\u308b\u4e8b\u304c\u3067\u304d\u308b\u3082\u306e\u304c\u5b58\u5728\u3057\u307e\u3059\u3002\u304a\u4f7f\u3044\u306eGPU\u304c\u305d\u308c\u306b\u8a72\u5f53\u3059\u308b\u5834\u5408\u306f\u3001 NVIDIA Display Mode Selector Tool \u3092\u53c2\u7167\u306e\u4e0a\u3001PCI BAR1\u9818\u57df\u306e\u30b5\u30a4\u30ba\u3092\u6700\u5927\u5316\u3059\u308b\u30e2\u30fc\u30c9\u3078\u3068\u5207\u308a\u66ff\u3048\u3066\u304f\u3060\u3055\u3044\u3002 2023\u5e7412\u6708\u6642\u70b9\u3067\u306f\u3001\u4ee5\u4e0b\u306eGPU\u306e\u5834\u5408\u306bNVIDIA Display Mode Selector Tool\u3092\u5229\u7528\u3057\u3066 *Display Off \u30e2\u30fc\u30c9\u3078\u3068\u5207\u308a\u66ff\u3048\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 NVIDIA L40S NVIDIA L40 NVIDIA A40 NVIDIA RTX 6000 Ada NVIDIA RTX A6000 NVIDIA RTX A5500 NVIDIA RTX A5000 \u30b7\u30b9\u30c6\u30e0\u306b\u642d\u8f09\u3055\u308c\u3066\u3044\u308bGPU\u306e\u30e1\u30e2\u30ea\u30b5\u30a4\u30ba\u3084PCI BAR1\u30b5\u30a4\u30ba\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306f\u3001 nvidia-smi -q \u30b3\u30de\u30f3\u30c9\u3092\u5229\u7528\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u30e1\u30e2\u30ea\u95a2\u9023\u306e\u72b6\u614b\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002 $ nvidia-smi -q : FB Memory Usage Total : 46068 MiB Reserved : 685 MiB Used : 4 MiB Free : 45377 MiB BAR1 Memory Usage Total : 65536 MiB Used : 1 MiB Free : 65535 MiB : HeteroDB \u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb heterodb-extra \u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u3001PG-Strom\u306b\u4ee5\u4e0b\u306e\u6a5f\u80fd\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002 \u30de\u30eb\u30c1GPU\u306e\u5bfe\u5fdc GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5bfe\u5fdc \u30e9\u30a4\u30bb\u30f3\u30b9\u7ba1\u7406\u6a5f\u80fd \u3053\u308c\u3089\u306e\u6a5f\u80fd\u3092\u4f7f\u7528\u305b\u305a\u3001\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u7248\u306e\u6a5f\u80fd\u306e\u307f\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f heterodb-extra \u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u4e0d\u8981\u3067\u3059\u3002 \u672c\u7bc0\u306e\u5185\u5bb9\u306f\u8aad\u307f\u98db\u3070\u3057\u3066\u69cb\u3044\u307e\u305b\u3093\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001SWDC\u304b\u3089 heterodb-extra \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002 # dnf install heterodb-extra \u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u6709\u52b9\u5316 heterodb-extra \u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u5168\u3066\u306e\u6a5f\u80fd\u3092\u5229\u7528\u3059\u308b\u306b\u306f\u3001HeteroDB\u793e\u304c\u63d0\u4f9b\u3059\u308b\u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u6709\u52b9\u5316\u304c\u5fc5\u8981\u3067\u3059\u3002\u30e9\u30a4\u30bb\u30f3\u30b9\u306a\u3057\u3067\u904b\u7528\u3059\u308b\u4e8b\u3082\u53ef\u80fd\u3067\u3059\u304c\u3001\u305d\u306e\u5834\u5408\u3001\u4e0b\u8a18\u306e\u6a5f\u80fd\u304c\u5236\u9650\u3092\u53d7\u3051\u307e\u3059\u3002 \u30de\u30eb\u30c1GPU\u306e\u5229\u7528 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u306b\u304a\u3051\u308b\u8907\u6570NVME-SSD\u306b\u3088\u308b\u30b9\u30c8\u30e9\u30a4\u30d4\u30f3\u30b0(md-raid0) GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u306b\u304a\u3051\u308bNVME-oF\u30c7\u30d0\u30a4\u30b9\u306e\u5229\u7528 GPU\u7248PostGIS\u306b\u304a\u3051\u308bGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u5229\u7528 \u30e9\u30a4\u30bb\u30f3\u30b9\u30d5\u30a1\u30a4\u30eb\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5f62\u5f0f\u3067HeteroDB\u793e\u304b\u3089\u5165\u624b\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 IAgIVdKxhe+BSer3Y67jQW0+uTzYh00K6WOSH7xQ26Qcw8aeUNYqJB9YcKJTJb+QQhjmUeQpUnboNxVwLCd3HFuLXeBWMKp11/BgG0FSrkUWu/ZCtDtw0F1hEIUY7m767zAGV8y+i7BuNXGJFvRlAkxdVO3/K47ocIgoVkuzBfLvN/h9LffOydUnHPzrFHfLc0r3nNNgtyTrfvoZiXegkGM9GBTAKyq8uWu/OGonh9ybzVKOgofhDLk0rVbLohOXDhMlwDl2oMGIr83tIpCWG+BGE+TDwsJ4n71Sv6n4bi/ZBXBS498qShNHDGrbz6cNcDVBa+EuZc6HzZoF6UrljEcl= ---- VERSION:2 SERIAL_NR:HDB-TRIAL ISSUED_AT:2019-05-09 EXPIRED_AT:2019-06-08 GPU_UUID:GPU-a137b1df-53c9-197f-2801-f2dccaf9d42f \u3053\u308c\u3092 /etc/heterodb.license \u306b\u30b3\u30d4\u30fc\u3057\u3001PostgreSQL\u3092\u518d\u8d77\u52d5\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306bPostgreSQL\u306e\u8d77\u52d5\u30ed\u30b0\u306b\u30e9\u30a4\u30bb\u30f3\u30b9\u60c5\u5831\u304c\u51fa\u529b\u3055\u308c\u3001\u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u6709\u52b9\u5316\u304c\u884c\u308f\u308c\u305f\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 : LOG: HeteroDB Extra module loaded [api_version=20231105,cufile=on,nvme_strom=off,githash=9ca2fe4d2fbb795ad2d741dcfcb9f2fe499a5bdf] LOG: HeteroDB License: { \"version\" : 2, \"serial_nr\" : \"HDB-TRIAL\", \"issued_at\" : \"2022-11-19\", \"expired_at\" : \"2099-12-31\", \"nr_gpus\" : 1, \"gpus\" : [ { \"uuid\" : \"GPU-13943bfd-5b30-38f5-0473-78979c134606\" } ]} LOG: PG-Strom version 5.0.1 built for PostgreSQL 15 (githash: 972441dbafed6679af86af40bc8613be2d73c4fd) : PostgreSQL\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u672c\u7bc0\u3067\u306fRPM\u306b\u3088\u308bPostgreSQL\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002 \u30bd\u30fc\u30b9\u304b\u3089\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u95a2\u3057\u3066\u306f\u65e2\u306b\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u304c\u6570\u591a\u304f\u5b58\u5728\u3057\u3001 ./configure \u30b9\u30af\u30ea\u30d7\u30c8\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u591a\u5c90\u306b\u308f\u305f\u308b\u4e8b\u304b\u3089\u3001\u3053\u3053\u3067\u306f\u7d39\u4ecb\u3057\u307e\u305b\u3093\u3002 Linux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u306e\u914d\u5e03\u3059\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u3082PostgreSQL\u306f\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u5fc5\u305a\u3057\u3082\u6700\u65b0\u3067\u306f\u306a\u304f\u3001PG-Strom\u306e\u5bfe\u5fdc\u30d0\u30fc\u30b8\u30e7\u30f3\u3088\u308a\u3082\u53e4\u3044\u3082\u306e\u3067\u3042\u308b\u4e8b\u304c\u591a\u3005\u3042\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001Red Hat Enterprise Linux 7.x\u3067\u914d\u5e03\u3055\u308c\u3066\u3044\u308bPostgreSQL\u306fv9.2.x\u3067\u3059\u304c\u3001\u3053\u308c\u306fPostgreSQL\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u3068\u3057\u3066\u65e2\u306bEOL\u3068\u306a\u3063\u3066\u3044\u308b\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u3059\u3002 PostgreSQL Global Development Group\u306f\u3001\u6700\u65b0\u306ePostgreSQL\u304a\u3088\u3073\u95a2\u9023\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u914d\u5e03\u306e\u305f\u3081\u306byum\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002 EPEL\u306e\u8a2d\u5b9a\u306e\u3088\u3046\u306b\u3001yum\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8a2d\u5b9a\u3092\u884c\u3046\u3060\u3051\u306e\u5c0f\u3055\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001\u305d\u306e\u5f8c\u3001PostgreSQL\u3084\u305d\u306e\u4ed6\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 yum\u30ea\u30dd\u30b8\u30c8\u30ea\u5b9a\u7fa9\u306e\u4e00\u89a7\u306f http://yum.postgresql.org/repopackages.php \u3067\u3059\u3002 PostgreSQL\u30e1\u30b8\u30e3\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u3068Linux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u3054\u3068\u306b\u591a\u304f\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u5b9a\u7fa9\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u3042\u306a\u305f\u306eLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u5411\u3051\u306ePostgreSQL 15\u4ee5\u964d\u306e\u3082\u306e\u3092\u9078\u629e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u30b9\u30c6\u30c3\u30d7\u3067 PostgreSQL \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u884c\u3044\u307e\u3059\u3002 yum\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u5b9a\u7fa9\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb OS\u6a19\u6e96\u306ePostgreSQL\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u7121\u52b9\u5316 PostgreSQL\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u4f8b\u3048\u3070PostgreSQL v16\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001PG-Strom\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u306f postgresql16-server \u304a\u3088\u3073 postgresql16-devel \u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u5fc5\u8981\u3067\u3059\u3002 \u4ee5\u4e0b\u306f\u3001RHEL9\u306b\u304a\u3044\u3066PostgreSQL v16\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u624b\u9806\u306e\u4f8b\u3067\u3059\u3002 # dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm # dnf -y module disable postgresql # dnf install -y postgresql16-devel postgresql16-server Note Red Hat Enterprise Linux\u306e\u5834\u5408\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u540d postgresql \u304c\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u6a19\u6e96\u306e\u3082\u306e\u3068\u7af6\u5408\u3057\u3066\u3057\u307e\u3044\u3001PGDG\u63d0\u4f9b\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3002\u305d\u306e\u305f\u3081\u3001 dnf -y module disable postgresql \u30b3\u30de\u30f3\u30c9\u3092\u7528\u3044\u3066\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u6a19\u6e96\u306e postgresql \u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u7121\u52b9\u5316\u3057\u307e\u3059\u3002 PG-Strom\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u672c\u7bc0\u3067\u306fPG-Strom\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u63a8\u5968\u306fRPM\u306b\u3088\u308b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u3059\u304c\u3001\u958b\u767a\u8005\u5411\u3051\u306b\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304b\u3089\u306e\u30d3\u30eb\u30c9\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3082\u7d39\u4ecb\u3057\u307e\u3059\u3002 RPM\u306b\u3088\u308b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb PG-Strom\u304a\u3088\u3073\u95a2\u9023\u30d1\u30c3\u30b1\u30fc\u30b8\u306f HeteroDB Software Distribution Center \u3088\u308a\u914d\u5e03\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u65e2\u306byum\u30b7\u30b9\u30c6\u30e0\u3078\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8ffd\u52a0\u6e08\u307f\u3067\u3042\u308c\u3070\u3001\u305d\u308c\u307b\u3069\u4f5c\u696d\u306f\u591a\u304f\u3042\u308a\u307e\u305b\u3093\u3002 \u57fa\u76e4\u3068\u306a\u308bPostgreSQL\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3054\u3068\u306b\u5225\u500b\u306ePG-Strom\u306eRPM\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u6e96\u5099\u3055\u308c\u3066\u304a\u308a\u3001PostgreSQL v15\u7528\u3067\u3042\u308c\u3070 pg_strom-PG15 \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u3001PostgreSQL v16\u7528\u3067\u3042\u308c\u3070 pg_strom-PG16 \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u3001PostgreSQL\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30d0\u30a4\u30ca\u30ea\u4e92\u63db\u6027\u306b\u4f34\u3046\u5236\u7d04\u3067\u3059\u3002 # dnf install -y pg_strom-PG16 \u4ee5\u4e0a\u3067\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u5b8c\u4e86\u3067\u3059\u3002 \u30bd\u30fc\u30b9\u304b\u3089\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u958b\u767a\u8005\u5411\u3051\u306b\u3001\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304b\u3089PG-Strom\u3092\u30d3\u30eb\u30c9\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3082\u7d39\u4ecb\u3057\u307e\u3059\u3002 \u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u5165\u624b RPM\u30d1\u30c3\u30b1\u30fc\u30b8\u3068\u540c\u69d8\u306b\u3001\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306etarball\u3092 HeteroDB Software Distribution Center \u304b\u3089\u5165\u624b\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u305f\u3060\u3001tarball\u306e\u30ea\u30ea\u30fc\u30b9\u306b\u306f\u3042\u308b\u7a0b\u5ea6\u306e\u30bf\u30a4\u30e0\u30e9\u30b0\u304c\u751f\u3058\u3066\u3057\u307e\u3046\u305f\u3081\u3001\u6700\u65b0\u306e\u958b\u767a\u7248\u3092\u4f7f\u3044\u305f\u3044\u5834\u5408\u306b\u306f PG-Strom\u306eGitHub\u30ea\u30dd\u30b8\u30c8\u30ea \u306e master \u30d6\u30e9\u30f3\u30c1\u3092\u30c1\u30a7\u30c3\u30af\u30a2\u30a6\u30c8\u3059\u308b\u65b9\u6cd5\u306e\u65b9\u304c\u597d\u307e\u308c\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 $ git clone https://github.com/heterodb/pg-strom.git Cloning into 'pg-strom'... remote: Counting objects: 13797, done. remote: Compressing objects: 100% (215/215), done. remote: Total 13797 (delta 208), reused 339 (delta 167), pack-reused 13400 Receiving objects: 100% (13797/13797), 11.81 MiB | 1.76 MiB/s, done. Resolving deltas: 100% (10504/10504), done. PG-Strom\u306e\u30d3\u30eb\u30c9 PG-Strom\u3092\u30d3\u30eb\u30c9\u3059\u308b\u6642\u306e\u30b3\u30f3\u30d5\u30a3\u30b0\u306f\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u306ePostgreSQL\u3068\u53b3\u5bc6\u306b\u4e00\u81f4\u3057\u3066\u3044\u306a\u3051\u308c\u3070\u3044\u3051\u307e\u305b\u3093\u3002\u4f8b\u3048\u3070\u3001\u540c\u3058\u69cb\u9020\u4f53\u304c\u30d3\u30eb\u30c9\u6642\u306e\u30b3\u30f3\u30d5\u30a3\u30b0\u306b\u3088\u308aPostgreSQL\u3068PG-Strom\u3067\u7570\u306a\u3063\u305f\u30ec\u30a4\u30a2\u30a6\u30c8\u3092\u6301\u3063\u3066\u3057\u307e\u3063\u305f\u3068\u3059\u308c\u3070\u3001\u975e\u5e38\u306b\u767a\u898b\u306e\u96e3\u3057\u3044\u30d0\u30b0\u3092\u751f\u307f\u51fa\u3057\u3066\u3057\u307e\u3046\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 \u3057\u305f\u304c\u3063\u3066\u3001\uff08\u4e00\u8cab\u6027\u306e\u306a\u3044\u72b6\u614b\u3092\u907f\u3051\u308b\u305f\u3081\uff09PG-Strom\u306f\u72ec\u81ea\u306bconfigure\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u8d70\u3089\u305b\u305f\u308a\u306f\u305b\u305a\u3001 pg_config \u3092\u4f7f\u3063\u3066PostgreSQL\u306e\u30d3\u30eb\u30c9\u6642\u8a2d\u5b9a\u3092\u53c2\u7167\u3057\u307e\u3059\u3002 pg_config \u306b\u30d1\u30b9\u304c\u901a\u3063\u3066\u304a\u308a\u3001\u305d\u308c\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u306ePostgreSQL\u306e\u3082\u306e\u3067\u3042\u308c\u3070\u3001\u305d\u306e\u307e\u307e make \u3001 make install \u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 \u76f4\u63a5\u30d1\u30b9\u304c\u901a\u3063\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u3001 make \u30b3\u30de\u30f3\u30c9\u306b PG_CONFIG=... \u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u4e0e\u3048\u3001 pg_config \u306e\u30d5\u30eb\u30d1\u30b9\u3092\u6e21\u3057\u307e\u3059\u3002 $ cd pg-strom/src $ make PG_CONFIG=/usr/pgsql-16/bin/pg_config $ sudo make install PG_CONFIG=/usr/pgsql-16/bin/pg_config \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u306e\u8a2d\u5b9a \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u306e\u4f5c\u6210 \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u306e\u4f5c\u6210\u304c\u6e08\u3093\u3067\u3044\u306a\u3044\u5834\u5408\u306f\u3001 initdb \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066PostgreSQL\u306e\u521d\u671f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 RPM\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u304a\u3051\u308b\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u306e\u30d1\u30b9\u306f /var/lib/pgsql//data \u3067\u3059\u3002 postgresql-alternatives \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001PostgreSQL\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u62e0\u3089\u305a /var/lib/pgdata \u3067\u53c2\u7167\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 # su - postgres $ /usr/pgsql-16/bin/initdb -D /var/lib/pgdata/ The files belonging to this database system will be owned by user \"postgres\". This user must also own the server process. The database cluster will be initialized with locale \"en_US.UTF-8\". The default database encoding has accordingly been set to \"UTF8\". The default text search configuration will be set to \"english\". Data page checksums are disabled. fixing permissions on existing directory /var/lib/pgdata ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... Asia/Tokyo creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok initdb: warning: enabling \"trust\" authentication for local connections You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb. Success. You can now start the database server using: pg_ctl -D /var/lib/pgdata/ -l logfile start postgresql.conf\u306e\u7de8\u96c6 \u7d9a\u3044\u3066\u3001PostgreSQL\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3067\u3042\u308b postgresql.conf \u3092\u7de8\u96c6\u3057\u307e\u3059\u3002 PG-Strom\u3092\u52d5\u4f5c\u3055\u305b\u308b\u305f\u3081\u306b\u306f\u3001\u6700\u4f4e\u9650\u3001\u4ee5\u4e0b\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u8a2d\u5b9a\u304c\u5fc5\u8981\u3067\u3059\u3002 \u3053\u308c\u4ee5\u5916\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3064\u3044\u3066\u3082\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u7528\u9014\u3084\u60f3\u5b9a\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u8e0f\u307e\u3048\u3066\u691c\u8a0e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 shared_preload_libraries PG-Strom\u30e2\u30b8\u30e5\u30fc\u30eb\u306f shared_preload_libraries \u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3088\u308apostmaster\u30d7\u30ed\u30bb\u30b9\u306e\u8d77\u52d5\u6642\u306b\u30ed\u30fc\u30c9\u3055\u308c\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u30aa\u30f3\u30c7\u30de\u30f3\u30c9\u3067\u306e\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30ed\u30fc\u30c9\u306f\u30b5\u30dd\u30fc\u30c8\u5bfe\u8c61\u5916\u3067\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u9805\u76ee\u306f\u5fc5\u9808\u3067\u3059\u3002 shared_preload_libraries = '$libdir/pg_strom' max_worker_processes PG-Strom\u306f\u6570\u500b\u306e\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u3092\u5185\u90e8\u7684\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3067\u3042\u308b 8 \u3067\u306f\u3001\u305d\u308c\u4ee5\u5916\u306e\u51e6\u7406\u306b\u5229\u7528\u3067\u304d\u308b\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\u6570\u304c\u3042\u307e\u308a\u306b\u3082\u5c11\u306a\u3059\u304e\u3066\u3057\u307e\u3044\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u3042\u308b\u7a0b\u5ea6\u306e\u4f59\u88d5\u3092\u6301\u3063\u305f\u5024\u3092\u8a2d\u5b9a\u3059\u3079\u304d\u3067\u3059\u3002 max_worker_processes = 100 shared_buffers \u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u3088\u308a\u307e\u3059\u304c\u3001 shared_buffers \u306e\u521d\u671f\u8a2d\u5b9a\u306f\u975e\u5e38\u306b\u5c0f\u3055\u3044\u305f\u3081\u3001PG-Strom\u304c\u6709\u52b9\u306b\u6a5f\u80fd\u3059\u308b\u6c34\u6e96\u306e\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\u306b\u5bfe\u3057\u3066\u306f\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u3078\u306e\u8aad\u307f\u66f8\u304d\u304c\u5f8b\u901f\u8981\u56e0\u3068\u306a\u3063\u3066\u3057\u307e\u3044\u3001GPU\u306e\u4e26\u5217\u8a08\u7b97\u6a5f\u80fd\u3092\u6709\u52b9\u306b\u5229\u7528\u3067\u304d\u306a\u3044\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u3042\u308b\u7a0b\u5ea6\u306e\u4f59\u88d5\u3092\u6301\u3063\u305f\u5024\u3092\u8a2d\u5b9a\u3059\u3079\u304d\u3067\u3059\u3002 shared_buffers = 10GB \u660e\u3089\u304b\u306b\u30e1\u30e2\u30ea\u30b5\u30a4\u30ba\u3088\u308a\u3082\u5927\u304d\u306a\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u306f\u3001SSD-to-GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306e\u5229\u7528\u3092\u691c\u8a0e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 work_mem \u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u3088\u308a\u307e\u3059\u304c\u3001 work_mem \u306e\u521d\u671f\u8a2d\u5b9a\u306f\u975e\u5e38\u306b\u5c0f\u3055\u3044\u305f\u3081\u3001\u89e3\u6790\u7cfb\u30af\u30a8\u30ea\u3067\u6700\u9069\u306a\u30af\u30a8\u30ea\u5b9f\u884c\u8a08\u753b\u304c\u9078\u629e\u3055\u308c\u306a\u3044\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 \u5178\u578b\u7684\u306a\u4f8b\u306f\u3001\u30bd\u30fc\u30c8\u51e6\u7406\u306b\u30aa\u30f3\u30e1\u30e2\u30ea\u306e\u30af\u30a4\u30c3\u30af\u30bd\u30fc\u30c8\u3067\u306f\u306a\u304f\u3001\u30c7\u30a3\u30b9\u30af\u30d9\u30fc\u30b9\u306e\u30de\u30fc\u30b8\u30bd\u30fc\u30c8\u3092\u9078\u629e\u3059\u308b\u3068\u3044\u3063\u305f\u3082\u306e\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u3042\u308b\u7a0b\u5ea6\u306e\u4f59\u88d5\u3092\u6301\u3063\u305f\u5024\u3092\u8a2d\u5b9a\u3059\u3079\u304d\u3067\u3059\u3002 work_mem = 1GB OS\u306e\u30ea\u30bd\u30fc\u30b9\u5236\u9650\u306e\u62e1\u5f35 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u7279\u306b\u3001\u540c\u6642\u306b\u5927\u91cf\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30aa\u30fc\u30d7\u30f3\u3059\u308b\u4e8b\u304c\u3042\u308b\u305f\u3081\u3001\u30d7\u30ed\u30bb\u30b9\u3042\u305f\u308a\u30d5\u30a1\u30a4\u30eb\u30c7\u30a3\u30b9\u30af\u30ea\u30d7\u30bf\u6570\u306e\u4e0a\u9650\u3092\u62e1\u5927\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u307e\u305f\u3001PostgreSQL\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u6642\u306b\u78ba\u5b9f\u306b\u30b3\u30a2\u30c0\u30f3\u30d7\u3092\u751f\u6210\u3067\u304d\u308b\u3088\u3046\u3001\u30b3\u30a2\u30d5\u30a1\u30a4\u30eb\u306e\u30b5\u30a4\u30ba\u4e0a\u9650\u3092\u5236\u9650\u3057\u306a\u3044\u3053\u3068\u3092\u63a8\u5968\u3057\u307e\u3059\u3002 PostgreSQL\u3092systemd\u7d4c\u7531\u3067\u8d77\u52d5\u3059\u308b\u5834\u5408\u3001\u30ea\u30bd\u30fc\u30b9\u5236\u9650\u306b\u95a2\u3059\u308b\u8a2d\u5b9a\u306f /etc/systemd/system/postgresql-XX.service.d/pg_strom.conf \u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002 RPM\u306b\u3088\u308b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u5834\u5408\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u4ee5\u4e0b\u306e\u5185\u5bb9\u304c\u8a2d\u5b9a\u3055\u308c\u307e\u3059\u3002 \u74b0\u5883\u5909\u6570 CUDA_ENABLE_COREDUMP_ON_EXCEPTION \u306b\u95a2\u3059\u308b\u8a2d\u5b9a\u304c\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u958b\u767a\u8005\u5411\u3051\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3001\u3053\u308c\u3092\u6709\u52b9\u306b\u3057\u3066\u8d77\u52d5\u3059\u308b\u3068\u3001GPU\u5074\u3067\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u306bGPU\u306e\u30b3\u30a2\u30c0\u30f3\u30d7\u3092\u751f\u6210\u3055\u305b\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002\u8a73\u3057\u304f\u306f CUDA-GDB:GPU core dump support \u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002 [Service] LimitNOFILE=65536 LimitCORE=infinity #Environment=CUDA_ENABLE_COREDUMP_ON_EXCEPTION=1 PostgreSQL\u306e\u8d77\u52d5 PostgreSQL\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002 \u6b63\u5e38\u306b\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u304c\u5b8c\u4e86\u3057\u3066\u3044\u308c\u3070\u3001\u30ed\u30b0\u306bPG-Strom\u304cGPU\u3092\u8a8d\u8b58\u3057\u305f\u4e8b\u3092\u793a\u3059\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8a18\u9332\u3055\u308c\u3066\u3044\u308b\u306f\u305a\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u3067\u306f\u3001NVIDIA A100 (PCIE\u7248; 40GB) \u3092\u8a8d\u8b58\u3057\u3066\u304a\u308a\u3001\u307e\u305f\u3001NVME-SSD\u3054\u3068\u306b\u8fd1\u508d\u306eGPU\u304c\u3069\u3061\u3089\u3067\u3042\u308b\u306e\u304b\u51fa\u529b\u3055\u308c\u3066\u3044\u307e\u3059\u3002 # systemctl start postgresql-16 # journalctl -u postgresql-16 Jun 02 17:28:45 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:45.989 JST [20242] LOG: HeteroDB Extra module loaded [api_version=20240418,cufile=off,nvme_strom=off,githash=3ffc65428c07bb3c9d0e5c75a2973389f91dfcd4] Jun 02 17:28:45 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:45.989 JST [20242] LOG: HeteroDB License: { \"version\" : 2, \"serial_nr\" : \"HDB-TRIAL\", \"issued_at\" : \"2024-06-02\", \"expired_at\" : \"2099-12-31\", \"nr_gpus\" : 1, \"gpus\" : [ { \"uuid\" : \"GPU-13943bfd-5b30-38f5-0473-78979c134606\" } ]} Jun 02 17:28:45 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:45.989 JST [20242] LOG: PG-Strom version 5.12.el9 built for PostgreSQL 16 (githash: ) Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.114 JST [20242] LOG: PG-Strom binary built for CUDA 12.4 (CUDA runtime 12.5) Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.114 JST [20242] WARNING: The CUDA version where this PG-Strom module binary was built for (12.4) is newer than the CUDA runtime version on this platform (12.5). It may lead unexpected behavior, and upgrade of CUDA toolkit is recommended. Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.114 JST [20242] LOG: PG-Strom: GPU0 NVIDIA A100-PCIE-40GB (108 SMs; 1410MHz, L2 40960kB), RAM 39.50GB (5120bits, 1.16GHz), PCI-E Bar1 64GB, CC 8.0 Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:41:00:0] GPU0 (NVIDIA A100-PCIE-40GB; GPU-13943bfd-5b30-38f5-0473-78979c134606) Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:81:00:0] nvme6 (NGD-IN2500-080T4-C) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:82:00:0] nvme3 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:c2:00:0] nvme1 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:c6:00:0] nvme4 (Corsair MP600 CORE) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:c3:00:0] nvme5 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:c1:00:0] nvme0 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:c4:00:0] nvme2 (NGD-IN2500-080T4-C) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.217 JST [20242] LOG: redirecting log output to logging collector process Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.217 JST [20242] HINT: Future log output will appear in directory \"log\". Jun 02 17:28:48 buri.heterodb.com systemd[1]: Started PostgreSQL 16 database server. PG-Strom\u30a8\u30af\u30b9\u30c6\u30f3\u30b7\u30e7\u30f3\u306e\u4f5c\u6210 \u6700\u5f8c\u306b\u3001PG-Strom\u306b\u95a2\u9023\u3059\u308bSQL\u95a2\u6570\u306a\u3069\u306eDB\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \u3053\u306e\u624b\u9806\u306fPostgreSQL\u306eEXTENSION\u6a5f\u80fd\u3092\u7528\u3044\u3066\u30d1\u30c3\u30b1\u30fc\u30b8\u5316\u3055\u308c\u3066\u304a\u308a\u3001SQL\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067 CREATE EXTENSION \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3060\u3051\u3067\u3059\u3002 \u306a\u304a\u3001\u3053\u306e\u624b\u9806\u306f\u65b0\u3057\u3044\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3059\u308b\u305f\u3073\u306b\u5fc5\u8981\u306b\u306a\u308b\u4e8b\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u65b0\u3057\u3044\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u305f\u6642\u70b9\u3067\u65e2\u306bPG-Strom\u95a2\u9023\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u4f5c\u6210\u3055\u308c\u3066\u3044\u3066\u307b\u3057\u3044\u5834\u5408\u306f\u3001\u4e88\u3081 template1 \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067PG-Strom\u30a8\u30af\u30b9\u30c6\u30f3\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3057\u3066\u304a\u3051\u3070\u3001 CREATE DATABASE \u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u6642\u306b\u65b0\u3057\u3044\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3078\u8a2d\u5b9a\u304c\u30b3\u30d4\u30fc\u3055\u308c\u307e\u3059\u3002 $ psql -U postgres psql (16.3) Type \"help\" for help. postgres=# CREATE EXTENSION pg_strom ; CREATE EXTENSION \u4ee5\u4e0a\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4f5c\u696d\u306f\u5b8c\u4e86\u3067\u3059\u3002 PostGIS\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb PG-Strom\u306f\u4e00\u90e8\u306ePostGIS\u95a2\u6570\u306eGPU\u51e6\u7406\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002 \u672c\u7bc0\u3067\u306fPostGIS\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u306b\u3064\u3044\u3066\u8aac\u660e\u3092\u884c\u3044\u307e\u3059\u304c\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u8aad\u307f\u98db\u3070\u3057\u3066\u304f\u3060\u3055\u3044\u3002 PostgreSQL\u3068\u540c\u69d8\u306b\u3001PostgreSQL Global Development Group\u306eyum\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089PostGIS\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001PostgreSQL v16\u5411\u3051\u306b\u30d3\u30eb\u30c9\u3055\u308c\u305fPostGIS v3.4\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3082\u306e\u3067\u3059\u3002 # dnf install postgis34_16 \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u3092\u4f5c\u6210\u3057\u3066PostgreSQL\u30b5\u30fc\u30d0\u3092\u8d77\u52d5\u3057\u3001SQL\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089 CREATE EXTENSION \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066Geometry\u30c7\u30fc\u30bf\u578b\u3084\u5730\u7406\u60c5\u5831\u5206\u6790\u306e\u305f\u3081\u306eSQL\u95a2\u6570\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \u3053\u308c\u3067PostGIS\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u5b8c\u4e86\u3067\u3059\u3002 postgres=# CREATE EXTENSION postgis; CREATE EXTENSION","title":"\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"install/#_1","text":"\u672c\u7ae0\u3067\u306fPG-Strom\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002","title":"\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"install/#_2","text":"\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2 CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u3092\u52d5\u4f5c\u53ef\u80fd\u306a x86_64 \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u304c\u5fc5\u8981\u3067\u3059\u3002 CPU\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u3001\u304a\u3088\u3073\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30c7\u30d0\u30a4\u30b9\u306b\u306f\u7279\u5225\u306a\u8981\u4ef6\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001 note002:HW Validation List \u306f\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u9078\u5b9a\u306e\u4e0a\u3067\u53c2\u8003\u306b\u306a\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u3092\u5229\u7528\u3059\u308b\u306b\u306fNVME\u898f\u683c\u306b\u5bfe\u5fdc\u3057\u305fSSD\u3001\u307e\u305f\u306fRoCE\u306b\u5bfe\u5fdc\u3057\u305f\u9ad8\u901fNIC\u304c\u5fc5\u8981\u3067\u3001GPU\u3068\u540c\u4e00\u306ePCIe Root Complex\u914d\u4e0b\u306b\u63a5\u7d9a\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 GPU\u30c7\u30d0\u30a4\u30b9 PG-Strom\u3092\u5b9f\u884c\u3059\u308b\u306b\u306f\u5c11\u306a\u304f\u3068\u3082\u4e00\u500b\u306eGPU\u30c7\u30d0\u30a4\u30b9\u304c\u30b7\u30b9\u30c6\u30e0\u4e0a\u306b\u5fc5\u8981\u3067\u3059\u3002\u3053\u308c\u3089\u306fCUDA Toolkit\u3067\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u304a\u308a\u3001computing capability \u304c6.0\u4ee5\u964d\u306e\u30e2\u30c7\u30eb\uff08Pascal\u4e16\u4ee3\u4ee5\u964d\uff09\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 002: HW Validation List - List of supported GPU models \u3092\u53c2\u8003\u306bGPU\u3092\u9078\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 Operating System PG-Strom\u306e\u5b9f\u884c\u306b\u306f\u3001CUDA Toolkit\u306b\u3088\u308a\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308bx86_64\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u5411\u3051\u306eLinux OS\u304c\u5fc5\u8981\u3067\u3059\u3002\u63a8\u5968\u74b0\u5883\u306fRed Hat Enterprise Linux\u307e\u305f\u306fRocky Linux\u30d0\u30fc\u30b8\u30e7\u30f3 8.x\u3067\u3059\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\uff08cuFile\u30c9\u30e9\u30a4\u30d0\uff09\u3092\u5229\u7528\u3059\u308b\u306b\u306f\u3001CUDA Toolkit\u306b\u542b\u307e\u308c\u308bnvidia-fs\u30c9\u30e9\u30a4\u30d0\u3068\u3001Mellanox OFED (OpenFabrics Enterprise Distribution) \u30c9\u30e9\u30a4\u30d0\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u3002 PostgreSQL PG-Strom v5.0\u306e\u5b9f\u884c\u306b\u306fPostgreSQL\u30d0\u30fc\u30b8\u30e7\u30f315\u4ee5\u964d\u304c\u5fc5\u8981\u3067\u3059\u3002 PG-Strom\u304c\u5185\u90e8\u7684\u306b\u5229\u7528\u3057\u3066\u3044\u308bAPI\u306e\u4e2d\u306b\u306f\u3001\u3053\u308c\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u63d0\u4f9b\u3055\u308c\u3066\u3044\u306a\u3044\u3082\u306e\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002 CUDA Toolkit PG-Strom\u306e\u5b9f\u884c\u306b\u306fCUDA Toolkit \u30d0\u30fc\u30b8\u30e7\u30f312.2update2\u4ee5\u964d\u304c\u5fc5\u8981\u3067\u3059\u3002 PG-Strom\u304c\u5185\u90e8\u7684\u306b\u5229\u7528\u3057\u3066\u3044\u308bAPI\u306e\u4e2d\u306b\u306f\u3001\u3053\u308c\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u63d0\u4f9b\u3055\u308c\u3066\u3044\u306a\u3044\u3082\u306e\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002","title":"\u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8"},{"location":"install/#_3","text":"\u4e00\u9023\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3068\u306a\u308a\u307e\u3059\u3002 H/W\u306e\u521d\u671f\u8a2d\u5b9a OS\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb MOFED\u30c9\u30e9\u30a4\u30d0\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb CUDA Toolkit \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb HeteroDB\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb PostgreSQL\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb PG-Strom\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb PostgreSQL\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff08\u5fc5\u8981\u306b\u5fdc\u3058\u3066\uff09 PostGIS contrib/cube","title":"\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806"},{"location":"install/#os","text":"CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u3092\u9078\u629e\u3057\u3001\u500b\u3005\u306e\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30d7\u30ed\u30bb\u30b9\u306b\u5f93\u3063\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4f5c\u696d\u3092\u884c\u3063\u3066\u304f\u3060\u3055\u3044\u3002 CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u306f\u3001 NVIDIA DEVELOPER ZONE \u306b\u304a\u3044\u3066\u7d39\u4ecb\u3055\u308c\u3066\u3044\u307e\u3059\u3002 Red Hat Enterprise Linux 8.x\u7cfb\u5217\uff08Rocky Linux 8.x\u7cfb\u5217\u3092\u542b\u3080\uff09\u306e\u5834\u5408\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u69cb\u6210\u306f\u3001\u30d9\u30fc\u30b9\u74b0\u5883\u3068\u3057\u3066\u300c\u6700\u5c0f\u9650\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u300d\u3092\u9078\u629e\u3057\u3001\u3055\u3089\u306b\u8ffd\u52a0\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3068\u3057\u3066\u300c\u958b\u767a\u30c4\u30fc\u30eb\u300d\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 Red Hat Enterprise Linux 9.x\u7cfb\u5217\uff08Rocky Linux 9.x\u7cfb\u5217\u3092\u542b\u3080\uff09\u306e\u5834\u5408\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u69cb\u6210\u306f\u3001\u30d9\u30fc\u30b9\u74b0\u5883\u3068\u3057\u3066\u300c\u6700\u5c0f\u9650\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u300d\u3092\u9078\u629e\u3057\u3001\u3055\u3089\u306b\u8ffd\u52a0\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3068\u3057\u3066\u300c\u6a19\u6e96\u300d\u300c\u958b\u767a\u30c4\u30fc\u30eb\u300d\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u30b5\u30fc\u30d0\u30fc\u3078\u306eOS\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u3001\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u30fc\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u305f\u3081\u306b\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002 \u306a\u304a\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u3067\u300c\u958b\u767a\u30c4\u30fc\u30eb\u300d\u3092\u9078\u629e\u3057\u306a\u304b\u3063\u305f\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067OS\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u306b\u8ffd\u52a0\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 # dnf groupinstall 'Development Tools' Tip \u30b5\u30fc\u30d0\u306b\u642d\u8f09\u3055\u308c\u3066\u3044\u308bGPU\u304c\u65b0\u3057\u3059\u304e\u308b\u5834\u5408\u3001OS\u8d77\u52d5\u4e2d\u306b\u30af\u30e9\u30c3\u30b7\u30e5\u7b49\u306e\u554f\u984c\u304c\u767a\u751f\u3059\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 \u305d\u306e\u5834\u5408\u3001\u30ab\u30fc\u30cd\u30eb\u8d77\u52d5\u30aa\u30d7\u30b7\u30e7\u30f3\u306b nouveau.modeset=0 \u3092\u8ffd\u52a0\u3057\u3066\u6a19\u6e96\u306e\u30b0\u30e9\u30d5\u30a3\u30c3\u30af\u30b9\u30c9\u30e9\u30a4\u30d0\u3092\u7121\u52b9\u5316\u3059\u308b\u4e8b\u3067 \u554f\u984c\u3092\u56de\u907f\u3067\u304d\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002","title":"OS\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"install/#nouveau","text":"NVIDIA\u88fdGPU\u5411\u3051\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306e\u4e92\u63db\u30c9\u30e9\u30a4\u30d0\u3067\u3042\u308bnouveau\u30c9\u30e9\u30a4\u30d0\u304c\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001nvidia\u30c9\u30e9\u30a4\u30d0\u3092\u30ed\u30fc\u30c9\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3002 \u3053\u306e\u5834\u5408\u306f\u3001nouveau\u30c9\u30e9\u30a4\u30d0\u306e\u7121\u52b9\u5316\u8a2d\u5b9a\u3092\u884c\u3063\u305f\u4e0a\u3067\u30b7\u30b9\u30c6\u30e0\u3092\u4e00\u5ea6\u518d\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002 nouveau\u30c9\u30e9\u30a4\u30d0\u3092\u7121\u52b9\u5316\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092 /etc/modprobe.d/disable-nouveau.conf \u3068\u3044\u3046\u540d\u524d\u3067\u4fdd\u5b58\u3057\u3001 dracut \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066Linux kernel\u306e\u30d6\u30fc\u30c8\u30a4\u30e1\u30fc\u30b8\u306b\u53cd\u6620\u3057\u307e\u3059\u3002 \u305d\u306e\u5f8c\u3001\u30b7\u30b9\u30c6\u30e0\u3092\u4e00\u5ea6\u518d\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002 # cat > /etc/modprobe.d/disable-nouveau.conf </kernel/drivers/nvme/host/nvme-rdma.ko.xz \uff09\u3067\u306f\u306a\u304f\u3001\u8ffd\u52a0\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f /lib/modules//extra/mlnx-nvme/host/nvme-rdma.ko \u304c\u512a\u5148\u3057\u3066\u4f7f\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002 $ modinfo nvme-rdma filename: /lib/modules/5.14.0-427.18.1.el9_4.x86_64/extra/mlnx-nvme/host/nvme-rdma.ko license: GPL v2 rhelversion: 9.4 srcversion: 16C0049F26768D6EA12771B depends: nvme-core,rdma_cm,ib_core,nvme-fabrics,mlx_compat retpoline: Y name: nvme_rdma vermagic: 5.14.0-427.18.1.el9_4.x86_64 SMP preempt mod_unload modversions parm: register_always:Use memory registration even for contiguous memory regions (bool) \u65e2\u306b\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308b\u30ab\u30fc\u30cd\u30eb\u30e2\u30b8\u30e5\u30fc\u30eb\uff08\u4f8b: nvme \uff09\u3092\u7f6e\u304d\u63db\u3048\u308b\u305f\u3081\u3001\u3053\u3053\u3067\u4e00\u5ea6\u30b7\u30b9\u30c6\u30e0\u306e\u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3\u3068\u518d\u8d77\u52d5\u3092\u884c\u3044\u307e\u3059\u3002 mlnxofedinstall \u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5b8c\u4e86\u5f8c\u306b\u3001 dracut -f \u3092\u5b9f\u884c\u3059\u308b\u306e\u3092\u5fd8\u308c\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002 Tips Linux kernel\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3068MOFED\u30c9\u30e9\u30a4\u30d0 RHEL\u7cfb\u5217\u306e\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u306b\u304a\u3044\u3066\u3001MODED\u30c9\u30e9\u30a4\u30d0\u306fDKMS(Dynamic Kernel Module Support)\u3092\u4f7f\u7528\u3057\u307e\u305b\u3093\u3002 \u305d\u306e\u305f\u3081\u3001Linux kernel\u3092\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3057\u305f\u5834\u5408\u306b\u306f\u3001\u4e0a\u8a18\u306e\u624b\u9806\u3092\u518d\u5ea6\u5b9f\u884c\u3057\u3001\u65b0\u3057\u3044Linux kernel\u306b\u5bfe\u5fdc\u3057\u305fMOFED\u30c9\u30e9\u30a4\u30d0\u3092\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u5f8c\u8ff0\u306eCUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306a\u3069\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u66f4\u65b0\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067Linux kernel\u304c\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u308b\u4e8b\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u305d\u306e\u5834\u5408\u3067\u3082\u540c\u69d8\u3067\u3059\u3002","title":"MOFED\u30c9\u30e9\u30a4\u30d0\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"install/#heterodb-swdc","text":"PG-Strom\u307b\u304b\u95a2\u9023\u30d1\u30c3\u30b1\u30fc\u30b8\u306f HeteroDB Software Distribution Center \u304b\u3089\u914d\u5e03\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3092\u5165\u624b\u3059\u308b\u305f\u3081\u306b\u3001HeteroDB-SWDC\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u5b9a\u7fa9\u3092yum\u30b7\u30b9\u30c6\u30e0\u306b\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 HeteroDB-SWDC\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u5b9a\u7fa9\u306fheterodb-swdc\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u3088\u308a\u63d0\u4f9b\u3055\u308c\u307e\u3059\u3002 Web\u30d6\u30e9\u30a6\u30b6\u306a\u3069\u3067 HeteroDB Software Distribution Center \u3078\u30a2\u30af\u30bb\u30b9\u3057\u3001\u30da\u30fc\u30b8\u306e\u5148\u982d\u306b\u30ea\u30f3\u30af\u306e\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b heterodb-swdc-1.3-1.el9.noarch.rpm \u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002\uff08RHEL8\u306e\u5834\u5408\u306f heterodb-swdc-1.3-1.el8.noarch.rpm \uff09 heterodb-swdc\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u308b\u3068\u3001HeteroDB-SWDC\u304b\u3089\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3092\u5165\u624b\u3059\u308b\u305f\u3081\u306eyum\u30b7\u30b9\u30c6\u30e0\u3078\u306e\u8a2d\u5b9a\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306bheterodb-swdc\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 # dnf install https://heterodb.github.io/swdc/yum/rhel8-noarch/heterodb-swdc-1.2-1.el8.noarch.rpm","title":"heterodb-swdc\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"install/#cuda-toolkit","text":"\u672c\u7bc0\u3067\u306fCUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u65e2\u306b\u6700\u65b0\u306eCUDA Toolkit\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u3067\u3042\u308b\u5834\u5408\u3001\u672c\u7bc0\u306e\u521d\u671f\u8a2d\u5b9a\u3068\u5408\u81f4\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 NVIDIA\u306fCUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\uff12\u901a\u308a\u306e\u65b9\u6cd5\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002\u4e00\u3064\u306f\u81ea\u5df1\u5b9f\u884c\u578b\u30a2\u30fc\u30ab\u30a4\u30d6\uff08runfile\uff09\u306b\u3088\u308b\u3082\u306e\u3002\u3082\u3046\u4e00\u3064\u306fRPM\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u3088\u308b\u3082\u306e\u3067\u3001PG-Strom\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306b\u306fRPM\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u3088\u308b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u63a8\u5968\u3057\u307e\u3059\u3002 CUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u7528\u30d1\u30c3\u30b1\u30fc\u30b8\u306fNVIDIA DEVELOPER ZONE\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u9069\u5207\u306aOS\u3001\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3001\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u3001\u300erpm(network)\u300f\u7248\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u300erpm(network)\u300f\u3092\u9078\u629e\u3059\u308b\u3068\u3001\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u767b\u9332\u3057\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7d4c\u7531\u3067\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u305f\u3081\u306e\u30b7\u30a7\u30eb\u30b3\u30de\u30f3\u30c9\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u30ac\u30a4\u30c0\u30f3\u30b9\u901a\u308a\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u9032\u3081\u3066\u304f\u3060\u3055\u3044\u3002 # dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo # dnf clean all # dnf install cuda-toolkit-12-5 CUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u7d9a\u3044\u3066\u3001\u30c9\u30e9\u30a4\u30d0\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u305f\u3081\u306e\u30b3\u30de\u30f3\u30c9\u304c\uff12\u7a2e\u985e\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u3053\u3053\u3067\u306f \u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u7248\u306envidia-driver \u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u7248\u306e\u307f\u304cGPUDirect Storage\u6a5f\u80fd\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u304a\u308a\u3001PG-Strom\u306eGPU-Direct SQL\u306f\u672c\u6a5f\u80fd\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002 Tips Volta\u4ee5\u524d\u306eGPU\u306e\u5229\u7528\u306b\u3064\u3044\u3066 \u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u7248nvidia\u30c9\u30e9\u30a4\u30d0\u306f\u3001Volta\u4e16\u4ee3\u4ee5\u524d\u306eGPU\u306b\u306f\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u305b\u3093\u3002 \u3057\u305f\u304c\u3063\u3066\u3001Volta\u307e\u305f\u306fPascal\u4e16\u4ee3\u306eGPU\u3067PG-Strom\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u306f\u3001\u30d7\u30ed\u30d7\u30e9\u30a8\u30bf\u30ea\u7248\u306e\u30c9\u30e9\u30a4\u30d0\u304cGPUDirect Storage\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u308bCUDA 12.2\u3092\u5229\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 CUDA 12.2\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306f \u3053\u3061\u3089 \u304b\u3089\u5165\u624b\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u7d9a\u3044\u3066\u3001GPU-Direct Storage(GDS)\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306e\u30c9\u30e9\u30a4\u30d0\u30e2\u30b8\u30e5\u30fc\u30eb nvidia-gds \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 \u30d1\u30c3\u30b1\u30fc\u30b8\u540d\u306b\u7d9a\u3044\u3066CUDA Toolkit\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u540c\u4e00\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u540d\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 # dnf module install nvidia-driver:open-dkms # dnf install nvidia-gds-12-5 \u6b63\u5e38\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3001 /usr/local/cuda \u914d\u4e0b\u306bCUDA Toolkit\u304c\u5c0e\u5165\u3055\u308c\u3066\u3044\u307e\u3059\u3002 $ ls /usr/local/cuda/ bin/ gds/ nsightee_plugins/ targets/ compute-sanitizer/ include@ nvml/ tools/ CUDA_Toolkit_Release_Notes.txt lib64@ nvvm/ version.json DOCS libnvvp/ README EULA.txt LICENSE share/ extras/ man/ src/ \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001GPU\u304c\u6b63\u3057\u304f\u8a8d\u8b58\u3055\u308c\u3066\u3044\u308b\u4e8b\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 nvidia-smi \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u51fa\u529b\u4f8b\u306e\u3088\u3046\u306b\u3001\u30b7\u30b9\u30c6\u30e0\u306b\u642d\u8f09\u3055\u308c\u3066\u3044\u308bGPU\u306e\u60c5\u5831\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002 $ nvidia-smi Mon Jun 3 09:56:41 2024 +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 555.42.02 Driver Version: 555.42.02 CUDA Version: 12.5 | |-----------------------------------------+------------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+========================+======================| | 0 NVIDIA A100-PCIE-40GB Off | 00000000:41:00.0 Off | 0 | | N/A 58C P0 66W / 250W | 1MiB / 40960MiB | 0% Default | | | | Disabled | +-----------------------------------------+------------------------+----------------------+ +-----------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=========================================================================================| | No running processes found | +-----------------------------------------------------------------------------------------+","title":"CUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"install/#gpudirect-storage","text":"\u4e0a\u8a18\u306e\u624b\u9806\u3067CUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3001GPUDirect Storage\u304c\u5229\u7528\u53ef\u80fd\u306a\u72b6\u614b\u3068\u306a\u3063\u3066\u3044\u308b\u306f\u305a\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u901a\u308a\u3001 gdscheck \u30c4\u30fc\u30eb\u3092\u7528\u3044\u3066\u30b9\u30c8\u30ec\u30fc\u30b8\u30c7\u30d0\u30a4\u30b9\u6bce\u306e\u30b3\u30f3\u30d5\u30a3\u30b0\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \uff08\u3053\u306e\u4f8b\u3067\u306f\u3001 nvme \u3060\u3051\u3067\u306a\u304f\u3001 nvme-rdma \u3084 rpcrdma \u30ab\u30fc\u30cd\u30eb\u30e2\u30b8\u30e5\u30fc\u30eb\u3082\u30ed\u30fc\u30c9\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u95a2\u9023\u3059\u308b\u6a5f\u80fd\u304c Supported \u3068\u306a\u3063\u3066\u3044\u307e\u3059\uff09 # /usr/local/cuda/gds/tools/gdscheck -p GDS release version: 1.10.0.4 nvidia_fs version: 2.20 libcufile version: 2.12 Platform: x86_64 ============ ENVIRONMENT: ============ ===================== DRIVER CONFIGURATION: ===================== NVMe : Supported NVMeOF : Supported SCSI : Unsupported ScaleFlux CSD : Unsupported NVMesh : Unsupported DDN EXAScaler : Unsupported IBM Spectrum Scale : Unsupported NFS : Supported BeeGFS : Unsupported WekaFS : Unsupported Userspace RDMA : Unsupported --Mellanox PeerDirect : Disabled --rdma library : Not Loaded (libcufile_rdma.so) --rdma devices : Not configured --rdma_device_status : Up: 0 Down: 0 ===================== CUFILE CONFIGURATION: ===================== properties.use_compat_mode : true properties.force_compat_mode : false properties.gds_rdma_write_support : true properties.use_poll_mode : false properties.poll_mode_max_size_kb : 4 properties.max_batch_io_size : 128 properties.max_batch_io_timeout_msecs : 5 properties.max_direct_io_size_kb : 16384 properties.max_device_cache_size_kb : 131072 properties.max_device_pinned_mem_size_kb : 33554432 properties.posix_pool_slab_size_kb : 4 1024 16384 properties.posix_pool_slab_count : 128 64 32 properties.rdma_peer_affinity_policy : RoundRobin properties.rdma_dynamic_routing : 0 fs.generic.posix_unaligned_writes : false fs.lustre.posix_gds_min_kb: 0 fs.beegfs.posix_gds_min_kb: 0 fs.weka.rdma_write_support: false fs.gpfs.gds_write_support: false profile.nvtx : false profile.cufile_stats : 0 miscellaneous.api_check_aggressive : false execution.max_io_threads : 4 execution.max_io_queue_depth : 128 execution.parallel_io : true execution.min_io_threshold_size_kb : 8192 execution.max_request_parallelism : 4 properties.force_odirect_mode : false properties.prefer_iouring : false ========= GPU INFO: ========= GPU index 0 NVIDIA A100-PCIE-40GB bar:1 bar size (MiB):65536 supports GDS, IOMMU State: Disabled ============== PLATFORM INFO: ============== IOMMU: disabled Nvidia Driver Info Status: Supported(Nvidia Open Driver Installed) Cuda Driver Version Installed: 12050 Platform: AS -2014CS-TR, Arch: x86_64(Linux 5.14.0-427.18.1.el9_4.x86_64) Platform verification succeeded Tips RAID\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306e\u8ffd\u52a0\u8a2d\u5b9a GPUDirect Storage\u3092\u5229\u7528\u3057\u3066Software RAID (md-raid0) \u533a\u753b\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u3059\u5834\u5408\u3001 \u4ee5\u4e0b\u306e\u4e00\u884c\u3092 /lib/udev/rules.d/63-md-raid-arrays.rules \u8a2d\u5b9a\u306b\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 IMPORT{\u200bprogram}=\"/usr/sbin/mdadm --detail --export $devnode\" \u305d\u306e\u5f8c\u3001\u8a2d\u5b9a\u3092\u53cd\u6620\u3055\u305b\u308b\u305f\u3081\u306b\u30b7\u30b9\u30c6\u30e0\u3092\u518d\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u8a73\u3057\u304f\u306f NVIDIA GPUDirect Storage Installation and Troubleshooting Guide \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002","title":"GPUDirect Storage\u306e\u78ba\u8a8d"},{"location":"install/#pci-bar1","text":"GPU-Direct SQL\u306f\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u3092\u30db\u30b9\u30c8\u30b7\u30b9\u30c6\u30e0\u4e0a\u306ePCI BAR1\u9818\u57df\uff08\u7269\u7406\u30a2\u30c9\u30ec\u30b9\u7a7a\u9593\uff09\u306b\u30de\u30c3\u30d7\u3057\u3001\u305d\u3053\u3092Destination\u3068\u3059\u308bP2P-RDMA\u8981\u6c42\u3092NVME\u6a5f\u5668\u306b\u5bfe\u3057\u3066\u884c\u3046\u4e8b\u3067\u3001\u30ed\u30b9\u306e\u306a\u3044\u9ad8\u901f\u306a\u30c7\u30fc\u30bf\u8aad\u51fa\u3057\u3092\u5b9f\u73fe\u3057\u307e\u3059\u3002 \u5341\u5206\u306a\u591a\u91cd\u5ea6\u3092\u6301\u3063\u305fP2P-RDMA\u3092\u884c\u3046\u306b\u306f\u3001GPU\u304c\u30d0\u30c3\u30d5\u30a1\u3092\u30de\u30c3\u30d7\u3059\u308b\u306e\u306b\u5341\u5206\u306aPCI BAR1\u9818\u57df\u3092\u6709\u3057\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u5927\u534a\u306eGPU\u3067\u306fPCI BAR1\u9818\u57df\u306e\u5927\u304d\u3055\u306f\u56fa\u5b9a\u3067\u3001PG-Strom\u306b\u304a\u3044\u3066\u306f\u3001\u305d\u308c\u304cGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u30b5\u30a4\u30ba\u3092\u4e0a\u56de\u3063\u3066\u3044\u308b\u88fd\u54c1\u3092\u63a8\u5968\u3057\u3066\u3044\u307e\u3059\u3002 \u3057\u304b\u3057\u3001\u4e00\u90e8\u306eGPU\u88fd\u54c1\u306b\u304a\u3044\u3066\u306f\u300e\u52d5\u4f5c\u30e2\u30fc\u30c9\u300f\u3092\u5207\u308a\u66ff\u3048\u308b\u4e8b\u3067PCI BAR1\u9818\u57df\u306e\u30b5\u30a4\u30ba\u3092\u5207\u308a\u66ff\u3048\u308b\u4e8b\u304c\u3067\u304d\u308b\u3082\u306e\u304c\u5b58\u5728\u3057\u307e\u3059\u3002\u304a\u4f7f\u3044\u306eGPU\u304c\u305d\u308c\u306b\u8a72\u5f53\u3059\u308b\u5834\u5408\u306f\u3001 NVIDIA Display Mode Selector Tool \u3092\u53c2\u7167\u306e\u4e0a\u3001PCI BAR1\u9818\u57df\u306e\u30b5\u30a4\u30ba\u3092\u6700\u5927\u5316\u3059\u308b\u30e2\u30fc\u30c9\u3078\u3068\u5207\u308a\u66ff\u3048\u3066\u304f\u3060\u3055\u3044\u3002 2023\u5e7412\u6708\u6642\u70b9\u3067\u306f\u3001\u4ee5\u4e0b\u306eGPU\u306e\u5834\u5408\u306bNVIDIA Display Mode Selector Tool\u3092\u5229\u7528\u3057\u3066 *Display Off \u30e2\u30fc\u30c9\u3078\u3068\u5207\u308a\u66ff\u3048\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 NVIDIA L40S NVIDIA L40 NVIDIA A40 NVIDIA RTX 6000 Ada NVIDIA RTX A6000 NVIDIA RTX A5500 NVIDIA RTX A5000 \u30b7\u30b9\u30c6\u30e0\u306b\u642d\u8f09\u3055\u308c\u3066\u3044\u308bGPU\u306e\u30e1\u30e2\u30ea\u30b5\u30a4\u30ba\u3084PCI BAR1\u30b5\u30a4\u30ba\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306f\u3001 nvidia-smi -q \u30b3\u30de\u30f3\u30c9\u3092\u5229\u7528\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u30e1\u30e2\u30ea\u95a2\u9023\u306e\u72b6\u614b\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002 $ nvidia-smi -q : FB Memory Usage Total : 46068 MiB Reserved : 685 MiB Used : 4 MiB Free : 45377 MiB BAR1 Memory Usage Total : 65536 MiB Used : 1 MiB Free : 65535 MiB :","title":"PCI Bar1\u30e1\u30e2\u30ea\u306e\u8a2d\u5b9a"},{"location":"install/#heterodb","text":"heterodb-extra \u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u3001PG-Strom\u306b\u4ee5\u4e0b\u306e\u6a5f\u80fd\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002 \u30de\u30eb\u30c1GPU\u306e\u5bfe\u5fdc GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5bfe\u5fdc \u30e9\u30a4\u30bb\u30f3\u30b9\u7ba1\u7406\u6a5f\u80fd \u3053\u308c\u3089\u306e\u6a5f\u80fd\u3092\u4f7f\u7528\u305b\u305a\u3001\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u7248\u306e\u6a5f\u80fd\u306e\u307f\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f heterodb-extra \u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u4e0d\u8981\u3067\u3059\u3002 \u672c\u7bc0\u306e\u5185\u5bb9\u306f\u8aad\u307f\u98db\u3070\u3057\u3066\u69cb\u3044\u307e\u305b\u3093\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001SWDC\u304b\u3089 heterodb-extra \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002 # dnf install heterodb-extra","title":"HeteroDB \u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb"},{"location":"install/#_5","text":"heterodb-extra \u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u5168\u3066\u306e\u6a5f\u80fd\u3092\u5229\u7528\u3059\u308b\u306b\u306f\u3001HeteroDB\u793e\u304c\u63d0\u4f9b\u3059\u308b\u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u6709\u52b9\u5316\u304c\u5fc5\u8981\u3067\u3059\u3002\u30e9\u30a4\u30bb\u30f3\u30b9\u306a\u3057\u3067\u904b\u7528\u3059\u308b\u4e8b\u3082\u53ef\u80fd\u3067\u3059\u304c\u3001\u305d\u306e\u5834\u5408\u3001\u4e0b\u8a18\u306e\u6a5f\u80fd\u304c\u5236\u9650\u3092\u53d7\u3051\u307e\u3059\u3002 \u30de\u30eb\u30c1GPU\u306e\u5229\u7528 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u306b\u304a\u3051\u308b\u8907\u6570NVME-SSD\u306b\u3088\u308b\u30b9\u30c8\u30e9\u30a4\u30d4\u30f3\u30b0(md-raid0) GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u306b\u304a\u3051\u308bNVME-oF\u30c7\u30d0\u30a4\u30b9\u306e\u5229\u7528 GPU\u7248PostGIS\u306b\u304a\u3051\u308bGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u5229\u7528 \u30e9\u30a4\u30bb\u30f3\u30b9\u30d5\u30a1\u30a4\u30eb\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5f62\u5f0f\u3067HeteroDB\u793e\u304b\u3089\u5165\u624b\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 IAgIVdKxhe+BSer3Y67jQW0+uTzYh00K6WOSH7xQ26Qcw8aeUNYqJB9YcKJTJb+QQhjmUeQpUnboNxVwLCd3HFuLXeBWMKp11/BgG0FSrkUWu/ZCtDtw0F1hEIUY7m767zAGV8y+i7BuNXGJFvRlAkxdVO3/K47ocIgoVkuzBfLvN/h9LffOydUnHPzrFHfLc0r3nNNgtyTrfvoZiXegkGM9GBTAKyq8uWu/OGonh9ybzVKOgofhDLk0rVbLohOXDhMlwDl2oMGIr83tIpCWG+BGE+TDwsJ4n71Sv6n4bi/ZBXBS498qShNHDGrbz6cNcDVBa+EuZc6HzZoF6UrljEcl= ---- VERSION:2 SERIAL_NR:HDB-TRIAL ISSUED_AT:2019-05-09 EXPIRED_AT:2019-06-08 GPU_UUID:GPU-a137b1df-53c9-197f-2801-f2dccaf9d42f \u3053\u308c\u3092 /etc/heterodb.license \u306b\u30b3\u30d4\u30fc\u3057\u3001PostgreSQL\u3092\u518d\u8d77\u52d5\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306bPostgreSQL\u306e\u8d77\u52d5\u30ed\u30b0\u306b\u30e9\u30a4\u30bb\u30f3\u30b9\u60c5\u5831\u304c\u51fa\u529b\u3055\u308c\u3001\u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u6709\u52b9\u5316\u304c\u884c\u308f\u308c\u305f\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 : LOG: HeteroDB Extra module loaded [api_version=20231105,cufile=on,nvme_strom=off,githash=9ca2fe4d2fbb795ad2d741dcfcb9f2fe499a5bdf] LOG: HeteroDB License: { \"version\" : 2, \"serial_nr\" : \"HDB-TRIAL\", \"issued_at\" : \"2022-11-19\", \"expired_at\" : \"2099-12-31\", \"nr_gpus\" : 1, \"gpus\" : [ { \"uuid\" : \"GPU-13943bfd-5b30-38f5-0473-78979c134606\" } ]} LOG: PG-Strom version 5.0.1 built for PostgreSQL 15 (githash: 972441dbafed6679af86af40bc8613be2d73c4fd) :","title":"\u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u6709\u52b9\u5316"},{"location":"install/#postgresql","text":"\u672c\u7bc0\u3067\u306fRPM\u306b\u3088\u308bPostgreSQL\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002 \u30bd\u30fc\u30b9\u304b\u3089\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u95a2\u3057\u3066\u306f\u65e2\u306b\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u304c\u6570\u591a\u304f\u5b58\u5728\u3057\u3001 ./configure \u30b9\u30af\u30ea\u30d7\u30c8\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u591a\u5c90\u306b\u308f\u305f\u308b\u4e8b\u304b\u3089\u3001\u3053\u3053\u3067\u306f\u7d39\u4ecb\u3057\u307e\u305b\u3093\u3002 Linux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u306e\u914d\u5e03\u3059\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u3082PostgreSQL\u306f\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u5fc5\u305a\u3057\u3082\u6700\u65b0\u3067\u306f\u306a\u304f\u3001PG-Strom\u306e\u5bfe\u5fdc\u30d0\u30fc\u30b8\u30e7\u30f3\u3088\u308a\u3082\u53e4\u3044\u3082\u306e\u3067\u3042\u308b\u4e8b\u304c\u591a\u3005\u3042\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001Red Hat Enterprise Linux 7.x\u3067\u914d\u5e03\u3055\u308c\u3066\u3044\u308bPostgreSQL\u306fv9.2.x\u3067\u3059\u304c\u3001\u3053\u308c\u306fPostgreSQL\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u3068\u3057\u3066\u65e2\u306bEOL\u3068\u306a\u3063\u3066\u3044\u308b\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u3059\u3002 PostgreSQL Global Development Group\u306f\u3001\u6700\u65b0\u306ePostgreSQL\u304a\u3088\u3073\u95a2\u9023\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u914d\u5e03\u306e\u305f\u3081\u306byum\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002 EPEL\u306e\u8a2d\u5b9a\u306e\u3088\u3046\u306b\u3001yum\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8a2d\u5b9a\u3092\u884c\u3046\u3060\u3051\u306e\u5c0f\u3055\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001\u305d\u306e\u5f8c\u3001PostgreSQL\u3084\u305d\u306e\u4ed6\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 yum\u30ea\u30dd\u30b8\u30c8\u30ea\u5b9a\u7fa9\u306e\u4e00\u89a7\u306f http://yum.postgresql.org/repopackages.php \u3067\u3059\u3002 PostgreSQL\u30e1\u30b8\u30e3\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u3068Linux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u3054\u3068\u306b\u591a\u304f\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u5b9a\u7fa9\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u3042\u306a\u305f\u306eLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u5411\u3051\u306ePostgreSQL 15\u4ee5\u964d\u306e\u3082\u306e\u3092\u9078\u629e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u30b9\u30c6\u30c3\u30d7\u3067 PostgreSQL \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u884c\u3044\u307e\u3059\u3002 yum\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u5b9a\u7fa9\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb OS\u6a19\u6e96\u306ePostgreSQL\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u7121\u52b9\u5316 PostgreSQL\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u4f8b\u3048\u3070PostgreSQL v16\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001PG-Strom\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u306f postgresql16-server \u304a\u3088\u3073 postgresql16-devel \u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u5fc5\u8981\u3067\u3059\u3002 \u4ee5\u4e0b\u306f\u3001RHEL9\u306b\u304a\u3044\u3066PostgreSQL v16\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u624b\u9806\u306e\u4f8b\u3067\u3059\u3002 # dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm # dnf -y module disable postgresql # dnf install -y postgresql16-devel postgresql16-server Note Red Hat Enterprise Linux\u306e\u5834\u5408\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u540d postgresql \u304c\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u6a19\u6e96\u306e\u3082\u306e\u3068\u7af6\u5408\u3057\u3066\u3057\u307e\u3044\u3001PGDG\u63d0\u4f9b\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3002\u305d\u306e\u305f\u3081\u3001 dnf -y module disable postgresql \u30b3\u30de\u30f3\u30c9\u3092\u7528\u3044\u3066\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u6a19\u6e96\u306e postgresql \u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u7121\u52b9\u5316\u3057\u307e\u3059\u3002","title":"PostgreSQL\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"install/#pg-strom","text":"\u672c\u7bc0\u3067\u306fPG-Strom\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u63a8\u5968\u306fRPM\u306b\u3088\u308b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u3059\u304c\u3001\u958b\u767a\u8005\u5411\u3051\u306b\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304b\u3089\u306e\u30d3\u30eb\u30c9\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3082\u7d39\u4ecb\u3057\u307e\u3059\u3002","title":"PG-Strom\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"install/#rpm","text":"PG-Strom\u304a\u3088\u3073\u95a2\u9023\u30d1\u30c3\u30b1\u30fc\u30b8\u306f HeteroDB Software Distribution Center \u3088\u308a\u914d\u5e03\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u65e2\u306byum\u30b7\u30b9\u30c6\u30e0\u3078\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8ffd\u52a0\u6e08\u307f\u3067\u3042\u308c\u3070\u3001\u305d\u308c\u307b\u3069\u4f5c\u696d\u306f\u591a\u304f\u3042\u308a\u307e\u305b\u3093\u3002 \u57fa\u76e4\u3068\u306a\u308bPostgreSQL\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3054\u3068\u306b\u5225\u500b\u306ePG-Strom\u306eRPM\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u6e96\u5099\u3055\u308c\u3066\u304a\u308a\u3001PostgreSQL v15\u7528\u3067\u3042\u308c\u3070 pg_strom-PG15 \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u3001PostgreSQL v16\u7528\u3067\u3042\u308c\u3070 pg_strom-PG16 \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u3001PostgreSQL\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30d0\u30a4\u30ca\u30ea\u4e92\u63db\u6027\u306b\u4f34\u3046\u5236\u7d04\u3067\u3059\u3002 # dnf install -y pg_strom-PG16 \u4ee5\u4e0a\u3067\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u5b8c\u4e86\u3067\u3059\u3002","title":"RPM\u306b\u3088\u308b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"install/#_6","text":"\u958b\u767a\u8005\u5411\u3051\u306b\u3001\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304b\u3089PG-Strom\u3092\u30d3\u30eb\u30c9\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3082\u7d39\u4ecb\u3057\u307e\u3059\u3002","title":"\u30bd\u30fc\u30b9\u304b\u3089\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"install/#_7","text":"RPM\u30d1\u30c3\u30b1\u30fc\u30b8\u3068\u540c\u69d8\u306b\u3001\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306etarball\u3092 HeteroDB Software Distribution Center \u304b\u3089\u5165\u624b\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u305f\u3060\u3001tarball\u306e\u30ea\u30ea\u30fc\u30b9\u306b\u306f\u3042\u308b\u7a0b\u5ea6\u306e\u30bf\u30a4\u30e0\u30e9\u30b0\u304c\u751f\u3058\u3066\u3057\u307e\u3046\u305f\u3081\u3001\u6700\u65b0\u306e\u958b\u767a\u7248\u3092\u4f7f\u3044\u305f\u3044\u5834\u5408\u306b\u306f PG-Strom\u306eGitHub\u30ea\u30dd\u30b8\u30c8\u30ea \u306e master \u30d6\u30e9\u30f3\u30c1\u3092\u30c1\u30a7\u30c3\u30af\u30a2\u30a6\u30c8\u3059\u308b\u65b9\u6cd5\u306e\u65b9\u304c\u597d\u307e\u308c\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 $ git clone https://github.com/heterodb/pg-strom.git Cloning into 'pg-strom'... remote: Counting objects: 13797, done. remote: Compressing objects: 100% (215/215), done. remote: Total 13797 (delta 208), reused 339 (delta 167), pack-reused 13400 Receiving objects: 100% (13797/13797), 11.81 MiB | 1.76 MiB/s, done. Resolving deltas: 100% (10504/10504), done.","title":"\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u5165\u624b"},{"location":"install/#pg-strom_1","text":"PG-Strom\u3092\u30d3\u30eb\u30c9\u3059\u308b\u6642\u306e\u30b3\u30f3\u30d5\u30a3\u30b0\u306f\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u306ePostgreSQL\u3068\u53b3\u5bc6\u306b\u4e00\u81f4\u3057\u3066\u3044\u306a\u3051\u308c\u3070\u3044\u3051\u307e\u305b\u3093\u3002\u4f8b\u3048\u3070\u3001\u540c\u3058\u69cb\u9020\u4f53\u304c\u30d3\u30eb\u30c9\u6642\u306e\u30b3\u30f3\u30d5\u30a3\u30b0\u306b\u3088\u308aPostgreSQL\u3068PG-Strom\u3067\u7570\u306a\u3063\u305f\u30ec\u30a4\u30a2\u30a6\u30c8\u3092\u6301\u3063\u3066\u3057\u307e\u3063\u305f\u3068\u3059\u308c\u3070\u3001\u975e\u5e38\u306b\u767a\u898b\u306e\u96e3\u3057\u3044\u30d0\u30b0\u3092\u751f\u307f\u51fa\u3057\u3066\u3057\u307e\u3046\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 \u3057\u305f\u304c\u3063\u3066\u3001\uff08\u4e00\u8cab\u6027\u306e\u306a\u3044\u72b6\u614b\u3092\u907f\u3051\u308b\u305f\u3081\uff09PG-Strom\u306f\u72ec\u81ea\u306bconfigure\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u8d70\u3089\u305b\u305f\u308a\u306f\u305b\u305a\u3001 pg_config \u3092\u4f7f\u3063\u3066PostgreSQL\u306e\u30d3\u30eb\u30c9\u6642\u8a2d\u5b9a\u3092\u53c2\u7167\u3057\u307e\u3059\u3002 pg_config \u306b\u30d1\u30b9\u304c\u901a\u3063\u3066\u304a\u308a\u3001\u305d\u308c\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u306ePostgreSQL\u306e\u3082\u306e\u3067\u3042\u308c\u3070\u3001\u305d\u306e\u307e\u307e make \u3001 make install \u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 \u76f4\u63a5\u30d1\u30b9\u304c\u901a\u3063\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u3001 make \u30b3\u30de\u30f3\u30c9\u306b PG_CONFIG=... \u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u4e0e\u3048\u3001 pg_config \u306e\u30d5\u30eb\u30d1\u30b9\u3092\u6e21\u3057\u307e\u3059\u3002 $ cd pg-strom/src $ make PG_CONFIG=/usr/pgsql-16/bin/pg_config $ sudo make install PG_CONFIG=/usr/pgsql-16/bin/pg_config","title":"PG-Strom\u306e\u30d3\u30eb\u30c9"},{"location":"install/#_8","text":"","title":"\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u306e\u8a2d\u5b9a"},{"location":"install/#_9","text":"\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u306e\u4f5c\u6210\u304c\u6e08\u3093\u3067\u3044\u306a\u3044\u5834\u5408\u306f\u3001 initdb \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066PostgreSQL\u306e\u521d\u671f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 RPM\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u304a\u3051\u308b\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u306e\u30d1\u30b9\u306f /var/lib/pgsql//data \u3067\u3059\u3002 postgresql-alternatives \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001PostgreSQL\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u62e0\u3089\u305a /var/lib/pgdata \u3067\u53c2\u7167\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 # su - postgres $ /usr/pgsql-16/bin/initdb -D /var/lib/pgdata/ The files belonging to this database system will be owned by user \"postgres\". This user must also own the server process. The database cluster will be initialized with locale \"en_US.UTF-8\". The default database encoding has accordingly been set to \"UTF8\". The default text search configuration will be set to \"english\". Data page checksums are disabled. fixing permissions on existing directory /var/lib/pgdata ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... Asia/Tokyo creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok initdb: warning: enabling \"trust\" authentication for local connections You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb. Success. You can now start the database server using: pg_ctl -D /var/lib/pgdata/ -l logfile start","title":"\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u306e\u4f5c\u6210"},{"location":"install/#postgresqlconf","text":"\u7d9a\u3044\u3066\u3001PostgreSQL\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3067\u3042\u308b postgresql.conf \u3092\u7de8\u96c6\u3057\u307e\u3059\u3002 PG-Strom\u3092\u52d5\u4f5c\u3055\u305b\u308b\u305f\u3081\u306b\u306f\u3001\u6700\u4f4e\u9650\u3001\u4ee5\u4e0b\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u8a2d\u5b9a\u304c\u5fc5\u8981\u3067\u3059\u3002 \u3053\u308c\u4ee5\u5916\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3064\u3044\u3066\u3082\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u7528\u9014\u3084\u60f3\u5b9a\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u8e0f\u307e\u3048\u3066\u691c\u8a0e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 shared_preload_libraries PG-Strom\u30e2\u30b8\u30e5\u30fc\u30eb\u306f shared_preload_libraries \u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3088\u308apostmaster\u30d7\u30ed\u30bb\u30b9\u306e\u8d77\u52d5\u6642\u306b\u30ed\u30fc\u30c9\u3055\u308c\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u30aa\u30f3\u30c7\u30de\u30f3\u30c9\u3067\u306e\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30ed\u30fc\u30c9\u306f\u30b5\u30dd\u30fc\u30c8\u5bfe\u8c61\u5916\u3067\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u9805\u76ee\u306f\u5fc5\u9808\u3067\u3059\u3002 shared_preload_libraries = '$libdir/pg_strom' max_worker_processes PG-Strom\u306f\u6570\u500b\u306e\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u3092\u5185\u90e8\u7684\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3067\u3042\u308b 8 \u3067\u306f\u3001\u305d\u308c\u4ee5\u5916\u306e\u51e6\u7406\u306b\u5229\u7528\u3067\u304d\u308b\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\u6570\u304c\u3042\u307e\u308a\u306b\u3082\u5c11\u306a\u3059\u304e\u3066\u3057\u307e\u3044\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u3042\u308b\u7a0b\u5ea6\u306e\u4f59\u88d5\u3092\u6301\u3063\u305f\u5024\u3092\u8a2d\u5b9a\u3059\u3079\u304d\u3067\u3059\u3002 max_worker_processes = 100 shared_buffers \u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u3088\u308a\u307e\u3059\u304c\u3001 shared_buffers \u306e\u521d\u671f\u8a2d\u5b9a\u306f\u975e\u5e38\u306b\u5c0f\u3055\u3044\u305f\u3081\u3001PG-Strom\u304c\u6709\u52b9\u306b\u6a5f\u80fd\u3059\u308b\u6c34\u6e96\u306e\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\u306b\u5bfe\u3057\u3066\u306f\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u3078\u306e\u8aad\u307f\u66f8\u304d\u304c\u5f8b\u901f\u8981\u56e0\u3068\u306a\u3063\u3066\u3057\u307e\u3044\u3001GPU\u306e\u4e26\u5217\u8a08\u7b97\u6a5f\u80fd\u3092\u6709\u52b9\u306b\u5229\u7528\u3067\u304d\u306a\u3044\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u3042\u308b\u7a0b\u5ea6\u306e\u4f59\u88d5\u3092\u6301\u3063\u305f\u5024\u3092\u8a2d\u5b9a\u3059\u3079\u304d\u3067\u3059\u3002 shared_buffers = 10GB \u660e\u3089\u304b\u306b\u30e1\u30e2\u30ea\u30b5\u30a4\u30ba\u3088\u308a\u3082\u5927\u304d\u306a\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u306f\u3001SSD-to-GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306e\u5229\u7528\u3092\u691c\u8a0e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 work_mem \u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u3088\u308a\u307e\u3059\u304c\u3001 work_mem \u306e\u521d\u671f\u8a2d\u5b9a\u306f\u975e\u5e38\u306b\u5c0f\u3055\u3044\u305f\u3081\u3001\u89e3\u6790\u7cfb\u30af\u30a8\u30ea\u3067\u6700\u9069\u306a\u30af\u30a8\u30ea\u5b9f\u884c\u8a08\u753b\u304c\u9078\u629e\u3055\u308c\u306a\u3044\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 \u5178\u578b\u7684\u306a\u4f8b\u306f\u3001\u30bd\u30fc\u30c8\u51e6\u7406\u306b\u30aa\u30f3\u30e1\u30e2\u30ea\u306e\u30af\u30a4\u30c3\u30af\u30bd\u30fc\u30c8\u3067\u306f\u306a\u304f\u3001\u30c7\u30a3\u30b9\u30af\u30d9\u30fc\u30b9\u306e\u30de\u30fc\u30b8\u30bd\u30fc\u30c8\u3092\u9078\u629e\u3059\u308b\u3068\u3044\u3063\u305f\u3082\u306e\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u3042\u308b\u7a0b\u5ea6\u306e\u4f59\u88d5\u3092\u6301\u3063\u305f\u5024\u3092\u8a2d\u5b9a\u3059\u3079\u304d\u3067\u3059\u3002 work_mem = 1GB","title":"postgresql.conf\u306e\u7de8\u96c6"},{"location":"install/#os_1","text":"GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u7279\u306b\u3001\u540c\u6642\u306b\u5927\u91cf\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30aa\u30fc\u30d7\u30f3\u3059\u308b\u4e8b\u304c\u3042\u308b\u305f\u3081\u3001\u30d7\u30ed\u30bb\u30b9\u3042\u305f\u308a\u30d5\u30a1\u30a4\u30eb\u30c7\u30a3\u30b9\u30af\u30ea\u30d7\u30bf\u6570\u306e\u4e0a\u9650\u3092\u62e1\u5927\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u307e\u305f\u3001PostgreSQL\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u6642\u306b\u78ba\u5b9f\u306b\u30b3\u30a2\u30c0\u30f3\u30d7\u3092\u751f\u6210\u3067\u304d\u308b\u3088\u3046\u3001\u30b3\u30a2\u30d5\u30a1\u30a4\u30eb\u306e\u30b5\u30a4\u30ba\u4e0a\u9650\u3092\u5236\u9650\u3057\u306a\u3044\u3053\u3068\u3092\u63a8\u5968\u3057\u307e\u3059\u3002 PostgreSQL\u3092systemd\u7d4c\u7531\u3067\u8d77\u52d5\u3059\u308b\u5834\u5408\u3001\u30ea\u30bd\u30fc\u30b9\u5236\u9650\u306b\u95a2\u3059\u308b\u8a2d\u5b9a\u306f /etc/systemd/system/postgresql-XX.service.d/pg_strom.conf \u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002 RPM\u306b\u3088\u308b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u5834\u5408\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u4ee5\u4e0b\u306e\u5185\u5bb9\u304c\u8a2d\u5b9a\u3055\u308c\u307e\u3059\u3002 \u74b0\u5883\u5909\u6570 CUDA_ENABLE_COREDUMP_ON_EXCEPTION \u306b\u95a2\u3059\u308b\u8a2d\u5b9a\u304c\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u958b\u767a\u8005\u5411\u3051\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3001\u3053\u308c\u3092\u6709\u52b9\u306b\u3057\u3066\u8d77\u52d5\u3059\u308b\u3068\u3001GPU\u5074\u3067\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u306bGPU\u306e\u30b3\u30a2\u30c0\u30f3\u30d7\u3092\u751f\u6210\u3055\u305b\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002\u8a73\u3057\u304f\u306f CUDA-GDB:GPU core dump support \u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002 [Service] LimitNOFILE=65536 LimitCORE=infinity #Environment=CUDA_ENABLE_COREDUMP_ON_EXCEPTION=1","title":"OS\u306e\u30ea\u30bd\u30fc\u30b9\u5236\u9650\u306e\u62e1\u5f35"},{"location":"install/#postgresql_1","text":"PostgreSQL\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002 \u6b63\u5e38\u306b\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u304c\u5b8c\u4e86\u3057\u3066\u3044\u308c\u3070\u3001\u30ed\u30b0\u306bPG-Strom\u304cGPU\u3092\u8a8d\u8b58\u3057\u305f\u4e8b\u3092\u793a\u3059\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8a18\u9332\u3055\u308c\u3066\u3044\u308b\u306f\u305a\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u3067\u306f\u3001NVIDIA A100 (PCIE\u7248; 40GB) \u3092\u8a8d\u8b58\u3057\u3066\u304a\u308a\u3001\u307e\u305f\u3001NVME-SSD\u3054\u3068\u306b\u8fd1\u508d\u306eGPU\u304c\u3069\u3061\u3089\u3067\u3042\u308b\u306e\u304b\u51fa\u529b\u3055\u308c\u3066\u3044\u307e\u3059\u3002 # systemctl start postgresql-16 # journalctl -u postgresql-16 Jun 02 17:28:45 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:45.989 JST [20242] LOG: HeteroDB Extra module loaded [api_version=20240418,cufile=off,nvme_strom=off,githash=3ffc65428c07bb3c9d0e5c75a2973389f91dfcd4] Jun 02 17:28:45 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:45.989 JST [20242] LOG: HeteroDB License: { \"version\" : 2, \"serial_nr\" : \"HDB-TRIAL\", \"issued_at\" : \"2024-06-02\", \"expired_at\" : \"2099-12-31\", \"nr_gpus\" : 1, \"gpus\" : [ { \"uuid\" : \"GPU-13943bfd-5b30-38f5-0473-78979c134606\" } ]} Jun 02 17:28:45 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:45.989 JST [20242] LOG: PG-Strom version 5.12.el9 built for PostgreSQL 16 (githash: ) Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.114 JST [20242] LOG: PG-Strom binary built for CUDA 12.4 (CUDA runtime 12.5) Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.114 JST [20242] WARNING: The CUDA version where this PG-Strom module binary was built for (12.4) is newer than the CUDA runtime version on this platform (12.5). It may lead unexpected behavior, and upgrade of CUDA toolkit is recommended. Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.114 JST [20242] LOG: PG-Strom: GPU0 NVIDIA A100-PCIE-40GB (108 SMs; 1410MHz, L2 40960kB), RAM 39.50GB (5120bits, 1.16GHz), PCI-E Bar1 64GB, CC 8.0 Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:41:00:0] GPU0 (NVIDIA A100-PCIE-40GB; GPU-13943bfd-5b30-38f5-0473-78979c134606) Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:81:00:0] nvme6 (NGD-IN2500-080T4-C) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:82:00:0] nvme3 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:c2:00:0] nvme1 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:c6:00:0] nvme4 (Corsair MP600 CORE) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:c3:00:0] nvme5 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:c1:00:0] nvme0 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:c4:00:0] nvme2 (NGD-IN2500-080T4-C) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.217 JST [20242] LOG: redirecting log output to logging collector process Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.217 JST [20242] HINT: Future log output will appear in directory \"log\". Jun 02 17:28:48 buri.heterodb.com systemd[1]: Started PostgreSQL 16 database server.","title":"PostgreSQL\u306e\u8d77\u52d5"},{"location":"install/#pg-strom_2","text":"\u6700\u5f8c\u306b\u3001PG-Strom\u306b\u95a2\u9023\u3059\u308bSQL\u95a2\u6570\u306a\u3069\u306eDB\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \u3053\u306e\u624b\u9806\u306fPostgreSQL\u306eEXTENSION\u6a5f\u80fd\u3092\u7528\u3044\u3066\u30d1\u30c3\u30b1\u30fc\u30b8\u5316\u3055\u308c\u3066\u304a\u308a\u3001SQL\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067 CREATE EXTENSION \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3060\u3051\u3067\u3059\u3002 \u306a\u304a\u3001\u3053\u306e\u624b\u9806\u306f\u65b0\u3057\u3044\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3059\u308b\u305f\u3073\u306b\u5fc5\u8981\u306b\u306a\u308b\u4e8b\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u65b0\u3057\u3044\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u305f\u6642\u70b9\u3067\u65e2\u306bPG-Strom\u95a2\u9023\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u4f5c\u6210\u3055\u308c\u3066\u3044\u3066\u307b\u3057\u3044\u5834\u5408\u306f\u3001\u4e88\u3081 template1 \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067PG-Strom\u30a8\u30af\u30b9\u30c6\u30f3\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3057\u3066\u304a\u3051\u3070\u3001 CREATE DATABASE \u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u6642\u306b\u65b0\u3057\u3044\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3078\u8a2d\u5b9a\u304c\u30b3\u30d4\u30fc\u3055\u308c\u307e\u3059\u3002 $ psql -U postgres psql (16.3) Type \"help\" for help. postgres=# CREATE EXTENSION pg_strom ; CREATE EXTENSION \u4ee5\u4e0a\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4f5c\u696d\u306f\u5b8c\u4e86\u3067\u3059\u3002","title":"PG-Strom\u30a8\u30af\u30b9\u30c6\u30f3\u30b7\u30e7\u30f3\u306e\u4f5c\u6210"},{"location":"install/#postgis","text":"PG-Strom\u306f\u4e00\u90e8\u306ePostGIS\u95a2\u6570\u306eGPU\u51e6\u7406\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002 \u672c\u7bc0\u3067\u306fPostGIS\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u306b\u3064\u3044\u3066\u8aac\u660e\u3092\u884c\u3044\u307e\u3059\u304c\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u8aad\u307f\u98db\u3070\u3057\u3066\u304f\u3060\u3055\u3044\u3002 PostgreSQL\u3068\u540c\u69d8\u306b\u3001PostgreSQL Global Development Group\u306eyum\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089PostGIS\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001PostgreSQL v16\u5411\u3051\u306b\u30d3\u30eb\u30c9\u3055\u308c\u305fPostGIS v3.4\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3082\u306e\u3067\u3059\u3002 # dnf install postgis34_16 \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u3092\u4f5c\u6210\u3057\u3066PostgreSQL\u30b5\u30fc\u30d0\u3092\u8d77\u52d5\u3057\u3001SQL\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089 CREATE EXTENSION \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066Geometry\u30c7\u30fc\u30bf\u578b\u3084\u5730\u7406\u60c5\u5831\u5206\u6790\u306e\u305f\u3081\u306eSQL\u95a2\u6570\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \u3053\u308c\u3067PostGIS\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u5b8c\u4e86\u3067\u3059\u3002 postgres=# CREATE EXTENSION postgis; CREATE EXTENSION","title":"PostGIS\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"operations/","text":"\u57fa\u672c\u7684\u306a\u64cd\u4f5c GPU\u30aa\u30d5\u30ed\u30fc\u30c9\u306e\u78ba\u8a8d \u30af\u30a8\u30ea\u304cGPU\u3067\u5b9f\u884c\u3055\u308c\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306f EXPLAIN \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 SQL\u51e6\u7406\u306f\u5185\u90e8\u7684\u306b\u3044\u304f\u3064\u304b\u306e\u8981\u7d20\u306b\u5206\u89e3\u3055\u308c\u51e6\u7406\u3055\u308c\u307e\u3059\u304c\u3001PG-Strom\u304cGPU\u3092\u9069\u7528\u3057\u3066\u4e26\u5217\u51e6\u7406\u3092\u884c\u3046\u306e\u306fSCAN\u3001JOIN\u3001GROUP BY\u306e\u5404\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3067\u3059\u3002\u6a19\u6e96\u3067PostgreSQL\u304c\u63d0\u4f9b\u3057\u3066\u3044\u308b\u5404\u51e6\u7406\u306e\u4ee3\u308f\u308a\u306b\u3001GpuScan\u3001GpuJoin\u3001GpuPreAgg\u304c\u8868\u793a\u3055\u308c\u305f\u5834\u5408\u3001\u305d\u306e\u30af\u30a8\u30ea\u306fGPU\u306b\u3088\u3063\u3066\u51e6\u7406\u3055\u308c\u308b\u4e8b\u3068\u306a\u308a\u307e\u3059\u3002 \u4ee5\u4e0b\u306f EXPLAIN \u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u4f8b\u3067\u3059\u3002 postgres=# EXPLAIN SELECT cat,count(*),avg(ax) FROM t0 NATURAL JOIN t1 NATURAL JOIN t2 GROUP BY cat; QUERY PLAN -------------------------------------------------------------------------------- GroupAggregate (cost=989186.82..989190.94 rows=27 width=20) Group Key: t0.cat -> Sort (cost=989186.82..989187.29 rows=189 width=44) Sort Key: t0.cat -> Custom Scan (GpuPreAgg) (cost=989175.89..989179.67 rows=189 width=44) Reduction: Local GPU Projection: cat, pgstrom.nrows(), pgstrom.nrows((ax IS NOT NULL)), pgstrom.psum(ax) Combined GpuJoin: enabled -> Custom Scan (GpuJoin) on t0 (cost=14744.40..875804.46 rows=99996736 width=12) GPU Projection: t0.cat, t1.ax Outer Scan: t0 (cost=0.00..1833360.36 rows=99996736 width=12) Depth 1: GpuHashJoin (nrows 99996736...99996736) HashKeys: t0.aid JoinQuals: (t0.aid = t1.aid) KDS-Hash (size: 10.39MB) Depth 2: GpuHashJoin (nrows 99996736...99996736) HashKeys: t0.bid JoinQuals: (t0.bid = t2.bid) KDS-Hash (size: 10.78MB) -> Seq Scan on t1 (cost=0.00..1972.85 rows=103785 width=12) -> Seq Scan on t2 (cost=0.00..1935.00 rows=100000 width=4) (21 rows) \u5b9f\u884c\u8a08\u753b\u306e\u4e2d\u306b\u898b\u6163\u308c\u306a\u3044\u51e6\u7406\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u4e8b\u306b\u6c17\u304c\u4ed8\u304b\u308c\u305f\u3067\u3057\u3087\u3046\u3002 CustomScan\u6a5f\u69cb\u3092\u7528\u3044\u3066GpuJoin\u304a\u3088\u3073GpuPreAgg\u304c\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u3053\u3067GpuJoin\u306f t0 \u3068 t1 \u3001\u304a\u3088\u3073 t2 \u3068\u306eJOIN\u51e6\u7406\u3092\u5b9f\u884c\u3057\u3001\u305d\u306e\u7d50\u679c\u3092\u53d7\u3051\u53d6\u308bGpuPreAgg\u306f\u5217 cat \u306b\u3088\u308bGROUP BY\u51e6\u7406\u3092GPU\u3067\u5b9f\u884c\u3057\u307e\u3059\u3002 PostgreSQL\u304c\u30af\u30a8\u30ea\u5b9f\u884c\u8a08\u753b\u3092\u69cb\u7bc9\u3059\u308b\u904e\u7a0b\u3067PG-Strom\u306f\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306b\u4ecb\u5165\u3057\u3001SCAN\u3001JOIN\u3001GROUP BY\u306e\u5404\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092GPU\u3067\u5b9f\u884c\u53ef\u80fd\u3067\u3042\u308b\u5834\u5408\u3001\u305d\u306e\u30b3\u30b9\u30c8\u3092\u7b97\u51fa\u3057\u3066PostgreSQL\u306e\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306b\u5b9f\u884c\u8a08\u753b\u306e\u5019\u88dc\u3092\u63d0\u793a\u3057\u307e\u3059\u3002 \u63a8\u5b9a\u3055\u308c\u305f\u30b3\u30b9\u30c8\u5024\u304cCPU\u3067\u5b9f\u884c\u3059\u308b\u4ed6\u306e\u5b9f\u884c\u8a08\u753b\u3088\u308a\u3082\u5c0f\u3055\u306a\u5024\u3067\u3042\u308b\u5834\u5408\u3001GPU\u3092\u7528\u3044\u305f\u4ee3\u66ff\u306e\u5b9f\u884c\u8a08\u753b\u304c\u63a1\u7528\u3055\u308c\u308b\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002 \u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092GPU\u3067\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u5c11\u306a\u304f\u3068\u3082\u6f14\u7b97\u5f0f\u307e\u305f\u306f\u95a2\u6570\u3001\u304a\u3088\u3073\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u578b\u304cPG-Strom\u3067\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 int \u3084 float \u3068\u3044\u3063\u305f\u6570\u5024\u578b\u3001 date \u3084 timestamp \u3068\u3044\u3063\u305f\u65e5\u4ed8\u6642\u523b\u578b\u3001 text \u306e\u3088\u3046\u306a\u6587\u5b57\u5217\u578b\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u304a\u308a\u3001\u307e\u305f\u3001\u56db\u5247\u6f14\u7b97\u3084\u5927\u5c0f\u6bd4\u8f03\u3068\u3044\u3063\u305f\u6570\u591a\u304f\u306e\u30d3\u30eb\u30c8\u30a4\u30f3\u6f14\u7b97\u5b50\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u8a73\u7d30\u306a\u4e00\u89a7\u306b\u95a2\u3057\u3066\u306f \u30ea\u30d5\u30a1\u30ec\u30f3\u30b9 \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 CPU+GPU\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u4e26\u5217 PG-Strom\u306fPostgreSQL\u306eCPU\u4e26\u5217\u5b9f\u884c\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002 PostgreSQL\u306eCPU\u4e26\u5217\u5b9f\u884c\u306f\u3001Gather\u30ce\u30fc\u30c9\u304c\u3044\u304f\u3064\u304b\u306e\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30d7\u30ed\u30bb\u30b9\u3092\u8d77\u52d5\u3057\u3001\u5404\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u304c\"\u90e8\u5206\u7684\u306b\"\u5b9f\u884c\u3057\u305f\u30af\u30a8\u30ea\u306e\u7d50\u679c\u3092\u5f8c\u3067\u7d50\u5408\u3059\u308b\u5f62\u3067\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u3059\u3002 GpuJoin\u3084GpuPreAgg\u3068\u3044\u3063\u305fPG-Strom\u306e\u51e6\u7406\u306f\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u5074\u3067\u306e\u5b9f\u884c\u306b\u5bfe\u5fdc\u3057\u3066\u304a\u308a\u3001\u500b\u3005\u306e\u30d7\u30ed\u30bb\u30b9\u304c\u4e92\u3044\u306bGPU\u3092\u4f7f\u7528\u3057\u3066\u51e6\u7406\u3092\u9032\u3081\u307e\u3059\u3002\u901a\u5e38\u3001GPU\u3078\u30c7\u30fc\u30bf\u3092\u4f9b\u7d66\u3059\u308b\u305f\u3081\u306b\u500b\u3005\u306eCPU\u30b3\u30a2\u304c\u30d0\u30c3\u30d5\u30a1\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b\u305f\u3081\u306e\u51e6\u7406\u901f\u5ea6\u306f\u3001GPU\u3067\u306eSQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u51e6\u7406\u901f\u5ea6\u306b\u6bd4\u3079\u3066\u305a\u3063\u3068\u9045\u3044\u305f\u3081\u3001CPU\u4e26\u5217\u3068GPU\u4e26\u5217\u3092\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u3067\u5229\u7528\u3059\u308b\u4e8b\u3067\u51e6\u7406\u901f\u5ea6\u306e\u5411\u4e0a\u304c\u671f\u5f85\u3067\u304d\u307e\u3059\u3002 \u305f\u3060\u3057\u3001GPU\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306aCUDA\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306f\u5404\u30d7\u30ed\u30bb\u30b9\u3054\u3068\u306b\u4f5c\u6210\u3055\u308c\u3001CUDA\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3092\u751f\u6210\u3059\u308b\u305f\u3073\u306b\u3042\u308b\u7a0b\u5ea6\u306eGPU\u30ea\u30bd\u30fc\u30b9\u304c\u6d88\u8cbb\u3055\u308c\u308b\u305f\u3081\u3001\u5e38\u306bCPU\u4e26\u5217\u5ea6\u304c\u9ad8\u3051\u308c\u3070\u826f\u3044\u3068\u3044\u3046\u8a33\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u3092\u898b\u3066\u304f\u3060\u3055\u3044\u3002 Gather\u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u306f\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u304c\u5b9f\u884c\u53ef\u80fd\u306a\u3082\u306e\u3067\u3059\u30021\u5104\u884c\u3092\u4fdd\u6301\u3059\u308b t0 \u30c6\u30fc\u30d6\u30eb\u30924\u30d7\u30ed\u30bb\u30b9\u306e\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u3068\u30b3\u30fc\u30c7\u30a3\u30cd\u30fc\u30bf\u30d7\u30ed\u30bb\u30b9\u3067\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u305f\u3081\u3001\u30d7\u30ed\u30bb\u30b9\u3042\u305f\u308a2000\u4e07\u884c\u3092GpuJoin\u304a\u3088\u3073GpuPreAgg\u3067\u51e6\u7406\u3057\u3001\u305d\u306e\u7d50\u679c\u3092Gather\u30ce\u30fc\u30c9\u3067\u7d50\u5408\u3057\u307e\u3059\u3002 # EXPLAIN SELECT cat,count(*),avg(ax) FROM t0 NATURAL JOIN t1 GROUP by cat; QUERY PLAN -------------------------------------------------------------------------------- GroupAggregate (cost=955705.47..955720.93 rows=27 width=20) Group Key: t0.cat -> Sort (cost=955705.47..955707.36 rows=756 width=44) Sort Key: t0.cat -> Gather (cost=955589.95..955669.33 rows=756 width=44) Workers Planned: 4 -> Parallel Custom Scan (GpuPreAgg) (cost=954589.95..954593.73 rows=189 width=44) Reduction: Local GPU Projection: cat, pgstrom.nrows(), pgstrom.nrows((ax IS NOT NULL)), pgstrom.psum(ax) Combined GpuJoin: enabled -> Parallel Custom Scan (GpuJoin) on t0 (cost=27682.82..841218.52 rows=99996736 width=12) GPU Projection: t0.cat, t1.ax Outer Scan: t0 (cost=0.00..1083384.84 rows=24999184 width=8) Depth 1: GpuHashJoin (nrows 24999184...99996736) HashKeys: t0.aid JoinQuals: (t0.aid = t1.aid) KDS-Hash (size: 10.39MB) -> Seq Scan on t1 (cost=0.00..1972.85 rows=103785 width=12) (18 rows) \u4e0b\u4f4d\u30d7\u30e9\u30f3\u306e\u5f15\u304d\u4e0a\u3052 \u203b\u672c\u7bc0\u306e\u5185\u5bb9\u306f\u6709\u52b9\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u6700\u65b0\u306e\u5b9f\u88c5\u3092\u8e0f\u307e\u3048\u305f\u66f8\u304d\u76f4\u3057\u304c\u5fc5\u8981\u3067\u3059\u3002 PG-Strom\u306fSCAN\u3001JOIN\u3001GROUP BY\u306e\u5404\u51e6\u7406\u3092GPU\u3067\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u304c\u3001\u3053\u308c\u306b\u5bfe\u5fdc\u3059\u308bPostgreSQL\u6a19\u6e96\u306e\u51e6\u7406\u3092\u5358\u7d14\u306b\u7f6e\u304d\u63db\u3048\u305f\u3060\u3051\u3067\u306f\u56f0\u3063\u305f\u4e8b\u614b\u304c\u767a\u751f\u3057\u307e\u3059\u3002 SCAN\u304c\u7d42\u308f\u3063\u305f\u5f8c\u306e\u30c7\u30fc\u30bf\u3092\u3044\u3063\u305f\u3093\u30db\u30b9\u30c8\u5074\u306e\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u623b\u3057\u3001\u6b21\u306b\u305d\u308c\u3092JOIN\u3059\u308b\u305f\u3081\u306b\u518d\u3073GPU\u3078\u3068\u30b3\u30d4\u30fc\u3057\u3001\u3055\u3089\u306bGROUP BY\u3092\u5b9f\u884c\u3059\u308b\u524d\u306b\u518d\u3073\u30db\u30b9\u30c8\u5074\u306e\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u623b\u3057\u30fb\u30fb\u30fb\u3068\u3044\u3063\u305f\u5f62\u3067\u3001CPU\u3068GPU\u306e\u9593\u3067\u30c7\u30fc\u30bf\u306e\u30d4\u30f3\u30dd\u30f3\u304c\u767a\u751f\u3057\u3066\u3057\u307e\u3046\u306e\u3067\u3059\u3002 \u3053\u308c\u3092\u907f\u3051\u308b\u305f\u3081\u306b\u3001PG-Strom\u306f\u4e0b\u4f4d\u30d7\u30e9\u30f3\u3092\u5f15\u304d\u4e0a\u3052\u3066\u4e00\u5ea6\u306eGPU Kernel\u306e\u5b9f\u884c\u3067\u51e6\u7406\u3057\u3066\u3057\u307e\u3046\u3068\u3044\u3046\u30e2\u30fc\u30c9\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u30d1\u30bf\u30fc\u30f3\u3067\u4e0b\u4f4d\u30d7\u30e9\u30f3\u306e\u5f15\u304d\u4e0a\u3052\u304c\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 SCAN + JOIN SCAN + GROUP BY SCAN + JOIN + GROUP BY \u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u306f\u3001\u4e0b\u4f4d\u30d7\u30e9\u30f3\u306e\u5f15\u304d\u4e0a\u3052\u3092\u5168\u304f\u884c\u308f\u306a\u3044\u30b1\u30fc\u30b9\u3067\u3059\u3002 GpuScan\u306e\u5b9f\u884c\u7d50\u679c\u3092GpuJoin\u304c\u53d7\u53d6\u308a\u3001\u3055\u3089\u306b\u305d\u306e\u5b9f\u884c\u7d50\u679c\u3092GpuPreAgg\u304c\u53d7\u3051\u53d6\u3063\u3066\u6700\u7d42\u7d50\u679c\u3092\u751f\u6210\u3059\u308b\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 # EXPLAIN SELECT cat,count(*),avg(ax) FROM t0 NATURAL JOIN t1 WHERE aid < bid GROUP BY cat; QUERY PLAN -------------------------------------------------------------------------------- GroupAggregate (cost=1239991.03..1239995.15 rows=27 width=20) Group Key: t0.cat -> Sort (cost=1239991.03..1239991.50 rows=189 width=44) Sort Key: t0.cat -> Custom Scan (GpuPreAgg) (cost=1239980.10..1239983.88 rows=189 width=44) Reduction: Local GPU Projection: cat, pgstrom.nrows(), pgstrom.nrows((ax IS NOT NULL)), pgstrom.psum(ax) -> Custom Scan (GpuJoin) (cost=50776.43..1199522.96 rows=33332245 width=12) GPU Projection: t0.cat, t1.ax Depth 1: GpuHashJoin (nrows 33332245...33332245) HashKeys: t0.aid JoinQuals: (t0.aid = t1.aid) KDS-Hash (size: 10.39MB) -> Custom Scan (GpuScan) on t0 (cost=12634.49..1187710.85 rows=33332245 width=8) GPU Projection: cat, aid GPU Filter: (aid < bid) -> Seq Scan on t1 (cost=0.00..1972.85 rows=103785 width=12) (18 rows) \u3053\u306e\u5834\u5408\u3001\u5404\u5b9f\u884c\u30b9\u30c6\u30fc\u30b8\u306b\u304a\u3044\u3066GPU\u3068\u30db\u30b9\u30c8\u30d0\u30c3\u30d5\u30a1\u306e\u9593\u3067\u30c7\u30fc\u30bf\u306e\u30d4\u30f3\u30dd\u30f3\u304c\u767a\u751f\u3059\u308b\u305f\u3081\u3001\u5b9f\u884c\u52b9\u7387\u306f\u3088\u304f\u3042\u308a\u307e\u305b\u3093\u3002 \u4e00\u65b9\u3001\u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u306f\u3001\u4e0b\u4f4d\u30ce\u30fc\u30c9\u306e\u5f15\u304d\u4e0a\u3052\u3092\u884c\u3063\u305f\u3082\u306e\u3067\u3059\u3002 # EXPLAIN ANALYZE SELECT cat,count(*),avg(ax) FROM t0 NATURAL JOIN t1 WHERE aid < bid GROUP BY cat; QUERY PLAN -------------------------------------------------------------------------------- GroupAggregate (cost=903669.50..903673.62 rows=27 width=20) (actual time=7761.630..7761.644 rows=27 loops=1) Group Key: t0.cat -> Sort (cost=903669.50..903669.97 rows=189 width=44) (actual time=7761.621..7761.626 rows=27 loops=1) Sort Key: t0.cat Sort Method: quicksort Memory: 28kB -> Custom Scan (GpuPreAgg) (cost=903658.57..903662.35 rows=189 width=44) (actual time=7761.531..7761.540 rows=27 loops=1) Reduction: Local GPU Projection: cat, pgstrom.nrows(), pgstrom.nrows((ax IS NOT NULL)), pgstrom.psum(ax) Combined GpuJoin: enabled -> Custom Scan (GpuJoin) on t0 (cost=12483.41..863201.43 rows=33332245 width=12) (never executed) GPU Projection: t0.cat, t1.ax Outer Scan: t0 (cost=12634.49..1187710.85 rows=33332245 width=8) (actual time=59.623..5557.052 rows=100000000 loops=1) Outer Scan Filter: (aid < bid) Rows Removed by Outer Scan Filter: 50002874 Depth 1: GpuHashJoin (plan nrows: 33332245...33332245, actual nrows: 49997126...49997126) HashKeys: t0.aid JoinQuals: (t0.aid = t1.aid) KDS-Hash (size plan: 10.39MB, exec: 64.00MB) -> Seq Scan on t1 (cost=0.00..1972.85 rows=103785 width=12) (actual time=0.013..15.303 rows=100000 loops=1) Planning time: 0.506 ms Execution time: 8495.391 ms (21 rows) \u307e\u305a\u3001\u30c6\u30fc\u30d6\u30eb t0 \u3078\u306e\u30b9\u30ad\u30e3\u30f3\u304cGpuJoin\u306e\u5b9f\u884c\u8a08\u753b\u306b\u57cb\u3081\u8fbc\u307e\u308c\u3001GpuScan\u304c\u6d88\u3048\u3066\u3044\u308b\u4e8b\u306b\u304a\u6c17\u4ed8\u304d\u3067\u3057\u3087\u3046\u3002 \u3053\u308c\u306fGpuJoin\u304c\u914d\u4e0b\u306eGpuScan\u3092\u5f15\u304d\u4e0a\u3052\u3001\u4e00\u4f53\u5316\u3057\u305fGPU\u30ab\u30fc\u30cd\u30eb\u95a2\u6570\u3067WHERE\u53e5\u306e\u51e6\u7406\u3082\u884c\u3063\u305f\u4e8b\u3092\u610f\u5473\u3057\u3066\u3044\u307e\u3059\u3002 \u52a0\u3048\u3066\u5947\u5999\u306a\u3053\u3068\u306b\u3001 EXPLAIN ANALYZE \u306e\u7d50\u679c\u306b\u306fGpuJoin\u304c(never executed)\u3068\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u306fGpuPreAgg\u304c\u914d\u4e0b\u306eGpuJoin\u3092\u5f15\u304d\u4e0a\u3052\u3001\u4e00\u4f53\u5316\u3057\u305fGPU\u30ab\u30fc\u30cd\u30eb\u95a2\u6570\u3067JOIN\u3068GROUP BY\u3092\u5b9f\u884c\u3057\u305f\u4e8b\u3092\u610f\u5473\u3057\u3066\u3044\u307e\u3059\u3002 SCAN\u51e6\u7406\u306e\u5f15\u304d\u4e0a\u3052\u306f pg_strom.pullup_outer_scan \u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3088\u3063\u3066\u5236\u5fa1\u3067\u304d\u307e\u3059\u3002 \u307e\u305f\u3001JOIN\u51e6\u7406\u306e\u5f15\u304d\u4e0a\u3052\u306f pg_strom.pullup_outer_join \u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3088\u3063\u3066\u5236\u5fa1\u3067\u304d\u307e\u3059\u3002 \u3044\u305a\u308c\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3082\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f on \u306b\u8a2d\u5b9a\u3055\u308c\u3066\u304a\u308a\u3001\u901a\u5e38\u306f\u3053\u308c\u3092\u7121\u52b9\u5316\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u30c8\u30e9\u30d6\u30eb\u6642\u306e\u554f\u984c\u5207\u308a\u5206\u3051\u624b\u6bb5\u306e\u4e00\u3064\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 GpuJoin\u306b\u304a\u3051\u308bInner Pinned Buffer \u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u3092\u898b\u3066\u304f\u3060\u3055\u3044\u3002 PG-Strom\u304c\u30c6\u30fc\u30d6\u30eb\u3092\u7d50\u5408\u3059\u308b\u969b\u3001\u901a\u5e38\u306f\u6700\u3082\u30b5\u30a4\u30ba\u306e\u5927\u304d\u306a\u30c6\u30fc\u30d6\u30eb\uff08\u3053\u306e\u5834\u5408\u306f lineorder \u3067\u3001OUTER\u8868\u3068\u547c\u3073\u307e\u3059\uff09\u3092\u975e\u540c\u671f\u7684\u306b\u8aad\u307f\u8fbc\u307f\u306a\u304c\u3089\u3001\u4ed6\u306e\u30c6\u30fc\u30d6\u30eb\u3068\u306e\u7d50\u5408\u51e6\u7406\u304a\u3088\u3073\u96c6\u8a08\u51e6\u7406\u3092\u9032\u3081\u307e\u3059\u3002 JOIN\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u5236\u7d04\u4e0a\u3001\u4e88\u3081\u305d\u308c\u4ee5\u5916\u306e\u30c6\u30fc\u30d6\u30eb\uff08\u3053\u306e\u5834\u5408\u306f date1 \u3001 part \u3001 supplier \u3067\u3001INNER\u8868\u3068\u547c\u3073\u307e\u3059\uff09\u3092\u30e1\u30e2\u30ea\u4e0a\u306b\u8aad\u307f\u51fa\u3057\u3001\u307e\u305fJOIN\u30ad\u30fc\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u3092\u8a08\u7b97\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u30c6\u30fc\u30d6\u30eb\u306fOUTER\u8868\u307b\u3069\u5927\u304d\u306a\u30b5\u30a4\u30ba\u3067\u306f\u306a\u3044\u3082\u306e\u306e\u3001\u6570GB\u3092\u8d8a\u3048\u308b\u3088\u3046\u306aINNER\u30d0\u30c3\u30d5\u30a1\u306e\u6e96\u5099\u306f\u76f8\u5fdc\u306b\u91cd\u3044\u51e6\u7406\u3068\u306a\u308a\u307e\u3059\u3002 GpuJoin\u306f\u901a\u5e38\u3001PostgreSQL\u306eAPI\u3092\u901a\u3057\u3066INNER\u8868\u3092\u4e00\u884c\u3054\u3068\u306b\u8aad\u307f\u51fa\u3057\u3001\u305d\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u3092\u8a08\u7b97\u3059\u308b\u3068\u3068\u3082\u306b\u5171\u6709\u30e1\u30e2\u30ea\u4e0a\u306eINNER\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002GPU-Service\u30d7\u30ed\u30bb\u30b9\u306f\u3001\u3053\u306eINNER\u30d0\u30c3\u30d5\u30a1\u3092GPU\u30e1\u30e2\u30ea\u306b\u8ee2\u9001\u3057\u3001\u305d\u3053\u3067\u306f\u3058\u3081\u3066OUTER\u8868\u3092\u8aad\u307f\u51fa\u3057\u3066JOIN\u51e6\u7406\u3092\u958b\u59cb\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 INNER\u8868\u304c\u76f8\u5fdc\u306b\u5927\u304d\u304fGPU\u3067\u5b9f\u884c\u53ef\u80fd\u306a\u691c\u7d22\u6761\u4ef6\u3092\u542b\u3080\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u306e\u3088\u3046\u306b\u3001GpuJoin\u306e\u914d\u4e0b\u306bGpuScan\u304c\u5b58\u5728\u3059\u308b\u30b1\u30fc\u30b9\u304c\u3042\u308a\u5f97\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001INNER\u8868\u306f\u3044\u3063\u305f\u3093GpuScan\u306b\u3088\u3063\u3066GPU\u3067\u51e6\u7406\u3055\u308c\u305f\u5f8c\u3001\u305d\u306e\u5b9f\u884c\u7d50\u679c\u3092CPU\u5074\u306b\u623b\u3057\u3001\u3055\u3089\u306bINNER\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305f\u5f8c\u3067\u3082\u3046\u4e00\u5ea6GPU\u3078\u30ed\u30fc\u30c9\u3055\u308c\u307e\u3059\u3002\u305a\u3044\u3076\u3093\u3068\u7121\u99c4\u306a\u30c7\u30fc\u30bf\u306e\u6d41\u308c\u304c\u5b58\u5728\u3059\u308b\u3088\u3046\u306b\u898b\u3048\u307e\u3059\u3002 =# explain select sum(lo_revenue), d_year, p_brand1 from lineorder, date1, part, supplier where lo_orderdate = d_datekey and lo_partkey = p_partkey and lo_suppkey = s_suppkey and p_brand1 between 'MFGR#2221' and 'MFGR#2228' and s_region = 'ASIA' group by d_year, p_brand1; QUERY PLAN --------------------------------------------------------------------------------------------------------------- GroupAggregate (cost=31007186.70..31023043.21 rows=6482 width=46) Group Key: date1.d_year, part.p_brand1 -> Sort (cost=31007186.70..31011130.57 rows=1577548 width=20) Sort Key: date1.d_year, part.p_brand1 -> Custom Scan (GpuJoin) on lineorder (cost=275086.19..30844784.03 rows=1577548 width=20) GPU Projection: date1.d_year, part.p_brand1, lineorder.lo_revenue GPU Join Quals [1]: (part.p_partkey = lineorder.lo_partkey) ... [nrows: 5994236000 -> 7804495] GPU Outer Hash [1]: lineorder.lo_partkey GPU Inner Hash [1]: part.p_partkey GPU Join Quals [2]: (supplier.s_suppkey = lineorder.lo_suppkey) ... [nrows: 7804495 -> 1577548] GPU Outer Hash [2]: lineorder.lo_suppkey GPU Inner Hash [2]: supplier.s_suppkey GPU Join Quals [3]: (date1.d_datekey = lineorder.lo_orderdate) ... [nrows: 1577548 -> 1577548] GPU Outer Hash [3]: lineorder.lo_orderdate GPU Inner Hash [3]: date1.d_datekey GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on part (cost=0.00..59258.00 rows=2604 width=14) Filter: ((p_brand1 >= 'MFGR#2221'::bpchar) AND (p_brand1 <= 'MFGR#2228'::bpchar)) -> Custom Scan (GpuScan) on supplier (cost=100.00..190348.83 rows=2019384 width=6) GPU Projection: s_suppkey GPU Pinned Buffer: enabled GPU Scan Quals: (s_region = 'ASIA'::bpchar) [rows: 9990357 -> 2019384] GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 (cost=0.00..72.56 rows=2556 width=8) (24 rows) \u3053\u306e\u3088\u3046\u306b\u3001INNER\u8868\u306e\u8aad\u51fa\u3057\u3084INNER\u30d0\u30c3\u30d5\u30a1\u306e\u69cb\u7bc9\u306e\u969b\u306bCPU\u3068GPU\u306e\u9593\u3067\u30c7\u30fc\u30bf\u306e\u30d4\u30f3\u30dd\u30f3\u304c\u767a\u751f\u3059\u308b\u5834\u5408\u3001 Pinned Inner Buffer \u3092\u4f7f\u7528\u3059\u308b\u3088\u3046\u8a2d\u5b9a\u3059\u308b\u4e8b\u3067\u3001GpuJoin\u306e\u5b9f\u884c\u958b\u59cb\u30ea\u30fc\u30c9\u30bf\u30a4\u30e0\u306e\u77ed\u7e2e\u3084\u3001\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u524a\u6e1b\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4e0a\u306e\u5b9f\u884c\u8a08\u753b\u3067\u306f\u3001 supplier \u8868\u306e\u8aad\u51fa\u3057\u304cGpuScan\u306b\u3088\u308a\u884c\u308f\u308c\u308b\u4e8b\u306b\u306a\u3063\u3066\u304a\u308a\u3001\u7d71\u8a08\u60c5\u5831\u306b\u3088\u308c\u3070\u7d04200\u4e07\u884c\u304c\u8aad\u307f\u51fa\u3055\u308c\u308b\u3068\u63a8\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u305d\u306e\u4e00\u65b9\u3067\u3001 GPU Pinned Buffer: enabled \u306e\u51fa\u529b\u306b\u6ce8\u76ee\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306f\u3001INNER\u8868\u306e\u63a8\u5b9a\u30b5\u30a4\u30ba\u304c pg_strom.pinned_inner_buffer_threshold \u306e\u8a2d\u5b9a\u5024\u3092\u8d8a\u3048\u308b\u5834\u5408\u3001GpuScan\u306e\u51e6\u7406\u7d50\u679c\u3092\u305d\u306e\u307e\u307eGPU\u30e1\u30e2\u30ea\u306b\u6b8b\u3057\u3066\u304a\u304d\u3001\u305d\u308c\u3092\u6b21\u306eGpuJoin\u3067INNER\u30d0\u30c3\u30d5\u30a1\u306e\u4e00\u90e8\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u3068\u3044\u3046\u6a5f\u80fd\u3067\u3059\uff08\u5fc5\u8981\u3067\u3042\u308c\u3070\u30cf\u30c3\u30b7\u30e5\u5024\u306e\u8a08\u7b97\u3082GPU\u3067\u884c\u3044\u307e\u3059\uff09\u3002 \u305d\u306e\u305f\u3081\u3001 supplier \u8868\u306e\u5185\u5bb9\u306fGPU-Direct SQL\u306b\u3088\u3063\u3066\u30b9\u30c8\u30ec\u30fc\u30b8\u304b\u3089GPU\u3078\u3068\u8aad\u307f\u51fa\u3055\u308c\u305f\u5f8c\u3001CPU\u5074\u306b\u623b\u3055\u308c\u305f\u308a\u3001\u518d\u5ea6GPU\u3078\u30ed\u30fc\u30c9\u3055\u308c\u305f\u308a\u3059\u308b\u3053\u3068\u306a\u304f\u3001\u6b21\u306eGpuJoin\u3067\u5229\u7528\u3055\u308c\u308b\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002 \u4e00\u65b9\u3067Pinned Inner Buffer\u306e\u4f7f\u7528\u306b\u306f\u82e5\u5e72\u306e\u30c8\u30ec\u30fc\u30c9\u30aa\u30d5\u3082\u3042\u308b\u305f\u3081\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u672c\u6a5f\u80fd\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u660e\u793a\u7684\u306b pg_strom.pinned_inner_buffer_threshold \u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 Pinned Inner Buffer\u3092\u4f7f\u7528\u3057\u305f\u5834\u5408\u3001CPU\u5074\u306fINNER\u30d0\u30c3\u30d5\u30a1\u306e\u5185\u5bb9\u3092\u5b8c\u5168\u306b\u306f\u4fdd\u6301\u3057\u3066\u3044\u307e\u305b\u3093\u3002\u305d\u306e\u305f\u3081\u3001TOAST\u5316\u3055\u308c\u305f\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u3092GPU\u3067\u53c2\u7167\u3057\u305f\u5834\u5408\u306a\u3069\u3001CPU Fallback\u51e6\u7406\u3092\u884c\u3046\u4e8b\u304c\u3067\u304d\u305a\u30a8\u30e9\u30fc\u3092\u767a\u751f\u3055\u305b\u307e\u3059\u3002\u307e\u305f\u3001CPU Fallback\u3092\u5229\u7528\u3057\u3066\u5b9f\u88c5\u3055\u308c\u3066\u3044\u308bRIGHT/FULL OUTER JOIN\u3082\u540c\u69d8\u306e\u7406\u7531\u3067Pinned Inner Buffer\u3068\u5171\u5b58\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3002 \u30ca\u30ec\u30c3\u30b8\u30d9\u30fc\u30b9 PG-Strom\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306ewiki\u30b5\u30a4\u30c8\u306b\u306f\u3001\u30ce\u30fc\u30c8\u3068\u547c\u3070\u308c\u308b\u8a73\u7d30\u306a\u6280\u8853\u60c5\u5831\u304c\u516c\u958b\u3055\u308c\u3066\u3044\u307e\u3059\u3002 https://github.com/heterodb/pg-strom/wiki","title":"\u57fa\u672c\u7684\u306a\u64cd\u4f5c"},{"location":"operations/#_1","text":"","title":"\u57fa\u672c\u7684\u306a\u64cd\u4f5c"},{"location":"operations/#gpu","text":"\u30af\u30a8\u30ea\u304cGPU\u3067\u5b9f\u884c\u3055\u308c\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306f EXPLAIN \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 SQL\u51e6\u7406\u306f\u5185\u90e8\u7684\u306b\u3044\u304f\u3064\u304b\u306e\u8981\u7d20\u306b\u5206\u89e3\u3055\u308c\u51e6\u7406\u3055\u308c\u307e\u3059\u304c\u3001PG-Strom\u304cGPU\u3092\u9069\u7528\u3057\u3066\u4e26\u5217\u51e6\u7406\u3092\u884c\u3046\u306e\u306fSCAN\u3001JOIN\u3001GROUP BY\u306e\u5404\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3067\u3059\u3002\u6a19\u6e96\u3067PostgreSQL\u304c\u63d0\u4f9b\u3057\u3066\u3044\u308b\u5404\u51e6\u7406\u306e\u4ee3\u308f\u308a\u306b\u3001GpuScan\u3001GpuJoin\u3001GpuPreAgg\u304c\u8868\u793a\u3055\u308c\u305f\u5834\u5408\u3001\u305d\u306e\u30af\u30a8\u30ea\u306fGPU\u306b\u3088\u3063\u3066\u51e6\u7406\u3055\u308c\u308b\u4e8b\u3068\u306a\u308a\u307e\u3059\u3002 \u4ee5\u4e0b\u306f EXPLAIN \u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u4f8b\u3067\u3059\u3002 postgres=# EXPLAIN SELECT cat,count(*),avg(ax) FROM t0 NATURAL JOIN t1 NATURAL JOIN t2 GROUP BY cat; QUERY PLAN -------------------------------------------------------------------------------- GroupAggregate (cost=989186.82..989190.94 rows=27 width=20) Group Key: t0.cat -> Sort (cost=989186.82..989187.29 rows=189 width=44) Sort Key: t0.cat -> Custom Scan (GpuPreAgg) (cost=989175.89..989179.67 rows=189 width=44) Reduction: Local GPU Projection: cat, pgstrom.nrows(), pgstrom.nrows((ax IS NOT NULL)), pgstrom.psum(ax) Combined GpuJoin: enabled -> Custom Scan (GpuJoin) on t0 (cost=14744.40..875804.46 rows=99996736 width=12) GPU Projection: t0.cat, t1.ax Outer Scan: t0 (cost=0.00..1833360.36 rows=99996736 width=12) Depth 1: GpuHashJoin (nrows 99996736...99996736) HashKeys: t0.aid JoinQuals: (t0.aid = t1.aid) KDS-Hash (size: 10.39MB) Depth 2: GpuHashJoin (nrows 99996736...99996736) HashKeys: t0.bid JoinQuals: (t0.bid = t2.bid) KDS-Hash (size: 10.78MB) -> Seq Scan on t1 (cost=0.00..1972.85 rows=103785 width=12) -> Seq Scan on t2 (cost=0.00..1935.00 rows=100000 width=4) (21 rows) \u5b9f\u884c\u8a08\u753b\u306e\u4e2d\u306b\u898b\u6163\u308c\u306a\u3044\u51e6\u7406\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u4e8b\u306b\u6c17\u304c\u4ed8\u304b\u308c\u305f\u3067\u3057\u3087\u3046\u3002 CustomScan\u6a5f\u69cb\u3092\u7528\u3044\u3066GpuJoin\u304a\u3088\u3073GpuPreAgg\u304c\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u3053\u3067GpuJoin\u306f t0 \u3068 t1 \u3001\u304a\u3088\u3073 t2 \u3068\u306eJOIN\u51e6\u7406\u3092\u5b9f\u884c\u3057\u3001\u305d\u306e\u7d50\u679c\u3092\u53d7\u3051\u53d6\u308bGpuPreAgg\u306f\u5217 cat \u306b\u3088\u308bGROUP BY\u51e6\u7406\u3092GPU\u3067\u5b9f\u884c\u3057\u307e\u3059\u3002 PostgreSQL\u304c\u30af\u30a8\u30ea\u5b9f\u884c\u8a08\u753b\u3092\u69cb\u7bc9\u3059\u308b\u904e\u7a0b\u3067PG-Strom\u306f\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306b\u4ecb\u5165\u3057\u3001SCAN\u3001JOIN\u3001GROUP BY\u306e\u5404\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092GPU\u3067\u5b9f\u884c\u53ef\u80fd\u3067\u3042\u308b\u5834\u5408\u3001\u305d\u306e\u30b3\u30b9\u30c8\u3092\u7b97\u51fa\u3057\u3066PostgreSQL\u306e\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306b\u5b9f\u884c\u8a08\u753b\u306e\u5019\u88dc\u3092\u63d0\u793a\u3057\u307e\u3059\u3002 \u63a8\u5b9a\u3055\u308c\u305f\u30b3\u30b9\u30c8\u5024\u304cCPU\u3067\u5b9f\u884c\u3059\u308b\u4ed6\u306e\u5b9f\u884c\u8a08\u753b\u3088\u308a\u3082\u5c0f\u3055\u306a\u5024\u3067\u3042\u308b\u5834\u5408\u3001GPU\u3092\u7528\u3044\u305f\u4ee3\u66ff\u306e\u5b9f\u884c\u8a08\u753b\u304c\u63a1\u7528\u3055\u308c\u308b\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002 \u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092GPU\u3067\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u5c11\u306a\u304f\u3068\u3082\u6f14\u7b97\u5f0f\u307e\u305f\u306f\u95a2\u6570\u3001\u304a\u3088\u3073\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u578b\u304cPG-Strom\u3067\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 int \u3084 float \u3068\u3044\u3063\u305f\u6570\u5024\u578b\u3001 date \u3084 timestamp \u3068\u3044\u3063\u305f\u65e5\u4ed8\u6642\u523b\u578b\u3001 text \u306e\u3088\u3046\u306a\u6587\u5b57\u5217\u578b\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u304a\u308a\u3001\u307e\u305f\u3001\u56db\u5247\u6f14\u7b97\u3084\u5927\u5c0f\u6bd4\u8f03\u3068\u3044\u3063\u305f\u6570\u591a\u304f\u306e\u30d3\u30eb\u30c8\u30a4\u30f3\u6f14\u7b97\u5b50\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u8a73\u7d30\u306a\u4e00\u89a7\u306b\u95a2\u3057\u3066\u306f \u30ea\u30d5\u30a1\u30ec\u30f3\u30b9 \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002","title":"GPU\u30aa\u30d5\u30ed\u30fc\u30c9\u306e\u78ba\u8a8d"},{"location":"operations/#cpugpu","text":"PG-Strom\u306fPostgreSQL\u306eCPU\u4e26\u5217\u5b9f\u884c\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002 PostgreSQL\u306eCPU\u4e26\u5217\u5b9f\u884c\u306f\u3001Gather\u30ce\u30fc\u30c9\u304c\u3044\u304f\u3064\u304b\u306e\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30d7\u30ed\u30bb\u30b9\u3092\u8d77\u52d5\u3057\u3001\u5404\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u304c\"\u90e8\u5206\u7684\u306b\"\u5b9f\u884c\u3057\u305f\u30af\u30a8\u30ea\u306e\u7d50\u679c\u3092\u5f8c\u3067\u7d50\u5408\u3059\u308b\u5f62\u3067\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u3059\u3002 GpuJoin\u3084GpuPreAgg\u3068\u3044\u3063\u305fPG-Strom\u306e\u51e6\u7406\u306f\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u5074\u3067\u306e\u5b9f\u884c\u306b\u5bfe\u5fdc\u3057\u3066\u304a\u308a\u3001\u500b\u3005\u306e\u30d7\u30ed\u30bb\u30b9\u304c\u4e92\u3044\u306bGPU\u3092\u4f7f\u7528\u3057\u3066\u51e6\u7406\u3092\u9032\u3081\u307e\u3059\u3002\u901a\u5e38\u3001GPU\u3078\u30c7\u30fc\u30bf\u3092\u4f9b\u7d66\u3059\u308b\u305f\u3081\u306b\u500b\u3005\u306eCPU\u30b3\u30a2\u304c\u30d0\u30c3\u30d5\u30a1\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b\u305f\u3081\u306e\u51e6\u7406\u901f\u5ea6\u306f\u3001GPU\u3067\u306eSQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u51e6\u7406\u901f\u5ea6\u306b\u6bd4\u3079\u3066\u305a\u3063\u3068\u9045\u3044\u305f\u3081\u3001CPU\u4e26\u5217\u3068GPU\u4e26\u5217\u3092\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u3067\u5229\u7528\u3059\u308b\u4e8b\u3067\u51e6\u7406\u901f\u5ea6\u306e\u5411\u4e0a\u304c\u671f\u5f85\u3067\u304d\u307e\u3059\u3002 \u305f\u3060\u3057\u3001GPU\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306aCUDA\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306f\u5404\u30d7\u30ed\u30bb\u30b9\u3054\u3068\u306b\u4f5c\u6210\u3055\u308c\u3001CUDA\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3092\u751f\u6210\u3059\u308b\u305f\u3073\u306b\u3042\u308b\u7a0b\u5ea6\u306eGPU\u30ea\u30bd\u30fc\u30b9\u304c\u6d88\u8cbb\u3055\u308c\u308b\u305f\u3081\u3001\u5e38\u306bCPU\u4e26\u5217\u5ea6\u304c\u9ad8\u3051\u308c\u3070\u826f\u3044\u3068\u3044\u3046\u8a33\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u3092\u898b\u3066\u304f\u3060\u3055\u3044\u3002 Gather\u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u306f\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u304c\u5b9f\u884c\u53ef\u80fd\u306a\u3082\u306e\u3067\u3059\u30021\u5104\u884c\u3092\u4fdd\u6301\u3059\u308b t0 \u30c6\u30fc\u30d6\u30eb\u30924\u30d7\u30ed\u30bb\u30b9\u306e\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u3068\u30b3\u30fc\u30c7\u30a3\u30cd\u30fc\u30bf\u30d7\u30ed\u30bb\u30b9\u3067\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u305f\u3081\u3001\u30d7\u30ed\u30bb\u30b9\u3042\u305f\u308a2000\u4e07\u884c\u3092GpuJoin\u304a\u3088\u3073GpuPreAgg\u3067\u51e6\u7406\u3057\u3001\u305d\u306e\u7d50\u679c\u3092Gather\u30ce\u30fc\u30c9\u3067\u7d50\u5408\u3057\u307e\u3059\u3002 # EXPLAIN SELECT cat,count(*),avg(ax) FROM t0 NATURAL JOIN t1 GROUP by cat; QUERY PLAN -------------------------------------------------------------------------------- GroupAggregate (cost=955705.47..955720.93 rows=27 width=20) Group Key: t0.cat -> Sort (cost=955705.47..955707.36 rows=756 width=44) Sort Key: t0.cat -> Gather (cost=955589.95..955669.33 rows=756 width=44) Workers Planned: 4 -> Parallel Custom Scan (GpuPreAgg) (cost=954589.95..954593.73 rows=189 width=44) Reduction: Local GPU Projection: cat, pgstrom.nrows(), pgstrom.nrows((ax IS NOT NULL)), pgstrom.psum(ax) Combined GpuJoin: enabled -> Parallel Custom Scan (GpuJoin) on t0 (cost=27682.82..841218.52 rows=99996736 width=12) GPU Projection: t0.cat, t1.ax Outer Scan: t0 (cost=0.00..1083384.84 rows=24999184 width=8) Depth 1: GpuHashJoin (nrows 24999184...99996736) HashKeys: t0.aid JoinQuals: (t0.aid = t1.aid) KDS-Hash (size: 10.39MB) -> Seq Scan on t1 (cost=0.00..1972.85 rows=103785 width=12) (18 rows)","title":"CPU+GPU\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u4e26\u5217"},{"location":"operations/#_2","text":"\u203b\u672c\u7bc0\u306e\u5185\u5bb9\u306f\u6709\u52b9\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u6700\u65b0\u306e\u5b9f\u88c5\u3092\u8e0f\u307e\u3048\u305f\u66f8\u304d\u76f4\u3057\u304c\u5fc5\u8981\u3067\u3059\u3002 PG-Strom\u306fSCAN\u3001JOIN\u3001GROUP BY\u306e\u5404\u51e6\u7406\u3092GPU\u3067\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u304c\u3001\u3053\u308c\u306b\u5bfe\u5fdc\u3059\u308bPostgreSQL\u6a19\u6e96\u306e\u51e6\u7406\u3092\u5358\u7d14\u306b\u7f6e\u304d\u63db\u3048\u305f\u3060\u3051\u3067\u306f\u56f0\u3063\u305f\u4e8b\u614b\u304c\u767a\u751f\u3057\u307e\u3059\u3002 SCAN\u304c\u7d42\u308f\u3063\u305f\u5f8c\u306e\u30c7\u30fc\u30bf\u3092\u3044\u3063\u305f\u3093\u30db\u30b9\u30c8\u5074\u306e\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u623b\u3057\u3001\u6b21\u306b\u305d\u308c\u3092JOIN\u3059\u308b\u305f\u3081\u306b\u518d\u3073GPU\u3078\u3068\u30b3\u30d4\u30fc\u3057\u3001\u3055\u3089\u306bGROUP BY\u3092\u5b9f\u884c\u3059\u308b\u524d\u306b\u518d\u3073\u30db\u30b9\u30c8\u5074\u306e\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u623b\u3057\u30fb\u30fb\u30fb\u3068\u3044\u3063\u305f\u5f62\u3067\u3001CPU\u3068GPU\u306e\u9593\u3067\u30c7\u30fc\u30bf\u306e\u30d4\u30f3\u30dd\u30f3\u304c\u767a\u751f\u3057\u3066\u3057\u307e\u3046\u306e\u3067\u3059\u3002 \u3053\u308c\u3092\u907f\u3051\u308b\u305f\u3081\u306b\u3001PG-Strom\u306f\u4e0b\u4f4d\u30d7\u30e9\u30f3\u3092\u5f15\u304d\u4e0a\u3052\u3066\u4e00\u5ea6\u306eGPU Kernel\u306e\u5b9f\u884c\u3067\u51e6\u7406\u3057\u3066\u3057\u307e\u3046\u3068\u3044\u3046\u30e2\u30fc\u30c9\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u30d1\u30bf\u30fc\u30f3\u3067\u4e0b\u4f4d\u30d7\u30e9\u30f3\u306e\u5f15\u304d\u4e0a\u3052\u304c\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 SCAN + JOIN SCAN + GROUP BY SCAN + JOIN + GROUP BY \u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u306f\u3001\u4e0b\u4f4d\u30d7\u30e9\u30f3\u306e\u5f15\u304d\u4e0a\u3052\u3092\u5168\u304f\u884c\u308f\u306a\u3044\u30b1\u30fc\u30b9\u3067\u3059\u3002 GpuScan\u306e\u5b9f\u884c\u7d50\u679c\u3092GpuJoin\u304c\u53d7\u53d6\u308a\u3001\u3055\u3089\u306b\u305d\u306e\u5b9f\u884c\u7d50\u679c\u3092GpuPreAgg\u304c\u53d7\u3051\u53d6\u3063\u3066\u6700\u7d42\u7d50\u679c\u3092\u751f\u6210\u3059\u308b\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 # EXPLAIN SELECT cat,count(*),avg(ax) FROM t0 NATURAL JOIN t1 WHERE aid < bid GROUP BY cat; QUERY PLAN -------------------------------------------------------------------------------- GroupAggregate (cost=1239991.03..1239995.15 rows=27 width=20) Group Key: t0.cat -> Sort (cost=1239991.03..1239991.50 rows=189 width=44) Sort Key: t0.cat -> Custom Scan (GpuPreAgg) (cost=1239980.10..1239983.88 rows=189 width=44) Reduction: Local GPU Projection: cat, pgstrom.nrows(), pgstrom.nrows((ax IS NOT NULL)), pgstrom.psum(ax) -> Custom Scan (GpuJoin) (cost=50776.43..1199522.96 rows=33332245 width=12) GPU Projection: t0.cat, t1.ax Depth 1: GpuHashJoin (nrows 33332245...33332245) HashKeys: t0.aid JoinQuals: (t0.aid = t1.aid) KDS-Hash (size: 10.39MB) -> Custom Scan (GpuScan) on t0 (cost=12634.49..1187710.85 rows=33332245 width=8) GPU Projection: cat, aid GPU Filter: (aid < bid) -> Seq Scan on t1 (cost=0.00..1972.85 rows=103785 width=12) (18 rows) \u3053\u306e\u5834\u5408\u3001\u5404\u5b9f\u884c\u30b9\u30c6\u30fc\u30b8\u306b\u304a\u3044\u3066GPU\u3068\u30db\u30b9\u30c8\u30d0\u30c3\u30d5\u30a1\u306e\u9593\u3067\u30c7\u30fc\u30bf\u306e\u30d4\u30f3\u30dd\u30f3\u304c\u767a\u751f\u3059\u308b\u305f\u3081\u3001\u5b9f\u884c\u52b9\u7387\u306f\u3088\u304f\u3042\u308a\u307e\u305b\u3093\u3002 \u4e00\u65b9\u3001\u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u306f\u3001\u4e0b\u4f4d\u30ce\u30fc\u30c9\u306e\u5f15\u304d\u4e0a\u3052\u3092\u884c\u3063\u305f\u3082\u306e\u3067\u3059\u3002 # EXPLAIN ANALYZE SELECT cat,count(*),avg(ax) FROM t0 NATURAL JOIN t1 WHERE aid < bid GROUP BY cat; QUERY PLAN -------------------------------------------------------------------------------- GroupAggregate (cost=903669.50..903673.62 rows=27 width=20) (actual time=7761.630..7761.644 rows=27 loops=1) Group Key: t0.cat -> Sort (cost=903669.50..903669.97 rows=189 width=44) (actual time=7761.621..7761.626 rows=27 loops=1) Sort Key: t0.cat Sort Method: quicksort Memory: 28kB -> Custom Scan (GpuPreAgg) (cost=903658.57..903662.35 rows=189 width=44) (actual time=7761.531..7761.540 rows=27 loops=1) Reduction: Local GPU Projection: cat, pgstrom.nrows(), pgstrom.nrows((ax IS NOT NULL)), pgstrom.psum(ax) Combined GpuJoin: enabled -> Custom Scan (GpuJoin) on t0 (cost=12483.41..863201.43 rows=33332245 width=12) (never executed) GPU Projection: t0.cat, t1.ax Outer Scan: t0 (cost=12634.49..1187710.85 rows=33332245 width=8) (actual time=59.623..5557.052 rows=100000000 loops=1) Outer Scan Filter: (aid < bid) Rows Removed by Outer Scan Filter: 50002874 Depth 1: GpuHashJoin (plan nrows: 33332245...33332245, actual nrows: 49997126...49997126) HashKeys: t0.aid JoinQuals: (t0.aid = t1.aid) KDS-Hash (size plan: 10.39MB, exec: 64.00MB) -> Seq Scan on t1 (cost=0.00..1972.85 rows=103785 width=12) (actual time=0.013..15.303 rows=100000 loops=1) Planning time: 0.506 ms Execution time: 8495.391 ms (21 rows) \u307e\u305a\u3001\u30c6\u30fc\u30d6\u30eb t0 \u3078\u306e\u30b9\u30ad\u30e3\u30f3\u304cGpuJoin\u306e\u5b9f\u884c\u8a08\u753b\u306b\u57cb\u3081\u8fbc\u307e\u308c\u3001GpuScan\u304c\u6d88\u3048\u3066\u3044\u308b\u4e8b\u306b\u304a\u6c17\u4ed8\u304d\u3067\u3057\u3087\u3046\u3002 \u3053\u308c\u306fGpuJoin\u304c\u914d\u4e0b\u306eGpuScan\u3092\u5f15\u304d\u4e0a\u3052\u3001\u4e00\u4f53\u5316\u3057\u305fGPU\u30ab\u30fc\u30cd\u30eb\u95a2\u6570\u3067WHERE\u53e5\u306e\u51e6\u7406\u3082\u884c\u3063\u305f\u4e8b\u3092\u610f\u5473\u3057\u3066\u3044\u307e\u3059\u3002 \u52a0\u3048\u3066\u5947\u5999\u306a\u3053\u3068\u306b\u3001 EXPLAIN ANALYZE \u306e\u7d50\u679c\u306b\u306fGpuJoin\u304c(never executed)\u3068\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u306fGpuPreAgg\u304c\u914d\u4e0b\u306eGpuJoin\u3092\u5f15\u304d\u4e0a\u3052\u3001\u4e00\u4f53\u5316\u3057\u305fGPU\u30ab\u30fc\u30cd\u30eb\u95a2\u6570\u3067JOIN\u3068GROUP BY\u3092\u5b9f\u884c\u3057\u305f\u4e8b\u3092\u610f\u5473\u3057\u3066\u3044\u307e\u3059\u3002 SCAN\u51e6\u7406\u306e\u5f15\u304d\u4e0a\u3052\u306f pg_strom.pullup_outer_scan \u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3088\u3063\u3066\u5236\u5fa1\u3067\u304d\u307e\u3059\u3002 \u307e\u305f\u3001JOIN\u51e6\u7406\u306e\u5f15\u304d\u4e0a\u3052\u306f pg_strom.pullup_outer_join \u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3088\u3063\u3066\u5236\u5fa1\u3067\u304d\u307e\u3059\u3002 \u3044\u305a\u308c\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3082\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f on \u306b\u8a2d\u5b9a\u3055\u308c\u3066\u304a\u308a\u3001\u901a\u5e38\u306f\u3053\u308c\u3092\u7121\u52b9\u5316\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u30c8\u30e9\u30d6\u30eb\u6642\u306e\u554f\u984c\u5207\u308a\u5206\u3051\u624b\u6bb5\u306e\u4e00\u3064\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002","title":"\u4e0b\u4f4d\u30d7\u30e9\u30f3\u306e\u5f15\u304d\u4e0a\u3052"},{"location":"operations/#gpujoininner-pinned-buffer","text":"\u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u3092\u898b\u3066\u304f\u3060\u3055\u3044\u3002 PG-Strom\u304c\u30c6\u30fc\u30d6\u30eb\u3092\u7d50\u5408\u3059\u308b\u969b\u3001\u901a\u5e38\u306f\u6700\u3082\u30b5\u30a4\u30ba\u306e\u5927\u304d\u306a\u30c6\u30fc\u30d6\u30eb\uff08\u3053\u306e\u5834\u5408\u306f lineorder \u3067\u3001OUTER\u8868\u3068\u547c\u3073\u307e\u3059\uff09\u3092\u975e\u540c\u671f\u7684\u306b\u8aad\u307f\u8fbc\u307f\u306a\u304c\u3089\u3001\u4ed6\u306e\u30c6\u30fc\u30d6\u30eb\u3068\u306e\u7d50\u5408\u51e6\u7406\u304a\u3088\u3073\u96c6\u8a08\u51e6\u7406\u3092\u9032\u3081\u307e\u3059\u3002 JOIN\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u5236\u7d04\u4e0a\u3001\u4e88\u3081\u305d\u308c\u4ee5\u5916\u306e\u30c6\u30fc\u30d6\u30eb\uff08\u3053\u306e\u5834\u5408\u306f date1 \u3001 part \u3001 supplier \u3067\u3001INNER\u8868\u3068\u547c\u3073\u307e\u3059\uff09\u3092\u30e1\u30e2\u30ea\u4e0a\u306b\u8aad\u307f\u51fa\u3057\u3001\u307e\u305fJOIN\u30ad\u30fc\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u3092\u8a08\u7b97\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u30c6\u30fc\u30d6\u30eb\u306fOUTER\u8868\u307b\u3069\u5927\u304d\u306a\u30b5\u30a4\u30ba\u3067\u306f\u306a\u3044\u3082\u306e\u306e\u3001\u6570GB\u3092\u8d8a\u3048\u308b\u3088\u3046\u306aINNER\u30d0\u30c3\u30d5\u30a1\u306e\u6e96\u5099\u306f\u76f8\u5fdc\u306b\u91cd\u3044\u51e6\u7406\u3068\u306a\u308a\u307e\u3059\u3002 GpuJoin\u306f\u901a\u5e38\u3001PostgreSQL\u306eAPI\u3092\u901a\u3057\u3066INNER\u8868\u3092\u4e00\u884c\u3054\u3068\u306b\u8aad\u307f\u51fa\u3057\u3001\u305d\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u3092\u8a08\u7b97\u3059\u308b\u3068\u3068\u3082\u306b\u5171\u6709\u30e1\u30e2\u30ea\u4e0a\u306eINNER\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002GPU-Service\u30d7\u30ed\u30bb\u30b9\u306f\u3001\u3053\u306eINNER\u30d0\u30c3\u30d5\u30a1\u3092GPU\u30e1\u30e2\u30ea\u306b\u8ee2\u9001\u3057\u3001\u305d\u3053\u3067\u306f\u3058\u3081\u3066OUTER\u8868\u3092\u8aad\u307f\u51fa\u3057\u3066JOIN\u51e6\u7406\u3092\u958b\u59cb\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 INNER\u8868\u304c\u76f8\u5fdc\u306b\u5927\u304d\u304fGPU\u3067\u5b9f\u884c\u53ef\u80fd\u306a\u691c\u7d22\u6761\u4ef6\u3092\u542b\u3080\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u306e\u3088\u3046\u306b\u3001GpuJoin\u306e\u914d\u4e0b\u306bGpuScan\u304c\u5b58\u5728\u3059\u308b\u30b1\u30fc\u30b9\u304c\u3042\u308a\u5f97\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001INNER\u8868\u306f\u3044\u3063\u305f\u3093GpuScan\u306b\u3088\u3063\u3066GPU\u3067\u51e6\u7406\u3055\u308c\u305f\u5f8c\u3001\u305d\u306e\u5b9f\u884c\u7d50\u679c\u3092CPU\u5074\u306b\u623b\u3057\u3001\u3055\u3089\u306bINNER\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305f\u5f8c\u3067\u3082\u3046\u4e00\u5ea6GPU\u3078\u30ed\u30fc\u30c9\u3055\u308c\u307e\u3059\u3002\u305a\u3044\u3076\u3093\u3068\u7121\u99c4\u306a\u30c7\u30fc\u30bf\u306e\u6d41\u308c\u304c\u5b58\u5728\u3059\u308b\u3088\u3046\u306b\u898b\u3048\u307e\u3059\u3002 =# explain select sum(lo_revenue), d_year, p_brand1 from lineorder, date1, part, supplier where lo_orderdate = d_datekey and lo_partkey = p_partkey and lo_suppkey = s_suppkey and p_brand1 between 'MFGR#2221' and 'MFGR#2228' and s_region = 'ASIA' group by d_year, p_brand1; QUERY PLAN --------------------------------------------------------------------------------------------------------------- GroupAggregate (cost=31007186.70..31023043.21 rows=6482 width=46) Group Key: date1.d_year, part.p_brand1 -> Sort (cost=31007186.70..31011130.57 rows=1577548 width=20) Sort Key: date1.d_year, part.p_brand1 -> Custom Scan (GpuJoin) on lineorder (cost=275086.19..30844784.03 rows=1577548 width=20) GPU Projection: date1.d_year, part.p_brand1, lineorder.lo_revenue GPU Join Quals [1]: (part.p_partkey = lineorder.lo_partkey) ... [nrows: 5994236000 -> 7804495] GPU Outer Hash [1]: lineorder.lo_partkey GPU Inner Hash [1]: part.p_partkey GPU Join Quals [2]: (supplier.s_suppkey = lineorder.lo_suppkey) ... [nrows: 7804495 -> 1577548] GPU Outer Hash [2]: lineorder.lo_suppkey GPU Inner Hash [2]: supplier.s_suppkey GPU Join Quals [3]: (date1.d_datekey = lineorder.lo_orderdate) ... [nrows: 1577548 -> 1577548] GPU Outer Hash [3]: lineorder.lo_orderdate GPU Inner Hash [3]: date1.d_datekey GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on part (cost=0.00..59258.00 rows=2604 width=14) Filter: ((p_brand1 >= 'MFGR#2221'::bpchar) AND (p_brand1 <= 'MFGR#2228'::bpchar)) -> Custom Scan (GpuScan) on supplier (cost=100.00..190348.83 rows=2019384 width=6) GPU Projection: s_suppkey GPU Pinned Buffer: enabled GPU Scan Quals: (s_region = 'ASIA'::bpchar) [rows: 9990357 -> 2019384] GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 (cost=0.00..72.56 rows=2556 width=8) (24 rows) \u3053\u306e\u3088\u3046\u306b\u3001INNER\u8868\u306e\u8aad\u51fa\u3057\u3084INNER\u30d0\u30c3\u30d5\u30a1\u306e\u69cb\u7bc9\u306e\u969b\u306bCPU\u3068GPU\u306e\u9593\u3067\u30c7\u30fc\u30bf\u306e\u30d4\u30f3\u30dd\u30f3\u304c\u767a\u751f\u3059\u308b\u5834\u5408\u3001 Pinned Inner Buffer \u3092\u4f7f\u7528\u3059\u308b\u3088\u3046\u8a2d\u5b9a\u3059\u308b\u4e8b\u3067\u3001GpuJoin\u306e\u5b9f\u884c\u958b\u59cb\u30ea\u30fc\u30c9\u30bf\u30a4\u30e0\u306e\u77ed\u7e2e\u3084\u3001\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u524a\u6e1b\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4e0a\u306e\u5b9f\u884c\u8a08\u753b\u3067\u306f\u3001 supplier \u8868\u306e\u8aad\u51fa\u3057\u304cGpuScan\u306b\u3088\u308a\u884c\u308f\u308c\u308b\u4e8b\u306b\u306a\u3063\u3066\u304a\u308a\u3001\u7d71\u8a08\u60c5\u5831\u306b\u3088\u308c\u3070\u7d04200\u4e07\u884c\u304c\u8aad\u307f\u51fa\u3055\u308c\u308b\u3068\u63a8\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u305d\u306e\u4e00\u65b9\u3067\u3001 GPU Pinned Buffer: enabled \u306e\u51fa\u529b\u306b\u6ce8\u76ee\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306f\u3001INNER\u8868\u306e\u63a8\u5b9a\u30b5\u30a4\u30ba\u304c pg_strom.pinned_inner_buffer_threshold \u306e\u8a2d\u5b9a\u5024\u3092\u8d8a\u3048\u308b\u5834\u5408\u3001GpuScan\u306e\u51e6\u7406\u7d50\u679c\u3092\u305d\u306e\u307e\u307eGPU\u30e1\u30e2\u30ea\u306b\u6b8b\u3057\u3066\u304a\u304d\u3001\u305d\u308c\u3092\u6b21\u306eGpuJoin\u3067INNER\u30d0\u30c3\u30d5\u30a1\u306e\u4e00\u90e8\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u3068\u3044\u3046\u6a5f\u80fd\u3067\u3059\uff08\u5fc5\u8981\u3067\u3042\u308c\u3070\u30cf\u30c3\u30b7\u30e5\u5024\u306e\u8a08\u7b97\u3082GPU\u3067\u884c\u3044\u307e\u3059\uff09\u3002 \u305d\u306e\u305f\u3081\u3001 supplier \u8868\u306e\u5185\u5bb9\u306fGPU-Direct SQL\u306b\u3088\u3063\u3066\u30b9\u30c8\u30ec\u30fc\u30b8\u304b\u3089GPU\u3078\u3068\u8aad\u307f\u51fa\u3055\u308c\u305f\u5f8c\u3001CPU\u5074\u306b\u623b\u3055\u308c\u305f\u308a\u3001\u518d\u5ea6GPU\u3078\u30ed\u30fc\u30c9\u3055\u308c\u305f\u308a\u3059\u308b\u3053\u3068\u306a\u304f\u3001\u6b21\u306eGpuJoin\u3067\u5229\u7528\u3055\u308c\u308b\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002 \u4e00\u65b9\u3067Pinned Inner Buffer\u306e\u4f7f\u7528\u306b\u306f\u82e5\u5e72\u306e\u30c8\u30ec\u30fc\u30c9\u30aa\u30d5\u3082\u3042\u308b\u305f\u3081\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u672c\u6a5f\u80fd\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u660e\u793a\u7684\u306b pg_strom.pinned_inner_buffer_threshold \u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 Pinned Inner Buffer\u3092\u4f7f\u7528\u3057\u305f\u5834\u5408\u3001CPU\u5074\u306fINNER\u30d0\u30c3\u30d5\u30a1\u306e\u5185\u5bb9\u3092\u5b8c\u5168\u306b\u306f\u4fdd\u6301\u3057\u3066\u3044\u307e\u305b\u3093\u3002\u305d\u306e\u305f\u3081\u3001TOAST\u5316\u3055\u308c\u305f\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u3092GPU\u3067\u53c2\u7167\u3057\u305f\u5834\u5408\u306a\u3069\u3001CPU Fallback\u51e6\u7406\u3092\u884c\u3046\u4e8b\u304c\u3067\u304d\u305a\u30a8\u30e9\u30fc\u3092\u767a\u751f\u3055\u305b\u307e\u3059\u3002\u307e\u305f\u3001CPU Fallback\u3092\u5229\u7528\u3057\u3066\u5b9f\u88c5\u3055\u308c\u3066\u3044\u308bRIGHT/FULL OUTER JOIN\u3082\u540c\u69d8\u306e\u7406\u7531\u3067Pinned Inner Buffer\u3068\u5171\u5b58\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3002","title":"GpuJoin\u306b\u304a\u3051\u308bInner Pinned Buffer"},{"location":"operations/#_3","text":"PG-Strom\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306ewiki\u30b5\u30a4\u30c8\u306b\u306f\u3001\u30ce\u30fc\u30c8\u3068\u547c\u3070\u308c\u308b\u8a73\u7d30\u306a\u6280\u8853\u60c5\u5831\u304c\u516c\u958b\u3055\u308c\u3066\u3044\u307e\u3059\u3002 https://github.com/heterodb/pg-strom/wiki","title":"\u30ca\u30ec\u30c3\u30b8\u30d9\u30fc\u30b9"},{"location":"partition/","text":"\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3 \u672c\u7ae0\u3067\u306fPostgreSQL\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u6a5f\u80fd\u3068PG-Strom\u3092\u4f75\u7528\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u306a\u304a\u3001\u672c\u7ae0\u306e\u5185\u5bb9\u306f PostgreSQL v11\u4ee5\u964d \u3067PG-Strom\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306b\u306e\u307f\u6709\u52b9\u3067\u3059\u3002 PostgreSQL\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u6a5f\u80fd\u306b\u3064\u3044\u3066\u3001\u8a73\u3057\u304f\u306f PostgreSQL\u6587\u66f8\uff1a\u30c6\u30fc\u30d6\u30eb\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0 \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u6982\u8981 PostgreSQL v10\u306b\u304a\u3044\u3066\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u6a5f\u80fd\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u307e\u3057\u305f\u3002 \u3053\u308c\u306f\u3001\u8ad6\u7406\u7684\u306b\u306f\u4e00\u500b\u306e\u5927\u304d\u306a\u30c6\u30fc\u30d6\u30eb\u3067\u3042\u308b\u3082\u306e\u3092\u7269\u7406\u7684\u306b\u3088\u308a\u5c0f\u3055\u306a\u30c6\u30fc\u30d6\u30eb\u306b\u5206\u5272\u3057\u3066\u683c\u7d0d\u3059\u308b\u4ed5\u7d44\u307f\u3067\u3001\u691c\u7d22\u6761\u4ef6\u3088\u308a\u660e\u3089\u304b\u306b\u30b9\u30ad\u30e3\u30f3\u306e\u5fc5\u8981\u304c\u306a\u3044\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u305f\u308a\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u7269\u7406\u7684\u306b\u5206\u6563\u3055\u305b\u308b\u4e8b\u3067\u3088\u308a\u5e83\u3044I/O\u5e2f\u57df\u3092\u78ba\u4fdd\u3059\u308b\u306a\u3069\u306e\u5229\u70b9\u304c\u3042\u308a\u307e\u3059\u3002 PostgreSQL v10\u3067\u306f\u7bc4\u56f2\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u3001\u30ea\u30b9\u30c8\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u306e2\u7a2e\u985e\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3001\u3055\u3089\u306bPostgreSQL v11\u3067\u306f\u30cf\u30c3\u30b7\u30e5\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u306b\u52a0\u3048\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u540c\u58eb\u306eJOIN\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u56f3\u306f\u3001\u65e5\u4ed8\u578b\uff08DATE\u578b\uff09\u306e\u30ad\u30fc\u5024\u3092\u7528\u3044\u305f\u7bc4\u56f2\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002 \u30ad\u30fc\u5024 2018-05-30 \u3092\u6301\u3064\u30ec\u30b3\u30fc\u30c9\u306f\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb tbl_2018 \u306b\u632f\u308a\u5206\u3051\u3089\u308c\u3001\u540c\u69d8\u306b\u3001\u30ad\u30fc\u5024 2014-03-21 \u3092\u6301\u3064\u30ec\u30b3\u30fc\u30c9\u306f\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb tbl_2014 \u306b\u632f\u308a\u5206\u3051\u3089\u308c\u308b\u30fb\u30fb\u30fb\u3068\u3044\u3063\u305f\u5177\u5408\u3067\u3059\u3002 \u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u6642\u3001\u4f8b\u3048\u3070 WHERE ymd > '2016-07-01'::date \u3068\u3044\u3046\u6761\u4ef6\u53e5\u304c\u4ed8\u52a0\u3055\u308c\u3066\u3044\u308b\u3068\u3001 tbl_2014 \u304a\u3088\u3073 tbl_2015 \u306b\u8a72\u5f53\u3059\u308b\u30ec\u30b3\u30fc\u30c9\u304c\u5b58\u5728\u3057\u306a\u3044\u4e8b\u306f\u81ea\u660e\u3067\u3059\u306e\u3067\u3001PostgreSQL\u306e\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306f tbl_2016 \u3001 tbl_2017 \u3001 tbl_2018 \u3060\u3051\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u3001\u305d\u306e\u7d50\u679c\u3092\u7d50\u5408\u3059\u308b Append \u30ce\u30fc\u30c9\u3092\u631f\u3080\u4e8b\u3067\u3001\u3042\u305f\u304b\u3082\u5358\u4e00\u306e\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u30ec\u30b3\u30fc\u30c9\u3092\u8aad\u307f\u51fa\u3057\u305f\u304b\u306e\u3088\u3046\u306b\u632f\u821e\u3046\u5b9f\u884c\u8a08\u753b\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 PostgreSQL\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u3068PG-Strom\u3092\u4f75\u7528\u3059\u308b\u5834\u5408\u3001\u307e\u305a\u3001\u30b9\u30ad\u30e3\u30f3\u304c\u5fc5\u8981\u3067\u3042\u308b\u3068\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u304c\u5224\u65ad\u3057\u305f\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u306b\u5bfe\u3057\u3001\u500b\u3005\u306b\u5b9f\u884c\u30b3\u30b9\u30c8\u3092\u63a8\u5b9a\u3057\u305f\u4e0a\u3067 GpuScan \u304c\u9078\u629e\u3055\u308c\u308b\u4e8b\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001 GpuScan \u306e\u5b9f\u884c\u7d50\u679c\u3092 Append \u30ce\u30fc\u30c9\u3067\u675f\u306d\u308b\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002 \u305f\u3060\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u306b\u7d9a\u304d\u3001JOIN\u3084GROUP BY\u306a\u3069PG-Strom\u3067\u9ad8\u901f\u5316\u304c\u53ef\u80fd\u306a\u51e6\u7406\u3092\u5b9f\u884c\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u6700\u9069\u5316\u306e\u89b3\u70b9\u304b\u3089\u691c\u8a0e\u304c\u5fc5\u8981\u3067\u3059\u3002 \u4f8b\u3048\u3070\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u3055\u308c\u3066\u3044\u306a\u3044\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u3066\u5225\u306e\u30c6\u30fc\u30d6\u30eb\u3068JOIN\u3057\u3001GROUP BY\u306b\u3088\u308b\u96c6\u8a08\u7d50\u679c\u3092\u51fa\u529b\u3059\u308b\u5834\u5408\u3001\u6761\u4ef6\u304c\u63c3\u3048\u3070\u3001\u5404\u30b9\u30c6\u30c3\u30d7\u9593\u306e\u30c7\u30fc\u30bf\u4ea4\u63db\u306fGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u3067\u884c\u3046\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306fGPU\u3068CPU\u306e\u9593\u306e\u30c7\u30fc\u30bf\u79fb\u52d5\u3092\u6700\u5c0f\u5316\u3059\u308b\u3068\u3044\u3046\u89b3\u70b9\u304b\u3089\u3001\u6700\u3082PG-Strom\u304c\u5f97\u610f\u3068\u3059\u308b\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3067\u3059\u3002 \u4e00\u65b9\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u540c\u69d8\u306e\u51e6\u7406\u3092\u884c\u3046\u5834\u5408\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u3068JOIN\u3084GROUP BY\u306e\u9593\u306b Append \u51e6\u7406\u304c\u631f\u307e\u3063\u3066\u3057\u307e\u3046\u306e\u304c\u8ab2\u984c\u3067\u3059\u3002\u3053\u306e\u5b9f\u884c\u8a08\u753b\u306e\u4e0b\u3067\u306f\u3001GpuScan\u304c\u51e6\u7406\u3057\u305f\u30c7\u30fc\u30bf\u3092\u4e00\u5ea6\u30db\u30b9\u30c8\u30b7\u30b9\u30c6\u30e0\u3078\u8ee2\u9001\u3057\u3001 Append \u51e6\u7406\u3092\u884c\u3063\u305f\u4e0a\u3067\u3001\u305d\u306e\u5f8c\u306eGpuJoin\u3084GpuPreAgg\u51e6\u7406\u3092\u884c\u3046\u305f\u3081\u306b\u518d\u3073\u30c7\u30fc\u30bf\u3092GPU\u3078\u8ee2\u9001\u3059\u308b\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u6c7a\u3057\u3066\u52b9\u7387\u306e\u826f\u3044\u51e6\u7406\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u3053\u306e\u3088\u3046\u306aCPU-GPU\u9593\u306e\u30c7\u30fc\u30bf\u306e\u30d4\u30f3\u30dd\u30f3\u3092\u907f\u3051\u308b\u305f\u3081\u3001PG-Strom\u306f\u53ef\u80fd\u306a\u9650\u308aJOIN\u3084GROUP BY\u3092 Append \u3088\u308a\u3082\u5148\u306b\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3092\u8a66\u307f\u307e\u3059\u3002 \u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u304c\u6210\u529f\u308c\u3070\u3001\u30c7\u30fc\u30bf\u4ea4\u63db\u3092\u52b9\u7387\u5316\u3067\u304d\u308b\u3060\u3051\u3067\u306a\u304f\u3001\u7279\u306bGROUP BY\u51e6\u7406\u306b\u3088\u3063\u3066\u884c\u6570\u3092\u5927\u5e45\u306b\u524a\u6e1b\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308b\u305f\u3081\u3001 Append \u51e6\u7406\u3092\u5b9f\u884c\u3059\u308b\u30db\u30b9\u30c8\u30b7\u30b9\u30c6\u30e0\u306e\u8ca0\u8377\u3092\u9855\u8457\u306b\u6e1b\u3089\u3059\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u65e5\u4ed8\u578b\uff08date\u578b\uff09\u306e\u30d5\u30a3\u30fc\u30eb\u30c9 ymd \u3092\u30ad\u30fc\u3068\u3057\u3066\u5e74\u5358\u4f4d\u3067\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u308b pt \u306b\u5bfe\u3057\u3066\u3001JOIN\u3068GROUP BY\u3092\u542b\u3080\u30af\u30a8\u30ea\u3092\u6295\u5165\u3057\u305f\u6642\u306e\u5b9f\u884c\u8a08\u753b\u3067\u3059\u3002 \u691c\u7d22\u6761\u4ef6\u306b\u3088\u308a2016\u5e74\u4ee5\u524d\u306e\u30c7\u30fc\u30bf\u3092\u542b\u3080\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u306f\u81ea\u660e\u306b\u6392\u9664\u3055\u308c\u3001\u3055\u3089\u306b pt_2017 \u3001 pt_2018 \u3001 pt_2019 \u5404\u30c6\u30fc\u30d6\u30eb\u306eJOIN\u3068GROUP BY\u51e6\u7406\u304c\u4e00\u4f53\u3068\u306a\u3063\u3066 Append \u306e\u524d\u306b\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 # EXPLAIN SELECT cat,count(*),avg(ax) FROM pt NATURAL JOIN t1 WHERE ymd > '2017-01-01'::date GROUP BY cat; QUERY PLAN -------------------------------------------------------------------------------- HashAggregate (cost=196410.07..196412.57 rows=200 width=48) Group Key: pt_2017.cat -> Gather (cost=66085.69..196389.07 rows=1200 width=72) Workers Planned: 2 -> Parallel Append (cost=65085.69..195269.07 rows=600 width=72) -> Parallel Custom Scan (GpuPreAgg) (cost=65085.69..65089.69 rows=200 width=72) Reduction: Local Combined GpuJoin: enabled -> Parallel Custom Scan (GpuJoin) on pt_2017 (cost=32296.64..74474.20 rows=1050772 width=40) Outer Scan: pt_2017 (cost=28540.80..66891.11 rows=1050772 width=36) Outer Scan Filter: (ymd > '2017-01-01'::date) Depth 1: GpuHashJoin (nrows 1050772...2521854) HashKeys: pt_2017.aid JoinQuals: (pt_2017.aid = t1.aid) KDS-Hash (size: 10.78MB) -> Seq Scan on t1 (cost=0.00..1935.00 rows=100000 width=12) -> Parallel Custom Scan (GpuPreAgg) (cost=65078.35..65082.35 rows=200 width=72) Reduction: Local Combined GpuJoin: enabled -> Parallel Custom Scan (GpuJoin) on pt_2018 (cost=32296.65..74465.75 rows=1050649 width=40) Outer Scan: pt_2018 (cost=28540.81..66883.43 rows=1050649 width=36) Outer Scan Filter: (ymd > '2017-01-01'::date) Depth 1: GpuHashJoin (nrows 1050649...2521557) HashKeys: pt_2018.aid JoinQuals: (pt_2018.aid = t1.aid) KDS-Hash (size: 10.78MB) -> Seq Scan on t1 (cost=0.00..1935.00 rows=100000 width=12) -> Parallel Custom Scan (GpuPreAgg) (cost=65093.03..65097.03 rows=200 width=72) Reduction: Local Combined GpuJoin: enabled -> Parallel Custom Scan (GpuJoin) on pt_2019 (cost=32296.65..74482.64 rows=1050896 width=40) Outer Scan: pt_2019 (cost=28540.80..66898.79 rows=1050896 width=36) Outer Scan Filter: (ymd > '2017-01-01'::date) Depth 1: GpuHashJoin (nrows 1050896...2522151) HashKeys: pt_2019.aid JoinQuals: (pt_2019.aid = t1.aid) KDS-Hash (size: 10.78MB) -> Seq Scan on t1 (cost=0.00..1935.00 rows=100000 width=12) (38 rows) \u8a2d\u5b9a\u3068\u904b\u7528 \u4ee5\u4e0b\u306eGUC\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3088\u308a\u3001PG-Strom\u306fJOIN\u3084GROUP BY\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u3078\u306e\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3092\u5236\u5fa1\u3057\u307e\u3059\u3002 \u30d1\u30e9\u30e1\u30fc\u30bf\u540d \u578b \u521d\u671f\u5024 \u8aac\u660e pg_strom.enable_partitionwise_gpujoin bool on GpuJoin\u3092\u5404\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u8981\u7d20\u3078\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002PostgreSQL v10\u4ee5\u964d\u3067\u306e\u307f\u5bfe\u5fdc\u3002 pg_strom.enable_partitionwise_gpupreagg bool on GpuPreAgg\u3092\u5404\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u8981\u7d20\u3078\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002PostgreSQL v10\u4ee5\u964d\u3067\u306e\u307f\u5bfe\u5fdc\u3002 \u3053\u308c\u3089\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u521d\u671f\u5024\u306f on \u3067\u3059\u304c\u3001\u3053\u308c\u3092 off \u306b\u3057\u305f\u5834\u5408\u3001\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u51e6\u7406\u306f\u884c\u308f\u308c\u307e\u305b\u3093\u3002 EXPLAIN\u30b3\u30de\u30f3\u30c9\u3067\u524d\u7bc0\u306e\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u8a08\u753b\u3092\u8868\u793a\u3057\u305f\u3068\u3053\u308d\u3001\u5b9f\u884c\u8a08\u753b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u5316\u3057\u3066\u3044\u307e\u3059\u3002 \u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u306b\u306f GpuScan \u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u305d\u306e\u51e6\u7406\u7d50\u679c\u306f\u4e00\u5ea6\u30db\u30b9\u30c8\u30b7\u30b9\u30c6\u30e0\u306b\u8fd4\u3055\u308c\u3001 Append \u306b\u3088\u3063\u3066\u7d50\u5408\u3055\u308c\u305f\u5f8c\u3001\u518d\u3073 GpuJoin \u3092\u51e6\u7406\u3059\u308b\u305f\u3081\u306bGPU\u3078\u3068\u8ee2\u9001\u3055\u308c\u307e\u3059\u3002 postgres=# set pg_strom.enable_partitionwise_gpujoin = off; SET postgres=# set pg_strom.enable_partitionwise_gpupreagg = off; SET postgres=# EXPLAIN SELECT cat,count(*),avg(ax) FROM pt NATURAL JOIN t1 WHERE ymd > '2017-01-01'::date group by cat; QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------- Finalize GroupAggregate (cost=341392.92..341399.42 rows=200 width=48) Group Key: pt.cat -> Sort (cost=341392.92..341393.92 rows=400 width=72) Sort Key: pt.cat -> Gather (cost=341333.63..341375.63 rows=400 width=72) Workers Planned: 2 -> Partial HashAggregate (cost=340333.63..340335.63 rows=200 width=72) Group Key: pt.cat -> Parallel Custom Scan (GpuJoin) (cost=283591.92..283591.92 rows=7565562 width=40) Depth 1: GpuHashJoin (nrows 3152318...7565562) HashKeys: pt.aid JoinQuals: (pt.aid = t1.aid) KDS-Hash (size: 10.78MB) -> Append (cost=28540.80..200673.34 rows=3152318 width=36) -> Parallel Custom Scan (GpuScan) on pt_2017 (cost=28540.80..66891.11 rows=1050772 width=36) GPU Filter: (ymd > '2017-01-01'::date) -> Parallel Custom Scan (GpuScan) on pt_2018 (cost=28540.81..66883.43 rows=1050649 width=36) GPU Filter: (ymd > '2017-01-01'::date) -> Parallel Custom Scan (GpuScan) on pt_2019 (cost=28540.80..66898.79 rows=1050896 width=36) GPU Filter: (ymd > '2017-01-01'::date) -> Seq Scan on t1 (cost=0.00..1935.00 rows=100000 width=12) (21 rows) SSD\u3068GPU\u306e\u914d\u7f6e\u306b\u95a2\u3059\u308b\u8003\u616e PostgreSQL\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u3068SSD-to-GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u3092\u4f75\u7528\u3059\u308b\u5834\u5408\u3001\u5404\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u304c\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u3092\u4fdd\u5b58\u3059\u308bNVMe-SSD\u30b9\u30c8\u30ec\u30fc\u30b8\u306e\u7269\u7406\u7684\u306a\u914d\u7f6e\u306b\u306f\u7279\u306b\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002 \u5236\u9650\u4e8b\u9805 \u5b9f\u9a13\u7684\u6a5f\u80fd GpuJoin\u3068GpuPreAgg\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u3078\u306e\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u306f\u3001\u73fe\u6642\u70b9\u3067\u306f\u5b9f\u9a13\u7684\u306a\u6a5f\u80fd\u3067\u3042\u308a\u3001\u4e88\u671f\u305b\u306c\u4e0d\u5177\u5408\u3084\u30af\u30e9\u30c3\u30b7\u30e5\u3092\u5f15\u304d\u8d77\u3053\u3059\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 \u305d\u306e\u5834\u5408\u306f pg_strom.enable_partitionwise_gpujoin \u3084 pg_strom.enable_partitionwise_gpupreagg \u3092\u7528\u3044\u3066\u5f53\u8a72\u6a5f\u80fd\u3092\u7121\u52b9\u5316\u3059\u308b\u3068\u5171\u306b\u3001 PG-Strom Issues \u3078\u969c\u5bb3\u30ec\u30dd\u30fc\u30c8\u3092\u304a\u9858\u3044\u3057\u307e\u3059\u3002","title":"\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3"},{"location":"partition/#_1","text":"\u672c\u7ae0\u3067\u306fPostgreSQL\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u6a5f\u80fd\u3068PG-Strom\u3092\u4f75\u7528\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u306a\u304a\u3001\u672c\u7ae0\u306e\u5185\u5bb9\u306f PostgreSQL v11\u4ee5\u964d \u3067PG-Strom\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306b\u306e\u307f\u6709\u52b9\u3067\u3059\u3002 PostgreSQL\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u6a5f\u80fd\u306b\u3064\u3044\u3066\u3001\u8a73\u3057\u304f\u306f PostgreSQL\u6587\u66f8\uff1a\u30c6\u30fc\u30d6\u30eb\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0 \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002","title":"\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3"},{"location":"partition/#_2","text":"PostgreSQL v10\u306b\u304a\u3044\u3066\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u6a5f\u80fd\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u307e\u3057\u305f\u3002 \u3053\u308c\u306f\u3001\u8ad6\u7406\u7684\u306b\u306f\u4e00\u500b\u306e\u5927\u304d\u306a\u30c6\u30fc\u30d6\u30eb\u3067\u3042\u308b\u3082\u306e\u3092\u7269\u7406\u7684\u306b\u3088\u308a\u5c0f\u3055\u306a\u30c6\u30fc\u30d6\u30eb\u306b\u5206\u5272\u3057\u3066\u683c\u7d0d\u3059\u308b\u4ed5\u7d44\u307f\u3067\u3001\u691c\u7d22\u6761\u4ef6\u3088\u308a\u660e\u3089\u304b\u306b\u30b9\u30ad\u30e3\u30f3\u306e\u5fc5\u8981\u304c\u306a\u3044\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u305f\u308a\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u7269\u7406\u7684\u306b\u5206\u6563\u3055\u305b\u308b\u4e8b\u3067\u3088\u308a\u5e83\u3044I/O\u5e2f\u57df\u3092\u78ba\u4fdd\u3059\u308b\u306a\u3069\u306e\u5229\u70b9\u304c\u3042\u308a\u307e\u3059\u3002 PostgreSQL v10\u3067\u306f\u7bc4\u56f2\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u3001\u30ea\u30b9\u30c8\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u306e2\u7a2e\u985e\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3001\u3055\u3089\u306bPostgreSQL v11\u3067\u306f\u30cf\u30c3\u30b7\u30e5\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u306b\u52a0\u3048\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u540c\u58eb\u306eJOIN\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u56f3\u306f\u3001\u65e5\u4ed8\u578b\uff08DATE\u578b\uff09\u306e\u30ad\u30fc\u5024\u3092\u7528\u3044\u305f\u7bc4\u56f2\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002 \u30ad\u30fc\u5024 2018-05-30 \u3092\u6301\u3064\u30ec\u30b3\u30fc\u30c9\u306f\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb tbl_2018 \u306b\u632f\u308a\u5206\u3051\u3089\u308c\u3001\u540c\u69d8\u306b\u3001\u30ad\u30fc\u5024 2014-03-21 \u3092\u6301\u3064\u30ec\u30b3\u30fc\u30c9\u306f\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb tbl_2014 \u306b\u632f\u308a\u5206\u3051\u3089\u308c\u308b\u30fb\u30fb\u30fb\u3068\u3044\u3063\u305f\u5177\u5408\u3067\u3059\u3002 \u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u6642\u3001\u4f8b\u3048\u3070 WHERE ymd > '2016-07-01'::date \u3068\u3044\u3046\u6761\u4ef6\u53e5\u304c\u4ed8\u52a0\u3055\u308c\u3066\u3044\u308b\u3068\u3001 tbl_2014 \u304a\u3088\u3073 tbl_2015 \u306b\u8a72\u5f53\u3059\u308b\u30ec\u30b3\u30fc\u30c9\u304c\u5b58\u5728\u3057\u306a\u3044\u4e8b\u306f\u81ea\u660e\u3067\u3059\u306e\u3067\u3001PostgreSQL\u306e\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306f tbl_2016 \u3001 tbl_2017 \u3001 tbl_2018 \u3060\u3051\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u3001\u305d\u306e\u7d50\u679c\u3092\u7d50\u5408\u3059\u308b Append \u30ce\u30fc\u30c9\u3092\u631f\u3080\u4e8b\u3067\u3001\u3042\u305f\u304b\u3082\u5358\u4e00\u306e\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u30ec\u30b3\u30fc\u30c9\u3092\u8aad\u307f\u51fa\u3057\u305f\u304b\u306e\u3088\u3046\u306b\u632f\u821e\u3046\u5b9f\u884c\u8a08\u753b\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 PostgreSQL\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u3068PG-Strom\u3092\u4f75\u7528\u3059\u308b\u5834\u5408\u3001\u307e\u305a\u3001\u30b9\u30ad\u30e3\u30f3\u304c\u5fc5\u8981\u3067\u3042\u308b\u3068\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u304c\u5224\u65ad\u3057\u305f\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u306b\u5bfe\u3057\u3001\u500b\u3005\u306b\u5b9f\u884c\u30b3\u30b9\u30c8\u3092\u63a8\u5b9a\u3057\u305f\u4e0a\u3067 GpuScan \u304c\u9078\u629e\u3055\u308c\u308b\u4e8b\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001 GpuScan \u306e\u5b9f\u884c\u7d50\u679c\u3092 Append \u30ce\u30fc\u30c9\u3067\u675f\u306d\u308b\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002 \u305f\u3060\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u306b\u7d9a\u304d\u3001JOIN\u3084GROUP BY\u306a\u3069PG-Strom\u3067\u9ad8\u901f\u5316\u304c\u53ef\u80fd\u306a\u51e6\u7406\u3092\u5b9f\u884c\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u6700\u9069\u5316\u306e\u89b3\u70b9\u304b\u3089\u691c\u8a0e\u304c\u5fc5\u8981\u3067\u3059\u3002 \u4f8b\u3048\u3070\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u3055\u308c\u3066\u3044\u306a\u3044\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u3066\u5225\u306e\u30c6\u30fc\u30d6\u30eb\u3068JOIN\u3057\u3001GROUP BY\u306b\u3088\u308b\u96c6\u8a08\u7d50\u679c\u3092\u51fa\u529b\u3059\u308b\u5834\u5408\u3001\u6761\u4ef6\u304c\u63c3\u3048\u3070\u3001\u5404\u30b9\u30c6\u30c3\u30d7\u9593\u306e\u30c7\u30fc\u30bf\u4ea4\u63db\u306fGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u3067\u884c\u3046\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306fGPU\u3068CPU\u306e\u9593\u306e\u30c7\u30fc\u30bf\u79fb\u52d5\u3092\u6700\u5c0f\u5316\u3059\u308b\u3068\u3044\u3046\u89b3\u70b9\u304b\u3089\u3001\u6700\u3082PG-Strom\u304c\u5f97\u610f\u3068\u3059\u308b\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3067\u3059\u3002 \u4e00\u65b9\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u540c\u69d8\u306e\u51e6\u7406\u3092\u884c\u3046\u5834\u5408\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u3068JOIN\u3084GROUP BY\u306e\u9593\u306b Append \u51e6\u7406\u304c\u631f\u307e\u3063\u3066\u3057\u307e\u3046\u306e\u304c\u8ab2\u984c\u3067\u3059\u3002\u3053\u306e\u5b9f\u884c\u8a08\u753b\u306e\u4e0b\u3067\u306f\u3001GpuScan\u304c\u51e6\u7406\u3057\u305f\u30c7\u30fc\u30bf\u3092\u4e00\u5ea6\u30db\u30b9\u30c8\u30b7\u30b9\u30c6\u30e0\u3078\u8ee2\u9001\u3057\u3001 Append \u51e6\u7406\u3092\u884c\u3063\u305f\u4e0a\u3067\u3001\u305d\u306e\u5f8c\u306eGpuJoin\u3084GpuPreAgg\u51e6\u7406\u3092\u884c\u3046\u305f\u3081\u306b\u518d\u3073\u30c7\u30fc\u30bf\u3092GPU\u3078\u8ee2\u9001\u3059\u308b\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u6c7a\u3057\u3066\u52b9\u7387\u306e\u826f\u3044\u51e6\u7406\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u3053\u306e\u3088\u3046\u306aCPU-GPU\u9593\u306e\u30c7\u30fc\u30bf\u306e\u30d4\u30f3\u30dd\u30f3\u3092\u907f\u3051\u308b\u305f\u3081\u3001PG-Strom\u306f\u53ef\u80fd\u306a\u9650\u308aJOIN\u3084GROUP BY\u3092 Append \u3088\u308a\u3082\u5148\u306b\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3092\u8a66\u307f\u307e\u3059\u3002 \u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u304c\u6210\u529f\u308c\u3070\u3001\u30c7\u30fc\u30bf\u4ea4\u63db\u3092\u52b9\u7387\u5316\u3067\u304d\u308b\u3060\u3051\u3067\u306a\u304f\u3001\u7279\u306bGROUP BY\u51e6\u7406\u306b\u3088\u3063\u3066\u884c\u6570\u3092\u5927\u5e45\u306b\u524a\u6e1b\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308b\u305f\u3081\u3001 Append \u51e6\u7406\u3092\u5b9f\u884c\u3059\u308b\u30db\u30b9\u30c8\u30b7\u30b9\u30c6\u30e0\u306e\u8ca0\u8377\u3092\u9855\u8457\u306b\u6e1b\u3089\u3059\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u65e5\u4ed8\u578b\uff08date\u578b\uff09\u306e\u30d5\u30a3\u30fc\u30eb\u30c9 ymd \u3092\u30ad\u30fc\u3068\u3057\u3066\u5e74\u5358\u4f4d\u3067\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u308b pt \u306b\u5bfe\u3057\u3066\u3001JOIN\u3068GROUP BY\u3092\u542b\u3080\u30af\u30a8\u30ea\u3092\u6295\u5165\u3057\u305f\u6642\u306e\u5b9f\u884c\u8a08\u753b\u3067\u3059\u3002 \u691c\u7d22\u6761\u4ef6\u306b\u3088\u308a2016\u5e74\u4ee5\u524d\u306e\u30c7\u30fc\u30bf\u3092\u542b\u3080\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u306f\u81ea\u660e\u306b\u6392\u9664\u3055\u308c\u3001\u3055\u3089\u306b pt_2017 \u3001 pt_2018 \u3001 pt_2019 \u5404\u30c6\u30fc\u30d6\u30eb\u306eJOIN\u3068GROUP BY\u51e6\u7406\u304c\u4e00\u4f53\u3068\u306a\u3063\u3066 Append \u306e\u524d\u306b\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 # EXPLAIN SELECT cat,count(*),avg(ax) FROM pt NATURAL JOIN t1 WHERE ymd > '2017-01-01'::date GROUP BY cat; QUERY PLAN -------------------------------------------------------------------------------- HashAggregate (cost=196410.07..196412.57 rows=200 width=48) Group Key: pt_2017.cat -> Gather (cost=66085.69..196389.07 rows=1200 width=72) Workers Planned: 2 -> Parallel Append (cost=65085.69..195269.07 rows=600 width=72) -> Parallel Custom Scan (GpuPreAgg) (cost=65085.69..65089.69 rows=200 width=72) Reduction: Local Combined GpuJoin: enabled -> Parallel Custom Scan (GpuJoin) on pt_2017 (cost=32296.64..74474.20 rows=1050772 width=40) Outer Scan: pt_2017 (cost=28540.80..66891.11 rows=1050772 width=36) Outer Scan Filter: (ymd > '2017-01-01'::date) Depth 1: GpuHashJoin (nrows 1050772...2521854) HashKeys: pt_2017.aid JoinQuals: (pt_2017.aid = t1.aid) KDS-Hash (size: 10.78MB) -> Seq Scan on t1 (cost=0.00..1935.00 rows=100000 width=12) -> Parallel Custom Scan (GpuPreAgg) (cost=65078.35..65082.35 rows=200 width=72) Reduction: Local Combined GpuJoin: enabled -> Parallel Custom Scan (GpuJoin) on pt_2018 (cost=32296.65..74465.75 rows=1050649 width=40) Outer Scan: pt_2018 (cost=28540.81..66883.43 rows=1050649 width=36) Outer Scan Filter: (ymd > '2017-01-01'::date) Depth 1: GpuHashJoin (nrows 1050649...2521557) HashKeys: pt_2018.aid JoinQuals: (pt_2018.aid = t1.aid) KDS-Hash (size: 10.78MB) -> Seq Scan on t1 (cost=0.00..1935.00 rows=100000 width=12) -> Parallel Custom Scan (GpuPreAgg) (cost=65093.03..65097.03 rows=200 width=72) Reduction: Local Combined GpuJoin: enabled -> Parallel Custom Scan (GpuJoin) on pt_2019 (cost=32296.65..74482.64 rows=1050896 width=40) Outer Scan: pt_2019 (cost=28540.80..66898.79 rows=1050896 width=36) Outer Scan Filter: (ymd > '2017-01-01'::date) Depth 1: GpuHashJoin (nrows 1050896...2522151) HashKeys: pt_2019.aid JoinQuals: (pt_2019.aid = t1.aid) KDS-Hash (size: 10.78MB) -> Seq Scan on t1 (cost=0.00..1935.00 rows=100000 width=12) (38 rows)","title":"\u6982\u8981"},{"location":"partition/#_3","text":"\u4ee5\u4e0b\u306eGUC\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3088\u308a\u3001PG-Strom\u306fJOIN\u3084GROUP BY\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u3078\u306e\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3092\u5236\u5fa1\u3057\u307e\u3059\u3002 \u30d1\u30e9\u30e1\u30fc\u30bf\u540d \u578b \u521d\u671f\u5024 \u8aac\u660e pg_strom.enable_partitionwise_gpujoin bool on GpuJoin\u3092\u5404\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u8981\u7d20\u3078\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002PostgreSQL v10\u4ee5\u964d\u3067\u306e\u307f\u5bfe\u5fdc\u3002 pg_strom.enable_partitionwise_gpupreagg bool on GpuPreAgg\u3092\u5404\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u8981\u7d20\u3078\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002PostgreSQL v10\u4ee5\u964d\u3067\u306e\u307f\u5bfe\u5fdc\u3002 \u3053\u308c\u3089\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u521d\u671f\u5024\u306f on \u3067\u3059\u304c\u3001\u3053\u308c\u3092 off \u306b\u3057\u305f\u5834\u5408\u3001\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u51e6\u7406\u306f\u884c\u308f\u308c\u307e\u305b\u3093\u3002 EXPLAIN\u30b3\u30de\u30f3\u30c9\u3067\u524d\u7bc0\u306e\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u8a08\u753b\u3092\u8868\u793a\u3057\u305f\u3068\u3053\u308d\u3001\u5b9f\u884c\u8a08\u753b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u5316\u3057\u3066\u3044\u307e\u3059\u3002 \u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u306b\u306f GpuScan \u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u305d\u306e\u51e6\u7406\u7d50\u679c\u306f\u4e00\u5ea6\u30db\u30b9\u30c8\u30b7\u30b9\u30c6\u30e0\u306b\u8fd4\u3055\u308c\u3001 Append \u306b\u3088\u3063\u3066\u7d50\u5408\u3055\u308c\u305f\u5f8c\u3001\u518d\u3073 GpuJoin \u3092\u51e6\u7406\u3059\u308b\u305f\u3081\u306bGPU\u3078\u3068\u8ee2\u9001\u3055\u308c\u307e\u3059\u3002 postgres=# set pg_strom.enable_partitionwise_gpujoin = off; SET postgres=# set pg_strom.enable_partitionwise_gpupreagg = off; SET postgres=# EXPLAIN SELECT cat,count(*),avg(ax) FROM pt NATURAL JOIN t1 WHERE ymd > '2017-01-01'::date group by cat; QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------- Finalize GroupAggregate (cost=341392.92..341399.42 rows=200 width=48) Group Key: pt.cat -> Sort (cost=341392.92..341393.92 rows=400 width=72) Sort Key: pt.cat -> Gather (cost=341333.63..341375.63 rows=400 width=72) Workers Planned: 2 -> Partial HashAggregate (cost=340333.63..340335.63 rows=200 width=72) Group Key: pt.cat -> Parallel Custom Scan (GpuJoin) (cost=283591.92..283591.92 rows=7565562 width=40) Depth 1: GpuHashJoin (nrows 3152318...7565562) HashKeys: pt.aid JoinQuals: (pt.aid = t1.aid) KDS-Hash (size: 10.78MB) -> Append (cost=28540.80..200673.34 rows=3152318 width=36) -> Parallel Custom Scan (GpuScan) on pt_2017 (cost=28540.80..66891.11 rows=1050772 width=36) GPU Filter: (ymd > '2017-01-01'::date) -> Parallel Custom Scan (GpuScan) on pt_2018 (cost=28540.81..66883.43 rows=1050649 width=36) GPU Filter: (ymd > '2017-01-01'::date) -> Parallel Custom Scan (GpuScan) on pt_2019 (cost=28540.80..66898.79 rows=1050896 width=36) GPU Filter: (ymd > '2017-01-01'::date) -> Seq Scan on t1 (cost=0.00..1935.00 rows=100000 width=12) (21 rows)","title":"\u8a2d\u5b9a\u3068\u904b\u7528"},{"location":"partition/#ssdgpu","text":"PostgreSQL\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u3068SSD-to-GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u3092\u4f75\u7528\u3059\u308b\u5834\u5408\u3001\u5404\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u304c\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u3092\u4fdd\u5b58\u3059\u308bNVMe-SSD\u30b9\u30c8\u30ec\u30fc\u30b8\u306e\u7269\u7406\u7684\u306a\u914d\u7f6e\u306b\u306f\u7279\u306b\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002","title":"SSD\u3068GPU\u306e\u914d\u7f6e\u306b\u95a2\u3059\u308b\u8003\u616e"},{"location":"partition/#_4","text":"\u5b9f\u9a13\u7684\u6a5f\u80fd GpuJoin\u3068GpuPreAgg\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u3078\u306e\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u306f\u3001\u73fe\u6642\u70b9\u3067\u306f\u5b9f\u9a13\u7684\u306a\u6a5f\u80fd\u3067\u3042\u308a\u3001\u4e88\u671f\u305b\u306c\u4e0d\u5177\u5408\u3084\u30af\u30e9\u30c3\u30b7\u30e5\u3092\u5f15\u304d\u8d77\u3053\u3059\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 \u305d\u306e\u5834\u5408\u306f pg_strom.enable_partitionwise_gpujoin \u3084 pg_strom.enable_partitionwise_gpupreagg \u3092\u7528\u3044\u3066\u5f53\u8a72\u6a5f\u80fd\u3092\u7121\u52b9\u5316\u3059\u308b\u3068\u5171\u306b\u3001 PG-Strom Issues \u3078\u969c\u5bb3\u30ec\u30dd\u30fc\u30c8\u3092\u304a\u9858\u3044\u3057\u307e\u3059\u3002","title":"\u5236\u9650\u4e8b\u9805"},{"location":"postgis/","text":"GPU\u7248PostGIS \u672c\u7ae0\u3067\u306fGPU\u7248PostGIS\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u6982\u8981 PostGIS\u3068\u306f\u3001\u5730\u7406\u7a7a\u9593\u60c5\u5831\u3092\u53d6\u308a\u6271\u3046\u305f\u3081\u306ePostgreSQL\u5411\u3051\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3059\u3002 \u70b9\u3001\u7dda\u5206\u3001\u30dd\u30ea\u30b4\u30f3\u306a\u3069\u5730\u7406\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u6271\u3046\u305f\u3081\u306e\u30c7\u30fc\u30bf\u578b\uff08 Geometry \uff09\u3092\u63d0\u4f9b\u3057\u3066\u3044\u308b\u307b\u304b\u3001\u8ddd\u96e2\u306e\u8a08\u7b97\u3084\u5305\u542b\u3001\u4ea4\u5dee\u95a2\u4fc2\u306e\u5224\u5b9a\u306a\u3069\u3001\u5730\u7406\u30c7\u30fc\u30bf\u8981\u7d20\u3092\u8a55\u4fa1\u3059\u308b\u305f\u3081\u306e\u95a2\u6570\u3084\u6f14\u7b97\u5b50\u3092\u6570\u591a\u304f\u53d6\u308a\u63c3\u3048\u3066\u3044\u307e\u3059\u3002 \u307e\u305f\u3001\u4e00\u90e8\u306e\u6f14\u7b97\u5b50\u306b\u3064\u3044\u3066\u306fPostgreSQL\u306eGiST(Generalized Search Tree)\u306e\u4ed5\u7d44\u307f\u3092\u7528\u3044\u3066R\u6728\u306b\u3088\u308b\u9ad8\u901f\u306a\u691c\u7d22\u3082\u53ef\u80fd\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002 2001\u5e74\u306b\u6700\u521d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u516c\u958b\u3055\u308c\u3066\u4ee5\u964d\u300120\u5e74\u4ee5\u4e0a\u306b\u308f\u305f\u308a\u958b\u767a\u8005\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u306b\u3088\u3063\u3066\u6a5f\u80fd\u5f37\u5316\u3084\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u304c\u884c\u308f\u308c\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u3089PostGIS\u306e\u63d0\u4f9b\u3059\u308b\u95a2\u6570\u3084\u6f14\u7b97\u5b50\u306f\u3001\u7dcf\u6570\u3067500\u3092\u8d85\u3048\u308b\u975e\u5e38\u306b\u5927\u898f\u6a21\u306a\u3082\u306e\u3067\u3059\u3002 \u305d\u306e\u305f\u3081\u3001PG-Strom\u3067\u306f\u6bd4\u8f03\u7684\u5229\u7528\u983b\u5ea6\u306e\u9ad8\u3044\u3044\u304f\u3064\u304b\u306ePostGIS\u95a2\u6570\u3060\u3051\u3092GPU\u7528\u306b\u79fb\u690d\u3057\u3066\u3044\u307e\u3059\u3002 \u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306aPostGIS\u95a2\u6570\u304c\u305d\u308c\u306b\u8a72\u5f53\u3057\u307e\u3059\u3002 geometry st_point(float8 lon,float8 lat) \u7d4c\u5ea6\u7def\u5ea6\u304b\u3089\u3001\u70b9\uff08Point\uff09\u3067\u3042\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u578b\u3092\u751f\u6210\u3059\u308b\u3002 bool st_contains(geometry a,geometry b) \u30b8\u30aa\u30e1\u30c8\u30eaa\u304c\u30b8\u30aa\u30e1\u30c8\u30eab\u304c\u5305\u542b\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5224\u5b9a\u3059\u308b\u3002 bool st_crosses(geometry,geometry) \u30b8\u30aa\u30e1\u30c8\u30ea\u540c\u58eb\u304c\u4ea4\u5dee\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5224\u5b9a\u3059\u308b\u3002 text st_relate(geometry,geometry) \u30b8\u30aa\u30e1\u30c8\u30ea\u540c\u58eb\u306e\u95a2\u4fc2\u3092 DE-9IM(Dimensionally Extended 9-Intersection Model) \u306e\u884c\u5217\u8868\u73fe\u3068\u3057\u3066\u8fd4\u3057\u307e\u3059\u3002 \u307e\u305f\u3001\u30c6\u30fc\u30d6\u30eb\u540c\u58eb\u306e\u7d50\u5408\u6761\u4ef6\u304cGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff08R\u6728\uff09\u306e\u5229\u7528\u306b\u9069\u3059\u308b\u5834\u5408\u3001GpuJoin\u306fGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff08R\u6728\uff09\u3092GPU\u5074\u306b\u30ed\u30fc\u30c9\u3057\u3001\u7d50\u5408\u3059\u3079\u304d\u884c\u306e\u7d5e\u308a\u8fbc\u307f\u3092\u9ad8\u901f\u5316\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u3053\u308c\u306f\u4f8b\u3048\u3070\u3001GPS\u304b\u3089\u53d6\u5f97\u3057\u305f\u30e2\u30d0\u30a4\u30eb\u6a5f\u5668\u306e\u4f4d\u7f6e\uff08\u70b9\uff09\u3068\u30a8\u30ea\u30a2\u5b9a\u7fa9\u30c7\u30fc\u30bf\uff08\u30dd\u30ea\u30b4\u30f3\uff09\u3092\u7a81\u304d\u5408\u308f\u305b\u308b\u3068\u3044\u3063\u305f\u51e6\u7406\u306e\u9ad8\u901f\u5316\u306b\u5bc4\u4e0e\u3057\u307e\u3059\u3002 PostGIS\u306e\u5229\u7528 GPU\u7248PostGIS\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u7279\u5225\u306a\u8a2d\u5b9a\u306f\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002 PostGIS\u3092\u30d1\u30c3\u30b1\u30fc\u30b8\u53c8\u306f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001 CREATE EXTENSION \u69cb\u6587\u3092\u7528\u3044\u3066\u30b8\u30aa\u30e1\u30c8\u30ea\u30c7\u30fc\u30bf\u578b\u3084PostGIS\u95a2\u6570\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308c\u3070\u3001PG-Strom\u306f\u30af\u30a8\u30ea\u306b\u51fa\u73fe\u3057\u305fPostGIS\u95a2\u6570\u304cGPU\u3067\u5b9f\u884c\u53ef\u80fd\u304b\u3069\u3046\u304b\u3092\u81ea\u52d5\u7684\u306b\u5224\u5b9a\u3057\u307e\u3059\u3002 PostGIS\u81ea\u4f53\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u3064\u3044\u3066\u306f\u3001 PostGIS\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8 \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u30af\u30a8\u30ea\u306b\u306fGPU\u5b9f\u884c\u53ef\u80fd\u306aPostGIS\u95a2\u6570\u3067\u3042\u308b st_contains() \u3068 st_makepoint() \u3092\u4f7f\u7528\u3057\u3066\u304a\u308a\u3001\u30b8\u30aa\u30e1\u30c8\u30ea\u578b\u306e\u5b9a\u6570 'polygon ((10 10,30 10,30 20,10 20,10 10))' \u306e\u7bc4\u56f2\u5185\u306b\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u8aad\u307f\u51fa\u3057\u305f\u4e8c\u6b21\u5143\u306e\u70b9\u304c\u542b\u307e\u308c\u308b\u304b\u3069\u3046\u304b\u3092\u5224\u5b9a\u3057\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u95a2\u6570\u304c GPU Filter: \u306e\u4e00\u90e8\u3068\u3057\u3066\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u4e8b\u304b\u3089\u3082\u5206\u304b\u308b\u3088\u3046\u306b\u3001PG-Strom\u306f\u5bfe\u5fdc\u6e08\u307f\u306ePostGIS\u95a2\u6570\u3092\u81ea\u52d5\u7684\u306b\u691c\u51fa\u3057\u3001\u53ef\u80fd\u306a\u9650\u308aGPU\u3067\u5b9f\u884c\u3057\u3088\u3046\u3068\u8a66\u307f\u307e\u3059\u3002 =# explain select * from dpoints where st_contains('polygon ((10 10,30 10,30 20,10 20,10 10))', st_makepoint(x,y)); QUERY PLAN ------------------------------------------------------------------------------------------ Custom Scan (GpuScan) on dpoints (cost=1397205.10..12627630.76 rows=800 width=28) GPU Filter: st_contains('01030000000100000005000000000000000000244000000000000024400000000000003E4000000000000024400000000000003E4000000000000034400000000000002440000000000000344000000000000024400000000000002440'::geometry, st_makepoint(x, y)) GPU Preference: GPU0 (NVIDIA Tesla V100-PCIE-16GB) (3 rows) GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9 st_contains() \u3084 st_crosses() \u306a\u3069\u30b8\u30aa\u30e1\u30c8\u30ea\u540c\u58eb\u306e\u95a2\u4fc2\u6027\u3092\u8a55\u4fa1\u3059\u308bPostGIS\u95a2\u6570\u306e\u4e00\u90e8\u306f\u3001GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff08R\u6728\uff09\u306b\u5bfe\u5fdc\u3057\u3066\u304a\u308a\u3001CPU\u3060\u3051\u3092\u7528\u3044\u3066\u691c\u7d22\u3092\u884c\u3046\u5834\u5408\u306b\u3082\u9ad8\u901f\u306a\u7d5e\u308a\u8fbc\u307f\u3092\u884c\u3046\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 PG-Strom\u306eGpuJoin\u3067\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u540c\u58eb\u306e\u7d50\u5408\u6761\u4ef6\u304cGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff08R\u6728\uff09\u3067\u9ad8\u901f\u5316\u53ef\u80fd\u306a\u5834\u5408\u3001\u7d50\u5408\u5bfe\u8c61\u30c6\u30fc\u30d6\u30eb\u306e\u4e2d\u8eab\u3060\u3051\u3067\u306a\u304f\u3001GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3082\u540c\u6642\u306bGPU\u5074\u3078\u8ee2\u9001\u3057\u3001\u7d50\u5408\u5bfe\u8c61\u306e\u884c\u3092\u9ad8\u901f\u306b\u7d5e\u308a\u8fbc\u3080\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b\u4e8b\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u306e\u51e6\u7406\u306f\u901a\u5e38\u3001CPU\u3088\u308a\u3082\u9065\u304b\u306b\u9ad8\u3044\u4e26\u5217\u5ea6\u3067\u5b9f\u884c\u3055\u308c\u308b\u305f\u3081\u3001\u304b\u306a\u308a\u306e\u9ad8\u901f\u5316\u3092\u671f\u5f85\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4e00\u65b9\u3001GpuScan\u306f\u30c6\u30fc\u30d6\u30eb\u5358\u4f53\u306e\u30b9\u30ad\u30e3\u30f3\u306bGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u307e\u305b\u3093\u3002\u3053\u308c\u306f\u3001CPU\u306b\u3088\u308bIndexScan\u3067\u306e\u7d5e\u308a\u8fbc\u307f\u306e\u65b9\u304c\u9ad8\u901f\u3067\u3042\u308b\u4e8b\u304c\u591a\u3044\u304b\u3089\u3067\u3059\u3002 \u30b8\u30aa\u30e1\u30c8\u30ea\u30c7\u30fc\u30bf\u306bGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u8a2d\u5b9a\u3059\u308b\u306b\u306f\u3001 CREATE INDEX \u69cb\u6587\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u5e02\u753a\u6751\u306e\u5883\u754c\u7dda\u30c7\u30fc\u30bf\uff08giscity\u30c6\u30fc\u30d6\u30eb\u306egeom\u5217\uff09\u306b\u5bfe\u3057\u3066GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u8a2d\u5b9a\u3059\u308b\u3082\u306e\u3067\u3059\u3002 =# CREATE INDEX on giscity USING gist (geom); CREATE INDEX \u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u306f\u3001\u5e02\u753a\u6751\u306e\u5883\u754c\u7dda\u30c7\u30fc\u30bf\uff08giscity\u30c6\u30fc\u30d6\u30eb\uff09\u3068\u7def\u5ea6\u7d4c\u5ea6\u30c7\u30fc\u30bf\uff08dpoints\u30c6\u30fc\u30d6\u30eb\uff09\u3092\u7a81\u304d\u5408\u308f\u305b\u3001\u30dd\u30ea\u30b4\u30f3\u3068\u3057\u3066\u8868\u73fe\u3055\u308c\u305f\u5e02\u753a\u6751\u306e\u9818\u57df\u5185\u306b\u542b\u307e\u308c\u308b\u7def\u5ea6\u7d4c\u5ea6\u30c7\u30fc\u30bf\uff08\u70b9\uff09\u306e\u6570\u3092\u5e02\u753a\u6751\u3054\u3068\u306b\u51fa\u529b\u3059\u308b\u3082\u306e\u3067\u3059\u3002 \u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306b\u3088\u308aGpuJoin\u304c\u9078\u629e\u3055\u308c\u3001giscity\u30c6\u30fc\u30d6\u30eb\u3068dpoints\u30c6\u30fc\u30d6\u30eb\u306e\u7d50\u5408\u306b\u306fGpuGiSTJoin\u304c\u9078\u629e\u3055\u308c\u3066\u3044\u307e\u3059\u3002 IndexFilter:\u306e\u884c\u306b\u306f\u3001GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u3088\u308b\u7d5e\u308a\u8fbc\u307f\u6761\u4ef6\u304c (g.geom ~ st_makepoint(d.x, d.y)) \u3067\u3042\u308a\u3001\u4f7f\u7528\u3059\u308b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c giscity_geom_idx \u3067\u3042\u308b\u4e8b\u304c\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002 GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u4f7f\u7528\u306b\u3088\u308a\u3001GPU\u3067\u3042\u3063\u3066\u3082\u6bd4\u8f03\u7684\u300c\u91cd\u3044\u300d\u51e6\u7406\u3067\u3042\u308bPostGIS\u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u524d\u306b\u3001\u660e\u3089\u304b\u306b\u6761\u4ef6\u306b\u30de\u30c3\u30c1\u3057\u306a\u3044\u7d44\u307f\u5408\u308f\u305b\u3092\u6392\u9664\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u305f\u3081\u3001\u5927\u5e45\u306a\u691c\u7d22\u51e6\u7406\u306e\u9ad8\u901f\u5316\u304c\u671f\u5f85\u3067\u304d\u307e\u3059\u3002 =# EXPLAIN SELECT pref, city, count(*) FROM giscity g, dpoints d WHERE pref = 'Tokyo' AND st_contains(g.geom,st_makepoint(d.x, d.y)) GROUP BY pref, city; QUERY PLAN ----------------------------------------------------------------------------------------------------------- GroupAggregate (cost=5700646.35..5700759.39 rows=5024 width=29) Group Key: g.n03_001, g.n03_004 -> Sort (cost=5700646.35..5700658.91 rows=5024 width=29) Sort Key: g.n03_004 -> Custom Scan (GpuPreAgg) (cost=5700274.71..5700337.51 rows=5024 width=29) Reduction: Local Combined GpuJoin: enabled GPU Preference: GPU0 (NVIDIA Tesla V100-PCIE-16GB) -> Custom Scan (GpuJoin) on dpoints d (cost=638671.58..5668511.23 rows=50821573 width=21) Outer Scan: dpoints d (cost=0.00..141628.18 rows=7999618 width=16) Depth 1: GpuGiSTJoin(nrows 7999618...50821573) HeapSize: 3251.36KB IndexFilter: (g.geom ~ st_makepoint(d.x, d.y)) on giscity_geom_idx JoinQuals: st_contains(g.geom, st_makepoint(d.x, d.y)) GPU Preference: GPU0 (NVIDIA Tesla V100-PCIE-16GB) -> Seq Scan on giscity g (cost=0.00..8929.24 rows=6353 width=1883) Filter: ((pref)::text = 'Tokyo'::text) (17 rows)","title":"GPU\u7248PostGIS"},{"location":"postgis/#gpupostgis","text":"\u672c\u7ae0\u3067\u306fGPU\u7248PostGIS\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002","title":"GPU\u7248PostGIS"},{"location":"postgis/#_1","text":"PostGIS\u3068\u306f\u3001\u5730\u7406\u7a7a\u9593\u60c5\u5831\u3092\u53d6\u308a\u6271\u3046\u305f\u3081\u306ePostgreSQL\u5411\u3051\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3059\u3002 \u70b9\u3001\u7dda\u5206\u3001\u30dd\u30ea\u30b4\u30f3\u306a\u3069\u5730\u7406\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u6271\u3046\u305f\u3081\u306e\u30c7\u30fc\u30bf\u578b\uff08 Geometry \uff09\u3092\u63d0\u4f9b\u3057\u3066\u3044\u308b\u307b\u304b\u3001\u8ddd\u96e2\u306e\u8a08\u7b97\u3084\u5305\u542b\u3001\u4ea4\u5dee\u95a2\u4fc2\u306e\u5224\u5b9a\u306a\u3069\u3001\u5730\u7406\u30c7\u30fc\u30bf\u8981\u7d20\u3092\u8a55\u4fa1\u3059\u308b\u305f\u3081\u306e\u95a2\u6570\u3084\u6f14\u7b97\u5b50\u3092\u6570\u591a\u304f\u53d6\u308a\u63c3\u3048\u3066\u3044\u307e\u3059\u3002 \u307e\u305f\u3001\u4e00\u90e8\u306e\u6f14\u7b97\u5b50\u306b\u3064\u3044\u3066\u306fPostgreSQL\u306eGiST(Generalized Search Tree)\u306e\u4ed5\u7d44\u307f\u3092\u7528\u3044\u3066R\u6728\u306b\u3088\u308b\u9ad8\u901f\u306a\u691c\u7d22\u3082\u53ef\u80fd\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002 2001\u5e74\u306b\u6700\u521d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u516c\u958b\u3055\u308c\u3066\u4ee5\u964d\u300120\u5e74\u4ee5\u4e0a\u306b\u308f\u305f\u308a\u958b\u767a\u8005\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u306b\u3088\u3063\u3066\u6a5f\u80fd\u5f37\u5316\u3084\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u304c\u884c\u308f\u308c\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u3089PostGIS\u306e\u63d0\u4f9b\u3059\u308b\u95a2\u6570\u3084\u6f14\u7b97\u5b50\u306f\u3001\u7dcf\u6570\u3067500\u3092\u8d85\u3048\u308b\u975e\u5e38\u306b\u5927\u898f\u6a21\u306a\u3082\u306e\u3067\u3059\u3002 \u305d\u306e\u305f\u3081\u3001PG-Strom\u3067\u306f\u6bd4\u8f03\u7684\u5229\u7528\u983b\u5ea6\u306e\u9ad8\u3044\u3044\u304f\u3064\u304b\u306ePostGIS\u95a2\u6570\u3060\u3051\u3092GPU\u7528\u306b\u79fb\u690d\u3057\u3066\u3044\u307e\u3059\u3002 \u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306aPostGIS\u95a2\u6570\u304c\u305d\u308c\u306b\u8a72\u5f53\u3057\u307e\u3059\u3002 geometry st_point(float8 lon,float8 lat) \u7d4c\u5ea6\u7def\u5ea6\u304b\u3089\u3001\u70b9\uff08Point\uff09\u3067\u3042\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u578b\u3092\u751f\u6210\u3059\u308b\u3002 bool st_contains(geometry a,geometry b) \u30b8\u30aa\u30e1\u30c8\u30eaa\u304c\u30b8\u30aa\u30e1\u30c8\u30eab\u304c\u5305\u542b\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5224\u5b9a\u3059\u308b\u3002 bool st_crosses(geometry,geometry) \u30b8\u30aa\u30e1\u30c8\u30ea\u540c\u58eb\u304c\u4ea4\u5dee\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5224\u5b9a\u3059\u308b\u3002 text st_relate(geometry,geometry) \u30b8\u30aa\u30e1\u30c8\u30ea\u540c\u58eb\u306e\u95a2\u4fc2\u3092 DE-9IM(Dimensionally Extended 9-Intersection Model) \u306e\u884c\u5217\u8868\u73fe\u3068\u3057\u3066\u8fd4\u3057\u307e\u3059\u3002 \u307e\u305f\u3001\u30c6\u30fc\u30d6\u30eb\u540c\u58eb\u306e\u7d50\u5408\u6761\u4ef6\u304cGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff08R\u6728\uff09\u306e\u5229\u7528\u306b\u9069\u3059\u308b\u5834\u5408\u3001GpuJoin\u306fGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff08R\u6728\uff09\u3092GPU\u5074\u306b\u30ed\u30fc\u30c9\u3057\u3001\u7d50\u5408\u3059\u3079\u304d\u884c\u306e\u7d5e\u308a\u8fbc\u307f\u3092\u9ad8\u901f\u5316\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u3053\u308c\u306f\u4f8b\u3048\u3070\u3001GPS\u304b\u3089\u53d6\u5f97\u3057\u305f\u30e2\u30d0\u30a4\u30eb\u6a5f\u5668\u306e\u4f4d\u7f6e\uff08\u70b9\uff09\u3068\u30a8\u30ea\u30a2\u5b9a\u7fa9\u30c7\u30fc\u30bf\uff08\u30dd\u30ea\u30b4\u30f3\uff09\u3092\u7a81\u304d\u5408\u308f\u305b\u308b\u3068\u3044\u3063\u305f\u51e6\u7406\u306e\u9ad8\u901f\u5316\u306b\u5bc4\u4e0e\u3057\u307e\u3059\u3002","title":"\u6982\u8981"},{"location":"postgis/#postgis","text":"GPU\u7248PostGIS\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u7279\u5225\u306a\u8a2d\u5b9a\u306f\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002 PostGIS\u3092\u30d1\u30c3\u30b1\u30fc\u30b8\u53c8\u306f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001 CREATE EXTENSION \u69cb\u6587\u3092\u7528\u3044\u3066\u30b8\u30aa\u30e1\u30c8\u30ea\u30c7\u30fc\u30bf\u578b\u3084PostGIS\u95a2\u6570\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308c\u3070\u3001PG-Strom\u306f\u30af\u30a8\u30ea\u306b\u51fa\u73fe\u3057\u305fPostGIS\u95a2\u6570\u304cGPU\u3067\u5b9f\u884c\u53ef\u80fd\u304b\u3069\u3046\u304b\u3092\u81ea\u52d5\u7684\u306b\u5224\u5b9a\u3057\u307e\u3059\u3002 PostGIS\u81ea\u4f53\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u3064\u3044\u3066\u306f\u3001 PostGIS\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8 \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u30af\u30a8\u30ea\u306b\u306fGPU\u5b9f\u884c\u53ef\u80fd\u306aPostGIS\u95a2\u6570\u3067\u3042\u308b st_contains() \u3068 st_makepoint() \u3092\u4f7f\u7528\u3057\u3066\u304a\u308a\u3001\u30b8\u30aa\u30e1\u30c8\u30ea\u578b\u306e\u5b9a\u6570 'polygon ((10 10,30 10,30 20,10 20,10 10))' \u306e\u7bc4\u56f2\u5185\u306b\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u8aad\u307f\u51fa\u3057\u305f\u4e8c\u6b21\u5143\u306e\u70b9\u304c\u542b\u307e\u308c\u308b\u304b\u3069\u3046\u304b\u3092\u5224\u5b9a\u3057\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u95a2\u6570\u304c GPU Filter: \u306e\u4e00\u90e8\u3068\u3057\u3066\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u4e8b\u304b\u3089\u3082\u5206\u304b\u308b\u3088\u3046\u306b\u3001PG-Strom\u306f\u5bfe\u5fdc\u6e08\u307f\u306ePostGIS\u95a2\u6570\u3092\u81ea\u52d5\u7684\u306b\u691c\u51fa\u3057\u3001\u53ef\u80fd\u306a\u9650\u308aGPU\u3067\u5b9f\u884c\u3057\u3088\u3046\u3068\u8a66\u307f\u307e\u3059\u3002 =# explain select * from dpoints where st_contains('polygon ((10 10,30 10,30 20,10 20,10 10))', st_makepoint(x,y)); QUERY PLAN ------------------------------------------------------------------------------------------ Custom Scan (GpuScan) on dpoints (cost=1397205.10..12627630.76 rows=800 width=28) GPU Filter: st_contains('01030000000100000005000000000000000000244000000000000024400000000000003E4000000000000024400000000000003E4000000000000034400000000000002440000000000000344000000000000024400000000000002440'::geometry, st_makepoint(x, y)) GPU Preference: GPU0 (NVIDIA Tesla V100-PCIE-16GB) (3 rows)","title":"PostGIS\u306e\u5229\u7528"},{"location":"postgis/#gist","text":"st_contains() \u3084 st_crosses() \u306a\u3069\u30b8\u30aa\u30e1\u30c8\u30ea\u540c\u58eb\u306e\u95a2\u4fc2\u6027\u3092\u8a55\u4fa1\u3059\u308bPostGIS\u95a2\u6570\u306e\u4e00\u90e8\u306f\u3001GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff08R\u6728\uff09\u306b\u5bfe\u5fdc\u3057\u3066\u304a\u308a\u3001CPU\u3060\u3051\u3092\u7528\u3044\u3066\u691c\u7d22\u3092\u884c\u3046\u5834\u5408\u306b\u3082\u9ad8\u901f\u306a\u7d5e\u308a\u8fbc\u307f\u3092\u884c\u3046\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 PG-Strom\u306eGpuJoin\u3067\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u540c\u58eb\u306e\u7d50\u5408\u6761\u4ef6\u304cGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff08R\u6728\uff09\u3067\u9ad8\u901f\u5316\u53ef\u80fd\u306a\u5834\u5408\u3001\u7d50\u5408\u5bfe\u8c61\u30c6\u30fc\u30d6\u30eb\u306e\u4e2d\u8eab\u3060\u3051\u3067\u306a\u304f\u3001GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3082\u540c\u6642\u306bGPU\u5074\u3078\u8ee2\u9001\u3057\u3001\u7d50\u5408\u5bfe\u8c61\u306e\u884c\u3092\u9ad8\u901f\u306b\u7d5e\u308a\u8fbc\u3080\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b\u4e8b\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u306e\u51e6\u7406\u306f\u901a\u5e38\u3001CPU\u3088\u308a\u3082\u9065\u304b\u306b\u9ad8\u3044\u4e26\u5217\u5ea6\u3067\u5b9f\u884c\u3055\u308c\u308b\u305f\u3081\u3001\u304b\u306a\u308a\u306e\u9ad8\u901f\u5316\u3092\u671f\u5f85\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4e00\u65b9\u3001GpuScan\u306f\u30c6\u30fc\u30d6\u30eb\u5358\u4f53\u306e\u30b9\u30ad\u30e3\u30f3\u306bGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u307e\u305b\u3093\u3002\u3053\u308c\u306f\u3001CPU\u306b\u3088\u308bIndexScan\u3067\u306e\u7d5e\u308a\u8fbc\u307f\u306e\u65b9\u304c\u9ad8\u901f\u3067\u3042\u308b\u4e8b\u304c\u591a\u3044\u304b\u3089\u3067\u3059\u3002 \u30b8\u30aa\u30e1\u30c8\u30ea\u30c7\u30fc\u30bf\u306bGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u8a2d\u5b9a\u3059\u308b\u306b\u306f\u3001 CREATE INDEX \u69cb\u6587\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u5e02\u753a\u6751\u306e\u5883\u754c\u7dda\u30c7\u30fc\u30bf\uff08giscity\u30c6\u30fc\u30d6\u30eb\u306egeom\u5217\uff09\u306b\u5bfe\u3057\u3066GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u8a2d\u5b9a\u3059\u308b\u3082\u306e\u3067\u3059\u3002 =# CREATE INDEX on giscity USING gist (geom); CREATE INDEX \u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u306f\u3001\u5e02\u753a\u6751\u306e\u5883\u754c\u7dda\u30c7\u30fc\u30bf\uff08giscity\u30c6\u30fc\u30d6\u30eb\uff09\u3068\u7def\u5ea6\u7d4c\u5ea6\u30c7\u30fc\u30bf\uff08dpoints\u30c6\u30fc\u30d6\u30eb\uff09\u3092\u7a81\u304d\u5408\u308f\u305b\u3001\u30dd\u30ea\u30b4\u30f3\u3068\u3057\u3066\u8868\u73fe\u3055\u308c\u305f\u5e02\u753a\u6751\u306e\u9818\u57df\u5185\u306b\u542b\u307e\u308c\u308b\u7def\u5ea6\u7d4c\u5ea6\u30c7\u30fc\u30bf\uff08\u70b9\uff09\u306e\u6570\u3092\u5e02\u753a\u6751\u3054\u3068\u306b\u51fa\u529b\u3059\u308b\u3082\u306e\u3067\u3059\u3002 \u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306b\u3088\u308aGpuJoin\u304c\u9078\u629e\u3055\u308c\u3001giscity\u30c6\u30fc\u30d6\u30eb\u3068dpoints\u30c6\u30fc\u30d6\u30eb\u306e\u7d50\u5408\u306b\u306fGpuGiSTJoin\u304c\u9078\u629e\u3055\u308c\u3066\u3044\u307e\u3059\u3002 IndexFilter:\u306e\u884c\u306b\u306f\u3001GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u3088\u308b\u7d5e\u308a\u8fbc\u307f\u6761\u4ef6\u304c (g.geom ~ st_makepoint(d.x, d.y)) \u3067\u3042\u308a\u3001\u4f7f\u7528\u3059\u308b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c giscity_geom_idx \u3067\u3042\u308b\u4e8b\u304c\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002 GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u4f7f\u7528\u306b\u3088\u308a\u3001GPU\u3067\u3042\u3063\u3066\u3082\u6bd4\u8f03\u7684\u300c\u91cd\u3044\u300d\u51e6\u7406\u3067\u3042\u308bPostGIS\u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u524d\u306b\u3001\u660e\u3089\u304b\u306b\u6761\u4ef6\u306b\u30de\u30c3\u30c1\u3057\u306a\u3044\u7d44\u307f\u5408\u308f\u305b\u3092\u6392\u9664\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u305f\u3081\u3001\u5927\u5e45\u306a\u691c\u7d22\u51e6\u7406\u306e\u9ad8\u901f\u5316\u304c\u671f\u5f85\u3067\u304d\u307e\u3059\u3002 =# EXPLAIN SELECT pref, city, count(*) FROM giscity g, dpoints d WHERE pref = 'Tokyo' AND st_contains(g.geom,st_makepoint(d.x, d.y)) GROUP BY pref, city; QUERY PLAN ----------------------------------------------------------------------------------------------------------- GroupAggregate (cost=5700646.35..5700759.39 rows=5024 width=29) Group Key: g.n03_001, g.n03_004 -> Sort (cost=5700646.35..5700658.91 rows=5024 width=29) Sort Key: g.n03_004 -> Custom Scan (GpuPreAgg) (cost=5700274.71..5700337.51 rows=5024 width=29) Reduction: Local Combined GpuJoin: enabled GPU Preference: GPU0 (NVIDIA Tesla V100-PCIE-16GB) -> Custom Scan (GpuJoin) on dpoints d (cost=638671.58..5668511.23 rows=50821573 width=21) Outer Scan: dpoints d (cost=0.00..141628.18 rows=7999618 width=16) Depth 1: GpuGiSTJoin(nrows 7999618...50821573) HeapSize: 3251.36KB IndexFilter: (g.geom ~ st_makepoint(d.x, d.y)) on giscity_geom_idx JoinQuals: st_contains(g.geom, st_makepoint(d.x, d.y)) GPU Preference: GPU0 (NVIDIA Tesla V100-PCIE-16GB) -> Seq Scan on giscity g (cost=0.00..8929.24 rows=6353 width=1883) Filter: ((pref)::text = 'Tokyo'::text) (17 rows)","title":"GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9"},{"location":"ref_devfuncs/","text":"\u95a2\u6570\u3068\u6f14\u7b97\u5b50 \u672c\u7ae0\u3067\u306fGPU\u30c7\u30d0\u30a4\u30b9\u4e0a\u3067\u5b9f\u884c\u53ef\u80fd\u306a\u95a2\u6570\u3068\u6f14\u7b97\u5b50\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u578b\u30ad\u30e3\u30b9\u30c8 bool <-- int4 int1 <-- int2 , int4 , int8 , float2 , float4 , float8 , numeric int2 <-- int1 , int4 , int8 , float2 , float4 , float8 , numeric int4 <-- bool , int1 , int2 , int8 , float2 , float4 , float8 , numeric int8 <-- int1 , int2 , int4 , float2 , float4 , float8 , numeric float2 <-- int1 , int2 , int4 , int8 , float4 , float8 , numeric float4 <-- int1 , int2 , int4 , int8 , float2 , float8 , numeric float8 <-- int1 , int2 , int4 , int8 , float2 , float4 , numeric numeric <-- int1 , int2 , int4 , int8 , float2 , float4 , float8 money <-- int4 , int8 , numeric date <-- timestamp , timestamptz time <-- timetz , timestamp , timestamptz timetz <-- time , timestamptz timestamp <-- date , timestamptz timestamptz <-- date , timestamp \u6570\u5024\u578b\u6f14\u7b97\u5b50 bool COMP bool \u8ad6\u7406\u5024\u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT COMP INT \u6574\u6570\u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3001\u5de6\u8fba\u3068\u53f3\u8fba\u304c\u7570\u306a\u308b\u6574\u6570\u578b\u3067\u3042\u3063\u3066\u3082\u69cb\u3044\u307e\u305b\u3093\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} FP COMP FP \u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 FP \u306f float2,float4,float8 \u306e\u3044\u305a\u308c\u304b\u3067\u3001\u5de6\u8fba\u3068\u53f3\u8fba\u304c\u7570\u306a\u308b\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u3067\u3042\u3063\u3066\u3082\u69cb\u3044\u307e\u305b\u3093\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} numeric COMP numeric \u5b9f\u6570\u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT OP INT \u6574\u6570\u578b\u306e\u7b97\u8853\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3001\u5de6\u8fba\u3068\u53f3\u8fba\u304c\u7570\u306a\u308b\u6574\u6570\u578b\u3067\u3042\u3063\u3066\u3082\u69cb\u3044\u307e\u305b\u3093\u3002 OP \u306f +,-,*,/ \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} FP OP FP \u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u306e\u7b97\u8853\u6f14\u7b97\u5b50\u3002 FP \u306f float2,float4,float8 \u306e\u3044\u305a\u308c\u304b\u3067\u3001\u5de6\u8fba\u3068\u53f3\u8fba\u304c\u7570\u306a\u308b\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u3067\u3042\u3063\u3066\u3082\u69cb\u3044\u307e\u305b\u3093\u3002 COMP \u306f +,-,*,/ \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} numeric OP numeric \u5b9f\u6570\u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 OP \u306f +,-,*,/ \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT % INT \u5270\u4f59\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT & INT \u8ad6\u7406\u7a4d\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT | INT \u8ad6\u7406\u548c\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT # INT \u6392\u4ed6\u7684\u8ad6\u7406\u548c\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} ~ INT \u8ad6\u7406\u5426\u5b9a\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT >> int4 \u53f3\u30b7\u30d5\u30c8\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT << int4 \u5de6\u30b7\u30d5\u30c8\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} + TYPE \u5358\u9805\u30d7\u30e9\u30b9\u6f14\u7b97\u5b50\u3002 TYPE \u306f int1,int2,int4,int8,float2,float4,float8,numeric \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} - TYPE \u5358\u9805\u30de\u30a4\u30ca\u30b9\u6f14\u7b97\u5b50\u3002 TYPE \u306f int1,int2,int4,int8,float2,float4,float8,numeric \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} @ TYPE \u7d76\u5bfe\u5024\u3002 TYPE \u306f int1,int2,int4,int8,float2,float4,float8,numeric \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} \u6570\u5b66\u95a2\u6570 float8 cbrt(float8) float8 dcbrt(float8) \u7acb\u65b9\u6839 float8 ceil(float8) float8 ceiling(float8) \u5f15\u6570\u3088\u308a\u5927\u304d\u3044\u304b\u7b49\u3057\u304f\u3001\u5f15\u6570\u306b\u6700\u3082\u8fd1\u3044\u6574\u6570 float8 exp(float8) float8 dexp(float8) \u6307\u6570\uff08e\u3092\u5e95\u3068\u3059\u308b\u6307\u5b9a\u306e\u3079\u304d\u4e57\uff09 float8 floor(float8) \u5f15\u6570\u3088\u308a\u5c0f\u3055\u3044\u304b\u7b49\u3057\u304f\u3001\u5f15\u6570\u306b\u6700\u3082\u8fd1\u3044\u6574\u6570 float8 ln(float8) float8 dlog1(float8) \u81ea\u7136\u5bfe\u6570 float8 log(float8) float8 dlog10(float8) 10\u3092\u5e95\u3068\u3057\u305f\u5bfe\u6570 float8 pi() \u5186\u5468\u7387 float8 power(float8,float8) float8 pow(float8,float8) float8 dpow(float8,float8) \u3079\u304d\u4e57 float8 round(float8) float8 dround(float8) \u6700\u3082\u8fd1\u3044\u6574\u6570\u3078\u306e\u4e38\u3081 float8 sign(float8) \u7b26\u53f7 float8 sqrt(float8) float8 dsqrt(float8) \u5e73\u65b9\u6839 float8 trunc(float8) float8 dtrunc(float8) \u6574\u6570\u3078\u306e\u5207\u6368\u3066 \u4e09\u89d2\u95a2\u6570 float8 degrees(float8) \u30e9\u30b8\u30a2\u30f3\u306b\u5bfe\u5fdc\u3059\u308b\u5ea6} float8 radians(float8) \u5ea6\u306b\u5bfe\u5fdc\u3059\u308b\u30e9\u30b8\u30a2\u30f3} float8 acos(float8) \u9006\u4f59\u5f26\u95a2\u6570} float8 asin(float8) \u9006\u6b63\u5f26\u95a2\u6570} float8 atan(float8) \u9006\u6b63\u63a5\u95a2\u6570} float8 atan2(float8,float8) arg1 / arg2 \u306e\u9006\u6b63\u63a5\u95a2\u6570} float8 cos(float8) \u4f59\u5f26\u95a2\u6570} float8 cot(float8) \u4f59\u63a5\u95a2\u6570} float8 sin(float8) \u6b63\u5f26\u95a2\u6570} float8 tan(float8) \u6b63\u63a5\u95a2\u6570} \u65e5\u4ed8/\u6642\u523b\u578b\u6f14\u7b97\u5b50 date COMP date date \u578b\u540c\u58eb\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} date COMP timestamp timestamp COMP date date \u578b\u3068 timestamp \u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} date COMP timestamptz timestamptz COMP date date \u578b\u3068 timestamptz \u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} time COMP time time \u578b\u540c\u58eb\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} timetz COMP timetz timetz \u578b\u540c\u58eb\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} timestamp COMP timestamp timestamp \u578b\u540c\u58eb\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} timestamptz COMP timestamptz timestamptz \u578b\u540c\u58eb\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} timestamp COMP timestamptz timestamptz COMP timestamp timestamp \u578b\u3068 timestamptz \u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} interval COMP interval interval \u578b\u540c\u58eb\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} date + int4 int4 + date date \u578b\u306e\u52a0\u7b97\u6f14\u7b97\u5b50} date - int4 date \u578b\u306e\u6e1b\u7b97\u6f14\u7b97\u5b50} date - date date \u578b\u540c\u58eb\u306e\u5dee\u5206} date + time time + date date \u3068 time \u304b\u3089 timestamp \u3092\u751f\u6210\u3057\u307e\u3059} date + timetz date \u3068 timetz \u304b\u3089 timestamptz \u3092\u751f\u6210\u3057\u307e\u3059} time - time time \u578b\u540c\u58eb\u306e\u5dee\u5206} timestamp - timestamp timestamp \u578b\u540c\u58eb\u306e\u5dee\u5206} timetz + interval timetz - interval timetz \u3068 interval \u3092\u52a0\u7b97\u3001\u307e\u305f\u306f\u6e1b\u7b97\u3057\u307e\u3059\u3002} timestamptz + interval timestamptz - interval timestamptz \u3068 interval \u3092\u52a0\u7b97\u3001\u307e\u305f\u306f\u6e1b\u7b97\u3057\u307e\u3059\u3002} overlaps(TYPE,TYPE,TYPE,TYPE) 2\u3064\u306e\u6642\u9593\u9593\u9694\u304c\u91cd\u306a\u308b\u304b\u3069\u3046\u304b\u3092\u5224\u5b9a\u3057\u307e\u3059\u3002 TYPE \u306f time,timetz,timestamp,timestamptz \u306e\u3044\u305a\u308c\u304b\u4e00\u3064\u3067\u3059\u3002} extract(text FROM TYPE) day \u3084 hour \u306a\u3069\u65e5\u4ed8\u6642\u523b\u578b\u306e\u90e8\u5206\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u62bd\u51fa\u3002 TYPE \u306f time,timetz,timestamp,timestamptz,interval \u306e\u3044\u305a\u308c\u304b\u4e00\u3064\u3067\u3059\u3002} now() \u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u73fe\u5728\u6642\u523b} - interval interval \u578b\u306e\u5358\u9805\u30de\u30a4\u30ca\u30b9\u6f14\u7b97\u5b50} interval + interval interval \u578b\u306e\u52a0\u7b97\u6f14\u7b97\u5b50} interval - interval interval \u578b\u306e\u6e1b\u7b97\u6f14\u7b97\u5b50} \u6587\u5b57\u5217\u95a2\u6570/\u6f14\u7b97\u5b50 {text,bpchar} COMP {text,bpchar} \u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002 \u306a\u304a\u3001 <,<=,>=,> \u6f14\u7b97\u5b50\u306f\u30ed\u30b1\u30fc\u30eb\u8a2d\u5b9a\u304cUTF-8\u307e\u305f\u306fC(\u30ed\u30b1\u30fc\u30eb\u8a2d\u5b9a\u306a\u3057)\u306e\u5834\u5408\u306b\u306e\u307f\u6709\u52b9\u3067\u3059\u3002} substring(text,int4) substring(text,int4,int4) substr(text,int4) substr(text,int4,int4) \u90e8\u5206\u6587\u5b57\u5217\u306e\u5207\u308a\u51fa\u3057} length({text,bpchar}) \u6587\u5b57\u5217\u9577} {text,bpchar} [NOT] LIKE text LIKE\u8868\u73fe\u3092\u7528\u3044\u305f\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1\u30f3\u30b0} {text,bpchar} [NOT] ILIKE text LIKE\u8868\u73fe\u3092\u7528\u3044\u305f\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u533a\u5225\u3057\u306a\u3044\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1\u30f3\u30b0\u3002 \u306a\u304a\u3001 ILIKE \u6f14\u7b97\u5b50\u306f\u30ed\u30b1\u30fc\u30eb\u8a2d\u5b9a\u304cUTF-8\u307e\u305f\u306fC(\u30ed\u30b1\u30fc\u30eb\u8a2d\u5b9a\u306a\u3057)\u306e\u5834\u5408\u306b\u306e\u307f\u6709\u52b9\u3067\u3059\u3002} \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u95a2\u6570/\u6f14\u7b97\u5b50 macaddr COMP macaddr \u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} macaddr & macaddr \u30d3\u30c3\u30c8\u7a4d\u6f14\u7b97\u5b50} macaddr | macaddr \u30d3\u30c3\u30c8\u548c\u6f14\u7b97\u5b50} ~ macaddr \u30d3\u30c3\u30c8\u5426\u5b9a\u6f14\u7b97\u5b50} trunc(macaddr) \u672b\u5c3e\u306e3\u30d0\u30a4\u30c8\u3092\u30bc\u30ed\u306b\u8a2d\u5b9a\u3059\u308b} inet COMP inet \u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} inet << inet \u5de6\u8fba\u306f\u53f3\u8fba\u306b\u5185\u5305\u3055\u308c\u308b\u3002} inet <<= inet \u5de6\u8fba\u306f\u53f3\u8fba\u306b\u5185\u5305\u3055\u308c\u308b\u304b\u7b49\u3057\u3044\u3002} inet >> inet \u5de6\u8fba\u306f\u53f3\u8fba\u3092\u5185\u5305\u3059\u308b\u3002} inet >>= inet \u5de6\u8fba\u306f\u53f3\u8fba\u3092\u5185\u5305\u3059\u308b\u304b\u7b49\u3057\u3044\u3002} inet && inet \u5de6\u8fba\u306f\u53f3\u8fba\u3092\u5185\u5305\u3059\u308b\u304b\u5185\u5305\u3055\u308c\u308b} ~ inet \u30d3\u30c3\u30c8\u5426\u5b9a\u6f14\u7b97\u5b50} inet & inet \u30d3\u30c3\u30c8\u7a4d\u6f14\u7b97\u5b50} inet | inet \u30d3\u30c3\u30c8\u548c\u6f14\u7b97\u5b50} inet + int8 \u52a0\u7b97\u6f14\u7b97\u5b50} inet - int8 \u6e1b\u7b97\u6f14\u7b97\u5b50} inet - inet \u6e1b\u7b97\u6f14\u7b97\u5b50} broadcast(inet) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c8\u30a2\u30c9\u30ec\u30b9\u3092\u8fd4\u3059} family(inet) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30a2\u30c9\u30ec\u30b9\u30d5\u30a1\u30df\u30ea\u3092\u8fd4\u3059\u3002IPv4\u306e\u5834\u5408\u306f 4 \u3001IPv6\u306e\u5834\u5408\u306f 6 } hostmask(inet) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30db\u30b9\u30c8\u30de\u30b9\u30af\u3092\u8fd4\u3059} masklen(inet) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30de\u30b9\u30af\u9577\u3092\u8fd4\u3059} netmask(inet) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30cd\u30c3\u30c8\u30de\u30b9\u30af\u3092\u8fd4\u3059} network(inet) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u90e8\u3092\u8fd4\u3059} set_masklen(NETADDR,int) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30cd\u30c3\u30c8\u30de\u30b9\u30af\u9577\u3092\u8a2d\u5b9a\u3059\u308b\u3002 NETADDR \u306f inet \u304b cidr \u306e\u3069\u3061\u3089\u304b\u3002} inet_merge(inet,inet) \u4e21\u65b9\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u542b\u3080\u6700\u5c0f\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u8fd4\u3059} \u901a\u8ca8\u578b\u6f14\u7b97\u5b50 money COMP money \u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} money OP money \u7b97\u8853\u6f14\u7b97\u5b50\u3002 OP \u306f +,-,/ \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} money * TYPE TYPE * money \u901a\u8ca8\u578b\u3068\u6570\u5024\u578b\u306e\u4e57\u7b97\u3002 TYPE \u306f int1,int2,int4,float2,float4,float8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} money / TYPE \u901a\u8ca8\u578b\u306e\u6570\u5024\u578b\u306b\u3088\u308b\u9664\u7b97\u3002 TYPE \u306f int1,int2,int4,float2,float4,float8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} money / money \u901a\u8ca8\u578b\u540c\u58eb\u306e\u9664\u7b97\u3002} uuid\u578b\u6f14\u7b97\u5b50 uuid COMP uuid \u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} JSONB\u578b\u6f14\u7b97\u5b50 jsonb -> KEY KEY \u3067\u6307\u5b9a\u3055\u308c\u305fJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u53d6\u5f97\u3059\u308b} jsonb -> NUM \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7 NUM \u3067\u6307\u5b9a\u3055\u308c\u305fJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u53d6\u5f97\u3059\u308b} jsonb ->> KEY KEY \u3067\u6307\u5b9a\u3055\u308c\u305fJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u30c6\u30ad\u30b9\u30c8\u5024\u3068\u3057\u3066\u53d6\u5f97\u3059\u308b} jsonb ->> NUM \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7 NUM \u3067\u6307\u5b9a\u3055\u308c\u305fJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u30c6\u30ad\u30b9\u30c8\u5024\u3068\u3057\u3066\u53d6\u5f97\u3059\u308b} (jsonb ->> KEY)::TYPE TYPE \u304c int2,int4,int8,float4,float8,numeric \u306e\u3044\u305a\u308c\u304b\u3067\u3042\u308b\u5834\u5408\u3001 KEY \u3067\u6307\u5b9a\u3055\u308c\u305fJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u6570\u5024\u578b\u3068\u3057\u3066\u53d6\u5f97\u3059\u308b\u3002\u4e0b\u8a18\u306e\u88dc\u8db3\u3082\u53c2\u7167\u3002} (jsonb ->> NUM)::TYPE TYPE \u304c int2,int4,int8,float4,float8,numeric \u306e\u3044\u305a\u308c\u304b\u3067\u3042\u308b\u5834\u5408\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7 NUM \u3067\u6307\u5b9a\u3055\u308c\u305fJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u6570\u5024\u578b\u3068\u3057\u3066\u53d6\u5f97\u3059\u308b\u3002\u4e0b\u8a18\u306e\u88dc\u8db3\u3082\u53c2\u7167\u3002} jsonb ? KEY jsonb\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u6307\u5b9a\u3055\u308c\u305f KEY \u3092\u542b\u3080\u304b\u3069\u3046\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b} Note jsonb ->> KEY \u6f14\u7b97\u5b50\u306b\u3088\u3063\u3066\u53d6\u308a\u51fa\u3057\u305f\u6570\u5024\u30c7\u30fc\u30bf\u3092 float \u3084 numeric \u306a\u3069\u6570\u5024\u578b\u306b\u5909\u63db\u3059\u308b\u6642\u3001\u901a\u5e38\u3001PostgreSQL\u306fjsonb\u5185\u90e8\u8868\u73fe\u3092\u30c6\u30ad\u30b9\u30c8\u3068\u3057\u3066\u51fa\u529b\u3057\u3001\u305d\u308c\u3092\u6570\u5024\u8868\u73fe\u306b\u5909\u63db\u3059\u308b\u3068\u3044\u30462\u30b9\u30c6\u30c3\u30d7\u306e\u51e6\u7406\u3092\u884c\u3044\u307e\u3059\u3002 PG-Strom\u306f jsonb ->> KEY \u6f14\u7b97\u5b50\u306b\u3088\u308b\u53c2\u7167\u3068\u30c6\u30ad\u30b9\u30c8\u21d2\u6570\u5024\u8868\u73fe\u3078\u306e\u30ad\u30e3\u30b9\u30c8\u304c\u9023\u7d9a\u3057\u3066\u3044\u308b\u6642\u3001jsonb\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304b\u3089\u6570\u5024\u8868\u73fe\u3092\u53d6\u308a\u51fa\u3059\u305f\u3081\u306e\u7279\u5225\u306a\u30c7\u30d0\u30a4\u30b9\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u4e8b\u3067\u6700\u9069\u5316\u3092\u884c\u3044\u307e\u3059\u3002 PostGIS\u95a2\u6570 geometry st_makepoint(float8,float8) geometry st_point(float8,float8) 2\u6b21\u5143\u5ea7\u6a19\u3092\u542b\u3080POINT\u578b\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u8fd4\u3059 geometry st_makepoint(float8,float8,float8) 3\u6b21\u5143\u5ea7\u6a19\u3092\u542b\u3080POINT\u578b\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u8fd4\u3059 geometry st_makepoint(float8,float8,float8,float8) ZM\u5ea7\u6a19\u3092\u542b\u3080POINT\u578b\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u8fd4\u3059 geometry st_setsrid(geometry,int4) \u30b8\u30aa\u30e1\u30c8\u30ea\u306bSRID\u3092\u8a2d\u5b9a\u3059\u308b float8 st_distance(geometry,geometry) \u30b8\u30aa\u30e1\u30c8\u30ea\u9593\u306e\u8ddd\u96e2\u3092 float8 \u3067\u8fd4\u3059 bool st_dwithin(geometry,geometry,float8) \u30b8\u30aa\u30e1\u30c8\u30ea\u9593\u306e\u8ddd\u96e2\u304c\u6307\u5b9a\u5024\u4ee5\u5185\u306a\u3089\u771f\u3092\u8fd4\u3059\u3002 st_distance \u3068\u6bd4\u8f03\u6f14\u7b97\u5b50\u306e\u7d44\u307f\u5408\u308f\u305b\u3088\u308a\u3082\u9ad8\u901f\u306a\u5834\u5408\u304c\u3042\u308b\u3002 text st_relate(geometry,geometry) \u30b8\u30aa\u30e1\u30c8\u30ea\u9593\u306e\u4ea4\u5dee\u72b6\u614b\u3092\u5224\u5b9a\u3057\u3001DE9-IM(Dimensionally Extended Nine-Intersection Matrix)\u66f8\u5f0f\u3092\u8fd4\u3059\u3002 bool st_contains(geometry,geometry) \u30b8\u30aa\u30e1\u30c8\u30ea1\u304c\u30b8\u30aa\u30e1\u30c8\u30ea2\u3092\u5305\u542b\u3059\u308b\u6642\u3001\u771f\u3092\u8fd4\u3059\u3002 bool st_crosses(geometry,geometry) \u30b8\u30aa\u30e1\u30c8\u30ea\u540c\u58eb\u304c\u7a7a\u9593\u7684\u306b\u4ea4\u5dee\u3059\u308b\u6642\u3001\u771f\u3092\u8fd4\u3059\u3002 int4 st_linecrossingdirection(geometry,geometry) 2\u3064\u306eLINESTRING\u578b\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u3069\u306e\u3088\u3046\u306b\u4ea4\u5dee\u3059\u308b\u304b\uff08\u3057\u306a\u3044\u304b\uff09\u3092\u8fd4\u3059\u3002 CUBE\u578b\u95a2\u6570 cube COMP cube \u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} bool cube_contains(cube, cube) \u7b2c\u4e00\u5f15\u6570\u306e\u7acb\u4f53\u304c\u7b2c\u4e8c\u5f15\u6570\u306e\u7acb\u4f53\u3092\u5305\u542b\u3057\u3066\u3044\u308b\u6642\u3001\u771f\u3092\u8fd4\u3059\u3002 bool cube_contained(cube, cube) \u7b2c\u4e00\u5f15\u6570\u306e\u7acb\u4f53\u304c\u7b2c\u4e8c\u5f15\u6570\u306e\u7acb\u4f53\u306b\u5305\u542b\u3055\u308c\u3066\u3044\u308b\u6642\u3001\u771f\u3092\u8fd4\u3059\u3002 float8 cube_ll_coord(cube, int4) \u7acb\u4f53\u306e\u5de6\u4e0b\u9685\u306en\u6b21\u5ea7\u6a19\u306e\u5024\u3092\u8fd4\u3057\u307e\u3059\u3002","title":"\u95a2\u6570\u3068\u6f14\u7b97\u5b50"},{"location":"ref_devfuncs/#_1","text":"\u672c\u7ae0\u3067\u306fGPU\u30c7\u30d0\u30a4\u30b9\u4e0a\u3067\u5b9f\u884c\u53ef\u80fd\u306a\u95a2\u6570\u3068\u6f14\u7b97\u5b50\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002","title":"\u95a2\u6570\u3068\u6f14\u7b97\u5b50"},{"location":"ref_devfuncs/#_2","text":"bool <-- int4 int1 <-- int2 , int4 , int8 , float2 , float4 , float8 , numeric int2 <-- int1 , int4 , int8 , float2 , float4 , float8 , numeric int4 <-- bool , int1 , int2 , int8 , float2 , float4 , float8 , numeric int8 <-- int1 , int2 , int4 , float2 , float4 , float8 , numeric float2 <-- int1 , int2 , int4 , int8 , float4 , float8 , numeric float4 <-- int1 , int2 , int4 , int8 , float2 , float8 , numeric float8 <-- int1 , int2 , int4 , int8 , float2 , float4 , numeric numeric <-- int1 , int2 , int4 , int8 , float2 , float4 , float8 money <-- int4 , int8 , numeric date <-- timestamp , timestamptz time <-- timetz , timestamp , timestamptz timetz <-- time , timestamptz timestamp <-- date , timestamptz timestamptz <-- date , timestamp","title":"\u578b\u30ad\u30e3\u30b9\u30c8"},{"location":"ref_devfuncs/#_3","text":"bool COMP bool \u8ad6\u7406\u5024\u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT COMP INT \u6574\u6570\u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3001\u5de6\u8fba\u3068\u53f3\u8fba\u304c\u7570\u306a\u308b\u6574\u6570\u578b\u3067\u3042\u3063\u3066\u3082\u69cb\u3044\u307e\u305b\u3093\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} FP COMP FP \u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 FP \u306f float2,float4,float8 \u306e\u3044\u305a\u308c\u304b\u3067\u3001\u5de6\u8fba\u3068\u53f3\u8fba\u304c\u7570\u306a\u308b\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u3067\u3042\u3063\u3066\u3082\u69cb\u3044\u307e\u305b\u3093\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} numeric COMP numeric \u5b9f\u6570\u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT OP INT \u6574\u6570\u578b\u306e\u7b97\u8853\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3001\u5de6\u8fba\u3068\u53f3\u8fba\u304c\u7570\u306a\u308b\u6574\u6570\u578b\u3067\u3042\u3063\u3066\u3082\u69cb\u3044\u307e\u305b\u3093\u3002 OP \u306f +,-,*,/ \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} FP OP FP \u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u306e\u7b97\u8853\u6f14\u7b97\u5b50\u3002 FP \u306f float2,float4,float8 \u306e\u3044\u305a\u308c\u304b\u3067\u3001\u5de6\u8fba\u3068\u53f3\u8fba\u304c\u7570\u306a\u308b\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u3067\u3042\u3063\u3066\u3082\u69cb\u3044\u307e\u305b\u3093\u3002 COMP \u306f +,-,*,/ \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} numeric OP numeric \u5b9f\u6570\u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 OP \u306f +,-,*,/ \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT % INT \u5270\u4f59\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT & INT \u8ad6\u7406\u7a4d\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT | INT \u8ad6\u7406\u548c\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT # INT \u6392\u4ed6\u7684\u8ad6\u7406\u548c\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} ~ INT \u8ad6\u7406\u5426\u5b9a\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT >> int4 \u53f3\u30b7\u30d5\u30c8\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT << int4 \u5de6\u30b7\u30d5\u30c8\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} + TYPE \u5358\u9805\u30d7\u30e9\u30b9\u6f14\u7b97\u5b50\u3002 TYPE \u306f int1,int2,int4,int8,float2,float4,float8,numeric \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} - TYPE \u5358\u9805\u30de\u30a4\u30ca\u30b9\u6f14\u7b97\u5b50\u3002 TYPE \u306f int1,int2,int4,int8,float2,float4,float8,numeric \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} @ TYPE \u7d76\u5bfe\u5024\u3002 TYPE \u306f int1,int2,int4,int8,float2,float4,float8,numeric \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002}","title":"\u6570\u5024\u578b\u6f14\u7b97\u5b50"},{"location":"ref_devfuncs/#_4","text":"float8 cbrt(float8) float8 dcbrt(float8) \u7acb\u65b9\u6839 float8 ceil(float8) float8 ceiling(float8) \u5f15\u6570\u3088\u308a\u5927\u304d\u3044\u304b\u7b49\u3057\u304f\u3001\u5f15\u6570\u306b\u6700\u3082\u8fd1\u3044\u6574\u6570 float8 exp(float8) float8 dexp(float8) \u6307\u6570\uff08e\u3092\u5e95\u3068\u3059\u308b\u6307\u5b9a\u306e\u3079\u304d\u4e57\uff09 float8 floor(float8) \u5f15\u6570\u3088\u308a\u5c0f\u3055\u3044\u304b\u7b49\u3057\u304f\u3001\u5f15\u6570\u306b\u6700\u3082\u8fd1\u3044\u6574\u6570 float8 ln(float8) float8 dlog1(float8) \u81ea\u7136\u5bfe\u6570 float8 log(float8) float8 dlog10(float8) 10\u3092\u5e95\u3068\u3057\u305f\u5bfe\u6570 float8 pi() \u5186\u5468\u7387 float8 power(float8,float8) float8 pow(float8,float8) float8 dpow(float8,float8) \u3079\u304d\u4e57 float8 round(float8) float8 dround(float8) \u6700\u3082\u8fd1\u3044\u6574\u6570\u3078\u306e\u4e38\u3081 float8 sign(float8) \u7b26\u53f7 float8 sqrt(float8) float8 dsqrt(float8) \u5e73\u65b9\u6839 float8 trunc(float8) float8 dtrunc(float8) \u6574\u6570\u3078\u306e\u5207\u6368\u3066","title":"\u6570\u5b66\u95a2\u6570"},{"location":"ref_devfuncs/#_5","text":"float8 degrees(float8) \u30e9\u30b8\u30a2\u30f3\u306b\u5bfe\u5fdc\u3059\u308b\u5ea6} float8 radians(float8) \u5ea6\u306b\u5bfe\u5fdc\u3059\u308b\u30e9\u30b8\u30a2\u30f3} float8 acos(float8) \u9006\u4f59\u5f26\u95a2\u6570} float8 asin(float8) \u9006\u6b63\u5f26\u95a2\u6570} float8 atan(float8) \u9006\u6b63\u63a5\u95a2\u6570} float8 atan2(float8,float8) arg1 / arg2 \u306e\u9006\u6b63\u63a5\u95a2\u6570} float8 cos(float8) \u4f59\u5f26\u95a2\u6570} float8 cot(float8) \u4f59\u63a5\u95a2\u6570} float8 sin(float8) \u6b63\u5f26\u95a2\u6570} float8 tan(float8) \u6b63\u63a5\u95a2\u6570}","title":"\u4e09\u89d2\u95a2\u6570"},{"location":"ref_devfuncs/#_6","text":"date COMP date date \u578b\u540c\u58eb\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} date COMP timestamp timestamp COMP date date \u578b\u3068 timestamp \u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} date COMP timestamptz timestamptz COMP date date \u578b\u3068 timestamptz \u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} time COMP time time \u578b\u540c\u58eb\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} timetz COMP timetz timetz \u578b\u540c\u58eb\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} timestamp COMP timestamp timestamp \u578b\u540c\u58eb\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} timestamptz COMP timestamptz timestamptz \u578b\u540c\u58eb\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} timestamp COMP timestamptz timestamptz COMP timestamp timestamp \u578b\u3068 timestamptz \u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} interval COMP interval interval \u578b\u540c\u58eb\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} date + int4 int4 + date date \u578b\u306e\u52a0\u7b97\u6f14\u7b97\u5b50} date - int4 date \u578b\u306e\u6e1b\u7b97\u6f14\u7b97\u5b50} date - date date \u578b\u540c\u58eb\u306e\u5dee\u5206} date + time time + date date \u3068 time \u304b\u3089 timestamp \u3092\u751f\u6210\u3057\u307e\u3059} date + timetz date \u3068 timetz \u304b\u3089 timestamptz \u3092\u751f\u6210\u3057\u307e\u3059} time - time time \u578b\u540c\u58eb\u306e\u5dee\u5206} timestamp - timestamp timestamp \u578b\u540c\u58eb\u306e\u5dee\u5206} timetz + interval timetz - interval timetz \u3068 interval \u3092\u52a0\u7b97\u3001\u307e\u305f\u306f\u6e1b\u7b97\u3057\u307e\u3059\u3002} timestamptz + interval timestamptz - interval timestamptz \u3068 interval \u3092\u52a0\u7b97\u3001\u307e\u305f\u306f\u6e1b\u7b97\u3057\u307e\u3059\u3002} overlaps(TYPE,TYPE,TYPE,TYPE) 2\u3064\u306e\u6642\u9593\u9593\u9694\u304c\u91cd\u306a\u308b\u304b\u3069\u3046\u304b\u3092\u5224\u5b9a\u3057\u307e\u3059\u3002 TYPE \u306f time,timetz,timestamp,timestamptz \u306e\u3044\u305a\u308c\u304b\u4e00\u3064\u3067\u3059\u3002} extract(text FROM TYPE) day \u3084 hour \u306a\u3069\u65e5\u4ed8\u6642\u523b\u578b\u306e\u90e8\u5206\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u62bd\u51fa\u3002 TYPE \u306f time,timetz,timestamp,timestamptz,interval \u306e\u3044\u305a\u308c\u304b\u4e00\u3064\u3067\u3059\u3002} now() \u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u73fe\u5728\u6642\u523b} - interval interval \u578b\u306e\u5358\u9805\u30de\u30a4\u30ca\u30b9\u6f14\u7b97\u5b50} interval + interval interval \u578b\u306e\u52a0\u7b97\u6f14\u7b97\u5b50} interval - interval interval \u578b\u306e\u6e1b\u7b97\u6f14\u7b97\u5b50}","title":"\u65e5\u4ed8/\u6642\u523b\u578b\u6f14\u7b97\u5b50"},{"location":"ref_devfuncs/#_7","text":"{text,bpchar} COMP {text,bpchar} \u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002 \u306a\u304a\u3001 <,<=,>=,> \u6f14\u7b97\u5b50\u306f\u30ed\u30b1\u30fc\u30eb\u8a2d\u5b9a\u304cUTF-8\u307e\u305f\u306fC(\u30ed\u30b1\u30fc\u30eb\u8a2d\u5b9a\u306a\u3057)\u306e\u5834\u5408\u306b\u306e\u307f\u6709\u52b9\u3067\u3059\u3002} substring(text,int4) substring(text,int4,int4) substr(text,int4) substr(text,int4,int4) \u90e8\u5206\u6587\u5b57\u5217\u306e\u5207\u308a\u51fa\u3057} length({text,bpchar}) \u6587\u5b57\u5217\u9577} {text,bpchar} [NOT] LIKE text LIKE\u8868\u73fe\u3092\u7528\u3044\u305f\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1\u30f3\u30b0} {text,bpchar} [NOT] ILIKE text LIKE\u8868\u73fe\u3092\u7528\u3044\u305f\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u533a\u5225\u3057\u306a\u3044\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1\u30f3\u30b0\u3002 \u306a\u304a\u3001 ILIKE \u6f14\u7b97\u5b50\u306f\u30ed\u30b1\u30fc\u30eb\u8a2d\u5b9a\u304cUTF-8\u307e\u305f\u306fC(\u30ed\u30b1\u30fc\u30eb\u8a2d\u5b9a\u306a\u3057)\u306e\u5834\u5408\u306b\u306e\u307f\u6709\u52b9\u3067\u3059\u3002}","title":"\u6587\u5b57\u5217\u95a2\u6570/\u6f14\u7b97\u5b50"},{"location":"ref_devfuncs/#_8","text":"macaddr COMP macaddr \u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} macaddr & macaddr \u30d3\u30c3\u30c8\u7a4d\u6f14\u7b97\u5b50} macaddr | macaddr \u30d3\u30c3\u30c8\u548c\u6f14\u7b97\u5b50} ~ macaddr \u30d3\u30c3\u30c8\u5426\u5b9a\u6f14\u7b97\u5b50} trunc(macaddr) \u672b\u5c3e\u306e3\u30d0\u30a4\u30c8\u3092\u30bc\u30ed\u306b\u8a2d\u5b9a\u3059\u308b} inet COMP inet \u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} inet << inet \u5de6\u8fba\u306f\u53f3\u8fba\u306b\u5185\u5305\u3055\u308c\u308b\u3002} inet <<= inet \u5de6\u8fba\u306f\u53f3\u8fba\u306b\u5185\u5305\u3055\u308c\u308b\u304b\u7b49\u3057\u3044\u3002} inet >> inet \u5de6\u8fba\u306f\u53f3\u8fba\u3092\u5185\u5305\u3059\u308b\u3002} inet >>= inet \u5de6\u8fba\u306f\u53f3\u8fba\u3092\u5185\u5305\u3059\u308b\u304b\u7b49\u3057\u3044\u3002} inet && inet \u5de6\u8fba\u306f\u53f3\u8fba\u3092\u5185\u5305\u3059\u308b\u304b\u5185\u5305\u3055\u308c\u308b} ~ inet \u30d3\u30c3\u30c8\u5426\u5b9a\u6f14\u7b97\u5b50} inet & inet \u30d3\u30c3\u30c8\u7a4d\u6f14\u7b97\u5b50} inet | inet \u30d3\u30c3\u30c8\u548c\u6f14\u7b97\u5b50} inet + int8 \u52a0\u7b97\u6f14\u7b97\u5b50} inet - int8 \u6e1b\u7b97\u6f14\u7b97\u5b50} inet - inet \u6e1b\u7b97\u6f14\u7b97\u5b50} broadcast(inet) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c8\u30a2\u30c9\u30ec\u30b9\u3092\u8fd4\u3059} family(inet) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30a2\u30c9\u30ec\u30b9\u30d5\u30a1\u30df\u30ea\u3092\u8fd4\u3059\u3002IPv4\u306e\u5834\u5408\u306f 4 \u3001IPv6\u306e\u5834\u5408\u306f 6 } hostmask(inet) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30db\u30b9\u30c8\u30de\u30b9\u30af\u3092\u8fd4\u3059} masklen(inet) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30de\u30b9\u30af\u9577\u3092\u8fd4\u3059} netmask(inet) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30cd\u30c3\u30c8\u30de\u30b9\u30af\u3092\u8fd4\u3059} network(inet) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u90e8\u3092\u8fd4\u3059} set_masklen(NETADDR,int) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30cd\u30c3\u30c8\u30de\u30b9\u30af\u9577\u3092\u8a2d\u5b9a\u3059\u308b\u3002 NETADDR \u306f inet \u304b cidr \u306e\u3069\u3061\u3089\u304b\u3002} inet_merge(inet,inet) \u4e21\u65b9\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u542b\u3080\u6700\u5c0f\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u8fd4\u3059}","title":"\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u95a2\u6570/\u6f14\u7b97\u5b50"},{"location":"ref_devfuncs/#_9","text":"money COMP money \u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} money OP money \u7b97\u8853\u6f14\u7b97\u5b50\u3002 OP \u306f +,-,/ \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} money * TYPE TYPE * money \u901a\u8ca8\u578b\u3068\u6570\u5024\u578b\u306e\u4e57\u7b97\u3002 TYPE \u306f int1,int2,int4,float2,float4,float8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} money / TYPE \u901a\u8ca8\u578b\u306e\u6570\u5024\u578b\u306b\u3088\u308b\u9664\u7b97\u3002 TYPE \u306f int1,int2,int4,float2,float4,float8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} money / money \u901a\u8ca8\u578b\u540c\u58eb\u306e\u9664\u7b97\u3002}","title":"\u901a\u8ca8\u578b\u6f14\u7b97\u5b50"},{"location":"ref_devfuncs/#uuid","text":"uuid COMP uuid \u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002}","title":"uuid\u578b\u6f14\u7b97\u5b50"},{"location":"ref_devfuncs/#jsonb","text":"jsonb -> KEY KEY \u3067\u6307\u5b9a\u3055\u308c\u305fJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u53d6\u5f97\u3059\u308b} jsonb -> NUM \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7 NUM \u3067\u6307\u5b9a\u3055\u308c\u305fJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u53d6\u5f97\u3059\u308b} jsonb ->> KEY KEY \u3067\u6307\u5b9a\u3055\u308c\u305fJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u30c6\u30ad\u30b9\u30c8\u5024\u3068\u3057\u3066\u53d6\u5f97\u3059\u308b} jsonb ->> NUM \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7 NUM \u3067\u6307\u5b9a\u3055\u308c\u305fJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u30c6\u30ad\u30b9\u30c8\u5024\u3068\u3057\u3066\u53d6\u5f97\u3059\u308b} (jsonb ->> KEY)::TYPE TYPE \u304c int2,int4,int8,float4,float8,numeric \u306e\u3044\u305a\u308c\u304b\u3067\u3042\u308b\u5834\u5408\u3001 KEY \u3067\u6307\u5b9a\u3055\u308c\u305fJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u6570\u5024\u578b\u3068\u3057\u3066\u53d6\u5f97\u3059\u308b\u3002\u4e0b\u8a18\u306e\u88dc\u8db3\u3082\u53c2\u7167\u3002} (jsonb ->> NUM)::TYPE TYPE \u304c int2,int4,int8,float4,float8,numeric \u306e\u3044\u305a\u308c\u304b\u3067\u3042\u308b\u5834\u5408\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7 NUM \u3067\u6307\u5b9a\u3055\u308c\u305fJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u6570\u5024\u578b\u3068\u3057\u3066\u53d6\u5f97\u3059\u308b\u3002\u4e0b\u8a18\u306e\u88dc\u8db3\u3082\u53c2\u7167\u3002} jsonb ? KEY jsonb\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u6307\u5b9a\u3055\u308c\u305f KEY \u3092\u542b\u3080\u304b\u3069\u3046\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b} Note jsonb ->> KEY \u6f14\u7b97\u5b50\u306b\u3088\u3063\u3066\u53d6\u308a\u51fa\u3057\u305f\u6570\u5024\u30c7\u30fc\u30bf\u3092 float \u3084 numeric \u306a\u3069\u6570\u5024\u578b\u306b\u5909\u63db\u3059\u308b\u6642\u3001\u901a\u5e38\u3001PostgreSQL\u306fjsonb\u5185\u90e8\u8868\u73fe\u3092\u30c6\u30ad\u30b9\u30c8\u3068\u3057\u3066\u51fa\u529b\u3057\u3001\u305d\u308c\u3092\u6570\u5024\u8868\u73fe\u306b\u5909\u63db\u3059\u308b\u3068\u3044\u30462\u30b9\u30c6\u30c3\u30d7\u306e\u51e6\u7406\u3092\u884c\u3044\u307e\u3059\u3002 PG-Strom\u306f jsonb ->> KEY \u6f14\u7b97\u5b50\u306b\u3088\u308b\u53c2\u7167\u3068\u30c6\u30ad\u30b9\u30c8\u21d2\u6570\u5024\u8868\u73fe\u3078\u306e\u30ad\u30e3\u30b9\u30c8\u304c\u9023\u7d9a\u3057\u3066\u3044\u308b\u6642\u3001jsonb\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304b\u3089\u6570\u5024\u8868\u73fe\u3092\u53d6\u308a\u51fa\u3059\u305f\u3081\u306e\u7279\u5225\u306a\u30c7\u30d0\u30a4\u30b9\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u4e8b\u3067\u6700\u9069\u5316\u3092\u884c\u3044\u307e\u3059\u3002","title":"JSONB\u578b\u6f14\u7b97\u5b50"},{"location":"ref_devfuncs/#postgis","text":"geometry st_makepoint(float8,float8) geometry st_point(float8,float8) 2\u6b21\u5143\u5ea7\u6a19\u3092\u542b\u3080POINT\u578b\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u8fd4\u3059 geometry st_makepoint(float8,float8,float8) 3\u6b21\u5143\u5ea7\u6a19\u3092\u542b\u3080POINT\u578b\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u8fd4\u3059 geometry st_makepoint(float8,float8,float8,float8) ZM\u5ea7\u6a19\u3092\u542b\u3080POINT\u578b\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u8fd4\u3059 geometry st_setsrid(geometry,int4) \u30b8\u30aa\u30e1\u30c8\u30ea\u306bSRID\u3092\u8a2d\u5b9a\u3059\u308b float8 st_distance(geometry,geometry) \u30b8\u30aa\u30e1\u30c8\u30ea\u9593\u306e\u8ddd\u96e2\u3092 float8 \u3067\u8fd4\u3059 bool st_dwithin(geometry,geometry,float8) \u30b8\u30aa\u30e1\u30c8\u30ea\u9593\u306e\u8ddd\u96e2\u304c\u6307\u5b9a\u5024\u4ee5\u5185\u306a\u3089\u771f\u3092\u8fd4\u3059\u3002 st_distance \u3068\u6bd4\u8f03\u6f14\u7b97\u5b50\u306e\u7d44\u307f\u5408\u308f\u305b\u3088\u308a\u3082\u9ad8\u901f\u306a\u5834\u5408\u304c\u3042\u308b\u3002 text st_relate(geometry,geometry) \u30b8\u30aa\u30e1\u30c8\u30ea\u9593\u306e\u4ea4\u5dee\u72b6\u614b\u3092\u5224\u5b9a\u3057\u3001DE9-IM(Dimensionally Extended Nine-Intersection Matrix)\u66f8\u5f0f\u3092\u8fd4\u3059\u3002 bool st_contains(geometry,geometry) \u30b8\u30aa\u30e1\u30c8\u30ea1\u304c\u30b8\u30aa\u30e1\u30c8\u30ea2\u3092\u5305\u542b\u3059\u308b\u6642\u3001\u771f\u3092\u8fd4\u3059\u3002 bool st_crosses(geometry,geometry) \u30b8\u30aa\u30e1\u30c8\u30ea\u540c\u58eb\u304c\u7a7a\u9593\u7684\u306b\u4ea4\u5dee\u3059\u308b\u6642\u3001\u771f\u3092\u8fd4\u3059\u3002 int4 st_linecrossingdirection(geometry,geometry) 2\u3064\u306eLINESTRING\u578b\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u3069\u306e\u3088\u3046\u306b\u4ea4\u5dee\u3059\u308b\u304b\uff08\u3057\u306a\u3044\u304b\uff09\u3092\u8fd4\u3059\u3002","title":"PostGIS\u95a2\u6570"},{"location":"ref_devfuncs/#cube","text":"cube COMP cube \u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} bool cube_contains(cube, cube) \u7b2c\u4e00\u5f15\u6570\u306e\u7acb\u4f53\u304c\u7b2c\u4e8c\u5f15\u6570\u306e\u7acb\u4f53\u3092\u5305\u542b\u3057\u3066\u3044\u308b\u6642\u3001\u771f\u3092\u8fd4\u3059\u3002 bool cube_contained(cube, cube) \u7b2c\u4e00\u5f15\u6570\u306e\u7acb\u4f53\u304c\u7b2c\u4e8c\u5f15\u6570\u306e\u7acb\u4f53\u306b\u5305\u542b\u3055\u308c\u3066\u3044\u308b\u6642\u3001\u771f\u3092\u8fd4\u3059\u3002 float8 cube_ll_coord(cube, int4) \u7acb\u4f53\u306e\u5de6\u4e0b\u9685\u306en\u6b21\u5ea7\u6a19\u306e\u5024\u3092\u8fd4\u3057\u307e\u3059\u3002","title":"CUBE\u578b\u95a2\u6570"},{"location":"ref_params/","text":"GUC\u30d1\u30e9\u30e1\u30fc\u30bf \u672c\u7bc0\u3067\u306fPG-Strom\u306e\u63d0\u4f9b\u3059\u308b\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u6a5f\u80fd\u5358\u4f4d\u306e\u6709\u52b9\u5316/\u7121\u52b9\u5316 pg_strom.enabled [\u578b: bool / \u521d\u671f\u5024: on] PG-Strom\u6a5f\u80fd\u5168\u4f53\u3092\u4e00\u62ec\u3057\u3066\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.enable_gpuscan [\u578b: bool / \u521d\u671f\u5024: on] GpuScan\u306b\u3088\u308b\u30b9\u30ad\u30e3\u30f3\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.enable_gpuhashjoin [\u578b: bool / \u521d\u671f\u5024: on] GpuHashJoin\u306b\u3088\u308bJOIN\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.enable_gpugistindex [\u578b: bool / \u521d\u671f\u5024: on] GpuGiSTIndex\u306b\u3088\u308bJOIN\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.enable_gpujoin [\u578b: bool / \u521d\u671f\u5024: on] GpuJoin\u306b\u3088\u308bJOIN\u3092\u4e00\u62ec\u3067\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002\uff08GpuHashJoin\u3068GpuGiSTIndex\u3092\u542b\u3080\uff09 pg_strom.enable_gpupreagg [\u578b: bool / \u521d\u671f\u5024: on] GpuPreAgg\u306b\u3088\u308b\u96c6\u7d04\u51e6\u7406\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.enable_numeric_aggfuncs [\u578b: bool / \u521d\u671f\u5024: on] numeric \u30c7\u30fc\u30bf\u578b\u3092\u5f15\u6570\u306b\u53d6\u308b\u96c6\u7d04\u6f14\u7b97\u3092GPU\u3067\u51e6\u7406\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002 GPU\u3067\u306e\u96c6\u7d04\u6f14\u7b97\u306b\u304a\u3044\u3066 numeric \u30c7\u30fc\u30bf\u578b\u306f\u500d\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570\u306b\u30de\u30c3\u30d4\u30f3\u30b0\u3055\u308c\u308b\u305f\u3081\u3001\u8a08\u7b97\u8aa4\u5dee\u306b\u30bb\u30f3\u30b7\u30c6\u30a3\u30d6\u306a\u7528\u9014\u306e\u5834\u5408\u306f\u3001\u3053\u306e\u8a2d\u5b9a\u5024\u3092 off \u306b\u3057\u3066CPU\u3067\u96c6\u7d04\u6f14\u7b97\u3092\u5b9f\u884c\u3057\u3001\u8a08\u7b97\u8aa4\u5dee\u306e\u767a\u751f\u3092\u6291\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 pg_strom.enable_brin [\u578b: bool / \u521d\u671f\u5024: on] BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u3063\u305f\u30c6\u30fc\u30d6\u30eb\u30b9\u30ad\u30e3\u30f3\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.cpu_fallback [\u578b: enum / \u521d\u671f\u5024: notice ] GPU\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\"CPU\u518d\u5b9f\u884c\"\u30a8\u30e9\u30fc\u3092\u8fd4\u3057\u305f\u3068\u304d\u306b\u3001\u5b9f\u969b\u306bCPU\u3067\u306e\u518d\u5b9f\u884c\u3092\u8a66\u307f\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002 notice ... \u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u51fa\u529b\u3057\u305f\u4e0a\u3067CPU\u3067\u306e\u518d\u5b9f\u884c\u3092\u884c\u3046 on , true ... \u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u51fa\u529b\u305b\u305aCPU\u3067\u306e\u518d\u5b9f\u884c\u3092\u884c\u3046 off , false ... \u30a8\u30e9\u30fc\u3092\u767a\u751f\u3055\u305bCPU\u3067\u306e\u518d\u5b9f\u884c\u3092\u884c\u308f\u306a\u3044 pg_strom.regression_test_mode [\u578b: bool / \u521d\u671f\u5024: off] GPU\u30e2\u30c7\u30eb\u540d\u306a\u3069\u3001\u5b9f\u884c\u74b0\u5883\u306b\u4f9d\u5b58\u3057\u3066\u8868\u793a\u304c\u5909\u308f\u308b\u53ef\u80fd\u6027\u306e\u3042\u308b EXPLAIN \u30b3\u30de\u30f3\u30c9\u306e\u51fa\u529b\u3092\u6291\u5236\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u306b\u304a\u3051\u308b\u507d\u967d\u6027\u3092\u9632\u3050\u305f\u3081\u306e\u8a2d\u5b9a\u3067\u3001\u901a\u5e38\u306f\u5229\u7528\u8005\u304c\u64cd\u4f5c\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306b\u95a2\u3059\u308b\u8a2d\u5b9a pg_strom.gpu_setup_cost [\u578b: real / \u521d\u671f\u5024: 100 * DEFAULT_SEQ_PAGE_COST ] GPU\u30c7\u30d0\u30a4\u30b9\u306e\u521d\u671f\u5316\u306b\u8981\u3059\u308b\u30b3\u30b9\u30c8\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u5024\u3002 pg_strom.gpu_tuple_cost [\u578b: real / \u521d\u671f\u5024: DEFAULT_CPU_TUPLE_COST ] GPU\u3078\u9001\u51fa\u3059\u308b\uff0f\u53d7\u3051\u53d6\u308b\u30bf\u30d7\u30eb\u4e00\u500b\u3042\u305f\u308a\u306e\u30b3\u30b9\u30c8\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u5024\u3002 pg_strom.gpu_operator_cost [\u578b: real / \u521d\u671f\u5024: DEFAULT_CPU_OPERATOR_COST / 16 ] GPU\u306e\u6f14\u7b97\u5f0f\u3042\u305f\u308a\u306e\u51e6\u7406\u30b3\u30b9\u30c8\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u5024\u3002 cpu_operator_cost \u3088\u308a\u3082\u5927\u304d\u306a\u5024\u3092\u8a2d\u5b9a\u3057\u3066\u3057\u307e\u3046\u3068\u3001\u3044\u304b\u306a\u308b\u30b5\u30a4\u30ba\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u3082PG-Strom\u304c\u9078\u629e\u3055\u308c\u308b\u3053\u3068\u306f\u306a\u304f\u306a\u308b\u3002 pg_strom.enable_partitionwise_gpujoin [\u578b: bool / \u521d\u671f\u5024: on] GpuJoin\u3092\u5404\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u8981\u7d20\u3078\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002 pg_strom.enable_partitionwise_gpupreagg [\u578b: bool / \u521d\u671f\u5024: on] GpuPreAgg\u3092\u5404\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u8981\u7d20\u3078\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002 pg_strom.pinned_inner_buffer_threshold [\u578b: int / \u521d\u671f\u5024: 0 ] GpuJoin\u306eINNER\u8868\u304cGpuScan\u307e\u305f\u306fGpuJoin\u3067\u3042\u308b\u5834\u5408\u3001\u51e6\u7406\u7d50\u679c\u306e\u63a8\u5b9a\u30b5\u30a4\u30ba\u304c\u3053\u306e\u8a2d\u5b9a\u5024\u3088\u308a\u3082\u5927\u304d\u3051\u308c\u3070\u3001\u7d50\u679c\u3092\u3044\u3063\u305f\u3093CPU\u306b\u623b\u3059\u3053\u3068\u306a\u304f\u3001\u305d\u306e\u307e\u307eGPU\u5074\u306b\u4fdd\u6301\u3057\u305f\u4e0a\u3067\u3001\u7d9a\u304fGpuJoin\u306eINNER\u30d0\u30c3\u30d5\u30a1\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u3002 \u8a2d\u5b9a\u5024\u304c 0 \u306e\u5834\u5408\u3001\u672c\u6a5f\u80fd\u306f\u7121\u52b9\u3068\u306a\u308b\u3002 \u30a8\u30b0\u30bc\u30ad\u30e5\u30fc\u30bf\u306b\u95a2\u3059\u308b\u8a2d\u5b9a pg_strom.max_async_tasks [\u578b: int / \u521d\u671f\u5024: 12 ] PG-Strom\u304cGPU\u5b9f\u884c\u30ad\u30e5\u30fc\u306b\u6295\u5165\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u975e\u540c\u671f\u30bf\u30b9\u30af\u306eGPU\u30c7\u30d0\u30a4\u30b9\u6bce\u306e\u6700\u5927\u5024\u3067\u3001GPU Service\u306e\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u6570\u3067\u3082\u3042\u308a\u307e\u3059\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u306e\u8a2d\u5b9a pg_strom.gpudirect_driver [\u578b: text ] GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u306e\u30c9\u30e9\u30a4\u30d0\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u540d\u3092\u793a\u3059\u30d1\u30e9\u30e1\u30fc\u30bf\u3067\u3059\u3002 cufile \u3001 nvme-strom \u3001\u3082\u3057\u304f\u306f vfs \u306e\u3069\u308c\u304b\u3067\u3059\u3002 pg_strom.gpudirect_enabled [\u578b: bool / \u521d\u671f\u5024: on ] GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u6a5f\u80fd\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.gpu_direct_seq_page_cost [\u578b: real / \u521d\u671f\u5024: DEFAULT_SEQ_PAGE_COST / 4 ] \u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u304c\u5b9f\u884c\u30d7\u30e9\u30f3\u306e\u30b3\u30b9\u30c8\u3092\u8a08\u7b97\u3059\u308b\u969b\u306b\u3001GPU-Direct SQL\u3092\u7528\u3044\u3066\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u5834\u5408\u306e\u30b3\u30b9\u30c8\u3068\u3057\u3066 seq_page_cost \u306e\u4ee3\u308f\u308a\u306b\u4f7f\u7528\u3055\u308c\u308b\u5024\u3002 pg_strom.gpudirect_threshold [\u578b: int / \u521d\u671f\u5024: \u81ea\u52d5] GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u6a5f\u80fd\u3092\u767a\u52d5\u3055\u305b\u308b\u30c6\u30fc\u30d6\u30eb\u30b5\u30a4\u30ba\u306e\u95be\u5024\u3092\u8a2d\u5b9a\u3059\u308b\u3002 \u521d\u671f\u5024\u306f\u81ea\u52d5\u8a2d\u5b9a\u3067\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u7269\u7406\u30e1\u30e2\u30ea\u3068 shared_buffers \u8a2d\u5b9a\u5024\u304b\u3089\u8a08\u7b97\u3057\u305f\u95be\u5024\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002 pg_strom.manual_optimal_gpus [\u578b: text / \u521d\u671f\u5024: \u306a\u3057] NVME\u30c7\u30d0\u30a4\u30b9\u3084NFS\u533a\u753b\u306a\u3069\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u533a\u753b\u3054\u3068\u306b\u6700\u3082\u8fd1\u508d\u3068\u5224\u5b9a\u3055\u308c\u308bGPU\u3092\u624b\u52d5\u3067\u8a2d\u5b9a\u3057\u307e\u3059\u3002 \u66f8\u5f0f\u306f {|/path/to/tablespace}=gpuX[:gpuX...] \u3067\u3001NVME\u30c7\u30d0\u30a4\u30b9\u307e\u305f\u306f\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u306e\u30d1\u30b9\u3068\u3001\u305d\u306e\u8fd1\u508d\u3067\u3042\u308bGPU\uff08\u8907\u6570\u53ef\uff09\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002\u30ab\u30f3\u30de\u3067\u533a\u5207\u3063\u3066\u8907\u6570\u306e\u8a2d\u5b9a\u3092\u8a18\u8ff0\u3059\u308b\u4e8b\u3082\u53ef\u80fd\u3067\u3059\u3002 \u4f8b: pg_strom.manual_optimal_gpus = 'nvme1=gpu0,nvme2=gpu1,/mnt/nfsroot=gpu0' \u306f\u30c7\u30d0\u30a4\u30b9\u756a\u53f7X\u3092\u6301\u3064GPU\u3067\u3059\u3002 \u306f\u30ed\u30fc\u30ab\u30eb\u306eNVME-SSD\u307e\u305f\u306f\u30ea\u30e2\u30fc\u30c8\u306eNVME-oF\u30c7\u30d0\u30a4\u30b9\u3092\u610f\u5473\u3057\u307e\u3059\u3002 /path/to/tablespace \u306f\u3001\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u306b\u7d10\u3065\u3044\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u30d5\u30eb\u30d1\u30b9\u3067\u3059\u3002 \u30ed\u30fc\u30ab\u30eb\u306eNVME-SSD\u306b\u5bfe\u3057\u3066\u306f\u591a\u304f\u306e\u5834\u5408\u81ea\u52d5\u8a2d\u5b9a\u3067\u5341\u5206\u3067\u3059\u304c\u3001NVME-oF\u30c7\u30d0\u30a4\u30b9\u3084NFS-over-RDMA\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001\u6a5f\u68b0\u7684\u306b\u8fd1\u508d\u306eGPU\u3092\u7279\u5b9a\u3059\u308b\u4e8b\u304c\u3067\u304d\u306a\u3044\u305f\u3081\u3001\u624b\u52d5\u3067\u8fd1\u508d\u306eGPU\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 Arrow_Fdw\u95a2\u9023\u306e\u8a2d\u5b9a arrow_fdw.enabled [\u578b: bool / \u521d\u671f\u5024: on ] \u63a8\u5b9a\u30b3\u30b9\u30c8\u5024\u3092\u8abf\u6574\u3057\u3001Arrow_Fdw\u306e\u6709\u52b9/\u7121\u52b9\u3092\u5207\u308a\u66ff\u3048\u307e\u3059\u3002\u305f\u3060\u3057\u3001GpuScan\u304c\u5229\u7528\u3067\u304d\u306a\u3044\u5834\u5408\u306b\u306f\u3001Arrow_Fdw\u306b\u3088\u308bForeign Scan\u3060\u3051\u304cArrow\u30d5\u30a1\u30a4\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3067\u304d\u308b\u3068\u3044\u3046\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 arrow_fdw.stats_hint_enabled [\u578b: bool / \u521d\u671f\u5024: on ] Arrow\u30d5\u30a1\u30a4\u30eb\u304cmin/max\u7d71\u8a08\u60c5\u5831\u3092\u6301\u3063\u3066\u304a\u308a\u3001\u305d\u308c\u3092\u7528\u3044\u3066\u4e0d\u5fc5\u8981\u306arecord-batch\u3092\u8aad\u307f\u98db\u3070\u3059\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3057\u307e\u3059\u3002 arrow_fdw.metadata_cache_size [\u578b: int / \u521d\u671f\u5024: 512MB ] Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u30e1\u30bf\u60c5\u5831\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3059\u308b\u5171\u6709\u30e1\u30e2\u30ea\u9818\u57df\u306e\u5927\u304d\u3055\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u5171\u6709\u30e1\u30e2\u30ea\u306e\u6d88\u8cbb\u91cf\u304c\u3053\u306e\u30b5\u30a4\u30ba\u3092\u8d8a\u3048\u308b\u3068\u3001\u53e4\u3044\u30e1\u30bf\u60c5\u5831\u304b\u3089\u9806\u306b\u89e3\u653e\u3055\u308c\u307e\u3059\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u8a2d\u5b9a pg_strom.enable_gpucache [\u578b: bool / \u521d\u671f\u5024: on ] \u691c\u7d22/\u5206\u6790\u7cfb\u306e\u30af\u30a8\u30ea\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u4f7f\u7528\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3057\u307e\u3059\u3002 \u306a\u304a\u3001\u3053\u306e\u8a2d\u5b9a\u5024\u3092 off \u306b\u3057\u3066\u3082\u30c8\u30ea\u30ac\u95a2\u6570\u306f\u5f15\u304d\u7d9a\u304dREDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u3092\u66f4\u65b0\u3057\u7d9a\u3051\u307e\u3059\u3002 pg_strom.gpucache_auto_preload [\u578b: text / \u521d\u671f\u5024: null ] PostgreSQL\u306e\u8d77\u52d5\u76f4\u5f8c\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u30ed\u30fc\u30c9\u3059\u3079\u304d\u30c6\u30fc\u30d6\u30eb\u540d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u66f8\u5f0f\u306f DATABASE_NAME.SCHEMA_NAME.TABLE_NAME \u3067\u3001\u8907\u6570\u500b\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u6307\u5b9a\u3059\u308b\u5834\u5408\u306f\u3053\u308c\u3092\u30ab\u30f3\u30de\u533a\u5207\u308a\u3067\u4e26\u3079\u307e\u3059\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u521d\u56de\u30ed\u30fc\u30c9\u306f\u76f8\u5fdc\u306b\u6642\u9593\u306e\u304b\u304b\u308b\u51e6\u7406\u3067\u3059\u304c\u3001\u4e8b\u524d\u306b\u521d\u56de\u30ed\u30fc\u30c9\u3092\u6e08\u307e\u305b\u3066\u304a\u304f\u4e8b\u3067\u3001\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u306e\u521d\u56de\u5b9f\u884c\u6642\u306b\u5fdc\u7b54\u901f\u5ea6\u304c\u9045\u5ef6\u3059\u308b\u306e\u3092\u907f\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u306a\u304a\u3001\u672c\u30d1\u30e9\u30e1\u30fc\u30bf\u3092 '*' \u306b\u8a2d\u5b9a\u3059\u308b\u3068\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6301\u3064\u5168\u3066\u306e\u30c6\u30fc\u30d6\u30eb\u306e\u5185\u5bb9\u3092\u9806\u306bGPU\u3078\u30ed\u30fc\u30c9\u3057\u3088\u3046\u3068\u8a66\u307f\u307e\u3059\u3002 GPU\u30c7\u30d0\u30a4\u30b9\u306b\u95a2\u9023\u3059\u308b\u8a2d\u5b9a pg_strom.gpu_mempool_segment_sz [\u578b: int / \u521d\u671f\u5024: 1GB ] GPU Service\u304c\u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u7528\u306bGPU\u30e1\u30e2\u30ea\u3092\u78ba\u4fdd\u3059\u308b\u969b\u306e\u30bb\u30b0\u30e1\u30f3\u30c8\u30b5\u30a4\u30ba\u3067\u3059\u3002 GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u5272\u5f53\u3066\u306f\u6bd4\u8f03\u7684\u30d8\u30d3\u30fc\u306a\u51e6\u7406\u3067\u3042\u308b\u305f\u3081\u3001\u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u3092\u4f7f\u7528\u3057\u3066\u30e1\u30e2\u30ea\u3092\u4f7f\u3044\u56de\u3059\u4e8b\u304c\u63a8\u5968\u3055\u308c\u3066\u3044\u307e\u3059\u3002 pg_strom.gpu_mempool_max_ratio [\u578b: real / \u521d\u671f\u5024: 50% ] GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u7528\u306b\u4f7f\u7528\u3059\u308b\u4e8b\u306e\u3067\u304d\u308b\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u5272\u5408\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u306b\u3088\u308b\u904e\u5270\u306aGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u6d88\u8cbb\u3092\u6291\u5236\u3057\u3001\u30ef\u30fc\u30ad\u30f3\u30b0\u30e1\u30e2\u30ea\u3092\u5341\u5206\u306b\u78ba\u4fdd\u3059\u308b\u4e8b\u304c\u76ee\u7684\u3067\u3059\u3002 pg_strom.gpu_mempool_min_ratio [\u578b: real / \u521d\u671f\u5024: 5% ] \u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u306b\u78ba\u4fdd\u3057\u305fGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u3046\u3061\u3001\u5229\u7528\u7d42\u4e86\u5f8c\u3082\u89e3\u653e\u305b\u305a\u306b\u78ba\u4fdd\u3057\u305f\u307e\u307e\u306b\u3057\u3066\u304a\u304f\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u5272\u5408\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u6700\u5c0f\u9650\u5ea6\u306e\u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u3092\u4fdd\u6301\u3057\u3066\u304a\u304f\u3053\u3068\u306b\u3088\u308a\u3001\u6b21\u306e\u30af\u30a8\u30ea\u3092\u901f\u3084\u304b\u306b\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 pg_strom.gpu_mempool_release_delay [\u578b: int / \u521d\u671f\u5024: 5000 ] GPU Service\u306f\u3001\u3042\u308b\u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u4e0a\u306e\u30bb\u30b0\u30e1\u30f3\u30c8\u304c\u7a7a\u306b\u306a\u3063\u3066\u3082\u3001\u3053\u308c\u3092\u76f4\u3061\u306b\u958b\u653e\u3057\u307e\u305b\u3093\u3002\u305d\u306e\u30bb\u30b0\u30e1\u30f3\u30c8\u304c\u6700\u5f8c\u306b\u5229\u7528\u3055\u308c\u3066\u304b\u3089\u3001\u672c\u30d1\u30e9\u30e1\u30fc\u30bf\u3067\u6307\u5b9a\u3055\u308c\u305f\u6642\u9593\uff08\u30df\u30ea\u79d2\u5358\u4f4d\uff09\u3092\u7d4c\u904e\u3059\u308b\u3068\u3001\u3053\u308c\u3092\u958b\u653e\u3057\u3066\u30b7\u30b9\u30c6\u30e0\u306b\u8fd4\u5374\u3057\u307e\u3059\u3002 \u4e00\u5b9a\u306e\u9045\u5ef6\u3092\u631f\u3080\u4e8b\u3067\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u5272\u5f53/\u89e3\u653e\u306e\u983b\u5ea6\u3092\u6e1b\u3089\u3059\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 pg_strom.gpuserv_debug_output [\u578b: bool / \u521d\u671f\u5024: false ] GPU Service\u306e\u30c7\u30d0\u30c3\u30b0\u30e1\u30c3\u30bb\u30fc\u30b8\u51fa\u529b\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3057\u307e\u3059\u3002\u3053\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u30c7\u30d0\u30c3\u30b0\u306b\u304a\u3044\u3066\u6709\u52b9\u3067\u3042\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u901a\u5e38\u306f\u521d\u671f\u5024\u306e\u307e\u307e\u5909\u66f4\u3057\u306a\u3044\u3067\u4e0b\u3055\u3044\u3002 pg_strom.cuda_visible_devices [\u578b: text / \u521d\u671f\u5024: null ] PostgreSQL\u306e\u8d77\u52d5\u6642\u306b\u7279\u5b9a\u306eGPU\u30c7\u30d0\u30a4\u30b9\u3060\u3051\u3092\u8a8d\u8b58\u3055\u305b\u3066\u3044\u5834\u5408\u306f\u3001\u30ab\u30f3\u30de\u533a\u5207\u308a\u3067GPU\u30c7\u30d0\u30a4\u30b9\u756a\u53f7\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u74b0\u5883\u5909\u6570 CUDA_VISIBLE_DEVICES \u3092\u8a2d\u5b9a\u3059\u308b\u306e\u3068\u540c\u7b49\u3067\u3059\u3002","title":"GUC\u30d1\u30e9\u30e1\u30fc\u30bf"},{"location":"ref_params/#guc","text":"\u672c\u7bc0\u3067\u306fPG-Strom\u306e\u63d0\u4f9b\u3059\u308b\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002","title":"GUC\u30d1\u30e9\u30e1\u30fc\u30bf"},{"location":"ref_params/#_1","text":"pg_strom.enabled [\u578b: bool / \u521d\u671f\u5024: on] PG-Strom\u6a5f\u80fd\u5168\u4f53\u3092\u4e00\u62ec\u3057\u3066\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.enable_gpuscan [\u578b: bool / \u521d\u671f\u5024: on] GpuScan\u306b\u3088\u308b\u30b9\u30ad\u30e3\u30f3\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.enable_gpuhashjoin [\u578b: bool / \u521d\u671f\u5024: on] GpuHashJoin\u306b\u3088\u308bJOIN\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.enable_gpugistindex [\u578b: bool / \u521d\u671f\u5024: on] GpuGiSTIndex\u306b\u3088\u308bJOIN\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.enable_gpujoin [\u578b: bool / \u521d\u671f\u5024: on] GpuJoin\u306b\u3088\u308bJOIN\u3092\u4e00\u62ec\u3067\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002\uff08GpuHashJoin\u3068GpuGiSTIndex\u3092\u542b\u3080\uff09 pg_strom.enable_gpupreagg [\u578b: bool / \u521d\u671f\u5024: on] GpuPreAgg\u306b\u3088\u308b\u96c6\u7d04\u51e6\u7406\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.enable_numeric_aggfuncs [\u578b: bool / \u521d\u671f\u5024: on] numeric \u30c7\u30fc\u30bf\u578b\u3092\u5f15\u6570\u306b\u53d6\u308b\u96c6\u7d04\u6f14\u7b97\u3092GPU\u3067\u51e6\u7406\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002 GPU\u3067\u306e\u96c6\u7d04\u6f14\u7b97\u306b\u304a\u3044\u3066 numeric \u30c7\u30fc\u30bf\u578b\u306f\u500d\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570\u306b\u30de\u30c3\u30d4\u30f3\u30b0\u3055\u308c\u308b\u305f\u3081\u3001\u8a08\u7b97\u8aa4\u5dee\u306b\u30bb\u30f3\u30b7\u30c6\u30a3\u30d6\u306a\u7528\u9014\u306e\u5834\u5408\u306f\u3001\u3053\u306e\u8a2d\u5b9a\u5024\u3092 off \u306b\u3057\u3066CPU\u3067\u96c6\u7d04\u6f14\u7b97\u3092\u5b9f\u884c\u3057\u3001\u8a08\u7b97\u8aa4\u5dee\u306e\u767a\u751f\u3092\u6291\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 pg_strom.enable_brin [\u578b: bool / \u521d\u671f\u5024: on] BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u3063\u305f\u30c6\u30fc\u30d6\u30eb\u30b9\u30ad\u30e3\u30f3\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.cpu_fallback [\u578b: enum / \u521d\u671f\u5024: notice ] GPU\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\"CPU\u518d\u5b9f\u884c\"\u30a8\u30e9\u30fc\u3092\u8fd4\u3057\u305f\u3068\u304d\u306b\u3001\u5b9f\u969b\u306bCPU\u3067\u306e\u518d\u5b9f\u884c\u3092\u8a66\u307f\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002 notice ... \u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u51fa\u529b\u3057\u305f\u4e0a\u3067CPU\u3067\u306e\u518d\u5b9f\u884c\u3092\u884c\u3046 on , true ... \u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u51fa\u529b\u305b\u305aCPU\u3067\u306e\u518d\u5b9f\u884c\u3092\u884c\u3046 off , false ... \u30a8\u30e9\u30fc\u3092\u767a\u751f\u3055\u305bCPU\u3067\u306e\u518d\u5b9f\u884c\u3092\u884c\u308f\u306a\u3044 pg_strom.regression_test_mode [\u578b: bool / \u521d\u671f\u5024: off] GPU\u30e2\u30c7\u30eb\u540d\u306a\u3069\u3001\u5b9f\u884c\u74b0\u5883\u306b\u4f9d\u5b58\u3057\u3066\u8868\u793a\u304c\u5909\u308f\u308b\u53ef\u80fd\u6027\u306e\u3042\u308b EXPLAIN \u30b3\u30de\u30f3\u30c9\u306e\u51fa\u529b\u3092\u6291\u5236\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u306b\u304a\u3051\u308b\u507d\u967d\u6027\u3092\u9632\u3050\u305f\u3081\u306e\u8a2d\u5b9a\u3067\u3001\u901a\u5e38\u306f\u5229\u7528\u8005\u304c\u64cd\u4f5c\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002","title":"\u6a5f\u80fd\u5358\u4f4d\u306e\u6709\u52b9\u5316/\u7121\u52b9\u5316"},{"location":"ref_params/#_2","text":"pg_strom.gpu_setup_cost [\u578b: real / \u521d\u671f\u5024: 100 * DEFAULT_SEQ_PAGE_COST ] GPU\u30c7\u30d0\u30a4\u30b9\u306e\u521d\u671f\u5316\u306b\u8981\u3059\u308b\u30b3\u30b9\u30c8\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u5024\u3002 pg_strom.gpu_tuple_cost [\u578b: real / \u521d\u671f\u5024: DEFAULT_CPU_TUPLE_COST ] GPU\u3078\u9001\u51fa\u3059\u308b\uff0f\u53d7\u3051\u53d6\u308b\u30bf\u30d7\u30eb\u4e00\u500b\u3042\u305f\u308a\u306e\u30b3\u30b9\u30c8\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u5024\u3002 pg_strom.gpu_operator_cost [\u578b: real / \u521d\u671f\u5024: DEFAULT_CPU_OPERATOR_COST / 16 ] GPU\u306e\u6f14\u7b97\u5f0f\u3042\u305f\u308a\u306e\u51e6\u7406\u30b3\u30b9\u30c8\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u5024\u3002 cpu_operator_cost \u3088\u308a\u3082\u5927\u304d\u306a\u5024\u3092\u8a2d\u5b9a\u3057\u3066\u3057\u307e\u3046\u3068\u3001\u3044\u304b\u306a\u308b\u30b5\u30a4\u30ba\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u3082PG-Strom\u304c\u9078\u629e\u3055\u308c\u308b\u3053\u3068\u306f\u306a\u304f\u306a\u308b\u3002 pg_strom.enable_partitionwise_gpujoin [\u578b: bool / \u521d\u671f\u5024: on] GpuJoin\u3092\u5404\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u8981\u7d20\u3078\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002 pg_strom.enable_partitionwise_gpupreagg [\u578b: bool / \u521d\u671f\u5024: on] GpuPreAgg\u3092\u5404\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u8981\u7d20\u3078\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002 pg_strom.pinned_inner_buffer_threshold [\u578b: int / \u521d\u671f\u5024: 0 ] GpuJoin\u306eINNER\u8868\u304cGpuScan\u307e\u305f\u306fGpuJoin\u3067\u3042\u308b\u5834\u5408\u3001\u51e6\u7406\u7d50\u679c\u306e\u63a8\u5b9a\u30b5\u30a4\u30ba\u304c\u3053\u306e\u8a2d\u5b9a\u5024\u3088\u308a\u3082\u5927\u304d\u3051\u308c\u3070\u3001\u7d50\u679c\u3092\u3044\u3063\u305f\u3093CPU\u306b\u623b\u3059\u3053\u3068\u306a\u304f\u3001\u305d\u306e\u307e\u307eGPU\u5074\u306b\u4fdd\u6301\u3057\u305f\u4e0a\u3067\u3001\u7d9a\u304fGpuJoin\u306eINNER\u30d0\u30c3\u30d5\u30a1\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u3002 \u8a2d\u5b9a\u5024\u304c 0 \u306e\u5834\u5408\u3001\u672c\u6a5f\u80fd\u306f\u7121\u52b9\u3068\u306a\u308b\u3002","title":"\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306b\u95a2\u3059\u308b\u8a2d\u5b9a"},{"location":"ref_params/#_3","text":"pg_strom.max_async_tasks [\u578b: int / \u521d\u671f\u5024: 12 ] PG-Strom\u304cGPU\u5b9f\u884c\u30ad\u30e5\u30fc\u306b\u6295\u5165\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u975e\u540c\u671f\u30bf\u30b9\u30af\u306eGPU\u30c7\u30d0\u30a4\u30b9\u6bce\u306e\u6700\u5927\u5024\u3067\u3001GPU Service\u306e\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u6570\u3067\u3082\u3042\u308a\u307e\u3059\u3002","title":"\u30a8\u30b0\u30bc\u30ad\u30e5\u30fc\u30bf\u306b\u95a2\u3059\u308b\u8a2d\u5b9a"},{"location":"ref_params/#gpusql","text":"pg_strom.gpudirect_driver [\u578b: text ] GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u306e\u30c9\u30e9\u30a4\u30d0\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u540d\u3092\u793a\u3059\u30d1\u30e9\u30e1\u30fc\u30bf\u3067\u3059\u3002 cufile \u3001 nvme-strom \u3001\u3082\u3057\u304f\u306f vfs \u306e\u3069\u308c\u304b\u3067\u3059\u3002 pg_strom.gpudirect_enabled [\u578b: bool / \u521d\u671f\u5024: on ] GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u6a5f\u80fd\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.gpu_direct_seq_page_cost [\u578b: real / \u521d\u671f\u5024: DEFAULT_SEQ_PAGE_COST / 4 ] \u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u304c\u5b9f\u884c\u30d7\u30e9\u30f3\u306e\u30b3\u30b9\u30c8\u3092\u8a08\u7b97\u3059\u308b\u969b\u306b\u3001GPU-Direct SQL\u3092\u7528\u3044\u3066\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u5834\u5408\u306e\u30b3\u30b9\u30c8\u3068\u3057\u3066 seq_page_cost \u306e\u4ee3\u308f\u308a\u306b\u4f7f\u7528\u3055\u308c\u308b\u5024\u3002 pg_strom.gpudirect_threshold [\u578b: int / \u521d\u671f\u5024: \u81ea\u52d5] GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u6a5f\u80fd\u3092\u767a\u52d5\u3055\u305b\u308b\u30c6\u30fc\u30d6\u30eb\u30b5\u30a4\u30ba\u306e\u95be\u5024\u3092\u8a2d\u5b9a\u3059\u308b\u3002 \u521d\u671f\u5024\u306f\u81ea\u52d5\u8a2d\u5b9a\u3067\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u7269\u7406\u30e1\u30e2\u30ea\u3068 shared_buffers \u8a2d\u5b9a\u5024\u304b\u3089\u8a08\u7b97\u3057\u305f\u95be\u5024\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002 pg_strom.manual_optimal_gpus [\u578b: text / \u521d\u671f\u5024: \u306a\u3057] NVME\u30c7\u30d0\u30a4\u30b9\u3084NFS\u533a\u753b\u306a\u3069\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u533a\u753b\u3054\u3068\u306b\u6700\u3082\u8fd1\u508d\u3068\u5224\u5b9a\u3055\u308c\u308bGPU\u3092\u624b\u52d5\u3067\u8a2d\u5b9a\u3057\u307e\u3059\u3002 \u66f8\u5f0f\u306f {|/path/to/tablespace}=gpuX[:gpuX...] \u3067\u3001NVME\u30c7\u30d0\u30a4\u30b9\u307e\u305f\u306f\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u306e\u30d1\u30b9\u3068\u3001\u305d\u306e\u8fd1\u508d\u3067\u3042\u308bGPU\uff08\u8907\u6570\u53ef\uff09\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002\u30ab\u30f3\u30de\u3067\u533a\u5207\u3063\u3066\u8907\u6570\u306e\u8a2d\u5b9a\u3092\u8a18\u8ff0\u3059\u308b\u4e8b\u3082\u53ef\u80fd\u3067\u3059\u3002 \u4f8b: pg_strom.manual_optimal_gpus = 'nvme1=gpu0,nvme2=gpu1,/mnt/nfsroot=gpu0' \u306f\u30c7\u30d0\u30a4\u30b9\u756a\u53f7X\u3092\u6301\u3064GPU\u3067\u3059\u3002 \u306f\u30ed\u30fc\u30ab\u30eb\u306eNVME-SSD\u307e\u305f\u306f\u30ea\u30e2\u30fc\u30c8\u306eNVME-oF\u30c7\u30d0\u30a4\u30b9\u3092\u610f\u5473\u3057\u307e\u3059\u3002 /path/to/tablespace \u306f\u3001\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u306b\u7d10\u3065\u3044\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u30d5\u30eb\u30d1\u30b9\u3067\u3059\u3002 \u30ed\u30fc\u30ab\u30eb\u306eNVME-SSD\u306b\u5bfe\u3057\u3066\u306f\u591a\u304f\u306e\u5834\u5408\u81ea\u52d5\u8a2d\u5b9a\u3067\u5341\u5206\u3067\u3059\u304c\u3001NVME-oF\u30c7\u30d0\u30a4\u30b9\u3084NFS-over-RDMA\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001\u6a5f\u68b0\u7684\u306b\u8fd1\u508d\u306eGPU\u3092\u7279\u5b9a\u3059\u308b\u4e8b\u304c\u3067\u304d\u306a\u3044\u305f\u3081\u3001\u624b\u52d5\u3067\u8fd1\u508d\u306eGPU\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002","title":"GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u306e\u8a2d\u5b9a"},{"location":"ref_params/#arrow_fdw","text":"arrow_fdw.enabled [\u578b: bool / \u521d\u671f\u5024: on ] \u63a8\u5b9a\u30b3\u30b9\u30c8\u5024\u3092\u8abf\u6574\u3057\u3001Arrow_Fdw\u306e\u6709\u52b9/\u7121\u52b9\u3092\u5207\u308a\u66ff\u3048\u307e\u3059\u3002\u305f\u3060\u3057\u3001GpuScan\u304c\u5229\u7528\u3067\u304d\u306a\u3044\u5834\u5408\u306b\u306f\u3001Arrow_Fdw\u306b\u3088\u308bForeign Scan\u3060\u3051\u304cArrow\u30d5\u30a1\u30a4\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3067\u304d\u308b\u3068\u3044\u3046\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 arrow_fdw.stats_hint_enabled [\u578b: bool / \u521d\u671f\u5024: on ] Arrow\u30d5\u30a1\u30a4\u30eb\u304cmin/max\u7d71\u8a08\u60c5\u5831\u3092\u6301\u3063\u3066\u304a\u308a\u3001\u305d\u308c\u3092\u7528\u3044\u3066\u4e0d\u5fc5\u8981\u306arecord-batch\u3092\u8aad\u307f\u98db\u3070\u3059\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3057\u307e\u3059\u3002 arrow_fdw.metadata_cache_size [\u578b: int / \u521d\u671f\u5024: 512MB ] Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u30e1\u30bf\u60c5\u5831\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3059\u308b\u5171\u6709\u30e1\u30e2\u30ea\u9818\u57df\u306e\u5927\u304d\u3055\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u5171\u6709\u30e1\u30e2\u30ea\u306e\u6d88\u8cbb\u91cf\u304c\u3053\u306e\u30b5\u30a4\u30ba\u3092\u8d8a\u3048\u308b\u3068\u3001\u53e4\u3044\u30e1\u30bf\u60c5\u5831\u304b\u3089\u9806\u306b\u89e3\u653e\u3055\u308c\u307e\u3059\u3002","title":"Arrow_Fdw\u95a2\u9023\u306e\u8a2d\u5b9a"},{"location":"ref_params/#gpu","text":"pg_strom.enable_gpucache [\u578b: bool / \u521d\u671f\u5024: on ] \u691c\u7d22/\u5206\u6790\u7cfb\u306e\u30af\u30a8\u30ea\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u4f7f\u7528\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3057\u307e\u3059\u3002 \u306a\u304a\u3001\u3053\u306e\u8a2d\u5b9a\u5024\u3092 off \u306b\u3057\u3066\u3082\u30c8\u30ea\u30ac\u95a2\u6570\u306f\u5f15\u304d\u7d9a\u304dREDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u3092\u66f4\u65b0\u3057\u7d9a\u3051\u307e\u3059\u3002 pg_strom.gpucache_auto_preload [\u578b: text / \u521d\u671f\u5024: null ] PostgreSQL\u306e\u8d77\u52d5\u76f4\u5f8c\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u30ed\u30fc\u30c9\u3059\u3079\u304d\u30c6\u30fc\u30d6\u30eb\u540d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u66f8\u5f0f\u306f DATABASE_NAME.SCHEMA_NAME.TABLE_NAME \u3067\u3001\u8907\u6570\u500b\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u6307\u5b9a\u3059\u308b\u5834\u5408\u306f\u3053\u308c\u3092\u30ab\u30f3\u30de\u533a\u5207\u308a\u3067\u4e26\u3079\u307e\u3059\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u521d\u56de\u30ed\u30fc\u30c9\u306f\u76f8\u5fdc\u306b\u6642\u9593\u306e\u304b\u304b\u308b\u51e6\u7406\u3067\u3059\u304c\u3001\u4e8b\u524d\u306b\u521d\u56de\u30ed\u30fc\u30c9\u3092\u6e08\u307e\u305b\u3066\u304a\u304f\u4e8b\u3067\u3001\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u306e\u521d\u56de\u5b9f\u884c\u6642\u306b\u5fdc\u7b54\u901f\u5ea6\u304c\u9045\u5ef6\u3059\u308b\u306e\u3092\u907f\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u306a\u304a\u3001\u672c\u30d1\u30e9\u30e1\u30fc\u30bf\u3092 '*' \u306b\u8a2d\u5b9a\u3059\u308b\u3068\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6301\u3064\u5168\u3066\u306e\u30c6\u30fc\u30d6\u30eb\u306e\u5185\u5bb9\u3092\u9806\u306bGPU\u3078\u30ed\u30fc\u30c9\u3057\u3088\u3046\u3068\u8a66\u307f\u307e\u3059\u3002","title":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u8a2d\u5b9a"},{"location":"ref_params/#gpu_1","text":"pg_strom.gpu_mempool_segment_sz [\u578b: int / \u521d\u671f\u5024: 1GB ] GPU Service\u304c\u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u7528\u306bGPU\u30e1\u30e2\u30ea\u3092\u78ba\u4fdd\u3059\u308b\u969b\u306e\u30bb\u30b0\u30e1\u30f3\u30c8\u30b5\u30a4\u30ba\u3067\u3059\u3002 GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u5272\u5f53\u3066\u306f\u6bd4\u8f03\u7684\u30d8\u30d3\u30fc\u306a\u51e6\u7406\u3067\u3042\u308b\u305f\u3081\u3001\u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u3092\u4f7f\u7528\u3057\u3066\u30e1\u30e2\u30ea\u3092\u4f7f\u3044\u56de\u3059\u4e8b\u304c\u63a8\u5968\u3055\u308c\u3066\u3044\u307e\u3059\u3002 pg_strom.gpu_mempool_max_ratio [\u578b: real / \u521d\u671f\u5024: 50% ] GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u7528\u306b\u4f7f\u7528\u3059\u308b\u4e8b\u306e\u3067\u304d\u308b\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u5272\u5408\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u306b\u3088\u308b\u904e\u5270\u306aGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u6d88\u8cbb\u3092\u6291\u5236\u3057\u3001\u30ef\u30fc\u30ad\u30f3\u30b0\u30e1\u30e2\u30ea\u3092\u5341\u5206\u306b\u78ba\u4fdd\u3059\u308b\u4e8b\u304c\u76ee\u7684\u3067\u3059\u3002 pg_strom.gpu_mempool_min_ratio [\u578b: real / \u521d\u671f\u5024: 5% ] \u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u306b\u78ba\u4fdd\u3057\u305fGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u3046\u3061\u3001\u5229\u7528\u7d42\u4e86\u5f8c\u3082\u89e3\u653e\u305b\u305a\u306b\u78ba\u4fdd\u3057\u305f\u307e\u307e\u306b\u3057\u3066\u304a\u304f\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u5272\u5408\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u6700\u5c0f\u9650\u5ea6\u306e\u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u3092\u4fdd\u6301\u3057\u3066\u304a\u304f\u3053\u3068\u306b\u3088\u308a\u3001\u6b21\u306e\u30af\u30a8\u30ea\u3092\u901f\u3084\u304b\u306b\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 pg_strom.gpu_mempool_release_delay [\u578b: int / \u521d\u671f\u5024: 5000 ] GPU Service\u306f\u3001\u3042\u308b\u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u4e0a\u306e\u30bb\u30b0\u30e1\u30f3\u30c8\u304c\u7a7a\u306b\u306a\u3063\u3066\u3082\u3001\u3053\u308c\u3092\u76f4\u3061\u306b\u958b\u653e\u3057\u307e\u305b\u3093\u3002\u305d\u306e\u30bb\u30b0\u30e1\u30f3\u30c8\u304c\u6700\u5f8c\u306b\u5229\u7528\u3055\u308c\u3066\u304b\u3089\u3001\u672c\u30d1\u30e9\u30e1\u30fc\u30bf\u3067\u6307\u5b9a\u3055\u308c\u305f\u6642\u9593\uff08\u30df\u30ea\u79d2\u5358\u4f4d\uff09\u3092\u7d4c\u904e\u3059\u308b\u3068\u3001\u3053\u308c\u3092\u958b\u653e\u3057\u3066\u30b7\u30b9\u30c6\u30e0\u306b\u8fd4\u5374\u3057\u307e\u3059\u3002 \u4e00\u5b9a\u306e\u9045\u5ef6\u3092\u631f\u3080\u4e8b\u3067\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u5272\u5f53/\u89e3\u653e\u306e\u983b\u5ea6\u3092\u6e1b\u3089\u3059\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 pg_strom.gpuserv_debug_output [\u578b: bool / \u521d\u671f\u5024: false ] GPU Service\u306e\u30c7\u30d0\u30c3\u30b0\u30e1\u30c3\u30bb\u30fc\u30b8\u51fa\u529b\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3057\u307e\u3059\u3002\u3053\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u30c7\u30d0\u30c3\u30b0\u306b\u304a\u3044\u3066\u6709\u52b9\u3067\u3042\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u901a\u5e38\u306f\u521d\u671f\u5024\u306e\u307e\u307e\u5909\u66f4\u3057\u306a\u3044\u3067\u4e0b\u3055\u3044\u3002 pg_strom.cuda_visible_devices [\u578b: text / \u521d\u671f\u5024: null ] PostgreSQL\u306e\u8d77\u52d5\u6642\u306b\u7279\u5b9a\u306eGPU\u30c7\u30d0\u30a4\u30b9\u3060\u3051\u3092\u8a8d\u8b58\u3055\u305b\u3066\u3044\u5834\u5408\u306f\u3001\u30ab\u30f3\u30de\u533a\u5207\u308a\u3067GPU\u30c7\u30d0\u30a4\u30b9\u756a\u53f7\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u74b0\u5883\u5909\u6570 CUDA_VISIBLE_DEVICES \u3092\u8a2d\u5b9a\u3059\u308b\u306e\u3068\u540c\u7b49\u3067\u3059\u3002","title":"GPU\u30c7\u30d0\u30a4\u30b9\u306b\u95a2\u9023\u3059\u308b\u8a2d\u5b9a"},{"location":"ref_sqlfuncs/","text":"SQL\u30aa\u30d6\u30b8\u30a7\u30af\u30c8 \u672c\u7ae0\u3067\u306fPG-Strom\u304c\u72ec\u81ea\u306b\u63d0\u4f9b\u3059\u308bSQL\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u30b7\u30b9\u30c6\u30e0\u60c5\u5831 pgstrom.device_info \u30b7\u30b9\u30c6\u30e0\u30d3\u30e5\u30fc PG-Strom\u7528\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305fGPU\u30c7\u30d0\u30a4\u30b9\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u8868\u793a\u3057\u307e\u3059\u3002 \u3053\u306e\u30d3\u30e5\u30fc\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 name type description gpu_id int GPU\u30c7\u30d0\u30a4\u30b9\u756a\u53f7 att_name text \u30c7\u30d0\u30a4\u30b9\u5c5e\u6027\u540d att_value text \u30c7\u30d0\u30a4\u30b9\u5c5e\u6027\u5024 att_desc text \u30c7\u30d0\u30a4\u30b9\u5c5e\u6027\u306e\u8aac\u660e GPU\u30c7\u30d0\u30a4\u30b9\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306f\u975e\u5e38\u306b\u6570\u304c\u591a\u304f\u3001\u307e\u305fCUDA\u30c9\u30e9\u30a4\u30d0\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u3088\u3063\u3066\u3082\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u6570\u306f\u307e\u3061\u307e\u3061\u3067\u3059\u3002 \u305d\u306e\u305f\u3081\u3001 pgstrom.device_info \u30b7\u30b9\u30c6\u30e0\u30d3\u30e5\u30fc\u3067\u306f\u3001GPU\u30c7\u30d0\u30a4\u30b9\u756a\u53f7( gpu_id )\u3068\u3001\u30c7\u30d0\u30a4\u30b9\u5c5e\u6027\u540d( att_name )\u306b\u3088\u3063\u3066\u5bfe\u8c61\u3068\u306a\u308b\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u7279\u5b9a\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u306f pgstrom.device_info \u30b7\u30b9\u30c6\u30e0\u30d3\u30e5\u30fc\u306e\u51fa\u529b\u4f8b\u3067\u3059\u3002 postgres=# select * from pgstrom.gpu_device_info limit 10; gpu_id | att_name | att_value | att_desc --------+-----------------------+------------------------------------------+------------------------------------- 0 | DEV_NAME | NVIDIA A100-PCIE-40GB | GPU Device Name 0 | DEV_ID | 0 | GPU Device ID 0 | DEV_UUID | GPU-13943bfd-5b30-38f5-0473-78979c134606 | GPU Device UUID 0 | DEV_TOTAL_MEMSZ | 39.39GB | GPU Total RAM Size 0 | DEV_BAR1_MEMSZ | 64.00GB | GPU PCI Bar1 Size 0 | NUMA_NODE_ID | -1 | GPU NUMA Node Id 0 | MAX_THREADS_PER_BLOCK | 1024 | Maximum number of threads per block 0 | MAX_BLOCK_DIM_X | 1024 | Maximum block dimension X 0 | MAX_BLOCK_DIM_Y | 1024 | Maximum block dimension Y 0 | MAX_BLOCK_DIM_Z | 64 | Maximum block dimension Z (10 rows) Arrow_Fdw fdw_handler pgstrom.arrow_fdw_handler() Arrow_Fdw\u306eFDW\u30cf\u30f3\u30c9\u30e9\u95a2\u6570\u3067\u3059\u3002\u901a\u5e38\u3001\u30e6\u30fc\u30b6\u304c\u3053\u306e\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002 void pgstrom.arrow_fdw_validator(text[], oid) Arrow_Fdw\u306eFDW\u30aa\u30d7\u30b7\u30e7\u30f3\u691c\u8a3c\u7528\u95a2\u6570\u3067\u3059\u3002\u901a\u5e38\u3001\u30e6\u30fc\u30b6\u304c\u3053\u306e\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002 event_trigger pgstrom.arrow_fdw_precheck_schema() Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u305f\u3081\u306e\u30a4\u30d9\u30f3\u30c8\u30c8\u30ea\u30ac\u95a2\u6570\u3067\u3059\u3002\u901a\u5e38\u3001\u30e6\u30fc\u30b6\u304c\u3053\u306e\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002 void pgstrom.arrow_fdw_import_file(text, text, text = null) Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3001\u65b0\u305f\u306b\u5916\u90e8\u30c6\u30fc\u30d6\u30eb(foreign table)\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002\u7b2c\u4e00\u5f15\u6570\u306f\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u540d\u524d\u3001\u7b2c\u4e8c\u5f15\u6570\u306fApache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u3001\u7701\u7565\u53ef\u80fd\u306a\u7b2c\u4e09\u5f15\u6570\u306f\u30b9\u30ad\u30fc\u30de\u540d\u3067\u3059\u3002 \u3053\u306e\u95a2\u6570\u306f IMPORT FOREIGN SCHEMA \u69cb\u6587\u306b\u4f3c\u3066\u3044\u307e\u3059\u304c\u3001PostgreSQL\u306b\u304a\u3051\u308b\u30c6\u30fc\u30d6\u30eb\u306e\u5217\u6570\u5236\u9650\uff08 MaxTupleAttributeNumber = 1664\uff09\u3092\u8d8a\u3048\u308b\u5217\u304c\u5b9a\u7fa9\u3055\u308c\u305fApache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3067\u304d\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u3053\u308c\u306b\u8a72\u5f53\u3057\u306a\u3044\u5927\u534a\u306e\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3067\u306f IMPORT FOREIGN SCHEMA \u69cb\u6587\u3092\u5229\u7528\u3059\u3079\u304d\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001 pgstrom.arrow_fdw_import_file \u3092\u7528\u3044\u30662000\u500b\u306eInt16\u5217\u3092\u6301\u3064Apache Arrow\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u305f\u3082\u306e\u3067\u3059\u3002 \\d mytest \u306e\u5b9f\u884c\u7d50\u679c\u3088\u308a\u3001\u65b0\u305f\u306b\u4f5c\u6210\u3055\u308c\u305f\u5916\u90e8\u30c6\u30fc\u30d6\u30eb mytest \u304c2000\u500b\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u6301\u3063\u3066\u3044\u308b\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 PostgreSQL\u5185\u90e8\u8868\u73fe\u306e\u90fd\u5408\u4e0a\u3001\u5168\u3066\u306e\u5217\u3092\u4e00\u5ea6\u306b\u8aad\u307f\u51fa\u3059\u4e8b\u306f\u3067\u304d\u307e\u305b\u3093\u304c\u3001\u6700\u5f8c\u306e\u4f8b\u306e\u3088\u3046\u306b\u4e00\u90e8\u306e\u5217\u3060\u3051\u3092\u53c2\u7167\u3059\u308b\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3067\u3042\u308c\u3070\u5b9f\u884c\u53ef\u80fd\u3067\u3059\u3002 =# select pgstrom.arrow_fdw_import_file('mytest', '/tmp/wide2000.arrow'); arrow_fdw_import_file ----------------------- (1 row) =# \\d List of relations Schema | Name | Type | Owner --------+--------+---------------+-------- public | mytest | foreign table | kaigai (1 row) =# \\d mytest Foreign table \"public.mytest\" Column | Type | Collation | Nullable | Default | FDW options -----------+----------+-----------+----------+---------+------------- object_id | integer | | | | c000 | smallint | | | | c001 | smallint | | | | c002 | smallint | | | | c003 | smallint | | | | : : : : : : c1997 | smallint | | | | c1998 | smallint | | | | c1999 | smallint | | | | Server: arrow_fdw FDW options: (file '/tmp/wide2000.arrow') =# select * from mytest ; ERROR: target lists can have at most 1664 entries =# select c0010,c1234,c1999 from mytest limit 3; c0010 | c1234 | c1999 -------+-------+------- 232 | 232 | 232 537 | 537 | 537 219 | 219 | 219 (3 rows) GPU\u30ad\u30e3\u30c3\u30b7\u30e5 pgstrom.gpucache_info \u30b7\u30b9\u30c6\u30e0\u30d3\u30e5\u30fc GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u73fe\u5728\u306e\u72b6\u614b\u3092\u8868\u793a\u3057\u307e\u3059\u3002 \u3053\u306e\u30d3\u30e5\u30fc\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 name type description database_oid oid GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u5c5e\u3059\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306eOID\u3067\u3059 database_name text GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u5c5e\u3059\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u540d\u524d\u3067\u3059 table_oid oid GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306eOID\u3067\u3059\u3002\u5fc5\u305a\u3057\u3082\u73fe\u5728\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306f\u9650\u3089\u306a\u3044\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 table_name text GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u540d\u524d\u3067\u3059\u3002\u5fc5\u305a\u3057\u3082\u73fe\u5728\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306f\u9650\u3089\u306a\u3044\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 signature int8 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u4e00\u610f\u6027\u3092\u793a\u3059\u30cf\u30c3\u30b7\u30e5\u5024\u3067\u3059\u3002\u4f8b\u3048\u3070 ALTER TABLE \u306e\u524d\u5f8c\u306a\u3069\u3067\u3053\u306e\u5024\u304c\u5909\u308f\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 phase text GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u69cb\u7bc9\u306e\u6bb5\u968e\u3092\u793a\u3057\u307e\u3059\u3002 not_built , is_empty , is_loading , is_ready , corrupted \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002 rowid_num_used int8 \u5272\u5f53\u3066\u6e08\u307f\u306e\u884cID\u306e\u6570\u3067\u3059\u3002 rowid_num_free int8 \u672a\u5272\u5f53\u306e\u884cID\u306e\u6570\u3067\u3059\u3002 gpu_main_sz int8 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306e\u56fa\u5b9a\u9577\u30c7\u30fc\u30bf\u7528\u306e\u9818\u57df\u306e\u30b5\u30a4\u30ba\u3067\u3059\u3002 gpu_main_nitems int8 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306e\u30bf\u30d7\u30eb\u6570\u3067\u3059\u3002 gpu_extra_sz int8 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306e\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u7528\u306e\u9818\u57df\u306e\u30b5\u30a4\u30ba\u3067\u3059\u3002 gpu_extra_usage int8 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306e\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u9818\u57df\u306e\u4f7f\u7528\u6e08\u307f\u30b5\u30a4\u30ba\u3067\u3059\u3002 gpu_extra_dead int8 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306e\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u9818\u57df\u306e\u672a\u4f7f\u7528\u30b5\u30a4\u30ba\u3067\u3059\u3002 redo_write_ts timestamptz REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u3092\u6700\u5f8c\u306b\u66f4\u65b0\u3057\u305f\u6642\u523b\u3067\u3059\u3002 redo_write_nitems int8 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u6570\u3067\u3059\u3002 redo_write_pos int8 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u30d0\u30a4\u30c8\u6570\u3067\u3059\u3002 redo_read_nitems int8 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u304b\u3089\u8aad\u307f\u51fa\u3057\u3001GPU\u306b\u9069\u7528\u3055\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u6570\u3067\u3059\u3002 redo_read_pos int8 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u304b\u3089\u8aad\u307f\u51fa\u3057\u3001GPU\u306b\u9069\u7528\u3055\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u30d0\u30a4\u30c8\u6570\u3067\u3059\u3002 redo_sync_pos int8 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u66f8\u304d\u8fbc\u307e\u308c\u305fREDO\u30ed\u30b0\u306e\u3046\u3061\u3001\u65e2\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3078\u306e\u9069\u7528\u3092\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u305f\u4f4d\u7f6e\u3067\u3059\u3002REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306e\u6b8b\u308a\u5bb9\u91cf\u304c\u903c\u8feb\u3057\u3066\u304d\u305f\u969b\u306b\u3001\u591a\u6570\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u540c\u6642\u306b\u975e\u540c\u671f\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u767a\u751f\u3055\u305b\u308b\u4e8b\u3092\u907f\u3051\u308b\u305f\u3081\u3001\u5185\u90e8\u7684\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002 config_options text GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u6587\u5b57\u5217\u3067\u3059\u3002 \u4ee5\u4e0b\u306f pgstrom.gpucache_info \u30b7\u30b9\u30c6\u30e0\u30d3\u30e5\u30fc\u306e\u51fa\u529b\u4f8b\u3067\u3059\u3002 =# select * from pgstrom.gpucache_info ; database_oid | database_name | table_oid | table_name | signature | phase | rowid_num_used | rowid_num_free | gpu_main_sz | gpu_main_nitems | gpu_extra_sz | gpu_extra_usage | gpu_extra_dead | redo_write_ts | redo_write_nitems | redo_write_pos | redo_read_nitems | redo_read_pos | redo_sync_pos | config_options --------------+---------------+-----------+------------------+------------+----------+----------------+----------------+-------------+-----------------+--------------+-----------------+----------------+-------------------------------+-------------------+----------------+------------------+---------------+---------------+--------------------------------------------------------------------------------------------------------------------- 193450 | hoge | 603029 | cache_test_table | 4529357070 | is_ready | 4000 | 6000 | 439904 | 4000 | 3200024 | 473848 | 0 | 2023-12-18 01:25:42.850193+09 | 4000 | 603368 | 4000 | 603368 | 603368 | gpu_device_id=0,max_num_rows=10000,redo_buffer_size=157286400,gpu_sync_interval=4000000,gpu_sync_threshold=10485760 (1 row) trigger pgstrom.gpucache_sync_trigger() \u30c6\u30fc\u30d6\u30eb\u66f4\u65b0\u306e\u969b\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u540c\u671f\u3059\u308b\u305f\u3081\u306e\u30c8\u30ea\u30ac\u95a2\u6570\u3067\u3059\u3002\u8a73\u3057\u304f\u306f GPU\u30ad\u30e3\u30c3\u30b7\u30e5 \u306e\u7ae0\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 bigint pgstrom.gpucache_apply_redo(regclass) \u5f15\u6570\u3067\u6307\u5b9a\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u672a\u9069\u7528\u306eREDO\u30ed\u30b0\u3092\u5f37\u5236\u7684\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306b\u9069\u7528\u3057\u307e\u3059\u3002 bigint pgstrom.gpucache_compaction(regclass) \u5f15\u6570\u3067\u6307\u5b9a\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u30d0\u30c3\u30d5\u30a1\u3092\u5f37\u5236\u7684\u306b\u30b3\u30f3\u30d1\u30af\u30c8\u5316\u3057\u307e\u3059\u3002 bigint pgstrom.gpucache_recovery(regclass) \u7834\u640d\uff08corrupted\uff09\u72b6\u614b\u3068\u306a\u3063\u305fGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u5fa9\u5143\u3057\u3088\u3046\u3068\u8a66\u307f\u307e\u3059\u3002 \u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u751f\u6210 void pgstrom.random_setseed(int) \u4e71\u6570\u306e\u7cfb\u5217\u3092\u521d\u671f\u5316\u3057\u307e\u3059\u3002 bigint pgstrom.random_int(float=0.0, bigint=0, bigint=INT_MAX) bigint \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 float pgstrom.random_float(float=0.0, float=0.0, float=1.0) float \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 date pgstrom.random_date(float=0.0, date='2015-01-01', date='2025-12-31') date \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 time pgstrom.random_time(float=0.0, time='00:00:00', time='23:59:59') time \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 timetz pgstrom.random_timetz(float=0.0, time='00:00:00', time='23:59:59') timetz \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 timestamp pgstrom.random_timestamp(float=0.0, timestamp='2015-01-01', timestamp='2025-01-01') timestamp \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 macaddr pgstrom.random_macaddr(float=0.0, macaddr='ab:cd:00:00:00', macaddr='ab:cd:ff:ff:ff:ff') macaddr \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 inet pgstrom.random_inet(float=0.0, inet='192.168.0.1/16') inet \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 text pgstrom.random_text(float=0.0, text='test_**') text \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u751f\u6210\u3057\u307e\u3059\u3002\u7b2c\u4e8c\u5f15\u6570\u306e'*'\u6587\u5b57\u3092\u30e9\u30f3\u30c0\u30e0\u306b\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 text pgstrom.random_text_len(float=0.0, int=10) text \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u6587\u5b57\u5217\u9577\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 int4range pgstrom.random_int4range(float=0.0, bigint=0, bigint=INT_MAX) int4range \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002} int8range pgstrom.random_int8range(float=0.0, bigint=0, bigint=LONG_MAX) int8range \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 tsrange pgstrom.random_tsrange(float=0.0, timestamp='2015-01-01', timestamp='2025-01-01') tsrange \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 tstzrange pgstrom.random_tstzrange(float=0.0, timestamptz='2015-01-01', timestamptz='2025-01-01') tstzrange \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 daterange pgstrom.random_daterange(float=0.0, date='2015-01-01', date='2025-12-31') daterange \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 \u305d\u306e\u4ed6\u306e\u95a2\u6570 text pgstrom.githash() \u73fe\u5728\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308bPG-Strom\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u5143\u3068\u306a\u3063\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u30ea\u30d3\u30b8\u30e7\u30f3\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u3092\u8868\u793a\u3057\u307e\u3059\u3002\u3053\u306e\u5024\u306f\u3001\u969c\u5bb3\u6642\u306b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u30ea\u30d3\u30b8\u30e7\u30f3\u3092\u7279\u5b9a\u3059\u308b\u306e\u306b\u6709\u7528\u3067\u3059\u3002 postgres=# select pgstrom.githash(); githash ------------------------------------------ 103984be24cafd1e7ce6330a050960d97675c196 text pgstrom.license_query() \u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308c\u3070\u3001\u73fe\u5728\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308b\u5546\u7528\u30b5\u30d6\u30b9\u30af\u30ea\u30d7\u30b7\u30e7\u30f3\u3092\u8868\u793a\u3057\u307e\u3059\u3002 =# select pgstrom.license_query(); license_query ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { \"version\" : 2, \"serial_nr\" : \"HDB-TRIAL\", \"issued_at\" : \"2020-11-24\", \"expired_at\" : \"2025-12-31\", \"gpus\" : [ { \"uuid\" : \"GPU-8ba149db-53d8-c5f3-0f55-97ce8cfadb28\" } ]} (1 row)","title":"SQL\u30aa\u30d6\u30b8\u30a7\u30af\u30c8"},{"location":"ref_sqlfuncs/#sql","text":"\u672c\u7ae0\u3067\u306fPG-Strom\u304c\u72ec\u81ea\u306b\u63d0\u4f9b\u3059\u308bSQL\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002","title":"SQL\u30aa\u30d6\u30b8\u30a7\u30af\u30c8"},{"location":"ref_sqlfuncs/#_1","text":"pgstrom.device_info \u30b7\u30b9\u30c6\u30e0\u30d3\u30e5\u30fc PG-Strom\u7528\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305fGPU\u30c7\u30d0\u30a4\u30b9\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u8868\u793a\u3057\u307e\u3059\u3002 \u3053\u306e\u30d3\u30e5\u30fc\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 name type description gpu_id int GPU\u30c7\u30d0\u30a4\u30b9\u756a\u53f7 att_name text \u30c7\u30d0\u30a4\u30b9\u5c5e\u6027\u540d att_value text \u30c7\u30d0\u30a4\u30b9\u5c5e\u6027\u5024 att_desc text \u30c7\u30d0\u30a4\u30b9\u5c5e\u6027\u306e\u8aac\u660e GPU\u30c7\u30d0\u30a4\u30b9\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306f\u975e\u5e38\u306b\u6570\u304c\u591a\u304f\u3001\u307e\u305fCUDA\u30c9\u30e9\u30a4\u30d0\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u3088\u3063\u3066\u3082\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u6570\u306f\u307e\u3061\u307e\u3061\u3067\u3059\u3002 \u305d\u306e\u305f\u3081\u3001 pgstrom.device_info \u30b7\u30b9\u30c6\u30e0\u30d3\u30e5\u30fc\u3067\u306f\u3001GPU\u30c7\u30d0\u30a4\u30b9\u756a\u53f7( gpu_id )\u3068\u3001\u30c7\u30d0\u30a4\u30b9\u5c5e\u6027\u540d( att_name )\u306b\u3088\u3063\u3066\u5bfe\u8c61\u3068\u306a\u308b\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u7279\u5b9a\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u306f pgstrom.device_info \u30b7\u30b9\u30c6\u30e0\u30d3\u30e5\u30fc\u306e\u51fa\u529b\u4f8b\u3067\u3059\u3002 postgres=# select * from pgstrom.gpu_device_info limit 10; gpu_id | att_name | att_value | att_desc --------+-----------------------+------------------------------------------+------------------------------------- 0 | DEV_NAME | NVIDIA A100-PCIE-40GB | GPU Device Name 0 | DEV_ID | 0 | GPU Device ID 0 | DEV_UUID | GPU-13943bfd-5b30-38f5-0473-78979c134606 | GPU Device UUID 0 | DEV_TOTAL_MEMSZ | 39.39GB | GPU Total RAM Size 0 | DEV_BAR1_MEMSZ | 64.00GB | GPU PCI Bar1 Size 0 | NUMA_NODE_ID | -1 | GPU NUMA Node Id 0 | MAX_THREADS_PER_BLOCK | 1024 | Maximum number of threads per block 0 | MAX_BLOCK_DIM_X | 1024 | Maximum block dimension X 0 | MAX_BLOCK_DIM_Y | 1024 | Maximum block dimension Y 0 | MAX_BLOCK_DIM_Z | 64 | Maximum block dimension Z (10 rows)","title":"\u30b7\u30b9\u30c6\u30e0\u60c5\u5831"},{"location":"ref_sqlfuncs/#arrow_fdw","text":"fdw_handler pgstrom.arrow_fdw_handler() Arrow_Fdw\u306eFDW\u30cf\u30f3\u30c9\u30e9\u95a2\u6570\u3067\u3059\u3002\u901a\u5e38\u3001\u30e6\u30fc\u30b6\u304c\u3053\u306e\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002 void pgstrom.arrow_fdw_validator(text[], oid) Arrow_Fdw\u306eFDW\u30aa\u30d7\u30b7\u30e7\u30f3\u691c\u8a3c\u7528\u95a2\u6570\u3067\u3059\u3002\u901a\u5e38\u3001\u30e6\u30fc\u30b6\u304c\u3053\u306e\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002 event_trigger pgstrom.arrow_fdw_precheck_schema() Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u305f\u3081\u306e\u30a4\u30d9\u30f3\u30c8\u30c8\u30ea\u30ac\u95a2\u6570\u3067\u3059\u3002\u901a\u5e38\u3001\u30e6\u30fc\u30b6\u304c\u3053\u306e\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002 void pgstrom.arrow_fdw_import_file(text, text, text = null) Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3001\u65b0\u305f\u306b\u5916\u90e8\u30c6\u30fc\u30d6\u30eb(foreign table)\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002\u7b2c\u4e00\u5f15\u6570\u306f\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u540d\u524d\u3001\u7b2c\u4e8c\u5f15\u6570\u306fApache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u3001\u7701\u7565\u53ef\u80fd\u306a\u7b2c\u4e09\u5f15\u6570\u306f\u30b9\u30ad\u30fc\u30de\u540d\u3067\u3059\u3002 \u3053\u306e\u95a2\u6570\u306f IMPORT FOREIGN SCHEMA \u69cb\u6587\u306b\u4f3c\u3066\u3044\u307e\u3059\u304c\u3001PostgreSQL\u306b\u304a\u3051\u308b\u30c6\u30fc\u30d6\u30eb\u306e\u5217\u6570\u5236\u9650\uff08 MaxTupleAttributeNumber = 1664\uff09\u3092\u8d8a\u3048\u308b\u5217\u304c\u5b9a\u7fa9\u3055\u308c\u305fApache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3067\u304d\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u3053\u308c\u306b\u8a72\u5f53\u3057\u306a\u3044\u5927\u534a\u306e\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3067\u306f IMPORT FOREIGN SCHEMA \u69cb\u6587\u3092\u5229\u7528\u3059\u3079\u304d\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001 pgstrom.arrow_fdw_import_file \u3092\u7528\u3044\u30662000\u500b\u306eInt16\u5217\u3092\u6301\u3064Apache Arrow\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u305f\u3082\u306e\u3067\u3059\u3002 \\d mytest \u306e\u5b9f\u884c\u7d50\u679c\u3088\u308a\u3001\u65b0\u305f\u306b\u4f5c\u6210\u3055\u308c\u305f\u5916\u90e8\u30c6\u30fc\u30d6\u30eb mytest \u304c2000\u500b\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u6301\u3063\u3066\u3044\u308b\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 PostgreSQL\u5185\u90e8\u8868\u73fe\u306e\u90fd\u5408\u4e0a\u3001\u5168\u3066\u306e\u5217\u3092\u4e00\u5ea6\u306b\u8aad\u307f\u51fa\u3059\u4e8b\u306f\u3067\u304d\u307e\u305b\u3093\u304c\u3001\u6700\u5f8c\u306e\u4f8b\u306e\u3088\u3046\u306b\u4e00\u90e8\u306e\u5217\u3060\u3051\u3092\u53c2\u7167\u3059\u308b\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3067\u3042\u308c\u3070\u5b9f\u884c\u53ef\u80fd\u3067\u3059\u3002 =# select pgstrom.arrow_fdw_import_file('mytest', '/tmp/wide2000.arrow'); arrow_fdw_import_file ----------------------- (1 row) =# \\d List of relations Schema | Name | Type | Owner --------+--------+---------------+-------- public | mytest | foreign table | kaigai (1 row) =# \\d mytest Foreign table \"public.mytest\" Column | Type | Collation | Nullable | Default | FDW options -----------+----------+-----------+----------+---------+------------- object_id | integer | | | | c000 | smallint | | | | c001 | smallint | | | | c002 | smallint | | | | c003 | smallint | | | | : : : : : : c1997 | smallint | | | | c1998 | smallint | | | | c1999 | smallint | | | | Server: arrow_fdw FDW options: (file '/tmp/wide2000.arrow') =# select * from mytest ; ERROR: target lists can have at most 1664 entries =# select c0010,c1234,c1999 from mytest limit 3; c0010 | c1234 | c1999 -------+-------+------- 232 | 232 | 232 537 | 537 | 537 219 | 219 | 219 (3 rows)","title":"Arrow_Fdw"},{"location":"ref_sqlfuncs/#gpu","text":"pgstrom.gpucache_info \u30b7\u30b9\u30c6\u30e0\u30d3\u30e5\u30fc GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u73fe\u5728\u306e\u72b6\u614b\u3092\u8868\u793a\u3057\u307e\u3059\u3002 \u3053\u306e\u30d3\u30e5\u30fc\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 name type description database_oid oid GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u5c5e\u3059\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306eOID\u3067\u3059 database_name text GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u5c5e\u3059\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u540d\u524d\u3067\u3059 table_oid oid GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306eOID\u3067\u3059\u3002\u5fc5\u305a\u3057\u3082\u73fe\u5728\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306f\u9650\u3089\u306a\u3044\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 table_name text GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u540d\u524d\u3067\u3059\u3002\u5fc5\u305a\u3057\u3082\u73fe\u5728\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306f\u9650\u3089\u306a\u3044\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 signature int8 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u4e00\u610f\u6027\u3092\u793a\u3059\u30cf\u30c3\u30b7\u30e5\u5024\u3067\u3059\u3002\u4f8b\u3048\u3070 ALTER TABLE \u306e\u524d\u5f8c\u306a\u3069\u3067\u3053\u306e\u5024\u304c\u5909\u308f\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 phase text GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u69cb\u7bc9\u306e\u6bb5\u968e\u3092\u793a\u3057\u307e\u3059\u3002 not_built , is_empty , is_loading , is_ready , corrupted \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002 rowid_num_used int8 \u5272\u5f53\u3066\u6e08\u307f\u306e\u884cID\u306e\u6570\u3067\u3059\u3002 rowid_num_free int8 \u672a\u5272\u5f53\u306e\u884cID\u306e\u6570\u3067\u3059\u3002 gpu_main_sz int8 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306e\u56fa\u5b9a\u9577\u30c7\u30fc\u30bf\u7528\u306e\u9818\u57df\u306e\u30b5\u30a4\u30ba\u3067\u3059\u3002 gpu_main_nitems int8 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306e\u30bf\u30d7\u30eb\u6570\u3067\u3059\u3002 gpu_extra_sz int8 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306e\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u7528\u306e\u9818\u57df\u306e\u30b5\u30a4\u30ba\u3067\u3059\u3002 gpu_extra_usage int8 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306e\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u9818\u57df\u306e\u4f7f\u7528\u6e08\u307f\u30b5\u30a4\u30ba\u3067\u3059\u3002 gpu_extra_dead int8 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306e\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u9818\u57df\u306e\u672a\u4f7f\u7528\u30b5\u30a4\u30ba\u3067\u3059\u3002 redo_write_ts timestamptz REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u3092\u6700\u5f8c\u306b\u66f4\u65b0\u3057\u305f\u6642\u523b\u3067\u3059\u3002 redo_write_nitems int8 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u6570\u3067\u3059\u3002 redo_write_pos int8 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u30d0\u30a4\u30c8\u6570\u3067\u3059\u3002 redo_read_nitems int8 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u304b\u3089\u8aad\u307f\u51fa\u3057\u3001GPU\u306b\u9069\u7528\u3055\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u6570\u3067\u3059\u3002 redo_read_pos int8 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u304b\u3089\u8aad\u307f\u51fa\u3057\u3001GPU\u306b\u9069\u7528\u3055\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u30d0\u30a4\u30c8\u6570\u3067\u3059\u3002 redo_sync_pos int8 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u66f8\u304d\u8fbc\u307e\u308c\u305fREDO\u30ed\u30b0\u306e\u3046\u3061\u3001\u65e2\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3078\u306e\u9069\u7528\u3092\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u305f\u4f4d\u7f6e\u3067\u3059\u3002REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306e\u6b8b\u308a\u5bb9\u91cf\u304c\u903c\u8feb\u3057\u3066\u304d\u305f\u969b\u306b\u3001\u591a\u6570\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u540c\u6642\u306b\u975e\u540c\u671f\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u767a\u751f\u3055\u305b\u308b\u4e8b\u3092\u907f\u3051\u308b\u305f\u3081\u3001\u5185\u90e8\u7684\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002 config_options text GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u6587\u5b57\u5217\u3067\u3059\u3002 \u4ee5\u4e0b\u306f pgstrom.gpucache_info \u30b7\u30b9\u30c6\u30e0\u30d3\u30e5\u30fc\u306e\u51fa\u529b\u4f8b\u3067\u3059\u3002 =# select * from pgstrom.gpucache_info ; database_oid | database_name | table_oid | table_name | signature | phase | rowid_num_used | rowid_num_free | gpu_main_sz | gpu_main_nitems | gpu_extra_sz | gpu_extra_usage | gpu_extra_dead | redo_write_ts | redo_write_nitems | redo_write_pos | redo_read_nitems | redo_read_pos | redo_sync_pos | config_options --------------+---------------+-----------+------------------+------------+----------+----------------+----------------+-------------+-----------------+--------------+-----------------+----------------+-------------------------------+-------------------+----------------+------------------+---------------+---------------+--------------------------------------------------------------------------------------------------------------------- 193450 | hoge | 603029 | cache_test_table | 4529357070 | is_ready | 4000 | 6000 | 439904 | 4000 | 3200024 | 473848 | 0 | 2023-12-18 01:25:42.850193+09 | 4000 | 603368 | 4000 | 603368 | 603368 | gpu_device_id=0,max_num_rows=10000,redo_buffer_size=157286400,gpu_sync_interval=4000000,gpu_sync_threshold=10485760 (1 row) trigger pgstrom.gpucache_sync_trigger() \u30c6\u30fc\u30d6\u30eb\u66f4\u65b0\u306e\u969b\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u540c\u671f\u3059\u308b\u305f\u3081\u306e\u30c8\u30ea\u30ac\u95a2\u6570\u3067\u3059\u3002\u8a73\u3057\u304f\u306f GPU\u30ad\u30e3\u30c3\u30b7\u30e5 \u306e\u7ae0\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 bigint pgstrom.gpucache_apply_redo(regclass) \u5f15\u6570\u3067\u6307\u5b9a\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u672a\u9069\u7528\u306eREDO\u30ed\u30b0\u3092\u5f37\u5236\u7684\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306b\u9069\u7528\u3057\u307e\u3059\u3002 bigint pgstrom.gpucache_compaction(regclass) \u5f15\u6570\u3067\u6307\u5b9a\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u30d0\u30c3\u30d5\u30a1\u3092\u5f37\u5236\u7684\u306b\u30b3\u30f3\u30d1\u30af\u30c8\u5316\u3057\u307e\u3059\u3002 bigint pgstrom.gpucache_recovery(regclass) \u7834\u640d\uff08corrupted\uff09\u72b6\u614b\u3068\u306a\u3063\u305fGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u5fa9\u5143\u3057\u3088\u3046\u3068\u8a66\u307f\u307e\u3059\u3002","title":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5"},{"location":"ref_sqlfuncs/#_2","text":"void pgstrom.random_setseed(int) \u4e71\u6570\u306e\u7cfb\u5217\u3092\u521d\u671f\u5316\u3057\u307e\u3059\u3002 bigint pgstrom.random_int(float=0.0, bigint=0, bigint=INT_MAX) bigint \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 float pgstrom.random_float(float=0.0, float=0.0, float=1.0) float \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 date pgstrom.random_date(float=0.0, date='2015-01-01', date='2025-12-31') date \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 time pgstrom.random_time(float=0.0, time='00:00:00', time='23:59:59') time \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 timetz pgstrom.random_timetz(float=0.0, time='00:00:00', time='23:59:59') timetz \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 timestamp pgstrom.random_timestamp(float=0.0, timestamp='2015-01-01', timestamp='2025-01-01') timestamp \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 macaddr pgstrom.random_macaddr(float=0.0, macaddr='ab:cd:00:00:00', macaddr='ab:cd:ff:ff:ff:ff') macaddr \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 inet pgstrom.random_inet(float=0.0, inet='192.168.0.1/16') inet \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 text pgstrom.random_text(float=0.0, text='test_**') text \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u751f\u6210\u3057\u307e\u3059\u3002\u7b2c\u4e8c\u5f15\u6570\u306e'*'\u6587\u5b57\u3092\u30e9\u30f3\u30c0\u30e0\u306b\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 text pgstrom.random_text_len(float=0.0, int=10) text \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u6587\u5b57\u5217\u9577\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 int4range pgstrom.random_int4range(float=0.0, bigint=0, bigint=INT_MAX) int4range \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002} int8range pgstrom.random_int8range(float=0.0, bigint=0, bigint=LONG_MAX) int8range \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 tsrange pgstrom.random_tsrange(float=0.0, timestamp='2015-01-01', timestamp='2025-01-01') tsrange \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 tstzrange pgstrom.random_tstzrange(float=0.0, timestamptz='2015-01-01', timestamptz='2025-01-01') tstzrange \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 daterange pgstrom.random_daterange(float=0.0, date='2015-01-01', date='2025-12-31') daterange \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002","title":"\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u751f\u6210"},{"location":"ref_sqlfuncs/#_3","text":"text pgstrom.githash() \u73fe\u5728\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308bPG-Strom\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u5143\u3068\u306a\u3063\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u30ea\u30d3\u30b8\u30e7\u30f3\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u3092\u8868\u793a\u3057\u307e\u3059\u3002\u3053\u306e\u5024\u306f\u3001\u969c\u5bb3\u6642\u306b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u30ea\u30d3\u30b8\u30e7\u30f3\u3092\u7279\u5b9a\u3059\u308b\u306e\u306b\u6709\u7528\u3067\u3059\u3002 postgres=# select pgstrom.githash(); githash ------------------------------------------ 103984be24cafd1e7ce6330a050960d97675c196 text pgstrom.license_query() \u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308c\u3070\u3001\u73fe\u5728\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308b\u5546\u7528\u30b5\u30d6\u30b9\u30af\u30ea\u30d7\u30b7\u30e7\u30f3\u3092\u8868\u793a\u3057\u307e\u3059\u3002 =# select pgstrom.license_query(); license_query ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { \"version\" : 2, \"serial_nr\" : \"HDB-TRIAL\", \"issued_at\" : \"2020-11-24\", \"expired_at\" : \"2025-12-31\", \"gpus\" : [ { \"uuid\" : \"GPU-8ba149db-53d8-c5f3-0f55-97ce8cfadb28\" } ]} (1 row)","title":"\u305d\u306e\u4ed6\u306e\u95a2\u6570"},{"location":"ref_types/","text":"\u30c7\u30fc\u30bf\u578b PG-Strom\u306f\u4ee5\u4e0b\u306e\u30c7\u30fc\u30bf\u578b\u3092GPU\u3067\u5229\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u6570\u5024\u30c7\u30fc\u30bf\u578b int1 [\u30c7\u30fc\u30bf\u9577: 1byte] 8bit\u6574\u6570\u578b\u3002PG-Strom\u306b\u3088\u308b\u72ec\u81ea\u62e1\u5f35 int2 (\u5225\u540d smallint ) [\u30c7\u30fc\u30bf\u9577: 2bytes] 16bit\u6574\u6570\u578b int4 (\u5225\u540d int ) [\u30c7\u30fc\u30bf\u9577: 4bytes] 32bit\u6574\u6570\u578b int8 (\u5225\u540d bigint ) [\u30c7\u30fc\u30bf\u9577: 8bytes] 64bit\u6574\u6570\u578b float2 [\u30c7\u30fc\u30bf\u9577: 2bytes] \u534a\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u3002PG-Strom\u306b\u3088\u308b\u72ec\u81ea\u62e1\u5f35 Note GPU\u3067\u306f\u534a\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u304c\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u3067\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001CPU(x86_64\u30d7\u30ed\u30bb\u30c3\u30b5)\u3067\u306f\u672a\u5bfe\u5fdc\u3067\u3059\u3002\u305d\u306e\u305f\u3081\u3001 float2 \u30c7\u30fc\u30bf\u578b\u3092CPU\u3067\u51e6\u7406\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u3053\u308c\u3092\u4e00\u5ea6 float \u3084 double \u578b\u306b\u5909\u63db\u3057\u305f\u4e0a\u3067\u6f14\u7b97\u3092\u884c\u3044\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001GPU\u306e\u3088\u3046\u306b float2 \u306e\u65b9\u304c\u6f14\u7b97\u901f\u5ea6\u3067\u6709\u5229\u3068\u3044\u3046\u4e8b\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u6a5f\u68b0\u5b66\u7fd2\u3084\u7d71\u8a08\u89e3\u6790\u7528\u9014\u306b\u30c7\u30fc\u30bf\u91cf\u3092\u6291\u5236\u3059\u308b\u305f\u3081\u306e\u6a5f\u80fd\u3067\u3059\u3002 float4 (\u5225\u540d real ) [\u30c7\u30fc\u30bf\u9577: 4bytes] \u5358\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b float8 (\u5225\u540d double precision ) [\u30c7\u30fc\u30bf\u9577: 8bytes] \u500d\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b numeric [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909] \u5b9f\u6570\u578b\u3002GPU\u5074\u3067\u306f128bit\u56fa\u5b9a\u5c0f\u6570\u70b9\u3068\u3057\u3066\u6271\u308f\u308c\u308b\u3002 Note GPU\u304c numeric \u578b\u306e\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u969b\u3001\u5b9f\u88c5\u4e0a\u306e\u7406\u7531\u304b\u3089\u3053\u308c\u3092128bit\u56fa\u5b9a\u5c11\u6570\u70b9\u306e\u5185\u90e8\u8868\u73fe\u306b\u5909\u63db\u3057\u3066\u51e6\u7406\u3057\u307e\u3059\u3002\uff08\u3053\u308c\u306f Apache Arrow \u306e Decimal \u578b\u3068\u540c\u4e00\u306e\u5f62\u5f0f\u3067\u3059\uff09 \u3053\u308c\u3089\u5185\u90e8\u8868\u73fe\u3078\u306e/\u304b\u3089\u306e\u5909\u63db\u306f\u900f\u904e\u7684\u306b\u884c\u308f\u308c\u307e\u3059\u304c\u3001\u4f8b\u3048\u3070\u3001\u6841\u6570\u306e\u5927\u304d\u306a numeric \u578b\u306e\u30c7\u30fc\u30bf\u306f\u8868\u73fe\u3059\u308b\u4e8b\u304c\u3067\u304d\u306a\u3044\u305f\u3081\u3001PG-Strom\u306fCPU\u5074\u3067\u306e\u30d5\u30a9\u30fc\u30eb\u30d0\u30c3\u30af\u51e6\u7406\u3092\u8a66\u307f\u307e\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u6841\u6570\u306e\u5927\u304d\u306a numeric \u578b\u306e\u30c7\u30fc\u30bf\u3092GPU\u306b\u4e0e\u3048\u308b\u3068\u5374\u3063\u3066\u5b9f\u884c\u901f\u5ea6\u304c\u4f4e\u4e0b\u3057\u3066\u3057\u307e\u3046\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002 \u3053\u308c\u3092\u907f\u3051\u308b\u306b\u306f\u3001GUC\u30d1\u30e9\u30e1\u30fc\u30bf pg_strom.enable_numeric_type \u3092\u4f7f\u7528\u3057\u3066 numeric \u30c7\u30fc\u30bf\u578b\u3092\u542b\u3080\u6f14\u7b97\u5f0f\u3092GPU\u3067\u5b9f\u884c\u3057\u306a\u3044\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002 \u65e5\u4ed8\u6642\u523b\u578b date [\u30c7\u30fc\u30bf\u9577: 4bytes] \u65e5\u4ed8\u30c7\u30fc\u30bf\u578b time (\u5225\u540d time without time zone ) [\u30c7\u30fc\u30bf\u9577: 8bytes] \u6642\u523b\u30c7\u30fc\u30bf\u578b timetz (\u5225\u540d time with time zone ) [\u30c7\u30fc\u30bf\u9577: 12bytes] \u6642\u523b\u30c7\u30fc\u30bf\u578b\uff08\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u4ed8\u304d\uff09 timestamp (\u5225\u540d timestamp without time zone ) [\u30c7\u30fc\u30bf\u9577: 8bytes] \u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u578b timestamptz (\u5225\u540d timestamp with time zone ) [\u30c7\u30fc\u30bf\u9577: 8bytes] \u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u578b\uff08\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u4ed8\u304d\uff09 interval [\u30c7\u30fc\u30bf\u9577: 16bytes] \u6642\u9593\u9593\u9694\u578b \u53ef\u5909\u9577\u30c7\u30fc\u30bf\u578b bpchar [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909\u9577] \u53ef\u5909\u9577\u30c6\u30ad\u30b9\u30c8\u578b\uff08\u7a7a\u767d\u30d1\u30c7\u30a3\u30f3\u30b0\u3042\u308a\uff09 varchar [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909\u9577] \u53ef\u5909\u9577\u30c6\u30ad\u30b9\u30c8\u578b text [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909\u9577] \u53ef\u5909\u9577\u30c6\u30ad\u30b9\u30c8\u578b bytea [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909\u9577] \u53ef\u5909\u9577\u30d0\u30a4\u30ca\u30ea\u578b \u975e\u69cb\u9020\u30c7\u30fc\u30bf\u578b jsonb [length: \u53ef\u5909\u9577] \u30d0\u30a4\u30ca\u30ea\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u5185\u5305\u3059\u308bJSON\u30c7\u30fc\u30bf\u578b Note jsonb \u30c7\u30fc\u30bf\u578b\u3092GPU\u3067\u51e6\u7406\u3055\u305b\u308b\u5834\u5408\u306b\u306f\u3001\u6b21\u306e2\u3064\u306e\u70b9\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u5b9f\u969b\u306b\u53c2\u7167\u3055\u308c\u306a\u3044\u5c5e\u6027\u3082\u30b9\u30c8\u30ec\u30fc\u30b8\u304b\u3089\u8aad\u307f\u51fa\u3057\u3001GPU\u306b\u8ee2\u9001\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u305f\u3081\u3001I/O\u30d0\u30b9\u306e\u5229\u7528\u52b9\u7387\u306f\u5fc5\u305a\u3057\u3082\u826f\u304f\u306a\u3044\u30c7\u30fc\u30bf\u578b\u3067\u3042\u308b\u4e8b\u3002\u30c7\u30fc\u30bf\u9577\u304c TOAST\u5316 \u306e\u95be\u5024\uff08\u901a\u5e38\u306f2kB\u5f31\uff09\u3092\u8d8a\u3048\u3066\u3057\u307e\u3063\u305f\u5834\u5408\u3001 jsonb \u30c7\u30fc\u30bf\u5168\u4f53\u304cTOAST\u30c6\u30fc\u30d6\u30eb\u3078\u66f8\u304d\u51fa\u3055\u308c\u308b\u305f\u3081\u3001GPU\u5074\u3067\u306f\u51e6\u7406\u3067\u304d\u305a\u975e\u52b9\u7387\u306aCPU-fallback\u51e6\u7406\u3092\u547c\u3073\u51fa\u3057\u3066\u3057\u307e\u3046\u4e8b\u3002 \u5f8c\u8005\u306e\u554f\u984c\u306b\u5bfe\u3057\u3066\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u30aa\u30d7\u30b7\u30e7\u30f3 toast_tuple_target \u3092\u62e1\u5927\u3057\u3001TOAST\u5316\u306e\u95be\u5024\u3092\u5f15\u304d\u4e0a\u3052\u308b\u4e8b\u3067\u3042\u308b\u7a0b\u5ea6\u306f\u56de\u907f\u3059\u308b\u4e8b\u3082\u53ef\u80fd\u3067\u3059\u3002 \u96d1\u591a\u306a\u30c7\u30fc\u30bf\u578b boolean [\u30c7\u30fc\u30bf\u9577: 1byte] \u8ad6\u7406\u5024\u30c7\u30fc\u30bf\u578b money [\u30c7\u30fc\u30bf\u9577: 8bytes] \u901a\u8ca8\u30c7\u30fc\u30bf\u578b uuid [\u30c7\u30fc\u30bf\u9577: 16bytes] UUID\u30c7\u30fc\u30bf\u578b macaddr [\u30c7\u30fc\u30bf\u9577: 6bytes] \u30cd\u30c3\u30c8\u30ef\u30fc\u30afMAC\u30a2\u30c9\u30ec\u30b9\u578b inet [\u30c7\u30fc\u30bf\u9577: 7 or 19bytes] \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u578b cidr [\u30c7\u30fc\u30bf\u9577: 7 or 19butes] \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u578b cube [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909\u9577] contrib/cube \u306b\u3088\u3063\u3066\u63d0\u4f9b\u3055\u308c\u308b\u62e1\u5f35\u30c7\u30fc\u30bf\u578b \u30b8\u30aa\u30e1\u30c8\u30ea\u578b geometry [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909] PostGIS\u30b8\u30aa\u30e1\u30c8\u30ea\u30aa\u30d6\u30b8\u30a7\u30af\u30c8 box2df [\u30c7\u30fc\u30bf\u9577: 16bytes] 2\u6b21\u5143\u30d0\u30a6\u30f3\u30c7\u30a3\u30f3\u30b0\u30dc\u30c3\u30af\u30b9\uff08GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u7528\uff09","title":"\u30c7\u30fc\u30bf\u578b"},{"location":"ref_types/#_1","text":"PG-Strom\u306f\u4ee5\u4e0b\u306e\u30c7\u30fc\u30bf\u578b\u3092GPU\u3067\u5229\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002","title":"\u30c7\u30fc\u30bf\u578b"},{"location":"ref_types/#_2","text":"int1 [\u30c7\u30fc\u30bf\u9577: 1byte] 8bit\u6574\u6570\u578b\u3002PG-Strom\u306b\u3088\u308b\u72ec\u81ea\u62e1\u5f35 int2 (\u5225\u540d smallint ) [\u30c7\u30fc\u30bf\u9577: 2bytes] 16bit\u6574\u6570\u578b int4 (\u5225\u540d int ) [\u30c7\u30fc\u30bf\u9577: 4bytes] 32bit\u6574\u6570\u578b int8 (\u5225\u540d bigint ) [\u30c7\u30fc\u30bf\u9577: 8bytes] 64bit\u6574\u6570\u578b float2 [\u30c7\u30fc\u30bf\u9577: 2bytes] \u534a\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u3002PG-Strom\u306b\u3088\u308b\u72ec\u81ea\u62e1\u5f35 Note GPU\u3067\u306f\u534a\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u304c\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u3067\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001CPU(x86_64\u30d7\u30ed\u30bb\u30c3\u30b5)\u3067\u306f\u672a\u5bfe\u5fdc\u3067\u3059\u3002\u305d\u306e\u305f\u3081\u3001 float2 \u30c7\u30fc\u30bf\u578b\u3092CPU\u3067\u51e6\u7406\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u3053\u308c\u3092\u4e00\u5ea6 float \u3084 double \u578b\u306b\u5909\u63db\u3057\u305f\u4e0a\u3067\u6f14\u7b97\u3092\u884c\u3044\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001GPU\u306e\u3088\u3046\u306b float2 \u306e\u65b9\u304c\u6f14\u7b97\u901f\u5ea6\u3067\u6709\u5229\u3068\u3044\u3046\u4e8b\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u6a5f\u68b0\u5b66\u7fd2\u3084\u7d71\u8a08\u89e3\u6790\u7528\u9014\u306b\u30c7\u30fc\u30bf\u91cf\u3092\u6291\u5236\u3059\u308b\u305f\u3081\u306e\u6a5f\u80fd\u3067\u3059\u3002 float4 (\u5225\u540d real ) [\u30c7\u30fc\u30bf\u9577: 4bytes] \u5358\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b float8 (\u5225\u540d double precision ) [\u30c7\u30fc\u30bf\u9577: 8bytes] \u500d\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b numeric [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909] \u5b9f\u6570\u578b\u3002GPU\u5074\u3067\u306f128bit\u56fa\u5b9a\u5c0f\u6570\u70b9\u3068\u3057\u3066\u6271\u308f\u308c\u308b\u3002 Note GPU\u304c numeric \u578b\u306e\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u969b\u3001\u5b9f\u88c5\u4e0a\u306e\u7406\u7531\u304b\u3089\u3053\u308c\u3092128bit\u56fa\u5b9a\u5c11\u6570\u70b9\u306e\u5185\u90e8\u8868\u73fe\u306b\u5909\u63db\u3057\u3066\u51e6\u7406\u3057\u307e\u3059\u3002\uff08\u3053\u308c\u306f Apache Arrow \u306e Decimal \u578b\u3068\u540c\u4e00\u306e\u5f62\u5f0f\u3067\u3059\uff09 \u3053\u308c\u3089\u5185\u90e8\u8868\u73fe\u3078\u306e/\u304b\u3089\u306e\u5909\u63db\u306f\u900f\u904e\u7684\u306b\u884c\u308f\u308c\u307e\u3059\u304c\u3001\u4f8b\u3048\u3070\u3001\u6841\u6570\u306e\u5927\u304d\u306a numeric \u578b\u306e\u30c7\u30fc\u30bf\u306f\u8868\u73fe\u3059\u308b\u4e8b\u304c\u3067\u304d\u306a\u3044\u305f\u3081\u3001PG-Strom\u306fCPU\u5074\u3067\u306e\u30d5\u30a9\u30fc\u30eb\u30d0\u30c3\u30af\u51e6\u7406\u3092\u8a66\u307f\u307e\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u6841\u6570\u306e\u5927\u304d\u306a numeric \u578b\u306e\u30c7\u30fc\u30bf\u3092GPU\u306b\u4e0e\u3048\u308b\u3068\u5374\u3063\u3066\u5b9f\u884c\u901f\u5ea6\u304c\u4f4e\u4e0b\u3057\u3066\u3057\u307e\u3046\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002 \u3053\u308c\u3092\u907f\u3051\u308b\u306b\u306f\u3001GUC\u30d1\u30e9\u30e1\u30fc\u30bf pg_strom.enable_numeric_type \u3092\u4f7f\u7528\u3057\u3066 numeric \u30c7\u30fc\u30bf\u578b\u3092\u542b\u3080\u6f14\u7b97\u5f0f\u3092GPU\u3067\u5b9f\u884c\u3057\u306a\u3044\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002","title":"\u6570\u5024\u30c7\u30fc\u30bf\u578b"},{"location":"ref_types/#_3","text":"date [\u30c7\u30fc\u30bf\u9577: 4bytes] \u65e5\u4ed8\u30c7\u30fc\u30bf\u578b time (\u5225\u540d time without time zone ) [\u30c7\u30fc\u30bf\u9577: 8bytes] \u6642\u523b\u30c7\u30fc\u30bf\u578b timetz (\u5225\u540d time with time zone ) [\u30c7\u30fc\u30bf\u9577: 12bytes] \u6642\u523b\u30c7\u30fc\u30bf\u578b\uff08\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u4ed8\u304d\uff09 timestamp (\u5225\u540d timestamp without time zone ) [\u30c7\u30fc\u30bf\u9577: 8bytes] \u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u578b timestamptz (\u5225\u540d timestamp with time zone ) [\u30c7\u30fc\u30bf\u9577: 8bytes] \u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u578b\uff08\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u4ed8\u304d\uff09 interval [\u30c7\u30fc\u30bf\u9577: 16bytes] \u6642\u9593\u9593\u9694\u578b","title":"\u65e5\u4ed8\u6642\u523b\u578b"},{"location":"ref_types/#_4","text":"bpchar [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909\u9577] \u53ef\u5909\u9577\u30c6\u30ad\u30b9\u30c8\u578b\uff08\u7a7a\u767d\u30d1\u30c7\u30a3\u30f3\u30b0\u3042\u308a\uff09 varchar [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909\u9577] \u53ef\u5909\u9577\u30c6\u30ad\u30b9\u30c8\u578b text [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909\u9577] \u53ef\u5909\u9577\u30c6\u30ad\u30b9\u30c8\u578b bytea [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909\u9577] \u53ef\u5909\u9577\u30d0\u30a4\u30ca\u30ea\u578b","title":"\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u578b"},{"location":"ref_types/#_5","text":"jsonb [length: \u53ef\u5909\u9577] \u30d0\u30a4\u30ca\u30ea\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u5185\u5305\u3059\u308bJSON\u30c7\u30fc\u30bf\u578b Note jsonb \u30c7\u30fc\u30bf\u578b\u3092GPU\u3067\u51e6\u7406\u3055\u305b\u308b\u5834\u5408\u306b\u306f\u3001\u6b21\u306e2\u3064\u306e\u70b9\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u5b9f\u969b\u306b\u53c2\u7167\u3055\u308c\u306a\u3044\u5c5e\u6027\u3082\u30b9\u30c8\u30ec\u30fc\u30b8\u304b\u3089\u8aad\u307f\u51fa\u3057\u3001GPU\u306b\u8ee2\u9001\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u305f\u3081\u3001I/O\u30d0\u30b9\u306e\u5229\u7528\u52b9\u7387\u306f\u5fc5\u305a\u3057\u3082\u826f\u304f\u306a\u3044\u30c7\u30fc\u30bf\u578b\u3067\u3042\u308b\u4e8b\u3002\u30c7\u30fc\u30bf\u9577\u304c TOAST\u5316 \u306e\u95be\u5024\uff08\u901a\u5e38\u306f2kB\u5f31\uff09\u3092\u8d8a\u3048\u3066\u3057\u307e\u3063\u305f\u5834\u5408\u3001 jsonb \u30c7\u30fc\u30bf\u5168\u4f53\u304cTOAST\u30c6\u30fc\u30d6\u30eb\u3078\u66f8\u304d\u51fa\u3055\u308c\u308b\u305f\u3081\u3001GPU\u5074\u3067\u306f\u51e6\u7406\u3067\u304d\u305a\u975e\u52b9\u7387\u306aCPU-fallback\u51e6\u7406\u3092\u547c\u3073\u51fa\u3057\u3066\u3057\u307e\u3046\u4e8b\u3002 \u5f8c\u8005\u306e\u554f\u984c\u306b\u5bfe\u3057\u3066\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u30aa\u30d7\u30b7\u30e7\u30f3 toast_tuple_target \u3092\u62e1\u5927\u3057\u3001TOAST\u5316\u306e\u95be\u5024\u3092\u5f15\u304d\u4e0a\u3052\u308b\u4e8b\u3067\u3042\u308b\u7a0b\u5ea6\u306f\u56de\u907f\u3059\u308b\u4e8b\u3082\u53ef\u80fd\u3067\u3059\u3002","title":"\u975e\u69cb\u9020\u30c7\u30fc\u30bf\u578b"},{"location":"ref_types/#_6","text":"boolean [\u30c7\u30fc\u30bf\u9577: 1byte] \u8ad6\u7406\u5024\u30c7\u30fc\u30bf\u578b money [\u30c7\u30fc\u30bf\u9577: 8bytes] \u901a\u8ca8\u30c7\u30fc\u30bf\u578b uuid [\u30c7\u30fc\u30bf\u9577: 16bytes] UUID\u30c7\u30fc\u30bf\u578b macaddr [\u30c7\u30fc\u30bf\u9577: 6bytes] \u30cd\u30c3\u30c8\u30ef\u30fc\u30afMAC\u30a2\u30c9\u30ec\u30b9\u578b inet [\u30c7\u30fc\u30bf\u9577: 7 or 19bytes] \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u578b cidr [\u30c7\u30fc\u30bf\u9577: 7 or 19butes] \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u578b cube [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909\u9577] contrib/cube \u306b\u3088\u3063\u3066\u63d0\u4f9b\u3055\u308c\u308b\u62e1\u5f35\u30c7\u30fc\u30bf\u578b","title":"\u96d1\u591a\u306a\u30c7\u30fc\u30bf\u578b"},{"location":"ref_types/#_7","text":"geometry [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909] PostGIS\u30b8\u30aa\u30e1\u30c8\u30ea\u30aa\u30d6\u30b8\u30a7\u30af\u30c8 box2df [\u30c7\u30fc\u30bf\u9577: 16bytes] 2\u6b21\u5143\u30d0\u30a6\u30f3\u30c7\u30a3\u30f3\u30b0\u30dc\u30c3\u30af\u30b9\uff08GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u7528\uff09","title":"\u30b8\u30aa\u30e1\u30c8\u30ea\u578b"},{"location":"release_v2.0/","text":"PG-Strom v2.0\u30ea\u30ea\u30fc\u30b9 PG-Strom Development Team (17-Apr-2018) \u6982\u8981 PG-Strom v2.0\u306b\u304a\u3051\u308b\u4e3b\u8981\u306a\u6a5f\u80fd\u5f37\u5316\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 GPU\u3092\u7ba1\u7406\u3059\u308b\u5185\u90e8\u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u306e\u5168\u4f53\u7684\u306a\u518d\u8a2d\u8a08\u3068\u5b89\u5b9a\u5316 CPU+GPU\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u4e26\u5217\u5b9f\u884c SSD-to-GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c \u30a4\u30f3\u30e1\u30e2\u30ea\u5217\u6307\u5411\u30ad\u30e3\u30c3\u30b7\u30e5 GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2(store_fdw) GpuJoin\u3068GpuPreAgg\u306e\u518d\u8a2d\u8a08\u306b\u4f34\u3046\u9ad8\u901f\u5316 GpuPreAgg+GpuJoin+GpuScan \u5bc6\u7d50\u5408GPU\u30ab\u30fc\u30cd\u30eb \u65b0\u6a5f\u80fd\u306e\u30b5\u30de\u30ea\u306f\u3053\u3061\u3089\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\uff1a PG-Strom v2.0 Technical Brief . \u52d5\u4f5c\u74b0\u5883 PostgreSQL v9.6, v10 CUDA Toolkit 9.1 CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3 Intel x86 64bit \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3(x86_64) NVIDIA GPU CC 6.0 \u4ee5\u964d (Pascal\u4ee5\u964d) \u65b0\u6a5f\u80fd GPU\u3092\u7ba1\u7406\u3059\u308b\u5185\u90e8\u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u306e\u5168\u4f53\u7684\u306a\u518d\u8a2d\u8a08\u3068\u5b89\u5b9a\u5316 PostgreSQL\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u30d7\u30ed\u30bb\u30b9\u306f\u540c\u6642\u306b\uff11\u500b\u306eGPU\u3060\u3051\u3092\u5229\u7528\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u30de\u30eb\u30c1GPU\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u306fPostgreSQL\u306eCPU\u4e26\u5217\u3068\u306e\u4f75\u7528\u304c\u524d\u63d0\u306b\u306a\u308a\u307e\u3059\u304c\u3001CPU\u30b9\u30ec\u30c3\u30c9\u304cGPU\u3078\u30c7\u30fc\u30bf\u3092\u4f9b\u7d66\u3059\u308b\u30b9\u30eb\u30fc\u30d7\u30c3\u30c8\u306fGPU\u306e\u51e6\u7406\u80fd\u529b\u3088\u308a\u3082\u305a\u3063\u3068\u4f4e\u3044\u305f\u3081\u3001\u901a\u5e38\u3001\u3053\u308c\u306f\u554f\u984c\u3068\u306f\u306a\u308a\u307e\u305b\u3093\u3002\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u8a2d\u8a08\u306e\u30b7\u30f3\u30d7\u30eb\u5316\u3092\u512a\u5148\u3057\u307e\u3057\u305f\u3002 Pascal\u4e16\u4ee3\u4ee5\u964d\u306eGPU\u3067\u63a1\u7528\u3055\u308c\u305fGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u30c7\u30de\u30f3\u30c9\u30da\u30fc\u30b8\u30f3\u30b0\u3092\u307b\u307c\u5168\u9762\u7684\u306b\u63a1\u7528\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u591a\u304f\u306f\u5b9f\u969b\u306b\u5b9f\u884c\u3057\u3066\u307f\u308b\u307e\u3067\u5fc5\u8981\u306a\u7d50\u679c\u30d0\u30c3\u30d5\u30a1\u306e\u5927\u304d\u3055\u304c\u5206\u304b\u3089\u306a\u3044\u305f\u3081\u3001\u3053\u308c\u307e\u3067\u306f\u5fc5\u8981\u4ee5\u4e0a\u306b\u30d0\u30c3\u30d5\u30a1\u3092\u7372\u5f97\u3057\u3001\u307e\u305f\u30e1\u30e2\u30ea\u4e0d\u8db3\u6642\u306b\u306f\u518d\u5b9f\u884c\u3092\u884c\u3063\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u3053\u308c\u3089\u306f\u540c\u6642\u5b9f\u884c\u30d7\u30ed\u30bb\u30b9\u306e\u5229\u7528\u53ef\u80fd\u306a\u30ea\u30bd\u30fc\u30b9\u3092\u5236\u9650\u3057\u3001\u307e\u305f\u8907\u96d1\u306a\u4f8b\u5916\u30ed\u30b8\u30c3\u30af\u306f\u30d0\u30b0\u306e\u6e29\u5e8a\u3067\u3057\u305f\u3002GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u30c7\u30de\u30f3\u30c9\u30da\u30fc\u30b8\u30f3\u30b0\u3092\u5229\u7528\u3059\u308b\u4e8b\u3067\u3001\u8a2d\u8a08\u306e\u30b7\u30f3\u30d7\u30eb\u5316\u3092\u884c\u3044\u307e\u3057\u305f\u3002 CUDA\u306e\u975e\u540c\u671f\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306e\u5229\u7528\u3092\u6b62\u3081\u307e\u3057\u305f\u3002GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u30c7\u30de\u30f3\u30c9\u30da\u30fc\u30b8\u30f3\u30b0\u3092\u5229\u7528\u3059\u308b\u3068\u3001DMA\u8ee2\u9001\u306e\u305f\u3081\u306e\u975e\u540c\u671fAPI\uff08 cuMemCpyHtoD \u306a\u3069\uff09\u306f\u540c\u671f\u7684\u306b\u632f\u821e\u3046\u3088\u3046\u306b\u306a\u308b\u305f\u3081\u3001GPU\u30ab\u30fc\u30cd\u30eb\u306e\u591a\u91cd\u5ea6\u304c\u4f4e\u4e0b\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u4ee3\u308f\u308a\u306bPG-Strom\u81ea\u8eab\u304c\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u3092\u7ba1\u7406\u3057\u3001\u3053\u308c\u3089\u306e\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u304c\u305d\u308c\u305e\u308c\u540c\u671fAPI\u3092\u547c\u3073\u51fa\u3059\u3088\u3046\u8a2d\u8a08\u5909\u66f4\u3092\u884c\u3044\u307e\u3057\u305f\u3002\u526f\u7523\u7269\u3068\u3057\u3066\u3001\u975e\u540c\u671f\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\uff08 cuStreamAddCallback \uff09\u3092\u5229\u7528\u3059\u308b\u5fc5\u8981\u304c\u306a\u304f\u306a\u3063\u305f\u306e\u3067\u3001MPS\u3092\u5229\u7528\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002 CPU+GPU\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u4e26\u5217\u5b9f\u884c PostgreSQL v9.6\u3067\u65b0\u305f\u306b\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u305fCPU\u4e26\u5217\u5b9f\u884c\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 PG-Strom\u306e\u63d0\u4f9b\u3059\u308bGpuScan\u3001GpuJoin\u304a\u3088\u3073GpuPreAgg\u306e\u5404\u30ed\u30b8\u30c3\u30af\u306f\u8907\u6570\u306ePostgreSQL\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\u306b\u3088\u308a\u4e26\u5217\u306b\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 PostgreSQL v9.6\u3067\u306fCPU\u4e26\u5217\u5b9f\u884c\u306e\u969b\u306b EXPLAIN ANALYZE \u3067\u53d6\u5f97\u3059\u308bPG-Strom\u72ec\u81ea\u306e\u7d71\u8a08\u60c5\u5831\u304c\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002\u3053\u308c\u306f\u3001CustomScan\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9API\u3067 ShutdownCustomScan \u304c\u63d0\u4f9b\u3055\u308c\u3066\u3044\u306a\u304b\u3063\u305f\u305f\u3081\u3001DSM\uff08\u52d5\u7684\u5171\u6709\u30e1\u30e2\u30ea\uff09\u306e\u89e3\u653e\u524d\u306b\u30b3\u30fc\u30c7\u30a3\u30cd\u30fc\u30bf\u30d7\u30ed\u30bb\u30b9\u304c\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\u306e\u60c5\u5831\u3092\u56de\u53ce\u3059\u308b\u624b\u6bb5\u304c\u7121\u304b\u3063\u305f\u305f\u3081\u3067\u3059\u3002 SSD-to-GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c Linux\u30ab\u30fc\u30cd\u30eb\u30e2\u30b8\u30e5\u30fc\u30eb nvme_strom \u3092\u7528\u3044\u308b\u4e8b\u3067\u3001NVMe\u898f\u683c\u306b\u5bfe\u5fdc\u3057\u305fSSD\u4e0a\u306ePostgreSQL\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u3092\u3001CPU/RAM\u3092\u4ecb\u3055\u305a\u30c0\u30a4\u30ec\u30af\u30c8\u306bGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u3078\u8ee2\u9001\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002\u30b7\u30b9\u30c6\u30e0RAM\u306b\u8f09\u308a\u5207\u3089\u306a\u3044\u5927\u304d\u3055\u306e\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u5834\u5408\u3067\u3042\u3063\u3066\u3082\u3001\u672c\u6a5f\u80fd\u306b\u3088\u308aPG-Strom\u306e\u9069\u7528\u304c\u73fe\u5b9f\u7684\u306a\u9078\u629e\u80a2\u3068\u306a\u308b\u4e8b\u3067\u3057\u3087\u3046\u3002 \u30d6\u30ed\u30c3\u30af\u30c7\u30d0\u30a4\u30b9\u5c64\u3084\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3092\u7d4c\u7531\u3057\u306a\u3044\u305f\u3081\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u9650\u754c\u306b\u8fd1\u3044\u9ad8\u30b9\u30eb\u30fc\u30d7\u30c3\u30c8\u3092\u5f15\u304d\u51fa\u3059\u4e8b\u304c\u53ef\u80fd\u3067\u3001\u304b\u3064\u3001GPU\u3067SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u51e6\u7406\u3059\u308b\u305f\u3081CPU\u306e\u51e6\u7406\u3059\u3079\u304d\u30c7\u30fc\u30bf\u91cf\u3092\u6e1b\u3089\u3059\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306a\u7279\u6027\u306e\u7d44\u307f\u5408\u308f\u305b\u306b\u3088\u308a\u3001\u4e00\u822c\u7684\u306b\u306f\u8a08\u7b97\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u30a2\u30af\u30bb\u30e9\u30ec\u30fc\u30bf\u3068\u3057\u3066\u8a8d\u8b58\u3055\u308c\u3066\u3044\u308bGPU\u3092\u3001I/O\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u9ad8\u901f\u5316\u306b\u9069\u7528\u3059\u308b\u4e8b\u306b\u6210\u529f\u3057\u307e\u3057\u305f\u3002 \u30a4\u30f3\u30e1\u30e2\u30ea\u5217\u6307\u5411\u30ad\u30e3\u30c3\u30b7\u30e5 RAM\u30b5\u30a4\u30ba\u306b\u8f09\u308b\u7a0b\u5ea6\u306e\u5927\u304d\u3055\u306e\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u306f\u3001\u3088\u308aGPU\u3067\u306e\u51e6\u7406\u306b\u9069\u3057\u305f\u5217\u30c7\u30fc\u30bf\u5f62\u5f0f\u306b\u5909\u5f62\u3057\u3066\u30ad\u30e3\u30c3\u30b7\u30e5\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u306b\u969b\u3057\u3066\u3001\u5217\u6307\u5411\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u306b\u306fPostgreSQL\u306e\u5171\u6709\u30d0\u30c3\u30d5\u30a1\u3088\u308a\u3082\u3053\u3061\u3089\u3092\u512a\u5148\u3057\u3066\u53c2\u7167\u3057\u307e\u3059\u3002 \u30a4\u30f3\u30e1\u30e2\u30ea\u5217\u6307\u5411\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u540c\u671f\u7684\u3001\u307e\u305f\u306f\u975e\u540c\u671f\u7684\u306b\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u3067\u69cb\u7bc9\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 \u521d\u671f\u306ePG-Strom\u3067\u4f3c\u305f\u3088\u3046\u306a\u6a5f\u80fd\u304c\u5b58\u5728\u3057\u3066\u3044\u305f\u4e8b\u3092\u899a\u3048\u3066\u304a\u3089\u308c\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002v2.0\u3067\u65b0\u305f\u306b\u5b9f\u88c5\u3055\u308c\u305f\u5217\u6307\u5411\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u3055\u308c\u305f\u884c\u304c\u66f4\u65b0\u3055\u308c\u308b\u3068\u3001\u5f53\u8a72\u884c\u3092\u542b\u3080\u30ad\u30e3\u30c3\u30b7\u30e5\u30d6\u30ed\u30c3\u30af\u3092\u6d88\u53bb\uff08invalidation\uff09\u3057\u307e\u3059\u3002\u884c\u30b9\u30c8\u30a2\u306e\u66f4\u65b0\u306b\u5408\u308f\u305b\u3066\u5217\u30ad\u30e3\u30c3\u30b7\u30e5\u5074\u306e\u66f4\u65b0\u3092\u884c\u3046\u3068\u3044\u3046\u4e8b\u306f\u884c\u308f\u306a\u3044\u305f\u3081\u3001\u66f4\u65b0\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u5bfe\u3059\u308b\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u4f4e\u4e0b\u306f\u9650\u5b9a\u7684\u3067\u3059\u3002 GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2(gstore_fdw) GPU\u4e0a\u306b\u78ba\u4fdd\u3057\u305f\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u9818\u57df\u306b\u5bfe\u3057\u3066\u3001\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\uff08Foreign Table\uff09\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u5229\u7528\u3057\u3066SQL\u306eSELECT/INSERT/UPDATE/DELETE\u306b\u3088\u308a\u8aad\u307f\u66f8\u304d\u3092\u884c\u3046\u6a5f\u80fd\u3067\u3059\u3002 \u5185\u90e8\u30c7\u30fc\u30bf\u5f62\u5f0f\u306f pgstrom \u578b\u306e\u307f\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u3001PG-Strom\u306e\u30d0\u30c3\u30d5\u30a1\u5f62\u5f0f KDS_FORMAT_COLUMN \u30bf\u30a4\u30d7\u3068\u540c\u4e00\u306e\u5f62\u5f0f\u3067\u30c7\u30fc\u30bf\u3092\u4fdd\u6301\u3059\u308b\u3082\u306e\u3067\u3059\u3002\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308b\u5834\u5408\u3001LZ\u65b9\u5f0f\u306b\u3088\u308b\u30c7\u30fc\u30bf\u5727\u7e2e\u3092\u884c\u3046\u4e8b\u3082\u53ef\u80fd\u3067\u3059\u3002 v2.0\u306e\u6642\u70b9\u3067\u306f\u3001GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2\u306fPL/CUDA\u95a2\u6570\u306e\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3068\u3057\u3066\u3060\u3051\u5229\u7528\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 GpuJoin\u3068GpuPreAgg\u306e\u518d\u8a2d\u8a08\u306b\u4f34\u3046\u9ad8\u901f\u5316 \u5f93\u6765\u3001GpuJoin\u3068GpuPreAgg\u3067\u5185\u90e8\u7684\u306b\u4f7f\u7528\u3057\u3066\u3044\u305fDynamic Parallelism\u306e\u5229\u7528\u3092\u3084\u3081\u3001\u51e6\u7406\u30ed\u30b8\u30c3\u30af\u5168\u4f53\u306e\u898b\u76f4\u3057\u3092\u884c\u3044\u307e\u3057\u305f\u3002\u3053\u308c\u306f\u3001GPU\u30b5\u30d6\u30ab\u30fc\u30cd\u30eb\u306e\u8d77\u52d5\u5f8c\u3001\u305d\u306e\u5b8c\u4e86\u3092\u5358\u306b\u5f85\u3063\u3066\u3044\u308b\u3060\u3051\u306eGPU\u30ab\u30fc\u30cd\u30eb\u304c\u5b9f\u884c\u30b9\u30ed\u30c3\u30c8\u3092\u5360\u6709\u3057\u3001GPU\u306e\u4f7f\u7528\u7387\u304c\u4e0a\u304c\u3089\u306a\u3044\u3068\u3044\u3046\u554f\u984c\u304c\u3042\u3063\u305f\u305f\u3081\u3067\u3059\u3002 \u3053\u306e\u518d\u8a2d\u8a08\u306b\u4f34\u3046\u526f\u7523\u7269\u3068\u3057\u3066\u3001GpuJoin\u306e\u30b5\u30b9\u30da\u30f3\u30c9/\u30ec\u30b8\u30e5\u30fc\u30e0\u6a5f\u80fd\u304c\u5b9f\u88c5\u3055\u308c\u307e\u3057\u305f\u3002\u539f\u7406\u4e0a\u3001SQL\u306eJOIN\u51e6\u7406\u306f\u5165\u529b\u3057\u305f\u884c\u6570\u3088\u308a\u3082\u51fa\u529b\u3059\u308b\u884c\u6570\u306e\u65b9\u304c\u5897\u3048\u3066\u3057\u307e\u3046\u4e8b\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u51e6\u7406\u7d50\u679c\u3092\u66f8\u304d\u8fbc\u3080\u30d0\u30c3\u30d5\u30a1\u306e\u6b8b\u308a\u30b5\u30a4\u30ba\u304c\u4e0d\u8db3\u3057\u305f\u6642\u70b9\u3067GpuJoin\u3092\u30b5\u30b9\u30da\u30f3\u30c9\u3057\u3001\u65b0\u3057\u3044\u7d50\u679c\u30d0\u30c3\u30d5\u30a1\u3092\u5272\u308a\u5f53\u3066\u3066\u30ec\u30b8\u30e5\u30fc\u30e0\u3059\u308b\u3088\u3046\u306b\u4fee\u6b63\u3055\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u7d50\u679c\u30d0\u30c3\u30d5\u30a1\u306e\u30b5\u30a4\u30ba\u63a8\u5b9a\u304c\u7c21\u7565\u5316\u3055\u308c\u305f\u307b\u304b\u3001\u5b9f\u884c\u6642\u306e\u30d0\u30c3\u30d5\u30a1\u4e0d\u8db3\u306b\u3088\u308b\u518d\u5b9f\u884c\u306e\u5fc5\u8981\u304c\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002 GpuPreAgg+GpuJoin+GpuScan \u5bc6\u7d50\u5408GPU\u30ab\u30fc\u30cd\u30eb GPU\u3067\u5b9f\u884c\u53ef\u80fd\u306aSCAN\u3001JOIN\u3001GROUP BY\u304c\u9023\u7d9a\u3057\u3066\u3044\u308b\u3068\u304d\u3001\u5bfe\u5fdc\u3059\u308bGpuScan\u3001GpuJoin\u3001GpuPreAgg\u306b\u76f8\u5f53\u3059\u308b\u51e6\u7406\u3092\u4e00\u56de\u306eGPU\u30ab\u30fc\u30cd\u30eb\u547c\u3073\u51fa\u3057\u3067\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u3053\u308c\u306f\u3001GpuJoin\u306e\u7d50\u679c\u30d0\u30c3\u30d5\u30a1\u3092\u305d\u306e\u307e\u307eGpuPreAgg\u306e\u5165\u529b\u30d0\u30c3\u30d5\u30a1\u3068\u3057\u3066\u6271\u3046\u306a\u3069\u3001CPU\u3068GPU\u306e\u9593\u306e\u30c7\u30fc\u30bf\u4ea4\u63db\u3092\u6700\u5c0f\u9650\u306b\u6291\u3048\u308b\u305f\u3081\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u3067\u3059\u3002 \u3053\u306e\u6a5f\u80fd\u306f\u7279\u306b\u3001SSD-to-GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u4f7f\u7528\u3059\u308b\u3068\u52b9\u679c\u7684\u3067\u3059\u3002 \u65b0\u3057\u3044\u30c7\u30fc\u30bf\u578b\u306e\u5bfe\u5fdc uuid \u578b\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u578b\uff08 inet \u3001 cidr \u3001\u304a\u3088\u3073 macaddr \uff09\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u7bc4\u56f2\u578b\uff08 int4range \u3001 int8range \u3001 tsrange \u3001 tstzrange \u3001 daterange \uff09\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u534a\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\uff08 float2 \uff09\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002\u534a\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u306b\u95a2\u9023\u3059\u308bCPU\u5074\u306e\u5b9f\u88c5\u306fPG-Strom\u306e\u72ec\u81ea\u5b9f\u88c5\u306b\u3088\u308b\u3082\u306e\u3067\u3059\u3002 \u65b0\u3057\u3044\u6f14\u7b97\u5b50/\u95a2\u6570\u306e\u5bfe\u5fdc \u65e5\u4ed8\u6642\u523b\u578b\u306b\u5bfe\u3059\u308b EXTRACT(field FROM timestamp) \u6f14\u7b97\u5b50\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 New data type support uuid type Network address types ( inet , cidr and macaddr ) Range data types ( int4range , int8range , tsrange , tstzrange , daterange ) Half-precision floating point type ( float2 ). Its CPU side are also implemented by PG-Strom itself, not PostgreSQL's built-in feature. New operators / functions EXTRACT(field FROM timestamp) operator on the date and time types PL/CUDA\u95a2\u9023\u306e\u5f37\u5316 #plcuda_include \u306e\u62e1\u5f35\u306b\u3088\u308a\u3001 text \u578b\u3092\u8fd4\u3059SQL\u95a2\u6570\u3092\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u5f15\u6570\u306e\u5024\u306b\u3088\u3063\u3066\u633f\u5165\u3059\u308b\u30b3\u30fc\u30c9\u3092\u5909\u3048\u308b\u4e8b\u304c\u3067\u304d\u308b\u305f\u3081\u3001\u5358\u306b\u5916\u90e8\u5b9a\u7fa9\u95a2\u6570\u3092\u8aad\u307f\u8fbc\u3080\u3060\u3051\u3067\u306a\u304f\u3001\u52d5\u7684\u306b\u3044\u304f\u3064\u3082\u306eGPU\u30ab\u30fc\u30cd\u30eb\u306e\u30d0\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u308a\u51fa\u3059\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002 PL/CUDA\u95a2\u6570\u306e\u5f15\u6570\u306b reggstore \u578b\u3092\u6307\u5b9a\u3057\u305f\u5834\u5408\u3001GPU\u30ab\u30fc\u30cd\u30eb\u95a2\u6570\u3078\u306f\u5bfe\u5fdc\u3059\u308bGPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2\u306e\u30dd\u30a4\u30f3\u30bf\u304c\u6e21\u3055\u308c\u307e\u3059\u3002OID\u5024\u304c\u6e21\u3055\u308c\u308b\u308f\u3051\u3067\u306f\u306a\u3044\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u305d\u306e\u4ed6\u306e\u6a5f\u80fd\u5f37\u5316 lo_import_gpu \u304a\u3088\u3073 lo_export_gpu \u95a2\u6570\u306b\u3088\u308a\u3001\u5916\u90e8\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u78ba\u4fdd\u3057\u305fGPU\u30e1\u30e2\u30ea\u306e\u5185\u5bb9\u3092\u76f4\u63a5PostgreSQL\u306e\u30e9\u30fc\u30b8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u8a18\u9332\u3057\u305f\u308a\u3001\u9006\u306b\u30e9\u30fc\u30b8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5185\u5bb9\u3092GPU\u30e1\u30e2\u30ea\u306b\u66f8\u304d\u51fa\u3059\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 \u30d1\u30c3\u30b1\u30fc\u30b8\u30f3\u30b0 PostgreSQL Global Development Group\u306e\u914d\u5e03\u3059\u308bPostgreSQL\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u9069\u5408\u3059\u308b\u3088\u3046\u3001RPM\u30d1\u30c3\u30b1\u30fc\u30b8\u5316\u3092\u884c\u3044\u307e\u3057\u305f\u3002 \u5168\u3066\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u7269\u4ef6\u306fHeteroDB SWDC(Software Distribution Center)\u3088\u308a\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u304c\u53ef\u80fd\u3067\u3059\u3002 \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8 PG-Strom\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092markdown\u3068mkdocs\u3092\u7528\u3044\u3066\u5168\u9762\u7684\u306b\u66f8\u304d\u76f4\u3057\u307e\u3057\u305f\u3002\u5f93\u6765\u306eHTML\u3092\u7528\u3044\u305f\u30a2\u30d7\u30ed\u30fc\u30c1\u306b\u6bd4\u3079\u3001\u3088\u308a\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u304c\u5bb9\u6613\u3067\u65b0\u6a5f\u80fd\u306e\u958b\u767a\u306b\u5408\u308f\u305b\u305f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u62e1\u5145\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059\u3002 \u30c6\u30b9\u30c8 PostgreSQL\u306e\u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u4f7f\u7528\u3057\u3066\u3001PG-Strom\u306e\u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002 \u5ec3\u6b62\u3055\u308c\u305f\u6a5f\u80fd PostgreSQL v9.5\u30b5\u30dd\u30fc\u30c8 PostgreSQL v9.6\u3067\u306fCPU\u4e26\u5217\u30af\u30a8\u30ea\u306e\u63d0\u4f9b\u306b\u4f34\u3044\u3001\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6/\u30a8\u30b0\u30bc\u30ad\u30e5\u30fc\u30bf\u5171\u306b\u5927\u304d\u306a\u4fee\u6b63\u304c\u52a0\u3048\u3089\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u3089\u3068\u5bc6\u63a5\u306b\u9023\u643a\u3059\u308b\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u3068\u3063\u3066\u6700\u3082\u30a4\u30f3\u30d1\u30af\u30c8\u306e\u5927\u304d\u306a\u5909\u66f4\u306f\u300eupper planner path-ification\u300f\u3068\u547c\u3070\u308c\u308b\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306e\u5f37\u5316\u3067\u3001\u96c6\u7d04\u6f14\u7b97\u3084\u30bd\u30fc\u30c8\u306a\u3069\u306e\u5b9f\u884c\u8a08\u753b\u3082\u30b3\u30b9\u30c8\u30d9\u30fc\u30b9\u3067\u8907\u6570\u306e\u7570\u306a\u308b\u65b9\u6cd5\u3092\u6bd4\u8f03\u3057\u3066\u6700\u9069\u306a\u3082\u306e\u3092\u9078\u629e\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u3053\u308c\u306fGpuPreAgg\u3092\u5b9f\u88c5\u3059\u308b\u305f\u3081\u306b\u30d5\u30c3\u30af\u3092\u5229\u7528\u3057\u3066\u5b9f\u884c\u8a08\u753b\u3092\u66f8\u304d\u63db\u3048\u3066\u3044\u305f\u5f93\u6765\u306e\u65b9\u6cd5\u3068\u306f\u6839\u672c\u7684\u306b\u7570\u306a\u308a\u3001\u3088\u308a\u5408\u7406\u7684\u304b\u3064\u4fe1\u983c\u3067\u304d\u308b\u65b9\u6cd5\u3067GPU\u3092\u7528\u3044\u305f\u96c6\u7d04\u6f14\u7b97\u3092\u633f\u5165\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u3001\u30d0\u30b0\u306e\u6e29\u5e8a\u3067\u3042\u3063\u305f\u5b9f\u884c\u8a08\u753b\u306e\u66f8\u304d\u63db\u3048\u30ed\u30b8\u30c3\u30af\u3092\u6368\u3066\u308b\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u540c\u6642\u306b\u3001CustomScan\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306b\u3082CPU\u4e26\u5217\u306b\u5bfe\u5fdc\u3059\u308b\u305f\u3081\u306eAPI\u304c\u62e1\u5f35\u3055\u308c\u3001\u3053\u308c\u3089\u306b\u5bfe\u5fdc\u3059\u308b\u305f\u3081\u306bPostgreSQL v9.5\u30b5\u30dd\u30fc\u30c8\u306f\u5ec3\u6b62\u3055\u308c\u307e\u3057\u305f\u3002 GpuSort\u6a5f\u80fd GpuSort\u6a5f\u80fd\u306f\u6027\u80fd\u4e0a\u306e\u30e1\u30ea\u30c3\u30c8\u304c\u5f97\u3089\u308c\u306a\u3044\u305f\u3081\u5ec3\u6b62\u3055\u308c\u307e\u3057\u305f\u3002 \u30bd\u30fc\u30c8\u306fGPU\u306e\u5f97\u610f\u3068\u3059\u308b\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u4e00\u3064\u3067\u3059\u3002\u3057\u304b\u3057\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u5927\u304d\u3055\u3092\u8d8a\u3048\u308b\u30b5\u30a4\u30ba\u306e\u30c7\u30fc\u30bf\u3092\u30bd\u30fc\u30c8\u3059\u308b\u5834\u5408\u3001\u8907\u6570\u306e\u30c1\u30e3\u30f3\u30af\u306b\u5206\u5272\u3057\u3066\u90e8\u5206\u30bd\u30fc\u30c8\u3092\u884c\u3044\u3001\u5f8c\u3067CPU\u5074\u3067\u3053\u308c\u3092\u7d50\u5408\u3057\u3066\u6700\u7d42\u7d50\u679c\u3092\u51fa\u529b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u7d50\u5408\u30d5\u30a7\u30fc\u30ba\u306e\u51e6\u7406\u3092\u8efd\u304f\u3059\u308b\u306b\u306f\u3001GPU\u3067\u30bd\u30fc\u30c8\u3059\u3079\u304d\u30c1\u30e3\u30f3\u30af\u306e\u30b5\u30a4\u30ba\u3092\u5927\u304d\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u4e00\u65b9\u3067\u30c1\u30e3\u30f3\u30af\u30b5\u30a4\u30ba\u304c\u5927\u304d\u304f\u306a\u308b\u3068\u30bd\u30fc\u30c8\u51e6\u7406\u3092\u958b\u59cb\u3059\u308b\u305f\u3081\u306e\u30ea\u30fc\u30c9\u30bf\u30a4\u30e0\u304c\u9577\u304f\u306a\u308a\u3001PG-Strom\u306e\u7279\u9577\u306e\u4e00\u3064\u3067\u3042\u308b\u975e\u540c\u671f\u51e6\u7406\u306b\u3088\u308b\u30c7\u30fc\u30bf\u8ee2\u9001\u30ec\u30a4\u30c6\u30f3\u30b7\u306e\u96a0\u307a\u3044\u304c\u52b9\u304b\u306a\u304f\u306a\u308b\u3068\u3044\u3046\u30c8\u30ec\u30fc\u30c9\u30aa\u30d5\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u554f\u984c\u306b\u5bfe\u51e6\u3059\u308b\u306e\u306f\u56f0\u96e3\u3001\u5c11\u306a\u304f\u3068\u3082\u6642\u671f\u5c1a\u65e9\u3067\u3042\u308b\u3068\u5224\u65ad\u3057\u3001GpuSort\u6a5f\u80fd\u306f\u5ec3\u6b62\u3055\u308c\u307e\u3057\u305f\u3002","title":"PG-Strom v2.0"},{"location":"release_v2.0/#pg-strom-v20","text":"PG-Strom Development Team (17-Apr-2018)","title":"PG-Strom v2.0\u30ea\u30ea\u30fc\u30b9"},{"location":"release_v2.0/#_1","text":"PG-Strom v2.0\u306b\u304a\u3051\u308b\u4e3b\u8981\u306a\u6a5f\u80fd\u5f37\u5316\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 GPU\u3092\u7ba1\u7406\u3059\u308b\u5185\u90e8\u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u306e\u5168\u4f53\u7684\u306a\u518d\u8a2d\u8a08\u3068\u5b89\u5b9a\u5316 CPU+GPU\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u4e26\u5217\u5b9f\u884c SSD-to-GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c \u30a4\u30f3\u30e1\u30e2\u30ea\u5217\u6307\u5411\u30ad\u30e3\u30c3\u30b7\u30e5 GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2(store_fdw) GpuJoin\u3068GpuPreAgg\u306e\u518d\u8a2d\u8a08\u306b\u4f34\u3046\u9ad8\u901f\u5316 GpuPreAgg+GpuJoin+GpuScan \u5bc6\u7d50\u5408GPU\u30ab\u30fc\u30cd\u30eb \u65b0\u6a5f\u80fd\u306e\u30b5\u30de\u30ea\u306f\u3053\u3061\u3089\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\uff1a PG-Strom v2.0 Technical Brief .","title":"\u6982\u8981"},{"location":"release_v2.0/#_2","text":"PostgreSQL v9.6, v10 CUDA Toolkit 9.1 CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3 Intel x86 64bit \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3(x86_64) NVIDIA GPU CC 6.0 \u4ee5\u964d (Pascal\u4ee5\u964d)","title":"\u52d5\u4f5c\u74b0\u5883"},{"location":"release_v2.0/#_3","text":"GPU\u3092\u7ba1\u7406\u3059\u308b\u5185\u90e8\u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u306e\u5168\u4f53\u7684\u306a\u518d\u8a2d\u8a08\u3068\u5b89\u5b9a\u5316 PostgreSQL\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u30d7\u30ed\u30bb\u30b9\u306f\u540c\u6642\u306b\uff11\u500b\u306eGPU\u3060\u3051\u3092\u5229\u7528\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u30de\u30eb\u30c1GPU\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u306fPostgreSQL\u306eCPU\u4e26\u5217\u3068\u306e\u4f75\u7528\u304c\u524d\u63d0\u306b\u306a\u308a\u307e\u3059\u304c\u3001CPU\u30b9\u30ec\u30c3\u30c9\u304cGPU\u3078\u30c7\u30fc\u30bf\u3092\u4f9b\u7d66\u3059\u308b\u30b9\u30eb\u30fc\u30d7\u30c3\u30c8\u306fGPU\u306e\u51e6\u7406\u80fd\u529b\u3088\u308a\u3082\u305a\u3063\u3068\u4f4e\u3044\u305f\u3081\u3001\u901a\u5e38\u3001\u3053\u308c\u306f\u554f\u984c\u3068\u306f\u306a\u308a\u307e\u305b\u3093\u3002\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u8a2d\u8a08\u306e\u30b7\u30f3\u30d7\u30eb\u5316\u3092\u512a\u5148\u3057\u307e\u3057\u305f\u3002 Pascal\u4e16\u4ee3\u4ee5\u964d\u306eGPU\u3067\u63a1\u7528\u3055\u308c\u305fGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u30c7\u30de\u30f3\u30c9\u30da\u30fc\u30b8\u30f3\u30b0\u3092\u307b\u307c\u5168\u9762\u7684\u306b\u63a1\u7528\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u591a\u304f\u306f\u5b9f\u969b\u306b\u5b9f\u884c\u3057\u3066\u307f\u308b\u307e\u3067\u5fc5\u8981\u306a\u7d50\u679c\u30d0\u30c3\u30d5\u30a1\u306e\u5927\u304d\u3055\u304c\u5206\u304b\u3089\u306a\u3044\u305f\u3081\u3001\u3053\u308c\u307e\u3067\u306f\u5fc5\u8981\u4ee5\u4e0a\u306b\u30d0\u30c3\u30d5\u30a1\u3092\u7372\u5f97\u3057\u3001\u307e\u305f\u30e1\u30e2\u30ea\u4e0d\u8db3\u6642\u306b\u306f\u518d\u5b9f\u884c\u3092\u884c\u3063\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u3053\u308c\u3089\u306f\u540c\u6642\u5b9f\u884c\u30d7\u30ed\u30bb\u30b9\u306e\u5229\u7528\u53ef\u80fd\u306a\u30ea\u30bd\u30fc\u30b9\u3092\u5236\u9650\u3057\u3001\u307e\u305f\u8907\u96d1\u306a\u4f8b\u5916\u30ed\u30b8\u30c3\u30af\u306f\u30d0\u30b0\u306e\u6e29\u5e8a\u3067\u3057\u305f\u3002GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u30c7\u30de\u30f3\u30c9\u30da\u30fc\u30b8\u30f3\u30b0\u3092\u5229\u7528\u3059\u308b\u4e8b\u3067\u3001\u8a2d\u8a08\u306e\u30b7\u30f3\u30d7\u30eb\u5316\u3092\u884c\u3044\u307e\u3057\u305f\u3002 CUDA\u306e\u975e\u540c\u671f\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306e\u5229\u7528\u3092\u6b62\u3081\u307e\u3057\u305f\u3002GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u30c7\u30de\u30f3\u30c9\u30da\u30fc\u30b8\u30f3\u30b0\u3092\u5229\u7528\u3059\u308b\u3068\u3001DMA\u8ee2\u9001\u306e\u305f\u3081\u306e\u975e\u540c\u671fAPI\uff08 cuMemCpyHtoD \u306a\u3069\uff09\u306f\u540c\u671f\u7684\u306b\u632f\u821e\u3046\u3088\u3046\u306b\u306a\u308b\u305f\u3081\u3001GPU\u30ab\u30fc\u30cd\u30eb\u306e\u591a\u91cd\u5ea6\u304c\u4f4e\u4e0b\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u4ee3\u308f\u308a\u306bPG-Strom\u81ea\u8eab\u304c\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u3092\u7ba1\u7406\u3057\u3001\u3053\u308c\u3089\u306e\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u304c\u305d\u308c\u305e\u308c\u540c\u671fAPI\u3092\u547c\u3073\u51fa\u3059\u3088\u3046\u8a2d\u8a08\u5909\u66f4\u3092\u884c\u3044\u307e\u3057\u305f\u3002\u526f\u7523\u7269\u3068\u3057\u3066\u3001\u975e\u540c\u671f\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\uff08 cuStreamAddCallback \uff09\u3092\u5229\u7528\u3059\u308b\u5fc5\u8981\u304c\u306a\u304f\u306a\u3063\u305f\u306e\u3067\u3001MPS\u3092\u5229\u7528\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002 CPU+GPU\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u4e26\u5217\u5b9f\u884c PostgreSQL v9.6\u3067\u65b0\u305f\u306b\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u305fCPU\u4e26\u5217\u5b9f\u884c\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 PG-Strom\u306e\u63d0\u4f9b\u3059\u308bGpuScan\u3001GpuJoin\u304a\u3088\u3073GpuPreAgg\u306e\u5404\u30ed\u30b8\u30c3\u30af\u306f\u8907\u6570\u306ePostgreSQL\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\u306b\u3088\u308a\u4e26\u5217\u306b\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 PostgreSQL v9.6\u3067\u306fCPU\u4e26\u5217\u5b9f\u884c\u306e\u969b\u306b EXPLAIN ANALYZE \u3067\u53d6\u5f97\u3059\u308bPG-Strom\u72ec\u81ea\u306e\u7d71\u8a08\u60c5\u5831\u304c\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002\u3053\u308c\u306f\u3001CustomScan\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9API\u3067 ShutdownCustomScan \u304c\u63d0\u4f9b\u3055\u308c\u3066\u3044\u306a\u304b\u3063\u305f\u305f\u3081\u3001DSM\uff08\u52d5\u7684\u5171\u6709\u30e1\u30e2\u30ea\uff09\u306e\u89e3\u653e\u524d\u306b\u30b3\u30fc\u30c7\u30a3\u30cd\u30fc\u30bf\u30d7\u30ed\u30bb\u30b9\u304c\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\u306e\u60c5\u5831\u3092\u56de\u53ce\u3059\u308b\u624b\u6bb5\u304c\u7121\u304b\u3063\u305f\u305f\u3081\u3067\u3059\u3002 SSD-to-GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c Linux\u30ab\u30fc\u30cd\u30eb\u30e2\u30b8\u30e5\u30fc\u30eb nvme_strom \u3092\u7528\u3044\u308b\u4e8b\u3067\u3001NVMe\u898f\u683c\u306b\u5bfe\u5fdc\u3057\u305fSSD\u4e0a\u306ePostgreSQL\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u3092\u3001CPU/RAM\u3092\u4ecb\u3055\u305a\u30c0\u30a4\u30ec\u30af\u30c8\u306bGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u3078\u8ee2\u9001\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002\u30b7\u30b9\u30c6\u30e0RAM\u306b\u8f09\u308a\u5207\u3089\u306a\u3044\u5927\u304d\u3055\u306e\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u5834\u5408\u3067\u3042\u3063\u3066\u3082\u3001\u672c\u6a5f\u80fd\u306b\u3088\u308aPG-Strom\u306e\u9069\u7528\u304c\u73fe\u5b9f\u7684\u306a\u9078\u629e\u80a2\u3068\u306a\u308b\u4e8b\u3067\u3057\u3087\u3046\u3002 \u30d6\u30ed\u30c3\u30af\u30c7\u30d0\u30a4\u30b9\u5c64\u3084\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3092\u7d4c\u7531\u3057\u306a\u3044\u305f\u3081\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u9650\u754c\u306b\u8fd1\u3044\u9ad8\u30b9\u30eb\u30fc\u30d7\u30c3\u30c8\u3092\u5f15\u304d\u51fa\u3059\u4e8b\u304c\u53ef\u80fd\u3067\u3001\u304b\u3064\u3001GPU\u3067SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u51e6\u7406\u3059\u308b\u305f\u3081CPU\u306e\u51e6\u7406\u3059\u3079\u304d\u30c7\u30fc\u30bf\u91cf\u3092\u6e1b\u3089\u3059\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306a\u7279\u6027\u306e\u7d44\u307f\u5408\u308f\u305b\u306b\u3088\u308a\u3001\u4e00\u822c\u7684\u306b\u306f\u8a08\u7b97\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u30a2\u30af\u30bb\u30e9\u30ec\u30fc\u30bf\u3068\u3057\u3066\u8a8d\u8b58\u3055\u308c\u3066\u3044\u308bGPU\u3092\u3001I/O\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u9ad8\u901f\u5316\u306b\u9069\u7528\u3059\u308b\u4e8b\u306b\u6210\u529f\u3057\u307e\u3057\u305f\u3002 \u30a4\u30f3\u30e1\u30e2\u30ea\u5217\u6307\u5411\u30ad\u30e3\u30c3\u30b7\u30e5 RAM\u30b5\u30a4\u30ba\u306b\u8f09\u308b\u7a0b\u5ea6\u306e\u5927\u304d\u3055\u306e\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u306f\u3001\u3088\u308aGPU\u3067\u306e\u51e6\u7406\u306b\u9069\u3057\u305f\u5217\u30c7\u30fc\u30bf\u5f62\u5f0f\u306b\u5909\u5f62\u3057\u3066\u30ad\u30e3\u30c3\u30b7\u30e5\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u306b\u969b\u3057\u3066\u3001\u5217\u6307\u5411\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u306b\u306fPostgreSQL\u306e\u5171\u6709\u30d0\u30c3\u30d5\u30a1\u3088\u308a\u3082\u3053\u3061\u3089\u3092\u512a\u5148\u3057\u3066\u53c2\u7167\u3057\u307e\u3059\u3002 \u30a4\u30f3\u30e1\u30e2\u30ea\u5217\u6307\u5411\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u540c\u671f\u7684\u3001\u307e\u305f\u306f\u975e\u540c\u671f\u7684\u306b\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u3067\u69cb\u7bc9\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 \u521d\u671f\u306ePG-Strom\u3067\u4f3c\u305f\u3088\u3046\u306a\u6a5f\u80fd\u304c\u5b58\u5728\u3057\u3066\u3044\u305f\u4e8b\u3092\u899a\u3048\u3066\u304a\u3089\u308c\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002v2.0\u3067\u65b0\u305f\u306b\u5b9f\u88c5\u3055\u308c\u305f\u5217\u6307\u5411\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u3055\u308c\u305f\u884c\u304c\u66f4\u65b0\u3055\u308c\u308b\u3068\u3001\u5f53\u8a72\u884c\u3092\u542b\u3080\u30ad\u30e3\u30c3\u30b7\u30e5\u30d6\u30ed\u30c3\u30af\u3092\u6d88\u53bb\uff08invalidation\uff09\u3057\u307e\u3059\u3002\u884c\u30b9\u30c8\u30a2\u306e\u66f4\u65b0\u306b\u5408\u308f\u305b\u3066\u5217\u30ad\u30e3\u30c3\u30b7\u30e5\u5074\u306e\u66f4\u65b0\u3092\u884c\u3046\u3068\u3044\u3046\u4e8b\u306f\u884c\u308f\u306a\u3044\u305f\u3081\u3001\u66f4\u65b0\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u5bfe\u3059\u308b\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u4f4e\u4e0b\u306f\u9650\u5b9a\u7684\u3067\u3059\u3002 GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2(gstore_fdw) GPU\u4e0a\u306b\u78ba\u4fdd\u3057\u305f\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u9818\u57df\u306b\u5bfe\u3057\u3066\u3001\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\uff08Foreign Table\uff09\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u5229\u7528\u3057\u3066SQL\u306eSELECT/INSERT/UPDATE/DELETE\u306b\u3088\u308a\u8aad\u307f\u66f8\u304d\u3092\u884c\u3046\u6a5f\u80fd\u3067\u3059\u3002 \u5185\u90e8\u30c7\u30fc\u30bf\u5f62\u5f0f\u306f pgstrom \u578b\u306e\u307f\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u3001PG-Strom\u306e\u30d0\u30c3\u30d5\u30a1\u5f62\u5f0f KDS_FORMAT_COLUMN \u30bf\u30a4\u30d7\u3068\u540c\u4e00\u306e\u5f62\u5f0f\u3067\u30c7\u30fc\u30bf\u3092\u4fdd\u6301\u3059\u308b\u3082\u306e\u3067\u3059\u3002\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308b\u5834\u5408\u3001LZ\u65b9\u5f0f\u306b\u3088\u308b\u30c7\u30fc\u30bf\u5727\u7e2e\u3092\u884c\u3046\u4e8b\u3082\u53ef\u80fd\u3067\u3059\u3002 v2.0\u306e\u6642\u70b9\u3067\u306f\u3001GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2\u306fPL/CUDA\u95a2\u6570\u306e\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3068\u3057\u3066\u3060\u3051\u5229\u7528\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 GpuJoin\u3068GpuPreAgg\u306e\u518d\u8a2d\u8a08\u306b\u4f34\u3046\u9ad8\u901f\u5316 \u5f93\u6765\u3001GpuJoin\u3068GpuPreAgg\u3067\u5185\u90e8\u7684\u306b\u4f7f\u7528\u3057\u3066\u3044\u305fDynamic Parallelism\u306e\u5229\u7528\u3092\u3084\u3081\u3001\u51e6\u7406\u30ed\u30b8\u30c3\u30af\u5168\u4f53\u306e\u898b\u76f4\u3057\u3092\u884c\u3044\u307e\u3057\u305f\u3002\u3053\u308c\u306f\u3001GPU\u30b5\u30d6\u30ab\u30fc\u30cd\u30eb\u306e\u8d77\u52d5\u5f8c\u3001\u305d\u306e\u5b8c\u4e86\u3092\u5358\u306b\u5f85\u3063\u3066\u3044\u308b\u3060\u3051\u306eGPU\u30ab\u30fc\u30cd\u30eb\u304c\u5b9f\u884c\u30b9\u30ed\u30c3\u30c8\u3092\u5360\u6709\u3057\u3001GPU\u306e\u4f7f\u7528\u7387\u304c\u4e0a\u304c\u3089\u306a\u3044\u3068\u3044\u3046\u554f\u984c\u304c\u3042\u3063\u305f\u305f\u3081\u3067\u3059\u3002 \u3053\u306e\u518d\u8a2d\u8a08\u306b\u4f34\u3046\u526f\u7523\u7269\u3068\u3057\u3066\u3001GpuJoin\u306e\u30b5\u30b9\u30da\u30f3\u30c9/\u30ec\u30b8\u30e5\u30fc\u30e0\u6a5f\u80fd\u304c\u5b9f\u88c5\u3055\u308c\u307e\u3057\u305f\u3002\u539f\u7406\u4e0a\u3001SQL\u306eJOIN\u51e6\u7406\u306f\u5165\u529b\u3057\u305f\u884c\u6570\u3088\u308a\u3082\u51fa\u529b\u3059\u308b\u884c\u6570\u306e\u65b9\u304c\u5897\u3048\u3066\u3057\u307e\u3046\u4e8b\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u51e6\u7406\u7d50\u679c\u3092\u66f8\u304d\u8fbc\u3080\u30d0\u30c3\u30d5\u30a1\u306e\u6b8b\u308a\u30b5\u30a4\u30ba\u304c\u4e0d\u8db3\u3057\u305f\u6642\u70b9\u3067GpuJoin\u3092\u30b5\u30b9\u30da\u30f3\u30c9\u3057\u3001\u65b0\u3057\u3044\u7d50\u679c\u30d0\u30c3\u30d5\u30a1\u3092\u5272\u308a\u5f53\u3066\u3066\u30ec\u30b8\u30e5\u30fc\u30e0\u3059\u308b\u3088\u3046\u306b\u4fee\u6b63\u3055\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u7d50\u679c\u30d0\u30c3\u30d5\u30a1\u306e\u30b5\u30a4\u30ba\u63a8\u5b9a\u304c\u7c21\u7565\u5316\u3055\u308c\u305f\u307b\u304b\u3001\u5b9f\u884c\u6642\u306e\u30d0\u30c3\u30d5\u30a1\u4e0d\u8db3\u306b\u3088\u308b\u518d\u5b9f\u884c\u306e\u5fc5\u8981\u304c\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002 GpuPreAgg+GpuJoin+GpuScan \u5bc6\u7d50\u5408GPU\u30ab\u30fc\u30cd\u30eb GPU\u3067\u5b9f\u884c\u53ef\u80fd\u306aSCAN\u3001JOIN\u3001GROUP BY\u304c\u9023\u7d9a\u3057\u3066\u3044\u308b\u3068\u304d\u3001\u5bfe\u5fdc\u3059\u308bGpuScan\u3001GpuJoin\u3001GpuPreAgg\u306b\u76f8\u5f53\u3059\u308b\u51e6\u7406\u3092\u4e00\u56de\u306eGPU\u30ab\u30fc\u30cd\u30eb\u547c\u3073\u51fa\u3057\u3067\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u3053\u308c\u306f\u3001GpuJoin\u306e\u7d50\u679c\u30d0\u30c3\u30d5\u30a1\u3092\u305d\u306e\u307e\u307eGpuPreAgg\u306e\u5165\u529b\u30d0\u30c3\u30d5\u30a1\u3068\u3057\u3066\u6271\u3046\u306a\u3069\u3001CPU\u3068GPU\u306e\u9593\u306e\u30c7\u30fc\u30bf\u4ea4\u63db\u3092\u6700\u5c0f\u9650\u306b\u6291\u3048\u308b\u305f\u3081\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u3067\u3059\u3002 \u3053\u306e\u6a5f\u80fd\u306f\u7279\u306b\u3001SSD-to-GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u4f7f\u7528\u3059\u308b\u3068\u52b9\u679c\u7684\u3067\u3059\u3002 \u65b0\u3057\u3044\u30c7\u30fc\u30bf\u578b\u306e\u5bfe\u5fdc uuid \u578b\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u578b\uff08 inet \u3001 cidr \u3001\u304a\u3088\u3073 macaddr \uff09\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u7bc4\u56f2\u578b\uff08 int4range \u3001 int8range \u3001 tsrange \u3001 tstzrange \u3001 daterange \uff09\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u534a\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\uff08 float2 \uff09\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002\u534a\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u306b\u95a2\u9023\u3059\u308bCPU\u5074\u306e\u5b9f\u88c5\u306fPG-Strom\u306e\u72ec\u81ea\u5b9f\u88c5\u306b\u3088\u308b\u3082\u306e\u3067\u3059\u3002 \u65b0\u3057\u3044\u6f14\u7b97\u5b50/\u95a2\u6570\u306e\u5bfe\u5fdc \u65e5\u4ed8\u6642\u523b\u578b\u306b\u5bfe\u3059\u308b EXTRACT(field FROM timestamp) \u6f14\u7b97\u5b50\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 New data type support uuid type Network address types ( inet , cidr and macaddr ) Range data types ( int4range , int8range , tsrange , tstzrange , daterange ) Half-precision floating point type ( float2 ). Its CPU side are also implemented by PG-Strom itself, not PostgreSQL's built-in feature. New operators / functions EXTRACT(field FROM timestamp) operator on the date and time types PL/CUDA\u95a2\u9023\u306e\u5f37\u5316 #plcuda_include \u306e\u62e1\u5f35\u306b\u3088\u308a\u3001 text \u578b\u3092\u8fd4\u3059SQL\u95a2\u6570\u3092\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u5f15\u6570\u306e\u5024\u306b\u3088\u3063\u3066\u633f\u5165\u3059\u308b\u30b3\u30fc\u30c9\u3092\u5909\u3048\u308b\u4e8b\u304c\u3067\u304d\u308b\u305f\u3081\u3001\u5358\u306b\u5916\u90e8\u5b9a\u7fa9\u95a2\u6570\u3092\u8aad\u307f\u8fbc\u3080\u3060\u3051\u3067\u306a\u304f\u3001\u52d5\u7684\u306b\u3044\u304f\u3064\u3082\u306eGPU\u30ab\u30fc\u30cd\u30eb\u306e\u30d0\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u308a\u51fa\u3059\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002 PL/CUDA\u95a2\u6570\u306e\u5f15\u6570\u306b reggstore \u578b\u3092\u6307\u5b9a\u3057\u305f\u5834\u5408\u3001GPU\u30ab\u30fc\u30cd\u30eb\u95a2\u6570\u3078\u306f\u5bfe\u5fdc\u3059\u308bGPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2\u306e\u30dd\u30a4\u30f3\u30bf\u304c\u6e21\u3055\u308c\u307e\u3059\u3002OID\u5024\u304c\u6e21\u3055\u308c\u308b\u308f\u3051\u3067\u306f\u306a\u3044\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u305d\u306e\u4ed6\u306e\u6a5f\u80fd\u5f37\u5316 lo_import_gpu \u304a\u3088\u3073 lo_export_gpu \u95a2\u6570\u306b\u3088\u308a\u3001\u5916\u90e8\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u78ba\u4fdd\u3057\u305fGPU\u30e1\u30e2\u30ea\u306e\u5185\u5bb9\u3092\u76f4\u63a5PostgreSQL\u306e\u30e9\u30fc\u30b8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u8a18\u9332\u3057\u305f\u308a\u3001\u9006\u306b\u30e9\u30fc\u30b8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5185\u5bb9\u3092GPU\u30e1\u30e2\u30ea\u306b\u66f8\u304d\u51fa\u3059\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 \u30d1\u30c3\u30b1\u30fc\u30b8\u30f3\u30b0 PostgreSQL Global Development Group\u306e\u914d\u5e03\u3059\u308bPostgreSQL\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u9069\u5408\u3059\u308b\u3088\u3046\u3001RPM\u30d1\u30c3\u30b1\u30fc\u30b8\u5316\u3092\u884c\u3044\u307e\u3057\u305f\u3002 \u5168\u3066\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u7269\u4ef6\u306fHeteroDB SWDC(Software Distribution Center)\u3088\u308a\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u304c\u53ef\u80fd\u3067\u3059\u3002 \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8 PG-Strom\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092markdown\u3068mkdocs\u3092\u7528\u3044\u3066\u5168\u9762\u7684\u306b\u66f8\u304d\u76f4\u3057\u307e\u3057\u305f\u3002\u5f93\u6765\u306eHTML\u3092\u7528\u3044\u305f\u30a2\u30d7\u30ed\u30fc\u30c1\u306b\u6bd4\u3079\u3001\u3088\u308a\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u304c\u5bb9\u6613\u3067\u65b0\u6a5f\u80fd\u306e\u958b\u767a\u306b\u5408\u308f\u305b\u305f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u62e1\u5145\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059\u3002 \u30c6\u30b9\u30c8 PostgreSQL\u306e\u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u4f7f\u7528\u3057\u3066\u3001PG-Strom\u306e\u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002","title":"\u65b0\u6a5f\u80fd"},{"location":"release_v2.0/#_4","text":"PostgreSQL v9.5\u30b5\u30dd\u30fc\u30c8 PostgreSQL v9.6\u3067\u306fCPU\u4e26\u5217\u30af\u30a8\u30ea\u306e\u63d0\u4f9b\u306b\u4f34\u3044\u3001\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6/\u30a8\u30b0\u30bc\u30ad\u30e5\u30fc\u30bf\u5171\u306b\u5927\u304d\u306a\u4fee\u6b63\u304c\u52a0\u3048\u3089\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u3089\u3068\u5bc6\u63a5\u306b\u9023\u643a\u3059\u308b\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u3068\u3063\u3066\u6700\u3082\u30a4\u30f3\u30d1\u30af\u30c8\u306e\u5927\u304d\u306a\u5909\u66f4\u306f\u300eupper planner path-ification\u300f\u3068\u547c\u3070\u308c\u308b\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306e\u5f37\u5316\u3067\u3001\u96c6\u7d04\u6f14\u7b97\u3084\u30bd\u30fc\u30c8\u306a\u3069\u306e\u5b9f\u884c\u8a08\u753b\u3082\u30b3\u30b9\u30c8\u30d9\u30fc\u30b9\u3067\u8907\u6570\u306e\u7570\u306a\u308b\u65b9\u6cd5\u3092\u6bd4\u8f03\u3057\u3066\u6700\u9069\u306a\u3082\u306e\u3092\u9078\u629e\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u3053\u308c\u306fGpuPreAgg\u3092\u5b9f\u88c5\u3059\u308b\u305f\u3081\u306b\u30d5\u30c3\u30af\u3092\u5229\u7528\u3057\u3066\u5b9f\u884c\u8a08\u753b\u3092\u66f8\u304d\u63db\u3048\u3066\u3044\u305f\u5f93\u6765\u306e\u65b9\u6cd5\u3068\u306f\u6839\u672c\u7684\u306b\u7570\u306a\u308a\u3001\u3088\u308a\u5408\u7406\u7684\u304b\u3064\u4fe1\u983c\u3067\u304d\u308b\u65b9\u6cd5\u3067GPU\u3092\u7528\u3044\u305f\u96c6\u7d04\u6f14\u7b97\u3092\u633f\u5165\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u3001\u30d0\u30b0\u306e\u6e29\u5e8a\u3067\u3042\u3063\u305f\u5b9f\u884c\u8a08\u753b\u306e\u66f8\u304d\u63db\u3048\u30ed\u30b8\u30c3\u30af\u3092\u6368\u3066\u308b\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u540c\u6642\u306b\u3001CustomScan\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306b\u3082CPU\u4e26\u5217\u306b\u5bfe\u5fdc\u3059\u308b\u305f\u3081\u306eAPI\u304c\u62e1\u5f35\u3055\u308c\u3001\u3053\u308c\u3089\u306b\u5bfe\u5fdc\u3059\u308b\u305f\u3081\u306bPostgreSQL v9.5\u30b5\u30dd\u30fc\u30c8\u306f\u5ec3\u6b62\u3055\u308c\u307e\u3057\u305f\u3002 GpuSort\u6a5f\u80fd GpuSort\u6a5f\u80fd\u306f\u6027\u80fd\u4e0a\u306e\u30e1\u30ea\u30c3\u30c8\u304c\u5f97\u3089\u308c\u306a\u3044\u305f\u3081\u5ec3\u6b62\u3055\u308c\u307e\u3057\u305f\u3002 \u30bd\u30fc\u30c8\u306fGPU\u306e\u5f97\u610f\u3068\u3059\u308b\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u4e00\u3064\u3067\u3059\u3002\u3057\u304b\u3057\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u5927\u304d\u3055\u3092\u8d8a\u3048\u308b\u30b5\u30a4\u30ba\u306e\u30c7\u30fc\u30bf\u3092\u30bd\u30fc\u30c8\u3059\u308b\u5834\u5408\u3001\u8907\u6570\u306e\u30c1\u30e3\u30f3\u30af\u306b\u5206\u5272\u3057\u3066\u90e8\u5206\u30bd\u30fc\u30c8\u3092\u884c\u3044\u3001\u5f8c\u3067CPU\u5074\u3067\u3053\u308c\u3092\u7d50\u5408\u3057\u3066\u6700\u7d42\u7d50\u679c\u3092\u51fa\u529b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u7d50\u5408\u30d5\u30a7\u30fc\u30ba\u306e\u51e6\u7406\u3092\u8efd\u304f\u3059\u308b\u306b\u306f\u3001GPU\u3067\u30bd\u30fc\u30c8\u3059\u3079\u304d\u30c1\u30e3\u30f3\u30af\u306e\u30b5\u30a4\u30ba\u3092\u5927\u304d\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u4e00\u65b9\u3067\u30c1\u30e3\u30f3\u30af\u30b5\u30a4\u30ba\u304c\u5927\u304d\u304f\u306a\u308b\u3068\u30bd\u30fc\u30c8\u51e6\u7406\u3092\u958b\u59cb\u3059\u308b\u305f\u3081\u306e\u30ea\u30fc\u30c9\u30bf\u30a4\u30e0\u304c\u9577\u304f\u306a\u308a\u3001PG-Strom\u306e\u7279\u9577\u306e\u4e00\u3064\u3067\u3042\u308b\u975e\u540c\u671f\u51e6\u7406\u306b\u3088\u308b\u30c7\u30fc\u30bf\u8ee2\u9001\u30ec\u30a4\u30c6\u30f3\u30b7\u306e\u96a0\u307a\u3044\u304c\u52b9\u304b\u306a\u304f\u306a\u308b\u3068\u3044\u3046\u30c8\u30ec\u30fc\u30c9\u30aa\u30d5\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u554f\u984c\u306b\u5bfe\u51e6\u3059\u308b\u306e\u306f\u56f0\u96e3\u3001\u5c11\u306a\u304f\u3068\u3082\u6642\u671f\u5c1a\u65e9\u3067\u3042\u308b\u3068\u5224\u65ad\u3057\u3001GpuSort\u6a5f\u80fd\u306f\u5ec3\u6b62\u3055\u308c\u307e\u3057\u305f\u3002","title":"\u5ec3\u6b62\u3055\u308c\u305f\u6a5f\u80fd"},{"location":"release_v2.2/","text":"PG-Strom v2.2\u30ea\u30ea\u30fc\u30b9 PG-Strom Development Team (1-May-2019) \u6982\u8981 PG-Strom v2.2\u306b\u304a\u3051\u308b\u4e3b\u8981\u306a\u6a5f\u80fd\u5f37\u5316\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 \u30c6\u30fc\u30d6\u30eb\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3078\u306e\u5bfe\u5fdc Arrow_Fdw\u306b\u3088\u308b\u5217\u6307\u5411\u30b9\u30c8\u30a2\u306e\u30b5\u30dd\u30fc\u30c8 \u30d3\u30eb\u30c9\u6e08\u307fGPU\u30d0\u30a4\u30ca\u30ea\u3078\u306e\u5bfe\u5fdc Jsonb\u30c7\u30fc\u30bf\u578b\u306e\u5bfe\u5fdc \u53ef\u5909\u9577\u30c7\u30fc\u30bf\u578b\u3092\u8fd4\u3059GPU\u95a2\u6570\u306e\u5bfe\u5fdc GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2\uff08Gstore_Fdw\uff09\u306e\u30bd\u30fc\u30c8\u5bfe\u5fdc NVMEoF\u3078\u306e\u5bfe\u5fdc\uff08\u5b9f\u9a13\u7684\u6a5f\u80fd\uff09 \u52d5\u4f5c\u74b0\u5883 PostgreSQL v9.6, v10, v11 CUDA Toolkit 10.1 CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3 Intel x86 64bit \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3(x86_64) NVIDIA GPU CC 6.0 \u4ee5\u964d (Pascal\u4ee5\u964d) \u65b0\u6a5f\u80fd \u30c6\u30fc\u30d6\u30eb\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3078\u306e\u5bfe\u5fdc \u30de\u30eb\u30c1GPU\u69cb\u6210\u306e\u5834\u5408\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3092\u69cb\u6210\u3059\u308b\u5b50\u30c6\u30fc\u30d6\u30eb\u306e\u7269\u7406\u7684\u306aGPU\u3068\u306e\u8ddd\u96e2\u306b\u5fdc\u3058\u3066\u6700\u9069\u306aGPU\u3092\u9078\u629e\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002NVME-oF\u74b0\u5883\u306a\u3069PCIe\u30d0\u30b9\u306e\u69cb\u6210\u3060\u3051\u3067\u306f\u6700\u9069\u8ddd\u96e2\u3092\u5224\u65ad\u3067\u304d\u306a\u3044\u5834\u5408\u306f\u3001DB\u7ba1\u7406\u8005\u306f pg_strom.nvme_distance_map \u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u7528\u3044\u3066\u5bfe\u5fdc\u95a2\u4fc2\u3092\u8a2d\u5b9a\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u975e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u3068\u306eJOIN\u6642\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u3068\u975e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u3068\u306eJOIN\u3092\u884c\u3063\u305f\u5f8c\u3001\u5404\u5b50\u30c6\u30fc\u30d6\u30eb\u306e\u51e6\u7406\u7d50\u679c\u3092\u7d50\u5408\u3059\u308b\u3088\u3046\u306a\u5b9f\u884c\u8a08\u753b\u3092\u751f\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u672c\u6a5f\u80fd\u306f Asymmetric Partition-wise JOIN \u3068\u3044\u3046\u540d\u79f0\u3067PostgreSQL v13\u306e\u672c\u4f53\u6a5f\u80fd\u3078\u3068\u63d0\u6848\u3055\u308c\u3066\u3044\u307e\u3059\u3002 Arrow_Fdw\u306b\u3088\u308b\u5217\u6307\u5411\u30b9\u30c8\u30a2\u306e\u30b5\u30dd\u30fc\u30c8 \u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u7d4c\u7531\u3067Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u51fa\u3057\u306b\u5bfe\u5fdc\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 SSD-to-GPU Direct SQL\u3092\u7528\u3044\u305fApache Arrow\u306e\u8aad\u307f\u51fa\u3057\u3068SQL\u5b9f\u884c\u306b\u3082\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002 \u30d3\u30eb\u30c9\u6e08\u307fGPU\u30d0\u30a4\u30ca\u30ea\u3078\u306e\u5bfe\u5fdc SQL\u304b\u3089GPU\u30d0\u30a4\u30ca\u30ea\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3059\u308b\u969b\u3001\u5f93\u6765\u306f\u52d5\u7684\u306b\u5909\u66f4\u3059\u308b\u8981\u7d20\u306e\u306a\u3044\u95a2\u6570\u7fa4\uff08\u30e9\u30a4\u30d6\u30e9\u30ea\u95a2\u6570\u306b\u9177\u4f3c\uff09\u3082\u542b\u3081\u3066CUDA C\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3057\u3001\u305d\u308c\u3092NVRTC(NVIDIA Run-Time Compiler)\u3092\u7528\u3044\u3066\u30d3\u30eb\u30c9\u3057\u3066\u3044\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u3001\u4e00\u90e8\u306e\u8907\u96d1\u306a\u95a2\u6570\u306e\u5f71\u97ff\u3067\u30d3\u30eb\u30c9\u6642\u9593\u304c\u6975\u7aef\u306b\u9577\u304f\u306a\u308b\u3068\u3044\u3046\u554f\u984c\u304c\u3042\u308a\u307e\u3057\u305f\u3002 v2.2\u306b\u304a\u3044\u3066\u3001\u9759\u7684\u306a\u95a2\u6570\u7fa4\u306f\u4e8b\u524d\u306b\u30d3\u30eb\u30c9\u3055\u308c\u3001SQL\u304b\u3089\u52d5\u7684\u306b\u751f\u6210\u3059\u308b\u90e8\u5206\u306e\u307f\u3092\u5b9f\u884c\u6642\u306b\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u3088\u3046\u306b\u5909\u66f4\u3055\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001GPU\u30d0\u30a4\u30ca\u30ea\u306e\u751f\u6210\u6642\u9593\u304c\u5927\u5e45\u306b\u6e1b\u5c11\u3059\u308b\u4e8b\u3068\u306a\u308a\u307e\u3057\u305f\u3002 JSONB\u30c7\u30fc\u30bf\u578b\u306e\u5bfe\u5fdc GPU\u5074\u3067JSONB\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5b50\u8981\u7d20\u3092\u53c2\u7167\u3057\u3001 numeric \u3084 text \u5024\u3068\u3057\u3066\u6761\u4ef6\u53e5\u306a\u3069\u3067\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3002 \u53ef\u5909\u9577\u30c7\u30fc\u30bf\u578b\u3092\u8fd4\u3059GPU\u95a2\u6570\u306e\u5bfe\u5fdc textcat \u306a\u3069\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u578b\u3092\u8fd4\u3059SQL\u95a2\u6570\u3092GPU\u5074\u3067\u5b9f\u88c5\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3002 GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2\uff08Gstore_Fdw\uff09\u306e\u30bd\u30fc\u30c8\u5bfe\u5fdc PL/CUDA\u306e\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u4ee5\u5916\u306b\u3001GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u3057\u3066\u5b9f\u884c\u3059\u308bSQL\u3092GPU\u3067\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u5bfe\u5fdc\u3057\u3066\u3044\u308b\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306fGpuScan\u304a\u3088\u3073GpuSort\u306e\uff12\u7a2e\u985e\u3067\u3001JOIN\u304a\u3088\u3073GROUP BY\u306b\u306f\u307e\u3060\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u305b\u3093\u3002 \u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u306e\u8ffd\u52a0 \u7c21\u6613\u306a\u30c6\u30b9\u30c8\u306e\u305f\u3081\u3001\u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002 NVME-oF\u3078\u306e\u5bfe\u5fdc\uff08\u5b9f\u9a13\u7684\u6a5f\u80fd\uff09 NVME-over-Fabric\u3092\u7528\u3044\u3066\u30de\u30a6\u30f3\u30c8\u3055\u308c\u305f\u30ea\u30e2\u30fc\u30c8\u306eNVME\u30c7\u30a3\u30b9\u30af\u304b\u3089\u306eSSD-to-GPU Direct SQL\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002\u305f\u3060\u3057\u3001Red Hat Enterprise Linux 7.x / CentOS 7.x\u3067\u306f nvme_rdma \u30c9\u30e9\u30a4\u30d0\u306e\u5165\u308c\u66ff\u3048\u304c\u5fc5\u8981\u3068\u306a\u308a\u3001\u73fe\u5728\u306e\u3068\u3053\u308d\u5b9f\u9a13\u7684\u6a5f\u80fd\u3068\u3044\u3046\u5f62\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002 \u5c06\u6765\u5ec3\u6b62\u4e88\u5b9a\u306e\u6a5f\u80fd PostgreSQL v9.6\u30b5\u30dd\u30fc\u30c8 PostgreSQL v9.6\u306eCustomScan API\u306b\u306f\u3001\u52d5\u7684\u5171\u6709\u30e1\u30e2\u30ea(DSM)\u306e\u6b63\u3057\u3044\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u306b\u5fc5\u8981\u306a\u5e7e\u3064\u304b\u306eAPI\u304c\u6b20\u3051\u3066\u304a\u308a\u3001\u5b9f\u884c\u6642\u7d71\u8a08\u60c5\u5831\u306e\u63a1\u53d6\u306a\u3069\u304c\u4e0d\u53ef\u80fd\u3067\u3057\u305f\u3002 \u307e\u305f\u3001\u5185\u90e8\u7684\u306b\u5f0f\u8868\u73fe(Expression)\u3092\u4fdd\u6301\u3059\u308b\u305f\u3081\u306e\u65b9\u6cd5\u306b\u3082\u5909\u66f4\u304c\u52a0\u3048\u3089\u308c\u3066\u3044\u308b\u4e8b\u304b\u3089\u3001\u5c11\u306a\u304f\u306a\u3044\u7b87\u6240\u3067 #if ... #endif \u30d6\u30ed\u30c3\u30af\u304c\u5fc5\u8981\u3068\u306a\u308a\u3001\u30b3\u30fc\u30c9\u306e\u4fdd\u5b88\u6027\u3092\u640d\u306a\u3063\u3066\u3044\u307e\u3057\u305f\u3002 \u3053\u308c\u3089\u306e\u554f\u984c\u306b\u3088\u308a\u3001PostgreSQL v9.6\u30b5\u30dd\u30fc\u30c8\u306f\u672c\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u6700\u5f8c\u3068\u306a\u308a\u307e\u3059\u3002PG-Strom\u3092PostgreSQL v9.6\u3067\u304a\u4f7f\u3044\u306e\u5834\u5408\u306f\u3001\u65e9\u671f\u306bPostgreSQL v11\u3078\u3068\u79fb\u884c\u3055\u308c\u308b\u4e8b\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002 Gstore_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306epgstrom\u30d5\u30a9\u30fc\u30de\u30c3\u30c8 GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2\u4e0a\u306e\u30c7\u30fc\u30bf\u5f62\u5f0f\u306f\u3001\u5143\u3005PL/CUDA\u306e\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u3055\u308c\u305f\u72ec\u81ea\u306e\u5217\u5f62\u5f0f\u3067\u3001\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u3084numeric\u30c7\u30fc\u30bf\u578b\u306e\u8868\u73fe\u306fPostgreSQL\u306e\u3082\u306e\u3092\u305d\u306e\u307e\u307e\u5229\u7528\u3057\u3066\u3044\u307e\u3057\u305f\u3002 \u305d\u306e\u5f8c\u3001GPU\u4e0a\u3067\u306e\u30c7\u30fc\u30bf\u4ea4\u63db\u7528\u5171\u901a\u5f62\u5f0f\u3068\u3057\u3066\u3001Apache Arrow\u5f62\u5f0f\u3092\u5143\u306b\u3057\u305fNVIDIA RAPIDS(cuDF)\u304c\u516c\u958b\u3055\u308c\u3001\u591a\u304f\u306e\u6a5f\u68b0\u5b66\u7fd2\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3084Python\u3067\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30b9\u30bf\u30c3\u30af\u306a\u3069\u5bfe\u5fdc\u304c\u5f37\u5316\u3055\u308c\u3064\u3064\u3042\u308a\u307e\u3059\u3002 \u4eca\u5f8c\u3001PG-Strom\u306fGstore_Fdw\u306e\u5185\u90e8\u30c7\u30fc\u30bf\u5f62\u5f0f\u3092cuDF\u3068\u5171\u901a\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u5909\u66f4\u3057\u3001\u3053\u308c\u3089\u6a5f\u68b0\u5b66\u7fd2\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3068\u306e\u76f8\u4e92\u904b\u7528\u6027\u3092\u6539\u5584\u3057\u307e\u3059\u3002\u30b3\u30fc\u30c9\u306e\u4fdd\u5b88\u6027\u3092\u9ad8\u304f\u3059\u308b\u305f\u3081\u3001\u5f93\u6765\u306e\u72ec\u81ea\u30c7\u30fc\u30bf\u5f62\u5f0f\u306f\u5ec3\u6b62\u3068\u306a\u308a\u307e\u3059\u3002 \u5ec3\u6b62\u3055\u308c\u305f\u6a5f\u80fd \u30a4\u30f3\u30e1\u30e2\u30ea\u5217\u30ad\u30e3\u30c3\u30b7\u30e5 \u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3092\u5206\u6790\u3057\u305f\u7d50\u679c\u3001\u591a\u304f\u306e\u30b1\u30fc\u30b9\u3067\u306fArrow_Fdw\u3067\u5341\u5206\u306b\u4ee3\u66ff\u53ef\u80fd\u306a\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3067\u3042\u308b\u4e8b\u304c\u5206\u304b\u308a\u307e\u3057\u305f\u3002\u91cd\u8907\u6a5f\u80fd\u3067\u3042\u308b\u305f\u3081\u3001\u30a4\u30f3\u30e1\u30e2\u30ea\u5217\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u524a\u9664\u3055\u308c\u307e\u3057\u305f\u3002","title":"PG-Strom v2.2"},{"location":"release_v2.2/#pg-strom-v22","text":"PG-Strom Development Team (1-May-2019)","title":"PG-Strom v2.2\u30ea\u30ea\u30fc\u30b9"},{"location":"release_v2.2/#_1","text":"PG-Strom v2.2\u306b\u304a\u3051\u308b\u4e3b\u8981\u306a\u6a5f\u80fd\u5f37\u5316\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 \u30c6\u30fc\u30d6\u30eb\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3078\u306e\u5bfe\u5fdc Arrow_Fdw\u306b\u3088\u308b\u5217\u6307\u5411\u30b9\u30c8\u30a2\u306e\u30b5\u30dd\u30fc\u30c8 \u30d3\u30eb\u30c9\u6e08\u307fGPU\u30d0\u30a4\u30ca\u30ea\u3078\u306e\u5bfe\u5fdc Jsonb\u30c7\u30fc\u30bf\u578b\u306e\u5bfe\u5fdc \u53ef\u5909\u9577\u30c7\u30fc\u30bf\u578b\u3092\u8fd4\u3059GPU\u95a2\u6570\u306e\u5bfe\u5fdc GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2\uff08Gstore_Fdw\uff09\u306e\u30bd\u30fc\u30c8\u5bfe\u5fdc NVMEoF\u3078\u306e\u5bfe\u5fdc\uff08\u5b9f\u9a13\u7684\u6a5f\u80fd\uff09","title":"\u6982\u8981"},{"location":"release_v2.2/#_2","text":"PostgreSQL v9.6, v10, v11 CUDA Toolkit 10.1 CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3 Intel x86 64bit \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3(x86_64) NVIDIA GPU CC 6.0 \u4ee5\u964d (Pascal\u4ee5\u964d)","title":"\u52d5\u4f5c\u74b0\u5883"},{"location":"release_v2.2/#_3","text":"\u30c6\u30fc\u30d6\u30eb\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3078\u306e\u5bfe\u5fdc \u30de\u30eb\u30c1GPU\u69cb\u6210\u306e\u5834\u5408\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3092\u69cb\u6210\u3059\u308b\u5b50\u30c6\u30fc\u30d6\u30eb\u306e\u7269\u7406\u7684\u306aGPU\u3068\u306e\u8ddd\u96e2\u306b\u5fdc\u3058\u3066\u6700\u9069\u306aGPU\u3092\u9078\u629e\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002NVME-oF\u74b0\u5883\u306a\u3069PCIe\u30d0\u30b9\u306e\u69cb\u6210\u3060\u3051\u3067\u306f\u6700\u9069\u8ddd\u96e2\u3092\u5224\u65ad\u3067\u304d\u306a\u3044\u5834\u5408\u306f\u3001DB\u7ba1\u7406\u8005\u306f pg_strom.nvme_distance_map \u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u7528\u3044\u3066\u5bfe\u5fdc\u95a2\u4fc2\u3092\u8a2d\u5b9a\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u975e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u3068\u306eJOIN\u6642\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u3068\u975e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u3068\u306eJOIN\u3092\u884c\u3063\u305f\u5f8c\u3001\u5404\u5b50\u30c6\u30fc\u30d6\u30eb\u306e\u51e6\u7406\u7d50\u679c\u3092\u7d50\u5408\u3059\u308b\u3088\u3046\u306a\u5b9f\u884c\u8a08\u753b\u3092\u751f\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u672c\u6a5f\u80fd\u306f Asymmetric Partition-wise JOIN \u3068\u3044\u3046\u540d\u79f0\u3067PostgreSQL v13\u306e\u672c\u4f53\u6a5f\u80fd\u3078\u3068\u63d0\u6848\u3055\u308c\u3066\u3044\u307e\u3059\u3002 Arrow_Fdw\u306b\u3088\u308b\u5217\u6307\u5411\u30b9\u30c8\u30a2\u306e\u30b5\u30dd\u30fc\u30c8 \u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u7d4c\u7531\u3067Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u51fa\u3057\u306b\u5bfe\u5fdc\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 SSD-to-GPU Direct SQL\u3092\u7528\u3044\u305fApache Arrow\u306e\u8aad\u307f\u51fa\u3057\u3068SQL\u5b9f\u884c\u306b\u3082\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002 \u30d3\u30eb\u30c9\u6e08\u307fGPU\u30d0\u30a4\u30ca\u30ea\u3078\u306e\u5bfe\u5fdc SQL\u304b\u3089GPU\u30d0\u30a4\u30ca\u30ea\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3059\u308b\u969b\u3001\u5f93\u6765\u306f\u52d5\u7684\u306b\u5909\u66f4\u3059\u308b\u8981\u7d20\u306e\u306a\u3044\u95a2\u6570\u7fa4\uff08\u30e9\u30a4\u30d6\u30e9\u30ea\u95a2\u6570\u306b\u9177\u4f3c\uff09\u3082\u542b\u3081\u3066CUDA C\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3057\u3001\u305d\u308c\u3092NVRTC(NVIDIA Run-Time Compiler)\u3092\u7528\u3044\u3066\u30d3\u30eb\u30c9\u3057\u3066\u3044\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u3001\u4e00\u90e8\u306e\u8907\u96d1\u306a\u95a2\u6570\u306e\u5f71\u97ff\u3067\u30d3\u30eb\u30c9\u6642\u9593\u304c\u6975\u7aef\u306b\u9577\u304f\u306a\u308b\u3068\u3044\u3046\u554f\u984c\u304c\u3042\u308a\u307e\u3057\u305f\u3002 v2.2\u306b\u304a\u3044\u3066\u3001\u9759\u7684\u306a\u95a2\u6570\u7fa4\u306f\u4e8b\u524d\u306b\u30d3\u30eb\u30c9\u3055\u308c\u3001SQL\u304b\u3089\u52d5\u7684\u306b\u751f\u6210\u3059\u308b\u90e8\u5206\u306e\u307f\u3092\u5b9f\u884c\u6642\u306b\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u3088\u3046\u306b\u5909\u66f4\u3055\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001GPU\u30d0\u30a4\u30ca\u30ea\u306e\u751f\u6210\u6642\u9593\u304c\u5927\u5e45\u306b\u6e1b\u5c11\u3059\u308b\u4e8b\u3068\u306a\u308a\u307e\u3057\u305f\u3002 JSONB\u30c7\u30fc\u30bf\u578b\u306e\u5bfe\u5fdc GPU\u5074\u3067JSONB\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5b50\u8981\u7d20\u3092\u53c2\u7167\u3057\u3001 numeric \u3084 text \u5024\u3068\u3057\u3066\u6761\u4ef6\u53e5\u306a\u3069\u3067\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3002 \u53ef\u5909\u9577\u30c7\u30fc\u30bf\u578b\u3092\u8fd4\u3059GPU\u95a2\u6570\u306e\u5bfe\u5fdc textcat \u306a\u3069\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u578b\u3092\u8fd4\u3059SQL\u95a2\u6570\u3092GPU\u5074\u3067\u5b9f\u88c5\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3002 GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2\uff08Gstore_Fdw\uff09\u306e\u30bd\u30fc\u30c8\u5bfe\u5fdc PL/CUDA\u306e\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u4ee5\u5916\u306b\u3001GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u3057\u3066\u5b9f\u884c\u3059\u308bSQL\u3092GPU\u3067\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u5bfe\u5fdc\u3057\u3066\u3044\u308b\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306fGpuScan\u304a\u3088\u3073GpuSort\u306e\uff12\u7a2e\u985e\u3067\u3001JOIN\u304a\u3088\u3073GROUP BY\u306b\u306f\u307e\u3060\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u305b\u3093\u3002 \u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u306e\u8ffd\u52a0 \u7c21\u6613\u306a\u30c6\u30b9\u30c8\u306e\u305f\u3081\u3001\u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002 NVME-oF\u3078\u306e\u5bfe\u5fdc\uff08\u5b9f\u9a13\u7684\u6a5f\u80fd\uff09 NVME-over-Fabric\u3092\u7528\u3044\u3066\u30de\u30a6\u30f3\u30c8\u3055\u308c\u305f\u30ea\u30e2\u30fc\u30c8\u306eNVME\u30c7\u30a3\u30b9\u30af\u304b\u3089\u306eSSD-to-GPU Direct SQL\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002\u305f\u3060\u3057\u3001Red Hat Enterprise Linux 7.x / CentOS 7.x\u3067\u306f nvme_rdma \u30c9\u30e9\u30a4\u30d0\u306e\u5165\u308c\u66ff\u3048\u304c\u5fc5\u8981\u3068\u306a\u308a\u3001\u73fe\u5728\u306e\u3068\u3053\u308d\u5b9f\u9a13\u7684\u6a5f\u80fd\u3068\u3044\u3046\u5f62\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002","title":"\u65b0\u6a5f\u80fd"},{"location":"release_v2.2/#_4","text":"PostgreSQL v9.6\u30b5\u30dd\u30fc\u30c8 PostgreSQL v9.6\u306eCustomScan API\u306b\u306f\u3001\u52d5\u7684\u5171\u6709\u30e1\u30e2\u30ea(DSM)\u306e\u6b63\u3057\u3044\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u306b\u5fc5\u8981\u306a\u5e7e\u3064\u304b\u306eAPI\u304c\u6b20\u3051\u3066\u304a\u308a\u3001\u5b9f\u884c\u6642\u7d71\u8a08\u60c5\u5831\u306e\u63a1\u53d6\u306a\u3069\u304c\u4e0d\u53ef\u80fd\u3067\u3057\u305f\u3002 \u307e\u305f\u3001\u5185\u90e8\u7684\u306b\u5f0f\u8868\u73fe(Expression)\u3092\u4fdd\u6301\u3059\u308b\u305f\u3081\u306e\u65b9\u6cd5\u306b\u3082\u5909\u66f4\u304c\u52a0\u3048\u3089\u308c\u3066\u3044\u308b\u4e8b\u304b\u3089\u3001\u5c11\u306a\u304f\u306a\u3044\u7b87\u6240\u3067 #if ... #endif \u30d6\u30ed\u30c3\u30af\u304c\u5fc5\u8981\u3068\u306a\u308a\u3001\u30b3\u30fc\u30c9\u306e\u4fdd\u5b88\u6027\u3092\u640d\u306a\u3063\u3066\u3044\u307e\u3057\u305f\u3002 \u3053\u308c\u3089\u306e\u554f\u984c\u306b\u3088\u308a\u3001PostgreSQL v9.6\u30b5\u30dd\u30fc\u30c8\u306f\u672c\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u6700\u5f8c\u3068\u306a\u308a\u307e\u3059\u3002PG-Strom\u3092PostgreSQL v9.6\u3067\u304a\u4f7f\u3044\u306e\u5834\u5408\u306f\u3001\u65e9\u671f\u306bPostgreSQL v11\u3078\u3068\u79fb\u884c\u3055\u308c\u308b\u4e8b\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002 Gstore_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306epgstrom\u30d5\u30a9\u30fc\u30de\u30c3\u30c8 GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2\u4e0a\u306e\u30c7\u30fc\u30bf\u5f62\u5f0f\u306f\u3001\u5143\u3005PL/CUDA\u306e\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u3055\u308c\u305f\u72ec\u81ea\u306e\u5217\u5f62\u5f0f\u3067\u3001\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u3084numeric\u30c7\u30fc\u30bf\u578b\u306e\u8868\u73fe\u306fPostgreSQL\u306e\u3082\u306e\u3092\u305d\u306e\u307e\u307e\u5229\u7528\u3057\u3066\u3044\u307e\u3057\u305f\u3002 \u305d\u306e\u5f8c\u3001GPU\u4e0a\u3067\u306e\u30c7\u30fc\u30bf\u4ea4\u63db\u7528\u5171\u901a\u5f62\u5f0f\u3068\u3057\u3066\u3001Apache Arrow\u5f62\u5f0f\u3092\u5143\u306b\u3057\u305fNVIDIA RAPIDS(cuDF)\u304c\u516c\u958b\u3055\u308c\u3001\u591a\u304f\u306e\u6a5f\u68b0\u5b66\u7fd2\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3084Python\u3067\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30b9\u30bf\u30c3\u30af\u306a\u3069\u5bfe\u5fdc\u304c\u5f37\u5316\u3055\u308c\u3064\u3064\u3042\u308a\u307e\u3059\u3002 \u4eca\u5f8c\u3001PG-Strom\u306fGstore_Fdw\u306e\u5185\u90e8\u30c7\u30fc\u30bf\u5f62\u5f0f\u3092cuDF\u3068\u5171\u901a\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u5909\u66f4\u3057\u3001\u3053\u308c\u3089\u6a5f\u68b0\u5b66\u7fd2\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3068\u306e\u76f8\u4e92\u904b\u7528\u6027\u3092\u6539\u5584\u3057\u307e\u3059\u3002\u30b3\u30fc\u30c9\u306e\u4fdd\u5b88\u6027\u3092\u9ad8\u304f\u3059\u308b\u305f\u3081\u3001\u5f93\u6765\u306e\u72ec\u81ea\u30c7\u30fc\u30bf\u5f62\u5f0f\u306f\u5ec3\u6b62\u3068\u306a\u308a\u307e\u3059\u3002","title":"\u5c06\u6765\u5ec3\u6b62\u4e88\u5b9a\u306e\u6a5f\u80fd"},{"location":"release_v2.2/#_5","text":"\u30a4\u30f3\u30e1\u30e2\u30ea\u5217\u30ad\u30e3\u30c3\u30b7\u30e5 \u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3092\u5206\u6790\u3057\u305f\u7d50\u679c\u3001\u591a\u304f\u306e\u30b1\u30fc\u30b9\u3067\u306fArrow_Fdw\u3067\u5341\u5206\u306b\u4ee3\u66ff\u53ef\u80fd\u306a\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3067\u3042\u308b\u4e8b\u304c\u5206\u304b\u308a\u307e\u3057\u305f\u3002\u91cd\u8907\u6a5f\u80fd\u3067\u3042\u308b\u305f\u3081\u3001\u30a4\u30f3\u30e1\u30e2\u30ea\u5217\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u524a\u9664\u3055\u308c\u307e\u3057\u305f\u3002","title":"\u5ec3\u6b62\u3055\u308c\u305f\u6a5f\u80fd"},{"location":"release_v2.3/","text":"PG-Strom v2.3\u30ea\u30ea\u30fc\u30b9 PG-Strom Development Team (1-Apr-2020) \u6982\u8981 PG-Strom v2.3\u306b\u304a\u3051\u308b\u4e3b\u8981\u306a\u6a5f\u80fd\u5f37\u5316\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 GpuJoin\u306eInner\u30d0\u30c3\u30d5\u30a1\u306e\u69cb\u7bc9\u304cCPU\u4e26\u5217\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 Arrow_Fdw\u304cINSERT/TRUNCATE\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 pg2arrow\u30b3\u30de\u30f3\u30c9\u304c\u8ffd\u8a18\u30e2\u30fc\u30c9\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 mysql2arrow\u30b3\u30de\u30f3\u30c9\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002 \u52d5\u4f5c\u74b0\u5883 PostgreSQL v10, v11, v12 CUDA Toolkit 10.1 \u4ee5\u964d CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3 Intel x86 64bit \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3(x86_64) NVIDIA GPU CC 6.0 \u4ee5\u964d (Pascal or Volta) \u65b0\u6a5f\u80fd GpuJoin\u306eInner\u30d0\u30c3\u30d5\u30a1\u306e\u69cb\u7bc9\u304cCPU\u4e26\u5217\u306b\u5bfe\u5fdc \u5f93\u6765\u306fGpuJoin\u306eInner\u5074\u30d0\u30c3\u30d5\u30a1\u306e\u69cb\u7bc9\u306f\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u30d7\u30ed\u30bb\u30b9\u306e\u307f\u304c\u884c\u3063\u3066\u3044\u307e\u3057\u305f\u3002\u3053\u306e\u5236\u7d04\u306b\u3088\u308a\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u4e26\u5217\u30b9\u30ad\u30e3\u30f3\u304c\u6975\u7aef\u306b\u9045\u5ef6\u3059\u308b\u3068\u3044\u3046\u554f\u984c\u304c\u3042\u308a\u307e\u3057\u305f\u3002 \u672c\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306e\u6a5f\u80fd\u5f37\u5316\u306b\u3088\u308a\u3001\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3001\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\u306e\u3069\u3061\u3089\u3067\u3082Inner\u5074\u30d0\u30c3\u30d5\u30a1\u3092\u69cb\u7bc9\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u5834\u5408\u3067\u3082\u3001\u5404\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u306b\u5272\u308a\u5f53\u3066\u3089\u308c\u305f\u30d7\u30ed\u30bb\u30b9\u304c\u76f4\u3061\u306bGpuJoin\u51e6\u7406\u3092\u958b\u59cb\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 Partition-wise Asymmetric GpuJoin\u306e\u518d\u8a2d\u8a08 \u5168\u4f53\u7684\u306a\u30c7\u30b6\u30a4\u30f3\u306e\u518d\u8a2d\u8a08\u3092\u884c\u3044\u3001\u9069\u5207\u306a\u5c40\u9762\u306b\u304a\u3044\u3066\u591a\u6bb5GpuJoin\u304c\u9078\u629e\u3055\u308c\u3084\u3059\u304f\u306a\u308b\u3088\u3046\u6539\u826f\u3092\u884c\u3044\u307e\u3057\u305f\u3002 Arrow_Fdw\u304cINSERT/TRUNCATE\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u3001 INSERT \u306b\u3088\u308b\u30d0\u30eb\u30af\u30ed\u30fc\u30c9\u3068\u3001 pgstrom.arrow_fdw_truncate \u306b\u3088\u308bTRUNCATE\u51e6\u7406\u3092\u884c\u3046\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002 CuPy\u9023\u643a\u3068\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306eGPU\u30a8\u30af\u30b9\u30dd\u30fc\u30c8 Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u5185\u5bb9\u3092GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u306e\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306b\u30ed\u30fc\u30c9\u3057\u3001\u3053\u308c\u3092CuPy\u306e cupy.ndarray \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066Python\u30b9\u30af\u30ea\u30d7\u30c8\u304b\u3089\u53c2\u7167\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002 pg2arrow\u30b3\u30de\u30f3\u30c9\u304c\u8ffd\u8a18\u30e2\u30fc\u30c9\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 pg2arrow \u30b3\u30de\u30f3\u30c9\u306b --append \u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u8ffd\u52a0\u3055\u308c\u3001\u65e2\u5b58\u306eApache Arrow\u306b\u5bfe\u3057\u3066\u8ffd\u8a18\u3092\u884c\u3046\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002 \u307e\u305f\u540c\u6642\u306b\u3001 SELECT * FROM table \u306e\u5225\u540d\u8868\u8a18\u3068\u3057\u3066 -t table \u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002 mysql2arrow\u30b3\u30de\u30f3\u30c9\u3092\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002 PostgreSQL\u3067\u306f\u306a\u304f\u3001MySQL\u306b\u63a5\u7d9a\u3057\u3066\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u3001\u305d\u306e\u7d50\u679c\u3092Apache Arrow\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u4fdd\u5b58\u3059\u308b mysql2arrow \u30b3\u30de\u30f3\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002 \u5217\u6319\u578b\u306e\u30c7\u30fc\u30bf\u3082\u901a\u5e38\u306eUtf8\u578b\u3068\u3057\u3066\u4fdd\u5b58\u3059\u308b\uff08DictionaryBatch\u3092\u4f7f\u7528\u3057\u306a\u3044\uff09\u4ee5\u5916\u306f\u3001 pg2arrow \u3068\u540c\u7b49\u306e\u6a5f\u80fd\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002 \u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f PostgreSQL\u306e\u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306b\u5408\u308f\u305b\u3066\u3001\u5e7e\u3064\u304b\u306e\u57fa\u672c\u7684\u306a\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059\u3002 \u4fee\u6b63\u3055\u308c\u305f\u4e3b\u306a\u4e0d\u5177\u5408 GPU\u30c7\u30d0\u30a4\u30b9\u95a2\u6570/\u578b\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u7121\u52b9\u5316\u306e\u30ed\u30b8\u30c3\u30af\u3092\u6539\u5584 ALTER\u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u6642\u3001\u5168\u3066\u306eGPU\u30c7\u30d0\u30a4\u30b9\u95a2\u6570/\u578b\u306e\u30e1\u30bf\u60c5\u5831\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u7121\u52b9\u5316\u3057\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u5b9f\u969b\u306b\u7121\u52b9\u5316\u306e\u5fc5\u8981\u306e\u3042\u308b\u30a8\u30f3\u30c8\u30ea\u306e\u307f\u3092\u30af\u30ea\u30a2\u3059\u308b\u3088\u3046\u4fee\u6b63\u3092\u884c\u3044\u307e\u3057\u305f\u3002 GROUP BY\u3067\u540c\u3058\u5217\u3092\u5076\u6570\u56de\u6307\u5b9a\u3057\u305f\u969b\u306b\u6975\u7aef\u306a\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u4f4e\u4e0b\u3092\u4fee\u6b63 GROUP BY\u306e\u30ad\u30fc\u5024\u304c\u8907\u6570\u3042\u308b\u6642\u306b\u3001GpuPreAgg\u306f\u30cf\u30c3\u30b7\u30e5\u5024\u3092XOR\u3067\u7d50\u5408\u3057\u3066\u3044\u307e\u3057\u305f\u3002\u305d\u306e\u305f\u3081\u3001\u540c\u3058\u5217\u3092\u5076\u6570\u56de\u6307\u5b9a\u3057\u305f\u5834\u5408\u306b\u306f\u5e38\u306b\u30cf\u30c3\u30b7\u30e5\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c0\u306b\u306a\u308b\u3068\u3044\u3046\u554f\u984c\u304c\u3042\u308a\u307e\u3057\u305f\u3002\u9069\u5f53\u306a\u30e9\u30f3\u30c0\u30e0\u5316\u51e6\u7406\u3092\u52a0\u3048\u308b\u4e8b\u3067\u30cf\u30c3\u30b7\u30e5\u5024\u304c\u5206\u6563\u3059\u308b\u3088\u3046\u4fee\u6b63\u3057\u3066\u3044\u307e\u3059\u3002 \u6f5c\u5728\u7684\u306aGpuScan\u7121\u9650\u30eb\u30fc\u30d7\u306e\u554f\u984c\u3092\u4fee\u6b63 SSD2GPU Direct SQL\u306e\u4f7f\u7528\u6642\u3001\u5909\u6570\u306e\u672a\u521d\u671f\u5316\u306b\u3088\u308aGpuScan\u304c\u7121\u9650\u30eb\u30fc\u30d7\u306b\u9665\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3057\u305f\u3002 \u6f5c\u5728\u7684\u306aGpuJoin\u306eGPU\u30ab\u30fc\u30cd\u30eb\u30af\u30e9\u30c3\u30b7\u30e5 3\u500b\u4ee5\u4e0a\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u7d50\u5408\u3059\u308bGpuJoin\u3067\u3001\u5909\u6570\u306e\u672a\u521d\u671f\u5316\u306b\u3088\u308aGPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u3092\u5f15\u304d\u8d77\u3053\u3059\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3057\u305f\u3002 \u5ec3\u6b62\u3055\u308c\u305f\u6a5f\u80fd PostgreSQL v9.6\u30b5\u30dd\u30fc\u30c8 PostgreSQL v9.6\u306eCustomScan API\u306b\u306f\u3001\u52d5\u7684\u5171\u6709\u30e1\u30e2\u30ea(DSM)\u306e\u6b63\u3057\u3044\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u306b\u5fc5\u8981\u306a\u5e7e\u3064\u304b\u306eAPI\u304c\u6b20\u3051\u3066\u304a\u308a\u3001v10\u4ee5\u964d\u3068\u5171\u901a\u306e\u30b3\u30fc\u30c9\u3092\u4fdd\u5b88\u3059\u308b\u4e0a\u3067\u969c\u5bb3\u3068\u306a\u3063\u3066\u3044\u307e\u3057\u305f\u3002\u3053\u308c\u3089\u306e\u554f\u984c\u304b\u3089\u3001\u672c\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f PostgreSQL v9.6 \u306f\u30b5\u30dd\u30fc\u30c8\u5916\u3068\u306a\u308a\u307e\u3059\u3002 PL/CUDA \u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3092\u5206\u6790\u3057\u305f\u7d50\u679c\u3001\u72ec\u81ea\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u74b0\u5883\u3088\u308a\u3082\u3001Python\u8a00\u8a9e\u306a\u3069\u30e6\u30fc\u30b6\u306e\u4f7f\u3044\u6163\u308c\u305f\u8a00\u8a9e\u74b0\u5883\u306e\u65b9\u304c\u671b\u307e\u3057\u3044\u4e8b\u304c\u5206\u304b\u308a\u307e\u3057\u305f\u3002 \u4eca\u5f8c\u306f\u3001Arrow_Fdw\u306eGPU\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u6a5f\u80fd\u3068PL/Python\u7d4c\u7531\u3067\u306eCuPy\u547c\u51fa\u3057\u3092\u4f75\u7528\u3059\u308b\u4e8b\u3067\u3001In-database\u6a5f\u68b0\u5b66\u7fd2/\u7d71\u8a08\u89e3\u6790\u306e\u4ee3\u66ff\u624b\u6bb5\u3068\u306a\u308a\u307e\u3059\u3002 Gstore_Fdw \u672c\u6a5f\u80fd\u306f\u3001\u66f8\u304d\u8fbc\u307f\u53ef\u80fdArrow_Fdw\u3068GPU\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u6a5f\u80fd\u306b\u3088\u308a\u4ee3\u66ff\u3055\u308c\u307e\u3057\u305f\u3002 Largeobject\uff5eGPU\u9593\u30a8\u30af\u30b9\u30dd\u30fc\u30c8/\u30a4\u30f3\u30dd\u30fc\u30c8 \u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3092\u5206\u6790\u3057\u305f\u7d50\u679c\u3001\u672c\u6a5f\u80fd\u306f\u4e0d\u8981\u3068\u5224\u65ad\u3057\u307e\u3057\u305f\u3002","title":"PG-Strom v2.3"},{"location":"release_v2.3/#pg-strom-v23","text":"PG-Strom Development Team (1-Apr-2020)","title":"PG-Strom v2.3\u30ea\u30ea\u30fc\u30b9"},{"location":"release_v2.3/#_1","text":"PG-Strom v2.3\u306b\u304a\u3051\u308b\u4e3b\u8981\u306a\u6a5f\u80fd\u5f37\u5316\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 GpuJoin\u306eInner\u30d0\u30c3\u30d5\u30a1\u306e\u69cb\u7bc9\u304cCPU\u4e26\u5217\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 Arrow_Fdw\u304cINSERT/TRUNCATE\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 pg2arrow\u30b3\u30de\u30f3\u30c9\u304c\u8ffd\u8a18\u30e2\u30fc\u30c9\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 mysql2arrow\u30b3\u30de\u30f3\u30c9\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002","title":"\u6982\u8981"},{"location":"release_v2.3/#_2","text":"PostgreSQL v10, v11, v12 CUDA Toolkit 10.1 \u4ee5\u964d CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3 Intel x86 64bit \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3(x86_64) NVIDIA GPU CC 6.0 \u4ee5\u964d (Pascal or Volta)","title":"\u52d5\u4f5c\u74b0\u5883"},{"location":"release_v2.3/#_3","text":"GpuJoin\u306eInner\u30d0\u30c3\u30d5\u30a1\u306e\u69cb\u7bc9\u304cCPU\u4e26\u5217\u306b\u5bfe\u5fdc \u5f93\u6765\u306fGpuJoin\u306eInner\u5074\u30d0\u30c3\u30d5\u30a1\u306e\u69cb\u7bc9\u306f\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u30d7\u30ed\u30bb\u30b9\u306e\u307f\u304c\u884c\u3063\u3066\u3044\u307e\u3057\u305f\u3002\u3053\u306e\u5236\u7d04\u306b\u3088\u308a\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u4e26\u5217\u30b9\u30ad\u30e3\u30f3\u304c\u6975\u7aef\u306b\u9045\u5ef6\u3059\u308b\u3068\u3044\u3046\u554f\u984c\u304c\u3042\u308a\u307e\u3057\u305f\u3002 \u672c\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306e\u6a5f\u80fd\u5f37\u5316\u306b\u3088\u308a\u3001\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3001\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\u306e\u3069\u3061\u3089\u3067\u3082Inner\u5074\u30d0\u30c3\u30d5\u30a1\u3092\u69cb\u7bc9\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u5834\u5408\u3067\u3082\u3001\u5404\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u306b\u5272\u308a\u5f53\u3066\u3089\u308c\u305f\u30d7\u30ed\u30bb\u30b9\u304c\u76f4\u3061\u306bGpuJoin\u51e6\u7406\u3092\u958b\u59cb\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 Partition-wise Asymmetric GpuJoin\u306e\u518d\u8a2d\u8a08 \u5168\u4f53\u7684\u306a\u30c7\u30b6\u30a4\u30f3\u306e\u518d\u8a2d\u8a08\u3092\u884c\u3044\u3001\u9069\u5207\u306a\u5c40\u9762\u306b\u304a\u3044\u3066\u591a\u6bb5GpuJoin\u304c\u9078\u629e\u3055\u308c\u3084\u3059\u304f\u306a\u308b\u3088\u3046\u6539\u826f\u3092\u884c\u3044\u307e\u3057\u305f\u3002 Arrow_Fdw\u304cINSERT/TRUNCATE\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u3001 INSERT \u306b\u3088\u308b\u30d0\u30eb\u30af\u30ed\u30fc\u30c9\u3068\u3001 pgstrom.arrow_fdw_truncate \u306b\u3088\u308bTRUNCATE\u51e6\u7406\u3092\u884c\u3046\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002 CuPy\u9023\u643a\u3068\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306eGPU\u30a8\u30af\u30b9\u30dd\u30fc\u30c8 Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u5185\u5bb9\u3092GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u306e\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306b\u30ed\u30fc\u30c9\u3057\u3001\u3053\u308c\u3092CuPy\u306e cupy.ndarray \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066Python\u30b9\u30af\u30ea\u30d7\u30c8\u304b\u3089\u53c2\u7167\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002 pg2arrow\u30b3\u30de\u30f3\u30c9\u304c\u8ffd\u8a18\u30e2\u30fc\u30c9\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 pg2arrow \u30b3\u30de\u30f3\u30c9\u306b --append \u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u8ffd\u52a0\u3055\u308c\u3001\u65e2\u5b58\u306eApache Arrow\u306b\u5bfe\u3057\u3066\u8ffd\u8a18\u3092\u884c\u3046\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002 \u307e\u305f\u540c\u6642\u306b\u3001 SELECT * FROM table \u306e\u5225\u540d\u8868\u8a18\u3068\u3057\u3066 -t table \u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002 mysql2arrow\u30b3\u30de\u30f3\u30c9\u3092\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002 PostgreSQL\u3067\u306f\u306a\u304f\u3001MySQL\u306b\u63a5\u7d9a\u3057\u3066\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u3001\u305d\u306e\u7d50\u679c\u3092Apache Arrow\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u4fdd\u5b58\u3059\u308b mysql2arrow \u30b3\u30de\u30f3\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002 \u5217\u6319\u578b\u306e\u30c7\u30fc\u30bf\u3082\u901a\u5e38\u306eUtf8\u578b\u3068\u3057\u3066\u4fdd\u5b58\u3059\u308b\uff08DictionaryBatch\u3092\u4f7f\u7528\u3057\u306a\u3044\uff09\u4ee5\u5916\u306f\u3001 pg2arrow \u3068\u540c\u7b49\u306e\u6a5f\u80fd\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002 \u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f PostgreSQL\u306e\u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306b\u5408\u308f\u305b\u3066\u3001\u5e7e\u3064\u304b\u306e\u57fa\u672c\u7684\u306a\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059\u3002","title":"\u65b0\u6a5f\u80fd"},{"location":"release_v2.3/#_4","text":"GPU\u30c7\u30d0\u30a4\u30b9\u95a2\u6570/\u578b\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u7121\u52b9\u5316\u306e\u30ed\u30b8\u30c3\u30af\u3092\u6539\u5584 ALTER\u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u6642\u3001\u5168\u3066\u306eGPU\u30c7\u30d0\u30a4\u30b9\u95a2\u6570/\u578b\u306e\u30e1\u30bf\u60c5\u5831\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u7121\u52b9\u5316\u3057\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u5b9f\u969b\u306b\u7121\u52b9\u5316\u306e\u5fc5\u8981\u306e\u3042\u308b\u30a8\u30f3\u30c8\u30ea\u306e\u307f\u3092\u30af\u30ea\u30a2\u3059\u308b\u3088\u3046\u4fee\u6b63\u3092\u884c\u3044\u307e\u3057\u305f\u3002 GROUP BY\u3067\u540c\u3058\u5217\u3092\u5076\u6570\u56de\u6307\u5b9a\u3057\u305f\u969b\u306b\u6975\u7aef\u306a\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u4f4e\u4e0b\u3092\u4fee\u6b63 GROUP BY\u306e\u30ad\u30fc\u5024\u304c\u8907\u6570\u3042\u308b\u6642\u306b\u3001GpuPreAgg\u306f\u30cf\u30c3\u30b7\u30e5\u5024\u3092XOR\u3067\u7d50\u5408\u3057\u3066\u3044\u307e\u3057\u305f\u3002\u305d\u306e\u305f\u3081\u3001\u540c\u3058\u5217\u3092\u5076\u6570\u56de\u6307\u5b9a\u3057\u305f\u5834\u5408\u306b\u306f\u5e38\u306b\u30cf\u30c3\u30b7\u30e5\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c0\u306b\u306a\u308b\u3068\u3044\u3046\u554f\u984c\u304c\u3042\u308a\u307e\u3057\u305f\u3002\u9069\u5f53\u306a\u30e9\u30f3\u30c0\u30e0\u5316\u51e6\u7406\u3092\u52a0\u3048\u308b\u4e8b\u3067\u30cf\u30c3\u30b7\u30e5\u5024\u304c\u5206\u6563\u3059\u308b\u3088\u3046\u4fee\u6b63\u3057\u3066\u3044\u307e\u3059\u3002 \u6f5c\u5728\u7684\u306aGpuScan\u7121\u9650\u30eb\u30fc\u30d7\u306e\u554f\u984c\u3092\u4fee\u6b63 SSD2GPU Direct SQL\u306e\u4f7f\u7528\u6642\u3001\u5909\u6570\u306e\u672a\u521d\u671f\u5316\u306b\u3088\u308aGpuScan\u304c\u7121\u9650\u30eb\u30fc\u30d7\u306b\u9665\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3057\u305f\u3002 \u6f5c\u5728\u7684\u306aGpuJoin\u306eGPU\u30ab\u30fc\u30cd\u30eb\u30af\u30e9\u30c3\u30b7\u30e5 3\u500b\u4ee5\u4e0a\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u7d50\u5408\u3059\u308bGpuJoin\u3067\u3001\u5909\u6570\u306e\u672a\u521d\u671f\u5316\u306b\u3088\u308aGPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u3092\u5f15\u304d\u8d77\u3053\u3059\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3057\u305f\u3002","title":"\u4fee\u6b63\u3055\u308c\u305f\u4e3b\u306a\u4e0d\u5177\u5408"},{"location":"release_v2.3/#_5","text":"PostgreSQL v9.6\u30b5\u30dd\u30fc\u30c8 PostgreSQL v9.6\u306eCustomScan API\u306b\u306f\u3001\u52d5\u7684\u5171\u6709\u30e1\u30e2\u30ea(DSM)\u306e\u6b63\u3057\u3044\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u306b\u5fc5\u8981\u306a\u5e7e\u3064\u304b\u306eAPI\u304c\u6b20\u3051\u3066\u304a\u308a\u3001v10\u4ee5\u964d\u3068\u5171\u901a\u306e\u30b3\u30fc\u30c9\u3092\u4fdd\u5b88\u3059\u308b\u4e0a\u3067\u969c\u5bb3\u3068\u306a\u3063\u3066\u3044\u307e\u3057\u305f\u3002\u3053\u308c\u3089\u306e\u554f\u984c\u304b\u3089\u3001\u672c\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f PostgreSQL v9.6 \u306f\u30b5\u30dd\u30fc\u30c8\u5916\u3068\u306a\u308a\u307e\u3059\u3002 PL/CUDA \u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3092\u5206\u6790\u3057\u305f\u7d50\u679c\u3001\u72ec\u81ea\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u74b0\u5883\u3088\u308a\u3082\u3001Python\u8a00\u8a9e\u306a\u3069\u30e6\u30fc\u30b6\u306e\u4f7f\u3044\u6163\u308c\u305f\u8a00\u8a9e\u74b0\u5883\u306e\u65b9\u304c\u671b\u307e\u3057\u3044\u4e8b\u304c\u5206\u304b\u308a\u307e\u3057\u305f\u3002 \u4eca\u5f8c\u306f\u3001Arrow_Fdw\u306eGPU\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u6a5f\u80fd\u3068PL/Python\u7d4c\u7531\u3067\u306eCuPy\u547c\u51fa\u3057\u3092\u4f75\u7528\u3059\u308b\u4e8b\u3067\u3001In-database\u6a5f\u68b0\u5b66\u7fd2/\u7d71\u8a08\u89e3\u6790\u306e\u4ee3\u66ff\u624b\u6bb5\u3068\u306a\u308a\u307e\u3059\u3002 Gstore_Fdw \u672c\u6a5f\u80fd\u306f\u3001\u66f8\u304d\u8fbc\u307f\u53ef\u80fdArrow_Fdw\u3068GPU\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u6a5f\u80fd\u306b\u3088\u308a\u4ee3\u66ff\u3055\u308c\u307e\u3057\u305f\u3002 Largeobject\uff5eGPU\u9593\u30a8\u30af\u30b9\u30dd\u30fc\u30c8/\u30a4\u30f3\u30dd\u30fc\u30c8 \u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3092\u5206\u6790\u3057\u305f\u7d50\u679c\u3001\u672c\u6a5f\u80fd\u306f\u4e0d\u8981\u3068\u5224\u65ad\u3057\u307e\u3057\u305f\u3002","title":"\u5ec3\u6b62\u3055\u308c\u305f\u6a5f\u80fd"},{"location":"release_v3.0/","text":"PG-Strom v3.0\u30ea\u30ea\u30fc\u30b9 PG-Strom Development Team (29-Jun-2021) \u6982\u8981 PG-Strom v3.0\u306b\u304a\u3051\u308b\u4e3b\u8981\u306a\u5909\u66f4\u306f\u70b9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 NVIDIA GPUDirect Storage (cuFile) \u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u3044\u304f\u3064\u304b\u306ePostGIS\u95a2\u6570\u304cGPU\u3067\u5b9f\u884c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002 GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u305fGpuJoin\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u65b0\u305f\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u6a5f\u80fd\u304c\u5b9f\u88c5\u3055\u308c\u307e\u3057\u305f\u3002 \u30e6\u30fc\u30b6\u5b9a\u7fa9\u306eGPU\u30c7\u30fc\u30bf\u578b/\u95a2\u6570/\u6f14\u7b97\u5b50\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002(\u5b9f\u9a13\u7684) \u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30e9\u30a4\u30bb\u30f3\u30b9\u3092GPLv2\u304b\u3089PostgreSQL\u30e9\u30a4\u30bb\u30f3\u30b9\u3078\u3068\u5207\u308a\u66ff\u3048\u307e\u3057\u305f\u3002 \u52d5\u4f5c\u74b0\u5883 PostgreSQL v11, v12, v13 CUDA Toolkit 11.2 \u4ee5\u964d CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3 Intel x86 64bit \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3(x86_64) NVIDIA GPU CC 6.0 \u4ee5\u964d (Pascal\u4ee5\u964d) NVIDIA GPUDirect Storage GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL \u7528\u306e\u30c9\u30e9\u30a4\u30d0\u3068\u3057\u3066\u3001\u5f93\u6765\u306e nvme_strom \u30ab\u30fc\u30cd\u30eb\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u52a0\u3048\u3066\u3001 NVIDIA\u304c\u958b\u767a\u3092\u9032\u3081\u3066\u3044\u308b GPUDirect Storage \u306b\u3082\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u3069\u3061\u3089\u306e\u30c9\u30e9\u30a4\u30d0\u3082\u6982\u306d\u540c\u7b49\u306e\u6a5f\u80fd\u3001\u6027\u80fd\u3092\u6709\u3057\u3066\u3044\u307e\u3059\u304c\u3001GPUDirect Storage\u306e\u5bfe\u5fdc\u306b\u3088\u308a\u3001\u5f93\u6765\u304b\u3089\u306e\u30ed\u30fc\u30ab\u30ebNVME-SSD\u306b\u52a0\u3048\u3066\u3001NVME-oF(NVME over Fabrics)\u30c7\u30d0\u30a4\u30b9\u3084SDS(Software Defined Storage)\u30c7\u30d0\u30a4\u30b9\u3001\u304a\u3088\u3073\u305d\u306e\u4e0a\u306b\u69cb\u7bc9\u3055\u308c\u305f\u5171\u6709\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u304b\u3089\u306eGPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u306b\u3082\u5bfe\u5fdc\u3059\u308b\u4e8b\u3068\u306a\u308a\u3001\u3088\u308a\u5927\u898f\u6a21\u3067\u67d4\u8edf\u306a\u30b9\u30c8\u30ec\u30fc\u30b8\u69cb\u6210\u3092\u53d6\u308b\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002 GPUDirect SQL\u306f\u3001PostgreSQL\u6a19\u6e96\u306eHeap\u30c6\u30fc\u30d6\u30eb\u3068Apache Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u51fa\u3057\u306b\u5229\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u3001\u3044\u305a\u308c\u306e\u5834\u5408\u306b\u304a\u3044\u3066\u3082\u3001\u30c6\u30fc\u30d6\u30eb\u30b9\u30ad\u30e3\u30f3\u304c\u30dc\u30c8\u30eb\u30cd\u30c3\u30af\u3068\u306a\u308b\u3088\u3046\u306a\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u304a\u3044\u3066\u9855\u8457\u306a\u9ad8\u901f\u5316\u304c\u671f\u5f85\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u6e2c\u5b9a\u7d50\u679c\u306f\u3001GPU 1\u53f0\u3068NVME-SSD 4\u53f0\u3092\u7528\u3044\u3066\u3001SSBM(Star Schema Benchmark)\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092GPUDirect SQL\u3092GPUDirect Storage\u30c9\u30e9\u30a4\u30d0\u306e\u4e0b\u3067\u5b9f\u884c\u3057\u305f\u3082\u306e\u3067\u3059\u304c\u3001PostgreSQL heap\u3068Apache Arrow\u306e\u3044\u305a\u308c\u306e\u30b1\u30fc\u30b9\u306b\u304a\u3044\u3066\u3082\u3001\u5358\u4f4d\u6642\u9593\u3042\u305f\u308a\u306e\u30c7\u30fc\u30bf\u51e6\u7406\u4ef6\u6570\u306fPostgreSQL\u306b\u6bd4\u3079\u5927\u5e45\u306b\u6539\u5584\u3057\u3066\u3044\u308b\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 \u307e\u305f\u3001\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u4e2d\u306eNVME-SSD\u304b\u3089\u306e\u8aad\u307f\u51fa\u3057\u30b9\u30eb\u30fc\u30d7\u30c3\u30c8\u3092\u6bd4\u8f03\u3057\u3066\u307f\u308b\u3068\u3001\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3092\u4ecb\u3057\u305f\u8aad\u51fa\u3057\uff08PostgreSQL Heap Storage\uff09\u306b\u6bd4\u3079\u3001GPUDirect Storage\u3092\u4f7f\u7528\u3057\u305f\u5834\u5408\u306b\u306f\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u9650\u754c\u306b\u8fd1\u3044\u6027\u80fd\u5024\u3092\u5f15\u304d\u51fa\u305b\u3066\u3044\u308b\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 GPU\u7248PostGIS\u3068GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9 \u3044\u304f\u3064\u304b\u306ePostGIS\u95a2\u6570\u306bGPU\u7248\u3092\u5b9f\u88c5\u3057\u307e\u3057\u305f\u3002 \u6761\u4ef6\u53e5\u3067\u3053\u308c\u3089\u306ePostGIS\u95a2\u6570\u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001PG-Strom\u306fGPU\u5074\u3067\u3053\u308c\u3092\u5b9f\u884c\u3059\u308b\u3088\u3046GPU\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u81ea\u52d5\u751f\u6210\u3057\u307e\u3059\u3002 GPU\u7248PostGIS\u306e\u4e3b\u305f\u308b\u30bf\u30fc\u30b2\u30c3\u30c8\u306f\u3001\u643a\u5e2f\u96fb\u8a71\u3084\u81ea\u52d5\u8eca\u3068\u3044\u3063\u305f\u79fb\u52d5\u4f53\u30c7\u30d0\u30a4\u30b9\u306e\u6700\u65b0\u306e\u4f4d\u7f6e\u60c5\u5831\uff08Real-time Location Data\uff09\u3068\u3001\u5e02\u533a\u753a\u6751\u3084\u5b66\u533a\u306e\u5883\u754c\u3068\u3044\u3063\u305f\u9818\u57df\uff08Area Definition Data\uff09\u3068\u306e\u9593\u3067\u884c\u308f\u308c\u308b\u7a81\u5408\u51e6\u7406\u3067\u3059\u3002 \u4f8b\u3048\u3070\u3001\u4e00\u5b9a\u306e\u30a8\u30ea\u30a2\u5185\u306b\u5b58\u5728\u3059\u308b\u643a\u5e2f\u96fb\u8a71\u306b\u5e83\u544a\u3092\u914d\u4fe1\u3057\u305f\u3044\u6642\u3001\u4e00\u5b9a\u306e\u30a8\u30ea\u30a2\u5185\u306b\u5b58\u5728\u3059\u308b\u81ea\u52d5\u8eca\u306b\u6e0b\u6ede\u60c5\u5831\u3092\u914d\u4fe1\u3057\u305f\u3044\u6642\u306a\u3069\u3001\u4f4d\u7f6e\u3092\u30ad\u30fc\u3068\u3057\u3066\u8a72\u5f53\u3059\u308b\u30c7\u30d0\u30a4\u30b9\u3092\u691c\u7d22\u3059\u308b\u51e6\u7406\u306b\u52b9\u679c\u3092\u767a\u63ee\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u6771\u4eac\u8fd1\u90ca\u30a8\u30ea\u30a2\u3092\u5305\u542b\u3059\u308b\u77e9\u5f62\u9818\u57df\u5185\u306b\u30e9\u30f3\u30c0\u30e0\u306a1600\u4e07\u500b\u306e\u70b9\u30c7\u30fc\u30bf\u3092\u4f5c\u6210\u3057\u3001\u5e02\u533a\u753a\u6751\u3054\u3068\u306b\u305d\u306e\u9818\u57df\u5185\u306b\u542b\u307e\u308c\u308b\u70b9\u306e\u6570\u3092\u30ab\u30a6\u30f3\u30c8\u3059\u308b\u3068\u3044\u3046\u51e6\u7406\u306e\u5fdc\u7b54\u6642\u9593\u3092\u8a08\u6e2c\u3057\u305f\u3082\u306e\u3067\u3059\u3002 \u901a\u5e38\u306ePostGIS\u3068GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u7d44\u307f\u5408\u308f\u305b\u3067\u306f160\u79d2\u4ee5\u4e0a\u3092\u8981\u3057\u305f\u51e6\u7406\u304c\u3001GPU\u7248PostGIS\u3068GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u7d44\u307f\u5408\u308f\u305b\u306b\u304a\u3044\u3066\u306f\u3001\u50c5\u304b0.830\u79d2\u3067\u5fdc\u7b54\u3057\u3066\u3044\u307e\u3059\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5 GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u306b\u4e88\u3081\u9818\u57df\u3092\u78ba\u4fdd\u3057\u3066\u304a\u304d\u3001\u5bfe\u8c61\u3068\u306a\u308b\u30c6\u30fc\u30d6\u30eb\u306e\u8907\u88fd\u3092\u4fdd\u6301\u3057\u3066\u304a\u304f\u6a5f\u80fd\u3067\u3059\u3002 \u6bd4\u8f03\u7684\u5c0f\u898f\u6a21\u306e\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\uff08\uff5e10GB\u7a0b\u5ea6\uff09\u3067\u3001\u66f4\u65b0\u983b\u5ea6\u306e\u9ad8\u3044\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u5206\u6790/\u691c\u7d22\u7cfb\u306e\u30af\u30a8\u30ea\u3092\u52b9\u7387\u3088\u304f\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u3055\u308c\u307e\u3057\u305f\u3002 \u5206\u6790/\u691c\u7d22\u7cfb\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u6642\u306b\u306f\u3001GPU\u4e0a\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u53c2\u7167\u3059\u308b\u4e8b\u3067\u3001\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u3059\u4e8b\u306a\u304fGPU\u3067SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u51e6\u7406\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u5178\u578b\u7684\u306b\u306f\u3001\u6570\u767e\u4e07\u30c7\u30d0\u30a4\u30b9\u306e\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30c7\u30fc\u30bf\u3092GPU\u4e0a\u306b\u4fdd\u6301\u3057\u3066\u304a\u304d\u3001\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3084\u4f4d\u7f6e\u60c5\u5831\u306e\u66f4\u65b0\u304c\u9ad8\u983b\u5ea6\u3067\u767a\u751f\u3059\u308b\u3068\u3044\u3063\u305f\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3067\u3059\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u8a2d\u5b9a\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u3092\u66f4\u65b0\u3059\u308b\u3068\u3001\u305d\u306e\u66f4\u65b0\u5c65\u6b74\u3092\u30aa\u30f3\u30e1\u30e2\u30ea\u306eREDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u683c\u7d0d\u3057\u3001\u305d\u308c\u3092\u4e00\u5b9a\u9593\u9694\u304b\u3001\u307e\u305f\u306f\u5206\u6790/\u691c\u7d22\u7cfb\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u5b9f\u884c\u524d\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u5074\u306b\u53cd\u6620\u3057\u307e\u3059\u3002 \u3053\u306e\u4ed5\u7d44\u307f\u306b\u3088\u308a\u3001\u9ad8\u983b\u5ea6\u3067\u306e\u66f4\u65b0\u3068\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3068\u306e\u6574\u5408\u6027\u3068\u3092\u4e21\u7acb\u3057\u3066\u3044\u307e\u3059\u3002 \u30e6\u30fc\u30b6\u5b9a\u7fa9\u306eGPU\u30c7\u30fc\u30bf\u578b/\u95a2\u6570 \u30e6\u30fc\u30b6\u5b9a\u7fa9\u306eGPU\u30c7\u30fc\u30bf\u578b/\u95a2\u6570\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306eAPI\u3092\u65b0\u305f\u306b\u63d0\u4f9b\u3057\u307e\u3059\u3002 \u3053\u308c\u306b\u3088\u308a\u3001PG-Strom\u81ea\u4f53\u306b\u306f\u624b\u3092\u52a0\u3048\u308b\u3053\u3068\u306a\u304f\u3001\u30cb\u30c3\u30c1\u306a\u7528\u9014\u306e\u30c7\u30fc\u30bf\u578b\u3084\u305d\u308c\u3092\u51e6\u7406\u3059\u308b\u305f\u3081\u306eSQL\u95a2\u6570\u3092\u30e6\u30fc\u30b6\u304c\u72ec\u81ea\u306b\u5b9a\u7fa9\u3001\u5b9f\u88c5\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002 Notice \u672cAPI\u306f\u5b9f\u9a13\u7684\u30b9\u30c6\u30fc\u30bf\u30b9\u3067\u3042\u308a\u3001\u5c06\u6765\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u4e88\u544a\u306a\u304f\u5909\u66f4\u3055\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 \u307e\u305f\u3001\u672cAPI\u306e\u5229\u7528\u306b\u306fPG-Strom\u5185\u90e8\u69cb\u9020\u3092\u5341\u5206\u306b\u7406\u89e3\u3057\u3066\u3044\u308b\u4e8b\u304c\u524d\u63d0\u3067\u3059\u306e\u3067\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002 PostgreSQL\u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u63a1\u7528 PG-Strom v3.0\u4ee5\u964d\u3067\u306fPostgreSQL\u30e9\u30a4\u30bb\u30f3\u30b9\u3092\u63a1\u7528\u3057\u307e\u3059\u3002 \u6b74\u53f2\u7684\u306a\u7d4c\u7def\u306b\u3088\u308a\u3001\u3053\u308c\u307e\u3067\u306ePG-Strom\u3067\u306fGPLv2\u3092\u63a1\u7528\u3057\u3066\u3044\u307e\u3057\u305f\u304c\u3001PG-Strom\u30b3\u30a2\u6a5f\u80fd\u3084\u5468\u8fba\u30c4\u30fc\u30eb\u3068\u7d44\u307f\u5408\u308f\u305b\u305f\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u958b\u767a\u306b\u30e9\u30a4\u30bb\u30f3\u30b9\u4f53\u7cfb\u304c\u969c\u5bb3\u306b\u306a\u308b\u3068\u306e\u58f0\u3092\u8907\u6570\u3044\u305f\u3060\u3044\u3066\u3044\u307e\u3057\u305f\u3002 \u305d\u306e\u4ed6\u306e\u5909\u66f4 \u72ec\u81ea\u306b int1 (8bit\u6574\u6570) \u30c7\u30fc\u30bf\u578b\u3001\u304a\u3088\u3073\u95a2\u9023\u3059\u308b\u6f14\u7b97\u5b50\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 pg2arrow \u306b --inner-join \u304a\u3088\u3073 --outer-join \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002PostgreSQL\u306e\u5217\u6570\u5236\u9650\u3092\u8d8a\u3048\u305f\u6570\u306e\u5217\u3092\u6301\u3064Apache Arrow\u30d5\u30a1\u30a4\u30eb\u3092\u751f\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 \u30de\u30eb\u30c1GPU\u74b0\u5883\u3067\u306f\u3001GPU\u3054\u3068\u306b\u5c02\u7528\u306eGPU Memory Keeper\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u304c\u7acb\u3061\u4e0a\u304c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 PostgreSQL v13.x \u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 CUDA 11.2 \u304a\u3088\u3073 Ampere\u4e16\u4ee3\u306eGPU\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 ScaleFlux\u793e\u306eComputational Storage\u88fd\u54c1CSD2000\u30b7\u30ea\u30fc\u30ba\u3067\u306eGPUDirect SQL\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\uff08cuFile\u30c9\u30e9\u30a4\u30d0\u306e\u307f\uff09 \u96d1\u591a\u306a\u30d0\u30b0\u306e\u4fee\u6b63 \u5ec3\u6b62\u3055\u308c\u305f\u6a5f\u80fd PostgreSQL v10.x \u7cfb\u5217\u306e\u30b5\u30dd\u30fc\u30c8\u304c\u5ec3\u6b62\u3055\u308c\u307e\u3057\u305f\u3002 Python\u30b9\u30af\u30ea\u30d7\u30c8\u3068\u306e\u30c7\u30fc\u30bf\u9023\u643a\u6a5f\u80fd\uff08PyStrom\uff09\u304c\u5ec3\u6b62\u3055\u308c\u307e\u3057\u305f\u3002","title":"PG-Strom v3.0"},{"location":"release_v3.0/#pg-strom-v30","text":"PG-Strom Development Team (29-Jun-2021)","title":"PG-Strom v3.0\u30ea\u30ea\u30fc\u30b9"},{"location":"release_v3.0/#_1","text":"PG-Strom v3.0\u306b\u304a\u3051\u308b\u4e3b\u8981\u306a\u5909\u66f4\u306f\u70b9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 NVIDIA GPUDirect Storage (cuFile) \u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u3044\u304f\u3064\u304b\u306ePostGIS\u95a2\u6570\u304cGPU\u3067\u5b9f\u884c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002 GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u305fGpuJoin\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u65b0\u305f\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u6a5f\u80fd\u304c\u5b9f\u88c5\u3055\u308c\u307e\u3057\u305f\u3002 \u30e6\u30fc\u30b6\u5b9a\u7fa9\u306eGPU\u30c7\u30fc\u30bf\u578b/\u95a2\u6570/\u6f14\u7b97\u5b50\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002(\u5b9f\u9a13\u7684) \u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30e9\u30a4\u30bb\u30f3\u30b9\u3092GPLv2\u304b\u3089PostgreSQL\u30e9\u30a4\u30bb\u30f3\u30b9\u3078\u3068\u5207\u308a\u66ff\u3048\u307e\u3057\u305f\u3002","title":"\u6982\u8981"},{"location":"release_v3.0/#_2","text":"PostgreSQL v11, v12, v13 CUDA Toolkit 11.2 \u4ee5\u964d CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3 Intel x86 64bit \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3(x86_64) NVIDIA GPU CC 6.0 \u4ee5\u964d (Pascal\u4ee5\u964d)","title":"\u52d5\u4f5c\u74b0\u5883"},{"location":"release_v3.0/#nvidia-gpudirect-storage","text":"GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL \u7528\u306e\u30c9\u30e9\u30a4\u30d0\u3068\u3057\u3066\u3001\u5f93\u6765\u306e nvme_strom \u30ab\u30fc\u30cd\u30eb\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u52a0\u3048\u3066\u3001 NVIDIA\u304c\u958b\u767a\u3092\u9032\u3081\u3066\u3044\u308b GPUDirect Storage \u306b\u3082\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u3069\u3061\u3089\u306e\u30c9\u30e9\u30a4\u30d0\u3082\u6982\u306d\u540c\u7b49\u306e\u6a5f\u80fd\u3001\u6027\u80fd\u3092\u6709\u3057\u3066\u3044\u307e\u3059\u304c\u3001GPUDirect Storage\u306e\u5bfe\u5fdc\u306b\u3088\u308a\u3001\u5f93\u6765\u304b\u3089\u306e\u30ed\u30fc\u30ab\u30ebNVME-SSD\u306b\u52a0\u3048\u3066\u3001NVME-oF(NVME over Fabrics)\u30c7\u30d0\u30a4\u30b9\u3084SDS(Software Defined Storage)\u30c7\u30d0\u30a4\u30b9\u3001\u304a\u3088\u3073\u305d\u306e\u4e0a\u306b\u69cb\u7bc9\u3055\u308c\u305f\u5171\u6709\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u304b\u3089\u306eGPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u306b\u3082\u5bfe\u5fdc\u3059\u308b\u4e8b\u3068\u306a\u308a\u3001\u3088\u308a\u5927\u898f\u6a21\u3067\u67d4\u8edf\u306a\u30b9\u30c8\u30ec\u30fc\u30b8\u69cb\u6210\u3092\u53d6\u308b\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002 GPUDirect SQL\u306f\u3001PostgreSQL\u6a19\u6e96\u306eHeap\u30c6\u30fc\u30d6\u30eb\u3068Apache Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u51fa\u3057\u306b\u5229\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u3001\u3044\u305a\u308c\u306e\u5834\u5408\u306b\u304a\u3044\u3066\u3082\u3001\u30c6\u30fc\u30d6\u30eb\u30b9\u30ad\u30e3\u30f3\u304c\u30dc\u30c8\u30eb\u30cd\u30c3\u30af\u3068\u306a\u308b\u3088\u3046\u306a\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u304a\u3044\u3066\u9855\u8457\u306a\u9ad8\u901f\u5316\u304c\u671f\u5f85\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u6e2c\u5b9a\u7d50\u679c\u306f\u3001GPU 1\u53f0\u3068NVME-SSD 4\u53f0\u3092\u7528\u3044\u3066\u3001SSBM(Star Schema Benchmark)\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092GPUDirect SQL\u3092GPUDirect Storage\u30c9\u30e9\u30a4\u30d0\u306e\u4e0b\u3067\u5b9f\u884c\u3057\u305f\u3082\u306e\u3067\u3059\u304c\u3001PostgreSQL heap\u3068Apache Arrow\u306e\u3044\u305a\u308c\u306e\u30b1\u30fc\u30b9\u306b\u304a\u3044\u3066\u3082\u3001\u5358\u4f4d\u6642\u9593\u3042\u305f\u308a\u306e\u30c7\u30fc\u30bf\u51e6\u7406\u4ef6\u6570\u306fPostgreSQL\u306b\u6bd4\u3079\u5927\u5e45\u306b\u6539\u5584\u3057\u3066\u3044\u308b\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 \u307e\u305f\u3001\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u4e2d\u306eNVME-SSD\u304b\u3089\u306e\u8aad\u307f\u51fa\u3057\u30b9\u30eb\u30fc\u30d7\u30c3\u30c8\u3092\u6bd4\u8f03\u3057\u3066\u307f\u308b\u3068\u3001\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3092\u4ecb\u3057\u305f\u8aad\u51fa\u3057\uff08PostgreSQL Heap Storage\uff09\u306b\u6bd4\u3079\u3001GPUDirect Storage\u3092\u4f7f\u7528\u3057\u305f\u5834\u5408\u306b\u306f\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u9650\u754c\u306b\u8fd1\u3044\u6027\u80fd\u5024\u3092\u5f15\u304d\u51fa\u305b\u3066\u3044\u308b\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002","title":"NVIDIA GPUDirect Storage"},{"location":"release_v3.0/#gpupostgisgist","text":"\u3044\u304f\u3064\u304b\u306ePostGIS\u95a2\u6570\u306bGPU\u7248\u3092\u5b9f\u88c5\u3057\u307e\u3057\u305f\u3002 \u6761\u4ef6\u53e5\u3067\u3053\u308c\u3089\u306ePostGIS\u95a2\u6570\u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001PG-Strom\u306fGPU\u5074\u3067\u3053\u308c\u3092\u5b9f\u884c\u3059\u308b\u3088\u3046GPU\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u81ea\u52d5\u751f\u6210\u3057\u307e\u3059\u3002 GPU\u7248PostGIS\u306e\u4e3b\u305f\u308b\u30bf\u30fc\u30b2\u30c3\u30c8\u306f\u3001\u643a\u5e2f\u96fb\u8a71\u3084\u81ea\u52d5\u8eca\u3068\u3044\u3063\u305f\u79fb\u52d5\u4f53\u30c7\u30d0\u30a4\u30b9\u306e\u6700\u65b0\u306e\u4f4d\u7f6e\u60c5\u5831\uff08Real-time Location Data\uff09\u3068\u3001\u5e02\u533a\u753a\u6751\u3084\u5b66\u533a\u306e\u5883\u754c\u3068\u3044\u3063\u305f\u9818\u57df\uff08Area Definition Data\uff09\u3068\u306e\u9593\u3067\u884c\u308f\u308c\u308b\u7a81\u5408\u51e6\u7406\u3067\u3059\u3002 \u4f8b\u3048\u3070\u3001\u4e00\u5b9a\u306e\u30a8\u30ea\u30a2\u5185\u306b\u5b58\u5728\u3059\u308b\u643a\u5e2f\u96fb\u8a71\u306b\u5e83\u544a\u3092\u914d\u4fe1\u3057\u305f\u3044\u6642\u3001\u4e00\u5b9a\u306e\u30a8\u30ea\u30a2\u5185\u306b\u5b58\u5728\u3059\u308b\u81ea\u52d5\u8eca\u306b\u6e0b\u6ede\u60c5\u5831\u3092\u914d\u4fe1\u3057\u305f\u3044\u6642\u306a\u3069\u3001\u4f4d\u7f6e\u3092\u30ad\u30fc\u3068\u3057\u3066\u8a72\u5f53\u3059\u308b\u30c7\u30d0\u30a4\u30b9\u3092\u691c\u7d22\u3059\u308b\u51e6\u7406\u306b\u52b9\u679c\u3092\u767a\u63ee\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u6771\u4eac\u8fd1\u90ca\u30a8\u30ea\u30a2\u3092\u5305\u542b\u3059\u308b\u77e9\u5f62\u9818\u57df\u5185\u306b\u30e9\u30f3\u30c0\u30e0\u306a1600\u4e07\u500b\u306e\u70b9\u30c7\u30fc\u30bf\u3092\u4f5c\u6210\u3057\u3001\u5e02\u533a\u753a\u6751\u3054\u3068\u306b\u305d\u306e\u9818\u57df\u5185\u306b\u542b\u307e\u308c\u308b\u70b9\u306e\u6570\u3092\u30ab\u30a6\u30f3\u30c8\u3059\u308b\u3068\u3044\u3046\u51e6\u7406\u306e\u5fdc\u7b54\u6642\u9593\u3092\u8a08\u6e2c\u3057\u305f\u3082\u306e\u3067\u3059\u3002 \u901a\u5e38\u306ePostGIS\u3068GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u7d44\u307f\u5408\u308f\u305b\u3067\u306f160\u79d2\u4ee5\u4e0a\u3092\u8981\u3057\u305f\u51e6\u7406\u304c\u3001GPU\u7248PostGIS\u3068GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u7d44\u307f\u5408\u308f\u305b\u306b\u304a\u3044\u3066\u306f\u3001\u50c5\u304b0.830\u79d2\u3067\u5fdc\u7b54\u3057\u3066\u3044\u307e\u3059\u3002","title":"GPU\u7248PostGIS\u3068GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9"},{"location":"release_v3.0/#gpu","text":"GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u306b\u4e88\u3081\u9818\u57df\u3092\u78ba\u4fdd\u3057\u3066\u304a\u304d\u3001\u5bfe\u8c61\u3068\u306a\u308b\u30c6\u30fc\u30d6\u30eb\u306e\u8907\u88fd\u3092\u4fdd\u6301\u3057\u3066\u304a\u304f\u6a5f\u80fd\u3067\u3059\u3002 \u6bd4\u8f03\u7684\u5c0f\u898f\u6a21\u306e\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\uff08\uff5e10GB\u7a0b\u5ea6\uff09\u3067\u3001\u66f4\u65b0\u983b\u5ea6\u306e\u9ad8\u3044\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u5206\u6790/\u691c\u7d22\u7cfb\u306e\u30af\u30a8\u30ea\u3092\u52b9\u7387\u3088\u304f\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u3055\u308c\u307e\u3057\u305f\u3002 \u5206\u6790/\u691c\u7d22\u7cfb\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u6642\u306b\u306f\u3001GPU\u4e0a\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u53c2\u7167\u3059\u308b\u4e8b\u3067\u3001\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u3059\u4e8b\u306a\u304fGPU\u3067SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u51e6\u7406\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u5178\u578b\u7684\u306b\u306f\u3001\u6570\u767e\u4e07\u30c7\u30d0\u30a4\u30b9\u306e\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30c7\u30fc\u30bf\u3092GPU\u4e0a\u306b\u4fdd\u6301\u3057\u3066\u304a\u304d\u3001\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3084\u4f4d\u7f6e\u60c5\u5831\u306e\u66f4\u65b0\u304c\u9ad8\u983b\u5ea6\u3067\u767a\u751f\u3059\u308b\u3068\u3044\u3063\u305f\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3067\u3059\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u8a2d\u5b9a\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u3092\u66f4\u65b0\u3059\u308b\u3068\u3001\u305d\u306e\u66f4\u65b0\u5c65\u6b74\u3092\u30aa\u30f3\u30e1\u30e2\u30ea\u306eREDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u683c\u7d0d\u3057\u3001\u305d\u308c\u3092\u4e00\u5b9a\u9593\u9694\u304b\u3001\u307e\u305f\u306f\u5206\u6790/\u691c\u7d22\u7cfb\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u5b9f\u884c\u524d\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u5074\u306b\u53cd\u6620\u3057\u307e\u3059\u3002 \u3053\u306e\u4ed5\u7d44\u307f\u306b\u3088\u308a\u3001\u9ad8\u983b\u5ea6\u3067\u306e\u66f4\u65b0\u3068\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3068\u306e\u6574\u5408\u6027\u3068\u3092\u4e21\u7acb\u3057\u3066\u3044\u307e\u3059\u3002","title":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5"},{"location":"release_v3.0/#gpu_1","text":"\u30e6\u30fc\u30b6\u5b9a\u7fa9\u306eGPU\u30c7\u30fc\u30bf\u578b/\u95a2\u6570\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306eAPI\u3092\u65b0\u305f\u306b\u63d0\u4f9b\u3057\u307e\u3059\u3002 \u3053\u308c\u306b\u3088\u308a\u3001PG-Strom\u81ea\u4f53\u306b\u306f\u624b\u3092\u52a0\u3048\u308b\u3053\u3068\u306a\u304f\u3001\u30cb\u30c3\u30c1\u306a\u7528\u9014\u306e\u30c7\u30fc\u30bf\u578b\u3084\u305d\u308c\u3092\u51e6\u7406\u3059\u308b\u305f\u3081\u306eSQL\u95a2\u6570\u3092\u30e6\u30fc\u30b6\u304c\u72ec\u81ea\u306b\u5b9a\u7fa9\u3001\u5b9f\u88c5\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002 Notice \u672cAPI\u306f\u5b9f\u9a13\u7684\u30b9\u30c6\u30fc\u30bf\u30b9\u3067\u3042\u308a\u3001\u5c06\u6765\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u4e88\u544a\u306a\u304f\u5909\u66f4\u3055\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 \u307e\u305f\u3001\u672cAPI\u306e\u5229\u7528\u306b\u306fPG-Strom\u5185\u90e8\u69cb\u9020\u3092\u5341\u5206\u306b\u7406\u89e3\u3057\u3066\u3044\u308b\u4e8b\u304c\u524d\u63d0\u3067\u3059\u306e\u3067\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002","title":"\u30e6\u30fc\u30b6\u5b9a\u7fa9\u306eGPU\u30c7\u30fc\u30bf\u578b/\u95a2\u6570"},{"location":"release_v3.0/#postgresql","text":"PG-Strom v3.0\u4ee5\u964d\u3067\u306fPostgreSQL\u30e9\u30a4\u30bb\u30f3\u30b9\u3092\u63a1\u7528\u3057\u307e\u3059\u3002 \u6b74\u53f2\u7684\u306a\u7d4c\u7def\u306b\u3088\u308a\u3001\u3053\u308c\u307e\u3067\u306ePG-Strom\u3067\u306fGPLv2\u3092\u63a1\u7528\u3057\u3066\u3044\u307e\u3057\u305f\u304c\u3001PG-Strom\u30b3\u30a2\u6a5f\u80fd\u3084\u5468\u8fba\u30c4\u30fc\u30eb\u3068\u7d44\u307f\u5408\u308f\u305b\u305f\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u958b\u767a\u306b\u30e9\u30a4\u30bb\u30f3\u30b9\u4f53\u7cfb\u304c\u969c\u5bb3\u306b\u306a\u308b\u3068\u306e\u58f0\u3092\u8907\u6570\u3044\u305f\u3060\u3044\u3066\u3044\u307e\u3057\u305f\u3002","title":"PostgreSQL\u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u63a1\u7528"},{"location":"release_v3.0/#_3","text":"\u72ec\u81ea\u306b int1 (8bit\u6574\u6570) \u30c7\u30fc\u30bf\u578b\u3001\u304a\u3088\u3073\u95a2\u9023\u3059\u308b\u6f14\u7b97\u5b50\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 pg2arrow \u306b --inner-join \u304a\u3088\u3073 --outer-join \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002PostgreSQL\u306e\u5217\u6570\u5236\u9650\u3092\u8d8a\u3048\u305f\u6570\u306e\u5217\u3092\u6301\u3064Apache Arrow\u30d5\u30a1\u30a4\u30eb\u3092\u751f\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 \u30de\u30eb\u30c1GPU\u74b0\u5883\u3067\u306f\u3001GPU\u3054\u3068\u306b\u5c02\u7528\u306eGPU Memory Keeper\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u304c\u7acb\u3061\u4e0a\u304c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 PostgreSQL v13.x \u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 CUDA 11.2 \u304a\u3088\u3073 Ampere\u4e16\u4ee3\u306eGPU\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 ScaleFlux\u793e\u306eComputational Storage\u88fd\u54c1CSD2000\u30b7\u30ea\u30fc\u30ba\u3067\u306eGPUDirect SQL\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\uff08cuFile\u30c9\u30e9\u30a4\u30d0\u306e\u307f\uff09 \u96d1\u591a\u306a\u30d0\u30b0\u306e\u4fee\u6b63","title":"\u305d\u306e\u4ed6\u306e\u5909\u66f4"},{"location":"release_v3.0/#_4","text":"PostgreSQL v10.x \u7cfb\u5217\u306e\u30b5\u30dd\u30fc\u30c8\u304c\u5ec3\u6b62\u3055\u308c\u307e\u3057\u305f\u3002 Python\u30b9\u30af\u30ea\u30d7\u30c8\u3068\u306e\u30c7\u30fc\u30bf\u9023\u643a\u6a5f\u80fd\uff08PyStrom\uff09\u304c\u5ec3\u6b62\u3055\u308c\u307e\u3057\u305f\u3002","title":"\u5ec3\u6b62\u3055\u308c\u305f\u6a5f\u80fd"},{"location":"release_v5.0/","text":"PG-Strom v5.0\u30ea\u30ea\u30fc\u30b9 PG-Strom Development Team (15-Dec-2023) \u6982\u8981 PG-Strom v5.0\u306b\u304a\u3051\u308b\u4e3b\u8981\u306a\u5909\u66f4\u306f\u70b9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 \u30b3\u30fc\u30c9\u30d9\u30fc\u30b9\u3092\u4e00\u65b0\u3057\u3001\u5f93\u6765\u306e\u8a2d\u8a08\u306b\u304a\u3051\u308b\u554f\u984c\u70b9\u3092\u6539\u826f\u3057\u307e\u3057\u305f\u3002 \u30d7\u30ed\u30bb\u30b9\u30e2\u30c7\u30eb\u304c\u30de\u30eb\u30c1\u30d7\u30ed\u30bb\u30b9\u304b\u3089\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001GPU\u30ea\u30bd\u30fc\u30b9\u306e\u6d88\u8cbb\u91cf\u3092\u524a\u6e1b\u3057\u3001\u30bf\u30b9\u30af\u30b9\u30a4\u30c3\u30c1\u30f3\u30b0\u304c\u8efd\u91cf\u306b\u306a\u308a\u307e\u3057\u305f\u3002 GPU\u30c7\u30d0\u30a4\u30b9\u30b3\u30fc\u30c9\u306fCUDA C++\u3067\u52d5\u7684\u751f\u6210\u3055\u308c\u305f\u30cd\u30a4\u30c6\u30a3\u30d6\u30b3\u30fc\u30c9\u304b\u3089\u7591\u4f3c\u30b3\u30fc\u30c9\u3078\u3068\u7f6e\u304d\u63db\u3048\u3089\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u5b9f\u884c\u6642\u30b3\u30f3\u30d1\u30a4\u30eb(NVRTC)\u304c\u4e0d\u8981\u3068\u306a\u308a\u30af\u30a8\u30ea\u306e\u5fdc\u7b54\u901f\u5ea6\u304c\u5411\u4e0a\u3057\u305f\u307b\u304b\u3001\u5c06\u6765\u7684\u306bCSD(Computational Storage Drive)\u3084DPU(Data Processing Unit)\u3067\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u8a2d\u8a08\u5909\u66f4\u3067\u3059\u3002 GPU-Cache\u306fCUDA\u30de\u30cd\u30fc\u30b8\u30c9\u30e1\u30e2\u30ea\u4e0a\u306b\u5c55\u958b\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u30aa\u30fc\u30d0\u30fc\u30b3\u30df\u30c3\u30c8\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002 GPU\u30c7\u30d0\u30a4\u30b9\u30b3\u30fc\u30c9\u4e0a\u306ePostgreSQL\u30c7\u30fc\u30bf\u578b\u306e\u8868\u73fe\u304c\u3001Coalesced Memory Access\u3092\u610f\u8b58\u3057\u305f\u30ec\u30a4\u30a2\u30a6\u30c8\u306b\u5909\u308f\u308a\u307e\u3057\u305f\u3002 GpuPreAgg\u3067\u306eGROUP BY\u51e6\u7406\u304c\u4e00\u65b0\u3055\u308c\u3001\u5168\u822c\u7684\u306a\u51e6\u7406\u901f\u5ea6\u304c\u5411\u4e0a\u3057\u307e\u3057\u305f\u3002 GpuJoin\u306e\u6bb5\u6570\u304c\u6df1\u304f\u306a\u3063\u3066\u3082\u3001\u30bf\u30d7\u30eb\u306e\u5c55\u958b\u306f\u4e00\u56de\u3060\u3051\u3067\u6e08\u3080\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 Arrow_Fdw\u304a\u3088\u3073Pg2Arrow\u304cmin/max\u7d71\u8a08\u5024\u4ed8\u304d\u306eArrow\u30d5\u30a1\u30a4\u30eb\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30d1\u30b1\u30c3\u30c8\u3092\u30ad\u30e3\u30d7\u30c1\u30e3\u3059\u308bPcap2Arrow\u30c4\u30fc\u30eb\u3001\u304a\u3088\u3073Arrow\u30d5\u30a1\u30a4\u30eb\u3092CSV\u51fa\u529b\u3059\u308barrow2csv\u30c4\u30fc\u30eb\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002 \u52d5\u4f5c\u74b0\u5883 PostgreSQL v15.x, v16.x CUDA Toolkit 12.2 \u4ee5\u964d CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3 Intel x86 64bit \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3(x86_64) NVIDIA GPU CC 6.0 \u4ee5\u964d (Pascal\u4ee5\u964d; Volta\u4ee5\u964d\u3092\u63a8\u5968) \u30d7\u30ed\u30bb\u30b9\u30e2\u30c7\u30eb\u306e\u5909\u66f4 v5.0\u3067\u306f\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u306e\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\uff08PG-Strom GPU Service\uff09\u304cGPU\u306e\u30ea\u30bd\u30fc\u30b9\u7ba1\u7406\u3084\u30bf\u30b9\u30af\u6295\u5165\u3092\u7d71\u62ec\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u3001PostgreSQL\u306e\u5404\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30d7\u30ed\u30bb\u30b9\u306fIPC\u3092\u901a\u3058\u3066GPU Service\u3078\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u51fa\u3057\u3001\u7d50\u679c\u3092\u53d7\u3051\u53d6\u308b\u5f62\u306b\u6539\u3081\u3089\u308c\u307e\u3057\u305f\u3002 v3.x\u7cfb\u5217\u307e\u3067\u306fPostgreSQL\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u30d7\u30ed\u30bb\u30b9\u304c\u500b\u5225\u306bGPU\u3092\u5236\u5fa1\u3057\u3066\u3044\u307e\u3057\u305f\u3002\u3053\u306e\u8a2d\u8a08\u306f\u3001\u304b\u3064\u3066CUDA\u3084PG-Strom\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u54c1\u8cea\u304c\u5341\u5206\u3067\u306a\u3044\u6642\u4ee3\u306b\u554f\u984c\u7b87\u6240\u306e\u7279\u5b9a\u3092\u5bb9\u6613\u306b\u3059\u308b\u3068\u3044\u3046\u5229\u70b9\u304c\u3042\u3063\u305f\u3082\u306e\u306e\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30bb\u30c3\u30b7\u30e7\u30f3\u6570\u304c\u5897\u52a0\u3059\u308b\u3068\u6975\u7aef\u306bGPU\u30ea\u30bd\u30fc\u30b9\u3092\u6d88\u8cbb\u3057\u3001\u307e\u305f\u30bf\u30b9\u30af\u5207\u308a\u66ff\u3048\u306e\u89b3\u70b9\u304b\u3089\u3082\u975e\u63a8\u5968\u3068\u3055\u308c\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u69cb\u9020\u3067\u3057\u305f\u3002 \u3053\u306e\u8a2d\u8a08\u5909\u66f4\u306b\u3088\u308a\u3001PG-Strom v5.0\u306f\u540c\u6642\u5b9f\u884c\u6570\u306e\u5897\u52a0\u306b\u5bfe\u3057\u3066\u9811\u5f37\u306b\u306a\u3063\u305f\u4ed6\u3001\u9ad8\u8ca0\u8377\u306aGPU\u30bf\u30b9\u30af\u306e\u5b9f\u884c\u6027\u80fd\u304c\u5411\u4e0a\u3057\u3066\u3044\u307e\u3059\u3002 \u7591\u4f3c\u30b3\u30fc\u30c9\u306e\u5c0e\u5165 PG-Strom v5.0\u3067\u306f\u3001SQL\u304b\u3089\u72ec\u81ea\u306e\u300e\u7591\u4f3c\u30b3\u30fc\u30c9\u300f\u3092\u751f\u6210\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30b3\u30fc\u30c9\u306f\u3053\u306e\u300e\u7591\u4f3c\u30b3\u30fc\u30c9\u300f\u3092\u5b9f\u884c\u3059\u308b\u30a4\u30f3\u30bf\u30d7\u30ea\u30bf\u3068\u3057\u3066\u50cd\u304d\u307e\u3059\u3002v3.x\u7cfb\u5217\u306e\u3088\u3046\u306bCUDA C++\u306e\u30cd\u30a4\u30c6\u30a3\u30d6\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3059\u308b\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u3053\u308c\u306f\u4e00\u898b\u3001\u6027\u80fd\u4f4e\u4e0b\u306e\u8981\u56e0\u3068\u898b\u3048\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u3057\u304b\u3057\u3001\u5143\u3005\u52d5\u7684\u30b3\u30fc\u30c9\u751f\u6210\u306e\u5bfe\u8c61\u3068\u306a\u3063\u3066\u3044\u305f\u306e\u306fWHERE\u53e5\u306a\u3069\u30af\u30a8\u30ea\u306e\u5ea6\u306b\u5909\u5316\u3059\u308b\u3054\u304f\u4e00\u90e8\u5206\u3060\u3051\u3067\u3042\u308a\u3001\u5927\u534a\u306e\u5b9f\u88c5\u306f\u9759\u7684\u306b\u30d3\u30eb\u30c9\u3055\u308c\u3066\u3044\u305f\u307b\u304b\u3001NVRTC\u306b\u3088\u308b\u5b9f\u884c\u6642\u30b3\u30f3\u30d1\u30a4\u30eb\u306e\u51e6\u7406\uff08150ms\uff5e\u7a0b\u5ea6\uff09\u3092\u7701\u7565\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u305f\u3081\u3001\u5fdc\u7b54\u6642\u9593\u306e\u6539\u5584\u306b\u5bc4\u4e0e\u3057\u3066\u3044\u307e\u3059\u3002 \u300e\u7591\u4f3c\u30b3\u30fc\u30c9\u300f\u306fEXPLAIN VERBOSE\u306b\u3088\u3063\u3066\u8868\u793a\u3055\u308c\u308b\u4f4e\u30ec\u30d9\u30eb\u306a\u30b3\u30de\u30f3\u30c9\u30bb\u30c3\u30c8\u3067\u3001\u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306bWHERE\u53e5\u306b lo_quantity > 10 \u3068\u3044\u3046\u6f14\u7b97\u5f0f\u3092\u542b\u3080\u30af\u30a8\u30ea\u306f\u3001 Scan Quals OpCode \u3068\u3057\u3066 lo_quantity \u5217\u3068\u5b9a\u6570 10 \u3068\u306e\u5927\u5c0f\u95a2\u4fc2\u3092\u6bd4\u8f03\u3059\u308b numeric_gt \u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u3088\u3046\u51e6\u7406\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002 postgres=# explain verbose select count(*), sum(lo_quantity), lo_shipmode from lineorder where lo_quantity > 10 group by lo_shipmode; QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- HashAggregate (cost=3242387.01..3242387.10 rows=7 width=51) Output: pgstrom.fcount((pgstrom.nrows())), pgstrom.sum_fp_num((pgstrom.psum((lo_quantity)::double precision))), lo_shipmode Group Key: lineorder.lo_shipmode -> Custom Scan (GpuPreAgg) on public.lineorder (cost=3242386.89..3242386.96 rows=7 width=51) Output: (pgstrom.nrows()), (pgstrom.psum((lo_quantity)::double precision)), lo_shipmode GPU Projection: pgstrom.nrows(), pgstrom.psum((lo_quantity)::double precision), lo_shipmode GPU Scan Quals: (lo_quantity > '10'::numeric) [rows: 600128800 -> 479262800] GPU-Direct SQL: enabled (GPU-0) KVars-Slot: , , , KVecs-Buffer: nbytes: 83968, ndims: 2, items=[kvec0=<0x0000-dfff, type='numeric', expr='lo_quantity'>, kvec1=<0xe000-147ff, type='bpchar', expr='lo_shipmode'>] LoadVars OpCode: {Packed items[0]={LoadVars(depth=0): kvars=[, ]}} MoveVars OpCode: {Packed items[0]={MoveVars(depth=0): items=[, ]}}} Scan Quals OpCode: {Func(bool)::numeric_gt args=[{Var(numeric): slot=0, expr='lo_quantity'}, {Const(numeric): value='10'}]} Group-By KeyHash OpCode: {HashValue arg={SaveExpr: arg={Var(bpchar): kvec=0xe000-14800, expr='lo_shipmode'}}} Group-By KeyLoad OpCode: {LoadVars(depth=-2): kvars=[]} Group-By KeyComp OpCode: {Func(bool)::bpchareq args=[{Var(bpchar): slot=1, expr='lo_shipmode'}, {Var(bpchar): slot=2, expr='lo_shipmode'}]} Partial Aggregation OpCode: {AggFuncs args=[{SaveExpr: arg={Func(float8)::float8 arg={Var(numeric): kvec=0x0000-e000, expr='lo_quantity'}}}, {SaveExpr: arg={Var(bpchar): kvec=0xe000-14800, expr='lo_shipmode'}}]} Partial Function BufSz: 24 (18 rows) \u73fe\u5728\u306f\u307e\u3060\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u304c\u3001\u3053\u306e\u7591\u4f3c\u30b3\u30fc\u30c9\u306f\u3001\u5c06\u6765\u7684\u306bCSD(Computational Storage Drive)\u3084DPU(Data Processing Unit)\u3067SQL\u51e6\u7406\u3092\u30aa\u30d5\u30ed\u30fc\u30c9\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u30c7\u30fc\u30bf\u30ec\u30a4\u30a2\u30a6\u30c8\u306e\u6539\u5584 CPU\u3068\u6bd4\u8f03\u3057\u3066\u3001GPU\u306f\u5e83\u5e2f\u57df\u306a\u30e1\u30e2\u30ea\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u306e\u6027\u80fd\u3092\u5f15\u304d\u51fa\u3059\u306b\u306f\u8fd1\u508d\u306e\u30e1\u30e2\u30ea\u9818\u57df\u3092\u540c\u3058\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u30a2\u30af\u30bb\u30b9\u3059\u308bCoalesced Memory Access\u306e\u6761\u4ef6\u3092\u6e80\u305f\u3059\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 v5.0\u3067\u306fGPU\u30c7\u30d0\u30a4\u30b9\u30b3\u30fc\u30c9\u306b\u304a\u3051\u308bPostgreSQL\u30c7\u30fc\u30bf\u578b\u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u304c\u6539\u826f\u3055\u308c\u3001Coalesced Memory Access\u306b\u9069\u3057\u305f\u5f62\u5f0f\u3068\u306a\u308a\u307e\u3057\u305f\u3002 PostgreSQL\u306e\u30c7\u30fc\u30bf\u578b\u3092\u305d\u306e\u307e\u307e\u5229\u7528\u3057\u305f\u5834\u5408\u3001\u3042\u308b\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u53c2\u7167\u3055\u308c\u308b\u30d5\u30a3\u30fc\u30eb\u30c9\u306f\u98db\u3073\u98db\u3073\u306e\u4f4d\u7f6e\u3092\u53d6\u308b\u4e8b\u306b\u306a\u308a\u3001DRAM\u304b\u3089\u306e\u8aad\u51fa\u3057\u5e2f\u57df\u3092\u6709\u52b9\u306b\u6d3b\u7528\u3067\u304d\u307e\u305b\u3093\u3002\u3053\u308c\u3092\u30d5\u30a3\u30fc\u30eb\u30c9\u6bce\u306b\u8907\u6570\u500b\u307e\u3068\u3081\u3066\u914d\u7f6e\u3059\u308b\u4e8b\u3067\u3001\u96a3\u63a5\u30b3\u30a2\u304c\u96a3\u63a5\u9818\u57df\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u305b\u308b\u3088\u3046\u306b\u306a\u308a\u3001Coalesced Memory Access\u306e\u6761\u4ef6\u3092\u6e80\u305f\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002 \u3053\u306e\u6539\u826f\u306f\u3001\u6975\u3081\u3066\u9ad8\u6027\u80fd\u306a\u30e1\u30e2\u30ea\u5e2f\u57df\u3092\u6301\u3064\u30cf\u30a4\u30a8\u30f3\u30c9GPU\u88fd\u54c1\u3060\u3051\u3067\u306a\u304f\u3001\u30df\u30c9\u30eb\u30a8\u30f3\u30c9\u7d1a\u306eGPU\u3067\u3082\u5341\u5206\u306a\u5b9f\u884c\u6027\u80fd\u3092\u5f15\u304d\u51fa\u3059\u305f\u3081\u306e\u3082\u306e\u3067\u3059\u3002 Arrow_Fdw\u306e\u7d71\u8a08\u60c5\u5831\u30b5\u30dd\u30fc\u30c8 Pg2Arrow\u3067min/max\u7d71\u8a08\u60c5\u5831\u4ed8\u304d\u306eApache Arrow\u30d5\u30a1\u30a4\u30eb\u3092\u751f\u6210\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 Pg2Arrow\u306e\u65b0\u305f\u306a\u30aa\u30d7\u30b7\u30e7\u30f3 --stat=COLUMN_NAME \u306f\u3001RecordBatch\u5358\u4f4d\u3067\u6307\u5b9a\u3057\u305f\u5217\u306e\u6700\u5927\u5024/\u6700\u5c0f\u5024\u3092\u8a18\u9332\u3057\u3066\u304a\u304d\u3001\u305d\u308c\u3092Apache Arrow\u306eCustom-Metadata\u30e1\u30ab\u30cb\u30ba\u30e0\u3092\u5229\u7528\u3057\u3066\u30d5\u30c3\u30bf\u306b\u57cb\u3081\u8fbc\u307f\u307e\u3059\u3002 Arrow_Fdw\u3092\u4ecb\u3057\u3066Apache Arrow\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u51fa\u3059\u969b\u3001\u4e0a\u8a18\u306emin/max\u7d71\u8a08\u60c5\u5831\u3092\u5229\u7528\u3057\u305f\u7bc4\u56f2\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30b9\u30ad\u30e3\u30f3\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 \u4f8b\u3048\u3070\u3001Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3059\u308b\u691c\u7d22\u6761\u4ef6\u304c\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u3067\u3042\u3063\u305f\u5834\u5408\u3001 WHERE ymd BETERRN '2020-01-01'::date AND '2021-12-31'::date ymd\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u6700\u5927\u5024\u304c '2020-01-01'::date \u672a\u6e80\u3067\u3042\u308bRecord Batch\u3084\u3001 ymd\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u6700\u5c0f\u5024\u304c '2021-12-31 ::date`\u3088\u308a\u5927\u304d\u306aRecord Batch\u306f\u3001 \u691c\u7d22\u6761\u4ef6\u306b\u30de\u30c3\u30c1\u3057\u306a\u3044\u4e8b\u304c\u660e\u3089\u304b\u3067\u3042\u308b\u305f\u3081\u3001Arrow_Fdw\u306f\u3053\u306eRecord Batch\u3092\u8aad\u307f\u98db\u3070\u3057\u307e\u3059\u3002 \u3053\u308c\u306b\u3088\u308a\u3001\u4f8b\u3048\u3070\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u306a\u3069\u3001\u8fd1\u3057\u3044\u5024\u3092\u6301\u3064\u30ec\u30b3\u30fc\u30c9\u304c\u8fd1\u508d\u306b\u96c6\u307e\u3063\u3066\u3044\u308b\u30d1\u30bf\u30fc\u30f3\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u304a\u3044\u3066\u306f\u3001\u7bc4\u56f2\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u7528\u3044\u305f\u7d5e\u8fbc\u307f\u3068\u540c\u7b49\u306e\u6027\u80fd\u304c\u5f97\u3089\u308c\u307e\u3059\u3002 \u305d\u306e\u4ed6\u306e\u5909\u66f4\u70b9 PostgreSQL v14 \u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002v15\u4ee5\u964d\u3078\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3092\u304a\u9858\u3044\u3057\u307e\u3059\u3002 Partition-wise GpuJoin\u6a5f\u80fd\u306b\u95a2\u3057\u3066\u306f\u3001\u958b\u767a\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u4e0a\u306e\u7406\u7531\u306b\u3088\u308a\u3001v5.0\u3067\u306f\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u5c06\u6765\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u518d\u3073\u5b9f\u88c5\u3055\u308c\u308b\u4e88\u5b9a\u3067\u3059\u3002","title":"PG-Strom v5.0"},{"location":"release_v5.0/#pg-strom-v50","text":"PG-Strom Development Team (15-Dec-2023)","title":"PG-Strom v5.0\u30ea\u30ea\u30fc\u30b9"},{"location":"release_v5.0/#_1","text":"PG-Strom v5.0\u306b\u304a\u3051\u308b\u4e3b\u8981\u306a\u5909\u66f4\u306f\u70b9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 \u30b3\u30fc\u30c9\u30d9\u30fc\u30b9\u3092\u4e00\u65b0\u3057\u3001\u5f93\u6765\u306e\u8a2d\u8a08\u306b\u304a\u3051\u308b\u554f\u984c\u70b9\u3092\u6539\u826f\u3057\u307e\u3057\u305f\u3002 \u30d7\u30ed\u30bb\u30b9\u30e2\u30c7\u30eb\u304c\u30de\u30eb\u30c1\u30d7\u30ed\u30bb\u30b9\u304b\u3089\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001GPU\u30ea\u30bd\u30fc\u30b9\u306e\u6d88\u8cbb\u91cf\u3092\u524a\u6e1b\u3057\u3001\u30bf\u30b9\u30af\u30b9\u30a4\u30c3\u30c1\u30f3\u30b0\u304c\u8efd\u91cf\u306b\u306a\u308a\u307e\u3057\u305f\u3002 GPU\u30c7\u30d0\u30a4\u30b9\u30b3\u30fc\u30c9\u306fCUDA C++\u3067\u52d5\u7684\u751f\u6210\u3055\u308c\u305f\u30cd\u30a4\u30c6\u30a3\u30d6\u30b3\u30fc\u30c9\u304b\u3089\u7591\u4f3c\u30b3\u30fc\u30c9\u3078\u3068\u7f6e\u304d\u63db\u3048\u3089\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u5b9f\u884c\u6642\u30b3\u30f3\u30d1\u30a4\u30eb(NVRTC)\u304c\u4e0d\u8981\u3068\u306a\u308a\u30af\u30a8\u30ea\u306e\u5fdc\u7b54\u901f\u5ea6\u304c\u5411\u4e0a\u3057\u305f\u307b\u304b\u3001\u5c06\u6765\u7684\u306bCSD(Computational Storage Drive)\u3084DPU(Data Processing Unit)\u3067\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u8a2d\u8a08\u5909\u66f4\u3067\u3059\u3002 GPU-Cache\u306fCUDA\u30de\u30cd\u30fc\u30b8\u30c9\u30e1\u30e2\u30ea\u4e0a\u306b\u5c55\u958b\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u30aa\u30fc\u30d0\u30fc\u30b3\u30df\u30c3\u30c8\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002 GPU\u30c7\u30d0\u30a4\u30b9\u30b3\u30fc\u30c9\u4e0a\u306ePostgreSQL\u30c7\u30fc\u30bf\u578b\u306e\u8868\u73fe\u304c\u3001Coalesced Memory Access\u3092\u610f\u8b58\u3057\u305f\u30ec\u30a4\u30a2\u30a6\u30c8\u306b\u5909\u308f\u308a\u307e\u3057\u305f\u3002 GpuPreAgg\u3067\u306eGROUP BY\u51e6\u7406\u304c\u4e00\u65b0\u3055\u308c\u3001\u5168\u822c\u7684\u306a\u51e6\u7406\u901f\u5ea6\u304c\u5411\u4e0a\u3057\u307e\u3057\u305f\u3002 GpuJoin\u306e\u6bb5\u6570\u304c\u6df1\u304f\u306a\u3063\u3066\u3082\u3001\u30bf\u30d7\u30eb\u306e\u5c55\u958b\u306f\u4e00\u56de\u3060\u3051\u3067\u6e08\u3080\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 Arrow_Fdw\u304a\u3088\u3073Pg2Arrow\u304cmin/max\u7d71\u8a08\u5024\u4ed8\u304d\u306eArrow\u30d5\u30a1\u30a4\u30eb\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30d1\u30b1\u30c3\u30c8\u3092\u30ad\u30e3\u30d7\u30c1\u30e3\u3059\u308bPcap2Arrow\u30c4\u30fc\u30eb\u3001\u304a\u3088\u3073Arrow\u30d5\u30a1\u30a4\u30eb\u3092CSV\u51fa\u529b\u3059\u308barrow2csv\u30c4\u30fc\u30eb\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002","title":"\u6982\u8981"},{"location":"release_v5.0/#_2","text":"PostgreSQL v15.x, v16.x CUDA Toolkit 12.2 \u4ee5\u964d CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3 Intel x86 64bit \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3(x86_64) NVIDIA GPU CC 6.0 \u4ee5\u964d (Pascal\u4ee5\u964d; Volta\u4ee5\u964d\u3092\u63a8\u5968)","title":"\u52d5\u4f5c\u74b0\u5883"},{"location":"release_v5.0/#_3","text":"v5.0\u3067\u306f\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u306e\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\uff08PG-Strom GPU Service\uff09\u304cGPU\u306e\u30ea\u30bd\u30fc\u30b9\u7ba1\u7406\u3084\u30bf\u30b9\u30af\u6295\u5165\u3092\u7d71\u62ec\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u3001PostgreSQL\u306e\u5404\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30d7\u30ed\u30bb\u30b9\u306fIPC\u3092\u901a\u3058\u3066GPU Service\u3078\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u51fa\u3057\u3001\u7d50\u679c\u3092\u53d7\u3051\u53d6\u308b\u5f62\u306b\u6539\u3081\u3089\u308c\u307e\u3057\u305f\u3002 v3.x\u7cfb\u5217\u307e\u3067\u306fPostgreSQL\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u30d7\u30ed\u30bb\u30b9\u304c\u500b\u5225\u306bGPU\u3092\u5236\u5fa1\u3057\u3066\u3044\u307e\u3057\u305f\u3002\u3053\u306e\u8a2d\u8a08\u306f\u3001\u304b\u3064\u3066CUDA\u3084PG-Strom\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u54c1\u8cea\u304c\u5341\u5206\u3067\u306a\u3044\u6642\u4ee3\u306b\u554f\u984c\u7b87\u6240\u306e\u7279\u5b9a\u3092\u5bb9\u6613\u306b\u3059\u308b\u3068\u3044\u3046\u5229\u70b9\u304c\u3042\u3063\u305f\u3082\u306e\u306e\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30bb\u30c3\u30b7\u30e7\u30f3\u6570\u304c\u5897\u52a0\u3059\u308b\u3068\u6975\u7aef\u306bGPU\u30ea\u30bd\u30fc\u30b9\u3092\u6d88\u8cbb\u3057\u3001\u307e\u305f\u30bf\u30b9\u30af\u5207\u308a\u66ff\u3048\u306e\u89b3\u70b9\u304b\u3089\u3082\u975e\u63a8\u5968\u3068\u3055\u308c\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u69cb\u9020\u3067\u3057\u305f\u3002 \u3053\u306e\u8a2d\u8a08\u5909\u66f4\u306b\u3088\u308a\u3001PG-Strom v5.0\u306f\u540c\u6642\u5b9f\u884c\u6570\u306e\u5897\u52a0\u306b\u5bfe\u3057\u3066\u9811\u5f37\u306b\u306a\u3063\u305f\u4ed6\u3001\u9ad8\u8ca0\u8377\u306aGPU\u30bf\u30b9\u30af\u306e\u5b9f\u884c\u6027\u80fd\u304c\u5411\u4e0a\u3057\u3066\u3044\u307e\u3059\u3002","title":"\u30d7\u30ed\u30bb\u30b9\u30e2\u30c7\u30eb\u306e\u5909\u66f4"},{"location":"release_v5.0/#_4","text":"PG-Strom v5.0\u3067\u306f\u3001SQL\u304b\u3089\u72ec\u81ea\u306e\u300e\u7591\u4f3c\u30b3\u30fc\u30c9\u300f\u3092\u751f\u6210\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30b3\u30fc\u30c9\u306f\u3053\u306e\u300e\u7591\u4f3c\u30b3\u30fc\u30c9\u300f\u3092\u5b9f\u884c\u3059\u308b\u30a4\u30f3\u30bf\u30d7\u30ea\u30bf\u3068\u3057\u3066\u50cd\u304d\u307e\u3059\u3002v3.x\u7cfb\u5217\u306e\u3088\u3046\u306bCUDA C++\u306e\u30cd\u30a4\u30c6\u30a3\u30d6\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3059\u308b\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u3053\u308c\u306f\u4e00\u898b\u3001\u6027\u80fd\u4f4e\u4e0b\u306e\u8981\u56e0\u3068\u898b\u3048\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u3057\u304b\u3057\u3001\u5143\u3005\u52d5\u7684\u30b3\u30fc\u30c9\u751f\u6210\u306e\u5bfe\u8c61\u3068\u306a\u3063\u3066\u3044\u305f\u306e\u306fWHERE\u53e5\u306a\u3069\u30af\u30a8\u30ea\u306e\u5ea6\u306b\u5909\u5316\u3059\u308b\u3054\u304f\u4e00\u90e8\u5206\u3060\u3051\u3067\u3042\u308a\u3001\u5927\u534a\u306e\u5b9f\u88c5\u306f\u9759\u7684\u306b\u30d3\u30eb\u30c9\u3055\u308c\u3066\u3044\u305f\u307b\u304b\u3001NVRTC\u306b\u3088\u308b\u5b9f\u884c\u6642\u30b3\u30f3\u30d1\u30a4\u30eb\u306e\u51e6\u7406\uff08150ms\uff5e\u7a0b\u5ea6\uff09\u3092\u7701\u7565\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u305f\u3081\u3001\u5fdc\u7b54\u6642\u9593\u306e\u6539\u5584\u306b\u5bc4\u4e0e\u3057\u3066\u3044\u307e\u3059\u3002 \u300e\u7591\u4f3c\u30b3\u30fc\u30c9\u300f\u306fEXPLAIN VERBOSE\u306b\u3088\u3063\u3066\u8868\u793a\u3055\u308c\u308b\u4f4e\u30ec\u30d9\u30eb\u306a\u30b3\u30de\u30f3\u30c9\u30bb\u30c3\u30c8\u3067\u3001\u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306bWHERE\u53e5\u306b lo_quantity > 10 \u3068\u3044\u3046\u6f14\u7b97\u5f0f\u3092\u542b\u3080\u30af\u30a8\u30ea\u306f\u3001 Scan Quals OpCode \u3068\u3057\u3066 lo_quantity \u5217\u3068\u5b9a\u6570 10 \u3068\u306e\u5927\u5c0f\u95a2\u4fc2\u3092\u6bd4\u8f03\u3059\u308b numeric_gt \u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u3088\u3046\u51e6\u7406\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002 postgres=# explain verbose select count(*), sum(lo_quantity), lo_shipmode from lineorder where lo_quantity > 10 group by lo_shipmode; QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- HashAggregate (cost=3242387.01..3242387.10 rows=7 width=51) Output: pgstrom.fcount((pgstrom.nrows())), pgstrom.sum_fp_num((pgstrom.psum((lo_quantity)::double precision))), lo_shipmode Group Key: lineorder.lo_shipmode -> Custom Scan (GpuPreAgg) on public.lineorder (cost=3242386.89..3242386.96 rows=7 width=51) Output: (pgstrom.nrows()), (pgstrom.psum((lo_quantity)::double precision)), lo_shipmode GPU Projection: pgstrom.nrows(), pgstrom.psum((lo_quantity)::double precision), lo_shipmode GPU Scan Quals: (lo_quantity > '10'::numeric) [rows: 600128800 -> 479262800] GPU-Direct SQL: enabled (GPU-0) KVars-Slot: , , , KVecs-Buffer: nbytes: 83968, ndims: 2, items=[kvec0=<0x0000-dfff, type='numeric', expr='lo_quantity'>, kvec1=<0xe000-147ff, type='bpchar', expr='lo_shipmode'>] LoadVars OpCode: {Packed items[0]={LoadVars(depth=0): kvars=[, ]}} MoveVars OpCode: {Packed items[0]={MoveVars(depth=0): items=[, ]}}} Scan Quals OpCode: {Func(bool)::numeric_gt args=[{Var(numeric): slot=0, expr='lo_quantity'}, {Const(numeric): value='10'}]} Group-By KeyHash OpCode: {HashValue arg={SaveExpr: arg={Var(bpchar): kvec=0xe000-14800, expr='lo_shipmode'}}} Group-By KeyLoad OpCode: {LoadVars(depth=-2): kvars=[]} Group-By KeyComp OpCode: {Func(bool)::bpchareq args=[{Var(bpchar): slot=1, expr='lo_shipmode'}, {Var(bpchar): slot=2, expr='lo_shipmode'}]} Partial Aggregation OpCode: {AggFuncs args=[{SaveExpr: arg={Func(float8)::float8 arg={Var(numeric): kvec=0x0000-e000, expr='lo_quantity'}}}, {SaveExpr: arg={Var(bpchar): kvec=0xe000-14800, expr='lo_shipmode'}}]} Partial Function BufSz: 24 (18 rows) \u73fe\u5728\u306f\u307e\u3060\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u304c\u3001\u3053\u306e\u7591\u4f3c\u30b3\u30fc\u30c9\u306f\u3001\u5c06\u6765\u7684\u306bCSD(Computational Storage Drive)\u3084DPU(Data Processing Unit)\u3067SQL\u51e6\u7406\u3092\u30aa\u30d5\u30ed\u30fc\u30c9\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u3055\u308c\u3066\u3044\u307e\u3059\u3002","title":"\u7591\u4f3c\u30b3\u30fc\u30c9\u306e\u5c0e\u5165"},{"location":"release_v5.0/#_5","text":"CPU\u3068\u6bd4\u8f03\u3057\u3066\u3001GPU\u306f\u5e83\u5e2f\u57df\u306a\u30e1\u30e2\u30ea\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u306e\u6027\u80fd\u3092\u5f15\u304d\u51fa\u3059\u306b\u306f\u8fd1\u508d\u306e\u30e1\u30e2\u30ea\u9818\u57df\u3092\u540c\u3058\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u30a2\u30af\u30bb\u30b9\u3059\u308bCoalesced Memory Access\u306e\u6761\u4ef6\u3092\u6e80\u305f\u3059\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 v5.0\u3067\u306fGPU\u30c7\u30d0\u30a4\u30b9\u30b3\u30fc\u30c9\u306b\u304a\u3051\u308bPostgreSQL\u30c7\u30fc\u30bf\u578b\u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u304c\u6539\u826f\u3055\u308c\u3001Coalesced Memory Access\u306b\u9069\u3057\u305f\u5f62\u5f0f\u3068\u306a\u308a\u307e\u3057\u305f\u3002 PostgreSQL\u306e\u30c7\u30fc\u30bf\u578b\u3092\u305d\u306e\u307e\u307e\u5229\u7528\u3057\u305f\u5834\u5408\u3001\u3042\u308b\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u53c2\u7167\u3055\u308c\u308b\u30d5\u30a3\u30fc\u30eb\u30c9\u306f\u98db\u3073\u98db\u3073\u306e\u4f4d\u7f6e\u3092\u53d6\u308b\u4e8b\u306b\u306a\u308a\u3001DRAM\u304b\u3089\u306e\u8aad\u51fa\u3057\u5e2f\u57df\u3092\u6709\u52b9\u306b\u6d3b\u7528\u3067\u304d\u307e\u305b\u3093\u3002\u3053\u308c\u3092\u30d5\u30a3\u30fc\u30eb\u30c9\u6bce\u306b\u8907\u6570\u500b\u307e\u3068\u3081\u3066\u914d\u7f6e\u3059\u308b\u4e8b\u3067\u3001\u96a3\u63a5\u30b3\u30a2\u304c\u96a3\u63a5\u9818\u57df\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u305b\u308b\u3088\u3046\u306b\u306a\u308a\u3001Coalesced Memory Access\u306e\u6761\u4ef6\u3092\u6e80\u305f\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002 \u3053\u306e\u6539\u826f\u306f\u3001\u6975\u3081\u3066\u9ad8\u6027\u80fd\u306a\u30e1\u30e2\u30ea\u5e2f\u57df\u3092\u6301\u3064\u30cf\u30a4\u30a8\u30f3\u30c9GPU\u88fd\u54c1\u3060\u3051\u3067\u306a\u304f\u3001\u30df\u30c9\u30eb\u30a8\u30f3\u30c9\u7d1a\u306eGPU\u3067\u3082\u5341\u5206\u306a\u5b9f\u884c\u6027\u80fd\u3092\u5f15\u304d\u51fa\u3059\u305f\u3081\u306e\u3082\u306e\u3067\u3059\u3002","title":"\u30c7\u30fc\u30bf\u30ec\u30a4\u30a2\u30a6\u30c8\u306e\u6539\u5584"},{"location":"release_v5.0/#arrow_fdw","text":"Pg2Arrow\u3067min/max\u7d71\u8a08\u60c5\u5831\u4ed8\u304d\u306eApache Arrow\u30d5\u30a1\u30a4\u30eb\u3092\u751f\u6210\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 Pg2Arrow\u306e\u65b0\u305f\u306a\u30aa\u30d7\u30b7\u30e7\u30f3 --stat=COLUMN_NAME \u306f\u3001RecordBatch\u5358\u4f4d\u3067\u6307\u5b9a\u3057\u305f\u5217\u306e\u6700\u5927\u5024/\u6700\u5c0f\u5024\u3092\u8a18\u9332\u3057\u3066\u304a\u304d\u3001\u305d\u308c\u3092Apache Arrow\u306eCustom-Metadata\u30e1\u30ab\u30cb\u30ba\u30e0\u3092\u5229\u7528\u3057\u3066\u30d5\u30c3\u30bf\u306b\u57cb\u3081\u8fbc\u307f\u307e\u3059\u3002 Arrow_Fdw\u3092\u4ecb\u3057\u3066Apache Arrow\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u51fa\u3059\u969b\u3001\u4e0a\u8a18\u306emin/max\u7d71\u8a08\u60c5\u5831\u3092\u5229\u7528\u3057\u305f\u7bc4\u56f2\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30b9\u30ad\u30e3\u30f3\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 \u4f8b\u3048\u3070\u3001Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3059\u308b\u691c\u7d22\u6761\u4ef6\u304c\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u3067\u3042\u3063\u305f\u5834\u5408\u3001 WHERE ymd BETERRN '2020-01-01'::date AND '2021-12-31'::date ymd\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u6700\u5927\u5024\u304c '2020-01-01'::date \u672a\u6e80\u3067\u3042\u308bRecord Batch\u3084\u3001 ymd\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u6700\u5c0f\u5024\u304c '2021-12-31 ::date`\u3088\u308a\u5927\u304d\u306aRecord Batch\u306f\u3001 \u691c\u7d22\u6761\u4ef6\u306b\u30de\u30c3\u30c1\u3057\u306a\u3044\u4e8b\u304c\u660e\u3089\u304b\u3067\u3042\u308b\u305f\u3081\u3001Arrow_Fdw\u306f\u3053\u306eRecord Batch\u3092\u8aad\u307f\u98db\u3070\u3057\u307e\u3059\u3002 \u3053\u308c\u306b\u3088\u308a\u3001\u4f8b\u3048\u3070\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u306a\u3069\u3001\u8fd1\u3057\u3044\u5024\u3092\u6301\u3064\u30ec\u30b3\u30fc\u30c9\u304c\u8fd1\u508d\u306b\u96c6\u307e\u3063\u3066\u3044\u308b\u30d1\u30bf\u30fc\u30f3\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u304a\u3044\u3066\u306f\u3001\u7bc4\u56f2\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u7528\u3044\u305f\u7d5e\u8fbc\u307f\u3068\u540c\u7b49\u306e\u6027\u80fd\u304c\u5f97\u3089\u308c\u307e\u3059\u3002","title":"Arrow_Fdw\u306e\u7d71\u8a08\u60c5\u5831\u30b5\u30dd\u30fc\u30c8"},{"location":"release_v5.0/#_6","text":"PostgreSQL v14 \u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002v15\u4ee5\u964d\u3078\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3092\u304a\u9858\u3044\u3057\u307e\u3059\u3002 Partition-wise GpuJoin\u6a5f\u80fd\u306b\u95a2\u3057\u3066\u306f\u3001\u958b\u767a\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u4e0a\u306e\u7406\u7531\u306b\u3088\u308a\u3001v5.0\u3067\u306f\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u5c06\u6765\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u518d\u3073\u5b9f\u88c5\u3055\u308c\u308b\u4e88\u5b9a\u3067\u3059\u3002","title":"\u305d\u306e\u4ed6\u306e\u5909\u66f4\u70b9"},{"location":"release_v5.1/","text":"PG-Strom v5.1\u30ea\u30ea\u30fc\u30b9 PG-Strom Development Team (17-Apr-2024) \u6982\u8981 PG-Strom v5.1\u306b\u304a\u3051\u308b\u4e3b\u8981\u306a\u5909\u66f4\u306f\u70b9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 \u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306b\u5bfe\u5fdc\u3057\u305fGpuJoin/PreAgg\u306e\u30b5\u30dd\u30fc\u30c8\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002 GPU\u30b3\u30fc\u30c9\u306e\u30d3\u30eb\u30c9\u3092\u8d77\u52d5\u6642\u306b\u5b9f\u884c\u74b0\u5883\u3067\u884c\u3046\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 pg2arrow\u304c\u4e26\u5217\u51e6\u7406\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 CUDA Stack\u306e\u30b5\u30a4\u30ba\u3092\u9069\u5fdc\u7684\u306b\u8a2d\u5b9a\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u7d2f\u7a4d\u7684\u306a\u30d0\u30b0\u306e\u4fee\u6b63 \u52d5\u4f5c\u74b0\u5883 PostgreSQL v15.x, v16.x CUDA Toolkit 12.2 \u4ee5\u964d CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3 Intel x86 64bit \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3(x86_64) NVIDIA GPU CC 6.0 \u4ee5\u964d (Pascal\u4ee5\u964d; Volta\u4ee5\u964d\u3092\u63a8\u5968) \u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5bfe\u5fdc PostgreSQL\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3078\u306e\u5bfe\u5fdc\u81ea\u4f53\u306fPG-Strom v3.0\u3067\u3082\u884c\u308f\u308c\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u3046\u307e\u304f\u5b9f\u884c\u8a08\u753b\u3092\u4f5c\u6210\u3067\u304d\u306a\u3044\u4e8b\u304c\u591a\u304f\u3001\u5b9f\u9a13\u7684\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u8131\u3059\u308b\u4e8b\u306e\u3067\u304d\u306a\u3044\u3082\u306e\u3067\u3057\u305f\u3002\u305d\u3053\u3067\u3001PG-Strom v5.1\u3067\u306f\u5185\u90e8\u306e\u8a2d\u8a08\u3092\u6839\u672c\u7684\u306b\u898b\u76f4\u3057\u3066\u518d\u5ea6\u5b9f\u88c5\u3057\u3001\u518d\u3073\u6b63\u5f0f\u306a\u6a5f\u80fd\u3068\u3057\u3066\u53d6\u308a\u5165\u308c\u307e\u3057\u305f\u3002 \u4ee5\u4e0b\u306e lineorder \u30c6\u30fc\u30d6\u30eb\u304c\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u3055\u308c\u3066\u304a\u308a\u3001 date1 \u30c6\u30fc\u30d6\u30eb\u304c\u975e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u30c6\u30fc\u30d6\u30eb\u3067\u3042\u308b\u5834\u5408\u3001\u3053\u308c\u307e\u3067\u306f\u3001 lineorder \u914d\u4e0b\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u8aad\u307f\u51fa\u3057\u305f\u30c7\u30fc\u30bf\u3092\u5168\u3066 Append \u30ce\u30fc\u30c9\u306b\u3088\u3063\u3066\u7d50\u5408\u3055\u308c\u305f\u5f8c\u3067\u306a\u3051\u308c\u3070JOIN\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 \u901a\u5e38\u3001PG-Strom\u306fCPU\u3092\u30d0\u30a4\u30d1\u30b9\u3057\u3066NVME-SSD\u304b\u3089GPU\u3078\u30c7\u30fc\u30bf\u3092\u30ed\u30fc\u30c9\u3057\u3066\u5404\u7a2e\u306eSQL\u51e6\u7406\u3092\u884c\u3046\uff08GPU-Direct SQL\uff09\u305f\u3081\u3001JOIN\u306b\u5148\u7acb\u3063\u3066CPU\u5074\u3078\u30c7\u30fc\u30bf\u3092\u623b\u3055\u306d\u3070\u306a\u3089\u306a\u3044\u3068\u3044\u3046\u306e\u306f\u5927\u304d\u306a\u30da\u30ca\u30eb\u30c6\u30a3\u3067\u3059\u3002 ssbm=# explain (costs off) select sum(lo_extendedprice*lo_discount) as revenue from lineorder,date1 where lo_orderdate = d_datekey and d_year = 1993 and lo_discount between 1 and 3 and lo_quantity < 25; QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- Aggregate -> Hash Join Hash Cond: (lineorder.lo_orderdate = date1.d_datekey) -> Append -> Custom Scan (GpuScan) on lineorder__p1992 lineorder_1 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 91250920 -> 11911380] GPU-Direct SQL: enabled (GPU-0) -> Custom Scan (GpuScan) on lineorder__p1993 lineorder_2 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 91008500 -> 11980460] GPU-Direct SQL: enabled (GPU-0) -> Custom Scan (GpuScan) on lineorder__p1994 lineorder_3 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 91044060 -> 12150700] GPU-Direct SQL: enabled (GPU-0) -> Custom Scan (GpuScan) on lineorder__p1995 lineorder_4 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 91011720 -> 11779920] GPU-Direct SQL: enabled (GPU-0) -> Custom Scan (GpuScan) on lineorder__p1996 lineorder_5 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 91305650 -> 11942810] GPU-Direct SQL: enabled (GPU-0) -> Custom Scan (GpuScan) on lineorder__p1997 lineorder_6 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 91049100 -> 12069740] GPU-Direct SQL: enabled (GPU-0) -> Custom Scan (GpuScan) on lineorder__p1998 lineorder_7 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 53370560 -> 6898138] GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on lineorder__p1999 lineorder_8 Filter: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) -> Hash -> Seq Scan on date1 Filter: (d_year = 1993) (37 rows) PG-Strom v5.1\u3067\u306f\u3001\u975e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u3092\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3057\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u8aad\u307f\u51fa\u3057\u305f\u30c7\u30fc\u30bf\u3068JOIN\u3057\u3066\u304b\u3089\u7d50\u679c\u3092\u8fd4\u3059\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u5834\u5408\u306b\u3088\u3063\u3066\u306fGROUP-BY\u51e6\u7406\u307e\u3067\u6e08\u307e\u305b\u305f\u4e0a\u3067CPU\u5074\u306b\u623b\u3059\u4e8b\u3082\u3067\u304d\u3001\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u4f8b\u3067\u306f\u3001\u7dcf\u65706\u5104\u4ef6\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u691c\u7d22\u6761\u4ef6\u3092\u6e80\u305f\u30597\u5343\u4e07\u884c\u3092\u8fd4\u3055\u306d\u3070\u306a\u3089\u306a\u3044\u3068\u3053\u308d\u3001\u975e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u3067\u3042\u308b date1 \u3068\u306eJOIN\u3068\u3001\u305d\u306e\u6b21\u306b\u5b9f\u884c\u3059\u308b\u96c6\u7d04\u95a2\u6570 SUM() \u3092\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u306b\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3059\u308b\u4e8b\u3067\u3001CPU\u3067\u306f\u50c5\u304b8\u884c\u3092\u51e6\u7406\u3059\u308b\u3060\u3051\u3067\u6e08\u3093\u3067\u3044\u307e\u3059\u3002 INNER\u5074\u306e\u8aad\u51fa\u3057\u304c\u8907\u6570\u56de\u767a\u751f\u3059\u308b\u3068\u3044\u3046\u30c7\u30e1\u30ea\u30c3\u30c8\u306f\u3042\u308a\u307e\u3059\u304c\uff08\u203b\u5c06\u6765\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u6539\u4fee\u3055\u308c\u308b\u4e88\u5b9a\u3067\u3059\uff09\u3001\u3053\u306e\u3088\u3046\u306a\u66f8\u304d\u63db\u3048\u306b\u3088\u3063\u3066CPU\u3067\u51e6\u7406\u3059\u3079\u304d\u30c7\u30fc\u30bf\u304c\u5927\u5e45\u306b\u6e1b\u5c11\u3057\u3001\u51e6\u7406\u901f\u5ea6\u306e\u6539\u5584\u306b\u5bc4\u4e0e\u3057\u307e\u3059\u3002 ssbm=# explain (costs off) select sum(lo_extendedprice*lo_discount) as revenue from lineorder,date1 where lo_orderdate = d_datekey and d_year = 1993 and lo_discount between 1 and 3 and lo_quantity < 25; QUERY PLAN ---------------------------------------------------------------------------------------------------- Aggregate -> Append -> Custom Scan (GpuPreAgg) on lineorder__p1992 lineorder_1 GPU Projection: pgstrom.psum(((lineorder_1.lo_extendedprice * lineorder_1.lo_discount))::double precision) GPU Scan Quals: ((lineorder_1.lo_discount >= '1'::numeric) AND (lineorder_1.lo_discount <= '3'::numeric) AND (lineorder_1.lo_quantity < '25'::numeric)) [rows: 91250920 -> 11911380] GPU Join Quals [1]: (lineorder_1.lo_orderdate = date1.d_datekey) ... [nrows: 11911380 -> 1700960] GPU Outer Hash [1]: lineorder_1.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1993 lineorder_2 GPU Projection: pgstrom.psum(((lineorder_2.lo_extendedprice * lineorder_2.lo_discount))::double precision) GPU Scan Quals: ((lineorder_2.lo_discount >= '1'::numeric) AND (lineorder_2.lo_discount <= '3'::numeric) AND (lineorder_2.lo_quantity < '25'::numeric)) [rows: 91008500 -> 11980460] GPU Join Quals [1]: (lineorder_2.lo_orderdate = date1.d_datekey) ... [nrows: 11980460 -> 1710824] GPU Outer Hash [1]: lineorder_2.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1994 lineorder_3 GPU Projection: pgstrom.psum(((lineorder_3.lo_extendedprice * lineorder_3.lo_discount))::double precision) GPU Scan Quals: ((lineorder_3.lo_discount >= '1'::numeric) AND (lineorder_3.lo_discount <= '3'::numeric) AND (lineorder_3.lo_quantity < '25'::numeric)) [rows: 91044060 -> 12150700] GPU Join Quals [1]: (lineorder_3.lo_orderdate = date1.d_datekey) ... [nrows: 12150700 -> 1735135] GPU Outer Hash [1]: lineorder_3.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1995 lineorder_4 GPU Projection: pgstrom.psum(((lineorder_4.lo_extendedprice * lineorder_4.lo_discount))::double precision) GPU Scan Quals: ((lineorder_4.lo_discount >= '1'::numeric) AND (lineorder_4.lo_discount <= '3'::numeric) AND (lineorder_4.lo_quantity < '25'::numeric)) [rows: 91011720 -> 11779920] GPU Join Quals [1]: (lineorder_4.lo_orderdate = date1.d_datekey) ... [nrows: 11779920 -> 1682188] GPU Outer Hash [1]: lineorder_4.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1996 lineorder_5 GPU Projection: pgstrom.psum(((lineorder_5.lo_extendedprice * lineorder_5.lo_discount))::double precision) GPU Scan Quals: ((lineorder_5.lo_discount >= '1'::numeric) AND (lineorder_5.lo_discount <= '3'::numeric) AND (lineorder_5.lo_quantity < '25'::numeric)) [rows: 91305650 -> 11942810] GPU Join Quals [1]: (lineorder_5.lo_orderdate = date1.d_datekey) ... [nrows: 11942810 -> 1705448] GPU Outer Hash [1]: lineorder_5.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1997 lineorder_6 GPU Projection: pgstrom.psum(((lineorder_6.lo_extendedprice * lineorder_6.lo_discount))::double precision) GPU Scan Quals: ((lineorder_6.lo_discount >= '1'::numeric) AND (lineorder_6.lo_discount <= '3'::numeric) AND (lineorder_6.lo_quantity < '25'::numeric)) [rows: 91049100 -> 12069740] GPU Join Quals [1]: (lineorder_6.lo_orderdate = date1.d_datekey) ... [nrows: 12069740 -> 1723574] GPU Outer Hash [1]: lineorder_6.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1998 lineorder_7 GPU Projection: pgstrom.psum(((lineorder_7.lo_extendedprice * lineorder_7.lo_discount))::double precision) GPU Scan Quals: ((lineorder_7.lo_discount >= '1'::numeric) AND (lineorder_7.lo_discount <= '3'::numeric) AND (lineorder_7.lo_quantity < '25'::numeric)) [rows: 53370560 -> 6898138] GPU Join Quals [1]: (lineorder_7.lo_orderdate = date1.d_datekey) ... [nrows: 6898138 -> 985063] GPU Outer Hash [1]: lineorder_7.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1999 lineorder_8 GPU Projection: pgstrom.psum(((lineorder_8.lo_extendedprice * lineorder_8.lo_discount))::double precision) GPU Scan Quals: ((lineorder_8.lo_discount >= '1'::numeric) AND (lineorder_8.lo_discount <= '3'::numeric) AND (lineorder_8.lo_quantity < '25'::numeric)) [rows: 150 -> 1] GPU Join Quals [1]: (lineorder_8.lo_orderdate = date1.d_datekey) ... [nrows: 1 -> 1] GPU Outer Hash [1]: lineorder_8.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) (82 rows) GPU\u30b3\u30fc\u30c9\u306e\u8d77\u52d5\u6642\u30d3\u30eb\u30c9 \u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306ePG-Strom\u3067\u306f\u3001\u4e88\u3081\u30d3\u30eb\u30c9\u3055\u308c\u305fGPU\u5411\u3051\u306e\u30d0\u30a4\u30ca\u30ea\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u914d\u5e03\u3059\u308b\u65b9\u5f0f\u3092\u3068\u3063\u3066\u3044\u307e\u3057\u305f\u3002 \u3053\u308c\u306f\u30b7\u30f3\u30d7\u30eb\u3067\u306f\u3042\u308b\u306e\u3067\u3059\u304c\u3001PG-Strom\uff08PostgreSQL\uff09\u5b9f\u884c\u74b0\u5883\u306eCUDA Toolkit\u3084NVIDIA\u30c9\u30e9\u30a4\u30d0\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u7d44\u5408\u305b\u306b\u3088\u3063\u3066\u306f\u3001GPU\u30d0\u30a4\u30ca\u30ea\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u8a8d\u8b58\u3067\u304d\u305a\u5b9f\u884c\u6642\u30a8\u30e9\u30fc\u3092\u8d77\u3053\u3057\u3066\u3057\u307e\u3046\u4e8b\u304c\u3042\u308a\u307e\u3057\u305f\u3002\u5178\u578b\u7684\u306b\u306f\u3001RPM\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30d3\u30eb\u30c9\u3057\u305f\u74b0\u5883\u3088\u308a\u3082\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306eCUDA Toolkit\u3084NVIDIA\u30c9\u30e9\u30a4\u30d0\u304c\u5b9f\u884c\u74b0\u5883\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3067\u3059\u3002 PG-Strom v5.1\u3067\u306f\u3001\u8d77\u52d5\u6642\u306bGPU\u7528\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3084CUDA Toolkit\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3057\u3001\u5dee\u5206\u304c\u3042\u308c\u3070GPU\u5411\u3051\u30d0\u30a4\u30ca\u30ea\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30d3\u30eb\u30c9\u3059\u308b\u3088\u3046\u306b\u5909\u66f4\u3055\u308c\u307e\u3057\u305f\u3002\u3053\u306e\u4fee\u6b63\u306b\u3088\u308a\u3001PG-Strom\u306f\u5b9f\u884c\u74b0\u5883\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305fGPU\u30c7\u30d0\u30a4\u30b9\u3001\u304a\u3088\u3073CUDA Toolkit\u5411\u3051\u306eGPU\u30d0\u30a4\u30ca\u30ea\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u4e00\u90e8\u306ePG-Strom\u7528GPU\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u306f\u30d3\u30eb\u30c9\u306b\u6642\u9593\u304c\u304b\u304b\u308b\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001PG-Strom\u3084CUDA Toolkit\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u5f8c\u3001\u521d\u56de\u306e\u8d77\u52d5\u6642\u306b\u306fPG-Strom\u306e\u6a5f\u80fd\u304c\u5229\u7528\u53ef\u80fd\u3068\u306a\u308b\u307e\u3067\u6570\u5206\u306e\u6642\u9593\u304c\u304b\u304b\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 pg2arrow\u306e\u4e26\u5217\u5b9f\u884c pg2arrow \u306f\u65b0\u305f\u306b -n|--num-workers \u30aa\u30d7\u30b7\u30e7\u30f3\u3068 -k|--parallel-keys \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 -n N_WORKERS \u306f\u6307\u5b9a\u3057\u305f\u6570\u306e\u30b9\u30ec\u30c3\u30c9\u304c\u305d\u308c\u305e\u308cPostgreSQL\u306b\u63a5\u7d9a\u3057\u3001\u4e26\u5217\u306b\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u305f\u7d50\u679c\u3092Apache Arrow\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002\u30af\u30a8\u30ea\u306b\u306f\u7279\u6b8a\u306a\u6587\u5b57\u5217 $(N_WORKERS) \u3068 $(WORKER_ID) \u3092\u542b\u3080\u4e8b\u304c\u3067\u304d\u3001\u3053\u308c\u3089\u306fPostgreSQL\u306b\u30af\u30a8\u30ea\u3092\u6295\u3052\u308b\u969b\u306b\u3001\u305d\u308c\u305e\u308c\u30ef\u30fc\u30ab\u30fc\u6570\u3068\u30ef\u30fc\u30ab\u30fc\u56fa\u6709\u306eID\u5024\u306b\u7f6e\u304d\u63db\u3048\u3089\u308c\u307e\u3059\u3002\u30e6\u30fc\u30b6\u306f\u3053\u308c\u3092\u5229\u7528\u3057\u3066\u3001\u5404\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u304c\u8aad\u307f\u51fa\u3059\u30bf\u30d7\u30eb\u304c\u4e92\u3044\u306b\u91cd\u8907\u3057\u305f\u308a\u6b20\u640d\u3057\u305f\u308a\u3057\u306a\u3044\u3088\u3046\u306b\u8abf\u6574\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u3082\u3046\u4e00\u3064\u306e -k|--parallel-key \u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u3001\u5f15\u6570\u3067\u4e0e\u3048\u305f\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30ad\u30fc\u5024\u306e\u305d\u308c\u305e\u308c\u306b\u5bfe\u3057\u3066\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u3092\u8d77\u52d5\u3057\u3001\u30af\u30a8\u30ea\u4e2d\u306e $(PARALLEL_KEY) \u3092\u30ad\u30fc\u3068\u7f6e\u304d\u63db\u3048\u305f\u4e0a\u3067\u3001\u3053\u308c\u3092PostgreSQL\u3067\u5b9f\u884c\u3057\u305f\u7d50\u679c\u3092Apache Arrow\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002 \u4f8b\u3048\u3070\u3001 lineorder \u30c6\u30fc\u30d6\u30eb\u304c\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u3055\u308c\u3066\u304a\u308a\u3001\u5b50\u30c6\u30fc\u30d6\u30eb\u3068\u3057\u3066\u3001 lineorder__sun , lineorder__mon , ... lineorder__sat \u304c\u5b58\u5728\u3057\u305f\u5834\u5408\u3001\u500b\u3005\u306e\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u304c\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u5b50\u30c6\u30fc\u30d6\u30eb\u3092\u305d\u308c\u305e\u308c\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u3068\u3044\u3063\u305f\u5f62\u3067\u51e6\u7406\u3092\u4e26\u5217\u5316\u3067\u304d\u307e\u3059\u3002 \u3053\u306e\u5834\u5408\u3001 -k \u30aa\u30d7\u30b7\u30e7\u30f3\u306f -k sun,mon,tue,wed,thu,fri,sat \u3068\u6307\u5b9a\u3057\u3001 -c \u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u306f SELECT * FROM lineorder__$(PARALLEL_KEY) \u3068\u6307\u5b9a\u3059\u308c\u3070\u30017\u500b\u306e\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u304c\u305d\u308c\u305e\u308c\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u5b50\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002 $ pg2arrow -d ssbm -c 'SELECT * FROM lineorder__$(PARALLEL_KEY)' -o /path/to/f_lineorder.arrow -k=sun,mon,tue,wed,thu,fri,sat --progress worker:1 SQL=[SELECT * FROM lineorder__sun] worker:3 SQL=[SELECT * FROM lineorder__tue] worker:2 SQL=[SELECT * FROM lineorder__mon] worker:4 SQL=[SELECT * FROM lineorder__wed] worker:5 SQL=[SELECT * FROM lineorder__thu] : :","title":"PG-Strom v5.1"},{"location":"release_v5.1/#pg-strom-v51","text":"PG-Strom Development Team (17-Apr-2024)","title":"PG-Strom v5.1\u30ea\u30ea\u30fc\u30b9"},{"location":"release_v5.1/#_1","text":"PG-Strom v5.1\u306b\u304a\u3051\u308b\u4e3b\u8981\u306a\u5909\u66f4\u306f\u70b9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 \u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306b\u5bfe\u5fdc\u3057\u305fGpuJoin/PreAgg\u306e\u30b5\u30dd\u30fc\u30c8\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002 GPU\u30b3\u30fc\u30c9\u306e\u30d3\u30eb\u30c9\u3092\u8d77\u52d5\u6642\u306b\u5b9f\u884c\u74b0\u5883\u3067\u884c\u3046\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 pg2arrow\u304c\u4e26\u5217\u51e6\u7406\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 CUDA Stack\u306e\u30b5\u30a4\u30ba\u3092\u9069\u5fdc\u7684\u306b\u8a2d\u5b9a\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u7d2f\u7a4d\u7684\u306a\u30d0\u30b0\u306e\u4fee\u6b63","title":"\u6982\u8981"},{"location":"release_v5.1/#_2","text":"PostgreSQL v15.x, v16.x CUDA Toolkit 12.2 \u4ee5\u964d CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3 Intel x86 64bit \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3(x86_64) NVIDIA GPU CC 6.0 \u4ee5\u964d (Pascal\u4ee5\u964d; Volta\u4ee5\u964d\u3092\u63a8\u5968)","title":"\u52d5\u4f5c\u74b0\u5883"},{"location":"release_v5.1/#_3","text":"PostgreSQL\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3078\u306e\u5bfe\u5fdc\u81ea\u4f53\u306fPG-Strom v3.0\u3067\u3082\u884c\u308f\u308c\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u3046\u307e\u304f\u5b9f\u884c\u8a08\u753b\u3092\u4f5c\u6210\u3067\u304d\u306a\u3044\u4e8b\u304c\u591a\u304f\u3001\u5b9f\u9a13\u7684\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u8131\u3059\u308b\u4e8b\u306e\u3067\u304d\u306a\u3044\u3082\u306e\u3067\u3057\u305f\u3002\u305d\u3053\u3067\u3001PG-Strom v5.1\u3067\u306f\u5185\u90e8\u306e\u8a2d\u8a08\u3092\u6839\u672c\u7684\u306b\u898b\u76f4\u3057\u3066\u518d\u5ea6\u5b9f\u88c5\u3057\u3001\u518d\u3073\u6b63\u5f0f\u306a\u6a5f\u80fd\u3068\u3057\u3066\u53d6\u308a\u5165\u308c\u307e\u3057\u305f\u3002 \u4ee5\u4e0b\u306e lineorder \u30c6\u30fc\u30d6\u30eb\u304c\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u3055\u308c\u3066\u304a\u308a\u3001 date1 \u30c6\u30fc\u30d6\u30eb\u304c\u975e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u30c6\u30fc\u30d6\u30eb\u3067\u3042\u308b\u5834\u5408\u3001\u3053\u308c\u307e\u3067\u306f\u3001 lineorder \u914d\u4e0b\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u8aad\u307f\u51fa\u3057\u305f\u30c7\u30fc\u30bf\u3092\u5168\u3066 Append \u30ce\u30fc\u30c9\u306b\u3088\u3063\u3066\u7d50\u5408\u3055\u308c\u305f\u5f8c\u3067\u306a\u3051\u308c\u3070JOIN\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 \u901a\u5e38\u3001PG-Strom\u306fCPU\u3092\u30d0\u30a4\u30d1\u30b9\u3057\u3066NVME-SSD\u304b\u3089GPU\u3078\u30c7\u30fc\u30bf\u3092\u30ed\u30fc\u30c9\u3057\u3066\u5404\u7a2e\u306eSQL\u51e6\u7406\u3092\u884c\u3046\uff08GPU-Direct SQL\uff09\u305f\u3081\u3001JOIN\u306b\u5148\u7acb\u3063\u3066CPU\u5074\u3078\u30c7\u30fc\u30bf\u3092\u623b\u3055\u306d\u3070\u306a\u3089\u306a\u3044\u3068\u3044\u3046\u306e\u306f\u5927\u304d\u306a\u30da\u30ca\u30eb\u30c6\u30a3\u3067\u3059\u3002 ssbm=# explain (costs off) select sum(lo_extendedprice*lo_discount) as revenue from lineorder,date1 where lo_orderdate = d_datekey and d_year = 1993 and lo_discount between 1 and 3 and lo_quantity < 25; QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- Aggregate -> Hash Join Hash Cond: (lineorder.lo_orderdate = date1.d_datekey) -> Append -> Custom Scan (GpuScan) on lineorder__p1992 lineorder_1 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 91250920 -> 11911380] GPU-Direct SQL: enabled (GPU-0) -> Custom Scan (GpuScan) on lineorder__p1993 lineorder_2 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 91008500 -> 11980460] GPU-Direct SQL: enabled (GPU-0) -> Custom Scan (GpuScan) on lineorder__p1994 lineorder_3 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 91044060 -> 12150700] GPU-Direct SQL: enabled (GPU-0) -> Custom Scan (GpuScan) on lineorder__p1995 lineorder_4 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 91011720 -> 11779920] GPU-Direct SQL: enabled (GPU-0) -> Custom Scan (GpuScan) on lineorder__p1996 lineorder_5 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 91305650 -> 11942810] GPU-Direct SQL: enabled (GPU-0) -> Custom Scan (GpuScan) on lineorder__p1997 lineorder_6 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 91049100 -> 12069740] GPU-Direct SQL: enabled (GPU-0) -> Custom Scan (GpuScan) on lineorder__p1998 lineorder_7 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 53370560 -> 6898138] GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on lineorder__p1999 lineorder_8 Filter: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) -> Hash -> Seq Scan on date1 Filter: (d_year = 1993) (37 rows) PG-Strom v5.1\u3067\u306f\u3001\u975e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u3092\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3057\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u8aad\u307f\u51fa\u3057\u305f\u30c7\u30fc\u30bf\u3068JOIN\u3057\u3066\u304b\u3089\u7d50\u679c\u3092\u8fd4\u3059\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u5834\u5408\u306b\u3088\u3063\u3066\u306fGROUP-BY\u51e6\u7406\u307e\u3067\u6e08\u307e\u305b\u305f\u4e0a\u3067CPU\u5074\u306b\u623b\u3059\u4e8b\u3082\u3067\u304d\u3001\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u4f8b\u3067\u306f\u3001\u7dcf\u65706\u5104\u4ef6\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u691c\u7d22\u6761\u4ef6\u3092\u6e80\u305f\u30597\u5343\u4e07\u884c\u3092\u8fd4\u3055\u306d\u3070\u306a\u3089\u306a\u3044\u3068\u3053\u308d\u3001\u975e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u3067\u3042\u308b date1 \u3068\u306eJOIN\u3068\u3001\u305d\u306e\u6b21\u306b\u5b9f\u884c\u3059\u308b\u96c6\u7d04\u95a2\u6570 SUM() \u3092\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u306b\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3059\u308b\u4e8b\u3067\u3001CPU\u3067\u306f\u50c5\u304b8\u884c\u3092\u51e6\u7406\u3059\u308b\u3060\u3051\u3067\u6e08\u3093\u3067\u3044\u307e\u3059\u3002 INNER\u5074\u306e\u8aad\u51fa\u3057\u304c\u8907\u6570\u56de\u767a\u751f\u3059\u308b\u3068\u3044\u3046\u30c7\u30e1\u30ea\u30c3\u30c8\u306f\u3042\u308a\u307e\u3059\u304c\uff08\u203b\u5c06\u6765\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u6539\u4fee\u3055\u308c\u308b\u4e88\u5b9a\u3067\u3059\uff09\u3001\u3053\u306e\u3088\u3046\u306a\u66f8\u304d\u63db\u3048\u306b\u3088\u3063\u3066CPU\u3067\u51e6\u7406\u3059\u3079\u304d\u30c7\u30fc\u30bf\u304c\u5927\u5e45\u306b\u6e1b\u5c11\u3057\u3001\u51e6\u7406\u901f\u5ea6\u306e\u6539\u5584\u306b\u5bc4\u4e0e\u3057\u307e\u3059\u3002 ssbm=# explain (costs off) select sum(lo_extendedprice*lo_discount) as revenue from lineorder,date1 where lo_orderdate = d_datekey and d_year = 1993 and lo_discount between 1 and 3 and lo_quantity < 25; QUERY PLAN ---------------------------------------------------------------------------------------------------- Aggregate -> Append -> Custom Scan (GpuPreAgg) on lineorder__p1992 lineorder_1 GPU Projection: pgstrom.psum(((lineorder_1.lo_extendedprice * lineorder_1.lo_discount))::double precision) GPU Scan Quals: ((lineorder_1.lo_discount >= '1'::numeric) AND (lineorder_1.lo_discount <= '3'::numeric) AND (lineorder_1.lo_quantity < '25'::numeric)) [rows: 91250920 -> 11911380] GPU Join Quals [1]: (lineorder_1.lo_orderdate = date1.d_datekey) ... [nrows: 11911380 -> 1700960] GPU Outer Hash [1]: lineorder_1.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1993 lineorder_2 GPU Projection: pgstrom.psum(((lineorder_2.lo_extendedprice * lineorder_2.lo_discount))::double precision) GPU Scan Quals: ((lineorder_2.lo_discount >= '1'::numeric) AND (lineorder_2.lo_discount <= '3'::numeric) AND (lineorder_2.lo_quantity < '25'::numeric)) [rows: 91008500 -> 11980460] GPU Join Quals [1]: (lineorder_2.lo_orderdate = date1.d_datekey) ... [nrows: 11980460 -> 1710824] GPU Outer Hash [1]: lineorder_2.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1994 lineorder_3 GPU Projection: pgstrom.psum(((lineorder_3.lo_extendedprice * lineorder_3.lo_discount))::double precision) GPU Scan Quals: ((lineorder_3.lo_discount >= '1'::numeric) AND (lineorder_3.lo_discount <= '3'::numeric) AND (lineorder_3.lo_quantity < '25'::numeric)) [rows: 91044060 -> 12150700] GPU Join Quals [1]: (lineorder_3.lo_orderdate = date1.d_datekey) ... [nrows: 12150700 -> 1735135] GPU Outer Hash [1]: lineorder_3.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1995 lineorder_4 GPU Projection: pgstrom.psum(((lineorder_4.lo_extendedprice * lineorder_4.lo_discount))::double precision) GPU Scan Quals: ((lineorder_4.lo_discount >= '1'::numeric) AND (lineorder_4.lo_discount <= '3'::numeric) AND (lineorder_4.lo_quantity < '25'::numeric)) [rows: 91011720 -> 11779920] GPU Join Quals [1]: (lineorder_4.lo_orderdate = date1.d_datekey) ... [nrows: 11779920 -> 1682188] GPU Outer Hash [1]: lineorder_4.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1996 lineorder_5 GPU Projection: pgstrom.psum(((lineorder_5.lo_extendedprice * lineorder_5.lo_discount))::double precision) GPU Scan Quals: ((lineorder_5.lo_discount >= '1'::numeric) AND (lineorder_5.lo_discount <= '3'::numeric) AND (lineorder_5.lo_quantity < '25'::numeric)) [rows: 91305650 -> 11942810] GPU Join Quals [1]: (lineorder_5.lo_orderdate = date1.d_datekey) ... [nrows: 11942810 -> 1705448] GPU Outer Hash [1]: lineorder_5.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1997 lineorder_6 GPU Projection: pgstrom.psum(((lineorder_6.lo_extendedprice * lineorder_6.lo_discount))::double precision) GPU Scan Quals: ((lineorder_6.lo_discount >= '1'::numeric) AND (lineorder_6.lo_discount <= '3'::numeric) AND (lineorder_6.lo_quantity < '25'::numeric)) [rows: 91049100 -> 12069740] GPU Join Quals [1]: (lineorder_6.lo_orderdate = date1.d_datekey) ... [nrows: 12069740 -> 1723574] GPU Outer Hash [1]: lineorder_6.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1998 lineorder_7 GPU Projection: pgstrom.psum(((lineorder_7.lo_extendedprice * lineorder_7.lo_discount))::double precision) GPU Scan Quals: ((lineorder_7.lo_discount >= '1'::numeric) AND (lineorder_7.lo_discount <= '3'::numeric) AND (lineorder_7.lo_quantity < '25'::numeric)) [rows: 53370560 -> 6898138] GPU Join Quals [1]: (lineorder_7.lo_orderdate = date1.d_datekey) ... [nrows: 6898138 -> 985063] GPU Outer Hash [1]: lineorder_7.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1999 lineorder_8 GPU Projection: pgstrom.psum(((lineorder_8.lo_extendedprice * lineorder_8.lo_discount))::double precision) GPU Scan Quals: ((lineorder_8.lo_discount >= '1'::numeric) AND (lineorder_8.lo_discount <= '3'::numeric) AND (lineorder_8.lo_quantity < '25'::numeric)) [rows: 150 -> 1] GPU Join Quals [1]: (lineorder_8.lo_orderdate = date1.d_datekey) ... [nrows: 1 -> 1] GPU Outer Hash [1]: lineorder_8.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) (82 rows)","title":"\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5bfe\u5fdc"},{"location":"release_v5.1/#gpu","text":"\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306ePG-Strom\u3067\u306f\u3001\u4e88\u3081\u30d3\u30eb\u30c9\u3055\u308c\u305fGPU\u5411\u3051\u306e\u30d0\u30a4\u30ca\u30ea\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u914d\u5e03\u3059\u308b\u65b9\u5f0f\u3092\u3068\u3063\u3066\u3044\u307e\u3057\u305f\u3002 \u3053\u308c\u306f\u30b7\u30f3\u30d7\u30eb\u3067\u306f\u3042\u308b\u306e\u3067\u3059\u304c\u3001PG-Strom\uff08PostgreSQL\uff09\u5b9f\u884c\u74b0\u5883\u306eCUDA Toolkit\u3084NVIDIA\u30c9\u30e9\u30a4\u30d0\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u7d44\u5408\u305b\u306b\u3088\u3063\u3066\u306f\u3001GPU\u30d0\u30a4\u30ca\u30ea\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u8a8d\u8b58\u3067\u304d\u305a\u5b9f\u884c\u6642\u30a8\u30e9\u30fc\u3092\u8d77\u3053\u3057\u3066\u3057\u307e\u3046\u4e8b\u304c\u3042\u308a\u307e\u3057\u305f\u3002\u5178\u578b\u7684\u306b\u306f\u3001RPM\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30d3\u30eb\u30c9\u3057\u305f\u74b0\u5883\u3088\u308a\u3082\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306eCUDA Toolkit\u3084NVIDIA\u30c9\u30e9\u30a4\u30d0\u304c\u5b9f\u884c\u74b0\u5883\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3067\u3059\u3002 PG-Strom v5.1\u3067\u306f\u3001\u8d77\u52d5\u6642\u306bGPU\u7528\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3084CUDA Toolkit\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3057\u3001\u5dee\u5206\u304c\u3042\u308c\u3070GPU\u5411\u3051\u30d0\u30a4\u30ca\u30ea\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30d3\u30eb\u30c9\u3059\u308b\u3088\u3046\u306b\u5909\u66f4\u3055\u308c\u307e\u3057\u305f\u3002\u3053\u306e\u4fee\u6b63\u306b\u3088\u308a\u3001PG-Strom\u306f\u5b9f\u884c\u74b0\u5883\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305fGPU\u30c7\u30d0\u30a4\u30b9\u3001\u304a\u3088\u3073CUDA Toolkit\u5411\u3051\u306eGPU\u30d0\u30a4\u30ca\u30ea\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u4e00\u90e8\u306ePG-Strom\u7528GPU\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u306f\u30d3\u30eb\u30c9\u306b\u6642\u9593\u304c\u304b\u304b\u308b\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001PG-Strom\u3084CUDA Toolkit\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u5f8c\u3001\u521d\u56de\u306e\u8d77\u52d5\u6642\u306b\u306fPG-Strom\u306e\u6a5f\u80fd\u304c\u5229\u7528\u53ef\u80fd\u3068\u306a\u308b\u307e\u3067\u6570\u5206\u306e\u6642\u9593\u304c\u304b\u304b\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002","title":"GPU\u30b3\u30fc\u30c9\u306e\u8d77\u52d5\u6642\u30d3\u30eb\u30c9"},{"location":"release_v5.1/#pg2arrow","text":"pg2arrow \u306f\u65b0\u305f\u306b -n|--num-workers \u30aa\u30d7\u30b7\u30e7\u30f3\u3068 -k|--parallel-keys \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 -n N_WORKERS \u306f\u6307\u5b9a\u3057\u305f\u6570\u306e\u30b9\u30ec\u30c3\u30c9\u304c\u305d\u308c\u305e\u308cPostgreSQL\u306b\u63a5\u7d9a\u3057\u3001\u4e26\u5217\u306b\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u305f\u7d50\u679c\u3092Apache Arrow\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002\u30af\u30a8\u30ea\u306b\u306f\u7279\u6b8a\u306a\u6587\u5b57\u5217 $(N_WORKERS) \u3068 $(WORKER_ID) \u3092\u542b\u3080\u4e8b\u304c\u3067\u304d\u3001\u3053\u308c\u3089\u306fPostgreSQL\u306b\u30af\u30a8\u30ea\u3092\u6295\u3052\u308b\u969b\u306b\u3001\u305d\u308c\u305e\u308c\u30ef\u30fc\u30ab\u30fc\u6570\u3068\u30ef\u30fc\u30ab\u30fc\u56fa\u6709\u306eID\u5024\u306b\u7f6e\u304d\u63db\u3048\u3089\u308c\u307e\u3059\u3002\u30e6\u30fc\u30b6\u306f\u3053\u308c\u3092\u5229\u7528\u3057\u3066\u3001\u5404\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u304c\u8aad\u307f\u51fa\u3059\u30bf\u30d7\u30eb\u304c\u4e92\u3044\u306b\u91cd\u8907\u3057\u305f\u308a\u6b20\u640d\u3057\u305f\u308a\u3057\u306a\u3044\u3088\u3046\u306b\u8abf\u6574\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u3082\u3046\u4e00\u3064\u306e -k|--parallel-key \u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u3001\u5f15\u6570\u3067\u4e0e\u3048\u305f\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30ad\u30fc\u5024\u306e\u305d\u308c\u305e\u308c\u306b\u5bfe\u3057\u3066\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u3092\u8d77\u52d5\u3057\u3001\u30af\u30a8\u30ea\u4e2d\u306e $(PARALLEL_KEY) \u3092\u30ad\u30fc\u3068\u7f6e\u304d\u63db\u3048\u305f\u4e0a\u3067\u3001\u3053\u308c\u3092PostgreSQL\u3067\u5b9f\u884c\u3057\u305f\u7d50\u679c\u3092Apache Arrow\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002 \u4f8b\u3048\u3070\u3001 lineorder \u30c6\u30fc\u30d6\u30eb\u304c\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u3055\u308c\u3066\u304a\u308a\u3001\u5b50\u30c6\u30fc\u30d6\u30eb\u3068\u3057\u3066\u3001 lineorder__sun , lineorder__mon , ... lineorder__sat \u304c\u5b58\u5728\u3057\u305f\u5834\u5408\u3001\u500b\u3005\u306e\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u304c\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u5b50\u30c6\u30fc\u30d6\u30eb\u3092\u305d\u308c\u305e\u308c\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u3068\u3044\u3063\u305f\u5f62\u3067\u51e6\u7406\u3092\u4e26\u5217\u5316\u3067\u304d\u307e\u3059\u3002 \u3053\u306e\u5834\u5408\u3001 -k \u30aa\u30d7\u30b7\u30e7\u30f3\u306f -k sun,mon,tue,wed,thu,fri,sat \u3068\u6307\u5b9a\u3057\u3001 -c \u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u306f SELECT * FROM lineorder__$(PARALLEL_KEY) \u3068\u6307\u5b9a\u3059\u308c\u3070\u30017\u500b\u306e\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u304c\u305d\u308c\u305e\u308c\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u5b50\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002 $ pg2arrow -d ssbm -c 'SELECT * FROM lineorder__$(PARALLEL_KEY)' -o /path/to/f_lineorder.arrow -k=sun,mon,tue,wed,thu,fri,sat --progress worker:1 SQL=[SELECT * FROM lineorder__sun] worker:3 SQL=[SELECT * FROM lineorder__tue] worker:2 SQL=[SELECT * FROM lineorder__mon] worker:4 SQL=[SELECT * FROM lineorder__wed] worker:5 SQL=[SELECT * FROM lineorder__thu] : :","title":"pg2arrow\u306e\u4e26\u5217\u5b9f\u884c"},{"location":"ssd2gpu/","text":"GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c \u6982\u8981 SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u9ad8\u901f\u306b\u51e6\u7406\u3059\u308b\u306b\u306f\u3001\u30d7\u30ed\u30bb\u30c3\u30b5\u304c\u52b9\u7387\u3088\u304f\u51e6\u7406\u3092\u884c\u3046\u306e\u3068\u540c\u69d8\u306b\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u3084\u30e1\u30e2\u30ea\u304b\u3089\u30d7\u30ed\u30bb\u30c3\u30b5\u3078\u9ad8\u901f\u306b\u30c7\u30fc\u30bf\u3092\u4f9b\u7d66\u3059\u308b\u4e8b\u304c\u91cd\u8981\u3067\u3059\u3002\u51e6\u7406\u3059\u3079\u304d\u30c7\u30fc\u30bf\u304c\u30d7\u30ed\u30bb\u30c3\u30b5\u306b\u5c4a\u3044\u3066\u3044\u306a\u3051\u308c\u3070\u3001\u30d7\u30ed\u30bb\u30c3\u30b5\u306f\u624b\u6301\u3061\u7121\u6c99\u6c70\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u6a5f\u80fd\u306f\u3001PCIe\u30d0\u30b9\u306b\u76f4\u7d50\u3059\u308b\u4e8b\u3067\u9ad8\u901f\u306aI/O\u51e6\u7406\u3092\u5b9f\u73fe\u3059\u308bNVMe-SSD\u3068\u3001\u540c\u3058PCIe\u30d0\u30b9\u4e0a\u306b\u63a5\u7d9a\u3055\u308c\u305fGPU\u3092\u30c0\u30a4\u30ec\u30af\u30c8\u306b\u63a5\u7d9a\u3057\u3001\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u9650\u754c\u306b\u8fd1\u3044\u901f\u5ea6\u3067\u30c7\u30fc\u30bf\u3092\u30d7\u30ed\u30bb\u30c3\u30b5\u306b\u4f9b\u7d66\u3059\u308b\u4e8b\u3067SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u9ad8\u901f\u306b\u51e6\u7406\u3059\u308b\u305f\u3081\u306e\u6a5f\u80fd\u3067\u3059\u3002 \u901a\u5e38\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u4e0a\u306b\u683c\u7d0d\u3055\u308c\u305fPostgreSQL\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u306f\u3001PCIe\u30d0\u30b9\u3092\u901a\u3057\u3066\u3044\u3063\u305f\u3093CPU/RAM\u3078\u3068\u30ed\u30fc\u30c9\u3055\u308c\u307e\u3059\u3002\u305d\u306e\u5f8c\u3001\u30af\u30a8\u30ea\u5b9f\u884c\u8a08\u753b\u306b\u3057\u305f\u304c\u3063\u3066WHERE\u53e5\u306b\u3088\u308b\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3084JOIN/GROUP BY\u3068\u3044\u3063\u305f\u51e6\u7406\u3092\u884c\u3046\u308f\u3051\u3067\u3059\u304c\u3001\u96c6\u8a08\u7cfb\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u7279\u6027\u4e0a\u3001\u5165\u529b\u3059\u308b\u30c7\u30fc\u30bf\u4ef6\u6570\u3088\u308a\u51fa\u529b\u3059\u308b\u30c7\u30fc\u30bf\u4ef6\u6570\u306e\u65b9\u304c\u306f\u308b\u304b\u306b\u5c11\u306a\u3044\u4ef6\u6570\u3068\u306a\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070\u6570\u5341\u5104\u884c\u3092\u8aad\u307f\u51fa\u3057\u305f\u7d50\u679c\u3092GROUP BY\u3067\u96c6\u7d04\u3057\u305f\u7d50\u679c\u304c\u9ad8\u3005\u6570\u767e\u884c\u3068\u3044\u3046\u4e8b\u3082\u73cd\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002 \u8a00\u3044\u63db\u3048\u308c\u3070\u3001\u6211\u3005\u306f\u30b4\u30df\u30c7\u30fc\u30bf\u3092\u904b\u3076\u305f\u3081\u306bPCIe\u30d0\u30b9\u4e0a\u306e\u5e2f\u57df\u3092\u6d88\u8cbb\u3057\u3066\u3044\u308b\u3068\u3082\u8a00\u3048\u307e\u3059\u304c\u3001CPU\u304c\u30ec\u30b3\u30fc\u30c9\u306e\u4e2d\u8eab\u3092\u8abf\u3079\u308b\u307e\u3067\u306f\u3001\u305d\u306e\u8981\u4e0d\u8981\u3092\u5224\u65ad\u3067\u304d\u306a\u3044\u305f\u3081\u3001\u4e00\u822c\u7684\u306a\u5b9f\u88c5\u3067\u306f\u3053\u308c\u306f\u4e0d\u53ef\u907f\u3068\u8a00\u3048\u307e\u3059\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306f\u30c7\u30fc\u30bf\u306e\u6d41\u308c\u3092\u5909\u3048\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u4e0a\u306e\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u3092PCIe\u30d0\u30b9\u4e0a\u306eP2P DMA\u3092\u7528\u3044\u3066GPU\u306b\u76f4\u63a5\u8ee2\u9001\u3057\u3001GPU\u3067SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u51e6\u7406\u3059\u308b\u4e8b\u3067CPU\u304c\u51e6\u7406\u3059\u3079\u304d\u30ec\u30b3\u30fc\u30c9\u6570\u3092\u6e1b\u3089\u3059\u305f\u3081\u306e\u6a5f\u80fd\u3067\u3059\u3002\u3044\u308f\u3070\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u3068CPU/RAM\u306e\u9593\u306b\u4f4d\u7f6e\u3057\u3066SQL\u3092\u51e6\u7406\u3059\u308b\u305f\u3081\u306e\u30d7\u30ea\u30d7\u30ed\u30bb\u30c3\u30b5\u3068\u3057\u3066GPU\u3092\u6d3b\u7528\u3057\u3001\u7d50\u679c\u3068\u3057\u3066I/O\u51e6\u7406\u3092\u9ad8\u901f\u5316\u3059\u308b\u305f\u3081\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u3067\u3059\u3002 \u672c\u6a5f\u80fd\u306f\u3001\u5185\u90e8\u7684\u306bNVIDIA GPUDirect Storage\u30e2\u30b8\u30e5\u30fc\u30eb\uff08 nvidia-fs \uff09\u3092\u4f7f\u7528\u3057\u3066\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u3068NVME\u30b9\u30c8\u30ec\u30fc\u30b8\u3068\u306e\u9593\u3067P2P\u306e\u30c7\u30fc\u30bf\u8ee2\u9001\u3092\u884c\u3044\u307e\u3059\u3002 \u3057\u305f\u304c\u3063\u3066\u3001\u672c\u6a5f\u80fd\u3092\u5229\u7528\u3059\u308b\u306b\u306f\u3001PostgreSQL\u306e\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3042\u308bPG-Strom\u3060\u3051\u3067\u306f\u306a\u304f\u3001\u4e0a\u8a18\u306eLinux kernel\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u3002 \u307e\u305f\u3001\u672c\u6a5f\u80fd\u304c\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u306e\u306fNVME\u4ed5\u69d8\u306eSSD\u3084\u3001NVME-oF\u3067\u63a5\u7d9a\u3055\u308c\u305f\u30ea\u30e2\u30fc\u30c8\u30c7\u30d0\u30a4\u30b9\u306e\u307f\u3067\u3059\u3002 SAS\u3084SATA\u3068\u3044\u3063\u305f\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3067\u63a5\u7d9a\u3055\u308c\u305f\u65e7\u5f0f\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u306b\u306f\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u305b\u3093\u3002 \u4eca\u307e\u3067\u306b\u52d5\u4f5c\u5b9f\u7e3e\u306e\u3042\u308bNVME-SSD\u306b\u3064\u3044\u3066\u306f 002: HW Validation List \u304c\u53c2\u8003\u306b\u306a\u308b\u3067\u3057\u3087\u3046\u3002 \u521d\u671f\u8a2d\u5b9a \u30c9\u30e9\u30a4\u30d0\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u4ee5\u524d\u306ePG-Strom\u3067\u306f\u3001GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u306e\u5229\u7528\u306b\u306fHeteroDB\u793e\u306e\u958b\u767a\u3057\u305f\u72ec\u81ea\u306eLinux kernel\u30c9\u30e9\u30a4\u30d0\u304c\u5fc5\u8981\u3067\u3057\u305f\u304c\u3001v3.0\u4ee5\u964d\u3067\u306fNVIDIA\u306e\u63d0\u4f9b\u3059\u308bGPUDirect Storage\u3092\u5229\u7528\u3059\u308b\u3088\u3046\u306b\u8a2d\u8a08\u3092\u5909\u66f4\u3057\u3066\u3044\u307e\u3059\u3002GPUDirect Storage\u7528\u306eLinux kernel\u30c9\u30e9\u30a4\u30d0\uff08 nvidia-fs \uff09\u306fCUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30d7\u30ed\u30bb\u30b9\u306b\u7d71\u5408\u3055\u308c\u3001\u672c\u30de\u30cb\u30e5\u30a2\u30eb\u306e\u300c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u300d\u306e\u7ae0\u306b\u8a18\u8f09\u306e\u624b\u9806\u3067\u30b7\u30b9\u30c6\u30e0\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3057\u305f\u5834\u5408\u3001\u7279\u306b\u8ffd\u52a0\u306e\u8a2d\u5b9a\u306f\u5fc5\u8981\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u5fc5\u8981\u306aLinux kernel\u30c9\u30e9\u30a4\u30d0\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3001 modinfo \u30b3\u30de\u30f3\u30c9\u3084 lsmod \u30b3\u30de\u30f3\u30c9\u3092\u5229\u7528\u3057\u3066\u78ba\u8a8d\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 $ modinfo nvidia-fs filename: /lib/modules/5.14.0-427.18.1.el9_4.x86_64/extra/nvidia-fs.ko.xz description: NVIDIA GPUDirect Storage license: GPL v2 version: 2.20.5 rhelversion: 9.4 srcversion: 096A726CAEC0A059E24049E depends: retpoline: Y name: nvidia_fs vermagic: 5.14.0-427.18.1.el9_4.x86_64 SMP preempt mod_unload modversions sig_id: PKCS#7 signer: DKMS module signing key sig_key: 18:B4:AE:27:B8:7D:74:4F:C2:27:68:2A:EB:E0:6A:F0:84:B2:94:EE sig_hashalgo: sha512 : : $ lsmod | grep nvidia nvidia_fs 323584 32 nvidia_uvm 6877184 4 nvidia 8822784 43 nvidia_uvm,nvidia_fs drm 741376 2 drm_kms_helper,nvidia \u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u306e\u8a2d\u8a08 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306f\u4ee5\u4e0b\u306e\u6761\u4ef6\u3067\u767a\u52d5\u3057\u307e\u3059\u3002 \u30b9\u30ad\u30e3\u30f3\u5bfe\u8c61\u306e\u30c6\u30fc\u30d6\u30eb\u304cNVMe-SSD\u3067\u69cb\u6210\u3055\u308c\u305f\u533a\u753b\u306b\u914d\u7f6e\u3055\u308c\u3066\u3044\u308b\u3002 /dev/nvmeXXXX \u30d6\u30ed\u30c3\u30af\u30c7\u30d0\u30a4\u30b9\u3001\u307e\u305f\u306f /dev/nvmeXXXX \u30d6\u30ed\u30c3\u30af\u30c7\u30d0\u30a4\u30b9\u306e\u307f\u304b\u3089\u69cb\u6210\u3055\u308c\u305fmd-raid0\u533a\u753b\u304c\u5bfe\u8c61\u3067\u3059\u3002 \u30c6\u30fc\u30d6\u30eb\u30b5\u30a4\u30ba\u304c pg_strom.gpudirect_threshold \u3088\u308a\u3082\u5927\u304d\u3044\u4e8b\u3002 \u3053\u306e\u8a2d\u5b9a\u5024\u306f\u4efb\u610f\u306b\u5909\u66f4\u53ef\u80fd\u3067\u3059\u304c\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306f\u672c\u4f53\u642d\u8f09\u7269\u7406\u30e1\u30e2\u30ea\u306b shared_buffers \u306e\u8a2d\u5b9a\u5024\u306e1/3\u3092\u52a0\u3048\u305f\u5927\u304d\u3055\u3067\u3059\u3002 Note md-raid0\u3092\u7528\u3044\u3066\u8907\u6570\u306eNVMe-SSD\u533a\u753b\u304b\u3089\u30b9\u30c8\u30e9\u30a4\u30d4\u30f3\u30b0\u8aad\u51fa\u3057\u3092\u884c\u3046\u306b\u306f\u3001HeteroDB\u793e\u306e\u63d0\u4f9b\u3059\u308b\u30a8\u30f3\u30bf\u30fc\u30d7\u30e9\u30a4\u30ba\u30b5\u30d6\u30b9\u30af\u30ea\u30d7\u30b7\u30e7\u30f3\u306e\u9069\u7528\u304c\u5fc5\u8981\u3067\u3059\u3002 \u30c6\u30fc\u30d6\u30eb\u3092NVMe-SSD\u3067\u69cb\u6210\u3055\u308c\u305f\u533a\u753b\u306b\u914d\u7f6e\u3059\u308b\u306b\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u5168\u4f53\u3092NVMe-SSD\u30dc\u30ea\u30e5\u30fc\u30e0\u306b\u683c\u7d0d\u3059\u308b\u4ee5\u5916\u306b\u3082\u3001PostgreSQL\u306e\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u6a5f\u80fd\u3092\u7528\u3044\u3066\u7279\u5b9a\u306e\u30c6\u30fc\u30d6\u30eb\u3084\u7279\u5b9a\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u307f\u3092NVMe-SSD\u30dc\u30ea\u30e5\u30fc\u30e0\u306b\u914d\u7f6e\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4f8b\u3048\u3070 /opt/nvme \u306bNVMe-SSD\u30dc\u30ea\u30e5\u30fc\u30e0\u304c\u30de\u30a6\u30f3\u30c8\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u3092\u4f5c\u6210\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 PostgreSQL\u306e\u30b5\u30fc\u30d0\u30d7\u30ed\u30bb\u30b9\u306e\u6a29\u9650\u3067\u5f53\u8a72\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u914d\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u66f8\u304d\u3067\u304d\u308b\u3088\u3046\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308b\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 CREATE TABLESPACE my_nvme LOCATION '/opt/nvme'; \u3053\u306e\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u4e0a\u306b\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3059\u308b\u306b\u306f\u3001 CREATE TABLE \u69cb\u6587\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u6307\u5b9a\u3057\u307e\u3059\u3002 CREATE TABLE my_table (...) TABLESPACE my_nvme; \u3042\u308b\u3044\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u3092\u5909\u66f4\u3059\u308b\u306b\u306f\u3001 ALTER DATABASE \u69cb\u6587\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u6307\u5b9a\u3057\u307e\u3059\u3002 \u3053\u306e\u5834\u5408\u3001\u65e2\u5b58\u30c6\u30fc\u30d6\u30eb\u306e\u914d\u7f6e\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u306f\u5909\u66f4\u3055\u308c\u306a\u3044\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 ALTER DATABASE my_database SET TABLESPACE my_nvme; \u904b\u7528 GPU\u3068NVME-SSD\u9593\u306e\u8ddd\u96e2 \u30b5\u30fc\u30d0\u306e\u9078\u5b9a\u3068GPU\u304a\u3088\u3073NVME-SSD\u306e\u642d\u8f09\u306b\u3042\u305f\u308a\u3001\u30c7\u30d0\u30a4\u30b9\u306e\u6301\u3064\u6027\u80fd\u3092\u6700\u5927\u9650\u306b\u5f15\u304d\u51fa\u3059\u306b\u306f\u3001\u30c7\u30d0\u30a4\u30b9\u9593\u306e\u8ddd\u96e2\u3092\u610f\u8b58\u3057\u305f\u30b3\u30f3\u30d5\u30a3\u30b0\u304c\u5fc5\u8981\u3067\u3059\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u6a5f\u80fd\u304c\u305d\u306e\u57fa\u76e4\u3068\u3057\u3066\u4f7f\u7528\u3057\u3066\u3044\u308b NVIDIA GPUDirect RDMA \u306f\u3001P2P DMA\u3092\u5b9f\u884c\u3059\u308b\u306b\u306f\u4e92\u3044\u306e\u30c7\u30d0\u30a4\u30b9\u304c\u540c\u3058PCIe root complex\u306e\u914d\u4e0b\u306b\u63a5\u7d9a\u3055\u308c\u3066\u3044\u308b\u4e8b\u3092\u8981\u6c42\u3057\u3066\u3044\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u30c7\u30e5\u30a2\u30ebCPU\u30b7\u30b9\u30c6\u30e0\u3067NVME-SSD\u304cCPU1\u306b\u3001GPU\u304cCPU2\u306b\u63a5\u7d9a\u3055\u308c\u3066\u304a\u308a\u3001P2P DMA\u304cCPU\u9593\u306eQPI\u3092\u6a2a\u5207\u308b\u3088\u3046\u69cb\u6210\u3059\u308b\u4e8b\u306f\u3067\u304d\u307e\u305b\u3093\u3002 \u307e\u305f\u3001\u6027\u80fd\u306e\u89b3\u70b9\u304b\u3089\u306fCPU\u5185\u8535\u306ePCIe\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3088\u308a\u3082\u3001\u5c02\u7528\u306ePCIe\u30b9\u30a4\u30c3\u30c1\u3092\u4ecb\u3057\u3066\u4e92\u3044\u306e\u30c7\u30d0\u30a4\u30b9\u3092\u63a5\u7d9a\u3059\u308b\u65b9\u304c\u63a8\u5968\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u5199\u771f\u306fHPC\u5411\u3051\u30b5\u30fc\u30d0\u306e\u30de\u30b6\u30fc\u30dc\u30fc\u30c9\u3067\u30018\u672c\u306ePCIe x16\u30b9\u30ed\u30c3\u30c8\u304cPCIe\u30b9\u30a4\u30c3\u30c1\u3092\u4ecb\u3057\u3066\u4e92\u3044\u306b\u5bfe\u3068\u306a\u308b\u30b9\u30ed\u30c3\u30c8\u3068\u63a5\u7d9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001\u5199\u771f\u306e\u5de6\u5074\u306e\u30b9\u30ed\u30c3\u30c8\u306fCPU1\u306b\u3001\u53f3\u5074\u306e\u30b9\u30ed\u30c3\u30c8\u306fCPU2\u306b\u63a5\u7d9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u4f8b\u3048\u3070\u3001SSD-2\u4e0a\u306b\u69cb\u7bc9\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u3092GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u3092\u7528\u3044\u3066\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u5834\u5408\u3001\u6700\u9069\u306aGPU\u306e\u9078\u629e\u306fGPU-2\u3067\u3057\u3087\u3046\u3002\u307e\u305fGPU-1\u3092\u4f7f\u7528\u3059\u308b\u4e8b\u3082\u53ef\u80fd\u3067\u3059\u304c\u3001GPUDirect RDMA\u306e\u5236\u7d04\u304b\u3089\u3001GPU-3\u3068GPU-4\u306e\u4f7f\u7528\u306f\u907f\u3051\u306d\u3070\u306a\u308a\u307e\u305b\u3093\u3002 PG-Strom\u306f\u8d77\u52d5\u6642\u306b\u30b7\u30b9\u30c6\u30e0\u306ePCIe\u30d0\u30b9\u30c8\u30dd\u30ed\u30b8\u60c5\u5831\u3092\u53d6\u5f97\u3057\u3001GPU\u3068NVME-SSD\u9593\u306e\u8ad6\u7406\u7684\u306a\u8ddd\u96e2\u3092\u7b97\u51fa\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8d77\u52d5\u6642\u306e\u30ed\u30b0\u306b\u8a18\u9332\u3055\u308c\u3066\u304a\u308a\u3001\u4f8b\u3048\u3070 /dev/nvme2 \u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u6642\u306fGPU1\u3068\u3044\u3063\u305f\u5177\u5408\u306b\u3001\u5404NVME-SSD\u3054\u3068\u306b\u6700\u3082\u8ddd\u96e2\u306e\u8fd1\u3044GPU\u3092\u512a\u5148\u3057\u3066\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 $ pg_ctl restart : LOG: PG-Strom: GPU0 NVIDIA A100-PCIE-40GB (108 SMs; 1410MHz, L2 40960kB), RAM 39.50GB (5120bits, 1.16GHz), PCI-E Bar1 64GB, CC 8.0 LOG: [0000:41:00:0] GPU0 (NVIDIA A100-PCIE-40GB; GPU-13943bfd-5b30-38f5-0473-78> LOG: [0000:81:00:0] nvme0 (NGD-IN2500-080T4-C) --> GPU0 [dist=9] LOG: [0000:82:00:0] nvme2 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] LOG: [0000:c2:00:0] nvme3 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] LOG: [0000:c6:00:0] nvme5 (Corsair MP600 CORE) --> GPU0 [dist=9] LOG: [0000:c3:00:0] nvme4 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] LOG: [0000:c1:00:0] nvme1 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] LOG: [0000:c4:00:0] nvme6 (NGD-IN2500-080T4-C) --> GPU0 [dist=9] \u901a\u5e38\u306f\u81ea\u52d5\u8a2d\u5b9a\u3067\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u3002 \u305f\u3060\u3001NVME-over-Fabric(RDMA)\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306fPCIe\u30d0\u30b9\u4e0a\u306envme\u30c7\u30d0\u30a4\u30b9\u306e\u4f4d\u7f6e\u3092\u53d6\u5f97\u3067\u304d\u306a\u3044\u305f\u3081\u3001\u624b\u52d5\u3067NVME-SSD\u3068GPU\u306e\u4f4d\u7f6e\u95a2\u4fc2\u3092\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u4f8b\u3048\u3070 nvme1 \u306b\u306f gpu2 \u3092\u3001 nvme2 \u3068 nvme3 \u306b\u306f gpu1 \u3092\u5272\u308a\u5f53\u3066\u308b\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092 postgresql.conf \u3078\u8a18\u8ff0\u3057\u307e\u3059\u3002\u3053\u306e\u624b\u52d5\u8a2d\u5b9a\u306f\u3001\u81ea\u52d5\u8a2d\u5b9a\u3088\u308a\u3082\u512a\u5148\u3059\u308b\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 pg_strom.nvme_distance_map = 'nvme1=gpu2,nvme2=gpu1,nvme3=gpu1' \u30ed\u30fc\u30ab\u30eb\u306eNVME-SSD\u30c7\u30d0\u30a4\u30b9\u4ee5\u5916\u3001\u4f8b\u3048\u3070100Gb\u30a4\u30fc\u30b5\u30cd\u30c3\u30c8\u3067\u63a5\u7d9a\u3055\u308c\u305f\u30b9\u30c8\u30ec\u30fc\u30b8\u30b5\u30fc\u30d0\u304b\u3089GPU-Direct SQL\u3092\u5b9f\u884c\u3059\u308b\u5834\u5408\u306a\u3069\u3001PCI-E\u30d0\u30b9\u4e0a\u306e\u8ddd\u96e2\u306e\u6982\u5ff5\u304c\u5f53\u3066\u306f\u307e\u3089\u306a\u3044\u5834\u5408\u306f\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u304c\u30de\u30a6\u30f3\u30c8\u3055\u308c\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3068\u3001\u305d\u3053\u306b\u95a2\u9023\u4ed8\u3051\u308bGPU\u3092\u6307\u5b9a\u3059\u308b\u4e8b\u3082\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306f\u8a2d\u5b9a\u4f8b\u3067\u3059\u3002 pg_strom.nvme_distance_map = '/mnt/0=gpu0,/mnt/1=gpu1' GUC\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3088\u308b\u5236\u5fa1 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306b\u95a2\u9023\u3059\u308bGUC\u30d1\u30e9\u30e1\u30fc\u30bf\u306f2\u3064\u3042\u308a\u307e\u3059\u3002 \u4e00\u3064\u306f pg_strom.gpudirect_enabled \u3067\u3001GPU\u30c0\u30a4\u30ec\u30af\u30c8\u6a5f\u80fd\u306e\u6709\u52b9/\u7121\u52b9\u3092\u5358\u7d14\u306bon/off\u3057\u307e\u3059\u3002 \u672c\u30d1\u30e9\u30e1\u30fc\u30bf\u304c off \u306b\u306a\u3063\u3066\u3044\u308b\u3068\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u30b5\u30a4\u30ba\u3084\u7269\u7406\u914d\u7f6e\u3068\u306f\u7121\u95a2\u4fc2\u306bGPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306f\u4f7f\u7528\u3055\u308c\u307e\u305b\u3093\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306f on \u3067\u3059\u3002 \u3082\u3046\u4e00\u3064\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306f pg_strom.gpudirect_threshold \u3067\u3001GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u304c\u4f7f\u308f\u308c\u308b\u3079\u304d\u6700\u5c0f\u306e\u30c6\u30fc\u30d6\u30eb\u30b5\u30a4\u30ba\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u30c6\u30fc\u30d6\u30eb\u306e\u7269\u7406\u914d\u7f6e\u304cNVME-SSD\u533a\u753b\uff08\u307e\u305f\u306f\u3001NVME-SSD\u306e\u307f\u3067\u69cb\u6210\u3055\u308c\u305fmd-raid0\u533a\u753b\uff09\u4e0a\u306b\u5b58\u5728\u3057\u3001\u304b\u3064\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u30b5\u30a4\u30ba\u304c\u672c\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u6307\u5b9a\u5024\u3088\u308a\u3082\u5927\u304d\u306a\u5834\u5408\u3001PG-Strom\u306fGPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u3092\u9078\u629e\u3057\u307e\u3059\u3002 \u672c\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306f 2GB \u3067\u3059\u3002\u3064\u307e\u308a\u3001\u660e\u3089\u304b\u306b\u5c0f\u3055\u306a\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u306fGPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u3067\u306f\u306a\u304f\u3001PostgreSQL\u306e\u30d0\u30c3\u30d5\u30a1\u304b\u3089\u8aad\u307f\u51fa\u3059\u4e8b\u3092\u512a\u5148\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u3001\u4e00\u56de\u306e\u8aad\u307f\u51fa\u3057\u3067\u3042\u308c\u3070GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306b\u512a\u4f4d\u6027\u304c\u3042\u3063\u305f\u3068\u3057\u3066\u3082\u3001\u30aa\u30f3\u30e1\u30e2\u30ea\u51e6\u7406\u304c\u3067\u304d\u308b\u7a0b\u5ea6\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u306f\u3001\u4e8c\u56de\u76ee\u4ee5\u964d\u306e\u30c7\u30a3\u30b9\u30af\u30ad\u30e3\u30c3\u30b7\u30e5\u5229\u7528\u3092\u8003\u616e\u3059\u308b\u3068\u3001\u5fc5\u305a\u3057\u3082\u512a\u4f4d\u3068\u306f\u8a00\u3048\u306a\u3044\u3068\u3044\u3046\u4eee\u5b9a\u306b\u7acb\u3063\u3066\u3044\u308b\u3068\u3044\u3046\u4e8b\u3067\u3059\u3002 \u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u7279\u6027\u306b\u3088\u3063\u3066\u306f\u5fc5\u305a\u3057\u3082\u3053\u306e\u8a2d\u5b9a\u304c\u6b63\u3057\u3044\u3068\u306f\u9650\u308a\u307e\u305b\u3093\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306e\u5229\u7528\u3092\u78ba\u8a8d\u3059\u308b EXPLAIN \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u5f53\u8a72\u30af\u30a8\u30ea\u3067GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u304c\u5229\u7528\u3055\u308c\u308b\u306e\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u30af\u30a8\u30ea\u306e\u4f8b\u3067\u306f\u3001 Custom Scan (GpuJoin) \u306b\u3088\u308b lineorder \u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3059\u308b\u30b9\u30ad\u30e3\u30f3\u306b NVMe-Strom: enabled \u3068\u306e\u8868\u793a\u304c\u51fa\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001 lineorder \u30c6\u30fc\u30d6\u30eb\u304b\u3089\u306e\u8aad\u51fa\u3057\u306b\u306fGPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u304c\u5229\u7528\u3055\u308c\u307e\u3059\u3002 # explain (costs off) select sum(lo_revenue), d_year, p_brand1 from lineorder, date1, part, supplier where lo_orderdate = d_datekey and lo_partkey = p_partkey and lo_suppkey = s_suppkey and p_category = 'MFGR#12' and s_region = 'AMERICA' group by d_year, p_brand1 order by d_year, p_brand1; QUERY PLAN ---------------------------------------------------------------------------------------------- GroupAggregate Group Key: date1.d_year, part.p_brand1 -> Sort Sort Key: date1.d_year, part.p_brand1 -> Custom Scan (GpuPreAgg) Reduction: Local GPU Projection: pgstrom.psum((lo_revenue)::double precision), d_year, p_brand1 Combined GpuJoin: enabled -> Custom Scan (GpuJoin) on lineorder GPU Projection: date1.d_year, part.p_brand1, lineorder.lo_revenue Outer Scan: lineorder Depth 1: GpuHashJoin (nrows 2406009600...97764190) HashKeys: lineorder.lo_partkey JoinQuals: (lineorder.lo_partkey = part.p_partkey) KDS-Hash (size: 10.67MB) Depth 2: GpuHashJoin (nrows 97764190...18544060) HashKeys: lineorder.lo_suppkey JoinQuals: (lineorder.lo_suppkey = supplier.s_suppkey) KDS-Hash (size: 131.59MB) Depth 3: GpuHashJoin (nrows 18544060...18544060) HashKeys: lineorder.lo_orderdate JoinQuals: (lineorder.lo_orderdate = date1.d_datekey) KDS-Hash (size: 461.89KB) NVMe-Strom: enabled -> Custom Scan (GpuScan) on part GPU Projection: p_brand1, p_partkey GPU Filter: (p_category = 'MFGR#12'::bpchar) -> Custom Scan (GpuScan) on supplier GPU Projection: s_suppkey GPU Filter: (s_region = 'AMERICA'::bpchar) -> Seq Scan on date1 (31 rows) Visibility Map\u306b\u95a2\u3059\u308b\u6ce8\u610f\u4e8b\u9805 \u73fe\u5728\u306e\u3068\u3053\u308d\u3001PG-Strom\u306eGPU\u5074\u51e6\u7406\u3067\u306f\u884c\u5358\u4f4d\u306eMVCC\u53ef\u8996\u6027\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3046\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3002\u3053\u308c\u306f\u3001\u53ef\u8996\u6027\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3046\u305f\u3081\u306b\u5fc5\u8981\u306a\u30c7\u30fc\u30bf\u69cb\u9020\u304c\u30db\u30b9\u30c8\u5074\u3060\u3051\u306b\u5b58\u5728\u3059\u308b\u305f\u3081\u3067\u3059\u304c\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u4e0a\u306e\u30d6\u30ed\u30c3\u30af\u3092\u76f4\u63a5GPU\u306b\u8ee2\u9001\u3059\u308b\u5834\u5408\u3001\u5c11\u3005\u5384\u4ecb\u306a\u554f\u984c\u304c\u751f\u3058\u307e\u3059\u3002 NVMe-SSD\u306bP2P DMA\u3092\u8981\u6c42\u3059\u308b\u6642\u70b9\u3067\u306f\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u30d6\u30ed\u30c3\u30af\u306e\u5185\u5bb9\u306f\u307e\u3060CPU/RAM\u3078\u3068\u8aad\u307f\u51fa\u3055\u308c\u3066\u3044\u306a\u3044\u305f\u3081\u3001\u5177\u4f53\u7684\u306b\u3069\u306e\u884c\u304c\u53ef\u8996\u3067\u3042\u308b\u306e\u304b\u3001\u3069\u306e\u884c\u304c\u4e0d\u53ef\u8996\u3067\u3042\u308b\u306e\u304b\u3092\u5224\u5225\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3002\u3053\u308c\u306f\u3001PostgreSQL\u304c\u30ec\u30b3\u30fc\u30c9\u3092\u30b9\u30c8\u30ec\u30fc\u30b8\u3078\u66f8\u304d\u51fa\u3059\u969b\u306bMVCC\u95a2\u9023\u306e\u5c5e\u6027\u3068\u5171\u306b\u66f8\u304d\u8fbc\u3093\u3067\u3044\u308b\u305f\u3081\u3067\u3001\u4f3c\u305f\u3088\u3046\u306a\u554f\u984c\u304cIndexOnlyScan\u3092\u5b9f\u88c5\u3059\u308b\u969b\u306b\u8868\u9762\u5316\u3057\u307e\u3057\u305f\u3002 \u3053\u308c\u306b\u5bfe\u51e6\u3059\u308b\u305f\u3081\u3001PostgreSQL\u306fVisibility Map\u3068\u547c\u3070\u308c\u308b\u30a4\u30f3\u30d5\u30e9\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u3042\u308b\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u4e2d\u306b\u5b58\u5728\u3059\u308b\u30ec\u30b3\u30fc\u30c9\u304c\u5168\u3066\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304b\u3089\u53ef\u8996\u3067\u3042\u308b\u4e8b\u304c\u660e\u3089\u304b\u3067\u3042\u308c\u3070\u3001\u8a72\u5f53\u3059\u308b\u30d3\u30c3\u30c8\u3092\u7acb\u3066\u308b\u4e8b\u3067\u3001\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u3092\u8aad\u3080\u3053\u3068\u306a\u304f\u5f53\u8a72\u30d6\u30ed\u30c3\u30af\u306bMVCC\u4e0d\u53ef\u8996\u306a\u30ec\u30b3\u30fc\u30c9\u304c\u5b58\u5728\u3059\u308b\u304b\u5426\u304b\u3092\u5224\u5b9a\u3059\u308b\u4e8b\u3092\u53ef\u80fd\u3068\u3059\u308b\u3082\u306e\u3067\u3059\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306f\u3053\u306e\u30a4\u30f3\u30d5\u30e9\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u3064\u307e\u308a\u3001Visibility Map\u304c\u30bb\u30c3\u30c8\u3055\u308c\u3066\u304a\u308a\u3001\"all-visible\"\u3067\u3042\u308b\u30d6\u30ed\u30c3\u30af\u3060\u3051\u304cP2P DMA\u3067\u8aad\u307f\u51fa\u3059\u3088\u3046\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u9001\u51fa\u3055\u308c\u307e\u3059\u3002 Visibility Map\u306fVACUUM\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u4f5c\u6210\u3055\u308c\u308b\u305f\u3081\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u660e\u793a\u7684\u306bVACUUM\u3092\u5b9f\u884c\u3059\u308b\u4e8b\u3067\u5f37\u5236\u7684\u306bVisibility Map\u3092\u69cb\u7bc9\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 VACUUM ANALYZE linerorder;","title":"GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL"},{"location":"ssd2gpu/#gpusql","text":"","title":"GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c"},{"location":"ssd2gpu/#_1","text":"SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u9ad8\u901f\u306b\u51e6\u7406\u3059\u308b\u306b\u306f\u3001\u30d7\u30ed\u30bb\u30c3\u30b5\u304c\u52b9\u7387\u3088\u304f\u51e6\u7406\u3092\u884c\u3046\u306e\u3068\u540c\u69d8\u306b\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u3084\u30e1\u30e2\u30ea\u304b\u3089\u30d7\u30ed\u30bb\u30c3\u30b5\u3078\u9ad8\u901f\u306b\u30c7\u30fc\u30bf\u3092\u4f9b\u7d66\u3059\u308b\u4e8b\u304c\u91cd\u8981\u3067\u3059\u3002\u51e6\u7406\u3059\u3079\u304d\u30c7\u30fc\u30bf\u304c\u30d7\u30ed\u30bb\u30c3\u30b5\u306b\u5c4a\u3044\u3066\u3044\u306a\u3051\u308c\u3070\u3001\u30d7\u30ed\u30bb\u30c3\u30b5\u306f\u624b\u6301\u3061\u7121\u6c99\u6c70\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u6a5f\u80fd\u306f\u3001PCIe\u30d0\u30b9\u306b\u76f4\u7d50\u3059\u308b\u4e8b\u3067\u9ad8\u901f\u306aI/O\u51e6\u7406\u3092\u5b9f\u73fe\u3059\u308bNVMe-SSD\u3068\u3001\u540c\u3058PCIe\u30d0\u30b9\u4e0a\u306b\u63a5\u7d9a\u3055\u308c\u305fGPU\u3092\u30c0\u30a4\u30ec\u30af\u30c8\u306b\u63a5\u7d9a\u3057\u3001\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u9650\u754c\u306b\u8fd1\u3044\u901f\u5ea6\u3067\u30c7\u30fc\u30bf\u3092\u30d7\u30ed\u30bb\u30c3\u30b5\u306b\u4f9b\u7d66\u3059\u308b\u4e8b\u3067SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u9ad8\u901f\u306b\u51e6\u7406\u3059\u308b\u305f\u3081\u306e\u6a5f\u80fd\u3067\u3059\u3002 \u901a\u5e38\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u4e0a\u306b\u683c\u7d0d\u3055\u308c\u305fPostgreSQL\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u306f\u3001PCIe\u30d0\u30b9\u3092\u901a\u3057\u3066\u3044\u3063\u305f\u3093CPU/RAM\u3078\u3068\u30ed\u30fc\u30c9\u3055\u308c\u307e\u3059\u3002\u305d\u306e\u5f8c\u3001\u30af\u30a8\u30ea\u5b9f\u884c\u8a08\u753b\u306b\u3057\u305f\u304c\u3063\u3066WHERE\u53e5\u306b\u3088\u308b\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3084JOIN/GROUP BY\u3068\u3044\u3063\u305f\u51e6\u7406\u3092\u884c\u3046\u308f\u3051\u3067\u3059\u304c\u3001\u96c6\u8a08\u7cfb\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u7279\u6027\u4e0a\u3001\u5165\u529b\u3059\u308b\u30c7\u30fc\u30bf\u4ef6\u6570\u3088\u308a\u51fa\u529b\u3059\u308b\u30c7\u30fc\u30bf\u4ef6\u6570\u306e\u65b9\u304c\u306f\u308b\u304b\u306b\u5c11\u306a\u3044\u4ef6\u6570\u3068\u306a\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070\u6570\u5341\u5104\u884c\u3092\u8aad\u307f\u51fa\u3057\u305f\u7d50\u679c\u3092GROUP BY\u3067\u96c6\u7d04\u3057\u305f\u7d50\u679c\u304c\u9ad8\u3005\u6570\u767e\u884c\u3068\u3044\u3046\u4e8b\u3082\u73cd\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002 \u8a00\u3044\u63db\u3048\u308c\u3070\u3001\u6211\u3005\u306f\u30b4\u30df\u30c7\u30fc\u30bf\u3092\u904b\u3076\u305f\u3081\u306bPCIe\u30d0\u30b9\u4e0a\u306e\u5e2f\u57df\u3092\u6d88\u8cbb\u3057\u3066\u3044\u308b\u3068\u3082\u8a00\u3048\u307e\u3059\u304c\u3001CPU\u304c\u30ec\u30b3\u30fc\u30c9\u306e\u4e2d\u8eab\u3092\u8abf\u3079\u308b\u307e\u3067\u306f\u3001\u305d\u306e\u8981\u4e0d\u8981\u3092\u5224\u65ad\u3067\u304d\u306a\u3044\u305f\u3081\u3001\u4e00\u822c\u7684\u306a\u5b9f\u88c5\u3067\u306f\u3053\u308c\u306f\u4e0d\u53ef\u907f\u3068\u8a00\u3048\u307e\u3059\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306f\u30c7\u30fc\u30bf\u306e\u6d41\u308c\u3092\u5909\u3048\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u4e0a\u306e\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u3092PCIe\u30d0\u30b9\u4e0a\u306eP2P DMA\u3092\u7528\u3044\u3066GPU\u306b\u76f4\u63a5\u8ee2\u9001\u3057\u3001GPU\u3067SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u51e6\u7406\u3059\u308b\u4e8b\u3067CPU\u304c\u51e6\u7406\u3059\u3079\u304d\u30ec\u30b3\u30fc\u30c9\u6570\u3092\u6e1b\u3089\u3059\u305f\u3081\u306e\u6a5f\u80fd\u3067\u3059\u3002\u3044\u308f\u3070\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u3068CPU/RAM\u306e\u9593\u306b\u4f4d\u7f6e\u3057\u3066SQL\u3092\u51e6\u7406\u3059\u308b\u305f\u3081\u306e\u30d7\u30ea\u30d7\u30ed\u30bb\u30c3\u30b5\u3068\u3057\u3066GPU\u3092\u6d3b\u7528\u3057\u3001\u7d50\u679c\u3068\u3057\u3066I/O\u51e6\u7406\u3092\u9ad8\u901f\u5316\u3059\u308b\u305f\u3081\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u3067\u3059\u3002 \u672c\u6a5f\u80fd\u306f\u3001\u5185\u90e8\u7684\u306bNVIDIA GPUDirect Storage\u30e2\u30b8\u30e5\u30fc\u30eb\uff08 nvidia-fs \uff09\u3092\u4f7f\u7528\u3057\u3066\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u3068NVME\u30b9\u30c8\u30ec\u30fc\u30b8\u3068\u306e\u9593\u3067P2P\u306e\u30c7\u30fc\u30bf\u8ee2\u9001\u3092\u884c\u3044\u307e\u3059\u3002 \u3057\u305f\u304c\u3063\u3066\u3001\u672c\u6a5f\u80fd\u3092\u5229\u7528\u3059\u308b\u306b\u306f\u3001PostgreSQL\u306e\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3042\u308bPG-Strom\u3060\u3051\u3067\u306f\u306a\u304f\u3001\u4e0a\u8a18\u306eLinux kernel\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u3002 \u307e\u305f\u3001\u672c\u6a5f\u80fd\u304c\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u306e\u306fNVME\u4ed5\u69d8\u306eSSD\u3084\u3001NVME-oF\u3067\u63a5\u7d9a\u3055\u308c\u305f\u30ea\u30e2\u30fc\u30c8\u30c7\u30d0\u30a4\u30b9\u306e\u307f\u3067\u3059\u3002 SAS\u3084SATA\u3068\u3044\u3063\u305f\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3067\u63a5\u7d9a\u3055\u308c\u305f\u65e7\u5f0f\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u306b\u306f\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u305b\u3093\u3002 \u4eca\u307e\u3067\u306b\u52d5\u4f5c\u5b9f\u7e3e\u306e\u3042\u308bNVME-SSD\u306b\u3064\u3044\u3066\u306f 002: HW Validation List \u304c\u53c2\u8003\u306b\u306a\u308b\u3067\u3057\u3087\u3046\u3002","title":"\u6982\u8981"},{"location":"ssd2gpu/#_2","text":"","title":"\u521d\u671f\u8a2d\u5b9a"},{"location":"ssd2gpu/#_3","text":"\u4ee5\u524d\u306ePG-Strom\u3067\u306f\u3001GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u306e\u5229\u7528\u306b\u306fHeteroDB\u793e\u306e\u958b\u767a\u3057\u305f\u72ec\u81ea\u306eLinux kernel\u30c9\u30e9\u30a4\u30d0\u304c\u5fc5\u8981\u3067\u3057\u305f\u304c\u3001v3.0\u4ee5\u964d\u3067\u306fNVIDIA\u306e\u63d0\u4f9b\u3059\u308bGPUDirect Storage\u3092\u5229\u7528\u3059\u308b\u3088\u3046\u306b\u8a2d\u8a08\u3092\u5909\u66f4\u3057\u3066\u3044\u307e\u3059\u3002GPUDirect Storage\u7528\u306eLinux kernel\u30c9\u30e9\u30a4\u30d0\uff08 nvidia-fs \uff09\u306fCUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30d7\u30ed\u30bb\u30b9\u306b\u7d71\u5408\u3055\u308c\u3001\u672c\u30de\u30cb\u30e5\u30a2\u30eb\u306e\u300c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u300d\u306e\u7ae0\u306b\u8a18\u8f09\u306e\u624b\u9806\u3067\u30b7\u30b9\u30c6\u30e0\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3057\u305f\u5834\u5408\u3001\u7279\u306b\u8ffd\u52a0\u306e\u8a2d\u5b9a\u306f\u5fc5\u8981\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u5fc5\u8981\u306aLinux kernel\u30c9\u30e9\u30a4\u30d0\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3001 modinfo \u30b3\u30de\u30f3\u30c9\u3084 lsmod \u30b3\u30de\u30f3\u30c9\u3092\u5229\u7528\u3057\u3066\u78ba\u8a8d\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 $ modinfo nvidia-fs filename: /lib/modules/5.14.0-427.18.1.el9_4.x86_64/extra/nvidia-fs.ko.xz description: NVIDIA GPUDirect Storage license: GPL v2 version: 2.20.5 rhelversion: 9.4 srcversion: 096A726CAEC0A059E24049E depends: retpoline: Y name: nvidia_fs vermagic: 5.14.0-427.18.1.el9_4.x86_64 SMP preempt mod_unload modversions sig_id: PKCS#7 signer: DKMS module signing key sig_key: 18:B4:AE:27:B8:7D:74:4F:C2:27:68:2A:EB:E0:6A:F0:84:B2:94:EE sig_hashalgo: sha512 : : $ lsmod | grep nvidia nvidia_fs 323584 32 nvidia_uvm 6877184 4 nvidia 8822784 43 nvidia_uvm,nvidia_fs drm 741376 2 drm_kms_helper,nvidia","title":"\u30c9\u30e9\u30a4\u30d0\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"ssd2gpu/#_4","text":"GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306f\u4ee5\u4e0b\u306e\u6761\u4ef6\u3067\u767a\u52d5\u3057\u307e\u3059\u3002 \u30b9\u30ad\u30e3\u30f3\u5bfe\u8c61\u306e\u30c6\u30fc\u30d6\u30eb\u304cNVMe-SSD\u3067\u69cb\u6210\u3055\u308c\u305f\u533a\u753b\u306b\u914d\u7f6e\u3055\u308c\u3066\u3044\u308b\u3002 /dev/nvmeXXXX \u30d6\u30ed\u30c3\u30af\u30c7\u30d0\u30a4\u30b9\u3001\u307e\u305f\u306f /dev/nvmeXXXX \u30d6\u30ed\u30c3\u30af\u30c7\u30d0\u30a4\u30b9\u306e\u307f\u304b\u3089\u69cb\u6210\u3055\u308c\u305fmd-raid0\u533a\u753b\u304c\u5bfe\u8c61\u3067\u3059\u3002 \u30c6\u30fc\u30d6\u30eb\u30b5\u30a4\u30ba\u304c pg_strom.gpudirect_threshold \u3088\u308a\u3082\u5927\u304d\u3044\u4e8b\u3002 \u3053\u306e\u8a2d\u5b9a\u5024\u306f\u4efb\u610f\u306b\u5909\u66f4\u53ef\u80fd\u3067\u3059\u304c\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306f\u672c\u4f53\u642d\u8f09\u7269\u7406\u30e1\u30e2\u30ea\u306b shared_buffers \u306e\u8a2d\u5b9a\u5024\u306e1/3\u3092\u52a0\u3048\u305f\u5927\u304d\u3055\u3067\u3059\u3002 Note md-raid0\u3092\u7528\u3044\u3066\u8907\u6570\u306eNVMe-SSD\u533a\u753b\u304b\u3089\u30b9\u30c8\u30e9\u30a4\u30d4\u30f3\u30b0\u8aad\u51fa\u3057\u3092\u884c\u3046\u306b\u306f\u3001HeteroDB\u793e\u306e\u63d0\u4f9b\u3059\u308b\u30a8\u30f3\u30bf\u30fc\u30d7\u30e9\u30a4\u30ba\u30b5\u30d6\u30b9\u30af\u30ea\u30d7\u30b7\u30e7\u30f3\u306e\u9069\u7528\u304c\u5fc5\u8981\u3067\u3059\u3002 \u30c6\u30fc\u30d6\u30eb\u3092NVMe-SSD\u3067\u69cb\u6210\u3055\u308c\u305f\u533a\u753b\u306b\u914d\u7f6e\u3059\u308b\u306b\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u5168\u4f53\u3092NVMe-SSD\u30dc\u30ea\u30e5\u30fc\u30e0\u306b\u683c\u7d0d\u3059\u308b\u4ee5\u5916\u306b\u3082\u3001PostgreSQL\u306e\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u6a5f\u80fd\u3092\u7528\u3044\u3066\u7279\u5b9a\u306e\u30c6\u30fc\u30d6\u30eb\u3084\u7279\u5b9a\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u307f\u3092NVMe-SSD\u30dc\u30ea\u30e5\u30fc\u30e0\u306b\u914d\u7f6e\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4f8b\u3048\u3070 /opt/nvme \u306bNVMe-SSD\u30dc\u30ea\u30e5\u30fc\u30e0\u304c\u30de\u30a6\u30f3\u30c8\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u3092\u4f5c\u6210\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 PostgreSQL\u306e\u30b5\u30fc\u30d0\u30d7\u30ed\u30bb\u30b9\u306e\u6a29\u9650\u3067\u5f53\u8a72\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u914d\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u66f8\u304d\u3067\u304d\u308b\u3088\u3046\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308b\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 CREATE TABLESPACE my_nvme LOCATION '/opt/nvme'; \u3053\u306e\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u4e0a\u306b\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3059\u308b\u306b\u306f\u3001 CREATE TABLE \u69cb\u6587\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u6307\u5b9a\u3057\u307e\u3059\u3002 CREATE TABLE my_table (...) TABLESPACE my_nvme; \u3042\u308b\u3044\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u3092\u5909\u66f4\u3059\u308b\u306b\u306f\u3001 ALTER DATABASE \u69cb\u6587\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u6307\u5b9a\u3057\u307e\u3059\u3002 \u3053\u306e\u5834\u5408\u3001\u65e2\u5b58\u30c6\u30fc\u30d6\u30eb\u306e\u914d\u7f6e\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u306f\u5909\u66f4\u3055\u308c\u306a\u3044\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 ALTER DATABASE my_database SET TABLESPACE my_nvme;","title":"\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u306e\u8a2d\u8a08"},{"location":"ssd2gpu/#_5","text":"","title":"\u904b\u7528"},{"location":"ssd2gpu/#gpunvme-ssd","text":"\u30b5\u30fc\u30d0\u306e\u9078\u5b9a\u3068GPU\u304a\u3088\u3073NVME-SSD\u306e\u642d\u8f09\u306b\u3042\u305f\u308a\u3001\u30c7\u30d0\u30a4\u30b9\u306e\u6301\u3064\u6027\u80fd\u3092\u6700\u5927\u9650\u306b\u5f15\u304d\u51fa\u3059\u306b\u306f\u3001\u30c7\u30d0\u30a4\u30b9\u9593\u306e\u8ddd\u96e2\u3092\u610f\u8b58\u3057\u305f\u30b3\u30f3\u30d5\u30a3\u30b0\u304c\u5fc5\u8981\u3067\u3059\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u6a5f\u80fd\u304c\u305d\u306e\u57fa\u76e4\u3068\u3057\u3066\u4f7f\u7528\u3057\u3066\u3044\u308b NVIDIA GPUDirect RDMA \u306f\u3001P2P DMA\u3092\u5b9f\u884c\u3059\u308b\u306b\u306f\u4e92\u3044\u306e\u30c7\u30d0\u30a4\u30b9\u304c\u540c\u3058PCIe root complex\u306e\u914d\u4e0b\u306b\u63a5\u7d9a\u3055\u308c\u3066\u3044\u308b\u4e8b\u3092\u8981\u6c42\u3057\u3066\u3044\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u30c7\u30e5\u30a2\u30ebCPU\u30b7\u30b9\u30c6\u30e0\u3067NVME-SSD\u304cCPU1\u306b\u3001GPU\u304cCPU2\u306b\u63a5\u7d9a\u3055\u308c\u3066\u304a\u308a\u3001P2P DMA\u304cCPU\u9593\u306eQPI\u3092\u6a2a\u5207\u308b\u3088\u3046\u69cb\u6210\u3059\u308b\u4e8b\u306f\u3067\u304d\u307e\u305b\u3093\u3002 \u307e\u305f\u3001\u6027\u80fd\u306e\u89b3\u70b9\u304b\u3089\u306fCPU\u5185\u8535\u306ePCIe\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3088\u308a\u3082\u3001\u5c02\u7528\u306ePCIe\u30b9\u30a4\u30c3\u30c1\u3092\u4ecb\u3057\u3066\u4e92\u3044\u306e\u30c7\u30d0\u30a4\u30b9\u3092\u63a5\u7d9a\u3059\u308b\u65b9\u304c\u63a8\u5968\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u5199\u771f\u306fHPC\u5411\u3051\u30b5\u30fc\u30d0\u306e\u30de\u30b6\u30fc\u30dc\u30fc\u30c9\u3067\u30018\u672c\u306ePCIe x16\u30b9\u30ed\u30c3\u30c8\u304cPCIe\u30b9\u30a4\u30c3\u30c1\u3092\u4ecb\u3057\u3066\u4e92\u3044\u306b\u5bfe\u3068\u306a\u308b\u30b9\u30ed\u30c3\u30c8\u3068\u63a5\u7d9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001\u5199\u771f\u306e\u5de6\u5074\u306e\u30b9\u30ed\u30c3\u30c8\u306fCPU1\u306b\u3001\u53f3\u5074\u306e\u30b9\u30ed\u30c3\u30c8\u306fCPU2\u306b\u63a5\u7d9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u4f8b\u3048\u3070\u3001SSD-2\u4e0a\u306b\u69cb\u7bc9\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u3092GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u3092\u7528\u3044\u3066\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u5834\u5408\u3001\u6700\u9069\u306aGPU\u306e\u9078\u629e\u306fGPU-2\u3067\u3057\u3087\u3046\u3002\u307e\u305fGPU-1\u3092\u4f7f\u7528\u3059\u308b\u4e8b\u3082\u53ef\u80fd\u3067\u3059\u304c\u3001GPUDirect RDMA\u306e\u5236\u7d04\u304b\u3089\u3001GPU-3\u3068GPU-4\u306e\u4f7f\u7528\u306f\u907f\u3051\u306d\u3070\u306a\u308a\u307e\u305b\u3093\u3002 PG-Strom\u306f\u8d77\u52d5\u6642\u306b\u30b7\u30b9\u30c6\u30e0\u306ePCIe\u30d0\u30b9\u30c8\u30dd\u30ed\u30b8\u60c5\u5831\u3092\u53d6\u5f97\u3057\u3001GPU\u3068NVME-SSD\u9593\u306e\u8ad6\u7406\u7684\u306a\u8ddd\u96e2\u3092\u7b97\u51fa\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8d77\u52d5\u6642\u306e\u30ed\u30b0\u306b\u8a18\u9332\u3055\u308c\u3066\u304a\u308a\u3001\u4f8b\u3048\u3070 /dev/nvme2 \u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u6642\u306fGPU1\u3068\u3044\u3063\u305f\u5177\u5408\u306b\u3001\u5404NVME-SSD\u3054\u3068\u306b\u6700\u3082\u8ddd\u96e2\u306e\u8fd1\u3044GPU\u3092\u512a\u5148\u3057\u3066\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 $ pg_ctl restart : LOG: PG-Strom: GPU0 NVIDIA A100-PCIE-40GB (108 SMs; 1410MHz, L2 40960kB), RAM 39.50GB (5120bits, 1.16GHz), PCI-E Bar1 64GB, CC 8.0 LOG: [0000:41:00:0] GPU0 (NVIDIA A100-PCIE-40GB; GPU-13943bfd-5b30-38f5-0473-78> LOG: [0000:81:00:0] nvme0 (NGD-IN2500-080T4-C) --> GPU0 [dist=9] LOG: [0000:82:00:0] nvme2 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] LOG: [0000:c2:00:0] nvme3 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] LOG: [0000:c6:00:0] nvme5 (Corsair MP600 CORE) --> GPU0 [dist=9] LOG: [0000:c3:00:0] nvme4 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] LOG: [0000:c1:00:0] nvme1 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] LOG: [0000:c4:00:0] nvme6 (NGD-IN2500-080T4-C) --> GPU0 [dist=9] \u901a\u5e38\u306f\u81ea\u52d5\u8a2d\u5b9a\u3067\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u3002 \u305f\u3060\u3001NVME-over-Fabric(RDMA)\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306fPCIe\u30d0\u30b9\u4e0a\u306envme\u30c7\u30d0\u30a4\u30b9\u306e\u4f4d\u7f6e\u3092\u53d6\u5f97\u3067\u304d\u306a\u3044\u305f\u3081\u3001\u624b\u52d5\u3067NVME-SSD\u3068GPU\u306e\u4f4d\u7f6e\u95a2\u4fc2\u3092\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u4f8b\u3048\u3070 nvme1 \u306b\u306f gpu2 \u3092\u3001 nvme2 \u3068 nvme3 \u306b\u306f gpu1 \u3092\u5272\u308a\u5f53\u3066\u308b\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092 postgresql.conf \u3078\u8a18\u8ff0\u3057\u307e\u3059\u3002\u3053\u306e\u624b\u52d5\u8a2d\u5b9a\u306f\u3001\u81ea\u52d5\u8a2d\u5b9a\u3088\u308a\u3082\u512a\u5148\u3059\u308b\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 pg_strom.nvme_distance_map = 'nvme1=gpu2,nvme2=gpu1,nvme3=gpu1' \u30ed\u30fc\u30ab\u30eb\u306eNVME-SSD\u30c7\u30d0\u30a4\u30b9\u4ee5\u5916\u3001\u4f8b\u3048\u3070100Gb\u30a4\u30fc\u30b5\u30cd\u30c3\u30c8\u3067\u63a5\u7d9a\u3055\u308c\u305f\u30b9\u30c8\u30ec\u30fc\u30b8\u30b5\u30fc\u30d0\u304b\u3089GPU-Direct SQL\u3092\u5b9f\u884c\u3059\u308b\u5834\u5408\u306a\u3069\u3001PCI-E\u30d0\u30b9\u4e0a\u306e\u8ddd\u96e2\u306e\u6982\u5ff5\u304c\u5f53\u3066\u306f\u307e\u3089\u306a\u3044\u5834\u5408\u306f\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u304c\u30de\u30a6\u30f3\u30c8\u3055\u308c\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3068\u3001\u305d\u3053\u306b\u95a2\u9023\u4ed8\u3051\u308bGPU\u3092\u6307\u5b9a\u3059\u308b\u4e8b\u3082\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306f\u8a2d\u5b9a\u4f8b\u3067\u3059\u3002 pg_strom.nvme_distance_map = '/mnt/0=gpu0,/mnt/1=gpu1'","title":"GPU\u3068NVME-SSD\u9593\u306e\u8ddd\u96e2"},{"location":"ssd2gpu/#guc","text":"GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306b\u95a2\u9023\u3059\u308bGUC\u30d1\u30e9\u30e1\u30fc\u30bf\u306f2\u3064\u3042\u308a\u307e\u3059\u3002 \u4e00\u3064\u306f pg_strom.gpudirect_enabled \u3067\u3001GPU\u30c0\u30a4\u30ec\u30af\u30c8\u6a5f\u80fd\u306e\u6709\u52b9/\u7121\u52b9\u3092\u5358\u7d14\u306bon/off\u3057\u307e\u3059\u3002 \u672c\u30d1\u30e9\u30e1\u30fc\u30bf\u304c off \u306b\u306a\u3063\u3066\u3044\u308b\u3068\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u30b5\u30a4\u30ba\u3084\u7269\u7406\u914d\u7f6e\u3068\u306f\u7121\u95a2\u4fc2\u306bGPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306f\u4f7f\u7528\u3055\u308c\u307e\u305b\u3093\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306f on \u3067\u3059\u3002 \u3082\u3046\u4e00\u3064\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306f pg_strom.gpudirect_threshold \u3067\u3001GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u304c\u4f7f\u308f\u308c\u308b\u3079\u304d\u6700\u5c0f\u306e\u30c6\u30fc\u30d6\u30eb\u30b5\u30a4\u30ba\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u30c6\u30fc\u30d6\u30eb\u306e\u7269\u7406\u914d\u7f6e\u304cNVME-SSD\u533a\u753b\uff08\u307e\u305f\u306f\u3001NVME-SSD\u306e\u307f\u3067\u69cb\u6210\u3055\u308c\u305fmd-raid0\u533a\u753b\uff09\u4e0a\u306b\u5b58\u5728\u3057\u3001\u304b\u3064\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u30b5\u30a4\u30ba\u304c\u672c\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u6307\u5b9a\u5024\u3088\u308a\u3082\u5927\u304d\u306a\u5834\u5408\u3001PG-Strom\u306fGPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u3092\u9078\u629e\u3057\u307e\u3059\u3002 \u672c\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306f 2GB \u3067\u3059\u3002\u3064\u307e\u308a\u3001\u660e\u3089\u304b\u306b\u5c0f\u3055\u306a\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u306fGPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u3067\u306f\u306a\u304f\u3001PostgreSQL\u306e\u30d0\u30c3\u30d5\u30a1\u304b\u3089\u8aad\u307f\u51fa\u3059\u4e8b\u3092\u512a\u5148\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u3001\u4e00\u56de\u306e\u8aad\u307f\u51fa\u3057\u3067\u3042\u308c\u3070GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306b\u512a\u4f4d\u6027\u304c\u3042\u3063\u305f\u3068\u3057\u3066\u3082\u3001\u30aa\u30f3\u30e1\u30e2\u30ea\u51e6\u7406\u304c\u3067\u304d\u308b\u7a0b\u5ea6\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u306f\u3001\u4e8c\u56de\u76ee\u4ee5\u964d\u306e\u30c7\u30a3\u30b9\u30af\u30ad\u30e3\u30c3\u30b7\u30e5\u5229\u7528\u3092\u8003\u616e\u3059\u308b\u3068\u3001\u5fc5\u305a\u3057\u3082\u512a\u4f4d\u3068\u306f\u8a00\u3048\u306a\u3044\u3068\u3044\u3046\u4eee\u5b9a\u306b\u7acb\u3063\u3066\u3044\u308b\u3068\u3044\u3046\u4e8b\u3067\u3059\u3002 \u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u7279\u6027\u306b\u3088\u3063\u3066\u306f\u5fc5\u305a\u3057\u3082\u3053\u306e\u8a2d\u5b9a\u304c\u6b63\u3057\u3044\u3068\u306f\u9650\u308a\u307e\u305b\u3093\u3002","title":"GUC\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3088\u308b\u5236\u5fa1"},{"location":"ssd2gpu/#gpusql_1","text":"EXPLAIN \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u5f53\u8a72\u30af\u30a8\u30ea\u3067GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u304c\u5229\u7528\u3055\u308c\u308b\u306e\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u30af\u30a8\u30ea\u306e\u4f8b\u3067\u306f\u3001 Custom Scan (GpuJoin) \u306b\u3088\u308b lineorder \u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3059\u308b\u30b9\u30ad\u30e3\u30f3\u306b NVMe-Strom: enabled \u3068\u306e\u8868\u793a\u304c\u51fa\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001 lineorder \u30c6\u30fc\u30d6\u30eb\u304b\u3089\u306e\u8aad\u51fa\u3057\u306b\u306fGPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u304c\u5229\u7528\u3055\u308c\u307e\u3059\u3002 # explain (costs off) select sum(lo_revenue), d_year, p_brand1 from lineorder, date1, part, supplier where lo_orderdate = d_datekey and lo_partkey = p_partkey and lo_suppkey = s_suppkey and p_category = 'MFGR#12' and s_region = 'AMERICA' group by d_year, p_brand1 order by d_year, p_brand1; QUERY PLAN ---------------------------------------------------------------------------------------------- GroupAggregate Group Key: date1.d_year, part.p_brand1 -> Sort Sort Key: date1.d_year, part.p_brand1 -> Custom Scan (GpuPreAgg) Reduction: Local GPU Projection: pgstrom.psum((lo_revenue)::double precision), d_year, p_brand1 Combined GpuJoin: enabled -> Custom Scan (GpuJoin) on lineorder GPU Projection: date1.d_year, part.p_brand1, lineorder.lo_revenue Outer Scan: lineorder Depth 1: GpuHashJoin (nrows 2406009600...97764190) HashKeys: lineorder.lo_partkey JoinQuals: (lineorder.lo_partkey = part.p_partkey) KDS-Hash (size: 10.67MB) Depth 2: GpuHashJoin (nrows 97764190...18544060) HashKeys: lineorder.lo_suppkey JoinQuals: (lineorder.lo_suppkey = supplier.s_suppkey) KDS-Hash (size: 131.59MB) Depth 3: GpuHashJoin (nrows 18544060...18544060) HashKeys: lineorder.lo_orderdate JoinQuals: (lineorder.lo_orderdate = date1.d_datekey) KDS-Hash (size: 461.89KB) NVMe-Strom: enabled -> Custom Scan (GpuScan) on part GPU Projection: p_brand1, p_partkey GPU Filter: (p_category = 'MFGR#12'::bpchar) -> Custom Scan (GpuScan) on supplier GPU Projection: s_suppkey GPU Filter: (s_region = 'AMERICA'::bpchar) -> Seq Scan on date1 (31 rows)","title":"GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306e\u5229\u7528\u3092\u78ba\u8a8d\u3059\u308b"},{"location":"ssd2gpu/#visibility-map","text":"\u73fe\u5728\u306e\u3068\u3053\u308d\u3001PG-Strom\u306eGPU\u5074\u51e6\u7406\u3067\u306f\u884c\u5358\u4f4d\u306eMVCC\u53ef\u8996\u6027\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3046\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3002\u3053\u308c\u306f\u3001\u53ef\u8996\u6027\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3046\u305f\u3081\u306b\u5fc5\u8981\u306a\u30c7\u30fc\u30bf\u69cb\u9020\u304c\u30db\u30b9\u30c8\u5074\u3060\u3051\u306b\u5b58\u5728\u3059\u308b\u305f\u3081\u3067\u3059\u304c\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u4e0a\u306e\u30d6\u30ed\u30c3\u30af\u3092\u76f4\u63a5GPU\u306b\u8ee2\u9001\u3059\u308b\u5834\u5408\u3001\u5c11\u3005\u5384\u4ecb\u306a\u554f\u984c\u304c\u751f\u3058\u307e\u3059\u3002 NVMe-SSD\u306bP2P DMA\u3092\u8981\u6c42\u3059\u308b\u6642\u70b9\u3067\u306f\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u30d6\u30ed\u30c3\u30af\u306e\u5185\u5bb9\u306f\u307e\u3060CPU/RAM\u3078\u3068\u8aad\u307f\u51fa\u3055\u308c\u3066\u3044\u306a\u3044\u305f\u3081\u3001\u5177\u4f53\u7684\u306b\u3069\u306e\u884c\u304c\u53ef\u8996\u3067\u3042\u308b\u306e\u304b\u3001\u3069\u306e\u884c\u304c\u4e0d\u53ef\u8996\u3067\u3042\u308b\u306e\u304b\u3092\u5224\u5225\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3002\u3053\u308c\u306f\u3001PostgreSQL\u304c\u30ec\u30b3\u30fc\u30c9\u3092\u30b9\u30c8\u30ec\u30fc\u30b8\u3078\u66f8\u304d\u51fa\u3059\u969b\u306bMVCC\u95a2\u9023\u306e\u5c5e\u6027\u3068\u5171\u306b\u66f8\u304d\u8fbc\u3093\u3067\u3044\u308b\u305f\u3081\u3067\u3001\u4f3c\u305f\u3088\u3046\u306a\u554f\u984c\u304cIndexOnlyScan\u3092\u5b9f\u88c5\u3059\u308b\u969b\u306b\u8868\u9762\u5316\u3057\u307e\u3057\u305f\u3002 \u3053\u308c\u306b\u5bfe\u51e6\u3059\u308b\u305f\u3081\u3001PostgreSQL\u306fVisibility Map\u3068\u547c\u3070\u308c\u308b\u30a4\u30f3\u30d5\u30e9\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u3042\u308b\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u4e2d\u306b\u5b58\u5728\u3059\u308b\u30ec\u30b3\u30fc\u30c9\u304c\u5168\u3066\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304b\u3089\u53ef\u8996\u3067\u3042\u308b\u4e8b\u304c\u660e\u3089\u304b\u3067\u3042\u308c\u3070\u3001\u8a72\u5f53\u3059\u308b\u30d3\u30c3\u30c8\u3092\u7acb\u3066\u308b\u4e8b\u3067\u3001\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u3092\u8aad\u3080\u3053\u3068\u306a\u304f\u5f53\u8a72\u30d6\u30ed\u30c3\u30af\u306bMVCC\u4e0d\u53ef\u8996\u306a\u30ec\u30b3\u30fc\u30c9\u304c\u5b58\u5728\u3059\u308b\u304b\u5426\u304b\u3092\u5224\u5b9a\u3059\u308b\u4e8b\u3092\u53ef\u80fd\u3068\u3059\u308b\u3082\u306e\u3067\u3059\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306f\u3053\u306e\u30a4\u30f3\u30d5\u30e9\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u3064\u307e\u308a\u3001Visibility Map\u304c\u30bb\u30c3\u30c8\u3055\u308c\u3066\u304a\u308a\u3001\"all-visible\"\u3067\u3042\u308b\u30d6\u30ed\u30c3\u30af\u3060\u3051\u304cP2P DMA\u3067\u8aad\u307f\u51fa\u3059\u3088\u3046\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u9001\u51fa\u3055\u308c\u307e\u3059\u3002 Visibility Map\u306fVACUUM\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u4f5c\u6210\u3055\u308c\u308b\u305f\u3081\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u660e\u793a\u7684\u306bVACUUM\u3092\u5b9f\u884c\u3059\u308b\u4e8b\u3067\u5f37\u5236\u7684\u306bVisibility Map\u3092\u69cb\u7bc9\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 VACUUM ANALYZE linerorder;","title":"Visibility Map\u306b\u95a2\u3059\u308b\u6ce8\u610f\u4e8b\u9805"},{"location":"troubles/","text":"\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0 \u554f\u984c\u306e\u5207\u308a\u5206\u3051 \u7279\u5b9a\u306e\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u5b9f\u884c\u3057\u305f\u969b\u306b\u4f55\u304c\u3057\u304b\u306e\u554f\u984c\u304c\u767a\u751f\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u305d\u308c\u304c\u4f55\u306b\u8d77\u56e0\u3059\u308b\u3082\u306e\u3067\u3042\u308b\u306e\u304b\u3092\u7279\u5b9a\u3059\u308b\u306e\u306f\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u7b2c\u4e00\u6b69\u3067\u3059\u3002 \u6b8b\u5ff5\u306a\u304c\u3089\u3001PostgreSQL\u958b\u767a\u8005\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u3068\u6bd4\u3079PG-Strom\u306e\u958b\u767a\u8005\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u306f\u975e\u5e38\u306b\u5c11\u306a\u3044\u6570\u306e\u958b\u767a\u8005\u306b\u3088\u3063\u3066\u652f\u3048\u3089\u308c\u3066\u3044\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u54c1\u8cea\u3084\u5b9f\u7e3e\u3068\u3044\u3063\u305f\u89b3\u70b9\u304b\u3089\u3001\u307e\u305aPG-Strom\u304c\u60aa\u3055\u3092\u3057\u3066\u3044\u306a\u3044\u304b\u7591\u3046\u306e\u306f\u59a5\u5f53\u306a\u5224\u65ad\u3067\u3059\u3002 PG-Strom\u306e\u5168\u6a5f\u80fd\u3092\u4e00\u5ea6\u306b\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u306b\u306f pg_strom.enabled \u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u4f7f\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092\u884c\u3046\u4e8b\u3067PG-Strom\u306f\u7121\u52b9\u5316\u3055\u308c\u3001\u6a19\u6e96\u306ePostgreSQL\u3068\u5168\u304f\u540c\u4e00\u306e\u72b6\u614b\u3068\u306a\u308a\u307e\u3059\u3002 \u305d\u308c\u3067\u3082\u306a\u304a\u554f\u984c\u304c\u518d\u73fe\u3059\u308b\u304b\u3069\u3046\u304b\u306f\u4e00\u3064\u306e\u5224\u65ad\u6750\u6599\u3068\u306a\u308b\u3067\u3057\u3087\u3046\u3002 # SET pg_strom.enabled = off; \u3053\u306e\u4ed6\u306b\u3082\u3001GpuScan\u3001GpuJoin\u3001GpuPreAgg\u3068\u3044\u3063\u305f\u7279\u5b9a\u306e\u5b9f\u884c\u8a08\u753b\u306e\u307f\u3092\u7121\u52b9\u5316\u3059\u308b\u30d1\u30e9\u30e1\u30fc\u30bf\u3082\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u8a73\u7d30\u306f \u30ea\u30d5\u30a1\u30ec\u30f3\u30b9/GPU\u30d1\u30e9\u30e1\u30fc\u30bf \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u306e\u63a1\u53d6 \u30b7\u30b9\u30c6\u30e0\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u3092\u5f15\u304d\u8d77\u3053\u3059\u3088\u3046\u306a\u91cd\u5927\u306a\u30c8\u30e9\u30d6\u30eb\u306e\u89e3\u6790\u306b\u306f\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u306e\u63a1\u53d6\u304c\u6b20\u304b\u305b\u307e\u305b\u3093\u3002 \u672c\u7bc0\u3067\u306f\u3001PostgreSQL\u3068PG-Strom\u30d7\u30ed\u30bb\u30b9\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7(CPU\u5074)\u3001\u304a\u3088\u3073PG-Strom\u306eGPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7(GPU\u5074)\u3092\u53d6\u5f97\u3057\u3001\u969c\u5bb3\u767a\u751f\u6642\u306e\u30d0\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u3092\u63a1\u53d6\u3059\u308b\u305f\u3081\u306e\u624b\u6bb5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002 PostgreSQL\u8d77\u52d5\u6642\u8a2d\u5b9a\u306e\u8ffd\u52a0 \u30d7\u30ed\u30bb\u30b9\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u6642\u306b\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7(CPU\u5074)\u3092\u751f\u6210\u3059\u308b\u306b\u306f\u3001PostgreSQL\u30b5\u30fc\u30d0\u30d7\u30ed\u30bb\u30b9\u304c\u751f\u6210\u3059\u308b\u4e8b\u306e\u3067\u304d\u308b core \u30d5\u30a1\u30a4\u30eb\u306e\u30b5\u30a4\u30ba\u3092\u7121\u5236\u9650\u306b\u5909\u66f4\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306fPostgreSQL\u30b5\u30fc\u30d0\u30d7\u30ed\u30bb\u30b9\u3092\u8d77\u52d5\u3059\u308b\u30b7\u30a7\u30eb\u4e0a\u3067 ulimit -c \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u5909\u66f4\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 GPU\u30ab\u30fc\u30cd\u30eb\u306e\u30a8\u30e9\u30fc\u6642\u306b\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7(GPU\u5074)\u3092\u751f\u6210\u3059\u308b\u306b\u306f\u3001PostgreSQL\u30b5\u30fc\u30d0\u30d7\u30ed\u30bb\u30b9\u304c\u74b0\u5883\u5909\u6570 CUDA_ENABLE_COREDUMP_ON_EXCEPTION \u306b 1 \u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 systemd\u304b\u3089PostgreSQL\u3092\u8d77\u52d5\u3059\u308b\u5834\u5408\u3001 /etc/systemd/system/postgresql-.service.d/ \u4ee5\u4e0b\u306b\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001\u3053\u308c\u3089\u306e\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 RPM\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u5185\u5bb9\u306e pg_strom.conf \u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002 [Service] LimitNOFILE=65536 LimitCORE=infinity #Environment=CUDA_ENABLE_COREDUMP_ON_EXCEPTION=1 CUDA9.1\u306b\u304a\u3044\u3066\u306f\u3001\u901a\u5e38\u3001GPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u306e\u751f\u6210\u306b\u306f\u6570\u5206\u4ee5\u4e0a\u306e\u6642\u9593\u3092\u8981\u3057\u3001\u305d\u306e\u9593\u3001\u30a8\u30e9\u30fc\u3092\u767a\u751f\u3057\u305fPostgreSQL\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u5fdc\u7b54\u306f\u5b8c\u5168\u306b\u505c\u6b62\u3057\u3066\u3057\u307e\u3057\u307e\u3059\u3002 \u305d\u306e\u305f\u3081\u3001\u306f\u7279\u5b9a\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u306b\u304a\u3044\u3066\u767a\u751f\u3059\u308bGPU\u30ab\u30fc\u30cd\u30eb\u306b\u8d77\u56e0\u3059\u308b\u30a8\u30e9\u30fc\u306e\u539f\u56e0\u8abf\u67fb\u3092\u884c\u3046\u5834\u5408\u306b\u3060\u3051\u3001 CUDA_ENABLE_COREDUMP_ON_EXCEPTION \u74b0\u5883\u5909\u6570\u3092\u8a2d\u5b9a\u3059\u308b\u4e8b\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002 RPM\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u304a\u3051\u308b\u30c7\u30d5\u30a9\u30eb\u30c8\u8a2d\u5b9a\u306f\u3001 CUDA_ENABLE_COREDUMP_ON_EXCEPTION \u74b0\u5883\u5909\u6570\u306e\u884c\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066\u3044\u307e\u3059\u3002 PostgreSQL\u30b5\u30fc\u30d0\u30d7\u30ed\u30bb\u30b9\u3092\u518d\u8d77\u52d5\u3059\u308b\u3068\u3001 Max core file size \u304cunlimited\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u306f\u305a\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u78ba\u8a8d\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 # cat /proc//limits Limit Soft Limit Hard Limit Units : : : : Max core file size unlimited unlimited bytes : : : : debuginfo\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u304b\u3089\u610f\u5473\u306e\u3042\u308b\u60c5\u5831\u3092\u8aad\u307f\u53d6\u308b\u306b\u306f\u30b7\u30f3\u30dc\u30eb\u60c5\u5831\u304c\u5fc5\u8981\u3067\u3059\u3002 \u3053\u308c\u3089\u306f -debuginfo \u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u683c\u7d0d\u3055\u308c\u3066\u304a\u308a\u3001\u30b7\u30b9\u30c6\u30e0\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308bPostgreSQL\u304a\u3088\u3073PG-Strom\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u5fdc\u3058\u3066\u305d\u308c\u305e\u308c\u8ffd\u52a0\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u3002 # yum install postgresql10-debuginfo pg_strom-PG10-debuginfo : ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: pg_strom-PG10-debuginfo x86_64 1.9-180301.el7 heterodb-debuginfo 766 k postgresql10-debuginfo x86_64 10.3-1PGDG.rhel7 pgdg10 9.7 M Transaction Summary ================================================================================ Install 2 Packages : Installed: pg_strom-PG10-debuginfo.x86_64 0:1.9-180301.el7 postgresql10-debuginfo.x86_64 0:10.3-1PGDG.rhel7 Complete! CPU\u5074\u30d0\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u306e\u78ba\u8a8d \u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u306e\u4f5c\u6210\u3055\u308c\u308b\u30d1\u30b9\u306f\u3001\u30ab\u30fc\u30cd\u30eb\u30d1\u30e9\u30e1\u30fc\u30bf kernel.core_pattern \u304a\u3088\u3073 kernel.core_uses_pid \u306e\u5024\u306b\u3088\u3063\u3066\u6c7a\u307e\u308a\u307e\u3059\u3002 \u901a\u5e38\u306f\u30d7\u30ed\u30bb\u30b9\u306e\u30ab\u30ec\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u4f5c\u6210\u3055\u308c\u307e\u3059\u306e\u3067\u3001systemd\u304b\u3089PostgreSQL\u3092\u8d77\u52d5\u3057\u305f\u5834\u5408\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u304c\u69cb\u7bc9\u3055\u308c\u308b /var/lib/pgdata \u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 core. \u30d5\u30a1\u30a4\u30eb\u304c\u751f\u6210\u3055\u308c\u3066\u3044\u308b\u306e\u3092\u78ba\u8a8d\u3057\u305f\u3089\u3001 gdb \u3092\u7528\u3044\u3066\u30af\u30e9\u30c3\u30b7\u30e5\u306b\u81f3\u308b\u30d0\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002 gdb \u306e -c \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u30b3\u30a2\u30d5\u30a1\u30a4\u30eb\u3092\u3001 -f \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u30af\u30e9\u30c3\u30b7\u30e5\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 # gdb -c /var/lib/pgdata/core.134680 -f /usr/pgsql-10/bin/postgres GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-100.el7_4.1 : (gdb) bt #0 0x00007fb942af3903 in __epoll_wait_nocancel () from /lib64/libc.so.6 #1 0x00000000006f71ae in WaitEventSetWaitBlock (nevents=1, occurred_events=0x7ffee51e1d70, cur_timeout=-1, set=0x2833298) at latch.c:1048 #2 WaitEventSetWait (set=0x2833298, timeout=timeout@entry-1, occurred_events=occurred_events@entry0x7ffee51e1d70, nevents=nevents@entry1, wait_event_info=wait_event_info@entry100663296) at latch.c:1000 #3 0x00000000006210fb in secure_read (port=0x2876120, ptr=0xcaa7e0 , len=8192) at be-secure.c:166 #4 0x000000000062b6e8 in pq_recvbuf () at pqcomm.c:963 #5 0x000000000062c345 in pq_getbyte () at pqcomm.c:1006 #6 0x0000000000718682 in SocketBackend (inBuf=0x7ffee51e1ef0) at postgres.c:328 #7 ReadCommand (inBuf=0x7ffee51e1ef0) at postgres.c:501 #8 PostgresMain (argc=, argv=argv@entry0x287bb68, dbname=0x28333f8 \"postgres\", username=) at postgres.c:4030 #9 0x000000000047adbc in BackendRun (port=0x2876120) at postmaster.c:4405 #10 BackendStartup (port=0x2876120) at postmaster.c:4077 #11 ServerLoop () at postmaster.c:1755 #12 0x00000000006afb7f in PostmasterMain (argc=argc@entry3, argv=argv@entry0x2831280) at postmaster.c:1363 #13 0x000000000047bbef in main (argc=3, argv=0x2831280) at main.c:228 gdb\u306e bt \u30b3\u30de\u30f3\u30c9\u3067\u30d0\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002 \u3053\u306e\u30b1\u30fc\u30b9\u3067\u306f\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u306e\u30af\u30a8\u30ea\u3092\u5f85\u3063\u3066\u3044\u308b\u72b6\u614b\u306ePostgreSQL\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306b SIGSEGV \u30b7\u30b0\u30ca\u30eb\u3092\u9001\u51fa\u3057\u3066\u30af\u30e9\u30c3\u30b7\u30e5\u3092\u5f15\u304d\u8d77\u3053\u3057\u305f\u305f\u3081\u3001 WaitEventSetWait \u5ef6\u9577\u4e0a\u306e __epoll_wait_nocancel \u3067\u30d7\u30ed\u30bb\u30b9\u304c\u30af\u30e9\u30c3\u30b7\u30e5\u3057\u3066\u3044\u308b\u4e8b\u304c\u308f\u304b\u308a\u307e\u3059\u3002 GPU\u5074\u30d0\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u306e\u78ba\u8a8d GPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u306f\u3001\uff08 CUDA_COREDUMP_FILE \u74b0\u5883\u5909\u6570\u3092\u7528\u3044\u3066\u660e\u793a\u7684\u306b\u6307\u5b9a\u3057\u306a\u3051\u308c\u3070\uff09PostgreSQL\u30b5\u30fc\u30d0\u30d7\u30ed\u30bb\u30b9\u306e\u30ab\u30ec\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u751f\u6210\u3055\u308c\u307e\u3059\u3002 systemd\u304b\u3089PostgreSQL\u3092\u8d77\u52d5\u3057\u305f\u5834\u5408\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u304c\u69cb\u7bc9\u3055\u308c\u308b /var/lib/pgdata \u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u4ee5\u4e0b\u306e\u540d\u524d\u3067GPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u304c\u751f\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002 core___.nvcudmp \u306a\u304a\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u8a2d\u5b9a\u3067\u306fGPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u306b\u306f\u30b7\u30f3\u30dc\u30eb\u60c5\u5831\u306a\u3069\u306e\u30c7\u30d0\u30c3\u30b0\u60c5\u5831\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u3053\u306e\u72b6\u614b\u3067\u306f\u969c\u5bb3\u89e3\u6790\u3092\u884c\u3046\u4e8b\u306f\u307b\u3068\u3093\u3069\u4e0d\u53ef\u80fd\u3067\u3059\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092\u884c\u3063\u3066PG-Strom\u304c\u751f\u6210\u3059\u308bGPU\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u30c7\u30d0\u30c3\u30b0\u60c5\u5831\u3092\u542b\u3081\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u305f\u3060\u3057\u3001\u3053\u306e\u8a2d\u5b9a\u306f\u5b9f\u884c\u6642\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u4f4e\u4e0b\u3055\u305b\u308b\u305f\u3081\u3001\u6052\u5e38\u7684\u306a\u4f7f\u7528\u306f\u975e\u63a8\u5968\u3067\u3059\u3002 \u30c8\u30e9\u30d6\u30eb\u89e3\u6790\u6642\u306b\u3060\u3051\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 nvme=# set pg_strom.debug_jit_compile_options = on; SET \u751f\u6210\u3055\u308c\u305fGPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306f cuda-gdb \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 # /usr/local/cuda/bin/cuda-gdb NVIDIA (R) CUDA Debugger 9.1 release Portions Copyright (C) 2007-2017 NVIDIA Corporation : For help, type \"help\". Type \"apropos word\" to search for commands related to \"word\". (cuda-gdb) \u5f15\u6570\u306a\u3057\u3067 cuda-gdb \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3001\u30d7\u30ed\u30f3\u30d7\u30c8\u4e0a\u3067 target \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u5148\u307b\u3069\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002 (cuda-gdb) target cudacore /var/lib/pgdata/core_1521131828_magro.heterodb.com_216238.nvcudmp Opening GPU coredump: /var/lib/pgdata/core_1521131828_magro.heterodb.com_216238.nvcudmp [New Thread 216240] CUDA Exception: Warp Illegal Address The exception was triggered at PC 0x7ff4dc82f930 (cuda_gpujoin.h:1159) [Current focus set to CUDA kernel 0, grid 1, block (0,0,0), thread (0,0,0), device 0, sm 0, warp 0, lane 0] #0 0x00007ff4dc82f938 in _INTERNAL_8_pg_strom_0124cb94::gpujoin_exec_hashjoin (kcxt=0x7ff4f7fffbf8, kgjoin=0x7fe9f4800078, kmrels=0x7fe9f8800000, kds_src=0x7fe9f0800030, depth=3, rd_stack=0x7fe9f4806118, wr_stack=0x7fe9f480c118, l_state=0x7ff4f7fffc48, matched=0x7ff4f7fffc7c \"\") at /usr/pgsql-10/share/extension/cuda_gpujoin.h:1159 1159 while (khitem && khitem->hash != hash_value) \u3053\u306e\u72b6\u614b\u3067 bt \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3001\u554f\u984c\u767a\u751f\u500b\u6240\u3078\u306e\u30d0\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u3092\u63a1\u53d6\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 (cuda-gdb) bt #0 0x00007ff4dc82f938 in _INTERNAL_8_pg_strom_0124cb94::gpujoin_exec_hashjoin (kcxt=0x7ff4f7fffbf8, kgjoin=0x7fe9f4800078, kmrels=0x7fe9f8800000, kds_src=0x7fe9f0800030, depth=3, rd_stack=0x7fe9f4806118, wr_stack=0x7fe9f480c118, l_state=0x7ff4f7fffc48, matched=0x7ff4f7fffc7c \"\") at /usr/pgsql-10/share/extension/cuda_gpujoin.h:1159 #1 0x00007ff4dc9428f0 in gpujoin_main<<<(30,1,1),(256,1,1)>>> (kgjoin=0x7fe9f4800078, kmrels=0x7fe9f8800000, kds_src=0x7fe9f0800030, kds_dst=0x7fe9e8800030, kparams_gpreagg=0x0) at /usr/pgsql-10/share/extension/cuda_gpujoin.h:1347 \u3088\u308a\u8a73\u7d30\u306a cuda-gdb \u30b3\u30de\u30f3\u30c9\u306e\u5229\u7528\u6cd5\u306f CUDA Toolkit Documentation - CUDA-GDB \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002","title":"\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0"},{"location":"troubles/#_1","text":"","title":"\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0"},{"location":"troubles/#_2","text":"\u7279\u5b9a\u306e\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u5b9f\u884c\u3057\u305f\u969b\u306b\u4f55\u304c\u3057\u304b\u306e\u554f\u984c\u304c\u767a\u751f\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u305d\u308c\u304c\u4f55\u306b\u8d77\u56e0\u3059\u308b\u3082\u306e\u3067\u3042\u308b\u306e\u304b\u3092\u7279\u5b9a\u3059\u308b\u306e\u306f\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u7b2c\u4e00\u6b69\u3067\u3059\u3002 \u6b8b\u5ff5\u306a\u304c\u3089\u3001PostgreSQL\u958b\u767a\u8005\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u3068\u6bd4\u3079PG-Strom\u306e\u958b\u767a\u8005\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u306f\u975e\u5e38\u306b\u5c11\u306a\u3044\u6570\u306e\u958b\u767a\u8005\u306b\u3088\u3063\u3066\u652f\u3048\u3089\u308c\u3066\u3044\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u54c1\u8cea\u3084\u5b9f\u7e3e\u3068\u3044\u3063\u305f\u89b3\u70b9\u304b\u3089\u3001\u307e\u305aPG-Strom\u304c\u60aa\u3055\u3092\u3057\u3066\u3044\u306a\u3044\u304b\u7591\u3046\u306e\u306f\u59a5\u5f53\u306a\u5224\u65ad\u3067\u3059\u3002 PG-Strom\u306e\u5168\u6a5f\u80fd\u3092\u4e00\u5ea6\u306b\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u306b\u306f pg_strom.enabled \u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u4f7f\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092\u884c\u3046\u4e8b\u3067PG-Strom\u306f\u7121\u52b9\u5316\u3055\u308c\u3001\u6a19\u6e96\u306ePostgreSQL\u3068\u5168\u304f\u540c\u4e00\u306e\u72b6\u614b\u3068\u306a\u308a\u307e\u3059\u3002 \u305d\u308c\u3067\u3082\u306a\u304a\u554f\u984c\u304c\u518d\u73fe\u3059\u308b\u304b\u3069\u3046\u304b\u306f\u4e00\u3064\u306e\u5224\u65ad\u6750\u6599\u3068\u306a\u308b\u3067\u3057\u3087\u3046\u3002 # SET pg_strom.enabled = off; \u3053\u306e\u4ed6\u306b\u3082\u3001GpuScan\u3001GpuJoin\u3001GpuPreAgg\u3068\u3044\u3063\u305f\u7279\u5b9a\u306e\u5b9f\u884c\u8a08\u753b\u306e\u307f\u3092\u7121\u52b9\u5316\u3059\u308b\u30d1\u30e9\u30e1\u30fc\u30bf\u3082\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u8a73\u7d30\u306f \u30ea\u30d5\u30a1\u30ec\u30f3\u30b9/GPU\u30d1\u30e9\u30e1\u30fc\u30bf \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002","title":"\u554f\u984c\u306e\u5207\u308a\u5206\u3051"},{"location":"troubles/#_3","text":"\u30b7\u30b9\u30c6\u30e0\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u3092\u5f15\u304d\u8d77\u3053\u3059\u3088\u3046\u306a\u91cd\u5927\u306a\u30c8\u30e9\u30d6\u30eb\u306e\u89e3\u6790\u306b\u306f\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u306e\u63a1\u53d6\u304c\u6b20\u304b\u305b\u307e\u305b\u3093\u3002 \u672c\u7bc0\u3067\u306f\u3001PostgreSQL\u3068PG-Strom\u30d7\u30ed\u30bb\u30b9\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7(CPU\u5074)\u3001\u304a\u3088\u3073PG-Strom\u306eGPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7(GPU\u5074)\u3092\u53d6\u5f97\u3057\u3001\u969c\u5bb3\u767a\u751f\u6642\u306e\u30d0\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u3092\u63a1\u53d6\u3059\u308b\u305f\u3081\u306e\u624b\u6bb5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002","title":"\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u306e\u63a1\u53d6"},{"location":"troubles/#postgresql","text":"\u30d7\u30ed\u30bb\u30b9\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u6642\u306b\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7(CPU\u5074)\u3092\u751f\u6210\u3059\u308b\u306b\u306f\u3001PostgreSQL\u30b5\u30fc\u30d0\u30d7\u30ed\u30bb\u30b9\u304c\u751f\u6210\u3059\u308b\u4e8b\u306e\u3067\u304d\u308b core \u30d5\u30a1\u30a4\u30eb\u306e\u30b5\u30a4\u30ba\u3092\u7121\u5236\u9650\u306b\u5909\u66f4\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306fPostgreSQL\u30b5\u30fc\u30d0\u30d7\u30ed\u30bb\u30b9\u3092\u8d77\u52d5\u3059\u308b\u30b7\u30a7\u30eb\u4e0a\u3067 ulimit -c \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u5909\u66f4\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 GPU\u30ab\u30fc\u30cd\u30eb\u306e\u30a8\u30e9\u30fc\u6642\u306b\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7(GPU\u5074)\u3092\u751f\u6210\u3059\u308b\u306b\u306f\u3001PostgreSQL\u30b5\u30fc\u30d0\u30d7\u30ed\u30bb\u30b9\u304c\u74b0\u5883\u5909\u6570 CUDA_ENABLE_COREDUMP_ON_EXCEPTION \u306b 1 \u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 systemd\u304b\u3089PostgreSQL\u3092\u8d77\u52d5\u3059\u308b\u5834\u5408\u3001 /etc/systemd/system/postgresql-.service.d/ \u4ee5\u4e0b\u306b\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001\u3053\u308c\u3089\u306e\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 RPM\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u5185\u5bb9\u306e pg_strom.conf \u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002 [Service] LimitNOFILE=65536 LimitCORE=infinity #Environment=CUDA_ENABLE_COREDUMP_ON_EXCEPTION=1 CUDA9.1\u306b\u304a\u3044\u3066\u306f\u3001\u901a\u5e38\u3001GPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u306e\u751f\u6210\u306b\u306f\u6570\u5206\u4ee5\u4e0a\u306e\u6642\u9593\u3092\u8981\u3057\u3001\u305d\u306e\u9593\u3001\u30a8\u30e9\u30fc\u3092\u767a\u751f\u3057\u305fPostgreSQL\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u5fdc\u7b54\u306f\u5b8c\u5168\u306b\u505c\u6b62\u3057\u3066\u3057\u307e\u3057\u307e\u3059\u3002 \u305d\u306e\u305f\u3081\u3001\u306f\u7279\u5b9a\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u306b\u304a\u3044\u3066\u767a\u751f\u3059\u308bGPU\u30ab\u30fc\u30cd\u30eb\u306b\u8d77\u56e0\u3059\u308b\u30a8\u30e9\u30fc\u306e\u539f\u56e0\u8abf\u67fb\u3092\u884c\u3046\u5834\u5408\u306b\u3060\u3051\u3001 CUDA_ENABLE_COREDUMP_ON_EXCEPTION \u74b0\u5883\u5909\u6570\u3092\u8a2d\u5b9a\u3059\u308b\u4e8b\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002 RPM\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u304a\u3051\u308b\u30c7\u30d5\u30a9\u30eb\u30c8\u8a2d\u5b9a\u306f\u3001 CUDA_ENABLE_COREDUMP_ON_EXCEPTION \u74b0\u5883\u5909\u6570\u306e\u884c\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066\u3044\u307e\u3059\u3002 PostgreSQL\u30b5\u30fc\u30d0\u30d7\u30ed\u30bb\u30b9\u3092\u518d\u8d77\u52d5\u3059\u308b\u3068\u3001 Max core file size \u304cunlimited\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u306f\u305a\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u78ba\u8a8d\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 # cat /proc//limits Limit Soft Limit Hard Limit Units : : : : Max core file size unlimited unlimited bytes : : : :","title":"PostgreSQL\u8d77\u52d5\u6642\u8a2d\u5b9a\u306e\u8ffd\u52a0"},{"location":"troubles/#debuginfo","text":"\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u304b\u3089\u610f\u5473\u306e\u3042\u308b\u60c5\u5831\u3092\u8aad\u307f\u53d6\u308b\u306b\u306f\u30b7\u30f3\u30dc\u30eb\u60c5\u5831\u304c\u5fc5\u8981\u3067\u3059\u3002 \u3053\u308c\u3089\u306f -debuginfo \u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u683c\u7d0d\u3055\u308c\u3066\u304a\u308a\u3001\u30b7\u30b9\u30c6\u30e0\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308bPostgreSQL\u304a\u3088\u3073PG-Strom\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u5fdc\u3058\u3066\u305d\u308c\u305e\u308c\u8ffd\u52a0\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u3002 # yum install postgresql10-debuginfo pg_strom-PG10-debuginfo : ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: pg_strom-PG10-debuginfo x86_64 1.9-180301.el7 heterodb-debuginfo 766 k postgresql10-debuginfo x86_64 10.3-1PGDG.rhel7 pgdg10 9.7 M Transaction Summary ================================================================================ Install 2 Packages : Installed: pg_strom-PG10-debuginfo.x86_64 0:1.9-180301.el7 postgresql10-debuginfo.x86_64 0:10.3-1PGDG.rhel7 Complete!","title":"debuginfo\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"troubles/#cpu","text":"\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u306e\u4f5c\u6210\u3055\u308c\u308b\u30d1\u30b9\u306f\u3001\u30ab\u30fc\u30cd\u30eb\u30d1\u30e9\u30e1\u30fc\u30bf kernel.core_pattern \u304a\u3088\u3073 kernel.core_uses_pid \u306e\u5024\u306b\u3088\u3063\u3066\u6c7a\u307e\u308a\u307e\u3059\u3002 \u901a\u5e38\u306f\u30d7\u30ed\u30bb\u30b9\u306e\u30ab\u30ec\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u4f5c\u6210\u3055\u308c\u307e\u3059\u306e\u3067\u3001systemd\u304b\u3089PostgreSQL\u3092\u8d77\u52d5\u3057\u305f\u5834\u5408\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u304c\u69cb\u7bc9\u3055\u308c\u308b /var/lib/pgdata \u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 core. \u30d5\u30a1\u30a4\u30eb\u304c\u751f\u6210\u3055\u308c\u3066\u3044\u308b\u306e\u3092\u78ba\u8a8d\u3057\u305f\u3089\u3001 gdb \u3092\u7528\u3044\u3066\u30af\u30e9\u30c3\u30b7\u30e5\u306b\u81f3\u308b\u30d0\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002 gdb \u306e -c \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u30b3\u30a2\u30d5\u30a1\u30a4\u30eb\u3092\u3001 -f \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u30af\u30e9\u30c3\u30b7\u30e5\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 # gdb -c /var/lib/pgdata/core.134680 -f /usr/pgsql-10/bin/postgres GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-100.el7_4.1 : (gdb) bt #0 0x00007fb942af3903 in __epoll_wait_nocancel () from /lib64/libc.so.6 #1 0x00000000006f71ae in WaitEventSetWaitBlock (nevents=1, occurred_events=0x7ffee51e1d70, cur_timeout=-1, set=0x2833298) at latch.c:1048 #2 WaitEventSetWait (set=0x2833298, timeout=timeout@entry-1, occurred_events=occurred_events@entry0x7ffee51e1d70, nevents=nevents@entry1, wait_event_info=wait_event_info@entry100663296) at latch.c:1000 #3 0x00000000006210fb in secure_read (port=0x2876120, ptr=0xcaa7e0 , len=8192) at be-secure.c:166 #4 0x000000000062b6e8 in pq_recvbuf () at pqcomm.c:963 #5 0x000000000062c345 in pq_getbyte () at pqcomm.c:1006 #6 0x0000000000718682 in SocketBackend (inBuf=0x7ffee51e1ef0) at postgres.c:328 #7 ReadCommand (inBuf=0x7ffee51e1ef0) at postgres.c:501 #8 PostgresMain (argc=, argv=argv@entry0x287bb68, dbname=0x28333f8 \"postgres\", username=) at postgres.c:4030 #9 0x000000000047adbc in BackendRun (port=0x2876120) at postmaster.c:4405 #10 BackendStartup (port=0x2876120) at postmaster.c:4077 #11 ServerLoop () at postmaster.c:1755 #12 0x00000000006afb7f in PostmasterMain (argc=argc@entry3, argv=argv@entry0x2831280) at postmaster.c:1363 #13 0x000000000047bbef in main (argc=3, argv=0x2831280) at main.c:228 gdb\u306e bt \u30b3\u30de\u30f3\u30c9\u3067\u30d0\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002 \u3053\u306e\u30b1\u30fc\u30b9\u3067\u306f\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u306e\u30af\u30a8\u30ea\u3092\u5f85\u3063\u3066\u3044\u308b\u72b6\u614b\u306ePostgreSQL\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306b SIGSEGV \u30b7\u30b0\u30ca\u30eb\u3092\u9001\u51fa\u3057\u3066\u30af\u30e9\u30c3\u30b7\u30e5\u3092\u5f15\u304d\u8d77\u3053\u3057\u305f\u305f\u3081\u3001 WaitEventSetWait \u5ef6\u9577\u4e0a\u306e __epoll_wait_nocancel \u3067\u30d7\u30ed\u30bb\u30b9\u304c\u30af\u30e9\u30c3\u30b7\u30e5\u3057\u3066\u3044\u308b\u4e8b\u304c\u308f\u304b\u308a\u307e\u3059\u3002","title":"CPU\u5074\u30d0\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u306e\u78ba\u8a8d"},{"location":"troubles/#gpu","text":"GPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u306f\u3001\uff08 CUDA_COREDUMP_FILE \u74b0\u5883\u5909\u6570\u3092\u7528\u3044\u3066\u660e\u793a\u7684\u306b\u6307\u5b9a\u3057\u306a\u3051\u308c\u3070\uff09PostgreSQL\u30b5\u30fc\u30d0\u30d7\u30ed\u30bb\u30b9\u306e\u30ab\u30ec\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u751f\u6210\u3055\u308c\u307e\u3059\u3002 systemd\u304b\u3089PostgreSQL\u3092\u8d77\u52d5\u3057\u305f\u5834\u5408\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u304c\u69cb\u7bc9\u3055\u308c\u308b /var/lib/pgdata \u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u4ee5\u4e0b\u306e\u540d\u524d\u3067GPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u304c\u751f\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002 core___.nvcudmp \u306a\u304a\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u8a2d\u5b9a\u3067\u306fGPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u306b\u306f\u30b7\u30f3\u30dc\u30eb\u60c5\u5831\u306a\u3069\u306e\u30c7\u30d0\u30c3\u30b0\u60c5\u5831\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u3053\u306e\u72b6\u614b\u3067\u306f\u969c\u5bb3\u89e3\u6790\u3092\u884c\u3046\u4e8b\u306f\u307b\u3068\u3093\u3069\u4e0d\u53ef\u80fd\u3067\u3059\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092\u884c\u3063\u3066PG-Strom\u304c\u751f\u6210\u3059\u308bGPU\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u30c7\u30d0\u30c3\u30b0\u60c5\u5831\u3092\u542b\u3081\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u305f\u3060\u3057\u3001\u3053\u306e\u8a2d\u5b9a\u306f\u5b9f\u884c\u6642\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u4f4e\u4e0b\u3055\u305b\u308b\u305f\u3081\u3001\u6052\u5e38\u7684\u306a\u4f7f\u7528\u306f\u975e\u63a8\u5968\u3067\u3059\u3002 \u30c8\u30e9\u30d6\u30eb\u89e3\u6790\u6642\u306b\u3060\u3051\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 nvme=# set pg_strom.debug_jit_compile_options = on; SET \u751f\u6210\u3055\u308c\u305fGPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306f cuda-gdb \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 # /usr/local/cuda/bin/cuda-gdb NVIDIA (R) CUDA Debugger 9.1 release Portions Copyright (C) 2007-2017 NVIDIA Corporation : For help, type \"help\". Type \"apropos word\" to search for commands related to \"word\". (cuda-gdb) \u5f15\u6570\u306a\u3057\u3067 cuda-gdb \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3001\u30d7\u30ed\u30f3\u30d7\u30c8\u4e0a\u3067 target \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u5148\u307b\u3069\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002 (cuda-gdb) target cudacore /var/lib/pgdata/core_1521131828_magro.heterodb.com_216238.nvcudmp Opening GPU coredump: /var/lib/pgdata/core_1521131828_magro.heterodb.com_216238.nvcudmp [New Thread 216240] CUDA Exception: Warp Illegal Address The exception was triggered at PC 0x7ff4dc82f930 (cuda_gpujoin.h:1159) [Current focus set to CUDA kernel 0, grid 1, block (0,0,0), thread (0,0,0), device 0, sm 0, warp 0, lane 0] #0 0x00007ff4dc82f938 in _INTERNAL_8_pg_strom_0124cb94::gpujoin_exec_hashjoin (kcxt=0x7ff4f7fffbf8, kgjoin=0x7fe9f4800078, kmrels=0x7fe9f8800000, kds_src=0x7fe9f0800030, depth=3, rd_stack=0x7fe9f4806118, wr_stack=0x7fe9f480c118, l_state=0x7ff4f7fffc48, matched=0x7ff4f7fffc7c \"\") at /usr/pgsql-10/share/extension/cuda_gpujoin.h:1159 1159 while (khitem && khitem->hash != hash_value) \u3053\u306e\u72b6\u614b\u3067 bt \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3001\u554f\u984c\u767a\u751f\u500b\u6240\u3078\u306e\u30d0\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u3092\u63a1\u53d6\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 (cuda-gdb) bt #0 0x00007ff4dc82f938 in _INTERNAL_8_pg_strom_0124cb94::gpujoin_exec_hashjoin (kcxt=0x7ff4f7fffbf8, kgjoin=0x7fe9f4800078, kmrels=0x7fe9f8800000, kds_src=0x7fe9f0800030, depth=3, rd_stack=0x7fe9f4806118, wr_stack=0x7fe9f480c118, l_state=0x7ff4f7fffc48, matched=0x7ff4f7fffc7c \"\") at /usr/pgsql-10/share/extension/cuda_gpujoin.h:1159 #1 0x00007ff4dc9428f0 in gpujoin_main<<<(30,1,1),(256,1,1)>>> (kgjoin=0x7fe9f4800078, kmrels=0x7fe9f8800000, kds_src=0x7fe9f0800030, kds_dst=0x7fe9e8800030, kparams_gpreagg=0x0) at /usr/pgsql-10/share/extension/cuda_gpujoin.h:1347 \u3088\u308a\u8a73\u7d30\u306a cuda-gdb \u30b3\u30de\u30f3\u30c9\u306e\u5229\u7528\u6cd5\u306f CUDA Toolkit Documentation - CUDA-GDB \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002","title":"GPU\u5074\u30d0\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u306e\u78ba\u8a8d"}]}
\ No newline at end of file
+{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"\u306f\u3058\u3081\u306b \u672c\u7ae0\u3067\u306fPG-Strom\u306e\u6982\u8981\u3001\u304a\u3088\u3073\u958b\u767a\u8005\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 PG-Strom\u3068\u306f? PG-Strom\u306fPostgreSQL v15\u304a\u3088\u3073\u4ee5\u964d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u5411\u3051\u306b\u8a2d\u8a08\u3055\u308c\u305f\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3001\u30c1\u30c3\u30d7\u3042\u305f\u308a\u6570\u5343\u500b\u306e\u30b3\u30a2\u3092\u6301\u3064GPU(Graphic Processor Unit)\u30c7\u30d0\u30a4\u30b9\u3092\u5229\u7528\u3059\u308b\u4e8b\u3067\u3001\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u5bfe\u3059\u308b\u96c6\u8a08\u30fb\u89e3\u6790\u51e6\u7406\u3084\u30d0\u30c3\u30c1\u51e6\u7406\u5411\u3051\u306eSQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u9ad8\u901f\u5316\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u3055\u308c\u3066\u3044\u307e\u3059\u3002 PG-Strom\u306e\u4e2d\u6838\u3068\u306a\u308b\u6a5f\u80fd\u306f\u3001SQL\u547d\u4ee4\u304b\u3089\u81ea\u52d5\u7684\u306bGPU\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u751f\u6210\u3059\u308b\u30b3\u30fc\u30c9\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\u3068\u3001SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092GPU\u4e0a\u3067\u975e\u540c\u671f\u304b\u3064\u4e26\u5217\u306b\u5b9f\u884c\u3059\u308b\u5b9f\u884c\u30a8\u30f3\u30b8\u30f3\u3067\u3059\u3002\u73fe\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306fSCAN\uff08WHERE\u53e5\u306e\u8a55\u4fa1\uff09\u3001JOIN\u304a\u3088\u3073GROUP BY\u306e\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u5bfe\u5fdc\u3057\u3066\u304a\u308a\u3001GPU\u51e6\u7406\u306b\u30a2\u30c9\u30d0\u30f3\u30c6\u30fc\u30b8\u304c\u3042\u308b\u5834\u5408\u306b\u306fPostgreSQL\u6a19\u6e96\u306e\u5b9f\u88c5\u3092\u7f6e\u304d\u63db\u3048\u308b\u4e8b\u3067\u3001\u30e6\u30fc\u30b6\u3084\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304b\u3089\u306f\u900f\u904e\u7684\u306b\u52d5\u4f5c\u3057\u307e\u3059\u3002 PG-Strom\u306f\uff12\u3064\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002\u4e00\u3064\u306f\u884c\u5f62\u5f0f\u3067\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308bPostgreSQL\u306eheap\u30b9\u30c8\u30ec\u30fc\u30b8\u30b7\u30b9\u30c6\u30e0\u3067\u3001\u3053\u308c\u306f\u5fc5\u305a\u3057\u3082\u96c6\u8a08\u30fb\u89e3\u6790\u7cfb\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u6700\u9069\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u4e00\u65b9\u3067\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7cfb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089\u30c7\u30fc\u30bf\u3092\u79fb\u52d5\u3059\u308b\u4e8b\u306a\u304f\u96c6\u8a08\u51e6\u7406\u3092\u5b9f\u884c\u3067\u304d\u308b\u3068\u3044\u3046\u30a2\u30c9\u30d0\u30f3\u30c6\u30fc\u30b8\u304c\u3042\u308a\u307e\u3059\u3002\u3082\u3046\u4e00\u3064\u306f\u3001\u5217\u5f62\u5f0f\u306e\u69cb\u9020\u5316\u30c7\u30fc\u30bf\u5f62\u5f0f\u3067\u3042\u308b Apache Arrow \u30d5\u30a1\u30a4\u30eb\u3067\u3001\u884c\u5358\u4f4d\u306e\u30c7\u30fc\u30bf\u66f4\u65b0\u306b\u306f\u4e0d\u5411\u304d\u3067\u3042\u308b\u3082\u306e\u306e\u3001\u52b9\u7387\u7684\u306b\u5927\u91cf\u30c7\u30fc\u30bf\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u4e8b\u304c\u3067\u304d\u3001\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1(FDW)\u3092\u901a\u3057\u3066\u52b9\u7387\u7684\u306a\u30c7\u30fc\u30bf\u306e\u691c\u7d22\u30fb\u96c6\u8a08\u304c\u53ef\u80fd\u3067\u3059\u3002 PG-Strom\u306e\u7279\u5fb4\u7684\u306a\u6a5f\u80fd\u306e\u4e00\u3064\u304c\u3001NVME/NVME-oF\u30c7\u30d0\u30a4\u30b9\u304b\u3089CPU/RAM\u3092\u30d0\u30a4\u30d1\u30b9\u3057\u3066GPU\u306b\u76f4\u63a5\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u3057\u3001GPU\u3067SQL\u51e6\u7406\u3092\u5b9f\u884c\u3059\u308b\u4e8b\u3067\u30c7\u30d0\u30a4\u30b9\u306e\u5e2f\u57df\u3092\u6700\u5927\u9650\u306b\u5f15\u304d\u51fa\u3059GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u6a5f\u80fd\u3067\u3059\u3002v3.0\u3067\u306f\u65b0\u305f\u306bNVIDIA GPUDirect Storage\u306b\u3082\u5bfe\u5fdc\u3057\u3001\u30ed\u30fc\u30ab\u30ebNVME-SSD\u3060\u3051\u3067\u306a\u304f\u3001NVME-oF\u3092\u4ecb\u3057\u305fSDS(Software Defined Storage)\u30c7\u30d0\u30a4\u30b9\u3084\u3001\u5171\u6709\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u304b\u3089\u306e\u8aad\u307f\u51fa\u3057\u306b\u3082\u5bfe\u5fdc\u3057\u307e\u3059\u3002 v3.0\u3067\u306f\u4e00\u90e8\u306ePostGIS\u95a2\u6570\u3068\u3001\u30b8\u30aa\u30e1\u30c8\u30ea\u30c7\u30fc\u30bf\u306eGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u63a2\u7d22\u3092GPU\u5074\u3067\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u66f4\u65b0\u306e\u591a\u3044\u30c6\u30fc\u30d6\u30eb\u306e\u5185\u5bb9\u3092\u4e88\u3081GPU\u306b\u8907\u88fd\u3057\u3066\u304a\u304fGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u6a5f\u80fd\u3068\u4f75\u305b\u3066\u3001\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306a\u4f4d\u7f6e\u60c5\u5831\u306b\u57fa\u3065\u304f\u691c\u7d22\u3001\u5206\u6790\u51e6\u7406\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059\u3002 v5.0\u3067\u306f\u30d7\u30ed\u30bb\u30b9\u30e2\u30c7\u30eb\u306e\u66f4\u65b0\uff08\u30de\u30eb\u30c1\u30d7\u30ed\u30bb\u30b9\u21d2\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\uff09\u3084\u3001\u30cd\u30a4\u30c6\u30a3\u30d6\u30b3\u30fc\u30c9\u304b\u3089\u7591\u4f3c\u30b3\u30fc\u30c9\u3078\u306e\u5207\u308a\u66ff\u3048\u306a\u3069\u3001\u6839\u672c\u7684\u306a\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u8a2d\u8a08\u306e\u5909\u66f4\u304c\u884c\u308f\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u5168\u822c\u7684\u306a\u51e6\u7406\u901f\u5ea6\u3084\u5b89\u5b9a\u6027\u306e\u6539\u5584\u304c\u56f3\u3089\u308c\u307e\u3057\u305f\u3002 \u30e9\u30a4\u30bb\u30f3\u30b9\u3068\u8457\u4f5c\u6a29 PG-Strom\u306fPostgreSQL\u30e9\u30a4\u30bb\u30f3\u30b9\u306b\u57fa\u3065\u3044\u3066\u516c\u958b\u30fb\u914d\u5e03\u3055\u308c\u3066\u3044\u308b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3067\u3059\u3002 \u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u8a73\u7d30\u306f LICENSE \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u30b3\u30df\u30e5\u30cb\u30c6\u30a3 PG-Strom\u306b\u95a2\u3059\u308b\u8cea\u554f\u3084\u8981\u671b\u3001\u969c\u5bb3\u5831\u544a\u306a\u3069\u306f\u3001 GitHub\u306eDiscussion \u30da\u30fc\u30b8\u306b\u6295\u7a3f\u3059\u308b\u3088\u3046\u304a\u9858\u3044\u3057\u307e\u3059\u3002 \u672c\u63b2\u793a\u677f\u306f\u3001\u4e16\u754c\u4e2d\u306b\u516c\u958b\u3055\u308c\u305f\u30d1\u30d6\u30ea\u30c3\u30af\u306e\u63b2\u793a\u677f\u3067\u3042\u308b\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3064\u307e\u308a\u3001\u81ea\u5df1\u8cac\u4efb\u306e\u4e0b\u3001\u79d8\u5bc6\u60c5\u5831\u304c\u8aa4\u3063\u3066\u6295\u7a3f\u3055\u308c\u306a\u3044\u3088\u3046\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u672c\u63b2\u793a\u677f\u306e\u512a\u5148\u8a00\u8a9e\u306f\u82f1\u8a9e\u3067\u3059\u3002\u305f\u3060\u4e00\u65b9\u3067\u3001\u6b74\u53f2\u7684\u7d4c\u7def\u306b\u3088\u308aPG-Strom\u30e6\u30fc\u30b6\u306e\u591a\u304f\u306e\u5272\u5408\u304c\u65e5\u672c\u4eba\u3067\u3042\u308b\u4e8b\u306f\u627f\u77e5\u3057\u3066\u304a\u308a\u3001Discussion\u4e0a\u3067\u65e5\u672c\u8a9e\u3092\u5229\u7528\u3057\u305f\u8b70\u8ad6\u304c\u884c\u308f\u308c\u308b\u3053\u3068\u3082\u53ef\u80fd\u3068\u3057\u307e\u3059\u3002\u305d\u306e\u5834\u5408\u3001Subject(\u4ef6\u540d)\u306b (JP) \u3068\u3044\u3046\u63a5\u982d\u53e5\u3092\u4ed8\u3051\u308b\u4e8b\u3092\u5fd8\u308c\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306f\u975e\u65e5\u672c\u8a9e\u8a71\u8005\u304c\u4e0d\u8981\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8aad\u307f\u98db\u3070\u3059\u305f\u3081\u306b\u6709\u7528\u3067\u3059\u3002 \u30d0\u30b0\u3084\u969c\u5bb3\u306e\u5831\u544a \u7d50\u679c\u4e0d\u6b63\u3084\u30b7\u30b9\u30c6\u30e0\u30af\u30e9\u30c3\u30b7\u30e5/\u30ed\u30c3\u30af\u30a2\u30c3\u30d7\u3001\u305d\u306e\u4ed6\u306e\u7591\u308f\u3057\u3044\u52d5\u4f5c\u3092\u767a\u898b\u3057\u305f\u5834\u5408\u306f\u3001 PG-Strom Issue Tracker \u3067\u65b0\u3057\u3044\u30a4\u30b7\u30e5\u30fc\u3092\u30aa\u30fc\u30d7\u30f3\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u30d0\u30b0\u30ec\u30dd\u30fc\u30c8\u306e\u4f5c\u6210\u306b\u969b\u3057\u3066\u306f\u3001\u4e0b\u8a18\u306e\u70b9\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 - \u540c\u3058\u554f\u984c\u3092\u6700\u65b0\u7248\u3067\u518d\u73fe\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u304b\u3069\u3046\u304b? - PG-Strom\u306e\u6700\u65b0\u7248\u3060\u3051\u3067\u306a\u304f\u3001OS\u3001CUDA\u3001PostgreSQL\u304a\u3088\u3073\u95a2\u9023\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u6700\u65b0\u7248\u3067\u30c6\u30b9\u30c8\u3059\u308b\u4e8b\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002 - PG-Strom\u304c\u7121\u52b9\u5316\u3055\u308c\u305f\u72b6\u614b\u3067\u3082\u540c\u3058\u554f\u984c\u3092\u518d\u73fe\u3067\u304d\u308b\u304b\u3069\u3046\u304b? - GUC\u30d1\u30e9\u30e1\u30fc\u30bf pg_strom.enabled \u306b\u3088\u3063\u3066PG-Strom\u306e\u6709\u52b9/\u7121\u52b9\u3092\u5207\u308a\u66ff\u3048\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 - \u540c\u3058\u65e2\u77e5\u554f\u984c\u304c\u65e2\u306bGitHub\u306e\u30a4\u30b7\u30e5\u30fc\u30c8\u30e9\u30c3\u30ab\u30fc\u306b\u5b58\u5728\u3059\u308b\u304b\u3069\u3046\u304b\uff1f - close \u72b6\u614b\u306e\u30a4\u30b7\u30e5\u30fc\u3092\u691c\u7d22\u3059\u308b\u306e\u3092\u5fd8\u308c\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306a\u60c5\u5831\u306f\u30d0\u30b0\u5831\u544a\u306b\u304a\u3044\u3066\u6709\u7528\u3067\u3059\u3002 \u554f\u984c\u3092\u518d\u73fe\u3059\u308b\u624b\u9806\uff08\u30c7\u30fc\u30bf\u304a\u3088\u3073\u30af\u30a8\u30ea\uff09 \u554f\u984c\u30af\u30a8\u30ea\u306e EXPLAIN VERBOSE \u51fa\u529b \u95a2\u9023\u3059\u308b\u30c6\u30fc\u30d6\u30eb\u306e\u30c7\u30fc\u30bf\u69cb\u9020\uff08 psql \u4e0a\u3067 \\d+ \u3092\u5b9f\u884c\u3057\u3066\u5f97\u3089\u308c\u308b\uff09 \u51fa\u529b\u3055\u308c\u305f\u30ed\u30b0\u30e1\u30c3\u30bb\u30fc\u30b8\uff08verbose\u51fa\u529b\u304c\u671b\u307e\u3057\u3044\uff09 \u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u304b\u3089\u5909\u66f4\u3057\u3066\u3044\u308bGUC\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u5024 \u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u8a2d\u5b9a\uff08\u7279\u306bGPU\u306e\u578b\u756a\u3068RAM\u5bb9\u91cf\uff09 \u3042\u306a\u305f\u306e\u74b0\u5883\u3067\u767a\u751f\u3057\u305f\u7591\u308f\u3057\u3044\u52d5\u4f5c\u304c\u30d0\u30b0\u304b\u3069\u3046\u304b\u5b9a\u304b\u3067\u306f\u306a\u3044\u5834\u5408\u3001\u65b0\u3057\u3044\u30a4\u30b7\u30e5\u30fc\u306e\u30c1\u30b1\u30c3\u30c8\u3092\u30aa\u30fc\u30d7\u30f3\u3059\u308b\u524d\u306bDiscussion\u63b2\u793a\u677f\u3078\u5831\u544a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u8ffd\u52a0\u7684\u306a\u60c5\u5831\u63a1\u53d6\u306e\u4f9d\u983c\u306a\u3069\u3001\u958b\u767a\u8005\u306f\u6b21\u306b\u53d6\u308b\u3079\u304d\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u63d0\u6848\u3057\u3066\u304f\u308c\u308b\u3067\u3057\u3087\u3046\u3002 \u65b0\u6a5f\u80fd\u306e\u63d0\u6848 \u4f55\u304b\u65b0\u6a5f\u80fd\u306e\u30a2\u30a4\u30c7\u30a2\u304c\u3042\u308b\u5834\u5408\u3001 PG-Strom Issue Tracker \u3067\u65b0\u3057\u3044\u30a4\u30b7\u30e5\u30fc\u3092\u30aa\u30fc\u30d7\u30f3\u3057 feature \u30bf\u30b0\u3092\u4ed8\u3051\u3066\u304f\u3060\u3055\u3044\u3002\u7d9a\u3044\u3066\u3001\u4ed6\u306e\u958b\u767a\u8005\u3068\u8b70\u8ad6\u3092\u884c\u3044\u307e\u3057\u3087\u3046\u3002 \u671b\u307e\u3057\u3044\u65b0\u6a5f\u80fd\u63d0\u6848\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8981\u7d20\u3092\u542b\u3093\u3067\u3044\u307e\u3059\u3002 \u3042\u306a\u305f\u306f\u3069\u306e\u3088\u3046\u306a\u554f\u984c\u3092\u89e3\u6c7a/\u6539\u5584\u3057\u305f\u3044\u306e\u304b\uff1f \u3042\u306a\u305f\u306e\u30ef\u30fc\u30af\u30ed\u30fc\u30c9/\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u306b\u3068\u3063\u3066\u3069\u306e\u7a0b\u5ea6\u6df1\u523b\u306a\u306e\u304b\uff1f \u3069\u306e\u3088\u3046\u306b\u305d\u308c\u3092\u5b9f\u88c5\u3059\u308b\u306e\u304b\uff1f \uff08\u3082\u3057\u3042\u308c\u3070\uff09\u4e88\u60f3\u3055\u308c\u308b\u6b20\u70b9\u30fb\u30c8\u30ec\u30fc\u30c9\u30aa\u30d5 \u958b\u767a\u8005\u306e\u9593\u3067\u305d\u306e\u5fc5\u8981\u6027\u306b\u95a2\u3057\u3066\u30b3\u30f3\u30bb\u30f3\u30b5\u30b9\u304c\u5f97\u3089\u308c\u308b\u3068\u3001\u30b3\u30fc\u30c7\u30a3\u30cd\u30fc\u30bf\u30fc\u306f\u30a4\u30b7\u30e5\u30fc\u30c1\u30b1\u30c3\u30c8\u306b accepted \u30bf\u30b0\u3092\u4ed8\u3051\u3001\u305d\u306e\u30c1\u30b1\u30c3\u30c8\u306f\u305d\u306e\u5f8c\u306e\u958b\u767a\u4f5c\u696d\u306e\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0\u306e\u305f\u3081\u306b\u5229\u7528\u3055\u308c\u307e\u3059\u3002\u305d\u308c\u4ee5\u5916\u306e\u5834\u5408\u3001\u30a4\u30b7\u30e5\u30fc\u30c1\u30b1\u30c3\u30c8\u306b\u306f rejected \u30bf\u30b0\u3092\u4ed8\u3051\u3066\u30af\u30ed\u30fc\u30ba\u3055\u308c\u307e\u3059\u3002 \u4e00\u5ea6\u30d7\u30ed\u30dd\u30fc\u30b6\u30eb\u304c\u5374\u4e0b\u3055\u308c\u305f\u3068\u3057\u3066\u3082\u3001\u5c06\u6765\u306b\u304a\u3044\u3066\u307e\u305f\u7570\u306a\u3063\u305f\u6c7a\u5b9a\u304c\u3042\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u5468\u8fba\u72b6\u6cc1\u304c\u5909\u308f\u3063\u305f\u5834\u5408\u3001\u65b0\u6a5f\u80fd\u306e\u518d\u63d0\u6848\u3092\u8e8a\u8e87\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u958b\u767a\u6bb5\u968e\u3067\u306f\u3001\u30d1\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30b7\u30e5\u30fc\u30c1\u30b1\u30c3\u30c8\u306b\u6dfb\u4ed8\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002pull-request\u306f\u4f7f\u7528\u3057\u307e\u305b\u3093\u3002 \u30b5\u30dd\u30fc\u30c8\u30dd\u30ea\u30b7\u30fc PG-Strom development team\u306fHeteroDB Software Distribution Center\u304b\u3089\u914d\u5e03\u3055\u308c\u305f\u6700\u65b0\u7248\u306e\u307f\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002 \u30c8\u30e9\u30d6\u30eb\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u3001\u307e\u305a\u305d\u306e\u554f\u984c\u306f\u6700\u65b0\u7248\u306e\u30ea\u30ea\u30fc\u30b9\u3067\u518d\u73fe\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u304b\u3081\u3066\u304f\u3060\u3055\u3044\u3002 \u307e\u305f\u3001\u3053\u308c\u306f\u30dc\u30e9\u30f3\u30c6\u30a3\u30a2\u30d9\u30fc\u30b9\u306e\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u30b5\u30dd\u30fc\u30c8\u306e\u30dd\u30ea\u30b7\u30fc\u3067\u3042\u308b\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3064\u307e\u308a\u3001\u30b5\u30dd\u30fc\u30c8\u306f\u30d9\u30b9\u30c8\u30a8\u30d5\u30a9\u30fc\u30c8\u3067\u304b\u3064\u3001SLA\u306e\u5b9a\u7fa9\u3082\u3042\u308a\u307e\u305b\u3093\u3002 \u3082\u3057\u5546\u7528\u306e\u30b5\u30dd\u30fc\u30c8\u304c\u5fc5\u8981\u3067\u3042\u308b\u5834\u5408\u3001HeteroDB\u793e\uff08contact@heterodbcom\uff09\u306b\u30b3\u30f3\u30bf\u30af\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\u3002","title":"\u306f\u3058\u3081\u306b"},{"location":"#_1","text":"\u672c\u7ae0\u3067\u306fPG-Strom\u306e\u6982\u8981\u3001\u304a\u3088\u3073\u958b\u767a\u8005\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002","title":"\u306f\u3058\u3081\u306b"},{"location":"#pg-strom","text":"PG-Strom\u306fPostgreSQL v15\u304a\u3088\u3073\u4ee5\u964d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u5411\u3051\u306b\u8a2d\u8a08\u3055\u308c\u305f\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3001\u30c1\u30c3\u30d7\u3042\u305f\u308a\u6570\u5343\u500b\u306e\u30b3\u30a2\u3092\u6301\u3064GPU(Graphic Processor Unit)\u30c7\u30d0\u30a4\u30b9\u3092\u5229\u7528\u3059\u308b\u4e8b\u3067\u3001\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u5bfe\u3059\u308b\u96c6\u8a08\u30fb\u89e3\u6790\u51e6\u7406\u3084\u30d0\u30c3\u30c1\u51e6\u7406\u5411\u3051\u306eSQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u9ad8\u901f\u5316\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u3055\u308c\u3066\u3044\u307e\u3059\u3002 PG-Strom\u306e\u4e2d\u6838\u3068\u306a\u308b\u6a5f\u80fd\u306f\u3001SQL\u547d\u4ee4\u304b\u3089\u81ea\u52d5\u7684\u306bGPU\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u751f\u6210\u3059\u308b\u30b3\u30fc\u30c9\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\u3068\u3001SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092GPU\u4e0a\u3067\u975e\u540c\u671f\u304b\u3064\u4e26\u5217\u306b\u5b9f\u884c\u3059\u308b\u5b9f\u884c\u30a8\u30f3\u30b8\u30f3\u3067\u3059\u3002\u73fe\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306fSCAN\uff08WHERE\u53e5\u306e\u8a55\u4fa1\uff09\u3001JOIN\u304a\u3088\u3073GROUP BY\u306e\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u5bfe\u5fdc\u3057\u3066\u304a\u308a\u3001GPU\u51e6\u7406\u306b\u30a2\u30c9\u30d0\u30f3\u30c6\u30fc\u30b8\u304c\u3042\u308b\u5834\u5408\u306b\u306fPostgreSQL\u6a19\u6e96\u306e\u5b9f\u88c5\u3092\u7f6e\u304d\u63db\u3048\u308b\u4e8b\u3067\u3001\u30e6\u30fc\u30b6\u3084\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304b\u3089\u306f\u900f\u904e\u7684\u306b\u52d5\u4f5c\u3057\u307e\u3059\u3002 PG-Strom\u306f\uff12\u3064\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002\u4e00\u3064\u306f\u884c\u5f62\u5f0f\u3067\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308bPostgreSQL\u306eheap\u30b9\u30c8\u30ec\u30fc\u30b8\u30b7\u30b9\u30c6\u30e0\u3067\u3001\u3053\u308c\u306f\u5fc5\u305a\u3057\u3082\u96c6\u8a08\u30fb\u89e3\u6790\u7cfb\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u6700\u9069\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u4e00\u65b9\u3067\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7cfb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089\u30c7\u30fc\u30bf\u3092\u79fb\u52d5\u3059\u308b\u4e8b\u306a\u304f\u96c6\u8a08\u51e6\u7406\u3092\u5b9f\u884c\u3067\u304d\u308b\u3068\u3044\u3046\u30a2\u30c9\u30d0\u30f3\u30c6\u30fc\u30b8\u304c\u3042\u308a\u307e\u3059\u3002\u3082\u3046\u4e00\u3064\u306f\u3001\u5217\u5f62\u5f0f\u306e\u69cb\u9020\u5316\u30c7\u30fc\u30bf\u5f62\u5f0f\u3067\u3042\u308b Apache Arrow \u30d5\u30a1\u30a4\u30eb\u3067\u3001\u884c\u5358\u4f4d\u306e\u30c7\u30fc\u30bf\u66f4\u65b0\u306b\u306f\u4e0d\u5411\u304d\u3067\u3042\u308b\u3082\u306e\u306e\u3001\u52b9\u7387\u7684\u306b\u5927\u91cf\u30c7\u30fc\u30bf\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u4e8b\u304c\u3067\u304d\u3001\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1(FDW)\u3092\u901a\u3057\u3066\u52b9\u7387\u7684\u306a\u30c7\u30fc\u30bf\u306e\u691c\u7d22\u30fb\u96c6\u8a08\u304c\u53ef\u80fd\u3067\u3059\u3002 PG-Strom\u306e\u7279\u5fb4\u7684\u306a\u6a5f\u80fd\u306e\u4e00\u3064\u304c\u3001NVME/NVME-oF\u30c7\u30d0\u30a4\u30b9\u304b\u3089CPU/RAM\u3092\u30d0\u30a4\u30d1\u30b9\u3057\u3066GPU\u306b\u76f4\u63a5\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u3057\u3001GPU\u3067SQL\u51e6\u7406\u3092\u5b9f\u884c\u3059\u308b\u4e8b\u3067\u30c7\u30d0\u30a4\u30b9\u306e\u5e2f\u57df\u3092\u6700\u5927\u9650\u306b\u5f15\u304d\u51fa\u3059GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u6a5f\u80fd\u3067\u3059\u3002v3.0\u3067\u306f\u65b0\u305f\u306bNVIDIA GPUDirect Storage\u306b\u3082\u5bfe\u5fdc\u3057\u3001\u30ed\u30fc\u30ab\u30ebNVME-SSD\u3060\u3051\u3067\u306a\u304f\u3001NVME-oF\u3092\u4ecb\u3057\u305fSDS(Software Defined Storage)\u30c7\u30d0\u30a4\u30b9\u3084\u3001\u5171\u6709\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u304b\u3089\u306e\u8aad\u307f\u51fa\u3057\u306b\u3082\u5bfe\u5fdc\u3057\u307e\u3059\u3002 v3.0\u3067\u306f\u4e00\u90e8\u306ePostGIS\u95a2\u6570\u3068\u3001\u30b8\u30aa\u30e1\u30c8\u30ea\u30c7\u30fc\u30bf\u306eGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u63a2\u7d22\u3092GPU\u5074\u3067\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u66f4\u65b0\u306e\u591a\u3044\u30c6\u30fc\u30d6\u30eb\u306e\u5185\u5bb9\u3092\u4e88\u3081GPU\u306b\u8907\u88fd\u3057\u3066\u304a\u304fGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u6a5f\u80fd\u3068\u4f75\u305b\u3066\u3001\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306a\u4f4d\u7f6e\u60c5\u5831\u306b\u57fa\u3065\u304f\u691c\u7d22\u3001\u5206\u6790\u51e6\u7406\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059\u3002 v5.0\u3067\u306f\u30d7\u30ed\u30bb\u30b9\u30e2\u30c7\u30eb\u306e\u66f4\u65b0\uff08\u30de\u30eb\u30c1\u30d7\u30ed\u30bb\u30b9\u21d2\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\uff09\u3084\u3001\u30cd\u30a4\u30c6\u30a3\u30d6\u30b3\u30fc\u30c9\u304b\u3089\u7591\u4f3c\u30b3\u30fc\u30c9\u3078\u306e\u5207\u308a\u66ff\u3048\u306a\u3069\u3001\u6839\u672c\u7684\u306a\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u8a2d\u8a08\u306e\u5909\u66f4\u304c\u884c\u308f\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u5168\u822c\u7684\u306a\u51e6\u7406\u901f\u5ea6\u3084\u5b89\u5b9a\u6027\u306e\u6539\u5584\u304c\u56f3\u3089\u308c\u307e\u3057\u305f\u3002","title":"PG-Strom\u3068\u306f?"},{"location":"#_2","text":"PG-Strom\u306fPostgreSQL\u30e9\u30a4\u30bb\u30f3\u30b9\u306b\u57fa\u3065\u3044\u3066\u516c\u958b\u30fb\u914d\u5e03\u3055\u308c\u3066\u3044\u308b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3067\u3059\u3002 \u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u8a73\u7d30\u306f LICENSE \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002","title":"\u30e9\u30a4\u30bb\u30f3\u30b9\u3068\u8457\u4f5c\u6a29"},{"location":"#_3","text":"PG-Strom\u306b\u95a2\u3059\u308b\u8cea\u554f\u3084\u8981\u671b\u3001\u969c\u5bb3\u5831\u544a\u306a\u3069\u306f\u3001 GitHub\u306eDiscussion \u30da\u30fc\u30b8\u306b\u6295\u7a3f\u3059\u308b\u3088\u3046\u304a\u9858\u3044\u3057\u307e\u3059\u3002 \u672c\u63b2\u793a\u677f\u306f\u3001\u4e16\u754c\u4e2d\u306b\u516c\u958b\u3055\u308c\u305f\u30d1\u30d6\u30ea\u30c3\u30af\u306e\u63b2\u793a\u677f\u3067\u3042\u308b\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3064\u307e\u308a\u3001\u81ea\u5df1\u8cac\u4efb\u306e\u4e0b\u3001\u79d8\u5bc6\u60c5\u5831\u304c\u8aa4\u3063\u3066\u6295\u7a3f\u3055\u308c\u306a\u3044\u3088\u3046\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u672c\u63b2\u793a\u677f\u306e\u512a\u5148\u8a00\u8a9e\u306f\u82f1\u8a9e\u3067\u3059\u3002\u305f\u3060\u4e00\u65b9\u3067\u3001\u6b74\u53f2\u7684\u7d4c\u7def\u306b\u3088\u308aPG-Strom\u30e6\u30fc\u30b6\u306e\u591a\u304f\u306e\u5272\u5408\u304c\u65e5\u672c\u4eba\u3067\u3042\u308b\u4e8b\u306f\u627f\u77e5\u3057\u3066\u304a\u308a\u3001Discussion\u4e0a\u3067\u65e5\u672c\u8a9e\u3092\u5229\u7528\u3057\u305f\u8b70\u8ad6\u304c\u884c\u308f\u308c\u308b\u3053\u3068\u3082\u53ef\u80fd\u3068\u3057\u307e\u3059\u3002\u305d\u306e\u5834\u5408\u3001Subject(\u4ef6\u540d)\u306b (JP) \u3068\u3044\u3046\u63a5\u982d\u53e5\u3092\u4ed8\u3051\u308b\u4e8b\u3092\u5fd8\u308c\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306f\u975e\u65e5\u672c\u8a9e\u8a71\u8005\u304c\u4e0d\u8981\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8aad\u307f\u98db\u3070\u3059\u305f\u3081\u306b\u6709\u7528\u3067\u3059\u3002","title":"\u30b3\u30df\u30e5\u30cb\u30c6\u30a3"},{"location":"#_4","text":"\u7d50\u679c\u4e0d\u6b63\u3084\u30b7\u30b9\u30c6\u30e0\u30af\u30e9\u30c3\u30b7\u30e5/\u30ed\u30c3\u30af\u30a2\u30c3\u30d7\u3001\u305d\u306e\u4ed6\u306e\u7591\u308f\u3057\u3044\u52d5\u4f5c\u3092\u767a\u898b\u3057\u305f\u5834\u5408\u306f\u3001 PG-Strom Issue Tracker \u3067\u65b0\u3057\u3044\u30a4\u30b7\u30e5\u30fc\u3092\u30aa\u30fc\u30d7\u30f3\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u30d0\u30b0\u30ec\u30dd\u30fc\u30c8\u306e\u4f5c\u6210\u306b\u969b\u3057\u3066\u306f\u3001\u4e0b\u8a18\u306e\u70b9\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 - \u540c\u3058\u554f\u984c\u3092\u6700\u65b0\u7248\u3067\u518d\u73fe\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u304b\u3069\u3046\u304b? - PG-Strom\u306e\u6700\u65b0\u7248\u3060\u3051\u3067\u306a\u304f\u3001OS\u3001CUDA\u3001PostgreSQL\u304a\u3088\u3073\u95a2\u9023\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u6700\u65b0\u7248\u3067\u30c6\u30b9\u30c8\u3059\u308b\u4e8b\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002 - PG-Strom\u304c\u7121\u52b9\u5316\u3055\u308c\u305f\u72b6\u614b\u3067\u3082\u540c\u3058\u554f\u984c\u3092\u518d\u73fe\u3067\u304d\u308b\u304b\u3069\u3046\u304b? - GUC\u30d1\u30e9\u30e1\u30fc\u30bf pg_strom.enabled \u306b\u3088\u3063\u3066PG-Strom\u306e\u6709\u52b9/\u7121\u52b9\u3092\u5207\u308a\u66ff\u3048\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 - \u540c\u3058\u65e2\u77e5\u554f\u984c\u304c\u65e2\u306bGitHub\u306e\u30a4\u30b7\u30e5\u30fc\u30c8\u30e9\u30c3\u30ab\u30fc\u306b\u5b58\u5728\u3059\u308b\u304b\u3069\u3046\u304b\uff1f - close \u72b6\u614b\u306e\u30a4\u30b7\u30e5\u30fc\u3092\u691c\u7d22\u3059\u308b\u306e\u3092\u5fd8\u308c\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306a\u60c5\u5831\u306f\u30d0\u30b0\u5831\u544a\u306b\u304a\u3044\u3066\u6709\u7528\u3067\u3059\u3002 \u554f\u984c\u3092\u518d\u73fe\u3059\u308b\u624b\u9806\uff08\u30c7\u30fc\u30bf\u304a\u3088\u3073\u30af\u30a8\u30ea\uff09 \u554f\u984c\u30af\u30a8\u30ea\u306e EXPLAIN VERBOSE \u51fa\u529b \u95a2\u9023\u3059\u308b\u30c6\u30fc\u30d6\u30eb\u306e\u30c7\u30fc\u30bf\u69cb\u9020\uff08 psql \u4e0a\u3067 \\d+ \u3092\u5b9f\u884c\u3057\u3066\u5f97\u3089\u308c\u308b\uff09 \u51fa\u529b\u3055\u308c\u305f\u30ed\u30b0\u30e1\u30c3\u30bb\u30fc\u30b8\uff08verbose\u51fa\u529b\u304c\u671b\u307e\u3057\u3044\uff09 \u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u304b\u3089\u5909\u66f4\u3057\u3066\u3044\u308bGUC\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u5024 \u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u8a2d\u5b9a\uff08\u7279\u306bGPU\u306e\u578b\u756a\u3068RAM\u5bb9\u91cf\uff09 \u3042\u306a\u305f\u306e\u74b0\u5883\u3067\u767a\u751f\u3057\u305f\u7591\u308f\u3057\u3044\u52d5\u4f5c\u304c\u30d0\u30b0\u304b\u3069\u3046\u304b\u5b9a\u304b\u3067\u306f\u306a\u3044\u5834\u5408\u3001\u65b0\u3057\u3044\u30a4\u30b7\u30e5\u30fc\u306e\u30c1\u30b1\u30c3\u30c8\u3092\u30aa\u30fc\u30d7\u30f3\u3059\u308b\u524d\u306bDiscussion\u63b2\u793a\u677f\u3078\u5831\u544a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u8ffd\u52a0\u7684\u306a\u60c5\u5831\u63a1\u53d6\u306e\u4f9d\u983c\u306a\u3069\u3001\u958b\u767a\u8005\u306f\u6b21\u306b\u53d6\u308b\u3079\u304d\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u63d0\u6848\u3057\u3066\u304f\u308c\u308b\u3067\u3057\u3087\u3046\u3002","title":"\u30d0\u30b0\u3084\u969c\u5bb3\u306e\u5831\u544a"},{"location":"#_5","text":"\u4f55\u304b\u65b0\u6a5f\u80fd\u306e\u30a2\u30a4\u30c7\u30a2\u304c\u3042\u308b\u5834\u5408\u3001 PG-Strom Issue Tracker \u3067\u65b0\u3057\u3044\u30a4\u30b7\u30e5\u30fc\u3092\u30aa\u30fc\u30d7\u30f3\u3057 feature \u30bf\u30b0\u3092\u4ed8\u3051\u3066\u304f\u3060\u3055\u3044\u3002\u7d9a\u3044\u3066\u3001\u4ed6\u306e\u958b\u767a\u8005\u3068\u8b70\u8ad6\u3092\u884c\u3044\u307e\u3057\u3087\u3046\u3002 \u671b\u307e\u3057\u3044\u65b0\u6a5f\u80fd\u63d0\u6848\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8981\u7d20\u3092\u542b\u3093\u3067\u3044\u307e\u3059\u3002 \u3042\u306a\u305f\u306f\u3069\u306e\u3088\u3046\u306a\u554f\u984c\u3092\u89e3\u6c7a/\u6539\u5584\u3057\u305f\u3044\u306e\u304b\uff1f \u3042\u306a\u305f\u306e\u30ef\u30fc\u30af\u30ed\u30fc\u30c9/\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u306b\u3068\u3063\u3066\u3069\u306e\u7a0b\u5ea6\u6df1\u523b\u306a\u306e\u304b\uff1f \u3069\u306e\u3088\u3046\u306b\u305d\u308c\u3092\u5b9f\u88c5\u3059\u308b\u306e\u304b\uff1f \uff08\u3082\u3057\u3042\u308c\u3070\uff09\u4e88\u60f3\u3055\u308c\u308b\u6b20\u70b9\u30fb\u30c8\u30ec\u30fc\u30c9\u30aa\u30d5 \u958b\u767a\u8005\u306e\u9593\u3067\u305d\u306e\u5fc5\u8981\u6027\u306b\u95a2\u3057\u3066\u30b3\u30f3\u30bb\u30f3\u30b5\u30b9\u304c\u5f97\u3089\u308c\u308b\u3068\u3001\u30b3\u30fc\u30c7\u30a3\u30cd\u30fc\u30bf\u30fc\u306f\u30a4\u30b7\u30e5\u30fc\u30c1\u30b1\u30c3\u30c8\u306b accepted \u30bf\u30b0\u3092\u4ed8\u3051\u3001\u305d\u306e\u30c1\u30b1\u30c3\u30c8\u306f\u305d\u306e\u5f8c\u306e\u958b\u767a\u4f5c\u696d\u306e\u30c8\u30e9\u30c3\u30ad\u30f3\u30b0\u306e\u305f\u3081\u306b\u5229\u7528\u3055\u308c\u307e\u3059\u3002\u305d\u308c\u4ee5\u5916\u306e\u5834\u5408\u3001\u30a4\u30b7\u30e5\u30fc\u30c1\u30b1\u30c3\u30c8\u306b\u306f rejected \u30bf\u30b0\u3092\u4ed8\u3051\u3066\u30af\u30ed\u30fc\u30ba\u3055\u308c\u307e\u3059\u3002 \u4e00\u5ea6\u30d7\u30ed\u30dd\u30fc\u30b6\u30eb\u304c\u5374\u4e0b\u3055\u308c\u305f\u3068\u3057\u3066\u3082\u3001\u5c06\u6765\u306b\u304a\u3044\u3066\u307e\u305f\u7570\u306a\u3063\u305f\u6c7a\u5b9a\u304c\u3042\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u5468\u8fba\u72b6\u6cc1\u304c\u5909\u308f\u3063\u305f\u5834\u5408\u3001\u65b0\u6a5f\u80fd\u306e\u518d\u63d0\u6848\u3092\u8e8a\u8e87\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u958b\u767a\u6bb5\u968e\u3067\u306f\u3001\u30d1\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30b7\u30e5\u30fc\u30c1\u30b1\u30c3\u30c8\u306b\u6dfb\u4ed8\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002pull-request\u306f\u4f7f\u7528\u3057\u307e\u305b\u3093\u3002","title":"\u65b0\u6a5f\u80fd\u306e\u63d0\u6848"},{"location":"#_6","text":"PG-Strom development team\u306fHeteroDB Software Distribution Center\u304b\u3089\u914d\u5e03\u3055\u308c\u305f\u6700\u65b0\u7248\u306e\u307f\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002 \u30c8\u30e9\u30d6\u30eb\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u3001\u307e\u305a\u305d\u306e\u554f\u984c\u306f\u6700\u65b0\u7248\u306e\u30ea\u30ea\u30fc\u30b9\u3067\u518d\u73fe\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u304b\u3081\u3066\u304f\u3060\u3055\u3044\u3002 \u307e\u305f\u3001\u3053\u308c\u306f\u30dc\u30e9\u30f3\u30c6\u30a3\u30a2\u30d9\u30fc\u30b9\u306e\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u30b5\u30dd\u30fc\u30c8\u306e\u30dd\u30ea\u30b7\u30fc\u3067\u3042\u308b\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3064\u307e\u308a\u3001\u30b5\u30dd\u30fc\u30c8\u306f\u30d9\u30b9\u30c8\u30a8\u30d5\u30a9\u30fc\u30c8\u3067\u304b\u3064\u3001SLA\u306e\u5b9a\u7fa9\u3082\u3042\u308a\u307e\u305b\u3093\u3002 \u3082\u3057\u5546\u7528\u306e\u30b5\u30dd\u30fc\u30c8\u304c\u5fc5\u8981\u3067\u3042\u308b\u5834\u5408\u3001HeteroDB\u793e\uff08contact@heterodbcom\uff09\u306b\u30b3\u30f3\u30bf\u30af\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\u3002","title":"\u30b5\u30dd\u30fc\u30c8\u30dd\u30ea\u30b7\u30fc"},{"location":"arrow_fdw/","text":"Apache Arrow (\u5217\u6307\u5411\u30c7\u30fc\u30bf\u30b9\u30c8\u30a2) \u6982\u8981 PostgreSQL\u306e\u30c6\u30fc\u30d6\u30eb\u306f\u5185\u90e8\u7684\u306b8KB\u306e\u30d6\u30ed\u30c3\u30af 1 \u3068\u547c\u3070\u308c\u308b\u5358\u4f4d\u3067\u7de8\u6210\u3055\u308c\u3001\u30d6\u30ed\u30c3\u30af\u306f\u5168\u3066\u306e\u5c5e\u6027\u53ca\u3073\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u542b\u3080\u30bf\u30d7\u30eb\u3068\u547c\u3070\u308c\u308b\u30c7\u30fc\u30bf\u69cb\u9020\u3092\u884c\u5358\u4f4d\u3067\u683c\u7d0d\u3057\u307e\u3059\u3002\u884c\u3092\u69cb\u6210\u3059\u308b\u30c7\u30fc\u30bf\u304c\u8fd1\u508d\u306b\u5b58\u5728\u3059\u308b\u305f\u3081\u3001\u3053\u308c\u306fINSERT\u3084UPDATE\u306e\u591a\u3044\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u6709\u52b9\u3067\u3059\u304c\u3001\u4e00\u65b9\u3067\u5927\u91cf\u30c7\u30fc\u30bf\u306e\u96c6\u8a08\u30fb\u89e3\u6790\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u306f\u4e0d\u5411\u304d\u3067\u3042\u308b\u3068\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u901a\u5e38\u3001\u5927\u91cf\u30c7\u30fc\u30bf\u306e\u96c6\u8a08\u306b\u304a\u3044\u3066\u306f\u30c6\u30fc\u30d6\u30eb\u5185\u306e\u5168\u3066\u306e\u5217\u3092\u53c2\u7167\u3059\u308b\u4e8b\u306f\u73cd\u3057\u304f\u3001\u591a\u304f\u306e\u5834\u5408\u306b\u306f\u4e00\u90e8\u306e\u5217\u3060\u3051\u3092\u53c2\u7167\u3059\u308b\u3068\u3044\u3063\u305f\u51e6\u7406\u306b\u306a\u308a\u304c\u3061\u3067\u3059\u3002\u3053\u306e\u5834\u5408\u3001\u5b9f\u969b\u306b\u306f\u53c2\u7167\u3055\u308c\u306a\u3044\u5217\u306e\u30c7\u30fc\u30bf\u3092\u30b9\u30c8\u30ec\u30fc\u30b8\u304b\u3089\u30ed\u30fc\u30c9\u3059\u308b\u305f\u3081\u306b\u6d88\u8cbb\u3055\u308c\u308bI/O\u306e\u5e2f\u57df\u306f\u5168\u304f\u7121\u99c4\u3067\u3059\u304c\u3001\u884c\u5358\u4f4d\u3067\u7de8\u6210\u3055\u308c\u305f\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u7279\u5b9a\u306e\u5217\u3060\u3051\u3092\u53d6\u308a\u51fa\u3059\u3068\u3044\u3046\u64cd\u4f5c\u306f\u56f0\u96e3\u3067\u3059\u3002 \u9006\u306b\u5217\u5358\u4f4d\u3067\u30c7\u30fc\u30bf\u3092\u7de8\u6210\u3057\u305f\u5834\u5408\u3001INSERT\u3084UPDATE\u306e\u591a\u3044\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u5bfe\u3057\u3066\u306f\u6975\u7aef\u306b\u4e0d\u5229\u3067\u3059\u304c\u3001\u5927\u91cf\u30c7\u30fc\u30bf\u306e\u96c6\u8a08\u30fb\u89e3\u6790\u3092\u884c\u3046\u969b\u306b\u306f\u88ab\u53c2\u7167\u5217\u3060\u3051\u3092\u30b9\u30c8\u30ec\u30fc\u30b8\u304b\u3089\u30ed\u30fc\u30c9\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u308b\u305f\u3081\u3001I/O\u306e\u5e2f\u57df\u3092\u6700\u5927\u9650\u306b\u6d3b\u7528\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 \u307e\u305f\u30d7\u30ed\u30bb\u30c3\u30b5\u306e\u51e6\u7406\u52b9\u7387\u306e\u89b3\u70b9\u304b\u3089\u3082\u3001\u5217\u5358\u4f4d\u306b\u7de8\u6210\u3055\u308c\u305f\u30c7\u30fc\u30bf\u306f\u5358\u7d14\u306a\u914d\u5217\u3067\u3042\u308b\u304b\u306e\u3088\u3046\u306b\u898b\u3048\u308b\u305f\u3081\u3001GPU\u306b\u3068\u3063\u3066\u306fCoalesced Memory Access\u3068\u3044\u3046\u30e1\u30e2\u30ea\u30d0\u30b9\u306e\u6027\u80fd\u3092\u6700\u5927\u9650\u306b\u5f15\u304d\u51fa\u3059\u30a2\u30af\u30bb\u30b9\u30d1\u30bf\u30fc\u30f3\u3068\u306a\u308b\u4e8b\u304c\u671f\u5f85\u3067\u304d\u307e\u3059\u3002 Apache Arrow\u3068\u306f Apache Arrow\u3068\u306f\u3001\u69cb\u9020\u5316\u30c7\u30fc\u30bf\u3092\u5217\u5f62\u5f0f\u3067\u8a18\u9332\u3001\u4ea4\u63db\u3059\u308b\u305f\u3081\u306e\u30c7\u30fc\u30bf\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u3059\u3002 \u4e3b\u306b\u30d3\u30c3\u30b0\u30c7\u30fc\u30bf\u51e6\u7406\u306e\u305f\u3081\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u304c\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u307b\u304b\u3001C\u3084C++\u3001Python\u306a\u3069\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u5411\u3051\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u6574\u5099\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u81ea\u4f5c\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304b\u3089Apache Arrow\u5f62\u5f0f\u3092\u6271\u3046\u3088\u3046\u8a2d\u8a08\u3059\u308b\u4e8b\u3082\u5bb9\u6613\u3067\u3059\u3002 Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u5185\u90e8\u306b\u306f\u3001\u30c7\u30fc\u30bf\u69cb\u9020\u3092\u5b9a\u7fa9\u3059\u308b\u30b9\u30ad\u30fc\u30de\uff08Schema\uff09\u90e8\u5206\u3068\u3001\u30b9\u30ad\u30fc\u30de\u306b\u57fa\u3065\u3044\u3066\u5217\u30c7\u30fc\u30bf\u3092\u8a18\u9332\u3059\u308b1\u500b\u4ee5\u4e0a\u306e\u30ec\u30b3\u30fc\u30c9\u30d0\u30c3\u30c1\uff08RecordBatch\uff09\u90e8\u5206\u304c\u5b58\u5728\u3057\u307e\u3059\u3002\u30c7\u30fc\u30bf\u578b\u3068\u3057\u3066\u306f\u3001\u6574\u6570\u3084\u6587\u5b57\u5217\uff08\u53ef\u5909\u9577\uff09\u3001\u65e5\u4ed8\u6642\u523b\u578b\u306a\u3069\u306b\u5bfe\u5fdc\u3057\u3066\u304a\u308a\u3001\u500b\u3005\u306e\u5217\u30c7\u30fc\u30bf\u306f\u3053\u308c\u3089\u30c7\u30fc\u30bf\u578b\u306b\u5fdc\u3058\u305f\u5185\u90e8\u8868\u73fe\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002 Apache Arrow\u5f62\u5f0f\u306b\u304a\u3051\u308b\u30c7\u30fc\u30bf\u8868\u73fe\u306f\u3001\u5fc5\u305a\u3057\u3082\u5168\u3066\u306e\u5834\u5408\u3067PostgreSQL\u306e\u30c7\u30fc\u30bf\u8868\u73fe\u3068\u4e00\u81f4\u3057\u3066\u3044\u308b\u8a33\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u4f8b\u3048\u3070\u3001Arrow\u5f62\u5f0f\u3067\u306f\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u578b\u306e\u30a8\u30dd\u30c3\u30af\u306f 1970-01-01 \u3067\u8907\u6570\u306e\u7cbe\u5ea6\u3092\u6301\u3064\u4e8b\u304c\u3067\u304d\u307e\u3059\u304c\u3001PostgreSQL\u306e\u30a8\u30dd\u30c3\u30af\u306f 2001-01-01 \u3067\u30de\u30a4\u30af\u30ed\u79d2\u306e\u7cbe\u5ea6\u3092\u6301\u3061\u307e\u3059\u3002 Arrow_Fdw\u306f\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u7528\u3044\u3066Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092PostgreSQL\u4e0a\u3067\u8aad\u307f\u51fa\u3059\u4e8b\u3092\u53ef\u80fd\u306b\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u5217\u3054\u3068\u306b100\u4e07\u4ef6\u306e\u5217\u30c7\u30fc\u30bf\u304c\u5b58\u5728\u3059\u308b\u30ec\u30b3\u30fc\u30c9\u30d0\u30c3\u30c1\u30928\u500b\u5185\u5305\u3059\u308bArrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092Arrow_Fdw\u3092\u7528\u3044\u3066\u30de\u30c3\u30d7\u3057\u305f\u5834\u5408\u3001\u3053\u306e\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u4ecb\u3057\u3066Arrow\u30d5\u30a1\u30a4\u30eb\u4e0a\u306e800\u4e07\u4ef6\u306e\u30c7\u30fc\u30bf\u3078\u30a2\u30af\u30bb\u30b9\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 \u904b\u7528 \u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u5b9a\u7fa9 \u901a\u5e38\u3001\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3059\u308b\u306b\u306f\u4ee5\u4e0b\u306e3\u30b9\u30c6\u30c3\u30d7\u304c\u5fc5\u8981\u3067\u3059\u3002 CREATE FOREIGN DATA WRAPPER \u30b3\u30de\u30f3\u30c9\u306b\u3088\u308a\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u3092\u5b9a\u7fa9\u3059\u308b CREATE SERVER \u30b3\u30de\u30f3\u30c9\u306b\u3088\u308a\u5916\u90e8\u30b5\u30fc\u30d0\u3092\u5b9a\u7fa9\u3059\u308b CREATE FOREIGN TABLE \u30b3\u30de\u30f3\u30c9\u306b\u3088\u308a\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u5b9a\u7fa9\u3059\u308b \u3053\u306e\u3046\u3061\u3001\u6700\u521d\u306e2\u30b9\u30c6\u30c3\u30d7\u306f CREATE EXTENSION pg_strom \u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u306b\u542b\u307e\u308c\u3066\u304a\u308a\u3001\u500b\u5225\u306b\u5b9f\u884c\u304c\u5fc5\u8981\u306a\u306e\u306f\u6700\u5f8c\u306e CREATE FOREIGN TABLE \u306e\u307f\u3067\u3059\u3002 CREATE FOREIGN TABLE flogdata ( ts timestamp, sensor_id int, signal1 smallint, signal2 smallint, signal3 smallint, signal4 smallint, ) SERVER arrow_fdw OPTIONS (file '/path/to/logdata.arrow'); CREATE FOREIGN TABLE \u69cb\u6587\u3067\u6307\u5b9a\u3057\u305f\u5217\u306e\u30c7\u30fc\u30bf\u578b\u306f\u3001\u30de\u30c3\u30d7\u3059\u308bArrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u3068\u53b3\u5bc6\u306b\u4e00\u81f4\u3057\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u308c\u4ee5\u5916\u306b\u3082\u3001Arrow_Fdw\u306f IMPORT FOREIGN SCHEMA \u69cb\u6587\u3092\u7528\u3044\u305f\u4fbf\u5229\u306a\u65b9\u6cd5\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u3001Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u6301\u3064\u30b9\u30ad\u30fc\u30de\u60c5\u5831\u3092\u5229\u7528\u3057\u3066\u3001\u81ea\u52d5\u7684\u306b\u30c6\u30fc\u30d6\u30eb\u5b9a\u7fa9\u3092\u751f\u6210\u3059\u308b\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u540d\u3068\u30a4\u30f3\u30dd\u30fc\u30c8\u5148\u306e\u30b9\u30ad\u30fc\u30de\u3001\u304a\u3088\u3073OPTION\u53e5\u3067Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u306b\u306f\u3001\u5217\u3054\u3068\u306e\u30c7\u30fc\u30bf\u578b\u3068\u5217\u540d\uff08\u30aa\u30d7\u30b7\u30e7\u30f3\uff09\u304c\u542b\u307e\u308c\u3066\u304a\u308a\u3001\u3053\u308c\u3092\u7528\u3044\u3066\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u5b9a\u7fa9\u3092\u884c\u3044\u307e\u3059\u3002 IMPORT FOREIGN SCHEMA flogdata FROM SERVER arrow_fdw INTO public OPTIONS (file '/path/to/logdata.arrow'); \u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u30aa\u30d7\u30b7\u30e7\u30f3 Arrow_Fdw\u306f\u4ee5\u4e0b\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002\u73fe\u72b6\u3001\u5168\u3066\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u6307\u5b9a\u3059\u308b\u3082\u306e\u3067\u3059\u3002 file=PATHNAME \u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u30de\u30c3\u30d7\u3059\u308bArrow\u30d5\u30a1\u30a4\u30eb\u30921\u500b\u6307\u5b9a\u3057\u307e\u3059\u3002 files=PATHNAME1[,PATHNAME2...] \u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u30de\u30c3\u30d7\u3059\u308bArrow\u30d5\u30a1\u30a4\u30eb\u3092\u30ab\u30f3\u30de(,\uff09\u533a\u5207\u308a\u3067\u8907\u6570\u6307\u5b9a\u3057\u307e\u3059\u3002 dir=DIRNAME \u6307\u5b9a\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u5168\u3066\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u30de\u30c3\u30d7\u3057\u307e\u3059\u3002 suffix=SUFFIX dir \u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u6307\u5b9a\u6642\u3001\u4f8b\u3048\u3070 .arrow \u306a\u3069\u3001\u7279\u5b9a\u306e\u63a5\u5c3e\u53e5\u3092\u6301\u3064\u30d5\u30a1\u30a4\u30eb\u3060\u3051\u3092\u30de\u30c3\u30d7\u3057\u307e\u3059\u3002 parallel_workers=N_WORKERS \u3053\u306e\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u4e26\u5217\u30b9\u30ad\u30e3\u30f3\u306b\u4f7f\u7528\u3059\u308b\u4e26\u5217\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\u306e\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u4e00\u822c\u7684\u306a\u30c6\u30fc\u30d6\u30eb\u306b\u304a\u3051\u308b parallel_workers \u30b9\u30c8\u30ec\u30fc\u30b8\u30d1\u30e9\u30e1\u30fc\u30bf\u3068\u540c\u7b49\u306e\u610f\u5473\u3092\u6301\u3061\u307e\u3059\u3002 writable=(true|false) \u3053\u306e\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3059\u308b INSERT \u6587\u306e\u5b9f\u884c\u3092\u8a31\u53ef\u3057\u307e\u3059\u3002\u8a73\u7d30\u306f\u300e\u66f8\u304d\u8fbc\u307f\u53ef\u80fdArrow_Fdw\u300f\u306e\u7bc0\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u30c7\u30fc\u30bf\u578b\u306e\u5bfe\u5fdc Arrow\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u578b\u3068\u3001PostgreSQL\u306e\u30c7\u30fc\u30bf\u578b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002 Int bitWidth \u5c5e\u6027\u306e\u5024\u306b\u5fdc\u3058\u3066\u3001\u305d\u308c\u305e\u308c int1 \u3001 int2 \u3001 int4 \u3001 int8 \u306e\u3044\u305a\u308c\u304b\u306b\u5bfe\u5fdc\u3002 is_signed \u5c5e\u6027\u306e\u5024\u306f\u7121\u8996\u3055\u308c\u307e\u3059\u3002 int1 \u306fPG-Strom\u306b\u3088\u308b\u72ec\u81ea\u62e1\u5f35 FloatingPoint precision \u5c5e\u6027\u306e\u5024\u306b\u5fdc\u3058\u3066\u3001\u305d\u308c\u305e\u308c float2 \u3001 float4 \u3001 float8 \u306e\u3044\u305a\u308c\u304b\u306b\u5bfe\u5fdc\u3002 float2 \u306fPG-Strom\u306b\u3088\u308b\u72ec\u81ea\u62e1\u5f35 Binary bytea \u578b\u306b\u5bfe\u5fdc Decimal numeric \u578b\u306b\u5bfe\u5fdc Date date \u578b\u306b\u5bfe\u5fdc\u3002 unit=Day \u76f8\u5f53\u3068\u306a\u308b\u3088\u3046\u306b\u88dc\u6b63\u3055\u308c\u308b\u3002 Time time \u578b\u306b\u5bfe\u5fdc\u3002 unit=MicroSecond \u76f8\u5f53\u306b\u306a\u308b\u3088\u3046\u306b\u88dc\u6b63\u3055\u308c\u308b\u3002 Timestamp timestamp \u578b\u306b\u5bfe\u5fdc\u3002 unit=MicroSecond \u76f8\u5f53\u306b\u306a\u308b\u3088\u3046\u306b\u88dc\u6b63\u3055\u308c\u308b\u3002 Interval interval \u578b\u306b\u5bfe\u5fdc List \u8981\u7d20\u578b\u306e1\u6b21\u5143\u914d\u5217\u578b\u3068\u3057\u3066\u8868\u73fe\u3055\u308c\u308b\u3002 Struct \u8907\u5408\u578b\u3068\u3057\u3066\u8868\u73fe\u3055\u308c\u308b\u3002\u5bfe\u5fdc\u3059\u308b\u8907\u5408\u578b\u306f\u4e88\u3081\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002 FixedSizeBinary byteWidth \u5c5e\u6027\u306e\u5024\u306b\u5fdc\u3058\u3066 char(n) \u3068\u3057\u3066\u8868\u73fe\u3055\u308c\u308b\u3002 \u30e1\u30bf\u30c7\u30fc\u30bf pg_type=TYPENAME \u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u8a72\u5f53\u3059\u308b\u30c7\u30fc\u30bf\u578b\u3092\u5272\u308a\u5f53\u3066\u308b\u5834\u5408\u304c\u3042\u308b\u3002\u73fe\u6642\u70b9\u3067\u306f\u3001 inet \u304a\u3088\u3073 macaddr \u578b\u3002 Union \u3001 Map \u3001 Duration \u3001 LargeBinary \u3001 LargeUtf8 \u3001 LargeList \u73fe\u6642\u70b9\u3067\u306fPostgreSQL\u30c7\u30fc\u30bf\u578b\u3078\u306e\u5bfe\u5fdc\u306f\u306a\u3057\u3002 EXPLAIN\u51fa\u529b\u306e\u8aad\u307f\u65b9 EXPLAIN \u30b3\u30de\u30f3\u30c9\u3092\u7528\u3044\u3066\u3001Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u51fa\u3057\u306b\u95a2\u3059\u308b\u60c5\u5831\u3092\u51fa\u529b\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u7d04503GB\u306e\u5927\u304d\u3055\u3092\u6301\u3064Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092\u30de\u30c3\u30d7\u3057\u305ff_lineorder\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u542b\u3080\u30af\u30a8\u30ea\u5b9f\u884c\u8a08\u753b\u306e\u51fa\u529b\u3067\u3059\u3002 =# EXPLAIN SELECT sum(lo_extendedprice*lo_discount) as revenue FROM f_lineorder,date1 WHERE lo_orderdate = d_datekey AND d_year = 1993 AND lo_discount between 1 and 3 AND lo_quantity < 25; QUERY PLAN -------------------------------------------------------------------------------- Aggregate (cost=14535261.08..14535261.09 rows=1 width=8) -> Custom Scan (GpuPreAgg) on f_lineorder (cost=14535261.06..14535261.07 rows=1 width=32) GPU Projection: pgstrom.psum(((f_lineorder.lo_extendedprice * f_lineorder.lo_discount))::bigint) GPU Scan Quals: ((f_lineorder.lo_discount >= 1) AND (f_lineorder.lo_discount <= 3) AND (f_lineorder.lo_quantity < 25)) [rows: 5999990000 -> 9999983] GPU Join Quals [1]: (f_lineorder.lo_orderdate = date1.d_datekey) ... [nrows: 9999983 -> 1428010] GPU Outer Hash [1]: f_lineorder.lo_orderdate GPU Inner Hash [1]: date1.d_datekey referenced: lo_orderdate, lo_quantity, lo_extendedprice, lo_discount file0: /opt/nvme/f_lineorder_s999.arrow (read: 89.41GB, size: 502.92GB) GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 (cost=0.00..78.95 rows=365 width=4) Filter: (d_year = 1993) (12 rows) \u3053\u308c\u3092\u898b\u308b\u3068Custom Scan (GpuPreAgg)\u304c f_lineorder \u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u3066\u3044\u308b\u4e8b\u304c\u308f\u304b\u308a\u307e\u3059\u3002 file0 \u306b\u306f\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u80cc\u5f8c\u306b\u3042\u308b\u30d5\u30a1\u30a4\u30eb\u540d /opt/nvme/f_lineorder_s999.arrow \u3068\u305d\u306e\u30b5\u30a4\u30ba\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u8907\u6570\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u30de\u30c3\u30d7\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306b\u306f\u3001 file1 \u3001 file2 \u3001... \u3068\u5404\u30d5\u30a1\u30a4\u30eb\u6bce\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002 referenced \u306b\u306f\u5b9f\u969b\u306b\u53c2\u7167\u3055\u308c\u3066\u3044\u308b\u5217\u306e\u4e00\u89a7\u304c\u5217\u6319\u3055\u308c\u3066\u304a\u308a\u3001\u3053\u306e\u30af\u30a8\u30ea\u306b\u304a\u3044\u3066\u306f lo_orderdate \u3001 lo_quantity \u3001 lo_extendedprice \u304a\u3088\u3073 lo_discount \u5217\u304c\u53c2\u7167\u3055\u308c\u3066\u3044\u308b\u4e8b\u304c\u308f\u304b\u308a\u307e\u3059\u3002 \u307e\u305f\u3001 GPU-Direct SQL: enabled (GPU-0) \u306e\u8868\u793a\u304c\u3042\u308b\u4e8b\u304b\u3089\u3001 f_lineorder \u306e\u30b9\u30ad\u30e3\u30f3\u306b\u306fGPU-Direct SQL\u6a5f\u69cb\u304c\u7528\u3044\u3089\u308c\u308b\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3059\u3002 VERBOSE\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4ed8\u4e0e\u3059\u308b\u4e8b\u3067\u3001\u3088\u308a\u8a73\u7d30\u306a\u60c5\u5831\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002 =# EXPLAIN VERBOSE SELECT sum(lo_extendedprice*lo_discount) as revenue FROM f_lineorder,date1 WHERE lo_orderdate = d_datekey AND d_year = 1993 AND lo_discount between 1 and 3 AND lo_quantity < 25; QUERY PLAN -------------------------------------------------------------------------------- Aggregate (cost=14535261.08..14535261.09 rows=1 width=8) Output: pgstrom.sum_int((pgstrom.psum(((f_lineorder.lo_extendedprice * f_lineorder.lo_discount))::bigint))) -> Custom Scan (GpuPreAgg) on public.f_lineorder (cost=14535261.06..14535261.07 rows=1 width=32) Output: (pgstrom.psum(((f_lineorder.lo_extendedprice * f_lineorder.lo_discount))::bigint)) GPU Projection: pgstrom.psum(((f_lineorder.lo_extendedprice * f_lineorder.lo_discount))::bigint) GPU Scan Quals: ((f_lineorder.lo_discount >= 1) AND (f_lineorder.lo_discount <= 3) AND (f_lineorder.lo_quantity < 25)) [rows: 5999990000 -> 9999983] GPU Join Quals [1]: (f_lineorder.lo_orderdate = date1.d_datekey) ... [nrows: 9999983 -> 1428010] GPU Outer Hash [1]: f_lineorder.lo_orderdate GPU Inner Hash [1]: date1.d_datekey referenced: lo_orderdate, lo_quantity, lo_extendedprice, lo_discount file0: /opt/nvme/f_lineorder_s999.arrow (read: 89.41GB, size: 502.92GB) lo_orderdate: 22.35GB lo_quantity: 22.35GB lo_extendedprice: 22.35GB lo_discount: 22.35GB GPU-Direct SQL: enabled (GPU-0) KVars-Slot: , , , , , KVecs-Buffer: nbytes: 51200, ndims: 3, items=[kvec0=<0x0000-27ff, type='int4', expr='lo_discount'>, kvec1=<0x2800-4fff, type='int4', expr='lo_quantity'>, kvec2=<0x5000-77ff, type='int4', expr='lo_extendedprice'>, kvec3=<0x7800-9fff, type='int4', expr='lo_orderdate'>, kvec4=<0xa000-c7ff, type='int4', expr='d_datekey'>] LoadVars OpCode: {Packed items[0]={LoadVars(depth=0): kvars=[, , , ]}, items[1]={LoadVars(depth=1): kvars=[]}} MoveVars OpCode: {Packed items[0]={MoveVars(depth=0): items=[, , ]}}, items[1]={MoveVars(depth=1): items=[, ]}}} Scan Quals OpCode: {Bool::AND args=[{Func(bool)::int4ge args=[{Var(int4): slot=0, expr='lo_discount'}, {Const(int4): value='1'}]}, {Func(bool)::int4le args=[{Var(int4): slot=0, expr='lo_discount'}, {Const(int4): value='3'}]}, {Func(bool)::int4lt args=[{Var(int4): slot=1, expr='lo_quantity'}, {Const(int4): value='25'}]}]} Join Quals OpCode: {Packed items[1]={JoinQuals: {Func(bool)::int4eq args=[{Var(int4): kvec=0x7800-a000, expr='lo_orderdate'}, {Var(int4): slot=5, expr='d_datekey'}]}}} Join HashValue OpCode: {Packed items[1]={HashValue arg={Var(int4): kvec=0x7800-a000, expr='lo_orderdate'}}} Partial Aggregation OpCode: {AggFuncs arg={SaveExpr: arg={Func(int8)::int8 arg={Func(int4)::int4mul args=[{Var(int4): kvec=0x5000-7800, expr='lo_extendedprice'}, {Var(int4): kvec=0x0000-2800, expr='lo_discount'}]}}}} Partial Function BufSz: 16 -> Seq Scan on public.date1 (cost=0.00..78.95 rows=365 width=4) Output: date1.d_datekey Filter: (date1.d_year = 1993) (28 rows) \u88ab\u53c2\u7167\u5217\u3092\u30ed\u30fc\u30c9\u3059\u308b\u969b\u306b\u8aad\u307f\u51fa\u3059\u3079\u304d\u5217\u30c7\u30fc\u30bf\u306e\u5927\u304d\u3055\u3092\u3001\u5217\u3054\u3068\u306b\u8868\u793a\u3057\u3066\u3044\u307e\u3059\u3002 lo_orderdate \u3001 lo_quantity \u3001 lo_extendedprice \u304a\u3088\u3073 lo_discount \u5217\u306e\u30ed\u30fc\u30c9\u306b\u306f\u5408\u8a08\u306789.41GB\u306e\u8aad\u307f\u51fa\u3057\u304c\u5fc5\u8981\u3067\u3001\u3053\u308c\u306f\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba502.93GB\u306e17.8%\u306b\u76f8\u5f53\u3057\u307e\u3059\u3002 Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210\u65b9\u6cd5 \u672c\u7bc0\u3067\u306f\u3001\u65e2\u306bPostgreSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u3092Apache Arrow\u5f62\u5f0f\u306b\u5909\u63db\u3059\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002 PyArrow+Pandas Arrow\u958b\u767a\u8005\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u304c\u958b\u767a\u3092\u884c\u3063\u3066\u3044\u308b PyArrow \u30e2\u30b8\u30e5\u30fc\u30eb\u3068Pandas\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306e\u7d44\u5408\u305b\u3092\u7528\u3044\u3066\u3001PostgreSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u5185\u5bb9\u3092Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3078\u3068\u66f8\u304d\u51fa\u3059\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u30c6\u30fc\u30d6\u30ebt0\u306b\u683c\u7d0d\u3055\u308c\u305f\u30c7\u30fc\u30bf\u3092\u5168\u3066\u8aad\u8fbc\u307f\u3001\u30d5\u30a1\u30a4\u30eb/tmp/t0.arrow\u3078\u3068\u66f8\u304d\u51fa\u3059\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002 import pyarrow as pa import pandas as pd X = pd.read_sql(sql=\"SELECT * FROM t0\", con=\"postgresql://localhost/postgres\") Y = pa.Table.from_pandas(X) f = pa.RecordBatchFileWriter('/tmp/t0.arrow', Y.schema) f.write_table(Y,1000000) # RecordBatch for each million rows f.close() \u305f\u3060\u3057\u4e0a\u8a18\u306e\u65b9\u6cd5\u306f\u3001SQL\u3092\u4ecb\u3057\u3066PostgreSQL\u304b\u3089\u8aad\u307f\u51fa\u3057\u305f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u5185\u5bb9\u3092\u4e00\u5ea6\u30e1\u30e2\u30ea\u306b\u4fdd\u6301\u3059\u308b\u305f\u3081\u3001\u5927\u91cf\u306e\u884c\u3092\u4e00\u5ea6\u306b\u5909\u63db\u3059\u308b\u5834\u5408\u306b\u306f\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002 Pg2Arrow \u4e00\u65b9\u3001PG-Strom Development Team\u304c\u958b\u767a\u3092\u884c\u3063\u3066\u3044\u308b pg2arrow \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u3001PostgreSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u5185\u5bb9\u3092Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3078\u3068\u66f8\u304d\u51fa\u3059\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u3053\u306e\u30c4\u30fc\u30eb\u306f\u6bd4\u8f03\u7684\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092NVME-SSD\u306a\u3069\u30b9\u30c8\u30ec\u30fc\u30b8\u306b\u66f8\u304d\u51fa\u3059\u4e8b\u3092\u5ff5\u982d\u306b\u8a2d\u8a08\u3055\u308c\u3066\u304a\u308a\u3001PostgreSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089 -s|--segment-size \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3057\u305f\u30b5\u30a4\u30ba\u306e\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u3059\u305f\u3073\u306b\u3001Arrow\u5f62\u5f0f\u306e\u30ec\u30b3\u30fc\u30c9\u30d0\u30c3\u30c1\uff08Record Batch\uff09\u3068\u3057\u3066\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u51fa\u3057\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30e1\u30e2\u30ea\u6d88\u8cbb\u91cf\u306f\u6bd4\u8f03\u7684\u30ea\u30fc\u30ba\u30ca\u30d6\u30eb\u306a\u5024\u3068\u306a\u308a\u307e\u3059\u3002 pg2arrow \u30b3\u30de\u30f3\u30c9\u306fPG-Strom\u306b\u540c\u68b1\u3055\u308c\u3066\u304a\u308a\u3001PostgreSQL\u95a2\u9023\u30b3\u30de\u30f3\u30c9\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u683c\u7d0d\u3055\u308c\u307e\u3059\u3002 $ pg2arrow --help Usage: pg2arrow [OPTION] [database] [username] General options: -d, --dbname=DBNAME Database name to connect to -c, --command=COMMAND SQL command to run -t, --table=TABLENAME Equivalent to '-c SELECT * FROM TABLENAME' (-c and -t are exclusive, either of them must be given) --inner-join=SUB_COMMAND --outer-join=SUB_COMMAND -o, --output=FILENAME result file in Apache Arrow format --append=FILENAME result Apache Arrow file to be appended (--output and --append are exclusive. If neither of them are given, it creates a temporary file.) -S, --stat[=COLUMNS] embeds min/max statistics for each record batch COLUMNS is a comma-separated list of the target columns if partially enabled. Arrow format options: -s, --segment-size=SIZE size of record batch for each Connection options: -h, --host=HOSTNAME database server host -p, --port=PORT database server port -u, --user=USERNAME database user name -w, --no-password never prompt for password -W, --password force password prompt Other options: --dump=FILENAME dump information of arrow file --progress shows progress of the job --set=NAME:VALUE config option to set before SQL execution --help shows this message Report bugs to . PostgreSQL\u3078\u306e\u63a5\u7d9a\u30d1\u30e9\u30e1\u30fc\u30bf\u306fpsql\u3084pg_dump\u3068\u540c\u69d8\u306b\u3001 -h \u3084 -U \u306a\u3069\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002 \u57fa\u672c\u7684\u306a\u30b3\u30de\u30f3\u30c9\u306e\u4f7f\u7528\u65b9\u6cd5\u306f\u3001 -c|--command \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3057\u305fSQL\u3092PostgreSQL\u4e0a\u3067\u5b9f\u884c\u3057\u3001\u305d\u306e\u7d50\u679c\u3092 -o|--output \u3067\u6307\u5b9a\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3078Arrow\u5f62\u5f0f\u3067\u66f8\u304d\u51fa\u3057\u307e\u3059\u3002 -o|--output \u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u4ee3\u308f\u308a\u306b --append \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u3001\u3053\u308c\u306f\u65e2\u5b58\u306eApache Arrow\u30d5\u30a1\u30a4\u30eb\u3078\u306e\u8ffd\u8a18\u3092\u610f\u5473\u3057\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001\u8ffd\u8a18\u3055\u308c\u308bApache Arrow\u30d5\u30a1\u30a4\u30eb\u306f\u6307\u5b9a\u3057\u305fSQL\u306e\u5b9f\u884c\u7d50\u679c\u3068\u5b8c\u5168\u306b\u4e00\u81f4\u3059\u308b\u30b9\u30ad\u30fc\u30de\u69cb\u9020\u3092\u6301\u305f\u306d\u3070\u306a\u308a\u307e\u305b\u3093\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u30c6\u30fc\u30d6\u30eb t0 \u306b\u683c\u7d0d\u3055\u308c\u305f\u30c7\u30fc\u30bf\u3092\u5168\u3066\u8aad\u8fbc\u307f\u3001\u30d5\u30a1\u30a4\u30eb /tmp/t0.arrow \u3078\u3068\u66f8\u304d\u51fa\u3059\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002 $ pg2arrow -U kaigai -d postgres -c \"SELECT * FROM t0\" -o /tmp/t0.arrow \u958b\u767a\u8005\u5411\u3051\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3059\u304c\u3001 --dump \u3067Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u3084\u30ec\u30b3\u30fc\u30c9\u30d0\u30c3\u30c1\u306e\u4f4d\u7f6e\u3068\u30b5\u30a4\u30ba\u3092\u53ef\u8aad\u306a\u5f62\u5f0f\u3067\u51fa\u529b\u3059\u308b\u4e8b\u3082\u3067\u304d\u307e\u3059\u3002 --progress \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3059\u308b\u3068\u3001\u51e6\u7406\u306e\u9014\u4e2d\u7d4c\u904e\u3092\u8868\u793a\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002\u3053\u308c\u306f\u5de8\u5927\u306a\u30c6\u30fc\u30d6\u30eb\u3092Apache Arrow\u5f62\u5f0f\u306b\u5909\u63db\u3059\u308b\u969b\u306b\u6709\u7528\u3067\u3059\u3002 \u5148\u9032\u7684\u306a\u4f7f\u3044\u65b9 SSDtoGPU\u30c0\u30a4\u30ec\u30af\u30c8SQL Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u30de\u30c3\u30d7\u3055\u308c\u305f\u5168\u3066\u306eArrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u304c\u4ee5\u4e0b\u306e\u6761\u4ef6\u3092\u6e80\u305f\u3059\u5834\u5408\u306b\u306f\u3001\u5217\u30c7\u30fc\u30bf\u306e\u8aad\u307f\u51fa\u3057\u306bSSD-to-GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u3092\u4f7f\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u304cNVME-SSD\u533a\u753b\u4e0a\u306b\u7f6e\u304b\u308c\u3066\u3044\u308b\u3002 NVME-SSD\u533a\u753b\u306fExt4\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3067\u69cb\u7bc9\u3055\u308c\u3066\u3044\u308b\u3002 Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u7dcf\u8a08\u304c pg_strom.nvme_strom_threshold \u8a2d\u5b9a\u3092\u4e0a\u56de\u3063\u3066\u3044\u308b\u3002 \u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u8a2d\u5b9a Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u4e00\u90e8\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u901a\u5e38\u306ePostgreSQL\u30c6\u30fc\u30d6\u30eb\u3068\u6df7\u5728\u3059\u308b\u4e8b\u3082\u53ef\u80fd\u3067\u3059\u304c\u3001Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306f\u66f8\u304d\u8fbc\u307f\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u4e8b\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u307e\u305f\u3001\u30de\u30c3\u30d7\u3055\u308c\u305fArrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306b\u542b\u307e\u308c\u308b\u30c7\u30fc\u30bf\u306f\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u5883\u754c\u6761\u4ef6\u3068\u77db\u76fe\u3057\u306a\u3044\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u7ba1\u7406\u8005\u306e\u8cac\u4efb\u3067\u3059\u3002 \u5178\u578b\u7684\u306a\u5229\u7528\u30b7\u30fc\u30f3\u306f\u3001\u9577\u671f\u9593\u306b\u308f\u305f\u308a\u84c4\u7a4d\u3057\u305f\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u51e6\u7406\u3067\u3059\u3002 \u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u30c7\u30fc\u30bf\u3068\u7570\u306a\u308a\u3001\u4e00\u822c\u7684\u306b\u30ed\u30b0\u30c7\u30fc\u30bf\u306f\u4e00\u5ea6\u8a18\u9332\u3055\u308c\u305f\u3089\u305d\u306e\u5f8c\u66f4\u65b0\u524a\u9664\u3055\u308c\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u3057\u305f\u304c\u3063\u3066\u3001\u4e00\u5b9a\u671f\u9593\u304c\u7d4c\u904e\u3057\u305f\u30ed\u30b0\u30c7\u30fc\u30bf\u306f\u3001\u8aad\u307f\u51fa\u3057\u5c02\u7528\u3067\u306f\u3042\u308b\u3082\u306e\u306e\u96c6\u8a08\u51e6\u7406\u304c\u9ad8\u901f\u306aArrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u79fb\u3057\u66ff\u3048\u308b\u3053\u3068\u3067\u3001\u96c6\u8a08\u30fb\u89e3\u6790\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u51e6\u7406\u52b9\u7387\u3092\u5f15\u304d\u4e0a\u3052\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u30ed\u30b0\u30c7\u30fc\u30bf\u306b\u306f\u307b\u307c\u9593\u9055\u3044\u306a\u304f\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u304c\u4ed8\u4e0e\u3055\u308c\u3066\u3044\u308b\u4e8b\u304b\u3089\u3001\u6708\u5358\u4f4d\u3001\u9031\u5358\u4f4d\u306a\u3069\u3001\u4e00\u5b9a\u671f\u9593\u3054\u3068\u306b\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u3092\u8ffd\u52a0\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001PostgreSQL\u30c6\u30fc\u30d6\u30eb\u3068Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u6df7\u5728\u3055\u305b\u305f\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u3092\u5b9a\u7fa9\u3057\u305f\u3082\u306e\u3067\u3059\u3002 \u66f8\u304d\u8fbc\u307f\u304c\u53ef\u80fd\u306aPostgreSQL\u30c6\u30fc\u30d6\u30eb\u3092\u30c7\u30d5\u30a9\u30eb\u30c8\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3068\u3057\u3066\u6307\u5b9a\u3057\u3066\u304a\u304f\u4e8b\u3067\u3001\u4e00\u5b9a\u671f\u9593\u306e\u7d4c\u904e\u5f8c\u3001DB\u904b\u7528\u3092\u7d99\u7d9a\u3057\u306a\u304c\u3089\u904e\u53bb\u306e\u30ed\u30b0\u30c7\u30fc\u30bf\u3060\u3051\u3092Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3078\u79fb\u3059\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 CREATE TABLE lineorder ( lo_orderkey numeric, lo_linenumber integer, lo_custkey numeric, lo_partkey integer, lo_suppkey numeric, lo_orderdate integer, lo_orderpriority character(15), lo_shippriority character(1), lo_quantity numeric, lo_extendedprice numeric, lo_ordertotalprice numeric, lo_discount numeric, lo_revenue numeric, lo_supplycost numeric, lo_tax numeric, lo_commit_date character(8), lo_shipmode character(10) ) PARTITION BY RANGE (lo_orderdate); CREATE TABLE lineorder__now PARTITION OF lineorder default; CREATE FOREIGN TABLE lineorder__1993 PARTITION OF lineorder FOR VALUES FROM (19930101) TO (19940101) SERVER arrow_fdw OPTIONS (file '/opt/tmp/lineorder_1993.arrow'); CREATE FOREIGN TABLE lineorder__1994 PARTITION OF lineorder FOR VALUES FROM (19940101) TO (19950101) SERVER arrow_fdw OPTIONS (file '/opt/tmp/lineorder_1994.arrow'); CREATE FOREIGN TABLE lineorder__1995 PARTITION OF lineorder FOR VALUES FROM (19950101) TO (19960101) SERVER arrow_fdw OPTIONS (file '/opt/tmp/lineorder_1995.arrow'); CREATE FOREIGN TABLE lineorder__1996 PARTITION OF lineorder FOR VALUES FROM (19960101) TO (19970101) SERVER arrow_fdw OPTIONS (file '/opt/tmp/lineorder_1996.arrow'); \u3053\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3059\u308b\u554f\u3044\u5408\u308f\u305b\u306e\u5b9f\u884c\u8a08\u753b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 \u691c\u7d22\u6761\u4ef6 lo_orderdate between 19950701 and 19960630 \u304c\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u5883\u754c\u6761\u4ef6\u3092\u542b\u3093\u3067\u3044\u308b\u4e8b\u304b\u3089\u3001\u5b50\u30c6\u30fc\u30d6\u30eb lineorder__1993 \u3068 lineorder__1994 \u306f\u691c\u7d22\u5bfe\u8c61\u304b\u3089\u6392\u9664\u3055\u308c\u3001\u4ed6\u306e\u30c6\u30fc\u30d6\u30eb\u3060\u3051\u3092\u8aad\u307f\u51fa\u3059\u3088\u3046\u5b9f\u884c\u8a08\u753b\u304c\u4f5c\u3089\u308c\u3066\u3044\u307e\u3059\u3002 =# EXPLAIN SELECT sum(lo_extendedprice*lo_discount) as revenue FROM lineorder,date1 WHERE lo_orderdate = d_datekey AND lo_orderdate between 19950701 and 19960630 AND lo_discount between 1 and 3 ABD lo_quantity < 25; QUERY PLAN -------------------------------------------------------------------------------- Aggregate (cost=172088.90..172088.91 rows=1 width=32) -> Hash Join (cost=10548.86..172088.51 rows=77 width=64) Hash Cond: (lineorder__1995.lo_orderdate = date1.d_datekey) -> Append (cost=10444.35..171983.80 rows=77 width=67) -> Custom Scan (GpuScan) on lineorder__1995 (cost=10444.35..33671.87 rows=38 width=68) GPU Filter: ((lo_orderdate >= 19950701) AND (lo_orderdate <= 19960630) AND (lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) referenced: lo_orderdate, lo_quantity, lo_extendedprice, lo_discount files0: /opt/tmp/lineorder_1995.arrow (size: 892.57MB) -> Custom Scan (GpuScan) on lineorder__1996 (cost=10444.62..33849.21 rows=38 width=68) GPU Filter: ((lo_orderdate >= 19950701) AND (lo_orderdate <= 19960630) AND (lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) referenced: lo_orderdate, lo_quantity, lo_extendedprice, lo_discount files0: /opt/tmp/lineorder_1996.arrow (size: 897.87MB) -> Custom Scan (GpuScan) on lineorder__now (cost=11561.33..104462.33 rows=1 width=18) GPU Filter: ((lo_orderdate >= 19950701) AND (lo_orderdate <= 19960630) AND (lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) -> Hash (cost=72.56..72.56 rows=2556 width=4) -> Seq Scan on date1 (cost=0.00..72.56 rows=2556 width=4) (16 rows) \u3053\u306e\u5f8c\u3001 lineorder__now \u30c6\u30fc\u30d6\u30eb\u304b\u30891997\u5e74\u306e\u30c7\u30fc\u30bf\u3092\u629c\u304d\u51fa\u3057\u3001\u3053\u308c\u3092Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u5074\u306b\u79fb\u3059\u306b\u306f\u4ee5\u4e0b\u306e\u64cd\u4f5c\u3092\u884c\u3044\u307e\u3059 $ pg2arrow -d sample -o /opt/tmp/lineorder_1997.arrow \\ -c \"SELECT * FROM lineorder WHERE lo_orderdate between 19970101 and 19971231\" pg2arrow \u30b3\u30de\u30f3\u30c9\u306b\u3088\u308a\u3001 lineorder \u30c6\u30fc\u30d6\u30eb\u304b\u30891997\u5e74\u306e\u30c7\u30fc\u30bf\u3060\u3051\u3092\u629c\u304d\u51fa\u3057\u3066\u3001\u65b0\u3057\u3044Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3078\u66f8\u304d\u51fa\u3057\u307e\u3059\u3002 BEGIN; -- -- remove rows in 1997 from the read-writable table -- DELETE FROM lineorder WHERE lo_orderdate BETWEEN 19970101 AND 19971231; -- -- define a new partition leaf which maps log-data in 1997 -- CREATE FOREIGN TABLE lineorder__1997 PARTITION OF lineorder FOR VALUES FROM (19970101) TO (19980101) SERVER arrow_fdw OPTIONS (file '/opt/tmp/lineorder_1997.arrow'); COMMIT; \u3053\u306e\u64cd\u4f5c\u306b\u3088\u308a\u3001PostgreSQL\u30c6\u30fc\u30d6\u30eb\u3067\u3042\u308b lineorder__now \u304b\u30891997\u5e74\u306e\u30c7\u30fc\u30bf\u3092\u524a\u9664\u3057\u3001\u4ee3\u308f\u308a\u306b\u540c\u4e00\u5185\u5bb9\u306eArrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb /opt/tmp/lineorder_1997.arrow \u3092\u5916\u90e8\u30c6\u30fc\u30d6\u30eb lineorder__1997 \u3068\u3057\u3066\u30de\u30c3\u30d7\u3057\u307e\u3057\u305f\u3002 \u6b63\u78ba\u306b\u306f\u30014KB\uff5e32KB\u306e\u7bc4\u56f2\u3067\u30d3\u30eb\u30c9\u6642\u306b\u6307\u5b9a\u3067\u304d\u307e\u3059 \u21a9","title":"Apache Arrow"},{"location":"arrow_fdw/#apache-arrow","text":"","title":"Apache Arrow (\u5217\u6307\u5411\u30c7\u30fc\u30bf\u30b9\u30c8\u30a2)"},{"location":"arrow_fdw/#_1","text":"PostgreSQL\u306e\u30c6\u30fc\u30d6\u30eb\u306f\u5185\u90e8\u7684\u306b8KB\u306e\u30d6\u30ed\u30c3\u30af 1 \u3068\u547c\u3070\u308c\u308b\u5358\u4f4d\u3067\u7de8\u6210\u3055\u308c\u3001\u30d6\u30ed\u30c3\u30af\u306f\u5168\u3066\u306e\u5c5e\u6027\u53ca\u3073\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u542b\u3080\u30bf\u30d7\u30eb\u3068\u547c\u3070\u308c\u308b\u30c7\u30fc\u30bf\u69cb\u9020\u3092\u884c\u5358\u4f4d\u3067\u683c\u7d0d\u3057\u307e\u3059\u3002\u884c\u3092\u69cb\u6210\u3059\u308b\u30c7\u30fc\u30bf\u304c\u8fd1\u508d\u306b\u5b58\u5728\u3059\u308b\u305f\u3081\u3001\u3053\u308c\u306fINSERT\u3084UPDATE\u306e\u591a\u3044\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u6709\u52b9\u3067\u3059\u304c\u3001\u4e00\u65b9\u3067\u5927\u91cf\u30c7\u30fc\u30bf\u306e\u96c6\u8a08\u30fb\u89e3\u6790\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u306f\u4e0d\u5411\u304d\u3067\u3042\u308b\u3068\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u901a\u5e38\u3001\u5927\u91cf\u30c7\u30fc\u30bf\u306e\u96c6\u8a08\u306b\u304a\u3044\u3066\u306f\u30c6\u30fc\u30d6\u30eb\u5185\u306e\u5168\u3066\u306e\u5217\u3092\u53c2\u7167\u3059\u308b\u4e8b\u306f\u73cd\u3057\u304f\u3001\u591a\u304f\u306e\u5834\u5408\u306b\u306f\u4e00\u90e8\u306e\u5217\u3060\u3051\u3092\u53c2\u7167\u3059\u308b\u3068\u3044\u3063\u305f\u51e6\u7406\u306b\u306a\u308a\u304c\u3061\u3067\u3059\u3002\u3053\u306e\u5834\u5408\u3001\u5b9f\u969b\u306b\u306f\u53c2\u7167\u3055\u308c\u306a\u3044\u5217\u306e\u30c7\u30fc\u30bf\u3092\u30b9\u30c8\u30ec\u30fc\u30b8\u304b\u3089\u30ed\u30fc\u30c9\u3059\u308b\u305f\u3081\u306b\u6d88\u8cbb\u3055\u308c\u308bI/O\u306e\u5e2f\u57df\u306f\u5168\u304f\u7121\u99c4\u3067\u3059\u304c\u3001\u884c\u5358\u4f4d\u3067\u7de8\u6210\u3055\u308c\u305f\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u7279\u5b9a\u306e\u5217\u3060\u3051\u3092\u53d6\u308a\u51fa\u3059\u3068\u3044\u3046\u64cd\u4f5c\u306f\u56f0\u96e3\u3067\u3059\u3002 \u9006\u306b\u5217\u5358\u4f4d\u3067\u30c7\u30fc\u30bf\u3092\u7de8\u6210\u3057\u305f\u5834\u5408\u3001INSERT\u3084UPDATE\u306e\u591a\u3044\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u5bfe\u3057\u3066\u306f\u6975\u7aef\u306b\u4e0d\u5229\u3067\u3059\u304c\u3001\u5927\u91cf\u30c7\u30fc\u30bf\u306e\u96c6\u8a08\u30fb\u89e3\u6790\u3092\u884c\u3046\u969b\u306b\u306f\u88ab\u53c2\u7167\u5217\u3060\u3051\u3092\u30b9\u30c8\u30ec\u30fc\u30b8\u304b\u3089\u30ed\u30fc\u30c9\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u308b\u305f\u3081\u3001I/O\u306e\u5e2f\u57df\u3092\u6700\u5927\u9650\u306b\u6d3b\u7528\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 \u307e\u305f\u30d7\u30ed\u30bb\u30c3\u30b5\u306e\u51e6\u7406\u52b9\u7387\u306e\u89b3\u70b9\u304b\u3089\u3082\u3001\u5217\u5358\u4f4d\u306b\u7de8\u6210\u3055\u308c\u305f\u30c7\u30fc\u30bf\u306f\u5358\u7d14\u306a\u914d\u5217\u3067\u3042\u308b\u304b\u306e\u3088\u3046\u306b\u898b\u3048\u308b\u305f\u3081\u3001GPU\u306b\u3068\u3063\u3066\u306fCoalesced Memory Access\u3068\u3044\u3046\u30e1\u30e2\u30ea\u30d0\u30b9\u306e\u6027\u80fd\u3092\u6700\u5927\u9650\u306b\u5f15\u304d\u51fa\u3059\u30a2\u30af\u30bb\u30b9\u30d1\u30bf\u30fc\u30f3\u3068\u306a\u308b\u4e8b\u304c\u671f\u5f85\u3067\u304d\u307e\u3059\u3002","title":"\u6982\u8981"},{"location":"arrow_fdw/#apache-arrow_1","text":"Apache Arrow\u3068\u306f\u3001\u69cb\u9020\u5316\u30c7\u30fc\u30bf\u3092\u5217\u5f62\u5f0f\u3067\u8a18\u9332\u3001\u4ea4\u63db\u3059\u308b\u305f\u3081\u306e\u30c7\u30fc\u30bf\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u3059\u3002 \u4e3b\u306b\u30d3\u30c3\u30b0\u30c7\u30fc\u30bf\u51e6\u7406\u306e\u305f\u3081\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u304c\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u307b\u304b\u3001C\u3084C++\u3001Python\u306a\u3069\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u5411\u3051\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u6574\u5099\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u81ea\u4f5c\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304b\u3089Apache Arrow\u5f62\u5f0f\u3092\u6271\u3046\u3088\u3046\u8a2d\u8a08\u3059\u308b\u4e8b\u3082\u5bb9\u6613\u3067\u3059\u3002 Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u5185\u90e8\u306b\u306f\u3001\u30c7\u30fc\u30bf\u69cb\u9020\u3092\u5b9a\u7fa9\u3059\u308b\u30b9\u30ad\u30fc\u30de\uff08Schema\uff09\u90e8\u5206\u3068\u3001\u30b9\u30ad\u30fc\u30de\u306b\u57fa\u3065\u3044\u3066\u5217\u30c7\u30fc\u30bf\u3092\u8a18\u9332\u3059\u308b1\u500b\u4ee5\u4e0a\u306e\u30ec\u30b3\u30fc\u30c9\u30d0\u30c3\u30c1\uff08RecordBatch\uff09\u90e8\u5206\u304c\u5b58\u5728\u3057\u307e\u3059\u3002\u30c7\u30fc\u30bf\u578b\u3068\u3057\u3066\u306f\u3001\u6574\u6570\u3084\u6587\u5b57\u5217\uff08\u53ef\u5909\u9577\uff09\u3001\u65e5\u4ed8\u6642\u523b\u578b\u306a\u3069\u306b\u5bfe\u5fdc\u3057\u3066\u304a\u308a\u3001\u500b\u3005\u306e\u5217\u30c7\u30fc\u30bf\u306f\u3053\u308c\u3089\u30c7\u30fc\u30bf\u578b\u306b\u5fdc\u3058\u305f\u5185\u90e8\u8868\u73fe\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002 Apache Arrow\u5f62\u5f0f\u306b\u304a\u3051\u308b\u30c7\u30fc\u30bf\u8868\u73fe\u306f\u3001\u5fc5\u305a\u3057\u3082\u5168\u3066\u306e\u5834\u5408\u3067PostgreSQL\u306e\u30c7\u30fc\u30bf\u8868\u73fe\u3068\u4e00\u81f4\u3057\u3066\u3044\u308b\u8a33\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u4f8b\u3048\u3070\u3001Arrow\u5f62\u5f0f\u3067\u306f\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u578b\u306e\u30a8\u30dd\u30c3\u30af\u306f 1970-01-01 \u3067\u8907\u6570\u306e\u7cbe\u5ea6\u3092\u6301\u3064\u4e8b\u304c\u3067\u304d\u307e\u3059\u304c\u3001PostgreSQL\u306e\u30a8\u30dd\u30c3\u30af\u306f 2001-01-01 \u3067\u30de\u30a4\u30af\u30ed\u79d2\u306e\u7cbe\u5ea6\u3092\u6301\u3061\u307e\u3059\u3002 Arrow_Fdw\u306f\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u7528\u3044\u3066Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092PostgreSQL\u4e0a\u3067\u8aad\u307f\u51fa\u3059\u4e8b\u3092\u53ef\u80fd\u306b\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u5217\u3054\u3068\u306b100\u4e07\u4ef6\u306e\u5217\u30c7\u30fc\u30bf\u304c\u5b58\u5728\u3059\u308b\u30ec\u30b3\u30fc\u30c9\u30d0\u30c3\u30c1\u30928\u500b\u5185\u5305\u3059\u308bArrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092Arrow_Fdw\u3092\u7528\u3044\u3066\u30de\u30c3\u30d7\u3057\u305f\u5834\u5408\u3001\u3053\u306e\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u4ecb\u3057\u3066Arrow\u30d5\u30a1\u30a4\u30eb\u4e0a\u306e800\u4e07\u4ef6\u306e\u30c7\u30fc\u30bf\u3078\u30a2\u30af\u30bb\u30b9\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002","title":"Apache Arrow\u3068\u306f"},{"location":"arrow_fdw/#_2","text":"","title":"\u904b\u7528"},{"location":"arrow_fdw/#_3","text":"\u901a\u5e38\u3001\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3059\u308b\u306b\u306f\u4ee5\u4e0b\u306e3\u30b9\u30c6\u30c3\u30d7\u304c\u5fc5\u8981\u3067\u3059\u3002 CREATE FOREIGN DATA WRAPPER \u30b3\u30de\u30f3\u30c9\u306b\u3088\u308a\u5916\u90e8\u30c7\u30fc\u30bf\u30e9\u30c3\u30d1\u3092\u5b9a\u7fa9\u3059\u308b CREATE SERVER \u30b3\u30de\u30f3\u30c9\u306b\u3088\u308a\u5916\u90e8\u30b5\u30fc\u30d0\u3092\u5b9a\u7fa9\u3059\u308b CREATE FOREIGN TABLE \u30b3\u30de\u30f3\u30c9\u306b\u3088\u308a\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u5b9a\u7fa9\u3059\u308b \u3053\u306e\u3046\u3061\u3001\u6700\u521d\u306e2\u30b9\u30c6\u30c3\u30d7\u306f CREATE EXTENSION pg_strom \u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u306b\u542b\u307e\u308c\u3066\u304a\u308a\u3001\u500b\u5225\u306b\u5b9f\u884c\u304c\u5fc5\u8981\u306a\u306e\u306f\u6700\u5f8c\u306e CREATE FOREIGN TABLE \u306e\u307f\u3067\u3059\u3002 CREATE FOREIGN TABLE flogdata ( ts timestamp, sensor_id int, signal1 smallint, signal2 smallint, signal3 smallint, signal4 smallint, ) SERVER arrow_fdw OPTIONS (file '/path/to/logdata.arrow'); CREATE FOREIGN TABLE \u69cb\u6587\u3067\u6307\u5b9a\u3057\u305f\u5217\u306e\u30c7\u30fc\u30bf\u578b\u306f\u3001\u30de\u30c3\u30d7\u3059\u308bArrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u3068\u53b3\u5bc6\u306b\u4e00\u81f4\u3057\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u308c\u4ee5\u5916\u306b\u3082\u3001Arrow_Fdw\u306f IMPORT FOREIGN SCHEMA \u69cb\u6587\u3092\u7528\u3044\u305f\u4fbf\u5229\u306a\u65b9\u6cd5\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u3001Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u6301\u3064\u30b9\u30ad\u30fc\u30de\u60c5\u5831\u3092\u5229\u7528\u3057\u3066\u3001\u81ea\u52d5\u7684\u306b\u30c6\u30fc\u30d6\u30eb\u5b9a\u7fa9\u3092\u751f\u6210\u3059\u308b\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u540d\u3068\u30a4\u30f3\u30dd\u30fc\u30c8\u5148\u306e\u30b9\u30ad\u30fc\u30de\u3001\u304a\u3088\u3073OPTION\u53e5\u3067Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u306b\u306f\u3001\u5217\u3054\u3068\u306e\u30c7\u30fc\u30bf\u578b\u3068\u5217\u540d\uff08\u30aa\u30d7\u30b7\u30e7\u30f3\uff09\u304c\u542b\u307e\u308c\u3066\u304a\u308a\u3001\u3053\u308c\u3092\u7528\u3044\u3066\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u5b9a\u7fa9\u3092\u884c\u3044\u307e\u3059\u3002 IMPORT FOREIGN SCHEMA flogdata FROM SERVER arrow_fdw INTO public OPTIONS (file '/path/to/logdata.arrow');","title":"\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u5b9a\u7fa9"},{"location":"arrow_fdw/#_4","text":"Arrow_Fdw\u306f\u4ee5\u4e0b\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002\u73fe\u72b6\u3001\u5168\u3066\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u6307\u5b9a\u3059\u308b\u3082\u306e\u3067\u3059\u3002 file=PATHNAME \u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u30de\u30c3\u30d7\u3059\u308bArrow\u30d5\u30a1\u30a4\u30eb\u30921\u500b\u6307\u5b9a\u3057\u307e\u3059\u3002 files=PATHNAME1[,PATHNAME2...] \u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u30de\u30c3\u30d7\u3059\u308bArrow\u30d5\u30a1\u30a4\u30eb\u3092\u30ab\u30f3\u30de(,\uff09\u533a\u5207\u308a\u3067\u8907\u6570\u6307\u5b9a\u3057\u307e\u3059\u3002 dir=DIRNAME \u6307\u5b9a\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u5168\u3066\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u30de\u30c3\u30d7\u3057\u307e\u3059\u3002 suffix=SUFFIX dir \u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u6307\u5b9a\u6642\u3001\u4f8b\u3048\u3070 .arrow \u306a\u3069\u3001\u7279\u5b9a\u306e\u63a5\u5c3e\u53e5\u3092\u6301\u3064\u30d5\u30a1\u30a4\u30eb\u3060\u3051\u3092\u30de\u30c3\u30d7\u3057\u307e\u3059\u3002 parallel_workers=N_WORKERS \u3053\u306e\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u4e26\u5217\u30b9\u30ad\u30e3\u30f3\u306b\u4f7f\u7528\u3059\u308b\u4e26\u5217\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\u306e\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u4e00\u822c\u7684\u306a\u30c6\u30fc\u30d6\u30eb\u306b\u304a\u3051\u308b parallel_workers \u30b9\u30c8\u30ec\u30fc\u30b8\u30d1\u30e9\u30e1\u30fc\u30bf\u3068\u540c\u7b49\u306e\u610f\u5473\u3092\u6301\u3061\u307e\u3059\u3002 writable=(true|false) \u3053\u306e\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3059\u308b INSERT \u6587\u306e\u5b9f\u884c\u3092\u8a31\u53ef\u3057\u307e\u3059\u3002\u8a73\u7d30\u306f\u300e\u66f8\u304d\u8fbc\u307f\u53ef\u80fdArrow_Fdw\u300f\u306e\u7bc0\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002","title":"\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u30aa\u30d7\u30b7\u30e7\u30f3"},{"location":"arrow_fdw/#_5","text":"Arrow\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u578b\u3068\u3001PostgreSQL\u306e\u30c7\u30fc\u30bf\u578b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002 Int bitWidth \u5c5e\u6027\u306e\u5024\u306b\u5fdc\u3058\u3066\u3001\u305d\u308c\u305e\u308c int1 \u3001 int2 \u3001 int4 \u3001 int8 \u306e\u3044\u305a\u308c\u304b\u306b\u5bfe\u5fdc\u3002 is_signed \u5c5e\u6027\u306e\u5024\u306f\u7121\u8996\u3055\u308c\u307e\u3059\u3002 int1 \u306fPG-Strom\u306b\u3088\u308b\u72ec\u81ea\u62e1\u5f35 FloatingPoint precision \u5c5e\u6027\u306e\u5024\u306b\u5fdc\u3058\u3066\u3001\u305d\u308c\u305e\u308c float2 \u3001 float4 \u3001 float8 \u306e\u3044\u305a\u308c\u304b\u306b\u5bfe\u5fdc\u3002 float2 \u306fPG-Strom\u306b\u3088\u308b\u72ec\u81ea\u62e1\u5f35 Binary bytea \u578b\u306b\u5bfe\u5fdc Decimal numeric \u578b\u306b\u5bfe\u5fdc Date date \u578b\u306b\u5bfe\u5fdc\u3002 unit=Day \u76f8\u5f53\u3068\u306a\u308b\u3088\u3046\u306b\u88dc\u6b63\u3055\u308c\u308b\u3002 Time time \u578b\u306b\u5bfe\u5fdc\u3002 unit=MicroSecond \u76f8\u5f53\u306b\u306a\u308b\u3088\u3046\u306b\u88dc\u6b63\u3055\u308c\u308b\u3002 Timestamp timestamp \u578b\u306b\u5bfe\u5fdc\u3002 unit=MicroSecond \u76f8\u5f53\u306b\u306a\u308b\u3088\u3046\u306b\u88dc\u6b63\u3055\u308c\u308b\u3002 Interval interval \u578b\u306b\u5bfe\u5fdc List \u8981\u7d20\u578b\u306e1\u6b21\u5143\u914d\u5217\u578b\u3068\u3057\u3066\u8868\u73fe\u3055\u308c\u308b\u3002 Struct \u8907\u5408\u578b\u3068\u3057\u3066\u8868\u73fe\u3055\u308c\u308b\u3002\u5bfe\u5fdc\u3059\u308b\u8907\u5408\u578b\u306f\u4e88\u3081\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002 FixedSizeBinary byteWidth \u5c5e\u6027\u306e\u5024\u306b\u5fdc\u3058\u3066 char(n) \u3068\u3057\u3066\u8868\u73fe\u3055\u308c\u308b\u3002 \u30e1\u30bf\u30c7\u30fc\u30bf pg_type=TYPENAME \u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u8a72\u5f53\u3059\u308b\u30c7\u30fc\u30bf\u578b\u3092\u5272\u308a\u5f53\u3066\u308b\u5834\u5408\u304c\u3042\u308b\u3002\u73fe\u6642\u70b9\u3067\u306f\u3001 inet \u304a\u3088\u3073 macaddr \u578b\u3002 Union \u3001 Map \u3001 Duration \u3001 LargeBinary \u3001 LargeUtf8 \u3001 LargeList \u73fe\u6642\u70b9\u3067\u306fPostgreSQL\u30c7\u30fc\u30bf\u578b\u3078\u306e\u5bfe\u5fdc\u306f\u306a\u3057\u3002","title":"\u30c7\u30fc\u30bf\u578b\u306e\u5bfe\u5fdc"},{"location":"arrow_fdw/#explain","text":"EXPLAIN \u30b3\u30de\u30f3\u30c9\u3092\u7528\u3044\u3066\u3001Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u51fa\u3057\u306b\u95a2\u3059\u308b\u60c5\u5831\u3092\u51fa\u529b\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u7d04503GB\u306e\u5927\u304d\u3055\u3092\u6301\u3064Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092\u30de\u30c3\u30d7\u3057\u305ff_lineorder\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u542b\u3080\u30af\u30a8\u30ea\u5b9f\u884c\u8a08\u753b\u306e\u51fa\u529b\u3067\u3059\u3002 =# EXPLAIN SELECT sum(lo_extendedprice*lo_discount) as revenue FROM f_lineorder,date1 WHERE lo_orderdate = d_datekey AND d_year = 1993 AND lo_discount between 1 and 3 AND lo_quantity < 25; QUERY PLAN -------------------------------------------------------------------------------- Aggregate (cost=14535261.08..14535261.09 rows=1 width=8) -> Custom Scan (GpuPreAgg) on f_lineorder (cost=14535261.06..14535261.07 rows=1 width=32) GPU Projection: pgstrom.psum(((f_lineorder.lo_extendedprice * f_lineorder.lo_discount))::bigint) GPU Scan Quals: ((f_lineorder.lo_discount >= 1) AND (f_lineorder.lo_discount <= 3) AND (f_lineorder.lo_quantity < 25)) [rows: 5999990000 -> 9999983] GPU Join Quals [1]: (f_lineorder.lo_orderdate = date1.d_datekey) ... [nrows: 9999983 -> 1428010] GPU Outer Hash [1]: f_lineorder.lo_orderdate GPU Inner Hash [1]: date1.d_datekey referenced: lo_orderdate, lo_quantity, lo_extendedprice, lo_discount file0: /opt/nvme/f_lineorder_s999.arrow (read: 89.41GB, size: 502.92GB) GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 (cost=0.00..78.95 rows=365 width=4) Filter: (d_year = 1993) (12 rows) \u3053\u308c\u3092\u898b\u308b\u3068Custom Scan (GpuPreAgg)\u304c f_lineorder \u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u3066\u3044\u308b\u4e8b\u304c\u308f\u304b\u308a\u307e\u3059\u3002 file0 \u306b\u306f\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u80cc\u5f8c\u306b\u3042\u308b\u30d5\u30a1\u30a4\u30eb\u540d /opt/nvme/f_lineorder_s999.arrow \u3068\u305d\u306e\u30b5\u30a4\u30ba\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u8907\u6570\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u30de\u30c3\u30d7\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306b\u306f\u3001 file1 \u3001 file2 \u3001... \u3068\u5404\u30d5\u30a1\u30a4\u30eb\u6bce\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002 referenced \u306b\u306f\u5b9f\u969b\u306b\u53c2\u7167\u3055\u308c\u3066\u3044\u308b\u5217\u306e\u4e00\u89a7\u304c\u5217\u6319\u3055\u308c\u3066\u304a\u308a\u3001\u3053\u306e\u30af\u30a8\u30ea\u306b\u304a\u3044\u3066\u306f lo_orderdate \u3001 lo_quantity \u3001 lo_extendedprice \u304a\u3088\u3073 lo_discount \u5217\u304c\u53c2\u7167\u3055\u308c\u3066\u3044\u308b\u4e8b\u304c\u308f\u304b\u308a\u307e\u3059\u3002 \u307e\u305f\u3001 GPU-Direct SQL: enabled (GPU-0) \u306e\u8868\u793a\u304c\u3042\u308b\u4e8b\u304b\u3089\u3001 f_lineorder \u306e\u30b9\u30ad\u30e3\u30f3\u306b\u306fGPU-Direct SQL\u6a5f\u69cb\u304c\u7528\u3044\u3089\u308c\u308b\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3059\u3002 VERBOSE\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4ed8\u4e0e\u3059\u308b\u4e8b\u3067\u3001\u3088\u308a\u8a73\u7d30\u306a\u60c5\u5831\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002 =# EXPLAIN VERBOSE SELECT sum(lo_extendedprice*lo_discount) as revenue FROM f_lineorder,date1 WHERE lo_orderdate = d_datekey AND d_year = 1993 AND lo_discount between 1 and 3 AND lo_quantity < 25; QUERY PLAN -------------------------------------------------------------------------------- Aggregate (cost=14535261.08..14535261.09 rows=1 width=8) Output: pgstrom.sum_int((pgstrom.psum(((f_lineorder.lo_extendedprice * f_lineorder.lo_discount))::bigint))) -> Custom Scan (GpuPreAgg) on public.f_lineorder (cost=14535261.06..14535261.07 rows=1 width=32) Output: (pgstrom.psum(((f_lineorder.lo_extendedprice * f_lineorder.lo_discount))::bigint)) GPU Projection: pgstrom.psum(((f_lineorder.lo_extendedprice * f_lineorder.lo_discount))::bigint) GPU Scan Quals: ((f_lineorder.lo_discount >= 1) AND (f_lineorder.lo_discount <= 3) AND (f_lineorder.lo_quantity < 25)) [rows: 5999990000 -> 9999983] GPU Join Quals [1]: (f_lineorder.lo_orderdate = date1.d_datekey) ... [nrows: 9999983 -> 1428010] GPU Outer Hash [1]: f_lineorder.lo_orderdate GPU Inner Hash [1]: date1.d_datekey referenced: lo_orderdate, lo_quantity, lo_extendedprice, lo_discount file0: /opt/nvme/f_lineorder_s999.arrow (read: 89.41GB, size: 502.92GB) lo_orderdate: 22.35GB lo_quantity: 22.35GB lo_extendedprice: 22.35GB lo_discount: 22.35GB GPU-Direct SQL: enabled (GPU-0) KVars-Slot: , , , , , KVecs-Buffer: nbytes: 51200, ndims: 3, items=[kvec0=<0x0000-27ff, type='int4', expr='lo_discount'>, kvec1=<0x2800-4fff, type='int4', expr='lo_quantity'>, kvec2=<0x5000-77ff, type='int4', expr='lo_extendedprice'>, kvec3=<0x7800-9fff, type='int4', expr='lo_orderdate'>, kvec4=<0xa000-c7ff, type='int4', expr='d_datekey'>] LoadVars OpCode: {Packed items[0]={LoadVars(depth=0): kvars=[, , , ]}, items[1]={LoadVars(depth=1): kvars=[]}} MoveVars OpCode: {Packed items[0]={MoveVars(depth=0): items=[, , ]}}, items[1]={MoveVars(depth=1): items=[, ]}}} Scan Quals OpCode: {Bool::AND args=[{Func(bool)::int4ge args=[{Var(int4): slot=0, expr='lo_discount'}, {Const(int4): value='1'}]}, {Func(bool)::int4le args=[{Var(int4): slot=0, expr='lo_discount'}, {Const(int4): value='3'}]}, {Func(bool)::int4lt args=[{Var(int4): slot=1, expr='lo_quantity'}, {Const(int4): value='25'}]}]} Join Quals OpCode: {Packed items[1]={JoinQuals: {Func(bool)::int4eq args=[{Var(int4): kvec=0x7800-a000, expr='lo_orderdate'}, {Var(int4): slot=5, expr='d_datekey'}]}}} Join HashValue OpCode: {Packed items[1]={HashValue arg={Var(int4): kvec=0x7800-a000, expr='lo_orderdate'}}} Partial Aggregation OpCode: {AggFuncs arg={SaveExpr: arg={Func(int8)::int8 arg={Func(int4)::int4mul args=[{Var(int4): kvec=0x5000-7800, expr='lo_extendedprice'}, {Var(int4): kvec=0x0000-2800, expr='lo_discount'}]}}}} Partial Function BufSz: 16 -> Seq Scan on public.date1 (cost=0.00..78.95 rows=365 width=4) Output: date1.d_datekey Filter: (date1.d_year = 1993) (28 rows) \u88ab\u53c2\u7167\u5217\u3092\u30ed\u30fc\u30c9\u3059\u308b\u969b\u306b\u8aad\u307f\u51fa\u3059\u3079\u304d\u5217\u30c7\u30fc\u30bf\u306e\u5927\u304d\u3055\u3092\u3001\u5217\u3054\u3068\u306b\u8868\u793a\u3057\u3066\u3044\u307e\u3059\u3002 lo_orderdate \u3001 lo_quantity \u3001 lo_extendedprice \u304a\u3088\u3073 lo_discount \u5217\u306e\u30ed\u30fc\u30c9\u306b\u306f\u5408\u8a08\u306789.41GB\u306e\u8aad\u307f\u51fa\u3057\u304c\u5fc5\u8981\u3067\u3001\u3053\u308c\u306f\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba502.93GB\u306e17.8%\u306b\u76f8\u5f53\u3057\u307e\u3059\u3002","title":"EXPLAIN\u51fa\u529b\u306e\u8aad\u307f\u65b9"},{"location":"arrow_fdw/#arrow","text":"\u672c\u7bc0\u3067\u306f\u3001\u65e2\u306bPostgreSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u3092Apache Arrow\u5f62\u5f0f\u306b\u5909\u63db\u3059\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002","title":"Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210\u65b9\u6cd5"},{"location":"arrow_fdw/#pyarrowpandas","text":"Arrow\u958b\u767a\u8005\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u304c\u958b\u767a\u3092\u884c\u3063\u3066\u3044\u308b PyArrow \u30e2\u30b8\u30e5\u30fc\u30eb\u3068Pandas\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306e\u7d44\u5408\u305b\u3092\u7528\u3044\u3066\u3001PostgreSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u5185\u5bb9\u3092Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3078\u3068\u66f8\u304d\u51fa\u3059\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u30c6\u30fc\u30d6\u30ebt0\u306b\u683c\u7d0d\u3055\u308c\u305f\u30c7\u30fc\u30bf\u3092\u5168\u3066\u8aad\u8fbc\u307f\u3001\u30d5\u30a1\u30a4\u30eb/tmp/t0.arrow\u3078\u3068\u66f8\u304d\u51fa\u3059\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002 import pyarrow as pa import pandas as pd X = pd.read_sql(sql=\"SELECT * FROM t0\", con=\"postgresql://localhost/postgres\") Y = pa.Table.from_pandas(X) f = pa.RecordBatchFileWriter('/tmp/t0.arrow', Y.schema) f.write_table(Y,1000000) # RecordBatch for each million rows f.close() \u305f\u3060\u3057\u4e0a\u8a18\u306e\u65b9\u6cd5\u306f\u3001SQL\u3092\u4ecb\u3057\u3066PostgreSQL\u304b\u3089\u8aad\u307f\u51fa\u3057\u305f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u5185\u5bb9\u3092\u4e00\u5ea6\u30e1\u30e2\u30ea\u306b\u4fdd\u6301\u3059\u308b\u305f\u3081\u3001\u5927\u91cf\u306e\u884c\u3092\u4e00\u5ea6\u306b\u5909\u63db\u3059\u308b\u5834\u5408\u306b\u306f\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002","title":"PyArrow+Pandas"},{"location":"arrow_fdw/#pg2arrow","text":"\u4e00\u65b9\u3001PG-Strom Development Team\u304c\u958b\u767a\u3092\u884c\u3063\u3066\u3044\u308b pg2arrow \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u3001PostgreSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u5185\u5bb9\u3092Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3078\u3068\u66f8\u304d\u51fa\u3059\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u3053\u306e\u30c4\u30fc\u30eb\u306f\u6bd4\u8f03\u7684\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092NVME-SSD\u306a\u3069\u30b9\u30c8\u30ec\u30fc\u30b8\u306b\u66f8\u304d\u51fa\u3059\u4e8b\u3092\u5ff5\u982d\u306b\u8a2d\u8a08\u3055\u308c\u3066\u304a\u308a\u3001PostgreSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089 -s|--segment-size \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3057\u305f\u30b5\u30a4\u30ba\u306e\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u3059\u305f\u3073\u306b\u3001Arrow\u5f62\u5f0f\u306e\u30ec\u30b3\u30fc\u30c9\u30d0\u30c3\u30c1\uff08Record Batch\uff09\u3068\u3057\u3066\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u51fa\u3057\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30e1\u30e2\u30ea\u6d88\u8cbb\u91cf\u306f\u6bd4\u8f03\u7684\u30ea\u30fc\u30ba\u30ca\u30d6\u30eb\u306a\u5024\u3068\u306a\u308a\u307e\u3059\u3002 pg2arrow \u30b3\u30de\u30f3\u30c9\u306fPG-Strom\u306b\u540c\u68b1\u3055\u308c\u3066\u304a\u308a\u3001PostgreSQL\u95a2\u9023\u30b3\u30de\u30f3\u30c9\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u683c\u7d0d\u3055\u308c\u307e\u3059\u3002 $ pg2arrow --help Usage: pg2arrow [OPTION] [database] [username] General options: -d, --dbname=DBNAME Database name to connect to -c, --command=COMMAND SQL command to run -t, --table=TABLENAME Equivalent to '-c SELECT * FROM TABLENAME' (-c and -t are exclusive, either of them must be given) --inner-join=SUB_COMMAND --outer-join=SUB_COMMAND -o, --output=FILENAME result file in Apache Arrow format --append=FILENAME result Apache Arrow file to be appended (--output and --append are exclusive. If neither of them are given, it creates a temporary file.) -S, --stat[=COLUMNS] embeds min/max statistics for each record batch COLUMNS is a comma-separated list of the target columns if partially enabled. Arrow format options: -s, --segment-size=SIZE size of record batch for each Connection options: -h, --host=HOSTNAME database server host -p, --port=PORT database server port -u, --user=USERNAME database user name -w, --no-password never prompt for password -W, --password force password prompt Other options: --dump=FILENAME dump information of arrow file --progress shows progress of the job --set=NAME:VALUE config option to set before SQL execution --help shows this message Report bugs to . PostgreSQL\u3078\u306e\u63a5\u7d9a\u30d1\u30e9\u30e1\u30fc\u30bf\u306fpsql\u3084pg_dump\u3068\u540c\u69d8\u306b\u3001 -h \u3084 -U \u306a\u3069\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002 \u57fa\u672c\u7684\u306a\u30b3\u30de\u30f3\u30c9\u306e\u4f7f\u7528\u65b9\u6cd5\u306f\u3001 -c|--command \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3057\u305fSQL\u3092PostgreSQL\u4e0a\u3067\u5b9f\u884c\u3057\u3001\u305d\u306e\u7d50\u679c\u3092 -o|--output \u3067\u6307\u5b9a\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3078Arrow\u5f62\u5f0f\u3067\u66f8\u304d\u51fa\u3057\u307e\u3059\u3002 -o|--output \u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u4ee3\u308f\u308a\u306b --append \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u3001\u3053\u308c\u306f\u65e2\u5b58\u306eApache Arrow\u30d5\u30a1\u30a4\u30eb\u3078\u306e\u8ffd\u8a18\u3092\u610f\u5473\u3057\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001\u8ffd\u8a18\u3055\u308c\u308bApache Arrow\u30d5\u30a1\u30a4\u30eb\u306f\u6307\u5b9a\u3057\u305fSQL\u306e\u5b9f\u884c\u7d50\u679c\u3068\u5b8c\u5168\u306b\u4e00\u81f4\u3059\u308b\u30b9\u30ad\u30fc\u30de\u69cb\u9020\u3092\u6301\u305f\u306d\u3070\u306a\u308a\u307e\u305b\u3093\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u30c6\u30fc\u30d6\u30eb t0 \u306b\u683c\u7d0d\u3055\u308c\u305f\u30c7\u30fc\u30bf\u3092\u5168\u3066\u8aad\u8fbc\u307f\u3001\u30d5\u30a1\u30a4\u30eb /tmp/t0.arrow \u3078\u3068\u66f8\u304d\u51fa\u3059\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002 $ pg2arrow -U kaigai -d postgres -c \"SELECT * FROM t0\" -o /tmp/t0.arrow \u958b\u767a\u8005\u5411\u3051\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3059\u304c\u3001 --dump \u3067Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u3084\u30ec\u30b3\u30fc\u30c9\u30d0\u30c3\u30c1\u306e\u4f4d\u7f6e\u3068\u30b5\u30a4\u30ba\u3092\u53ef\u8aad\u306a\u5f62\u5f0f\u3067\u51fa\u529b\u3059\u308b\u4e8b\u3082\u3067\u304d\u307e\u3059\u3002 --progress \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3059\u308b\u3068\u3001\u51e6\u7406\u306e\u9014\u4e2d\u7d4c\u904e\u3092\u8868\u793a\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002\u3053\u308c\u306f\u5de8\u5927\u306a\u30c6\u30fc\u30d6\u30eb\u3092Apache Arrow\u5f62\u5f0f\u306b\u5909\u63db\u3059\u308b\u969b\u306b\u6709\u7528\u3067\u3059\u3002","title":"Pg2Arrow"},{"location":"arrow_fdw/#_6","text":"","title":"\u5148\u9032\u7684\u306a\u4f7f\u3044\u65b9"},{"location":"arrow_fdw/#ssdtogpusql","text":"Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u30de\u30c3\u30d7\u3055\u308c\u305f\u5168\u3066\u306eArrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u304c\u4ee5\u4e0b\u306e\u6761\u4ef6\u3092\u6e80\u305f\u3059\u5834\u5408\u306b\u306f\u3001\u5217\u30c7\u30fc\u30bf\u306e\u8aad\u307f\u51fa\u3057\u306bSSD-to-GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u3092\u4f7f\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u304cNVME-SSD\u533a\u753b\u4e0a\u306b\u7f6e\u304b\u308c\u3066\u3044\u308b\u3002 NVME-SSD\u533a\u753b\u306fExt4\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3067\u69cb\u7bc9\u3055\u308c\u3066\u3044\u308b\u3002 Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u7dcf\u8a08\u304c pg_strom.nvme_strom_threshold \u8a2d\u5b9a\u3092\u4e0a\u56de\u3063\u3066\u3044\u308b\u3002","title":"SSDtoGPU\u30c0\u30a4\u30ec\u30af\u30c8SQL"},{"location":"arrow_fdw/#_7","text":"Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u4e00\u90e8\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u901a\u5e38\u306ePostgreSQL\u30c6\u30fc\u30d6\u30eb\u3068\u6df7\u5728\u3059\u308b\u4e8b\u3082\u53ef\u80fd\u3067\u3059\u304c\u3001Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306f\u66f8\u304d\u8fbc\u307f\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u4e8b\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u307e\u305f\u3001\u30de\u30c3\u30d7\u3055\u308c\u305fArrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306b\u542b\u307e\u308c\u308b\u30c7\u30fc\u30bf\u306f\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u5883\u754c\u6761\u4ef6\u3068\u77db\u76fe\u3057\u306a\u3044\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u7ba1\u7406\u8005\u306e\u8cac\u4efb\u3067\u3059\u3002 \u5178\u578b\u7684\u306a\u5229\u7528\u30b7\u30fc\u30f3\u306f\u3001\u9577\u671f\u9593\u306b\u308f\u305f\u308a\u84c4\u7a4d\u3057\u305f\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u51e6\u7406\u3067\u3059\u3002 \u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u30c7\u30fc\u30bf\u3068\u7570\u306a\u308a\u3001\u4e00\u822c\u7684\u306b\u30ed\u30b0\u30c7\u30fc\u30bf\u306f\u4e00\u5ea6\u8a18\u9332\u3055\u308c\u305f\u3089\u305d\u306e\u5f8c\u66f4\u65b0\u524a\u9664\u3055\u308c\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u3057\u305f\u304c\u3063\u3066\u3001\u4e00\u5b9a\u671f\u9593\u304c\u7d4c\u904e\u3057\u305f\u30ed\u30b0\u30c7\u30fc\u30bf\u306f\u3001\u8aad\u307f\u51fa\u3057\u5c02\u7528\u3067\u306f\u3042\u308b\u3082\u306e\u306e\u96c6\u8a08\u51e6\u7406\u304c\u9ad8\u901f\u306aArrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u79fb\u3057\u66ff\u3048\u308b\u3053\u3068\u3067\u3001\u96c6\u8a08\u30fb\u89e3\u6790\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u51e6\u7406\u52b9\u7387\u3092\u5f15\u304d\u4e0a\u3052\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u30ed\u30b0\u30c7\u30fc\u30bf\u306b\u306f\u307b\u307c\u9593\u9055\u3044\u306a\u304f\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u304c\u4ed8\u4e0e\u3055\u308c\u3066\u3044\u308b\u4e8b\u304b\u3089\u3001\u6708\u5358\u4f4d\u3001\u9031\u5358\u4f4d\u306a\u3069\u3001\u4e00\u5b9a\u671f\u9593\u3054\u3068\u306b\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u3092\u8ffd\u52a0\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001PostgreSQL\u30c6\u30fc\u30d6\u30eb\u3068Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3092\u6df7\u5728\u3055\u305b\u305f\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u3092\u5b9a\u7fa9\u3057\u305f\u3082\u306e\u3067\u3059\u3002 \u66f8\u304d\u8fbc\u307f\u304c\u53ef\u80fd\u306aPostgreSQL\u30c6\u30fc\u30d6\u30eb\u3092\u30c7\u30d5\u30a9\u30eb\u30c8\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3068\u3057\u3066\u6307\u5b9a\u3057\u3066\u304a\u304f\u4e8b\u3067\u3001\u4e00\u5b9a\u671f\u9593\u306e\u7d4c\u904e\u5f8c\u3001DB\u904b\u7528\u3092\u7d99\u7d9a\u3057\u306a\u304c\u3089\u904e\u53bb\u306e\u30ed\u30b0\u30c7\u30fc\u30bf\u3060\u3051\u3092Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3078\u79fb\u3059\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 CREATE TABLE lineorder ( lo_orderkey numeric, lo_linenumber integer, lo_custkey numeric, lo_partkey integer, lo_suppkey numeric, lo_orderdate integer, lo_orderpriority character(15), lo_shippriority character(1), lo_quantity numeric, lo_extendedprice numeric, lo_ordertotalprice numeric, lo_discount numeric, lo_revenue numeric, lo_supplycost numeric, lo_tax numeric, lo_commit_date character(8), lo_shipmode character(10) ) PARTITION BY RANGE (lo_orderdate); CREATE TABLE lineorder__now PARTITION OF lineorder default; CREATE FOREIGN TABLE lineorder__1993 PARTITION OF lineorder FOR VALUES FROM (19930101) TO (19940101) SERVER arrow_fdw OPTIONS (file '/opt/tmp/lineorder_1993.arrow'); CREATE FOREIGN TABLE lineorder__1994 PARTITION OF lineorder FOR VALUES FROM (19940101) TO (19950101) SERVER arrow_fdw OPTIONS (file '/opt/tmp/lineorder_1994.arrow'); CREATE FOREIGN TABLE lineorder__1995 PARTITION OF lineorder FOR VALUES FROM (19950101) TO (19960101) SERVER arrow_fdw OPTIONS (file '/opt/tmp/lineorder_1995.arrow'); CREATE FOREIGN TABLE lineorder__1996 PARTITION OF lineorder FOR VALUES FROM (19960101) TO (19970101) SERVER arrow_fdw OPTIONS (file '/opt/tmp/lineorder_1996.arrow'); \u3053\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3059\u308b\u554f\u3044\u5408\u308f\u305b\u306e\u5b9f\u884c\u8a08\u753b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 \u691c\u7d22\u6761\u4ef6 lo_orderdate between 19950701 and 19960630 \u304c\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u5883\u754c\u6761\u4ef6\u3092\u542b\u3093\u3067\u3044\u308b\u4e8b\u304b\u3089\u3001\u5b50\u30c6\u30fc\u30d6\u30eb lineorder__1993 \u3068 lineorder__1994 \u306f\u691c\u7d22\u5bfe\u8c61\u304b\u3089\u6392\u9664\u3055\u308c\u3001\u4ed6\u306e\u30c6\u30fc\u30d6\u30eb\u3060\u3051\u3092\u8aad\u307f\u51fa\u3059\u3088\u3046\u5b9f\u884c\u8a08\u753b\u304c\u4f5c\u3089\u308c\u3066\u3044\u307e\u3059\u3002 =# EXPLAIN SELECT sum(lo_extendedprice*lo_discount) as revenue FROM lineorder,date1 WHERE lo_orderdate = d_datekey AND lo_orderdate between 19950701 and 19960630 AND lo_discount between 1 and 3 ABD lo_quantity < 25; QUERY PLAN -------------------------------------------------------------------------------- Aggregate (cost=172088.90..172088.91 rows=1 width=32) -> Hash Join (cost=10548.86..172088.51 rows=77 width=64) Hash Cond: (lineorder__1995.lo_orderdate = date1.d_datekey) -> Append (cost=10444.35..171983.80 rows=77 width=67) -> Custom Scan (GpuScan) on lineorder__1995 (cost=10444.35..33671.87 rows=38 width=68) GPU Filter: ((lo_orderdate >= 19950701) AND (lo_orderdate <= 19960630) AND (lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) referenced: lo_orderdate, lo_quantity, lo_extendedprice, lo_discount files0: /opt/tmp/lineorder_1995.arrow (size: 892.57MB) -> Custom Scan (GpuScan) on lineorder__1996 (cost=10444.62..33849.21 rows=38 width=68) GPU Filter: ((lo_orderdate >= 19950701) AND (lo_orderdate <= 19960630) AND (lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) referenced: lo_orderdate, lo_quantity, lo_extendedprice, lo_discount files0: /opt/tmp/lineorder_1996.arrow (size: 897.87MB) -> Custom Scan (GpuScan) on lineorder__now (cost=11561.33..104462.33 rows=1 width=18) GPU Filter: ((lo_orderdate >= 19950701) AND (lo_orderdate <= 19960630) AND (lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) -> Hash (cost=72.56..72.56 rows=2556 width=4) -> Seq Scan on date1 (cost=0.00..72.56 rows=2556 width=4) (16 rows) \u3053\u306e\u5f8c\u3001 lineorder__now \u30c6\u30fc\u30d6\u30eb\u304b\u30891997\u5e74\u306e\u30c7\u30fc\u30bf\u3092\u629c\u304d\u51fa\u3057\u3001\u3053\u308c\u3092Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u5074\u306b\u79fb\u3059\u306b\u306f\u4ee5\u4e0b\u306e\u64cd\u4f5c\u3092\u884c\u3044\u307e\u3059 $ pg2arrow -d sample -o /opt/tmp/lineorder_1997.arrow \\ -c \"SELECT * FROM lineorder WHERE lo_orderdate between 19970101 and 19971231\" pg2arrow \u30b3\u30de\u30f3\u30c9\u306b\u3088\u308a\u3001 lineorder \u30c6\u30fc\u30d6\u30eb\u304b\u30891997\u5e74\u306e\u30c7\u30fc\u30bf\u3060\u3051\u3092\u629c\u304d\u51fa\u3057\u3066\u3001\u65b0\u3057\u3044Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3078\u66f8\u304d\u51fa\u3057\u307e\u3059\u3002 BEGIN; -- -- remove rows in 1997 from the read-writable table -- DELETE FROM lineorder WHERE lo_orderdate BETWEEN 19970101 AND 19971231; -- -- define a new partition leaf which maps log-data in 1997 -- CREATE FOREIGN TABLE lineorder__1997 PARTITION OF lineorder FOR VALUES FROM (19970101) TO (19980101) SERVER arrow_fdw OPTIONS (file '/opt/tmp/lineorder_1997.arrow'); COMMIT; \u3053\u306e\u64cd\u4f5c\u306b\u3088\u308a\u3001PostgreSQL\u30c6\u30fc\u30d6\u30eb\u3067\u3042\u308b lineorder__now \u304b\u30891997\u5e74\u306e\u30c7\u30fc\u30bf\u3092\u524a\u9664\u3057\u3001\u4ee3\u308f\u308a\u306b\u540c\u4e00\u5185\u5bb9\u306eArrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb /opt/tmp/lineorder_1997.arrow \u3092\u5916\u90e8\u30c6\u30fc\u30d6\u30eb lineorder__1997 \u3068\u3057\u3066\u30de\u30c3\u30d7\u3057\u307e\u3057\u305f\u3002 \u6b63\u78ba\u306b\u306f\u30014KB\uff5e32KB\u306e\u7bc4\u56f2\u3067\u30d3\u30eb\u30c9\u6642\u306b\u6307\u5b9a\u3067\u304d\u307e\u3059 \u21a9","title":"\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u8a2d\u5b9a"},{"location":"brin/","text":"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5bfe\u5fdc \u6982\u8981 PostgreSQL\u306f\u4f55\u7a2e\u985e\u304b\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5f62\u5f0f\u306b\u5bfe\u5fdc\u3057\u3066\u304a\u308a\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u9078\u629e\u3055\u308c\u308bB-tree\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u7279\u5b9a\u306e\u5024\u3092\u6301\u3064\u30ec\u30b3\u30fc\u30c9\u3092\u9ad8\u901f\u306b\u691c\u7d22\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002\u3053\u308c\u4ee5\u5916\u306b\u3082\u3001Hash\u3001BRIN\u3001GiST\u3001GIN\u306a\u3069\u7279\u6027\u306e\u7570\u306a\u308b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5f62\u5f0f\u304c\u63d0\u4f9b\u3055\u308c\u3066\u304a\u308a\u3001\u73fe\u5728\u306e\u3068\u3053\u308dPG-Strom\u306fBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u306e\u307f\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002 BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u3001\u6642\u7cfb\u5217\u30c7\u30fc\u30bf\u306b\u304a\u3051\u308b\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u5024\u306a\u3069\u3001\u7269\u7406\u7684\u306b\u8fd1\u508d\u306b\u4f4d\u7f6e\u3059\u308b\u30ec\u30b3\u30fc\u30c9\u540c\u58eb\u304c\u8fd1\u3057\u3044\u5024\u3092\u6301\u3063\u3066\u3044\u308b\u4e8b\u304c\u671f\u5f85\u3067\u304d\u308b\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u5bfe\u3057\u3066\u6709\u52b9\u306b\u4f5c\u7528\u3057\u307e\u3059\u3002\u672c\u6765\u306f\u5168\u4ef6\u30b9\u30ad\u30e3\u30f3\u304c\u5fc5\u8981\u306a\u64cd\u4f5c\u3067\u3042\u3063\u3066\u3082\u3001\u660e\u3089\u304b\u306b\u6761\u4ef6\u53e5\u306b\u30de\u30c3\u30c1\u3057\u306a\u3044\u9818\u57df\u3092\u8aad\u307f\u98db\u3070\u3057\u3001\u5168\u4ef6\u30b9\u30ad\u30e3\u30f3\u306b\u4f34\u3046I/O\u91cf\u3092\u524a\u6e1b\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 PG-Strom\u306b\u304a\u3044\u3066\u3082BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u7279\u6027\u3092\u6d3b\u7528\u3057\u3001GPU\u306b\u30ed\u30fc\u30c9\u3059\u3079\u304d\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u306e\u3046\u3061\u660e\u3089\u304b\u306b\u4e0d\u8981\u3067\u3042\u308b\u3082\u306e\u3092\u8aad\u307f\u98db\u3070\u3059\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002 \u8a2d\u5b9a BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u7279\u5225\u306a\u8a2d\u5b9a\u306f\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002 CREATE INDEX\u69cb\u6587\u3092\u7528\u3044\u3066\u5bfe\u8c61\u5217\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u304a\u308a\u3001\u304b\u3064\u3001\u691c\u7d22\u6761\u4ef6\u304cBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u9069\u5408\u3059\u308b\u3082\u306e\u3067\u3042\u308c\u3070\u81ea\u52d5\u7684\u306b\u9069\u7528\u3055\u308c\u307e\u3059\u3002 BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u81ea\u4f53\u306e\u8aac\u660e\u306f\u3001 PostgreSQL\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8 \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u4ee5\u4e0b\u306eGUC\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3088\u308a\u3001PG-Strom\u304cBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002\u30c7\u30d0\u30c3\u30b0\u3084\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u5834\u5408\u3092\u9664\u304d\u3001\u901a\u5e38\u306f\u521d\u671f\u8a2d\u5b9a\u306e\u307e\u307e\u3067\u69cb\u3044\u307e\u305b\u3093\u3002 \u30d1\u30e9\u30e1\u30fc\u30bf\u540d \u578b \u521d\u671f\u5024 \u8aac\u660e pg_strom.enable_brin bool on BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002 \u64cd\u4f5c EXPLAIN \u69cb\u6587\u306b\u3088\u308aBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 postgres=# EXPLAIN ANALYZE SELECT * FROM dt WHERE ymd BETWEEN '2018-01-01' AND '2018-12-31' AND cat LIKE '%aaa%'; QUERY PLAN -------------------------------------------------------------------------------- Custom Scan (GpuScan) on dt (cost=94810.93..176275.00 rows=169992 width=44) (actual time=1777.819..1901.537 rows=175277 loops=1) GPU Filter: ((ymd >= '2018-01-01'::date) AND (ymd <= '2018-12-31'::date) AND (cat ~~ '%aaa%'::text)) Rows Removed by GPU Filter: 4385491 BRIN cond: ((ymd >= '2018-01-01'::date) AND (ymd <= '2018-12-31'::date)) BRIN skipped: 424704 Planning time: 0.529 ms Execution time: 2323.063 ms (7 rows) \u4e0a\u8a18\u306e\u4f8b\u3067\u306f ymd \u5217\u306bBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u304a\u308a\u3001 BRIN cond \u306e\u8868\u793a\u306fBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u3088\u308b\u7d5e\u308a\u8fbc\u307f\u6761\u4ef6\u3092\u3001 BRIN skipped \u306e\u8868\u793a\u306fBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u3088\u308a\u5b9f\u969b\u306b\u8aad\u307f\u98db\u3070\u3055\u308c\u305f\u30d6\u30ed\u30c3\u30af\u306e\u6570\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002 \u3053\u306e\u4f8b\u3067\u306f424704\u30d6\u30ed\u30c3\u30af\u304c\u8aad\u307f\u98db\u3070\u3055\u308c\u3001\u3055\u3089\u306b\u3001\u8aad\u307f\u8fbc\u3093\u3060\u30d6\u30ed\u30c3\u30af\u306b\u542b\u307e\u308c\u3066\u3044\u308b\u30ec\u30b3\u30fc\u30c9\u306e\u3046\u30614385491\u884c\u304c\u6761\u4ef6\u53e5\u306b\u3088\u3063\u3066\u30d5\u30a3\u30eb\u30bf\u3055\u308c\u305f\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 \u30c7\u30fc\u30bf\u8ee2\u9001\u306e\u30ed\u30b9\u3092\u6e1b\u3089\u3059\u305f\u3081\u3001GpuJoin\u3084GpuPreAgg\u304c\u76f4\u4e0b\u306e\u30c6\u30fc\u30d6\u30eb\u30b9\u30ad\u30e3\u30f3\u3092\u5f15\u304d\u4e0a\u3052\u3001\u81ea\u3089\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u51e6\u7406\u3092\u884c\u3046\u4e8b\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3067\u3082\u3001BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u5229\u7528\u53ef\u80fd\u3067\u3042\u308c\u3070\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u3088\u308b\u7d5e\u308a\u8fbc\u307f\u3092\u884c\u3044\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001GROUP BY\u3092\u542b\u3080\u51e6\u7406\u3067BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u30b1\u30fc\u30b9\u3067\u3059\u3002 postgres=# EXPLAIN ANALYZE SELECT cat,count(*) FROM dt WHERE ymd BETWEEN '2018-01-01' AND '2018-12-31' GROUP BY cat; QUERY PLAN -------------------------------------------------------------------------------- GroupAggregate (cost=6149.78..6151.86 rows=26 width=12) (actual time=427.482..427.499 rows=26 loops=1) Group Key: cat -> Sort (cost=6149.78..6150.24 rows=182 width=12) (actual time=427.465..427.467 rows=26 loops=1) Sort Key: cat Sort Method: quicksort Memory: 26kB -> Custom Scan (GpuPreAgg) on dt (cost=6140.68..6142.95 rows=182 width=12) (actual time=427.331..427.339 rows=26 loops=1) Reduction: Local Outer Scan: dt (cost=4000.00..4011.99 rows=4541187 width=4) (actual time=78.573..415.961 rows=4560768 loops=1) Outer Scan Filter: ((ymd >= '2018-01-01'::date) AND (ymd <= '2018-12-31'::date)) Rows Removed by Outer Scan Filter: 15564 BRIN cond: ((ymd >= '2018-01-01'::date) AND (ymd <= '2018-12-31'::date)) BRIN skipped: 424704 Planning time: 30.992 ms Execution time: 818.994 ms (14 rows)","title":"BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9"},{"location":"brin/#_1","text":"","title":"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5bfe\u5fdc"},{"location":"brin/#_2","text":"PostgreSQL\u306f\u4f55\u7a2e\u985e\u304b\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5f62\u5f0f\u306b\u5bfe\u5fdc\u3057\u3066\u304a\u308a\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u9078\u629e\u3055\u308c\u308bB-tree\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u7279\u5b9a\u306e\u5024\u3092\u6301\u3064\u30ec\u30b3\u30fc\u30c9\u3092\u9ad8\u901f\u306b\u691c\u7d22\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002\u3053\u308c\u4ee5\u5916\u306b\u3082\u3001Hash\u3001BRIN\u3001GiST\u3001GIN\u306a\u3069\u7279\u6027\u306e\u7570\u306a\u308b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5f62\u5f0f\u304c\u63d0\u4f9b\u3055\u308c\u3066\u304a\u308a\u3001\u73fe\u5728\u306e\u3068\u3053\u308dPG-Strom\u306fBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u306e\u307f\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002 BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u3001\u6642\u7cfb\u5217\u30c7\u30fc\u30bf\u306b\u304a\u3051\u308b\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u5024\u306a\u3069\u3001\u7269\u7406\u7684\u306b\u8fd1\u508d\u306b\u4f4d\u7f6e\u3059\u308b\u30ec\u30b3\u30fc\u30c9\u540c\u58eb\u304c\u8fd1\u3057\u3044\u5024\u3092\u6301\u3063\u3066\u3044\u308b\u4e8b\u304c\u671f\u5f85\u3067\u304d\u308b\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u5bfe\u3057\u3066\u6709\u52b9\u306b\u4f5c\u7528\u3057\u307e\u3059\u3002\u672c\u6765\u306f\u5168\u4ef6\u30b9\u30ad\u30e3\u30f3\u304c\u5fc5\u8981\u306a\u64cd\u4f5c\u3067\u3042\u3063\u3066\u3082\u3001\u660e\u3089\u304b\u306b\u6761\u4ef6\u53e5\u306b\u30de\u30c3\u30c1\u3057\u306a\u3044\u9818\u57df\u3092\u8aad\u307f\u98db\u3070\u3057\u3001\u5168\u4ef6\u30b9\u30ad\u30e3\u30f3\u306b\u4f34\u3046I/O\u91cf\u3092\u524a\u6e1b\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 PG-Strom\u306b\u304a\u3044\u3066\u3082BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u7279\u6027\u3092\u6d3b\u7528\u3057\u3001GPU\u306b\u30ed\u30fc\u30c9\u3059\u3079\u304d\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u306e\u3046\u3061\u660e\u3089\u304b\u306b\u4e0d\u8981\u3067\u3042\u308b\u3082\u306e\u3092\u8aad\u307f\u98db\u3070\u3059\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002","title":"\u6982\u8981"},{"location":"brin/#_3","text":"BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u7279\u5225\u306a\u8a2d\u5b9a\u306f\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002 CREATE INDEX\u69cb\u6587\u3092\u7528\u3044\u3066\u5bfe\u8c61\u5217\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u304a\u308a\u3001\u304b\u3064\u3001\u691c\u7d22\u6761\u4ef6\u304cBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u9069\u5408\u3059\u308b\u3082\u306e\u3067\u3042\u308c\u3070\u81ea\u52d5\u7684\u306b\u9069\u7528\u3055\u308c\u307e\u3059\u3002 BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u81ea\u4f53\u306e\u8aac\u660e\u306f\u3001 PostgreSQL\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8 \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u4ee5\u4e0b\u306eGUC\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3088\u308a\u3001PG-Strom\u304cBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002\u30c7\u30d0\u30c3\u30b0\u3084\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u5834\u5408\u3092\u9664\u304d\u3001\u901a\u5e38\u306f\u521d\u671f\u8a2d\u5b9a\u306e\u307e\u307e\u3067\u69cb\u3044\u307e\u305b\u3093\u3002 \u30d1\u30e9\u30e1\u30fc\u30bf\u540d \u578b \u521d\u671f\u5024 \u8aac\u660e pg_strom.enable_brin bool on BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002","title":"\u8a2d\u5b9a"},{"location":"brin/#_4","text":"EXPLAIN \u69cb\u6587\u306b\u3088\u308aBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 postgres=# EXPLAIN ANALYZE SELECT * FROM dt WHERE ymd BETWEEN '2018-01-01' AND '2018-12-31' AND cat LIKE '%aaa%'; QUERY PLAN -------------------------------------------------------------------------------- Custom Scan (GpuScan) on dt (cost=94810.93..176275.00 rows=169992 width=44) (actual time=1777.819..1901.537 rows=175277 loops=1) GPU Filter: ((ymd >= '2018-01-01'::date) AND (ymd <= '2018-12-31'::date) AND (cat ~~ '%aaa%'::text)) Rows Removed by GPU Filter: 4385491 BRIN cond: ((ymd >= '2018-01-01'::date) AND (ymd <= '2018-12-31'::date)) BRIN skipped: 424704 Planning time: 0.529 ms Execution time: 2323.063 ms (7 rows) \u4e0a\u8a18\u306e\u4f8b\u3067\u306f ymd \u5217\u306bBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u304a\u308a\u3001 BRIN cond \u306e\u8868\u793a\u306fBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u3088\u308b\u7d5e\u308a\u8fbc\u307f\u6761\u4ef6\u3092\u3001 BRIN skipped \u306e\u8868\u793a\u306fBRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u3088\u308a\u5b9f\u969b\u306b\u8aad\u307f\u98db\u3070\u3055\u308c\u305f\u30d6\u30ed\u30c3\u30af\u306e\u6570\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002 \u3053\u306e\u4f8b\u3067\u306f424704\u30d6\u30ed\u30c3\u30af\u304c\u8aad\u307f\u98db\u3070\u3055\u308c\u3001\u3055\u3089\u306b\u3001\u8aad\u307f\u8fbc\u3093\u3060\u30d6\u30ed\u30c3\u30af\u306b\u542b\u307e\u308c\u3066\u3044\u308b\u30ec\u30b3\u30fc\u30c9\u306e\u3046\u30614385491\u884c\u304c\u6761\u4ef6\u53e5\u306b\u3088\u3063\u3066\u30d5\u30a3\u30eb\u30bf\u3055\u308c\u305f\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 \u30c7\u30fc\u30bf\u8ee2\u9001\u306e\u30ed\u30b9\u3092\u6e1b\u3089\u3059\u305f\u3081\u3001GpuJoin\u3084GpuPreAgg\u304c\u76f4\u4e0b\u306e\u30c6\u30fc\u30d6\u30eb\u30b9\u30ad\u30e3\u30f3\u3092\u5f15\u304d\u4e0a\u3052\u3001\u81ea\u3089\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u51e6\u7406\u3092\u884c\u3046\u4e8b\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3067\u3082\u3001BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u5229\u7528\u53ef\u80fd\u3067\u3042\u308c\u3070\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u3088\u308b\u7d5e\u308a\u8fbc\u307f\u3092\u884c\u3044\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001GROUP BY\u3092\u542b\u3080\u51e6\u7406\u3067BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u30b1\u30fc\u30b9\u3067\u3059\u3002 postgres=# EXPLAIN ANALYZE SELECT cat,count(*) FROM dt WHERE ymd BETWEEN '2018-01-01' AND '2018-12-31' GROUP BY cat; QUERY PLAN -------------------------------------------------------------------------------- GroupAggregate (cost=6149.78..6151.86 rows=26 width=12) (actual time=427.482..427.499 rows=26 loops=1) Group Key: cat -> Sort (cost=6149.78..6150.24 rows=182 width=12) (actual time=427.465..427.467 rows=26 loops=1) Sort Key: cat Sort Method: quicksort Memory: 26kB -> Custom Scan (GpuPreAgg) on dt (cost=6140.68..6142.95 rows=182 width=12) (actual time=427.331..427.339 rows=26 loops=1) Reduction: Local Outer Scan: dt (cost=4000.00..4011.99 rows=4541187 width=4) (actual time=78.573..415.961 rows=4560768 loops=1) Outer Scan Filter: ((ymd >= '2018-01-01'::date) AND (ymd <= '2018-12-31'::date)) Rows Removed by Outer Scan Filter: 15564 BRIN cond: ((ymd >= '2018-01-01'::date) AND (ymd <= '2018-12-31'::date)) BRIN skipped: 424704 Planning time: 30.992 ms Execution time: 818.994 ms (14 rows)","title":"\u64cd\u4f5c"},{"location":"fluentd/","text":"Fluentd\u9023\u643a \u672c\u7ae0\u3067\u306f\u3001Apache Arrow\u30c7\u30fc\u30bf\u5f62\u5f0f\u3092\u4ecb\u3057\u305fFluentd\u3068\u306e\u9023\u643a\u3068\u3001IoT/M2M\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u52b9\u7387\u7684\u306a\u53d6\u308a\u8fbc\u307f\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u6982\u8981 IoT/M2M\u3068\u3088\u3070\u308c\u308b\u6280\u8853\u9818\u57df\u306b\u304a\u3044\u3066\u306f\u3001PC\u3084\u30b5\u30fc\u30d0\u3060\u3051\u3067\u306a\u304f\u3001\u643a\u5e2f\u96fb\u8a71\u3084\u81ea\u52d5\u8eca\u3001\u5404\u7a2e\u30bb\u30f3\u30b5\u30fc\u306a\u3069\u306e\u30c7\u30d0\u30a4\u30b9\u304c\u751f\u6210\u3057\u305f\u5927\u91cf\u306e\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u84c4\u7a4d\u3057\u3001\u3053\u308c\u3092\u5206\u6790\u3059\u308b\u305f\u3081\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u304c\u6570\u591a\u304f\u958b\u767a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u5927\u91cf\u306e\u30c7\u30d0\u30a4\u30b9\u304c\u6642\u3005\u523b\u3005\u3068\u751f\u6210\u3059\u308b\u30c7\u30fc\u30bf\u306f\u975e\u5e38\u306b\u5927\u304d\u306a\u30b5\u30a4\u30ba\u306b\u306a\u308a\u304c\u3061\u3067\u3001\u3053\u308c\u3092\u5b9f\u7528\u7684\u306a\u6642\u9593\u5185\u306b\u51e6\u7406\u3059\u308b\u306b\u306f\u3001\u7279\u5225\u306a\u5de5\u592b\u304c\u5fc5\u8981\u3068\u306a\u308b\u304b\u3089\u3067\u3059\u3002 PG-Strom\u306e\u5404\u7a2e\u6a5f\u80fd\u306f\u3001\u3053\u3046\u3044\u3063\u305f\u898f\u6a21\u306e\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u9ad8\u901f\u306b\u51e6\u7406\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u30fb\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u3057\u304b\u3057\u4e00\u65b9\u3067\u3001\u3053\u3046\u3057\u305f\u898f\u6a21\u306e\u30c7\u30fc\u30bf\u306e\u691c\u7d22\u30fb\u96c6\u8a08\u304c\u53ef\u80fd\u306a\u72b6\u614b\u306b\u3059\u308b\u305f\u3081\u306b\u30c7\u30fc\u30bf\u3092\u79fb\u9001\u3057\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u53d6\u308a\u8fbc\u3080\u306b\u306f\u6642\u9593\u304c\u304b\u304b\u308a\u304c\u3061\u3067\u3059\u3002 \u305d\u3053\u3067\u3001PG-Strom\u306b\u306fFluentd\u5411\u3051\u306bApache Arrow\u5f62\u5f0f\u3067\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b fluent-plugin-arrow-file \u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u540c\u68b1\u3057\u3001\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u30a4\u30f3\u30dd\u30fc\u30c8\u3068\u3044\u3046\u554f\u984c\u306b\u5bfe\u51e6\u3092\u8a66\u307f\u3066\u3044\u307e\u3059\u3002 Fluentd\u306f\u53e4\u6a4b\u8c9e\u4e4b\u6c0f\u306b\u3088\u3063\u3066\u958b\u767a\u3055\u308c\u305f\u30ed\u30b0\u53ce\u96c6\u30c4\u30fc\u30eb\u3067\u3001Syslog\u306e\u3088\u3046\u306a\u30b5\u30fc\u30d0\u30ed\u30b0\u304b\u3089IoT/M2M\u6a5f\u5668\u306e\u30c7\u30d0\u30a4\u30b9\u30ed\u30b0\u306b\u81f3\u308b\u307e\u3067\u3001\u591a\u7a2e\u591a\u69d8\u306a\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u96c6\u7a4d\u30fb\u4fdd\u5b58\u3059\u308b\u305f\u3081\u306b\u4e8b\u5b9f\u4e0a\u306e\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u3068\u3057\u3066\u5229\u7528\u3055\u308c\u3066\u3044\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3067\u3059\u3002 Ruby\u3067\u8a18\u8ff0\u3055\u308c\u305f\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8ffd\u52a0\u306b\u3088\u308a\u3001\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u5165\u51fa\u529b\u3084\u52a0\u5de5\u3092\u81ea\u5728\u306b\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u30012022\u5e74\u73fe\u5728\u3001800\u7a2e\u985e\u3092\u8d8a\u3048\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u516c\u5f0fWeb\u30b5\u30a4\u30c8\u3067\u7d39\u4ecb\u3055\u308c\u3066\u3044\u307e\u3059\u3002 PG-Strom\u304c\u53d6\u308a\u6271\u3046\u3053\u3068\u306e\u3067\u304d\u308b\u30c7\u30fc\u30bf\u5f62\u5f0f\u306f\u3001PostgreSQL Heap\u5f62\u5f0f\uff08\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30ca\u30eb\u884c\u30c7\u30fc\u30bf\uff09\u3068Apache Arrow\u5f62\u5f0f\uff08\u69cb\u9020\u5316\u5217\u30c7\u30fc\u30bf\uff09\u306e\uff12\u7a2e\u985e\u3067\u3059\u304c\u3001IoT/M2M\u9818\u57df\u3067\u60f3\u5b9a\u3055\u308c\u308b\u3088\u3046\u306a\u3001\u6642\u3005\u523b\u3005\u3068\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u304c\u767a\u751f\u3059\u308b\u3088\u3046\u306a\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u5bfe\u3057\u3066\u306f\u3001Apache Arrow\u5f62\u5f0f\u3092\u7528\u3044\u305f\u65b9\u304c\u5408\u7406\u7684\u3067\u3059\u3002 arrow-file \u30d7\u30e9\u30b0\u30a4\u30f3 \u4ee5\u4e0b\u3067\u306f\u3001Fluentd\u304c\u53ce\u96c6\u3057\u305f\u30ed\u30b0\u30c7\u30fc\u30bf\u3092Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u51fa\u529b\u3057\u3001\u3053\u308c\u3092PG-Strom\u3067\u53c2\u7167\u3059\u308b\u3068\u3044\u3046\u30a2\u30d7\u30ed\u30fc\u30c1\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u307e\u305f\u3001Fluentd\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u306f\u3001Treasure Data\u793e\u306e\u63d0\u4f9b\u3059\u308b\u5b89\u5b9a\u7248 td-agent \u3092\u4f7f\u7528\u3059\u308b\u3082\u306e\u3068\u3057\u307e\u3059\u3002 PG-Strom\u306b\u540c\u68b1\u306eFluentd\u5411\u3051Output\u30d7\u30e9\u30b0\u30a4\u30f3\u306e fluent-plugin-arrow-file \u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u5229\u7528\u3059\u308b\u3068\u3001Fluentd\u304c\u53ce\u96c6\u3057\u305f\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u3001\u6307\u5b9a\u3057\u305f\u30b9\u30ad\u30fc\u30de\u69cb\u9020\u3092\u6301\u3064Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u66f8\u304d\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002PG-Strom\u306eArrow_Fdw\u6a5f\u80fd\u3092\u4f7f\u7528\u3059\u308c\u3070\u3053\u306eApache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3068\u3057\u3066\u53c2\u7167\u3059\u308b\u4e8b\u304c\u3067\u304d\u3001\u307e\u305f\u4fdd\u5b58\u5148\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u304c\u9069\u5207\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308c\u3070\u3001GPU-Direct SQL\u3092\u7528\u3044\u305f\u9ad8\u901f\u306a\u8aad\u307f\u51fa\u3057\u3082\u53ef\u80fd\u3067\u3059\u3002 \u3053\u306e\u65b9\u6cd5\u306b\u306f\u4ee5\u4e0b\u306e\u30e1\u30ea\u30c3\u30c8\u304c\u3042\u308a\u307e\u3059\u3002 - Fluentd \u304c\u51fa\u529b\u3057\u305f\u30c7\u30fc\u30bf\u3092\u305d\u306e\u307e\u307ePG-Strom\u3067\u8aad\u307f\u51fa\u305b\u308b\u305f\u3081\u3001\u6539\u3081\u3066DB\u3078\u30c7\u30fc\u30bf\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044\u3002 - \u5217\u30c7\u30fc\u30bf\u5f62\u5f0f\u3067\u3042\u308b\u305f\u3081\u3001\u691c\u7d22\u30fb\u96c6\u8a08\u51e6\u7406\u306b\u4f34\u3046\u30c7\u30fc\u30bf\u306e\u8aad\u307f\u51fa\u3057\uff08I/O\u8ca0\u8377\uff09\u3092\u5fc5\u8981\u6700\u5c0f\u9650\u306b\u6291\u3048\u308b\u4e8b\u304c\u3067\u304d\u308b\u3002 - \u53e4\u304f\u306a\u3063\u305f\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u3082\u3001OS\u4e0a\u306e\u30d5\u30a1\u30a4\u30eb\u79fb\u52d5\u306e\u307f\u3067\u5b8c\u4e86\u3067\u304d\u308b\u3002 \u4e00\u65b9\u3067\u3001Apache Arrow\u5f62\u5f0f\u3067\u6027\u80fd\u4e0a\u306e\u30e1\u30ea\u30c3\u30c8\u3092\u5f97\u308b\u306b\u306f\u3001Record Batch\u306e\u30b5\u30a4\u30ba\u3092\u3042\u308b\u7a0b\u5ea6\u5927\u304d\u304f\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u305f\u3081\u3001\u30ed\u30b0\u306e\u767a\u751f\u983b\u5ea6\u304c\u5c0f\u3055\u304f\u3001\u4e00\u5b9a\u30b5\u30a4\u30ba\u306e\u30ed\u30b0\u304c\u6e9c\u307e\u308b\u307e\u3067\u306b\u6642\u9593\u306e\u304b\u304b\u308b\u5834\u5408\u306b\u306f\u3001PostgreSQL\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u51fa\u529b\u3055\u305b\u308b\u306a\u3069\u3001\u5225\u306e\u65b9\u6cd5\u3092\u8a66\u3057\u305f\u65b9\u304c\u3088\u308a\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306b\u8fd1\u3044\u30ed\u30b0\u5206\u6790\u304c\u53ef\u80fd\u3067\u3057\u3087\u3046\u3002 \u5185\u90e8\u69cb\u9020 Fluentd\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u306f\u3044\u304f\u3064\u304b\u30ab\u30c6\u30b4\u30ea\u304c\u3042\u308a\u3001\u5916\u90e8\u304b\u3089\u30ed\u30b0\u3092\u53d7\u3051\u53d6\u308bInput\u30d7\u30e9\u30b0\u30a4\u30f3\u3001\u30ed\u30b0\u3092\u6210\u5f62\u3059\u308bParser\u30d7\u30e9\u30b0\u30a4\u30f3\u3001\u53d7\u4fe1\u3057\u305f\u30ed\u30b0\u3092\u4e00\u6642\u7684\u306b\u84c4\u7a4d\u3059\u308bBuffer\u30d7\u30e9\u30b0\u30a4\u30f3\u3001\u30ed\u30b0\u3092\u51fa\u529b\u3059\u308bOutput\u30d7\u30e9\u30b0\u30a4\u30f3\u3001\u306a\u3069\u306e\u7a2e\u985e\u304c\u3042\u308a\u307e\u3059\u3002 arrow-file\u306fOutput\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u4e00\u3064\u3067\u3059\u304c\u3001\u3053\u308c\u306fBuffer\u30d7\u30e9\u30b0\u30a4\u30f3\u304b\u3089\u6e21\u3055\u308c\u305f\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u56fa\u307e\u308a(chunk)\u3092\u3001\u30b3\u30f3\u30d5\u30a3\u30b0\u3067\u6307\u5b9a\u3055\u308c\u305f\u30b9\u30ad\u30fc\u30de\u69cb\u9020\u3092\u6301\u3064Apache Arrow\u5f62\u5f0f\u3067\u66f8\u304d\u51fa\u3059\u5f79\u5272\u3092\u62c5\u3063\u3066\u3044\u307e\u3059\u3002 Input/Parser\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u5f79\u5272\u306f\u3001\u5916\u90e8\u304b\u3089\u53d7\u3051\u53d6\u3063\u305f\u30ed\u30b0\u3092\u5171\u901a\u306e\u5f62\u5f0f\u306b\u5909\u63db\u3057\u3001Buffer\u30d7\u30e9\u30b0\u30a4\u30f3\u3084Output\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u5165\u529b\u30c7\u30fc\u30bf\u306e\u5f62\u5f0f\u3092\u610f\u8b58\u3059\u308b\u3053\u3068\u306a\u304f\u6271\u3048\u308b\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u3067\u3059\u3002 \u3053\u308c\u306f\u5185\u90e8\u7684\u306b\u306f\u3001\u30ed\u30b0\u306e\u632f\u308a\u5206\u3051\u306b\u5229\u7528\u3059\u308b\u3053\u3068\u306e\u3067\u304d\u308b\u8b58\u5225\u5b50\u306e tag \u3001\u30ed\u30b0\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7 time \u3001\u304a\u3088\u3073\u751f\u30ed\u30b0\u3092\u6210\u5f62\u3057\u305f\u9023\u60f3\u914d\u5217\u3067\u3042\u308b record \u306e\u7d44\u3067\u3059\u3002 arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u3001 tag \u3001 time \u306e\u5404\u30d5\u30a3\u30fc\u30eb\u30c9\u3068\u3001 record \u9023\u60f3\u914d\u5217\u306e\u5404\u8981\u7d20\uff08\u4e00\u90e8\u3092\u7701\u7565\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\uff09\u3092\u5217\u3068\u3057\u3066\u6301\u3064Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3078\u306e\u66f8\u304d\u51fa\u3057\u3092\u884c\u3044\u307e\u3059\u3002 \u305d\u306e\u305f\u3081\u3001\u51fa\u529b\u5148\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u3068\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u60c5\u5831\uff08\u9023\u60f3\u914d\u5217\u306e\u8981\u7d20\u3068\u5217/\u578b\u306e\u30de\u30c3\u30d4\u30f3\u30b0\uff09\u306f\u5fc5\u9808\u306e\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u3067\u3059\u3002 \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u4f7f\u7528\u3057\u3066\u3044\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u7528\u306e td-agent \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 \u307e\u305f\u3001arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u306f rake-compiler \u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u306e\u3067\u3001\u4e88\u3081\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304d\u307e\u3059\u3002 \u8a73\u3057\u304f\u306f \u3053\u3061\u3089 \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 $ curl -L https://toolbelt.treasuredata.com/sh/install-redhat-td-agent4.sh | sh $ sudo /opt/td-agent/bin/fluent-gem install rake-compiler \u6b21\u306b\u3001PG-Strom\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3001 fluentd \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u306e\u7269\u4ef6\u3092\u30d3\u30eb\u30c9\u3057\u307e\u3059\u3002 $ git clone https://github.com/heterodb/pg-strom.git $ cd pg-strom/fluentd $ make TD_AGENT=1 gem $ sudo make TD_AGENT=1 install Fluentd\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u4e8b\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 $ /opt/td-agent/bin/fluent-gem list | grep arrow fluent-plugin-arrow-file (0.2) \u8a2d\u5b9a \u524d\u8ff0\u306e\u901a\u308a\u3001arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u52d5\u4f5c\u3055\u305b\u308b\u306b\u306f\u3001\u51fa\u529b\u5148\u306e\u30d1\u30b9\u540d\u3068\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u6700\u4f4e\u9650\u5fc5\u8981\u3067\u3059\u3002 \u3053\u308c\u306b\u52a0\u3048\u3066\u3001Apache Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u69cb\u9020\u4e0a\u3001Record Batch\u3068\u547c\u3070\u308c\u308b\u30c7\u30fc\u30bf\u306e\u56fa\u307e\u308a\u306f\u3042\u308b\u7a0b\u5ea6\u5927\u304d\u306a\u30b5\u30a4\u30ba\u3067\u533a\u5207\u3063\u3066\u304a\u3044\u305f\u65b9\u304c\u3001\u691c\u7d22\u30fb\u96c6\u8a08\u51e6\u7406\u3092\u884c\u3046\u969b\u306e\u51e6\u7406\u6027\u80fd\u3092\u5f15\u304d\u51fa\u3057\u3084\u3059\u3044\u3067\u3059\u3002 arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u3001Buffer\u30d7\u30e9\u30b0\u30a4\u30f3\u304b\u3089\u6e21\u3055\u308c\u308bchunk\u3054\u3068\u306bRecord Batch\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u3001Buffer\u30d7\u30e9\u30b0\u30a4\u30f3\u5074\u306e\u30d0\u30c3\u30d5\u30a1\u30b5\u30a4\u30ba\u306f\u3053\u308c\u306b\u6e96\u3058\u305f\u8a2d\u5b9a\u3092\u884c\u3046\u3079\u304d\u3067\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f 256MB \u306e\u30d0\u30c3\u30d5\u30a1\u30b5\u30a4\u30ba\u3092\u53d6\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002 arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 path [type: String ] (\u5fc5\u9808\u30d1\u30e9\u30e1\u30fc\u30bf) arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u30ed\u30b0\u3092\u51fa\u529b\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u3053\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306f\u5fc5\u9808\u3067\u3001\u4ee5\u4e0b\u306e\u66f8\u5f0f\u6587\u5b57\u3092\u542b\u3081\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u66f8\u5f0f \u8aac\u660e %Y \u73fe\u5728\u306e\u5e74\u3092\u897f\u66a64\u6841\u3067\u8868\u73fe\u3057\u305f\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %y \u73fe\u5728\u306e\u5e74\u306e\u897f\u66a6\u4e0b2\u6841\u3067\u8868\u73fe\u3057\u305f\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %m \u73fe\u5728\u306e\u6708\u3092 01\uff5e12 \u3067\u8868\u3057\u305f2\u6841\u306e\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %d \u73fe\u5728\u306e\u65e5\u3092 01\uff5e31 \u3067\u8868\u3057\u305f2\u6841\u306e\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %H \u73fe\u5728\u6642\u523b\u306e\u6642\u309200\uff5e23\u3067\u8868\u3057\u305f2\u6841\u306e\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %M \u73fe\u5728\u6642\u523b\u306e\u5206\u309200\uff5e59\u3067\u8868\u3057\u305f2\u6841\u306e\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %S \u73fe\u5728\u6642\u523b\u306e\u79d2\u309200\uff5e59\u3067\u8868\u3057\u305f2\u6841\u306e\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %p \u73fe\u5728\u306e Fluentd \u30d7\u30ed\u30bb\u30b9\u306ePID\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 \u66f8\u5f0f\u6587\u5b57\u5217\u306f\u30c1\u30e3\u30f3\u30af\u3092\u66f8\u304d\u51fa\u3059\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u8a55\u4fa1\u3055\u308c\u3001\u540c\u540d\u306eApache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u306b\u306f\u3001Record Batch\u3092\u8ffd\u8a18\u3057\u307e\u3059\u3002\u5b58\u5728\u3057\u306a\u3044\u5834\u5408\u306fApache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092\u65b0\u898f\u4f5c\u6210\u3057\u3001\u6700\u521d\u306eRecord Batch\u3092\u66f8\u304d\u51fa\u3057\u307e\u3059\u3002 \u305f\u3060\u3057\u3001\u65e2\u5b58\u306eApache Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u30b5\u30a4\u30ba\u304c\u5f8c\u8ff0\u306e filesize_threshold \u8a2d\u5b9a\u5024\u3092\u8d8a\u3048\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u65e2\u5b58\u30d5\u30a1\u30a4\u30eb\u3092\u30ea\u30cd\u30fc\u30e0\u3057\u305f\u5f8c\u3001\u65b0\u898f\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \uff08\u4f8b\uff09`path /tmp/arrow_logs/my_logs_%y%m%d.%p.log` \u51fa\u529b\u5148\u306eApache Arrow\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u30c1\u30e3\u30f3\u30af\u3092\u66f8\u304d\u51fa\u3059\u305f\u3073\u306b\u30d5\u30c3\u30bf\u9818\u57df\u3092\u66f4\u65b0\u3057\u3066\u5168\u3066\u306eRecord Batch\u3092\u30dd\u30a4\u30f3\u30c8\u3057\u307e\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u751f\u6210\u3055\u308c\u305fApache Arrow\u30d5\u30a1\u30a4\u30eb\u306f\u5373\u5ea7\u306b\u8aad\u307f\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c\u3001\u30a2\u30af\u30bb\u30b9\u7af6\u5408\u3092\u907f\u3051\u308b\u305f\u3081\u306b\u306f lockf(3) \u3092\u7528\u3044\u3066\u6392\u4ed6\u51e6\u7406\u3092\u884c\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 schema_defs [type: String ] (\u5fc5\u9808\u30d1\u30e9\u30e1\u30fc\u30bf) fluent-plugin-arrow-file \u304c\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b\u969b\u306e\u3001Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u3053\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306f\u5fc5\u9808\u3067\u3001\u4ee5\u4e0b\u306e\u5f62\u5f0f\u3067\u8a18\u8ff0\u3055\u308c\u305f\u6587\u5b57\u5217\u306b\u3088\u308a\u30b9\u30ad\u30fc\u30de\u69cb\u9020\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002 schema_defs := column_def1[,column_def2 ...] column_def := =[;] \u306f\u5217\u306e\u540d\u524d\u3067\u3059\u3002Fluentd\u304b\u3089arrow-file\u306b\u6e21\u3055\u308c\u308b\u9023\u60f3\u914d\u5217\u306e\u30ad\u30fc\u5024\u3068\u4e00\u81f4\u3057\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u306f\u5217\u306e\u30c7\u30fc\u30bf\u578b\u3067\u3059\u3002\u4ee5\u4e0b\u306e\u8868\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u306f\u5217\u306e\u4ed8\u52a0\u5c5e\u6027\u3067\u3059\u3002\u73fe\u6642\u70b9\u3067\u306f\u4ee5\u4e0b\u306e\u5c5e\u6027\u306e\u307f\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002 stat_enabled ... \u5217\u306e\u7d71\u8a08\u60c5\u5831\u3092\u53ce\u96c6\u3057\u3001Record Batch\u3054\u3068\u306e\u6700\u5927\u5024/\u6700\u5c0f\u5024\u3092 max_values=... \u304a\u3088\u3073 min_values=... \u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30c7\u30fc\u30bf\u3068\u3057\u3066\u57cb\u3081\u8fbc\u307f\u307e\u3059\u3002 \uff08\u4f8b\uff09 schema_defs \"ts=Timestamp;stat_enabled,dev_id=Uint32,temperature=Float32,humidity=Float32\" arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u30c7\u30fc\u30bf\u578b \u30c7\u30fc\u30bf\u578b \u8aac\u660e Int8 Int16 Int32 Int64 \u7b26\u53f7\u4ed8\u304d\u6574\u6570\u578b\u3067\u3001\u305d\u308c\u305e\u308c\u6307\u5b9a\u3057\u305f\u30d3\u30c3\u30c8\u5e45\u3092\u6301\u3061\u307e\u3059\u3002 Uint8 Uint16 Uint32 Uint64 \u7b26\u53f7\u306a\u3057\u6574\u6570\u578b\u3067\u3001\u305d\u308c\u305e\u308c\u6307\u5b9a\u3057\u305f\u30d3\u30c3\u30c8\u5e45\u3092\u6301\u3061\u307e\u3059\u3002 Float16 Float32 Float64 \u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u3067\u3001\u305d\u308c\u305e\u308c\u534a\u7cbe\u5ea6(16bit)\u3001\u5358\u7cbe\u5ea6(32bit)\u3001\u500d\u7cbe\u5ea6(64bit)\u306e\u5e45\u3092\u6301\u3061\u307e\u3059\u3002 Decimal Decimal128 128bit\u56fa\u5b9a\u5c0f\u6570\u70b9\u578b\u3067\u3059\u3002256bit\u56fa\u5b9a\u5c0f\u6570\u70b9\u578b\u306f\u73fe\u5728\u672a\u30b5\u30dd\u30fc\u30c8\u3067\u3059\u3002 Timestamp Timestamp[sec] Timestamp[ms] Timestamp[us] Timestamp[ns] \u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u578b\u3067\u3059\u3002\u7cbe\u5ea6\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u7701\u7565\u3057\u305f\u5834\u5408\u306f\u6697\u9ed9\u306b [us] \u3092\u4ed8\u52a0\u3057\u305f\u3082\u306e\u3068\u3057\u3066\u6271\u308f\u308c\u307e\u3059\u3002 Time Time[sec] Time[ms] Time[us] Time[ns] \u6642\u523b\u578b\u3067\u3059\u3002\u7cbe\u5ea6\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u7701\u7565\u3057\u305f\u5834\u5408\u306f\u6697\u9ed9\u306b [sec] \u3092\u4ed8\u52a0\u3057\u305f\u3082\u306e\u3068\u3057\u3066\u6271\u308f\u308c\u307e\u3059\u3002 Date Date[Day] Date[ms] \u65e5\u4ed8\u578b\u3067\u3059\u3002\u7cbe\u5ea6\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u7701\u7565\u3057\u305f\u5834\u5408\u306f\u6697\u9ed9\u306b [day] \u3092\u4ed8\u52a0\u3057\u305f\u3082\u306e\u3068\u3057\u3066\u6271\u308f\u308c\u307e\u3059\u3002 Utf8 \u6587\u5b57\u5217\u578b\u3067\u3059\u3002 Ipaddr4 IPv4\u30a2\u30c9\u30ec\u30b9\u578b\u3067\u3059\u3002\u5b9f\u969b\u306b\u306f byteWidth=4 \u3067\u3042\u308b FixedSizeBinary \u578b\u306b\u3001 pg_type=pg_catalog.inet \u3068\u3044\u3046\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u4ed8\u4e0e\u3057\u307e\u3059\u3002 Ipaddr6 IPv6\u30a2\u30c9\u30ec\u30b9\u578b\u3067\u3059\u3002\u5b9f\u969b\u306b\u306f byteWidth=16 \u3067\u3042\u308b FixedSizeBinary \u578b\u306b\u3001 pg_type=pg_catalog.inet \u3068\u3044\u3046\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u4ed8\u4e0e\u3057\u307e\u3059\u3002 ts_column [type: String / default: \u306a\u3057] \u6307\u5b9a\u3057\u305f\u5217\u306e\u5024\u3092\uff08 record \u9023\u60f3\u914d\u5217\u304b\u3089\u3067\u306f\u306a\u304f\uff09Fluentd\u304b\u3089\u6e21\u3055\u308c\u305f\u30ed\u30b0\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u5024\u3088\u308a\u53d6\u5f97\u3057\u307e\u3059\u3002 \u901a\u5e38\u3001\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3059\u308b\u5217\u306f Timestamp \u306a\u3069\u306e\u65e5\u4ed8\u6642\u523b\u578b\u3092\u6301\u3063\u3066\u304a\u308a\u3001\u307e\u305f stat_enabled \u5c5e\u6027\u3068\u4f75\u7528\u3059\u308b\u3053\u3068\u3067\u691c\u7d22\u51e6\u7406\u306e\u9ad8\u901f\u5316\u304c\u671f\u5f85\u3067\u304d\u307e\u3059\u3002 tag_column [type: String / default: \u306a\u3057] \u6307\u5b9a\u3057\u305f\u5217\u306e\u5024\u3092\uff08 record \u9023\u60f3\u914d\u5217\u304b\u3089\u3067\u306f\u306a\u304f\uff09Fluentd\u304b\u3089\u6e21\u3055\u308c\u305f\u30ed\u30b0\u306e\u30bf\u30b0\u5024\u3088\u308a\u53d6\u5f97\u3057\u307e\u3059\u3002 \u901a\u5e38\u3001\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3059\u308b\u5217\u306f Utf8 \u306a\u3069\u306e\u6587\u5b57\u5217\u578b\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002 filesize_threshold [type: Integer / default: 10000] fluent-plugin-arrow-file \u304c\u51fa\u529b\u5148\u30d5\u30a1\u30a4\u30eb\u3092\u5207\u308a\u66ff\u3048\u308b\u95be\u5024\u3092MB\u5358\u4f4d\u3067\u8a2d\u5b9a\u3057\u307e\u3059\u3002 \u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u304c\u7d0410GB\u3092\u8d8a\u3048\u305f\u8fba\u308a\u3067\u51fa\u529b\u5148\u3092\u5207\u308a\u66ff\u3048\u307e\u3059\u3002 \u4f7f\u7528\u4f8b \u7c21\u5358\u306a\u4f8b\u3068\u3057\u3066\u3001\u30ed\u30fc\u30ab\u30eb\u306eApache Httpd\u30b5\u30fc\u30d0\u306e\u30ed\u30b0\u3092\u76e3\u8996\u3057\u3001\u305d\u308c\u3092\u30d5\u30a3\u30fc\u30eb\u30c9\u6bce\u306b\u30d1\u30fc\u30b9\u3057\u3066Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002 \u3067 /var/log/httpd/access_log \u3092\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3068\u3057\u3066\u6307\u5b9a\u3057\u3066\u3044\u308b\u307b\u304b\u3001 apache2 \u306eParse\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u7528\u3044\u3066\u3001host, user, time, method, path, code, size, referer, agent\u306e\u5404\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u5207\u308a\u51fa\u3057\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u3089\u306farrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u9023\u60f3\u914d\u5217\u3068\u3057\u3066\u6e21\u3055\u308c\u3001 \u5185\u306e schema_defs \u306b\u306f\u3001\u3053\u308c\u3089\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u5bfe\u5fdc\u3059\u308bApache Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u5217\u5b9a\u7fa9\u3092\u8a18\u8ff0\u3057\u3066\u3044\u307e\u3059\u3002 \u307e\u305f\u3001\u3053\u3053\u3067\u306f\u7c21\u5358\u306a\u4f7f\u7528\u4f8b\u3092\u793a\u3059\u3053\u3068\u304c\u76ee\u7684\u3067\u3059\u306e\u3067\u3001 \u30bf\u30b0\u3067\u30c1\u30e3\u30f3\u30af\u30b5\u30a4\u30ba\u3092\u6700\u59274MB / 200\u884c\u306b\u7e2e\u5c0f\u3057\u3001\u6700\u5927\u3067\u308210\u79d2\u3067Output\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u6e21\u3059\u3088\u3046\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002 /etc/td-agent/td-agent.conf \u306e\u8a2d\u5b9a\u4f8b @type tail path /var/log/httpd/access_log pos_file /var/log/td-agent/httpd_access.pos tag httpd format apache2 @type apache2 expression /^(?[^ ]*) [^ ]* (?[^ ]*) \\[(?[^\\]]*)\\] \"(?\\S+)(?: +(?(?:[^\\\"]|\\\\.)*?)(?: +\\S*)?)?\" (?[^ ]*) (?[^ ]*)(?: \"(?(?:[^\\\"]|\\\\.)*)\" \"(?(?:[^\\\"]|\\\\.)*)\")?$/ time_format %d/%b/%Y:%H:%M:%S %z
@type arrow_file path /tmp/mytest%Y%m%d.%p.arrow schema_defs \"ts=Timestamp[sec],host=Utf8,method=Utf8,path=Utf8,code=Int32,size=Int32,referer=Utf8,agent=Utf8\" ts_column \"ts\" flush_interval 10s chunk_limit_size 4MB chunk_limit_records 200 td-agent \u3092\u8d77\u52d5\u3057\u307e\u3059\u3002 $ sudo systemctl start td-agent \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001Apache Httpd\u306e\u30ed\u30b0\u304c path \u3067\u8a2d\u5b9a\u3057\u305f /tmp/mytest%Y%m%d.%p.arrow \u304c\u5c55\u958b\u3055\u308c\u305f\u5148\u3067\u3042\u308b /tmp/mytest20220124.3206341.arrow \u306b\u66f8\u304d\u51fa\u3055\u308c\u3066\u3044\u307e\u3059\u3002 $ arrow2csv /tmp/mytest20220124.3206341.arrow --head --offset 300 --limit 10 \"ts\",\"host\",\"method\",\"path\",\"code\",\"size\",\"referer\",\"agent\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/js/theme_extra.js\",200,195,\"http://buri/docs/ja/fluentd/\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/js/theme.js\",200,4401,\"http://buri/docs/ja/fluentd/\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/img/fluentd_overview.png\",200,121459,\"http://buri/docs/ja/fluentd/\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/search/main.js\",200,3027,\"http://buri/docs/ja/fluentd/\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/fonts/Lato/lato-regular.woff2\",200,182708,\"http://buri/docs/ja/css/theme.css\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/fonts/fontawesome-webfont.woff2?v=4.7.0\",200,77160,\"http://buri/docs/ja/css/theme.css\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/fonts/RobotoSlab/roboto-slab-v7-bold.woff2\",200,67312,\"http://buri/docs/ja/css/theme.css\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/fonts/Lato/lato-bold.woff2\",200,184912,\"http://buri/docs/ja/css/theme.css\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:43\",\"192.168.77.95\",\"GET\",\"/docs/ja/search/worker.js\",200,3724,\"http://buri/docs/ja/fluentd/\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:43\",\"192.168.77.95\",\"GET\",\"/docs/ja/img/favicon.ico\",200,1150,\"http://buri/docs/ja/fluentd/\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \u3053\u308c\u3092 PG-Strom \u306eArrow_Fdw\u3092\u7528\u3044\u3066PostgreSQL\u306b\u30de\u30c3\u30d4\u30f3\u30b0\u3057\u3066\u307f\u307e\u3059\u3002 postgres=# IMPORT FOREIGN SCHEMA mytest FROM SERVER arrow_fdw INTO public OPTIONS (file '/tmp/mytest20220124.3206341.arrow'); IMPORT FOREIGN SCHEMA postgres=# SELECT ts, host, path FROM mytest WHERE code = 404; ts | host | path ---------------------+---------------+---------------------- 2022-01-24 12:02:06 | 192.168.77.73 | /~kaigai/ja/fluentd/ (1 row) postgres=# EXPLAIN SELECT ts, host, path FROM mytest WHERE code = 404; QUERY PLAN ------------------------------------------------------------------------------ Custom Scan (GpuScan) on mytest (cost=4026.12..4026.12 rows=3 width=72) GPU Filter: (code = 404) referenced: ts, host, path, code files0: /tmp/mytest20220124.3206341.arrow (read: 128.00KB, size: 133.94KB) (4 rows) \u751f\u6210\u3055\u308c\u305f Apache Arrow \u30d5\u30a1\u30a4\u30eb\u3092\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3068\u3057\u3066\u30de\u30c3\u30d4\u30f3\u30b0\u3057\u3001\u3053\u308c\u3092SQL\u304b\u3089\u53c2\u7167\u3057\u3066\u3044\u307e\u3059\u3002 Fluentd\u5074\u3067\u6210\u5f62\u3055\u308c\u305f\u30ed\u30b0\u306e\u5404\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u53c2\u7167\u3059\u308b\u691c\u7d22\u6761\u4ef6\u3092\u4e0e\u3048\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4e0a\u8a18\u306e\u4f8b\u3067\u306f\u3001HTTP\u30b9\u30c6\u30fc\u30bf\u30b9\u30b3\u30fc\u30c9404\u306e\u30ed\u30b0\u3092\u691c\u7d22\u3057\u30011\u4ef6\u304c\u30d2\u30c3\u30c8\u3057\u3066\u3044\u307e\u3059\u3002","title":"Fluentd\u9023\u643a"},{"location":"fluentd/#fluentd","text":"\u672c\u7ae0\u3067\u306f\u3001Apache Arrow\u30c7\u30fc\u30bf\u5f62\u5f0f\u3092\u4ecb\u3057\u305fFluentd\u3068\u306e\u9023\u643a\u3068\u3001IoT/M2M\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u52b9\u7387\u7684\u306a\u53d6\u308a\u8fbc\u307f\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002","title":"Fluentd\u9023\u643a"},{"location":"fluentd/#_1","text":"IoT/M2M\u3068\u3088\u3070\u308c\u308b\u6280\u8853\u9818\u57df\u306b\u304a\u3044\u3066\u306f\u3001PC\u3084\u30b5\u30fc\u30d0\u3060\u3051\u3067\u306a\u304f\u3001\u643a\u5e2f\u96fb\u8a71\u3084\u81ea\u52d5\u8eca\u3001\u5404\u7a2e\u30bb\u30f3\u30b5\u30fc\u306a\u3069\u306e\u30c7\u30d0\u30a4\u30b9\u304c\u751f\u6210\u3057\u305f\u5927\u91cf\u306e\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u84c4\u7a4d\u3057\u3001\u3053\u308c\u3092\u5206\u6790\u3059\u308b\u305f\u3081\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u304c\u6570\u591a\u304f\u958b\u767a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u5927\u91cf\u306e\u30c7\u30d0\u30a4\u30b9\u304c\u6642\u3005\u523b\u3005\u3068\u751f\u6210\u3059\u308b\u30c7\u30fc\u30bf\u306f\u975e\u5e38\u306b\u5927\u304d\u306a\u30b5\u30a4\u30ba\u306b\u306a\u308a\u304c\u3061\u3067\u3001\u3053\u308c\u3092\u5b9f\u7528\u7684\u306a\u6642\u9593\u5185\u306b\u51e6\u7406\u3059\u308b\u306b\u306f\u3001\u7279\u5225\u306a\u5de5\u592b\u304c\u5fc5\u8981\u3068\u306a\u308b\u304b\u3089\u3067\u3059\u3002 PG-Strom\u306e\u5404\u7a2e\u6a5f\u80fd\u306f\u3001\u3053\u3046\u3044\u3063\u305f\u898f\u6a21\u306e\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u9ad8\u901f\u306b\u51e6\u7406\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u30fb\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u3057\u304b\u3057\u4e00\u65b9\u3067\u3001\u3053\u3046\u3057\u305f\u898f\u6a21\u306e\u30c7\u30fc\u30bf\u306e\u691c\u7d22\u30fb\u96c6\u8a08\u304c\u53ef\u80fd\u306a\u72b6\u614b\u306b\u3059\u308b\u305f\u3081\u306b\u30c7\u30fc\u30bf\u3092\u79fb\u9001\u3057\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u53d6\u308a\u8fbc\u3080\u306b\u306f\u6642\u9593\u304c\u304b\u304b\u308a\u304c\u3061\u3067\u3059\u3002 \u305d\u3053\u3067\u3001PG-Strom\u306b\u306fFluentd\u5411\u3051\u306bApache Arrow\u5f62\u5f0f\u3067\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b fluent-plugin-arrow-file \u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u540c\u68b1\u3057\u3001\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u30a4\u30f3\u30dd\u30fc\u30c8\u3068\u3044\u3046\u554f\u984c\u306b\u5bfe\u51e6\u3092\u8a66\u307f\u3066\u3044\u307e\u3059\u3002 Fluentd\u306f\u53e4\u6a4b\u8c9e\u4e4b\u6c0f\u306b\u3088\u3063\u3066\u958b\u767a\u3055\u308c\u305f\u30ed\u30b0\u53ce\u96c6\u30c4\u30fc\u30eb\u3067\u3001Syslog\u306e\u3088\u3046\u306a\u30b5\u30fc\u30d0\u30ed\u30b0\u304b\u3089IoT/M2M\u6a5f\u5668\u306e\u30c7\u30d0\u30a4\u30b9\u30ed\u30b0\u306b\u81f3\u308b\u307e\u3067\u3001\u591a\u7a2e\u591a\u69d8\u306a\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u96c6\u7a4d\u30fb\u4fdd\u5b58\u3059\u308b\u305f\u3081\u306b\u4e8b\u5b9f\u4e0a\u306e\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u3068\u3057\u3066\u5229\u7528\u3055\u308c\u3066\u3044\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3067\u3059\u3002 Ruby\u3067\u8a18\u8ff0\u3055\u308c\u305f\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8ffd\u52a0\u306b\u3088\u308a\u3001\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u5165\u51fa\u529b\u3084\u52a0\u5de5\u3092\u81ea\u5728\u306b\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u30012022\u5e74\u73fe\u5728\u3001800\u7a2e\u985e\u3092\u8d8a\u3048\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u516c\u5f0fWeb\u30b5\u30a4\u30c8\u3067\u7d39\u4ecb\u3055\u308c\u3066\u3044\u307e\u3059\u3002 PG-Strom\u304c\u53d6\u308a\u6271\u3046\u3053\u3068\u306e\u3067\u304d\u308b\u30c7\u30fc\u30bf\u5f62\u5f0f\u306f\u3001PostgreSQL Heap\u5f62\u5f0f\uff08\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30ca\u30eb\u884c\u30c7\u30fc\u30bf\uff09\u3068Apache Arrow\u5f62\u5f0f\uff08\u69cb\u9020\u5316\u5217\u30c7\u30fc\u30bf\uff09\u306e\uff12\u7a2e\u985e\u3067\u3059\u304c\u3001IoT/M2M\u9818\u57df\u3067\u60f3\u5b9a\u3055\u308c\u308b\u3088\u3046\u306a\u3001\u6642\u3005\u523b\u3005\u3068\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u304c\u767a\u751f\u3059\u308b\u3088\u3046\u306a\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u5bfe\u3057\u3066\u306f\u3001Apache Arrow\u5f62\u5f0f\u3092\u7528\u3044\u305f\u65b9\u304c\u5408\u7406\u7684\u3067\u3059\u3002","title":"\u6982\u8981"},{"location":"fluentd/#arrow-file","text":"\u4ee5\u4e0b\u3067\u306f\u3001Fluentd\u304c\u53ce\u96c6\u3057\u305f\u30ed\u30b0\u30c7\u30fc\u30bf\u3092Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u51fa\u529b\u3057\u3001\u3053\u308c\u3092PG-Strom\u3067\u53c2\u7167\u3059\u308b\u3068\u3044\u3046\u30a2\u30d7\u30ed\u30fc\u30c1\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u307e\u305f\u3001Fluentd\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u306f\u3001Treasure Data\u793e\u306e\u63d0\u4f9b\u3059\u308b\u5b89\u5b9a\u7248 td-agent \u3092\u4f7f\u7528\u3059\u308b\u3082\u306e\u3068\u3057\u307e\u3059\u3002 PG-Strom\u306b\u540c\u68b1\u306eFluentd\u5411\u3051Output\u30d7\u30e9\u30b0\u30a4\u30f3\u306e fluent-plugin-arrow-file \u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u5229\u7528\u3059\u308b\u3068\u3001Fluentd\u304c\u53ce\u96c6\u3057\u305f\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u3001\u6307\u5b9a\u3057\u305f\u30b9\u30ad\u30fc\u30de\u69cb\u9020\u3092\u6301\u3064Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u66f8\u304d\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002PG-Strom\u306eArrow_Fdw\u6a5f\u80fd\u3092\u4f7f\u7528\u3059\u308c\u3070\u3053\u306eApache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3068\u3057\u3066\u53c2\u7167\u3059\u308b\u4e8b\u304c\u3067\u304d\u3001\u307e\u305f\u4fdd\u5b58\u5148\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u304c\u9069\u5207\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308c\u3070\u3001GPU-Direct SQL\u3092\u7528\u3044\u305f\u9ad8\u901f\u306a\u8aad\u307f\u51fa\u3057\u3082\u53ef\u80fd\u3067\u3059\u3002 \u3053\u306e\u65b9\u6cd5\u306b\u306f\u4ee5\u4e0b\u306e\u30e1\u30ea\u30c3\u30c8\u304c\u3042\u308a\u307e\u3059\u3002 - Fluentd \u304c\u51fa\u529b\u3057\u305f\u30c7\u30fc\u30bf\u3092\u305d\u306e\u307e\u307ePG-Strom\u3067\u8aad\u307f\u51fa\u305b\u308b\u305f\u3081\u3001\u6539\u3081\u3066DB\u3078\u30c7\u30fc\u30bf\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044\u3002 - \u5217\u30c7\u30fc\u30bf\u5f62\u5f0f\u3067\u3042\u308b\u305f\u3081\u3001\u691c\u7d22\u30fb\u96c6\u8a08\u51e6\u7406\u306b\u4f34\u3046\u30c7\u30fc\u30bf\u306e\u8aad\u307f\u51fa\u3057\uff08I/O\u8ca0\u8377\uff09\u3092\u5fc5\u8981\u6700\u5c0f\u9650\u306b\u6291\u3048\u308b\u4e8b\u304c\u3067\u304d\u308b\u3002 - \u53e4\u304f\u306a\u3063\u305f\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u3082\u3001OS\u4e0a\u306e\u30d5\u30a1\u30a4\u30eb\u79fb\u52d5\u306e\u307f\u3067\u5b8c\u4e86\u3067\u304d\u308b\u3002 \u4e00\u65b9\u3067\u3001Apache Arrow\u5f62\u5f0f\u3067\u6027\u80fd\u4e0a\u306e\u30e1\u30ea\u30c3\u30c8\u3092\u5f97\u308b\u306b\u306f\u3001Record Batch\u306e\u30b5\u30a4\u30ba\u3092\u3042\u308b\u7a0b\u5ea6\u5927\u304d\u304f\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u305f\u3081\u3001\u30ed\u30b0\u306e\u767a\u751f\u983b\u5ea6\u304c\u5c0f\u3055\u304f\u3001\u4e00\u5b9a\u30b5\u30a4\u30ba\u306e\u30ed\u30b0\u304c\u6e9c\u307e\u308b\u307e\u3067\u306b\u6642\u9593\u306e\u304b\u304b\u308b\u5834\u5408\u306b\u306f\u3001PostgreSQL\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u51fa\u529b\u3055\u305b\u308b\u306a\u3069\u3001\u5225\u306e\u65b9\u6cd5\u3092\u8a66\u3057\u305f\u65b9\u304c\u3088\u308a\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306b\u8fd1\u3044\u30ed\u30b0\u5206\u6790\u304c\u53ef\u80fd\u3067\u3057\u3087\u3046\u3002","title":"arrow-file \u30d7\u30e9\u30b0\u30a4\u30f3"},{"location":"fluentd/#_2","text":"Fluentd\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u306f\u3044\u304f\u3064\u304b\u30ab\u30c6\u30b4\u30ea\u304c\u3042\u308a\u3001\u5916\u90e8\u304b\u3089\u30ed\u30b0\u3092\u53d7\u3051\u53d6\u308bInput\u30d7\u30e9\u30b0\u30a4\u30f3\u3001\u30ed\u30b0\u3092\u6210\u5f62\u3059\u308bParser\u30d7\u30e9\u30b0\u30a4\u30f3\u3001\u53d7\u4fe1\u3057\u305f\u30ed\u30b0\u3092\u4e00\u6642\u7684\u306b\u84c4\u7a4d\u3059\u308bBuffer\u30d7\u30e9\u30b0\u30a4\u30f3\u3001\u30ed\u30b0\u3092\u51fa\u529b\u3059\u308bOutput\u30d7\u30e9\u30b0\u30a4\u30f3\u3001\u306a\u3069\u306e\u7a2e\u985e\u304c\u3042\u308a\u307e\u3059\u3002 arrow-file\u306fOutput\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u4e00\u3064\u3067\u3059\u304c\u3001\u3053\u308c\u306fBuffer\u30d7\u30e9\u30b0\u30a4\u30f3\u304b\u3089\u6e21\u3055\u308c\u305f\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u56fa\u307e\u308a(chunk)\u3092\u3001\u30b3\u30f3\u30d5\u30a3\u30b0\u3067\u6307\u5b9a\u3055\u308c\u305f\u30b9\u30ad\u30fc\u30de\u69cb\u9020\u3092\u6301\u3064Apache Arrow\u5f62\u5f0f\u3067\u66f8\u304d\u51fa\u3059\u5f79\u5272\u3092\u62c5\u3063\u3066\u3044\u307e\u3059\u3002 Input/Parser\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u5f79\u5272\u306f\u3001\u5916\u90e8\u304b\u3089\u53d7\u3051\u53d6\u3063\u305f\u30ed\u30b0\u3092\u5171\u901a\u306e\u5f62\u5f0f\u306b\u5909\u63db\u3057\u3001Buffer\u30d7\u30e9\u30b0\u30a4\u30f3\u3084Output\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u5165\u529b\u30c7\u30fc\u30bf\u306e\u5f62\u5f0f\u3092\u610f\u8b58\u3059\u308b\u3053\u3068\u306a\u304f\u6271\u3048\u308b\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u3067\u3059\u3002 \u3053\u308c\u306f\u5185\u90e8\u7684\u306b\u306f\u3001\u30ed\u30b0\u306e\u632f\u308a\u5206\u3051\u306b\u5229\u7528\u3059\u308b\u3053\u3068\u306e\u3067\u304d\u308b\u8b58\u5225\u5b50\u306e tag \u3001\u30ed\u30b0\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7 time \u3001\u304a\u3088\u3073\u751f\u30ed\u30b0\u3092\u6210\u5f62\u3057\u305f\u9023\u60f3\u914d\u5217\u3067\u3042\u308b record \u306e\u7d44\u3067\u3059\u3002 arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u3001 tag \u3001 time \u306e\u5404\u30d5\u30a3\u30fc\u30eb\u30c9\u3068\u3001 record \u9023\u60f3\u914d\u5217\u306e\u5404\u8981\u7d20\uff08\u4e00\u90e8\u3092\u7701\u7565\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\uff09\u3092\u5217\u3068\u3057\u3066\u6301\u3064Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3078\u306e\u66f8\u304d\u51fa\u3057\u3092\u884c\u3044\u307e\u3059\u3002 \u305d\u306e\u305f\u3081\u3001\u51fa\u529b\u5148\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u3068\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u60c5\u5831\uff08\u9023\u60f3\u914d\u5217\u306e\u8981\u7d20\u3068\u5217/\u578b\u306e\u30de\u30c3\u30d4\u30f3\u30b0\uff09\u306f\u5fc5\u9808\u306e\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u3067\u3059\u3002","title":"\u5185\u90e8\u69cb\u9020"},{"location":"fluentd/#_3","text":"\u4f7f\u7528\u3057\u3066\u3044\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u7528\u306e td-agent \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 \u307e\u305f\u3001arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u306f rake-compiler \u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u306e\u3067\u3001\u4e88\u3081\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304d\u307e\u3059\u3002 \u8a73\u3057\u304f\u306f \u3053\u3061\u3089 \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 $ curl -L https://toolbelt.treasuredata.com/sh/install-redhat-td-agent4.sh | sh $ sudo /opt/td-agent/bin/fluent-gem install rake-compiler \u6b21\u306b\u3001PG-Strom\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3001 fluentd \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4ee5\u4e0b\u306e\u7269\u4ef6\u3092\u30d3\u30eb\u30c9\u3057\u307e\u3059\u3002 $ git clone https://github.com/heterodb/pg-strom.git $ cd pg-strom/fluentd $ make TD_AGENT=1 gem $ sudo make TD_AGENT=1 install Fluentd\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u4e8b\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 $ /opt/td-agent/bin/fluent-gem list | grep arrow fluent-plugin-arrow-file (0.2)","title":"\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"fluentd/#_4","text":"\u524d\u8ff0\u306e\u901a\u308a\u3001arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u52d5\u4f5c\u3055\u305b\u308b\u306b\u306f\u3001\u51fa\u529b\u5148\u306e\u30d1\u30b9\u540d\u3068\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u6700\u4f4e\u9650\u5fc5\u8981\u3067\u3059\u3002 \u3053\u308c\u306b\u52a0\u3048\u3066\u3001Apache Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u69cb\u9020\u4e0a\u3001Record Batch\u3068\u547c\u3070\u308c\u308b\u30c7\u30fc\u30bf\u306e\u56fa\u307e\u308a\u306f\u3042\u308b\u7a0b\u5ea6\u5927\u304d\u306a\u30b5\u30a4\u30ba\u3067\u533a\u5207\u3063\u3066\u304a\u3044\u305f\u65b9\u304c\u3001\u691c\u7d22\u30fb\u96c6\u8a08\u51e6\u7406\u3092\u884c\u3046\u969b\u306e\u51e6\u7406\u6027\u80fd\u3092\u5f15\u304d\u51fa\u3057\u3084\u3059\u3044\u3067\u3059\u3002 arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u3001Buffer\u30d7\u30e9\u30b0\u30a4\u30f3\u304b\u3089\u6e21\u3055\u308c\u308bchunk\u3054\u3068\u306bRecord Batch\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u3001Buffer\u30d7\u30e9\u30b0\u30a4\u30f3\u5074\u306e\u30d0\u30c3\u30d5\u30a1\u30b5\u30a4\u30ba\u306f\u3053\u308c\u306b\u6e96\u3058\u305f\u8a2d\u5b9a\u3092\u884c\u3046\u3079\u304d\u3067\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f 256MB \u306e\u30d0\u30c3\u30d5\u30a1\u30b5\u30a4\u30ba\u3092\u53d6\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002 arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 path [type: String ] (\u5fc5\u9808\u30d1\u30e9\u30e1\u30fc\u30bf) arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u30ed\u30b0\u3092\u51fa\u529b\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u3053\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306f\u5fc5\u9808\u3067\u3001\u4ee5\u4e0b\u306e\u66f8\u5f0f\u6587\u5b57\u3092\u542b\u3081\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u66f8\u5f0f \u8aac\u660e %Y \u73fe\u5728\u306e\u5e74\u3092\u897f\u66a64\u6841\u3067\u8868\u73fe\u3057\u305f\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %y \u73fe\u5728\u306e\u5e74\u306e\u897f\u66a6\u4e0b2\u6841\u3067\u8868\u73fe\u3057\u305f\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %m \u73fe\u5728\u306e\u6708\u3092 01\uff5e12 \u3067\u8868\u3057\u305f2\u6841\u306e\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %d \u73fe\u5728\u306e\u65e5\u3092 01\uff5e31 \u3067\u8868\u3057\u305f2\u6841\u306e\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %H \u73fe\u5728\u6642\u523b\u306e\u6642\u309200\uff5e23\u3067\u8868\u3057\u305f2\u6841\u306e\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %M \u73fe\u5728\u6642\u523b\u306e\u5206\u309200\uff5e59\u3067\u8868\u3057\u305f2\u6841\u306e\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %S \u73fe\u5728\u6642\u523b\u306e\u79d2\u309200\uff5e59\u3067\u8868\u3057\u305f2\u6841\u306e\u6570\u5024\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 %p \u73fe\u5728\u306e Fluentd \u30d7\u30ed\u30bb\u30b9\u306ePID\u3067\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 \u66f8\u5f0f\u6587\u5b57\u5217\u306f\u30c1\u30e3\u30f3\u30af\u3092\u66f8\u304d\u51fa\u3059\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u8a55\u4fa1\u3055\u308c\u3001\u540c\u540d\u306eApache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u306b\u306f\u3001Record Batch\u3092\u8ffd\u8a18\u3057\u307e\u3059\u3002\u5b58\u5728\u3057\u306a\u3044\u5834\u5408\u306fApache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092\u65b0\u898f\u4f5c\u6210\u3057\u3001\u6700\u521d\u306eRecord Batch\u3092\u66f8\u304d\u51fa\u3057\u307e\u3059\u3002 \u305f\u3060\u3057\u3001\u65e2\u5b58\u306eApache Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u30b5\u30a4\u30ba\u304c\u5f8c\u8ff0\u306e filesize_threshold \u8a2d\u5b9a\u5024\u3092\u8d8a\u3048\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u65e2\u5b58\u30d5\u30a1\u30a4\u30eb\u3092\u30ea\u30cd\u30fc\u30e0\u3057\u305f\u5f8c\u3001\u65b0\u898f\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \uff08\u4f8b\uff09`path /tmp/arrow_logs/my_logs_%y%m%d.%p.log` \u51fa\u529b\u5148\u306eApache Arrow\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u30c1\u30e3\u30f3\u30af\u3092\u66f8\u304d\u51fa\u3059\u305f\u3073\u306b\u30d5\u30c3\u30bf\u9818\u57df\u3092\u66f4\u65b0\u3057\u3066\u5168\u3066\u306eRecord Batch\u3092\u30dd\u30a4\u30f3\u30c8\u3057\u307e\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u751f\u6210\u3055\u308c\u305fApache Arrow\u30d5\u30a1\u30a4\u30eb\u306f\u5373\u5ea7\u306b\u8aad\u307f\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c\u3001\u30a2\u30af\u30bb\u30b9\u7af6\u5408\u3092\u907f\u3051\u308b\u305f\u3081\u306b\u306f lockf(3) \u3092\u7528\u3044\u3066\u6392\u4ed6\u51e6\u7406\u3092\u884c\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 schema_defs [type: String ] (\u5fc5\u9808\u30d1\u30e9\u30e1\u30fc\u30bf) fluent-plugin-arrow-file \u304c\u30ed\u30b0\u30c7\u30fc\u30bf\u3092\u51fa\u529b\u3059\u308b\u969b\u306e\u3001Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u3053\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306f\u5fc5\u9808\u3067\u3001\u4ee5\u4e0b\u306e\u5f62\u5f0f\u3067\u8a18\u8ff0\u3055\u308c\u305f\u6587\u5b57\u5217\u306b\u3088\u308a\u30b9\u30ad\u30fc\u30de\u69cb\u9020\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002 schema_defs := column_def1[,column_def2 ...] column_def := =[;] \u306f\u5217\u306e\u540d\u524d\u3067\u3059\u3002Fluentd\u304b\u3089arrow-file\u306b\u6e21\u3055\u308c\u308b\u9023\u60f3\u914d\u5217\u306e\u30ad\u30fc\u5024\u3068\u4e00\u81f4\u3057\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u306f\u5217\u306e\u30c7\u30fc\u30bf\u578b\u3067\u3059\u3002\u4ee5\u4e0b\u306e\u8868\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u306f\u5217\u306e\u4ed8\u52a0\u5c5e\u6027\u3067\u3059\u3002\u73fe\u6642\u70b9\u3067\u306f\u4ee5\u4e0b\u306e\u5c5e\u6027\u306e\u307f\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002 stat_enabled ... \u5217\u306e\u7d71\u8a08\u60c5\u5831\u3092\u53ce\u96c6\u3057\u3001Record Batch\u3054\u3068\u306e\u6700\u5927\u5024/\u6700\u5c0f\u5024\u3092 max_values=... \u304a\u3088\u3073 min_values=... \u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30c7\u30fc\u30bf\u3068\u3057\u3066\u57cb\u3081\u8fbc\u307f\u307e\u3059\u3002 \uff08\u4f8b\uff09 schema_defs \"ts=Timestamp;stat_enabled,dev_id=Uint32,temperature=Float32,humidity=Float32\" arrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u30c7\u30fc\u30bf\u578b \u30c7\u30fc\u30bf\u578b \u8aac\u660e Int8 Int16 Int32 Int64 \u7b26\u53f7\u4ed8\u304d\u6574\u6570\u578b\u3067\u3001\u305d\u308c\u305e\u308c\u6307\u5b9a\u3057\u305f\u30d3\u30c3\u30c8\u5e45\u3092\u6301\u3061\u307e\u3059\u3002 Uint8 Uint16 Uint32 Uint64 \u7b26\u53f7\u306a\u3057\u6574\u6570\u578b\u3067\u3001\u305d\u308c\u305e\u308c\u6307\u5b9a\u3057\u305f\u30d3\u30c3\u30c8\u5e45\u3092\u6301\u3061\u307e\u3059\u3002 Float16 Float32 Float64 \u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u3067\u3001\u305d\u308c\u305e\u308c\u534a\u7cbe\u5ea6(16bit)\u3001\u5358\u7cbe\u5ea6(32bit)\u3001\u500d\u7cbe\u5ea6(64bit)\u306e\u5e45\u3092\u6301\u3061\u307e\u3059\u3002 Decimal Decimal128 128bit\u56fa\u5b9a\u5c0f\u6570\u70b9\u578b\u3067\u3059\u3002256bit\u56fa\u5b9a\u5c0f\u6570\u70b9\u578b\u306f\u73fe\u5728\u672a\u30b5\u30dd\u30fc\u30c8\u3067\u3059\u3002 Timestamp Timestamp[sec] Timestamp[ms] Timestamp[us] Timestamp[ns] \u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u578b\u3067\u3059\u3002\u7cbe\u5ea6\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u7701\u7565\u3057\u305f\u5834\u5408\u306f\u6697\u9ed9\u306b [us] \u3092\u4ed8\u52a0\u3057\u305f\u3082\u306e\u3068\u3057\u3066\u6271\u308f\u308c\u307e\u3059\u3002 Time Time[sec] Time[ms] Time[us] Time[ns] \u6642\u523b\u578b\u3067\u3059\u3002\u7cbe\u5ea6\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u7701\u7565\u3057\u305f\u5834\u5408\u306f\u6697\u9ed9\u306b [sec] \u3092\u4ed8\u52a0\u3057\u305f\u3082\u306e\u3068\u3057\u3066\u6271\u308f\u308c\u307e\u3059\u3002 Date Date[Day] Date[ms] \u65e5\u4ed8\u578b\u3067\u3059\u3002\u7cbe\u5ea6\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u7701\u7565\u3057\u305f\u5834\u5408\u306f\u6697\u9ed9\u306b [day] \u3092\u4ed8\u52a0\u3057\u305f\u3082\u306e\u3068\u3057\u3066\u6271\u308f\u308c\u307e\u3059\u3002 Utf8 \u6587\u5b57\u5217\u578b\u3067\u3059\u3002 Ipaddr4 IPv4\u30a2\u30c9\u30ec\u30b9\u578b\u3067\u3059\u3002\u5b9f\u969b\u306b\u306f byteWidth=4 \u3067\u3042\u308b FixedSizeBinary \u578b\u306b\u3001 pg_type=pg_catalog.inet \u3068\u3044\u3046\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u4ed8\u4e0e\u3057\u307e\u3059\u3002 Ipaddr6 IPv6\u30a2\u30c9\u30ec\u30b9\u578b\u3067\u3059\u3002\u5b9f\u969b\u306b\u306f byteWidth=16 \u3067\u3042\u308b FixedSizeBinary \u578b\u306b\u3001 pg_type=pg_catalog.inet \u3068\u3044\u3046\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u4ed8\u4e0e\u3057\u307e\u3059\u3002 ts_column [type: String / default: \u306a\u3057] \u6307\u5b9a\u3057\u305f\u5217\u306e\u5024\u3092\uff08 record \u9023\u60f3\u914d\u5217\u304b\u3089\u3067\u306f\u306a\u304f\uff09Fluentd\u304b\u3089\u6e21\u3055\u308c\u305f\u30ed\u30b0\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u5024\u3088\u308a\u53d6\u5f97\u3057\u307e\u3059\u3002 \u901a\u5e38\u3001\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3059\u308b\u5217\u306f Timestamp \u306a\u3069\u306e\u65e5\u4ed8\u6642\u523b\u578b\u3092\u6301\u3063\u3066\u304a\u308a\u3001\u307e\u305f stat_enabled \u5c5e\u6027\u3068\u4f75\u7528\u3059\u308b\u3053\u3068\u3067\u691c\u7d22\u51e6\u7406\u306e\u9ad8\u901f\u5316\u304c\u671f\u5f85\u3067\u304d\u307e\u3059\u3002 tag_column [type: String / default: \u306a\u3057] \u6307\u5b9a\u3057\u305f\u5217\u306e\u5024\u3092\uff08 record \u9023\u60f3\u914d\u5217\u304b\u3089\u3067\u306f\u306a\u304f\uff09Fluentd\u304b\u3089\u6e21\u3055\u308c\u305f\u30ed\u30b0\u306e\u30bf\u30b0\u5024\u3088\u308a\u53d6\u5f97\u3057\u307e\u3059\u3002 \u901a\u5e38\u3001\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u6307\u5b9a\u3059\u308b\u5217\u306f Utf8 \u306a\u3069\u306e\u6587\u5b57\u5217\u578b\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002 filesize_threshold [type: Integer / default: 10000] fluent-plugin-arrow-file \u304c\u51fa\u529b\u5148\u30d5\u30a1\u30a4\u30eb\u3092\u5207\u308a\u66ff\u3048\u308b\u95be\u5024\u3092MB\u5358\u4f4d\u3067\u8a2d\u5b9a\u3057\u307e\u3059\u3002 \u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u304c\u7d0410GB\u3092\u8d8a\u3048\u305f\u8fba\u308a\u3067\u51fa\u529b\u5148\u3092\u5207\u308a\u66ff\u3048\u307e\u3059\u3002","title":"\u8a2d\u5b9a"},{"location":"fluentd/#_5","text":"\u7c21\u5358\u306a\u4f8b\u3068\u3057\u3066\u3001\u30ed\u30fc\u30ab\u30eb\u306eApache Httpd\u30b5\u30fc\u30d0\u306e\u30ed\u30b0\u3092\u76e3\u8996\u3057\u3001\u305d\u308c\u3092\u30d5\u30a3\u30fc\u30eb\u30c9\u6bce\u306b\u30d1\u30fc\u30b9\u3057\u3066Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002 \u3067 /var/log/httpd/access_log \u3092\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3068\u3057\u3066\u6307\u5b9a\u3057\u3066\u3044\u308b\u307b\u304b\u3001 apache2 \u306eParse\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u7528\u3044\u3066\u3001host, user, time, method, path, code, size, referer, agent\u306e\u5404\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u5207\u308a\u51fa\u3057\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u3089\u306farrow-file\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u9023\u60f3\u914d\u5217\u3068\u3057\u3066\u6e21\u3055\u308c\u3001 \u5185\u306e schema_defs \u306b\u306f\u3001\u3053\u308c\u3089\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u5bfe\u5fdc\u3059\u308bApache Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u5217\u5b9a\u7fa9\u3092\u8a18\u8ff0\u3057\u3066\u3044\u307e\u3059\u3002 \u307e\u305f\u3001\u3053\u3053\u3067\u306f\u7c21\u5358\u306a\u4f7f\u7528\u4f8b\u3092\u793a\u3059\u3053\u3068\u304c\u76ee\u7684\u3067\u3059\u306e\u3067\u3001 \u30bf\u30b0\u3067\u30c1\u30e3\u30f3\u30af\u30b5\u30a4\u30ba\u3092\u6700\u59274MB / 200\u884c\u306b\u7e2e\u5c0f\u3057\u3001\u6700\u5927\u3067\u308210\u79d2\u3067Output\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u6e21\u3059\u3088\u3046\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002 /etc/td-agent/td-agent.conf \u306e\u8a2d\u5b9a\u4f8b @type tail path /var/log/httpd/access_log pos_file /var/log/td-agent/httpd_access.pos tag httpd format apache2 @type apache2 expression /^(?[^ ]*) [^ ]* (?[^ ]*) \\[(?[^\\]]*)\\] \"(?\\S+)(?: +(?(?:[^\\\"]|\\\\.)*?)(?: +\\S*)?)?\" (?[^ ]*) (?[^ ]*)(?: \"(?(?:[^\\\"]|\\\\.)*)\" \"(?(?:[^\\\"]|\\\\.)*)\")?$/ time_format %d/%b/%Y:%H:%M:%S %z
@type arrow_file path /tmp/mytest%Y%m%d.%p.arrow schema_defs \"ts=Timestamp[sec],host=Utf8,method=Utf8,path=Utf8,code=Int32,size=Int32,referer=Utf8,agent=Utf8\" ts_column \"ts\" flush_interval 10s chunk_limit_size 4MB chunk_limit_records 200 td-agent \u3092\u8d77\u52d5\u3057\u307e\u3059\u3002 $ sudo systemctl start td-agent \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001Apache Httpd\u306e\u30ed\u30b0\u304c path \u3067\u8a2d\u5b9a\u3057\u305f /tmp/mytest%Y%m%d.%p.arrow \u304c\u5c55\u958b\u3055\u308c\u305f\u5148\u3067\u3042\u308b /tmp/mytest20220124.3206341.arrow \u306b\u66f8\u304d\u51fa\u3055\u308c\u3066\u3044\u307e\u3059\u3002 $ arrow2csv /tmp/mytest20220124.3206341.arrow --head --offset 300 --limit 10 \"ts\",\"host\",\"method\",\"path\",\"code\",\"size\",\"referer\",\"agent\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/js/theme_extra.js\",200,195,\"http://buri/docs/ja/fluentd/\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/js/theme.js\",200,4401,\"http://buri/docs/ja/fluentd/\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/img/fluentd_overview.png\",200,121459,\"http://buri/docs/ja/fluentd/\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/search/main.js\",200,3027,\"http://buri/docs/ja/fluentd/\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/fonts/Lato/lato-regular.woff2\",200,182708,\"http://buri/docs/ja/css/theme.css\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/fonts/fontawesome-webfont.woff2?v=4.7.0\",200,77160,\"http://buri/docs/ja/css/theme.css\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/fonts/RobotoSlab/roboto-slab-v7-bold.woff2\",200,67312,\"http://buri/docs/ja/css/theme.css\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:42\",\"192.168.77.95\",\"GET\",\"/docs/ja/fonts/Lato/lato-bold.woff2\",200,184912,\"http://buri/docs/ja/css/theme.css\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:43\",\"192.168.77.95\",\"GET\",\"/docs/ja/search/worker.js\",200,3724,\"http://buri/docs/ja/fluentd/\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \"2022-01-24 06:13:43\",\"192.168.77.95\",\"GET\",\"/docs/ja/img/favicon.ico\",200,1150,\"http://buri/docs/ja/fluentd/\",\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\" \u3053\u308c\u3092 PG-Strom \u306eArrow_Fdw\u3092\u7528\u3044\u3066PostgreSQL\u306b\u30de\u30c3\u30d4\u30f3\u30b0\u3057\u3066\u307f\u307e\u3059\u3002 postgres=# IMPORT FOREIGN SCHEMA mytest FROM SERVER arrow_fdw INTO public OPTIONS (file '/tmp/mytest20220124.3206341.arrow'); IMPORT FOREIGN SCHEMA postgres=# SELECT ts, host, path FROM mytest WHERE code = 404; ts | host | path ---------------------+---------------+---------------------- 2022-01-24 12:02:06 | 192.168.77.73 | /~kaigai/ja/fluentd/ (1 row) postgres=# EXPLAIN SELECT ts, host, path FROM mytest WHERE code = 404; QUERY PLAN ------------------------------------------------------------------------------ Custom Scan (GpuScan) on mytest (cost=4026.12..4026.12 rows=3 width=72) GPU Filter: (code = 404) referenced: ts, host, path, code files0: /tmp/mytest20220124.3206341.arrow (read: 128.00KB, size: 133.94KB) (4 rows) \u751f\u6210\u3055\u308c\u305f Apache Arrow \u30d5\u30a1\u30a4\u30eb\u3092\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u3068\u3057\u3066\u30de\u30c3\u30d4\u30f3\u30b0\u3057\u3001\u3053\u308c\u3092SQL\u304b\u3089\u53c2\u7167\u3057\u3066\u3044\u307e\u3059\u3002 Fluentd\u5074\u3067\u6210\u5f62\u3055\u308c\u305f\u30ed\u30b0\u306e\u5404\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u53c2\u7167\u3059\u308b\u691c\u7d22\u6761\u4ef6\u3092\u4e0e\u3048\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4e0a\u8a18\u306e\u4f8b\u3067\u306f\u3001HTTP\u30b9\u30c6\u30fc\u30bf\u30b9\u30b3\u30fc\u30c9404\u306e\u30ed\u30b0\u3092\u691c\u7d22\u3057\u30011\u4ef6\u304c\u30d2\u30c3\u30c8\u3057\u3066\u3044\u307e\u3059\u3002","title":"\u4f7f\u7528\u4f8b"},{"location":"gpucache/","text":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5 \u6982\u8981 GPU\u306b\u306f\u30db\u30b9\u30c8\u30b7\u30b9\u30c6\u30e0\u306eRAM\u3068\u306f\u72ec\u7acb\u306a\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u304c\u642d\u8f09\u3055\u308c\u3066\u304a\u308a\u3001GPU\u3067\u8a08\u7b97\u3059\u308b\u306b\u306fPCI-E\u30d0\u30b9\u306a\u3069\u3092\u901a\u3058\u3066\u3001\u4e00\u65e6\u3001\u30db\u30b9\u30c8\u30b7\u30b9\u30c6\u30e0\u3084\u30b9\u30c8\u30ec\u30fc\u30b8\u30c7\u30d0\u30a4\u30b9\u304b\u3089\u30c7\u30fc\u30bf\u3092GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u5074\u3078\u8ee2\u9001\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 PG-Strom\u304cSQL\u30af\u30a8\u30ea\u3092GPU\u3067\u51e6\u7406\u3059\u308b\u5834\u5408\u3082\u4f8b\u5916\u3067\u306f\u306a\u304f\u3001\u5185\u90e8\u7684\u306b\u306f\u3001PostgreSQL\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u8aad\u307f\u51fa\u3057\u305f\u30ec\u30b3\u30fc\u30c9\u3092GPU\u3078\u3068\u8ee2\u9001\u3057\u3001\u305d\u306e\u4e0a\u3067GPU\u3067SQL\u306e\u5404\u7a2e\u51e6\u7406\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 \u3057\u304b\u3057\u3053\u308c\u3089\u306e\u51e6\u7406\u306b\u306f\u3001\u591a\u304b\u308c\u5c11\u306a\u304b\u308c\u30c6\u30fc\u30d6\u30eb\u306e\u8aad\u307f\u51fa\u3057\u3084\u30c7\u30fc\u30bf\u306e\u8ee2\u9001\u306b\u6642\u9593\u3092\u8981\u3057\u307e\u3059\uff08\u591a\u304f\u306e\u5834\u5408\u3001GPU\u3067\u306e\u51e6\u7406\u3088\u308a\u3082\u9065\u304b\u306b\u9577\u3044\u6642\u9593\u306e\uff01\uff09\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\uff08GPU Cache\uff09\u3068\u306f\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u306b\u4e88\u3081\u9818\u57df\u3092\u78ba\u4fdd\u3057\u3066\u304a\u304d\u3001\u305d\u3053\u306bPostgreSQL\u30c6\u30fc\u30d6\u30eb\u306e\u8907\u88fd\u3092\u4fdd\u6301\u3057\u3066\u304a\u304f\u6a5f\u80fd\u3067\u3059\u3002 \u6bd4\u8f03\u7684\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\u306e\u5c0f\u3055\u306a\uff08\uff5e10GB\u7a0b\u5ea6\uff09\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3067\u3001\u66f4\u65b0\u983b\u5ea6\u304c\u9ad8\u3044\u3046\u3048\u306b\u3001\u3057\u3070\u3057\u3070\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306e\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u691c\u7d22/\u5206\u6790\u7cfb\u306eSQL\u3092\u5b9f\u884c\u3059\u308b\u3068\u3044\u3046\u30d1\u30bf\u30fc\u30f3\u3092\u610f\u56f3\u3057\u3066\u3044\u307e\u3059\u3002 \u5f8c\u8ff0\u3059\u308b\u30ed\u30b0\u30d9\u30fc\u30b9\u306e\u540c\u671f\u30e1\u30ab\u30cb\u30ba\u30e0\u306b\u3088\u308a\u3001\u4e26\u5217\u5ea6\u306e\u9ad8\u3044\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30ca\u30eb\u306a\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u59a8\u3052\u308b\u3053\u3068\u306a\u304fGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6700\u65b0\u306e\u72b6\u614b\u306b\u4fdd\u3064\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 \u305d\u306e\u4e00\u65b9\u3067\u3001\u691c\u7d22/\u5206\u6790\u7cfb\u306eSQL\u3092\u5b9f\u884c\u3059\u308b\u969b\u306b\u306f\u65e2\u306bGPU\u4e0a\u306b\u30c7\u30fc\u30bf\u304c\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u6539\u3081\u3066\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u30ec\u30b3\u30fc\u30c9\u3092\u8aad\u307f\u51fa\u3057\u305f\u308a\u3001PCI-E\u30d0\u30b9\u3092\u4ecb\u3057\u3066\u30c7\u30fc\u30bf\u3092\u8ee2\u9001\u3057\u305f\u308a\u3059\u308b\u4e8b\u306a\u304f\u3001SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u5178\u578b\u7684\u306a\u5229\u7528\u30b7\u30fc\u30f3\u3068\u3057\u3066\u306f\u3001\u81ea\u52d5\u8eca\u3084\u643a\u5e2f\u96fb\u8a71\u3068\u3044\u3063\u305f\u30e2\u30d0\u30a4\u30eb\u30c7\u30d0\u30a4\u30b9\u306e\u4f4d\u7f6e\u60c5\u5831\uff08\u73fe\u5728\u4f4d\u7f6e\uff09\u3092\u6642\u3005\u523b\u3005\u53ce\u96c6\u3057\u3001 GPU\u7248PostGIS \u306a\u3069\u3092\u7528\u3044\u3066\u4ed6\u306e\u30c7\u30fc\u30bf\u3068\u7a81\u304d\u5408\u308f\u305b\u308b\u3068\u3044\u3063\u305f\u30b1\u30fc\u30b9\u304c\u8003\u3048\u3089\u308c\u307e\u3059\u3002 \u591a\u6570\u306e\u30c7\u30d0\u30a4\u30b9\u304b\u3089\u9001\u51fa\u3055\u308c\u308b\u4f4d\u7f6e\u60c5\u5831\u306e\u66f4\u65b0\u306f\u6975\u3081\u3066\u66f4\u65b0\u30d8\u30d3\u30fc\u306a\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3067\u3059\u304c\u3001\u4e00\u65b9\u3067\u3001\u6700\u65b0\u306e\u4f4d\u7f6e\u60c5\u5831\u306b\u57fa\u3065\u3044\u3066\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u3082\u3042\u308b\u305f\u3081\u3001\u3053\u308c\u3089\u66f4\u65b0\u30c7\u30fc\u30bf\u3092\u9045\u6ede\u306a\u304fGPU\u5074\u3078\u9069\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\u306b\u306f\u5236\u7d04\u304c\u3042\u308a\u307e\u3059\u304c\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u9ad8\u983b\u5ea6\u306e\u66f4\u65b0\u3068\u3001\u9ad8\u6027\u80fd\u306a\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u3092\u4e21\u7acb\u3059\u308b\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3059\u3002 \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3067\u306f\u3001\u4e26\u5217\u5ea6\u306e\u9ad8\u3044\u66f4\u65b0\u7cfb\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u5bfe\u5fdc\u3059\u308b\u3053\u3068\u3068\u3001\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u304c\u5e38\u306b\u6700\u65b0\u306e\u30c7\u30fc\u30bf\u3092\u53c2\u7167\u3059\u308b\u3068\u3044\u30462\u3064\u306e\u8981\u4ef6\u3092\u30af\u30ea\u30a2\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u591a\u304f\u306e\u30b7\u30b9\u30c6\u30e0\u3067\u306fCPU\u3068GPU\u306fPCI-E\u30d0\u30b9\u3092\u4ecb\u3057\u3066\u63a5\u7d9a\u3055\u308c\u3001\u305d\u306e\u901a\u4fe1\u306b\u306f\u76f8\u5fdc\u306e\u30ec\u30a4\u30c6\u30f3\u30b7\u304c\u767a\u751f\u3057\u307e\u3059\u3002 \u305d\u306e\u305f\u3081\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u5bfe\u8c61\u30c6\u30fc\u30d6\u30eb\u304c1\u884c\u66f4\u65b0\u3055\u308c\u308b\u305f\u3073\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u540c\u671f\u3057\u3066\u3044\u3066\u306f\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u6027\u80fd\u306b\u5927\u304d\u306a\u5f71\u97ff\u3092\u4e0e\u3048\u3066\u3057\u307e\u3044\u307e\u3059\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u4f5c\u6210\u3059\u308b\u3068\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u306b\u30ad\u30e3\u30c3\u30b7\u30e5\u7528\u306e\u30e1\u30e2\u30ea\u9818\u57df\u3092\u78ba\u4fdd\u3059\u308b\u3060\u3051\u3067\u306a\u304f\u3001\u30db\u30b9\u30c8\u5074\u5171\u6709\u30e1\u30e2\u30ea\u4e0a\u306bREDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \u30c6\u30fc\u30d6\u30eb\u306e\u66f4\u65b0\u3092\u4f34\u3046SQL\u30b3\u30de\u30f3\u30c9\uff08INSERT\u3001UPDATE\u3001DELETE\uff09\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001AFTER ROW\u30c8\u30ea\u30ac\u306b\u3088\u3063\u3066\u66f4\u65b0\u5185\u5bb9\u304cREDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u30b3\u30d4\u30fc\u3055\u308c\u307e\u3059\u304c\u3001\u3053\u306e\u51e6\u7406\u306fGPU\u3078\u306e\u547c\u3073\u51fa\u3057\u3092\u4f34\u308f\u306a\u3044\u3001CPU\u3068RAM\u3060\u3051\u3067\u5b8c\u7d50\u3059\u308b\u51e6\u7406\u3067\u3059\u306e\u3067\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u6027\u80fd\u3078\u306e\u5f71\u97ff\u306f\u307b\u3068\u3093\u3069\u3042\u308a\u307e\u305b\u3093\u3002 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u672a\u9069\u7528\u306eREDO\u30ed\u30b0\u304c\u4e00\u5b9a\u91cf\u305f\u307e\u308b\u304b\u3001\u6700\u5f8c\u306e\u66f8\u304d\u8fbc\u307f\u304b\u3089\u4e00\u5b9a\u6642\u9593\u304c\u7d4c\u904e\u3059\u308b\u3068\u3001\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\uff08GPU memory keeper\uff09\u306b\u3088\u3063\u3066\u672a\u9069\u7528\u306eREDO\u30ed\u30b0\u306fGPU\u3078\u30ed\u30fc\u30c9\u3055\u308c\u3001\u66f4\u65b0\u5dee\u5206\u3092GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306b\u9069\u7528\u3057\u307e\u3059\u3002 \u3053\u306e\u6642\u3001REDO\u30ed\u30b0\u306f\u307e\u3068\u3081\u3066GPU\u306b\u8ee2\u9001\u3055\u308c\u3001\u3055\u3089\u306bGPU\u306e\u6570\u5343\u30d7\u30ed\u30bb\u30c3\u30b5\u30b3\u30a2\u304c\u4e26\u5217\u306bREDO\u30ed\u30b0\u3092\u9069\u7528\u3059\u308b\u305f\u3081\u3001\u901a\u5e38\u306f\u51e6\u7406\u9045\u5ef6\u304c\u554f\u984c\u3068\u306a\u308b\u4e8b\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u5bfe\u8c61\u30c6\u30fc\u30d6\u30eb\u3092\u53c2\u7167\u3059\u308b\u969b\u306b\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u3057\u3066GPU\u306b\u30ed\u30fc\u30c9\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u65e2\u306bGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u306b\u5272\u5f53\u3066\u6e08\u307f\u306eGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u30de\u30c3\u30d4\u30f3\u30b0\u3057\u3066\u5229\u7528\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u5148\u7acb\u3063\u3066\u3001\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u958b\u59cb\u6642\u70b9\u3067\u672a\u9069\u7528\u306eREDO\u30ed\u30b0\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u3001\u3053\u308c\u3089\u306f\u5168\u3066\u3001\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u524d\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3078\u9069\u7528\u3055\u308c\u307e\u3059\u3002 \u305d\u306e\u305f\u3081\u3001\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u304c\u5bfe\u8c61\u306eGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u305f\u7d50\u679c\u306f\u3001\u76f4\u63a5\u30c6\u30fc\u30d6\u30eb\u3092\u53c2\u7167\u3057\u305f\u5834\u5408\u3068\u540c\u3058\u7d50\u679c\u3092\u8fd4\u3059\u4e8b\u3068\u306a\u308a\u3001\u554f\u3044\u5408\u308f\u305b\u306e\u4e00\u8cab\u6027\u306f\u5e38\u306b\u4fdd\u6301\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u8a2d\u5b9a GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6709\u52b9\u306b\u3059\u308b\u306b\u306f\u3001\u5bfe\u8c61\u3068\u306a\u308b\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066 pgstrom.gpucache_sync_trigger() \u95a2\u6570\u3092\u5b9f\u884c\u3059\u308bAFTER INSERT OR UPDATE OR DELETE\u306e\u884c\u30c8\u30ea\u30ac\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002 \u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30b9\u30ec\u30fc\u30d6\u5074\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001\u3053\u306e\u30c8\u30ea\u30ac\u306e\u767a\u884c\u30e2\u30fc\u30c9\u304c ALWAYS \u3067\u3042\u308b\u4e8b\u304c\u5fc5\u8981\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u30c6\u30fc\u30d6\u30eb dpoints \u306b\u5bfe\u3057\u3066GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3059\u308b\u4f8b\u3067\u3059\u3002 =# create trigger row_sync after insert or update or delete on dpoints_even for row execute function pgstrom.gpucache_sync_trigger(); =# alter table dpoints_even enable always trigger row_sync; Note PostgreSQL v12.x \u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u304a\u3051\u308b\u8ffd\u52a0\u8a2d\u5b9a PostgreSQL v12\u304a\u3088\u3073\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u3001\u4e0a\u8a18\u306e\u30c8\u30ea\u30ac\u306b\u52a0\u3048\u3066\u3001 pgstrom.gpucache_sync_trigger() \u95a2\u6570\u3092\u5b9f\u884c\u3059\u308bBEFORE TRUNCATE\u306e\u69cb\u6587\u30c8\u30ea\u30ac\u306e\u8a2d\u5b9a\u304c\u5fc5\u8981\u3067\u3059\u3002 \u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30b9\u30ec\u30fc\u30d6\u5074\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u5b9f\u884c\u3059\u308b\u5834\u5408\u3001\u540c\u69d8\u306b\u3001\u3053\u306e\u30c8\u30ea\u30ac\u306e\u767a\u884c\u30e2\u30fc\u30c9\u304c ALWAYS \u3067\u3042\u308b\u4e8b\u304c\u5fc5\u8981\u3067\u3059\u3002 PostgreSQL v13\u3067\u306fObject Access Hook\u304c\u62e1\u5f35\u3055\u308c\u3001\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u30c8\u30ea\u30ac\u8a2d\u5b9a\u306a\u3057\u3067 TRUNCATE\u306e\u5b9f\u884c\u3092\u6355\u6349\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u3057\u304b\u3057\u305d\u308c\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u3001TRUNCATE\u3092\u6355\u6349\u3057\u3066GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u4e00\u8cab\u6027\u3092\u4fdd\u3064\u306b\u306f\u3001 BEFORE TRUNCATE\u306e\u69cb\u6587\u30c8\u30ea\u30ac\u304c\u5fc5\u8981\u3067\u3059\u3002 \u4ee5\u4e0b\u306f\u3001PostgreSQL v12\u4ee5\u524d\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092 dpoints \u30c6\u30fc\u30d6\u30eb\u306b\u8a2d\u5b9a\u3059\u308b\u4f8b\u3067\u3059\u3002 =# create trigger row_sync after insert or update or delete on dpoints_even for row execute function pgstrom.gpucache_sync_trigger(); =# create trigger stmt_sync before truncate on dpoints_even for statement execute function pgstrom.gpucache_sync_trigger(); =# alter table dpoints_even enable always trigger row_sync; =# alter table dpoints_even enable always trigger stmt_sync; GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u884c\u30c8\u30ea\u30ac\u306b\u5f15\u6570\u3068\u3057\u3066 KEY=VALUE \u5f62\u5f0f\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u6587\u5b57\u5217\u3092\u4e0e\u3048\u308b\u4e8b\u3067\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u69cb\u6587\u30c8\u30ea\u30ac\u306e\u65b9\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u306e\u3067\u3054\u6ce8\u610f\u304f\u3060\u3055\u3044\u3002 \u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306eGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u884c\u6570\u306e\u6700\u5927\u5024\u304c250\u4e07\u884c\u3001REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306e\u30b5\u30a4\u30ba\u3092100MB\u3068\u3057\u3066\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059\u3002 =# create trigger row_sync after insert or update or delete on dpoints_even for row execute function pgstrom.gpucache_sync_trigger('max_num_rows=2500000,redo_buffer_size=100m'); \u884c\u30c8\u30ea\u30ac\u306e\u5f15\u6570\u306b\u4e0e\u3048\u308b\u4e8b\u306e\u3067\u304d\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 gpu_device_id=GPU_ID (default: 0) GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u78ba\u4fdd\u3059\u308b\u5bfe\u8c61\u306eGPU\u30c7\u30d0\u30a4\u30b9ID\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 max_num_rows=NROWS (default: 10485760) GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306b\u78ba\u4fdd\u3067\u304d\u308b\u884c\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 PostgreSQL\u30c6\u30fc\u30d6\u30eb\u3068\u540c\u69d8\u306b\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3067\u3082\u53ef\u8996\u6027\u5236\u5fa1\u306e\u305f\u3081\u306b\u30b3\u30df\u30c3\u30c8\u524d\u306e\u66f4\u65b0\u884c\u3092\u4fdd\u6301\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u305f\u3081\u3001\u3042\u308b\u7a0b\u5ea6\u306e\u4f59\u88d5\u3092\u6301\u3063\u3066 max_num_rows \u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u306a\u304a\u3001\u66f4\u65b0/\u524a\u9664\u3055\u308c\u305f\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u884c\u306f\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u30b3\u30df\u30c3\u30c8\u5f8c\u306b\u89e3\u653e\u3055\u308c\u307e\u3059\u3002 redo_buffer_size=SIZE \u3000\uff08default: 160m\uff09 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306e\u30b5\u30a4\u30ba\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u5358\u4f4d\u3068\u3057\u3066\u3001k\u3001m\u3001g\u3092\u6307\u5b9a\u3067\u304d\u308b\u3002 gpu_sync_interval=SECONDS \u3000\uff08default: 5\uff09 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u3078\u306e\u6700\u5f8c\u306e\u66f8\u304d\u8fbc\u307f\u304b\u3089 SECONDS \u79d2\u7d4c\u904e\u3059\u308b\u3068\u3001\u305f\u3068\u3048\u66f4\u65b0\u884c\u6570\u304c\u5c11\u306a\u304f\u3068\u3082\u3001REDO\u30ed\u30b0\u3092GPU\u5074\u3078\u53cd\u6620\u3057\u307e\u3059\u3002 gpu_sync_threshold=SIZE \u3000\uff08default: redo_buffer_size \u306e25%\uff09 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306e\u66f8\u304d\u8fbc\u307f\u306e\u3046\u3061\u3001\u672a\u53cd\u6620\u5206\u306e\u5927\u304d\u3055\u304c SIZE \u30d0\u30a4\u30c8\u306b\u9054\u3059\u308b\u3068\u3001GPU\u5074\u306bREDO\u30ed\u30b0\u3092\u53cd\u6620\u3057\u307e\u3059\u3002 \u5358\u4f4d\u3068\u3057\u3066k\u3001m\u3001g\u3092\u6307\u5b9a\u3067\u304d\u308b\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u30aa\u30d7\u30b7\u30e7\u30f3 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306b\u95a2\u9023\u3057\u3066\u3001\u4ee5\u4e0b\u306ePostgreSQL\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002 pg_strom.enable_gpucache \u3000\uff08default: on\uff09 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u5229\u7528\u53ef\u80fd\u3067\u3042\u308b\u5834\u5408\u3001\u691c\u7d22/\u5206\u6790\u7cfb\u306e\u30af\u30a8\u30ea\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u4f7f\u7528\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3057\u307e\u3059\u3002 \u3053\u306e\u5024\u304c off \u306b\u306a\u3063\u3066\u3044\u308b\u3068\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u5b58\u5728\u3057\u3066\u3044\u3066\u3082\u3053\u308c\u3092\u7121\u8996\u3057\u3001\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u90fd\u5ea6\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u305d\u3046\u3068\u3057\u307e\u3059\u3002 \u306a\u304a\u3001\u672c\u8a2d\u5b9a\u306f\u30c8\u30ea\u30ac\u306b\u3088\u308bREDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u3078\u306e\u8ffd\u8a18\u306b\u306f\u5f71\u97ff\u3057\u307e\u305b\u3093\u3002 pg_strom.gpucache_auto_preload \u3000\uff08default: NULL\uff09 PostgreSQL\u306e\u8d77\u52d5\u6642/\u518d\u8d77\u52d5\u6642\u306b\u3001\u672c\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u3067\u6307\u5b9a\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u306eGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u4e88\u3081\u69cb\u7bc9\u3057\u3066\u304a\u304d\u307e\u3059\u3002 \u66f8\u5f0f\u306f DATABASE_NAME.SCHEMA_NAME.TABLE_NAME \u3067\u3001\u8907\u6570\u500b\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u6307\u5b9a\u3059\u308b\u5834\u5408\u306f\u3053\u308c\u3092\u30ab\u30f3\u30de\u533a\u5207\u308a\u3067\u4e26\u3079\u307e\u3059\u3002 \u307e\u3060GPU\u30c7\u30d0\u30a4\u30b9\u4e0a\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u69cb\u7bc9\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u3001\u5bfe\u8c61\u30c6\u30fc\u30d6\u30eb\u3092\u30d5\u30eb\u30b9\u30ad\u30e3\u30f3\u3057\u3066GPU\u5074\u3078\u8ee2\u9001\u3059\u308b\u306e\u306f\u3001\u6700\u521d\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3088\u3046\u3068\u8a66\u307f\u305fPostgreSQL\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u30d7\u30ed\u30bb\u30b9\u306e\u5f79\u5272\u3067\u3059\u3002\u3053\u308c\u306f\u901a\u5e38\u3001\u76f8\u5fdc\u306e\u6642\u9593\u3092\u8981\u3059\u308b\u51e6\u7406\u3067\u3059\u304c\u3001\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u30ed\u30fc\u30c9\u3059\u3079\u304d\u30c6\u30fc\u30d6\u30eb\u3092\u8a18\u8f09\u3057\u3066\u304a\u304f\u3053\u3068\u3067\u3001\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u306e\u521d\u56de\u5b9f\u884c\u6642\u306b\u9577\u3005\u3068\u5f85\u305f\u3055\u308c\u308b\u4e8b\u3092\u6291\u6b62\u3067\u304d\u307e\u3059\u3002 \u306a\u304a\u3001\u3053\u306e\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u306b '*' \u3068\u6307\u5b9a\u3057\u305f\u5834\u5408\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6301\u3064\u5168\u3066\u306e\u30c6\u30fc\u30d6\u30eb\u306e\u5185\u5bb9\u3092\u9806\u306bGPU\u3078\u30ed\u30fc\u30c9\u3057\u3088\u3046\u3068\u8a66\u307f\u307e\u3059\u3002\u3053\u306e\u6642\u3001\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u306f\u5168\u3066\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u9806\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u304f\u4e8b\u3068\u306a\u308a\u307e\u3059\u304c\u3001postmaster\u306b\u518d\u8d77\u52d5\u3092\u4fc3\u3059\u305f\u3081\u7d42\u4e86\u30b3\u30fc\u30c9 1 \u3092\u8fd4\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u30b5\u30fc\u30d0\u306e\u8d77\u52d5\u30ed\u30b0\u306b\u300cGPUCache Startup Preloader\u300d\u304c\u7d42\u4e86\u30b3\u30fc\u30c9 1 \u3067\u7d42\u4e86\u3057\u305f\u3068\u51fa\u529b\u3055\u308c\u307e\u3059\u304c\u3001\u3053\u308c\u306f\u7570\u5e38\u3067\u306f\u3042\u308a\u307e\u305b\u3093 LOG: database system is ready to accept connections LOG: background worker \"GPUCache Startup Preloader\" (PID 856418) exited with exit code 1 LOG: background worker \"GPUCache Startup Preloader\" (PID 856427) exited with exit code 1 LOG: create GpuCacheSharedState dpoints:164c95f71 LOG: gpucache: AllocMemory dpoints:164c95f71 (main_sz=772505600, extra_sz=0) LOG: gpucache: auto preload 'public.dpoints' (DB: postgres) LOG: create GpuCacheSharedState mytest:1773a589b LOG: gpucache: auto preload 'public.mytest' (DB: postgres) LOG: gpucache: AllocMemory mytest:1773a589b (main_sz=675028992, extra_sz=0) \u904b\u7528 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u5229\u7528\u3092\u78ba\u8a8d\u3059\u308b GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u53c2\u7167\u306f\u900f\u904e\u7684\u306b\u884c\u308f\u308c\u307e\u3059\u3002\u30e6\u30fc\u30b6\u306f\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u6709\u7121\u3092\u610f\u8b58\u3059\u308b\u5fc5\u8981\u306f\u306a\u304f\u3001PG-Strom\u304c\u81ea\u52d5\u7684\u306b\u5224\u5b9a\u3057\u3066\u51e6\u7406\u3092\u5207\u308a\u66ff\u3048\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u30af\u30a8\u30ea\u5b9f\u884c\u8a08\u753b\u306f\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u8a2d\u5b9a\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb dpoints \u3078\u306e\u53c2\u7167\u3092\u542b\u3080\u3082\u306e\u3067\u3059\u3002\u4e0b\u304b\u30893\u884c\u76ee\u306e\u300cGPU Cache\u300d\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u3001\u3053\u306e\u30c6\u30fc\u30d6\u30eb\u306eGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u57fa\u672c\u7684\u306a\u60c5\u5831\u304c\u8868\u793a\u3055\u308c\u3066\u304a\u308a\u3001\u3053\u306e\u30af\u30a8\u30ea\u3067\u306f dpoints \u30c6\u30fc\u30d6\u30eb\u3092\u8aad\u307f\u51fa\u3059\u306e\u3067\u306f\u306a\u304f\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u53c2\u7167\u3057\u3066\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u308f\u304b\u308a\u307e\u3059\u3002 \u306a\u304a\u3001 max_num_rows \u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u306e\u306fGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u4fdd\u6301\u3067\u304d\u308b\u6700\u5927\u306e\u884c\u6570\u3001 main \u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u306e\u306fGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u56fa\u5b9a\u9577\u30d5\u30a3\u30fc\u30eb\u30c9\u7528\u306e\u9818\u57df\u306e\u5927\u304d\u3055\u3001 extra \u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u306e\u306f\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u7528\u306e\u9818\u57df\u306e\u5927\u304d\u3055\u3067\u3059\u3002 =# explain select pref, city, count(*) from giscity g, dpoints d where pref = 'Tokyo' and st_contains(g.geom,st_makepoint(d.x, d.y)) group by pref, city; QUERY PLAN -------------------------------------------------------------------------------------------------------- HashAggregate (cost=5638809.75..5638859.99 rows=5024 width=29) Group Key: g.pref, g.city -> Custom Scan (GpuPreAgg) (cost=5638696.71..5638759.51 rows=5024 width=29) Reduction: Local Combined GpuJoin: enabled GPU Preference: GPU0 (NVIDIA Tesla V100-PCIE-16GB) -> Custom Scan (GpuJoin) on dpoints d (cost=631923.57..5606933.23 rows=50821573 width=21) Outer Scan: dpoints d (cost=0.00..141628.18 rows=7999618 width=16) Depth 1: GpuGiSTJoin(nrows 7999618...50821573) HeapSize: 3251.36KB IndexFilter: (g.geom ~ st_makepoint(d.x, d.y)) on giscity_geom_idx JoinQuals: st_contains(g.geom, st_makepoint(d.x, d.y)) GPU Preference: GPU0 (NVIDIA Tesla V100-PCIE-16GB) GPU Cache: NVIDIA Tesla V100-PCIE-16GB [max_num_rows: 12000000, main: 772.51M, extra: 0] -> Seq Scan on giscity g (cost=0.00..8929.24 rows=6353 width=1883) Filter: ((pref)::text = 'Tokyo'::text) (16 rows) GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u72b6\u614b\u3092\u78ba\u8a8d\u3059\u308b GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u73fe\u5728\u306e\u72b6\u614b\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306f pgstrom.gpucache_info \u30d3\u30e5\u30fc\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 =# select * from pgstrom.gpucache_info ; database_oid | database_name | table_oid | table_name | signature | refcnt | corrupted | gpu_main_sz | gpu_extra_sz | redo_write_ts | redo_write_nitems | redo_write_pos | redo_read_nitems | redo_read_pos | redo_sync_pos | config_options --------------+---------------+-----------+------------+------------+--------+-----------+-------------+--------------+----------------------------+-------------------+----------------+------------------+---------------+---------------+------------------------------------------------------------------------------------------------------------------------ 12728 | postgres | 25244 | mytest | 6295279771 | 3 | f | 675028992 | 0 | 2021-05-14 03:00:18.623503 | 500000 | 36000000 | 500000 | 36000000 | 36000000 | gpu_device_id=0,max_num_rows=10485760,redo_buffer_size=167772160,gpu_sync_interval=5000000,gpu_sync_threshold=41943040 12728 | postgres | 25262 | dpoints | 5985886065 | 3 | f | 772505600 | 0 | 2021-05-14 03:00:18.524627 | 8000000 | 576000192 | 8000000 | 576000192 | 576000192 | gpu_device_id=0,max_num_rows=12000000,redo_buffer_size=167772160,gpu_sync_interval=5000000,gpu_sync_threshold=41943040 (2 rows) \u3053\u306e\u30d3\u30e5\u30fc\u3067\u8868\u793a\u3055\u308c\u308bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u72b6\u614b\u306f\u3001\u305d\u306e\u6642\u70b9\u3067\u521d\u671f\u30ed\u30fc\u30c9\u304c\u7d42\u308f\u3063\u3066\u304a\u308a\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u306b\u9818\u57df\u304c\u78ba\u4fdd\u3055\u308c\u3066\u3044\u308b\u3082\u306e\u3060\u3051\u3067\u3042\u308b\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u3064\u307e\u308a\u3001\u30c8\u30ea\u30ac\u95a2\u6570\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u304c\u521d\u671f\u30ed\u30fc\u30c9\u304c\u7d42\u308f\u3063\u3066\u3044\u306a\u3044\uff08\u307e\u3060\u8ab0\u3082\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u306a\u3044\uff09\u5834\u5408\u3001\u6f5c\u5728\u7684\u306b\u78ba\u4fdd\u3055\u308c\u3046\u308bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u307e\u3060 pgstrom.gpucache_info \u306b\u306f\u73fe\u308c\u307e\u305b\u3093\u3002 \u5404\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u610f\u5473\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 database_oid GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u5c5e\u3059\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306eOID\u3067\u3059 database_name GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u5c5e\u3059\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u540d\u524d\u3067\u3059 table_oid GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306eOID\u3067\u3059\u3002\u5fc5\u305a\u3057\u3082\u73fe\u5728\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306f\u9650\u3089\u306a\u3044\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 table_name GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u540d\u524d\u3067\u3059\u3002\u5fc5\u305a\u3057\u3082\u73fe\u5728\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306f\u9650\u3089\u306a\u3044\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 signature GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u4e00\u610f\u6027\u3092\u793a\u3059\u30cf\u30c3\u30b7\u30e5\u5024\u3067\u3059\u3002\u4f8b\u3048\u3070 ALTER TABLE \u306e\u524d\u5f8c\u306a\u3069\u3067\u3053\u306e\u5024\u304c\u5909\u308f\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 refcnt GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u53c2\u7167\u30ab\u30a6\u30f3\u30bf\u3067\u3059\u3002\u3053\u308c\u306f\u5fc5\u305a\u3057\u3082\u6700\u65b0\u306e\u5024\u3092\u53cd\u6620\u3057\u3066\u3044\u308b\u3068\u306f\u9650\u308a\u307e\u305b\u3093\u3002 corrupted GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u5185\u5bb9\u304c\u7834\u640d\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u793a\u3057\u307e\u3059\u3002 gpu_main_sz GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306b\u78ba\u4fdd\u3055\u308c\u305f\u56fa\u5b9a\u9577\u30c7\u30fc\u30bf\u7528\u306e\u9818\u57df\u306e\u30b5\u30a4\u30ba\u3067\u3059\u3002 gpu_extra_sz GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306b\u78ba\u4fdd\u3055\u308c\u305f\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u7528\u306e\u9818\u57df\u306e\u30b5\u30a4\u30ba\u3067\u3059\u3002 redo_write_ts REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u3092\u6700\u5f8c\u306b\u66f4\u65b0\u3057\u305f\u6642\u523b\u3067\u3059\u3002 redo_write_nitems REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u6570\u3067\u3059\u3002 redo_write_pos REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u30d0\u30a4\u30c8\u6570\u3067\u3059\u3002 redo_read_nitems REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u304b\u3089\u8aad\u307f\u51fa\u3057\u3001GPU\u306b\u9069\u7528\u3055\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u6570\u3067\u3059\u3002 redo_read_pos REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u304b\u3089\u8aad\u307f\u51fa\u3057\u3001GPU\u306b\u9069\u7528\u3055\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u30d0\u30a4\u30c8\u6570\u3067\u3059\u3002 redo_sync_pos REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305fREDO\u30ed\u30b0\u306e\u3046\u3061\u3001\u65e2\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3078\u306e\u9069\u7528\u3092\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u305f\u4f4d\u7f6e\u3067\u3059\u3002 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306e\u6b8b\u308a\u5bb9\u91cf\u304c\u903c\u8feb\u3057\u3066\u304d\u305f\u969b\u306b\u3001\u591a\u6570\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u540c\u6642\u306b\u975e\u540c\u671f\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u767a\u751f\u3055\u305b\u308b\u4e8b\u3092\u907f\u3051\u308b\u305f\u3081\u3001\u5185\u90e8\u7684\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002 config_options GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u6587\u5b57\u5217\u3067\u3059\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u7834\u640d\u3068\u5fa9\u5143 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306b max_num_rows \u3067\u6307\u5b9a\u3057\u305f\u4ee5\u4e0a\u306e\u884c\u6570\u3092\u633f\u5165\u3057\u3088\u3046\u3068\u3057\u305f\u308a\u3001\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u306e\u30d0\u30c3\u30d5\u30a1\u9577\u304c\u80a5\u5927\u5316\u3057\u3059\u304e\u305f\u308a\u3001 \u3068\u3044\u3063\u305f\u7406\u7531\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306bREDO\u30ed\u30b0\u3092\u9069\u7528\u3067\u304d\u306a\u304b\u3063\u305f\u5834\u5408\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u7834\u640d\uff08corrupted\uff09\u72b6\u614b\u306b\u79fb\u884c\u3057\u307e\u3059\u3002 \u4e00\u5ea6GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u7834\u640d\u3059\u308b\u3068\u3001\u3053\u308c\u3092\u624b\u52d5\u3067\u5fa9\u65e7\u3059\u308b\u307e\u3067\u306f\u3001\u691c\u7d22/\u5206\u6790\u7cfb\u306e\u30af\u30a8\u30ea\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u53c2\u7167\u3059\u308b\u4e8b\u306f\u306a\u304f\u306a\u308a\u3001 \u307e\u305f\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u66f4\u65b0\u306b\u969b\u3057\u3066\u3082REDO\u30ed\u30b0\u306e\u8a18\u9332\u3092\u884c\u308f\u306a\u304f\u306a\u308a\u307e\u3059\u3002 \uff08\u904b\u60aa\u304f\u3001\u691c\u7d22/\u5206\u6790\u7cfb\u306e\u30af\u30a8\u30ea\u304c\u5b9f\u884c\u3092\u958b\u59cb\u3057\u305f\u5f8c\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u7834\u640d\u3057\u305f\u5834\u5408\u3001\u305d\u306e\u30af\u30a8\u30ea\u306f\u30a8\u30e9\u30fc\u3092\u8fd4\u3059\u4e8b\u304c\u3042\u308a\u307e\u3059\u3002\uff09 GPU\u30d0\u30c3\u30d5\u30a1\u3092\u7834\u640d\u72b6\u614b\u304b\u3089\u5fa9\u5143\u3059\u308b\u306e\u306f pgstrom.gpucache_recovery(regclass) \u95a2\u6570\u3067\u3059\u3002 REDO\u30ed\u30b0\u3092\u9069\u7528\u3067\u304d\u306a\u304b\u3063\u305f\u539f\u56e0\u3092\u53d6\u308a\u9664\u3044\u305f\u4e0a\u3067\u3053\u306e\u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u518d\u5ea6\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u521d\u671f\u30ed\u30fc\u30c9\u3092\u884c\u3044\u3001\u5143\u306e\u72b6\u614b\u3078\u306e \u5fa9\u65e7\u3092\u8a66\u307f\u307e\u3059\u3002 \u4f8b\u3048\u3070\u3001 max_num_rows \u3067\u6307\u5b9a\u3057\u305f\u4ee5\u4e0a\u306e\u884c\u6570\u3092\u633f\u5165\u3057\u3088\u3046\u3068\u3057\u305f\u5834\u5408\u3067\u3042\u308c\u3070\u3001\u30c8\u30ea\u30ac\u306e\u5b9a\u7fa9\u3092\u5909\u66f4\u3057\u3066 max_num_rows \u8a2d\u5b9a\u3092 \u62e1\u5927\u3059\u308b\u304b\u3001\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u4e00\u90e8\u306e\u884c\u3092\u524a\u9664\u3057\u305f\u5f8c\u3067\u3001 pgstrom.gpucache_recovery() \u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u3068\u3044\u3046\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002","title":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5"},{"location":"gpucache/#gpu","text":"","title":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5"},{"location":"gpucache/#_1","text":"GPU\u306b\u306f\u30db\u30b9\u30c8\u30b7\u30b9\u30c6\u30e0\u306eRAM\u3068\u306f\u72ec\u7acb\u306a\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u304c\u642d\u8f09\u3055\u308c\u3066\u304a\u308a\u3001GPU\u3067\u8a08\u7b97\u3059\u308b\u306b\u306fPCI-E\u30d0\u30b9\u306a\u3069\u3092\u901a\u3058\u3066\u3001\u4e00\u65e6\u3001\u30db\u30b9\u30c8\u30b7\u30b9\u30c6\u30e0\u3084\u30b9\u30c8\u30ec\u30fc\u30b8\u30c7\u30d0\u30a4\u30b9\u304b\u3089\u30c7\u30fc\u30bf\u3092GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u5074\u3078\u8ee2\u9001\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 PG-Strom\u304cSQL\u30af\u30a8\u30ea\u3092GPU\u3067\u51e6\u7406\u3059\u308b\u5834\u5408\u3082\u4f8b\u5916\u3067\u306f\u306a\u304f\u3001\u5185\u90e8\u7684\u306b\u306f\u3001PostgreSQL\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u8aad\u307f\u51fa\u3057\u305f\u30ec\u30b3\u30fc\u30c9\u3092GPU\u3078\u3068\u8ee2\u9001\u3057\u3001\u305d\u306e\u4e0a\u3067GPU\u3067SQL\u306e\u5404\u7a2e\u51e6\u7406\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 \u3057\u304b\u3057\u3053\u308c\u3089\u306e\u51e6\u7406\u306b\u306f\u3001\u591a\u304b\u308c\u5c11\u306a\u304b\u308c\u30c6\u30fc\u30d6\u30eb\u306e\u8aad\u307f\u51fa\u3057\u3084\u30c7\u30fc\u30bf\u306e\u8ee2\u9001\u306b\u6642\u9593\u3092\u8981\u3057\u307e\u3059\uff08\u591a\u304f\u306e\u5834\u5408\u3001GPU\u3067\u306e\u51e6\u7406\u3088\u308a\u3082\u9065\u304b\u306b\u9577\u3044\u6642\u9593\u306e\uff01\uff09\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\uff08GPU Cache\uff09\u3068\u306f\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u306b\u4e88\u3081\u9818\u57df\u3092\u78ba\u4fdd\u3057\u3066\u304a\u304d\u3001\u305d\u3053\u306bPostgreSQL\u30c6\u30fc\u30d6\u30eb\u306e\u8907\u88fd\u3092\u4fdd\u6301\u3057\u3066\u304a\u304f\u6a5f\u80fd\u3067\u3059\u3002 \u6bd4\u8f03\u7684\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\u306e\u5c0f\u3055\u306a\uff08\uff5e10GB\u7a0b\u5ea6\uff09\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3067\u3001\u66f4\u65b0\u983b\u5ea6\u304c\u9ad8\u3044\u3046\u3048\u306b\u3001\u3057\u3070\u3057\u3070\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306e\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u691c\u7d22/\u5206\u6790\u7cfb\u306eSQL\u3092\u5b9f\u884c\u3059\u308b\u3068\u3044\u3046\u30d1\u30bf\u30fc\u30f3\u3092\u610f\u56f3\u3057\u3066\u3044\u307e\u3059\u3002 \u5f8c\u8ff0\u3059\u308b\u30ed\u30b0\u30d9\u30fc\u30b9\u306e\u540c\u671f\u30e1\u30ab\u30cb\u30ba\u30e0\u306b\u3088\u308a\u3001\u4e26\u5217\u5ea6\u306e\u9ad8\u3044\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30ca\u30eb\u306a\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u59a8\u3052\u308b\u3053\u3068\u306a\u304fGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6700\u65b0\u306e\u72b6\u614b\u306b\u4fdd\u3064\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 \u305d\u306e\u4e00\u65b9\u3067\u3001\u691c\u7d22/\u5206\u6790\u7cfb\u306eSQL\u3092\u5b9f\u884c\u3059\u308b\u969b\u306b\u306f\u65e2\u306bGPU\u4e0a\u306b\u30c7\u30fc\u30bf\u304c\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u6539\u3081\u3066\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u30ec\u30b3\u30fc\u30c9\u3092\u8aad\u307f\u51fa\u3057\u305f\u308a\u3001PCI-E\u30d0\u30b9\u3092\u4ecb\u3057\u3066\u30c7\u30fc\u30bf\u3092\u8ee2\u9001\u3057\u305f\u308a\u3059\u308b\u4e8b\u306a\u304f\u3001SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u5178\u578b\u7684\u306a\u5229\u7528\u30b7\u30fc\u30f3\u3068\u3057\u3066\u306f\u3001\u81ea\u52d5\u8eca\u3084\u643a\u5e2f\u96fb\u8a71\u3068\u3044\u3063\u305f\u30e2\u30d0\u30a4\u30eb\u30c7\u30d0\u30a4\u30b9\u306e\u4f4d\u7f6e\u60c5\u5831\uff08\u73fe\u5728\u4f4d\u7f6e\uff09\u3092\u6642\u3005\u523b\u3005\u53ce\u96c6\u3057\u3001 GPU\u7248PostGIS \u306a\u3069\u3092\u7528\u3044\u3066\u4ed6\u306e\u30c7\u30fc\u30bf\u3068\u7a81\u304d\u5408\u308f\u305b\u308b\u3068\u3044\u3063\u305f\u30b1\u30fc\u30b9\u304c\u8003\u3048\u3089\u308c\u307e\u3059\u3002 \u591a\u6570\u306e\u30c7\u30d0\u30a4\u30b9\u304b\u3089\u9001\u51fa\u3055\u308c\u308b\u4f4d\u7f6e\u60c5\u5831\u306e\u66f4\u65b0\u306f\u6975\u3081\u3066\u66f4\u65b0\u30d8\u30d3\u30fc\u306a\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3067\u3059\u304c\u3001\u4e00\u65b9\u3067\u3001\u6700\u65b0\u306e\u4f4d\u7f6e\u60c5\u5831\u306b\u57fa\u3065\u3044\u3066\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u3082\u3042\u308b\u305f\u3081\u3001\u3053\u308c\u3089\u66f4\u65b0\u30c7\u30fc\u30bf\u3092\u9045\u6ede\u306a\u304fGPU\u5074\u3078\u9069\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\u306b\u306f\u5236\u7d04\u304c\u3042\u308a\u307e\u3059\u304c\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u9ad8\u983b\u5ea6\u306e\u66f4\u65b0\u3068\u3001\u9ad8\u6027\u80fd\u306a\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u3092\u4e21\u7acb\u3059\u308b\u4e00\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3059\u3002","title":"\u6982\u8981"},{"location":"gpucache/#_2","text":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3067\u306f\u3001\u4e26\u5217\u5ea6\u306e\u9ad8\u3044\u66f4\u65b0\u7cfb\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u5bfe\u5fdc\u3059\u308b\u3053\u3068\u3068\u3001\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u304c\u5e38\u306b\u6700\u65b0\u306e\u30c7\u30fc\u30bf\u3092\u53c2\u7167\u3059\u308b\u3068\u3044\u30462\u3064\u306e\u8981\u4ef6\u3092\u30af\u30ea\u30a2\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u591a\u304f\u306e\u30b7\u30b9\u30c6\u30e0\u3067\u306fCPU\u3068GPU\u306fPCI-E\u30d0\u30b9\u3092\u4ecb\u3057\u3066\u63a5\u7d9a\u3055\u308c\u3001\u305d\u306e\u901a\u4fe1\u306b\u306f\u76f8\u5fdc\u306e\u30ec\u30a4\u30c6\u30f3\u30b7\u304c\u767a\u751f\u3057\u307e\u3059\u3002 \u305d\u306e\u305f\u3081\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u5bfe\u8c61\u30c6\u30fc\u30d6\u30eb\u304c1\u884c\u66f4\u65b0\u3055\u308c\u308b\u305f\u3073\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u540c\u671f\u3057\u3066\u3044\u3066\u306f\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u6027\u80fd\u306b\u5927\u304d\u306a\u5f71\u97ff\u3092\u4e0e\u3048\u3066\u3057\u307e\u3044\u307e\u3059\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u4f5c\u6210\u3059\u308b\u3068\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u306b\u30ad\u30e3\u30c3\u30b7\u30e5\u7528\u306e\u30e1\u30e2\u30ea\u9818\u57df\u3092\u78ba\u4fdd\u3059\u308b\u3060\u3051\u3067\u306a\u304f\u3001\u30db\u30b9\u30c8\u5074\u5171\u6709\u30e1\u30e2\u30ea\u4e0a\u306bREDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \u30c6\u30fc\u30d6\u30eb\u306e\u66f4\u65b0\u3092\u4f34\u3046SQL\u30b3\u30de\u30f3\u30c9\uff08INSERT\u3001UPDATE\u3001DELETE\uff09\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001AFTER ROW\u30c8\u30ea\u30ac\u306b\u3088\u3063\u3066\u66f4\u65b0\u5185\u5bb9\u304cREDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u30b3\u30d4\u30fc\u3055\u308c\u307e\u3059\u304c\u3001\u3053\u306e\u51e6\u7406\u306fGPU\u3078\u306e\u547c\u3073\u51fa\u3057\u3092\u4f34\u308f\u306a\u3044\u3001CPU\u3068RAM\u3060\u3051\u3067\u5b8c\u7d50\u3059\u308b\u51e6\u7406\u3067\u3059\u306e\u3067\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u6027\u80fd\u3078\u306e\u5f71\u97ff\u306f\u307b\u3068\u3093\u3069\u3042\u308a\u307e\u305b\u3093\u3002 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u672a\u9069\u7528\u306eREDO\u30ed\u30b0\u304c\u4e00\u5b9a\u91cf\u305f\u307e\u308b\u304b\u3001\u6700\u5f8c\u306e\u66f8\u304d\u8fbc\u307f\u304b\u3089\u4e00\u5b9a\u6642\u9593\u304c\u7d4c\u904e\u3059\u308b\u3068\u3001\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\uff08GPU memory keeper\uff09\u306b\u3088\u3063\u3066\u672a\u9069\u7528\u306eREDO\u30ed\u30b0\u306fGPU\u3078\u30ed\u30fc\u30c9\u3055\u308c\u3001\u66f4\u65b0\u5dee\u5206\u3092GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306b\u9069\u7528\u3057\u307e\u3059\u3002 \u3053\u306e\u6642\u3001REDO\u30ed\u30b0\u306f\u307e\u3068\u3081\u3066GPU\u306b\u8ee2\u9001\u3055\u308c\u3001\u3055\u3089\u306bGPU\u306e\u6570\u5343\u30d7\u30ed\u30bb\u30c3\u30b5\u30b3\u30a2\u304c\u4e26\u5217\u306bREDO\u30ed\u30b0\u3092\u9069\u7528\u3059\u308b\u305f\u3081\u3001\u901a\u5e38\u306f\u51e6\u7406\u9045\u5ef6\u304c\u554f\u984c\u3068\u306a\u308b\u4e8b\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u5bfe\u8c61\u30c6\u30fc\u30d6\u30eb\u3092\u53c2\u7167\u3059\u308b\u969b\u306b\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u3057\u3066GPU\u306b\u30ed\u30fc\u30c9\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u65e2\u306bGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u306b\u5272\u5f53\u3066\u6e08\u307f\u306eGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u30de\u30c3\u30d4\u30f3\u30b0\u3057\u3066\u5229\u7528\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u5148\u7acb\u3063\u3066\u3001\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u958b\u59cb\u6642\u70b9\u3067\u672a\u9069\u7528\u306eREDO\u30ed\u30b0\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u3001\u3053\u308c\u3089\u306f\u5168\u3066\u3001\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u524d\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3078\u9069\u7528\u3055\u308c\u307e\u3059\u3002 \u305d\u306e\u305f\u3081\u3001\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u304c\u5bfe\u8c61\u306eGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u305f\u7d50\u679c\u306f\u3001\u76f4\u63a5\u30c6\u30fc\u30d6\u30eb\u3092\u53c2\u7167\u3057\u305f\u5834\u5408\u3068\u540c\u3058\u7d50\u679c\u3092\u8fd4\u3059\u4e8b\u3068\u306a\u308a\u3001\u554f\u3044\u5408\u308f\u305b\u306e\u4e00\u8cab\u6027\u306f\u5e38\u306b\u4fdd\u6301\u3055\u308c\u3066\u3044\u307e\u3059\u3002","title":"\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3"},{"location":"gpucache/#_3","text":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6709\u52b9\u306b\u3059\u308b\u306b\u306f\u3001\u5bfe\u8c61\u3068\u306a\u308b\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066 pgstrom.gpucache_sync_trigger() \u95a2\u6570\u3092\u5b9f\u884c\u3059\u308bAFTER INSERT OR UPDATE OR DELETE\u306e\u884c\u30c8\u30ea\u30ac\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002 \u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30b9\u30ec\u30fc\u30d6\u5074\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001\u3053\u306e\u30c8\u30ea\u30ac\u306e\u767a\u884c\u30e2\u30fc\u30c9\u304c ALWAYS \u3067\u3042\u308b\u4e8b\u304c\u5fc5\u8981\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u30c6\u30fc\u30d6\u30eb dpoints \u306b\u5bfe\u3057\u3066GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3059\u308b\u4f8b\u3067\u3059\u3002 =# create trigger row_sync after insert or update or delete on dpoints_even for row execute function pgstrom.gpucache_sync_trigger(); =# alter table dpoints_even enable always trigger row_sync; Note PostgreSQL v12.x \u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u304a\u3051\u308b\u8ffd\u52a0\u8a2d\u5b9a PostgreSQL v12\u304a\u3088\u3073\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u3001\u4e0a\u8a18\u306e\u30c8\u30ea\u30ac\u306b\u52a0\u3048\u3066\u3001 pgstrom.gpucache_sync_trigger() \u95a2\u6570\u3092\u5b9f\u884c\u3059\u308bBEFORE TRUNCATE\u306e\u69cb\u6587\u30c8\u30ea\u30ac\u306e\u8a2d\u5b9a\u304c\u5fc5\u8981\u3067\u3059\u3002 \u30ec\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30b9\u30ec\u30fc\u30d6\u5074\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u5b9f\u884c\u3059\u308b\u5834\u5408\u3001\u540c\u69d8\u306b\u3001\u3053\u306e\u30c8\u30ea\u30ac\u306e\u767a\u884c\u30e2\u30fc\u30c9\u304c ALWAYS \u3067\u3042\u308b\u4e8b\u304c\u5fc5\u8981\u3067\u3059\u3002 PostgreSQL v13\u3067\u306fObject Access Hook\u304c\u62e1\u5f35\u3055\u308c\u3001\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u30c8\u30ea\u30ac\u8a2d\u5b9a\u306a\u3057\u3067 TRUNCATE\u306e\u5b9f\u884c\u3092\u6355\u6349\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u3057\u304b\u3057\u305d\u308c\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u3001TRUNCATE\u3092\u6355\u6349\u3057\u3066GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u4e00\u8cab\u6027\u3092\u4fdd\u3064\u306b\u306f\u3001 BEFORE TRUNCATE\u306e\u69cb\u6587\u30c8\u30ea\u30ac\u304c\u5fc5\u8981\u3067\u3059\u3002 \u4ee5\u4e0b\u306f\u3001PostgreSQL v12\u4ee5\u524d\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092 dpoints \u30c6\u30fc\u30d6\u30eb\u306b\u8a2d\u5b9a\u3059\u308b\u4f8b\u3067\u3059\u3002 =# create trigger row_sync after insert or update or delete on dpoints_even for row execute function pgstrom.gpucache_sync_trigger(); =# create trigger stmt_sync before truncate on dpoints_even for statement execute function pgstrom.gpucache_sync_trigger(); =# alter table dpoints_even enable always trigger row_sync; =# alter table dpoints_even enable always trigger stmt_sync;","title":"\u8a2d\u5b9a"},{"location":"gpucache/#gpu_1","text":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u884c\u30c8\u30ea\u30ac\u306b\u5f15\u6570\u3068\u3057\u3066 KEY=VALUE \u5f62\u5f0f\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u6587\u5b57\u5217\u3092\u4e0e\u3048\u308b\u4e8b\u3067\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u69cb\u6587\u30c8\u30ea\u30ac\u306e\u65b9\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u306e\u3067\u3054\u6ce8\u610f\u304f\u3060\u3055\u3044\u3002 \u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306eGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u884c\u6570\u306e\u6700\u5927\u5024\u304c250\u4e07\u884c\u3001REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306e\u30b5\u30a4\u30ba\u3092100MB\u3068\u3057\u3066\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059\u3002 =# create trigger row_sync after insert or update or delete on dpoints_even for row execute function pgstrom.gpucache_sync_trigger('max_num_rows=2500000,redo_buffer_size=100m'); \u884c\u30c8\u30ea\u30ac\u306e\u5f15\u6570\u306b\u4e0e\u3048\u308b\u4e8b\u306e\u3067\u304d\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 gpu_device_id=GPU_ID (default: 0) GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u78ba\u4fdd\u3059\u308b\u5bfe\u8c61\u306eGPU\u30c7\u30d0\u30a4\u30b9ID\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 max_num_rows=NROWS (default: 10485760) GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306b\u78ba\u4fdd\u3067\u304d\u308b\u884c\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 PostgreSQL\u30c6\u30fc\u30d6\u30eb\u3068\u540c\u69d8\u306b\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3067\u3082\u53ef\u8996\u6027\u5236\u5fa1\u306e\u305f\u3081\u306b\u30b3\u30df\u30c3\u30c8\u524d\u306e\u66f4\u65b0\u884c\u3092\u4fdd\u6301\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u305f\u3081\u3001\u3042\u308b\u7a0b\u5ea6\u306e\u4f59\u88d5\u3092\u6301\u3063\u3066 max_num_rows \u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u306a\u304a\u3001\u66f4\u65b0/\u524a\u9664\u3055\u308c\u305f\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u884c\u306f\u3001\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u30b3\u30df\u30c3\u30c8\u5f8c\u306b\u89e3\u653e\u3055\u308c\u307e\u3059\u3002 redo_buffer_size=SIZE \u3000\uff08default: 160m\uff09 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306e\u30b5\u30a4\u30ba\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u5358\u4f4d\u3068\u3057\u3066\u3001k\u3001m\u3001g\u3092\u6307\u5b9a\u3067\u304d\u308b\u3002 gpu_sync_interval=SECONDS \u3000\uff08default: 5\uff09 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u3078\u306e\u6700\u5f8c\u306e\u66f8\u304d\u8fbc\u307f\u304b\u3089 SECONDS \u79d2\u7d4c\u904e\u3059\u308b\u3068\u3001\u305f\u3068\u3048\u66f4\u65b0\u884c\u6570\u304c\u5c11\u306a\u304f\u3068\u3082\u3001REDO\u30ed\u30b0\u3092GPU\u5074\u3078\u53cd\u6620\u3057\u307e\u3059\u3002 gpu_sync_threshold=SIZE \u3000\uff08default: redo_buffer_size \u306e25%\uff09 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306e\u66f8\u304d\u8fbc\u307f\u306e\u3046\u3061\u3001\u672a\u53cd\u6620\u5206\u306e\u5927\u304d\u3055\u304c SIZE \u30d0\u30a4\u30c8\u306b\u9054\u3059\u308b\u3068\u3001GPU\u5074\u306bREDO\u30ed\u30b0\u3092\u53cd\u6620\u3057\u307e\u3059\u3002 \u5358\u4f4d\u3068\u3057\u3066k\u3001m\u3001g\u3092\u6307\u5b9a\u3067\u304d\u308b\u3002","title":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba"},{"location":"gpucache/#gpu_2","text":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306b\u95a2\u9023\u3057\u3066\u3001\u4ee5\u4e0b\u306ePostgreSQL\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002 pg_strom.enable_gpucache \u3000\uff08default: on\uff09 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u5229\u7528\u53ef\u80fd\u3067\u3042\u308b\u5834\u5408\u3001\u691c\u7d22/\u5206\u6790\u7cfb\u306e\u30af\u30a8\u30ea\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u4f7f\u7528\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3057\u307e\u3059\u3002 \u3053\u306e\u5024\u304c off \u306b\u306a\u3063\u3066\u3044\u308b\u3068\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u5b58\u5728\u3057\u3066\u3044\u3066\u3082\u3053\u308c\u3092\u7121\u8996\u3057\u3001\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u90fd\u5ea6\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u305d\u3046\u3068\u3057\u307e\u3059\u3002 \u306a\u304a\u3001\u672c\u8a2d\u5b9a\u306f\u30c8\u30ea\u30ac\u306b\u3088\u308bREDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u3078\u306e\u8ffd\u8a18\u306b\u306f\u5f71\u97ff\u3057\u307e\u305b\u3093\u3002 pg_strom.gpucache_auto_preload \u3000\uff08default: NULL\uff09 PostgreSQL\u306e\u8d77\u52d5\u6642/\u518d\u8d77\u52d5\u6642\u306b\u3001\u672c\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u3067\u6307\u5b9a\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u306eGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u4e88\u3081\u69cb\u7bc9\u3057\u3066\u304a\u304d\u307e\u3059\u3002 \u66f8\u5f0f\u306f DATABASE_NAME.SCHEMA_NAME.TABLE_NAME \u3067\u3001\u8907\u6570\u500b\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u6307\u5b9a\u3059\u308b\u5834\u5408\u306f\u3053\u308c\u3092\u30ab\u30f3\u30de\u533a\u5207\u308a\u3067\u4e26\u3079\u307e\u3059\u3002 \u307e\u3060GPU\u30c7\u30d0\u30a4\u30b9\u4e0a\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u69cb\u7bc9\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u3001\u5bfe\u8c61\u30c6\u30fc\u30d6\u30eb\u3092\u30d5\u30eb\u30b9\u30ad\u30e3\u30f3\u3057\u3066GPU\u5074\u3078\u8ee2\u9001\u3059\u308b\u306e\u306f\u3001\u6700\u521d\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3088\u3046\u3068\u8a66\u307f\u305fPostgreSQL\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u30d7\u30ed\u30bb\u30b9\u306e\u5f79\u5272\u3067\u3059\u3002\u3053\u308c\u306f\u901a\u5e38\u3001\u76f8\u5fdc\u306e\u6642\u9593\u3092\u8981\u3059\u308b\u51e6\u7406\u3067\u3059\u304c\u3001\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u30ed\u30fc\u30c9\u3059\u3079\u304d\u30c6\u30fc\u30d6\u30eb\u3092\u8a18\u8f09\u3057\u3066\u304a\u304f\u3053\u3068\u3067\u3001\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u306e\u521d\u56de\u5b9f\u884c\u6642\u306b\u9577\u3005\u3068\u5f85\u305f\u3055\u308c\u308b\u4e8b\u3092\u6291\u6b62\u3067\u304d\u307e\u3059\u3002 \u306a\u304a\u3001\u3053\u306e\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u306b '*' \u3068\u6307\u5b9a\u3057\u305f\u5834\u5408\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6301\u3064\u5168\u3066\u306e\u30c6\u30fc\u30d6\u30eb\u306e\u5185\u5bb9\u3092\u9806\u306bGPU\u3078\u30ed\u30fc\u30c9\u3057\u3088\u3046\u3068\u8a66\u307f\u307e\u3059\u3002\u3053\u306e\u6642\u3001\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u306f\u5168\u3066\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u9806\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u304f\u4e8b\u3068\u306a\u308a\u307e\u3059\u304c\u3001postmaster\u306b\u518d\u8d77\u52d5\u3092\u4fc3\u3059\u305f\u3081\u7d42\u4e86\u30b3\u30fc\u30c9 1 \u3092\u8fd4\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u30b5\u30fc\u30d0\u306e\u8d77\u52d5\u30ed\u30b0\u306b\u300cGPUCache Startup Preloader\u300d\u304c\u7d42\u4e86\u30b3\u30fc\u30c9 1 \u3067\u7d42\u4e86\u3057\u305f\u3068\u51fa\u529b\u3055\u308c\u307e\u3059\u304c\u3001\u3053\u308c\u306f\u7570\u5e38\u3067\u306f\u3042\u308a\u307e\u305b\u3093 LOG: database system is ready to accept connections LOG: background worker \"GPUCache Startup Preloader\" (PID 856418) exited with exit code 1 LOG: background worker \"GPUCache Startup Preloader\" (PID 856427) exited with exit code 1 LOG: create GpuCacheSharedState dpoints:164c95f71 LOG: gpucache: AllocMemory dpoints:164c95f71 (main_sz=772505600, extra_sz=0) LOG: gpucache: auto preload 'public.dpoints' (DB: postgres) LOG: create GpuCacheSharedState mytest:1773a589b LOG: gpucache: auto preload 'public.mytest' (DB: postgres) LOG: gpucache: AllocMemory mytest:1773a589b (main_sz=675028992, extra_sz=0)","title":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u30aa\u30d7\u30b7\u30e7\u30f3"},{"location":"gpucache/#_4","text":"","title":"\u904b\u7528"},{"location":"gpucache/#gpu_3","text":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u53c2\u7167\u306f\u900f\u904e\u7684\u306b\u884c\u308f\u308c\u307e\u3059\u3002\u30e6\u30fc\u30b6\u306f\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u6709\u7121\u3092\u610f\u8b58\u3059\u308b\u5fc5\u8981\u306f\u306a\u304f\u3001PG-Strom\u304c\u81ea\u52d5\u7684\u306b\u5224\u5b9a\u3057\u3066\u51e6\u7406\u3092\u5207\u308a\u66ff\u3048\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u30af\u30a8\u30ea\u5b9f\u884c\u8a08\u753b\u306f\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u8a2d\u5b9a\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb dpoints \u3078\u306e\u53c2\u7167\u3092\u542b\u3080\u3082\u306e\u3067\u3059\u3002\u4e0b\u304b\u30893\u884c\u76ee\u306e\u300cGPU Cache\u300d\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u3001\u3053\u306e\u30c6\u30fc\u30d6\u30eb\u306eGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u57fa\u672c\u7684\u306a\u60c5\u5831\u304c\u8868\u793a\u3055\u308c\u3066\u304a\u308a\u3001\u3053\u306e\u30af\u30a8\u30ea\u3067\u306f dpoints \u30c6\u30fc\u30d6\u30eb\u3092\u8aad\u307f\u51fa\u3059\u306e\u3067\u306f\u306a\u304f\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u53c2\u7167\u3057\u3066\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u308f\u304b\u308a\u307e\u3059\u3002 \u306a\u304a\u3001 max_num_rows \u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u306e\u306fGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u4fdd\u6301\u3067\u304d\u308b\u6700\u5927\u306e\u884c\u6570\u3001 main \u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u306e\u306fGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u56fa\u5b9a\u9577\u30d5\u30a3\u30fc\u30eb\u30c9\u7528\u306e\u9818\u57df\u306e\u5927\u304d\u3055\u3001 extra \u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u306e\u306f\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u7528\u306e\u9818\u57df\u306e\u5927\u304d\u3055\u3067\u3059\u3002 =# explain select pref, city, count(*) from giscity g, dpoints d where pref = 'Tokyo' and st_contains(g.geom,st_makepoint(d.x, d.y)) group by pref, city; QUERY PLAN -------------------------------------------------------------------------------------------------------- HashAggregate (cost=5638809.75..5638859.99 rows=5024 width=29) Group Key: g.pref, g.city -> Custom Scan (GpuPreAgg) (cost=5638696.71..5638759.51 rows=5024 width=29) Reduction: Local Combined GpuJoin: enabled GPU Preference: GPU0 (NVIDIA Tesla V100-PCIE-16GB) -> Custom Scan (GpuJoin) on dpoints d (cost=631923.57..5606933.23 rows=50821573 width=21) Outer Scan: dpoints d (cost=0.00..141628.18 rows=7999618 width=16) Depth 1: GpuGiSTJoin(nrows 7999618...50821573) HeapSize: 3251.36KB IndexFilter: (g.geom ~ st_makepoint(d.x, d.y)) on giscity_geom_idx JoinQuals: st_contains(g.geom, st_makepoint(d.x, d.y)) GPU Preference: GPU0 (NVIDIA Tesla V100-PCIE-16GB) GPU Cache: NVIDIA Tesla V100-PCIE-16GB [max_num_rows: 12000000, main: 772.51M, extra: 0] -> Seq Scan on giscity g (cost=0.00..8929.24 rows=6353 width=1883) Filter: ((pref)::text = 'Tokyo'::text) (16 rows)","title":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u5229\u7528\u3092\u78ba\u8a8d\u3059\u308b"},{"location":"gpucache/#gpu_4","text":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u73fe\u5728\u306e\u72b6\u614b\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306f pgstrom.gpucache_info \u30d3\u30e5\u30fc\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 =# select * from pgstrom.gpucache_info ; database_oid | database_name | table_oid | table_name | signature | refcnt | corrupted | gpu_main_sz | gpu_extra_sz | redo_write_ts | redo_write_nitems | redo_write_pos | redo_read_nitems | redo_read_pos | redo_sync_pos | config_options --------------+---------------+-----------+------------+------------+--------+-----------+-------------+--------------+----------------------------+-------------------+----------------+------------------+---------------+---------------+------------------------------------------------------------------------------------------------------------------------ 12728 | postgres | 25244 | mytest | 6295279771 | 3 | f | 675028992 | 0 | 2021-05-14 03:00:18.623503 | 500000 | 36000000 | 500000 | 36000000 | 36000000 | gpu_device_id=0,max_num_rows=10485760,redo_buffer_size=167772160,gpu_sync_interval=5000000,gpu_sync_threshold=41943040 12728 | postgres | 25262 | dpoints | 5985886065 | 3 | f | 772505600 | 0 | 2021-05-14 03:00:18.524627 | 8000000 | 576000192 | 8000000 | 576000192 | 576000192 | gpu_device_id=0,max_num_rows=12000000,redo_buffer_size=167772160,gpu_sync_interval=5000000,gpu_sync_threshold=41943040 (2 rows) \u3053\u306e\u30d3\u30e5\u30fc\u3067\u8868\u793a\u3055\u308c\u308bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u72b6\u614b\u306f\u3001\u305d\u306e\u6642\u70b9\u3067\u521d\u671f\u30ed\u30fc\u30c9\u304c\u7d42\u308f\u3063\u3066\u304a\u308a\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u306b\u9818\u57df\u304c\u78ba\u4fdd\u3055\u308c\u3066\u3044\u308b\u3082\u306e\u3060\u3051\u3067\u3042\u308b\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u3064\u307e\u308a\u3001\u30c8\u30ea\u30ac\u95a2\u6570\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u304c\u521d\u671f\u30ed\u30fc\u30c9\u304c\u7d42\u308f\u3063\u3066\u3044\u306a\u3044\uff08\u307e\u3060\u8ab0\u3082\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3044\u306a\u3044\uff09\u5834\u5408\u3001\u6f5c\u5728\u7684\u306b\u78ba\u4fdd\u3055\u308c\u3046\u308bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u307e\u3060 pgstrom.gpucache_info \u306b\u306f\u73fe\u308c\u307e\u305b\u3093\u3002 \u5404\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u610f\u5473\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 database_oid GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u5c5e\u3059\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306eOID\u3067\u3059 database_name GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u5c5e\u3059\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u540d\u524d\u3067\u3059 table_oid GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306eOID\u3067\u3059\u3002\u5fc5\u305a\u3057\u3082\u73fe\u5728\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306f\u9650\u3089\u306a\u3044\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 table_name GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u540d\u524d\u3067\u3059\u3002\u5fc5\u305a\u3057\u3082\u73fe\u5728\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306f\u9650\u3089\u306a\u3044\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 signature GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u4e00\u610f\u6027\u3092\u793a\u3059\u30cf\u30c3\u30b7\u30e5\u5024\u3067\u3059\u3002\u4f8b\u3048\u3070 ALTER TABLE \u306e\u524d\u5f8c\u306a\u3069\u3067\u3053\u306e\u5024\u304c\u5909\u308f\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 refcnt GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u53c2\u7167\u30ab\u30a6\u30f3\u30bf\u3067\u3059\u3002\u3053\u308c\u306f\u5fc5\u305a\u3057\u3082\u6700\u65b0\u306e\u5024\u3092\u53cd\u6620\u3057\u3066\u3044\u308b\u3068\u306f\u9650\u308a\u307e\u305b\u3093\u3002 corrupted GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u5185\u5bb9\u304c\u7834\u640d\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u793a\u3057\u307e\u3059\u3002 gpu_main_sz GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306b\u78ba\u4fdd\u3055\u308c\u305f\u56fa\u5b9a\u9577\u30c7\u30fc\u30bf\u7528\u306e\u9818\u57df\u306e\u30b5\u30a4\u30ba\u3067\u3059\u3002 gpu_extra_sz GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306b\u78ba\u4fdd\u3055\u308c\u305f\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u7528\u306e\u9818\u57df\u306e\u30b5\u30a4\u30ba\u3067\u3059\u3002 redo_write_ts REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u3092\u6700\u5f8c\u306b\u66f4\u65b0\u3057\u305f\u6642\u523b\u3067\u3059\u3002 redo_write_nitems REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u6570\u3067\u3059\u3002 redo_write_pos REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u30d0\u30a4\u30c8\u6570\u3067\u3059\u3002 redo_read_nitems REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u304b\u3089\u8aad\u307f\u51fa\u3057\u3001GPU\u306b\u9069\u7528\u3055\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u6570\u3067\u3059\u3002 redo_read_pos REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u304b\u3089\u8aad\u307f\u51fa\u3057\u3001GPU\u306b\u9069\u7528\u3055\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u30d0\u30a4\u30c8\u6570\u3067\u3059\u3002 redo_sync_pos REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305fREDO\u30ed\u30b0\u306e\u3046\u3061\u3001\u65e2\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3078\u306e\u9069\u7528\u3092\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u305f\u4f4d\u7f6e\u3067\u3059\u3002 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306e\u6b8b\u308a\u5bb9\u91cf\u304c\u903c\u8feb\u3057\u3066\u304d\u305f\u969b\u306b\u3001\u591a\u6570\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u540c\u6642\u306b\u975e\u540c\u671f\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u767a\u751f\u3055\u305b\u308b\u4e8b\u3092\u907f\u3051\u308b\u305f\u3081\u3001\u5185\u90e8\u7684\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002 config_options GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u6587\u5b57\u5217\u3067\u3059\u3002","title":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u72b6\u614b\u3092\u78ba\u8a8d\u3059\u308b"},{"location":"gpucache/#gpu_5","text":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306b max_num_rows \u3067\u6307\u5b9a\u3057\u305f\u4ee5\u4e0a\u306e\u884c\u6570\u3092\u633f\u5165\u3057\u3088\u3046\u3068\u3057\u305f\u308a\u3001\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u306e\u30d0\u30c3\u30d5\u30a1\u9577\u304c\u80a5\u5927\u5316\u3057\u3059\u304e\u305f\u308a\u3001 \u3068\u3044\u3063\u305f\u7406\u7531\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306bREDO\u30ed\u30b0\u3092\u9069\u7528\u3067\u304d\u306a\u304b\u3063\u305f\u5834\u5408\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u7834\u640d\uff08corrupted\uff09\u72b6\u614b\u306b\u79fb\u884c\u3057\u307e\u3059\u3002 \u4e00\u5ea6GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u7834\u640d\u3059\u308b\u3068\u3001\u3053\u308c\u3092\u624b\u52d5\u3067\u5fa9\u65e7\u3059\u308b\u307e\u3067\u306f\u3001\u691c\u7d22/\u5206\u6790\u7cfb\u306e\u30af\u30a8\u30ea\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u53c2\u7167\u3059\u308b\u4e8b\u306f\u306a\u304f\u306a\u308a\u3001 \u307e\u305f\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u66f4\u65b0\u306b\u969b\u3057\u3066\u3082REDO\u30ed\u30b0\u306e\u8a18\u9332\u3092\u884c\u308f\u306a\u304f\u306a\u308a\u307e\u3059\u3002 \uff08\u904b\u60aa\u304f\u3001\u691c\u7d22/\u5206\u6790\u7cfb\u306e\u30af\u30a8\u30ea\u304c\u5b9f\u884c\u3092\u958b\u59cb\u3057\u305f\u5f8c\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u7834\u640d\u3057\u305f\u5834\u5408\u3001\u305d\u306e\u30af\u30a8\u30ea\u306f\u30a8\u30e9\u30fc\u3092\u8fd4\u3059\u4e8b\u304c\u3042\u308a\u307e\u3059\u3002\uff09 GPU\u30d0\u30c3\u30d5\u30a1\u3092\u7834\u640d\u72b6\u614b\u304b\u3089\u5fa9\u5143\u3059\u308b\u306e\u306f pgstrom.gpucache_recovery(regclass) \u95a2\u6570\u3067\u3059\u3002 REDO\u30ed\u30b0\u3092\u9069\u7528\u3067\u304d\u306a\u304b\u3063\u305f\u539f\u56e0\u3092\u53d6\u308a\u9664\u3044\u305f\u4e0a\u3067\u3053\u306e\u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u518d\u5ea6\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u521d\u671f\u30ed\u30fc\u30c9\u3092\u884c\u3044\u3001\u5143\u306e\u72b6\u614b\u3078\u306e \u5fa9\u65e7\u3092\u8a66\u307f\u307e\u3059\u3002 \u4f8b\u3048\u3070\u3001 max_num_rows \u3067\u6307\u5b9a\u3057\u305f\u4ee5\u4e0a\u306e\u884c\u6570\u3092\u633f\u5165\u3057\u3088\u3046\u3068\u3057\u305f\u5834\u5408\u3067\u3042\u308c\u3070\u3001\u30c8\u30ea\u30ac\u306e\u5b9a\u7fa9\u3092\u5909\u66f4\u3057\u3066 max_num_rows \u8a2d\u5b9a\u3092 \u62e1\u5927\u3059\u308b\u304b\u3001\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u4e00\u90e8\u306e\u884c\u3092\u524a\u9664\u3057\u305f\u5f8c\u3067\u3001 pgstrom.gpucache_recovery() \u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u3068\u3044\u3046\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002","title":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u7834\u640d\u3068\u5fa9\u5143"},{"location":"install/","text":"\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u672c\u7ae0\u3067\u306fPG-Strom\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8 \u30cf\u30fc\u30c9\u30a6\u30a7\u30a2 CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u3092\u52d5\u4f5c\u53ef\u80fd\u306a x86_64 \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u304c\u5fc5\u8981\u3067\u3059\u3002 CPU\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u3001\u304a\u3088\u3073\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30c7\u30d0\u30a4\u30b9\u306b\u306f\u7279\u5225\u306a\u8981\u4ef6\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001 note002:HW Validation List \u306f\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u9078\u5b9a\u306e\u4e0a\u3067\u53c2\u8003\u306b\u306a\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u3092\u5229\u7528\u3059\u308b\u306b\u306fNVME\u898f\u683c\u306b\u5bfe\u5fdc\u3057\u305fSSD\u3001\u307e\u305f\u306fRoCE\u306b\u5bfe\u5fdc\u3057\u305f\u9ad8\u901fNIC\u304c\u5fc5\u8981\u3067\u3001GPU\u3068\u540c\u4e00\u306ePCIe Root Complex\u914d\u4e0b\u306b\u63a5\u7d9a\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 GPU\u30c7\u30d0\u30a4\u30b9 PG-Strom\u3092\u5b9f\u884c\u3059\u308b\u306b\u306f\u5c11\u306a\u304f\u3068\u3082\u4e00\u500b\u306eGPU\u30c7\u30d0\u30a4\u30b9\u304c\u30b7\u30b9\u30c6\u30e0\u4e0a\u306b\u5fc5\u8981\u3067\u3059\u3002\u3053\u308c\u3089\u306fCUDA Toolkit\u3067\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u304a\u308a\u3001computing capability \u304c6.0\u4ee5\u964d\u306e\u30e2\u30c7\u30eb\uff08Pascal\u4e16\u4ee3\u4ee5\u964d\uff09\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 002: HW Validation List - List of supported GPU models \u3092\u53c2\u8003\u306bGPU\u3092\u9078\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 Operating System PG-Strom\u306e\u5b9f\u884c\u306b\u306f\u3001CUDA Toolkit\u306b\u3088\u308a\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308bx86_64\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u5411\u3051\u306eLinux OS\u304c\u5fc5\u8981\u3067\u3059\u3002\u63a8\u5968\u74b0\u5883\u306fRed Hat Enterprise Linux\u307e\u305f\u306fRocky Linux\u30d0\u30fc\u30b8\u30e7\u30f3 8.x\u3067\u3059\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\uff08cuFile\u30c9\u30e9\u30a4\u30d0\uff09\u3092\u5229\u7528\u3059\u308b\u306b\u306f\u3001CUDA Toolkit\u306b\u542b\u307e\u308c\u308bnvidia-fs\u30c9\u30e9\u30a4\u30d0\u3068\u3001Mellanox OFED (OpenFabrics Enterprise Distribution) \u30c9\u30e9\u30a4\u30d0\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u3002 PostgreSQL PG-Strom v5.0\u306e\u5b9f\u884c\u306b\u306fPostgreSQL\u30d0\u30fc\u30b8\u30e7\u30f315\u4ee5\u964d\u304c\u5fc5\u8981\u3067\u3059\u3002 PG-Strom\u304c\u5185\u90e8\u7684\u306b\u5229\u7528\u3057\u3066\u3044\u308bAPI\u306e\u4e2d\u306b\u306f\u3001\u3053\u308c\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u63d0\u4f9b\u3055\u308c\u3066\u3044\u306a\u3044\u3082\u306e\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002 CUDA Toolkit PG-Strom\u306e\u5b9f\u884c\u306b\u306fCUDA Toolkit \u30d0\u30fc\u30b8\u30e7\u30f312.2update2\u4ee5\u964d\u304c\u5fc5\u8981\u3067\u3059\u3002 PG-Strom\u304c\u5185\u90e8\u7684\u306b\u5229\u7528\u3057\u3066\u3044\u308bAPI\u306e\u4e2d\u306b\u306f\u3001\u3053\u308c\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u63d0\u4f9b\u3055\u308c\u3066\u3044\u306a\u3044\u3082\u306e\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002 \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806 \u4e00\u9023\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3068\u306a\u308a\u307e\u3059\u3002 H/W\u306e\u521d\u671f\u8a2d\u5b9a OS\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb MOFED\u30c9\u30e9\u30a4\u30d0\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb CUDA Toolkit \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb HeteroDB\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb PostgreSQL\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb PG-Strom\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb PostgreSQL\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff08\u5fc5\u8981\u306b\u5fdc\u3058\u3066\uff09 PostGIS contrib/cube OS\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u3092\u9078\u629e\u3057\u3001\u500b\u3005\u306e\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30d7\u30ed\u30bb\u30b9\u306b\u5f93\u3063\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4f5c\u696d\u3092\u884c\u3063\u3066\u304f\u3060\u3055\u3044\u3002 CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u306f\u3001 NVIDIA DEVELOPER ZONE \u306b\u304a\u3044\u3066\u7d39\u4ecb\u3055\u308c\u3066\u3044\u307e\u3059\u3002 Red Hat Enterprise Linux 8.x\u7cfb\u5217\uff08Rocky Linux 8.x\u7cfb\u5217\u3092\u542b\u3080\uff09\u306e\u5834\u5408\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u69cb\u6210\u306f\u3001\u30d9\u30fc\u30b9\u74b0\u5883\u3068\u3057\u3066\u300c\u6700\u5c0f\u9650\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u300d\u3092\u9078\u629e\u3057\u3001\u3055\u3089\u306b\u8ffd\u52a0\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3068\u3057\u3066\u300c\u958b\u767a\u30c4\u30fc\u30eb\u300d\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 Red Hat Enterprise Linux 9.x\u7cfb\u5217\uff08Rocky Linux 9.x\u7cfb\u5217\u3092\u542b\u3080\uff09\u306e\u5834\u5408\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u69cb\u6210\u306f\u3001\u30d9\u30fc\u30b9\u74b0\u5883\u3068\u3057\u3066\u300c\u6700\u5c0f\u9650\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u300d\u3092\u9078\u629e\u3057\u3001\u3055\u3089\u306b\u8ffd\u52a0\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3068\u3057\u3066\u300c\u6a19\u6e96\u300d\u300c\u958b\u767a\u30c4\u30fc\u30eb\u300d\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u30b5\u30fc\u30d0\u30fc\u3078\u306eOS\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u3001\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u30fc\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u305f\u3081\u306b\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002 \u306a\u304a\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u3067\u300c\u958b\u767a\u30c4\u30fc\u30eb\u300d\u3092\u9078\u629e\u3057\u306a\u304b\u3063\u305f\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067OS\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u306b\u8ffd\u52a0\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 # dnf groupinstall 'Development Tools' Tip \u30b5\u30fc\u30d0\u306b\u642d\u8f09\u3055\u308c\u3066\u3044\u308bGPU\u304c\u65b0\u3057\u3059\u304e\u308b\u5834\u5408\u3001OS\u8d77\u52d5\u4e2d\u306b\u30af\u30e9\u30c3\u30b7\u30e5\u7b49\u306e\u554f\u984c\u304c\u767a\u751f\u3059\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 \u305d\u306e\u5834\u5408\u3001\u30ab\u30fc\u30cd\u30eb\u8d77\u52d5\u30aa\u30d7\u30b7\u30e7\u30f3\u306b nouveau.modeset=0 \u3092\u8ffd\u52a0\u3057\u3066\u6a19\u6e96\u306e\u30b0\u30e9\u30d5\u30a3\u30c3\u30af\u30b9\u30c9\u30e9\u30a4\u30d0\u3092\u7121\u52b9\u5316\u3059\u308b\u4e8b\u3067 \u554f\u984c\u3092\u56de\u907f\u3067\u304d\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 nouveau\u30c9\u30e9\u30a4\u30d0\u306e\u7121\u52b9\u5316 NVIDIA\u88fdGPU\u5411\u3051\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306e\u4e92\u63db\u30c9\u30e9\u30a4\u30d0\u3067\u3042\u308bnouveau\u30c9\u30e9\u30a4\u30d0\u304c\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001nvidia\u30c9\u30e9\u30a4\u30d0\u3092\u30ed\u30fc\u30c9\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3002 \u3053\u306e\u5834\u5408\u306f\u3001nouveau\u30c9\u30e9\u30a4\u30d0\u306e\u7121\u52b9\u5316\u8a2d\u5b9a\u3092\u884c\u3063\u305f\u4e0a\u3067\u30b7\u30b9\u30c6\u30e0\u3092\u4e00\u5ea6\u518d\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002 nouveau\u30c9\u30e9\u30a4\u30d0\u3092\u7121\u52b9\u5316\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092 /etc/modprobe.d/disable-nouveau.conf \u3068\u3044\u3046\u540d\u524d\u3067\u4fdd\u5b58\u3057\u3001 dracut \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066Linux kernel\u306e\u30d6\u30fc\u30c8\u30a4\u30e1\u30fc\u30b8\u306b\u53cd\u6620\u3057\u307e\u3059\u3002 \u305d\u306e\u5f8c\u3001\u30b7\u30b9\u30c6\u30e0\u3092\u4e00\u5ea6\u518d\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002 # cat > /etc/modprobe.d/disable-nouveau.conf </kernel/drivers/nvme/host/nvme-rdma.ko.xz \uff09\u3067\u306f\u306a\u304f\u3001\u8ffd\u52a0\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f /lib/modules//extra/mlnx-nvme/host/nvme-rdma.ko \u304c\u512a\u5148\u3057\u3066\u4f7f\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002 $ modinfo nvme-rdma filename: /lib/modules/5.14.0-427.18.1.el9_4.x86_64/extra/mlnx-nvme/host/nvme-rdma.ko license: GPL v2 rhelversion: 9.4 srcversion: 16C0049F26768D6EA12771B depends: nvme-core,rdma_cm,ib_core,nvme-fabrics,mlx_compat retpoline: Y name: nvme_rdma vermagic: 5.14.0-427.18.1.el9_4.x86_64 SMP preempt mod_unload modversions parm: register_always:Use memory registration even for contiguous memory regions (bool) \u65e2\u306b\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308b\u30ab\u30fc\u30cd\u30eb\u30e2\u30b8\u30e5\u30fc\u30eb\uff08\u4f8b: nvme \uff09\u3092\u7f6e\u304d\u63db\u3048\u308b\u305f\u3081\u3001\u3053\u3053\u3067\u4e00\u5ea6\u30b7\u30b9\u30c6\u30e0\u306e\u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3\u3068\u518d\u8d77\u52d5\u3092\u884c\u3044\u307e\u3059\u3002 mlnxofedinstall \u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5b8c\u4e86\u5f8c\u306b\u3001 dracut -f \u3092\u5b9f\u884c\u3059\u308b\u306e\u3092\u5fd8\u308c\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002 Tips Linux kernel\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3068MOFED\u30c9\u30e9\u30a4\u30d0 RHEL\u7cfb\u5217\u306e\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u306b\u304a\u3044\u3066\u3001MODED\u30c9\u30e9\u30a4\u30d0\u306fDKMS(Dynamic Kernel Module Support)\u3092\u4f7f\u7528\u3057\u307e\u305b\u3093\u3002 \u305d\u306e\u305f\u3081\u3001Linux kernel\u3092\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3057\u305f\u5834\u5408\u306b\u306f\u3001\u4e0a\u8a18\u306e\u624b\u9806\u3092\u518d\u5ea6\u5b9f\u884c\u3057\u3001\u65b0\u3057\u3044Linux kernel\u306b\u5bfe\u5fdc\u3057\u305fMOFED\u30c9\u30e9\u30a4\u30d0\u3092\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u5f8c\u8ff0\u306eCUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306a\u3069\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u66f4\u65b0\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067Linux kernel\u304c\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u308b\u4e8b\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u305d\u306e\u5834\u5408\u3067\u3082\u540c\u69d8\u3067\u3059\u3002 heterodb-swdc\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb PG-Strom\u307b\u304b\u95a2\u9023\u30d1\u30c3\u30b1\u30fc\u30b8\u306f HeteroDB Software Distribution Center \u304b\u3089\u914d\u5e03\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3092\u5165\u624b\u3059\u308b\u305f\u3081\u306b\u3001HeteroDB-SWDC\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u5b9a\u7fa9\u3092yum\u30b7\u30b9\u30c6\u30e0\u306b\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 HeteroDB-SWDC\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u5b9a\u7fa9\u306fheterodb-swdc\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u3088\u308a\u63d0\u4f9b\u3055\u308c\u307e\u3059\u3002 Web\u30d6\u30e9\u30a6\u30b6\u306a\u3069\u3067 HeteroDB Software Distribution Center \u3078\u30a2\u30af\u30bb\u30b9\u3057\u3001\u30da\u30fc\u30b8\u306e\u5148\u982d\u306b\u30ea\u30f3\u30af\u306e\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b heterodb-swdc-1.3-1.el9.noarch.rpm \u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002\uff08RHEL8\u306e\u5834\u5408\u306f heterodb-swdc-1.3-1.el8.noarch.rpm \uff09 heterodb-swdc\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u308b\u3068\u3001HeteroDB-SWDC\u304b\u3089\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3092\u5165\u624b\u3059\u308b\u305f\u3081\u306eyum\u30b7\u30b9\u30c6\u30e0\u3078\u306e\u8a2d\u5b9a\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306bheterodb-swdc\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 # dnf install https://heterodb.github.io/swdc/yum/rhel8-noarch/heterodb-swdc-1.2-1.el8.noarch.rpm CUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u672c\u7bc0\u3067\u306fCUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u65e2\u306b\u6700\u65b0\u306eCUDA Toolkit\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u3067\u3042\u308b\u5834\u5408\u3001\u672c\u7bc0\u306e\u521d\u671f\u8a2d\u5b9a\u3068\u5408\u81f4\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 NVIDIA\u306fCUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\uff12\u901a\u308a\u306e\u65b9\u6cd5\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002\u4e00\u3064\u306f\u81ea\u5df1\u5b9f\u884c\u578b\u30a2\u30fc\u30ab\u30a4\u30d6\uff08runfile\uff09\u306b\u3088\u308b\u3082\u306e\u3002\u3082\u3046\u4e00\u3064\u306fRPM\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u3088\u308b\u3082\u306e\u3067\u3001PG-Strom\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306b\u306fRPM\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u3088\u308b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u63a8\u5968\u3057\u307e\u3059\u3002 CUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u7528\u30d1\u30c3\u30b1\u30fc\u30b8\u306fNVIDIA DEVELOPER ZONE\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u9069\u5207\u306aOS\u3001\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3001\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u3001\u300erpm(network)\u300f\u7248\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u300erpm(network)\u300f\u3092\u9078\u629e\u3059\u308b\u3068\u3001\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u767b\u9332\u3057\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7d4c\u7531\u3067\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u305f\u3081\u306e\u30b7\u30a7\u30eb\u30b3\u30de\u30f3\u30c9\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u30ac\u30a4\u30c0\u30f3\u30b9\u901a\u308a\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u9032\u3081\u3066\u304f\u3060\u3055\u3044\u3002 # dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo # dnf clean all # dnf install cuda-toolkit-12-5 CUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u7d9a\u3044\u3066\u3001\u30c9\u30e9\u30a4\u30d0\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u305f\u3081\u306e\u30b3\u30de\u30f3\u30c9\u304c\uff12\u7a2e\u985e\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u3053\u3053\u3067\u306f \u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u7248\u306envidia-driver \u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u7248\u306e\u307f\u304cGPUDirect Storage\u6a5f\u80fd\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u304a\u308a\u3001PG-Strom\u306eGPU-Direct SQL\u306f\u672c\u6a5f\u80fd\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002 Tips Volta\u4ee5\u524d\u306eGPU\u306e\u5229\u7528\u306b\u3064\u3044\u3066 \u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u7248nvidia\u30c9\u30e9\u30a4\u30d0\u306f\u3001Volta\u4e16\u4ee3\u4ee5\u524d\u306eGPU\u306b\u306f\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u305b\u3093\u3002 \u3057\u305f\u304c\u3063\u3066\u3001Volta\u307e\u305f\u306fPascal\u4e16\u4ee3\u306eGPU\u3067PG-Strom\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u306f\u3001\u30d7\u30ed\u30d7\u30e9\u30a8\u30bf\u30ea\u7248\u306e\u30c9\u30e9\u30a4\u30d0\u3067\u3042\u3063\u3066\u3082GPUDirect Storage\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u308bCUDA 12.2 Update 1\u3092\u5229\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 CUDA 12.2 Update 1\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306f \u3053\u3061\u3089 \u304b\u3089\u5165\u624b\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u7d9a\u3044\u3066\u3001GPU-Direct Storage(GDS)\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306e\u30c9\u30e9\u30a4\u30d0\u30e2\u30b8\u30e5\u30fc\u30eb nvidia-gds \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 \u30d1\u30c3\u30b1\u30fc\u30b8\u540d\u306b\u7d9a\u3044\u3066CUDA Toolkit\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u540c\u4e00\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u540d\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 # dnf module install nvidia-driver:open-dkms # dnf install nvidia-gds-12-5 \u6b63\u5e38\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3001 /usr/local/cuda \u914d\u4e0b\u306bCUDA Toolkit\u304c\u5c0e\u5165\u3055\u308c\u3066\u3044\u307e\u3059\u3002 $ ls /usr/local/cuda/ bin/ gds/ nsightee_plugins/ targets/ compute-sanitizer/ include@ nvml/ tools/ CUDA_Toolkit_Release_Notes.txt lib64@ nvvm/ version.json DOCS libnvvp/ README EULA.txt LICENSE share/ extras/ man/ src/ \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001GPU\u304c\u6b63\u3057\u304f\u8a8d\u8b58\u3055\u308c\u3066\u3044\u308b\u4e8b\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 nvidia-smi \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u51fa\u529b\u4f8b\u306e\u3088\u3046\u306b\u3001\u30b7\u30b9\u30c6\u30e0\u306b\u642d\u8f09\u3055\u308c\u3066\u3044\u308bGPU\u306e\u60c5\u5831\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002 $ nvidia-smi Mon Jun 3 09:56:41 2024 +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 555.42.02 Driver Version: 555.42.02 CUDA Version: 12.5 | |-----------------------------------------+------------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+========================+======================| | 0 NVIDIA A100-PCIE-40GB Off | 00000000:41:00.0 Off | 0 | | N/A 58C P0 66W / 250W | 1MiB / 40960MiB | 0% Default | | | | Disabled | +-----------------------------------------+------------------------+----------------------+ +-----------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=========================================================================================| | No running processes found | +-----------------------------------------------------------------------------------------+ GPUDirect Storage\u306e\u78ba\u8a8d \u4e0a\u8a18\u306e\u624b\u9806\u3067CUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3001GPUDirect Storage\u304c\u5229\u7528\u53ef\u80fd\u306a\u72b6\u614b\u3068\u306a\u3063\u3066\u3044\u308b\u306f\u305a\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u901a\u308a\u3001 gdscheck \u30c4\u30fc\u30eb\u3092\u7528\u3044\u3066\u30b9\u30c8\u30ec\u30fc\u30b8\u30c7\u30d0\u30a4\u30b9\u6bce\u306e\u30b3\u30f3\u30d5\u30a3\u30b0\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \uff08\u3053\u306e\u4f8b\u3067\u306f\u3001 nvme \u3060\u3051\u3067\u306a\u304f\u3001 nvme-rdma \u3084 rpcrdma \u30ab\u30fc\u30cd\u30eb\u30e2\u30b8\u30e5\u30fc\u30eb\u3082\u30ed\u30fc\u30c9\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u95a2\u9023\u3059\u308b\u6a5f\u80fd\u304c Supported \u3068\u306a\u3063\u3066\u3044\u307e\u3059\uff09 # /usr/local/cuda/gds/tools/gdscheck -p GDS release version: 1.10.0.4 nvidia_fs version: 2.20 libcufile version: 2.12 Platform: x86_64 ============ ENVIRONMENT: ============ ===================== DRIVER CONFIGURATION: ===================== NVMe : Supported NVMeOF : Supported SCSI : Unsupported ScaleFlux CSD : Unsupported NVMesh : Unsupported DDN EXAScaler : Unsupported IBM Spectrum Scale : Unsupported NFS : Supported BeeGFS : Unsupported WekaFS : Unsupported Userspace RDMA : Unsupported --Mellanox PeerDirect : Disabled --rdma library : Not Loaded (libcufile_rdma.so) --rdma devices : Not configured --rdma_device_status : Up: 0 Down: 0 ===================== CUFILE CONFIGURATION: ===================== properties.use_compat_mode : true properties.force_compat_mode : false properties.gds_rdma_write_support : true properties.use_poll_mode : false properties.poll_mode_max_size_kb : 4 properties.max_batch_io_size : 128 properties.max_batch_io_timeout_msecs : 5 properties.max_direct_io_size_kb : 16384 properties.max_device_cache_size_kb : 131072 properties.max_device_pinned_mem_size_kb : 33554432 properties.posix_pool_slab_size_kb : 4 1024 16384 properties.posix_pool_slab_count : 128 64 32 properties.rdma_peer_affinity_policy : RoundRobin properties.rdma_dynamic_routing : 0 fs.generic.posix_unaligned_writes : false fs.lustre.posix_gds_min_kb: 0 fs.beegfs.posix_gds_min_kb: 0 fs.weka.rdma_write_support: false fs.gpfs.gds_write_support: false profile.nvtx : false profile.cufile_stats : 0 miscellaneous.api_check_aggressive : false execution.max_io_threads : 4 execution.max_io_queue_depth : 128 execution.parallel_io : true execution.min_io_threshold_size_kb : 8192 execution.max_request_parallelism : 4 properties.force_odirect_mode : false properties.prefer_iouring : false ========= GPU INFO: ========= GPU index 0 NVIDIA A100-PCIE-40GB bar:1 bar size (MiB):65536 supports GDS, IOMMU State: Disabled ============== PLATFORM INFO: ============== IOMMU: disabled Nvidia Driver Info Status: Supported(Nvidia Open Driver Installed) Cuda Driver Version Installed: 12050 Platform: AS -2014CS-TR, Arch: x86_64(Linux 5.14.0-427.18.1.el9_4.x86_64) Platform verification succeeded Tips RAID\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306e\u8ffd\u52a0\u8a2d\u5b9a GPUDirect Storage\u3092\u5229\u7528\u3057\u3066Software RAID (md-raid0) \u533a\u753b\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u3059\u5834\u5408\u3001 \u4ee5\u4e0b\u306e\u4e00\u884c\u3092 /lib/udev/rules.d/63-md-raid-arrays.rules \u8a2d\u5b9a\u306b\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 IMPORT{\u200bprogram}=\"/usr/sbin/mdadm --detail --export $devnode\" \u305d\u306e\u5f8c\u3001\u8a2d\u5b9a\u3092\u53cd\u6620\u3055\u305b\u308b\u305f\u3081\u306b\u30b7\u30b9\u30c6\u30e0\u3092\u518d\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u8a73\u3057\u304f\u306f NVIDIA GPUDirect Storage Installation and Troubleshooting Guide \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 PCI Bar1\u30e1\u30e2\u30ea\u306e\u8a2d\u5b9a GPU-Direct SQL\u306f\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u3092\u30db\u30b9\u30c8\u30b7\u30b9\u30c6\u30e0\u4e0a\u306ePCI BAR1\u9818\u57df\uff08\u7269\u7406\u30a2\u30c9\u30ec\u30b9\u7a7a\u9593\uff09\u306b\u30de\u30c3\u30d7\u3057\u3001\u305d\u3053\u3092Destination\u3068\u3059\u308bP2P-RDMA\u8981\u6c42\u3092NVME\u6a5f\u5668\u306b\u5bfe\u3057\u3066\u884c\u3046\u4e8b\u3067\u3001\u30ed\u30b9\u306e\u306a\u3044\u9ad8\u901f\u306a\u30c7\u30fc\u30bf\u8aad\u51fa\u3057\u3092\u5b9f\u73fe\u3057\u307e\u3059\u3002 \u5341\u5206\u306a\u591a\u91cd\u5ea6\u3092\u6301\u3063\u305fP2P-RDMA\u3092\u884c\u3046\u306b\u306f\u3001GPU\u304c\u30d0\u30c3\u30d5\u30a1\u3092\u30de\u30c3\u30d7\u3059\u308b\u306e\u306b\u5341\u5206\u306aPCI BAR1\u9818\u57df\u3092\u6709\u3057\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u5927\u534a\u306eGPU\u3067\u306fPCI BAR1\u9818\u57df\u306e\u5927\u304d\u3055\u306f\u56fa\u5b9a\u3067\u3001PG-Strom\u306b\u304a\u3044\u3066\u306f\u3001\u305d\u308c\u304cGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u30b5\u30a4\u30ba\u3092\u4e0a\u56de\u3063\u3066\u3044\u308b\u88fd\u54c1\u3092\u63a8\u5968\u3057\u3066\u3044\u307e\u3059\u3002 \u3057\u304b\u3057\u3001\u4e00\u90e8\u306eGPU\u88fd\u54c1\u306b\u304a\u3044\u3066\u306f\u300e\u52d5\u4f5c\u30e2\u30fc\u30c9\u300f\u3092\u5207\u308a\u66ff\u3048\u308b\u4e8b\u3067PCI BAR1\u9818\u57df\u306e\u30b5\u30a4\u30ba\u3092\u5207\u308a\u66ff\u3048\u308b\u4e8b\u304c\u3067\u304d\u308b\u3082\u306e\u304c\u5b58\u5728\u3057\u307e\u3059\u3002\u304a\u4f7f\u3044\u306eGPU\u304c\u305d\u308c\u306b\u8a72\u5f53\u3059\u308b\u5834\u5408\u306f\u3001 NVIDIA Display Mode Selector Tool \u3092\u53c2\u7167\u306e\u4e0a\u3001PCI BAR1\u9818\u57df\u306e\u30b5\u30a4\u30ba\u3092\u6700\u5927\u5316\u3059\u308b\u30e2\u30fc\u30c9\u3078\u3068\u5207\u308a\u66ff\u3048\u3066\u304f\u3060\u3055\u3044\u3002 2023\u5e7412\u6708\u6642\u70b9\u3067\u306f\u3001\u4ee5\u4e0b\u306eGPU\u306e\u5834\u5408\u306bNVIDIA Display Mode Selector Tool\u3092\u5229\u7528\u3057\u3066 *Display Off \u30e2\u30fc\u30c9\u3078\u3068\u5207\u308a\u66ff\u3048\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 NVIDIA L40S NVIDIA L40 NVIDIA A40 NVIDIA RTX 6000 Ada NVIDIA RTX A6000 NVIDIA RTX A5500 NVIDIA RTX A5000 \u30b7\u30b9\u30c6\u30e0\u306b\u642d\u8f09\u3055\u308c\u3066\u3044\u308bGPU\u306e\u30e1\u30e2\u30ea\u30b5\u30a4\u30ba\u3084PCI BAR1\u30b5\u30a4\u30ba\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306f\u3001 nvidia-smi -q \u30b3\u30de\u30f3\u30c9\u3092\u5229\u7528\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u30e1\u30e2\u30ea\u95a2\u9023\u306e\u72b6\u614b\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002 $ nvidia-smi -q : FB Memory Usage Total : 46068 MiB Reserved : 685 MiB Used : 4 MiB Free : 45377 MiB BAR1 Memory Usage Total : 65536 MiB Used : 1 MiB Free : 65535 MiB : HeteroDB \u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb heterodb-extra \u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u3001PG-Strom\u306b\u4ee5\u4e0b\u306e\u6a5f\u80fd\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002 \u30de\u30eb\u30c1GPU\u306e\u5bfe\u5fdc GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5bfe\u5fdc \u30e9\u30a4\u30bb\u30f3\u30b9\u7ba1\u7406\u6a5f\u80fd \u3053\u308c\u3089\u306e\u6a5f\u80fd\u3092\u4f7f\u7528\u305b\u305a\u3001\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u7248\u306e\u6a5f\u80fd\u306e\u307f\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f heterodb-extra \u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u4e0d\u8981\u3067\u3059\u3002 \u672c\u7bc0\u306e\u5185\u5bb9\u306f\u8aad\u307f\u98db\u3070\u3057\u3066\u69cb\u3044\u307e\u305b\u3093\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001SWDC\u304b\u3089 heterodb-extra \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002 # dnf install heterodb-extra \u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u6709\u52b9\u5316 heterodb-extra \u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u5168\u3066\u306e\u6a5f\u80fd\u3092\u5229\u7528\u3059\u308b\u306b\u306f\u3001HeteroDB\u793e\u304c\u63d0\u4f9b\u3059\u308b\u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u6709\u52b9\u5316\u304c\u5fc5\u8981\u3067\u3059\u3002\u30e9\u30a4\u30bb\u30f3\u30b9\u306a\u3057\u3067\u904b\u7528\u3059\u308b\u4e8b\u3082\u53ef\u80fd\u3067\u3059\u304c\u3001\u305d\u306e\u5834\u5408\u3001\u4e0b\u8a18\u306e\u6a5f\u80fd\u304c\u5236\u9650\u3092\u53d7\u3051\u307e\u3059\u3002 \u30de\u30eb\u30c1GPU\u306e\u5229\u7528 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u306b\u304a\u3051\u308b\u8907\u6570NVME-SSD\u306b\u3088\u308b\u30b9\u30c8\u30e9\u30a4\u30d4\u30f3\u30b0(md-raid0) GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u306b\u304a\u3051\u308bNVME-oF\u30c7\u30d0\u30a4\u30b9\u306e\u5229\u7528 GPU\u7248PostGIS\u306b\u304a\u3051\u308bGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u5229\u7528 \u30e9\u30a4\u30bb\u30f3\u30b9\u30d5\u30a1\u30a4\u30eb\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5f62\u5f0f\u3067HeteroDB\u793e\u304b\u3089\u5165\u624b\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 IAgIVdKxhe+BSer3Y67jQW0+uTzYh00K6WOSH7xQ26Qcw8aeUNYqJB9YcKJTJb+QQhjmUeQpUnboNxVwLCd3HFuLXeBWMKp11/BgG0FSrkUWu/ZCtDtw0F1hEIUY7m767zAGV8y+i7BuNXGJFvRlAkxdVO3/K47ocIgoVkuzBfLvN/h9LffOydUnHPzrFHfLc0r3nNNgtyTrfvoZiXegkGM9GBTAKyq8uWu/OGonh9ybzVKOgofhDLk0rVbLohOXDhMlwDl2oMGIr83tIpCWG+BGE+TDwsJ4n71Sv6n4bi/ZBXBS498qShNHDGrbz6cNcDVBa+EuZc6HzZoF6UrljEcl= ---- VERSION:2 SERIAL_NR:HDB-TRIAL ISSUED_AT:2019-05-09 EXPIRED_AT:2019-06-08 GPU_UUID:GPU-a137b1df-53c9-197f-2801-f2dccaf9d42f \u3053\u308c\u3092 /etc/heterodb.license \u306b\u30b3\u30d4\u30fc\u3057\u3001PostgreSQL\u3092\u518d\u8d77\u52d5\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306bPostgreSQL\u306e\u8d77\u52d5\u30ed\u30b0\u306b\u30e9\u30a4\u30bb\u30f3\u30b9\u60c5\u5831\u304c\u51fa\u529b\u3055\u308c\u3001\u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u6709\u52b9\u5316\u304c\u884c\u308f\u308c\u305f\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 : LOG: HeteroDB Extra module loaded [api_version=20231105,cufile=on,nvme_strom=off,githash=9ca2fe4d2fbb795ad2d741dcfcb9f2fe499a5bdf] LOG: HeteroDB License: { \"version\" : 2, \"serial_nr\" : \"HDB-TRIAL\", \"issued_at\" : \"2022-11-19\", \"expired_at\" : \"2099-12-31\", \"nr_gpus\" : 1, \"gpus\" : [ { \"uuid\" : \"GPU-13943bfd-5b30-38f5-0473-78979c134606\" } ]} LOG: PG-Strom version 5.0.1 built for PostgreSQL 15 (githash: 972441dbafed6679af86af40bc8613be2d73c4fd) : PostgreSQL\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u672c\u7bc0\u3067\u306fRPM\u306b\u3088\u308bPostgreSQL\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002 \u30bd\u30fc\u30b9\u304b\u3089\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u95a2\u3057\u3066\u306f\u65e2\u306b\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u304c\u6570\u591a\u304f\u5b58\u5728\u3057\u3001 ./configure \u30b9\u30af\u30ea\u30d7\u30c8\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u591a\u5c90\u306b\u308f\u305f\u308b\u4e8b\u304b\u3089\u3001\u3053\u3053\u3067\u306f\u7d39\u4ecb\u3057\u307e\u305b\u3093\u3002 Linux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u306e\u914d\u5e03\u3059\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u3082PostgreSQL\u306f\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u5fc5\u305a\u3057\u3082\u6700\u65b0\u3067\u306f\u306a\u304f\u3001PG-Strom\u306e\u5bfe\u5fdc\u30d0\u30fc\u30b8\u30e7\u30f3\u3088\u308a\u3082\u53e4\u3044\u3082\u306e\u3067\u3042\u308b\u4e8b\u304c\u591a\u3005\u3042\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001Red Hat Enterprise Linux 7.x\u3067\u914d\u5e03\u3055\u308c\u3066\u3044\u308bPostgreSQL\u306fv9.2.x\u3067\u3059\u304c\u3001\u3053\u308c\u306fPostgreSQL\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u3068\u3057\u3066\u65e2\u306bEOL\u3068\u306a\u3063\u3066\u3044\u308b\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u3059\u3002 PostgreSQL Global Development Group\u306f\u3001\u6700\u65b0\u306ePostgreSQL\u304a\u3088\u3073\u95a2\u9023\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u914d\u5e03\u306e\u305f\u3081\u306byum\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002 EPEL\u306e\u8a2d\u5b9a\u306e\u3088\u3046\u306b\u3001yum\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8a2d\u5b9a\u3092\u884c\u3046\u3060\u3051\u306e\u5c0f\u3055\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001\u305d\u306e\u5f8c\u3001PostgreSQL\u3084\u305d\u306e\u4ed6\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 yum\u30ea\u30dd\u30b8\u30c8\u30ea\u5b9a\u7fa9\u306e\u4e00\u89a7\u306f http://yum.postgresql.org/repopackages.php \u3067\u3059\u3002 PostgreSQL\u30e1\u30b8\u30e3\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u3068Linux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u3054\u3068\u306b\u591a\u304f\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u5b9a\u7fa9\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u3042\u306a\u305f\u306eLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u5411\u3051\u306ePostgreSQL 15\u4ee5\u964d\u306e\u3082\u306e\u3092\u9078\u629e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u30b9\u30c6\u30c3\u30d7\u3067 PostgreSQL \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u884c\u3044\u307e\u3059\u3002 yum\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u5b9a\u7fa9\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb OS\u6a19\u6e96\u306ePostgreSQL\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u7121\u52b9\u5316 PostgreSQL\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u4f8b\u3048\u3070PostgreSQL v16\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001PG-Strom\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u306f postgresql16-server \u304a\u3088\u3073 postgresql16-devel \u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u5fc5\u8981\u3067\u3059\u3002 \u4ee5\u4e0b\u306f\u3001RHEL9\u306b\u304a\u3044\u3066PostgreSQL v16\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u624b\u9806\u306e\u4f8b\u3067\u3059\u3002 # dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm # dnf -y module disable postgresql # dnf install -y postgresql16-devel postgresql16-server Note Red Hat Enterprise Linux\u306e\u5834\u5408\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u540d postgresql \u304c\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u6a19\u6e96\u306e\u3082\u306e\u3068\u7af6\u5408\u3057\u3066\u3057\u307e\u3044\u3001PGDG\u63d0\u4f9b\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3002\u305d\u306e\u305f\u3081\u3001 dnf -y module disable postgresql \u30b3\u30de\u30f3\u30c9\u3092\u7528\u3044\u3066\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u6a19\u6e96\u306e postgresql \u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u7121\u52b9\u5316\u3057\u307e\u3059\u3002 PG-Strom\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u672c\u7bc0\u3067\u306fPG-Strom\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u63a8\u5968\u306fRPM\u306b\u3088\u308b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u3059\u304c\u3001\u958b\u767a\u8005\u5411\u3051\u306b\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304b\u3089\u306e\u30d3\u30eb\u30c9\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3082\u7d39\u4ecb\u3057\u307e\u3059\u3002 RPM\u306b\u3088\u308b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb PG-Strom\u304a\u3088\u3073\u95a2\u9023\u30d1\u30c3\u30b1\u30fc\u30b8\u306f HeteroDB Software Distribution Center \u3088\u308a\u914d\u5e03\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u65e2\u306byum\u30b7\u30b9\u30c6\u30e0\u3078\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8ffd\u52a0\u6e08\u307f\u3067\u3042\u308c\u3070\u3001\u305d\u308c\u307b\u3069\u4f5c\u696d\u306f\u591a\u304f\u3042\u308a\u307e\u305b\u3093\u3002 \u57fa\u76e4\u3068\u306a\u308bPostgreSQL\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3054\u3068\u306b\u5225\u500b\u306ePG-Strom\u306eRPM\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u6e96\u5099\u3055\u308c\u3066\u304a\u308a\u3001PostgreSQL v15\u7528\u3067\u3042\u308c\u3070 pg_strom-PG15 \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u3001PostgreSQL v16\u7528\u3067\u3042\u308c\u3070 pg_strom-PG16 \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u3001PostgreSQL\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30d0\u30a4\u30ca\u30ea\u4e92\u63db\u6027\u306b\u4f34\u3046\u5236\u7d04\u3067\u3059\u3002 # dnf install -y pg_strom-PG16 \u4ee5\u4e0a\u3067\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u5b8c\u4e86\u3067\u3059\u3002 \u30bd\u30fc\u30b9\u304b\u3089\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u958b\u767a\u8005\u5411\u3051\u306b\u3001\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304b\u3089PG-Strom\u3092\u30d3\u30eb\u30c9\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3082\u7d39\u4ecb\u3057\u307e\u3059\u3002 \u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u5165\u624b RPM\u30d1\u30c3\u30b1\u30fc\u30b8\u3068\u540c\u69d8\u306b\u3001\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306etarball\u3092 HeteroDB Software Distribution Center \u304b\u3089\u5165\u624b\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u305f\u3060\u3001tarball\u306e\u30ea\u30ea\u30fc\u30b9\u306b\u306f\u3042\u308b\u7a0b\u5ea6\u306e\u30bf\u30a4\u30e0\u30e9\u30b0\u304c\u751f\u3058\u3066\u3057\u307e\u3046\u305f\u3081\u3001\u6700\u65b0\u306e\u958b\u767a\u7248\u3092\u4f7f\u3044\u305f\u3044\u5834\u5408\u306b\u306f PG-Strom\u306eGitHub\u30ea\u30dd\u30b8\u30c8\u30ea \u306e master \u30d6\u30e9\u30f3\u30c1\u3092\u30c1\u30a7\u30c3\u30af\u30a2\u30a6\u30c8\u3059\u308b\u65b9\u6cd5\u306e\u65b9\u304c\u597d\u307e\u308c\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 $ git clone https://github.com/heterodb/pg-strom.git Cloning into 'pg-strom'... remote: Counting objects: 13797, done. remote: Compressing objects: 100% (215/215), done. remote: Total 13797 (delta 208), reused 339 (delta 167), pack-reused 13400 Receiving objects: 100% (13797/13797), 11.81 MiB | 1.76 MiB/s, done. Resolving deltas: 100% (10504/10504), done. PG-Strom\u306e\u30d3\u30eb\u30c9 PG-Strom\u3092\u30d3\u30eb\u30c9\u3059\u308b\u6642\u306e\u30b3\u30f3\u30d5\u30a3\u30b0\u306f\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u306ePostgreSQL\u3068\u53b3\u5bc6\u306b\u4e00\u81f4\u3057\u3066\u3044\u306a\u3051\u308c\u3070\u3044\u3051\u307e\u305b\u3093\u3002\u4f8b\u3048\u3070\u3001\u540c\u3058\u69cb\u9020\u4f53\u304c\u30d3\u30eb\u30c9\u6642\u306e\u30b3\u30f3\u30d5\u30a3\u30b0\u306b\u3088\u308aPostgreSQL\u3068PG-Strom\u3067\u7570\u306a\u3063\u305f\u30ec\u30a4\u30a2\u30a6\u30c8\u3092\u6301\u3063\u3066\u3057\u307e\u3063\u305f\u3068\u3059\u308c\u3070\u3001\u975e\u5e38\u306b\u767a\u898b\u306e\u96e3\u3057\u3044\u30d0\u30b0\u3092\u751f\u307f\u51fa\u3057\u3066\u3057\u307e\u3046\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 \u3057\u305f\u304c\u3063\u3066\u3001\uff08\u4e00\u8cab\u6027\u306e\u306a\u3044\u72b6\u614b\u3092\u907f\u3051\u308b\u305f\u3081\uff09PG-Strom\u306f\u72ec\u81ea\u306bconfigure\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u8d70\u3089\u305b\u305f\u308a\u306f\u305b\u305a\u3001 pg_config \u3092\u4f7f\u3063\u3066PostgreSQL\u306e\u30d3\u30eb\u30c9\u6642\u8a2d\u5b9a\u3092\u53c2\u7167\u3057\u307e\u3059\u3002 pg_config \u306b\u30d1\u30b9\u304c\u901a\u3063\u3066\u304a\u308a\u3001\u305d\u308c\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u306ePostgreSQL\u306e\u3082\u306e\u3067\u3042\u308c\u3070\u3001\u305d\u306e\u307e\u307e make \u3001 make install \u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 \u76f4\u63a5\u30d1\u30b9\u304c\u901a\u3063\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u3001 make \u30b3\u30de\u30f3\u30c9\u306b PG_CONFIG=... \u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u4e0e\u3048\u3001 pg_config \u306e\u30d5\u30eb\u30d1\u30b9\u3092\u6e21\u3057\u307e\u3059\u3002 $ cd pg-strom/src $ make PG_CONFIG=/usr/pgsql-16/bin/pg_config $ sudo make install PG_CONFIG=/usr/pgsql-16/bin/pg_config \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u306e\u8a2d\u5b9a \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u306e\u4f5c\u6210 \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u306e\u4f5c\u6210\u304c\u6e08\u3093\u3067\u3044\u306a\u3044\u5834\u5408\u306f\u3001 initdb \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066PostgreSQL\u306e\u521d\u671f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 RPM\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u304a\u3051\u308b\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u306e\u30d1\u30b9\u306f /var/lib/pgsql//data \u3067\u3059\u3002 postgresql-alternatives \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001PostgreSQL\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u62e0\u3089\u305a /var/lib/pgdata \u3067\u53c2\u7167\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 # su - postgres $ /usr/pgsql-16/bin/initdb -D /var/lib/pgdata/ The files belonging to this database system will be owned by user \"postgres\". This user must also own the server process. The database cluster will be initialized with locale \"en_US.UTF-8\". The default database encoding has accordingly been set to \"UTF8\". The default text search configuration will be set to \"english\". Data page checksums are disabled. fixing permissions on existing directory /var/lib/pgdata ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... Asia/Tokyo creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok initdb: warning: enabling \"trust\" authentication for local connections You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb. Success. You can now start the database server using: pg_ctl -D /var/lib/pgdata/ -l logfile start postgresql.conf\u306e\u7de8\u96c6 \u7d9a\u3044\u3066\u3001PostgreSQL\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3067\u3042\u308b postgresql.conf \u3092\u7de8\u96c6\u3057\u307e\u3059\u3002 PG-Strom\u3092\u52d5\u4f5c\u3055\u305b\u308b\u305f\u3081\u306b\u306f\u3001\u6700\u4f4e\u9650\u3001\u4ee5\u4e0b\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u8a2d\u5b9a\u304c\u5fc5\u8981\u3067\u3059\u3002 \u3053\u308c\u4ee5\u5916\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3064\u3044\u3066\u3082\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u7528\u9014\u3084\u60f3\u5b9a\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u8e0f\u307e\u3048\u3066\u691c\u8a0e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 shared_preload_libraries PG-Strom\u30e2\u30b8\u30e5\u30fc\u30eb\u306f shared_preload_libraries \u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3088\u308apostmaster\u30d7\u30ed\u30bb\u30b9\u306e\u8d77\u52d5\u6642\u306b\u30ed\u30fc\u30c9\u3055\u308c\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u30aa\u30f3\u30c7\u30de\u30f3\u30c9\u3067\u306e\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30ed\u30fc\u30c9\u306f\u30b5\u30dd\u30fc\u30c8\u5bfe\u8c61\u5916\u3067\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u9805\u76ee\u306f\u5fc5\u9808\u3067\u3059\u3002 shared_preload_libraries = '$libdir/pg_strom' max_worker_processes PG-Strom\u306f\u6570\u500b\u306e\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u3092\u5185\u90e8\u7684\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3067\u3042\u308b 8 \u3067\u306f\u3001\u305d\u308c\u4ee5\u5916\u306e\u51e6\u7406\u306b\u5229\u7528\u3067\u304d\u308b\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\u6570\u304c\u3042\u307e\u308a\u306b\u3082\u5c11\u306a\u3059\u304e\u3066\u3057\u307e\u3044\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u3042\u308b\u7a0b\u5ea6\u306e\u4f59\u88d5\u3092\u6301\u3063\u305f\u5024\u3092\u8a2d\u5b9a\u3059\u3079\u304d\u3067\u3059\u3002 max_worker_processes = 100 shared_buffers \u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u3088\u308a\u307e\u3059\u304c\u3001 shared_buffers \u306e\u521d\u671f\u8a2d\u5b9a\u306f\u975e\u5e38\u306b\u5c0f\u3055\u3044\u305f\u3081\u3001PG-Strom\u304c\u6709\u52b9\u306b\u6a5f\u80fd\u3059\u308b\u6c34\u6e96\u306e\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\u306b\u5bfe\u3057\u3066\u306f\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u3078\u306e\u8aad\u307f\u66f8\u304d\u304c\u5f8b\u901f\u8981\u56e0\u3068\u306a\u3063\u3066\u3057\u307e\u3044\u3001GPU\u306e\u4e26\u5217\u8a08\u7b97\u6a5f\u80fd\u3092\u6709\u52b9\u306b\u5229\u7528\u3067\u304d\u306a\u3044\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u3042\u308b\u7a0b\u5ea6\u306e\u4f59\u88d5\u3092\u6301\u3063\u305f\u5024\u3092\u8a2d\u5b9a\u3059\u3079\u304d\u3067\u3059\u3002 shared_buffers = 10GB \u660e\u3089\u304b\u306b\u30e1\u30e2\u30ea\u30b5\u30a4\u30ba\u3088\u308a\u3082\u5927\u304d\u306a\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u306f\u3001SSD-to-GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306e\u5229\u7528\u3092\u691c\u8a0e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 work_mem \u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u3088\u308a\u307e\u3059\u304c\u3001 work_mem \u306e\u521d\u671f\u8a2d\u5b9a\u306f\u975e\u5e38\u306b\u5c0f\u3055\u3044\u305f\u3081\u3001\u89e3\u6790\u7cfb\u30af\u30a8\u30ea\u3067\u6700\u9069\u306a\u30af\u30a8\u30ea\u5b9f\u884c\u8a08\u753b\u304c\u9078\u629e\u3055\u308c\u306a\u3044\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 \u5178\u578b\u7684\u306a\u4f8b\u306f\u3001\u30bd\u30fc\u30c8\u51e6\u7406\u306b\u30aa\u30f3\u30e1\u30e2\u30ea\u306e\u30af\u30a4\u30c3\u30af\u30bd\u30fc\u30c8\u3067\u306f\u306a\u304f\u3001\u30c7\u30a3\u30b9\u30af\u30d9\u30fc\u30b9\u306e\u30de\u30fc\u30b8\u30bd\u30fc\u30c8\u3092\u9078\u629e\u3059\u308b\u3068\u3044\u3063\u305f\u3082\u306e\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u3042\u308b\u7a0b\u5ea6\u306e\u4f59\u88d5\u3092\u6301\u3063\u305f\u5024\u3092\u8a2d\u5b9a\u3059\u3079\u304d\u3067\u3059\u3002 work_mem = 1GB OS\u306e\u30ea\u30bd\u30fc\u30b9\u5236\u9650\u306e\u62e1\u5f35 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u7279\u306b\u3001\u540c\u6642\u306b\u5927\u91cf\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30aa\u30fc\u30d7\u30f3\u3059\u308b\u4e8b\u304c\u3042\u308b\u305f\u3081\u3001\u30d7\u30ed\u30bb\u30b9\u3042\u305f\u308a\u30d5\u30a1\u30a4\u30eb\u30c7\u30a3\u30b9\u30af\u30ea\u30d7\u30bf\u6570\u306e\u4e0a\u9650\u3092\u62e1\u5927\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u307e\u305f\u3001PostgreSQL\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u6642\u306b\u78ba\u5b9f\u306b\u30b3\u30a2\u30c0\u30f3\u30d7\u3092\u751f\u6210\u3067\u304d\u308b\u3088\u3046\u3001\u30b3\u30a2\u30d5\u30a1\u30a4\u30eb\u306e\u30b5\u30a4\u30ba\u4e0a\u9650\u3092\u5236\u9650\u3057\u306a\u3044\u3053\u3068\u3092\u63a8\u5968\u3057\u307e\u3059\u3002 PostgreSQL\u3092systemd\u7d4c\u7531\u3067\u8d77\u52d5\u3059\u308b\u5834\u5408\u3001\u30ea\u30bd\u30fc\u30b9\u5236\u9650\u306b\u95a2\u3059\u308b\u8a2d\u5b9a\u306f /etc/systemd/system/postgresql-XX.service.d/pg_strom.conf \u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002 RPM\u306b\u3088\u308b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u5834\u5408\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u4ee5\u4e0b\u306e\u5185\u5bb9\u304c\u8a2d\u5b9a\u3055\u308c\u307e\u3059\u3002 \u74b0\u5883\u5909\u6570 CUDA_ENABLE_COREDUMP_ON_EXCEPTION \u306b\u95a2\u3059\u308b\u8a2d\u5b9a\u304c\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u958b\u767a\u8005\u5411\u3051\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3001\u3053\u308c\u3092\u6709\u52b9\u306b\u3057\u3066\u8d77\u52d5\u3059\u308b\u3068\u3001GPU\u5074\u3067\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u306bGPU\u306e\u30b3\u30a2\u30c0\u30f3\u30d7\u3092\u751f\u6210\u3055\u305b\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002\u8a73\u3057\u304f\u306f CUDA-GDB:GPU core dump support \u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002 [Service] LimitNOFILE=65536 LimitCORE=infinity #Environment=CUDA_ENABLE_COREDUMP_ON_EXCEPTION=1 PostgreSQL\u306e\u8d77\u52d5 PostgreSQL\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002 \u6b63\u5e38\u306b\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u304c\u5b8c\u4e86\u3057\u3066\u3044\u308c\u3070\u3001\u30ed\u30b0\u306bPG-Strom\u304cGPU\u3092\u8a8d\u8b58\u3057\u305f\u4e8b\u3092\u793a\u3059\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8a18\u9332\u3055\u308c\u3066\u3044\u308b\u306f\u305a\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u3067\u306f\u3001NVIDIA A100 (PCIE\u7248; 40GB) \u3092\u8a8d\u8b58\u3057\u3066\u304a\u308a\u3001\u307e\u305f\u3001NVME-SSD\u3054\u3068\u306b\u8fd1\u508d\u306eGPU\u304c\u3069\u3061\u3089\u3067\u3042\u308b\u306e\u304b\u51fa\u529b\u3055\u308c\u3066\u3044\u307e\u3059\u3002 # systemctl start postgresql-16 # journalctl -u postgresql-16 Jun 02 17:28:45 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:45.989 JST [20242] LOG: HeteroDB Extra module loaded [api_version=20240418,cufile=off,nvme_strom=off,githash=3ffc65428c07bb3c9d0e5c75a2973389f91dfcd4] Jun 02 17:28:45 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:45.989 JST [20242] LOG: HeteroDB License: { \"version\" : 2, \"serial_nr\" : \"HDB-TRIAL\", \"issued_at\" : \"2024-06-02\", \"expired_at\" : \"2099-12-31\", \"nr_gpus\" : 1, \"gpus\" : [ { \"uuid\" : \"GPU-13943bfd-5b30-38f5-0473-78979c134606\" } ]} Jun 02 17:28:45 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:45.989 JST [20242] LOG: PG-Strom version 5.12.el9 built for PostgreSQL 16 (githash: ) Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.114 JST [20242] LOG: PG-Strom binary built for CUDA 12.4 (CUDA runtime 12.5) Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.114 JST [20242] WARNING: The CUDA version where this PG-Strom module binary was built for (12.4) is newer than the CUDA runtime version on this platform (12.5). It may lead unexpected behavior, and upgrade of CUDA toolkit is recommended. Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.114 JST [20242] LOG: PG-Strom: GPU0 NVIDIA A100-PCIE-40GB (108 SMs; 1410MHz, L2 40960kB), RAM 39.50GB (5120bits, 1.16GHz), PCI-E Bar1 64GB, CC 8.0 Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:41:00:0] GPU0 (NVIDIA A100-PCIE-40GB; GPU-13943bfd-5b30-38f5-0473-78979c134606) Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:81:00:0] nvme6 (NGD-IN2500-080T4-C) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:82:00:0] nvme3 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:c2:00:0] nvme1 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:c6:00:0] nvme4 (Corsair MP600 CORE) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:c3:00:0] nvme5 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:c1:00:0] nvme0 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:c4:00:0] nvme2 (NGD-IN2500-080T4-C) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.217 JST [20242] LOG: redirecting log output to logging collector process Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.217 JST [20242] HINT: Future log output will appear in directory \"log\". Jun 02 17:28:48 buri.heterodb.com systemd[1]: Started PostgreSQL 16 database server. PG-Strom\u30a8\u30af\u30b9\u30c6\u30f3\u30b7\u30e7\u30f3\u306e\u4f5c\u6210 \u6700\u5f8c\u306b\u3001PG-Strom\u306b\u95a2\u9023\u3059\u308bSQL\u95a2\u6570\u306a\u3069\u306eDB\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \u3053\u306e\u624b\u9806\u306fPostgreSQL\u306eEXTENSION\u6a5f\u80fd\u3092\u7528\u3044\u3066\u30d1\u30c3\u30b1\u30fc\u30b8\u5316\u3055\u308c\u3066\u304a\u308a\u3001SQL\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067 CREATE EXTENSION \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3060\u3051\u3067\u3059\u3002 \u306a\u304a\u3001\u3053\u306e\u624b\u9806\u306f\u65b0\u3057\u3044\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3059\u308b\u305f\u3073\u306b\u5fc5\u8981\u306b\u306a\u308b\u4e8b\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u65b0\u3057\u3044\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u305f\u6642\u70b9\u3067\u65e2\u306bPG-Strom\u95a2\u9023\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u4f5c\u6210\u3055\u308c\u3066\u3044\u3066\u307b\u3057\u3044\u5834\u5408\u306f\u3001\u4e88\u3081 template1 \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067PG-Strom\u30a8\u30af\u30b9\u30c6\u30f3\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3057\u3066\u304a\u3051\u3070\u3001 CREATE DATABASE \u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u6642\u306b\u65b0\u3057\u3044\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3078\u8a2d\u5b9a\u304c\u30b3\u30d4\u30fc\u3055\u308c\u307e\u3059\u3002 $ psql -U postgres psql (16.3) Type \"help\" for help. postgres=# CREATE EXTENSION pg_strom ; CREATE EXTENSION \u4ee5\u4e0a\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4f5c\u696d\u306f\u5b8c\u4e86\u3067\u3059\u3002 PostGIS\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb PG-Strom\u306f\u4e00\u90e8\u306ePostGIS\u95a2\u6570\u306eGPU\u51e6\u7406\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002 \u672c\u7bc0\u3067\u306fPostGIS\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u306b\u3064\u3044\u3066\u8aac\u660e\u3092\u884c\u3044\u307e\u3059\u304c\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u8aad\u307f\u98db\u3070\u3057\u3066\u304f\u3060\u3055\u3044\u3002 PostgreSQL\u3068\u540c\u69d8\u306b\u3001PostgreSQL Global Development Group\u306eyum\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089PostGIS\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001PostgreSQL v16\u5411\u3051\u306b\u30d3\u30eb\u30c9\u3055\u308c\u305fPostGIS v3.4\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3082\u306e\u3067\u3059\u3002 # dnf install postgis34_16 \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u3092\u4f5c\u6210\u3057\u3066PostgreSQL\u30b5\u30fc\u30d0\u3092\u8d77\u52d5\u3057\u3001SQL\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089 CREATE EXTENSION \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066Geometry\u30c7\u30fc\u30bf\u578b\u3084\u5730\u7406\u60c5\u5831\u5206\u6790\u306e\u305f\u3081\u306eSQL\u95a2\u6570\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \u3053\u308c\u3067PostGIS\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u5b8c\u4e86\u3067\u3059\u3002 postgres=# CREATE EXTENSION postgis; CREATE EXTENSION","title":"\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"install/#_1","text":"\u672c\u7ae0\u3067\u306fPG-Strom\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002","title":"\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"install/#_2","text":"\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2 CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u3092\u52d5\u4f5c\u53ef\u80fd\u306a x86_64 \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u306e\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u304c\u5fc5\u8981\u3067\u3059\u3002 CPU\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u3001\u304a\u3088\u3073\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30c7\u30d0\u30a4\u30b9\u306b\u306f\u7279\u5225\u306a\u8981\u4ef6\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001 note002:HW Validation List \u306f\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u9078\u5b9a\u306e\u4e0a\u3067\u53c2\u8003\u306b\u306a\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u3092\u5229\u7528\u3059\u308b\u306b\u306fNVME\u898f\u683c\u306b\u5bfe\u5fdc\u3057\u305fSSD\u3001\u307e\u305f\u306fRoCE\u306b\u5bfe\u5fdc\u3057\u305f\u9ad8\u901fNIC\u304c\u5fc5\u8981\u3067\u3001GPU\u3068\u540c\u4e00\u306ePCIe Root Complex\u914d\u4e0b\u306b\u63a5\u7d9a\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 GPU\u30c7\u30d0\u30a4\u30b9 PG-Strom\u3092\u5b9f\u884c\u3059\u308b\u306b\u306f\u5c11\u306a\u304f\u3068\u3082\u4e00\u500b\u306eGPU\u30c7\u30d0\u30a4\u30b9\u304c\u30b7\u30b9\u30c6\u30e0\u4e0a\u306b\u5fc5\u8981\u3067\u3059\u3002\u3053\u308c\u3089\u306fCUDA Toolkit\u3067\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u304a\u308a\u3001computing capability \u304c6.0\u4ee5\u964d\u306e\u30e2\u30c7\u30eb\uff08Pascal\u4e16\u4ee3\u4ee5\u964d\uff09\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 002: HW Validation List - List of supported GPU models \u3092\u53c2\u8003\u306bGPU\u3092\u9078\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 Operating System PG-Strom\u306e\u5b9f\u884c\u306b\u306f\u3001CUDA Toolkit\u306b\u3088\u308a\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308bx86_64\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u5411\u3051\u306eLinux OS\u304c\u5fc5\u8981\u3067\u3059\u3002\u63a8\u5968\u74b0\u5883\u306fRed Hat Enterprise Linux\u307e\u305f\u306fRocky Linux\u30d0\u30fc\u30b8\u30e7\u30f3 8.x\u3067\u3059\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\uff08cuFile\u30c9\u30e9\u30a4\u30d0\uff09\u3092\u5229\u7528\u3059\u308b\u306b\u306f\u3001CUDA Toolkit\u306b\u542b\u307e\u308c\u308bnvidia-fs\u30c9\u30e9\u30a4\u30d0\u3068\u3001Mellanox OFED (OpenFabrics Enterprise Distribution) \u30c9\u30e9\u30a4\u30d0\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u3002 PostgreSQL PG-Strom v5.0\u306e\u5b9f\u884c\u306b\u306fPostgreSQL\u30d0\u30fc\u30b8\u30e7\u30f315\u4ee5\u964d\u304c\u5fc5\u8981\u3067\u3059\u3002 PG-Strom\u304c\u5185\u90e8\u7684\u306b\u5229\u7528\u3057\u3066\u3044\u308bAPI\u306e\u4e2d\u306b\u306f\u3001\u3053\u308c\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u63d0\u4f9b\u3055\u308c\u3066\u3044\u306a\u3044\u3082\u306e\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002 CUDA Toolkit PG-Strom\u306e\u5b9f\u884c\u306b\u306fCUDA Toolkit \u30d0\u30fc\u30b8\u30e7\u30f312.2update2\u4ee5\u964d\u304c\u5fc5\u8981\u3067\u3059\u3002 PG-Strom\u304c\u5185\u90e8\u7684\u306b\u5229\u7528\u3057\u3066\u3044\u308bAPI\u306e\u4e2d\u306b\u306f\u3001\u3053\u308c\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u63d0\u4f9b\u3055\u308c\u3066\u3044\u306a\u3044\u3082\u306e\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002","title":"\u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8"},{"location":"install/#_3","text":"\u4e00\u9023\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3068\u306a\u308a\u307e\u3059\u3002 H/W\u306e\u521d\u671f\u8a2d\u5b9a OS\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb MOFED\u30c9\u30e9\u30a4\u30d0\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb CUDA Toolkit \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb HeteroDB\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb PostgreSQL\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb PG-Strom\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb PostgreSQL\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff08\u5fc5\u8981\u306b\u5fdc\u3058\u3066\uff09 PostGIS contrib/cube","title":"\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806"},{"location":"install/#os","text":"CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u3092\u9078\u629e\u3057\u3001\u500b\u3005\u306e\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30d7\u30ed\u30bb\u30b9\u306b\u5f93\u3063\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4f5c\u696d\u3092\u884c\u3063\u3066\u304f\u3060\u3055\u3044\u3002 CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u306f\u3001 NVIDIA DEVELOPER ZONE \u306b\u304a\u3044\u3066\u7d39\u4ecb\u3055\u308c\u3066\u3044\u307e\u3059\u3002 Red Hat Enterprise Linux 8.x\u7cfb\u5217\uff08Rocky Linux 8.x\u7cfb\u5217\u3092\u542b\u3080\uff09\u306e\u5834\u5408\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u69cb\u6210\u306f\u3001\u30d9\u30fc\u30b9\u74b0\u5883\u3068\u3057\u3066\u300c\u6700\u5c0f\u9650\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u300d\u3092\u9078\u629e\u3057\u3001\u3055\u3089\u306b\u8ffd\u52a0\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3068\u3057\u3066\u300c\u958b\u767a\u30c4\u30fc\u30eb\u300d\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 Red Hat Enterprise Linux 9.x\u7cfb\u5217\uff08Rocky Linux 9.x\u7cfb\u5217\u3092\u542b\u3080\uff09\u306e\u5834\u5408\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u69cb\u6210\u306f\u3001\u30d9\u30fc\u30b9\u74b0\u5883\u3068\u3057\u3066\u300c\u6700\u5c0f\u9650\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u300d\u3092\u9078\u629e\u3057\u3001\u3055\u3089\u306b\u8ffd\u52a0\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3068\u3057\u3066\u300c\u6a19\u6e96\u300d\u300c\u958b\u767a\u30c4\u30fc\u30eb\u300d\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u30b5\u30fc\u30d0\u30fc\u3078\u306eOS\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u3001\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u30fc\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u305f\u3081\u306b\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002 \u306a\u304a\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u3067\u300c\u958b\u767a\u30c4\u30fc\u30eb\u300d\u3092\u9078\u629e\u3057\u306a\u304b\u3063\u305f\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067OS\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u306b\u8ffd\u52a0\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 # dnf groupinstall 'Development Tools' Tip \u30b5\u30fc\u30d0\u306b\u642d\u8f09\u3055\u308c\u3066\u3044\u308bGPU\u304c\u65b0\u3057\u3059\u304e\u308b\u5834\u5408\u3001OS\u8d77\u52d5\u4e2d\u306b\u30af\u30e9\u30c3\u30b7\u30e5\u7b49\u306e\u554f\u984c\u304c\u767a\u751f\u3059\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 \u305d\u306e\u5834\u5408\u3001\u30ab\u30fc\u30cd\u30eb\u8d77\u52d5\u30aa\u30d7\u30b7\u30e7\u30f3\u306b nouveau.modeset=0 \u3092\u8ffd\u52a0\u3057\u3066\u6a19\u6e96\u306e\u30b0\u30e9\u30d5\u30a3\u30c3\u30af\u30b9\u30c9\u30e9\u30a4\u30d0\u3092\u7121\u52b9\u5316\u3059\u308b\u4e8b\u3067 \u554f\u984c\u3092\u56de\u907f\u3067\u304d\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002","title":"OS\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"install/#nouveau","text":"NVIDIA\u88fdGPU\u5411\u3051\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306e\u4e92\u63db\u30c9\u30e9\u30a4\u30d0\u3067\u3042\u308bnouveau\u30c9\u30e9\u30a4\u30d0\u304c\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001nvidia\u30c9\u30e9\u30a4\u30d0\u3092\u30ed\u30fc\u30c9\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3002 \u3053\u306e\u5834\u5408\u306f\u3001nouveau\u30c9\u30e9\u30a4\u30d0\u306e\u7121\u52b9\u5316\u8a2d\u5b9a\u3092\u884c\u3063\u305f\u4e0a\u3067\u30b7\u30b9\u30c6\u30e0\u3092\u4e00\u5ea6\u518d\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002 nouveau\u30c9\u30e9\u30a4\u30d0\u3092\u7121\u52b9\u5316\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092 /etc/modprobe.d/disable-nouveau.conf \u3068\u3044\u3046\u540d\u524d\u3067\u4fdd\u5b58\u3057\u3001 dracut \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066Linux kernel\u306e\u30d6\u30fc\u30c8\u30a4\u30e1\u30fc\u30b8\u306b\u53cd\u6620\u3057\u307e\u3059\u3002 \u305d\u306e\u5f8c\u3001\u30b7\u30b9\u30c6\u30e0\u3092\u4e00\u5ea6\u518d\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002 # cat > /etc/modprobe.d/disable-nouveau.conf </kernel/drivers/nvme/host/nvme-rdma.ko.xz \uff09\u3067\u306f\u306a\u304f\u3001\u8ffd\u52a0\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f /lib/modules//extra/mlnx-nvme/host/nvme-rdma.ko \u304c\u512a\u5148\u3057\u3066\u4f7f\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002 $ modinfo nvme-rdma filename: /lib/modules/5.14.0-427.18.1.el9_4.x86_64/extra/mlnx-nvme/host/nvme-rdma.ko license: GPL v2 rhelversion: 9.4 srcversion: 16C0049F26768D6EA12771B depends: nvme-core,rdma_cm,ib_core,nvme-fabrics,mlx_compat retpoline: Y name: nvme_rdma vermagic: 5.14.0-427.18.1.el9_4.x86_64 SMP preempt mod_unload modversions parm: register_always:Use memory registration even for contiguous memory regions (bool) \u65e2\u306b\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308b\u30ab\u30fc\u30cd\u30eb\u30e2\u30b8\u30e5\u30fc\u30eb\uff08\u4f8b: nvme \uff09\u3092\u7f6e\u304d\u63db\u3048\u308b\u305f\u3081\u3001\u3053\u3053\u3067\u4e00\u5ea6\u30b7\u30b9\u30c6\u30e0\u306e\u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3\u3068\u518d\u8d77\u52d5\u3092\u884c\u3044\u307e\u3059\u3002 mlnxofedinstall \u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5b8c\u4e86\u5f8c\u306b\u3001 dracut -f \u3092\u5b9f\u884c\u3059\u308b\u306e\u3092\u5fd8\u308c\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002 Tips Linux kernel\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3068MOFED\u30c9\u30e9\u30a4\u30d0 RHEL\u7cfb\u5217\u306e\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u306b\u304a\u3044\u3066\u3001MODED\u30c9\u30e9\u30a4\u30d0\u306fDKMS(Dynamic Kernel Module Support)\u3092\u4f7f\u7528\u3057\u307e\u305b\u3093\u3002 \u305d\u306e\u305f\u3081\u3001Linux kernel\u3092\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3057\u305f\u5834\u5408\u306b\u306f\u3001\u4e0a\u8a18\u306e\u624b\u9806\u3092\u518d\u5ea6\u5b9f\u884c\u3057\u3001\u65b0\u3057\u3044Linux kernel\u306b\u5bfe\u5fdc\u3057\u305fMOFED\u30c9\u30e9\u30a4\u30d0\u3092\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u5f8c\u8ff0\u306eCUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306a\u3069\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u66f4\u65b0\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067Linux kernel\u304c\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u308b\u4e8b\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u305d\u306e\u5834\u5408\u3067\u3082\u540c\u69d8\u3067\u3059\u3002","title":"MOFED\u30c9\u30e9\u30a4\u30d0\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"install/#heterodb-swdc","text":"PG-Strom\u307b\u304b\u95a2\u9023\u30d1\u30c3\u30b1\u30fc\u30b8\u306f HeteroDB Software Distribution Center \u304b\u3089\u914d\u5e03\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3092\u5165\u624b\u3059\u308b\u305f\u3081\u306b\u3001HeteroDB-SWDC\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u5b9a\u7fa9\u3092yum\u30b7\u30b9\u30c6\u30e0\u306b\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 HeteroDB-SWDC\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u5b9a\u7fa9\u306fheterodb-swdc\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u3088\u308a\u63d0\u4f9b\u3055\u308c\u307e\u3059\u3002 Web\u30d6\u30e9\u30a6\u30b6\u306a\u3069\u3067 HeteroDB Software Distribution Center \u3078\u30a2\u30af\u30bb\u30b9\u3057\u3001\u30da\u30fc\u30b8\u306e\u5148\u982d\u306b\u30ea\u30f3\u30af\u306e\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b heterodb-swdc-1.3-1.el9.noarch.rpm \u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002\uff08RHEL8\u306e\u5834\u5408\u306f heterodb-swdc-1.3-1.el8.noarch.rpm \uff09 heterodb-swdc\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u308b\u3068\u3001HeteroDB-SWDC\u304b\u3089\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3092\u5165\u624b\u3059\u308b\u305f\u3081\u306eyum\u30b7\u30b9\u30c6\u30e0\u3078\u306e\u8a2d\u5b9a\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306bheterodb-swdc\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 # dnf install https://heterodb.github.io/swdc/yum/rhel8-noarch/heterodb-swdc-1.2-1.el8.noarch.rpm","title":"heterodb-swdc\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"install/#cuda-toolkit","text":"\u672c\u7bc0\u3067\u306fCUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u65e2\u306b\u6700\u65b0\u306eCUDA Toolkit\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u3067\u3042\u308b\u5834\u5408\u3001\u672c\u7bc0\u306e\u521d\u671f\u8a2d\u5b9a\u3068\u5408\u81f4\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 NVIDIA\u306fCUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\uff12\u901a\u308a\u306e\u65b9\u6cd5\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002\u4e00\u3064\u306f\u81ea\u5df1\u5b9f\u884c\u578b\u30a2\u30fc\u30ab\u30a4\u30d6\uff08runfile\uff09\u306b\u3088\u308b\u3082\u306e\u3002\u3082\u3046\u4e00\u3064\u306fRPM\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u3088\u308b\u3082\u306e\u3067\u3001PG-Strom\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306b\u306fRPM\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u3088\u308b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u63a8\u5968\u3057\u307e\u3059\u3002 CUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u7528\u30d1\u30c3\u30b1\u30fc\u30b8\u306fNVIDIA DEVELOPER ZONE\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u9069\u5207\u306aOS\u3001\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3001\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u3001\u300erpm(network)\u300f\u7248\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u300erpm(network)\u300f\u3092\u9078\u629e\u3059\u308b\u3068\u3001\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u767b\u9332\u3057\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7d4c\u7531\u3067\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u305f\u3081\u306e\u30b7\u30a7\u30eb\u30b3\u30de\u30f3\u30c9\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u30ac\u30a4\u30c0\u30f3\u30b9\u901a\u308a\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u9032\u3081\u3066\u304f\u3060\u3055\u3044\u3002 # dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo # dnf clean all # dnf install cuda-toolkit-12-5 CUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u7d9a\u3044\u3066\u3001\u30c9\u30e9\u30a4\u30d0\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u305f\u3081\u306e\u30b3\u30de\u30f3\u30c9\u304c\uff12\u7a2e\u985e\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u3053\u3053\u3067\u306f \u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u7248\u306envidia-driver \u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u7248\u306e\u307f\u304cGPUDirect Storage\u6a5f\u80fd\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u304a\u308a\u3001PG-Strom\u306eGPU-Direct SQL\u306f\u672c\u6a5f\u80fd\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002 Tips Volta\u4ee5\u524d\u306eGPU\u306e\u5229\u7528\u306b\u3064\u3044\u3066 \u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u7248nvidia\u30c9\u30e9\u30a4\u30d0\u306f\u3001Volta\u4e16\u4ee3\u4ee5\u524d\u306eGPU\u306b\u306f\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u305b\u3093\u3002 \u3057\u305f\u304c\u3063\u3066\u3001Volta\u307e\u305f\u306fPascal\u4e16\u4ee3\u306eGPU\u3067PG-Strom\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u306f\u3001\u30d7\u30ed\u30d7\u30e9\u30a8\u30bf\u30ea\u7248\u306e\u30c9\u30e9\u30a4\u30d0\u3067\u3042\u3063\u3066\u3082GPUDirect Storage\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u308bCUDA 12.2 Update 1\u3092\u5229\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 CUDA 12.2 Update 1\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306f \u3053\u3061\u3089 \u304b\u3089\u5165\u624b\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u7d9a\u3044\u3066\u3001GPU-Direct Storage(GDS)\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306e\u30c9\u30e9\u30a4\u30d0\u30e2\u30b8\u30e5\u30fc\u30eb nvidia-gds \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 \u30d1\u30c3\u30b1\u30fc\u30b8\u540d\u306b\u7d9a\u3044\u3066CUDA Toolkit\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u540c\u4e00\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u540d\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 # dnf module install nvidia-driver:open-dkms # dnf install nvidia-gds-12-5 \u6b63\u5e38\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3001 /usr/local/cuda \u914d\u4e0b\u306bCUDA Toolkit\u304c\u5c0e\u5165\u3055\u308c\u3066\u3044\u307e\u3059\u3002 $ ls /usr/local/cuda/ bin/ gds/ nsightee_plugins/ targets/ compute-sanitizer/ include@ nvml/ tools/ CUDA_Toolkit_Release_Notes.txt lib64@ nvvm/ version.json DOCS libnvvp/ README EULA.txt LICENSE share/ extras/ man/ src/ \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001GPU\u304c\u6b63\u3057\u304f\u8a8d\u8b58\u3055\u308c\u3066\u3044\u308b\u4e8b\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 nvidia-smi \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u51fa\u529b\u4f8b\u306e\u3088\u3046\u306b\u3001\u30b7\u30b9\u30c6\u30e0\u306b\u642d\u8f09\u3055\u308c\u3066\u3044\u308bGPU\u306e\u60c5\u5831\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002 $ nvidia-smi Mon Jun 3 09:56:41 2024 +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 555.42.02 Driver Version: 555.42.02 CUDA Version: 12.5 | |-----------------------------------------+------------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+========================+======================| | 0 NVIDIA A100-PCIE-40GB Off | 00000000:41:00.0 Off | 0 | | N/A 58C P0 66W / 250W | 1MiB / 40960MiB | 0% Default | | | | Disabled | +-----------------------------------------+------------------------+----------------------+ +-----------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=========================================================================================| | No running processes found | +-----------------------------------------------------------------------------------------+","title":"CUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"install/#gpudirect-storage","text":"\u4e0a\u8a18\u306e\u624b\u9806\u3067CUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3001GPUDirect Storage\u304c\u5229\u7528\u53ef\u80fd\u306a\u72b6\u614b\u3068\u306a\u3063\u3066\u3044\u308b\u306f\u305a\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u901a\u308a\u3001 gdscheck \u30c4\u30fc\u30eb\u3092\u7528\u3044\u3066\u30b9\u30c8\u30ec\u30fc\u30b8\u30c7\u30d0\u30a4\u30b9\u6bce\u306e\u30b3\u30f3\u30d5\u30a3\u30b0\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \uff08\u3053\u306e\u4f8b\u3067\u306f\u3001 nvme \u3060\u3051\u3067\u306a\u304f\u3001 nvme-rdma \u3084 rpcrdma \u30ab\u30fc\u30cd\u30eb\u30e2\u30b8\u30e5\u30fc\u30eb\u3082\u30ed\u30fc\u30c9\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u95a2\u9023\u3059\u308b\u6a5f\u80fd\u304c Supported \u3068\u306a\u3063\u3066\u3044\u307e\u3059\uff09 # /usr/local/cuda/gds/tools/gdscheck -p GDS release version: 1.10.0.4 nvidia_fs version: 2.20 libcufile version: 2.12 Platform: x86_64 ============ ENVIRONMENT: ============ ===================== DRIVER CONFIGURATION: ===================== NVMe : Supported NVMeOF : Supported SCSI : Unsupported ScaleFlux CSD : Unsupported NVMesh : Unsupported DDN EXAScaler : Unsupported IBM Spectrum Scale : Unsupported NFS : Supported BeeGFS : Unsupported WekaFS : Unsupported Userspace RDMA : Unsupported --Mellanox PeerDirect : Disabled --rdma library : Not Loaded (libcufile_rdma.so) --rdma devices : Not configured --rdma_device_status : Up: 0 Down: 0 ===================== CUFILE CONFIGURATION: ===================== properties.use_compat_mode : true properties.force_compat_mode : false properties.gds_rdma_write_support : true properties.use_poll_mode : false properties.poll_mode_max_size_kb : 4 properties.max_batch_io_size : 128 properties.max_batch_io_timeout_msecs : 5 properties.max_direct_io_size_kb : 16384 properties.max_device_cache_size_kb : 131072 properties.max_device_pinned_mem_size_kb : 33554432 properties.posix_pool_slab_size_kb : 4 1024 16384 properties.posix_pool_slab_count : 128 64 32 properties.rdma_peer_affinity_policy : RoundRobin properties.rdma_dynamic_routing : 0 fs.generic.posix_unaligned_writes : false fs.lustre.posix_gds_min_kb: 0 fs.beegfs.posix_gds_min_kb: 0 fs.weka.rdma_write_support: false fs.gpfs.gds_write_support: false profile.nvtx : false profile.cufile_stats : 0 miscellaneous.api_check_aggressive : false execution.max_io_threads : 4 execution.max_io_queue_depth : 128 execution.parallel_io : true execution.min_io_threshold_size_kb : 8192 execution.max_request_parallelism : 4 properties.force_odirect_mode : false properties.prefer_iouring : false ========= GPU INFO: ========= GPU index 0 NVIDIA A100-PCIE-40GB bar:1 bar size (MiB):65536 supports GDS, IOMMU State: Disabled ============== PLATFORM INFO: ============== IOMMU: disabled Nvidia Driver Info Status: Supported(Nvidia Open Driver Installed) Cuda Driver Version Installed: 12050 Platform: AS -2014CS-TR, Arch: x86_64(Linux 5.14.0-427.18.1.el9_4.x86_64) Platform verification succeeded Tips RAID\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306e\u8ffd\u52a0\u8a2d\u5b9a GPUDirect Storage\u3092\u5229\u7528\u3057\u3066Software RAID (md-raid0) \u533a\u753b\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u3059\u5834\u5408\u3001 \u4ee5\u4e0b\u306e\u4e00\u884c\u3092 /lib/udev/rules.d/63-md-raid-arrays.rules \u8a2d\u5b9a\u306b\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 IMPORT{\u200bprogram}=\"/usr/sbin/mdadm --detail --export $devnode\" \u305d\u306e\u5f8c\u3001\u8a2d\u5b9a\u3092\u53cd\u6620\u3055\u305b\u308b\u305f\u3081\u306b\u30b7\u30b9\u30c6\u30e0\u3092\u518d\u8d77\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u8a73\u3057\u304f\u306f NVIDIA GPUDirect Storage Installation and Troubleshooting Guide \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002","title":"GPUDirect Storage\u306e\u78ba\u8a8d"},{"location":"install/#pci-bar1","text":"GPU-Direct SQL\u306f\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u3092\u30db\u30b9\u30c8\u30b7\u30b9\u30c6\u30e0\u4e0a\u306ePCI BAR1\u9818\u57df\uff08\u7269\u7406\u30a2\u30c9\u30ec\u30b9\u7a7a\u9593\uff09\u306b\u30de\u30c3\u30d7\u3057\u3001\u305d\u3053\u3092Destination\u3068\u3059\u308bP2P-RDMA\u8981\u6c42\u3092NVME\u6a5f\u5668\u306b\u5bfe\u3057\u3066\u884c\u3046\u4e8b\u3067\u3001\u30ed\u30b9\u306e\u306a\u3044\u9ad8\u901f\u306a\u30c7\u30fc\u30bf\u8aad\u51fa\u3057\u3092\u5b9f\u73fe\u3057\u307e\u3059\u3002 \u5341\u5206\u306a\u591a\u91cd\u5ea6\u3092\u6301\u3063\u305fP2P-RDMA\u3092\u884c\u3046\u306b\u306f\u3001GPU\u304c\u30d0\u30c3\u30d5\u30a1\u3092\u30de\u30c3\u30d7\u3059\u308b\u306e\u306b\u5341\u5206\u306aPCI BAR1\u9818\u57df\u3092\u6709\u3057\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u5927\u534a\u306eGPU\u3067\u306fPCI BAR1\u9818\u57df\u306e\u5927\u304d\u3055\u306f\u56fa\u5b9a\u3067\u3001PG-Strom\u306b\u304a\u3044\u3066\u306f\u3001\u305d\u308c\u304cGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u30b5\u30a4\u30ba\u3092\u4e0a\u56de\u3063\u3066\u3044\u308b\u88fd\u54c1\u3092\u63a8\u5968\u3057\u3066\u3044\u307e\u3059\u3002 \u3057\u304b\u3057\u3001\u4e00\u90e8\u306eGPU\u88fd\u54c1\u306b\u304a\u3044\u3066\u306f\u300e\u52d5\u4f5c\u30e2\u30fc\u30c9\u300f\u3092\u5207\u308a\u66ff\u3048\u308b\u4e8b\u3067PCI BAR1\u9818\u57df\u306e\u30b5\u30a4\u30ba\u3092\u5207\u308a\u66ff\u3048\u308b\u4e8b\u304c\u3067\u304d\u308b\u3082\u306e\u304c\u5b58\u5728\u3057\u307e\u3059\u3002\u304a\u4f7f\u3044\u306eGPU\u304c\u305d\u308c\u306b\u8a72\u5f53\u3059\u308b\u5834\u5408\u306f\u3001 NVIDIA Display Mode Selector Tool \u3092\u53c2\u7167\u306e\u4e0a\u3001PCI BAR1\u9818\u57df\u306e\u30b5\u30a4\u30ba\u3092\u6700\u5927\u5316\u3059\u308b\u30e2\u30fc\u30c9\u3078\u3068\u5207\u308a\u66ff\u3048\u3066\u304f\u3060\u3055\u3044\u3002 2023\u5e7412\u6708\u6642\u70b9\u3067\u306f\u3001\u4ee5\u4e0b\u306eGPU\u306e\u5834\u5408\u306bNVIDIA Display Mode Selector Tool\u3092\u5229\u7528\u3057\u3066 *Display Off \u30e2\u30fc\u30c9\u3078\u3068\u5207\u308a\u66ff\u3048\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 NVIDIA L40S NVIDIA L40 NVIDIA A40 NVIDIA RTX 6000 Ada NVIDIA RTX A6000 NVIDIA RTX A5500 NVIDIA RTX A5000 \u30b7\u30b9\u30c6\u30e0\u306b\u642d\u8f09\u3055\u308c\u3066\u3044\u308bGPU\u306e\u30e1\u30e2\u30ea\u30b5\u30a4\u30ba\u3084PCI BAR1\u30b5\u30a4\u30ba\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306f\u3001 nvidia-smi -q \u30b3\u30de\u30f3\u30c9\u3092\u5229\u7528\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u30e1\u30e2\u30ea\u95a2\u9023\u306e\u72b6\u614b\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002 $ nvidia-smi -q : FB Memory Usage Total : 46068 MiB Reserved : 685 MiB Used : 4 MiB Free : 45377 MiB BAR1 Memory Usage Total : 65536 MiB Used : 1 MiB Free : 65535 MiB :","title":"PCI Bar1\u30e1\u30e2\u30ea\u306e\u8a2d\u5b9a"},{"location":"install/#heterodb","text":"heterodb-extra \u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u3001PG-Strom\u306b\u4ee5\u4e0b\u306e\u6a5f\u80fd\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002 \u30de\u30eb\u30c1GPU\u306e\u5bfe\u5fdc GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5bfe\u5fdc \u30e9\u30a4\u30bb\u30f3\u30b9\u7ba1\u7406\u6a5f\u80fd \u3053\u308c\u3089\u306e\u6a5f\u80fd\u3092\u4f7f\u7528\u305b\u305a\u3001\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u7248\u306e\u6a5f\u80fd\u306e\u307f\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f heterodb-extra \u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u4e0d\u8981\u3067\u3059\u3002 \u672c\u7bc0\u306e\u5185\u5bb9\u306f\u8aad\u307f\u98db\u3070\u3057\u3066\u69cb\u3044\u307e\u305b\u3093\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001SWDC\u304b\u3089 heterodb-extra \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002 # dnf install heterodb-extra","title":"HeteroDB \u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb"},{"location":"install/#_5","text":"heterodb-extra \u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u5168\u3066\u306e\u6a5f\u80fd\u3092\u5229\u7528\u3059\u308b\u306b\u306f\u3001HeteroDB\u793e\u304c\u63d0\u4f9b\u3059\u308b\u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u6709\u52b9\u5316\u304c\u5fc5\u8981\u3067\u3059\u3002\u30e9\u30a4\u30bb\u30f3\u30b9\u306a\u3057\u3067\u904b\u7528\u3059\u308b\u4e8b\u3082\u53ef\u80fd\u3067\u3059\u304c\u3001\u305d\u306e\u5834\u5408\u3001\u4e0b\u8a18\u306e\u6a5f\u80fd\u304c\u5236\u9650\u3092\u53d7\u3051\u307e\u3059\u3002 \u30de\u30eb\u30c1GPU\u306e\u5229\u7528 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u306b\u304a\u3051\u308b\u8907\u6570NVME-SSD\u306b\u3088\u308b\u30b9\u30c8\u30e9\u30a4\u30d4\u30f3\u30b0(md-raid0) GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u306b\u304a\u3051\u308bNVME-oF\u30c7\u30d0\u30a4\u30b9\u306e\u5229\u7528 GPU\u7248PostGIS\u306b\u304a\u3051\u308bGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u5229\u7528 \u30e9\u30a4\u30bb\u30f3\u30b9\u30d5\u30a1\u30a4\u30eb\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5f62\u5f0f\u3067HeteroDB\u793e\u304b\u3089\u5165\u624b\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 IAgIVdKxhe+BSer3Y67jQW0+uTzYh00K6WOSH7xQ26Qcw8aeUNYqJB9YcKJTJb+QQhjmUeQpUnboNxVwLCd3HFuLXeBWMKp11/BgG0FSrkUWu/ZCtDtw0F1hEIUY7m767zAGV8y+i7BuNXGJFvRlAkxdVO3/K47ocIgoVkuzBfLvN/h9LffOydUnHPzrFHfLc0r3nNNgtyTrfvoZiXegkGM9GBTAKyq8uWu/OGonh9ybzVKOgofhDLk0rVbLohOXDhMlwDl2oMGIr83tIpCWG+BGE+TDwsJ4n71Sv6n4bi/ZBXBS498qShNHDGrbz6cNcDVBa+EuZc6HzZoF6UrljEcl= ---- VERSION:2 SERIAL_NR:HDB-TRIAL ISSUED_AT:2019-05-09 EXPIRED_AT:2019-06-08 GPU_UUID:GPU-a137b1df-53c9-197f-2801-f2dccaf9d42f \u3053\u308c\u3092 /etc/heterodb.license \u306b\u30b3\u30d4\u30fc\u3057\u3001PostgreSQL\u3092\u518d\u8d77\u52d5\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306bPostgreSQL\u306e\u8d77\u52d5\u30ed\u30b0\u306b\u30e9\u30a4\u30bb\u30f3\u30b9\u60c5\u5831\u304c\u51fa\u529b\u3055\u308c\u3001\u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u6709\u52b9\u5316\u304c\u884c\u308f\u308c\u305f\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 : LOG: HeteroDB Extra module loaded [api_version=20231105,cufile=on,nvme_strom=off,githash=9ca2fe4d2fbb795ad2d741dcfcb9f2fe499a5bdf] LOG: HeteroDB License: { \"version\" : 2, \"serial_nr\" : \"HDB-TRIAL\", \"issued_at\" : \"2022-11-19\", \"expired_at\" : \"2099-12-31\", \"nr_gpus\" : 1, \"gpus\" : [ { \"uuid\" : \"GPU-13943bfd-5b30-38f5-0473-78979c134606\" } ]} LOG: PG-Strom version 5.0.1 built for PostgreSQL 15 (githash: 972441dbafed6679af86af40bc8613be2d73c4fd) :","title":"\u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u6709\u52b9\u5316"},{"location":"install/#postgresql","text":"\u672c\u7bc0\u3067\u306fRPM\u306b\u3088\u308bPostgreSQL\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002 \u30bd\u30fc\u30b9\u304b\u3089\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u95a2\u3057\u3066\u306f\u65e2\u306b\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u304c\u6570\u591a\u304f\u5b58\u5728\u3057\u3001 ./configure \u30b9\u30af\u30ea\u30d7\u30c8\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u591a\u5c90\u306b\u308f\u305f\u308b\u4e8b\u304b\u3089\u3001\u3053\u3053\u3067\u306f\u7d39\u4ecb\u3057\u307e\u305b\u3093\u3002 Linux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u306e\u914d\u5e03\u3059\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u3082PostgreSQL\u306f\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u5fc5\u305a\u3057\u3082\u6700\u65b0\u3067\u306f\u306a\u304f\u3001PG-Strom\u306e\u5bfe\u5fdc\u30d0\u30fc\u30b8\u30e7\u30f3\u3088\u308a\u3082\u53e4\u3044\u3082\u306e\u3067\u3042\u308b\u4e8b\u304c\u591a\u3005\u3042\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001Red Hat Enterprise Linux 7.x\u3067\u914d\u5e03\u3055\u308c\u3066\u3044\u308bPostgreSQL\u306fv9.2.x\u3067\u3059\u304c\u3001\u3053\u308c\u306fPostgreSQL\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u3068\u3057\u3066\u65e2\u306bEOL\u3068\u306a\u3063\u3066\u3044\u308b\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u3059\u3002 PostgreSQL Global Development Group\u306f\u3001\u6700\u65b0\u306ePostgreSQL\u304a\u3088\u3073\u95a2\u9023\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u914d\u5e03\u306e\u305f\u3081\u306byum\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002 EPEL\u306e\u8a2d\u5b9a\u306e\u3088\u3046\u306b\u3001yum\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8a2d\u5b9a\u3092\u884c\u3046\u3060\u3051\u306e\u5c0f\u3055\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001\u305d\u306e\u5f8c\u3001PostgreSQL\u3084\u305d\u306e\u4ed6\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 yum\u30ea\u30dd\u30b8\u30c8\u30ea\u5b9a\u7fa9\u306e\u4e00\u89a7\u306f http://yum.postgresql.org/repopackages.php \u3067\u3059\u3002 PostgreSQL\u30e1\u30b8\u30e3\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u3068Linux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u3054\u3068\u306b\u591a\u304f\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u5b9a\u7fa9\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u3042\u306a\u305f\u306eLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u5411\u3051\u306ePostgreSQL 15\u4ee5\u964d\u306e\u3082\u306e\u3092\u9078\u629e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u30b9\u30c6\u30c3\u30d7\u3067 PostgreSQL \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u884c\u3044\u307e\u3059\u3002 yum\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u5b9a\u7fa9\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb OS\u6a19\u6e96\u306ePostgreSQL\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u7121\u52b9\u5316 PostgreSQL\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u4f8b\u3048\u3070PostgreSQL v16\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001PG-Strom\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u306f postgresql16-server \u304a\u3088\u3073 postgresql16-devel \u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u5fc5\u8981\u3067\u3059\u3002 \u4ee5\u4e0b\u306f\u3001RHEL9\u306b\u304a\u3044\u3066PostgreSQL v16\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u624b\u9806\u306e\u4f8b\u3067\u3059\u3002 # dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm # dnf -y module disable postgresql # dnf install -y postgresql16-devel postgresql16-server Note Red Hat Enterprise Linux\u306e\u5834\u5408\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u540d postgresql \u304c\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u6a19\u6e96\u306e\u3082\u306e\u3068\u7af6\u5408\u3057\u3066\u3057\u307e\u3044\u3001PGDG\u63d0\u4f9b\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3002\u305d\u306e\u305f\u3081\u3001 dnf -y module disable postgresql \u30b3\u30de\u30f3\u30c9\u3092\u7528\u3044\u3066\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u6a19\u6e96\u306e postgresql \u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u7121\u52b9\u5316\u3057\u307e\u3059\u3002","title":"PostgreSQL\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"install/#pg-strom","text":"\u672c\u7bc0\u3067\u306fPG-Strom\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u63a8\u5968\u306fRPM\u306b\u3088\u308b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u3059\u304c\u3001\u958b\u767a\u8005\u5411\u3051\u306b\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304b\u3089\u306e\u30d3\u30eb\u30c9\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3082\u7d39\u4ecb\u3057\u307e\u3059\u3002","title":"PG-Strom\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"install/#rpm","text":"PG-Strom\u304a\u3088\u3073\u95a2\u9023\u30d1\u30c3\u30b1\u30fc\u30b8\u306f HeteroDB Software Distribution Center \u3088\u308a\u914d\u5e03\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u65e2\u306byum\u30b7\u30b9\u30c6\u30e0\u3078\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8ffd\u52a0\u6e08\u307f\u3067\u3042\u308c\u3070\u3001\u305d\u308c\u307b\u3069\u4f5c\u696d\u306f\u591a\u304f\u3042\u308a\u307e\u305b\u3093\u3002 \u57fa\u76e4\u3068\u306a\u308bPostgreSQL\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3054\u3068\u306b\u5225\u500b\u306ePG-Strom\u306eRPM\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u6e96\u5099\u3055\u308c\u3066\u304a\u308a\u3001PostgreSQL v15\u7528\u3067\u3042\u308c\u3070 pg_strom-PG15 \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u3001PostgreSQL v16\u7528\u3067\u3042\u308c\u3070 pg_strom-PG16 \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u3001PostgreSQL\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30d0\u30a4\u30ca\u30ea\u4e92\u63db\u6027\u306b\u4f34\u3046\u5236\u7d04\u3067\u3059\u3002 # dnf install -y pg_strom-PG16 \u4ee5\u4e0a\u3067\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u5b8c\u4e86\u3067\u3059\u3002","title":"RPM\u306b\u3088\u308b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"install/#_6","text":"\u958b\u767a\u8005\u5411\u3051\u306b\u3001\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304b\u3089PG-Strom\u3092\u30d3\u30eb\u30c9\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3082\u7d39\u4ecb\u3057\u307e\u3059\u3002","title":"\u30bd\u30fc\u30b9\u304b\u3089\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"install/#_7","text":"RPM\u30d1\u30c3\u30b1\u30fc\u30b8\u3068\u540c\u69d8\u306b\u3001\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306etarball\u3092 HeteroDB Software Distribution Center \u304b\u3089\u5165\u624b\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u305f\u3060\u3001tarball\u306e\u30ea\u30ea\u30fc\u30b9\u306b\u306f\u3042\u308b\u7a0b\u5ea6\u306e\u30bf\u30a4\u30e0\u30e9\u30b0\u304c\u751f\u3058\u3066\u3057\u307e\u3046\u305f\u3081\u3001\u6700\u65b0\u306e\u958b\u767a\u7248\u3092\u4f7f\u3044\u305f\u3044\u5834\u5408\u306b\u306f PG-Strom\u306eGitHub\u30ea\u30dd\u30b8\u30c8\u30ea \u306e master \u30d6\u30e9\u30f3\u30c1\u3092\u30c1\u30a7\u30c3\u30af\u30a2\u30a6\u30c8\u3059\u308b\u65b9\u6cd5\u306e\u65b9\u304c\u597d\u307e\u308c\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 $ git clone https://github.com/heterodb/pg-strom.git Cloning into 'pg-strom'... remote: Counting objects: 13797, done. remote: Compressing objects: 100% (215/215), done. remote: Total 13797 (delta 208), reused 339 (delta 167), pack-reused 13400 Receiving objects: 100% (13797/13797), 11.81 MiB | 1.76 MiB/s, done. Resolving deltas: 100% (10504/10504), done.","title":"\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u5165\u624b"},{"location":"install/#pg-strom_1","text":"PG-Strom\u3092\u30d3\u30eb\u30c9\u3059\u308b\u6642\u306e\u30b3\u30f3\u30d5\u30a3\u30b0\u306f\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u306ePostgreSQL\u3068\u53b3\u5bc6\u306b\u4e00\u81f4\u3057\u3066\u3044\u306a\u3051\u308c\u3070\u3044\u3051\u307e\u305b\u3093\u3002\u4f8b\u3048\u3070\u3001\u540c\u3058\u69cb\u9020\u4f53\u304c\u30d3\u30eb\u30c9\u6642\u306e\u30b3\u30f3\u30d5\u30a3\u30b0\u306b\u3088\u308aPostgreSQL\u3068PG-Strom\u3067\u7570\u306a\u3063\u305f\u30ec\u30a4\u30a2\u30a6\u30c8\u3092\u6301\u3063\u3066\u3057\u307e\u3063\u305f\u3068\u3059\u308c\u3070\u3001\u975e\u5e38\u306b\u767a\u898b\u306e\u96e3\u3057\u3044\u30d0\u30b0\u3092\u751f\u307f\u51fa\u3057\u3066\u3057\u307e\u3046\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 \u3057\u305f\u304c\u3063\u3066\u3001\uff08\u4e00\u8cab\u6027\u306e\u306a\u3044\u72b6\u614b\u3092\u907f\u3051\u308b\u305f\u3081\uff09PG-Strom\u306f\u72ec\u81ea\u306bconfigure\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u8d70\u3089\u305b\u305f\u308a\u306f\u305b\u305a\u3001 pg_config \u3092\u4f7f\u3063\u3066PostgreSQL\u306e\u30d3\u30eb\u30c9\u6642\u8a2d\u5b9a\u3092\u53c2\u7167\u3057\u307e\u3059\u3002 pg_config \u306b\u30d1\u30b9\u304c\u901a\u3063\u3066\u304a\u308a\u3001\u305d\u308c\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u306ePostgreSQL\u306e\u3082\u306e\u3067\u3042\u308c\u3070\u3001\u305d\u306e\u307e\u307e make \u3001 make install \u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 \u76f4\u63a5\u30d1\u30b9\u304c\u901a\u3063\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u3001 make \u30b3\u30de\u30f3\u30c9\u306b PG_CONFIG=... \u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u4e0e\u3048\u3001 pg_config \u306e\u30d5\u30eb\u30d1\u30b9\u3092\u6e21\u3057\u307e\u3059\u3002 $ cd pg-strom/src $ make PG_CONFIG=/usr/pgsql-16/bin/pg_config $ sudo make install PG_CONFIG=/usr/pgsql-16/bin/pg_config","title":"PG-Strom\u306e\u30d3\u30eb\u30c9"},{"location":"install/#_8","text":"","title":"\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u306e\u8a2d\u5b9a"},{"location":"install/#_9","text":"\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u306e\u4f5c\u6210\u304c\u6e08\u3093\u3067\u3044\u306a\u3044\u5834\u5408\u306f\u3001 initdb \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066PostgreSQL\u306e\u521d\u671f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 RPM\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u304a\u3051\u308b\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u306e\u30d1\u30b9\u306f /var/lib/pgsql//data \u3067\u3059\u3002 postgresql-alternatives \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001PostgreSQL\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u62e0\u3089\u305a /var/lib/pgdata \u3067\u53c2\u7167\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 # su - postgres $ /usr/pgsql-16/bin/initdb -D /var/lib/pgdata/ The files belonging to this database system will be owned by user \"postgres\". This user must also own the server process. The database cluster will be initialized with locale \"en_US.UTF-8\". The default database encoding has accordingly been set to \"UTF8\". The default text search configuration will be set to \"english\". Data page checksums are disabled. fixing permissions on existing directory /var/lib/pgdata ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... Asia/Tokyo creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok initdb: warning: enabling \"trust\" authentication for local connections You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb. Success. You can now start the database server using: pg_ctl -D /var/lib/pgdata/ -l logfile start","title":"\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u306e\u4f5c\u6210"},{"location":"install/#postgresqlconf","text":"\u7d9a\u3044\u3066\u3001PostgreSQL\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3067\u3042\u308b postgresql.conf \u3092\u7de8\u96c6\u3057\u307e\u3059\u3002 PG-Strom\u3092\u52d5\u4f5c\u3055\u305b\u308b\u305f\u3081\u306b\u306f\u3001\u6700\u4f4e\u9650\u3001\u4ee5\u4e0b\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u8a2d\u5b9a\u304c\u5fc5\u8981\u3067\u3059\u3002 \u3053\u308c\u4ee5\u5916\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3064\u3044\u3066\u3082\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u7528\u9014\u3084\u60f3\u5b9a\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u8e0f\u307e\u3048\u3066\u691c\u8a0e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 shared_preload_libraries PG-Strom\u30e2\u30b8\u30e5\u30fc\u30eb\u306f shared_preload_libraries \u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3088\u308apostmaster\u30d7\u30ed\u30bb\u30b9\u306e\u8d77\u52d5\u6642\u306b\u30ed\u30fc\u30c9\u3055\u308c\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u30aa\u30f3\u30c7\u30de\u30f3\u30c9\u3067\u306e\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30ed\u30fc\u30c9\u306f\u30b5\u30dd\u30fc\u30c8\u5bfe\u8c61\u5916\u3067\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u9805\u76ee\u306f\u5fc5\u9808\u3067\u3059\u3002 shared_preload_libraries = '$libdir/pg_strom' max_worker_processes PG-Strom\u306f\u6570\u500b\u306e\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u3092\u5185\u90e8\u7684\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3067\u3042\u308b 8 \u3067\u306f\u3001\u305d\u308c\u4ee5\u5916\u306e\u51e6\u7406\u306b\u5229\u7528\u3067\u304d\u308b\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\u6570\u304c\u3042\u307e\u308a\u306b\u3082\u5c11\u306a\u3059\u304e\u3066\u3057\u307e\u3044\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u3042\u308b\u7a0b\u5ea6\u306e\u4f59\u88d5\u3092\u6301\u3063\u305f\u5024\u3092\u8a2d\u5b9a\u3059\u3079\u304d\u3067\u3059\u3002 max_worker_processes = 100 shared_buffers \u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u3088\u308a\u307e\u3059\u304c\u3001 shared_buffers \u306e\u521d\u671f\u8a2d\u5b9a\u306f\u975e\u5e38\u306b\u5c0f\u3055\u3044\u305f\u3081\u3001PG-Strom\u304c\u6709\u52b9\u306b\u6a5f\u80fd\u3059\u308b\u6c34\u6e96\u306e\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\u306b\u5bfe\u3057\u3066\u306f\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u3078\u306e\u8aad\u307f\u66f8\u304d\u304c\u5f8b\u901f\u8981\u56e0\u3068\u306a\u3063\u3066\u3057\u307e\u3044\u3001GPU\u306e\u4e26\u5217\u8a08\u7b97\u6a5f\u80fd\u3092\u6709\u52b9\u306b\u5229\u7528\u3067\u304d\u306a\u3044\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u3042\u308b\u7a0b\u5ea6\u306e\u4f59\u88d5\u3092\u6301\u3063\u305f\u5024\u3092\u8a2d\u5b9a\u3059\u3079\u304d\u3067\u3059\u3002 shared_buffers = 10GB \u660e\u3089\u304b\u306b\u30e1\u30e2\u30ea\u30b5\u30a4\u30ba\u3088\u308a\u3082\u5927\u304d\u306a\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u306f\u3001SSD-to-GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306e\u5229\u7528\u3092\u691c\u8a0e\u3057\u3066\u304f\u3060\u3055\u3044\u3002 work_mem \u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u3088\u308a\u307e\u3059\u304c\u3001 work_mem \u306e\u521d\u671f\u8a2d\u5b9a\u306f\u975e\u5e38\u306b\u5c0f\u3055\u3044\u305f\u3081\u3001\u89e3\u6790\u7cfb\u30af\u30a8\u30ea\u3067\u6700\u9069\u306a\u30af\u30a8\u30ea\u5b9f\u884c\u8a08\u753b\u304c\u9078\u629e\u3055\u308c\u306a\u3044\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 \u5178\u578b\u7684\u306a\u4f8b\u306f\u3001\u30bd\u30fc\u30c8\u51e6\u7406\u306b\u30aa\u30f3\u30e1\u30e2\u30ea\u306e\u30af\u30a4\u30c3\u30af\u30bd\u30fc\u30c8\u3067\u306f\u306a\u304f\u3001\u30c7\u30a3\u30b9\u30af\u30d9\u30fc\u30b9\u306e\u30de\u30fc\u30b8\u30bd\u30fc\u30c8\u3092\u9078\u629e\u3059\u308b\u3068\u3044\u3063\u305f\u3082\u306e\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u3042\u308b\u7a0b\u5ea6\u306e\u4f59\u88d5\u3092\u6301\u3063\u305f\u5024\u3092\u8a2d\u5b9a\u3059\u3079\u304d\u3067\u3059\u3002 work_mem = 1GB","title":"postgresql.conf\u306e\u7de8\u96c6"},{"location":"install/#os_1","text":"GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u7279\u306b\u3001\u540c\u6642\u306b\u5927\u91cf\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30aa\u30fc\u30d7\u30f3\u3059\u308b\u4e8b\u304c\u3042\u308b\u305f\u3081\u3001\u30d7\u30ed\u30bb\u30b9\u3042\u305f\u308a\u30d5\u30a1\u30a4\u30eb\u30c7\u30a3\u30b9\u30af\u30ea\u30d7\u30bf\u6570\u306e\u4e0a\u9650\u3092\u62e1\u5927\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u307e\u305f\u3001PostgreSQL\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u6642\u306b\u78ba\u5b9f\u306b\u30b3\u30a2\u30c0\u30f3\u30d7\u3092\u751f\u6210\u3067\u304d\u308b\u3088\u3046\u3001\u30b3\u30a2\u30d5\u30a1\u30a4\u30eb\u306e\u30b5\u30a4\u30ba\u4e0a\u9650\u3092\u5236\u9650\u3057\u306a\u3044\u3053\u3068\u3092\u63a8\u5968\u3057\u307e\u3059\u3002 PostgreSQL\u3092systemd\u7d4c\u7531\u3067\u8d77\u52d5\u3059\u308b\u5834\u5408\u3001\u30ea\u30bd\u30fc\u30b9\u5236\u9650\u306b\u95a2\u3059\u308b\u8a2d\u5b9a\u306f /etc/systemd/system/postgresql-XX.service.d/pg_strom.conf \u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002 RPM\u306b\u3088\u308b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u5834\u5408\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u4ee5\u4e0b\u306e\u5185\u5bb9\u304c\u8a2d\u5b9a\u3055\u308c\u307e\u3059\u3002 \u74b0\u5883\u5909\u6570 CUDA_ENABLE_COREDUMP_ON_EXCEPTION \u306b\u95a2\u3059\u308b\u8a2d\u5b9a\u304c\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u958b\u767a\u8005\u5411\u3051\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3001\u3053\u308c\u3092\u6709\u52b9\u306b\u3057\u3066\u8d77\u52d5\u3059\u308b\u3068\u3001GPU\u5074\u3067\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u306bGPU\u306e\u30b3\u30a2\u30c0\u30f3\u30d7\u3092\u751f\u6210\u3055\u305b\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002\u8a73\u3057\u304f\u306f CUDA-GDB:GPU core dump support \u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002 [Service] LimitNOFILE=65536 LimitCORE=infinity #Environment=CUDA_ENABLE_COREDUMP_ON_EXCEPTION=1","title":"OS\u306e\u30ea\u30bd\u30fc\u30b9\u5236\u9650\u306e\u62e1\u5f35"},{"location":"install/#postgresql_1","text":"PostgreSQL\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002 \u6b63\u5e38\u306b\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u304c\u5b8c\u4e86\u3057\u3066\u3044\u308c\u3070\u3001\u30ed\u30b0\u306bPG-Strom\u304cGPU\u3092\u8a8d\u8b58\u3057\u305f\u4e8b\u3092\u793a\u3059\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8a18\u9332\u3055\u308c\u3066\u3044\u308b\u306f\u305a\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u3067\u306f\u3001NVIDIA A100 (PCIE\u7248; 40GB) \u3092\u8a8d\u8b58\u3057\u3066\u304a\u308a\u3001\u307e\u305f\u3001NVME-SSD\u3054\u3068\u306b\u8fd1\u508d\u306eGPU\u304c\u3069\u3061\u3089\u3067\u3042\u308b\u306e\u304b\u51fa\u529b\u3055\u308c\u3066\u3044\u307e\u3059\u3002 # systemctl start postgresql-16 # journalctl -u postgresql-16 Jun 02 17:28:45 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:45.989 JST [20242] LOG: HeteroDB Extra module loaded [api_version=20240418,cufile=off,nvme_strom=off,githash=3ffc65428c07bb3c9d0e5c75a2973389f91dfcd4] Jun 02 17:28:45 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:45.989 JST [20242] LOG: HeteroDB License: { \"version\" : 2, \"serial_nr\" : \"HDB-TRIAL\", \"issued_at\" : \"2024-06-02\", \"expired_at\" : \"2099-12-31\", \"nr_gpus\" : 1, \"gpus\" : [ { \"uuid\" : \"GPU-13943bfd-5b30-38f5-0473-78979c134606\" } ]} Jun 02 17:28:45 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:45.989 JST [20242] LOG: PG-Strom version 5.12.el9 built for PostgreSQL 16 (githash: ) Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.114 JST [20242] LOG: PG-Strom binary built for CUDA 12.4 (CUDA runtime 12.5) Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.114 JST [20242] WARNING: The CUDA version where this PG-Strom module binary was built for (12.4) is newer than the CUDA runtime version on this platform (12.5). It may lead unexpected behavior, and upgrade of CUDA toolkit is recommended. Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.114 JST [20242] LOG: PG-Strom: GPU0 NVIDIA A100-PCIE-40GB (108 SMs; 1410MHz, L2 40960kB), RAM 39.50GB (5120bits, 1.16GHz), PCI-E Bar1 64GB, CC 8.0 Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:41:00:0] GPU0 (NVIDIA A100-PCIE-40GB; GPU-13943bfd-5b30-38f5-0473-78979c134606) Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:81:00:0] nvme6 (NGD-IN2500-080T4-C) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:82:00:0] nvme3 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:c2:00:0] nvme1 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:c6:00:0] nvme4 (Corsair MP600 CORE) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:c3:00:0] nvme5 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:c1:00:0] nvme0 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.117 JST [20242] LOG: [0000:c4:00:0] nvme2 (NGD-IN2500-080T4-C) --> GPU0 [dist=9] Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.217 JST [20242] LOG: redirecting log output to logging collector process Jun 02 17:28:48 buri.heterodb.com postgres[20242]: 2024-06-02 17:28:48.217 JST [20242] HINT: Future log output will appear in directory \"log\". Jun 02 17:28:48 buri.heterodb.com systemd[1]: Started PostgreSQL 16 database server.","title":"PostgreSQL\u306e\u8d77\u52d5"},{"location":"install/#pg-strom_2","text":"\u6700\u5f8c\u306b\u3001PG-Strom\u306b\u95a2\u9023\u3059\u308bSQL\u95a2\u6570\u306a\u3069\u306eDB\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \u3053\u306e\u624b\u9806\u306fPostgreSQL\u306eEXTENSION\u6a5f\u80fd\u3092\u7528\u3044\u3066\u30d1\u30c3\u30b1\u30fc\u30b8\u5316\u3055\u308c\u3066\u304a\u308a\u3001SQL\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067 CREATE EXTENSION \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3060\u3051\u3067\u3059\u3002 \u306a\u304a\u3001\u3053\u306e\u624b\u9806\u306f\u65b0\u3057\u3044\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3059\u308b\u305f\u3073\u306b\u5fc5\u8981\u306b\u306a\u308b\u4e8b\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u65b0\u3057\u3044\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u305f\u6642\u70b9\u3067\u65e2\u306bPG-Strom\u95a2\u9023\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u4f5c\u6210\u3055\u308c\u3066\u3044\u3066\u307b\u3057\u3044\u5834\u5408\u306f\u3001\u4e88\u3081 template1 \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067PG-Strom\u30a8\u30af\u30b9\u30c6\u30f3\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3057\u3066\u304a\u3051\u3070\u3001 CREATE DATABASE \u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u6642\u306b\u65b0\u3057\u3044\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3078\u8a2d\u5b9a\u304c\u30b3\u30d4\u30fc\u3055\u308c\u307e\u3059\u3002 $ psql -U postgres psql (16.3) Type \"help\" for help. postgres=# CREATE EXTENSION pg_strom ; CREATE EXTENSION \u4ee5\u4e0a\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4f5c\u696d\u306f\u5b8c\u4e86\u3067\u3059\u3002","title":"PG-Strom\u30a8\u30af\u30b9\u30c6\u30f3\u30b7\u30e7\u30f3\u306e\u4f5c\u6210"},{"location":"install/#postgis","text":"PG-Strom\u306f\u4e00\u90e8\u306ePostGIS\u95a2\u6570\u306eGPU\u51e6\u7406\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002 \u672c\u7bc0\u3067\u306fPostGIS\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u306b\u3064\u3044\u3066\u8aac\u660e\u3092\u884c\u3044\u307e\u3059\u304c\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u8aad\u307f\u98db\u3070\u3057\u3066\u304f\u3060\u3055\u3044\u3002 PostgreSQL\u3068\u540c\u69d8\u306b\u3001PostgreSQL Global Development Group\u306eyum\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089PostGIS\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001PostgreSQL v16\u5411\u3051\u306b\u30d3\u30eb\u30c9\u3055\u308c\u305fPostGIS v3.4\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3082\u306e\u3067\u3059\u3002 # dnf install postgis34_16 \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u3092\u4f5c\u6210\u3057\u3066PostgreSQL\u30b5\u30fc\u30d0\u3092\u8d77\u52d5\u3057\u3001SQL\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089 CREATE EXTENSION \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066Geometry\u30c7\u30fc\u30bf\u578b\u3084\u5730\u7406\u60c5\u5831\u5206\u6790\u306e\u305f\u3081\u306eSQL\u95a2\u6570\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \u3053\u308c\u3067PostGIS\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u5b8c\u4e86\u3067\u3059\u3002 postgres=# CREATE EXTENSION postgis; CREATE EXTENSION","title":"PostGIS\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"operations/","text":"\u57fa\u672c\u7684\u306a\u64cd\u4f5c GPU\u30aa\u30d5\u30ed\u30fc\u30c9\u306e\u78ba\u8a8d \u30af\u30a8\u30ea\u304cGPU\u3067\u5b9f\u884c\u3055\u308c\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306f EXPLAIN \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 SQL\u51e6\u7406\u306f\u5185\u90e8\u7684\u306b\u3044\u304f\u3064\u304b\u306e\u8981\u7d20\u306b\u5206\u89e3\u3055\u308c\u51e6\u7406\u3055\u308c\u307e\u3059\u304c\u3001PG-Strom\u304cGPU\u3092\u9069\u7528\u3057\u3066\u4e26\u5217\u51e6\u7406\u3092\u884c\u3046\u306e\u306fSCAN\u3001JOIN\u3001GROUP BY\u306e\u5404\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3067\u3059\u3002\u6a19\u6e96\u3067PostgreSQL\u304c\u63d0\u4f9b\u3057\u3066\u3044\u308b\u5404\u51e6\u7406\u306e\u4ee3\u308f\u308a\u306b\u3001GpuScan\u3001GpuJoin\u3001GpuPreAgg\u304c\u8868\u793a\u3055\u308c\u305f\u5834\u5408\u3001\u305d\u306e\u30af\u30a8\u30ea\u306fGPU\u306b\u3088\u3063\u3066\u51e6\u7406\u3055\u308c\u308b\u4e8b\u3068\u306a\u308a\u307e\u3059\u3002 \u4ee5\u4e0b\u306f EXPLAIN \u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u4f8b\u3067\u3059\u3002 postgres=# EXPLAIN SELECT cat,count(*),avg(ax) FROM t0 NATURAL JOIN t1 NATURAL JOIN t2 GROUP BY cat; QUERY PLAN -------------------------------------------------------------------------------- GroupAggregate (cost=989186.82..989190.94 rows=27 width=20) Group Key: t0.cat -> Sort (cost=989186.82..989187.29 rows=189 width=44) Sort Key: t0.cat -> Custom Scan (GpuPreAgg) (cost=989175.89..989179.67 rows=189 width=44) Reduction: Local GPU Projection: cat, pgstrom.nrows(), pgstrom.nrows((ax IS NOT NULL)), pgstrom.psum(ax) Combined GpuJoin: enabled -> Custom Scan (GpuJoin) on t0 (cost=14744.40..875804.46 rows=99996736 width=12) GPU Projection: t0.cat, t1.ax Outer Scan: t0 (cost=0.00..1833360.36 rows=99996736 width=12) Depth 1: GpuHashJoin (nrows 99996736...99996736) HashKeys: t0.aid JoinQuals: (t0.aid = t1.aid) KDS-Hash (size: 10.39MB) Depth 2: GpuHashJoin (nrows 99996736...99996736) HashKeys: t0.bid JoinQuals: (t0.bid = t2.bid) KDS-Hash (size: 10.78MB) -> Seq Scan on t1 (cost=0.00..1972.85 rows=103785 width=12) -> Seq Scan on t2 (cost=0.00..1935.00 rows=100000 width=4) (21 rows) \u5b9f\u884c\u8a08\u753b\u306e\u4e2d\u306b\u898b\u6163\u308c\u306a\u3044\u51e6\u7406\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u4e8b\u306b\u6c17\u304c\u4ed8\u304b\u308c\u305f\u3067\u3057\u3087\u3046\u3002 CustomScan\u6a5f\u69cb\u3092\u7528\u3044\u3066GpuJoin\u304a\u3088\u3073GpuPreAgg\u304c\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u3053\u3067GpuJoin\u306f t0 \u3068 t1 \u3001\u304a\u3088\u3073 t2 \u3068\u306eJOIN\u51e6\u7406\u3092\u5b9f\u884c\u3057\u3001\u305d\u306e\u7d50\u679c\u3092\u53d7\u3051\u53d6\u308bGpuPreAgg\u306f\u5217 cat \u306b\u3088\u308bGROUP BY\u51e6\u7406\u3092GPU\u3067\u5b9f\u884c\u3057\u307e\u3059\u3002 PostgreSQL\u304c\u30af\u30a8\u30ea\u5b9f\u884c\u8a08\u753b\u3092\u69cb\u7bc9\u3059\u308b\u904e\u7a0b\u3067PG-Strom\u306f\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306b\u4ecb\u5165\u3057\u3001SCAN\u3001JOIN\u3001GROUP BY\u306e\u5404\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092GPU\u3067\u5b9f\u884c\u53ef\u80fd\u3067\u3042\u308b\u5834\u5408\u3001\u305d\u306e\u30b3\u30b9\u30c8\u3092\u7b97\u51fa\u3057\u3066PostgreSQL\u306e\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306b\u5b9f\u884c\u8a08\u753b\u306e\u5019\u88dc\u3092\u63d0\u793a\u3057\u307e\u3059\u3002 \u63a8\u5b9a\u3055\u308c\u305f\u30b3\u30b9\u30c8\u5024\u304cCPU\u3067\u5b9f\u884c\u3059\u308b\u4ed6\u306e\u5b9f\u884c\u8a08\u753b\u3088\u308a\u3082\u5c0f\u3055\u306a\u5024\u3067\u3042\u308b\u5834\u5408\u3001GPU\u3092\u7528\u3044\u305f\u4ee3\u66ff\u306e\u5b9f\u884c\u8a08\u753b\u304c\u63a1\u7528\u3055\u308c\u308b\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002 \u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092GPU\u3067\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u5c11\u306a\u304f\u3068\u3082\u6f14\u7b97\u5f0f\u307e\u305f\u306f\u95a2\u6570\u3001\u304a\u3088\u3073\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u578b\u304cPG-Strom\u3067\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 int \u3084 float \u3068\u3044\u3063\u305f\u6570\u5024\u578b\u3001 date \u3084 timestamp \u3068\u3044\u3063\u305f\u65e5\u4ed8\u6642\u523b\u578b\u3001 text \u306e\u3088\u3046\u306a\u6587\u5b57\u5217\u578b\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u304a\u308a\u3001\u307e\u305f\u3001\u56db\u5247\u6f14\u7b97\u3084\u5927\u5c0f\u6bd4\u8f03\u3068\u3044\u3063\u305f\u6570\u591a\u304f\u306e\u30d3\u30eb\u30c8\u30a4\u30f3\u6f14\u7b97\u5b50\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u8a73\u7d30\u306a\u4e00\u89a7\u306b\u95a2\u3057\u3066\u306f \u30ea\u30d5\u30a1\u30ec\u30f3\u30b9 \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 CPU+GPU\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u4e26\u5217 PG-Strom\u306fPostgreSQL\u306eCPU\u4e26\u5217\u5b9f\u884c\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002 PostgreSQL\u306eCPU\u4e26\u5217\u5b9f\u884c\u306f\u3001Gather\u30ce\u30fc\u30c9\u304c\u3044\u304f\u3064\u304b\u306e\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30d7\u30ed\u30bb\u30b9\u3092\u8d77\u52d5\u3057\u3001\u5404\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u304c\"\u90e8\u5206\u7684\u306b\"\u5b9f\u884c\u3057\u305f\u30af\u30a8\u30ea\u306e\u7d50\u679c\u3092\u5f8c\u3067\u7d50\u5408\u3059\u308b\u5f62\u3067\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u3059\u3002 GpuJoin\u3084GpuPreAgg\u3068\u3044\u3063\u305fPG-Strom\u306e\u51e6\u7406\u306f\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u5074\u3067\u306e\u5b9f\u884c\u306b\u5bfe\u5fdc\u3057\u3066\u304a\u308a\u3001\u500b\u3005\u306e\u30d7\u30ed\u30bb\u30b9\u304c\u4e92\u3044\u306bGPU\u3092\u4f7f\u7528\u3057\u3066\u51e6\u7406\u3092\u9032\u3081\u307e\u3059\u3002\u901a\u5e38\u3001GPU\u3078\u30c7\u30fc\u30bf\u3092\u4f9b\u7d66\u3059\u308b\u305f\u3081\u306b\u500b\u3005\u306eCPU\u30b3\u30a2\u304c\u30d0\u30c3\u30d5\u30a1\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b\u305f\u3081\u306e\u51e6\u7406\u901f\u5ea6\u306f\u3001GPU\u3067\u306eSQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u51e6\u7406\u901f\u5ea6\u306b\u6bd4\u3079\u3066\u305a\u3063\u3068\u9045\u3044\u305f\u3081\u3001CPU\u4e26\u5217\u3068GPU\u4e26\u5217\u3092\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u3067\u5229\u7528\u3059\u308b\u4e8b\u3067\u51e6\u7406\u901f\u5ea6\u306e\u5411\u4e0a\u304c\u671f\u5f85\u3067\u304d\u307e\u3059\u3002 \u305f\u3060\u3057\u3001GPU\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306aCUDA\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306f\u5404\u30d7\u30ed\u30bb\u30b9\u3054\u3068\u306b\u4f5c\u6210\u3055\u308c\u3001CUDA\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3092\u751f\u6210\u3059\u308b\u305f\u3073\u306b\u3042\u308b\u7a0b\u5ea6\u306eGPU\u30ea\u30bd\u30fc\u30b9\u304c\u6d88\u8cbb\u3055\u308c\u308b\u305f\u3081\u3001\u5e38\u306bCPU\u4e26\u5217\u5ea6\u304c\u9ad8\u3051\u308c\u3070\u826f\u3044\u3068\u3044\u3046\u8a33\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u3092\u898b\u3066\u304f\u3060\u3055\u3044\u3002 Gather\u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u306f\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u304c\u5b9f\u884c\u53ef\u80fd\u306a\u3082\u306e\u3067\u3059\u30021\u5104\u884c\u3092\u4fdd\u6301\u3059\u308b t0 \u30c6\u30fc\u30d6\u30eb\u30924\u30d7\u30ed\u30bb\u30b9\u306e\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u3068\u30b3\u30fc\u30c7\u30a3\u30cd\u30fc\u30bf\u30d7\u30ed\u30bb\u30b9\u3067\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u305f\u3081\u3001\u30d7\u30ed\u30bb\u30b9\u3042\u305f\u308a2000\u4e07\u884c\u3092GpuJoin\u304a\u3088\u3073GpuPreAgg\u3067\u51e6\u7406\u3057\u3001\u305d\u306e\u7d50\u679c\u3092Gather\u30ce\u30fc\u30c9\u3067\u7d50\u5408\u3057\u307e\u3059\u3002 # EXPLAIN SELECT cat,count(*),avg(ax) FROM t0 NATURAL JOIN t1 GROUP by cat; QUERY PLAN -------------------------------------------------------------------------------- GroupAggregate (cost=955705.47..955720.93 rows=27 width=20) Group Key: t0.cat -> Sort (cost=955705.47..955707.36 rows=756 width=44) Sort Key: t0.cat -> Gather (cost=955589.95..955669.33 rows=756 width=44) Workers Planned: 4 -> Parallel Custom Scan (GpuPreAgg) (cost=954589.95..954593.73 rows=189 width=44) Reduction: Local GPU Projection: cat, pgstrom.nrows(), pgstrom.nrows((ax IS NOT NULL)), pgstrom.psum(ax) Combined GpuJoin: enabled -> Parallel Custom Scan (GpuJoin) on t0 (cost=27682.82..841218.52 rows=99996736 width=12) GPU Projection: t0.cat, t1.ax Outer Scan: t0 (cost=0.00..1083384.84 rows=24999184 width=8) Depth 1: GpuHashJoin (nrows 24999184...99996736) HashKeys: t0.aid JoinQuals: (t0.aid = t1.aid) KDS-Hash (size: 10.39MB) -> Seq Scan on t1 (cost=0.00..1972.85 rows=103785 width=12) (18 rows) \u4e0b\u4f4d\u30d7\u30e9\u30f3\u306e\u5f15\u304d\u4e0a\u3052 \u203b\u672c\u7bc0\u306e\u5185\u5bb9\u306f\u6709\u52b9\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u6700\u65b0\u306e\u5b9f\u88c5\u3092\u8e0f\u307e\u3048\u305f\u66f8\u304d\u76f4\u3057\u304c\u5fc5\u8981\u3067\u3059\u3002 PG-Strom\u306fSCAN\u3001JOIN\u3001GROUP BY\u306e\u5404\u51e6\u7406\u3092GPU\u3067\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u304c\u3001\u3053\u308c\u306b\u5bfe\u5fdc\u3059\u308bPostgreSQL\u6a19\u6e96\u306e\u51e6\u7406\u3092\u5358\u7d14\u306b\u7f6e\u304d\u63db\u3048\u305f\u3060\u3051\u3067\u306f\u56f0\u3063\u305f\u4e8b\u614b\u304c\u767a\u751f\u3057\u307e\u3059\u3002 SCAN\u304c\u7d42\u308f\u3063\u305f\u5f8c\u306e\u30c7\u30fc\u30bf\u3092\u3044\u3063\u305f\u3093\u30db\u30b9\u30c8\u5074\u306e\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u623b\u3057\u3001\u6b21\u306b\u305d\u308c\u3092JOIN\u3059\u308b\u305f\u3081\u306b\u518d\u3073GPU\u3078\u3068\u30b3\u30d4\u30fc\u3057\u3001\u3055\u3089\u306bGROUP BY\u3092\u5b9f\u884c\u3059\u308b\u524d\u306b\u518d\u3073\u30db\u30b9\u30c8\u5074\u306e\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u623b\u3057\u30fb\u30fb\u30fb\u3068\u3044\u3063\u305f\u5f62\u3067\u3001CPU\u3068GPU\u306e\u9593\u3067\u30c7\u30fc\u30bf\u306e\u30d4\u30f3\u30dd\u30f3\u304c\u767a\u751f\u3057\u3066\u3057\u307e\u3046\u306e\u3067\u3059\u3002 \u3053\u308c\u3092\u907f\u3051\u308b\u305f\u3081\u306b\u3001PG-Strom\u306f\u4e0b\u4f4d\u30d7\u30e9\u30f3\u3092\u5f15\u304d\u4e0a\u3052\u3066\u4e00\u5ea6\u306eGPU Kernel\u306e\u5b9f\u884c\u3067\u51e6\u7406\u3057\u3066\u3057\u307e\u3046\u3068\u3044\u3046\u30e2\u30fc\u30c9\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u30d1\u30bf\u30fc\u30f3\u3067\u4e0b\u4f4d\u30d7\u30e9\u30f3\u306e\u5f15\u304d\u4e0a\u3052\u304c\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 SCAN + JOIN SCAN + GROUP BY SCAN + JOIN + GROUP BY \u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u306f\u3001\u4e0b\u4f4d\u30d7\u30e9\u30f3\u306e\u5f15\u304d\u4e0a\u3052\u3092\u5168\u304f\u884c\u308f\u306a\u3044\u30b1\u30fc\u30b9\u3067\u3059\u3002 GpuScan\u306e\u5b9f\u884c\u7d50\u679c\u3092GpuJoin\u304c\u53d7\u53d6\u308a\u3001\u3055\u3089\u306b\u305d\u306e\u5b9f\u884c\u7d50\u679c\u3092GpuPreAgg\u304c\u53d7\u3051\u53d6\u3063\u3066\u6700\u7d42\u7d50\u679c\u3092\u751f\u6210\u3059\u308b\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 # EXPLAIN SELECT cat,count(*),avg(ax) FROM t0 NATURAL JOIN t1 WHERE aid < bid GROUP BY cat; QUERY PLAN -------------------------------------------------------------------------------- GroupAggregate (cost=1239991.03..1239995.15 rows=27 width=20) Group Key: t0.cat -> Sort (cost=1239991.03..1239991.50 rows=189 width=44) Sort Key: t0.cat -> Custom Scan (GpuPreAgg) (cost=1239980.10..1239983.88 rows=189 width=44) Reduction: Local GPU Projection: cat, pgstrom.nrows(), pgstrom.nrows((ax IS NOT NULL)), pgstrom.psum(ax) -> Custom Scan (GpuJoin) (cost=50776.43..1199522.96 rows=33332245 width=12) GPU Projection: t0.cat, t1.ax Depth 1: GpuHashJoin (nrows 33332245...33332245) HashKeys: t0.aid JoinQuals: (t0.aid = t1.aid) KDS-Hash (size: 10.39MB) -> Custom Scan (GpuScan) on t0 (cost=12634.49..1187710.85 rows=33332245 width=8) GPU Projection: cat, aid GPU Filter: (aid < bid) -> Seq Scan on t1 (cost=0.00..1972.85 rows=103785 width=12) (18 rows) \u3053\u306e\u5834\u5408\u3001\u5404\u5b9f\u884c\u30b9\u30c6\u30fc\u30b8\u306b\u304a\u3044\u3066GPU\u3068\u30db\u30b9\u30c8\u30d0\u30c3\u30d5\u30a1\u306e\u9593\u3067\u30c7\u30fc\u30bf\u306e\u30d4\u30f3\u30dd\u30f3\u304c\u767a\u751f\u3059\u308b\u305f\u3081\u3001\u5b9f\u884c\u52b9\u7387\u306f\u3088\u304f\u3042\u308a\u307e\u305b\u3093\u3002 \u4e00\u65b9\u3001\u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u306f\u3001\u4e0b\u4f4d\u30ce\u30fc\u30c9\u306e\u5f15\u304d\u4e0a\u3052\u3092\u884c\u3063\u305f\u3082\u306e\u3067\u3059\u3002 # EXPLAIN ANALYZE SELECT cat,count(*),avg(ax) FROM t0 NATURAL JOIN t1 WHERE aid < bid GROUP BY cat; QUERY PLAN -------------------------------------------------------------------------------- GroupAggregate (cost=903669.50..903673.62 rows=27 width=20) (actual time=7761.630..7761.644 rows=27 loops=1) Group Key: t0.cat -> Sort (cost=903669.50..903669.97 rows=189 width=44) (actual time=7761.621..7761.626 rows=27 loops=1) Sort Key: t0.cat Sort Method: quicksort Memory: 28kB -> Custom Scan (GpuPreAgg) (cost=903658.57..903662.35 rows=189 width=44) (actual time=7761.531..7761.540 rows=27 loops=1) Reduction: Local GPU Projection: cat, pgstrom.nrows(), pgstrom.nrows((ax IS NOT NULL)), pgstrom.psum(ax) Combined GpuJoin: enabled -> Custom Scan (GpuJoin) on t0 (cost=12483.41..863201.43 rows=33332245 width=12) (never executed) GPU Projection: t0.cat, t1.ax Outer Scan: t0 (cost=12634.49..1187710.85 rows=33332245 width=8) (actual time=59.623..5557.052 rows=100000000 loops=1) Outer Scan Filter: (aid < bid) Rows Removed by Outer Scan Filter: 50002874 Depth 1: GpuHashJoin (plan nrows: 33332245...33332245, actual nrows: 49997126...49997126) HashKeys: t0.aid JoinQuals: (t0.aid = t1.aid) KDS-Hash (size plan: 10.39MB, exec: 64.00MB) -> Seq Scan on t1 (cost=0.00..1972.85 rows=103785 width=12) (actual time=0.013..15.303 rows=100000 loops=1) Planning time: 0.506 ms Execution time: 8495.391 ms (21 rows) \u307e\u305a\u3001\u30c6\u30fc\u30d6\u30eb t0 \u3078\u306e\u30b9\u30ad\u30e3\u30f3\u304cGpuJoin\u306e\u5b9f\u884c\u8a08\u753b\u306b\u57cb\u3081\u8fbc\u307e\u308c\u3001GpuScan\u304c\u6d88\u3048\u3066\u3044\u308b\u4e8b\u306b\u304a\u6c17\u4ed8\u304d\u3067\u3057\u3087\u3046\u3002 \u3053\u308c\u306fGpuJoin\u304c\u914d\u4e0b\u306eGpuScan\u3092\u5f15\u304d\u4e0a\u3052\u3001\u4e00\u4f53\u5316\u3057\u305fGPU\u30ab\u30fc\u30cd\u30eb\u95a2\u6570\u3067WHERE\u53e5\u306e\u51e6\u7406\u3082\u884c\u3063\u305f\u4e8b\u3092\u610f\u5473\u3057\u3066\u3044\u307e\u3059\u3002 \u52a0\u3048\u3066\u5947\u5999\u306a\u3053\u3068\u306b\u3001 EXPLAIN ANALYZE \u306e\u7d50\u679c\u306b\u306fGpuJoin\u304c(never executed)\u3068\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u306fGpuPreAgg\u304c\u914d\u4e0b\u306eGpuJoin\u3092\u5f15\u304d\u4e0a\u3052\u3001\u4e00\u4f53\u5316\u3057\u305fGPU\u30ab\u30fc\u30cd\u30eb\u95a2\u6570\u3067JOIN\u3068GROUP BY\u3092\u5b9f\u884c\u3057\u305f\u4e8b\u3092\u610f\u5473\u3057\u3066\u3044\u307e\u3059\u3002 SCAN\u51e6\u7406\u306e\u5f15\u304d\u4e0a\u3052\u306f pg_strom.pullup_outer_scan \u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3088\u3063\u3066\u5236\u5fa1\u3067\u304d\u307e\u3059\u3002 \u307e\u305f\u3001JOIN\u51e6\u7406\u306e\u5f15\u304d\u4e0a\u3052\u306f pg_strom.pullup_outer_join \u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3088\u3063\u3066\u5236\u5fa1\u3067\u304d\u307e\u3059\u3002 \u3044\u305a\u308c\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3082\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f on \u306b\u8a2d\u5b9a\u3055\u308c\u3066\u304a\u308a\u3001\u901a\u5e38\u306f\u3053\u308c\u3092\u7121\u52b9\u5316\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u30c8\u30e9\u30d6\u30eb\u6642\u306e\u554f\u984c\u5207\u308a\u5206\u3051\u624b\u6bb5\u306e\u4e00\u3064\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 GpuJoin\u306b\u304a\u3051\u308bInner Pinned Buffer \u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u3092\u898b\u3066\u304f\u3060\u3055\u3044\u3002 PG-Strom\u304c\u30c6\u30fc\u30d6\u30eb\u3092\u7d50\u5408\u3059\u308b\u969b\u3001\u901a\u5e38\u306f\u6700\u3082\u30b5\u30a4\u30ba\u306e\u5927\u304d\u306a\u30c6\u30fc\u30d6\u30eb\uff08\u3053\u306e\u5834\u5408\u306f lineorder \u3067\u3001OUTER\u8868\u3068\u547c\u3073\u307e\u3059\uff09\u3092\u975e\u540c\u671f\u7684\u306b\u8aad\u307f\u8fbc\u307f\u306a\u304c\u3089\u3001\u4ed6\u306e\u30c6\u30fc\u30d6\u30eb\u3068\u306e\u7d50\u5408\u51e6\u7406\u304a\u3088\u3073\u96c6\u8a08\u51e6\u7406\u3092\u9032\u3081\u307e\u3059\u3002 JOIN\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u5236\u7d04\u4e0a\u3001\u4e88\u3081\u305d\u308c\u4ee5\u5916\u306e\u30c6\u30fc\u30d6\u30eb\uff08\u3053\u306e\u5834\u5408\u306f date1 \u3001 part \u3001 supplier \u3067\u3001INNER\u8868\u3068\u547c\u3073\u307e\u3059\uff09\u3092\u30e1\u30e2\u30ea\u4e0a\u306b\u8aad\u307f\u51fa\u3057\u3001\u307e\u305fJOIN\u30ad\u30fc\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u3092\u8a08\u7b97\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u30c6\u30fc\u30d6\u30eb\u306fOUTER\u8868\u307b\u3069\u5927\u304d\u306a\u30b5\u30a4\u30ba\u3067\u306f\u306a\u3044\u3082\u306e\u306e\u3001\u6570GB\u3092\u8d8a\u3048\u308b\u3088\u3046\u306aINNER\u30d0\u30c3\u30d5\u30a1\u306e\u6e96\u5099\u306f\u76f8\u5fdc\u306b\u91cd\u3044\u51e6\u7406\u3068\u306a\u308a\u307e\u3059\u3002 GpuJoin\u306f\u901a\u5e38\u3001PostgreSQL\u306eAPI\u3092\u901a\u3057\u3066INNER\u8868\u3092\u4e00\u884c\u3054\u3068\u306b\u8aad\u307f\u51fa\u3057\u3001\u305d\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u3092\u8a08\u7b97\u3059\u308b\u3068\u3068\u3082\u306b\u5171\u6709\u30e1\u30e2\u30ea\u4e0a\u306eINNER\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002GPU-Service\u30d7\u30ed\u30bb\u30b9\u306f\u3001\u3053\u306eINNER\u30d0\u30c3\u30d5\u30a1\u3092GPU\u30e1\u30e2\u30ea\u306b\u8ee2\u9001\u3057\u3001\u305d\u3053\u3067\u306f\u3058\u3081\u3066OUTER\u8868\u3092\u8aad\u307f\u51fa\u3057\u3066JOIN\u51e6\u7406\u3092\u958b\u59cb\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 INNER\u8868\u304c\u76f8\u5fdc\u306b\u5927\u304d\u304fGPU\u3067\u5b9f\u884c\u53ef\u80fd\u306a\u691c\u7d22\u6761\u4ef6\u3092\u542b\u3080\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u306e\u3088\u3046\u306b\u3001GpuJoin\u306e\u914d\u4e0b\u306bGpuScan\u304c\u5b58\u5728\u3059\u308b\u30b1\u30fc\u30b9\u304c\u3042\u308a\u5f97\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001INNER\u8868\u306f\u3044\u3063\u305f\u3093GpuScan\u306b\u3088\u3063\u3066GPU\u3067\u51e6\u7406\u3055\u308c\u305f\u5f8c\u3001\u305d\u306e\u5b9f\u884c\u7d50\u679c\u3092CPU\u5074\u306b\u623b\u3057\u3001\u3055\u3089\u306bINNER\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305f\u5f8c\u3067\u3082\u3046\u4e00\u5ea6GPU\u3078\u30ed\u30fc\u30c9\u3055\u308c\u307e\u3059\u3002\u305a\u3044\u3076\u3093\u3068\u7121\u99c4\u306a\u30c7\u30fc\u30bf\u306e\u6d41\u308c\u304c\u5b58\u5728\u3059\u308b\u3088\u3046\u306b\u898b\u3048\u307e\u3059\u3002 =# explain select sum(lo_revenue), d_year, p_brand1 from lineorder, date1, part, supplier where lo_orderdate = d_datekey and lo_partkey = p_partkey and lo_suppkey = s_suppkey and p_brand1 between 'MFGR#2221' and 'MFGR#2228' and s_region = 'ASIA' group by d_year, p_brand1; QUERY PLAN --------------------------------------------------------------------------------------------------------------- GroupAggregate (cost=31007186.70..31023043.21 rows=6482 width=46) Group Key: date1.d_year, part.p_brand1 -> Sort (cost=31007186.70..31011130.57 rows=1577548 width=20) Sort Key: date1.d_year, part.p_brand1 -> Custom Scan (GpuJoin) on lineorder (cost=275086.19..30844784.03 rows=1577548 width=20) GPU Projection: date1.d_year, part.p_brand1, lineorder.lo_revenue GPU Join Quals [1]: (part.p_partkey = lineorder.lo_partkey) ... [nrows: 5994236000 -> 7804495] GPU Outer Hash [1]: lineorder.lo_partkey GPU Inner Hash [1]: part.p_partkey GPU Join Quals [2]: (supplier.s_suppkey = lineorder.lo_suppkey) ... [nrows: 7804495 -> 1577548] GPU Outer Hash [2]: lineorder.lo_suppkey GPU Inner Hash [2]: supplier.s_suppkey GPU Join Quals [3]: (date1.d_datekey = lineorder.lo_orderdate) ... [nrows: 1577548 -> 1577548] GPU Outer Hash [3]: lineorder.lo_orderdate GPU Inner Hash [3]: date1.d_datekey GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on part (cost=0.00..59258.00 rows=2604 width=14) Filter: ((p_brand1 >= 'MFGR#2221'::bpchar) AND (p_brand1 <= 'MFGR#2228'::bpchar)) -> Custom Scan (GpuScan) on supplier (cost=100.00..190348.83 rows=2019384 width=6) GPU Projection: s_suppkey GPU Pinned Buffer: enabled GPU Scan Quals: (s_region = 'ASIA'::bpchar) [rows: 9990357 -> 2019384] GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 (cost=0.00..72.56 rows=2556 width=8) (24 rows) \u3053\u306e\u3088\u3046\u306b\u3001INNER\u8868\u306e\u8aad\u51fa\u3057\u3084INNER\u30d0\u30c3\u30d5\u30a1\u306e\u69cb\u7bc9\u306e\u969b\u306bCPU\u3068GPU\u306e\u9593\u3067\u30c7\u30fc\u30bf\u306e\u30d4\u30f3\u30dd\u30f3\u304c\u767a\u751f\u3059\u308b\u5834\u5408\u3001 Pinned Inner Buffer \u3092\u4f7f\u7528\u3059\u308b\u3088\u3046\u8a2d\u5b9a\u3059\u308b\u4e8b\u3067\u3001GpuJoin\u306e\u5b9f\u884c\u958b\u59cb\u30ea\u30fc\u30c9\u30bf\u30a4\u30e0\u306e\u77ed\u7e2e\u3084\u3001\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u524a\u6e1b\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4e0a\u306e\u5b9f\u884c\u8a08\u753b\u3067\u306f\u3001 supplier \u8868\u306e\u8aad\u51fa\u3057\u304cGpuScan\u306b\u3088\u308a\u884c\u308f\u308c\u308b\u4e8b\u306b\u306a\u3063\u3066\u304a\u308a\u3001\u7d71\u8a08\u60c5\u5831\u306b\u3088\u308c\u3070\u7d04200\u4e07\u884c\u304c\u8aad\u307f\u51fa\u3055\u308c\u308b\u3068\u63a8\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u305d\u306e\u4e00\u65b9\u3067\u3001 GPU Pinned Buffer: enabled \u306e\u51fa\u529b\u306b\u6ce8\u76ee\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306f\u3001INNER\u8868\u306e\u63a8\u5b9a\u30b5\u30a4\u30ba\u304c pg_strom.pinned_inner_buffer_threshold \u306e\u8a2d\u5b9a\u5024\u3092\u8d8a\u3048\u308b\u5834\u5408\u3001GpuScan\u306e\u51e6\u7406\u7d50\u679c\u3092\u305d\u306e\u307e\u307eGPU\u30e1\u30e2\u30ea\u306b\u6b8b\u3057\u3066\u304a\u304d\u3001\u305d\u308c\u3092\u6b21\u306eGpuJoin\u3067INNER\u30d0\u30c3\u30d5\u30a1\u306e\u4e00\u90e8\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u3068\u3044\u3046\u6a5f\u80fd\u3067\u3059\uff08\u5fc5\u8981\u3067\u3042\u308c\u3070\u30cf\u30c3\u30b7\u30e5\u5024\u306e\u8a08\u7b97\u3082GPU\u3067\u884c\u3044\u307e\u3059\uff09\u3002 \u305d\u306e\u305f\u3081\u3001 supplier \u8868\u306e\u5185\u5bb9\u306fGPU-Direct SQL\u306b\u3088\u3063\u3066\u30b9\u30c8\u30ec\u30fc\u30b8\u304b\u3089GPU\u3078\u3068\u8aad\u307f\u51fa\u3055\u308c\u305f\u5f8c\u3001CPU\u5074\u306b\u623b\u3055\u308c\u305f\u308a\u3001\u518d\u5ea6GPU\u3078\u30ed\u30fc\u30c9\u3055\u308c\u305f\u308a\u3059\u308b\u3053\u3068\u306a\u304f\u3001\u6b21\u306eGpuJoin\u3067\u5229\u7528\u3055\u308c\u308b\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002 \u4e00\u65b9\u3067Pinned Inner Buffer\u306e\u4f7f\u7528\u306b\u306f\u82e5\u5e72\u306e\u30c8\u30ec\u30fc\u30c9\u30aa\u30d5\u3082\u3042\u308b\u305f\u3081\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u672c\u6a5f\u80fd\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u660e\u793a\u7684\u306b pg_strom.pinned_inner_buffer_threshold \u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 Pinned Inner Buffer\u3092\u4f7f\u7528\u3057\u305f\u5834\u5408\u3001CPU\u5074\u306fINNER\u30d0\u30c3\u30d5\u30a1\u306e\u5185\u5bb9\u3092\u5b8c\u5168\u306b\u306f\u4fdd\u6301\u3057\u3066\u3044\u307e\u305b\u3093\u3002\u305d\u306e\u305f\u3081\u3001TOAST\u5316\u3055\u308c\u305f\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u3092GPU\u3067\u53c2\u7167\u3057\u305f\u5834\u5408\u306a\u3069\u3001CPU Fallback\u51e6\u7406\u3092\u884c\u3046\u4e8b\u304c\u3067\u304d\u305a\u30a8\u30e9\u30fc\u3092\u767a\u751f\u3055\u305b\u307e\u3059\u3002\u307e\u305f\u3001CPU Fallback\u3092\u5229\u7528\u3057\u3066\u5b9f\u88c5\u3055\u308c\u3066\u3044\u308bRIGHT/FULL OUTER JOIN\u3082\u540c\u69d8\u306e\u7406\u7531\u3067Pinned Inner Buffer\u3068\u5171\u5b58\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3002 \u30ca\u30ec\u30c3\u30b8\u30d9\u30fc\u30b9 PG-Strom\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306ewiki\u30b5\u30a4\u30c8\u306b\u306f\u3001\u30ce\u30fc\u30c8\u3068\u547c\u3070\u308c\u308b\u8a73\u7d30\u306a\u6280\u8853\u60c5\u5831\u304c\u516c\u958b\u3055\u308c\u3066\u3044\u307e\u3059\u3002 https://github.com/heterodb/pg-strom/wiki","title":"\u57fa\u672c\u7684\u306a\u64cd\u4f5c"},{"location":"operations/#_1","text":"","title":"\u57fa\u672c\u7684\u306a\u64cd\u4f5c"},{"location":"operations/#gpu","text":"\u30af\u30a8\u30ea\u304cGPU\u3067\u5b9f\u884c\u3055\u308c\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306f EXPLAIN \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 SQL\u51e6\u7406\u306f\u5185\u90e8\u7684\u306b\u3044\u304f\u3064\u304b\u306e\u8981\u7d20\u306b\u5206\u89e3\u3055\u308c\u51e6\u7406\u3055\u308c\u307e\u3059\u304c\u3001PG-Strom\u304cGPU\u3092\u9069\u7528\u3057\u3066\u4e26\u5217\u51e6\u7406\u3092\u884c\u3046\u306e\u306fSCAN\u3001JOIN\u3001GROUP BY\u306e\u5404\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3067\u3059\u3002\u6a19\u6e96\u3067PostgreSQL\u304c\u63d0\u4f9b\u3057\u3066\u3044\u308b\u5404\u51e6\u7406\u306e\u4ee3\u308f\u308a\u306b\u3001GpuScan\u3001GpuJoin\u3001GpuPreAgg\u304c\u8868\u793a\u3055\u308c\u305f\u5834\u5408\u3001\u305d\u306e\u30af\u30a8\u30ea\u306fGPU\u306b\u3088\u3063\u3066\u51e6\u7406\u3055\u308c\u308b\u4e8b\u3068\u306a\u308a\u307e\u3059\u3002 \u4ee5\u4e0b\u306f EXPLAIN \u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u4f8b\u3067\u3059\u3002 postgres=# EXPLAIN SELECT cat,count(*),avg(ax) FROM t0 NATURAL JOIN t1 NATURAL JOIN t2 GROUP BY cat; QUERY PLAN -------------------------------------------------------------------------------- GroupAggregate (cost=989186.82..989190.94 rows=27 width=20) Group Key: t0.cat -> Sort (cost=989186.82..989187.29 rows=189 width=44) Sort Key: t0.cat -> Custom Scan (GpuPreAgg) (cost=989175.89..989179.67 rows=189 width=44) Reduction: Local GPU Projection: cat, pgstrom.nrows(), pgstrom.nrows((ax IS NOT NULL)), pgstrom.psum(ax) Combined GpuJoin: enabled -> Custom Scan (GpuJoin) on t0 (cost=14744.40..875804.46 rows=99996736 width=12) GPU Projection: t0.cat, t1.ax Outer Scan: t0 (cost=0.00..1833360.36 rows=99996736 width=12) Depth 1: GpuHashJoin (nrows 99996736...99996736) HashKeys: t0.aid JoinQuals: (t0.aid = t1.aid) KDS-Hash (size: 10.39MB) Depth 2: GpuHashJoin (nrows 99996736...99996736) HashKeys: t0.bid JoinQuals: (t0.bid = t2.bid) KDS-Hash (size: 10.78MB) -> Seq Scan on t1 (cost=0.00..1972.85 rows=103785 width=12) -> Seq Scan on t2 (cost=0.00..1935.00 rows=100000 width=4) (21 rows) \u5b9f\u884c\u8a08\u753b\u306e\u4e2d\u306b\u898b\u6163\u308c\u306a\u3044\u51e6\u7406\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u4e8b\u306b\u6c17\u304c\u4ed8\u304b\u308c\u305f\u3067\u3057\u3087\u3046\u3002 CustomScan\u6a5f\u69cb\u3092\u7528\u3044\u3066GpuJoin\u304a\u3088\u3073GpuPreAgg\u304c\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u3053\u3067GpuJoin\u306f t0 \u3068 t1 \u3001\u304a\u3088\u3073 t2 \u3068\u306eJOIN\u51e6\u7406\u3092\u5b9f\u884c\u3057\u3001\u305d\u306e\u7d50\u679c\u3092\u53d7\u3051\u53d6\u308bGpuPreAgg\u306f\u5217 cat \u306b\u3088\u308bGROUP BY\u51e6\u7406\u3092GPU\u3067\u5b9f\u884c\u3057\u307e\u3059\u3002 PostgreSQL\u304c\u30af\u30a8\u30ea\u5b9f\u884c\u8a08\u753b\u3092\u69cb\u7bc9\u3059\u308b\u904e\u7a0b\u3067PG-Strom\u306f\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306b\u4ecb\u5165\u3057\u3001SCAN\u3001JOIN\u3001GROUP BY\u306e\u5404\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092GPU\u3067\u5b9f\u884c\u53ef\u80fd\u3067\u3042\u308b\u5834\u5408\u3001\u305d\u306e\u30b3\u30b9\u30c8\u3092\u7b97\u51fa\u3057\u3066PostgreSQL\u306e\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306b\u5b9f\u884c\u8a08\u753b\u306e\u5019\u88dc\u3092\u63d0\u793a\u3057\u307e\u3059\u3002 \u63a8\u5b9a\u3055\u308c\u305f\u30b3\u30b9\u30c8\u5024\u304cCPU\u3067\u5b9f\u884c\u3059\u308b\u4ed6\u306e\u5b9f\u884c\u8a08\u753b\u3088\u308a\u3082\u5c0f\u3055\u306a\u5024\u3067\u3042\u308b\u5834\u5408\u3001GPU\u3092\u7528\u3044\u305f\u4ee3\u66ff\u306e\u5b9f\u884c\u8a08\u753b\u304c\u63a1\u7528\u3055\u308c\u308b\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002 \u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092GPU\u3067\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u5c11\u306a\u304f\u3068\u3082\u6f14\u7b97\u5f0f\u307e\u305f\u306f\u95a2\u6570\u3001\u304a\u3088\u3073\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u578b\u304cPG-Strom\u3067\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 int \u3084 float \u3068\u3044\u3063\u305f\u6570\u5024\u578b\u3001 date \u3084 timestamp \u3068\u3044\u3063\u305f\u65e5\u4ed8\u6642\u523b\u578b\u3001 text \u306e\u3088\u3046\u306a\u6587\u5b57\u5217\u578b\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u304a\u308a\u3001\u307e\u305f\u3001\u56db\u5247\u6f14\u7b97\u3084\u5927\u5c0f\u6bd4\u8f03\u3068\u3044\u3063\u305f\u6570\u591a\u304f\u306e\u30d3\u30eb\u30c8\u30a4\u30f3\u6f14\u7b97\u5b50\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u8a73\u7d30\u306a\u4e00\u89a7\u306b\u95a2\u3057\u3066\u306f \u30ea\u30d5\u30a1\u30ec\u30f3\u30b9 \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002","title":"GPU\u30aa\u30d5\u30ed\u30fc\u30c9\u306e\u78ba\u8a8d"},{"location":"operations/#cpugpu","text":"PG-Strom\u306fPostgreSQL\u306eCPU\u4e26\u5217\u5b9f\u884c\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002 PostgreSQL\u306eCPU\u4e26\u5217\u5b9f\u884c\u306f\u3001Gather\u30ce\u30fc\u30c9\u304c\u3044\u304f\u3064\u304b\u306e\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30d7\u30ed\u30bb\u30b9\u3092\u8d77\u52d5\u3057\u3001\u5404\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u304c\"\u90e8\u5206\u7684\u306b\"\u5b9f\u884c\u3057\u305f\u30af\u30a8\u30ea\u306e\u7d50\u679c\u3092\u5f8c\u3067\u7d50\u5408\u3059\u308b\u5f62\u3067\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u3059\u3002 GpuJoin\u3084GpuPreAgg\u3068\u3044\u3063\u305fPG-Strom\u306e\u51e6\u7406\u306f\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u5074\u3067\u306e\u5b9f\u884c\u306b\u5bfe\u5fdc\u3057\u3066\u304a\u308a\u3001\u500b\u3005\u306e\u30d7\u30ed\u30bb\u30b9\u304c\u4e92\u3044\u306bGPU\u3092\u4f7f\u7528\u3057\u3066\u51e6\u7406\u3092\u9032\u3081\u307e\u3059\u3002\u901a\u5e38\u3001GPU\u3078\u30c7\u30fc\u30bf\u3092\u4f9b\u7d66\u3059\u308b\u305f\u3081\u306b\u500b\u3005\u306eCPU\u30b3\u30a2\u304c\u30d0\u30c3\u30d5\u30a1\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b\u305f\u3081\u306e\u51e6\u7406\u901f\u5ea6\u306f\u3001GPU\u3067\u306eSQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u51e6\u7406\u901f\u5ea6\u306b\u6bd4\u3079\u3066\u305a\u3063\u3068\u9045\u3044\u305f\u3081\u3001CPU\u4e26\u5217\u3068GPU\u4e26\u5217\u3092\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u3067\u5229\u7528\u3059\u308b\u4e8b\u3067\u51e6\u7406\u901f\u5ea6\u306e\u5411\u4e0a\u304c\u671f\u5f85\u3067\u304d\u307e\u3059\u3002 \u305f\u3060\u3057\u3001GPU\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306aCUDA\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306f\u5404\u30d7\u30ed\u30bb\u30b9\u3054\u3068\u306b\u4f5c\u6210\u3055\u308c\u3001CUDA\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3092\u751f\u6210\u3059\u308b\u305f\u3073\u306b\u3042\u308b\u7a0b\u5ea6\u306eGPU\u30ea\u30bd\u30fc\u30b9\u304c\u6d88\u8cbb\u3055\u308c\u308b\u305f\u3081\u3001\u5e38\u306bCPU\u4e26\u5217\u5ea6\u304c\u9ad8\u3051\u308c\u3070\u826f\u3044\u3068\u3044\u3046\u8a33\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u3092\u898b\u3066\u304f\u3060\u3055\u3044\u3002 Gather\u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u306f\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u304c\u5b9f\u884c\u53ef\u80fd\u306a\u3082\u306e\u3067\u3059\u30021\u5104\u884c\u3092\u4fdd\u6301\u3059\u308b t0 \u30c6\u30fc\u30d6\u30eb\u30924\u30d7\u30ed\u30bb\u30b9\u306e\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u3068\u30b3\u30fc\u30c7\u30a3\u30cd\u30fc\u30bf\u30d7\u30ed\u30bb\u30b9\u3067\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u305f\u3081\u3001\u30d7\u30ed\u30bb\u30b9\u3042\u305f\u308a2000\u4e07\u884c\u3092GpuJoin\u304a\u3088\u3073GpuPreAgg\u3067\u51e6\u7406\u3057\u3001\u305d\u306e\u7d50\u679c\u3092Gather\u30ce\u30fc\u30c9\u3067\u7d50\u5408\u3057\u307e\u3059\u3002 # EXPLAIN SELECT cat,count(*),avg(ax) FROM t0 NATURAL JOIN t1 GROUP by cat; QUERY PLAN -------------------------------------------------------------------------------- GroupAggregate (cost=955705.47..955720.93 rows=27 width=20) Group Key: t0.cat -> Sort (cost=955705.47..955707.36 rows=756 width=44) Sort Key: t0.cat -> Gather (cost=955589.95..955669.33 rows=756 width=44) Workers Planned: 4 -> Parallel Custom Scan (GpuPreAgg) (cost=954589.95..954593.73 rows=189 width=44) Reduction: Local GPU Projection: cat, pgstrom.nrows(), pgstrom.nrows((ax IS NOT NULL)), pgstrom.psum(ax) Combined GpuJoin: enabled -> Parallel Custom Scan (GpuJoin) on t0 (cost=27682.82..841218.52 rows=99996736 width=12) GPU Projection: t0.cat, t1.ax Outer Scan: t0 (cost=0.00..1083384.84 rows=24999184 width=8) Depth 1: GpuHashJoin (nrows 24999184...99996736) HashKeys: t0.aid JoinQuals: (t0.aid = t1.aid) KDS-Hash (size: 10.39MB) -> Seq Scan on t1 (cost=0.00..1972.85 rows=103785 width=12) (18 rows)","title":"CPU+GPU\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u4e26\u5217"},{"location":"operations/#_2","text":"\u203b\u672c\u7bc0\u306e\u5185\u5bb9\u306f\u6709\u52b9\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u6700\u65b0\u306e\u5b9f\u88c5\u3092\u8e0f\u307e\u3048\u305f\u66f8\u304d\u76f4\u3057\u304c\u5fc5\u8981\u3067\u3059\u3002 PG-Strom\u306fSCAN\u3001JOIN\u3001GROUP BY\u306e\u5404\u51e6\u7406\u3092GPU\u3067\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u304c\u3001\u3053\u308c\u306b\u5bfe\u5fdc\u3059\u308bPostgreSQL\u6a19\u6e96\u306e\u51e6\u7406\u3092\u5358\u7d14\u306b\u7f6e\u304d\u63db\u3048\u305f\u3060\u3051\u3067\u306f\u56f0\u3063\u305f\u4e8b\u614b\u304c\u767a\u751f\u3057\u307e\u3059\u3002 SCAN\u304c\u7d42\u308f\u3063\u305f\u5f8c\u306e\u30c7\u30fc\u30bf\u3092\u3044\u3063\u305f\u3093\u30db\u30b9\u30c8\u5074\u306e\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u623b\u3057\u3001\u6b21\u306b\u305d\u308c\u3092JOIN\u3059\u308b\u305f\u3081\u306b\u518d\u3073GPU\u3078\u3068\u30b3\u30d4\u30fc\u3057\u3001\u3055\u3089\u306bGROUP BY\u3092\u5b9f\u884c\u3059\u308b\u524d\u306b\u518d\u3073\u30db\u30b9\u30c8\u5074\u306e\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u623b\u3057\u30fb\u30fb\u30fb\u3068\u3044\u3063\u305f\u5f62\u3067\u3001CPU\u3068GPU\u306e\u9593\u3067\u30c7\u30fc\u30bf\u306e\u30d4\u30f3\u30dd\u30f3\u304c\u767a\u751f\u3057\u3066\u3057\u307e\u3046\u306e\u3067\u3059\u3002 \u3053\u308c\u3092\u907f\u3051\u308b\u305f\u3081\u306b\u3001PG-Strom\u306f\u4e0b\u4f4d\u30d7\u30e9\u30f3\u3092\u5f15\u304d\u4e0a\u3052\u3066\u4e00\u5ea6\u306eGPU Kernel\u306e\u5b9f\u884c\u3067\u51e6\u7406\u3057\u3066\u3057\u307e\u3046\u3068\u3044\u3046\u30e2\u30fc\u30c9\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u30d1\u30bf\u30fc\u30f3\u3067\u4e0b\u4f4d\u30d7\u30e9\u30f3\u306e\u5f15\u304d\u4e0a\u3052\u304c\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 SCAN + JOIN SCAN + GROUP BY SCAN + JOIN + GROUP BY \u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u306f\u3001\u4e0b\u4f4d\u30d7\u30e9\u30f3\u306e\u5f15\u304d\u4e0a\u3052\u3092\u5168\u304f\u884c\u308f\u306a\u3044\u30b1\u30fc\u30b9\u3067\u3059\u3002 GpuScan\u306e\u5b9f\u884c\u7d50\u679c\u3092GpuJoin\u304c\u53d7\u53d6\u308a\u3001\u3055\u3089\u306b\u305d\u306e\u5b9f\u884c\u7d50\u679c\u3092GpuPreAgg\u304c\u53d7\u3051\u53d6\u3063\u3066\u6700\u7d42\u7d50\u679c\u3092\u751f\u6210\u3059\u308b\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 # EXPLAIN SELECT cat,count(*),avg(ax) FROM t0 NATURAL JOIN t1 WHERE aid < bid GROUP BY cat; QUERY PLAN -------------------------------------------------------------------------------- GroupAggregate (cost=1239991.03..1239995.15 rows=27 width=20) Group Key: t0.cat -> Sort (cost=1239991.03..1239991.50 rows=189 width=44) Sort Key: t0.cat -> Custom Scan (GpuPreAgg) (cost=1239980.10..1239983.88 rows=189 width=44) Reduction: Local GPU Projection: cat, pgstrom.nrows(), pgstrom.nrows((ax IS NOT NULL)), pgstrom.psum(ax) -> Custom Scan (GpuJoin) (cost=50776.43..1199522.96 rows=33332245 width=12) GPU Projection: t0.cat, t1.ax Depth 1: GpuHashJoin (nrows 33332245...33332245) HashKeys: t0.aid JoinQuals: (t0.aid = t1.aid) KDS-Hash (size: 10.39MB) -> Custom Scan (GpuScan) on t0 (cost=12634.49..1187710.85 rows=33332245 width=8) GPU Projection: cat, aid GPU Filter: (aid < bid) -> Seq Scan on t1 (cost=0.00..1972.85 rows=103785 width=12) (18 rows) \u3053\u306e\u5834\u5408\u3001\u5404\u5b9f\u884c\u30b9\u30c6\u30fc\u30b8\u306b\u304a\u3044\u3066GPU\u3068\u30db\u30b9\u30c8\u30d0\u30c3\u30d5\u30a1\u306e\u9593\u3067\u30c7\u30fc\u30bf\u306e\u30d4\u30f3\u30dd\u30f3\u304c\u767a\u751f\u3059\u308b\u305f\u3081\u3001\u5b9f\u884c\u52b9\u7387\u306f\u3088\u304f\u3042\u308a\u307e\u305b\u3093\u3002 \u4e00\u65b9\u3001\u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u306f\u3001\u4e0b\u4f4d\u30ce\u30fc\u30c9\u306e\u5f15\u304d\u4e0a\u3052\u3092\u884c\u3063\u305f\u3082\u306e\u3067\u3059\u3002 # EXPLAIN ANALYZE SELECT cat,count(*),avg(ax) FROM t0 NATURAL JOIN t1 WHERE aid < bid GROUP BY cat; QUERY PLAN -------------------------------------------------------------------------------- GroupAggregate (cost=903669.50..903673.62 rows=27 width=20) (actual time=7761.630..7761.644 rows=27 loops=1) Group Key: t0.cat -> Sort (cost=903669.50..903669.97 rows=189 width=44) (actual time=7761.621..7761.626 rows=27 loops=1) Sort Key: t0.cat Sort Method: quicksort Memory: 28kB -> Custom Scan (GpuPreAgg) (cost=903658.57..903662.35 rows=189 width=44) (actual time=7761.531..7761.540 rows=27 loops=1) Reduction: Local GPU Projection: cat, pgstrom.nrows(), pgstrom.nrows((ax IS NOT NULL)), pgstrom.psum(ax) Combined GpuJoin: enabled -> Custom Scan (GpuJoin) on t0 (cost=12483.41..863201.43 rows=33332245 width=12) (never executed) GPU Projection: t0.cat, t1.ax Outer Scan: t0 (cost=12634.49..1187710.85 rows=33332245 width=8) (actual time=59.623..5557.052 rows=100000000 loops=1) Outer Scan Filter: (aid < bid) Rows Removed by Outer Scan Filter: 50002874 Depth 1: GpuHashJoin (plan nrows: 33332245...33332245, actual nrows: 49997126...49997126) HashKeys: t0.aid JoinQuals: (t0.aid = t1.aid) KDS-Hash (size plan: 10.39MB, exec: 64.00MB) -> Seq Scan on t1 (cost=0.00..1972.85 rows=103785 width=12) (actual time=0.013..15.303 rows=100000 loops=1) Planning time: 0.506 ms Execution time: 8495.391 ms (21 rows) \u307e\u305a\u3001\u30c6\u30fc\u30d6\u30eb t0 \u3078\u306e\u30b9\u30ad\u30e3\u30f3\u304cGpuJoin\u306e\u5b9f\u884c\u8a08\u753b\u306b\u57cb\u3081\u8fbc\u307e\u308c\u3001GpuScan\u304c\u6d88\u3048\u3066\u3044\u308b\u4e8b\u306b\u304a\u6c17\u4ed8\u304d\u3067\u3057\u3087\u3046\u3002 \u3053\u308c\u306fGpuJoin\u304c\u914d\u4e0b\u306eGpuScan\u3092\u5f15\u304d\u4e0a\u3052\u3001\u4e00\u4f53\u5316\u3057\u305fGPU\u30ab\u30fc\u30cd\u30eb\u95a2\u6570\u3067WHERE\u53e5\u306e\u51e6\u7406\u3082\u884c\u3063\u305f\u4e8b\u3092\u610f\u5473\u3057\u3066\u3044\u307e\u3059\u3002 \u52a0\u3048\u3066\u5947\u5999\u306a\u3053\u3068\u306b\u3001 EXPLAIN ANALYZE \u306e\u7d50\u679c\u306b\u306fGpuJoin\u304c(never executed)\u3068\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u306fGpuPreAgg\u304c\u914d\u4e0b\u306eGpuJoin\u3092\u5f15\u304d\u4e0a\u3052\u3001\u4e00\u4f53\u5316\u3057\u305fGPU\u30ab\u30fc\u30cd\u30eb\u95a2\u6570\u3067JOIN\u3068GROUP BY\u3092\u5b9f\u884c\u3057\u305f\u4e8b\u3092\u610f\u5473\u3057\u3066\u3044\u307e\u3059\u3002 SCAN\u51e6\u7406\u306e\u5f15\u304d\u4e0a\u3052\u306f pg_strom.pullup_outer_scan \u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3088\u3063\u3066\u5236\u5fa1\u3067\u304d\u307e\u3059\u3002 \u307e\u305f\u3001JOIN\u51e6\u7406\u306e\u5f15\u304d\u4e0a\u3052\u306f pg_strom.pullup_outer_join \u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3088\u3063\u3066\u5236\u5fa1\u3067\u304d\u307e\u3059\u3002 \u3044\u305a\u308c\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3082\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f on \u306b\u8a2d\u5b9a\u3055\u308c\u3066\u304a\u308a\u3001\u901a\u5e38\u306f\u3053\u308c\u3092\u7121\u52b9\u5316\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u30c8\u30e9\u30d6\u30eb\u6642\u306e\u554f\u984c\u5207\u308a\u5206\u3051\u624b\u6bb5\u306e\u4e00\u3064\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002","title":"\u4e0b\u4f4d\u30d7\u30e9\u30f3\u306e\u5f15\u304d\u4e0a\u3052"},{"location":"operations/#gpujoininner-pinned-buffer","text":"\u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u3092\u898b\u3066\u304f\u3060\u3055\u3044\u3002 PG-Strom\u304c\u30c6\u30fc\u30d6\u30eb\u3092\u7d50\u5408\u3059\u308b\u969b\u3001\u901a\u5e38\u306f\u6700\u3082\u30b5\u30a4\u30ba\u306e\u5927\u304d\u306a\u30c6\u30fc\u30d6\u30eb\uff08\u3053\u306e\u5834\u5408\u306f lineorder \u3067\u3001OUTER\u8868\u3068\u547c\u3073\u307e\u3059\uff09\u3092\u975e\u540c\u671f\u7684\u306b\u8aad\u307f\u8fbc\u307f\u306a\u304c\u3089\u3001\u4ed6\u306e\u30c6\u30fc\u30d6\u30eb\u3068\u306e\u7d50\u5408\u51e6\u7406\u304a\u3088\u3073\u96c6\u8a08\u51e6\u7406\u3092\u9032\u3081\u307e\u3059\u3002 JOIN\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u5236\u7d04\u4e0a\u3001\u4e88\u3081\u305d\u308c\u4ee5\u5916\u306e\u30c6\u30fc\u30d6\u30eb\uff08\u3053\u306e\u5834\u5408\u306f date1 \u3001 part \u3001 supplier \u3067\u3001INNER\u8868\u3068\u547c\u3073\u307e\u3059\uff09\u3092\u30e1\u30e2\u30ea\u4e0a\u306b\u8aad\u307f\u51fa\u3057\u3001\u307e\u305fJOIN\u30ad\u30fc\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u3092\u8a08\u7b97\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u30c6\u30fc\u30d6\u30eb\u306fOUTER\u8868\u307b\u3069\u5927\u304d\u306a\u30b5\u30a4\u30ba\u3067\u306f\u306a\u3044\u3082\u306e\u306e\u3001\u6570GB\u3092\u8d8a\u3048\u308b\u3088\u3046\u306aINNER\u30d0\u30c3\u30d5\u30a1\u306e\u6e96\u5099\u306f\u76f8\u5fdc\u306b\u91cd\u3044\u51e6\u7406\u3068\u306a\u308a\u307e\u3059\u3002 GpuJoin\u306f\u901a\u5e38\u3001PostgreSQL\u306eAPI\u3092\u901a\u3057\u3066INNER\u8868\u3092\u4e00\u884c\u3054\u3068\u306b\u8aad\u307f\u51fa\u3057\u3001\u305d\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u3092\u8a08\u7b97\u3059\u308b\u3068\u3068\u3082\u306b\u5171\u6709\u30e1\u30e2\u30ea\u4e0a\u306eINNER\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002GPU-Service\u30d7\u30ed\u30bb\u30b9\u306f\u3001\u3053\u306eINNER\u30d0\u30c3\u30d5\u30a1\u3092GPU\u30e1\u30e2\u30ea\u306b\u8ee2\u9001\u3057\u3001\u305d\u3053\u3067\u306f\u3058\u3081\u3066OUTER\u8868\u3092\u8aad\u307f\u51fa\u3057\u3066JOIN\u51e6\u7406\u3092\u958b\u59cb\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 INNER\u8868\u304c\u76f8\u5fdc\u306b\u5927\u304d\u304fGPU\u3067\u5b9f\u884c\u53ef\u80fd\u306a\u691c\u7d22\u6761\u4ef6\u3092\u542b\u3080\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u306e\u3088\u3046\u306b\u3001GpuJoin\u306e\u914d\u4e0b\u306bGpuScan\u304c\u5b58\u5728\u3059\u308b\u30b1\u30fc\u30b9\u304c\u3042\u308a\u5f97\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001INNER\u8868\u306f\u3044\u3063\u305f\u3093GpuScan\u306b\u3088\u3063\u3066GPU\u3067\u51e6\u7406\u3055\u308c\u305f\u5f8c\u3001\u305d\u306e\u5b9f\u884c\u7d50\u679c\u3092CPU\u5074\u306b\u623b\u3057\u3001\u3055\u3089\u306bINNER\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305f\u5f8c\u3067\u3082\u3046\u4e00\u5ea6GPU\u3078\u30ed\u30fc\u30c9\u3055\u308c\u307e\u3059\u3002\u305a\u3044\u3076\u3093\u3068\u7121\u99c4\u306a\u30c7\u30fc\u30bf\u306e\u6d41\u308c\u304c\u5b58\u5728\u3059\u308b\u3088\u3046\u306b\u898b\u3048\u307e\u3059\u3002 =# explain select sum(lo_revenue), d_year, p_brand1 from lineorder, date1, part, supplier where lo_orderdate = d_datekey and lo_partkey = p_partkey and lo_suppkey = s_suppkey and p_brand1 between 'MFGR#2221' and 'MFGR#2228' and s_region = 'ASIA' group by d_year, p_brand1; QUERY PLAN --------------------------------------------------------------------------------------------------------------- GroupAggregate (cost=31007186.70..31023043.21 rows=6482 width=46) Group Key: date1.d_year, part.p_brand1 -> Sort (cost=31007186.70..31011130.57 rows=1577548 width=20) Sort Key: date1.d_year, part.p_brand1 -> Custom Scan (GpuJoin) on lineorder (cost=275086.19..30844784.03 rows=1577548 width=20) GPU Projection: date1.d_year, part.p_brand1, lineorder.lo_revenue GPU Join Quals [1]: (part.p_partkey = lineorder.lo_partkey) ... [nrows: 5994236000 -> 7804495] GPU Outer Hash [1]: lineorder.lo_partkey GPU Inner Hash [1]: part.p_partkey GPU Join Quals [2]: (supplier.s_suppkey = lineorder.lo_suppkey) ... [nrows: 7804495 -> 1577548] GPU Outer Hash [2]: lineorder.lo_suppkey GPU Inner Hash [2]: supplier.s_suppkey GPU Join Quals [3]: (date1.d_datekey = lineorder.lo_orderdate) ... [nrows: 1577548 -> 1577548] GPU Outer Hash [3]: lineorder.lo_orderdate GPU Inner Hash [3]: date1.d_datekey GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on part (cost=0.00..59258.00 rows=2604 width=14) Filter: ((p_brand1 >= 'MFGR#2221'::bpchar) AND (p_brand1 <= 'MFGR#2228'::bpchar)) -> Custom Scan (GpuScan) on supplier (cost=100.00..190348.83 rows=2019384 width=6) GPU Projection: s_suppkey GPU Pinned Buffer: enabled GPU Scan Quals: (s_region = 'ASIA'::bpchar) [rows: 9990357 -> 2019384] GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 (cost=0.00..72.56 rows=2556 width=8) (24 rows) \u3053\u306e\u3088\u3046\u306b\u3001INNER\u8868\u306e\u8aad\u51fa\u3057\u3084INNER\u30d0\u30c3\u30d5\u30a1\u306e\u69cb\u7bc9\u306e\u969b\u306bCPU\u3068GPU\u306e\u9593\u3067\u30c7\u30fc\u30bf\u306e\u30d4\u30f3\u30dd\u30f3\u304c\u767a\u751f\u3059\u308b\u5834\u5408\u3001 Pinned Inner Buffer \u3092\u4f7f\u7528\u3059\u308b\u3088\u3046\u8a2d\u5b9a\u3059\u308b\u4e8b\u3067\u3001GpuJoin\u306e\u5b9f\u884c\u958b\u59cb\u30ea\u30fc\u30c9\u30bf\u30a4\u30e0\u306e\u77ed\u7e2e\u3084\u3001\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u524a\u6e1b\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4e0a\u306e\u5b9f\u884c\u8a08\u753b\u3067\u306f\u3001 supplier \u8868\u306e\u8aad\u51fa\u3057\u304cGpuScan\u306b\u3088\u308a\u884c\u308f\u308c\u308b\u4e8b\u306b\u306a\u3063\u3066\u304a\u308a\u3001\u7d71\u8a08\u60c5\u5831\u306b\u3088\u308c\u3070\u7d04200\u4e07\u884c\u304c\u8aad\u307f\u51fa\u3055\u308c\u308b\u3068\u63a8\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u305d\u306e\u4e00\u65b9\u3067\u3001 GPU Pinned Buffer: enabled \u306e\u51fa\u529b\u306b\u6ce8\u76ee\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306f\u3001INNER\u8868\u306e\u63a8\u5b9a\u30b5\u30a4\u30ba\u304c pg_strom.pinned_inner_buffer_threshold \u306e\u8a2d\u5b9a\u5024\u3092\u8d8a\u3048\u308b\u5834\u5408\u3001GpuScan\u306e\u51e6\u7406\u7d50\u679c\u3092\u305d\u306e\u307e\u307eGPU\u30e1\u30e2\u30ea\u306b\u6b8b\u3057\u3066\u304a\u304d\u3001\u305d\u308c\u3092\u6b21\u306eGpuJoin\u3067INNER\u30d0\u30c3\u30d5\u30a1\u306e\u4e00\u90e8\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u3068\u3044\u3046\u6a5f\u80fd\u3067\u3059\uff08\u5fc5\u8981\u3067\u3042\u308c\u3070\u30cf\u30c3\u30b7\u30e5\u5024\u306e\u8a08\u7b97\u3082GPU\u3067\u884c\u3044\u307e\u3059\uff09\u3002 \u305d\u306e\u305f\u3081\u3001 supplier \u8868\u306e\u5185\u5bb9\u306fGPU-Direct SQL\u306b\u3088\u3063\u3066\u30b9\u30c8\u30ec\u30fc\u30b8\u304b\u3089GPU\u3078\u3068\u8aad\u307f\u51fa\u3055\u308c\u305f\u5f8c\u3001CPU\u5074\u306b\u623b\u3055\u308c\u305f\u308a\u3001\u518d\u5ea6GPU\u3078\u30ed\u30fc\u30c9\u3055\u308c\u305f\u308a\u3059\u308b\u3053\u3068\u306a\u304f\u3001\u6b21\u306eGpuJoin\u3067\u5229\u7528\u3055\u308c\u308b\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002 \u4e00\u65b9\u3067Pinned Inner Buffer\u306e\u4f7f\u7528\u306b\u306f\u82e5\u5e72\u306e\u30c8\u30ec\u30fc\u30c9\u30aa\u30d5\u3082\u3042\u308b\u305f\u3081\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u672c\u6a5f\u80fd\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u660e\u793a\u7684\u306b pg_strom.pinned_inner_buffer_threshold \u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 Pinned Inner Buffer\u3092\u4f7f\u7528\u3057\u305f\u5834\u5408\u3001CPU\u5074\u306fINNER\u30d0\u30c3\u30d5\u30a1\u306e\u5185\u5bb9\u3092\u5b8c\u5168\u306b\u306f\u4fdd\u6301\u3057\u3066\u3044\u307e\u305b\u3093\u3002\u305d\u306e\u305f\u3081\u3001TOAST\u5316\u3055\u308c\u305f\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u3092GPU\u3067\u53c2\u7167\u3057\u305f\u5834\u5408\u306a\u3069\u3001CPU Fallback\u51e6\u7406\u3092\u884c\u3046\u4e8b\u304c\u3067\u304d\u305a\u30a8\u30e9\u30fc\u3092\u767a\u751f\u3055\u305b\u307e\u3059\u3002\u307e\u305f\u3001CPU Fallback\u3092\u5229\u7528\u3057\u3066\u5b9f\u88c5\u3055\u308c\u3066\u3044\u308bRIGHT/FULL OUTER JOIN\u3082\u540c\u69d8\u306e\u7406\u7531\u3067Pinned Inner Buffer\u3068\u5171\u5b58\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3002","title":"GpuJoin\u306b\u304a\u3051\u308bInner Pinned Buffer"},{"location":"operations/#_3","text":"PG-Strom\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306ewiki\u30b5\u30a4\u30c8\u306b\u306f\u3001\u30ce\u30fc\u30c8\u3068\u547c\u3070\u308c\u308b\u8a73\u7d30\u306a\u6280\u8853\u60c5\u5831\u304c\u516c\u958b\u3055\u308c\u3066\u3044\u307e\u3059\u3002 https://github.com/heterodb/pg-strom/wiki","title":"\u30ca\u30ec\u30c3\u30b8\u30d9\u30fc\u30b9"},{"location":"partition/","text":"\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3 \u672c\u7ae0\u3067\u306fPostgreSQL\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u6a5f\u80fd\u3068PG-Strom\u3092\u4f75\u7528\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u306a\u304a\u3001\u672c\u7ae0\u306e\u5185\u5bb9\u306f PostgreSQL v11\u4ee5\u964d \u3067PG-Strom\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306b\u306e\u307f\u6709\u52b9\u3067\u3059\u3002 PostgreSQL\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u6a5f\u80fd\u306b\u3064\u3044\u3066\u3001\u8a73\u3057\u304f\u306f PostgreSQL\u6587\u66f8\uff1a\u30c6\u30fc\u30d6\u30eb\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0 \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u6982\u8981 PostgreSQL v10\u306b\u304a\u3044\u3066\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u6a5f\u80fd\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u307e\u3057\u305f\u3002 \u3053\u308c\u306f\u3001\u8ad6\u7406\u7684\u306b\u306f\u4e00\u500b\u306e\u5927\u304d\u306a\u30c6\u30fc\u30d6\u30eb\u3067\u3042\u308b\u3082\u306e\u3092\u7269\u7406\u7684\u306b\u3088\u308a\u5c0f\u3055\u306a\u30c6\u30fc\u30d6\u30eb\u306b\u5206\u5272\u3057\u3066\u683c\u7d0d\u3059\u308b\u4ed5\u7d44\u307f\u3067\u3001\u691c\u7d22\u6761\u4ef6\u3088\u308a\u660e\u3089\u304b\u306b\u30b9\u30ad\u30e3\u30f3\u306e\u5fc5\u8981\u304c\u306a\u3044\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u305f\u308a\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u7269\u7406\u7684\u306b\u5206\u6563\u3055\u305b\u308b\u4e8b\u3067\u3088\u308a\u5e83\u3044I/O\u5e2f\u57df\u3092\u78ba\u4fdd\u3059\u308b\u306a\u3069\u306e\u5229\u70b9\u304c\u3042\u308a\u307e\u3059\u3002 PostgreSQL v10\u3067\u306f\u7bc4\u56f2\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u3001\u30ea\u30b9\u30c8\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u306e2\u7a2e\u985e\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3001\u3055\u3089\u306bPostgreSQL v11\u3067\u306f\u30cf\u30c3\u30b7\u30e5\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u306b\u52a0\u3048\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u540c\u58eb\u306eJOIN\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u56f3\u306f\u3001\u65e5\u4ed8\u578b\uff08DATE\u578b\uff09\u306e\u30ad\u30fc\u5024\u3092\u7528\u3044\u305f\u7bc4\u56f2\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002 \u30ad\u30fc\u5024 2018-05-30 \u3092\u6301\u3064\u30ec\u30b3\u30fc\u30c9\u306f\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb tbl_2018 \u306b\u632f\u308a\u5206\u3051\u3089\u308c\u3001\u540c\u69d8\u306b\u3001\u30ad\u30fc\u5024 2014-03-21 \u3092\u6301\u3064\u30ec\u30b3\u30fc\u30c9\u306f\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb tbl_2014 \u306b\u632f\u308a\u5206\u3051\u3089\u308c\u308b\u30fb\u30fb\u30fb\u3068\u3044\u3063\u305f\u5177\u5408\u3067\u3059\u3002 \u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u6642\u3001\u4f8b\u3048\u3070 WHERE ymd > '2016-07-01'::date \u3068\u3044\u3046\u6761\u4ef6\u53e5\u304c\u4ed8\u52a0\u3055\u308c\u3066\u3044\u308b\u3068\u3001 tbl_2014 \u304a\u3088\u3073 tbl_2015 \u306b\u8a72\u5f53\u3059\u308b\u30ec\u30b3\u30fc\u30c9\u304c\u5b58\u5728\u3057\u306a\u3044\u4e8b\u306f\u81ea\u660e\u3067\u3059\u306e\u3067\u3001PostgreSQL\u306e\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306f tbl_2016 \u3001 tbl_2017 \u3001 tbl_2018 \u3060\u3051\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u3001\u305d\u306e\u7d50\u679c\u3092\u7d50\u5408\u3059\u308b Append \u30ce\u30fc\u30c9\u3092\u631f\u3080\u4e8b\u3067\u3001\u3042\u305f\u304b\u3082\u5358\u4e00\u306e\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u30ec\u30b3\u30fc\u30c9\u3092\u8aad\u307f\u51fa\u3057\u305f\u304b\u306e\u3088\u3046\u306b\u632f\u821e\u3046\u5b9f\u884c\u8a08\u753b\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 PostgreSQL\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u3068PG-Strom\u3092\u4f75\u7528\u3059\u308b\u5834\u5408\u3001\u307e\u305a\u3001\u30b9\u30ad\u30e3\u30f3\u304c\u5fc5\u8981\u3067\u3042\u308b\u3068\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u304c\u5224\u65ad\u3057\u305f\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u306b\u5bfe\u3057\u3001\u500b\u3005\u306b\u5b9f\u884c\u30b3\u30b9\u30c8\u3092\u63a8\u5b9a\u3057\u305f\u4e0a\u3067 GpuScan \u304c\u9078\u629e\u3055\u308c\u308b\u4e8b\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001 GpuScan \u306e\u5b9f\u884c\u7d50\u679c\u3092 Append \u30ce\u30fc\u30c9\u3067\u675f\u306d\u308b\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002 \u305f\u3060\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u306b\u7d9a\u304d\u3001JOIN\u3084GROUP BY\u306a\u3069PG-Strom\u3067\u9ad8\u901f\u5316\u304c\u53ef\u80fd\u306a\u51e6\u7406\u3092\u5b9f\u884c\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u6700\u9069\u5316\u306e\u89b3\u70b9\u304b\u3089\u691c\u8a0e\u304c\u5fc5\u8981\u3067\u3059\u3002 \u4f8b\u3048\u3070\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u3055\u308c\u3066\u3044\u306a\u3044\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u3066\u5225\u306e\u30c6\u30fc\u30d6\u30eb\u3068JOIN\u3057\u3001GROUP BY\u306b\u3088\u308b\u96c6\u8a08\u7d50\u679c\u3092\u51fa\u529b\u3059\u308b\u5834\u5408\u3001\u6761\u4ef6\u304c\u63c3\u3048\u3070\u3001\u5404\u30b9\u30c6\u30c3\u30d7\u9593\u306e\u30c7\u30fc\u30bf\u4ea4\u63db\u306fGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u3067\u884c\u3046\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306fGPU\u3068CPU\u306e\u9593\u306e\u30c7\u30fc\u30bf\u79fb\u52d5\u3092\u6700\u5c0f\u5316\u3059\u308b\u3068\u3044\u3046\u89b3\u70b9\u304b\u3089\u3001\u6700\u3082PG-Strom\u304c\u5f97\u610f\u3068\u3059\u308b\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3067\u3059\u3002 \u4e00\u65b9\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u540c\u69d8\u306e\u51e6\u7406\u3092\u884c\u3046\u5834\u5408\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u3068JOIN\u3084GROUP BY\u306e\u9593\u306b Append \u51e6\u7406\u304c\u631f\u307e\u3063\u3066\u3057\u307e\u3046\u306e\u304c\u8ab2\u984c\u3067\u3059\u3002\u3053\u306e\u5b9f\u884c\u8a08\u753b\u306e\u4e0b\u3067\u306f\u3001GpuScan\u304c\u51e6\u7406\u3057\u305f\u30c7\u30fc\u30bf\u3092\u4e00\u5ea6\u30db\u30b9\u30c8\u30b7\u30b9\u30c6\u30e0\u3078\u8ee2\u9001\u3057\u3001 Append \u51e6\u7406\u3092\u884c\u3063\u305f\u4e0a\u3067\u3001\u305d\u306e\u5f8c\u306eGpuJoin\u3084GpuPreAgg\u51e6\u7406\u3092\u884c\u3046\u305f\u3081\u306b\u518d\u3073\u30c7\u30fc\u30bf\u3092GPU\u3078\u8ee2\u9001\u3059\u308b\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u6c7a\u3057\u3066\u52b9\u7387\u306e\u826f\u3044\u51e6\u7406\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u3053\u306e\u3088\u3046\u306aCPU-GPU\u9593\u306e\u30c7\u30fc\u30bf\u306e\u30d4\u30f3\u30dd\u30f3\u3092\u907f\u3051\u308b\u305f\u3081\u3001PG-Strom\u306f\u53ef\u80fd\u306a\u9650\u308aJOIN\u3084GROUP BY\u3092 Append \u3088\u308a\u3082\u5148\u306b\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3092\u8a66\u307f\u307e\u3059\u3002 \u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u304c\u6210\u529f\u308c\u3070\u3001\u30c7\u30fc\u30bf\u4ea4\u63db\u3092\u52b9\u7387\u5316\u3067\u304d\u308b\u3060\u3051\u3067\u306a\u304f\u3001\u7279\u306bGROUP BY\u51e6\u7406\u306b\u3088\u3063\u3066\u884c\u6570\u3092\u5927\u5e45\u306b\u524a\u6e1b\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308b\u305f\u3081\u3001 Append \u51e6\u7406\u3092\u5b9f\u884c\u3059\u308b\u30db\u30b9\u30c8\u30b7\u30b9\u30c6\u30e0\u306e\u8ca0\u8377\u3092\u9855\u8457\u306b\u6e1b\u3089\u3059\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u65e5\u4ed8\u578b\uff08date\u578b\uff09\u306e\u30d5\u30a3\u30fc\u30eb\u30c9 ymd \u3092\u30ad\u30fc\u3068\u3057\u3066\u5e74\u5358\u4f4d\u3067\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u308b pt \u306b\u5bfe\u3057\u3066\u3001JOIN\u3068GROUP BY\u3092\u542b\u3080\u30af\u30a8\u30ea\u3092\u6295\u5165\u3057\u305f\u6642\u306e\u5b9f\u884c\u8a08\u753b\u3067\u3059\u3002 \u691c\u7d22\u6761\u4ef6\u306b\u3088\u308a2016\u5e74\u4ee5\u524d\u306e\u30c7\u30fc\u30bf\u3092\u542b\u3080\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u306f\u81ea\u660e\u306b\u6392\u9664\u3055\u308c\u3001\u3055\u3089\u306b pt_2017 \u3001 pt_2018 \u3001 pt_2019 \u5404\u30c6\u30fc\u30d6\u30eb\u306eJOIN\u3068GROUP BY\u51e6\u7406\u304c\u4e00\u4f53\u3068\u306a\u3063\u3066 Append \u306e\u524d\u306b\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 # EXPLAIN SELECT cat,count(*),avg(ax) FROM pt NATURAL JOIN t1 WHERE ymd > '2017-01-01'::date GROUP BY cat; QUERY PLAN -------------------------------------------------------------------------------- HashAggregate (cost=196410.07..196412.57 rows=200 width=48) Group Key: pt_2017.cat -> Gather (cost=66085.69..196389.07 rows=1200 width=72) Workers Planned: 2 -> Parallel Append (cost=65085.69..195269.07 rows=600 width=72) -> Parallel Custom Scan (GpuPreAgg) (cost=65085.69..65089.69 rows=200 width=72) Reduction: Local Combined GpuJoin: enabled -> Parallel Custom Scan (GpuJoin) on pt_2017 (cost=32296.64..74474.20 rows=1050772 width=40) Outer Scan: pt_2017 (cost=28540.80..66891.11 rows=1050772 width=36) Outer Scan Filter: (ymd > '2017-01-01'::date) Depth 1: GpuHashJoin (nrows 1050772...2521854) HashKeys: pt_2017.aid JoinQuals: (pt_2017.aid = t1.aid) KDS-Hash (size: 10.78MB) -> Seq Scan on t1 (cost=0.00..1935.00 rows=100000 width=12) -> Parallel Custom Scan (GpuPreAgg) (cost=65078.35..65082.35 rows=200 width=72) Reduction: Local Combined GpuJoin: enabled -> Parallel Custom Scan (GpuJoin) on pt_2018 (cost=32296.65..74465.75 rows=1050649 width=40) Outer Scan: pt_2018 (cost=28540.81..66883.43 rows=1050649 width=36) Outer Scan Filter: (ymd > '2017-01-01'::date) Depth 1: GpuHashJoin (nrows 1050649...2521557) HashKeys: pt_2018.aid JoinQuals: (pt_2018.aid = t1.aid) KDS-Hash (size: 10.78MB) -> Seq Scan on t1 (cost=0.00..1935.00 rows=100000 width=12) -> Parallel Custom Scan (GpuPreAgg) (cost=65093.03..65097.03 rows=200 width=72) Reduction: Local Combined GpuJoin: enabled -> Parallel Custom Scan (GpuJoin) on pt_2019 (cost=32296.65..74482.64 rows=1050896 width=40) Outer Scan: pt_2019 (cost=28540.80..66898.79 rows=1050896 width=36) Outer Scan Filter: (ymd > '2017-01-01'::date) Depth 1: GpuHashJoin (nrows 1050896...2522151) HashKeys: pt_2019.aid JoinQuals: (pt_2019.aid = t1.aid) KDS-Hash (size: 10.78MB) -> Seq Scan on t1 (cost=0.00..1935.00 rows=100000 width=12) (38 rows) \u8a2d\u5b9a\u3068\u904b\u7528 \u4ee5\u4e0b\u306eGUC\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3088\u308a\u3001PG-Strom\u306fJOIN\u3084GROUP BY\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u3078\u306e\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3092\u5236\u5fa1\u3057\u307e\u3059\u3002 \u30d1\u30e9\u30e1\u30fc\u30bf\u540d \u578b \u521d\u671f\u5024 \u8aac\u660e pg_strom.enable_partitionwise_gpujoin bool on GpuJoin\u3092\u5404\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u8981\u7d20\u3078\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002PostgreSQL v10\u4ee5\u964d\u3067\u306e\u307f\u5bfe\u5fdc\u3002 pg_strom.enable_partitionwise_gpupreagg bool on GpuPreAgg\u3092\u5404\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u8981\u7d20\u3078\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002PostgreSQL v10\u4ee5\u964d\u3067\u306e\u307f\u5bfe\u5fdc\u3002 \u3053\u308c\u3089\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u521d\u671f\u5024\u306f on \u3067\u3059\u304c\u3001\u3053\u308c\u3092 off \u306b\u3057\u305f\u5834\u5408\u3001\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u51e6\u7406\u306f\u884c\u308f\u308c\u307e\u305b\u3093\u3002 EXPLAIN\u30b3\u30de\u30f3\u30c9\u3067\u524d\u7bc0\u306e\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u8a08\u753b\u3092\u8868\u793a\u3057\u305f\u3068\u3053\u308d\u3001\u5b9f\u884c\u8a08\u753b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u5316\u3057\u3066\u3044\u307e\u3059\u3002 \u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u306b\u306f GpuScan \u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u305d\u306e\u51e6\u7406\u7d50\u679c\u306f\u4e00\u5ea6\u30db\u30b9\u30c8\u30b7\u30b9\u30c6\u30e0\u306b\u8fd4\u3055\u308c\u3001 Append \u306b\u3088\u3063\u3066\u7d50\u5408\u3055\u308c\u305f\u5f8c\u3001\u518d\u3073 GpuJoin \u3092\u51e6\u7406\u3059\u308b\u305f\u3081\u306bGPU\u3078\u3068\u8ee2\u9001\u3055\u308c\u307e\u3059\u3002 postgres=# set pg_strom.enable_partitionwise_gpujoin = off; SET postgres=# set pg_strom.enable_partitionwise_gpupreagg = off; SET postgres=# EXPLAIN SELECT cat,count(*),avg(ax) FROM pt NATURAL JOIN t1 WHERE ymd > '2017-01-01'::date group by cat; QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------- Finalize GroupAggregate (cost=341392.92..341399.42 rows=200 width=48) Group Key: pt.cat -> Sort (cost=341392.92..341393.92 rows=400 width=72) Sort Key: pt.cat -> Gather (cost=341333.63..341375.63 rows=400 width=72) Workers Planned: 2 -> Partial HashAggregate (cost=340333.63..340335.63 rows=200 width=72) Group Key: pt.cat -> Parallel Custom Scan (GpuJoin) (cost=283591.92..283591.92 rows=7565562 width=40) Depth 1: GpuHashJoin (nrows 3152318...7565562) HashKeys: pt.aid JoinQuals: (pt.aid = t1.aid) KDS-Hash (size: 10.78MB) -> Append (cost=28540.80..200673.34 rows=3152318 width=36) -> Parallel Custom Scan (GpuScan) on pt_2017 (cost=28540.80..66891.11 rows=1050772 width=36) GPU Filter: (ymd > '2017-01-01'::date) -> Parallel Custom Scan (GpuScan) on pt_2018 (cost=28540.81..66883.43 rows=1050649 width=36) GPU Filter: (ymd > '2017-01-01'::date) -> Parallel Custom Scan (GpuScan) on pt_2019 (cost=28540.80..66898.79 rows=1050896 width=36) GPU Filter: (ymd > '2017-01-01'::date) -> Seq Scan on t1 (cost=0.00..1935.00 rows=100000 width=12) (21 rows) SSD\u3068GPU\u306e\u914d\u7f6e\u306b\u95a2\u3059\u308b\u8003\u616e PostgreSQL\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u3068SSD-to-GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u3092\u4f75\u7528\u3059\u308b\u5834\u5408\u3001\u5404\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u304c\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u3092\u4fdd\u5b58\u3059\u308bNVMe-SSD\u30b9\u30c8\u30ec\u30fc\u30b8\u306e\u7269\u7406\u7684\u306a\u914d\u7f6e\u306b\u306f\u7279\u306b\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002 \u5236\u9650\u4e8b\u9805 \u5b9f\u9a13\u7684\u6a5f\u80fd GpuJoin\u3068GpuPreAgg\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u3078\u306e\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u306f\u3001\u73fe\u6642\u70b9\u3067\u306f\u5b9f\u9a13\u7684\u306a\u6a5f\u80fd\u3067\u3042\u308a\u3001\u4e88\u671f\u305b\u306c\u4e0d\u5177\u5408\u3084\u30af\u30e9\u30c3\u30b7\u30e5\u3092\u5f15\u304d\u8d77\u3053\u3059\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 \u305d\u306e\u5834\u5408\u306f pg_strom.enable_partitionwise_gpujoin \u3084 pg_strom.enable_partitionwise_gpupreagg \u3092\u7528\u3044\u3066\u5f53\u8a72\u6a5f\u80fd\u3092\u7121\u52b9\u5316\u3059\u308b\u3068\u5171\u306b\u3001 PG-Strom Issues \u3078\u969c\u5bb3\u30ec\u30dd\u30fc\u30c8\u3092\u304a\u9858\u3044\u3057\u307e\u3059\u3002","title":"\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3"},{"location":"partition/#_1","text":"\u672c\u7ae0\u3067\u306fPostgreSQL\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u6a5f\u80fd\u3068PG-Strom\u3092\u4f75\u7528\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u306a\u304a\u3001\u672c\u7ae0\u306e\u5185\u5bb9\u306f PostgreSQL v11\u4ee5\u964d \u3067PG-Strom\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306b\u306e\u307f\u6709\u52b9\u3067\u3059\u3002 PostgreSQL\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u6a5f\u80fd\u306b\u3064\u3044\u3066\u3001\u8a73\u3057\u304f\u306f PostgreSQL\u6587\u66f8\uff1a\u30c6\u30fc\u30d6\u30eb\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0 \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002","title":"\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3"},{"location":"partition/#_2","text":"PostgreSQL v10\u306b\u304a\u3044\u3066\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u6a5f\u80fd\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u307e\u3057\u305f\u3002 \u3053\u308c\u306f\u3001\u8ad6\u7406\u7684\u306b\u306f\u4e00\u500b\u306e\u5927\u304d\u306a\u30c6\u30fc\u30d6\u30eb\u3067\u3042\u308b\u3082\u306e\u3092\u7269\u7406\u7684\u306b\u3088\u308a\u5c0f\u3055\u306a\u30c6\u30fc\u30d6\u30eb\u306b\u5206\u5272\u3057\u3066\u683c\u7d0d\u3059\u308b\u4ed5\u7d44\u307f\u3067\u3001\u691c\u7d22\u6761\u4ef6\u3088\u308a\u660e\u3089\u304b\u306b\u30b9\u30ad\u30e3\u30f3\u306e\u5fc5\u8981\u304c\u306a\u3044\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30c3\u30d7\u3057\u305f\u308a\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u7269\u7406\u7684\u306b\u5206\u6563\u3055\u305b\u308b\u4e8b\u3067\u3088\u308a\u5e83\u3044I/O\u5e2f\u57df\u3092\u78ba\u4fdd\u3059\u308b\u306a\u3069\u306e\u5229\u70b9\u304c\u3042\u308a\u307e\u3059\u3002 PostgreSQL v10\u3067\u306f\u7bc4\u56f2\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u3001\u30ea\u30b9\u30c8\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u306e2\u7a2e\u985e\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3001\u3055\u3089\u306bPostgreSQL v11\u3067\u306f\u30cf\u30c3\u30b7\u30e5\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u306b\u52a0\u3048\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u540c\u58eb\u306eJOIN\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u56f3\u306f\u3001\u65e5\u4ed8\u578b\uff08DATE\u578b\uff09\u306e\u30ad\u30fc\u5024\u3092\u7528\u3044\u305f\u7bc4\u56f2\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002 \u30ad\u30fc\u5024 2018-05-30 \u3092\u6301\u3064\u30ec\u30b3\u30fc\u30c9\u306f\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb tbl_2018 \u306b\u632f\u308a\u5206\u3051\u3089\u308c\u3001\u540c\u69d8\u306b\u3001\u30ad\u30fc\u5024 2014-03-21 \u3092\u6301\u3064\u30ec\u30b3\u30fc\u30c9\u306f\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb tbl_2014 \u306b\u632f\u308a\u5206\u3051\u3089\u308c\u308b\u30fb\u30fb\u30fb\u3068\u3044\u3063\u305f\u5177\u5408\u3067\u3059\u3002 \u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u6642\u3001\u4f8b\u3048\u3070 WHERE ymd > '2016-07-01'::date \u3068\u3044\u3046\u6761\u4ef6\u53e5\u304c\u4ed8\u52a0\u3055\u308c\u3066\u3044\u308b\u3068\u3001 tbl_2014 \u304a\u3088\u3073 tbl_2015 \u306b\u8a72\u5f53\u3059\u308b\u30ec\u30b3\u30fc\u30c9\u304c\u5b58\u5728\u3057\u306a\u3044\u4e8b\u306f\u81ea\u660e\u3067\u3059\u306e\u3067\u3001PostgreSQL\u306e\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306f tbl_2016 \u3001 tbl_2017 \u3001 tbl_2018 \u3060\u3051\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u3001\u305d\u306e\u7d50\u679c\u3092\u7d50\u5408\u3059\u308b Append \u30ce\u30fc\u30c9\u3092\u631f\u3080\u4e8b\u3067\u3001\u3042\u305f\u304b\u3082\u5358\u4e00\u306e\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u30ec\u30b3\u30fc\u30c9\u3092\u8aad\u307f\u51fa\u3057\u305f\u304b\u306e\u3088\u3046\u306b\u632f\u821e\u3046\u5b9f\u884c\u8a08\u753b\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 PostgreSQL\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u3068PG-Strom\u3092\u4f75\u7528\u3059\u308b\u5834\u5408\u3001\u307e\u305a\u3001\u30b9\u30ad\u30e3\u30f3\u304c\u5fc5\u8981\u3067\u3042\u308b\u3068\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u304c\u5224\u65ad\u3057\u305f\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u306b\u5bfe\u3057\u3001\u500b\u3005\u306b\u5b9f\u884c\u30b3\u30b9\u30c8\u3092\u63a8\u5b9a\u3057\u305f\u4e0a\u3067 GpuScan \u304c\u9078\u629e\u3055\u308c\u308b\u4e8b\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001 GpuScan \u306e\u5b9f\u884c\u7d50\u679c\u3092 Append \u30ce\u30fc\u30c9\u3067\u675f\u306d\u308b\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002 \u305f\u3060\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u306b\u7d9a\u304d\u3001JOIN\u3084GROUP BY\u306a\u3069PG-Strom\u3067\u9ad8\u901f\u5316\u304c\u53ef\u80fd\u306a\u51e6\u7406\u3092\u5b9f\u884c\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u6700\u9069\u5316\u306e\u89b3\u70b9\u304b\u3089\u691c\u8a0e\u304c\u5fc5\u8981\u3067\u3059\u3002 \u4f8b\u3048\u3070\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u3055\u308c\u3066\u3044\u306a\u3044\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u3066\u5225\u306e\u30c6\u30fc\u30d6\u30eb\u3068JOIN\u3057\u3001GROUP BY\u306b\u3088\u308b\u96c6\u8a08\u7d50\u679c\u3092\u51fa\u529b\u3059\u308b\u5834\u5408\u3001\u6761\u4ef6\u304c\u63c3\u3048\u3070\u3001\u5404\u30b9\u30c6\u30c3\u30d7\u9593\u306e\u30c7\u30fc\u30bf\u4ea4\u63db\u306fGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u3067\u884c\u3046\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306fGPU\u3068CPU\u306e\u9593\u306e\u30c7\u30fc\u30bf\u79fb\u52d5\u3092\u6700\u5c0f\u5316\u3059\u308b\u3068\u3044\u3046\u89b3\u70b9\u304b\u3089\u3001\u6700\u3082PG-Strom\u304c\u5f97\u610f\u3068\u3059\u308b\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3067\u3059\u3002 \u4e00\u65b9\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u540c\u69d8\u306e\u51e6\u7406\u3092\u884c\u3046\u5834\u5408\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u3068JOIN\u3084GROUP BY\u306e\u9593\u306b Append \u51e6\u7406\u304c\u631f\u307e\u3063\u3066\u3057\u307e\u3046\u306e\u304c\u8ab2\u984c\u3067\u3059\u3002\u3053\u306e\u5b9f\u884c\u8a08\u753b\u306e\u4e0b\u3067\u306f\u3001GpuScan\u304c\u51e6\u7406\u3057\u305f\u30c7\u30fc\u30bf\u3092\u4e00\u5ea6\u30db\u30b9\u30c8\u30b7\u30b9\u30c6\u30e0\u3078\u8ee2\u9001\u3057\u3001 Append \u51e6\u7406\u3092\u884c\u3063\u305f\u4e0a\u3067\u3001\u305d\u306e\u5f8c\u306eGpuJoin\u3084GpuPreAgg\u51e6\u7406\u3092\u884c\u3046\u305f\u3081\u306b\u518d\u3073\u30c7\u30fc\u30bf\u3092GPU\u3078\u8ee2\u9001\u3059\u308b\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u6c7a\u3057\u3066\u52b9\u7387\u306e\u826f\u3044\u51e6\u7406\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u3053\u306e\u3088\u3046\u306aCPU-GPU\u9593\u306e\u30c7\u30fc\u30bf\u306e\u30d4\u30f3\u30dd\u30f3\u3092\u907f\u3051\u308b\u305f\u3081\u3001PG-Strom\u306f\u53ef\u80fd\u306a\u9650\u308aJOIN\u3084GROUP BY\u3092 Append \u3088\u308a\u3082\u5148\u306b\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3092\u8a66\u307f\u307e\u3059\u3002 \u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u304c\u6210\u529f\u308c\u3070\u3001\u30c7\u30fc\u30bf\u4ea4\u63db\u3092\u52b9\u7387\u5316\u3067\u304d\u308b\u3060\u3051\u3067\u306a\u304f\u3001\u7279\u306bGROUP BY\u51e6\u7406\u306b\u3088\u3063\u3066\u884c\u6570\u3092\u5927\u5e45\u306b\u524a\u6e1b\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308b\u305f\u3081\u3001 Append \u51e6\u7406\u3092\u5b9f\u884c\u3059\u308b\u30db\u30b9\u30c8\u30b7\u30b9\u30c6\u30e0\u306e\u8ca0\u8377\u3092\u9855\u8457\u306b\u6e1b\u3089\u3059\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u65e5\u4ed8\u578b\uff08date\u578b\uff09\u306e\u30d5\u30a3\u30fc\u30eb\u30c9 ymd \u3092\u30ad\u30fc\u3068\u3057\u3066\u5e74\u5358\u4f4d\u3067\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u308b pt \u306b\u5bfe\u3057\u3066\u3001JOIN\u3068GROUP BY\u3092\u542b\u3080\u30af\u30a8\u30ea\u3092\u6295\u5165\u3057\u305f\u6642\u306e\u5b9f\u884c\u8a08\u753b\u3067\u3059\u3002 \u691c\u7d22\u6761\u4ef6\u306b\u3088\u308a2016\u5e74\u4ee5\u524d\u306e\u30c7\u30fc\u30bf\u3092\u542b\u3080\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u306f\u81ea\u660e\u306b\u6392\u9664\u3055\u308c\u3001\u3055\u3089\u306b pt_2017 \u3001 pt_2018 \u3001 pt_2019 \u5404\u30c6\u30fc\u30d6\u30eb\u306eJOIN\u3068GROUP BY\u51e6\u7406\u304c\u4e00\u4f53\u3068\u306a\u3063\u3066 Append \u306e\u524d\u306b\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 # EXPLAIN SELECT cat,count(*),avg(ax) FROM pt NATURAL JOIN t1 WHERE ymd > '2017-01-01'::date GROUP BY cat; QUERY PLAN -------------------------------------------------------------------------------- HashAggregate (cost=196410.07..196412.57 rows=200 width=48) Group Key: pt_2017.cat -> Gather (cost=66085.69..196389.07 rows=1200 width=72) Workers Planned: 2 -> Parallel Append (cost=65085.69..195269.07 rows=600 width=72) -> Parallel Custom Scan (GpuPreAgg) (cost=65085.69..65089.69 rows=200 width=72) Reduction: Local Combined GpuJoin: enabled -> Parallel Custom Scan (GpuJoin) on pt_2017 (cost=32296.64..74474.20 rows=1050772 width=40) Outer Scan: pt_2017 (cost=28540.80..66891.11 rows=1050772 width=36) Outer Scan Filter: (ymd > '2017-01-01'::date) Depth 1: GpuHashJoin (nrows 1050772...2521854) HashKeys: pt_2017.aid JoinQuals: (pt_2017.aid = t1.aid) KDS-Hash (size: 10.78MB) -> Seq Scan on t1 (cost=0.00..1935.00 rows=100000 width=12) -> Parallel Custom Scan (GpuPreAgg) (cost=65078.35..65082.35 rows=200 width=72) Reduction: Local Combined GpuJoin: enabled -> Parallel Custom Scan (GpuJoin) on pt_2018 (cost=32296.65..74465.75 rows=1050649 width=40) Outer Scan: pt_2018 (cost=28540.81..66883.43 rows=1050649 width=36) Outer Scan Filter: (ymd > '2017-01-01'::date) Depth 1: GpuHashJoin (nrows 1050649...2521557) HashKeys: pt_2018.aid JoinQuals: (pt_2018.aid = t1.aid) KDS-Hash (size: 10.78MB) -> Seq Scan on t1 (cost=0.00..1935.00 rows=100000 width=12) -> Parallel Custom Scan (GpuPreAgg) (cost=65093.03..65097.03 rows=200 width=72) Reduction: Local Combined GpuJoin: enabled -> Parallel Custom Scan (GpuJoin) on pt_2019 (cost=32296.65..74482.64 rows=1050896 width=40) Outer Scan: pt_2019 (cost=28540.80..66898.79 rows=1050896 width=36) Outer Scan Filter: (ymd > '2017-01-01'::date) Depth 1: GpuHashJoin (nrows 1050896...2522151) HashKeys: pt_2019.aid JoinQuals: (pt_2019.aid = t1.aid) KDS-Hash (size: 10.78MB) -> Seq Scan on t1 (cost=0.00..1935.00 rows=100000 width=12) (38 rows)","title":"\u6982\u8981"},{"location":"partition/#_3","text":"\u4ee5\u4e0b\u306eGUC\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3088\u308a\u3001PG-Strom\u306fJOIN\u3084GROUP BY\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u3078\u306e\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3092\u5236\u5fa1\u3057\u307e\u3059\u3002 \u30d1\u30e9\u30e1\u30fc\u30bf\u540d \u578b \u521d\u671f\u5024 \u8aac\u660e pg_strom.enable_partitionwise_gpujoin bool on GpuJoin\u3092\u5404\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u8981\u7d20\u3078\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002PostgreSQL v10\u4ee5\u964d\u3067\u306e\u307f\u5bfe\u5fdc\u3002 pg_strom.enable_partitionwise_gpupreagg bool on GpuPreAgg\u3092\u5404\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u8981\u7d20\u3078\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002PostgreSQL v10\u4ee5\u964d\u3067\u306e\u307f\u5bfe\u5fdc\u3002 \u3053\u308c\u3089\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u521d\u671f\u5024\u306f on \u3067\u3059\u304c\u3001\u3053\u308c\u3092 off \u306b\u3057\u305f\u5834\u5408\u3001\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u51e6\u7406\u306f\u884c\u308f\u308c\u307e\u305b\u3093\u3002 EXPLAIN\u30b3\u30de\u30f3\u30c9\u3067\u524d\u7bc0\u306e\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u8a08\u753b\u3092\u8868\u793a\u3057\u305f\u3068\u3053\u308d\u3001\u5b9f\u884c\u8a08\u753b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u5316\u3057\u3066\u3044\u307e\u3059\u3002 \u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u306b\u306f GpuScan \u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u305d\u306e\u51e6\u7406\u7d50\u679c\u306f\u4e00\u5ea6\u30db\u30b9\u30c8\u30b7\u30b9\u30c6\u30e0\u306b\u8fd4\u3055\u308c\u3001 Append \u306b\u3088\u3063\u3066\u7d50\u5408\u3055\u308c\u305f\u5f8c\u3001\u518d\u3073 GpuJoin \u3092\u51e6\u7406\u3059\u308b\u305f\u3081\u306bGPU\u3078\u3068\u8ee2\u9001\u3055\u308c\u307e\u3059\u3002 postgres=# set pg_strom.enable_partitionwise_gpujoin = off; SET postgres=# set pg_strom.enable_partitionwise_gpupreagg = off; SET postgres=# EXPLAIN SELECT cat,count(*),avg(ax) FROM pt NATURAL JOIN t1 WHERE ymd > '2017-01-01'::date group by cat; QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------- Finalize GroupAggregate (cost=341392.92..341399.42 rows=200 width=48) Group Key: pt.cat -> Sort (cost=341392.92..341393.92 rows=400 width=72) Sort Key: pt.cat -> Gather (cost=341333.63..341375.63 rows=400 width=72) Workers Planned: 2 -> Partial HashAggregate (cost=340333.63..340335.63 rows=200 width=72) Group Key: pt.cat -> Parallel Custom Scan (GpuJoin) (cost=283591.92..283591.92 rows=7565562 width=40) Depth 1: GpuHashJoin (nrows 3152318...7565562) HashKeys: pt.aid JoinQuals: (pt.aid = t1.aid) KDS-Hash (size: 10.78MB) -> Append (cost=28540.80..200673.34 rows=3152318 width=36) -> Parallel Custom Scan (GpuScan) on pt_2017 (cost=28540.80..66891.11 rows=1050772 width=36) GPU Filter: (ymd > '2017-01-01'::date) -> Parallel Custom Scan (GpuScan) on pt_2018 (cost=28540.81..66883.43 rows=1050649 width=36) GPU Filter: (ymd > '2017-01-01'::date) -> Parallel Custom Scan (GpuScan) on pt_2019 (cost=28540.80..66898.79 rows=1050896 width=36) GPU Filter: (ymd > '2017-01-01'::date) -> Seq Scan on t1 (cost=0.00..1935.00 rows=100000 width=12) (21 rows)","title":"\u8a2d\u5b9a\u3068\u904b\u7528"},{"location":"partition/#ssdgpu","text":"PostgreSQL\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30cb\u30f3\u30b0\u3068SSD-to-GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u3092\u4f75\u7528\u3059\u308b\u5834\u5408\u3001\u5404\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u304c\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u3092\u4fdd\u5b58\u3059\u308bNVMe-SSD\u30b9\u30c8\u30ec\u30fc\u30b8\u306e\u7269\u7406\u7684\u306a\u914d\u7f6e\u306b\u306f\u7279\u306b\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002","title":"SSD\u3068GPU\u306e\u914d\u7f6e\u306b\u95a2\u3059\u308b\u8003\u616e"},{"location":"partition/#_4","text":"\u5b9f\u9a13\u7684\u6a5f\u80fd GpuJoin\u3068GpuPreAgg\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u3078\u306e\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u306f\u3001\u73fe\u6642\u70b9\u3067\u306f\u5b9f\u9a13\u7684\u306a\u6a5f\u80fd\u3067\u3042\u308a\u3001\u4e88\u671f\u305b\u306c\u4e0d\u5177\u5408\u3084\u30af\u30e9\u30c3\u30b7\u30e5\u3092\u5f15\u304d\u8d77\u3053\u3059\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 \u305d\u306e\u5834\u5408\u306f pg_strom.enable_partitionwise_gpujoin \u3084 pg_strom.enable_partitionwise_gpupreagg \u3092\u7528\u3044\u3066\u5f53\u8a72\u6a5f\u80fd\u3092\u7121\u52b9\u5316\u3059\u308b\u3068\u5171\u306b\u3001 PG-Strom Issues \u3078\u969c\u5bb3\u30ec\u30dd\u30fc\u30c8\u3092\u304a\u9858\u3044\u3057\u307e\u3059\u3002","title":"\u5236\u9650\u4e8b\u9805"},{"location":"postgis/","text":"GPU\u7248PostGIS \u672c\u7ae0\u3067\u306fGPU\u7248PostGIS\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u6982\u8981 PostGIS\u3068\u306f\u3001\u5730\u7406\u7a7a\u9593\u60c5\u5831\u3092\u53d6\u308a\u6271\u3046\u305f\u3081\u306ePostgreSQL\u5411\u3051\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3059\u3002 \u70b9\u3001\u7dda\u5206\u3001\u30dd\u30ea\u30b4\u30f3\u306a\u3069\u5730\u7406\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u6271\u3046\u305f\u3081\u306e\u30c7\u30fc\u30bf\u578b\uff08 Geometry \uff09\u3092\u63d0\u4f9b\u3057\u3066\u3044\u308b\u307b\u304b\u3001\u8ddd\u96e2\u306e\u8a08\u7b97\u3084\u5305\u542b\u3001\u4ea4\u5dee\u95a2\u4fc2\u306e\u5224\u5b9a\u306a\u3069\u3001\u5730\u7406\u30c7\u30fc\u30bf\u8981\u7d20\u3092\u8a55\u4fa1\u3059\u308b\u305f\u3081\u306e\u95a2\u6570\u3084\u6f14\u7b97\u5b50\u3092\u6570\u591a\u304f\u53d6\u308a\u63c3\u3048\u3066\u3044\u307e\u3059\u3002 \u307e\u305f\u3001\u4e00\u90e8\u306e\u6f14\u7b97\u5b50\u306b\u3064\u3044\u3066\u306fPostgreSQL\u306eGiST(Generalized Search Tree)\u306e\u4ed5\u7d44\u307f\u3092\u7528\u3044\u3066R\u6728\u306b\u3088\u308b\u9ad8\u901f\u306a\u691c\u7d22\u3082\u53ef\u80fd\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002 2001\u5e74\u306b\u6700\u521d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u516c\u958b\u3055\u308c\u3066\u4ee5\u964d\u300120\u5e74\u4ee5\u4e0a\u306b\u308f\u305f\u308a\u958b\u767a\u8005\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u306b\u3088\u3063\u3066\u6a5f\u80fd\u5f37\u5316\u3084\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u304c\u884c\u308f\u308c\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u3089PostGIS\u306e\u63d0\u4f9b\u3059\u308b\u95a2\u6570\u3084\u6f14\u7b97\u5b50\u306f\u3001\u7dcf\u6570\u3067500\u3092\u8d85\u3048\u308b\u975e\u5e38\u306b\u5927\u898f\u6a21\u306a\u3082\u306e\u3067\u3059\u3002 \u305d\u306e\u305f\u3081\u3001PG-Strom\u3067\u306f\u6bd4\u8f03\u7684\u5229\u7528\u983b\u5ea6\u306e\u9ad8\u3044\u3044\u304f\u3064\u304b\u306ePostGIS\u95a2\u6570\u3060\u3051\u3092GPU\u7528\u306b\u79fb\u690d\u3057\u3066\u3044\u307e\u3059\u3002 \u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306aPostGIS\u95a2\u6570\u304c\u305d\u308c\u306b\u8a72\u5f53\u3057\u307e\u3059\u3002 geometry st_point(float8 lon,float8 lat) \u7d4c\u5ea6\u7def\u5ea6\u304b\u3089\u3001\u70b9\uff08Point\uff09\u3067\u3042\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u578b\u3092\u751f\u6210\u3059\u308b\u3002 bool st_contains(geometry a,geometry b) \u30b8\u30aa\u30e1\u30c8\u30eaa\u304c\u30b8\u30aa\u30e1\u30c8\u30eab\u304c\u5305\u542b\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5224\u5b9a\u3059\u308b\u3002 bool st_crosses(geometry,geometry) \u30b8\u30aa\u30e1\u30c8\u30ea\u540c\u58eb\u304c\u4ea4\u5dee\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5224\u5b9a\u3059\u308b\u3002 text st_relate(geometry,geometry) \u30b8\u30aa\u30e1\u30c8\u30ea\u540c\u58eb\u306e\u95a2\u4fc2\u3092 DE-9IM(Dimensionally Extended 9-Intersection Model) \u306e\u884c\u5217\u8868\u73fe\u3068\u3057\u3066\u8fd4\u3057\u307e\u3059\u3002 \u307e\u305f\u3001\u30c6\u30fc\u30d6\u30eb\u540c\u58eb\u306e\u7d50\u5408\u6761\u4ef6\u304cGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff08R\u6728\uff09\u306e\u5229\u7528\u306b\u9069\u3059\u308b\u5834\u5408\u3001GpuJoin\u306fGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff08R\u6728\uff09\u3092GPU\u5074\u306b\u30ed\u30fc\u30c9\u3057\u3001\u7d50\u5408\u3059\u3079\u304d\u884c\u306e\u7d5e\u308a\u8fbc\u307f\u3092\u9ad8\u901f\u5316\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u3053\u308c\u306f\u4f8b\u3048\u3070\u3001GPS\u304b\u3089\u53d6\u5f97\u3057\u305f\u30e2\u30d0\u30a4\u30eb\u6a5f\u5668\u306e\u4f4d\u7f6e\uff08\u70b9\uff09\u3068\u30a8\u30ea\u30a2\u5b9a\u7fa9\u30c7\u30fc\u30bf\uff08\u30dd\u30ea\u30b4\u30f3\uff09\u3092\u7a81\u304d\u5408\u308f\u305b\u308b\u3068\u3044\u3063\u305f\u51e6\u7406\u306e\u9ad8\u901f\u5316\u306b\u5bc4\u4e0e\u3057\u307e\u3059\u3002 PostGIS\u306e\u5229\u7528 GPU\u7248PostGIS\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u7279\u5225\u306a\u8a2d\u5b9a\u306f\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002 PostGIS\u3092\u30d1\u30c3\u30b1\u30fc\u30b8\u53c8\u306f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001 CREATE EXTENSION \u69cb\u6587\u3092\u7528\u3044\u3066\u30b8\u30aa\u30e1\u30c8\u30ea\u30c7\u30fc\u30bf\u578b\u3084PostGIS\u95a2\u6570\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308c\u3070\u3001PG-Strom\u306f\u30af\u30a8\u30ea\u306b\u51fa\u73fe\u3057\u305fPostGIS\u95a2\u6570\u304cGPU\u3067\u5b9f\u884c\u53ef\u80fd\u304b\u3069\u3046\u304b\u3092\u81ea\u52d5\u7684\u306b\u5224\u5b9a\u3057\u307e\u3059\u3002 PostGIS\u81ea\u4f53\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u3064\u3044\u3066\u306f\u3001 PostGIS\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8 \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u30af\u30a8\u30ea\u306b\u306fGPU\u5b9f\u884c\u53ef\u80fd\u306aPostGIS\u95a2\u6570\u3067\u3042\u308b st_contains() \u3068 st_makepoint() \u3092\u4f7f\u7528\u3057\u3066\u304a\u308a\u3001\u30b8\u30aa\u30e1\u30c8\u30ea\u578b\u306e\u5b9a\u6570 'polygon ((10 10,30 10,30 20,10 20,10 10))' \u306e\u7bc4\u56f2\u5185\u306b\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u8aad\u307f\u51fa\u3057\u305f\u4e8c\u6b21\u5143\u306e\u70b9\u304c\u542b\u307e\u308c\u308b\u304b\u3069\u3046\u304b\u3092\u5224\u5b9a\u3057\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u95a2\u6570\u304c GPU Filter: \u306e\u4e00\u90e8\u3068\u3057\u3066\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u4e8b\u304b\u3089\u3082\u5206\u304b\u308b\u3088\u3046\u306b\u3001PG-Strom\u306f\u5bfe\u5fdc\u6e08\u307f\u306ePostGIS\u95a2\u6570\u3092\u81ea\u52d5\u7684\u306b\u691c\u51fa\u3057\u3001\u53ef\u80fd\u306a\u9650\u308aGPU\u3067\u5b9f\u884c\u3057\u3088\u3046\u3068\u8a66\u307f\u307e\u3059\u3002 =# explain select * from dpoints where st_contains('polygon ((10 10,30 10,30 20,10 20,10 10))', st_makepoint(x,y)); QUERY PLAN ------------------------------------------------------------------------------------------ Custom Scan (GpuScan) on dpoints (cost=1397205.10..12627630.76 rows=800 width=28) GPU Filter: st_contains('01030000000100000005000000000000000000244000000000000024400000000000003E4000000000000024400000000000003E4000000000000034400000000000002440000000000000344000000000000024400000000000002440'::geometry, st_makepoint(x, y)) GPU Preference: GPU0 (NVIDIA Tesla V100-PCIE-16GB) (3 rows) GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9 st_contains() \u3084 st_crosses() \u306a\u3069\u30b8\u30aa\u30e1\u30c8\u30ea\u540c\u58eb\u306e\u95a2\u4fc2\u6027\u3092\u8a55\u4fa1\u3059\u308bPostGIS\u95a2\u6570\u306e\u4e00\u90e8\u306f\u3001GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff08R\u6728\uff09\u306b\u5bfe\u5fdc\u3057\u3066\u304a\u308a\u3001CPU\u3060\u3051\u3092\u7528\u3044\u3066\u691c\u7d22\u3092\u884c\u3046\u5834\u5408\u306b\u3082\u9ad8\u901f\u306a\u7d5e\u308a\u8fbc\u307f\u3092\u884c\u3046\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 PG-Strom\u306eGpuJoin\u3067\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u540c\u58eb\u306e\u7d50\u5408\u6761\u4ef6\u304cGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff08R\u6728\uff09\u3067\u9ad8\u901f\u5316\u53ef\u80fd\u306a\u5834\u5408\u3001\u7d50\u5408\u5bfe\u8c61\u30c6\u30fc\u30d6\u30eb\u306e\u4e2d\u8eab\u3060\u3051\u3067\u306a\u304f\u3001GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3082\u540c\u6642\u306bGPU\u5074\u3078\u8ee2\u9001\u3057\u3001\u7d50\u5408\u5bfe\u8c61\u306e\u884c\u3092\u9ad8\u901f\u306b\u7d5e\u308a\u8fbc\u3080\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b\u4e8b\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u306e\u51e6\u7406\u306f\u901a\u5e38\u3001CPU\u3088\u308a\u3082\u9065\u304b\u306b\u9ad8\u3044\u4e26\u5217\u5ea6\u3067\u5b9f\u884c\u3055\u308c\u308b\u305f\u3081\u3001\u304b\u306a\u308a\u306e\u9ad8\u901f\u5316\u3092\u671f\u5f85\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4e00\u65b9\u3001GpuScan\u306f\u30c6\u30fc\u30d6\u30eb\u5358\u4f53\u306e\u30b9\u30ad\u30e3\u30f3\u306bGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u307e\u305b\u3093\u3002\u3053\u308c\u306f\u3001CPU\u306b\u3088\u308bIndexScan\u3067\u306e\u7d5e\u308a\u8fbc\u307f\u306e\u65b9\u304c\u9ad8\u901f\u3067\u3042\u308b\u4e8b\u304c\u591a\u3044\u304b\u3089\u3067\u3059\u3002 \u30b8\u30aa\u30e1\u30c8\u30ea\u30c7\u30fc\u30bf\u306bGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u8a2d\u5b9a\u3059\u308b\u306b\u306f\u3001 CREATE INDEX \u69cb\u6587\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u5e02\u753a\u6751\u306e\u5883\u754c\u7dda\u30c7\u30fc\u30bf\uff08giscity\u30c6\u30fc\u30d6\u30eb\u306egeom\u5217\uff09\u306b\u5bfe\u3057\u3066GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u8a2d\u5b9a\u3059\u308b\u3082\u306e\u3067\u3059\u3002 =# CREATE INDEX on giscity USING gist (geom); CREATE INDEX \u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u306f\u3001\u5e02\u753a\u6751\u306e\u5883\u754c\u7dda\u30c7\u30fc\u30bf\uff08giscity\u30c6\u30fc\u30d6\u30eb\uff09\u3068\u7def\u5ea6\u7d4c\u5ea6\u30c7\u30fc\u30bf\uff08dpoints\u30c6\u30fc\u30d6\u30eb\uff09\u3092\u7a81\u304d\u5408\u308f\u305b\u3001\u30dd\u30ea\u30b4\u30f3\u3068\u3057\u3066\u8868\u73fe\u3055\u308c\u305f\u5e02\u753a\u6751\u306e\u9818\u57df\u5185\u306b\u542b\u307e\u308c\u308b\u7def\u5ea6\u7d4c\u5ea6\u30c7\u30fc\u30bf\uff08\u70b9\uff09\u306e\u6570\u3092\u5e02\u753a\u6751\u3054\u3068\u306b\u51fa\u529b\u3059\u308b\u3082\u306e\u3067\u3059\u3002 \u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306b\u3088\u308aGpuJoin\u304c\u9078\u629e\u3055\u308c\u3001giscity\u30c6\u30fc\u30d6\u30eb\u3068dpoints\u30c6\u30fc\u30d6\u30eb\u306e\u7d50\u5408\u306b\u306fGpuGiSTJoin\u304c\u9078\u629e\u3055\u308c\u3066\u3044\u307e\u3059\u3002 IndexFilter:\u306e\u884c\u306b\u306f\u3001GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u3088\u308b\u7d5e\u308a\u8fbc\u307f\u6761\u4ef6\u304c (g.geom ~ st_makepoint(d.x, d.y)) \u3067\u3042\u308a\u3001\u4f7f\u7528\u3059\u308b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c giscity_geom_idx \u3067\u3042\u308b\u4e8b\u304c\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002 GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u4f7f\u7528\u306b\u3088\u308a\u3001GPU\u3067\u3042\u3063\u3066\u3082\u6bd4\u8f03\u7684\u300c\u91cd\u3044\u300d\u51e6\u7406\u3067\u3042\u308bPostGIS\u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u524d\u306b\u3001\u660e\u3089\u304b\u306b\u6761\u4ef6\u306b\u30de\u30c3\u30c1\u3057\u306a\u3044\u7d44\u307f\u5408\u308f\u305b\u3092\u6392\u9664\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u305f\u3081\u3001\u5927\u5e45\u306a\u691c\u7d22\u51e6\u7406\u306e\u9ad8\u901f\u5316\u304c\u671f\u5f85\u3067\u304d\u307e\u3059\u3002 =# EXPLAIN SELECT pref, city, count(*) FROM giscity g, dpoints d WHERE pref = 'Tokyo' AND st_contains(g.geom,st_makepoint(d.x, d.y)) GROUP BY pref, city; QUERY PLAN ----------------------------------------------------------------------------------------------------------- GroupAggregate (cost=5700646.35..5700759.39 rows=5024 width=29) Group Key: g.n03_001, g.n03_004 -> Sort (cost=5700646.35..5700658.91 rows=5024 width=29) Sort Key: g.n03_004 -> Custom Scan (GpuPreAgg) (cost=5700274.71..5700337.51 rows=5024 width=29) Reduction: Local Combined GpuJoin: enabled GPU Preference: GPU0 (NVIDIA Tesla V100-PCIE-16GB) -> Custom Scan (GpuJoin) on dpoints d (cost=638671.58..5668511.23 rows=50821573 width=21) Outer Scan: dpoints d (cost=0.00..141628.18 rows=7999618 width=16) Depth 1: GpuGiSTJoin(nrows 7999618...50821573) HeapSize: 3251.36KB IndexFilter: (g.geom ~ st_makepoint(d.x, d.y)) on giscity_geom_idx JoinQuals: st_contains(g.geom, st_makepoint(d.x, d.y)) GPU Preference: GPU0 (NVIDIA Tesla V100-PCIE-16GB) -> Seq Scan on giscity g (cost=0.00..8929.24 rows=6353 width=1883) Filter: ((pref)::text = 'Tokyo'::text) (17 rows)","title":"GPU\u7248PostGIS"},{"location":"postgis/#gpupostgis","text":"\u672c\u7ae0\u3067\u306fGPU\u7248PostGIS\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002","title":"GPU\u7248PostGIS"},{"location":"postgis/#_1","text":"PostGIS\u3068\u306f\u3001\u5730\u7406\u7a7a\u9593\u60c5\u5831\u3092\u53d6\u308a\u6271\u3046\u305f\u3081\u306ePostgreSQL\u5411\u3051\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3059\u3002 \u70b9\u3001\u7dda\u5206\u3001\u30dd\u30ea\u30b4\u30f3\u306a\u3069\u5730\u7406\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u6271\u3046\u305f\u3081\u306e\u30c7\u30fc\u30bf\u578b\uff08 Geometry \uff09\u3092\u63d0\u4f9b\u3057\u3066\u3044\u308b\u307b\u304b\u3001\u8ddd\u96e2\u306e\u8a08\u7b97\u3084\u5305\u542b\u3001\u4ea4\u5dee\u95a2\u4fc2\u306e\u5224\u5b9a\u306a\u3069\u3001\u5730\u7406\u30c7\u30fc\u30bf\u8981\u7d20\u3092\u8a55\u4fa1\u3059\u308b\u305f\u3081\u306e\u95a2\u6570\u3084\u6f14\u7b97\u5b50\u3092\u6570\u591a\u304f\u53d6\u308a\u63c3\u3048\u3066\u3044\u307e\u3059\u3002 \u307e\u305f\u3001\u4e00\u90e8\u306e\u6f14\u7b97\u5b50\u306b\u3064\u3044\u3066\u306fPostgreSQL\u306eGiST(Generalized Search Tree)\u306e\u4ed5\u7d44\u307f\u3092\u7528\u3044\u3066R\u6728\u306b\u3088\u308b\u9ad8\u901f\u306a\u691c\u7d22\u3082\u53ef\u80fd\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002 2001\u5e74\u306b\u6700\u521d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u516c\u958b\u3055\u308c\u3066\u4ee5\u964d\u300120\u5e74\u4ee5\u4e0a\u306b\u308f\u305f\u308a\u958b\u767a\u8005\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u306b\u3088\u3063\u3066\u6a5f\u80fd\u5f37\u5316\u3084\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u304c\u884c\u308f\u308c\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u3089PostGIS\u306e\u63d0\u4f9b\u3059\u308b\u95a2\u6570\u3084\u6f14\u7b97\u5b50\u306f\u3001\u7dcf\u6570\u3067500\u3092\u8d85\u3048\u308b\u975e\u5e38\u306b\u5927\u898f\u6a21\u306a\u3082\u306e\u3067\u3059\u3002 \u305d\u306e\u305f\u3081\u3001PG-Strom\u3067\u306f\u6bd4\u8f03\u7684\u5229\u7528\u983b\u5ea6\u306e\u9ad8\u3044\u3044\u304f\u3064\u304b\u306ePostGIS\u95a2\u6570\u3060\u3051\u3092GPU\u7528\u306b\u79fb\u690d\u3057\u3066\u3044\u307e\u3059\u3002 \u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306aPostGIS\u95a2\u6570\u304c\u305d\u308c\u306b\u8a72\u5f53\u3057\u307e\u3059\u3002 geometry st_point(float8 lon,float8 lat) \u7d4c\u5ea6\u7def\u5ea6\u304b\u3089\u3001\u70b9\uff08Point\uff09\u3067\u3042\u308b\u30b8\u30aa\u30e1\u30c8\u30ea\u578b\u3092\u751f\u6210\u3059\u308b\u3002 bool st_contains(geometry a,geometry b) \u30b8\u30aa\u30e1\u30c8\u30eaa\u304c\u30b8\u30aa\u30e1\u30c8\u30eab\u304c\u5305\u542b\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5224\u5b9a\u3059\u308b\u3002 bool st_crosses(geometry,geometry) \u30b8\u30aa\u30e1\u30c8\u30ea\u540c\u58eb\u304c\u4ea4\u5dee\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5224\u5b9a\u3059\u308b\u3002 text st_relate(geometry,geometry) \u30b8\u30aa\u30e1\u30c8\u30ea\u540c\u58eb\u306e\u95a2\u4fc2\u3092 DE-9IM(Dimensionally Extended 9-Intersection Model) \u306e\u884c\u5217\u8868\u73fe\u3068\u3057\u3066\u8fd4\u3057\u307e\u3059\u3002 \u307e\u305f\u3001\u30c6\u30fc\u30d6\u30eb\u540c\u58eb\u306e\u7d50\u5408\u6761\u4ef6\u304cGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff08R\u6728\uff09\u306e\u5229\u7528\u306b\u9069\u3059\u308b\u5834\u5408\u3001GpuJoin\u306fGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff08R\u6728\uff09\u3092GPU\u5074\u306b\u30ed\u30fc\u30c9\u3057\u3001\u7d50\u5408\u3059\u3079\u304d\u884c\u306e\u7d5e\u308a\u8fbc\u307f\u3092\u9ad8\u901f\u5316\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u3053\u308c\u306f\u4f8b\u3048\u3070\u3001GPS\u304b\u3089\u53d6\u5f97\u3057\u305f\u30e2\u30d0\u30a4\u30eb\u6a5f\u5668\u306e\u4f4d\u7f6e\uff08\u70b9\uff09\u3068\u30a8\u30ea\u30a2\u5b9a\u7fa9\u30c7\u30fc\u30bf\uff08\u30dd\u30ea\u30b4\u30f3\uff09\u3092\u7a81\u304d\u5408\u308f\u305b\u308b\u3068\u3044\u3063\u305f\u51e6\u7406\u306e\u9ad8\u901f\u5316\u306b\u5bc4\u4e0e\u3057\u307e\u3059\u3002","title":"\u6982\u8981"},{"location":"postgis/#postgis","text":"GPU\u7248PostGIS\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u7279\u5225\u306a\u8a2d\u5b9a\u306f\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002 PostGIS\u3092\u30d1\u30c3\u30b1\u30fc\u30b8\u53c8\u306f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001 CREATE EXTENSION \u69cb\u6587\u3092\u7528\u3044\u3066\u30b8\u30aa\u30e1\u30c8\u30ea\u30c7\u30fc\u30bf\u578b\u3084PostGIS\u95a2\u6570\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308c\u3070\u3001PG-Strom\u306f\u30af\u30a8\u30ea\u306b\u51fa\u73fe\u3057\u305fPostGIS\u95a2\u6570\u304cGPU\u3067\u5b9f\u884c\u53ef\u80fd\u304b\u3069\u3046\u304b\u3092\u81ea\u52d5\u7684\u306b\u5224\u5b9a\u3057\u307e\u3059\u3002 PostGIS\u81ea\u4f53\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u3064\u3044\u3066\u306f\u3001 PostGIS\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8 \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u30af\u30a8\u30ea\u306b\u306fGPU\u5b9f\u884c\u53ef\u80fd\u306aPostGIS\u95a2\u6570\u3067\u3042\u308b st_contains() \u3068 st_makepoint() \u3092\u4f7f\u7528\u3057\u3066\u304a\u308a\u3001\u30b8\u30aa\u30e1\u30c8\u30ea\u578b\u306e\u5b9a\u6570 'polygon ((10 10,30 10,30 20,10 20,10 10))' \u306e\u7bc4\u56f2\u5185\u306b\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u8aad\u307f\u51fa\u3057\u305f\u4e8c\u6b21\u5143\u306e\u70b9\u304c\u542b\u307e\u308c\u308b\u304b\u3069\u3046\u304b\u3092\u5224\u5b9a\u3057\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u95a2\u6570\u304c GPU Filter: \u306e\u4e00\u90e8\u3068\u3057\u3066\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u4e8b\u304b\u3089\u3082\u5206\u304b\u308b\u3088\u3046\u306b\u3001PG-Strom\u306f\u5bfe\u5fdc\u6e08\u307f\u306ePostGIS\u95a2\u6570\u3092\u81ea\u52d5\u7684\u306b\u691c\u51fa\u3057\u3001\u53ef\u80fd\u306a\u9650\u308aGPU\u3067\u5b9f\u884c\u3057\u3088\u3046\u3068\u8a66\u307f\u307e\u3059\u3002 =# explain select * from dpoints where st_contains('polygon ((10 10,30 10,30 20,10 20,10 10))', st_makepoint(x,y)); QUERY PLAN ------------------------------------------------------------------------------------------ Custom Scan (GpuScan) on dpoints (cost=1397205.10..12627630.76 rows=800 width=28) GPU Filter: st_contains('01030000000100000005000000000000000000244000000000000024400000000000003E4000000000000024400000000000003E4000000000000034400000000000002440000000000000344000000000000024400000000000002440'::geometry, st_makepoint(x, y)) GPU Preference: GPU0 (NVIDIA Tesla V100-PCIE-16GB) (3 rows)","title":"PostGIS\u306e\u5229\u7528"},{"location":"postgis/#gist","text":"st_contains() \u3084 st_crosses() \u306a\u3069\u30b8\u30aa\u30e1\u30c8\u30ea\u540c\u58eb\u306e\u95a2\u4fc2\u6027\u3092\u8a55\u4fa1\u3059\u308bPostGIS\u95a2\u6570\u306e\u4e00\u90e8\u306f\u3001GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff08R\u6728\uff09\u306b\u5bfe\u5fdc\u3057\u3066\u304a\u308a\u3001CPU\u3060\u3051\u3092\u7528\u3044\u3066\u691c\u7d22\u3092\u884c\u3046\u5834\u5408\u306b\u3082\u9ad8\u901f\u306a\u7d5e\u308a\u8fbc\u307f\u3092\u884c\u3046\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 PG-Strom\u306eGpuJoin\u3067\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u540c\u58eb\u306e\u7d50\u5408\u6761\u4ef6\u304cGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\uff08R\u6728\uff09\u3067\u9ad8\u901f\u5316\u53ef\u80fd\u306a\u5834\u5408\u3001\u7d50\u5408\u5bfe\u8c61\u30c6\u30fc\u30d6\u30eb\u306e\u4e2d\u8eab\u3060\u3051\u3067\u306a\u304f\u3001GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3082\u540c\u6642\u306bGPU\u5074\u3078\u8ee2\u9001\u3057\u3001\u7d50\u5408\u5bfe\u8c61\u306e\u884c\u3092\u9ad8\u901f\u306b\u7d5e\u308a\u8fbc\u3080\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b\u4e8b\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u306e\u51e6\u7406\u306f\u901a\u5e38\u3001CPU\u3088\u308a\u3082\u9065\u304b\u306b\u9ad8\u3044\u4e26\u5217\u5ea6\u3067\u5b9f\u884c\u3055\u308c\u308b\u305f\u3081\u3001\u304b\u306a\u308a\u306e\u9ad8\u901f\u5316\u3092\u671f\u5f85\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4e00\u65b9\u3001GpuScan\u306f\u30c6\u30fc\u30d6\u30eb\u5358\u4f53\u306e\u30b9\u30ad\u30e3\u30f3\u306bGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u307e\u305b\u3093\u3002\u3053\u308c\u306f\u3001CPU\u306b\u3088\u308bIndexScan\u3067\u306e\u7d5e\u308a\u8fbc\u307f\u306e\u65b9\u304c\u9ad8\u901f\u3067\u3042\u308b\u4e8b\u304c\u591a\u3044\u304b\u3089\u3067\u3059\u3002 \u30b8\u30aa\u30e1\u30c8\u30ea\u30c7\u30fc\u30bf\u306bGiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u8a2d\u5b9a\u3059\u308b\u306b\u306f\u3001 CREATE INDEX \u69cb\u6587\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u5e02\u753a\u6751\u306e\u5883\u754c\u7dda\u30c7\u30fc\u30bf\uff08giscity\u30c6\u30fc\u30d6\u30eb\u306egeom\u5217\uff09\u306b\u5bfe\u3057\u3066GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u8a2d\u5b9a\u3059\u308b\u3082\u306e\u3067\u3059\u3002 =# CREATE INDEX on giscity USING gist (geom); CREATE INDEX \u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u306f\u3001\u5e02\u753a\u6751\u306e\u5883\u754c\u7dda\u30c7\u30fc\u30bf\uff08giscity\u30c6\u30fc\u30d6\u30eb\uff09\u3068\u7def\u5ea6\u7d4c\u5ea6\u30c7\u30fc\u30bf\uff08dpoints\u30c6\u30fc\u30d6\u30eb\uff09\u3092\u7a81\u304d\u5408\u308f\u305b\u3001\u30dd\u30ea\u30b4\u30f3\u3068\u3057\u3066\u8868\u73fe\u3055\u308c\u305f\u5e02\u753a\u6751\u306e\u9818\u57df\u5185\u306b\u542b\u307e\u308c\u308b\u7def\u5ea6\u7d4c\u5ea6\u30c7\u30fc\u30bf\uff08\u70b9\uff09\u306e\u6570\u3092\u5e02\u753a\u6751\u3054\u3068\u306b\u51fa\u529b\u3059\u308b\u3082\u306e\u3067\u3059\u3002 \u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306b\u3088\u308aGpuJoin\u304c\u9078\u629e\u3055\u308c\u3001giscity\u30c6\u30fc\u30d6\u30eb\u3068dpoints\u30c6\u30fc\u30d6\u30eb\u306e\u7d50\u5408\u306b\u306fGpuGiSTJoin\u304c\u9078\u629e\u3055\u308c\u3066\u3044\u307e\u3059\u3002 IndexFilter:\u306e\u884c\u306b\u306f\u3001GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u3088\u308b\u7d5e\u308a\u8fbc\u307f\u6761\u4ef6\u304c (g.geom ~ st_makepoint(d.x, d.y)) \u3067\u3042\u308a\u3001\u4f7f\u7528\u3059\u308b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c giscity_geom_idx \u3067\u3042\u308b\u4e8b\u304c\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002 GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u4f7f\u7528\u306b\u3088\u308a\u3001GPU\u3067\u3042\u3063\u3066\u3082\u6bd4\u8f03\u7684\u300c\u91cd\u3044\u300d\u51e6\u7406\u3067\u3042\u308bPostGIS\u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u524d\u306b\u3001\u660e\u3089\u304b\u306b\u6761\u4ef6\u306b\u30de\u30c3\u30c1\u3057\u306a\u3044\u7d44\u307f\u5408\u308f\u305b\u3092\u6392\u9664\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u305f\u3081\u3001\u5927\u5e45\u306a\u691c\u7d22\u51e6\u7406\u306e\u9ad8\u901f\u5316\u304c\u671f\u5f85\u3067\u304d\u307e\u3059\u3002 =# EXPLAIN SELECT pref, city, count(*) FROM giscity g, dpoints d WHERE pref = 'Tokyo' AND st_contains(g.geom,st_makepoint(d.x, d.y)) GROUP BY pref, city; QUERY PLAN ----------------------------------------------------------------------------------------------------------- GroupAggregate (cost=5700646.35..5700759.39 rows=5024 width=29) Group Key: g.n03_001, g.n03_004 -> Sort (cost=5700646.35..5700658.91 rows=5024 width=29) Sort Key: g.n03_004 -> Custom Scan (GpuPreAgg) (cost=5700274.71..5700337.51 rows=5024 width=29) Reduction: Local Combined GpuJoin: enabled GPU Preference: GPU0 (NVIDIA Tesla V100-PCIE-16GB) -> Custom Scan (GpuJoin) on dpoints d (cost=638671.58..5668511.23 rows=50821573 width=21) Outer Scan: dpoints d (cost=0.00..141628.18 rows=7999618 width=16) Depth 1: GpuGiSTJoin(nrows 7999618...50821573) HeapSize: 3251.36KB IndexFilter: (g.geom ~ st_makepoint(d.x, d.y)) on giscity_geom_idx JoinQuals: st_contains(g.geom, st_makepoint(d.x, d.y)) GPU Preference: GPU0 (NVIDIA Tesla V100-PCIE-16GB) -> Seq Scan on giscity g (cost=0.00..8929.24 rows=6353 width=1883) Filter: ((pref)::text = 'Tokyo'::text) (17 rows)","title":"GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9"},{"location":"ref_devfuncs/","text":"\u95a2\u6570\u3068\u6f14\u7b97\u5b50 \u672c\u7ae0\u3067\u306fGPU\u30c7\u30d0\u30a4\u30b9\u4e0a\u3067\u5b9f\u884c\u53ef\u80fd\u306a\u95a2\u6570\u3068\u6f14\u7b97\u5b50\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u578b\u30ad\u30e3\u30b9\u30c8 bool <-- int4 int1 <-- int2 , int4 , int8 , float2 , float4 , float8 , numeric int2 <-- int1 , int4 , int8 , float2 , float4 , float8 , numeric int4 <-- bool , int1 , int2 , int8 , float2 , float4 , float8 , numeric int8 <-- int1 , int2 , int4 , float2 , float4 , float8 , numeric float2 <-- int1 , int2 , int4 , int8 , float4 , float8 , numeric float4 <-- int1 , int2 , int4 , int8 , float2 , float8 , numeric float8 <-- int1 , int2 , int4 , int8 , float2 , float4 , numeric numeric <-- int1 , int2 , int4 , int8 , float2 , float4 , float8 money <-- int4 , int8 , numeric date <-- timestamp , timestamptz time <-- timetz , timestamp , timestamptz timetz <-- time , timestamptz timestamp <-- date , timestamptz timestamptz <-- date , timestamp \u6570\u5024\u578b\u6f14\u7b97\u5b50 bool COMP bool \u8ad6\u7406\u5024\u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT COMP INT \u6574\u6570\u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3001\u5de6\u8fba\u3068\u53f3\u8fba\u304c\u7570\u306a\u308b\u6574\u6570\u578b\u3067\u3042\u3063\u3066\u3082\u69cb\u3044\u307e\u305b\u3093\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} FP COMP FP \u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 FP \u306f float2,float4,float8 \u306e\u3044\u305a\u308c\u304b\u3067\u3001\u5de6\u8fba\u3068\u53f3\u8fba\u304c\u7570\u306a\u308b\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u3067\u3042\u3063\u3066\u3082\u69cb\u3044\u307e\u305b\u3093\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} numeric COMP numeric \u5b9f\u6570\u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT OP INT \u6574\u6570\u578b\u306e\u7b97\u8853\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3001\u5de6\u8fba\u3068\u53f3\u8fba\u304c\u7570\u306a\u308b\u6574\u6570\u578b\u3067\u3042\u3063\u3066\u3082\u69cb\u3044\u307e\u305b\u3093\u3002 OP \u306f +,-,*,/ \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} FP OP FP \u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u306e\u7b97\u8853\u6f14\u7b97\u5b50\u3002 FP \u306f float2,float4,float8 \u306e\u3044\u305a\u308c\u304b\u3067\u3001\u5de6\u8fba\u3068\u53f3\u8fba\u304c\u7570\u306a\u308b\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u3067\u3042\u3063\u3066\u3082\u69cb\u3044\u307e\u305b\u3093\u3002 COMP \u306f +,-,*,/ \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} numeric OP numeric \u5b9f\u6570\u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 OP \u306f +,-,*,/ \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT % INT \u5270\u4f59\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT & INT \u8ad6\u7406\u7a4d\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT | INT \u8ad6\u7406\u548c\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT # INT \u6392\u4ed6\u7684\u8ad6\u7406\u548c\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} ~ INT \u8ad6\u7406\u5426\u5b9a\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT >> int4 \u53f3\u30b7\u30d5\u30c8\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT << int4 \u5de6\u30b7\u30d5\u30c8\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} + TYPE \u5358\u9805\u30d7\u30e9\u30b9\u6f14\u7b97\u5b50\u3002 TYPE \u306f int1,int2,int4,int8,float2,float4,float8,numeric \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} - TYPE \u5358\u9805\u30de\u30a4\u30ca\u30b9\u6f14\u7b97\u5b50\u3002 TYPE \u306f int1,int2,int4,int8,float2,float4,float8,numeric \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} @ TYPE \u7d76\u5bfe\u5024\u3002 TYPE \u306f int1,int2,int4,int8,float2,float4,float8,numeric \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} \u6570\u5b66\u95a2\u6570 float8 cbrt(float8) float8 dcbrt(float8) \u7acb\u65b9\u6839 float8 ceil(float8) float8 ceiling(float8) \u5f15\u6570\u3088\u308a\u5927\u304d\u3044\u304b\u7b49\u3057\u304f\u3001\u5f15\u6570\u306b\u6700\u3082\u8fd1\u3044\u6574\u6570 float8 exp(float8) float8 dexp(float8) \u6307\u6570\uff08e\u3092\u5e95\u3068\u3059\u308b\u6307\u5b9a\u306e\u3079\u304d\u4e57\uff09 float8 floor(float8) \u5f15\u6570\u3088\u308a\u5c0f\u3055\u3044\u304b\u7b49\u3057\u304f\u3001\u5f15\u6570\u306b\u6700\u3082\u8fd1\u3044\u6574\u6570 float8 ln(float8) float8 dlog1(float8) \u81ea\u7136\u5bfe\u6570 float8 log(float8) float8 dlog10(float8) 10\u3092\u5e95\u3068\u3057\u305f\u5bfe\u6570 float8 pi() \u5186\u5468\u7387 float8 power(float8,float8) float8 pow(float8,float8) float8 dpow(float8,float8) \u3079\u304d\u4e57 float8 round(float8) float8 dround(float8) \u6700\u3082\u8fd1\u3044\u6574\u6570\u3078\u306e\u4e38\u3081 float8 sign(float8) \u7b26\u53f7 float8 sqrt(float8) float8 dsqrt(float8) \u5e73\u65b9\u6839 float8 trunc(float8) float8 dtrunc(float8) \u6574\u6570\u3078\u306e\u5207\u6368\u3066 \u4e09\u89d2\u95a2\u6570 float8 degrees(float8) \u30e9\u30b8\u30a2\u30f3\u306b\u5bfe\u5fdc\u3059\u308b\u5ea6} float8 radians(float8) \u5ea6\u306b\u5bfe\u5fdc\u3059\u308b\u30e9\u30b8\u30a2\u30f3} float8 acos(float8) \u9006\u4f59\u5f26\u95a2\u6570} float8 asin(float8) \u9006\u6b63\u5f26\u95a2\u6570} float8 atan(float8) \u9006\u6b63\u63a5\u95a2\u6570} float8 atan2(float8,float8) arg1 / arg2 \u306e\u9006\u6b63\u63a5\u95a2\u6570} float8 cos(float8) \u4f59\u5f26\u95a2\u6570} float8 cot(float8) \u4f59\u63a5\u95a2\u6570} float8 sin(float8) \u6b63\u5f26\u95a2\u6570} float8 tan(float8) \u6b63\u63a5\u95a2\u6570} \u65e5\u4ed8/\u6642\u523b\u578b\u6f14\u7b97\u5b50 date COMP date date \u578b\u540c\u58eb\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} date COMP timestamp timestamp COMP date date \u578b\u3068 timestamp \u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} date COMP timestamptz timestamptz COMP date date \u578b\u3068 timestamptz \u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} time COMP time time \u578b\u540c\u58eb\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} timetz COMP timetz timetz \u578b\u540c\u58eb\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} timestamp COMP timestamp timestamp \u578b\u540c\u58eb\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} timestamptz COMP timestamptz timestamptz \u578b\u540c\u58eb\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} timestamp COMP timestamptz timestamptz COMP timestamp timestamp \u578b\u3068 timestamptz \u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} interval COMP interval interval \u578b\u540c\u58eb\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} date + int4 int4 + date date \u578b\u306e\u52a0\u7b97\u6f14\u7b97\u5b50} date - int4 date \u578b\u306e\u6e1b\u7b97\u6f14\u7b97\u5b50} date - date date \u578b\u540c\u58eb\u306e\u5dee\u5206} date + time time + date date \u3068 time \u304b\u3089 timestamp \u3092\u751f\u6210\u3057\u307e\u3059} date + timetz date \u3068 timetz \u304b\u3089 timestamptz \u3092\u751f\u6210\u3057\u307e\u3059} time - time time \u578b\u540c\u58eb\u306e\u5dee\u5206} timestamp - timestamp timestamp \u578b\u540c\u58eb\u306e\u5dee\u5206} timetz + interval timetz - interval timetz \u3068 interval \u3092\u52a0\u7b97\u3001\u307e\u305f\u306f\u6e1b\u7b97\u3057\u307e\u3059\u3002} timestamptz + interval timestamptz - interval timestamptz \u3068 interval \u3092\u52a0\u7b97\u3001\u307e\u305f\u306f\u6e1b\u7b97\u3057\u307e\u3059\u3002} overlaps(TYPE,TYPE,TYPE,TYPE) 2\u3064\u306e\u6642\u9593\u9593\u9694\u304c\u91cd\u306a\u308b\u304b\u3069\u3046\u304b\u3092\u5224\u5b9a\u3057\u307e\u3059\u3002 TYPE \u306f time,timetz,timestamp,timestamptz \u306e\u3044\u305a\u308c\u304b\u4e00\u3064\u3067\u3059\u3002} extract(text FROM TYPE) day \u3084 hour \u306a\u3069\u65e5\u4ed8\u6642\u523b\u578b\u306e\u90e8\u5206\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u62bd\u51fa\u3002 TYPE \u306f time,timetz,timestamp,timestamptz,interval \u306e\u3044\u305a\u308c\u304b\u4e00\u3064\u3067\u3059\u3002} now() \u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u73fe\u5728\u6642\u523b} - interval interval \u578b\u306e\u5358\u9805\u30de\u30a4\u30ca\u30b9\u6f14\u7b97\u5b50} interval + interval interval \u578b\u306e\u52a0\u7b97\u6f14\u7b97\u5b50} interval - interval interval \u578b\u306e\u6e1b\u7b97\u6f14\u7b97\u5b50} \u6587\u5b57\u5217\u95a2\u6570/\u6f14\u7b97\u5b50 {text,bpchar} COMP {text,bpchar} \u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002 \u306a\u304a\u3001 <,<=,>=,> \u6f14\u7b97\u5b50\u306f\u30ed\u30b1\u30fc\u30eb\u8a2d\u5b9a\u304cUTF-8\u307e\u305f\u306fC(\u30ed\u30b1\u30fc\u30eb\u8a2d\u5b9a\u306a\u3057)\u306e\u5834\u5408\u306b\u306e\u307f\u6709\u52b9\u3067\u3059\u3002} substring(text,int4) substring(text,int4,int4) substr(text,int4) substr(text,int4,int4) \u90e8\u5206\u6587\u5b57\u5217\u306e\u5207\u308a\u51fa\u3057} length({text,bpchar}) \u6587\u5b57\u5217\u9577} {text,bpchar} [NOT] LIKE text LIKE\u8868\u73fe\u3092\u7528\u3044\u305f\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1\u30f3\u30b0} {text,bpchar} [NOT] ILIKE text LIKE\u8868\u73fe\u3092\u7528\u3044\u305f\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u533a\u5225\u3057\u306a\u3044\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1\u30f3\u30b0\u3002 \u306a\u304a\u3001 ILIKE \u6f14\u7b97\u5b50\u306f\u30ed\u30b1\u30fc\u30eb\u8a2d\u5b9a\u304cUTF-8\u307e\u305f\u306fC(\u30ed\u30b1\u30fc\u30eb\u8a2d\u5b9a\u306a\u3057)\u306e\u5834\u5408\u306b\u306e\u307f\u6709\u52b9\u3067\u3059\u3002} \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u95a2\u6570/\u6f14\u7b97\u5b50 macaddr COMP macaddr \u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} macaddr & macaddr \u30d3\u30c3\u30c8\u7a4d\u6f14\u7b97\u5b50} macaddr | macaddr \u30d3\u30c3\u30c8\u548c\u6f14\u7b97\u5b50} ~ macaddr \u30d3\u30c3\u30c8\u5426\u5b9a\u6f14\u7b97\u5b50} trunc(macaddr) \u672b\u5c3e\u306e3\u30d0\u30a4\u30c8\u3092\u30bc\u30ed\u306b\u8a2d\u5b9a\u3059\u308b} inet COMP inet \u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} inet << inet \u5de6\u8fba\u306f\u53f3\u8fba\u306b\u5185\u5305\u3055\u308c\u308b\u3002} inet <<= inet \u5de6\u8fba\u306f\u53f3\u8fba\u306b\u5185\u5305\u3055\u308c\u308b\u304b\u7b49\u3057\u3044\u3002} inet >> inet \u5de6\u8fba\u306f\u53f3\u8fba\u3092\u5185\u5305\u3059\u308b\u3002} inet >>= inet \u5de6\u8fba\u306f\u53f3\u8fba\u3092\u5185\u5305\u3059\u308b\u304b\u7b49\u3057\u3044\u3002} inet && inet \u5de6\u8fba\u306f\u53f3\u8fba\u3092\u5185\u5305\u3059\u308b\u304b\u5185\u5305\u3055\u308c\u308b} ~ inet \u30d3\u30c3\u30c8\u5426\u5b9a\u6f14\u7b97\u5b50} inet & inet \u30d3\u30c3\u30c8\u7a4d\u6f14\u7b97\u5b50} inet | inet \u30d3\u30c3\u30c8\u548c\u6f14\u7b97\u5b50} inet + int8 \u52a0\u7b97\u6f14\u7b97\u5b50} inet - int8 \u6e1b\u7b97\u6f14\u7b97\u5b50} inet - inet \u6e1b\u7b97\u6f14\u7b97\u5b50} broadcast(inet) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c8\u30a2\u30c9\u30ec\u30b9\u3092\u8fd4\u3059} family(inet) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30a2\u30c9\u30ec\u30b9\u30d5\u30a1\u30df\u30ea\u3092\u8fd4\u3059\u3002IPv4\u306e\u5834\u5408\u306f 4 \u3001IPv6\u306e\u5834\u5408\u306f 6 } hostmask(inet) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30db\u30b9\u30c8\u30de\u30b9\u30af\u3092\u8fd4\u3059} masklen(inet) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30de\u30b9\u30af\u9577\u3092\u8fd4\u3059} netmask(inet) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30cd\u30c3\u30c8\u30de\u30b9\u30af\u3092\u8fd4\u3059} network(inet) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u90e8\u3092\u8fd4\u3059} set_masklen(NETADDR,int) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30cd\u30c3\u30c8\u30de\u30b9\u30af\u9577\u3092\u8a2d\u5b9a\u3059\u308b\u3002 NETADDR \u306f inet \u304b cidr \u306e\u3069\u3061\u3089\u304b\u3002} inet_merge(inet,inet) \u4e21\u65b9\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u542b\u3080\u6700\u5c0f\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u8fd4\u3059} \u901a\u8ca8\u578b\u6f14\u7b97\u5b50 money COMP money \u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} money OP money \u7b97\u8853\u6f14\u7b97\u5b50\u3002 OP \u306f +,-,/ \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} money * TYPE TYPE * money \u901a\u8ca8\u578b\u3068\u6570\u5024\u578b\u306e\u4e57\u7b97\u3002 TYPE \u306f int1,int2,int4,float2,float4,float8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} money / TYPE \u901a\u8ca8\u578b\u306e\u6570\u5024\u578b\u306b\u3088\u308b\u9664\u7b97\u3002 TYPE \u306f int1,int2,int4,float2,float4,float8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} money / money \u901a\u8ca8\u578b\u540c\u58eb\u306e\u9664\u7b97\u3002} uuid\u578b\u6f14\u7b97\u5b50 uuid COMP uuid \u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} JSONB\u578b\u6f14\u7b97\u5b50 jsonb -> KEY KEY \u3067\u6307\u5b9a\u3055\u308c\u305fJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u53d6\u5f97\u3059\u308b} jsonb -> NUM \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7 NUM \u3067\u6307\u5b9a\u3055\u308c\u305fJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u53d6\u5f97\u3059\u308b} jsonb ->> KEY KEY \u3067\u6307\u5b9a\u3055\u308c\u305fJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u30c6\u30ad\u30b9\u30c8\u5024\u3068\u3057\u3066\u53d6\u5f97\u3059\u308b} jsonb ->> NUM \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7 NUM \u3067\u6307\u5b9a\u3055\u308c\u305fJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u30c6\u30ad\u30b9\u30c8\u5024\u3068\u3057\u3066\u53d6\u5f97\u3059\u308b} (jsonb ->> KEY)::TYPE TYPE \u304c int2,int4,int8,float4,float8,numeric \u306e\u3044\u305a\u308c\u304b\u3067\u3042\u308b\u5834\u5408\u3001 KEY \u3067\u6307\u5b9a\u3055\u308c\u305fJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u6570\u5024\u578b\u3068\u3057\u3066\u53d6\u5f97\u3059\u308b\u3002\u4e0b\u8a18\u306e\u88dc\u8db3\u3082\u53c2\u7167\u3002} (jsonb ->> NUM)::TYPE TYPE \u304c int2,int4,int8,float4,float8,numeric \u306e\u3044\u305a\u308c\u304b\u3067\u3042\u308b\u5834\u5408\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7 NUM \u3067\u6307\u5b9a\u3055\u308c\u305fJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u6570\u5024\u578b\u3068\u3057\u3066\u53d6\u5f97\u3059\u308b\u3002\u4e0b\u8a18\u306e\u88dc\u8db3\u3082\u53c2\u7167\u3002} jsonb ? KEY jsonb\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u6307\u5b9a\u3055\u308c\u305f KEY \u3092\u542b\u3080\u304b\u3069\u3046\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b} Note jsonb ->> KEY \u6f14\u7b97\u5b50\u306b\u3088\u3063\u3066\u53d6\u308a\u51fa\u3057\u305f\u6570\u5024\u30c7\u30fc\u30bf\u3092 float \u3084 numeric \u306a\u3069\u6570\u5024\u578b\u306b\u5909\u63db\u3059\u308b\u6642\u3001\u901a\u5e38\u3001PostgreSQL\u306fjsonb\u5185\u90e8\u8868\u73fe\u3092\u30c6\u30ad\u30b9\u30c8\u3068\u3057\u3066\u51fa\u529b\u3057\u3001\u305d\u308c\u3092\u6570\u5024\u8868\u73fe\u306b\u5909\u63db\u3059\u308b\u3068\u3044\u30462\u30b9\u30c6\u30c3\u30d7\u306e\u51e6\u7406\u3092\u884c\u3044\u307e\u3059\u3002 PG-Strom\u306f jsonb ->> KEY \u6f14\u7b97\u5b50\u306b\u3088\u308b\u53c2\u7167\u3068\u30c6\u30ad\u30b9\u30c8\u21d2\u6570\u5024\u8868\u73fe\u3078\u306e\u30ad\u30e3\u30b9\u30c8\u304c\u9023\u7d9a\u3057\u3066\u3044\u308b\u6642\u3001jsonb\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304b\u3089\u6570\u5024\u8868\u73fe\u3092\u53d6\u308a\u51fa\u3059\u305f\u3081\u306e\u7279\u5225\u306a\u30c7\u30d0\u30a4\u30b9\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u4e8b\u3067\u6700\u9069\u5316\u3092\u884c\u3044\u307e\u3059\u3002 PostGIS\u95a2\u6570 geometry st_makepoint(float8,float8) geometry st_point(float8,float8) 2\u6b21\u5143\u5ea7\u6a19\u3092\u542b\u3080POINT\u578b\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u8fd4\u3059 geometry st_makepoint(float8,float8,float8) 3\u6b21\u5143\u5ea7\u6a19\u3092\u542b\u3080POINT\u578b\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u8fd4\u3059 geometry st_makepoint(float8,float8,float8,float8) ZM\u5ea7\u6a19\u3092\u542b\u3080POINT\u578b\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u8fd4\u3059 geometry st_setsrid(geometry,int4) \u30b8\u30aa\u30e1\u30c8\u30ea\u306bSRID\u3092\u8a2d\u5b9a\u3059\u308b float8 st_distance(geometry,geometry) \u30b8\u30aa\u30e1\u30c8\u30ea\u9593\u306e\u8ddd\u96e2\u3092 float8 \u3067\u8fd4\u3059 bool st_dwithin(geometry,geometry,float8) \u30b8\u30aa\u30e1\u30c8\u30ea\u9593\u306e\u8ddd\u96e2\u304c\u6307\u5b9a\u5024\u4ee5\u5185\u306a\u3089\u771f\u3092\u8fd4\u3059\u3002 st_distance \u3068\u6bd4\u8f03\u6f14\u7b97\u5b50\u306e\u7d44\u307f\u5408\u308f\u305b\u3088\u308a\u3082\u9ad8\u901f\u306a\u5834\u5408\u304c\u3042\u308b\u3002 text st_relate(geometry,geometry) \u30b8\u30aa\u30e1\u30c8\u30ea\u9593\u306e\u4ea4\u5dee\u72b6\u614b\u3092\u5224\u5b9a\u3057\u3001DE9-IM(Dimensionally Extended Nine-Intersection Matrix)\u66f8\u5f0f\u3092\u8fd4\u3059\u3002 bool st_contains(geometry,geometry) \u30b8\u30aa\u30e1\u30c8\u30ea1\u304c\u30b8\u30aa\u30e1\u30c8\u30ea2\u3092\u5305\u542b\u3059\u308b\u6642\u3001\u771f\u3092\u8fd4\u3059\u3002 bool st_crosses(geometry,geometry) \u30b8\u30aa\u30e1\u30c8\u30ea\u540c\u58eb\u304c\u7a7a\u9593\u7684\u306b\u4ea4\u5dee\u3059\u308b\u6642\u3001\u771f\u3092\u8fd4\u3059\u3002 int4 st_linecrossingdirection(geometry,geometry) 2\u3064\u306eLINESTRING\u578b\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u3069\u306e\u3088\u3046\u306b\u4ea4\u5dee\u3059\u308b\u304b\uff08\u3057\u306a\u3044\u304b\uff09\u3092\u8fd4\u3059\u3002 CUBE\u578b\u95a2\u6570 cube COMP cube \u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} bool cube_contains(cube, cube) \u7b2c\u4e00\u5f15\u6570\u306e\u7acb\u4f53\u304c\u7b2c\u4e8c\u5f15\u6570\u306e\u7acb\u4f53\u3092\u5305\u542b\u3057\u3066\u3044\u308b\u6642\u3001\u771f\u3092\u8fd4\u3059\u3002 bool cube_contained(cube, cube) \u7b2c\u4e00\u5f15\u6570\u306e\u7acb\u4f53\u304c\u7b2c\u4e8c\u5f15\u6570\u306e\u7acb\u4f53\u306b\u5305\u542b\u3055\u308c\u3066\u3044\u308b\u6642\u3001\u771f\u3092\u8fd4\u3059\u3002 float8 cube_ll_coord(cube, int4) \u7acb\u4f53\u306e\u5de6\u4e0b\u9685\u306en\u6b21\u5ea7\u6a19\u306e\u5024\u3092\u8fd4\u3057\u307e\u3059\u3002","title":"\u95a2\u6570\u3068\u6f14\u7b97\u5b50"},{"location":"ref_devfuncs/#_1","text":"\u672c\u7ae0\u3067\u306fGPU\u30c7\u30d0\u30a4\u30b9\u4e0a\u3067\u5b9f\u884c\u53ef\u80fd\u306a\u95a2\u6570\u3068\u6f14\u7b97\u5b50\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002","title":"\u95a2\u6570\u3068\u6f14\u7b97\u5b50"},{"location":"ref_devfuncs/#_2","text":"bool <-- int4 int1 <-- int2 , int4 , int8 , float2 , float4 , float8 , numeric int2 <-- int1 , int4 , int8 , float2 , float4 , float8 , numeric int4 <-- bool , int1 , int2 , int8 , float2 , float4 , float8 , numeric int8 <-- int1 , int2 , int4 , float2 , float4 , float8 , numeric float2 <-- int1 , int2 , int4 , int8 , float4 , float8 , numeric float4 <-- int1 , int2 , int4 , int8 , float2 , float8 , numeric float8 <-- int1 , int2 , int4 , int8 , float2 , float4 , numeric numeric <-- int1 , int2 , int4 , int8 , float2 , float4 , float8 money <-- int4 , int8 , numeric date <-- timestamp , timestamptz time <-- timetz , timestamp , timestamptz timetz <-- time , timestamptz timestamp <-- date , timestamptz timestamptz <-- date , timestamp","title":"\u578b\u30ad\u30e3\u30b9\u30c8"},{"location":"ref_devfuncs/#_3","text":"bool COMP bool \u8ad6\u7406\u5024\u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT COMP INT \u6574\u6570\u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3001\u5de6\u8fba\u3068\u53f3\u8fba\u304c\u7570\u306a\u308b\u6574\u6570\u578b\u3067\u3042\u3063\u3066\u3082\u69cb\u3044\u307e\u305b\u3093\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} FP COMP FP \u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 FP \u306f float2,float4,float8 \u306e\u3044\u305a\u308c\u304b\u3067\u3001\u5de6\u8fba\u3068\u53f3\u8fba\u304c\u7570\u306a\u308b\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u3067\u3042\u3063\u3066\u3082\u69cb\u3044\u307e\u305b\u3093\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} numeric COMP numeric \u5b9f\u6570\u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT OP INT \u6574\u6570\u578b\u306e\u7b97\u8853\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3001\u5de6\u8fba\u3068\u53f3\u8fba\u304c\u7570\u306a\u308b\u6574\u6570\u578b\u3067\u3042\u3063\u3066\u3082\u69cb\u3044\u307e\u305b\u3093\u3002 OP \u306f +,-,*,/ \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} FP OP FP \u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u306e\u7b97\u8853\u6f14\u7b97\u5b50\u3002 FP \u306f float2,float4,float8 \u306e\u3044\u305a\u308c\u304b\u3067\u3001\u5de6\u8fba\u3068\u53f3\u8fba\u304c\u7570\u306a\u308b\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u3067\u3042\u3063\u3066\u3082\u69cb\u3044\u307e\u305b\u3093\u3002 COMP \u306f +,-,*,/ \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} numeric OP numeric \u5b9f\u6570\u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 OP \u306f +,-,*,/ \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT % INT \u5270\u4f59\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT & INT \u8ad6\u7406\u7a4d\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT | INT \u8ad6\u7406\u548c\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT # INT \u6392\u4ed6\u7684\u8ad6\u7406\u548c\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} ~ INT \u8ad6\u7406\u5426\u5b9a\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT >> int4 \u53f3\u30b7\u30d5\u30c8\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} INT << int4 \u5de6\u30b7\u30d5\u30c8\u6f14\u7b97\u5b50\u3002 INT \u306f int1,int2,int4,int8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} + TYPE \u5358\u9805\u30d7\u30e9\u30b9\u6f14\u7b97\u5b50\u3002 TYPE \u306f int1,int2,int4,int8,float2,float4,float8,numeric \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} - TYPE \u5358\u9805\u30de\u30a4\u30ca\u30b9\u6f14\u7b97\u5b50\u3002 TYPE \u306f int1,int2,int4,int8,float2,float4,float8,numeric \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} @ TYPE \u7d76\u5bfe\u5024\u3002 TYPE \u306f int1,int2,int4,int8,float2,float4,float8,numeric \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002}","title":"\u6570\u5024\u578b\u6f14\u7b97\u5b50"},{"location":"ref_devfuncs/#_4","text":"float8 cbrt(float8) float8 dcbrt(float8) \u7acb\u65b9\u6839 float8 ceil(float8) float8 ceiling(float8) \u5f15\u6570\u3088\u308a\u5927\u304d\u3044\u304b\u7b49\u3057\u304f\u3001\u5f15\u6570\u306b\u6700\u3082\u8fd1\u3044\u6574\u6570 float8 exp(float8) float8 dexp(float8) \u6307\u6570\uff08e\u3092\u5e95\u3068\u3059\u308b\u6307\u5b9a\u306e\u3079\u304d\u4e57\uff09 float8 floor(float8) \u5f15\u6570\u3088\u308a\u5c0f\u3055\u3044\u304b\u7b49\u3057\u304f\u3001\u5f15\u6570\u306b\u6700\u3082\u8fd1\u3044\u6574\u6570 float8 ln(float8) float8 dlog1(float8) \u81ea\u7136\u5bfe\u6570 float8 log(float8) float8 dlog10(float8) 10\u3092\u5e95\u3068\u3057\u305f\u5bfe\u6570 float8 pi() \u5186\u5468\u7387 float8 power(float8,float8) float8 pow(float8,float8) float8 dpow(float8,float8) \u3079\u304d\u4e57 float8 round(float8) float8 dround(float8) \u6700\u3082\u8fd1\u3044\u6574\u6570\u3078\u306e\u4e38\u3081 float8 sign(float8) \u7b26\u53f7 float8 sqrt(float8) float8 dsqrt(float8) \u5e73\u65b9\u6839 float8 trunc(float8) float8 dtrunc(float8) \u6574\u6570\u3078\u306e\u5207\u6368\u3066","title":"\u6570\u5b66\u95a2\u6570"},{"location":"ref_devfuncs/#_5","text":"float8 degrees(float8) \u30e9\u30b8\u30a2\u30f3\u306b\u5bfe\u5fdc\u3059\u308b\u5ea6} float8 radians(float8) \u5ea6\u306b\u5bfe\u5fdc\u3059\u308b\u30e9\u30b8\u30a2\u30f3} float8 acos(float8) \u9006\u4f59\u5f26\u95a2\u6570} float8 asin(float8) \u9006\u6b63\u5f26\u95a2\u6570} float8 atan(float8) \u9006\u6b63\u63a5\u95a2\u6570} float8 atan2(float8,float8) arg1 / arg2 \u306e\u9006\u6b63\u63a5\u95a2\u6570} float8 cos(float8) \u4f59\u5f26\u95a2\u6570} float8 cot(float8) \u4f59\u63a5\u95a2\u6570} float8 sin(float8) \u6b63\u5f26\u95a2\u6570} float8 tan(float8) \u6b63\u63a5\u95a2\u6570}","title":"\u4e09\u89d2\u95a2\u6570"},{"location":"ref_devfuncs/#_6","text":"date COMP date date \u578b\u540c\u58eb\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} date COMP timestamp timestamp COMP date date \u578b\u3068 timestamp \u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} date COMP timestamptz timestamptz COMP date date \u578b\u3068 timestamptz \u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} time COMP time time \u578b\u540c\u58eb\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} timetz COMP timetz timetz \u578b\u540c\u58eb\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} timestamp COMP timestamp timestamp \u578b\u540c\u58eb\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} timestamptz COMP timestamptz timestamptz \u578b\u540c\u58eb\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} timestamp COMP timestamptz timestamptz COMP timestamp timestamp \u578b\u3068 timestamptz \u578b\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} interval COMP interval interval \u578b\u540c\u58eb\u306e\u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3002} date + int4 int4 + date date \u578b\u306e\u52a0\u7b97\u6f14\u7b97\u5b50} date - int4 date \u578b\u306e\u6e1b\u7b97\u6f14\u7b97\u5b50} date - date date \u578b\u540c\u58eb\u306e\u5dee\u5206} date + time time + date date \u3068 time \u304b\u3089 timestamp \u3092\u751f\u6210\u3057\u307e\u3059} date + timetz date \u3068 timetz \u304b\u3089 timestamptz \u3092\u751f\u6210\u3057\u307e\u3059} time - time time \u578b\u540c\u58eb\u306e\u5dee\u5206} timestamp - timestamp timestamp \u578b\u540c\u58eb\u306e\u5dee\u5206} timetz + interval timetz - interval timetz \u3068 interval \u3092\u52a0\u7b97\u3001\u307e\u305f\u306f\u6e1b\u7b97\u3057\u307e\u3059\u3002} timestamptz + interval timestamptz - interval timestamptz \u3068 interval \u3092\u52a0\u7b97\u3001\u307e\u305f\u306f\u6e1b\u7b97\u3057\u307e\u3059\u3002} overlaps(TYPE,TYPE,TYPE,TYPE) 2\u3064\u306e\u6642\u9593\u9593\u9694\u304c\u91cd\u306a\u308b\u304b\u3069\u3046\u304b\u3092\u5224\u5b9a\u3057\u307e\u3059\u3002 TYPE \u306f time,timetz,timestamp,timestamptz \u306e\u3044\u305a\u308c\u304b\u4e00\u3064\u3067\u3059\u3002} extract(text FROM TYPE) day \u3084 hour \u306a\u3069\u65e5\u4ed8\u6642\u523b\u578b\u306e\u90e8\u5206\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u62bd\u51fa\u3002 TYPE \u306f time,timetz,timestamp,timestamptz,interval \u306e\u3044\u305a\u308c\u304b\u4e00\u3064\u3067\u3059\u3002} now() \u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u73fe\u5728\u6642\u523b} - interval interval \u578b\u306e\u5358\u9805\u30de\u30a4\u30ca\u30b9\u6f14\u7b97\u5b50} interval + interval interval \u578b\u306e\u52a0\u7b97\u6f14\u7b97\u5b50} interval - interval interval \u578b\u306e\u6e1b\u7b97\u6f14\u7b97\u5b50}","title":"\u65e5\u4ed8/\u6642\u523b\u578b\u6f14\u7b97\u5b50"},{"location":"ref_devfuncs/#_7","text":"{text,bpchar} COMP {text,bpchar} \u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002 \u306a\u304a\u3001 <,<=,>=,> \u6f14\u7b97\u5b50\u306f\u30ed\u30b1\u30fc\u30eb\u8a2d\u5b9a\u304cUTF-8\u307e\u305f\u306fC(\u30ed\u30b1\u30fc\u30eb\u8a2d\u5b9a\u306a\u3057)\u306e\u5834\u5408\u306b\u306e\u307f\u6709\u52b9\u3067\u3059\u3002} substring(text,int4) substring(text,int4,int4) substr(text,int4) substr(text,int4,int4) \u90e8\u5206\u6587\u5b57\u5217\u306e\u5207\u308a\u51fa\u3057} length({text,bpchar}) \u6587\u5b57\u5217\u9577} {text,bpchar} [NOT] LIKE text LIKE\u8868\u73fe\u3092\u7528\u3044\u305f\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1\u30f3\u30b0} {text,bpchar} [NOT] ILIKE text LIKE\u8868\u73fe\u3092\u7528\u3044\u305f\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u533a\u5225\u3057\u306a\u3044\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1\u30f3\u30b0\u3002 \u306a\u304a\u3001 ILIKE \u6f14\u7b97\u5b50\u306f\u30ed\u30b1\u30fc\u30eb\u8a2d\u5b9a\u304cUTF-8\u307e\u305f\u306fC(\u30ed\u30b1\u30fc\u30eb\u8a2d\u5b9a\u306a\u3057)\u306e\u5834\u5408\u306b\u306e\u307f\u6709\u52b9\u3067\u3059\u3002}","title":"\u6587\u5b57\u5217\u95a2\u6570/\u6f14\u7b97\u5b50"},{"location":"ref_devfuncs/#_8","text":"macaddr COMP macaddr \u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} macaddr & macaddr \u30d3\u30c3\u30c8\u7a4d\u6f14\u7b97\u5b50} macaddr | macaddr \u30d3\u30c3\u30c8\u548c\u6f14\u7b97\u5b50} ~ macaddr \u30d3\u30c3\u30c8\u5426\u5b9a\u6f14\u7b97\u5b50} trunc(macaddr) \u672b\u5c3e\u306e3\u30d0\u30a4\u30c8\u3092\u30bc\u30ed\u306b\u8a2d\u5b9a\u3059\u308b} inet COMP inet \u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} inet << inet \u5de6\u8fba\u306f\u53f3\u8fba\u306b\u5185\u5305\u3055\u308c\u308b\u3002} inet <<= inet \u5de6\u8fba\u306f\u53f3\u8fba\u306b\u5185\u5305\u3055\u308c\u308b\u304b\u7b49\u3057\u3044\u3002} inet >> inet \u5de6\u8fba\u306f\u53f3\u8fba\u3092\u5185\u5305\u3059\u308b\u3002} inet >>= inet \u5de6\u8fba\u306f\u53f3\u8fba\u3092\u5185\u5305\u3059\u308b\u304b\u7b49\u3057\u3044\u3002} inet && inet \u5de6\u8fba\u306f\u53f3\u8fba\u3092\u5185\u5305\u3059\u308b\u304b\u5185\u5305\u3055\u308c\u308b} ~ inet \u30d3\u30c3\u30c8\u5426\u5b9a\u6f14\u7b97\u5b50} inet & inet \u30d3\u30c3\u30c8\u7a4d\u6f14\u7b97\u5b50} inet | inet \u30d3\u30c3\u30c8\u548c\u6f14\u7b97\u5b50} inet + int8 \u52a0\u7b97\u6f14\u7b97\u5b50} inet - int8 \u6e1b\u7b97\u6f14\u7b97\u5b50} inet - inet \u6e1b\u7b97\u6f14\u7b97\u5b50} broadcast(inet) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30d6\u30ed\u30fc\u30c9\u30ad\u30e3\u30b9\u30c8\u30a2\u30c9\u30ec\u30b9\u3092\u8fd4\u3059} family(inet) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30a2\u30c9\u30ec\u30b9\u30d5\u30a1\u30df\u30ea\u3092\u8fd4\u3059\u3002IPv4\u306e\u5834\u5408\u306f 4 \u3001IPv6\u306e\u5834\u5408\u306f 6 } hostmask(inet) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30db\u30b9\u30c8\u30de\u30b9\u30af\u3092\u8fd4\u3059} masklen(inet) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30de\u30b9\u30af\u9577\u3092\u8fd4\u3059} netmask(inet) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30cd\u30c3\u30c8\u30de\u30b9\u30af\u3092\u8fd4\u3059} network(inet) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u90e8\u3092\u8fd4\u3059} set_masklen(NETADDR,int) \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u306e\u30cd\u30c3\u30c8\u30de\u30b9\u30af\u9577\u3092\u8a2d\u5b9a\u3059\u308b\u3002 NETADDR \u306f inet \u304b cidr \u306e\u3069\u3061\u3089\u304b\u3002} inet_merge(inet,inet) \u4e21\u65b9\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u542b\u3080\u6700\u5c0f\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u8fd4\u3059}","title":"\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u95a2\u6570/\u6f14\u7b97\u5b50"},{"location":"ref_devfuncs/#_9","text":"money COMP money \u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} money OP money \u7b97\u8853\u6f14\u7b97\u5b50\u3002 OP \u306f +,-,/ \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} money * TYPE TYPE * money \u901a\u8ca8\u578b\u3068\u6570\u5024\u578b\u306e\u4e57\u7b97\u3002 TYPE \u306f int1,int2,int4,float2,float4,float8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} money / TYPE \u901a\u8ca8\u578b\u306e\u6570\u5024\u578b\u306b\u3088\u308b\u9664\u7b97\u3002 TYPE \u306f int1,int2,int4,float2,float4,float8 \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} money / money \u901a\u8ca8\u578b\u540c\u58eb\u306e\u9664\u7b97\u3002}","title":"\u901a\u8ca8\u578b\u6f14\u7b97\u5b50"},{"location":"ref_devfuncs/#uuid","text":"uuid COMP uuid \u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002}","title":"uuid\u578b\u6f14\u7b97\u5b50"},{"location":"ref_devfuncs/#jsonb","text":"jsonb -> KEY KEY \u3067\u6307\u5b9a\u3055\u308c\u305fJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u53d6\u5f97\u3059\u308b} jsonb -> NUM \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7 NUM \u3067\u6307\u5b9a\u3055\u308c\u305fJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u53d6\u5f97\u3059\u308b} jsonb ->> KEY KEY \u3067\u6307\u5b9a\u3055\u308c\u305fJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u30c6\u30ad\u30b9\u30c8\u5024\u3068\u3057\u3066\u53d6\u5f97\u3059\u308b} jsonb ->> NUM \u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7 NUM \u3067\u6307\u5b9a\u3055\u308c\u305fJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u30c6\u30ad\u30b9\u30c8\u5024\u3068\u3057\u3066\u53d6\u5f97\u3059\u308b} (jsonb ->> KEY)::TYPE TYPE \u304c int2,int4,int8,float4,float8,numeric \u306e\u3044\u305a\u308c\u304b\u3067\u3042\u308b\u5834\u5408\u3001 KEY \u3067\u6307\u5b9a\u3055\u308c\u305fJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u6570\u5024\u578b\u3068\u3057\u3066\u53d6\u5f97\u3059\u308b\u3002\u4e0b\u8a18\u306e\u88dc\u8db3\u3082\u53c2\u7167\u3002} (jsonb ->> NUM)::TYPE TYPE \u304c int2,int4,int8,float4,float8,numeric \u306e\u3044\u305a\u308c\u304b\u3067\u3042\u308b\u5834\u5408\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7 NUM \u3067\u6307\u5b9a\u3055\u308c\u305fJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u6570\u5024\u578b\u3068\u3057\u3066\u53d6\u5f97\u3059\u308b\u3002\u4e0b\u8a18\u306e\u88dc\u8db3\u3082\u53c2\u7167\u3002} jsonb ? KEY jsonb\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u6307\u5b9a\u3055\u308c\u305f KEY \u3092\u542b\u3080\u304b\u3069\u3046\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b} Note jsonb ->> KEY \u6f14\u7b97\u5b50\u306b\u3088\u3063\u3066\u53d6\u308a\u51fa\u3057\u305f\u6570\u5024\u30c7\u30fc\u30bf\u3092 float \u3084 numeric \u306a\u3069\u6570\u5024\u578b\u306b\u5909\u63db\u3059\u308b\u6642\u3001\u901a\u5e38\u3001PostgreSQL\u306fjsonb\u5185\u90e8\u8868\u73fe\u3092\u30c6\u30ad\u30b9\u30c8\u3068\u3057\u3066\u51fa\u529b\u3057\u3001\u305d\u308c\u3092\u6570\u5024\u8868\u73fe\u306b\u5909\u63db\u3059\u308b\u3068\u3044\u30462\u30b9\u30c6\u30c3\u30d7\u306e\u51e6\u7406\u3092\u884c\u3044\u307e\u3059\u3002 PG-Strom\u306f jsonb ->> KEY \u6f14\u7b97\u5b50\u306b\u3088\u308b\u53c2\u7167\u3068\u30c6\u30ad\u30b9\u30c8\u21d2\u6570\u5024\u8868\u73fe\u3078\u306e\u30ad\u30e3\u30b9\u30c8\u304c\u9023\u7d9a\u3057\u3066\u3044\u308b\u6642\u3001jsonb\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304b\u3089\u6570\u5024\u8868\u73fe\u3092\u53d6\u308a\u51fa\u3059\u305f\u3081\u306e\u7279\u5225\u306a\u30c7\u30d0\u30a4\u30b9\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u4e8b\u3067\u6700\u9069\u5316\u3092\u884c\u3044\u307e\u3059\u3002","title":"JSONB\u578b\u6f14\u7b97\u5b50"},{"location":"ref_devfuncs/#postgis","text":"geometry st_makepoint(float8,float8) geometry st_point(float8,float8) 2\u6b21\u5143\u5ea7\u6a19\u3092\u542b\u3080POINT\u578b\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u8fd4\u3059 geometry st_makepoint(float8,float8,float8) 3\u6b21\u5143\u5ea7\u6a19\u3092\u542b\u3080POINT\u578b\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u8fd4\u3059 geometry st_makepoint(float8,float8,float8,float8) ZM\u5ea7\u6a19\u3092\u542b\u3080POINT\u578b\u30b8\u30aa\u30e1\u30c8\u30ea\u3092\u8fd4\u3059 geometry st_setsrid(geometry,int4) \u30b8\u30aa\u30e1\u30c8\u30ea\u306bSRID\u3092\u8a2d\u5b9a\u3059\u308b float8 st_distance(geometry,geometry) \u30b8\u30aa\u30e1\u30c8\u30ea\u9593\u306e\u8ddd\u96e2\u3092 float8 \u3067\u8fd4\u3059 bool st_dwithin(geometry,geometry,float8) \u30b8\u30aa\u30e1\u30c8\u30ea\u9593\u306e\u8ddd\u96e2\u304c\u6307\u5b9a\u5024\u4ee5\u5185\u306a\u3089\u771f\u3092\u8fd4\u3059\u3002 st_distance \u3068\u6bd4\u8f03\u6f14\u7b97\u5b50\u306e\u7d44\u307f\u5408\u308f\u305b\u3088\u308a\u3082\u9ad8\u901f\u306a\u5834\u5408\u304c\u3042\u308b\u3002 text st_relate(geometry,geometry) \u30b8\u30aa\u30e1\u30c8\u30ea\u9593\u306e\u4ea4\u5dee\u72b6\u614b\u3092\u5224\u5b9a\u3057\u3001DE9-IM(Dimensionally Extended Nine-Intersection Matrix)\u66f8\u5f0f\u3092\u8fd4\u3059\u3002 bool st_contains(geometry,geometry) \u30b8\u30aa\u30e1\u30c8\u30ea1\u304c\u30b8\u30aa\u30e1\u30c8\u30ea2\u3092\u5305\u542b\u3059\u308b\u6642\u3001\u771f\u3092\u8fd4\u3059\u3002 bool st_crosses(geometry,geometry) \u30b8\u30aa\u30e1\u30c8\u30ea\u540c\u58eb\u304c\u7a7a\u9593\u7684\u306b\u4ea4\u5dee\u3059\u308b\u6642\u3001\u771f\u3092\u8fd4\u3059\u3002 int4 st_linecrossingdirection(geometry,geometry) 2\u3064\u306eLINESTRING\u578b\u30b8\u30aa\u30e1\u30c8\u30ea\u304c\u3069\u306e\u3088\u3046\u306b\u4ea4\u5dee\u3059\u308b\u304b\uff08\u3057\u306a\u3044\u304b\uff09\u3092\u8fd4\u3059\u3002","title":"PostGIS\u95a2\u6570"},{"location":"ref_devfuncs/#cube","text":"cube COMP cube \u6bd4\u8f03\u6f14\u7b97\u5b50\u3002 COMP \u306f =,<>,<,<=,>=,> \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002} bool cube_contains(cube, cube) \u7b2c\u4e00\u5f15\u6570\u306e\u7acb\u4f53\u304c\u7b2c\u4e8c\u5f15\u6570\u306e\u7acb\u4f53\u3092\u5305\u542b\u3057\u3066\u3044\u308b\u6642\u3001\u771f\u3092\u8fd4\u3059\u3002 bool cube_contained(cube, cube) \u7b2c\u4e00\u5f15\u6570\u306e\u7acb\u4f53\u304c\u7b2c\u4e8c\u5f15\u6570\u306e\u7acb\u4f53\u306b\u5305\u542b\u3055\u308c\u3066\u3044\u308b\u6642\u3001\u771f\u3092\u8fd4\u3059\u3002 float8 cube_ll_coord(cube, int4) \u7acb\u4f53\u306e\u5de6\u4e0b\u9685\u306en\u6b21\u5ea7\u6a19\u306e\u5024\u3092\u8fd4\u3057\u307e\u3059\u3002","title":"CUBE\u578b\u95a2\u6570"},{"location":"ref_params/","text":"GUC\u30d1\u30e9\u30e1\u30fc\u30bf \u672c\u7bc0\u3067\u306fPG-Strom\u306e\u63d0\u4f9b\u3059\u308b\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u6a5f\u80fd\u5358\u4f4d\u306e\u6709\u52b9\u5316/\u7121\u52b9\u5316 pg_strom.enabled [\u578b: bool / \u521d\u671f\u5024: on] PG-Strom\u6a5f\u80fd\u5168\u4f53\u3092\u4e00\u62ec\u3057\u3066\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.enable_gpuscan [\u578b: bool / \u521d\u671f\u5024: on] GpuScan\u306b\u3088\u308b\u30b9\u30ad\u30e3\u30f3\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.enable_gpuhashjoin [\u578b: bool / \u521d\u671f\u5024: on] GpuHashJoin\u306b\u3088\u308bJOIN\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.enable_gpugistindex [\u578b: bool / \u521d\u671f\u5024: on] GpuGiSTIndex\u306b\u3088\u308bJOIN\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.enable_gpujoin [\u578b: bool / \u521d\u671f\u5024: on] GpuJoin\u306b\u3088\u308bJOIN\u3092\u4e00\u62ec\u3067\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002\uff08GpuHashJoin\u3068GpuGiSTIndex\u3092\u542b\u3080\uff09 pg_strom.enable_gpupreagg [\u578b: bool / \u521d\u671f\u5024: on] GpuPreAgg\u306b\u3088\u308b\u96c6\u7d04\u51e6\u7406\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.enable_numeric_aggfuncs [\u578b: bool / \u521d\u671f\u5024: on] numeric \u30c7\u30fc\u30bf\u578b\u3092\u5f15\u6570\u306b\u53d6\u308b\u96c6\u7d04\u6f14\u7b97\u3092GPU\u3067\u51e6\u7406\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002 GPU\u3067\u306e\u96c6\u7d04\u6f14\u7b97\u306b\u304a\u3044\u3066 numeric \u30c7\u30fc\u30bf\u578b\u306f\u500d\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570\u306b\u30de\u30c3\u30d4\u30f3\u30b0\u3055\u308c\u308b\u305f\u3081\u3001\u8a08\u7b97\u8aa4\u5dee\u306b\u30bb\u30f3\u30b7\u30c6\u30a3\u30d6\u306a\u7528\u9014\u306e\u5834\u5408\u306f\u3001\u3053\u306e\u8a2d\u5b9a\u5024\u3092 off \u306b\u3057\u3066CPU\u3067\u96c6\u7d04\u6f14\u7b97\u3092\u5b9f\u884c\u3057\u3001\u8a08\u7b97\u8aa4\u5dee\u306e\u767a\u751f\u3092\u6291\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 pg_strom.enable_brin [\u578b: bool / \u521d\u671f\u5024: on] BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u3063\u305f\u30c6\u30fc\u30d6\u30eb\u30b9\u30ad\u30e3\u30f3\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.cpu_fallback [\u578b: enum / \u521d\u671f\u5024: notice ] GPU\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\"CPU\u518d\u5b9f\u884c\"\u30a8\u30e9\u30fc\u3092\u8fd4\u3057\u305f\u3068\u304d\u306b\u3001\u5b9f\u969b\u306bCPU\u3067\u306e\u518d\u5b9f\u884c\u3092\u8a66\u307f\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002 notice ... \u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u51fa\u529b\u3057\u305f\u4e0a\u3067CPU\u3067\u306e\u518d\u5b9f\u884c\u3092\u884c\u3046 on , true ... \u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u51fa\u529b\u305b\u305aCPU\u3067\u306e\u518d\u5b9f\u884c\u3092\u884c\u3046 off , false ... \u30a8\u30e9\u30fc\u3092\u767a\u751f\u3055\u305bCPU\u3067\u306e\u518d\u5b9f\u884c\u3092\u884c\u308f\u306a\u3044 pg_strom.regression_test_mode [\u578b: bool / \u521d\u671f\u5024: off] GPU\u30e2\u30c7\u30eb\u540d\u306a\u3069\u3001\u5b9f\u884c\u74b0\u5883\u306b\u4f9d\u5b58\u3057\u3066\u8868\u793a\u304c\u5909\u308f\u308b\u53ef\u80fd\u6027\u306e\u3042\u308b EXPLAIN \u30b3\u30de\u30f3\u30c9\u306e\u51fa\u529b\u3092\u6291\u5236\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u306b\u304a\u3051\u308b\u507d\u967d\u6027\u3092\u9632\u3050\u305f\u3081\u306e\u8a2d\u5b9a\u3067\u3001\u901a\u5e38\u306f\u5229\u7528\u8005\u304c\u64cd\u4f5c\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306b\u95a2\u3059\u308b\u8a2d\u5b9a pg_strom.gpu_setup_cost [\u578b: real / \u521d\u671f\u5024: 100 * DEFAULT_SEQ_PAGE_COST ] GPU\u30c7\u30d0\u30a4\u30b9\u306e\u521d\u671f\u5316\u306b\u8981\u3059\u308b\u30b3\u30b9\u30c8\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u5024\u3002 pg_strom.gpu_tuple_cost [\u578b: real / \u521d\u671f\u5024: DEFAULT_CPU_TUPLE_COST ] GPU\u3078\u9001\u51fa\u3059\u308b\uff0f\u53d7\u3051\u53d6\u308b\u30bf\u30d7\u30eb\u4e00\u500b\u3042\u305f\u308a\u306e\u30b3\u30b9\u30c8\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u5024\u3002 pg_strom.gpu_operator_cost [\u578b: real / \u521d\u671f\u5024: DEFAULT_CPU_OPERATOR_COST / 16 ] GPU\u306e\u6f14\u7b97\u5f0f\u3042\u305f\u308a\u306e\u51e6\u7406\u30b3\u30b9\u30c8\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u5024\u3002 cpu_operator_cost \u3088\u308a\u3082\u5927\u304d\u306a\u5024\u3092\u8a2d\u5b9a\u3057\u3066\u3057\u307e\u3046\u3068\u3001\u3044\u304b\u306a\u308b\u30b5\u30a4\u30ba\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u3082PG-Strom\u304c\u9078\u629e\u3055\u308c\u308b\u3053\u3068\u306f\u306a\u304f\u306a\u308b\u3002 pg_strom.enable_partitionwise_gpujoin [\u578b: bool / \u521d\u671f\u5024: on] GpuJoin\u3092\u5404\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u8981\u7d20\u3078\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002 pg_strom.enable_partitionwise_gpupreagg [\u578b: bool / \u521d\u671f\u5024: on] GpuPreAgg\u3092\u5404\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u8981\u7d20\u3078\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002 pg_strom.pinned_inner_buffer_threshold [\u578b: int / \u521d\u671f\u5024: 0 ] GpuJoin\u306eINNER\u8868\u304cGpuScan\u307e\u305f\u306fGpuJoin\u3067\u3042\u308b\u5834\u5408\u3001\u51e6\u7406\u7d50\u679c\u306e\u63a8\u5b9a\u30b5\u30a4\u30ba\u304c\u3053\u306e\u8a2d\u5b9a\u5024\u3088\u308a\u3082\u5927\u304d\u3051\u308c\u3070\u3001\u7d50\u679c\u3092\u3044\u3063\u305f\u3093CPU\u306b\u623b\u3059\u3053\u3068\u306a\u304f\u3001\u305d\u306e\u307e\u307eGPU\u5074\u306b\u4fdd\u6301\u3057\u305f\u4e0a\u3067\u3001\u7d9a\u304fGpuJoin\u306eINNER\u30d0\u30c3\u30d5\u30a1\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u3002 \u8a2d\u5b9a\u5024\u304c 0 \u306e\u5834\u5408\u3001\u672c\u6a5f\u80fd\u306f\u7121\u52b9\u3068\u306a\u308b\u3002 \u30a8\u30b0\u30bc\u30ad\u30e5\u30fc\u30bf\u306b\u95a2\u3059\u308b\u8a2d\u5b9a pg_strom.max_async_tasks [\u578b: int / \u521d\u671f\u5024: 12 ] PG-Strom\u304cGPU\u5b9f\u884c\u30ad\u30e5\u30fc\u306b\u6295\u5165\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u975e\u540c\u671f\u30bf\u30b9\u30af\u306eGPU\u30c7\u30d0\u30a4\u30b9\u6bce\u306e\u6700\u5927\u5024\u3067\u3001GPU Service\u306e\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u6570\u3067\u3082\u3042\u308a\u307e\u3059\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u306e\u8a2d\u5b9a pg_strom.gpudirect_driver [\u578b: text ] GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u306e\u30c9\u30e9\u30a4\u30d0\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u540d\u3092\u793a\u3059\u30d1\u30e9\u30e1\u30fc\u30bf\u3067\u3059\u3002 cufile \u3001 nvme-strom \u3001\u3082\u3057\u304f\u306f vfs \u306e\u3069\u308c\u304b\u3067\u3059\u3002 pg_strom.gpudirect_enabled [\u578b: bool / \u521d\u671f\u5024: on ] GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u6a5f\u80fd\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.gpu_direct_seq_page_cost [\u578b: real / \u521d\u671f\u5024: DEFAULT_SEQ_PAGE_COST / 4 ] \u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u304c\u5b9f\u884c\u30d7\u30e9\u30f3\u306e\u30b3\u30b9\u30c8\u3092\u8a08\u7b97\u3059\u308b\u969b\u306b\u3001GPU-Direct SQL\u3092\u7528\u3044\u3066\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u5834\u5408\u306e\u30b3\u30b9\u30c8\u3068\u3057\u3066 seq_page_cost \u306e\u4ee3\u308f\u308a\u306b\u4f7f\u7528\u3055\u308c\u308b\u5024\u3002 pg_strom.gpudirect_threshold [\u578b: int / \u521d\u671f\u5024: \u81ea\u52d5] GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u6a5f\u80fd\u3092\u767a\u52d5\u3055\u305b\u308b\u30c6\u30fc\u30d6\u30eb\u30b5\u30a4\u30ba\u306e\u95be\u5024\u3092\u8a2d\u5b9a\u3059\u308b\u3002 \u521d\u671f\u5024\u306f\u81ea\u52d5\u8a2d\u5b9a\u3067\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u7269\u7406\u30e1\u30e2\u30ea\u3068 shared_buffers \u8a2d\u5b9a\u5024\u304b\u3089\u8a08\u7b97\u3057\u305f\u95be\u5024\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002 pg_strom.manual_optimal_gpus [\u578b: text / \u521d\u671f\u5024: \u306a\u3057] NVME\u30c7\u30d0\u30a4\u30b9\u3084NFS\u533a\u753b\u306a\u3069\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u533a\u753b\u3054\u3068\u306b\u6700\u3082\u8fd1\u508d\u3068\u5224\u5b9a\u3055\u308c\u308bGPU\u3092\u624b\u52d5\u3067\u8a2d\u5b9a\u3057\u307e\u3059\u3002 \u66f8\u5f0f\u306f {|/path/to/tablespace}=gpuX[:gpuX...] \u3067\u3001NVME\u30c7\u30d0\u30a4\u30b9\u307e\u305f\u306f\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u306e\u30d1\u30b9\u3068\u3001\u305d\u306e\u8fd1\u508d\u3067\u3042\u308bGPU\uff08\u8907\u6570\u53ef\uff09\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002\u30ab\u30f3\u30de\u3067\u533a\u5207\u3063\u3066\u8907\u6570\u306e\u8a2d\u5b9a\u3092\u8a18\u8ff0\u3059\u308b\u4e8b\u3082\u53ef\u80fd\u3067\u3059\u3002 \u4f8b: pg_strom.manual_optimal_gpus = 'nvme1=gpu0,nvme2=gpu1,/mnt/nfsroot=gpu0' \u306f\u30c7\u30d0\u30a4\u30b9\u756a\u53f7X\u3092\u6301\u3064GPU\u3067\u3059\u3002 \u306f\u30ed\u30fc\u30ab\u30eb\u306eNVME-SSD\u307e\u305f\u306f\u30ea\u30e2\u30fc\u30c8\u306eNVME-oF\u30c7\u30d0\u30a4\u30b9\u3092\u610f\u5473\u3057\u307e\u3059\u3002 /path/to/tablespace \u306f\u3001\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u306b\u7d10\u3065\u3044\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u30d5\u30eb\u30d1\u30b9\u3067\u3059\u3002 \u30ed\u30fc\u30ab\u30eb\u306eNVME-SSD\u306b\u5bfe\u3057\u3066\u306f\u591a\u304f\u306e\u5834\u5408\u81ea\u52d5\u8a2d\u5b9a\u3067\u5341\u5206\u3067\u3059\u304c\u3001NVME-oF\u30c7\u30d0\u30a4\u30b9\u3084NFS-over-RDMA\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001\u6a5f\u68b0\u7684\u306b\u8fd1\u508d\u306eGPU\u3092\u7279\u5b9a\u3059\u308b\u4e8b\u304c\u3067\u304d\u306a\u3044\u305f\u3081\u3001\u624b\u52d5\u3067\u8fd1\u508d\u306eGPU\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 Arrow_Fdw\u95a2\u9023\u306e\u8a2d\u5b9a arrow_fdw.enabled [\u578b: bool / \u521d\u671f\u5024: on ] \u63a8\u5b9a\u30b3\u30b9\u30c8\u5024\u3092\u8abf\u6574\u3057\u3001Arrow_Fdw\u306e\u6709\u52b9/\u7121\u52b9\u3092\u5207\u308a\u66ff\u3048\u307e\u3059\u3002\u305f\u3060\u3057\u3001GpuScan\u304c\u5229\u7528\u3067\u304d\u306a\u3044\u5834\u5408\u306b\u306f\u3001Arrow_Fdw\u306b\u3088\u308bForeign Scan\u3060\u3051\u304cArrow\u30d5\u30a1\u30a4\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3067\u304d\u308b\u3068\u3044\u3046\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 arrow_fdw.stats_hint_enabled [\u578b: bool / \u521d\u671f\u5024: on ] Arrow\u30d5\u30a1\u30a4\u30eb\u304cmin/max\u7d71\u8a08\u60c5\u5831\u3092\u6301\u3063\u3066\u304a\u308a\u3001\u305d\u308c\u3092\u7528\u3044\u3066\u4e0d\u5fc5\u8981\u306arecord-batch\u3092\u8aad\u307f\u98db\u3070\u3059\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3057\u307e\u3059\u3002 arrow_fdw.metadata_cache_size [\u578b: int / \u521d\u671f\u5024: 512MB ] Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u30e1\u30bf\u60c5\u5831\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3059\u308b\u5171\u6709\u30e1\u30e2\u30ea\u9818\u57df\u306e\u5927\u304d\u3055\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u5171\u6709\u30e1\u30e2\u30ea\u306e\u6d88\u8cbb\u91cf\u304c\u3053\u306e\u30b5\u30a4\u30ba\u3092\u8d8a\u3048\u308b\u3068\u3001\u53e4\u3044\u30e1\u30bf\u60c5\u5831\u304b\u3089\u9806\u306b\u89e3\u653e\u3055\u308c\u307e\u3059\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u8a2d\u5b9a pg_strom.enable_gpucache [\u578b: bool / \u521d\u671f\u5024: on ] \u691c\u7d22/\u5206\u6790\u7cfb\u306e\u30af\u30a8\u30ea\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u4f7f\u7528\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3057\u307e\u3059\u3002 \u306a\u304a\u3001\u3053\u306e\u8a2d\u5b9a\u5024\u3092 off \u306b\u3057\u3066\u3082\u30c8\u30ea\u30ac\u95a2\u6570\u306f\u5f15\u304d\u7d9a\u304dREDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u3092\u66f4\u65b0\u3057\u7d9a\u3051\u307e\u3059\u3002 pg_strom.gpucache_auto_preload [\u578b: text / \u521d\u671f\u5024: null ] PostgreSQL\u306e\u8d77\u52d5\u76f4\u5f8c\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u30ed\u30fc\u30c9\u3059\u3079\u304d\u30c6\u30fc\u30d6\u30eb\u540d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u66f8\u5f0f\u306f DATABASE_NAME.SCHEMA_NAME.TABLE_NAME \u3067\u3001\u8907\u6570\u500b\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u6307\u5b9a\u3059\u308b\u5834\u5408\u306f\u3053\u308c\u3092\u30ab\u30f3\u30de\u533a\u5207\u308a\u3067\u4e26\u3079\u307e\u3059\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u521d\u56de\u30ed\u30fc\u30c9\u306f\u76f8\u5fdc\u306b\u6642\u9593\u306e\u304b\u304b\u308b\u51e6\u7406\u3067\u3059\u304c\u3001\u4e8b\u524d\u306b\u521d\u56de\u30ed\u30fc\u30c9\u3092\u6e08\u307e\u305b\u3066\u304a\u304f\u4e8b\u3067\u3001\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u306e\u521d\u56de\u5b9f\u884c\u6642\u306b\u5fdc\u7b54\u901f\u5ea6\u304c\u9045\u5ef6\u3059\u308b\u306e\u3092\u907f\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u306a\u304a\u3001\u672c\u30d1\u30e9\u30e1\u30fc\u30bf\u3092 '*' \u306b\u8a2d\u5b9a\u3059\u308b\u3068\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6301\u3064\u5168\u3066\u306e\u30c6\u30fc\u30d6\u30eb\u306e\u5185\u5bb9\u3092\u9806\u306bGPU\u3078\u30ed\u30fc\u30c9\u3057\u3088\u3046\u3068\u8a66\u307f\u307e\u3059\u3002 GPU\u30c7\u30d0\u30a4\u30b9\u306b\u95a2\u9023\u3059\u308b\u8a2d\u5b9a pg_strom.gpu_mempool_segment_sz [\u578b: int / \u521d\u671f\u5024: 1GB ] GPU Service\u304c\u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u7528\u306bGPU\u30e1\u30e2\u30ea\u3092\u78ba\u4fdd\u3059\u308b\u969b\u306e\u30bb\u30b0\u30e1\u30f3\u30c8\u30b5\u30a4\u30ba\u3067\u3059\u3002 GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u5272\u5f53\u3066\u306f\u6bd4\u8f03\u7684\u30d8\u30d3\u30fc\u306a\u51e6\u7406\u3067\u3042\u308b\u305f\u3081\u3001\u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u3092\u4f7f\u7528\u3057\u3066\u30e1\u30e2\u30ea\u3092\u4f7f\u3044\u56de\u3059\u4e8b\u304c\u63a8\u5968\u3055\u308c\u3066\u3044\u307e\u3059\u3002 pg_strom.gpu_mempool_max_ratio [\u578b: real / \u521d\u671f\u5024: 50% ] GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u7528\u306b\u4f7f\u7528\u3059\u308b\u4e8b\u306e\u3067\u304d\u308b\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u5272\u5408\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u306b\u3088\u308b\u904e\u5270\u306aGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u6d88\u8cbb\u3092\u6291\u5236\u3057\u3001\u30ef\u30fc\u30ad\u30f3\u30b0\u30e1\u30e2\u30ea\u3092\u5341\u5206\u306b\u78ba\u4fdd\u3059\u308b\u4e8b\u304c\u76ee\u7684\u3067\u3059\u3002 pg_strom.gpu_mempool_min_ratio [\u578b: real / \u521d\u671f\u5024: 5% ] \u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u306b\u78ba\u4fdd\u3057\u305fGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u3046\u3061\u3001\u5229\u7528\u7d42\u4e86\u5f8c\u3082\u89e3\u653e\u305b\u305a\u306b\u78ba\u4fdd\u3057\u305f\u307e\u307e\u306b\u3057\u3066\u304a\u304f\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u5272\u5408\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u6700\u5c0f\u9650\u5ea6\u306e\u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u3092\u4fdd\u6301\u3057\u3066\u304a\u304f\u3053\u3068\u306b\u3088\u308a\u3001\u6b21\u306e\u30af\u30a8\u30ea\u3092\u901f\u3084\u304b\u306b\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 pg_strom.gpu_mempool_release_delay [\u578b: int / \u521d\u671f\u5024: 5000 ] GPU Service\u306f\u3001\u3042\u308b\u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u4e0a\u306e\u30bb\u30b0\u30e1\u30f3\u30c8\u304c\u7a7a\u306b\u306a\u3063\u3066\u3082\u3001\u3053\u308c\u3092\u76f4\u3061\u306b\u958b\u653e\u3057\u307e\u305b\u3093\u3002\u305d\u306e\u30bb\u30b0\u30e1\u30f3\u30c8\u304c\u6700\u5f8c\u306b\u5229\u7528\u3055\u308c\u3066\u304b\u3089\u3001\u672c\u30d1\u30e9\u30e1\u30fc\u30bf\u3067\u6307\u5b9a\u3055\u308c\u305f\u6642\u9593\uff08\u30df\u30ea\u79d2\u5358\u4f4d\uff09\u3092\u7d4c\u904e\u3059\u308b\u3068\u3001\u3053\u308c\u3092\u958b\u653e\u3057\u3066\u30b7\u30b9\u30c6\u30e0\u306b\u8fd4\u5374\u3057\u307e\u3059\u3002 \u4e00\u5b9a\u306e\u9045\u5ef6\u3092\u631f\u3080\u4e8b\u3067\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u5272\u5f53/\u89e3\u653e\u306e\u983b\u5ea6\u3092\u6e1b\u3089\u3059\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 pg_strom.gpuserv_debug_output [\u578b: bool / \u521d\u671f\u5024: false ] GPU Service\u306e\u30c7\u30d0\u30c3\u30b0\u30e1\u30c3\u30bb\u30fc\u30b8\u51fa\u529b\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3057\u307e\u3059\u3002\u3053\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u30c7\u30d0\u30c3\u30b0\u306b\u304a\u3044\u3066\u6709\u52b9\u3067\u3042\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u901a\u5e38\u306f\u521d\u671f\u5024\u306e\u307e\u307e\u5909\u66f4\u3057\u306a\u3044\u3067\u4e0b\u3055\u3044\u3002 pg_strom.cuda_visible_devices [\u578b: text / \u521d\u671f\u5024: null ] PostgreSQL\u306e\u8d77\u52d5\u6642\u306b\u7279\u5b9a\u306eGPU\u30c7\u30d0\u30a4\u30b9\u3060\u3051\u3092\u8a8d\u8b58\u3055\u305b\u3066\u3044\u5834\u5408\u306f\u3001\u30ab\u30f3\u30de\u533a\u5207\u308a\u3067GPU\u30c7\u30d0\u30a4\u30b9\u756a\u53f7\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u74b0\u5883\u5909\u6570 CUDA_VISIBLE_DEVICES \u3092\u8a2d\u5b9a\u3059\u308b\u306e\u3068\u540c\u7b49\u3067\u3059\u3002","title":"GUC\u30d1\u30e9\u30e1\u30fc\u30bf"},{"location":"ref_params/#guc","text":"\u672c\u7bc0\u3067\u306fPG-Strom\u306e\u63d0\u4f9b\u3059\u308b\u8a2d\u5b9a\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002","title":"GUC\u30d1\u30e9\u30e1\u30fc\u30bf"},{"location":"ref_params/#_1","text":"pg_strom.enabled [\u578b: bool / \u521d\u671f\u5024: on] PG-Strom\u6a5f\u80fd\u5168\u4f53\u3092\u4e00\u62ec\u3057\u3066\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.enable_gpuscan [\u578b: bool / \u521d\u671f\u5024: on] GpuScan\u306b\u3088\u308b\u30b9\u30ad\u30e3\u30f3\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.enable_gpuhashjoin [\u578b: bool / \u521d\u671f\u5024: on] GpuHashJoin\u306b\u3088\u308bJOIN\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.enable_gpugistindex [\u578b: bool / \u521d\u671f\u5024: on] GpuGiSTIndex\u306b\u3088\u308bJOIN\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.enable_gpujoin [\u578b: bool / \u521d\u671f\u5024: on] GpuJoin\u306b\u3088\u308bJOIN\u3092\u4e00\u62ec\u3067\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002\uff08GpuHashJoin\u3068GpuGiSTIndex\u3092\u542b\u3080\uff09 pg_strom.enable_gpupreagg [\u578b: bool / \u521d\u671f\u5024: on] GpuPreAgg\u306b\u3088\u308b\u96c6\u7d04\u51e6\u7406\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.enable_numeric_aggfuncs [\u578b: bool / \u521d\u671f\u5024: on] numeric \u30c7\u30fc\u30bf\u578b\u3092\u5f15\u6570\u306b\u53d6\u308b\u96c6\u7d04\u6f14\u7b97\u3092GPU\u3067\u51e6\u7406\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002 GPU\u3067\u306e\u96c6\u7d04\u6f14\u7b97\u306b\u304a\u3044\u3066 numeric \u30c7\u30fc\u30bf\u578b\u306f\u500d\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570\u306b\u30de\u30c3\u30d4\u30f3\u30b0\u3055\u308c\u308b\u305f\u3081\u3001\u8a08\u7b97\u8aa4\u5dee\u306b\u30bb\u30f3\u30b7\u30c6\u30a3\u30d6\u306a\u7528\u9014\u306e\u5834\u5408\u306f\u3001\u3053\u306e\u8a2d\u5b9a\u5024\u3092 off \u306b\u3057\u3066CPU\u3067\u96c6\u7d04\u6f14\u7b97\u3092\u5b9f\u884c\u3057\u3001\u8a08\u7b97\u8aa4\u5dee\u306e\u767a\u751f\u3092\u6291\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 pg_strom.enable_brin [\u578b: bool / \u521d\u671f\u5024: on] BRIN\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u3063\u305f\u30c6\u30fc\u30d6\u30eb\u30b9\u30ad\u30e3\u30f3\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.cpu_fallback [\u578b: enum / \u521d\u671f\u5024: notice ] GPU\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\"CPU\u518d\u5b9f\u884c\"\u30a8\u30e9\u30fc\u3092\u8fd4\u3057\u305f\u3068\u304d\u306b\u3001\u5b9f\u969b\u306bCPU\u3067\u306e\u518d\u5b9f\u884c\u3092\u8a66\u307f\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002 notice ... \u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u51fa\u529b\u3057\u305f\u4e0a\u3067CPU\u3067\u306e\u518d\u5b9f\u884c\u3092\u884c\u3046 on , true ... \u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u51fa\u529b\u305b\u305aCPU\u3067\u306e\u518d\u5b9f\u884c\u3092\u884c\u3046 off , false ... \u30a8\u30e9\u30fc\u3092\u767a\u751f\u3055\u305bCPU\u3067\u306e\u518d\u5b9f\u884c\u3092\u884c\u308f\u306a\u3044 pg_strom.regression_test_mode [\u578b: bool / \u521d\u671f\u5024: off] GPU\u30e2\u30c7\u30eb\u540d\u306a\u3069\u3001\u5b9f\u884c\u74b0\u5883\u306b\u4f9d\u5b58\u3057\u3066\u8868\u793a\u304c\u5909\u308f\u308b\u53ef\u80fd\u6027\u306e\u3042\u308b EXPLAIN \u30b3\u30de\u30f3\u30c9\u306e\u51fa\u529b\u3092\u6291\u5236\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u306b\u304a\u3051\u308b\u507d\u967d\u6027\u3092\u9632\u3050\u305f\u3081\u306e\u8a2d\u5b9a\u3067\u3001\u901a\u5e38\u306f\u5229\u7528\u8005\u304c\u64cd\u4f5c\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002","title":"\u6a5f\u80fd\u5358\u4f4d\u306e\u6709\u52b9\u5316/\u7121\u52b9\u5316"},{"location":"ref_params/#_2","text":"pg_strom.gpu_setup_cost [\u578b: real / \u521d\u671f\u5024: 100 * DEFAULT_SEQ_PAGE_COST ] GPU\u30c7\u30d0\u30a4\u30b9\u306e\u521d\u671f\u5316\u306b\u8981\u3059\u308b\u30b3\u30b9\u30c8\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u5024\u3002 pg_strom.gpu_tuple_cost [\u578b: real / \u521d\u671f\u5024: DEFAULT_CPU_TUPLE_COST ] GPU\u3078\u9001\u51fa\u3059\u308b\uff0f\u53d7\u3051\u53d6\u308b\u30bf\u30d7\u30eb\u4e00\u500b\u3042\u305f\u308a\u306e\u30b3\u30b9\u30c8\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u5024\u3002 pg_strom.gpu_operator_cost [\u578b: real / \u521d\u671f\u5024: DEFAULT_CPU_OPERATOR_COST / 16 ] GPU\u306e\u6f14\u7b97\u5f0f\u3042\u305f\u308a\u306e\u51e6\u7406\u30b3\u30b9\u30c8\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u5024\u3002 cpu_operator_cost \u3088\u308a\u3082\u5927\u304d\u306a\u5024\u3092\u8a2d\u5b9a\u3057\u3066\u3057\u307e\u3046\u3068\u3001\u3044\u304b\u306a\u308b\u30b5\u30a4\u30ba\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u3082PG-Strom\u304c\u9078\u629e\u3055\u308c\u308b\u3053\u3068\u306f\u306a\u304f\u306a\u308b\u3002 pg_strom.enable_partitionwise_gpujoin [\u578b: bool / \u521d\u671f\u5024: on] GpuJoin\u3092\u5404\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u8981\u7d20\u3078\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002 pg_strom.enable_partitionwise_gpupreagg [\u578b: bool / \u521d\u671f\u5024: on] GpuPreAgg\u3092\u5404\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u8981\u7d20\u3078\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3059\u308b\u3002 pg_strom.pinned_inner_buffer_threshold [\u578b: int / \u521d\u671f\u5024: 0 ] GpuJoin\u306eINNER\u8868\u304cGpuScan\u307e\u305f\u306fGpuJoin\u3067\u3042\u308b\u5834\u5408\u3001\u51e6\u7406\u7d50\u679c\u306e\u63a8\u5b9a\u30b5\u30a4\u30ba\u304c\u3053\u306e\u8a2d\u5b9a\u5024\u3088\u308a\u3082\u5927\u304d\u3051\u308c\u3070\u3001\u7d50\u679c\u3092\u3044\u3063\u305f\u3093CPU\u306b\u623b\u3059\u3053\u3068\u306a\u304f\u3001\u305d\u306e\u307e\u307eGPU\u5074\u306b\u4fdd\u6301\u3057\u305f\u4e0a\u3067\u3001\u7d9a\u304fGpuJoin\u306eINNER\u30d0\u30c3\u30d5\u30a1\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u3002 \u8a2d\u5b9a\u5024\u304c 0 \u306e\u5834\u5408\u3001\u672c\u6a5f\u80fd\u306f\u7121\u52b9\u3068\u306a\u308b\u3002","title":"\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u306b\u95a2\u3059\u308b\u8a2d\u5b9a"},{"location":"ref_params/#_3","text":"pg_strom.max_async_tasks [\u578b: int / \u521d\u671f\u5024: 12 ] PG-Strom\u304cGPU\u5b9f\u884c\u30ad\u30e5\u30fc\u306b\u6295\u5165\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u975e\u540c\u671f\u30bf\u30b9\u30af\u306eGPU\u30c7\u30d0\u30a4\u30b9\u6bce\u306e\u6700\u5927\u5024\u3067\u3001GPU Service\u306e\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u6570\u3067\u3082\u3042\u308a\u307e\u3059\u3002","title":"\u30a8\u30b0\u30bc\u30ad\u30e5\u30fc\u30bf\u306b\u95a2\u3059\u308b\u8a2d\u5b9a"},{"location":"ref_params/#gpusql","text":"pg_strom.gpudirect_driver [\u578b: text ] GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u306e\u30c9\u30e9\u30a4\u30d0\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u540d\u3092\u793a\u3059\u30d1\u30e9\u30e1\u30fc\u30bf\u3067\u3059\u3002 cufile \u3001 nvme-strom \u3001\u3082\u3057\u304f\u306f vfs \u306e\u3069\u308c\u304b\u3067\u3059\u3002 pg_strom.gpudirect_enabled [\u578b: bool / \u521d\u671f\u5024: on ] GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u6a5f\u80fd\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u3002 pg_strom.gpu_direct_seq_page_cost [\u578b: real / \u521d\u671f\u5024: DEFAULT_SEQ_PAGE_COST / 4 ] \u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6\u304c\u5b9f\u884c\u30d7\u30e9\u30f3\u306e\u30b3\u30b9\u30c8\u3092\u8a08\u7b97\u3059\u308b\u969b\u306b\u3001GPU-Direct SQL\u3092\u7528\u3044\u3066\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u5834\u5408\u306e\u30b3\u30b9\u30c8\u3068\u3057\u3066 seq_page_cost \u306e\u4ee3\u308f\u308a\u306b\u4f7f\u7528\u3055\u308c\u308b\u5024\u3002 pg_strom.gpudirect_threshold [\u578b: int / \u521d\u671f\u5024: \u81ea\u52d5] GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u6a5f\u80fd\u3092\u767a\u52d5\u3055\u305b\u308b\u30c6\u30fc\u30d6\u30eb\u30b5\u30a4\u30ba\u306e\u95be\u5024\u3092\u8a2d\u5b9a\u3059\u308b\u3002 \u521d\u671f\u5024\u306f\u81ea\u52d5\u8a2d\u5b9a\u3067\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u7269\u7406\u30e1\u30e2\u30ea\u3068 shared_buffers \u8a2d\u5b9a\u5024\u304b\u3089\u8a08\u7b97\u3057\u305f\u95be\u5024\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002 pg_strom.manual_optimal_gpus [\u578b: text / \u521d\u671f\u5024: \u306a\u3057] NVME\u30c7\u30d0\u30a4\u30b9\u3084NFS\u533a\u753b\u306a\u3069\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u533a\u753b\u3054\u3068\u306b\u6700\u3082\u8fd1\u508d\u3068\u5224\u5b9a\u3055\u308c\u308bGPU\u3092\u624b\u52d5\u3067\u8a2d\u5b9a\u3057\u307e\u3059\u3002 \u66f8\u5f0f\u306f {|/path/to/tablespace}=gpuX[:gpuX...] \u3067\u3001NVME\u30c7\u30d0\u30a4\u30b9\u307e\u305f\u306f\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u306e\u30d1\u30b9\u3068\u3001\u305d\u306e\u8fd1\u508d\u3067\u3042\u308bGPU\uff08\u8907\u6570\u53ef\uff09\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002\u30ab\u30f3\u30de\u3067\u533a\u5207\u3063\u3066\u8907\u6570\u306e\u8a2d\u5b9a\u3092\u8a18\u8ff0\u3059\u308b\u4e8b\u3082\u53ef\u80fd\u3067\u3059\u3002 \u4f8b: pg_strom.manual_optimal_gpus = 'nvme1=gpu0,nvme2=gpu1,/mnt/nfsroot=gpu0' \u306f\u30c7\u30d0\u30a4\u30b9\u756a\u53f7X\u3092\u6301\u3064GPU\u3067\u3059\u3002 \u306f\u30ed\u30fc\u30ab\u30eb\u306eNVME-SSD\u307e\u305f\u306f\u30ea\u30e2\u30fc\u30c8\u306eNVME-oF\u30c7\u30d0\u30a4\u30b9\u3092\u610f\u5473\u3057\u307e\u3059\u3002 /path/to/tablespace \u306f\u3001\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u306b\u7d10\u3065\u3044\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u30d5\u30eb\u30d1\u30b9\u3067\u3059\u3002 \u30ed\u30fc\u30ab\u30eb\u306eNVME-SSD\u306b\u5bfe\u3057\u3066\u306f\u591a\u304f\u306e\u5834\u5408\u81ea\u52d5\u8a2d\u5b9a\u3067\u5341\u5206\u3067\u3059\u304c\u3001NVME-oF\u30c7\u30d0\u30a4\u30b9\u3084NFS-over-RDMA\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001\u6a5f\u68b0\u7684\u306b\u8fd1\u508d\u306eGPU\u3092\u7279\u5b9a\u3059\u308b\u4e8b\u304c\u3067\u304d\u306a\u3044\u305f\u3081\u3001\u624b\u52d5\u3067\u8fd1\u508d\u306eGPU\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002","title":"GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u306e\u8a2d\u5b9a"},{"location":"ref_params/#arrow_fdw","text":"arrow_fdw.enabled [\u578b: bool / \u521d\u671f\u5024: on ] \u63a8\u5b9a\u30b3\u30b9\u30c8\u5024\u3092\u8abf\u6574\u3057\u3001Arrow_Fdw\u306e\u6709\u52b9/\u7121\u52b9\u3092\u5207\u308a\u66ff\u3048\u307e\u3059\u3002\u305f\u3060\u3057\u3001GpuScan\u304c\u5229\u7528\u3067\u304d\u306a\u3044\u5834\u5408\u306b\u306f\u3001Arrow_Fdw\u306b\u3088\u308bForeign Scan\u3060\u3051\u304cArrow\u30d5\u30a1\u30a4\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3067\u304d\u308b\u3068\u3044\u3046\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 arrow_fdw.stats_hint_enabled [\u578b: bool / \u521d\u671f\u5024: on ] Arrow\u30d5\u30a1\u30a4\u30eb\u304cmin/max\u7d71\u8a08\u60c5\u5831\u3092\u6301\u3063\u3066\u304a\u308a\u3001\u305d\u308c\u3092\u7528\u3044\u3066\u4e0d\u5fc5\u8981\u306arecord-batch\u3092\u8aad\u307f\u98db\u3070\u3059\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3057\u307e\u3059\u3002 arrow_fdw.metadata_cache_size [\u578b: int / \u521d\u671f\u5024: 512MB ] Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u30e1\u30bf\u60c5\u5831\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3059\u308b\u5171\u6709\u30e1\u30e2\u30ea\u9818\u57df\u306e\u5927\u304d\u3055\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u5171\u6709\u30e1\u30e2\u30ea\u306e\u6d88\u8cbb\u91cf\u304c\u3053\u306e\u30b5\u30a4\u30ba\u3092\u8d8a\u3048\u308b\u3068\u3001\u53e4\u3044\u30e1\u30bf\u60c5\u5831\u304b\u3089\u9806\u306b\u89e3\u653e\u3055\u308c\u307e\u3059\u3002","title":"Arrow_Fdw\u95a2\u9023\u306e\u8a2d\u5b9a"},{"location":"ref_params/#gpu","text":"pg_strom.enable_gpucache [\u578b: bool / \u521d\u671f\u5024: on ] \u691c\u7d22/\u5206\u6790\u7cfb\u306e\u30af\u30a8\u30ea\u3067GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u4f7f\u7528\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3057\u307e\u3059\u3002 \u306a\u304a\u3001\u3053\u306e\u8a2d\u5b9a\u5024\u3092 off \u306b\u3057\u3066\u3082\u30c8\u30ea\u30ac\u95a2\u6570\u306f\u5f15\u304d\u7d9a\u304dREDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u3092\u66f4\u65b0\u3057\u7d9a\u3051\u307e\u3059\u3002 pg_strom.gpucache_auto_preload [\u578b: text / \u521d\u671f\u5024: null ] PostgreSQL\u306e\u8d77\u52d5\u76f4\u5f8c\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u30ed\u30fc\u30c9\u3059\u3079\u304d\u30c6\u30fc\u30d6\u30eb\u540d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u66f8\u5f0f\u306f DATABASE_NAME.SCHEMA_NAME.TABLE_NAME \u3067\u3001\u8907\u6570\u500b\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u6307\u5b9a\u3059\u308b\u5834\u5408\u306f\u3053\u308c\u3092\u30ab\u30f3\u30de\u533a\u5207\u308a\u3067\u4e26\u3079\u307e\u3059\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u521d\u56de\u30ed\u30fc\u30c9\u306f\u76f8\u5fdc\u306b\u6642\u9593\u306e\u304b\u304b\u308b\u51e6\u7406\u3067\u3059\u304c\u3001\u4e8b\u524d\u306b\u521d\u56de\u30ed\u30fc\u30c9\u3092\u6e08\u307e\u305b\u3066\u304a\u304f\u4e8b\u3067\u3001\u691c\u7d22/\u5206\u6790\u30af\u30a8\u30ea\u306e\u521d\u56de\u5b9f\u884c\u6642\u306b\u5fdc\u7b54\u901f\u5ea6\u304c\u9045\u5ef6\u3059\u308b\u306e\u3092\u907f\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u306a\u304a\u3001\u672c\u30d1\u30e9\u30e1\u30fc\u30bf\u3092 '*' \u306b\u8a2d\u5b9a\u3059\u308b\u3068\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u6301\u3064\u5168\u3066\u306e\u30c6\u30fc\u30d6\u30eb\u306e\u5185\u5bb9\u3092\u9806\u306bGPU\u3078\u30ed\u30fc\u30c9\u3057\u3088\u3046\u3068\u8a66\u307f\u307e\u3059\u3002","title":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u8a2d\u5b9a"},{"location":"ref_params/#gpu_1","text":"pg_strom.gpu_mempool_segment_sz [\u578b: int / \u521d\u671f\u5024: 1GB ] GPU Service\u304c\u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u7528\u306bGPU\u30e1\u30e2\u30ea\u3092\u78ba\u4fdd\u3059\u308b\u969b\u306e\u30bb\u30b0\u30e1\u30f3\u30c8\u30b5\u30a4\u30ba\u3067\u3059\u3002 GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u5272\u5f53\u3066\u306f\u6bd4\u8f03\u7684\u30d8\u30d3\u30fc\u306a\u51e6\u7406\u3067\u3042\u308b\u305f\u3081\u3001\u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u3092\u4f7f\u7528\u3057\u3066\u30e1\u30e2\u30ea\u3092\u4f7f\u3044\u56de\u3059\u4e8b\u304c\u63a8\u5968\u3055\u308c\u3066\u3044\u307e\u3059\u3002 pg_strom.gpu_mempool_max_ratio [\u578b: real / \u521d\u671f\u5024: 50% ] GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u7528\u306b\u4f7f\u7528\u3059\u308b\u4e8b\u306e\u3067\u304d\u308b\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u5272\u5408\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u306b\u3088\u308b\u904e\u5270\u306aGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u6d88\u8cbb\u3092\u6291\u5236\u3057\u3001\u30ef\u30fc\u30ad\u30f3\u30b0\u30e1\u30e2\u30ea\u3092\u5341\u5206\u306b\u78ba\u4fdd\u3059\u308b\u4e8b\u304c\u76ee\u7684\u3067\u3059\u3002 pg_strom.gpu_mempool_min_ratio [\u578b: real / \u521d\u671f\u5024: 5% ] \u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u306b\u78ba\u4fdd\u3057\u305fGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u3046\u3061\u3001\u5229\u7528\u7d42\u4e86\u5f8c\u3082\u89e3\u653e\u305b\u305a\u306b\u78ba\u4fdd\u3057\u305f\u307e\u307e\u306b\u3057\u3066\u304a\u304f\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u5272\u5408\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u6700\u5c0f\u9650\u5ea6\u306e\u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u3092\u4fdd\u6301\u3057\u3066\u304a\u304f\u3053\u3068\u306b\u3088\u308a\u3001\u6b21\u306e\u30af\u30a8\u30ea\u3092\u901f\u3084\u304b\u306b\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 pg_strom.gpu_mempool_release_delay [\u578b: int / \u521d\u671f\u5024: 5000 ] GPU Service\u306f\u3001\u3042\u308b\u30e1\u30e2\u30ea\u30d7\u30fc\u30eb\u4e0a\u306e\u30bb\u30b0\u30e1\u30f3\u30c8\u304c\u7a7a\u306b\u306a\u3063\u3066\u3082\u3001\u3053\u308c\u3092\u76f4\u3061\u306b\u958b\u653e\u3057\u307e\u305b\u3093\u3002\u305d\u306e\u30bb\u30b0\u30e1\u30f3\u30c8\u304c\u6700\u5f8c\u306b\u5229\u7528\u3055\u308c\u3066\u304b\u3089\u3001\u672c\u30d1\u30e9\u30e1\u30fc\u30bf\u3067\u6307\u5b9a\u3055\u308c\u305f\u6642\u9593\uff08\u30df\u30ea\u79d2\u5358\u4f4d\uff09\u3092\u7d4c\u904e\u3059\u308b\u3068\u3001\u3053\u308c\u3092\u958b\u653e\u3057\u3066\u30b7\u30b9\u30c6\u30e0\u306b\u8fd4\u5374\u3057\u307e\u3059\u3002 \u4e00\u5b9a\u306e\u9045\u5ef6\u3092\u631f\u3080\u4e8b\u3067\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u5272\u5f53/\u89e3\u653e\u306e\u983b\u5ea6\u3092\u6e1b\u3089\u3059\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 pg_strom.gpuserv_debug_output [\u578b: bool / \u521d\u671f\u5024: false ] GPU Service\u306e\u30c7\u30d0\u30c3\u30b0\u30e1\u30c3\u30bb\u30fc\u30b8\u51fa\u529b\u3092\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3057\u307e\u3059\u3002\u3053\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u30c7\u30d0\u30c3\u30b0\u306b\u304a\u3044\u3066\u6709\u52b9\u3067\u3042\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u901a\u5e38\u306f\u521d\u671f\u5024\u306e\u307e\u307e\u5909\u66f4\u3057\u306a\u3044\u3067\u4e0b\u3055\u3044\u3002 pg_strom.cuda_visible_devices [\u578b: text / \u521d\u671f\u5024: null ] PostgreSQL\u306e\u8d77\u52d5\u6642\u306b\u7279\u5b9a\u306eGPU\u30c7\u30d0\u30a4\u30b9\u3060\u3051\u3092\u8a8d\u8b58\u3055\u305b\u3066\u3044\u5834\u5408\u306f\u3001\u30ab\u30f3\u30de\u533a\u5207\u308a\u3067GPU\u30c7\u30d0\u30a4\u30b9\u756a\u53f7\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u74b0\u5883\u5909\u6570 CUDA_VISIBLE_DEVICES \u3092\u8a2d\u5b9a\u3059\u308b\u306e\u3068\u540c\u7b49\u3067\u3059\u3002","title":"GPU\u30c7\u30d0\u30a4\u30b9\u306b\u95a2\u9023\u3059\u308b\u8a2d\u5b9a"},{"location":"ref_sqlfuncs/","text":"SQL\u30aa\u30d6\u30b8\u30a7\u30af\u30c8 \u672c\u7ae0\u3067\u306fPG-Strom\u304c\u72ec\u81ea\u306b\u63d0\u4f9b\u3059\u308bSQL\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002 \u30b7\u30b9\u30c6\u30e0\u60c5\u5831 pgstrom.device_info \u30b7\u30b9\u30c6\u30e0\u30d3\u30e5\u30fc PG-Strom\u7528\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305fGPU\u30c7\u30d0\u30a4\u30b9\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u8868\u793a\u3057\u307e\u3059\u3002 \u3053\u306e\u30d3\u30e5\u30fc\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 name type description gpu_id int GPU\u30c7\u30d0\u30a4\u30b9\u756a\u53f7 att_name text \u30c7\u30d0\u30a4\u30b9\u5c5e\u6027\u540d att_value text \u30c7\u30d0\u30a4\u30b9\u5c5e\u6027\u5024 att_desc text \u30c7\u30d0\u30a4\u30b9\u5c5e\u6027\u306e\u8aac\u660e GPU\u30c7\u30d0\u30a4\u30b9\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306f\u975e\u5e38\u306b\u6570\u304c\u591a\u304f\u3001\u307e\u305fCUDA\u30c9\u30e9\u30a4\u30d0\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u3088\u3063\u3066\u3082\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u6570\u306f\u307e\u3061\u307e\u3061\u3067\u3059\u3002 \u305d\u306e\u305f\u3081\u3001 pgstrom.device_info \u30b7\u30b9\u30c6\u30e0\u30d3\u30e5\u30fc\u3067\u306f\u3001GPU\u30c7\u30d0\u30a4\u30b9\u756a\u53f7( gpu_id )\u3068\u3001\u30c7\u30d0\u30a4\u30b9\u5c5e\u6027\u540d( att_name )\u306b\u3088\u3063\u3066\u5bfe\u8c61\u3068\u306a\u308b\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u7279\u5b9a\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u306f pgstrom.device_info \u30b7\u30b9\u30c6\u30e0\u30d3\u30e5\u30fc\u306e\u51fa\u529b\u4f8b\u3067\u3059\u3002 postgres=# select * from pgstrom.gpu_device_info limit 10; gpu_id | att_name | att_value | att_desc --------+-----------------------+------------------------------------------+------------------------------------- 0 | DEV_NAME | NVIDIA A100-PCIE-40GB | GPU Device Name 0 | DEV_ID | 0 | GPU Device ID 0 | DEV_UUID | GPU-13943bfd-5b30-38f5-0473-78979c134606 | GPU Device UUID 0 | DEV_TOTAL_MEMSZ | 39.39GB | GPU Total RAM Size 0 | DEV_BAR1_MEMSZ | 64.00GB | GPU PCI Bar1 Size 0 | NUMA_NODE_ID | -1 | GPU NUMA Node Id 0 | MAX_THREADS_PER_BLOCK | 1024 | Maximum number of threads per block 0 | MAX_BLOCK_DIM_X | 1024 | Maximum block dimension X 0 | MAX_BLOCK_DIM_Y | 1024 | Maximum block dimension Y 0 | MAX_BLOCK_DIM_Z | 64 | Maximum block dimension Z (10 rows) Arrow_Fdw fdw_handler pgstrom.arrow_fdw_handler() Arrow_Fdw\u306eFDW\u30cf\u30f3\u30c9\u30e9\u95a2\u6570\u3067\u3059\u3002\u901a\u5e38\u3001\u30e6\u30fc\u30b6\u304c\u3053\u306e\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002 void pgstrom.arrow_fdw_validator(text[], oid) Arrow_Fdw\u306eFDW\u30aa\u30d7\u30b7\u30e7\u30f3\u691c\u8a3c\u7528\u95a2\u6570\u3067\u3059\u3002\u901a\u5e38\u3001\u30e6\u30fc\u30b6\u304c\u3053\u306e\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002 event_trigger pgstrom.arrow_fdw_precheck_schema() Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u305f\u3081\u306e\u30a4\u30d9\u30f3\u30c8\u30c8\u30ea\u30ac\u95a2\u6570\u3067\u3059\u3002\u901a\u5e38\u3001\u30e6\u30fc\u30b6\u304c\u3053\u306e\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002 void pgstrom.arrow_fdw_import_file(text, text, text = null) Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3001\u65b0\u305f\u306b\u5916\u90e8\u30c6\u30fc\u30d6\u30eb(foreign table)\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002\u7b2c\u4e00\u5f15\u6570\u306f\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u540d\u524d\u3001\u7b2c\u4e8c\u5f15\u6570\u306fApache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u3001\u7701\u7565\u53ef\u80fd\u306a\u7b2c\u4e09\u5f15\u6570\u306f\u30b9\u30ad\u30fc\u30de\u540d\u3067\u3059\u3002 \u3053\u306e\u95a2\u6570\u306f IMPORT FOREIGN SCHEMA \u69cb\u6587\u306b\u4f3c\u3066\u3044\u307e\u3059\u304c\u3001PostgreSQL\u306b\u304a\u3051\u308b\u30c6\u30fc\u30d6\u30eb\u306e\u5217\u6570\u5236\u9650\uff08 MaxTupleAttributeNumber = 1664\uff09\u3092\u8d8a\u3048\u308b\u5217\u304c\u5b9a\u7fa9\u3055\u308c\u305fApache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3067\u304d\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u3053\u308c\u306b\u8a72\u5f53\u3057\u306a\u3044\u5927\u534a\u306e\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3067\u306f IMPORT FOREIGN SCHEMA \u69cb\u6587\u3092\u5229\u7528\u3059\u3079\u304d\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001 pgstrom.arrow_fdw_import_file \u3092\u7528\u3044\u30662000\u500b\u306eInt16\u5217\u3092\u6301\u3064Apache Arrow\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u305f\u3082\u306e\u3067\u3059\u3002 \\d mytest \u306e\u5b9f\u884c\u7d50\u679c\u3088\u308a\u3001\u65b0\u305f\u306b\u4f5c\u6210\u3055\u308c\u305f\u5916\u90e8\u30c6\u30fc\u30d6\u30eb mytest \u304c2000\u500b\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u6301\u3063\u3066\u3044\u308b\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 PostgreSQL\u5185\u90e8\u8868\u73fe\u306e\u90fd\u5408\u4e0a\u3001\u5168\u3066\u306e\u5217\u3092\u4e00\u5ea6\u306b\u8aad\u307f\u51fa\u3059\u4e8b\u306f\u3067\u304d\u307e\u305b\u3093\u304c\u3001\u6700\u5f8c\u306e\u4f8b\u306e\u3088\u3046\u306b\u4e00\u90e8\u306e\u5217\u3060\u3051\u3092\u53c2\u7167\u3059\u308b\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3067\u3042\u308c\u3070\u5b9f\u884c\u53ef\u80fd\u3067\u3059\u3002 =# select pgstrom.arrow_fdw_import_file('mytest', '/tmp/wide2000.arrow'); arrow_fdw_import_file ----------------------- (1 row) =# \\d List of relations Schema | Name | Type | Owner --------+--------+---------------+-------- public | mytest | foreign table | kaigai (1 row) =# \\d mytest Foreign table \"public.mytest\" Column | Type | Collation | Nullable | Default | FDW options -----------+----------+-----------+----------+---------+------------- object_id | integer | | | | c000 | smallint | | | | c001 | smallint | | | | c002 | smallint | | | | c003 | smallint | | | | : : : : : : c1997 | smallint | | | | c1998 | smallint | | | | c1999 | smallint | | | | Server: arrow_fdw FDW options: (file '/tmp/wide2000.arrow') =# select * from mytest ; ERROR: target lists can have at most 1664 entries =# select c0010,c1234,c1999 from mytest limit 3; c0010 | c1234 | c1999 -------+-------+------- 232 | 232 | 232 537 | 537 | 537 219 | 219 | 219 (3 rows) GPU\u30ad\u30e3\u30c3\u30b7\u30e5 pgstrom.gpucache_info \u30b7\u30b9\u30c6\u30e0\u30d3\u30e5\u30fc GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u73fe\u5728\u306e\u72b6\u614b\u3092\u8868\u793a\u3057\u307e\u3059\u3002 \u3053\u306e\u30d3\u30e5\u30fc\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 name type description database_oid oid GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u5c5e\u3059\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306eOID\u3067\u3059 database_name text GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u5c5e\u3059\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u540d\u524d\u3067\u3059 table_oid oid GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306eOID\u3067\u3059\u3002\u5fc5\u305a\u3057\u3082\u73fe\u5728\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306f\u9650\u3089\u306a\u3044\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 table_name text GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u540d\u524d\u3067\u3059\u3002\u5fc5\u305a\u3057\u3082\u73fe\u5728\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306f\u9650\u3089\u306a\u3044\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 signature int8 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u4e00\u610f\u6027\u3092\u793a\u3059\u30cf\u30c3\u30b7\u30e5\u5024\u3067\u3059\u3002\u4f8b\u3048\u3070 ALTER TABLE \u306e\u524d\u5f8c\u306a\u3069\u3067\u3053\u306e\u5024\u304c\u5909\u308f\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 phase text GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u69cb\u7bc9\u306e\u6bb5\u968e\u3092\u793a\u3057\u307e\u3059\u3002 not_built , is_empty , is_loading , is_ready , corrupted \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002 rowid_num_used int8 \u5272\u5f53\u3066\u6e08\u307f\u306e\u884cID\u306e\u6570\u3067\u3059\u3002 rowid_num_free int8 \u672a\u5272\u5f53\u306e\u884cID\u306e\u6570\u3067\u3059\u3002 gpu_main_sz int8 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306e\u56fa\u5b9a\u9577\u30c7\u30fc\u30bf\u7528\u306e\u9818\u57df\u306e\u30b5\u30a4\u30ba\u3067\u3059\u3002 gpu_main_nitems int8 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306e\u30bf\u30d7\u30eb\u6570\u3067\u3059\u3002 gpu_extra_sz int8 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306e\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u7528\u306e\u9818\u57df\u306e\u30b5\u30a4\u30ba\u3067\u3059\u3002 gpu_extra_usage int8 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306e\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u9818\u57df\u306e\u4f7f\u7528\u6e08\u307f\u30b5\u30a4\u30ba\u3067\u3059\u3002 gpu_extra_dead int8 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306e\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u9818\u57df\u306e\u672a\u4f7f\u7528\u30b5\u30a4\u30ba\u3067\u3059\u3002 redo_write_ts timestamptz REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u3092\u6700\u5f8c\u306b\u66f4\u65b0\u3057\u305f\u6642\u523b\u3067\u3059\u3002 redo_write_nitems int8 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u6570\u3067\u3059\u3002 redo_write_pos int8 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u30d0\u30a4\u30c8\u6570\u3067\u3059\u3002 redo_read_nitems int8 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u304b\u3089\u8aad\u307f\u51fa\u3057\u3001GPU\u306b\u9069\u7528\u3055\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u6570\u3067\u3059\u3002 redo_read_pos int8 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u304b\u3089\u8aad\u307f\u51fa\u3057\u3001GPU\u306b\u9069\u7528\u3055\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u30d0\u30a4\u30c8\u6570\u3067\u3059\u3002 redo_sync_pos int8 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u66f8\u304d\u8fbc\u307e\u308c\u305fREDO\u30ed\u30b0\u306e\u3046\u3061\u3001\u65e2\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3078\u306e\u9069\u7528\u3092\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u305f\u4f4d\u7f6e\u3067\u3059\u3002REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306e\u6b8b\u308a\u5bb9\u91cf\u304c\u903c\u8feb\u3057\u3066\u304d\u305f\u969b\u306b\u3001\u591a\u6570\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u540c\u6642\u306b\u975e\u540c\u671f\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u767a\u751f\u3055\u305b\u308b\u4e8b\u3092\u907f\u3051\u308b\u305f\u3081\u3001\u5185\u90e8\u7684\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002 config_options text GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u6587\u5b57\u5217\u3067\u3059\u3002 \u4ee5\u4e0b\u306f pgstrom.gpucache_info \u30b7\u30b9\u30c6\u30e0\u30d3\u30e5\u30fc\u306e\u51fa\u529b\u4f8b\u3067\u3059\u3002 =# select * from pgstrom.gpucache_info ; database_oid | database_name | table_oid | table_name | signature | phase | rowid_num_used | rowid_num_free | gpu_main_sz | gpu_main_nitems | gpu_extra_sz | gpu_extra_usage | gpu_extra_dead | redo_write_ts | redo_write_nitems | redo_write_pos | redo_read_nitems | redo_read_pos | redo_sync_pos | config_options --------------+---------------+-----------+------------------+------------+----------+----------------+----------------+-------------+-----------------+--------------+-----------------+----------------+-------------------------------+-------------------+----------------+------------------+---------------+---------------+--------------------------------------------------------------------------------------------------------------------- 193450 | hoge | 603029 | cache_test_table | 4529357070 | is_ready | 4000 | 6000 | 439904 | 4000 | 3200024 | 473848 | 0 | 2023-12-18 01:25:42.850193+09 | 4000 | 603368 | 4000 | 603368 | 603368 | gpu_device_id=0,max_num_rows=10000,redo_buffer_size=157286400,gpu_sync_interval=4000000,gpu_sync_threshold=10485760 (1 row) trigger pgstrom.gpucache_sync_trigger() \u30c6\u30fc\u30d6\u30eb\u66f4\u65b0\u306e\u969b\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u540c\u671f\u3059\u308b\u305f\u3081\u306e\u30c8\u30ea\u30ac\u95a2\u6570\u3067\u3059\u3002\u8a73\u3057\u304f\u306f GPU\u30ad\u30e3\u30c3\u30b7\u30e5 \u306e\u7ae0\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 bigint pgstrom.gpucache_apply_redo(regclass) \u5f15\u6570\u3067\u6307\u5b9a\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u672a\u9069\u7528\u306eREDO\u30ed\u30b0\u3092\u5f37\u5236\u7684\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306b\u9069\u7528\u3057\u307e\u3059\u3002 bigint pgstrom.gpucache_compaction(regclass) \u5f15\u6570\u3067\u6307\u5b9a\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u30d0\u30c3\u30d5\u30a1\u3092\u5f37\u5236\u7684\u306b\u30b3\u30f3\u30d1\u30af\u30c8\u5316\u3057\u307e\u3059\u3002 bigint pgstrom.gpucache_recovery(regclass) \u7834\u640d\uff08corrupted\uff09\u72b6\u614b\u3068\u306a\u3063\u305fGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u5fa9\u5143\u3057\u3088\u3046\u3068\u8a66\u307f\u307e\u3059\u3002 \u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u751f\u6210 void pgstrom.random_setseed(int) \u4e71\u6570\u306e\u7cfb\u5217\u3092\u521d\u671f\u5316\u3057\u307e\u3059\u3002 bigint pgstrom.random_int(float=0.0, bigint=0, bigint=INT_MAX) bigint \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 float pgstrom.random_float(float=0.0, float=0.0, float=1.0) float \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 date pgstrom.random_date(float=0.0, date='2015-01-01', date='2025-12-31') date \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 time pgstrom.random_time(float=0.0, time='00:00:00', time='23:59:59') time \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 timetz pgstrom.random_timetz(float=0.0, time='00:00:00', time='23:59:59') timetz \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 timestamp pgstrom.random_timestamp(float=0.0, timestamp='2015-01-01', timestamp='2025-01-01') timestamp \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 macaddr pgstrom.random_macaddr(float=0.0, macaddr='ab:cd:00:00:00', macaddr='ab:cd:ff:ff:ff:ff') macaddr \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 inet pgstrom.random_inet(float=0.0, inet='192.168.0.1/16') inet \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 text pgstrom.random_text(float=0.0, text='test_**') text \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u751f\u6210\u3057\u307e\u3059\u3002\u7b2c\u4e8c\u5f15\u6570\u306e'*'\u6587\u5b57\u3092\u30e9\u30f3\u30c0\u30e0\u306b\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 text pgstrom.random_text_len(float=0.0, int=10) text \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u6587\u5b57\u5217\u9577\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 int4range pgstrom.random_int4range(float=0.0, bigint=0, bigint=INT_MAX) int4range \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002} int8range pgstrom.random_int8range(float=0.0, bigint=0, bigint=LONG_MAX) int8range \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 tsrange pgstrom.random_tsrange(float=0.0, timestamp='2015-01-01', timestamp='2025-01-01') tsrange \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 tstzrange pgstrom.random_tstzrange(float=0.0, timestamptz='2015-01-01', timestamptz='2025-01-01') tstzrange \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 daterange pgstrom.random_daterange(float=0.0, date='2015-01-01', date='2025-12-31') daterange \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 \u305d\u306e\u4ed6\u306e\u95a2\u6570 text pgstrom.githash() \u73fe\u5728\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308bPG-Strom\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u5143\u3068\u306a\u3063\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u30ea\u30d3\u30b8\u30e7\u30f3\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u3092\u8868\u793a\u3057\u307e\u3059\u3002\u3053\u306e\u5024\u306f\u3001\u969c\u5bb3\u6642\u306b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u30ea\u30d3\u30b8\u30e7\u30f3\u3092\u7279\u5b9a\u3059\u308b\u306e\u306b\u6709\u7528\u3067\u3059\u3002 postgres=# select pgstrom.githash(); githash ------------------------------------------ 103984be24cafd1e7ce6330a050960d97675c196 text pgstrom.license_query() \u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308c\u3070\u3001\u73fe\u5728\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308b\u5546\u7528\u30b5\u30d6\u30b9\u30af\u30ea\u30d7\u30b7\u30e7\u30f3\u3092\u8868\u793a\u3057\u307e\u3059\u3002 =# select pgstrom.license_query(); license_query ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { \"version\" : 2, \"serial_nr\" : \"HDB-TRIAL\", \"issued_at\" : \"2020-11-24\", \"expired_at\" : \"2025-12-31\", \"gpus\" : [ { \"uuid\" : \"GPU-8ba149db-53d8-c5f3-0f55-97ce8cfadb28\" } ]} (1 row)","title":"SQL\u30aa\u30d6\u30b8\u30a7\u30af\u30c8"},{"location":"ref_sqlfuncs/#sql","text":"\u672c\u7ae0\u3067\u306fPG-Strom\u304c\u72ec\u81ea\u306b\u63d0\u4f9b\u3059\u308bSQL\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002","title":"SQL\u30aa\u30d6\u30b8\u30a7\u30af\u30c8"},{"location":"ref_sqlfuncs/#_1","text":"pgstrom.device_info \u30b7\u30b9\u30c6\u30e0\u30d3\u30e5\u30fc PG-Strom\u7528\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305fGPU\u30c7\u30d0\u30a4\u30b9\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u8868\u793a\u3057\u307e\u3059\u3002 \u3053\u306e\u30d3\u30e5\u30fc\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 name type description gpu_id int GPU\u30c7\u30d0\u30a4\u30b9\u756a\u53f7 att_name text \u30c7\u30d0\u30a4\u30b9\u5c5e\u6027\u540d att_value text \u30c7\u30d0\u30a4\u30b9\u5c5e\u6027\u5024 att_desc text \u30c7\u30d0\u30a4\u30b9\u5c5e\u6027\u306e\u8aac\u660e GPU\u30c7\u30d0\u30a4\u30b9\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306f\u975e\u5e38\u306b\u6570\u304c\u591a\u304f\u3001\u307e\u305fCUDA\u30c9\u30e9\u30a4\u30d0\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u3088\u3063\u3066\u3082\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u6570\u306f\u307e\u3061\u307e\u3061\u3067\u3059\u3002 \u305d\u306e\u305f\u3081\u3001 pgstrom.device_info \u30b7\u30b9\u30c6\u30e0\u30d3\u30e5\u30fc\u3067\u306f\u3001GPU\u30c7\u30d0\u30a4\u30b9\u756a\u53f7( gpu_id )\u3068\u3001\u30c7\u30d0\u30a4\u30b9\u5c5e\u6027\u540d( att_name )\u306b\u3088\u3063\u3066\u5bfe\u8c61\u3068\u306a\u308b\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u7279\u5b9a\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u306f pgstrom.device_info \u30b7\u30b9\u30c6\u30e0\u30d3\u30e5\u30fc\u306e\u51fa\u529b\u4f8b\u3067\u3059\u3002 postgres=# select * from pgstrom.gpu_device_info limit 10; gpu_id | att_name | att_value | att_desc --------+-----------------------+------------------------------------------+------------------------------------- 0 | DEV_NAME | NVIDIA A100-PCIE-40GB | GPU Device Name 0 | DEV_ID | 0 | GPU Device ID 0 | DEV_UUID | GPU-13943bfd-5b30-38f5-0473-78979c134606 | GPU Device UUID 0 | DEV_TOTAL_MEMSZ | 39.39GB | GPU Total RAM Size 0 | DEV_BAR1_MEMSZ | 64.00GB | GPU PCI Bar1 Size 0 | NUMA_NODE_ID | -1 | GPU NUMA Node Id 0 | MAX_THREADS_PER_BLOCK | 1024 | Maximum number of threads per block 0 | MAX_BLOCK_DIM_X | 1024 | Maximum block dimension X 0 | MAX_BLOCK_DIM_Y | 1024 | Maximum block dimension Y 0 | MAX_BLOCK_DIM_Z | 64 | Maximum block dimension Z (10 rows)","title":"\u30b7\u30b9\u30c6\u30e0\u60c5\u5831"},{"location":"ref_sqlfuncs/#arrow_fdw","text":"fdw_handler pgstrom.arrow_fdw_handler() Arrow_Fdw\u306eFDW\u30cf\u30f3\u30c9\u30e9\u95a2\u6570\u3067\u3059\u3002\u901a\u5e38\u3001\u30e6\u30fc\u30b6\u304c\u3053\u306e\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002 void pgstrom.arrow_fdw_validator(text[], oid) Arrow_Fdw\u306eFDW\u30aa\u30d7\u30b7\u30e7\u30f3\u691c\u8a3c\u7528\u95a2\u6570\u3067\u3059\u3002\u901a\u5e38\u3001\u30e6\u30fc\u30b6\u304c\u3053\u306e\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002 event_trigger pgstrom.arrow_fdw_precheck_schema() Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u305f\u3081\u306e\u30a4\u30d9\u30f3\u30c8\u30c8\u30ea\u30ac\u95a2\u6570\u3067\u3059\u3002\u901a\u5e38\u3001\u30e6\u30fc\u30b6\u304c\u3053\u306e\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002 void pgstrom.arrow_fdw_import_file(text, text, text = null) Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3001\u65b0\u305f\u306b\u5916\u90e8\u30c6\u30fc\u30d6\u30eb(foreign table)\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002\u7b2c\u4e00\u5f15\u6570\u306f\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u540d\u524d\u3001\u7b2c\u4e8c\u5f15\u6570\u306fApache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u3001\u7701\u7565\u53ef\u80fd\u306a\u7b2c\u4e09\u5f15\u6570\u306f\u30b9\u30ad\u30fc\u30de\u540d\u3067\u3059\u3002 \u3053\u306e\u95a2\u6570\u306f IMPORT FOREIGN SCHEMA \u69cb\u6587\u306b\u4f3c\u3066\u3044\u307e\u3059\u304c\u3001PostgreSQL\u306b\u304a\u3051\u308b\u30c6\u30fc\u30d6\u30eb\u306e\u5217\u6570\u5236\u9650\uff08 MaxTupleAttributeNumber = 1664\uff09\u3092\u8d8a\u3048\u308b\u5217\u304c\u5b9a\u7fa9\u3055\u308c\u305fApache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3067\u304d\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u3053\u308c\u306b\u8a72\u5f53\u3057\u306a\u3044\u5927\u534a\u306e\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3067\u306f IMPORT FOREIGN SCHEMA \u69cb\u6587\u3092\u5229\u7528\u3059\u3079\u304d\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001 pgstrom.arrow_fdw_import_file \u3092\u7528\u3044\u30662000\u500b\u306eInt16\u5217\u3092\u6301\u3064Apache Arrow\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u305f\u3082\u306e\u3067\u3059\u3002 \\d mytest \u306e\u5b9f\u884c\u7d50\u679c\u3088\u308a\u3001\u65b0\u305f\u306b\u4f5c\u6210\u3055\u308c\u305f\u5916\u90e8\u30c6\u30fc\u30d6\u30eb mytest \u304c2000\u500b\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u6301\u3063\u3066\u3044\u308b\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 PostgreSQL\u5185\u90e8\u8868\u73fe\u306e\u90fd\u5408\u4e0a\u3001\u5168\u3066\u306e\u5217\u3092\u4e00\u5ea6\u306b\u8aad\u307f\u51fa\u3059\u4e8b\u306f\u3067\u304d\u307e\u305b\u3093\u304c\u3001\u6700\u5f8c\u306e\u4f8b\u306e\u3088\u3046\u306b\u4e00\u90e8\u306e\u5217\u3060\u3051\u3092\u53c2\u7167\u3059\u308b\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3067\u3042\u308c\u3070\u5b9f\u884c\u53ef\u80fd\u3067\u3059\u3002 =# select pgstrom.arrow_fdw_import_file('mytest', '/tmp/wide2000.arrow'); arrow_fdw_import_file ----------------------- (1 row) =# \\d List of relations Schema | Name | Type | Owner --------+--------+---------------+-------- public | mytest | foreign table | kaigai (1 row) =# \\d mytest Foreign table \"public.mytest\" Column | Type | Collation | Nullable | Default | FDW options -----------+----------+-----------+----------+---------+------------- object_id | integer | | | | c000 | smallint | | | | c001 | smallint | | | | c002 | smallint | | | | c003 | smallint | | | | : : : : : : c1997 | smallint | | | | c1998 | smallint | | | | c1999 | smallint | | | | Server: arrow_fdw FDW options: (file '/tmp/wide2000.arrow') =# select * from mytest ; ERROR: target lists can have at most 1664 entries =# select c0010,c1234,c1999 from mytest limit 3; c0010 | c1234 | c1999 -------+-------+------- 232 | 232 | 232 537 | 537 | 537 219 | 219 | 219 (3 rows)","title":"Arrow_Fdw"},{"location":"ref_sqlfuncs/#gpu","text":"pgstrom.gpucache_info \u30b7\u30b9\u30c6\u30e0\u30d3\u30e5\u30fc GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u73fe\u5728\u306e\u72b6\u614b\u3092\u8868\u793a\u3057\u307e\u3059\u3002 \u3053\u306e\u30d3\u30e5\u30fc\u306e\u30b9\u30ad\u30fc\u30de\u5b9a\u7fa9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 name type description database_oid oid GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u5c5e\u3059\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306eOID\u3067\u3059 database_name text GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u5c5e\u3059\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u540d\u524d\u3067\u3059 table_oid oid GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306eOID\u3067\u3059\u3002\u5fc5\u305a\u3057\u3082\u73fe\u5728\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306f\u9650\u3089\u306a\u3044\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 table_name text GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u8a2d\u5b9a\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u540d\u524d\u3067\u3059\u3002\u5fc5\u305a\u3057\u3082\u73fe\u5728\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306f\u9650\u3089\u306a\u3044\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 signature int8 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u4e00\u610f\u6027\u3092\u793a\u3059\u30cf\u30c3\u30b7\u30e5\u5024\u3067\u3059\u3002\u4f8b\u3048\u3070 ALTER TABLE \u306e\u524d\u5f8c\u306a\u3069\u3067\u3053\u306e\u5024\u304c\u5909\u308f\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 phase text GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u69cb\u7bc9\u306e\u6bb5\u968e\u3092\u793a\u3057\u307e\u3059\u3002 not_built , is_empty , is_loading , is_ready , corrupted \u306e\u3044\u305a\u308c\u304b\u3067\u3059\u3002 rowid_num_used int8 \u5272\u5f53\u3066\u6e08\u307f\u306e\u884cID\u306e\u6570\u3067\u3059\u3002 rowid_num_free int8 \u672a\u5272\u5f53\u306e\u884cID\u306e\u6570\u3067\u3059\u3002 gpu_main_sz int8 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306e\u56fa\u5b9a\u9577\u30c7\u30fc\u30bf\u7528\u306e\u9818\u57df\u306e\u30b5\u30a4\u30ba\u3067\u3059\u3002 gpu_main_nitems int8 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306e\u30bf\u30d7\u30eb\u6570\u3067\u3059\u3002 gpu_extra_sz int8 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306e\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u7528\u306e\u9818\u57df\u306e\u30b5\u30a4\u30ba\u3067\u3059\u3002 gpu_extra_usage int8 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306e\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u9818\u57df\u306e\u4f7f\u7528\u6e08\u307f\u30b5\u30a4\u30ba\u3067\u3059\u3002 gpu_extra_dead int8 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u4e0a\u306e\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u9818\u57df\u306e\u672a\u4f7f\u7528\u30b5\u30a4\u30ba\u3067\u3059\u3002 redo_write_ts timestamptz REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u3092\u6700\u5f8c\u306b\u66f4\u65b0\u3057\u305f\u6642\u523b\u3067\u3059\u3002 redo_write_nitems int8 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u6570\u3067\u3059\u3002 redo_write_pos int8 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u30d0\u30a4\u30c8\u6570\u3067\u3059\u3002 redo_read_nitems int8 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u304b\u3089\u8aad\u307f\u51fa\u3057\u3001GPU\u306b\u9069\u7528\u3055\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u6570\u3067\u3059\u3002 redo_read_pos int8 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u304b\u3089\u8aad\u307f\u51fa\u3057\u3001GPU\u306b\u9069\u7528\u3055\u308c\u305fREDO\u30ed\u30b0\u306e\u7dcf\u30d0\u30a4\u30c8\u6570\u3067\u3059\u3002 redo_sync_pos int8 REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u66f8\u304d\u8fbc\u307e\u308c\u305fREDO\u30ed\u30b0\u306e\u3046\u3061\u3001\u65e2\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3078\u306e\u9069\u7528\u3092\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3057\u305f\u4f4d\u7f6e\u3067\u3059\u3002REDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306e\u6b8b\u308a\u5bb9\u91cf\u304c\u903c\u8feb\u3057\u3066\u304d\u305f\u969b\u306b\u3001\u591a\u6570\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u540c\u6642\u306b\u975e\u540c\u671f\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u767a\u751f\u3055\u305b\u308b\u4e8b\u3092\u907f\u3051\u308b\u305f\u3081\u3001\u5185\u90e8\u7684\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002 config_options text GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u6587\u5b57\u5217\u3067\u3059\u3002 \u4ee5\u4e0b\u306f pgstrom.gpucache_info \u30b7\u30b9\u30c6\u30e0\u30d3\u30e5\u30fc\u306e\u51fa\u529b\u4f8b\u3067\u3059\u3002 =# select * from pgstrom.gpucache_info ; database_oid | database_name | table_oid | table_name | signature | phase | rowid_num_used | rowid_num_free | gpu_main_sz | gpu_main_nitems | gpu_extra_sz | gpu_extra_usage | gpu_extra_dead | redo_write_ts | redo_write_nitems | redo_write_pos | redo_read_nitems | redo_read_pos | redo_sync_pos | config_options --------------+---------------+-----------+------------------+------------+----------+----------------+----------------+-------------+-----------------+--------------+-----------------+----------------+-------------------------------+-------------------+----------------+------------------+---------------+---------------+--------------------------------------------------------------------------------------------------------------------- 193450 | hoge | 603029 | cache_test_table | 4529357070 | is_ready | 4000 | 6000 | 439904 | 4000 | 3200024 | 473848 | 0 | 2023-12-18 01:25:42.850193+09 | 4000 | 603368 | 4000 | 603368 | 603368 | gpu_device_id=0,max_num_rows=10000,redo_buffer_size=157286400,gpu_sync_interval=4000000,gpu_sync_threshold=10485760 (1 row) trigger pgstrom.gpucache_sync_trigger() \u30c6\u30fc\u30d6\u30eb\u66f4\u65b0\u306e\u969b\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u540c\u671f\u3059\u308b\u305f\u3081\u306e\u30c8\u30ea\u30ac\u95a2\u6570\u3067\u3059\u3002\u8a73\u3057\u304f\u306f GPU\u30ad\u30e3\u30c3\u30b7\u30e5 \u306e\u7ae0\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 bigint pgstrom.gpucache_apply_redo(regclass) \u5f15\u6570\u3067\u6307\u5b9a\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u672a\u9069\u7528\u306eREDO\u30ed\u30b0\u3092\u5f37\u5236\u7684\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u306b\u9069\u7528\u3057\u307e\u3059\u3002 bigint pgstrom.gpucache_compaction(regclass) \u5f15\u6570\u3067\u6307\u5b9a\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u30d0\u30c3\u30d5\u30a1\u3092\u5f37\u5236\u7684\u306b\u30b3\u30f3\u30d1\u30af\u30c8\u5316\u3057\u307e\u3059\u3002 bigint pgstrom.gpucache_recovery(regclass) \u7834\u640d\uff08corrupted\uff09\u72b6\u614b\u3068\u306a\u3063\u305fGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u5fa9\u5143\u3057\u3088\u3046\u3068\u8a66\u307f\u307e\u3059\u3002","title":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5"},{"location":"ref_sqlfuncs/#_2","text":"void pgstrom.random_setseed(int) \u4e71\u6570\u306e\u7cfb\u5217\u3092\u521d\u671f\u5316\u3057\u307e\u3059\u3002 bigint pgstrom.random_int(float=0.0, bigint=0, bigint=INT_MAX) bigint \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 float pgstrom.random_float(float=0.0, float=0.0, float=1.0) float \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 date pgstrom.random_date(float=0.0, date='2015-01-01', date='2025-12-31') date \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 time pgstrom.random_time(float=0.0, time='00:00:00', time='23:59:59') time \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 timetz pgstrom.random_timetz(float=0.0, time='00:00:00', time='23:59:59') timetz \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 timestamp pgstrom.random_timestamp(float=0.0, timestamp='2015-01-01', timestamp='2025-01-01') timestamp \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 macaddr pgstrom.random_macaddr(float=0.0, macaddr='ab:cd:00:00:00', macaddr='ab:cd:ff:ff:ff:ff') macaddr \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 inet pgstrom.random_inet(float=0.0, inet='192.168.0.1/16') inet \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 text pgstrom.random_text(float=0.0, text='test_**') text \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u751f\u6210\u3057\u307e\u3059\u3002\u7b2c\u4e8c\u5f15\u6570\u306e'*'\u6587\u5b57\u3092\u30e9\u30f3\u30c0\u30e0\u306b\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 text pgstrom.random_text_len(float=0.0, int=10) text \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u6587\u5b57\u5217\u9577\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 int4range pgstrom.random_int4range(float=0.0, bigint=0, bigint=INT_MAX) int4range \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002} int8range pgstrom.random_int8range(float=0.0, bigint=0, bigint=LONG_MAX) int8range \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 tsrange pgstrom.random_tsrange(float=0.0, timestamp='2015-01-01', timestamp='2025-01-01') tsrange \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 tstzrange pgstrom.random_tstzrange(float=0.0, timestamptz='2015-01-01', timestamptz='2025-01-01') tstzrange \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002 daterange pgstrom.random_daterange(float=0.0, date='2015-01-01', date='2025-12-31') daterange \u578b\u306e\u30e9\u30f3\u30c0\u30e0\u30c7\u30fc\u30bf\u3092\u6307\u5b9a\u306e\u7bc4\u56f2\u5185\u3067\u751f\u6210\u3057\u307e\u3059\u3002","title":"\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u751f\u6210"},{"location":"ref_sqlfuncs/#_3","text":"text pgstrom.githash() \u73fe\u5728\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308bPG-Strom\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u5143\u3068\u306a\u3063\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u30ea\u30d3\u30b8\u30e7\u30f3\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u3092\u8868\u793a\u3057\u307e\u3059\u3002\u3053\u306e\u5024\u306f\u3001\u969c\u5bb3\u6642\u306b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u30ea\u30d3\u30b8\u30e7\u30f3\u3092\u7279\u5b9a\u3059\u308b\u306e\u306b\u6709\u7528\u3067\u3059\u3002 postgres=# select pgstrom.githash(); githash ------------------------------------------ 103984be24cafd1e7ce6330a050960d97675c196 text pgstrom.license_query() \u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308c\u3070\u3001\u73fe\u5728\u30ed\u30fc\u30c9\u3055\u308c\u3066\u3044\u308b\u5546\u7528\u30b5\u30d6\u30b9\u30af\u30ea\u30d7\u30b7\u30e7\u30f3\u3092\u8868\u793a\u3057\u307e\u3059\u3002 =# select pgstrom.license_query(); license_query ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- { \"version\" : 2, \"serial_nr\" : \"HDB-TRIAL\", \"issued_at\" : \"2020-11-24\", \"expired_at\" : \"2025-12-31\", \"gpus\" : [ { \"uuid\" : \"GPU-8ba149db-53d8-c5f3-0f55-97ce8cfadb28\" } ]} (1 row)","title":"\u305d\u306e\u4ed6\u306e\u95a2\u6570"},{"location":"ref_types/","text":"\u30c7\u30fc\u30bf\u578b PG-Strom\u306f\u4ee5\u4e0b\u306e\u30c7\u30fc\u30bf\u578b\u3092GPU\u3067\u5229\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u6570\u5024\u30c7\u30fc\u30bf\u578b int1 [\u30c7\u30fc\u30bf\u9577: 1byte] 8bit\u6574\u6570\u578b\u3002PG-Strom\u306b\u3088\u308b\u72ec\u81ea\u62e1\u5f35 int2 (\u5225\u540d smallint ) [\u30c7\u30fc\u30bf\u9577: 2bytes] 16bit\u6574\u6570\u578b int4 (\u5225\u540d int ) [\u30c7\u30fc\u30bf\u9577: 4bytes] 32bit\u6574\u6570\u578b int8 (\u5225\u540d bigint ) [\u30c7\u30fc\u30bf\u9577: 8bytes] 64bit\u6574\u6570\u578b float2 [\u30c7\u30fc\u30bf\u9577: 2bytes] \u534a\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u3002PG-Strom\u306b\u3088\u308b\u72ec\u81ea\u62e1\u5f35 Note GPU\u3067\u306f\u534a\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u304c\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u3067\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001CPU(x86_64\u30d7\u30ed\u30bb\u30c3\u30b5)\u3067\u306f\u672a\u5bfe\u5fdc\u3067\u3059\u3002\u305d\u306e\u305f\u3081\u3001 float2 \u30c7\u30fc\u30bf\u578b\u3092CPU\u3067\u51e6\u7406\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u3053\u308c\u3092\u4e00\u5ea6 float \u3084 double \u578b\u306b\u5909\u63db\u3057\u305f\u4e0a\u3067\u6f14\u7b97\u3092\u884c\u3044\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001GPU\u306e\u3088\u3046\u306b float2 \u306e\u65b9\u304c\u6f14\u7b97\u901f\u5ea6\u3067\u6709\u5229\u3068\u3044\u3046\u4e8b\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u6a5f\u68b0\u5b66\u7fd2\u3084\u7d71\u8a08\u89e3\u6790\u7528\u9014\u306b\u30c7\u30fc\u30bf\u91cf\u3092\u6291\u5236\u3059\u308b\u305f\u3081\u306e\u6a5f\u80fd\u3067\u3059\u3002 float4 (\u5225\u540d real ) [\u30c7\u30fc\u30bf\u9577: 4bytes] \u5358\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b float8 (\u5225\u540d double precision ) [\u30c7\u30fc\u30bf\u9577: 8bytes] \u500d\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b numeric [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909] \u5b9f\u6570\u578b\u3002GPU\u5074\u3067\u306f128bit\u56fa\u5b9a\u5c0f\u6570\u70b9\u3068\u3057\u3066\u6271\u308f\u308c\u308b\u3002 Note GPU\u304c numeric \u578b\u306e\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u969b\u3001\u5b9f\u88c5\u4e0a\u306e\u7406\u7531\u304b\u3089\u3053\u308c\u3092128bit\u56fa\u5b9a\u5c11\u6570\u70b9\u306e\u5185\u90e8\u8868\u73fe\u306b\u5909\u63db\u3057\u3066\u51e6\u7406\u3057\u307e\u3059\u3002\uff08\u3053\u308c\u306f Apache Arrow \u306e Decimal \u578b\u3068\u540c\u4e00\u306e\u5f62\u5f0f\u3067\u3059\uff09 \u3053\u308c\u3089\u5185\u90e8\u8868\u73fe\u3078\u306e/\u304b\u3089\u306e\u5909\u63db\u306f\u900f\u904e\u7684\u306b\u884c\u308f\u308c\u307e\u3059\u304c\u3001\u4f8b\u3048\u3070\u3001\u6841\u6570\u306e\u5927\u304d\u306a numeric \u578b\u306e\u30c7\u30fc\u30bf\u306f\u8868\u73fe\u3059\u308b\u4e8b\u304c\u3067\u304d\u306a\u3044\u305f\u3081\u3001PG-Strom\u306fCPU\u5074\u3067\u306e\u30d5\u30a9\u30fc\u30eb\u30d0\u30c3\u30af\u51e6\u7406\u3092\u8a66\u307f\u307e\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u6841\u6570\u306e\u5927\u304d\u306a numeric \u578b\u306e\u30c7\u30fc\u30bf\u3092GPU\u306b\u4e0e\u3048\u308b\u3068\u5374\u3063\u3066\u5b9f\u884c\u901f\u5ea6\u304c\u4f4e\u4e0b\u3057\u3066\u3057\u307e\u3046\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002 \u3053\u308c\u3092\u907f\u3051\u308b\u306b\u306f\u3001GUC\u30d1\u30e9\u30e1\u30fc\u30bf pg_strom.enable_numeric_type \u3092\u4f7f\u7528\u3057\u3066 numeric \u30c7\u30fc\u30bf\u578b\u3092\u542b\u3080\u6f14\u7b97\u5f0f\u3092GPU\u3067\u5b9f\u884c\u3057\u306a\u3044\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002 \u65e5\u4ed8\u6642\u523b\u578b date [\u30c7\u30fc\u30bf\u9577: 4bytes] \u65e5\u4ed8\u30c7\u30fc\u30bf\u578b time (\u5225\u540d time without time zone ) [\u30c7\u30fc\u30bf\u9577: 8bytes] \u6642\u523b\u30c7\u30fc\u30bf\u578b timetz (\u5225\u540d time with time zone ) [\u30c7\u30fc\u30bf\u9577: 12bytes] \u6642\u523b\u30c7\u30fc\u30bf\u578b\uff08\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u4ed8\u304d\uff09 timestamp (\u5225\u540d timestamp without time zone ) [\u30c7\u30fc\u30bf\u9577: 8bytes] \u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u578b timestamptz (\u5225\u540d timestamp with time zone ) [\u30c7\u30fc\u30bf\u9577: 8bytes] \u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u578b\uff08\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u4ed8\u304d\uff09 interval [\u30c7\u30fc\u30bf\u9577: 16bytes] \u6642\u9593\u9593\u9694\u578b \u53ef\u5909\u9577\u30c7\u30fc\u30bf\u578b bpchar [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909\u9577] \u53ef\u5909\u9577\u30c6\u30ad\u30b9\u30c8\u578b\uff08\u7a7a\u767d\u30d1\u30c7\u30a3\u30f3\u30b0\u3042\u308a\uff09 varchar [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909\u9577] \u53ef\u5909\u9577\u30c6\u30ad\u30b9\u30c8\u578b text [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909\u9577] \u53ef\u5909\u9577\u30c6\u30ad\u30b9\u30c8\u578b bytea [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909\u9577] \u53ef\u5909\u9577\u30d0\u30a4\u30ca\u30ea\u578b \u975e\u69cb\u9020\u30c7\u30fc\u30bf\u578b jsonb [length: \u53ef\u5909\u9577] \u30d0\u30a4\u30ca\u30ea\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u5185\u5305\u3059\u308bJSON\u30c7\u30fc\u30bf\u578b Note jsonb \u30c7\u30fc\u30bf\u578b\u3092GPU\u3067\u51e6\u7406\u3055\u305b\u308b\u5834\u5408\u306b\u306f\u3001\u6b21\u306e2\u3064\u306e\u70b9\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u5b9f\u969b\u306b\u53c2\u7167\u3055\u308c\u306a\u3044\u5c5e\u6027\u3082\u30b9\u30c8\u30ec\u30fc\u30b8\u304b\u3089\u8aad\u307f\u51fa\u3057\u3001GPU\u306b\u8ee2\u9001\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u305f\u3081\u3001I/O\u30d0\u30b9\u306e\u5229\u7528\u52b9\u7387\u306f\u5fc5\u305a\u3057\u3082\u826f\u304f\u306a\u3044\u30c7\u30fc\u30bf\u578b\u3067\u3042\u308b\u4e8b\u3002\u30c7\u30fc\u30bf\u9577\u304c TOAST\u5316 \u306e\u95be\u5024\uff08\u901a\u5e38\u306f2kB\u5f31\uff09\u3092\u8d8a\u3048\u3066\u3057\u307e\u3063\u305f\u5834\u5408\u3001 jsonb \u30c7\u30fc\u30bf\u5168\u4f53\u304cTOAST\u30c6\u30fc\u30d6\u30eb\u3078\u66f8\u304d\u51fa\u3055\u308c\u308b\u305f\u3081\u3001GPU\u5074\u3067\u306f\u51e6\u7406\u3067\u304d\u305a\u975e\u52b9\u7387\u306aCPU-fallback\u51e6\u7406\u3092\u547c\u3073\u51fa\u3057\u3066\u3057\u307e\u3046\u4e8b\u3002 \u5f8c\u8005\u306e\u554f\u984c\u306b\u5bfe\u3057\u3066\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u30aa\u30d7\u30b7\u30e7\u30f3 toast_tuple_target \u3092\u62e1\u5927\u3057\u3001TOAST\u5316\u306e\u95be\u5024\u3092\u5f15\u304d\u4e0a\u3052\u308b\u4e8b\u3067\u3042\u308b\u7a0b\u5ea6\u306f\u56de\u907f\u3059\u308b\u4e8b\u3082\u53ef\u80fd\u3067\u3059\u3002 \u96d1\u591a\u306a\u30c7\u30fc\u30bf\u578b boolean [\u30c7\u30fc\u30bf\u9577: 1byte] \u8ad6\u7406\u5024\u30c7\u30fc\u30bf\u578b money [\u30c7\u30fc\u30bf\u9577: 8bytes] \u901a\u8ca8\u30c7\u30fc\u30bf\u578b uuid [\u30c7\u30fc\u30bf\u9577: 16bytes] UUID\u30c7\u30fc\u30bf\u578b macaddr [\u30c7\u30fc\u30bf\u9577: 6bytes] \u30cd\u30c3\u30c8\u30ef\u30fc\u30afMAC\u30a2\u30c9\u30ec\u30b9\u578b inet [\u30c7\u30fc\u30bf\u9577: 7 or 19bytes] \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u578b cidr [\u30c7\u30fc\u30bf\u9577: 7 or 19butes] \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u578b cube [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909\u9577] contrib/cube \u306b\u3088\u3063\u3066\u63d0\u4f9b\u3055\u308c\u308b\u62e1\u5f35\u30c7\u30fc\u30bf\u578b \u30b8\u30aa\u30e1\u30c8\u30ea\u578b geometry [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909] PostGIS\u30b8\u30aa\u30e1\u30c8\u30ea\u30aa\u30d6\u30b8\u30a7\u30af\u30c8 box2df [\u30c7\u30fc\u30bf\u9577: 16bytes] 2\u6b21\u5143\u30d0\u30a6\u30f3\u30c7\u30a3\u30f3\u30b0\u30dc\u30c3\u30af\u30b9\uff08GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u7528\uff09","title":"\u30c7\u30fc\u30bf\u578b"},{"location":"ref_types/#_1","text":"PG-Strom\u306f\u4ee5\u4e0b\u306e\u30c7\u30fc\u30bf\u578b\u3092GPU\u3067\u5229\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002","title":"\u30c7\u30fc\u30bf\u578b"},{"location":"ref_types/#_2","text":"int1 [\u30c7\u30fc\u30bf\u9577: 1byte] 8bit\u6574\u6570\u578b\u3002PG-Strom\u306b\u3088\u308b\u72ec\u81ea\u62e1\u5f35 int2 (\u5225\u540d smallint ) [\u30c7\u30fc\u30bf\u9577: 2bytes] 16bit\u6574\u6570\u578b int4 (\u5225\u540d int ) [\u30c7\u30fc\u30bf\u9577: 4bytes] 32bit\u6574\u6570\u578b int8 (\u5225\u540d bigint ) [\u30c7\u30fc\u30bf\u9577: 8bytes] 64bit\u6574\u6570\u578b float2 [\u30c7\u30fc\u30bf\u9577: 2bytes] \u534a\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u3002PG-Strom\u306b\u3088\u308b\u72ec\u81ea\u62e1\u5f35 Note GPU\u3067\u306f\u534a\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u304c\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u3067\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001CPU(x86_64\u30d7\u30ed\u30bb\u30c3\u30b5)\u3067\u306f\u672a\u5bfe\u5fdc\u3067\u3059\u3002\u305d\u306e\u305f\u3081\u3001 float2 \u30c7\u30fc\u30bf\u578b\u3092CPU\u3067\u51e6\u7406\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u3053\u308c\u3092\u4e00\u5ea6 float \u3084 double \u578b\u306b\u5909\u63db\u3057\u305f\u4e0a\u3067\u6f14\u7b97\u3092\u884c\u3044\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001GPU\u306e\u3088\u3046\u306b float2 \u306e\u65b9\u304c\u6f14\u7b97\u901f\u5ea6\u3067\u6709\u5229\u3068\u3044\u3046\u4e8b\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u6a5f\u68b0\u5b66\u7fd2\u3084\u7d71\u8a08\u89e3\u6790\u7528\u9014\u306b\u30c7\u30fc\u30bf\u91cf\u3092\u6291\u5236\u3059\u308b\u305f\u3081\u306e\u6a5f\u80fd\u3067\u3059\u3002 float4 (\u5225\u540d real ) [\u30c7\u30fc\u30bf\u9577: 4bytes] \u5358\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b float8 (\u5225\u540d double precision ) [\u30c7\u30fc\u30bf\u9577: 8bytes] \u500d\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b numeric [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909] \u5b9f\u6570\u578b\u3002GPU\u5074\u3067\u306f128bit\u56fa\u5b9a\u5c0f\u6570\u70b9\u3068\u3057\u3066\u6271\u308f\u308c\u308b\u3002 Note GPU\u304c numeric \u578b\u306e\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u969b\u3001\u5b9f\u88c5\u4e0a\u306e\u7406\u7531\u304b\u3089\u3053\u308c\u3092128bit\u56fa\u5b9a\u5c11\u6570\u70b9\u306e\u5185\u90e8\u8868\u73fe\u306b\u5909\u63db\u3057\u3066\u51e6\u7406\u3057\u307e\u3059\u3002\uff08\u3053\u308c\u306f Apache Arrow \u306e Decimal \u578b\u3068\u540c\u4e00\u306e\u5f62\u5f0f\u3067\u3059\uff09 \u3053\u308c\u3089\u5185\u90e8\u8868\u73fe\u3078\u306e/\u304b\u3089\u306e\u5909\u63db\u306f\u900f\u904e\u7684\u306b\u884c\u308f\u308c\u307e\u3059\u304c\u3001\u4f8b\u3048\u3070\u3001\u6841\u6570\u306e\u5927\u304d\u306a numeric \u578b\u306e\u30c7\u30fc\u30bf\u306f\u8868\u73fe\u3059\u308b\u4e8b\u304c\u3067\u304d\u306a\u3044\u305f\u3081\u3001PG-Strom\u306fCPU\u5074\u3067\u306e\u30d5\u30a9\u30fc\u30eb\u30d0\u30c3\u30af\u51e6\u7406\u3092\u8a66\u307f\u307e\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u6841\u6570\u306e\u5927\u304d\u306a numeric \u578b\u306e\u30c7\u30fc\u30bf\u3092GPU\u306b\u4e0e\u3048\u308b\u3068\u5374\u3063\u3066\u5b9f\u884c\u901f\u5ea6\u304c\u4f4e\u4e0b\u3057\u3066\u3057\u307e\u3046\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002 \u3053\u308c\u3092\u907f\u3051\u308b\u306b\u306f\u3001GUC\u30d1\u30e9\u30e1\u30fc\u30bf pg_strom.enable_numeric_type \u3092\u4f7f\u7528\u3057\u3066 numeric \u30c7\u30fc\u30bf\u578b\u3092\u542b\u3080\u6f14\u7b97\u5f0f\u3092GPU\u3067\u5b9f\u884c\u3057\u306a\u3044\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002","title":"\u6570\u5024\u30c7\u30fc\u30bf\u578b"},{"location":"ref_types/#_3","text":"date [\u30c7\u30fc\u30bf\u9577: 4bytes] \u65e5\u4ed8\u30c7\u30fc\u30bf\u578b time (\u5225\u540d time without time zone ) [\u30c7\u30fc\u30bf\u9577: 8bytes] \u6642\u523b\u30c7\u30fc\u30bf\u578b timetz (\u5225\u540d time with time zone ) [\u30c7\u30fc\u30bf\u9577: 12bytes] \u6642\u523b\u30c7\u30fc\u30bf\u578b\uff08\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u4ed8\u304d\uff09 timestamp (\u5225\u540d timestamp without time zone ) [\u30c7\u30fc\u30bf\u9577: 8bytes] \u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u578b timestamptz (\u5225\u540d timestamp with time zone ) [\u30c7\u30fc\u30bf\u9577: 8bytes] \u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u578b\uff08\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u4ed8\u304d\uff09 interval [\u30c7\u30fc\u30bf\u9577: 16bytes] \u6642\u9593\u9593\u9694\u578b","title":"\u65e5\u4ed8\u6642\u523b\u578b"},{"location":"ref_types/#_4","text":"bpchar [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909\u9577] \u53ef\u5909\u9577\u30c6\u30ad\u30b9\u30c8\u578b\uff08\u7a7a\u767d\u30d1\u30c7\u30a3\u30f3\u30b0\u3042\u308a\uff09 varchar [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909\u9577] \u53ef\u5909\u9577\u30c6\u30ad\u30b9\u30c8\u578b text [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909\u9577] \u53ef\u5909\u9577\u30c6\u30ad\u30b9\u30c8\u578b bytea [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909\u9577] \u53ef\u5909\u9577\u30d0\u30a4\u30ca\u30ea\u578b","title":"\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u578b"},{"location":"ref_types/#_5","text":"jsonb [length: \u53ef\u5909\u9577] \u30d0\u30a4\u30ca\u30ea\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u5185\u5305\u3059\u308bJSON\u30c7\u30fc\u30bf\u578b Note jsonb \u30c7\u30fc\u30bf\u578b\u3092GPU\u3067\u51e6\u7406\u3055\u305b\u308b\u5834\u5408\u306b\u306f\u3001\u6b21\u306e2\u3064\u306e\u70b9\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u5b9f\u969b\u306b\u53c2\u7167\u3055\u308c\u306a\u3044\u5c5e\u6027\u3082\u30b9\u30c8\u30ec\u30fc\u30b8\u304b\u3089\u8aad\u307f\u51fa\u3057\u3001GPU\u306b\u8ee2\u9001\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u305f\u3081\u3001I/O\u30d0\u30b9\u306e\u5229\u7528\u52b9\u7387\u306f\u5fc5\u305a\u3057\u3082\u826f\u304f\u306a\u3044\u30c7\u30fc\u30bf\u578b\u3067\u3042\u308b\u4e8b\u3002\u30c7\u30fc\u30bf\u9577\u304c TOAST\u5316 \u306e\u95be\u5024\uff08\u901a\u5e38\u306f2kB\u5f31\uff09\u3092\u8d8a\u3048\u3066\u3057\u307e\u3063\u305f\u5834\u5408\u3001 jsonb \u30c7\u30fc\u30bf\u5168\u4f53\u304cTOAST\u30c6\u30fc\u30d6\u30eb\u3078\u66f8\u304d\u51fa\u3055\u308c\u308b\u305f\u3081\u3001GPU\u5074\u3067\u306f\u51e6\u7406\u3067\u304d\u305a\u975e\u52b9\u7387\u306aCPU-fallback\u51e6\u7406\u3092\u547c\u3073\u51fa\u3057\u3066\u3057\u307e\u3046\u4e8b\u3002 \u5f8c\u8005\u306e\u554f\u984c\u306b\u5bfe\u3057\u3066\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u30aa\u30d7\u30b7\u30e7\u30f3 toast_tuple_target \u3092\u62e1\u5927\u3057\u3001TOAST\u5316\u306e\u95be\u5024\u3092\u5f15\u304d\u4e0a\u3052\u308b\u4e8b\u3067\u3042\u308b\u7a0b\u5ea6\u306f\u56de\u907f\u3059\u308b\u4e8b\u3082\u53ef\u80fd\u3067\u3059\u3002","title":"\u975e\u69cb\u9020\u30c7\u30fc\u30bf\u578b"},{"location":"ref_types/#_6","text":"boolean [\u30c7\u30fc\u30bf\u9577: 1byte] \u8ad6\u7406\u5024\u30c7\u30fc\u30bf\u578b money [\u30c7\u30fc\u30bf\u9577: 8bytes] \u901a\u8ca8\u30c7\u30fc\u30bf\u578b uuid [\u30c7\u30fc\u30bf\u9577: 16bytes] UUID\u30c7\u30fc\u30bf\u578b macaddr [\u30c7\u30fc\u30bf\u9577: 6bytes] \u30cd\u30c3\u30c8\u30ef\u30fc\u30afMAC\u30a2\u30c9\u30ec\u30b9\u578b inet [\u30c7\u30fc\u30bf\u9577: 7 or 19bytes] \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u578b cidr [\u30c7\u30fc\u30bf\u9577: 7 or 19butes] \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u578b cube [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909\u9577] contrib/cube \u306b\u3088\u3063\u3066\u63d0\u4f9b\u3055\u308c\u308b\u62e1\u5f35\u30c7\u30fc\u30bf\u578b","title":"\u96d1\u591a\u306a\u30c7\u30fc\u30bf\u578b"},{"location":"ref_types/#_7","text":"geometry [\u30c7\u30fc\u30bf\u9577: \u53ef\u5909] PostGIS\u30b8\u30aa\u30e1\u30c8\u30ea\u30aa\u30d6\u30b8\u30a7\u30af\u30c8 box2df [\u30c7\u30fc\u30bf\u9577: 16bytes] 2\u6b21\u5143\u30d0\u30a6\u30f3\u30c7\u30a3\u30f3\u30b0\u30dc\u30c3\u30af\u30b9\uff08GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u7528\uff09","title":"\u30b8\u30aa\u30e1\u30c8\u30ea\u578b"},{"location":"release_v2.0/","text":"PG-Strom v2.0\u30ea\u30ea\u30fc\u30b9 PG-Strom Development Team (17-Apr-2018) \u6982\u8981 PG-Strom v2.0\u306b\u304a\u3051\u308b\u4e3b\u8981\u306a\u6a5f\u80fd\u5f37\u5316\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 GPU\u3092\u7ba1\u7406\u3059\u308b\u5185\u90e8\u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u306e\u5168\u4f53\u7684\u306a\u518d\u8a2d\u8a08\u3068\u5b89\u5b9a\u5316 CPU+GPU\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u4e26\u5217\u5b9f\u884c SSD-to-GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c \u30a4\u30f3\u30e1\u30e2\u30ea\u5217\u6307\u5411\u30ad\u30e3\u30c3\u30b7\u30e5 GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2(store_fdw) GpuJoin\u3068GpuPreAgg\u306e\u518d\u8a2d\u8a08\u306b\u4f34\u3046\u9ad8\u901f\u5316 GpuPreAgg+GpuJoin+GpuScan \u5bc6\u7d50\u5408GPU\u30ab\u30fc\u30cd\u30eb \u65b0\u6a5f\u80fd\u306e\u30b5\u30de\u30ea\u306f\u3053\u3061\u3089\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\uff1a PG-Strom v2.0 Technical Brief . \u52d5\u4f5c\u74b0\u5883 PostgreSQL v9.6, v10 CUDA Toolkit 9.1 CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3 Intel x86 64bit \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3(x86_64) NVIDIA GPU CC 6.0 \u4ee5\u964d (Pascal\u4ee5\u964d) \u65b0\u6a5f\u80fd GPU\u3092\u7ba1\u7406\u3059\u308b\u5185\u90e8\u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u306e\u5168\u4f53\u7684\u306a\u518d\u8a2d\u8a08\u3068\u5b89\u5b9a\u5316 PostgreSQL\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u30d7\u30ed\u30bb\u30b9\u306f\u540c\u6642\u306b\uff11\u500b\u306eGPU\u3060\u3051\u3092\u5229\u7528\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u30de\u30eb\u30c1GPU\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u306fPostgreSQL\u306eCPU\u4e26\u5217\u3068\u306e\u4f75\u7528\u304c\u524d\u63d0\u306b\u306a\u308a\u307e\u3059\u304c\u3001CPU\u30b9\u30ec\u30c3\u30c9\u304cGPU\u3078\u30c7\u30fc\u30bf\u3092\u4f9b\u7d66\u3059\u308b\u30b9\u30eb\u30fc\u30d7\u30c3\u30c8\u306fGPU\u306e\u51e6\u7406\u80fd\u529b\u3088\u308a\u3082\u305a\u3063\u3068\u4f4e\u3044\u305f\u3081\u3001\u901a\u5e38\u3001\u3053\u308c\u306f\u554f\u984c\u3068\u306f\u306a\u308a\u307e\u305b\u3093\u3002\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u8a2d\u8a08\u306e\u30b7\u30f3\u30d7\u30eb\u5316\u3092\u512a\u5148\u3057\u307e\u3057\u305f\u3002 Pascal\u4e16\u4ee3\u4ee5\u964d\u306eGPU\u3067\u63a1\u7528\u3055\u308c\u305fGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u30c7\u30de\u30f3\u30c9\u30da\u30fc\u30b8\u30f3\u30b0\u3092\u307b\u307c\u5168\u9762\u7684\u306b\u63a1\u7528\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u591a\u304f\u306f\u5b9f\u969b\u306b\u5b9f\u884c\u3057\u3066\u307f\u308b\u307e\u3067\u5fc5\u8981\u306a\u7d50\u679c\u30d0\u30c3\u30d5\u30a1\u306e\u5927\u304d\u3055\u304c\u5206\u304b\u3089\u306a\u3044\u305f\u3081\u3001\u3053\u308c\u307e\u3067\u306f\u5fc5\u8981\u4ee5\u4e0a\u306b\u30d0\u30c3\u30d5\u30a1\u3092\u7372\u5f97\u3057\u3001\u307e\u305f\u30e1\u30e2\u30ea\u4e0d\u8db3\u6642\u306b\u306f\u518d\u5b9f\u884c\u3092\u884c\u3063\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u3053\u308c\u3089\u306f\u540c\u6642\u5b9f\u884c\u30d7\u30ed\u30bb\u30b9\u306e\u5229\u7528\u53ef\u80fd\u306a\u30ea\u30bd\u30fc\u30b9\u3092\u5236\u9650\u3057\u3001\u307e\u305f\u8907\u96d1\u306a\u4f8b\u5916\u30ed\u30b8\u30c3\u30af\u306f\u30d0\u30b0\u306e\u6e29\u5e8a\u3067\u3057\u305f\u3002GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u30c7\u30de\u30f3\u30c9\u30da\u30fc\u30b8\u30f3\u30b0\u3092\u5229\u7528\u3059\u308b\u4e8b\u3067\u3001\u8a2d\u8a08\u306e\u30b7\u30f3\u30d7\u30eb\u5316\u3092\u884c\u3044\u307e\u3057\u305f\u3002 CUDA\u306e\u975e\u540c\u671f\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306e\u5229\u7528\u3092\u6b62\u3081\u307e\u3057\u305f\u3002GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u30c7\u30de\u30f3\u30c9\u30da\u30fc\u30b8\u30f3\u30b0\u3092\u5229\u7528\u3059\u308b\u3068\u3001DMA\u8ee2\u9001\u306e\u305f\u3081\u306e\u975e\u540c\u671fAPI\uff08 cuMemCpyHtoD \u306a\u3069\uff09\u306f\u540c\u671f\u7684\u306b\u632f\u821e\u3046\u3088\u3046\u306b\u306a\u308b\u305f\u3081\u3001GPU\u30ab\u30fc\u30cd\u30eb\u306e\u591a\u91cd\u5ea6\u304c\u4f4e\u4e0b\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u4ee3\u308f\u308a\u306bPG-Strom\u81ea\u8eab\u304c\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u3092\u7ba1\u7406\u3057\u3001\u3053\u308c\u3089\u306e\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u304c\u305d\u308c\u305e\u308c\u540c\u671fAPI\u3092\u547c\u3073\u51fa\u3059\u3088\u3046\u8a2d\u8a08\u5909\u66f4\u3092\u884c\u3044\u307e\u3057\u305f\u3002\u526f\u7523\u7269\u3068\u3057\u3066\u3001\u975e\u540c\u671f\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\uff08 cuStreamAddCallback \uff09\u3092\u5229\u7528\u3059\u308b\u5fc5\u8981\u304c\u306a\u304f\u306a\u3063\u305f\u306e\u3067\u3001MPS\u3092\u5229\u7528\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002 CPU+GPU\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u4e26\u5217\u5b9f\u884c PostgreSQL v9.6\u3067\u65b0\u305f\u306b\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u305fCPU\u4e26\u5217\u5b9f\u884c\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 PG-Strom\u306e\u63d0\u4f9b\u3059\u308bGpuScan\u3001GpuJoin\u304a\u3088\u3073GpuPreAgg\u306e\u5404\u30ed\u30b8\u30c3\u30af\u306f\u8907\u6570\u306ePostgreSQL\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\u306b\u3088\u308a\u4e26\u5217\u306b\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 PostgreSQL v9.6\u3067\u306fCPU\u4e26\u5217\u5b9f\u884c\u306e\u969b\u306b EXPLAIN ANALYZE \u3067\u53d6\u5f97\u3059\u308bPG-Strom\u72ec\u81ea\u306e\u7d71\u8a08\u60c5\u5831\u304c\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002\u3053\u308c\u306f\u3001CustomScan\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9API\u3067 ShutdownCustomScan \u304c\u63d0\u4f9b\u3055\u308c\u3066\u3044\u306a\u304b\u3063\u305f\u305f\u3081\u3001DSM\uff08\u52d5\u7684\u5171\u6709\u30e1\u30e2\u30ea\uff09\u306e\u89e3\u653e\u524d\u306b\u30b3\u30fc\u30c7\u30a3\u30cd\u30fc\u30bf\u30d7\u30ed\u30bb\u30b9\u304c\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\u306e\u60c5\u5831\u3092\u56de\u53ce\u3059\u308b\u624b\u6bb5\u304c\u7121\u304b\u3063\u305f\u305f\u3081\u3067\u3059\u3002 SSD-to-GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c Linux\u30ab\u30fc\u30cd\u30eb\u30e2\u30b8\u30e5\u30fc\u30eb nvme_strom \u3092\u7528\u3044\u308b\u4e8b\u3067\u3001NVMe\u898f\u683c\u306b\u5bfe\u5fdc\u3057\u305fSSD\u4e0a\u306ePostgreSQL\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u3092\u3001CPU/RAM\u3092\u4ecb\u3055\u305a\u30c0\u30a4\u30ec\u30af\u30c8\u306bGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u3078\u8ee2\u9001\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002\u30b7\u30b9\u30c6\u30e0RAM\u306b\u8f09\u308a\u5207\u3089\u306a\u3044\u5927\u304d\u3055\u306e\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u5834\u5408\u3067\u3042\u3063\u3066\u3082\u3001\u672c\u6a5f\u80fd\u306b\u3088\u308aPG-Strom\u306e\u9069\u7528\u304c\u73fe\u5b9f\u7684\u306a\u9078\u629e\u80a2\u3068\u306a\u308b\u4e8b\u3067\u3057\u3087\u3046\u3002 \u30d6\u30ed\u30c3\u30af\u30c7\u30d0\u30a4\u30b9\u5c64\u3084\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3092\u7d4c\u7531\u3057\u306a\u3044\u305f\u3081\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u9650\u754c\u306b\u8fd1\u3044\u9ad8\u30b9\u30eb\u30fc\u30d7\u30c3\u30c8\u3092\u5f15\u304d\u51fa\u3059\u4e8b\u304c\u53ef\u80fd\u3067\u3001\u304b\u3064\u3001GPU\u3067SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u51e6\u7406\u3059\u308b\u305f\u3081CPU\u306e\u51e6\u7406\u3059\u3079\u304d\u30c7\u30fc\u30bf\u91cf\u3092\u6e1b\u3089\u3059\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306a\u7279\u6027\u306e\u7d44\u307f\u5408\u308f\u305b\u306b\u3088\u308a\u3001\u4e00\u822c\u7684\u306b\u306f\u8a08\u7b97\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u30a2\u30af\u30bb\u30e9\u30ec\u30fc\u30bf\u3068\u3057\u3066\u8a8d\u8b58\u3055\u308c\u3066\u3044\u308bGPU\u3092\u3001I/O\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u9ad8\u901f\u5316\u306b\u9069\u7528\u3059\u308b\u4e8b\u306b\u6210\u529f\u3057\u307e\u3057\u305f\u3002 \u30a4\u30f3\u30e1\u30e2\u30ea\u5217\u6307\u5411\u30ad\u30e3\u30c3\u30b7\u30e5 RAM\u30b5\u30a4\u30ba\u306b\u8f09\u308b\u7a0b\u5ea6\u306e\u5927\u304d\u3055\u306e\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u306f\u3001\u3088\u308aGPU\u3067\u306e\u51e6\u7406\u306b\u9069\u3057\u305f\u5217\u30c7\u30fc\u30bf\u5f62\u5f0f\u306b\u5909\u5f62\u3057\u3066\u30ad\u30e3\u30c3\u30b7\u30e5\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u306b\u969b\u3057\u3066\u3001\u5217\u6307\u5411\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u306b\u306fPostgreSQL\u306e\u5171\u6709\u30d0\u30c3\u30d5\u30a1\u3088\u308a\u3082\u3053\u3061\u3089\u3092\u512a\u5148\u3057\u3066\u53c2\u7167\u3057\u307e\u3059\u3002 \u30a4\u30f3\u30e1\u30e2\u30ea\u5217\u6307\u5411\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u540c\u671f\u7684\u3001\u307e\u305f\u306f\u975e\u540c\u671f\u7684\u306b\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u3067\u69cb\u7bc9\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 \u521d\u671f\u306ePG-Strom\u3067\u4f3c\u305f\u3088\u3046\u306a\u6a5f\u80fd\u304c\u5b58\u5728\u3057\u3066\u3044\u305f\u4e8b\u3092\u899a\u3048\u3066\u304a\u3089\u308c\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002v2.0\u3067\u65b0\u305f\u306b\u5b9f\u88c5\u3055\u308c\u305f\u5217\u6307\u5411\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u3055\u308c\u305f\u884c\u304c\u66f4\u65b0\u3055\u308c\u308b\u3068\u3001\u5f53\u8a72\u884c\u3092\u542b\u3080\u30ad\u30e3\u30c3\u30b7\u30e5\u30d6\u30ed\u30c3\u30af\u3092\u6d88\u53bb\uff08invalidation\uff09\u3057\u307e\u3059\u3002\u884c\u30b9\u30c8\u30a2\u306e\u66f4\u65b0\u306b\u5408\u308f\u305b\u3066\u5217\u30ad\u30e3\u30c3\u30b7\u30e5\u5074\u306e\u66f4\u65b0\u3092\u884c\u3046\u3068\u3044\u3046\u4e8b\u306f\u884c\u308f\u306a\u3044\u305f\u3081\u3001\u66f4\u65b0\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u5bfe\u3059\u308b\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u4f4e\u4e0b\u306f\u9650\u5b9a\u7684\u3067\u3059\u3002 GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2(gstore_fdw) GPU\u4e0a\u306b\u78ba\u4fdd\u3057\u305f\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u9818\u57df\u306b\u5bfe\u3057\u3066\u3001\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\uff08Foreign Table\uff09\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u5229\u7528\u3057\u3066SQL\u306eSELECT/INSERT/UPDATE/DELETE\u306b\u3088\u308a\u8aad\u307f\u66f8\u304d\u3092\u884c\u3046\u6a5f\u80fd\u3067\u3059\u3002 \u5185\u90e8\u30c7\u30fc\u30bf\u5f62\u5f0f\u306f pgstrom \u578b\u306e\u307f\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u3001PG-Strom\u306e\u30d0\u30c3\u30d5\u30a1\u5f62\u5f0f KDS_FORMAT_COLUMN \u30bf\u30a4\u30d7\u3068\u540c\u4e00\u306e\u5f62\u5f0f\u3067\u30c7\u30fc\u30bf\u3092\u4fdd\u6301\u3059\u308b\u3082\u306e\u3067\u3059\u3002\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308b\u5834\u5408\u3001LZ\u65b9\u5f0f\u306b\u3088\u308b\u30c7\u30fc\u30bf\u5727\u7e2e\u3092\u884c\u3046\u4e8b\u3082\u53ef\u80fd\u3067\u3059\u3002 v2.0\u306e\u6642\u70b9\u3067\u306f\u3001GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2\u306fPL/CUDA\u95a2\u6570\u306e\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3068\u3057\u3066\u3060\u3051\u5229\u7528\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 GpuJoin\u3068GpuPreAgg\u306e\u518d\u8a2d\u8a08\u306b\u4f34\u3046\u9ad8\u901f\u5316 \u5f93\u6765\u3001GpuJoin\u3068GpuPreAgg\u3067\u5185\u90e8\u7684\u306b\u4f7f\u7528\u3057\u3066\u3044\u305fDynamic Parallelism\u306e\u5229\u7528\u3092\u3084\u3081\u3001\u51e6\u7406\u30ed\u30b8\u30c3\u30af\u5168\u4f53\u306e\u898b\u76f4\u3057\u3092\u884c\u3044\u307e\u3057\u305f\u3002\u3053\u308c\u306f\u3001GPU\u30b5\u30d6\u30ab\u30fc\u30cd\u30eb\u306e\u8d77\u52d5\u5f8c\u3001\u305d\u306e\u5b8c\u4e86\u3092\u5358\u306b\u5f85\u3063\u3066\u3044\u308b\u3060\u3051\u306eGPU\u30ab\u30fc\u30cd\u30eb\u304c\u5b9f\u884c\u30b9\u30ed\u30c3\u30c8\u3092\u5360\u6709\u3057\u3001GPU\u306e\u4f7f\u7528\u7387\u304c\u4e0a\u304c\u3089\u306a\u3044\u3068\u3044\u3046\u554f\u984c\u304c\u3042\u3063\u305f\u305f\u3081\u3067\u3059\u3002 \u3053\u306e\u518d\u8a2d\u8a08\u306b\u4f34\u3046\u526f\u7523\u7269\u3068\u3057\u3066\u3001GpuJoin\u306e\u30b5\u30b9\u30da\u30f3\u30c9/\u30ec\u30b8\u30e5\u30fc\u30e0\u6a5f\u80fd\u304c\u5b9f\u88c5\u3055\u308c\u307e\u3057\u305f\u3002\u539f\u7406\u4e0a\u3001SQL\u306eJOIN\u51e6\u7406\u306f\u5165\u529b\u3057\u305f\u884c\u6570\u3088\u308a\u3082\u51fa\u529b\u3059\u308b\u884c\u6570\u306e\u65b9\u304c\u5897\u3048\u3066\u3057\u307e\u3046\u4e8b\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u51e6\u7406\u7d50\u679c\u3092\u66f8\u304d\u8fbc\u3080\u30d0\u30c3\u30d5\u30a1\u306e\u6b8b\u308a\u30b5\u30a4\u30ba\u304c\u4e0d\u8db3\u3057\u305f\u6642\u70b9\u3067GpuJoin\u3092\u30b5\u30b9\u30da\u30f3\u30c9\u3057\u3001\u65b0\u3057\u3044\u7d50\u679c\u30d0\u30c3\u30d5\u30a1\u3092\u5272\u308a\u5f53\u3066\u3066\u30ec\u30b8\u30e5\u30fc\u30e0\u3059\u308b\u3088\u3046\u306b\u4fee\u6b63\u3055\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u7d50\u679c\u30d0\u30c3\u30d5\u30a1\u306e\u30b5\u30a4\u30ba\u63a8\u5b9a\u304c\u7c21\u7565\u5316\u3055\u308c\u305f\u307b\u304b\u3001\u5b9f\u884c\u6642\u306e\u30d0\u30c3\u30d5\u30a1\u4e0d\u8db3\u306b\u3088\u308b\u518d\u5b9f\u884c\u306e\u5fc5\u8981\u304c\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002 GpuPreAgg+GpuJoin+GpuScan \u5bc6\u7d50\u5408GPU\u30ab\u30fc\u30cd\u30eb GPU\u3067\u5b9f\u884c\u53ef\u80fd\u306aSCAN\u3001JOIN\u3001GROUP BY\u304c\u9023\u7d9a\u3057\u3066\u3044\u308b\u3068\u304d\u3001\u5bfe\u5fdc\u3059\u308bGpuScan\u3001GpuJoin\u3001GpuPreAgg\u306b\u76f8\u5f53\u3059\u308b\u51e6\u7406\u3092\u4e00\u56de\u306eGPU\u30ab\u30fc\u30cd\u30eb\u547c\u3073\u51fa\u3057\u3067\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u3053\u308c\u306f\u3001GpuJoin\u306e\u7d50\u679c\u30d0\u30c3\u30d5\u30a1\u3092\u305d\u306e\u307e\u307eGpuPreAgg\u306e\u5165\u529b\u30d0\u30c3\u30d5\u30a1\u3068\u3057\u3066\u6271\u3046\u306a\u3069\u3001CPU\u3068GPU\u306e\u9593\u306e\u30c7\u30fc\u30bf\u4ea4\u63db\u3092\u6700\u5c0f\u9650\u306b\u6291\u3048\u308b\u305f\u3081\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u3067\u3059\u3002 \u3053\u306e\u6a5f\u80fd\u306f\u7279\u306b\u3001SSD-to-GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u4f7f\u7528\u3059\u308b\u3068\u52b9\u679c\u7684\u3067\u3059\u3002 \u65b0\u3057\u3044\u30c7\u30fc\u30bf\u578b\u306e\u5bfe\u5fdc uuid \u578b\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u578b\uff08 inet \u3001 cidr \u3001\u304a\u3088\u3073 macaddr \uff09\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u7bc4\u56f2\u578b\uff08 int4range \u3001 int8range \u3001 tsrange \u3001 tstzrange \u3001 daterange \uff09\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u534a\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\uff08 float2 \uff09\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002\u534a\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u306b\u95a2\u9023\u3059\u308bCPU\u5074\u306e\u5b9f\u88c5\u306fPG-Strom\u306e\u72ec\u81ea\u5b9f\u88c5\u306b\u3088\u308b\u3082\u306e\u3067\u3059\u3002 \u65b0\u3057\u3044\u6f14\u7b97\u5b50/\u95a2\u6570\u306e\u5bfe\u5fdc \u65e5\u4ed8\u6642\u523b\u578b\u306b\u5bfe\u3059\u308b EXTRACT(field FROM timestamp) \u6f14\u7b97\u5b50\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 New data type support uuid type Network address types ( inet , cidr and macaddr ) Range data types ( int4range , int8range , tsrange , tstzrange , daterange ) Half-precision floating point type ( float2 ). Its CPU side are also implemented by PG-Strom itself, not PostgreSQL's built-in feature. New operators / functions EXTRACT(field FROM timestamp) operator on the date and time types PL/CUDA\u95a2\u9023\u306e\u5f37\u5316 #plcuda_include \u306e\u62e1\u5f35\u306b\u3088\u308a\u3001 text \u578b\u3092\u8fd4\u3059SQL\u95a2\u6570\u3092\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u5f15\u6570\u306e\u5024\u306b\u3088\u3063\u3066\u633f\u5165\u3059\u308b\u30b3\u30fc\u30c9\u3092\u5909\u3048\u308b\u4e8b\u304c\u3067\u304d\u308b\u305f\u3081\u3001\u5358\u306b\u5916\u90e8\u5b9a\u7fa9\u95a2\u6570\u3092\u8aad\u307f\u8fbc\u3080\u3060\u3051\u3067\u306a\u304f\u3001\u52d5\u7684\u306b\u3044\u304f\u3064\u3082\u306eGPU\u30ab\u30fc\u30cd\u30eb\u306e\u30d0\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u308a\u51fa\u3059\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002 PL/CUDA\u95a2\u6570\u306e\u5f15\u6570\u306b reggstore \u578b\u3092\u6307\u5b9a\u3057\u305f\u5834\u5408\u3001GPU\u30ab\u30fc\u30cd\u30eb\u95a2\u6570\u3078\u306f\u5bfe\u5fdc\u3059\u308bGPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2\u306e\u30dd\u30a4\u30f3\u30bf\u304c\u6e21\u3055\u308c\u307e\u3059\u3002OID\u5024\u304c\u6e21\u3055\u308c\u308b\u308f\u3051\u3067\u306f\u306a\u3044\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u305d\u306e\u4ed6\u306e\u6a5f\u80fd\u5f37\u5316 lo_import_gpu \u304a\u3088\u3073 lo_export_gpu \u95a2\u6570\u306b\u3088\u308a\u3001\u5916\u90e8\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u78ba\u4fdd\u3057\u305fGPU\u30e1\u30e2\u30ea\u306e\u5185\u5bb9\u3092\u76f4\u63a5PostgreSQL\u306e\u30e9\u30fc\u30b8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u8a18\u9332\u3057\u305f\u308a\u3001\u9006\u306b\u30e9\u30fc\u30b8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5185\u5bb9\u3092GPU\u30e1\u30e2\u30ea\u306b\u66f8\u304d\u51fa\u3059\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 \u30d1\u30c3\u30b1\u30fc\u30b8\u30f3\u30b0 PostgreSQL Global Development Group\u306e\u914d\u5e03\u3059\u308bPostgreSQL\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u9069\u5408\u3059\u308b\u3088\u3046\u3001RPM\u30d1\u30c3\u30b1\u30fc\u30b8\u5316\u3092\u884c\u3044\u307e\u3057\u305f\u3002 \u5168\u3066\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u7269\u4ef6\u306fHeteroDB SWDC(Software Distribution Center)\u3088\u308a\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u304c\u53ef\u80fd\u3067\u3059\u3002 \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8 PG-Strom\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092markdown\u3068mkdocs\u3092\u7528\u3044\u3066\u5168\u9762\u7684\u306b\u66f8\u304d\u76f4\u3057\u307e\u3057\u305f\u3002\u5f93\u6765\u306eHTML\u3092\u7528\u3044\u305f\u30a2\u30d7\u30ed\u30fc\u30c1\u306b\u6bd4\u3079\u3001\u3088\u308a\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u304c\u5bb9\u6613\u3067\u65b0\u6a5f\u80fd\u306e\u958b\u767a\u306b\u5408\u308f\u305b\u305f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u62e1\u5145\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059\u3002 \u30c6\u30b9\u30c8 PostgreSQL\u306e\u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u4f7f\u7528\u3057\u3066\u3001PG-Strom\u306e\u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002 \u5ec3\u6b62\u3055\u308c\u305f\u6a5f\u80fd PostgreSQL v9.5\u30b5\u30dd\u30fc\u30c8 PostgreSQL v9.6\u3067\u306fCPU\u4e26\u5217\u30af\u30a8\u30ea\u306e\u63d0\u4f9b\u306b\u4f34\u3044\u3001\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6/\u30a8\u30b0\u30bc\u30ad\u30e5\u30fc\u30bf\u5171\u306b\u5927\u304d\u306a\u4fee\u6b63\u304c\u52a0\u3048\u3089\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u3089\u3068\u5bc6\u63a5\u306b\u9023\u643a\u3059\u308b\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u3068\u3063\u3066\u6700\u3082\u30a4\u30f3\u30d1\u30af\u30c8\u306e\u5927\u304d\u306a\u5909\u66f4\u306f\u300eupper planner path-ification\u300f\u3068\u547c\u3070\u308c\u308b\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306e\u5f37\u5316\u3067\u3001\u96c6\u7d04\u6f14\u7b97\u3084\u30bd\u30fc\u30c8\u306a\u3069\u306e\u5b9f\u884c\u8a08\u753b\u3082\u30b3\u30b9\u30c8\u30d9\u30fc\u30b9\u3067\u8907\u6570\u306e\u7570\u306a\u308b\u65b9\u6cd5\u3092\u6bd4\u8f03\u3057\u3066\u6700\u9069\u306a\u3082\u306e\u3092\u9078\u629e\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u3053\u308c\u306fGpuPreAgg\u3092\u5b9f\u88c5\u3059\u308b\u305f\u3081\u306b\u30d5\u30c3\u30af\u3092\u5229\u7528\u3057\u3066\u5b9f\u884c\u8a08\u753b\u3092\u66f8\u304d\u63db\u3048\u3066\u3044\u305f\u5f93\u6765\u306e\u65b9\u6cd5\u3068\u306f\u6839\u672c\u7684\u306b\u7570\u306a\u308a\u3001\u3088\u308a\u5408\u7406\u7684\u304b\u3064\u4fe1\u983c\u3067\u304d\u308b\u65b9\u6cd5\u3067GPU\u3092\u7528\u3044\u305f\u96c6\u7d04\u6f14\u7b97\u3092\u633f\u5165\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u3001\u30d0\u30b0\u306e\u6e29\u5e8a\u3067\u3042\u3063\u305f\u5b9f\u884c\u8a08\u753b\u306e\u66f8\u304d\u63db\u3048\u30ed\u30b8\u30c3\u30af\u3092\u6368\u3066\u308b\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u540c\u6642\u306b\u3001CustomScan\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306b\u3082CPU\u4e26\u5217\u306b\u5bfe\u5fdc\u3059\u308b\u305f\u3081\u306eAPI\u304c\u62e1\u5f35\u3055\u308c\u3001\u3053\u308c\u3089\u306b\u5bfe\u5fdc\u3059\u308b\u305f\u3081\u306bPostgreSQL v9.5\u30b5\u30dd\u30fc\u30c8\u306f\u5ec3\u6b62\u3055\u308c\u307e\u3057\u305f\u3002 GpuSort\u6a5f\u80fd GpuSort\u6a5f\u80fd\u306f\u6027\u80fd\u4e0a\u306e\u30e1\u30ea\u30c3\u30c8\u304c\u5f97\u3089\u308c\u306a\u3044\u305f\u3081\u5ec3\u6b62\u3055\u308c\u307e\u3057\u305f\u3002 \u30bd\u30fc\u30c8\u306fGPU\u306e\u5f97\u610f\u3068\u3059\u308b\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u4e00\u3064\u3067\u3059\u3002\u3057\u304b\u3057\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u5927\u304d\u3055\u3092\u8d8a\u3048\u308b\u30b5\u30a4\u30ba\u306e\u30c7\u30fc\u30bf\u3092\u30bd\u30fc\u30c8\u3059\u308b\u5834\u5408\u3001\u8907\u6570\u306e\u30c1\u30e3\u30f3\u30af\u306b\u5206\u5272\u3057\u3066\u90e8\u5206\u30bd\u30fc\u30c8\u3092\u884c\u3044\u3001\u5f8c\u3067CPU\u5074\u3067\u3053\u308c\u3092\u7d50\u5408\u3057\u3066\u6700\u7d42\u7d50\u679c\u3092\u51fa\u529b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u7d50\u5408\u30d5\u30a7\u30fc\u30ba\u306e\u51e6\u7406\u3092\u8efd\u304f\u3059\u308b\u306b\u306f\u3001GPU\u3067\u30bd\u30fc\u30c8\u3059\u3079\u304d\u30c1\u30e3\u30f3\u30af\u306e\u30b5\u30a4\u30ba\u3092\u5927\u304d\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u4e00\u65b9\u3067\u30c1\u30e3\u30f3\u30af\u30b5\u30a4\u30ba\u304c\u5927\u304d\u304f\u306a\u308b\u3068\u30bd\u30fc\u30c8\u51e6\u7406\u3092\u958b\u59cb\u3059\u308b\u305f\u3081\u306e\u30ea\u30fc\u30c9\u30bf\u30a4\u30e0\u304c\u9577\u304f\u306a\u308a\u3001PG-Strom\u306e\u7279\u9577\u306e\u4e00\u3064\u3067\u3042\u308b\u975e\u540c\u671f\u51e6\u7406\u306b\u3088\u308b\u30c7\u30fc\u30bf\u8ee2\u9001\u30ec\u30a4\u30c6\u30f3\u30b7\u306e\u96a0\u307a\u3044\u304c\u52b9\u304b\u306a\u304f\u306a\u308b\u3068\u3044\u3046\u30c8\u30ec\u30fc\u30c9\u30aa\u30d5\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u554f\u984c\u306b\u5bfe\u51e6\u3059\u308b\u306e\u306f\u56f0\u96e3\u3001\u5c11\u306a\u304f\u3068\u3082\u6642\u671f\u5c1a\u65e9\u3067\u3042\u308b\u3068\u5224\u65ad\u3057\u3001GpuSort\u6a5f\u80fd\u306f\u5ec3\u6b62\u3055\u308c\u307e\u3057\u305f\u3002","title":"PG-Strom v2.0"},{"location":"release_v2.0/#pg-strom-v20","text":"PG-Strom Development Team (17-Apr-2018)","title":"PG-Strom v2.0\u30ea\u30ea\u30fc\u30b9"},{"location":"release_v2.0/#_1","text":"PG-Strom v2.0\u306b\u304a\u3051\u308b\u4e3b\u8981\u306a\u6a5f\u80fd\u5f37\u5316\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 GPU\u3092\u7ba1\u7406\u3059\u308b\u5185\u90e8\u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u306e\u5168\u4f53\u7684\u306a\u518d\u8a2d\u8a08\u3068\u5b89\u5b9a\u5316 CPU+GPU\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u4e26\u5217\u5b9f\u884c SSD-to-GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c \u30a4\u30f3\u30e1\u30e2\u30ea\u5217\u6307\u5411\u30ad\u30e3\u30c3\u30b7\u30e5 GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2(store_fdw) GpuJoin\u3068GpuPreAgg\u306e\u518d\u8a2d\u8a08\u306b\u4f34\u3046\u9ad8\u901f\u5316 GpuPreAgg+GpuJoin+GpuScan \u5bc6\u7d50\u5408GPU\u30ab\u30fc\u30cd\u30eb \u65b0\u6a5f\u80fd\u306e\u30b5\u30de\u30ea\u306f\u3053\u3061\u3089\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\uff1a PG-Strom v2.0 Technical Brief .","title":"\u6982\u8981"},{"location":"release_v2.0/#_2","text":"PostgreSQL v9.6, v10 CUDA Toolkit 9.1 CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3 Intel x86 64bit \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3(x86_64) NVIDIA GPU CC 6.0 \u4ee5\u964d (Pascal\u4ee5\u964d)","title":"\u52d5\u4f5c\u74b0\u5883"},{"location":"release_v2.0/#_3","text":"GPU\u3092\u7ba1\u7406\u3059\u308b\u5185\u90e8\u30a4\u30f3\u30d5\u30e9\u30b9\u30c8\u30e9\u30af\u30c1\u30e3\u306e\u5168\u4f53\u7684\u306a\u518d\u8a2d\u8a08\u3068\u5b89\u5b9a\u5316 PostgreSQL\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u30d7\u30ed\u30bb\u30b9\u306f\u540c\u6642\u306b\uff11\u500b\u306eGPU\u3060\u3051\u3092\u5229\u7528\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u30de\u30eb\u30c1GPU\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u306fPostgreSQL\u306eCPU\u4e26\u5217\u3068\u306e\u4f75\u7528\u304c\u524d\u63d0\u306b\u306a\u308a\u307e\u3059\u304c\u3001CPU\u30b9\u30ec\u30c3\u30c9\u304cGPU\u3078\u30c7\u30fc\u30bf\u3092\u4f9b\u7d66\u3059\u308b\u30b9\u30eb\u30fc\u30d7\u30c3\u30c8\u306fGPU\u306e\u51e6\u7406\u80fd\u529b\u3088\u308a\u3082\u305a\u3063\u3068\u4f4e\u3044\u305f\u3081\u3001\u901a\u5e38\u3001\u3053\u308c\u306f\u554f\u984c\u3068\u306f\u306a\u308a\u307e\u305b\u3093\u3002\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u8a2d\u8a08\u306e\u30b7\u30f3\u30d7\u30eb\u5316\u3092\u512a\u5148\u3057\u307e\u3057\u305f\u3002 Pascal\u4e16\u4ee3\u4ee5\u964d\u306eGPU\u3067\u63a1\u7528\u3055\u308c\u305fGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u30c7\u30de\u30f3\u30c9\u30da\u30fc\u30b8\u30f3\u30b0\u3092\u307b\u307c\u5168\u9762\u7684\u306b\u63a1\u7528\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u591a\u304f\u306f\u5b9f\u969b\u306b\u5b9f\u884c\u3057\u3066\u307f\u308b\u307e\u3067\u5fc5\u8981\u306a\u7d50\u679c\u30d0\u30c3\u30d5\u30a1\u306e\u5927\u304d\u3055\u304c\u5206\u304b\u3089\u306a\u3044\u305f\u3081\u3001\u3053\u308c\u307e\u3067\u306f\u5fc5\u8981\u4ee5\u4e0a\u306b\u30d0\u30c3\u30d5\u30a1\u3092\u7372\u5f97\u3057\u3001\u307e\u305f\u30e1\u30e2\u30ea\u4e0d\u8db3\u6642\u306b\u306f\u518d\u5b9f\u884c\u3092\u884c\u3063\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u3053\u308c\u3089\u306f\u540c\u6642\u5b9f\u884c\u30d7\u30ed\u30bb\u30b9\u306e\u5229\u7528\u53ef\u80fd\u306a\u30ea\u30bd\u30fc\u30b9\u3092\u5236\u9650\u3057\u3001\u307e\u305f\u8907\u96d1\u306a\u4f8b\u5916\u30ed\u30b8\u30c3\u30af\u306f\u30d0\u30b0\u306e\u6e29\u5e8a\u3067\u3057\u305f\u3002GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u30c7\u30de\u30f3\u30c9\u30da\u30fc\u30b8\u30f3\u30b0\u3092\u5229\u7528\u3059\u308b\u4e8b\u3067\u3001\u8a2d\u8a08\u306e\u30b7\u30f3\u30d7\u30eb\u5316\u3092\u884c\u3044\u307e\u3057\u305f\u3002 CUDA\u306e\u975e\u540c\u671f\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306e\u5229\u7528\u3092\u6b62\u3081\u307e\u3057\u305f\u3002GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u30c7\u30de\u30f3\u30c9\u30da\u30fc\u30b8\u30f3\u30b0\u3092\u5229\u7528\u3059\u308b\u3068\u3001DMA\u8ee2\u9001\u306e\u305f\u3081\u306e\u975e\u540c\u671fAPI\uff08 cuMemCpyHtoD \u306a\u3069\uff09\u306f\u540c\u671f\u7684\u306b\u632f\u821e\u3046\u3088\u3046\u306b\u306a\u308b\u305f\u3081\u3001GPU\u30ab\u30fc\u30cd\u30eb\u306e\u591a\u91cd\u5ea6\u304c\u4f4e\u4e0b\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u4ee3\u308f\u308a\u306bPG-Strom\u81ea\u8eab\u304c\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u3092\u7ba1\u7406\u3057\u3001\u3053\u308c\u3089\u306e\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u304c\u305d\u308c\u305e\u308c\u540c\u671fAPI\u3092\u547c\u3073\u51fa\u3059\u3088\u3046\u8a2d\u8a08\u5909\u66f4\u3092\u884c\u3044\u307e\u3057\u305f\u3002\u526f\u7523\u7269\u3068\u3057\u3066\u3001\u975e\u540c\u671f\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\uff08 cuStreamAddCallback \uff09\u3092\u5229\u7528\u3059\u308b\u5fc5\u8981\u304c\u306a\u304f\u306a\u3063\u305f\u306e\u3067\u3001MPS\u3092\u5229\u7528\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002 CPU+GPU\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u4e26\u5217\u5b9f\u884c PostgreSQL v9.6\u3067\u65b0\u305f\u306b\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u305fCPU\u4e26\u5217\u5b9f\u884c\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 PG-Strom\u306e\u63d0\u4f9b\u3059\u308bGpuScan\u3001GpuJoin\u304a\u3088\u3073GpuPreAgg\u306e\u5404\u30ed\u30b8\u30c3\u30af\u306f\u8907\u6570\u306ePostgreSQL\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\u306b\u3088\u308a\u4e26\u5217\u306b\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 PostgreSQL v9.6\u3067\u306fCPU\u4e26\u5217\u5b9f\u884c\u306e\u969b\u306b EXPLAIN ANALYZE \u3067\u53d6\u5f97\u3059\u308bPG-Strom\u72ec\u81ea\u306e\u7d71\u8a08\u60c5\u5831\u304c\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002\u3053\u308c\u306f\u3001CustomScan\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9API\u3067 ShutdownCustomScan \u304c\u63d0\u4f9b\u3055\u308c\u3066\u3044\u306a\u304b\u3063\u305f\u305f\u3081\u3001DSM\uff08\u52d5\u7684\u5171\u6709\u30e1\u30e2\u30ea\uff09\u306e\u89e3\u653e\u524d\u306b\u30b3\u30fc\u30c7\u30a3\u30cd\u30fc\u30bf\u30d7\u30ed\u30bb\u30b9\u304c\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\u306e\u60c5\u5831\u3092\u56de\u53ce\u3059\u308b\u624b\u6bb5\u304c\u7121\u304b\u3063\u305f\u305f\u3081\u3067\u3059\u3002 SSD-to-GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c Linux\u30ab\u30fc\u30cd\u30eb\u30e2\u30b8\u30e5\u30fc\u30eb nvme_strom \u3092\u7528\u3044\u308b\u4e8b\u3067\u3001NVMe\u898f\u683c\u306b\u5bfe\u5fdc\u3057\u305fSSD\u4e0a\u306ePostgreSQL\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u3092\u3001CPU/RAM\u3092\u4ecb\u3055\u305a\u30c0\u30a4\u30ec\u30af\u30c8\u306bGPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u3078\u8ee2\u9001\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002\u30b7\u30b9\u30c6\u30e0RAM\u306b\u8f09\u308a\u5207\u3089\u306a\u3044\u5927\u304d\u3055\u306e\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u5834\u5408\u3067\u3042\u3063\u3066\u3082\u3001\u672c\u6a5f\u80fd\u306b\u3088\u308aPG-Strom\u306e\u9069\u7528\u304c\u73fe\u5b9f\u7684\u306a\u9078\u629e\u80a2\u3068\u306a\u308b\u4e8b\u3067\u3057\u3087\u3046\u3002 \u30d6\u30ed\u30c3\u30af\u30c7\u30d0\u30a4\u30b9\u5c64\u3084\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3092\u7d4c\u7531\u3057\u306a\u3044\u305f\u3081\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u9650\u754c\u306b\u8fd1\u3044\u9ad8\u30b9\u30eb\u30fc\u30d7\u30c3\u30c8\u3092\u5f15\u304d\u51fa\u3059\u4e8b\u304c\u53ef\u80fd\u3067\u3001\u304b\u3064\u3001GPU\u3067SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u51e6\u7406\u3059\u308b\u305f\u3081CPU\u306e\u51e6\u7406\u3059\u3079\u304d\u30c7\u30fc\u30bf\u91cf\u3092\u6e1b\u3089\u3059\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306a\u7279\u6027\u306e\u7d44\u307f\u5408\u308f\u305b\u306b\u3088\u308a\u3001\u4e00\u822c\u7684\u306b\u306f\u8a08\u7b97\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u30a2\u30af\u30bb\u30e9\u30ec\u30fc\u30bf\u3068\u3057\u3066\u8a8d\u8b58\u3055\u308c\u3066\u3044\u308bGPU\u3092\u3001I/O\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u9ad8\u901f\u5316\u306b\u9069\u7528\u3059\u308b\u4e8b\u306b\u6210\u529f\u3057\u307e\u3057\u305f\u3002 \u30a4\u30f3\u30e1\u30e2\u30ea\u5217\u6307\u5411\u30ad\u30e3\u30c3\u30b7\u30e5 RAM\u30b5\u30a4\u30ba\u306b\u8f09\u308b\u7a0b\u5ea6\u306e\u5927\u304d\u3055\u306e\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u306f\u3001\u3088\u308aGPU\u3067\u306e\u51e6\u7406\u306b\u9069\u3057\u305f\u5217\u30c7\u30fc\u30bf\u5f62\u5f0f\u306b\u5909\u5f62\u3057\u3066\u30ad\u30e3\u30c3\u30b7\u30e5\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u30c6\u30fc\u30d6\u30eb\u306e\u30b9\u30ad\u30e3\u30f3\u306b\u969b\u3057\u3066\u3001\u5217\u6307\u5411\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u306b\u306fPostgreSQL\u306e\u5171\u6709\u30d0\u30c3\u30d5\u30a1\u3088\u308a\u3082\u3053\u3061\u3089\u3092\u512a\u5148\u3057\u3066\u53c2\u7167\u3057\u307e\u3059\u3002 \u30a4\u30f3\u30e1\u30e2\u30ea\u5217\u6307\u5411\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u540c\u671f\u7684\u3001\u307e\u305f\u306f\u975e\u540c\u671f\u7684\u306b\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u3067\u69cb\u7bc9\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 \u521d\u671f\u306ePG-Strom\u3067\u4f3c\u305f\u3088\u3046\u306a\u6a5f\u80fd\u304c\u5b58\u5728\u3057\u3066\u3044\u305f\u4e8b\u3092\u899a\u3048\u3066\u304a\u3089\u308c\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002v2.0\u3067\u65b0\u305f\u306b\u5b9f\u88c5\u3055\u308c\u305f\u5217\u6307\u5411\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u3055\u308c\u305f\u884c\u304c\u66f4\u65b0\u3055\u308c\u308b\u3068\u3001\u5f53\u8a72\u884c\u3092\u542b\u3080\u30ad\u30e3\u30c3\u30b7\u30e5\u30d6\u30ed\u30c3\u30af\u3092\u6d88\u53bb\uff08invalidation\uff09\u3057\u307e\u3059\u3002\u884c\u30b9\u30c8\u30a2\u306e\u66f4\u65b0\u306b\u5408\u308f\u305b\u3066\u5217\u30ad\u30e3\u30c3\u30b7\u30e5\u5074\u306e\u66f4\u65b0\u3092\u884c\u3046\u3068\u3044\u3046\u4e8b\u306f\u884c\u308f\u306a\u3044\u305f\u3081\u3001\u66f4\u65b0\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u5bfe\u3059\u308b\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u4f4e\u4e0b\u306f\u9650\u5b9a\u7684\u3067\u3059\u3002 GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2(gstore_fdw) GPU\u4e0a\u306b\u78ba\u4fdd\u3057\u305f\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u9818\u57df\u306b\u5bfe\u3057\u3066\u3001\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\uff08Foreign Table\uff09\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u5229\u7528\u3057\u3066SQL\u306eSELECT/INSERT/UPDATE/DELETE\u306b\u3088\u308a\u8aad\u307f\u66f8\u304d\u3092\u884c\u3046\u6a5f\u80fd\u3067\u3059\u3002 \u5185\u90e8\u30c7\u30fc\u30bf\u5f62\u5f0f\u306f pgstrom \u578b\u306e\u307f\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u3001PG-Strom\u306e\u30d0\u30c3\u30d5\u30a1\u5f62\u5f0f KDS_FORMAT_COLUMN \u30bf\u30a4\u30d7\u3068\u540c\u4e00\u306e\u5f62\u5f0f\u3067\u30c7\u30fc\u30bf\u3092\u4fdd\u6301\u3059\u308b\u3082\u306e\u3067\u3059\u3002\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3059\u308b\u5834\u5408\u3001LZ\u65b9\u5f0f\u306b\u3088\u308b\u30c7\u30fc\u30bf\u5727\u7e2e\u3092\u884c\u3046\u4e8b\u3082\u53ef\u80fd\u3067\u3059\u3002 v2.0\u306e\u6642\u70b9\u3067\u306f\u3001GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2\u306fPL/CUDA\u95a2\u6570\u306e\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3068\u3057\u3066\u3060\u3051\u5229\u7528\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 GpuJoin\u3068GpuPreAgg\u306e\u518d\u8a2d\u8a08\u306b\u4f34\u3046\u9ad8\u901f\u5316 \u5f93\u6765\u3001GpuJoin\u3068GpuPreAgg\u3067\u5185\u90e8\u7684\u306b\u4f7f\u7528\u3057\u3066\u3044\u305fDynamic Parallelism\u306e\u5229\u7528\u3092\u3084\u3081\u3001\u51e6\u7406\u30ed\u30b8\u30c3\u30af\u5168\u4f53\u306e\u898b\u76f4\u3057\u3092\u884c\u3044\u307e\u3057\u305f\u3002\u3053\u308c\u306f\u3001GPU\u30b5\u30d6\u30ab\u30fc\u30cd\u30eb\u306e\u8d77\u52d5\u5f8c\u3001\u305d\u306e\u5b8c\u4e86\u3092\u5358\u306b\u5f85\u3063\u3066\u3044\u308b\u3060\u3051\u306eGPU\u30ab\u30fc\u30cd\u30eb\u304c\u5b9f\u884c\u30b9\u30ed\u30c3\u30c8\u3092\u5360\u6709\u3057\u3001GPU\u306e\u4f7f\u7528\u7387\u304c\u4e0a\u304c\u3089\u306a\u3044\u3068\u3044\u3046\u554f\u984c\u304c\u3042\u3063\u305f\u305f\u3081\u3067\u3059\u3002 \u3053\u306e\u518d\u8a2d\u8a08\u306b\u4f34\u3046\u526f\u7523\u7269\u3068\u3057\u3066\u3001GpuJoin\u306e\u30b5\u30b9\u30da\u30f3\u30c9/\u30ec\u30b8\u30e5\u30fc\u30e0\u6a5f\u80fd\u304c\u5b9f\u88c5\u3055\u308c\u307e\u3057\u305f\u3002\u539f\u7406\u4e0a\u3001SQL\u306eJOIN\u51e6\u7406\u306f\u5165\u529b\u3057\u305f\u884c\u6570\u3088\u308a\u3082\u51fa\u529b\u3059\u308b\u884c\u6570\u306e\u65b9\u304c\u5897\u3048\u3066\u3057\u307e\u3046\u4e8b\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u51e6\u7406\u7d50\u679c\u3092\u66f8\u304d\u8fbc\u3080\u30d0\u30c3\u30d5\u30a1\u306e\u6b8b\u308a\u30b5\u30a4\u30ba\u304c\u4e0d\u8db3\u3057\u305f\u6642\u70b9\u3067GpuJoin\u3092\u30b5\u30b9\u30da\u30f3\u30c9\u3057\u3001\u65b0\u3057\u3044\u7d50\u679c\u30d0\u30c3\u30d5\u30a1\u3092\u5272\u308a\u5f53\u3066\u3066\u30ec\u30b8\u30e5\u30fc\u30e0\u3059\u308b\u3088\u3046\u306b\u4fee\u6b63\u3055\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u7d50\u679c\u30d0\u30c3\u30d5\u30a1\u306e\u30b5\u30a4\u30ba\u63a8\u5b9a\u304c\u7c21\u7565\u5316\u3055\u308c\u305f\u307b\u304b\u3001\u5b9f\u884c\u6642\u306e\u30d0\u30c3\u30d5\u30a1\u4e0d\u8db3\u306b\u3088\u308b\u518d\u5b9f\u884c\u306e\u5fc5\u8981\u304c\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002 GpuPreAgg+GpuJoin+GpuScan \u5bc6\u7d50\u5408GPU\u30ab\u30fc\u30cd\u30eb GPU\u3067\u5b9f\u884c\u53ef\u80fd\u306aSCAN\u3001JOIN\u3001GROUP BY\u304c\u9023\u7d9a\u3057\u3066\u3044\u308b\u3068\u304d\u3001\u5bfe\u5fdc\u3059\u308bGpuScan\u3001GpuJoin\u3001GpuPreAgg\u306b\u76f8\u5f53\u3059\u308b\u51e6\u7406\u3092\u4e00\u56de\u306eGPU\u30ab\u30fc\u30cd\u30eb\u547c\u3073\u51fa\u3057\u3067\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u3053\u308c\u306f\u3001GpuJoin\u306e\u7d50\u679c\u30d0\u30c3\u30d5\u30a1\u3092\u305d\u306e\u307e\u307eGpuPreAgg\u306e\u5165\u529b\u30d0\u30c3\u30d5\u30a1\u3068\u3057\u3066\u6271\u3046\u306a\u3069\u3001CPU\u3068GPU\u306e\u9593\u306e\u30c7\u30fc\u30bf\u4ea4\u63db\u3092\u6700\u5c0f\u9650\u306b\u6291\u3048\u308b\u305f\u3081\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u3067\u3059\u3002 \u3053\u306e\u6a5f\u80fd\u306f\u7279\u306b\u3001SSD-to-GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u4f7f\u7528\u3059\u308b\u3068\u52b9\u679c\u7684\u3067\u3059\u3002 \u65b0\u3057\u3044\u30c7\u30fc\u30bf\u578b\u306e\u5bfe\u5fdc uuid \u578b\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a2\u30c9\u30ec\u30b9\u578b\uff08 inet \u3001 cidr \u3001\u304a\u3088\u3073 macaddr \uff09\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u7bc4\u56f2\u578b\uff08 int4range \u3001 int8range \u3001 tsrange \u3001 tstzrange \u3001 daterange \uff09\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u534a\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\uff08 float2 \uff09\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002\u534a\u7cbe\u5ea6\u6d6e\u52d5\u5c0f\u6570\u70b9\u578b\u306b\u95a2\u9023\u3059\u308bCPU\u5074\u306e\u5b9f\u88c5\u306fPG-Strom\u306e\u72ec\u81ea\u5b9f\u88c5\u306b\u3088\u308b\u3082\u306e\u3067\u3059\u3002 \u65b0\u3057\u3044\u6f14\u7b97\u5b50/\u95a2\u6570\u306e\u5bfe\u5fdc \u65e5\u4ed8\u6642\u523b\u578b\u306b\u5bfe\u3059\u308b EXTRACT(field FROM timestamp) \u6f14\u7b97\u5b50\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 New data type support uuid type Network address types ( inet , cidr and macaddr ) Range data types ( int4range , int8range , tsrange , tstzrange , daterange ) Half-precision floating point type ( float2 ). Its CPU side are also implemented by PG-Strom itself, not PostgreSQL's built-in feature. New operators / functions EXTRACT(field FROM timestamp) operator on the date and time types PL/CUDA\u95a2\u9023\u306e\u5f37\u5316 #plcuda_include \u306e\u62e1\u5f35\u306b\u3088\u308a\u3001 text \u578b\u3092\u8fd4\u3059SQL\u95a2\u6570\u3092\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u5f15\u6570\u306e\u5024\u306b\u3088\u3063\u3066\u633f\u5165\u3059\u308b\u30b3\u30fc\u30c9\u3092\u5909\u3048\u308b\u4e8b\u304c\u3067\u304d\u308b\u305f\u3081\u3001\u5358\u306b\u5916\u90e8\u5b9a\u7fa9\u95a2\u6570\u3092\u8aad\u307f\u8fbc\u3080\u3060\u3051\u3067\u306a\u304f\u3001\u52d5\u7684\u306b\u3044\u304f\u3064\u3082\u306eGPU\u30ab\u30fc\u30cd\u30eb\u306e\u30d0\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u308a\u51fa\u3059\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002 PL/CUDA\u95a2\u6570\u306e\u5f15\u6570\u306b reggstore \u578b\u3092\u6307\u5b9a\u3057\u305f\u5834\u5408\u3001GPU\u30ab\u30fc\u30cd\u30eb\u95a2\u6570\u3078\u306f\u5bfe\u5fdc\u3059\u308bGPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2\u306e\u30dd\u30a4\u30f3\u30bf\u304c\u6e21\u3055\u308c\u307e\u3059\u3002OID\u5024\u304c\u6e21\u3055\u308c\u308b\u308f\u3051\u3067\u306f\u306a\u3044\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u305d\u306e\u4ed6\u306e\u6a5f\u80fd\u5f37\u5316 lo_import_gpu \u304a\u3088\u3073 lo_export_gpu \u95a2\u6570\u306b\u3088\u308a\u3001\u5916\u90e8\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u78ba\u4fdd\u3057\u305fGPU\u30e1\u30e2\u30ea\u306e\u5185\u5bb9\u3092\u76f4\u63a5PostgreSQL\u306e\u30e9\u30fc\u30b8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u8a18\u9332\u3057\u305f\u308a\u3001\u9006\u306b\u30e9\u30fc\u30b8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5185\u5bb9\u3092GPU\u30e1\u30e2\u30ea\u306b\u66f8\u304d\u51fa\u3059\u4e8b\u304c\u53ef\u80fd\u3067\u3059\u3002 \u30d1\u30c3\u30b1\u30fc\u30b8\u30f3\u30b0 PostgreSQL Global Development Group\u306e\u914d\u5e03\u3059\u308bPostgreSQL\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u9069\u5408\u3059\u308b\u3088\u3046\u3001RPM\u30d1\u30c3\u30b1\u30fc\u30b8\u5316\u3092\u884c\u3044\u307e\u3057\u305f\u3002 \u5168\u3066\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u7269\u4ef6\u306fHeteroDB SWDC(Software Distribution Center)\u3088\u308a\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u304c\u53ef\u80fd\u3067\u3059\u3002 \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8 PG-Strom\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092markdown\u3068mkdocs\u3092\u7528\u3044\u3066\u5168\u9762\u7684\u306b\u66f8\u304d\u76f4\u3057\u307e\u3057\u305f\u3002\u5f93\u6765\u306eHTML\u3092\u7528\u3044\u305f\u30a2\u30d7\u30ed\u30fc\u30c1\u306b\u6bd4\u3079\u3001\u3088\u308a\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u304c\u5bb9\u6613\u3067\u65b0\u6a5f\u80fd\u306e\u958b\u767a\u306b\u5408\u308f\u305b\u305f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u62e1\u5145\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059\u3002 \u30c6\u30b9\u30c8 PostgreSQL\u306e\u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u4f7f\u7528\u3057\u3066\u3001PG-Strom\u306e\u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002","title":"\u65b0\u6a5f\u80fd"},{"location":"release_v2.0/#_4","text":"PostgreSQL v9.5\u30b5\u30dd\u30fc\u30c8 PostgreSQL v9.6\u3067\u306fCPU\u4e26\u5217\u30af\u30a8\u30ea\u306e\u63d0\u4f9b\u306b\u4f34\u3044\u3001\u30aa\u30d7\u30c6\u30a3\u30de\u30a4\u30b6/\u30a8\u30b0\u30bc\u30ad\u30e5\u30fc\u30bf\u5171\u306b\u5927\u304d\u306a\u4fee\u6b63\u304c\u52a0\u3048\u3089\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u3089\u3068\u5bc6\u63a5\u306b\u9023\u643a\u3059\u308b\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u3068\u3063\u3066\u6700\u3082\u30a4\u30f3\u30d1\u30af\u30c8\u306e\u5927\u304d\u306a\u5909\u66f4\u306f\u300eupper planner path-ification\u300f\u3068\u547c\u3070\u308c\u308b\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306e\u5f37\u5316\u3067\u3001\u96c6\u7d04\u6f14\u7b97\u3084\u30bd\u30fc\u30c8\u306a\u3069\u306e\u5b9f\u884c\u8a08\u753b\u3082\u30b3\u30b9\u30c8\u30d9\u30fc\u30b9\u3067\u8907\u6570\u306e\u7570\u306a\u308b\u65b9\u6cd5\u3092\u6bd4\u8f03\u3057\u3066\u6700\u9069\u306a\u3082\u306e\u3092\u9078\u629e\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u3053\u308c\u306fGpuPreAgg\u3092\u5b9f\u88c5\u3059\u308b\u305f\u3081\u306b\u30d5\u30c3\u30af\u3092\u5229\u7528\u3057\u3066\u5b9f\u884c\u8a08\u753b\u3092\u66f8\u304d\u63db\u3048\u3066\u3044\u305f\u5f93\u6765\u306e\u65b9\u6cd5\u3068\u306f\u6839\u672c\u7684\u306b\u7570\u306a\u308a\u3001\u3088\u308a\u5408\u7406\u7684\u304b\u3064\u4fe1\u983c\u3067\u304d\u308b\u65b9\u6cd5\u3067GPU\u3092\u7528\u3044\u305f\u96c6\u7d04\u6f14\u7b97\u3092\u633f\u5165\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u3001\u30d0\u30b0\u306e\u6e29\u5e8a\u3067\u3042\u3063\u305f\u5b9f\u884c\u8a08\u753b\u306e\u66f8\u304d\u63db\u3048\u30ed\u30b8\u30c3\u30af\u3092\u6368\u3066\u308b\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u540c\u6642\u306b\u3001CustomScan\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306b\u3082CPU\u4e26\u5217\u306b\u5bfe\u5fdc\u3059\u308b\u305f\u3081\u306eAPI\u304c\u62e1\u5f35\u3055\u308c\u3001\u3053\u308c\u3089\u306b\u5bfe\u5fdc\u3059\u308b\u305f\u3081\u306bPostgreSQL v9.5\u30b5\u30dd\u30fc\u30c8\u306f\u5ec3\u6b62\u3055\u308c\u307e\u3057\u305f\u3002 GpuSort\u6a5f\u80fd GpuSort\u6a5f\u80fd\u306f\u6027\u80fd\u4e0a\u306e\u30e1\u30ea\u30c3\u30c8\u304c\u5f97\u3089\u308c\u306a\u3044\u305f\u3081\u5ec3\u6b62\u3055\u308c\u307e\u3057\u305f\u3002 \u30bd\u30fc\u30c8\u306fGPU\u306e\u5f97\u610f\u3068\u3059\u308b\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u4e00\u3064\u3067\u3059\u3002\u3057\u304b\u3057\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u5927\u304d\u3055\u3092\u8d8a\u3048\u308b\u30b5\u30a4\u30ba\u306e\u30c7\u30fc\u30bf\u3092\u30bd\u30fc\u30c8\u3059\u308b\u5834\u5408\u3001\u8907\u6570\u306e\u30c1\u30e3\u30f3\u30af\u306b\u5206\u5272\u3057\u3066\u90e8\u5206\u30bd\u30fc\u30c8\u3092\u884c\u3044\u3001\u5f8c\u3067CPU\u5074\u3067\u3053\u308c\u3092\u7d50\u5408\u3057\u3066\u6700\u7d42\u7d50\u679c\u3092\u51fa\u529b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u7d50\u5408\u30d5\u30a7\u30fc\u30ba\u306e\u51e6\u7406\u3092\u8efd\u304f\u3059\u308b\u306b\u306f\u3001GPU\u3067\u30bd\u30fc\u30c8\u3059\u3079\u304d\u30c1\u30e3\u30f3\u30af\u306e\u30b5\u30a4\u30ba\u3092\u5927\u304d\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u4e00\u65b9\u3067\u30c1\u30e3\u30f3\u30af\u30b5\u30a4\u30ba\u304c\u5927\u304d\u304f\u306a\u308b\u3068\u30bd\u30fc\u30c8\u51e6\u7406\u3092\u958b\u59cb\u3059\u308b\u305f\u3081\u306e\u30ea\u30fc\u30c9\u30bf\u30a4\u30e0\u304c\u9577\u304f\u306a\u308a\u3001PG-Strom\u306e\u7279\u9577\u306e\u4e00\u3064\u3067\u3042\u308b\u975e\u540c\u671f\u51e6\u7406\u306b\u3088\u308b\u30c7\u30fc\u30bf\u8ee2\u9001\u30ec\u30a4\u30c6\u30f3\u30b7\u306e\u96a0\u307a\u3044\u304c\u52b9\u304b\u306a\u304f\u306a\u308b\u3068\u3044\u3046\u30c8\u30ec\u30fc\u30c9\u30aa\u30d5\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u554f\u984c\u306b\u5bfe\u51e6\u3059\u308b\u306e\u306f\u56f0\u96e3\u3001\u5c11\u306a\u304f\u3068\u3082\u6642\u671f\u5c1a\u65e9\u3067\u3042\u308b\u3068\u5224\u65ad\u3057\u3001GpuSort\u6a5f\u80fd\u306f\u5ec3\u6b62\u3055\u308c\u307e\u3057\u305f\u3002","title":"\u5ec3\u6b62\u3055\u308c\u305f\u6a5f\u80fd"},{"location":"release_v2.2/","text":"PG-Strom v2.2\u30ea\u30ea\u30fc\u30b9 PG-Strom Development Team (1-May-2019) \u6982\u8981 PG-Strom v2.2\u306b\u304a\u3051\u308b\u4e3b\u8981\u306a\u6a5f\u80fd\u5f37\u5316\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 \u30c6\u30fc\u30d6\u30eb\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3078\u306e\u5bfe\u5fdc Arrow_Fdw\u306b\u3088\u308b\u5217\u6307\u5411\u30b9\u30c8\u30a2\u306e\u30b5\u30dd\u30fc\u30c8 \u30d3\u30eb\u30c9\u6e08\u307fGPU\u30d0\u30a4\u30ca\u30ea\u3078\u306e\u5bfe\u5fdc Jsonb\u30c7\u30fc\u30bf\u578b\u306e\u5bfe\u5fdc \u53ef\u5909\u9577\u30c7\u30fc\u30bf\u578b\u3092\u8fd4\u3059GPU\u95a2\u6570\u306e\u5bfe\u5fdc GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2\uff08Gstore_Fdw\uff09\u306e\u30bd\u30fc\u30c8\u5bfe\u5fdc NVMEoF\u3078\u306e\u5bfe\u5fdc\uff08\u5b9f\u9a13\u7684\u6a5f\u80fd\uff09 \u52d5\u4f5c\u74b0\u5883 PostgreSQL v9.6, v10, v11 CUDA Toolkit 10.1 CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3 Intel x86 64bit \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3(x86_64) NVIDIA GPU CC 6.0 \u4ee5\u964d (Pascal\u4ee5\u964d) \u65b0\u6a5f\u80fd \u30c6\u30fc\u30d6\u30eb\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3078\u306e\u5bfe\u5fdc \u30de\u30eb\u30c1GPU\u69cb\u6210\u306e\u5834\u5408\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3092\u69cb\u6210\u3059\u308b\u5b50\u30c6\u30fc\u30d6\u30eb\u306e\u7269\u7406\u7684\u306aGPU\u3068\u306e\u8ddd\u96e2\u306b\u5fdc\u3058\u3066\u6700\u9069\u306aGPU\u3092\u9078\u629e\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002NVME-oF\u74b0\u5883\u306a\u3069PCIe\u30d0\u30b9\u306e\u69cb\u6210\u3060\u3051\u3067\u306f\u6700\u9069\u8ddd\u96e2\u3092\u5224\u65ad\u3067\u304d\u306a\u3044\u5834\u5408\u306f\u3001DB\u7ba1\u7406\u8005\u306f pg_strom.nvme_distance_map \u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u7528\u3044\u3066\u5bfe\u5fdc\u95a2\u4fc2\u3092\u8a2d\u5b9a\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u975e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u3068\u306eJOIN\u6642\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u3068\u975e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u3068\u306eJOIN\u3092\u884c\u3063\u305f\u5f8c\u3001\u5404\u5b50\u30c6\u30fc\u30d6\u30eb\u306e\u51e6\u7406\u7d50\u679c\u3092\u7d50\u5408\u3059\u308b\u3088\u3046\u306a\u5b9f\u884c\u8a08\u753b\u3092\u751f\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u672c\u6a5f\u80fd\u306f Asymmetric Partition-wise JOIN \u3068\u3044\u3046\u540d\u79f0\u3067PostgreSQL v13\u306e\u672c\u4f53\u6a5f\u80fd\u3078\u3068\u63d0\u6848\u3055\u308c\u3066\u3044\u307e\u3059\u3002 Arrow_Fdw\u306b\u3088\u308b\u5217\u6307\u5411\u30b9\u30c8\u30a2\u306e\u30b5\u30dd\u30fc\u30c8 \u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u7d4c\u7531\u3067Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u51fa\u3057\u306b\u5bfe\u5fdc\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 SSD-to-GPU Direct SQL\u3092\u7528\u3044\u305fApache Arrow\u306e\u8aad\u307f\u51fa\u3057\u3068SQL\u5b9f\u884c\u306b\u3082\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002 \u30d3\u30eb\u30c9\u6e08\u307fGPU\u30d0\u30a4\u30ca\u30ea\u3078\u306e\u5bfe\u5fdc SQL\u304b\u3089GPU\u30d0\u30a4\u30ca\u30ea\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3059\u308b\u969b\u3001\u5f93\u6765\u306f\u52d5\u7684\u306b\u5909\u66f4\u3059\u308b\u8981\u7d20\u306e\u306a\u3044\u95a2\u6570\u7fa4\uff08\u30e9\u30a4\u30d6\u30e9\u30ea\u95a2\u6570\u306b\u9177\u4f3c\uff09\u3082\u542b\u3081\u3066CUDA C\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3057\u3001\u305d\u308c\u3092NVRTC(NVIDIA Run-Time Compiler)\u3092\u7528\u3044\u3066\u30d3\u30eb\u30c9\u3057\u3066\u3044\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u3001\u4e00\u90e8\u306e\u8907\u96d1\u306a\u95a2\u6570\u306e\u5f71\u97ff\u3067\u30d3\u30eb\u30c9\u6642\u9593\u304c\u6975\u7aef\u306b\u9577\u304f\u306a\u308b\u3068\u3044\u3046\u554f\u984c\u304c\u3042\u308a\u307e\u3057\u305f\u3002 v2.2\u306b\u304a\u3044\u3066\u3001\u9759\u7684\u306a\u95a2\u6570\u7fa4\u306f\u4e8b\u524d\u306b\u30d3\u30eb\u30c9\u3055\u308c\u3001SQL\u304b\u3089\u52d5\u7684\u306b\u751f\u6210\u3059\u308b\u90e8\u5206\u306e\u307f\u3092\u5b9f\u884c\u6642\u306b\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u3088\u3046\u306b\u5909\u66f4\u3055\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001GPU\u30d0\u30a4\u30ca\u30ea\u306e\u751f\u6210\u6642\u9593\u304c\u5927\u5e45\u306b\u6e1b\u5c11\u3059\u308b\u4e8b\u3068\u306a\u308a\u307e\u3057\u305f\u3002 JSONB\u30c7\u30fc\u30bf\u578b\u306e\u5bfe\u5fdc GPU\u5074\u3067JSONB\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5b50\u8981\u7d20\u3092\u53c2\u7167\u3057\u3001 numeric \u3084 text \u5024\u3068\u3057\u3066\u6761\u4ef6\u53e5\u306a\u3069\u3067\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3002 \u53ef\u5909\u9577\u30c7\u30fc\u30bf\u578b\u3092\u8fd4\u3059GPU\u95a2\u6570\u306e\u5bfe\u5fdc textcat \u306a\u3069\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u578b\u3092\u8fd4\u3059SQL\u95a2\u6570\u3092GPU\u5074\u3067\u5b9f\u88c5\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3002 GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2\uff08Gstore_Fdw\uff09\u306e\u30bd\u30fc\u30c8\u5bfe\u5fdc PL/CUDA\u306e\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u4ee5\u5916\u306b\u3001GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u3057\u3066\u5b9f\u884c\u3059\u308bSQL\u3092GPU\u3067\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u5bfe\u5fdc\u3057\u3066\u3044\u308b\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306fGpuScan\u304a\u3088\u3073GpuSort\u306e\uff12\u7a2e\u985e\u3067\u3001JOIN\u304a\u3088\u3073GROUP BY\u306b\u306f\u307e\u3060\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u305b\u3093\u3002 \u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u306e\u8ffd\u52a0 \u7c21\u6613\u306a\u30c6\u30b9\u30c8\u306e\u305f\u3081\u3001\u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002 NVME-oF\u3078\u306e\u5bfe\u5fdc\uff08\u5b9f\u9a13\u7684\u6a5f\u80fd\uff09 NVME-over-Fabric\u3092\u7528\u3044\u3066\u30de\u30a6\u30f3\u30c8\u3055\u308c\u305f\u30ea\u30e2\u30fc\u30c8\u306eNVME\u30c7\u30a3\u30b9\u30af\u304b\u3089\u306eSSD-to-GPU Direct SQL\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002\u305f\u3060\u3057\u3001Red Hat Enterprise Linux 7.x / CentOS 7.x\u3067\u306f nvme_rdma \u30c9\u30e9\u30a4\u30d0\u306e\u5165\u308c\u66ff\u3048\u304c\u5fc5\u8981\u3068\u306a\u308a\u3001\u73fe\u5728\u306e\u3068\u3053\u308d\u5b9f\u9a13\u7684\u6a5f\u80fd\u3068\u3044\u3046\u5f62\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002 \u5c06\u6765\u5ec3\u6b62\u4e88\u5b9a\u306e\u6a5f\u80fd PostgreSQL v9.6\u30b5\u30dd\u30fc\u30c8 PostgreSQL v9.6\u306eCustomScan API\u306b\u306f\u3001\u52d5\u7684\u5171\u6709\u30e1\u30e2\u30ea(DSM)\u306e\u6b63\u3057\u3044\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u306b\u5fc5\u8981\u306a\u5e7e\u3064\u304b\u306eAPI\u304c\u6b20\u3051\u3066\u304a\u308a\u3001\u5b9f\u884c\u6642\u7d71\u8a08\u60c5\u5831\u306e\u63a1\u53d6\u306a\u3069\u304c\u4e0d\u53ef\u80fd\u3067\u3057\u305f\u3002 \u307e\u305f\u3001\u5185\u90e8\u7684\u306b\u5f0f\u8868\u73fe(Expression)\u3092\u4fdd\u6301\u3059\u308b\u305f\u3081\u306e\u65b9\u6cd5\u306b\u3082\u5909\u66f4\u304c\u52a0\u3048\u3089\u308c\u3066\u3044\u308b\u4e8b\u304b\u3089\u3001\u5c11\u306a\u304f\u306a\u3044\u7b87\u6240\u3067 #if ... #endif \u30d6\u30ed\u30c3\u30af\u304c\u5fc5\u8981\u3068\u306a\u308a\u3001\u30b3\u30fc\u30c9\u306e\u4fdd\u5b88\u6027\u3092\u640d\u306a\u3063\u3066\u3044\u307e\u3057\u305f\u3002 \u3053\u308c\u3089\u306e\u554f\u984c\u306b\u3088\u308a\u3001PostgreSQL v9.6\u30b5\u30dd\u30fc\u30c8\u306f\u672c\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u6700\u5f8c\u3068\u306a\u308a\u307e\u3059\u3002PG-Strom\u3092PostgreSQL v9.6\u3067\u304a\u4f7f\u3044\u306e\u5834\u5408\u306f\u3001\u65e9\u671f\u306bPostgreSQL v11\u3078\u3068\u79fb\u884c\u3055\u308c\u308b\u4e8b\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002 Gstore_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306epgstrom\u30d5\u30a9\u30fc\u30de\u30c3\u30c8 GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2\u4e0a\u306e\u30c7\u30fc\u30bf\u5f62\u5f0f\u306f\u3001\u5143\u3005PL/CUDA\u306e\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u3055\u308c\u305f\u72ec\u81ea\u306e\u5217\u5f62\u5f0f\u3067\u3001\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u3084numeric\u30c7\u30fc\u30bf\u578b\u306e\u8868\u73fe\u306fPostgreSQL\u306e\u3082\u306e\u3092\u305d\u306e\u307e\u307e\u5229\u7528\u3057\u3066\u3044\u307e\u3057\u305f\u3002 \u305d\u306e\u5f8c\u3001GPU\u4e0a\u3067\u306e\u30c7\u30fc\u30bf\u4ea4\u63db\u7528\u5171\u901a\u5f62\u5f0f\u3068\u3057\u3066\u3001Apache Arrow\u5f62\u5f0f\u3092\u5143\u306b\u3057\u305fNVIDIA RAPIDS(cuDF)\u304c\u516c\u958b\u3055\u308c\u3001\u591a\u304f\u306e\u6a5f\u68b0\u5b66\u7fd2\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3084Python\u3067\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30b9\u30bf\u30c3\u30af\u306a\u3069\u5bfe\u5fdc\u304c\u5f37\u5316\u3055\u308c\u3064\u3064\u3042\u308a\u307e\u3059\u3002 \u4eca\u5f8c\u3001PG-Strom\u306fGstore_Fdw\u306e\u5185\u90e8\u30c7\u30fc\u30bf\u5f62\u5f0f\u3092cuDF\u3068\u5171\u901a\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u5909\u66f4\u3057\u3001\u3053\u308c\u3089\u6a5f\u68b0\u5b66\u7fd2\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3068\u306e\u76f8\u4e92\u904b\u7528\u6027\u3092\u6539\u5584\u3057\u307e\u3059\u3002\u30b3\u30fc\u30c9\u306e\u4fdd\u5b88\u6027\u3092\u9ad8\u304f\u3059\u308b\u305f\u3081\u3001\u5f93\u6765\u306e\u72ec\u81ea\u30c7\u30fc\u30bf\u5f62\u5f0f\u306f\u5ec3\u6b62\u3068\u306a\u308a\u307e\u3059\u3002 \u5ec3\u6b62\u3055\u308c\u305f\u6a5f\u80fd \u30a4\u30f3\u30e1\u30e2\u30ea\u5217\u30ad\u30e3\u30c3\u30b7\u30e5 \u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3092\u5206\u6790\u3057\u305f\u7d50\u679c\u3001\u591a\u304f\u306e\u30b1\u30fc\u30b9\u3067\u306fArrow_Fdw\u3067\u5341\u5206\u306b\u4ee3\u66ff\u53ef\u80fd\u306a\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3067\u3042\u308b\u4e8b\u304c\u5206\u304b\u308a\u307e\u3057\u305f\u3002\u91cd\u8907\u6a5f\u80fd\u3067\u3042\u308b\u305f\u3081\u3001\u30a4\u30f3\u30e1\u30e2\u30ea\u5217\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u524a\u9664\u3055\u308c\u307e\u3057\u305f\u3002","title":"PG-Strom v2.2"},{"location":"release_v2.2/#pg-strom-v22","text":"PG-Strom Development Team (1-May-2019)","title":"PG-Strom v2.2\u30ea\u30ea\u30fc\u30b9"},{"location":"release_v2.2/#_1","text":"PG-Strom v2.2\u306b\u304a\u3051\u308b\u4e3b\u8981\u306a\u6a5f\u80fd\u5f37\u5316\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 \u30c6\u30fc\u30d6\u30eb\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3078\u306e\u5bfe\u5fdc Arrow_Fdw\u306b\u3088\u308b\u5217\u6307\u5411\u30b9\u30c8\u30a2\u306e\u30b5\u30dd\u30fc\u30c8 \u30d3\u30eb\u30c9\u6e08\u307fGPU\u30d0\u30a4\u30ca\u30ea\u3078\u306e\u5bfe\u5fdc Jsonb\u30c7\u30fc\u30bf\u578b\u306e\u5bfe\u5fdc \u53ef\u5909\u9577\u30c7\u30fc\u30bf\u578b\u3092\u8fd4\u3059GPU\u95a2\u6570\u306e\u5bfe\u5fdc GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2\uff08Gstore_Fdw\uff09\u306e\u30bd\u30fc\u30c8\u5bfe\u5fdc NVMEoF\u3078\u306e\u5bfe\u5fdc\uff08\u5b9f\u9a13\u7684\u6a5f\u80fd\uff09","title":"\u6982\u8981"},{"location":"release_v2.2/#_2","text":"PostgreSQL v9.6, v10, v11 CUDA Toolkit 10.1 CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3 Intel x86 64bit \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3(x86_64) NVIDIA GPU CC 6.0 \u4ee5\u964d (Pascal\u4ee5\u964d)","title":"\u52d5\u4f5c\u74b0\u5883"},{"location":"release_v2.2/#_3","text":"\u30c6\u30fc\u30d6\u30eb\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3078\u306e\u5bfe\u5fdc \u30de\u30eb\u30c1GPU\u69cb\u6210\u306e\u5834\u5408\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3092\u69cb\u6210\u3059\u308b\u5b50\u30c6\u30fc\u30d6\u30eb\u306e\u7269\u7406\u7684\u306aGPU\u3068\u306e\u8ddd\u96e2\u306b\u5fdc\u3058\u3066\u6700\u9069\u306aGPU\u3092\u9078\u629e\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002NVME-oF\u74b0\u5883\u306a\u3069PCIe\u30d0\u30b9\u306e\u69cb\u6210\u3060\u3051\u3067\u306f\u6700\u9069\u8ddd\u96e2\u3092\u5224\u65ad\u3067\u304d\u306a\u3044\u5834\u5408\u306f\u3001DB\u7ba1\u7406\u8005\u306f pg_strom.nvme_distance_map \u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u7528\u3044\u3066\u5bfe\u5fdc\u95a2\u4fc2\u3092\u8a2d\u5b9a\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u975e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u3068\u306eJOIN\u6642\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u3068\u975e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u3068\u306eJOIN\u3092\u884c\u3063\u305f\u5f8c\u3001\u5404\u5b50\u30c6\u30fc\u30d6\u30eb\u306e\u51e6\u7406\u7d50\u679c\u3092\u7d50\u5408\u3059\u308b\u3088\u3046\u306a\u5b9f\u884c\u8a08\u753b\u3092\u751f\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u672c\u6a5f\u80fd\u306f Asymmetric Partition-wise JOIN \u3068\u3044\u3046\u540d\u79f0\u3067PostgreSQL v13\u306e\u672c\u4f53\u6a5f\u80fd\u3078\u3068\u63d0\u6848\u3055\u308c\u3066\u3044\u307e\u3059\u3002 Arrow_Fdw\u306b\u3088\u308b\u5217\u6307\u5411\u30b9\u30c8\u30a2\u306e\u30b5\u30dd\u30fc\u30c8 \u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u7d4c\u7531\u3067Apache Arrow\u5f62\u5f0f\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u51fa\u3057\u306b\u5bfe\u5fdc\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 SSD-to-GPU Direct SQL\u3092\u7528\u3044\u305fApache Arrow\u306e\u8aad\u307f\u51fa\u3057\u3068SQL\u5b9f\u884c\u306b\u3082\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002 \u30d3\u30eb\u30c9\u6e08\u307fGPU\u30d0\u30a4\u30ca\u30ea\u3078\u306e\u5bfe\u5fdc SQL\u304b\u3089GPU\u30d0\u30a4\u30ca\u30ea\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3059\u308b\u969b\u3001\u5f93\u6765\u306f\u52d5\u7684\u306b\u5909\u66f4\u3059\u308b\u8981\u7d20\u306e\u306a\u3044\u95a2\u6570\u7fa4\uff08\u30e9\u30a4\u30d6\u30e9\u30ea\u95a2\u6570\u306b\u9177\u4f3c\uff09\u3082\u542b\u3081\u3066CUDA C\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3057\u3001\u305d\u308c\u3092NVRTC(NVIDIA Run-Time Compiler)\u3092\u7528\u3044\u3066\u30d3\u30eb\u30c9\u3057\u3066\u3044\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u3001\u4e00\u90e8\u306e\u8907\u96d1\u306a\u95a2\u6570\u306e\u5f71\u97ff\u3067\u30d3\u30eb\u30c9\u6642\u9593\u304c\u6975\u7aef\u306b\u9577\u304f\u306a\u308b\u3068\u3044\u3046\u554f\u984c\u304c\u3042\u308a\u307e\u3057\u305f\u3002 v2.2\u306b\u304a\u3044\u3066\u3001\u9759\u7684\u306a\u95a2\u6570\u7fa4\u306f\u4e8b\u524d\u306b\u30d3\u30eb\u30c9\u3055\u308c\u3001SQL\u304b\u3089\u52d5\u7684\u306b\u751f\u6210\u3059\u308b\u90e8\u5206\u306e\u307f\u3092\u5b9f\u884c\u6642\u306b\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u3088\u3046\u306b\u5909\u66f4\u3055\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001GPU\u30d0\u30a4\u30ca\u30ea\u306e\u751f\u6210\u6642\u9593\u304c\u5927\u5e45\u306b\u6e1b\u5c11\u3059\u308b\u4e8b\u3068\u306a\u308a\u307e\u3057\u305f\u3002 JSONB\u30c7\u30fc\u30bf\u578b\u306e\u5bfe\u5fdc GPU\u5074\u3067JSONB\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5b50\u8981\u7d20\u3092\u53c2\u7167\u3057\u3001 numeric \u3084 text \u5024\u3068\u3057\u3066\u6761\u4ef6\u53e5\u306a\u3069\u3067\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3002 \u53ef\u5909\u9577\u30c7\u30fc\u30bf\u578b\u3092\u8fd4\u3059GPU\u95a2\u6570\u306e\u5bfe\u5fdc textcat \u306a\u3069\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u578b\u3092\u8fd4\u3059SQL\u95a2\u6570\u3092GPU\u5074\u3067\u5b9f\u88c5\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3002 GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2\uff08Gstore_Fdw\uff09\u306e\u30bd\u30fc\u30c8\u5bfe\u5fdc PL/CUDA\u306e\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u4ee5\u5916\u306b\u3001GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u3057\u3066\u5b9f\u884c\u3059\u308bSQL\u3092GPU\u3067\u5b9f\u884c\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u5bfe\u5fdc\u3057\u3066\u3044\u308b\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306fGpuScan\u304a\u3088\u3073GpuSort\u306e\uff12\u7a2e\u985e\u3067\u3001JOIN\u304a\u3088\u3073GROUP BY\u306b\u306f\u307e\u3060\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u305b\u3093\u3002 \u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u306e\u8ffd\u52a0 \u7c21\u6613\u306a\u30c6\u30b9\u30c8\u306e\u305f\u3081\u3001\u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002 NVME-oF\u3078\u306e\u5bfe\u5fdc\uff08\u5b9f\u9a13\u7684\u6a5f\u80fd\uff09 NVME-over-Fabric\u3092\u7528\u3044\u3066\u30de\u30a6\u30f3\u30c8\u3055\u308c\u305f\u30ea\u30e2\u30fc\u30c8\u306eNVME\u30c7\u30a3\u30b9\u30af\u304b\u3089\u306eSSD-to-GPU Direct SQL\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002\u305f\u3060\u3057\u3001Red Hat Enterprise Linux 7.x / CentOS 7.x\u3067\u306f nvme_rdma \u30c9\u30e9\u30a4\u30d0\u306e\u5165\u308c\u66ff\u3048\u304c\u5fc5\u8981\u3068\u306a\u308a\u3001\u73fe\u5728\u306e\u3068\u3053\u308d\u5b9f\u9a13\u7684\u6a5f\u80fd\u3068\u3044\u3046\u5f62\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002","title":"\u65b0\u6a5f\u80fd"},{"location":"release_v2.2/#_4","text":"PostgreSQL v9.6\u30b5\u30dd\u30fc\u30c8 PostgreSQL v9.6\u306eCustomScan API\u306b\u306f\u3001\u52d5\u7684\u5171\u6709\u30e1\u30e2\u30ea(DSM)\u306e\u6b63\u3057\u3044\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u306b\u5fc5\u8981\u306a\u5e7e\u3064\u304b\u306eAPI\u304c\u6b20\u3051\u3066\u304a\u308a\u3001\u5b9f\u884c\u6642\u7d71\u8a08\u60c5\u5831\u306e\u63a1\u53d6\u306a\u3069\u304c\u4e0d\u53ef\u80fd\u3067\u3057\u305f\u3002 \u307e\u305f\u3001\u5185\u90e8\u7684\u306b\u5f0f\u8868\u73fe(Expression)\u3092\u4fdd\u6301\u3059\u308b\u305f\u3081\u306e\u65b9\u6cd5\u306b\u3082\u5909\u66f4\u304c\u52a0\u3048\u3089\u308c\u3066\u3044\u308b\u4e8b\u304b\u3089\u3001\u5c11\u306a\u304f\u306a\u3044\u7b87\u6240\u3067 #if ... #endif \u30d6\u30ed\u30c3\u30af\u304c\u5fc5\u8981\u3068\u306a\u308a\u3001\u30b3\u30fc\u30c9\u306e\u4fdd\u5b88\u6027\u3092\u640d\u306a\u3063\u3066\u3044\u307e\u3057\u305f\u3002 \u3053\u308c\u3089\u306e\u554f\u984c\u306b\u3088\u308a\u3001PostgreSQL v9.6\u30b5\u30dd\u30fc\u30c8\u306f\u672c\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u6700\u5f8c\u3068\u306a\u308a\u307e\u3059\u3002PG-Strom\u3092PostgreSQL v9.6\u3067\u304a\u4f7f\u3044\u306e\u5834\u5408\u306f\u3001\u65e9\u671f\u306bPostgreSQL v11\u3078\u3068\u79fb\u884c\u3055\u308c\u308b\u4e8b\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002 Gstore_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306epgstrom\u30d5\u30a9\u30fc\u30de\u30c3\u30c8 GPU\u30e1\u30e2\u30ea\u30b9\u30c8\u30a2\u4e0a\u306e\u30c7\u30fc\u30bf\u5f62\u5f0f\u306f\u3001\u5143\u3005PL/CUDA\u306e\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u3055\u308c\u305f\u72ec\u81ea\u306e\u5217\u5f62\u5f0f\u3067\u3001\u53ef\u5909\u9577\u30c7\u30fc\u30bf\u3084numeric\u30c7\u30fc\u30bf\u578b\u306e\u8868\u73fe\u306fPostgreSQL\u306e\u3082\u306e\u3092\u305d\u306e\u307e\u307e\u5229\u7528\u3057\u3066\u3044\u307e\u3057\u305f\u3002 \u305d\u306e\u5f8c\u3001GPU\u4e0a\u3067\u306e\u30c7\u30fc\u30bf\u4ea4\u63db\u7528\u5171\u901a\u5f62\u5f0f\u3068\u3057\u3066\u3001Apache Arrow\u5f62\u5f0f\u3092\u5143\u306b\u3057\u305fNVIDIA RAPIDS(cuDF)\u304c\u516c\u958b\u3055\u308c\u3001\u591a\u304f\u306e\u6a5f\u68b0\u5b66\u7fd2\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3084Python\u3067\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30b9\u30bf\u30c3\u30af\u306a\u3069\u5bfe\u5fdc\u304c\u5f37\u5316\u3055\u308c\u3064\u3064\u3042\u308a\u307e\u3059\u3002 \u4eca\u5f8c\u3001PG-Strom\u306fGstore_Fdw\u306e\u5185\u90e8\u30c7\u30fc\u30bf\u5f62\u5f0f\u3092cuDF\u3068\u5171\u901a\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u5909\u66f4\u3057\u3001\u3053\u308c\u3089\u6a5f\u68b0\u5b66\u7fd2\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3068\u306e\u76f8\u4e92\u904b\u7528\u6027\u3092\u6539\u5584\u3057\u307e\u3059\u3002\u30b3\u30fc\u30c9\u306e\u4fdd\u5b88\u6027\u3092\u9ad8\u304f\u3059\u308b\u305f\u3081\u3001\u5f93\u6765\u306e\u72ec\u81ea\u30c7\u30fc\u30bf\u5f62\u5f0f\u306f\u5ec3\u6b62\u3068\u306a\u308a\u307e\u3059\u3002","title":"\u5c06\u6765\u5ec3\u6b62\u4e88\u5b9a\u306e\u6a5f\u80fd"},{"location":"release_v2.2/#_5","text":"\u30a4\u30f3\u30e1\u30e2\u30ea\u5217\u30ad\u30e3\u30c3\u30b7\u30e5 \u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3092\u5206\u6790\u3057\u305f\u7d50\u679c\u3001\u591a\u304f\u306e\u30b1\u30fc\u30b9\u3067\u306fArrow_Fdw\u3067\u5341\u5206\u306b\u4ee3\u66ff\u53ef\u80fd\u306a\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3067\u3042\u308b\u4e8b\u304c\u5206\u304b\u308a\u307e\u3057\u305f\u3002\u91cd\u8907\u6a5f\u80fd\u3067\u3042\u308b\u305f\u3081\u3001\u30a4\u30f3\u30e1\u30e2\u30ea\u5217\u30ad\u30e3\u30c3\u30b7\u30e5\u306f\u524a\u9664\u3055\u308c\u307e\u3057\u305f\u3002","title":"\u5ec3\u6b62\u3055\u308c\u305f\u6a5f\u80fd"},{"location":"release_v2.3/","text":"PG-Strom v2.3\u30ea\u30ea\u30fc\u30b9 PG-Strom Development Team (1-Apr-2020) \u6982\u8981 PG-Strom v2.3\u306b\u304a\u3051\u308b\u4e3b\u8981\u306a\u6a5f\u80fd\u5f37\u5316\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 GpuJoin\u306eInner\u30d0\u30c3\u30d5\u30a1\u306e\u69cb\u7bc9\u304cCPU\u4e26\u5217\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 Arrow_Fdw\u304cINSERT/TRUNCATE\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 pg2arrow\u30b3\u30de\u30f3\u30c9\u304c\u8ffd\u8a18\u30e2\u30fc\u30c9\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 mysql2arrow\u30b3\u30de\u30f3\u30c9\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002 \u52d5\u4f5c\u74b0\u5883 PostgreSQL v10, v11, v12 CUDA Toolkit 10.1 \u4ee5\u964d CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3 Intel x86 64bit \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3(x86_64) NVIDIA GPU CC 6.0 \u4ee5\u964d (Pascal or Volta) \u65b0\u6a5f\u80fd GpuJoin\u306eInner\u30d0\u30c3\u30d5\u30a1\u306e\u69cb\u7bc9\u304cCPU\u4e26\u5217\u306b\u5bfe\u5fdc \u5f93\u6765\u306fGpuJoin\u306eInner\u5074\u30d0\u30c3\u30d5\u30a1\u306e\u69cb\u7bc9\u306f\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u30d7\u30ed\u30bb\u30b9\u306e\u307f\u304c\u884c\u3063\u3066\u3044\u307e\u3057\u305f\u3002\u3053\u306e\u5236\u7d04\u306b\u3088\u308a\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u4e26\u5217\u30b9\u30ad\u30e3\u30f3\u304c\u6975\u7aef\u306b\u9045\u5ef6\u3059\u308b\u3068\u3044\u3046\u554f\u984c\u304c\u3042\u308a\u307e\u3057\u305f\u3002 \u672c\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306e\u6a5f\u80fd\u5f37\u5316\u306b\u3088\u308a\u3001\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3001\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\u306e\u3069\u3061\u3089\u3067\u3082Inner\u5074\u30d0\u30c3\u30d5\u30a1\u3092\u69cb\u7bc9\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u5834\u5408\u3067\u3082\u3001\u5404\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u306b\u5272\u308a\u5f53\u3066\u3089\u308c\u305f\u30d7\u30ed\u30bb\u30b9\u304c\u76f4\u3061\u306bGpuJoin\u51e6\u7406\u3092\u958b\u59cb\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 Partition-wise Asymmetric GpuJoin\u306e\u518d\u8a2d\u8a08 \u5168\u4f53\u7684\u306a\u30c7\u30b6\u30a4\u30f3\u306e\u518d\u8a2d\u8a08\u3092\u884c\u3044\u3001\u9069\u5207\u306a\u5c40\u9762\u306b\u304a\u3044\u3066\u591a\u6bb5GpuJoin\u304c\u9078\u629e\u3055\u308c\u3084\u3059\u304f\u306a\u308b\u3088\u3046\u6539\u826f\u3092\u884c\u3044\u307e\u3057\u305f\u3002 Arrow_Fdw\u304cINSERT/TRUNCATE\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u3001 INSERT \u306b\u3088\u308b\u30d0\u30eb\u30af\u30ed\u30fc\u30c9\u3068\u3001 pgstrom.arrow_fdw_truncate \u306b\u3088\u308bTRUNCATE\u51e6\u7406\u3092\u884c\u3046\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002 CuPy\u9023\u643a\u3068\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306eGPU\u30a8\u30af\u30b9\u30dd\u30fc\u30c8 Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u5185\u5bb9\u3092GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u306e\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306b\u30ed\u30fc\u30c9\u3057\u3001\u3053\u308c\u3092CuPy\u306e cupy.ndarray \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066Python\u30b9\u30af\u30ea\u30d7\u30c8\u304b\u3089\u53c2\u7167\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002 pg2arrow\u30b3\u30de\u30f3\u30c9\u304c\u8ffd\u8a18\u30e2\u30fc\u30c9\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 pg2arrow \u30b3\u30de\u30f3\u30c9\u306b --append \u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u8ffd\u52a0\u3055\u308c\u3001\u65e2\u5b58\u306eApache Arrow\u306b\u5bfe\u3057\u3066\u8ffd\u8a18\u3092\u884c\u3046\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002 \u307e\u305f\u540c\u6642\u306b\u3001 SELECT * FROM table \u306e\u5225\u540d\u8868\u8a18\u3068\u3057\u3066 -t table \u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002 mysql2arrow\u30b3\u30de\u30f3\u30c9\u3092\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002 PostgreSQL\u3067\u306f\u306a\u304f\u3001MySQL\u306b\u63a5\u7d9a\u3057\u3066\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u3001\u305d\u306e\u7d50\u679c\u3092Apache Arrow\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u4fdd\u5b58\u3059\u308b mysql2arrow \u30b3\u30de\u30f3\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002 \u5217\u6319\u578b\u306e\u30c7\u30fc\u30bf\u3082\u901a\u5e38\u306eUtf8\u578b\u3068\u3057\u3066\u4fdd\u5b58\u3059\u308b\uff08DictionaryBatch\u3092\u4f7f\u7528\u3057\u306a\u3044\uff09\u4ee5\u5916\u306f\u3001 pg2arrow \u3068\u540c\u7b49\u306e\u6a5f\u80fd\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002 \u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f PostgreSQL\u306e\u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306b\u5408\u308f\u305b\u3066\u3001\u5e7e\u3064\u304b\u306e\u57fa\u672c\u7684\u306a\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059\u3002 \u4fee\u6b63\u3055\u308c\u305f\u4e3b\u306a\u4e0d\u5177\u5408 GPU\u30c7\u30d0\u30a4\u30b9\u95a2\u6570/\u578b\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u7121\u52b9\u5316\u306e\u30ed\u30b8\u30c3\u30af\u3092\u6539\u5584 ALTER\u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u6642\u3001\u5168\u3066\u306eGPU\u30c7\u30d0\u30a4\u30b9\u95a2\u6570/\u578b\u306e\u30e1\u30bf\u60c5\u5831\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u7121\u52b9\u5316\u3057\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u5b9f\u969b\u306b\u7121\u52b9\u5316\u306e\u5fc5\u8981\u306e\u3042\u308b\u30a8\u30f3\u30c8\u30ea\u306e\u307f\u3092\u30af\u30ea\u30a2\u3059\u308b\u3088\u3046\u4fee\u6b63\u3092\u884c\u3044\u307e\u3057\u305f\u3002 GROUP BY\u3067\u540c\u3058\u5217\u3092\u5076\u6570\u56de\u6307\u5b9a\u3057\u305f\u969b\u306b\u6975\u7aef\u306a\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u4f4e\u4e0b\u3092\u4fee\u6b63 GROUP BY\u306e\u30ad\u30fc\u5024\u304c\u8907\u6570\u3042\u308b\u6642\u306b\u3001GpuPreAgg\u306f\u30cf\u30c3\u30b7\u30e5\u5024\u3092XOR\u3067\u7d50\u5408\u3057\u3066\u3044\u307e\u3057\u305f\u3002\u305d\u306e\u305f\u3081\u3001\u540c\u3058\u5217\u3092\u5076\u6570\u56de\u6307\u5b9a\u3057\u305f\u5834\u5408\u306b\u306f\u5e38\u306b\u30cf\u30c3\u30b7\u30e5\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c0\u306b\u306a\u308b\u3068\u3044\u3046\u554f\u984c\u304c\u3042\u308a\u307e\u3057\u305f\u3002\u9069\u5f53\u306a\u30e9\u30f3\u30c0\u30e0\u5316\u51e6\u7406\u3092\u52a0\u3048\u308b\u4e8b\u3067\u30cf\u30c3\u30b7\u30e5\u5024\u304c\u5206\u6563\u3059\u308b\u3088\u3046\u4fee\u6b63\u3057\u3066\u3044\u307e\u3059\u3002 \u6f5c\u5728\u7684\u306aGpuScan\u7121\u9650\u30eb\u30fc\u30d7\u306e\u554f\u984c\u3092\u4fee\u6b63 SSD2GPU Direct SQL\u306e\u4f7f\u7528\u6642\u3001\u5909\u6570\u306e\u672a\u521d\u671f\u5316\u306b\u3088\u308aGpuScan\u304c\u7121\u9650\u30eb\u30fc\u30d7\u306b\u9665\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3057\u305f\u3002 \u6f5c\u5728\u7684\u306aGpuJoin\u306eGPU\u30ab\u30fc\u30cd\u30eb\u30af\u30e9\u30c3\u30b7\u30e5 3\u500b\u4ee5\u4e0a\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u7d50\u5408\u3059\u308bGpuJoin\u3067\u3001\u5909\u6570\u306e\u672a\u521d\u671f\u5316\u306b\u3088\u308aGPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u3092\u5f15\u304d\u8d77\u3053\u3059\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3057\u305f\u3002 \u5ec3\u6b62\u3055\u308c\u305f\u6a5f\u80fd PostgreSQL v9.6\u30b5\u30dd\u30fc\u30c8 PostgreSQL v9.6\u306eCustomScan API\u306b\u306f\u3001\u52d5\u7684\u5171\u6709\u30e1\u30e2\u30ea(DSM)\u306e\u6b63\u3057\u3044\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u306b\u5fc5\u8981\u306a\u5e7e\u3064\u304b\u306eAPI\u304c\u6b20\u3051\u3066\u304a\u308a\u3001v10\u4ee5\u964d\u3068\u5171\u901a\u306e\u30b3\u30fc\u30c9\u3092\u4fdd\u5b88\u3059\u308b\u4e0a\u3067\u969c\u5bb3\u3068\u306a\u3063\u3066\u3044\u307e\u3057\u305f\u3002\u3053\u308c\u3089\u306e\u554f\u984c\u304b\u3089\u3001\u672c\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f PostgreSQL v9.6 \u306f\u30b5\u30dd\u30fc\u30c8\u5916\u3068\u306a\u308a\u307e\u3059\u3002 PL/CUDA \u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3092\u5206\u6790\u3057\u305f\u7d50\u679c\u3001\u72ec\u81ea\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u74b0\u5883\u3088\u308a\u3082\u3001Python\u8a00\u8a9e\u306a\u3069\u30e6\u30fc\u30b6\u306e\u4f7f\u3044\u6163\u308c\u305f\u8a00\u8a9e\u74b0\u5883\u306e\u65b9\u304c\u671b\u307e\u3057\u3044\u4e8b\u304c\u5206\u304b\u308a\u307e\u3057\u305f\u3002 \u4eca\u5f8c\u306f\u3001Arrow_Fdw\u306eGPU\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u6a5f\u80fd\u3068PL/Python\u7d4c\u7531\u3067\u306eCuPy\u547c\u51fa\u3057\u3092\u4f75\u7528\u3059\u308b\u4e8b\u3067\u3001In-database\u6a5f\u68b0\u5b66\u7fd2/\u7d71\u8a08\u89e3\u6790\u306e\u4ee3\u66ff\u624b\u6bb5\u3068\u306a\u308a\u307e\u3059\u3002 Gstore_Fdw \u672c\u6a5f\u80fd\u306f\u3001\u66f8\u304d\u8fbc\u307f\u53ef\u80fdArrow_Fdw\u3068GPU\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u6a5f\u80fd\u306b\u3088\u308a\u4ee3\u66ff\u3055\u308c\u307e\u3057\u305f\u3002 Largeobject\uff5eGPU\u9593\u30a8\u30af\u30b9\u30dd\u30fc\u30c8/\u30a4\u30f3\u30dd\u30fc\u30c8 \u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3092\u5206\u6790\u3057\u305f\u7d50\u679c\u3001\u672c\u6a5f\u80fd\u306f\u4e0d\u8981\u3068\u5224\u65ad\u3057\u307e\u3057\u305f\u3002","title":"PG-Strom v2.3"},{"location":"release_v2.3/#pg-strom-v23","text":"PG-Strom Development Team (1-Apr-2020)","title":"PG-Strom v2.3\u30ea\u30ea\u30fc\u30b9"},{"location":"release_v2.3/#_1","text":"PG-Strom v2.3\u306b\u304a\u3051\u308b\u4e3b\u8981\u306a\u6a5f\u80fd\u5f37\u5316\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 GpuJoin\u306eInner\u30d0\u30c3\u30d5\u30a1\u306e\u69cb\u7bc9\u304cCPU\u4e26\u5217\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 Arrow_Fdw\u304cINSERT/TRUNCATE\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 pg2arrow\u30b3\u30de\u30f3\u30c9\u304c\u8ffd\u8a18\u30e2\u30fc\u30c9\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 mysql2arrow\u30b3\u30de\u30f3\u30c9\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002","title":"\u6982\u8981"},{"location":"release_v2.3/#_2","text":"PostgreSQL v10, v11, v12 CUDA Toolkit 10.1 \u4ee5\u964d CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3 Intel x86 64bit \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3(x86_64) NVIDIA GPU CC 6.0 \u4ee5\u964d (Pascal or Volta)","title":"\u52d5\u4f5c\u74b0\u5883"},{"location":"release_v2.3/#_3","text":"GpuJoin\u306eInner\u30d0\u30c3\u30d5\u30a1\u306e\u69cb\u7bc9\u304cCPU\u4e26\u5217\u306b\u5bfe\u5fdc \u5f93\u6765\u306fGpuJoin\u306eInner\u5074\u30d0\u30c3\u30d5\u30a1\u306e\u69cb\u7bc9\u306f\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u30d7\u30ed\u30bb\u30b9\u306e\u307f\u304c\u884c\u3063\u3066\u3044\u307e\u3057\u305f\u3002\u3053\u306e\u5236\u7d04\u306b\u3088\u308a\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u4e26\u5217\u30b9\u30ad\u30e3\u30f3\u304c\u6975\u7aef\u306b\u9045\u5ef6\u3059\u308b\u3068\u3044\u3046\u554f\u984c\u304c\u3042\u308a\u307e\u3057\u305f\u3002 \u672c\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306e\u6a5f\u80fd\u5f37\u5316\u306b\u3088\u308a\u3001\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3001\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\u306e\u3069\u3061\u3089\u3067\u3082Inner\u5074\u30d0\u30c3\u30d5\u30a1\u3092\u69cb\u7bc9\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u5834\u5408\u3067\u3082\u3001\u5404\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u306b\u5272\u308a\u5f53\u3066\u3089\u308c\u305f\u30d7\u30ed\u30bb\u30b9\u304c\u76f4\u3061\u306bGpuJoin\u51e6\u7406\u3092\u958b\u59cb\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 Partition-wise Asymmetric GpuJoin\u306e\u518d\u8a2d\u8a08 \u5168\u4f53\u7684\u306a\u30c7\u30b6\u30a4\u30f3\u306e\u518d\u8a2d\u8a08\u3092\u884c\u3044\u3001\u9069\u5207\u306a\u5c40\u9762\u306b\u304a\u3044\u3066\u591a\u6bb5GpuJoin\u304c\u9078\u629e\u3055\u308c\u3084\u3059\u304f\u306a\u308b\u3088\u3046\u6539\u826f\u3092\u884c\u3044\u307e\u3057\u305f\u3002 Arrow_Fdw\u304cINSERT/TRUNCATE\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u3001 INSERT \u306b\u3088\u308b\u30d0\u30eb\u30af\u30ed\u30fc\u30c9\u3068\u3001 pgstrom.arrow_fdw_truncate \u306b\u3088\u308bTRUNCATE\u51e6\u7406\u3092\u884c\u3046\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002 CuPy\u9023\u643a\u3068\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306eGPU\u30a8\u30af\u30b9\u30dd\u30fc\u30c8 Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306e\u5185\u5bb9\u3092GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u306e\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306b\u30ed\u30fc\u30c9\u3057\u3001\u3053\u308c\u3092CuPy\u306e cupy.ndarray \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066Python\u30b9\u30af\u30ea\u30d7\u30c8\u304b\u3089\u53c2\u7167\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002 pg2arrow\u30b3\u30de\u30f3\u30c9\u304c\u8ffd\u8a18\u30e2\u30fc\u30c9\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 pg2arrow \u30b3\u30de\u30f3\u30c9\u306b --append \u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u8ffd\u52a0\u3055\u308c\u3001\u65e2\u5b58\u306eApache Arrow\u306b\u5bfe\u3057\u3066\u8ffd\u8a18\u3092\u884c\u3046\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002 \u307e\u305f\u540c\u6642\u306b\u3001 SELECT * FROM table \u306e\u5225\u540d\u8868\u8a18\u3068\u3057\u3066 -t table \u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002 mysql2arrow\u30b3\u30de\u30f3\u30c9\u3092\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002 PostgreSQL\u3067\u306f\u306a\u304f\u3001MySQL\u306b\u63a5\u7d9a\u3057\u3066\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u3001\u305d\u306e\u7d50\u679c\u3092Apache Arrow\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u4fdd\u5b58\u3059\u308b mysql2arrow \u30b3\u30de\u30f3\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002 \u5217\u6319\u578b\u306e\u30c7\u30fc\u30bf\u3082\u901a\u5e38\u306eUtf8\u578b\u3068\u3057\u3066\u4fdd\u5b58\u3059\u308b\uff08DictionaryBatch\u3092\u4f7f\u7528\u3057\u306a\u3044\uff09\u4ee5\u5916\u306f\u3001 pg2arrow \u3068\u540c\u7b49\u306e\u6a5f\u80fd\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002 \u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f PostgreSQL\u306e\u30ea\u30b0\u30ec\u30c3\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306b\u5408\u308f\u305b\u3066\u3001\u5e7e\u3064\u304b\u306e\u57fa\u672c\u7684\u306a\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059\u3002","title":"\u65b0\u6a5f\u80fd"},{"location":"release_v2.3/#_4","text":"GPU\u30c7\u30d0\u30a4\u30b9\u95a2\u6570/\u578b\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u7121\u52b9\u5316\u306e\u30ed\u30b8\u30c3\u30af\u3092\u6539\u5584 ALTER\u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u6642\u3001\u5168\u3066\u306eGPU\u30c7\u30d0\u30a4\u30b9\u95a2\u6570/\u578b\u306e\u30e1\u30bf\u60c5\u5831\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u7121\u52b9\u5316\u3057\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u5b9f\u969b\u306b\u7121\u52b9\u5316\u306e\u5fc5\u8981\u306e\u3042\u308b\u30a8\u30f3\u30c8\u30ea\u306e\u307f\u3092\u30af\u30ea\u30a2\u3059\u308b\u3088\u3046\u4fee\u6b63\u3092\u884c\u3044\u307e\u3057\u305f\u3002 GROUP BY\u3067\u540c\u3058\u5217\u3092\u5076\u6570\u56de\u6307\u5b9a\u3057\u305f\u969b\u306b\u6975\u7aef\u306a\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u4f4e\u4e0b\u3092\u4fee\u6b63 GROUP BY\u306e\u30ad\u30fc\u5024\u304c\u8907\u6570\u3042\u308b\u6642\u306b\u3001GpuPreAgg\u306f\u30cf\u30c3\u30b7\u30e5\u5024\u3092XOR\u3067\u7d50\u5408\u3057\u3066\u3044\u307e\u3057\u305f\u3002\u305d\u306e\u305f\u3081\u3001\u540c\u3058\u5217\u3092\u5076\u6570\u56de\u6307\u5b9a\u3057\u305f\u5834\u5408\u306b\u306f\u5e38\u306b\u30cf\u30c3\u30b7\u30e5\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c0\u306b\u306a\u308b\u3068\u3044\u3046\u554f\u984c\u304c\u3042\u308a\u307e\u3057\u305f\u3002\u9069\u5f53\u306a\u30e9\u30f3\u30c0\u30e0\u5316\u51e6\u7406\u3092\u52a0\u3048\u308b\u4e8b\u3067\u30cf\u30c3\u30b7\u30e5\u5024\u304c\u5206\u6563\u3059\u308b\u3088\u3046\u4fee\u6b63\u3057\u3066\u3044\u307e\u3059\u3002 \u6f5c\u5728\u7684\u306aGpuScan\u7121\u9650\u30eb\u30fc\u30d7\u306e\u554f\u984c\u3092\u4fee\u6b63 SSD2GPU Direct SQL\u306e\u4f7f\u7528\u6642\u3001\u5909\u6570\u306e\u672a\u521d\u671f\u5316\u306b\u3088\u308aGpuScan\u304c\u7121\u9650\u30eb\u30fc\u30d7\u306b\u9665\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3057\u305f\u3002 \u6f5c\u5728\u7684\u306aGpuJoin\u306eGPU\u30ab\u30fc\u30cd\u30eb\u30af\u30e9\u30c3\u30b7\u30e5 3\u500b\u4ee5\u4e0a\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u7d50\u5408\u3059\u308bGpuJoin\u3067\u3001\u5909\u6570\u306e\u672a\u521d\u671f\u5316\u306b\u3088\u308aGPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u3092\u5f15\u304d\u8d77\u3053\u3059\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3057\u305f\u3002","title":"\u4fee\u6b63\u3055\u308c\u305f\u4e3b\u306a\u4e0d\u5177\u5408"},{"location":"release_v2.3/#_5","text":"PostgreSQL v9.6\u30b5\u30dd\u30fc\u30c8 PostgreSQL v9.6\u306eCustomScan API\u306b\u306f\u3001\u52d5\u7684\u5171\u6709\u30e1\u30e2\u30ea(DSM)\u306e\u6b63\u3057\u3044\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u306b\u5fc5\u8981\u306a\u5e7e\u3064\u304b\u306eAPI\u304c\u6b20\u3051\u3066\u304a\u308a\u3001v10\u4ee5\u964d\u3068\u5171\u901a\u306e\u30b3\u30fc\u30c9\u3092\u4fdd\u5b88\u3059\u308b\u4e0a\u3067\u969c\u5bb3\u3068\u306a\u3063\u3066\u3044\u307e\u3057\u305f\u3002\u3053\u308c\u3089\u306e\u554f\u984c\u304b\u3089\u3001\u672c\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f PostgreSQL v9.6 \u306f\u30b5\u30dd\u30fc\u30c8\u5916\u3068\u306a\u308a\u307e\u3059\u3002 PL/CUDA \u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3092\u5206\u6790\u3057\u305f\u7d50\u679c\u3001\u72ec\u81ea\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u74b0\u5883\u3088\u308a\u3082\u3001Python\u8a00\u8a9e\u306a\u3069\u30e6\u30fc\u30b6\u306e\u4f7f\u3044\u6163\u308c\u305f\u8a00\u8a9e\u74b0\u5883\u306e\u65b9\u304c\u671b\u307e\u3057\u3044\u4e8b\u304c\u5206\u304b\u308a\u307e\u3057\u305f\u3002 \u4eca\u5f8c\u306f\u3001Arrow_Fdw\u306eGPU\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u6a5f\u80fd\u3068PL/Python\u7d4c\u7531\u3067\u306eCuPy\u547c\u51fa\u3057\u3092\u4f75\u7528\u3059\u308b\u4e8b\u3067\u3001In-database\u6a5f\u68b0\u5b66\u7fd2/\u7d71\u8a08\u89e3\u6790\u306e\u4ee3\u66ff\u624b\u6bb5\u3068\u306a\u308a\u307e\u3059\u3002 Gstore_Fdw \u672c\u6a5f\u80fd\u306f\u3001\u66f8\u304d\u8fbc\u307f\u53ef\u80fdArrow_Fdw\u3068GPU\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u6a5f\u80fd\u306b\u3088\u308a\u4ee3\u66ff\u3055\u308c\u307e\u3057\u305f\u3002 Largeobject\uff5eGPU\u9593\u30a8\u30af\u30b9\u30dd\u30fc\u30c8/\u30a4\u30f3\u30dd\u30fc\u30c8 \u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3092\u5206\u6790\u3057\u305f\u7d50\u679c\u3001\u672c\u6a5f\u80fd\u306f\u4e0d\u8981\u3068\u5224\u65ad\u3057\u307e\u3057\u305f\u3002","title":"\u5ec3\u6b62\u3055\u308c\u305f\u6a5f\u80fd"},{"location":"release_v3.0/","text":"PG-Strom v3.0\u30ea\u30ea\u30fc\u30b9 PG-Strom Development Team (29-Jun-2021) \u6982\u8981 PG-Strom v3.0\u306b\u304a\u3051\u308b\u4e3b\u8981\u306a\u5909\u66f4\u306f\u70b9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 NVIDIA GPUDirect Storage (cuFile) \u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u3044\u304f\u3064\u304b\u306ePostGIS\u95a2\u6570\u304cGPU\u3067\u5b9f\u884c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002 GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u305fGpuJoin\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u65b0\u305f\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u6a5f\u80fd\u304c\u5b9f\u88c5\u3055\u308c\u307e\u3057\u305f\u3002 \u30e6\u30fc\u30b6\u5b9a\u7fa9\u306eGPU\u30c7\u30fc\u30bf\u578b/\u95a2\u6570/\u6f14\u7b97\u5b50\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002(\u5b9f\u9a13\u7684) \u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30e9\u30a4\u30bb\u30f3\u30b9\u3092GPLv2\u304b\u3089PostgreSQL\u30e9\u30a4\u30bb\u30f3\u30b9\u3078\u3068\u5207\u308a\u66ff\u3048\u307e\u3057\u305f\u3002 \u52d5\u4f5c\u74b0\u5883 PostgreSQL v11, v12, v13 CUDA Toolkit 11.2 \u4ee5\u964d CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3 Intel x86 64bit \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3(x86_64) NVIDIA GPU CC 6.0 \u4ee5\u964d (Pascal\u4ee5\u964d) NVIDIA GPUDirect Storage GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL \u7528\u306e\u30c9\u30e9\u30a4\u30d0\u3068\u3057\u3066\u3001\u5f93\u6765\u306e nvme_strom \u30ab\u30fc\u30cd\u30eb\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u52a0\u3048\u3066\u3001 NVIDIA\u304c\u958b\u767a\u3092\u9032\u3081\u3066\u3044\u308b GPUDirect Storage \u306b\u3082\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u3069\u3061\u3089\u306e\u30c9\u30e9\u30a4\u30d0\u3082\u6982\u306d\u540c\u7b49\u306e\u6a5f\u80fd\u3001\u6027\u80fd\u3092\u6709\u3057\u3066\u3044\u307e\u3059\u304c\u3001GPUDirect Storage\u306e\u5bfe\u5fdc\u306b\u3088\u308a\u3001\u5f93\u6765\u304b\u3089\u306e\u30ed\u30fc\u30ab\u30ebNVME-SSD\u306b\u52a0\u3048\u3066\u3001NVME-oF(NVME over Fabrics)\u30c7\u30d0\u30a4\u30b9\u3084SDS(Software Defined Storage)\u30c7\u30d0\u30a4\u30b9\u3001\u304a\u3088\u3073\u305d\u306e\u4e0a\u306b\u69cb\u7bc9\u3055\u308c\u305f\u5171\u6709\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u304b\u3089\u306eGPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u306b\u3082\u5bfe\u5fdc\u3059\u308b\u4e8b\u3068\u306a\u308a\u3001\u3088\u308a\u5927\u898f\u6a21\u3067\u67d4\u8edf\u306a\u30b9\u30c8\u30ec\u30fc\u30b8\u69cb\u6210\u3092\u53d6\u308b\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002 GPUDirect SQL\u306f\u3001PostgreSQL\u6a19\u6e96\u306eHeap\u30c6\u30fc\u30d6\u30eb\u3068Apache Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u51fa\u3057\u306b\u5229\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u3001\u3044\u305a\u308c\u306e\u5834\u5408\u306b\u304a\u3044\u3066\u3082\u3001\u30c6\u30fc\u30d6\u30eb\u30b9\u30ad\u30e3\u30f3\u304c\u30dc\u30c8\u30eb\u30cd\u30c3\u30af\u3068\u306a\u308b\u3088\u3046\u306a\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u304a\u3044\u3066\u9855\u8457\u306a\u9ad8\u901f\u5316\u304c\u671f\u5f85\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u6e2c\u5b9a\u7d50\u679c\u306f\u3001GPU 1\u53f0\u3068NVME-SSD 4\u53f0\u3092\u7528\u3044\u3066\u3001SSBM(Star Schema Benchmark)\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092GPUDirect SQL\u3092GPUDirect Storage\u30c9\u30e9\u30a4\u30d0\u306e\u4e0b\u3067\u5b9f\u884c\u3057\u305f\u3082\u306e\u3067\u3059\u304c\u3001PostgreSQL heap\u3068Apache Arrow\u306e\u3044\u305a\u308c\u306e\u30b1\u30fc\u30b9\u306b\u304a\u3044\u3066\u3082\u3001\u5358\u4f4d\u6642\u9593\u3042\u305f\u308a\u306e\u30c7\u30fc\u30bf\u51e6\u7406\u4ef6\u6570\u306fPostgreSQL\u306b\u6bd4\u3079\u5927\u5e45\u306b\u6539\u5584\u3057\u3066\u3044\u308b\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 \u307e\u305f\u3001\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u4e2d\u306eNVME-SSD\u304b\u3089\u306e\u8aad\u307f\u51fa\u3057\u30b9\u30eb\u30fc\u30d7\u30c3\u30c8\u3092\u6bd4\u8f03\u3057\u3066\u307f\u308b\u3068\u3001\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3092\u4ecb\u3057\u305f\u8aad\u51fa\u3057\uff08PostgreSQL Heap Storage\uff09\u306b\u6bd4\u3079\u3001GPUDirect Storage\u3092\u4f7f\u7528\u3057\u305f\u5834\u5408\u306b\u306f\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u9650\u754c\u306b\u8fd1\u3044\u6027\u80fd\u5024\u3092\u5f15\u304d\u51fa\u305b\u3066\u3044\u308b\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 GPU\u7248PostGIS\u3068GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9 \u3044\u304f\u3064\u304b\u306ePostGIS\u95a2\u6570\u306bGPU\u7248\u3092\u5b9f\u88c5\u3057\u307e\u3057\u305f\u3002 \u6761\u4ef6\u53e5\u3067\u3053\u308c\u3089\u306ePostGIS\u95a2\u6570\u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001PG-Strom\u306fGPU\u5074\u3067\u3053\u308c\u3092\u5b9f\u884c\u3059\u308b\u3088\u3046GPU\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u81ea\u52d5\u751f\u6210\u3057\u307e\u3059\u3002 GPU\u7248PostGIS\u306e\u4e3b\u305f\u308b\u30bf\u30fc\u30b2\u30c3\u30c8\u306f\u3001\u643a\u5e2f\u96fb\u8a71\u3084\u81ea\u52d5\u8eca\u3068\u3044\u3063\u305f\u79fb\u52d5\u4f53\u30c7\u30d0\u30a4\u30b9\u306e\u6700\u65b0\u306e\u4f4d\u7f6e\u60c5\u5831\uff08Real-time Location Data\uff09\u3068\u3001\u5e02\u533a\u753a\u6751\u3084\u5b66\u533a\u306e\u5883\u754c\u3068\u3044\u3063\u305f\u9818\u57df\uff08Area Definition Data\uff09\u3068\u306e\u9593\u3067\u884c\u308f\u308c\u308b\u7a81\u5408\u51e6\u7406\u3067\u3059\u3002 \u4f8b\u3048\u3070\u3001\u4e00\u5b9a\u306e\u30a8\u30ea\u30a2\u5185\u306b\u5b58\u5728\u3059\u308b\u643a\u5e2f\u96fb\u8a71\u306b\u5e83\u544a\u3092\u914d\u4fe1\u3057\u305f\u3044\u6642\u3001\u4e00\u5b9a\u306e\u30a8\u30ea\u30a2\u5185\u306b\u5b58\u5728\u3059\u308b\u81ea\u52d5\u8eca\u306b\u6e0b\u6ede\u60c5\u5831\u3092\u914d\u4fe1\u3057\u305f\u3044\u6642\u306a\u3069\u3001\u4f4d\u7f6e\u3092\u30ad\u30fc\u3068\u3057\u3066\u8a72\u5f53\u3059\u308b\u30c7\u30d0\u30a4\u30b9\u3092\u691c\u7d22\u3059\u308b\u51e6\u7406\u306b\u52b9\u679c\u3092\u767a\u63ee\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u6771\u4eac\u8fd1\u90ca\u30a8\u30ea\u30a2\u3092\u5305\u542b\u3059\u308b\u77e9\u5f62\u9818\u57df\u5185\u306b\u30e9\u30f3\u30c0\u30e0\u306a1600\u4e07\u500b\u306e\u70b9\u30c7\u30fc\u30bf\u3092\u4f5c\u6210\u3057\u3001\u5e02\u533a\u753a\u6751\u3054\u3068\u306b\u305d\u306e\u9818\u57df\u5185\u306b\u542b\u307e\u308c\u308b\u70b9\u306e\u6570\u3092\u30ab\u30a6\u30f3\u30c8\u3059\u308b\u3068\u3044\u3046\u51e6\u7406\u306e\u5fdc\u7b54\u6642\u9593\u3092\u8a08\u6e2c\u3057\u305f\u3082\u306e\u3067\u3059\u3002 \u901a\u5e38\u306ePostGIS\u3068GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u7d44\u307f\u5408\u308f\u305b\u3067\u306f160\u79d2\u4ee5\u4e0a\u3092\u8981\u3057\u305f\u51e6\u7406\u304c\u3001GPU\u7248PostGIS\u3068GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u7d44\u307f\u5408\u308f\u305b\u306b\u304a\u3044\u3066\u306f\u3001\u50c5\u304b0.830\u79d2\u3067\u5fdc\u7b54\u3057\u3066\u3044\u307e\u3059\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5 GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u306b\u4e88\u3081\u9818\u57df\u3092\u78ba\u4fdd\u3057\u3066\u304a\u304d\u3001\u5bfe\u8c61\u3068\u306a\u308b\u30c6\u30fc\u30d6\u30eb\u306e\u8907\u88fd\u3092\u4fdd\u6301\u3057\u3066\u304a\u304f\u6a5f\u80fd\u3067\u3059\u3002 \u6bd4\u8f03\u7684\u5c0f\u898f\u6a21\u306e\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\uff08\uff5e10GB\u7a0b\u5ea6\uff09\u3067\u3001\u66f4\u65b0\u983b\u5ea6\u306e\u9ad8\u3044\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u5206\u6790/\u691c\u7d22\u7cfb\u306e\u30af\u30a8\u30ea\u3092\u52b9\u7387\u3088\u304f\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u3055\u308c\u307e\u3057\u305f\u3002 \u5206\u6790/\u691c\u7d22\u7cfb\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u6642\u306b\u306f\u3001GPU\u4e0a\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u53c2\u7167\u3059\u308b\u4e8b\u3067\u3001\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u3059\u4e8b\u306a\u304fGPU\u3067SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u51e6\u7406\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u5178\u578b\u7684\u306b\u306f\u3001\u6570\u767e\u4e07\u30c7\u30d0\u30a4\u30b9\u306e\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30c7\u30fc\u30bf\u3092GPU\u4e0a\u306b\u4fdd\u6301\u3057\u3066\u304a\u304d\u3001\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3084\u4f4d\u7f6e\u60c5\u5831\u306e\u66f4\u65b0\u304c\u9ad8\u983b\u5ea6\u3067\u767a\u751f\u3059\u308b\u3068\u3044\u3063\u305f\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3067\u3059\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u8a2d\u5b9a\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u3092\u66f4\u65b0\u3059\u308b\u3068\u3001\u305d\u306e\u66f4\u65b0\u5c65\u6b74\u3092\u30aa\u30f3\u30e1\u30e2\u30ea\u306eREDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u683c\u7d0d\u3057\u3001\u305d\u308c\u3092\u4e00\u5b9a\u9593\u9694\u304b\u3001\u307e\u305f\u306f\u5206\u6790/\u691c\u7d22\u7cfb\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u5b9f\u884c\u524d\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u5074\u306b\u53cd\u6620\u3057\u307e\u3059\u3002 \u3053\u306e\u4ed5\u7d44\u307f\u306b\u3088\u308a\u3001\u9ad8\u983b\u5ea6\u3067\u306e\u66f4\u65b0\u3068\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3068\u306e\u6574\u5408\u6027\u3068\u3092\u4e21\u7acb\u3057\u3066\u3044\u307e\u3059\u3002 \u30e6\u30fc\u30b6\u5b9a\u7fa9\u306eGPU\u30c7\u30fc\u30bf\u578b/\u95a2\u6570 \u30e6\u30fc\u30b6\u5b9a\u7fa9\u306eGPU\u30c7\u30fc\u30bf\u578b/\u95a2\u6570\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306eAPI\u3092\u65b0\u305f\u306b\u63d0\u4f9b\u3057\u307e\u3059\u3002 \u3053\u308c\u306b\u3088\u308a\u3001PG-Strom\u81ea\u4f53\u306b\u306f\u624b\u3092\u52a0\u3048\u308b\u3053\u3068\u306a\u304f\u3001\u30cb\u30c3\u30c1\u306a\u7528\u9014\u306e\u30c7\u30fc\u30bf\u578b\u3084\u305d\u308c\u3092\u51e6\u7406\u3059\u308b\u305f\u3081\u306eSQL\u95a2\u6570\u3092\u30e6\u30fc\u30b6\u304c\u72ec\u81ea\u306b\u5b9a\u7fa9\u3001\u5b9f\u88c5\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002 Notice \u672cAPI\u306f\u5b9f\u9a13\u7684\u30b9\u30c6\u30fc\u30bf\u30b9\u3067\u3042\u308a\u3001\u5c06\u6765\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u4e88\u544a\u306a\u304f\u5909\u66f4\u3055\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 \u307e\u305f\u3001\u672cAPI\u306e\u5229\u7528\u306b\u306fPG-Strom\u5185\u90e8\u69cb\u9020\u3092\u5341\u5206\u306b\u7406\u89e3\u3057\u3066\u3044\u308b\u4e8b\u304c\u524d\u63d0\u3067\u3059\u306e\u3067\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002 PostgreSQL\u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u63a1\u7528 PG-Strom v3.0\u4ee5\u964d\u3067\u306fPostgreSQL\u30e9\u30a4\u30bb\u30f3\u30b9\u3092\u63a1\u7528\u3057\u307e\u3059\u3002 \u6b74\u53f2\u7684\u306a\u7d4c\u7def\u306b\u3088\u308a\u3001\u3053\u308c\u307e\u3067\u306ePG-Strom\u3067\u306fGPLv2\u3092\u63a1\u7528\u3057\u3066\u3044\u307e\u3057\u305f\u304c\u3001PG-Strom\u30b3\u30a2\u6a5f\u80fd\u3084\u5468\u8fba\u30c4\u30fc\u30eb\u3068\u7d44\u307f\u5408\u308f\u305b\u305f\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u958b\u767a\u306b\u30e9\u30a4\u30bb\u30f3\u30b9\u4f53\u7cfb\u304c\u969c\u5bb3\u306b\u306a\u308b\u3068\u306e\u58f0\u3092\u8907\u6570\u3044\u305f\u3060\u3044\u3066\u3044\u307e\u3057\u305f\u3002 \u305d\u306e\u4ed6\u306e\u5909\u66f4 \u72ec\u81ea\u306b int1 (8bit\u6574\u6570) \u30c7\u30fc\u30bf\u578b\u3001\u304a\u3088\u3073\u95a2\u9023\u3059\u308b\u6f14\u7b97\u5b50\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 pg2arrow \u306b --inner-join \u304a\u3088\u3073 --outer-join \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002PostgreSQL\u306e\u5217\u6570\u5236\u9650\u3092\u8d8a\u3048\u305f\u6570\u306e\u5217\u3092\u6301\u3064Apache Arrow\u30d5\u30a1\u30a4\u30eb\u3092\u751f\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 \u30de\u30eb\u30c1GPU\u74b0\u5883\u3067\u306f\u3001GPU\u3054\u3068\u306b\u5c02\u7528\u306eGPU Memory Keeper\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u304c\u7acb\u3061\u4e0a\u304c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 PostgreSQL v13.x \u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 CUDA 11.2 \u304a\u3088\u3073 Ampere\u4e16\u4ee3\u306eGPU\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 ScaleFlux\u793e\u306eComputational Storage\u88fd\u54c1CSD2000\u30b7\u30ea\u30fc\u30ba\u3067\u306eGPUDirect SQL\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\uff08cuFile\u30c9\u30e9\u30a4\u30d0\u306e\u307f\uff09 \u96d1\u591a\u306a\u30d0\u30b0\u306e\u4fee\u6b63 \u5ec3\u6b62\u3055\u308c\u305f\u6a5f\u80fd PostgreSQL v10.x \u7cfb\u5217\u306e\u30b5\u30dd\u30fc\u30c8\u304c\u5ec3\u6b62\u3055\u308c\u307e\u3057\u305f\u3002 Python\u30b9\u30af\u30ea\u30d7\u30c8\u3068\u306e\u30c7\u30fc\u30bf\u9023\u643a\u6a5f\u80fd\uff08PyStrom\uff09\u304c\u5ec3\u6b62\u3055\u308c\u307e\u3057\u305f\u3002","title":"PG-Strom v3.0"},{"location":"release_v3.0/#pg-strom-v30","text":"PG-Strom Development Team (29-Jun-2021)","title":"PG-Strom v3.0\u30ea\u30ea\u30fc\u30b9"},{"location":"release_v3.0/#_1","text":"PG-Strom v3.0\u306b\u304a\u3051\u308b\u4e3b\u8981\u306a\u5909\u66f4\u306f\u70b9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 NVIDIA GPUDirect Storage (cuFile) \u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u3044\u304f\u3064\u304b\u306ePostGIS\u95a2\u6570\u304cGPU\u3067\u5b9f\u884c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002 GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u305fGpuJoin\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u65b0\u305f\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u6a5f\u80fd\u304c\u5b9f\u88c5\u3055\u308c\u307e\u3057\u305f\u3002 \u30e6\u30fc\u30b6\u5b9a\u7fa9\u306eGPU\u30c7\u30fc\u30bf\u578b/\u95a2\u6570/\u6f14\u7b97\u5b50\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002(\u5b9f\u9a13\u7684) \u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30e9\u30a4\u30bb\u30f3\u30b9\u3092GPLv2\u304b\u3089PostgreSQL\u30e9\u30a4\u30bb\u30f3\u30b9\u3078\u3068\u5207\u308a\u66ff\u3048\u307e\u3057\u305f\u3002","title":"\u6982\u8981"},{"location":"release_v3.0/#_2","text":"PostgreSQL v11, v12, v13 CUDA Toolkit 11.2 \u4ee5\u964d CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3 Intel x86 64bit \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3(x86_64) NVIDIA GPU CC 6.0 \u4ee5\u964d (Pascal\u4ee5\u964d)","title":"\u52d5\u4f5c\u74b0\u5883"},{"location":"release_v3.0/#nvidia-gpudirect-storage","text":"GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL \u7528\u306e\u30c9\u30e9\u30a4\u30d0\u3068\u3057\u3066\u3001\u5f93\u6765\u306e nvme_strom \u30ab\u30fc\u30cd\u30eb\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u52a0\u3048\u3066\u3001 NVIDIA\u304c\u958b\u767a\u3092\u9032\u3081\u3066\u3044\u308b GPUDirect Storage \u306b\u3082\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u3069\u3061\u3089\u306e\u30c9\u30e9\u30a4\u30d0\u3082\u6982\u306d\u540c\u7b49\u306e\u6a5f\u80fd\u3001\u6027\u80fd\u3092\u6709\u3057\u3066\u3044\u307e\u3059\u304c\u3001GPUDirect Storage\u306e\u5bfe\u5fdc\u306b\u3088\u308a\u3001\u5f93\u6765\u304b\u3089\u306e\u30ed\u30fc\u30ab\u30ebNVME-SSD\u306b\u52a0\u3048\u3066\u3001NVME-oF(NVME over Fabrics)\u30c7\u30d0\u30a4\u30b9\u3084SDS(Software Defined Storage)\u30c7\u30d0\u30a4\u30b9\u3001\u304a\u3088\u3073\u305d\u306e\u4e0a\u306b\u69cb\u7bc9\u3055\u308c\u305f\u5171\u6709\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u304b\u3089\u306eGPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u306b\u3082\u5bfe\u5fdc\u3059\u308b\u4e8b\u3068\u306a\u308a\u3001\u3088\u308a\u5927\u898f\u6a21\u3067\u67d4\u8edf\u306a\u30b9\u30c8\u30ec\u30fc\u30b8\u69cb\u6210\u3092\u53d6\u308b\u4e8b\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002 GPUDirect SQL\u306f\u3001PostgreSQL\u6a19\u6e96\u306eHeap\u30c6\u30fc\u30d6\u30eb\u3068Apache Arrow\u30d5\u30a1\u30a4\u30eb\u306e\u8aad\u307f\u51fa\u3057\u306b\u5229\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u3001\u3044\u305a\u308c\u306e\u5834\u5408\u306b\u304a\u3044\u3066\u3082\u3001\u30c6\u30fc\u30d6\u30eb\u30b9\u30ad\u30e3\u30f3\u304c\u30dc\u30c8\u30eb\u30cd\u30c3\u30af\u3068\u306a\u308b\u3088\u3046\u306a\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306b\u304a\u3044\u3066\u9855\u8457\u306a\u9ad8\u901f\u5316\u304c\u671f\u5f85\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u6e2c\u5b9a\u7d50\u679c\u306f\u3001GPU 1\u53f0\u3068NVME-SSD 4\u53f0\u3092\u7528\u3044\u3066\u3001SSBM(Star Schema Benchmark)\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092GPUDirect SQL\u3092GPUDirect Storage\u30c9\u30e9\u30a4\u30d0\u306e\u4e0b\u3067\u5b9f\u884c\u3057\u305f\u3082\u306e\u3067\u3059\u304c\u3001PostgreSQL heap\u3068Apache Arrow\u306e\u3044\u305a\u308c\u306e\u30b1\u30fc\u30b9\u306b\u304a\u3044\u3066\u3082\u3001\u5358\u4f4d\u6642\u9593\u3042\u305f\u308a\u306e\u30c7\u30fc\u30bf\u51e6\u7406\u4ef6\u6570\u306fPostgreSQL\u306b\u6bd4\u3079\u5927\u5e45\u306b\u6539\u5584\u3057\u3066\u3044\u308b\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002 \u307e\u305f\u3001\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u4e2d\u306eNVME-SSD\u304b\u3089\u306e\u8aad\u307f\u51fa\u3057\u30b9\u30eb\u30fc\u30d7\u30c3\u30c8\u3092\u6bd4\u8f03\u3057\u3066\u307f\u308b\u3068\u3001\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3092\u4ecb\u3057\u305f\u8aad\u51fa\u3057\uff08PostgreSQL Heap Storage\uff09\u306b\u6bd4\u3079\u3001GPUDirect Storage\u3092\u4f7f\u7528\u3057\u305f\u5834\u5408\u306b\u306f\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u9650\u754c\u306b\u8fd1\u3044\u6027\u80fd\u5024\u3092\u5f15\u304d\u51fa\u305b\u3066\u3044\u308b\u4e8b\u304c\u5206\u304b\u308a\u307e\u3059\u3002","title":"NVIDIA GPUDirect Storage"},{"location":"release_v3.0/#gpupostgisgist","text":"\u3044\u304f\u3064\u304b\u306ePostGIS\u95a2\u6570\u306bGPU\u7248\u3092\u5b9f\u88c5\u3057\u307e\u3057\u305f\u3002 \u6761\u4ef6\u53e5\u3067\u3053\u308c\u3089\u306ePostGIS\u95a2\u6570\u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001PG-Strom\u306fGPU\u5074\u3067\u3053\u308c\u3092\u5b9f\u884c\u3059\u308b\u3088\u3046GPU\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u81ea\u52d5\u751f\u6210\u3057\u307e\u3059\u3002 GPU\u7248PostGIS\u306e\u4e3b\u305f\u308b\u30bf\u30fc\u30b2\u30c3\u30c8\u306f\u3001\u643a\u5e2f\u96fb\u8a71\u3084\u81ea\u52d5\u8eca\u3068\u3044\u3063\u305f\u79fb\u52d5\u4f53\u30c7\u30d0\u30a4\u30b9\u306e\u6700\u65b0\u306e\u4f4d\u7f6e\u60c5\u5831\uff08Real-time Location Data\uff09\u3068\u3001\u5e02\u533a\u753a\u6751\u3084\u5b66\u533a\u306e\u5883\u754c\u3068\u3044\u3063\u305f\u9818\u57df\uff08Area Definition Data\uff09\u3068\u306e\u9593\u3067\u884c\u308f\u308c\u308b\u7a81\u5408\u51e6\u7406\u3067\u3059\u3002 \u4f8b\u3048\u3070\u3001\u4e00\u5b9a\u306e\u30a8\u30ea\u30a2\u5185\u306b\u5b58\u5728\u3059\u308b\u643a\u5e2f\u96fb\u8a71\u306b\u5e83\u544a\u3092\u914d\u4fe1\u3057\u305f\u3044\u6642\u3001\u4e00\u5b9a\u306e\u30a8\u30ea\u30a2\u5185\u306b\u5b58\u5728\u3059\u308b\u81ea\u52d5\u8eca\u306b\u6e0b\u6ede\u60c5\u5831\u3092\u914d\u4fe1\u3057\u305f\u3044\u6642\u306a\u3069\u3001\u4f4d\u7f6e\u3092\u30ad\u30fc\u3068\u3057\u3066\u8a72\u5f53\u3059\u308b\u30c7\u30d0\u30a4\u30b9\u3092\u691c\u7d22\u3059\u308b\u51e6\u7406\u306b\u52b9\u679c\u3092\u767a\u63ee\u3057\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u4f8b\u306f\u3001\u6771\u4eac\u8fd1\u90ca\u30a8\u30ea\u30a2\u3092\u5305\u542b\u3059\u308b\u77e9\u5f62\u9818\u57df\u5185\u306b\u30e9\u30f3\u30c0\u30e0\u306a1600\u4e07\u500b\u306e\u70b9\u30c7\u30fc\u30bf\u3092\u4f5c\u6210\u3057\u3001\u5e02\u533a\u753a\u6751\u3054\u3068\u306b\u305d\u306e\u9818\u57df\u5185\u306b\u542b\u307e\u308c\u308b\u70b9\u306e\u6570\u3092\u30ab\u30a6\u30f3\u30c8\u3059\u308b\u3068\u3044\u3046\u51e6\u7406\u306e\u5fdc\u7b54\u6642\u9593\u3092\u8a08\u6e2c\u3057\u305f\u3082\u306e\u3067\u3059\u3002 \u901a\u5e38\u306ePostGIS\u3068GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u7d44\u307f\u5408\u308f\u305b\u3067\u306f160\u79d2\u4ee5\u4e0a\u3092\u8981\u3057\u305f\u51e6\u7406\u304c\u3001GPU\u7248PostGIS\u3068GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u7d44\u307f\u5408\u308f\u305b\u306b\u304a\u3044\u3066\u306f\u3001\u50c5\u304b0.830\u79d2\u3067\u5fdc\u7b54\u3057\u3066\u3044\u307e\u3059\u3002","title":"GPU\u7248PostGIS\u3068GiST\u30a4\u30f3\u30c7\u30c3\u30af\u30b9"},{"location":"release_v3.0/#gpu","text":"GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u4e0a\u306b\u4e88\u3081\u9818\u57df\u3092\u78ba\u4fdd\u3057\u3066\u304a\u304d\u3001\u5bfe\u8c61\u3068\u306a\u308b\u30c6\u30fc\u30d6\u30eb\u306e\u8907\u88fd\u3092\u4fdd\u6301\u3057\u3066\u304a\u304f\u6a5f\u80fd\u3067\u3059\u3002 \u6bd4\u8f03\u7684\u5c0f\u898f\u6a21\u306e\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\uff08\uff5e10GB\u7a0b\u5ea6\uff09\u3067\u3001\u66f4\u65b0\u983b\u5ea6\u306e\u9ad8\u3044\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u5206\u6790/\u691c\u7d22\u7cfb\u306e\u30af\u30a8\u30ea\u3092\u52b9\u7387\u3088\u304f\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u3055\u308c\u307e\u3057\u305f\u3002 \u5206\u6790/\u691c\u7d22\u7cfb\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u6642\u306b\u306f\u3001GPU\u4e0a\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u3092\u53c2\u7167\u3059\u308b\u4e8b\u3067\u3001\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u3059\u4e8b\u306a\u304fGPU\u3067SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u51e6\u7406\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u5178\u578b\u7684\u306b\u306f\u3001\u6570\u767e\u4e07\u30c7\u30d0\u30a4\u30b9\u306e\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30c7\u30fc\u30bf\u3092GPU\u4e0a\u306b\u4fdd\u6301\u3057\u3066\u304a\u304d\u3001\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3084\u4f4d\u7f6e\u60c5\u5831\u306e\u66f4\u65b0\u304c\u9ad8\u983b\u5ea6\u3067\u767a\u751f\u3059\u308b\u3068\u3044\u3063\u305f\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3067\u3059\u3002 GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u8a2d\u5b9a\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u3092\u66f4\u65b0\u3059\u308b\u3068\u3001\u305d\u306e\u66f4\u65b0\u5c65\u6b74\u3092\u30aa\u30f3\u30e1\u30e2\u30ea\u306eREDO\u30ed\u30b0\u30d0\u30c3\u30d5\u30a1\u306b\u683c\u7d0d\u3057\u3001\u305d\u308c\u3092\u4e00\u5b9a\u9593\u9694\u304b\u3001\u307e\u305f\u306f\u5206\u6790/\u691c\u7d22\u7cfb\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u5b9f\u884c\u524d\u306bGPU\u30ad\u30e3\u30c3\u30b7\u30e5\u5074\u306b\u53cd\u6620\u3057\u307e\u3059\u3002 \u3053\u306e\u4ed5\u7d44\u307f\u306b\u3088\u308a\u3001\u9ad8\u983b\u5ea6\u3067\u306e\u66f4\u65b0\u3068\u3001GPU\u30ad\u30e3\u30c3\u30b7\u30e5\u3068\u306e\u6574\u5408\u6027\u3068\u3092\u4e21\u7acb\u3057\u3066\u3044\u307e\u3059\u3002","title":"GPU\u30ad\u30e3\u30c3\u30b7\u30e5"},{"location":"release_v3.0/#gpu_1","text":"\u30e6\u30fc\u30b6\u5b9a\u7fa9\u306eGPU\u30c7\u30fc\u30bf\u578b/\u95a2\u6570\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306eAPI\u3092\u65b0\u305f\u306b\u63d0\u4f9b\u3057\u307e\u3059\u3002 \u3053\u308c\u306b\u3088\u308a\u3001PG-Strom\u81ea\u4f53\u306b\u306f\u624b\u3092\u52a0\u3048\u308b\u3053\u3068\u306a\u304f\u3001\u30cb\u30c3\u30c1\u306a\u7528\u9014\u306e\u30c7\u30fc\u30bf\u578b\u3084\u305d\u308c\u3092\u51e6\u7406\u3059\u308b\u305f\u3081\u306eSQL\u95a2\u6570\u3092\u30e6\u30fc\u30b6\u304c\u72ec\u81ea\u306b\u5b9a\u7fa9\u3001\u5b9f\u88c5\u3059\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3057\u305f\u3002 Notice \u672cAPI\u306f\u5b9f\u9a13\u7684\u30b9\u30c6\u30fc\u30bf\u30b9\u3067\u3042\u308a\u3001\u5c06\u6765\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u4e88\u544a\u306a\u304f\u5909\u66f4\u3055\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 \u307e\u305f\u3001\u672cAPI\u306e\u5229\u7528\u306b\u306fPG-Strom\u5185\u90e8\u69cb\u9020\u3092\u5341\u5206\u306b\u7406\u89e3\u3057\u3066\u3044\u308b\u4e8b\u304c\u524d\u63d0\u3067\u3059\u306e\u3067\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002","title":"\u30e6\u30fc\u30b6\u5b9a\u7fa9\u306eGPU\u30c7\u30fc\u30bf\u578b/\u95a2\u6570"},{"location":"release_v3.0/#postgresql","text":"PG-Strom v3.0\u4ee5\u964d\u3067\u306fPostgreSQL\u30e9\u30a4\u30bb\u30f3\u30b9\u3092\u63a1\u7528\u3057\u307e\u3059\u3002 \u6b74\u53f2\u7684\u306a\u7d4c\u7def\u306b\u3088\u308a\u3001\u3053\u308c\u307e\u3067\u306ePG-Strom\u3067\u306fGPLv2\u3092\u63a1\u7528\u3057\u3066\u3044\u307e\u3057\u305f\u304c\u3001PG-Strom\u30b3\u30a2\u6a5f\u80fd\u3084\u5468\u8fba\u30c4\u30fc\u30eb\u3068\u7d44\u307f\u5408\u308f\u305b\u305f\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u958b\u767a\u306b\u30e9\u30a4\u30bb\u30f3\u30b9\u4f53\u7cfb\u304c\u969c\u5bb3\u306b\u306a\u308b\u3068\u306e\u58f0\u3092\u8907\u6570\u3044\u305f\u3060\u3044\u3066\u3044\u307e\u3057\u305f\u3002","title":"PostgreSQL\u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u63a1\u7528"},{"location":"release_v3.0/#_3","text":"\u72ec\u81ea\u306b int1 (8bit\u6574\u6570) \u30c7\u30fc\u30bf\u578b\u3001\u304a\u3088\u3073\u95a2\u9023\u3059\u308b\u6f14\u7b97\u5b50\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 pg2arrow \u306b --inner-join \u304a\u3088\u3073 --outer-join \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002PostgreSQL\u306e\u5217\u6570\u5236\u9650\u3092\u8d8a\u3048\u305f\u6570\u306e\u5217\u3092\u6301\u3064Apache Arrow\u30d5\u30a1\u30a4\u30eb\u3092\u751f\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 \u30de\u30eb\u30c1GPU\u74b0\u5883\u3067\u306f\u3001GPU\u3054\u3068\u306b\u5c02\u7528\u306eGPU Memory Keeper\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u304c\u7acb\u3061\u4e0a\u304c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 PostgreSQL v13.x \u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 CUDA 11.2 \u304a\u3088\u3073 Ampere\u4e16\u4ee3\u306eGPU\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 ScaleFlux\u793e\u306eComputational Storage\u88fd\u54c1CSD2000\u30b7\u30ea\u30fc\u30ba\u3067\u306eGPUDirect SQL\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\uff08cuFile\u30c9\u30e9\u30a4\u30d0\u306e\u307f\uff09 \u96d1\u591a\u306a\u30d0\u30b0\u306e\u4fee\u6b63","title":"\u305d\u306e\u4ed6\u306e\u5909\u66f4"},{"location":"release_v3.0/#_4","text":"PostgreSQL v10.x \u7cfb\u5217\u306e\u30b5\u30dd\u30fc\u30c8\u304c\u5ec3\u6b62\u3055\u308c\u307e\u3057\u305f\u3002 Python\u30b9\u30af\u30ea\u30d7\u30c8\u3068\u306e\u30c7\u30fc\u30bf\u9023\u643a\u6a5f\u80fd\uff08PyStrom\uff09\u304c\u5ec3\u6b62\u3055\u308c\u307e\u3057\u305f\u3002","title":"\u5ec3\u6b62\u3055\u308c\u305f\u6a5f\u80fd"},{"location":"release_v5.0/","text":"PG-Strom v5.0\u30ea\u30ea\u30fc\u30b9 PG-Strom Development Team (15-Dec-2023) \u6982\u8981 PG-Strom v5.0\u306b\u304a\u3051\u308b\u4e3b\u8981\u306a\u5909\u66f4\u306f\u70b9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 \u30b3\u30fc\u30c9\u30d9\u30fc\u30b9\u3092\u4e00\u65b0\u3057\u3001\u5f93\u6765\u306e\u8a2d\u8a08\u306b\u304a\u3051\u308b\u554f\u984c\u70b9\u3092\u6539\u826f\u3057\u307e\u3057\u305f\u3002 \u30d7\u30ed\u30bb\u30b9\u30e2\u30c7\u30eb\u304c\u30de\u30eb\u30c1\u30d7\u30ed\u30bb\u30b9\u304b\u3089\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001GPU\u30ea\u30bd\u30fc\u30b9\u306e\u6d88\u8cbb\u91cf\u3092\u524a\u6e1b\u3057\u3001\u30bf\u30b9\u30af\u30b9\u30a4\u30c3\u30c1\u30f3\u30b0\u304c\u8efd\u91cf\u306b\u306a\u308a\u307e\u3057\u305f\u3002 GPU\u30c7\u30d0\u30a4\u30b9\u30b3\u30fc\u30c9\u306fCUDA C++\u3067\u52d5\u7684\u751f\u6210\u3055\u308c\u305f\u30cd\u30a4\u30c6\u30a3\u30d6\u30b3\u30fc\u30c9\u304b\u3089\u7591\u4f3c\u30b3\u30fc\u30c9\u3078\u3068\u7f6e\u304d\u63db\u3048\u3089\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u5b9f\u884c\u6642\u30b3\u30f3\u30d1\u30a4\u30eb(NVRTC)\u304c\u4e0d\u8981\u3068\u306a\u308a\u30af\u30a8\u30ea\u306e\u5fdc\u7b54\u901f\u5ea6\u304c\u5411\u4e0a\u3057\u305f\u307b\u304b\u3001\u5c06\u6765\u7684\u306bCSD(Computational Storage Drive)\u3084DPU(Data Processing Unit)\u3067\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u8a2d\u8a08\u5909\u66f4\u3067\u3059\u3002 GPU-Cache\u306fCUDA\u30de\u30cd\u30fc\u30b8\u30c9\u30e1\u30e2\u30ea\u4e0a\u306b\u5c55\u958b\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u30aa\u30fc\u30d0\u30fc\u30b3\u30df\u30c3\u30c8\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002 GPU\u30c7\u30d0\u30a4\u30b9\u30b3\u30fc\u30c9\u4e0a\u306ePostgreSQL\u30c7\u30fc\u30bf\u578b\u306e\u8868\u73fe\u304c\u3001Coalesced Memory Access\u3092\u610f\u8b58\u3057\u305f\u30ec\u30a4\u30a2\u30a6\u30c8\u306b\u5909\u308f\u308a\u307e\u3057\u305f\u3002 GpuPreAgg\u3067\u306eGROUP BY\u51e6\u7406\u304c\u4e00\u65b0\u3055\u308c\u3001\u5168\u822c\u7684\u306a\u51e6\u7406\u901f\u5ea6\u304c\u5411\u4e0a\u3057\u307e\u3057\u305f\u3002 GpuJoin\u306e\u6bb5\u6570\u304c\u6df1\u304f\u306a\u3063\u3066\u3082\u3001\u30bf\u30d7\u30eb\u306e\u5c55\u958b\u306f\u4e00\u56de\u3060\u3051\u3067\u6e08\u3080\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 Arrow_Fdw\u304a\u3088\u3073Pg2Arrow\u304cmin/max\u7d71\u8a08\u5024\u4ed8\u304d\u306eArrow\u30d5\u30a1\u30a4\u30eb\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30d1\u30b1\u30c3\u30c8\u3092\u30ad\u30e3\u30d7\u30c1\u30e3\u3059\u308bPcap2Arrow\u30c4\u30fc\u30eb\u3001\u304a\u3088\u3073Arrow\u30d5\u30a1\u30a4\u30eb\u3092CSV\u51fa\u529b\u3059\u308barrow2csv\u30c4\u30fc\u30eb\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002 \u52d5\u4f5c\u74b0\u5883 PostgreSQL v15.x, v16.x CUDA Toolkit 12.2 \u4ee5\u964d CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3 Intel x86 64bit \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3(x86_64) NVIDIA GPU CC 6.0 \u4ee5\u964d (Pascal\u4ee5\u964d; Volta\u4ee5\u964d\u3092\u63a8\u5968) \u30d7\u30ed\u30bb\u30b9\u30e2\u30c7\u30eb\u306e\u5909\u66f4 v5.0\u3067\u306f\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u306e\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\uff08PG-Strom GPU Service\uff09\u304cGPU\u306e\u30ea\u30bd\u30fc\u30b9\u7ba1\u7406\u3084\u30bf\u30b9\u30af\u6295\u5165\u3092\u7d71\u62ec\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u3001PostgreSQL\u306e\u5404\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30d7\u30ed\u30bb\u30b9\u306fIPC\u3092\u901a\u3058\u3066GPU Service\u3078\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u51fa\u3057\u3001\u7d50\u679c\u3092\u53d7\u3051\u53d6\u308b\u5f62\u306b\u6539\u3081\u3089\u308c\u307e\u3057\u305f\u3002 v3.x\u7cfb\u5217\u307e\u3067\u306fPostgreSQL\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u30d7\u30ed\u30bb\u30b9\u304c\u500b\u5225\u306bGPU\u3092\u5236\u5fa1\u3057\u3066\u3044\u307e\u3057\u305f\u3002\u3053\u306e\u8a2d\u8a08\u306f\u3001\u304b\u3064\u3066CUDA\u3084PG-Strom\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u54c1\u8cea\u304c\u5341\u5206\u3067\u306a\u3044\u6642\u4ee3\u306b\u554f\u984c\u7b87\u6240\u306e\u7279\u5b9a\u3092\u5bb9\u6613\u306b\u3059\u308b\u3068\u3044\u3046\u5229\u70b9\u304c\u3042\u3063\u305f\u3082\u306e\u306e\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30bb\u30c3\u30b7\u30e7\u30f3\u6570\u304c\u5897\u52a0\u3059\u308b\u3068\u6975\u7aef\u306bGPU\u30ea\u30bd\u30fc\u30b9\u3092\u6d88\u8cbb\u3057\u3001\u307e\u305f\u30bf\u30b9\u30af\u5207\u308a\u66ff\u3048\u306e\u89b3\u70b9\u304b\u3089\u3082\u975e\u63a8\u5968\u3068\u3055\u308c\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u69cb\u9020\u3067\u3057\u305f\u3002 \u3053\u306e\u8a2d\u8a08\u5909\u66f4\u306b\u3088\u308a\u3001PG-Strom v5.0\u306f\u540c\u6642\u5b9f\u884c\u6570\u306e\u5897\u52a0\u306b\u5bfe\u3057\u3066\u9811\u5f37\u306b\u306a\u3063\u305f\u4ed6\u3001\u9ad8\u8ca0\u8377\u306aGPU\u30bf\u30b9\u30af\u306e\u5b9f\u884c\u6027\u80fd\u304c\u5411\u4e0a\u3057\u3066\u3044\u307e\u3059\u3002 \u7591\u4f3c\u30b3\u30fc\u30c9\u306e\u5c0e\u5165 PG-Strom v5.0\u3067\u306f\u3001SQL\u304b\u3089\u72ec\u81ea\u306e\u300e\u7591\u4f3c\u30b3\u30fc\u30c9\u300f\u3092\u751f\u6210\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30b3\u30fc\u30c9\u306f\u3053\u306e\u300e\u7591\u4f3c\u30b3\u30fc\u30c9\u300f\u3092\u5b9f\u884c\u3059\u308b\u30a4\u30f3\u30bf\u30d7\u30ea\u30bf\u3068\u3057\u3066\u50cd\u304d\u307e\u3059\u3002v3.x\u7cfb\u5217\u306e\u3088\u3046\u306bCUDA C++\u306e\u30cd\u30a4\u30c6\u30a3\u30d6\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3059\u308b\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u3053\u308c\u306f\u4e00\u898b\u3001\u6027\u80fd\u4f4e\u4e0b\u306e\u8981\u56e0\u3068\u898b\u3048\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u3057\u304b\u3057\u3001\u5143\u3005\u52d5\u7684\u30b3\u30fc\u30c9\u751f\u6210\u306e\u5bfe\u8c61\u3068\u306a\u3063\u3066\u3044\u305f\u306e\u306fWHERE\u53e5\u306a\u3069\u30af\u30a8\u30ea\u306e\u5ea6\u306b\u5909\u5316\u3059\u308b\u3054\u304f\u4e00\u90e8\u5206\u3060\u3051\u3067\u3042\u308a\u3001\u5927\u534a\u306e\u5b9f\u88c5\u306f\u9759\u7684\u306b\u30d3\u30eb\u30c9\u3055\u308c\u3066\u3044\u305f\u307b\u304b\u3001NVRTC\u306b\u3088\u308b\u5b9f\u884c\u6642\u30b3\u30f3\u30d1\u30a4\u30eb\u306e\u51e6\u7406\uff08150ms\uff5e\u7a0b\u5ea6\uff09\u3092\u7701\u7565\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u305f\u3081\u3001\u5fdc\u7b54\u6642\u9593\u306e\u6539\u5584\u306b\u5bc4\u4e0e\u3057\u3066\u3044\u307e\u3059\u3002 \u300e\u7591\u4f3c\u30b3\u30fc\u30c9\u300f\u306fEXPLAIN VERBOSE\u306b\u3088\u3063\u3066\u8868\u793a\u3055\u308c\u308b\u4f4e\u30ec\u30d9\u30eb\u306a\u30b3\u30de\u30f3\u30c9\u30bb\u30c3\u30c8\u3067\u3001\u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306bWHERE\u53e5\u306b lo_quantity > 10 \u3068\u3044\u3046\u6f14\u7b97\u5f0f\u3092\u542b\u3080\u30af\u30a8\u30ea\u306f\u3001 Scan Quals OpCode \u3068\u3057\u3066 lo_quantity \u5217\u3068\u5b9a\u6570 10 \u3068\u306e\u5927\u5c0f\u95a2\u4fc2\u3092\u6bd4\u8f03\u3059\u308b numeric_gt \u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u3088\u3046\u51e6\u7406\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002 postgres=# explain verbose select count(*), sum(lo_quantity), lo_shipmode from lineorder where lo_quantity > 10 group by lo_shipmode; QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- HashAggregate (cost=3242387.01..3242387.10 rows=7 width=51) Output: pgstrom.fcount((pgstrom.nrows())), pgstrom.sum_fp_num((pgstrom.psum((lo_quantity)::double precision))), lo_shipmode Group Key: lineorder.lo_shipmode -> Custom Scan (GpuPreAgg) on public.lineorder (cost=3242386.89..3242386.96 rows=7 width=51) Output: (pgstrom.nrows()), (pgstrom.psum((lo_quantity)::double precision)), lo_shipmode GPU Projection: pgstrom.nrows(), pgstrom.psum((lo_quantity)::double precision), lo_shipmode GPU Scan Quals: (lo_quantity > '10'::numeric) [rows: 600128800 -> 479262800] GPU-Direct SQL: enabled (GPU-0) KVars-Slot: , , , KVecs-Buffer: nbytes: 83968, ndims: 2, items=[kvec0=<0x0000-dfff, type='numeric', expr='lo_quantity'>, kvec1=<0xe000-147ff, type='bpchar', expr='lo_shipmode'>] LoadVars OpCode: {Packed items[0]={LoadVars(depth=0): kvars=[, ]}} MoveVars OpCode: {Packed items[0]={MoveVars(depth=0): items=[, ]}}} Scan Quals OpCode: {Func(bool)::numeric_gt args=[{Var(numeric): slot=0, expr='lo_quantity'}, {Const(numeric): value='10'}]} Group-By KeyHash OpCode: {HashValue arg={SaveExpr: arg={Var(bpchar): kvec=0xe000-14800, expr='lo_shipmode'}}} Group-By KeyLoad OpCode: {LoadVars(depth=-2): kvars=[]} Group-By KeyComp OpCode: {Func(bool)::bpchareq args=[{Var(bpchar): slot=1, expr='lo_shipmode'}, {Var(bpchar): slot=2, expr='lo_shipmode'}]} Partial Aggregation OpCode: {AggFuncs args=[{SaveExpr: arg={Func(float8)::float8 arg={Var(numeric): kvec=0x0000-e000, expr='lo_quantity'}}}, {SaveExpr: arg={Var(bpchar): kvec=0xe000-14800, expr='lo_shipmode'}}]} Partial Function BufSz: 24 (18 rows) \u73fe\u5728\u306f\u307e\u3060\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u304c\u3001\u3053\u306e\u7591\u4f3c\u30b3\u30fc\u30c9\u306f\u3001\u5c06\u6765\u7684\u306bCSD(Computational Storage Drive)\u3084DPU(Data Processing Unit)\u3067SQL\u51e6\u7406\u3092\u30aa\u30d5\u30ed\u30fc\u30c9\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u30c7\u30fc\u30bf\u30ec\u30a4\u30a2\u30a6\u30c8\u306e\u6539\u5584 CPU\u3068\u6bd4\u8f03\u3057\u3066\u3001GPU\u306f\u5e83\u5e2f\u57df\u306a\u30e1\u30e2\u30ea\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u306e\u6027\u80fd\u3092\u5f15\u304d\u51fa\u3059\u306b\u306f\u8fd1\u508d\u306e\u30e1\u30e2\u30ea\u9818\u57df\u3092\u540c\u3058\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u30a2\u30af\u30bb\u30b9\u3059\u308bCoalesced Memory Access\u306e\u6761\u4ef6\u3092\u6e80\u305f\u3059\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 v5.0\u3067\u306fGPU\u30c7\u30d0\u30a4\u30b9\u30b3\u30fc\u30c9\u306b\u304a\u3051\u308bPostgreSQL\u30c7\u30fc\u30bf\u578b\u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u304c\u6539\u826f\u3055\u308c\u3001Coalesced Memory Access\u306b\u9069\u3057\u305f\u5f62\u5f0f\u3068\u306a\u308a\u307e\u3057\u305f\u3002 PostgreSQL\u306e\u30c7\u30fc\u30bf\u578b\u3092\u305d\u306e\u307e\u307e\u5229\u7528\u3057\u305f\u5834\u5408\u3001\u3042\u308b\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u53c2\u7167\u3055\u308c\u308b\u30d5\u30a3\u30fc\u30eb\u30c9\u306f\u98db\u3073\u98db\u3073\u306e\u4f4d\u7f6e\u3092\u53d6\u308b\u4e8b\u306b\u306a\u308a\u3001DRAM\u304b\u3089\u306e\u8aad\u51fa\u3057\u5e2f\u57df\u3092\u6709\u52b9\u306b\u6d3b\u7528\u3067\u304d\u307e\u305b\u3093\u3002\u3053\u308c\u3092\u30d5\u30a3\u30fc\u30eb\u30c9\u6bce\u306b\u8907\u6570\u500b\u307e\u3068\u3081\u3066\u914d\u7f6e\u3059\u308b\u4e8b\u3067\u3001\u96a3\u63a5\u30b3\u30a2\u304c\u96a3\u63a5\u9818\u57df\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u305b\u308b\u3088\u3046\u306b\u306a\u308a\u3001Coalesced Memory Access\u306e\u6761\u4ef6\u3092\u6e80\u305f\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002 \u3053\u306e\u6539\u826f\u306f\u3001\u6975\u3081\u3066\u9ad8\u6027\u80fd\u306a\u30e1\u30e2\u30ea\u5e2f\u57df\u3092\u6301\u3064\u30cf\u30a4\u30a8\u30f3\u30c9GPU\u88fd\u54c1\u3060\u3051\u3067\u306a\u304f\u3001\u30df\u30c9\u30eb\u30a8\u30f3\u30c9\u7d1a\u306eGPU\u3067\u3082\u5341\u5206\u306a\u5b9f\u884c\u6027\u80fd\u3092\u5f15\u304d\u51fa\u3059\u305f\u3081\u306e\u3082\u306e\u3067\u3059\u3002 Arrow_Fdw\u306e\u7d71\u8a08\u60c5\u5831\u30b5\u30dd\u30fc\u30c8 Pg2Arrow\u3067min/max\u7d71\u8a08\u60c5\u5831\u4ed8\u304d\u306eApache Arrow\u30d5\u30a1\u30a4\u30eb\u3092\u751f\u6210\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 Pg2Arrow\u306e\u65b0\u305f\u306a\u30aa\u30d7\u30b7\u30e7\u30f3 --stat=COLUMN_NAME \u306f\u3001RecordBatch\u5358\u4f4d\u3067\u6307\u5b9a\u3057\u305f\u5217\u306e\u6700\u5927\u5024/\u6700\u5c0f\u5024\u3092\u8a18\u9332\u3057\u3066\u304a\u304d\u3001\u305d\u308c\u3092Apache Arrow\u306eCustom-Metadata\u30e1\u30ab\u30cb\u30ba\u30e0\u3092\u5229\u7528\u3057\u3066\u30d5\u30c3\u30bf\u306b\u57cb\u3081\u8fbc\u307f\u307e\u3059\u3002 Arrow_Fdw\u3092\u4ecb\u3057\u3066Apache Arrow\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u51fa\u3059\u969b\u3001\u4e0a\u8a18\u306emin/max\u7d71\u8a08\u60c5\u5831\u3092\u5229\u7528\u3057\u305f\u7bc4\u56f2\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30b9\u30ad\u30e3\u30f3\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 \u4f8b\u3048\u3070\u3001Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3059\u308b\u691c\u7d22\u6761\u4ef6\u304c\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u3067\u3042\u3063\u305f\u5834\u5408\u3001 WHERE ymd BETERRN '2020-01-01'::date AND '2021-12-31'::date ymd\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u6700\u5927\u5024\u304c '2020-01-01'::date \u672a\u6e80\u3067\u3042\u308bRecord Batch\u3084\u3001 ymd\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u6700\u5c0f\u5024\u304c '2021-12-31 ::date`\u3088\u308a\u5927\u304d\u306aRecord Batch\u306f\u3001 \u691c\u7d22\u6761\u4ef6\u306b\u30de\u30c3\u30c1\u3057\u306a\u3044\u4e8b\u304c\u660e\u3089\u304b\u3067\u3042\u308b\u305f\u3081\u3001Arrow_Fdw\u306f\u3053\u306eRecord Batch\u3092\u8aad\u307f\u98db\u3070\u3057\u307e\u3059\u3002 \u3053\u308c\u306b\u3088\u308a\u3001\u4f8b\u3048\u3070\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u306a\u3069\u3001\u8fd1\u3057\u3044\u5024\u3092\u6301\u3064\u30ec\u30b3\u30fc\u30c9\u304c\u8fd1\u508d\u306b\u96c6\u307e\u3063\u3066\u3044\u308b\u30d1\u30bf\u30fc\u30f3\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u304a\u3044\u3066\u306f\u3001\u7bc4\u56f2\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u7528\u3044\u305f\u7d5e\u8fbc\u307f\u3068\u540c\u7b49\u306e\u6027\u80fd\u304c\u5f97\u3089\u308c\u307e\u3059\u3002 \u305d\u306e\u4ed6\u306e\u5909\u66f4\u70b9 PostgreSQL v14 \u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002v15\u4ee5\u964d\u3078\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3092\u304a\u9858\u3044\u3057\u307e\u3059\u3002 Partition-wise GpuJoin\u6a5f\u80fd\u306b\u95a2\u3057\u3066\u306f\u3001\u958b\u767a\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u4e0a\u306e\u7406\u7531\u306b\u3088\u308a\u3001v5.0\u3067\u306f\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u5c06\u6765\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u518d\u3073\u5b9f\u88c5\u3055\u308c\u308b\u4e88\u5b9a\u3067\u3059\u3002","title":"PG-Strom v5.0"},{"location":"release_v5.0/#pg-strom-v50","text":"PG-Strom Development Team (15-Dec-2023)","title":"PG-Strom v5.0\u30ea\u30ea\u30fc\u30b9"},{"location":"release_v5.0/#_1","text":"PG-Strom v5.0\u306b\u304a\u3051\u308b\u4e3b\u8981\u306a\u5909\u66f4\u306f\u70b9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 \u30b3\u30fc\u30c9\u30d9\u30fc\u30b9\u3092\u4e00\u65b0\u3057\u3001\u5f93\u6765\u306e\u8a2d\u8a08\u306b\u304a\u3051\u308b\u554f\u984c\u70b9\u3092\u6539\u826f\u3057\u307e\u3057\u305f\u3002 \u30d7\u30ed\u30bb\u30b9\u30e2\u30c7\u30eb\u304c\u30de\u30eb\u30c1\u30d7\u30ed\u30bb\u30b9\u304b\u3089\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001GPU\u30ea\u30bd\u30fc\u30b9\u306e\u6d88\u8cbb\u91cf\u3092\u524a\u6e1b\u3057\u3001\u30bf\u30b9\u30af\u30b9\u30a4\u30c3\u30c1\u30f3\u30b0\u304c\u8efd\u91cf\u306b\u306a\u308a\u307e\u3057\u305f\u3002 GPU\u30c7\u30d0\u30a4\u30b9\u30b3\u30fc\u30c9\u306fCUDA C++\u3067\u52d5\u7684\u751f\u6210\u3055\u308c\u305f\u30cd\u30a4\u30c6\u30a3\u30d6\u30b3\u30fc\u30c9\u304b\u3089\u7591\u4f3c\u30b3\u30fc\u30c9\u3078\u3068\u7f6e\u304d\u63db\u3048\u3089\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u5b9f\u884c\u6642\u30b3\u30f3\u30d1\u30a4\u30eb(NVRTC)\u304c\u4e0d\u8981\u3068\u306a\u308a\u30af\u30a8\u30ea\u306e\u5fdc\u7b54\u901f\u5ea6\u304c\u5411\u4e0a\u3057\u305f\u307b\u304b\u3001\u5c06\u6765\u7684\u306bCSD(Computational Storage Drive)\u3084DPU(Data Processing Unit)\u3067\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u8a2d\u8a08\u5909\u66f4\u3067\u3059\u3002 GPU-Cache\u306fCUDA\u30de\u30cd\u30fc\u30b8\u30c9\u30e1\u30e2\u30ea\u4e0a\u306b\u5c55\u958b\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u306e\u30aa\u30fc\u30d0\u30fc\u30b3\u30df\u30c3\u30c8\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002 GPU\u30c7\u30d0\u30a4\u30b9\u30b3\u30fc\u30c9\u4e0a\u306ePostgreSQL\u30c7\u30fc\u30bf\u578b\u306e\u8868\u73fe\u304c\u3001Coalesced Memory Access\u3092\u610f\u8b58\u3057\u305f\u30ec\u30a4\u30a2\u30a6\u30c8\u306b\u5909\u308f\u308a\u307e\u3057\u305f\u3002 GpuPreAgg\u3067\u306eGROUP BY\u51e6\u7406\u304c\u4e00\u65b0\u3055\u308c\u3001\u5168\u822c\u7684\u306a\u51e6\u7406\u901f\u5ea6\u304c\u5411\u4e0a\u3057\u307e\u3057\u305f\u3002 GpuJoin\u306e\u6bb5\u6570\u304c\u6df1\u304f\u306a\u3063\u3066\u3082\u3001\u30bf\u30d7\u30eb\u306e\u5c55\u958b\u306f\u4e00\u56de\u3060\u3051\u3067\u6e08\u3080\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 Arrow_Fdw\u304a\u3088\u3073Pg2Arrow\u304cmin/max\u7d71\u8a08\u5024\u4ed8\u304d\u306eArrow\u30d5\u30a1\u30a4\u30eb\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30d1\u30b1\u30c3\u30c8\u3092\u30ad\u30e3\u30d7\u30c1\u30e3\u3059\u308bPcap2Arrow\u30c4\u30fc\u30eb\u3001\u304a\u3088\u3073Arrow\u30d5\u30a1\u30a4\u30eb\u3092CSV\u51fa\u529b\u3059\u308barrow2csv\u30c4\u30fc\u30eb\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002","title":"\u6982\u8981"},{"location":"release_v5.0/#_2","text":"PostgreSQL v15.x, v16.x CUDA Toolkit 12.2 \u4ee5\u964d CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3 Intel x86 64bit \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3(x86_64) NVIDIA GPU CC 6.0 \u4ee5\u964d (Pascal\u4ee5\u964d; Volta\u4ee5\u964d\u3092\u63a8\u5968)","title":"\u52d5\u4f5c\u74b0\u5883"},{"location":"release_v5.0/#_3","text":"v5.0\u3067\u306f\u30de\u30eb\u30c1\u30b9\u30ec\u30c3\u30c9\u306e\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\uff08PG-Strom GPU Service\uff09\u304cGPU\u306e\u30ea\u30bd\u30fc\u30b9\u7ba1\u7406\u3084\u30bf\u30b9\u30af\u6295\u5165\u3092\u7d71\u62ec\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u3001PostgreSQL\u306e\u5404\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30d7\u30ed\u30bb\u30b9\u306fIPC\u3092\u901a\u3058\u3066GPU Service\u3078\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u51fa\u3057\u3001\u7d50\u679c\u3092\u53d7\u3051\u53d6\u308b\u5f62\u306b\u6539\u3081\u3089\u308c\u307e\u3057\u305f\u3002 v3.x\u7cfb\u5217\u307e\u3067\u306fPostgreSQL\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u30d7\u30ed\u30bb\u30b9\u304c\u500b\u5225\u306bGPU\u3092\u5236\u5fa1\u3057\u3066\u3044\u307e\u3057\u305f\u3002\u3053\u306e\u8a2d\u8a08\u306f\u3001\u304b\u3064\u3066CUDA\u3084PG-Strom\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u54c1\u8cea\u304c\u5341\u5206\u3067\u306a\u3044\u6642\u4ee3\u306b\u554f\u984c\u7b87\u6240\u306e\u7279\u5b9a\u3092\u5bb9\u6613\u306b\u3059\u308b\u3068\u3044\u3046\u5229\u70b9\u304c\u3042\u3063\u305f\u3082\u306e\u306e\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30bb\u30c3\u30b7\u30e7\u30f3\u6570\u304c\u5897\u52a0\u3059\u308b\u3068\u6975\u7aef\u306bGPU\u30ea\u30bd\u30fc\u30b9\u3092\u6d88\u8cbb\u3057\u3001\u307e\u305f\u30bf\u30b9\u30af\u5207\u308a\u66ff\u3048\u306e\u89b3\u70b9\u304b\u3089\u3082\u975e\u63a8\u5968\u3068\u3055\u308c\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u69cb\u9020\u3067\u3057\u305f\u3002 \u3053\u306e\u8a2d\u8a08\u5909\u66f4\u306b\u3088\u308a\u3001PG-Strom v5.0\u306f\u540c\u6642\u5b9f\u884c\u6570\u306e\u5897\u52a0\u306b\u5bfe\u3057\u3066\u9811\u5f37\u306b\u306a\u3063\u305f\u4ed6\u3001\u9ad8\u8ca0\u8377\u306aGPU\u30bf\u30b9\u30af\u306e\u5b9f\u884c\u6027\u80fd\u304c\u5411\u4e0a\u3057\u3066\u3044\u307e\u3059\u3002","title":"\u30d7\u30ed\u30bb\u30b9\u30e2\u30c7\u30eb\u306e\u5909\u66f4"},{"location":"release_v5.0/#_4","text":"PG-Strom v5.0\u3067\u306f\u3001SQL\u304b\u3089\u72ec\u81ea\u306e\u300e\u7591\u4f3c\u30b3\u30fc\u30c9\u300f\u3092\u751f\u6210\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30b3\u30fc\u30c9\u306f\u3053\u306e\u300e\u7591\u4f3c\u30b3\u30fc\u30c9\u300f\u3092\u5b9f\u884c\u3059\u308b\u30a4\u30f3\u30bf\u30d7\u30ea\u30bf\u3068\u3057\u3066\u50cd\u304d\u307e\u3059\u3002v3.x\u7cfb\u5217\u306e\u3088\u3046\u306bCUDA C++\u306e\u30cd\u30a4\u30c6\u30a3\u30d6\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3059\u308b\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u3053\u308c\u306f\u4e00\u898b\u3001\u6027\u80fd\u4f4e\u4e0b\u306e\u8981\u56e0\u3068\u898b\u3048\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u3057\u304b\u3057\u3001\u5143\u3005\u52d5\u7684\u30b3\u30fc\u30c9\u751f\u6210\u306e\u5bfe\u8c61\u3068\u306a\u3063\u3066\u3044\u305f\u306e\u306fWHERE\u53e5\u306a\u3069\u30af\u30a8\u30ea\u306e\u5ea6\u306b\u5909\u5316\u3059\u308b\u3054\u304f\u4e00\u90e8\u5206\u3060\u3051\u3067\u3042\u308a\u3001\u5927\u534a\u306e\u5b9f\u88c5\u306f\u9759\u7684\u306b\u30d3\u30eb\u30c9\u3055\u308c\u3066\u3044\u305f\u307b\u304b\u3001NVRTC\u306b\u3088\u308b\u5b9f\u884c\u6642\u30b3\u30f3\u30d1\u30a4\u30eb\u306e\u51e6\u7406\uff08150ms\uff5e\u7a0b\u5ea6\uff09\u3092\u7701\u7565\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u305f\u3081\u3001\u5fdc\u7b54\u6642\u9593\u306e\u6539\u5584\u306b\u5bc4\u4e0e\u3057\u3066\u3044\u307e\u3059\u3002 \u300e\u7591\u4f3c\u30b3\u30fc\u30c9\u300f\u306fEXPLAIN VERBOSE\u306b\u3088\u3063\u3066\u8868\u793a\u3055\u308c\u308b\u4f4e\u30ec\u30d9\u30eb\u306a\u30b3\u30de\u30f3\u30c9\u30bb\u30c3\u30c8\u3067\u3001\u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306bWHERE\u53e5\u306b lo_quantity > 10 \u3068\u3044\u3046\u6f14\u7b97\u5f0f\u3092\u542b\u3080\u30af\u30a8\u30ea\u306f\u3001 Scan Quals OpCode \u3068\u3057\u3066 lo_quantity \u5217\u3068\u5b9a\u6570 10 \u3068\u306e\u5927\u5c0f\u95a2\u4fc2\u3092\u6bd4\u8f03\u3059\u308b numeric_gt \u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u3088\u3046\u51e6\u7406\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002 postgres=# explain verbose select count(*), sum(lo_quantity), lo_shipmode from lineorder where lo_quantity > 10 group by lo_shipmode; QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- HashAggregate (cost=3242387.01..3242387.10 rows=7 width=51) Output: pgstrom.fcount((pgstrom.nrows())), pgstrom.sum_fp_num((pgstrom.psum((lo_quantity)::double precision))), lo_shipmode Group Key: lineorder.lo_shipmode -> Custom Scan (GpuPreAgg) on public.lineorder (cost=3242386.89..3242386.96 rows=7 width=51) Output: (pgstrom.nrows()), (pgstrom.psum((lo_quantity)::double precision)), lo_shipmode GPU Projection: pgstrom.nrows(), pgstrom.psum((lo_quantity)::double precision), lo_shipmode GPU Scan Quals: (lo_quantity > '10'::numeric) [rows: 600128800 -> 479262800] GPU-Direct SQL: enabled (GPU-0) KVars-Slot: , , , KVecs-Buffer: nbytes: 83968, ndims: 2, items=[kvec0=<0x0000-dfff, type='numeric', expr='lo_quantity'>, kvec1=<0xe000-147ff, type='bpchar', expr='lo_shipmode'>] LoadVars OpCode: {Packed items[0]={LoadVars(depth=0): kvars=[, ]}} MoveVars OpCode: {Packed items[0]={MoveVars(depth=0): items=[, ]}}} Scan Quals OpCode: {Func(bool)::numeric_gt args=[{Var(numeric): slot=0, expr='lo_quantity'}, {Const(numeric): value='10'}]} Group-By KeyHash OpCode: {HashValue arg={SaveExpr: arg={Var(bpchar): kvec=0xe000-14800, expr='lo_shipmode'}}} Group-By KeyLoad OpCode: {LoadVars(depth=-2): kvars=[]} Group-By KeyComp OpCode: {Func(bool)::bpchareq args=[{Var(bpchar): slot=1, expr='lo_shipmode'}, {Var(bpchar): slot=2, expr='lo_shipmode'}]} Partial Aggregation OpCode: {AggFuncs args=[{SaveExpr: arg={Func(float8)::float8 arg={Var(numeric): kvec=0x0000-e000, expr='lo_quantity'}}}, {SaveExpr: arg={Var(bpchar): kvec=0xe000-14800, expr='lo_shipmode'}}]} Partial Function BufSz: 24 (18 rows) \u73fe\u5728\u306f\u307e\u3060\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u304c\u3001\u3053\u306e\u7591\u4f3c\u30b3\u30fc\u30c9\u306f\u3001\u5c06\u6765\u7684\u306bCSD(Computational Storage Drive)\u3084DPU(Data Processing Unit)\u3067SQL\u51e6\u7406\u3092\u30aa\u30d5\u30ed\u30fc\u30c9\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u3055\u308c\u3066\u3044\u307e\u3059\u3002","title":"\u7591\u4f3c\u30b3\u30fc\u30c9\u306e\u5c0e\u5165"},{"location":"release_v5.0/#_5","text":"CPU\u3068\u6bd4\u8f03\u3057\u3066\u3001GPU\u306f\u5e83\u5e2f\u57df\u306a\u30e1\u30e2\u30ea\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u306e\u6027\u80fd\u3092\u5f15\u304d\u51fa\u3059\u306b\u306f\u8fd1\u508d\u306e\u30e1\u30e2\u30ea\u9818\u57df\u3092\u540c\u3058\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u30a2\u30af\u30bb\u30b9\u3059\u308bCoalesced Memory Access\u306e\u6761\u4ef6\u3092\u6e80\u305f\u3059\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 v5.0\u3067\u306fGPU\u30c7\u30d0\u30a4\u30b9\u30b3\u30fc\u30c9\u306b\u304a\u3051\u308bPostgreSQL\u30c7\u30fc\u30bf\u578b\u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u304c\u6539\u826f\u3055\u308c\u3001Coalesced Memory Access\u306b\u9069\u3057\u305f\u5f62\u5f0f\u3068\u306a\u308a\u307e\u3057\u305f\u3002 PostgreSQL\u306e\u30c7\u30fc\u30bf\u578b\u3092\u305d\u306e\u307e\u307e\u5229\u7528\u3057\u305f\u5834\u5408\u3001\u3042\u308b\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u53c2\u7167\u3055\u308c\u308b\u30d5\u30a3\u30fc\u30eb\u30c9\u306f\u98db\u3073\u98db\u3073\u306e\u4f4d\u7f6e\u3092\u53d6\u308b\u4e8b\u306b\u306a\u308a\u3001DRAM\u304b\u3089\u306e\u8aad\u51fa\u3057\u5e2f\u57df\u3092\u6709\u52b9\u306b\u6d3b\u7528\u3067\u304d\u307e\u305b\u3093\u3002\u3053\u308c\u3092\u30d5\u30a3\u30fc\u30eb\u30c9\u6bce\u306b\u8907\u6570\u500b\u307e\u3068\u3081\u3066\u914d\u7f6e\u3059\u308b\u4e8b\u3067\u3001\u96a3\u63a5\u30b3\u30a2\u304c\u96a3\u63a5\u9818\u57df\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u305b\u308b\u3088\u3046\u306b\u306a\u308a\u3001Coalesced Memory Access\u306e\u6761\u4ef6\u3092\u6e80\u305f\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002 \u3053\u306e\u6539\u826f\u306f\u3001\u6975\u3081\u3066\u9ad8\u6027\u80fd\u306a\u30e1\u30e2\u30ea\u5e2f\u57df\u3092\u6301\u3064\u30cf\u30a4\u30a8\u30f3\u30c9GPU\u88fd\u54c1\u3060\u3051\u3067\u306a\u304f\u3001\u30df\u30c9\u30eb\u30a8\u30f3\u30c9\u7d1a\u306eGPU\u3067\u3082\u5341\u5206\u306a\u5b9f\u884c\u6027\u80fd\u3092\u5f15\u304d\u51fa\u3059\u305f\u3081\u306e\u3082\u306e\u3067\u3059\u3002","title":"\u30c7\u30fc\u30bf\u30ec\u30a4\u30a2\u30a6\u30c8\u306e\u6539\u5584"},{"location":"release_v5.0/#arrow_fdw","text":"Pg2Arrow\u3067min/max\u7d71\u8a08\u60c5\u5831\u4ed8\u304d\u306eApache Arrow\u30d5\u30a1\u30a4\u30eb\u3092\u751f\u6210\u3059\u308b\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 Pg2Arrow\u306e\u65b0\u305f\u306a\u30aa\u30d7\u30b7\u30e7\u30f3 --stat=COLUMN_NAME \u306f\u3001RecordBatch\u5358\u4f4d\u3067\u6307\u5b9a\u3057\u305f\u5217\u306e\u6700\u5927\u5024/\u6700\u5c0f\u5024\u3092\u8a18\u9332\u3057\u3066\u304a\u304d\u3001\u305d\u308c\u3092Apache Arrow\u306eCustom-Metadata\u30e1\u30ab\u30cb\u30ba\u30e0\u3092\u5229\u7528\u3057\u3066\u30d5\u30c3\u30bf\u306b\u57cb\u3081\u8fbc\u307f\u307e\u3059\u3002 Arrow_Fdw\u3092\u4ecb\u3057\u3066Apache Arrow\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u51fa\u3059\u969b\u3001\u4e0a\u8a18\u306emin/max\u7d71\u8a08\u60c5\u5831\u3092\u5229\u7528\u3057\u305f\u7bc4\u56f2\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30b9\u30ad\u30e3\u30f3\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 \u4f8b\u3048\u3070\u3001Arrow_Fdw\u5916\u90e8\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3059\u308b\u691c\u7d22\u6761\u4ef6\u304c\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u3067\u3042\u3063\u305f\u5834\u5408\u3001 WHERE ymd BETERRN '2020-01-01'::date AND '2021-12-31'::date ymd\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u6700\u5927\u5024\u304c '2020-01-01'::date \u672a\u6e80\u3067\u3042\u308bRecord Batch\u3084\u3001 ymd\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u6700\u5c0f\u5024\u304c '2021-12-31 ::date`\u3088\u308a\u5927\u304d\u306aRecord Batch\u306f\u3001 \u691c\u7d22\u6761\u4ef6\u306b\u30de\u30c3\u30c1\u3057\u306a\u3044\u4e8b\u304c\u660e\u3089\u304b\u3067\u3042\u308b\u305f\u3081\u3001Arrow_Fdw\u306f\u3053\u306eRecord Batch\u3092\u8aad\u307f\u98db\u3070\u3057\u307e\u3059\u3002 \u3053\u308c\u306b\u3088\u308a\u3001\u4f8b\u3048\u3070\u30ed\u30b0\u30c7\u30fc\u30bf\u306e\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u306a\u3069\u3001\u8fd1\u3057\u3044\u5024\u3092\u6301\u3064\u30ec\u30b3\u30fc\u30c9\u304c\u8fd1\u508d\u306b\u96c6\u307e\u3063\u3066\u3044\u308b\u30d1\u30bf\u30fc\u30f3\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u304a\u3044\u3066\u306f\u3001\u7bc4\u56f2\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u7528\u3044\u305f\u7d5e\u8fbc\u307f\u3068\u540c\u7b49\u306e\u6027\u80fd\u304c\u5f97\u3089\u308c\u307e\u3059\u3002","title":"Arrow_Fdw\u306e\u7d71\u8a08\u60c5\u5831\u30b5\u30dd\u30fc\u30c8"},{"location":"release_v5.0/#_6","text":"PostgreSQL v14 \u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002v15\u4ee5\u964d\u3078\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3092\u304a\u9858\u3044\u3057\u307e\u3059\u3002 Partition-wise GpuJoin\u6a5f\u80fd\u306b\u95a2\u3057\u3066\u306f\u3001\u958b\u767a\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u4e0a\u306e\u7406\u7531\u306b\u3088\u308a\u3001v5.0\u3067\u306f\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u5c06\u6765\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u518d\u3073\u5b9f\u88c5\u3055\u308c\u308b\u4e88\u5b9a\u3067\u3059\u3002","title":"\u305d\u306e\u4ed6\u306e\u5909\u66f4\u70b9"},{"location":"release_v5.1/","text":"PG-Strom v5.1\u30ea\u30ea\u30fc\u30b9 PG-Strom Development Team (17-Apr-2024) \u6982\u8981 PG-Strom v5.1\u306b\u304a\u3051\u308b\u4e3b\u8981\u306a\u5909\u66f4\u306f\u70b9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 \u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306b\u5bfe\u5fdc\u3057\u305fGpuJoin/PreAgg\u306e\u30b5\u30dd\u30fc\u30c8\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002 GPU\u30b3\u30fc\u30c9\u306e\u30d3\u30eb\u30c9\u3092\u8d77\u52d5\u6642\u306b\u5b9f\u884c\u74b0\u5883\u3067\u884c\u3046\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 pg2arrow\u304c\u4e26\u5217\u51e6\u7406\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 CUDA Stack\u306e\u30b5\u30a4\u30ba\u3092\u9069\u5fdc\u7684\u306b\u8a2d\u5b9a\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u7d2f\u7a4d\u7684\u306a\u30d0\u30b0\u306e\u4fee\u6b63 \u52d5\u4f5c\u74b0\u5883 PostgreSQL v15.x, v16.x CUDA Toolkit 12.2 \u4ee5\u964d CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3 Intel x86 64bit \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3(x86_64) NVIDIA GPU CC 6.0 \u4ee5\u964d (Pascal\u4ee5\u964d; Volta\u4ee5\u964d\u3092\u63a8\u5968) \u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5bfe\u5fdc PostgreSQL\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3078\u306e\u5bfe\u5fdc\u81ea\u4f53\u306fPG-Strom v3.0\u3067\u3082\u884c\u308f\u308c\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u3046\u307e\u304f\u5b9f\u884c\u8a08\u753b\u3092\u4f5c\u6210\u3067\u304d\u306a\u3044\u4e8b\u304c\u591a\u304f\u3001\u5b9f\u9a13\u7684\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u8131\u3059\u308b\u4e8b\u306e\u3067\u304d\u306a\u3044\u3082\u306e\u3067\u3057\u305f\u3002\u305d\u3053\u3067\u3001PG-Strom v5.1\u3067\u306f\u5185\u90e8\u306e\u8a2d\u8a08\u3092\u6839\u672c\u7684\u306b\u898b\u76f4\u3057\u3066\u518d\u5ea6\u5b9f\u88c5\u3057\u3001\u518d\u3073\u6b63\u5f0f\u306a\u6a5f\u80fd\u3068\u3057\u3066\u53d6\u308a\u5165\u308c\u307e\u3057\u305f\u3002 \u4ee5\u4e0b\u306e lineorder \u30c6\u30fc\u30d6\u30eb\u304c\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u3055\u308c\u3066\u304a\u308a\u3001 date1 \u30c6\u30fc\u30d6\u30eb\u304c\u975e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u30c6\u30fc\u30d6\u30eb\u3067\u3042\u308b\u5834\u5408\u3001\u3053\u308c\u307e\u3067\u306f\u3001 lineorder \u914d\u4e0b\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u8aad\u307f\u51fa\u3057\u305f\u30c7\u30fc\u30bf\u3092\u5168\u3066 Append \u30ce\u30fc\u30c9\u306b\u3088\u3063\u3066\u7d50\u5408\u3055\u308c\u305f\u5f8c\u3067\u306a\u3051\u308c\u3070JOIN\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 \u901a\u5e38\u3001PG-Strom\u306fCPU\u3092\u30d0\u30a4\u30d1\u30b9\u3057\u3066NVME-SSD\u304b\u3089GPU\u3078\u30c7\u30fc\u30bf\u3092\u30ed\u30fc\u30c9\u3057\u3066\u5404\u7a2e\u306eSQL\u51e6\u7406\u3092\u884c\u3046\uff08GPU-Direct SQL\uff09\u305f\u3081\u3001JOIN\u306b\u5148\u7acb\u3063\u3066CPU\u5074\u3078\u30c7\u30fc\u30bf\u3092\u623b\u3055\u306d\u3070\u306a\u3089\u306a\u3044\u3068\u3044\u3046\u306e\u306f\u5927\u304d\u306a\u30da\u30ca\u30eb\u30c6\u30a3\u3067\u3059\u3002 ssbm=# explain (costs off) select sum(lo_extendedprice*lo_discount) as revenue from lineorder,date1 where lo_orderdate = d_datekey and d_year = 1993 and lo_discount between 1 and 3 and lo_quantity < 25; QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- Aggregate -> Hash Join Hash Cond: (lineorder.lo_orderdate = date1.d_datekey) -> Append -> Custom Scan (GpuScan) on lineorder__p1992 lineorder_1 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 91250920 -> 11911380] GPU-Direct SQL: enabled (GPU-0) -> Custom Scan (GpuScan) on lineorder__p1993 lineorder_2 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 91008500 -> 11980460] GPU-Direct SQL: enabled (GPU-0) -> Custom Scan (GpuScan) on lineorder__p1994 lineorder_3 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 91044060 -> 12150700] GPU-Direct SQL: enabled (GPU-0) -> Custom Scan (GpuScan) on lineorder__p1995 lineorder_4 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 91011720 -> 11779920] GPU-Direct SQL: enabled (GPU-0) -> Custom Scan (GpuScan) on lineorder__p1996 lineorder_5 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 91305650 -> 11942810] GPU-Direct SQL: enabled (GPU-0) -> Custom Scan (GpuScan) on lineorder__p1997 lineorder_6 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 91049100 -> 12069740] GPU-Direct SQL: enabled (GPU-0) -> Custom Scan (GpuScan) on lineorder__p1998 lineorder_7 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 53370560 -> 6898138] GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on lineorder__p1999 lineorder_8 Filter: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) -> Hash -> Seq Scan on date1 Filter: (d_year = 1993) (37 rows) PG-Strom v5.1\u3067\u306f\u3001\u975e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u3092\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3057\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u8aad\u307f\u51fa\u3057\u305f\u30c7\u30fc\u30bf\u3068JOIN\u3057\u3066\u304b\u3089\u7d50\u679c\u3092\u8fd4\u3059\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u5834\u5408\u306b\u3088\u3063\u3066\u306fGROUP-BY\u51e6\u7406\u307e\u3067\u6e08\u307e\u305b\u305f\u4e0a\u3067CPU\u5074\u306b\u623b\u3059\u4e8b\u3082\u3067\u304d\u3001\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u4f8b\u3067\u306f\u3001\u7dcf\u65706\u5104\u4ef6\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u691c\u7d22\u6761\u4ef6\u3092\u6e80\u305f\u30597\u5343\u4e07\u884c\u3092\u8fd4\u3055\u306d\u3070\u306a\u3089\u306a\u3044\u3068\u3053\u308d\u3001\u975e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u3067\u3042\u308b date1 \u3068\u306eJOIN\u3068\u3001\u305d\u306e\u6b21\u306b\u5b9f\u884c\u3059\u308b\u96c6\u7d04\u95a2\u6570 SUM() \u3092\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u306b\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3059\u308b\u4e8b\u3067\u3001CPU\u3067\u306f\u50c5\u304b8\u884c\u3092\u51e6\u7406\u3059\u308b\u3060\u3051\u3067\u6e08\u3093\u3067\u3044\u307e\u3059\u3002 INNER\u5074\u306e\u8aad\u51fa\u3057\u304c\u8907\u6570\u56de\u767a\u751f\u3059\u308b\u3068\u3044\u3046\u30c7\u30e1\u30ea\u30c3\u30c8\u306f\u3042\u308a\u307e\u3059\u304c\uff08\u203b\u5c06\u6765\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u6539\u4fee\u3055\u308c\u308b\u4e88\u5b9a\u3067\u3059\uff09\u3001\u3053\u306e\u3088\u3046\u306a\u66f8\u304d\u63db\u3048\u306b\u3088\u3063\u3066CPU\u3067\u51e6\u7406\u3059\u3079\u304d\u30c7\u30fc\u30bf\u304c\u5927\u5e45\u306b\u6e1b\u5c11\u3057\u3001\u51e6\u7406\u901f\u5ea6\u306e\u6539\u5584\u306b\u5bc4\u4e0e\u3057\u307e\u3059\u3002 ssbm=# explain (costs off) select sum(lo_extendedprice*lo_discount) as revenue from lineorder,date1 where lo_orderdate = d_datekey and d_year = 1993 and lo_discount between 1 and 3 and lo_quantity < 25; QUERY PLAN ---------------------------------------------------------------------------------------------------- Aggregate -> Append -> Custom Scan (GpuPreAgg) on lineorder__p1992 lineorder_1 GPU Projection: pgstrom.psum(((lineorder_1.lo_extendedprice * lineorder_1.lo_discount))::double precision) GPU Scan Quals: ((lineorder_1.lo_discount >= '1'::numeric) AND (lineorder_1.lo_discount <= '3'::numeric) AND (lineorder_1.lo_quantity < '25'::numeric)) [rows: 91250920 -> 11911380] GPU Join Quals [1]: (lineorder_1.lo_orderdate = date1.d_datekey) ... [nrows: 11911380 -> 1700960] GPU Outer Hash [1]: lineorder_1.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1993 lineorder_2 GPU Projection: pgstrom.psum(((lineorder_2.lo_extendedprice * lineorder_2.lo_discount))::double precision) GPU Scan Quals: ((lineorder_2.lo_discount >= '1'::numeric) AND (lineorder_2.lo_discount <= '3'::numeric) AND (lineorder_2.lo_quantity < '25'::numeric)) [rows: 91008500 -> 11980460] GPU Join Quals [1]: (lineorder_2.lo_orderdate = date1.d_datekey) ... [nrows: 11980460 -> 1710824] GPU Outer Hash [1]: lineorder_2.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1994 lineorder_3 GPU Projection: pgstrom.psum(((lineorder_3.lo_extendedprice * lineorder_3.lo_discount))::double precision) GPU Scan Quals: ((lineorder_3.lo_discount >= '1'::numeric) AND (lineorder_3.lo_discount <= '3'::numeric) AND (lineorder_3.lo_quantity < '25'::numeric)) [rows: 91044060 -> 12150700] GPU Join Quals [1]: (lineorder_3.lo_orderdate = date1.d_datekey) ... [nrows: 12150700 -> 1735135] GPU Outer Hash [1]: lineorder_3.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1995 lineorder_4 GPU Projection: pgstrom.psum(((lineorder_4.lo_extendedprice * lineorder_4.lo_discount))::double precision) GPU Scan Quals: ((lineorder_4.lo_discount >= '1'::numeric) AND (lineorder_4.lo_discount <= '3'::numeric) AND (lineorder_4.lo_quantity < '25'::numeric)) [rows: 91011720 -> 11779920] GPU Join Quals [1]: (lineorder_4.lo_orderdate = date1.d_datekey) ... [nrows: 11779920 -> 1682188] GPU Outer Hash [1]: lineorder_4.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1996 lineorder_5 GPU Projection: pgstrom.psum(((lineorder_5.lo_extendedprice * lineorder_5.lo_discount))::double precision) GPU Scan Quals: ((lineorder_5.lo_discount >= '1'::numeric) AND (lineorder_5.lo_discount <= '3'::numeric) AND (lineorder_5.lo_quantity < '25'::numeric)) [rows: 91305650 -> 11942810] GPU Join Quals [1]: (lineorder_5.lo_orderdate = date1.d_datekey) ... [nrows: 11942810 -> 1705448] GPU Outer Hash [1]: lineorder_5.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1997 lineorder_6 GPU Projection: pgstrom.psum(((lineorder_6.lo_extendedprice * lineorder_6.lo_discount))::double precision) GPU Scan Quals: ((lineorder_6.lo_discount >= '1'::numeric) AND (lineorder_6.lo_discount <= '3'::numeric) AND (lineorder_6.lo_quantity < '25'::numeric)) [rows: 91049100 -> 12069740] GPU Join Quals [1]: (lineorder_6.lo_orderdate = date1.d_datekey) ... [nrows: 12069740 -> 1723574] GPU Outer Hash [1]: lineorder_6.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1998 lineorder_7 GPU Projection: pgstrom.psum(((lineorder_7.lo_extendedprice * lineorder_7.lo_discount))::double precision) GPU Scan Quals: ((lineorder_7.lo_discount >= '1'::numeric) AND (lineorder_7.lo_discount <= '3'::numeric) AND (lineorder_7.lo_quantity < '25'::numeric)) [rows: 53370560 -> 6898138] GPU Join Quals [1]: (lineorder_7.lo_orderdate = date1.d_datekey) ... [nrows: 6898138 -> 985063] GPU Outer Hash [1]: lineorder_7.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1999 lineorder_8 GPU Projection: pgstrom.psum(((lineorder_8.lo_extendedprice * lineorder_8.lo_discount))::double precision) GPU Scan Quals: ((lineorder_8.lo_discount >= '1'::numeric) AND (lineorder_8.lo_discount <= '3'::numeric) AND (lineorder_8.lo_quantity < '25'::numeric)) [rows: 150 -> 1] GPU Join Quals [1]: (lineorder_8.lo_orderdate = date1.d_datekey) ... [nrows: 1 -> 1] GPU Outer Hash [1]: lineorder_8.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) (82 rows) GPU\u30b3\u30fc\u30c9\u306e\u8d77\u52d5\u6642\u30d3\u30eb\u30c9 \u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306ePG-Strom\u3067\u306f\u3001\u4e88\u3081\u30d3\u30eb\u30c9\u3055\u308c\u305fGPU\u5411\u3051\u306e\u30d0\u30a4\u30ca\u30ea\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u914d\u5e03\u3059\u308b\u65b9\u5f0f\u3092\u3068\u3063\u3066\u3044\u307e\u3057\u305f\u3002 \u3053\u308c\u306f\u30b7\u30f3\u30d7\u30eb\u3067\u306f\u3042\u308b\u306e\u3067\u3059\u304c\u3001PG-Strom\uff08PostgreSQL\uff09\u5b9f\u884c\u74b0\u5883\u306eCUDA Toolkit\u3084NVIDIA\u30c9\u30e9\u30a4\u30d0\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u7d44\u5408\u305b\u306b\u3088\u3063\u3066\u306f\u3001GPU\u30d0\u30a4\u30ca\u30ea\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u8a8d\u8b58\u3067\u304d\u305a\u5b9f\u884c\u6642\u30a8\u30e9\u30fc\u3092\u8d77\u3053\u3057\u3066\u3057\u307e\u3046\u4e8b\u304c\u3042\u308a\u307e\u3057\u305f\u3002\u5178\u578b\u7684\u306b\u306f\u3001RPM\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30d3\u30eb\u30c9\u3057\u305f\u74b0\u5883\u3088\u308a\u3082\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306eCUDA Toolkit\u3084NVIDIA\u30c9\u30e9\u30a4\u30d0\u304c\u5b9f\u884c\u74b0\u5883\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3067\u3059\u3002 PG-Strom v5.1\u3067\u306f\u3001\u8d77\u52d5\u6642\u306bGPU\u7528\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3084CUDA Toolkit\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3057\u3001\u5dee\u5206\u304c\u3042\u308c\u3070GPU\u5411\u3051\u30d0\u30a4\u30ca\u30ea\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30d3\u30eb\u30c9\u3059\u308b\u3088\u3046\u306b\u5909\u66f4\u3055\u308c\u307e\u3057\u305f\u3002\u3053\u306e\u4fee\u6b63\u306b\u3088\u308a\u3001PG-Strom\u306f\u5b9f\u884c\u74b0\u5883\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305fGPU\u30c7\u30d0\u30a4\u30b9\u3001\u304a\u3088\u3073CUDA Toolkit\u5411\u3051\u306eGPU\u30d0\u30a4\u30ca\u30ea\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u4e00\u90e8\u306ePG-Strom\u7528GPU\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u306f\u30d3\u30eb\u30c9\u306b\u6642\u9593\u304c\u304b\u304b\u308b\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001PG-Strom\u3084CUDA Toolkit\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u5f8c\u3001\u521d\u56de\u306e\u8d77\u52d5\u6642\u306b\u306fPG-Strom\u306e\u6a5f\u80fd\u304c\u5229\u7528\u53ef\u80fd\u3068\u306a\u308b\u307e\u3067\u6570\u5206\u306e\u6642\u9593\u304c\u304b\u304b\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 pg2arrow\u306e\u4e26\u5217\u5b9f\u884c pg2arrow \u306f\u65b0\u305f\u306b -n|--num-workers \u30aa\u30d7\u30b7\u30e7\u30f3\u3068 -k|--parallel-keys \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 -n N_WORKERS \u306f\u6307\u5b9a\u3057\u305f\u6570\u306e\u30b9\u30ec\u30c3\u30c9\u304c\u305d\u308c\u305e\u308cPostgreSQL\u306b\u63a5\u7d9a\u3057\u3001\u4e26\u5217\u306b\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u305f\u7d50\u679c\u3092Apache Arrow\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002\u30af\u30a8\u30ea\u306b\u306f\u7279\u6b8a\u306a\u6587\u5b57\u5217 $(N_WORKERS) \u3068 $(WORKER_ID) \u3092\u542b\u3080\u4e8b\u304c\u3067\u304d\u3001\u3053\u308c\u3089\u306fPostgreSQL\u306b\u30af\u30a8\u30ea\u3092\u6295\u3052\u308b\u969b\u306b\u3001\u305d\u308c\u305e\u308c\u30ef\u30fc\u30ab\u30fc\u6570\u3068\u30ef\u30fc\u30ab\u30fc\u56fa\u6709\u306eID\u5024\u306b\u7f6e\u304d\u63db\u3048\u3089\u308c\u307e\u3059\u3002\u30e6\u30fc\u30b6\u306f\u3053\u308c\u3092\u5229\u7528\u3057\u3066\u3001\u5404\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u304c\u8aad\u307f\u51fa\u3059\u30bf\u30d7\u30eb\u304c\u4e92\u3044\u306b\u91cd\u8907\u3057\u305f\u308a\u6b20\u640d\u3057\u305f\u308a\u3057\u306a\u3044\u3088\u3046\u306b\u8abf\u6574\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u3082\u3046\u4e00\u3064\u306e -k|--parallel-key \u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u3001\u5f15\u6570\u3067\u4e0e\u3048\u305f\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30ad\u30fc\u5024\u306e\u305d\u308c\u305e\u308c\u306b\u5bfe\u3057\u3066\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u3092\u8d77\u52d5\u3057\u3001\u30af\u30a8\u30ea\u4e2d\u306e $(PARALLEL_KEY) \u3092\u30ad\u30fc\u3068\u7f6e\u304d\u63db\u3048\u305f\u4e0a\u3067\u3001\u3053\u308c\u3092PostgreSQL\u3067\u5b9f\u884c\u3057\u305f\u7d50\u679c\u3092Apache Arrow\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002 \u4f8b\u3048\u3070\u3001 lineorder \u30c6\u30fc\u30d6\u30eb\u304c\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u3055\u308c\u3066\u304a\u308a\u3001\u5b50\u30c6\u30fc\u30d6\u30eb\u3068\u3057\u3066\u3001 lineorder__sun , lineorder__mon , ... lineorder__sat \u304c\u5b58\u5728\u3057\u305f\u5834\u5408\u3001\u500b\u3005\u306e\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u304c\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u5b50\u30c6\u30fc\u30d6\u30eb\u3092\u305d\u308c\u305e\u308c\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u3068\u3044\u3063\u305f\u5f62\u3067\u51e6\u7406\u3092\u4e26\u5217\u5316\u3067\u304d\u307e\u3059\u3002 \u3053\u306e\u5834\u5408\u3001 -k \u30aa\u30d7\u30b7\u30e7\u30f3\u306f -k sun,mon,tue,wed,thu,fri,sat \u3068\u6307\u5b9a\u3057\u3001 -c \u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u306f SELECT * FROM lineorder__$(PARALLEL_KEY) \u3068\u6307\u5b9a\u3059\u308c\u3070\u30017\u500b\u306e\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u304c\u305d\u308c\u305e\u308c\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u5b50\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002 $ pg2arrow -d ssbm -c 'SELECT * FROM lineorder__$(PARALLEL_KEY)' -o /path/to/f_lineorder.arrow -k=sun,mon,tue,wed,thu,fri,sat --progress worker:1 SQL=[SELECT * FROM lineorder__sun] worker:3 SQL=[SELECT * FROM lineorder__tue] worker:2 SQL=[SELECT * FROM lineorder__mon] worker:4 SQL=[SELECT * FROM lineorder__wed] worker:5 SQL=[SELECT * FROM lineorder__thu] : :","title":"PG-Strom v5.1"},{"location":"release_v5.1/#pg-strom-v51","text":"PG-Strom Development Team (17-Apr-2024)","title":"PG-Strom v5.1\u30ea\u30ea\u30fc\u30b9"},{"location":"release_v5.1/#_1","text":"PG-Strom v5.1\u306b\u304a\u3051\u308b\u4e3b\u8981\u306a\u5909\u66f4\u306f\u70b9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002 \u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306b\u5bfe\u5fdc\u3057\u305fGpuJoin/PreAgg\u306e\u30b5\u30dd\u30fc\u30c8\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002 GPU\u30b3\u30fc\u30c9\u306e\u30d3\u30eb\u30c9\u3092\u8d77\u52d5\u6642\u306b\u5b9f\u884c\u74b0\u5883\u3067\u884c\u3046\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 pg2arrow\u304c\u4e26\u5217\u51e6\u7406\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002 CUDA Stack\u306e\u30b5\u30a4\u30ba\u3092\u9069\u5fdc\u7684\u306b\u8a2d\u5b9a\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u7d2f\u7a4d\u7684\u306a\u30d0\u30b0\u306e\u4fee\u6b63","title":"\u6982\u8981"},{"location":"release_v5.1/#_2","text":"PostgreSQL v15.x, v16.x CUDA Toolkit 12.2 \u4ee5\u964d CUDA Toolkit\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308bLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3 Intel x86 64bit \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3(x86_64) NVIDIA GPU CC 6.0 \u4ee5\u964d (Pascal\u4ee5\u964d; Volta\u4ee5\u964d\u3092\u63a8\u5968)","title":"\u52d5\u4f5c\u74b0\u5883"},{"location":"release_v5.1/#_3","text":"PostgreSQL\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3078\u306e\u5bfe\u5fdc\u81ea\u4f53\u306fPG-Strom v3.0\u3067\u3082\u884c\u308f\u308c\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u3046\u307e\u304f\u5b9f\u884c\u8a08\u753b\u3092\u4f5c\u6210\u3067\u304d\u306a\u3044\u4e8b\u304c\u591a\u304f\u3001\u5b9f\u9a13\u7684\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u8131\u3059\u308b\u4e8b\u306e\u3067\u304d\u306a\u3044\u3082\u306e\u3067\u3057\u305f\u3002\u305d\u3053\u3067\u3001PG-Strom v5.1\u3067\u306f\u5185\u90e8\u306e\u8a2d\u8a08\u3092\u6839\u672c\u7684\u306b\u898b\u76f4\u3057\u3066\u518d\u5ea6\u5b9f\u88c5\u3057\u3001\u518d\u3073\u6b63\u5f0f\u306a\u6a5f\u80fd\u3068\u3057\u3066\u53d6\u308a\u5165\u308c\u307e\u3057\u305f\u3002 \u4ee5\u4e0b\u306e lineorder \u30c6\u30fc\u30d6\u30eb\u304c\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u3055\u308c\u3066\u304a\u308a\u3001 date1 \u30c6\u30fc\u30d6\u30eb\u304c\u975e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u30c6\u30fc\u30d6\u30eb\u3067\u3042\u308b\u5834\u5408\u3001\u3053\u308c\u307e\u3067\u306f\u3001 lineorder \u914d\u4e0b\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u8aad\u307f\u51fa\u3057\u305f\u30c7\u30fc\u30bf\u3092\u5168\u3066 Append \u30ce\u30fc\u30c9\u306b\u3088\u3063\u3066\u7d50\u5408\u3055\u308c\u305f\u5f8c\u3067\u306a\u3051\u308c\u3070JOIN\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 \u901a\u5e38\u3001PG-Strom\u306fCPU\u3092\u30d0\u30a4\u30d1\u30b9\u3057\u3066NVME-SSD\u304b\u3089GPU\u3078\u30c7\u30fc\u30bf\u3092\u30ed\u30fc\u30c9\u3057\u3066\u5404\u7a2e\u306eSQL\u51e6\u7406\u3092\u884c\u3046\uff08GPU-Direct SQL\uff09\u305f\u3081\u3001JOIN\u306b\u5148\u7acb\u3063\u3066CPU\u5074\u3078\u30c7\u30fc\u30bf\u3092\u623b\u3055\u306d\u3070\u306a\u3089\u306a\u3044\u3068\u3044\u3046\u306e\u306f\u5927\u304d\u306a\u30da\u30ca\u30eb\u30c6\u30a3\u3067\u3059\u3002 ssbm=# explain (costs off) select sum(lo_extendedprice*lo_discount) as revenue from lineorder,date1 where lo_orderdate = d_datekey and d_year = 1993 and lo_discount between 1 and 3 and lo_quantity < 25; QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- Aggregate -> Hash Join Hash Cond: (lineorder.lo_orderdate = date1.d_datekey) -> Append -> Custom Scan (GpuScan) on lineorder__p1992 lineorder_1 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 91250920 -> 11911380] GPU-Direct SQL: enabled (GPU-0) -> Custom Scan (GpuScan) on lineorder__p1993 lineorder_2 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 91008500 -> 11980460] GPU-Direct SQL: enabled (GPU-0) -> Custom Scan (GpuScan) on lineorder__p1994 lineorder_3 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 91044060 -> 12150700] GPU-Direct SQL: enabled (GPU-0) -> Custom Scan (GpuScan) on lineorder__p1995 lineorder_4 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 91011720 -> 11779920] GPU-Direct SQL: enabled (GPU-0) -> Custom Scan (GpuScan) on lineorder__p1996 lineorder_5 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 91305650 -> 11942810] GPU-Direct SQL: enabled (GPU-0) -> Custom Scan (GpuScan) on lineorder__p1997 lineorder_6 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 91049100 -> 12069740] GPU-Direct SQL: enabled (GPU-0) -> Custom Scan (GpuScan) on lineorder__p1998 lineorder_7 GPU Projection: lo_extendedprice, lo_discount, lo_orderdate GPU Scan Quals: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) [rows: 53370560 -> 6898138] GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on lineorder__p1999 lineorder_8 Filter: ((lo_discount >= '1'::numeric) AND (lo_discount <= '3'::numeric) AND (lo_quantity < '25'::numeric)) -> Hash -> Seq Scan on date1 Filter: (d_year = 1993) (37 rows) PG-Strom v5.1\u3067\u306f\u3001\u975e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u3092\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3057\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u8aad\u307f\u51fa\u3057\u305f\u30c7\u30fc\u30bf\u3068JOIN\u3057\u3066\u304b\u3089\u7d50\u679c\u3092\u8fd4\u3059\u4e8b\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u5834\u5408\u306b\u3088\u3063\u3066\u306fGROUP-BY\u51e6\u7406\u307e\u3067\u6e08\u307e\u305b\u305f\u4e0a\u3067CPU\u5074\u306b\u623b\u3059\u4e8b\u3082\u3067\u304d\u3001\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u4f8b\u3067\u306f\u3001\u7dcf\u65706\u5104\u4ef6\u306e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u691c\u7d22\u6761\u4ef6\u3092\u6e80\u305f\u30597\u5343\u4e07\u884c\u3092\u8fd4\u3055\u306d\u3070\u306a\u3089\u306a\u3044\u3068\u3053\u308d\u3001\u975e\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u30c6\u30fc\u30d6\u30eb\u3067\u3042\u308b date1 \u3068\u306eJOIN\u3068\u3001\u305d\u306e\u6b21\u306b\u5b9f\u884c\u3059\u308b\u96c6\u7d04\u95a2\u6570 SUM() \u3092\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5b50\u30c6\u30fc\u30d6\u30eb\u306b\u30d7\u30c3\u30b7\u30e5\u30c0\u30a6\u30f3\u3059\u308b\u4e8b\u3067\u3001CPU\u3067\u306f\u50c5\u304b8\u884c\u3092\u51e6\u7406\u3059\u308b\u3060\u3051\u3067\u6e08\u3093\u3067\u3044\u307e\u3059\u3002 INNER\u5074\u306e\u8aad\u51fa\u3057\u304c\u8907\u6570\u56de\u767a\u751f\u3059\u308b\u3068\u3044\u3046\u30c7\u30e1\u30ea\u30c3\u30c8\u306f\u3042\u308a\u307e\u3059\u304c\uff08\u203b\u5c06\u6765\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u6539\u4fee\u3055\u308c\u308b\u4e88\u5b9a\u3067\u3059\uff09\u3001\u3053\u306e\u3088\u3046\u306a\u66f8\u304d\u63db\u3048\u306b\u3088\u3063\u3066CPU\u3067\u51e6\u7406\u3059\u3079\u304d\u30c7\u30fc\u30bf\u304c\u5927\u5e45\u306b\u6e1b\u5c11\u3057\u3001\u51e6\u7406\u901f\u5ea6\u306e\u6539\u5584\u306b\u5bc4\u4e0e\u3057\u307e\u3059\u3002 ssbm=# explain (costs off) select sum(lo_extendedprice*lo_discount) as revenue from lineorder,date1 where lo_orderdate = d_datekey and d_year = 1993 and lo_discount between 1 and 3 and lo_quantity < 25; QUERY PLAN ---------------------------------------------------------------------------------------------------- Aggregate -> Append -> Custom Scan (GpuPreAgg) on lineorder__p1992 lineorder_1 GPU Projection: pgstrom.psum(((lineorder_1.lo_extendedprice * lineorder_1.lo_discount))::double precision) GPU Scan Quals: ((lineorder_1.lo_discount >= '1'::numeric) AND (lineorder_1.lo_discount <= '3'::numeric) AND (lineorder_1.lo_quantity < '25'::numeric)) [rows: 91250920 -> 11911380] GPU Join Quals [1]: (lineorder_1.lo_orderdate = date1.d_datekey) ... [nrows: 11911380 -> 1700960] GPU Outer Hash [1]: lineorder_1.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1993 lineorder_2 GPU Projection: pgstrom.psum(((lineorder_2.lo_extendedprice * lineorder_2.lo_discount))::double precision) GPU Scan Quals: ((lineorder_2.lo_discount >= '1'::numeric) AND (lineorder_2.lo_discount <= '3'::numeric) AND (lineorder_2.lo_quantity < '25'::numeric)) [rows: 91008500 -> 11980460] GPU Join Quals [1]: (lineorder_2.lo_orderdate = date1.d_datekey) ... [nrows: 11980460 -> 1710824] GPU Outer Hash [1]: lineorder_2.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1994 lineorder_3 GPU Projection: pgstrom.psum(((lineorder_3.lo_extendedprice * lineorder_3.lo_discount))::double precision) GPU Scan Quals: ((lineorder_3.lo_discount >= '1'::numeric) AND (lineorder_3.lo_discount <= '3'::numeric) AND (lineorder_3.lo_quantity < '25'::numeric)) [rows: 91044060 -> 12150700] GPU Join Quals [1]: (lineorder_3.lo_orderdate = date1.d_datekey) ... [nrows: 12150700 -> 1735135] GPU Outer Hash [1]: lineorder_3.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1995 lineorder_4 GPU Projection: pgstrom.psum(((lineorder_4.lo_extendedprice * lineorder_4.lo_discount))::double precision) GPU Scan Quals: ((lineorder_4.lo_discount >= '1'::numeric) AND (lineorder_4.lo_discount <= '3'::numeric) AND (lineorder_4.lo_quantity < '25'::numeric)) [rows: 91011720 -> 11779920] GPU Join Quals [1]: (lineorder_4.lo_orderdate = date1.d_datekey) ... [nrows: 11779920 -> 1682188] GPU Outer Hash [1]: lineorder_4.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1996 lineorder_5 GPU Projection: pgstrom.psum(((lineorder_5.lo_extendedprice * lineorder_5.lo_discount))::double precision) GPU Scan Quals: ((lineorder_5.lo_discount >= '1'::numeric) AND (lineorder_5.lo_discount <= '3'::numeric) AND (lineorder_5.lo_quantity < '25'::numeric)) [rows: 91305650 -> 11942810] GPU Join Quals [1]: (lineorder_5.lo_orderdate = date1.d_datekey) ... [nrows: 11942810 -> 1705448] GPU Outer Hash [1]: lineorder_5.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1997 lineorder_6 GPU Projection: pgstrom.psum(((lineorder_6.lo_extendedprice * lineorder_6.lo_discount))::double precision) GPU Scan Quals: ((lineorder_6.lo_discount >= '1'::numeric) AND (lineorder_6.lo_discount <= '3'::numeric) AND (lineorder_6.lo_quantity < '25'::numeric)) [rows: 91049100 -> 12069740] GPU Join Quals [1]: (lineorder_6.lo_orderdate = date1.d_datekey) ... [nrows: 12069740 -> 1723574] GPU Outer Hash [1]: lineorder_6.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1998 lineorder_7 GPU Projection: pgstrom.psum(((lineorder_7.lo_extendedprice * lineorder_7.lo_discount))::double precision) GPU Scan Quals: ((lineorder_7.lo_discount >= '1'::numeric) AND (lineorder_7.lo_discount <= '3'::numeric) AND (lineorder_7.lo_quantity < '25'::numeric)) [rows: 53370560 -> 6898138] GPU Join Quals [1]: (lineorder_7.lo_orderdate = date1.d_datekey) ... [nrows: 6898138 -> 985063] GPU Outer Hash [1]: lineorder_7.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) -> Custom Scan (GpuPreAgg) on lineorder__p1999 lineorder_8 GPU Projection: pgstrom.psum(((lineorder_8.lo_extendedprice * lineorder_8.lo_discount))::double precision) GPU Scan Quals: ((lineorder_8.lo_discount >= '1'::numeric) AND (lineorder_8.lo_discount <= '3'::numeric) AND (lineorder_8.lo_quantity < '25'::numeric)) [rows: 150 -> 1] GPU Join Quals [1]: (lineorder_8.lo_orderdate = date1.d_datekey) ... [nrows: 1 -> 1] GPU Outer Hash [1]: lineorder_8.lo_orderdate GPU Inner Hash [1]: date1.d_datekey Inner Siblings-Id: 2 GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 Filter: (d_year = 1993) (82 rows)","title":"\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5bfe\u5fdc"},{"location":"release_v5.1/#gpu","text":"\u4ee5\u524d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306ePG-Strom\u3067\u306f\u3001\u4e88\u3081\u30d3\u30eb\u30c9\u3055\u308c\u305fGPU\u5411\u3051\u306e\u30d0\u30a4\u30ca\u30ea\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u914d\u5e03\u3059\u308b\u65b9\u5f0f\u3092\u3068\u3063\u3066\u3044\u307e\u3057\u305f\u3002 \u3053\u308c\u306f\u30b7\u30f3\u30d7\u30eb\u3067\u306f\u3042\u308b\u306e\u3067\u3059\u304c\u3001PG-Strom\uff08PostgreSQL\uff09\u5b9f\u884c\u74b0\u5883\u306eCUDA Toolkit\u3084NVIDIA\u30c9\u30e9\u30a4\u30d0\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u7d44\u5408\u305b\u306b\u3088\u3063\u3066\u306f\u3001GPU\u30d0\u30a4\u30ca\u30ea\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u8a8d\u8b58\u3067\u304d\u305a\u5b9f\u884c\u6642\u30a8\u30e9\u30fc\u3092\u8d77\u3053\u3057\u3066\u3057\u307e\u3046\u4e8b\u304c\u3042\u308a\u307e\u3057\u305f\u3002\u5178\u578b\u7684\u306b\u306f\u3001RPM\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30d3\u30eb\u30c9\u3057\u305f\u74b0\u5883\u3088\u308a\u3082\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306eCUDA Toolkit\u3084NVIDIA\u30c9\u30e9\u30a4\u30d0\u304c\u5b9f\u884c\u74b0\u5883\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3067\u3059\u3002 PG-Strom v5.1\u3067\u306f\u3001\u8d77\u52d5\u6642\u306bGPU\u7528\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3084CUDA Toolkit\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3057\u3001\u5dee\u5206\u304c\u3042\u308c\u3070GPU\u5411\u3051\u30d0\u30a4\u30ca\u30ea\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30d3\u30eb\u30c9\u3059\u308b\u3088\u3046\u306b\u5909\u66f4\u3055\u308c\u307e\u3057\u305f\u3002\u3053\u306e\u4fee\u6b63\u306b\u3088\u308a\u3001PG-Strom\u306f\u5b9f\u884c\u74b0\u5883\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305fGPU\u30c7\u30d0\u30a4\u30b9\u3001\u304a\u3088\u3073CUDA Toolkit\u5411\u3051\u306eGPU\u30d0\u30a4\u30ca\u30ea\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u4e00\u90e8\u306ePG-Strom\u7528GPU\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u306f\u30d3\u30eb\u30c9\u306b\u6642\u9593\u304c\u304b\u304b\u308b\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001PG-Strom\u3084CUDA Toolkit\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u5f8c\u3001\u521d\u56de\u306e\u8d77\u52d5\u6642\u306b\u306fPG-Strom\u306e\u6a5f\u80fd\u304c\u5229\u7528\u53ef\u80fd\u3068\u306a\u308b\u307e\u3067\u6570\u5206\u306e\u6642\u9593\u304c\u304b\u304b\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002","title":"GPU\u30b3\u30fc\u30c9\u306e\u8d77\u52d5\u6642\u30d3\u30eb\u30c9"},{"location":"release_v5.1/#pg2arrow","text":"pg2arrow \u306f\u65b0\u305f\u306b -n|--num-workers \u30aa\u30d7\u30b7\u30e7\u30f3\u3068 -k|--parallel-keys \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 -n N_WORKERS \u306f\u6307\u5b9a\u3057\u305f\u6570\u306e\u30b9\u30ec\u30c3\u30c9\u304c\u305d\u308c\u305e\u308cPostgreSQL\u306b\u63a5\u7d9a\u3057\u3001\u4e26\u5217\u306b\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u305f\u7d50\u679c\u3092Apache Arrow\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002\u30af\u30a8\u30ea\u306b\u306f\u7279\u6b8a\u306a\u6587\u5b57\u5217 $(N_WORKERS) \u3068 $(WORKER_ID) \u3092\u542b\u3080\u4e8b\u304c\u3067\u304d\u3001\u3053\u308c\u3089\u306fPostgreSQL\u306b\u30af\u30a8\u30ea\u3092\u6295\u3052\u308b\u969b\u306b\u3001\u305d\u308c\u305e\u308c\u30ef\u30fc\u30ab\u30fc\u6570\u3068\u30ef\u30fc\u30ab\u30fc\u56fa\u6709\u306eID\u5024\u306b\u7f6e\u304d\u63db\u3048\u3089\u308c\u307e\u3059\u3002\u30e6\u30fc\u30b6\u306f\u3053\u308c\u3092\u5229\u7528\u3057\u3066\u3001\u5404\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u304c\u8aad\u307f\u51fa\u3059\u30bf\u30d7\u30eb\u304c\u4e92\u3044\u306b\u91cd\u8907\u3057\u305f\u308a\u6b20\u640d\u3057\u305f\u308a\u3057\u306a\u3044\u3088\u3046\u306b\u8abf\u6574\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u3082\u3046\u4e00\u3064\u306e -k|--parallel-key \u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u3001\u5f15\u6570\u3067\u4e0e\u3048\u305f\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30ad\u30fc\u5024\u306e\u305d\u308c\u305e\u308c\u306b\u5bfe\u3057\u3066\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u3092\u8d77\u52d5\u3057\u3001\u30af\u30a8\u30ea\u4e2d\u306e $(PARALLEL_KEY) \u3092\u30ad\u30fc\u3068\u7f6e\u304d\u63db\u3048\u305f\u4e0a\u3067\u3001\u3053\u308c\u3092PostgreSQL\u3067\u5b9f\u884c\u3057\u305f\u7d50\u679c\u3092Apache Arrow\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002 \u4f8b\u3048\u3070\u3001 lineorder \u30c6\u30fc\u30d6\u30eb\u304c\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u5316\u3055\u308c\u3066\u304a\u308a\u3001\u5b50\u30c6\u30fc\u30d6\u30eb\u3068\u3057\u3066\u3001 lineorder__sun , lineorder__mon , ... lineorder__sat \u304c\u5b58\u5728\u3057\u305f\u5834\u5408\u3001\u500b\u3005\u306e\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u304c\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u5b50\u30c6\u30fc\u30d6\u30eb\u3092\u305d\u308c\u305e\u308c\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u3068\u3044\u3063\u305f\u5f62\u3067\u51e6\u7406\u3092\u4e26\u5217\u5316\u3067\u304d\u307e\u3059\u3002 \u3053\u306e\u5834\u5408\u3001 -k \u30aa\u30d7\u30b7\u30e7\u30f3\u306f -k sun,mon,tue,wed,thu,fri,sat \u3068\u6307\u5b9a\u3057\u3001 -c \u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u306f SELECT * FROM lineorder__$(PARALLEL_KEY) \u3068\u6307\u5b9a\u3059\u308c\u3070\u30017\u500b\u306e\u30ef\u30fc\u30ab\u30fc\u30b9\u30ec\u30c3\u30c9\u304c\u305d\u308c\u305e\u308c\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u5b50\u30c6\u30fc\u30d6\u30eb\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u4e8b\u306b\u306a\u308a\u307e\u3059\u3002 $ pg2arrow -d ssbm -c 'SELECT * FROM lineorder__$(PARALLEL_KEY)' -o /path/to/f_lineorder.arrow -k=sun,mon,tue,wed,thu,fri,sat --progress worker:1 SQL=[SELECT * FROM lineorder__sun] worker:3 SQL=[SELECT * FROM lineorder__tue] worker:2 SQL=[SELECT * FROM lineorder__mon] worker:4 SQL=[SELECT * FROM lineorder__wed] worker:5 SQL=[SELECT * FROM lineorder__thu] : :","title":"pg2arrow\u306e\u4e26\u5217\u5b9f\u884c"},{"location":"ssd2gpu/","text":"GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c \u6982\u8981 SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u9ad8\u901f\u306b\u51e6\u7406\u3059\u308b\u306b\u306f\u3001\u30d7\u30ed\u30bb\u30c3\u30b5\u304c\u52b9\u7387\u3088\u304f\u51e6\u7406\u3092\u884c\u3046\u306e\u3068\u540c\u69d8\u306b\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u3084\u30e1\u30e2\u30ea\u304b\u3089\u30d7\u30ed\u30bb\u30c3\u30b5\u3078\u9ad8\u901f\u306b\u30c7\u30fc\u30bf\u3092\u4f9b\u7d66\u3059\u308b\u4e8b\u304c\u91cd\u8981\u3067\u3059\u3002\u51e6\u7406\u3059\u3079\u304d\u30c7\u30fc\u30bf\u304c\u30d7\u30ed\u30bb\u30c3\u30b5\u306b\u5c4a\u3044\u3066\u3044\u306a\u3051\u308c\u3070\u3001\u30d7\u30ed\u30bb\u30c3\u30b5\u306f\u624b\u6301\u3061\u7121\u6c99\u6c70\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u6a5f\u80fd\u306f\u3001PCIe\u30d0\u30b9\u306b\u76f4\u7d50\u3059\u308b\u4e8b\u3067\u9ad8\u901f\u306aI/O\u51e6\u7406\u3092\u5b9f\u73fe\u3059\u308bNVMe-SSD\u3068\u3001\u540c\u3058PCIe\u30d0\u30b9\u4e0a\u306b\u63a5\u7d9a\u3055\u308c\u305fGPU\u3092\u30c0\u30a4\u30ec\u30af\u30c8\u306b\u63a5\u7d9a\u3057\u3001\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u9650\u754c\u306b\u8fd1\u3044\u901f\u5ea6\u3067\u30c7\u30fc\u30bf\u3092\u30d7\u30ed\u30bb\u30c3\u30b5\u306b\u4f9b\u7d66\u3059\u308b\u4e8b\u3067SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u9ad8\u901f\u306b\u51e6\u7406\u3059\u308b\u305f\u3081\u306e\u6a5f\u80fd\u3067\u3059\u3002 \u901a\u5e38\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u4e0a\u306b\u683c\u7d0d\u3055\u308c\u305fPostgreSQL\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u306f\u3001PCIe\u30d0\u30b9\u3092\u901a\u3057\u3066\u3044\u3063\u305f\u3093CPU/RAM\u3078\u3068\u30ed\u30fc\u30c9\u3055\u308c\u307e\u3059\u3002\u305d\u306e\u5f8c\u3001\u30af\u30a8\u30ea\u5b9f\u884c\u8a08\u753b\u306b\u3057\u305f\u304c\u3063\u3066WHERE\u53e5\u306b\u3088\u308b\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3084JOIN/GROUP BY\u3068\u3044\u3063\u305f\u51e6\u7406\u3092\u884c\u3046\u308f\u3051\u3067\u3059\u304c\u3001\u96c6\u8a08\u7cfb\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u7279\u6027\u4e0a\u3001\u5165\u529b\u3059\u308b\u30c7\u30fc\u30bf\u4ef6\u6570\u3088\u308a\u51fa\u529b\u3059\u308b\u30c7\u30fc\u30bf\u4ef6\u6570\u306e\u65b9\u304c\u306f\u308b\u304b\u306b\u5c11\u306a\u3044\u4ef6\u6570\u3068\u306a\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070\u6570\u5341\u5104\u884c\u3092\u8aad\u307f\u51fa\u3057\u305f\u7d50\u679c\u3092GROUP BY\u3067\u96c6\u7d04\u3057\u305f\u7d50\u679c\u304c\u9ad8\u3005\u6570\u767e\u884c\u3068\u3044\u3046\u4e8b\u3082\u73cd\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002 \u8a00\u3044\u63db\u3048\u308c\u3070\u3001\u6211\u3005\u306f\u30b4\u30df\u30c7\u30fc\u30bf\u3092\u904b\u3076\u305f\u3081\u306bPCIe\u30d0\u30b9\u4e0a\u306e\u5e2f\u57df\u3092\u6d88\u8cbb\u3057\u3066\u3044\u308b\u3068\u3082\u8a00\u3048\u307e\u3059\u304c\u3001CPU\u304c\u30ec\u30b3\u30fc\u30c9\u306e\u4e2d\u8eab\u3092\u8abf\u3079\u308b\u307e\u3067\u306f\u3001\u305d\u306e\u8981\u4e0d\u8981\u3092\u5224\u65ad\u3067\u304d\u306a\u3044\u305f\u3081\u3001\u4e00\u822c\u7684\u306a\u5b9f\u88c5\u3067\u306f\u3053\u308c\u306f\u4e0d\u53ef\u907f\u3068\u8a00\u3048\u307e\u3059\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306f\u30c7\u30fc\u30bf\u306e\u6d41\u308c\u3092\u5909\u3048\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u4e0a\u306e\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u3092PCIe\u30d0\u30b9\u4e0a\u306eP2P DMA\u3092\u7528\u3044\u3066GPU\u306b\u76f4\u63a5\u8ee2\u9001\u3057\u3001GPU\u3067SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u51e6\u7406\u3059\u308b\u4e8b\u3067CPU\u304c\u51e6\u7406\u3059\u3079\u304d\u30ec\u30b3\u30fc\u30c9\u6570\u3092\u6e1b\u3089\u3059\u305f\u3081\u306e\u6a5f\u80fd\u3067\u3059\u3002\u3044\u308f\u3070\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u3068CPU/RAM\u306e\u9593\u306b\u4f4d\u7f6e\u3057\u3066SQL\u3092\u51e6\u7406\u3059\u308b\u305f\u3081\u306e\u30d7\u30ea\u30d7\u30ed\u30bb\u30c3\u30b5\u3068\u3057\u3066GPU\u3092\u6d3b\u7528\u3057\u3001\u7d50\u679c\u3068\u3057\u3066I/O\u51e6\u7406\u3092\u9ad8\u901f\u5316\u3059\u308b\u305f\u3081\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u3067\u3059\u3002 \u672c\u6a5f\u80fd\u306f\u3001\u5185\u90e8\u7684\u306bNVIDIA GPUDirect Storage\u30e2\u30b8\u30e5\u30fc\u30eb\uff08 nvidia-fs \uff09\u3092\u4f7f\u7528\u3057\u3066\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u3068NVME\u30b9\u30c8\u30ec\u30fc\u30b8\u3068\u306e\u9593\u3067P2P\u306e\u30c7\u30fc\u30bf\u8ee2\u9001\u3092\u884c\u3044\u307e\u3059\u3002 \u3057\u305f\u304c\u3063\u3066\u3001\u672c\u6a5f\u80fd\u3092\u5229\u7528\u3059\u308b\u306b\u306f\u3001PostgreSQL\u306e\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3042\u308bPG-Strom\u3060\u3051\u3067\u306f\u306a\u304f\u3001\u4e0a\u8a18\u306eLinux kernel\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u3002 \u307e\u305f\u3001\u672c\u6a5f\u80fd\u304c\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u306e\u306fNVME\u4ed5\u69d8\u306eSSD\u3084\u3001NVME-oF\u3067\u63a5\u7d9a\u3055\u308c\u305f\u30ea\u30e2\u30fc\u30c8\u30c7\u30d0\u30a4\u30b9\u306e\u307f\u3067\u3059\u3002 SAS\u3084SATA\u3068\u3044\u3063\u305f\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3067\u63a5\u7d9a\u3055\u308c\u305f\u65e7\u5f0f\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u306b\u306f\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u305b\u3093\u3002 \u4eca\u307e\u3067\u306b\u52d5\u4f5c\u5b9f\u7e3e\u306e\u3042\u308bNVME-SSD\u306b\u3064\u3044\u3066\u306f 002: HW Validation List \u304c\u53c2\u8003\u306b\u306a\u308b\u3067\u3057\u3087\u3046\u3002 \u521d\u671f\u8a2d\u5b9a \u30c9\u30e9\u30a4\u30d0\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u4ee5\u524d\u306ePG-Strom\u3067\u306f\u3001GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u306e\u5229\u7528\u306b\u306fHeteroDB\u793e\u306e\u958b\u767a\u3057\u305f\u72ec\u81ea\u306eLinux kernel\u30c9\u30e9\u30a4\u30d0\u304c\u5fc5\u8981\u3067\u3057\u305f\u304c\u3001v3.0\u4ee5\u964d\u3067\u306fNVIDIA\u306e\u63d0\u4f9b\u3059\u308bGPUDirect Storage\u3092\u5229\u7528\u3059\u308b\u3088\u3046\u306b\u8a2d\u8a08\u3092\u5909\u66f4\u3057\u3066\u3044\u307e\u3059\u3002GPUDirect Storage\u7528\u306eLinux kernel\u30c9\u30e9\u30a4\u30d0\uff08 nvidia-fs \uff09\u306fCUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30d7\u30ed\u30bb\u30b9\u306b\u7d71\u5408\u3055\u308c\u3001\u672c\u30de\u30cb\u30e5\u30a2\u30eb\u306e\u300c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u300d\u306e\u7ae0\u306b\u8a18\u8f09\u306e\u624b\u9806\u3067\u30b7\u30b9\u30c6\u30e0\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3057\u305f\u5834\u5408\u3001\u7279\u306b\u8ffd\u52a0\u306e\u8a2d\u5b9a\u306f\u5fc5\u8981\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u5fc5\u8981\u306aLinux kernel\u30c9\u30e9\u30a4\u30d0\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3001 modinfo \u30b3\u30de\u30f3\u30c9\u3084 lsmod \u30b3\u30de\u30f3\u30c9\u3092\u5229\u7528\u3057\u3066\u78ba\u8a8d\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 $ modinfo nvidia-fs filename: /lib/modules/5.14.0-427.18.1.el9_4.x86_64/extra/nvidia-fs.ko.xz description: NVIDIA GPUDirect Storage license: GPL v2 version: 2.20.5 rhelversion: 9.4 srcversion: 096A726CAEC0A059E24049E depends: retpoline: Y name: nvidia_fs vermagic: 5.14.0-427.18.1.el9_4.x86_64 SMP preempt mod_unload modversions sig_id: PKCS#7 signer: DKMS module signing key sig_key: 18:B4:AE:27:B8:7D:74:4F:C2:27:68:2A:EB:E0:6A:F0:84:B2:94:EE sig_hashalgo: sha512 : : $ lsmod | grep nvidia nvidia_fs 323584 32 nvidia_uvm 6877184 4 nvidia 8822784 43 nvidia_uvm,nvidia_fs drm 741376 2 drm_kms_helper,nvidia \u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u306e\u8a2d\u8a08 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306f\u4ee5\u4e0b\u306e\u6761\u4ef6\u3067\u767a\u52d5\u3057\u307e\u3059\u3002 \u30b9\u30ad\u30e3\u30f3\u5bfe\u8c61\u306e\u30c6\u30fc\u30d6\u30eb\u304cNVMe-SSD\u3067\u69cb\u6210\u3055\u308c\u305f\u533a\u753b\u306b\u914d\u7f6e\u3055\u308c\u3066\u3044\u308b\u3002 /dev/nvmeXXXX \u30d6\u30ed\u30c3\u30af\u30c7\u30d0\u30a4\u30b9\u3001\u307e\u305f\u306f /dev/nvmeXXXX \u30d6\u30ed\u30c3\u30af\u30c7\u30d0\u30a4\u30b9\u306e\u307f\u304b\u3089\u69cb\u6210\u3055\u308c\u305fmd-raid0\u533a\u753b\u304c\u5bfe\u8c61\u3067\u3059\u3002 \u30c6\u30fc\u30d6\u30eb\u30b5\u30a4\u30ba\u304c pg_strom.gpudirect_threshold \u3088\u308a\u3082\u5927\u304d\u3044\u4e8b\u3002 \u3053\u306e\u8a2d\u5b9a\u5024\u306f\u4efb\u610f\u306b\u5909\u66f4\u53ef\u80fd\u3067\u3059\u304c\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306f\u672c\u4f53\u642d\u8f09\u7269\u7406\u30e1\u30e2\u30ea\u306b shared_buffers \u306e\u8a2d\u5b9a\u5024\u306e1/3\u3092\u52a0\u3048\u305f\u5927\u304d\u3055\u3067\u3059\u3002 Note md-raid0\u3092\u7528\u3044\u3066\u8907\u6570\u306eNVMe-SSD\u533a\u753b\u304b\u3089\u30b9\u30c8\u30e9\u30a4\u30d4\u30f3\u30b0\u8aad\u51fa\u3057\u3092\u884c\u3046\u306b\u306f\u3001HeteroDB\u793e\u306e\u63d0\u4f9b\u3059\u308b\u30a8\u30f3\u30bf\u30fc\u30d7\u30e9\u30a4\u30ba\u30b5\u30d6\u30b9\u30af\u30ea\u30d7\u30b7\u30e7\u30f3\u306e\u9069\u7528\u304c\u5fc5\u8981\u3067\u3059\u3002 \u30c6\u30fc\u30d6\u30eb\u3092NVMe-SSD\u3067\u69cb\u6210\u3055\u308c\u305f\u533a\u753b\u306b\u914d\u7f6e\u3059\u308b\u306b\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u5168\u4f53\u3092NVMe-SSD\u30dc\u30ea\u30e5\u30fc\u30e0\u306b\u683c\u7d0d\u3059\u308b\u4ee5\u5916\u306b\u3082\u3001PostgreSQL\u306e\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u6a5f\u80fd\u3092\u7528\u3044\u3066\u7279\u5b9a\u306e\u30c6\u30fc\u30d6\u30eb\u3084\u7279\u5b9a\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u307f\u3092NVMe-SSD\u30dc\u30ea\u30e5\u30fc\u30e0\u306b\u914d\u7f6e\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4f8b\u3048\u3070 /opt/nvme \u306bNVMe-SSD\u30dc\u30ea\u30e5\u30fc\u30e0\u304c\u30de\u30a6\u30f3\u30c8\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u3092\u4f5c\u6210\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 PostgreSQL\u306e\u30b5\u30fc\u30d0\u30d7\u30ed\u30bb\u30b9\u306e\u6a29\u9650\u3067\u5f53\u8a72\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u914d\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u66f8\u304d\u3067\u304d\u308b\u3088\u3046\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308b\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 CREATE TABLESPACE my_nvme LOCATION '/opt/nvme'; \u3053\u306e\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u4e0a\u306b\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3059\u308b\u306b\u306f\u3001 CREATE TABLE \u69cb\u6587\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u6307\u5b9a\u3057\u307e\u3059\u3002 CREATE TABLE my_table (...) TABLESPACE my_nvme; \u3042\u308b\u3044\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u3092\u5909\u66f4\u3059\u308b\u306b\u306f\u3001 ALTER DATABASE \u69cb\u6587\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u6307\u5b9a\u3057\u307e\u3059\u3002 \u3053\u306e\u5834\u5408\u3001\u65e2\u5b58\u30c6\u30fc\u30d6\u30eb\u306e\u914d\u7f6e\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u306f\u5909\u66f4\u3055\u308c\u306a\u3044\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 ALTER DATABASE my_database SET TABLESPACE my_nvme; \u904b\u7528 GPU\u3068NVME-SSD\u9593\u306e\u8ddd\u96e2 \u30b5\u30fc\u30d0\u306e\u9078\u5b9a\u3068GPU\u304a\u3088\u3073NVME-SSD\u306e\u642d\u8f09\u306b\u3042\u305f\u308a\u3001\u30c7\u30d0\u30a4\u30b9\u306e\u6301\u3064\u6027\u80fd\u3092\u6700\u5927\u9650\u306b\u5f15\u304d\u51fa\u3059\u306b\u306f\u3001\u30c7\u30d0\u30a4\u30b9\u9593\u306e\u8ddd\u96e2\u3092\u610f\u8b58\u3057\u305f\u30b3\u30f3\u30d5\u30a3\u30b0\u304c\u5fc5\u8981\u3067\u3059\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u6a5f\u80fd\u304c\u305d\u306e\u57fa\u76e4\u3068\u3057\u3066\u4f7f\u7528\u3057\u3066\u3044\u308b NVIDIA GPUDirect RDMA \u306f\u3001P2P DMA\u3092\u5b9f\u884c\u3059\u308b\u306b\u306f\u4e92\u3044\u306e\u30c7\u30d0\u30a4\u30b9\u304c\u540c\u3058PCIe root complex\u306e\u914d\u4e0b\u306b\u63a5\u7d9a\u3055\u308c\u3066\u3044\u308b\u4e8b\u3092\u8981\u6c42\u3057\u3066\u3044\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u30c7\u30e5\u30a2\u30ebCPU\u30b7\u30b9\u30c6\u30e0\u3067NVME-SSD\u304cCPU1\u306b\u3001GPU\u304cCPU2\u306b\u63a5\u7d9a\u3055\u308c\u3066\u304a\u308a\u3001P2P DMA\u304cCPU\u9593\u306eQPI\u3092\u6a2a\u5207\u308b\u3088\u3046\u69cb\u6210\u3059\u308b\u4e8b\u306f\u3067\u304d\u307e\u305b\u3093\u3002 \u307e\u305f\u3001\u6027\u80fd\u306e\u89b3\u70b9\u304b\u3089\u306fCPU\u5185\u8535\u306ePCIe\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3088\u308a\u3082\u3001\u5c02\u7528\u306ePCIe\u30b9\u30a4\u30c3\u30c1\u3092\u4ecb\u3057\u3066\u4e92\u3044\u306e\u30c7\u30d0\u30a4\u30b9\u3092\u63a5\u7d9a\u3059\u308b\u65b9\u304c\u63a8\u5968\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u5199\u771f\u306fHPC\u5411\u3051\u30b5\u30fc\u30d0\u306e\u30de\u30b6\u30fc\u30dc\u30fc\u30c9\u3067\u30018\u672c\u306ePCIe x16\u30b9\u30ed\u30c3\u30c8\u304cPCIe\u30b9\u30a4\u30c3\u30c1\u3092\u4ecb\u3057\u3066\u4e92\u3044\u306b\u5bfe\u3068\u306a\u308b\u30b9\u30ed\u30c3\u30c8\u3068\u63a5\u7d9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001\u5199\u771f\u306e\u5de6\u5074\u306e\u30b9\u30ed\u30c3\u30c8\u306fCPU1\u306b\u3001\u53f3\u5074\u306e\u30b9\u30ed\u30c3\u30c8\u306fCPU2\u306b\u63a5\u7d9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u4f8b\u3048\u3070\u3001SSD-2\u4e0a\u306b\u69cb\u7bc9\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u3092GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u3092\u7528\u3044\u3066\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u5834\u5408\u3001\u6700\u9069\u306aGPU\u306e\u9078\u629e\u306fGPU-2\u3067\u3057\u3087\u3046\u3002\u307e\u305fGPU-1\u3092\u4f7f\u7528\u3059\u308b\u4e8b\u3082\u53ef\u80fd\u3067\u3059\u304c\u3001GPUDirect RDMA\u306e\u5236\u7d04\u304b\u3089\u3001GPU-3\u3068GPU-4\u306e\u4f7f\u7528\u306f\u907f\u3051\u306d\u3070\u306a\u308a\u307e\u305b\u3093\u3002 PG-Strom\u306f\u8d77\u52d5\u6642\u306b\u30b7\u30b9\u30c6\u30e0\u306ePCIe\u30d0\u30b9\u30c8\u30dd\u30ed\u30b8\u60c5\u5831\u3092\u53d6\u5f97\u3057\u3001GPU\u3068NVME-SSD\u9593\u306e\u8ad6\u7406\u7684\u306a\u8ddd\u96e2\u3092\u7b97\u51fa\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8d77\u52d5\u6642\u306e\u30ed\u30b0\u306b\u8a18\u9332\u3055\u308c\u3066\u304a\u308a\u3001\u4f8b\u3048\u3070 /dev/nvme2 \u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u6642\u306fGPU1\u3068\u3044\u3063\u305f\u5177\u5408\u306b\u3001\u5404NVME-SSD\u3054\u3068\u306b\u6700\u3082\u8ddd\u96e2\u306e\u8fd1\u3044GPU\u3092\u512a\u5148\u3057\u3066\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 $ pg_ctl restart : LOG: PG-Strom: GPU0 NVIDIA A100-PCIE-40GB (108 SMs; 1410MHz, L2 40960kB), RAM 39.50GB (5120bits, 1.16GHz), PCI-E Bar1 64GB, CC 8.0 LOG: [0000:41:00:0] GPU0 (NVIDIA A100-PCIE-40GB; GPU-13943bfd-5b30-38f5-0473-78> LOG: [0000:81:00:0] nvme0 (NGD-IN2500-080T4-C) --> GPU0 [dist=9] LOG: [0000:82:00:0] nvme2 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] LOG: [0000:c2:00:0] nvme3 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] LOG: [0000:c6:00:0] nvme5 (Corsair MP600 CORE) --> GPU0 [dist=9] LOG: [0000:c3:00:0] nvme4 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] LOG: [0000:c1:00:0] nvme1 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] LOG: [0000:c4:00:0] nvme6 (NGD-IN2500-080T4-C) --> GPU0 [dist=9] \u901a\u5e38\u306f\u81ea\u52d5\u8a2d\u5b9a\u3067\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u3002 \u305f\u3060\u3001NVME-over-Fabric(RDMA)\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306fPCIe\u30d0\u30b9\u4e0a\u306envme\u30c7\u30d0\u30a4\u30b9\u306e\u4f4d\u7f6e\u3092\u53d6\u5f97\u3067\u304d\u306a\u3044\u305f\u3081\u3001\u624b\u52d5\u3067NVME-SSD\u3068GPU\u306e\u4f4d\u7f6e\u95a2\u4fc2\u3092\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u4f8b\u3048\u3070 nvme1 \u306b\u306f gpu2 \u3092\u3001 nvme2 \u3068 nvme3 \u306b\u306f gpu1 \u3092\u5272\u308a\u5f53\u3066\u308b\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092 postgresql.conf \u3078\u8a18\u8ff0\u3057\u307e\u3059\u3002\u3053\u306e\u624b\u52d5\u8a2d\u5b9a\u306f\u3001\u81ea\u52d5\u8a2d\u5b9a\u3088\u308a\u3082\u512a\u5148\u3059\u308b\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 pg_strom.nvme_distance_map = 'nvme1=gpu2,nvme2=gpu1,nvme3=gpu1' \u30ed\u30fc\u30ab\u30eb\u306eNVME-SSD\u30c7\u30d0\u30a4\u30b9\u4ee5\u5916\u3001\u4f8b\u3048\u3070100Gb\u30a4\u30fc\u30b5\u30cd\u30c3\u30c8\u3067\u63a5\u7d9a\u3055\u308c\u305f\u30b9\u30c8\u30ec\u30fc\u30b8\u30b5\u30fc\u30d0\u304b\u3089GPU-Direct SQL\u3092\u5b9f\u884c\u3059\u308b\u5834\u5408\u306a\u3069\u3001PCI-E\u30d0\u30b9\u4e0a\u306e\u8ddd\u96e2\u306e\u6982\u5ff5\u304c\u5f53\u3066\u306f\u307e\u3089\u306a\u3044\u5834\u5408\u306f\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u304c\u30de\u30a6\u30f3\u30c8\u3055\u308c\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3068\u3001\u305d\u3053\u306b\u95a2\u9023\u4ed8\u3051\u308bGPU\u3092\u6307\u5b9a\u3059\u308b\u4e8b\u3082\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306f\u8a2d\u5b9a\u4f8b\u3067\u3059\u3002 pg_strom.nvme_distance_map = '/mnt/0=gpu0,/mnt/1=gpu1' GUC\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3088\u308b\u5236\u5fa1 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306b\u95a2\u9023\u3059\u308bGUC\u30d1\u30e9\u30e1\u30fc\u30bf\u306f2\u3064\u3042\u308a\u307e\u3059\u3002 \u4e00\u3064\u306f pg_strom.gpudirect_enabled \u3067\u3001GPU\u30c0\u30a4\u30ec\u30af\u30c8\u6a5f\u80fd\u306e\u6709\u52b9/\u7121\u52b9\u3092\u5358\u7d14\u306bon/off\u3057\u307e\u3059\u3002 \u672c\u30d1\u30e9\u30e1\u30fc\u30bf\u304c off \u306b\u306a\u3063\u3066\u3044\u308b\u3068\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u30b5\u30a4\u30ba\u3084\u7269\u7406\u914d\u7f6e\u3068\u306f\u7121\u95a2\u4fc2\u306bGPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306f\u4f7f\u7528\u3055\u308c\u307e\u305b\u3093\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306f on \u3067\u3059\u3002 \u3082\u3046\u4e00\u3064\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306f pg_strom.gpudirect_threshold \u3067\u3001GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u304c\u4f7f\u308f\u308c\u308b\u3079\u304d\u6700\u5c0f\u306e\u30c6\u30fc\u30d6\u30eb\u30b5\u30a4\u30ba\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u30c6\u30fc\u30d6\u30eb\u306e\u7269\u7406\u914d\u7f6e\u304cNVME-SSD\u533a\u753b\uff08\u307e\u305f\u306f\u3001NVME-SSD\u306e\u307f\u3067\u69cb\u6210\u3055\u308c\u305fmd-raid0\u533a\u753b\uff09\u4e0a\u306b\u5b58\u5728\u3057\u3001\u304b\u3064\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u30b5\u30a4\u30ba\u304c\u672c\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u6307\u5b9a\u5024\u3088\u308a\u3082\u5927\u304d\u306a\u5834\u5408\u3001PG-Strom\u306fGPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u3092\u9078\u629e\u3057\u307e\u3059\u3002 \u672c\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306f 2GB \u3067\u3059\u3002\u3064\u307e\u308a\u3001\u660e\u3089\u304b\u306b\u5c0f\u3055\u306a\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u306fGPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u3067\u306f\u306a\u304f\u3001PostgreSQL\u306e\u30d0\u30c3\u30d5\u30a1\u304b\u3089\u8aad\u307f\u51fa\u3059\u4e8b\u3092\u512a\u5148\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u3001\u4e00\u56de\u306e\u8aad\u307f\u51fa\u3057\u3067\u3042\u308c\u3070GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306b\u512a\u4f4d\u6027\u304c\u3042\u3063\u305f\u3068\u3057\u3066\u3082\u3001\u30aa\u30f3\u30e1\u30e2\u30ea\u51e6\u7406\u304c\u3067\u304d\u308b\u7a0b\u5ea6\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u306f\u3001\u4e8c\u56de\u76ee\u4ee5\u964d\u306e\u30c7\u30a3\u30b9\u30af\u30ad\u30e3\u30c3\u30b7\u30e5\u5229\u7528\u3092\u8003\u616e\u3059\u308b\u3068\u3001\u5fc5\u305a\u3057\u3082\u512a\u4f4d\u3068\u306f\u8a00\u3048\u306a\u3044\u3068\u3044\u3046\u4eee\u5b9a\u306b\u7acb\u3063\u3066\u3044\u308b\u3068\u3044\u3046\u4e8b\u3067\u3059\u3002 \u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u7279\u6027\u306b\u3088\u3063\u3066\u306f\u5fc5\u305a\u3057\u3082\u3053\u306e\u8a2d\u5b9a\u304c\u6b63\u3057\u3044\u3068\u306f\u9650\u308a\u307e\u305b\u3093\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306e\u5229\u7528\u3092\u78ba\u8a8d\u3059\u308b EXPLAIN \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u5f53\u8a72\u30af\u30a8\u30ea\u3067GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u304c\u5229\u7528\u3055\u308c\u308b\u306e\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u30af\u30a8\u30ea\u306e\u4f8b\u3067\u306f\u3001 Custom Scan (GpuJoin) \u306b\u3088\u308b lineorder \u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3059\u308b\u30b9\u30ad\u30e3\u30f3\u306b NVMe-Strom: enabled \u3068\u306e\u8868\u793a\u304c\u51fa\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001 lineorder \u30c6\u30fc\u30d6\u30eb\u304b\u3089\u306e\u8aad\u51fa\u3057\u306b\u306fGPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u304c\u5229\u7528\u3055\u308c\u307e\u3059\u3002 # explain (costs off) select sum(lo_revenue), d_year, p_brand1 from lineorder, date1, part, supplier where lo_orderdate = d_datekey and lo_partkey = p_partkey and lo_suppkey = s_suppkey and p_category = 'MFGR#12' and s_region = 'AMERICA' group by d_year, p_brand1 order by d_year, p_brand1; QUERY PLAN ---------------------------------------------------------------------------------------------- GroupAggregate Group Key: date1.d_year, part.p_brand1 -> Sort Sort Key: date1.d_year, part.p_brand1 -> Custom Scan (GpuPreAgg) Reduction: Local GPU Projection: pgstrom.psum((lo_revenue)::double precision), d_year, p_brand1 Combined GpuJoin: enabled -> Custom Scan (GpuJoin) on lineorder GPU Projection: date1.d_year, part.p_brand1, lineorder.lo_revenue Outer Scan: lineorder Depth 1: GpuHashJoin (nrows 2406009600...97764190) HashKeys: lineorder.lo_partkey JoinQuals: (lineorder.lo_partkey = part.p_partkey) KDS-Hash (size: 10.67MB) Depth 2: GpuHashJoin (nrows 97764190...18544060) HashKeys: lineorder.lo_suppkey JoinQuals: (lineorder.lo_suppkey = supplier.s_suppkey) KDS-Hash (size: 131.59MB) Depth 3: GpuHashJoin (nrows 18544060...18544060) HashKeys: lineorder.lo_orderdate JoinQuals: (lineorder.lo_orderdate = date1.d_datekey) KDS-Hash (size: 461.89KB) NVMe-Strom: enabled -> Custom Scan (GpuScan) on part GPU Projection: p_brand1, p_partkey GPU Filter: (p_category = 'MFGR#12'::bpchar) -> Custom Scan (GpuScan) on supplier GPU Projection: s_suppkey GPU Filter: (s_region = 'AMERICA'::bpchar) -> Seq Scan on date1 (31 rows) Visibility Map\u306b\u95a2\u3059\u308b\u6ce8\u610f\u4e8b\u9805 \u73fe\u5728\u306e\u3068\u3053\u308d\u3001PG-Strom\u306eGPU\u5074\u51e6\u7406\u3067\u306f\u884c\u5358\u4f4d\u306eMVCC\u53ef\u8996\u6027\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3046\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3002\u3053\u308c\u306f\u3001\u53ef\u8996\u6027\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3046\u305f\u3081\u306b\u5fc5\u8981\u306a\u30c7\u30fc\u30bf\u69cb\u9020\u304c\u30db\u30b9\u30c8\u5074\u3060\u3051\u306b\u5b58\u5728\u3059\u308b\u305f\u3081\u3067\u3059\u304c\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u4e0a\u306e\u30d6\u30ed\u30c3\u30af\u3092\u76f4\u63a5GPU\u306b\u8ee2\u9001\u3059\u308b\u5834\u5408\u3001\u5c11\u3005\u5384\u4ecb\u306a\u554f\u984c\u304c\u751f\u3058\u307e\u3059\u3002 NVMe-SSD\u306bP2P DMA\u3092\u8981\u6c42\u3059\u308b\u6642\u70b9\u3067\u306f\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u30d6\u30ed\u30c3\u30af\u306e\u5185\u5bb9\u306f\u307e\u3060CPU/RAM\u3078\u3068\u8aad\u307f\u51fa\u3055\u308c\u3066\u3044\u306a\u3044\u305f\u3081\u3001\u5177\u4f53\u7684\u306b\u3069\u306e\u884c\u304c\u53ef\u8996\u3067\u3042\u308b\u306e\u304b\u3001\u3069\u306e\u884c\u304c\u4e0d\u53ef\u8996\u3067\u3042\u308b\u306e\u304b\u3092\u5224\u5225\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3002\u3053\u308c\u306f\u3001PostgreSQL\u304c\u30ec\u30b3\u30fc\u30c9\u3092\u30b9\u30c8\u30ec\u30fc\u30b8\u3078\u66f8\u304d\u51fa\u3059\u969b\u306bMVCC\u95a2\u9023\u306e\u5c5e\u6027\u3068\u5171\u306b\u66f8\u304d\u8fbc\u3093\u3067\u3044\u308b\u305f\u3081\u3067\u3001\u4f3c\u305f\u3088\u3046\u306a\u554f\u984c\u304cIndexOnlyScan\u3092\u5b9f\u88c5\u3059\u308b\u969b\u306b\u8868\u9762\u5316\u3057\u307e\u3057\u305f\u3002 \u3053\u308c\u306b\u5bfe\u51e6\u3059\u308b\u305f\u3081\u3001PostgreSQL\u306fVisibility Map\u3068\u547c\u3070\u308c\u308b\u30a4\u30f3\u30d5\u30e9\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u3042\u308b\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u4e2d\u306b\u5b58\u5728\u3059\u308b\u30ec\u30b3\u30fc\u30c9\u304c\u5168\u3066\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304b\u3089\u53ef\u8996\u3067\u3042\u308b\u4e8b\u304c\u660e\u3089\u304b\u3067\u3042\u308c\u3070\u3001\u8a72\u5f53\u3059\u308b\u30d3\u30c3\u30c8\u3092\u7acb\u3066\u308b\u4e8b\u3067\u3001\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u3092\u8aad\u3080\u3053\u3068\u306a\u304f\u5f53\u8a72\u30d6\u30ed\u30c3\u30af\u306bMVCC\u4e0d\u53ef\u8996\u306a\u30ec\u30b3\u30fc\u30c9\u304c\u5b58\u5728\u3059\u308b\u304b\u5426\u304b\u3092\u5224\u5b9a\u3059\u308b\u4e8b\u3092\u53ef\u80fd\u3068\u3059\u308b\u3082\u306e\u3067\u3059\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306f\u3053\u306e\u30a4\u30f3\u30d5\u30e9\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u3064\u307e\u308a\u3001Visibility Map\u304c\u30bb\u30c3\u30c8\u3055\u308c\u3066\u304a\u308a\u3001\"all-visible\"\u3067\u3042\u308b\u30d6\u30ed\u30c3\u30af\u3060\u3051\u304cP2P DMA\u3067\u8aad\u307f\u51fa\u3059\u3088\u3046\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u9001\u51fa\u3055\u308c\u307e\u3059\u3002 Visibility Map\u306fVACUUM\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u4f5c\u6210\u3055\u308c\u308b\u305f\u3081\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u660e\u793a\u7684\u306bVACUUM\u3092\u5b9f\u884c\u3059\u308b\u4e8b\u3067\u5f37\u5236\u7684\u306bVisibility Map\u3092\u69cb\u7bc9\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 VACUUM ANALYZE linerorder;","title":"GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL"},{"location":"ssd2gpu/#gpusql","text":"","title":"GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c"},{"location":"ssd2gpu/#_1","text":"SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u9ad8\u901f\u306b\u51e6\u7406\u3059\u308b\u306b\u306f\u3001\u30d7\u30ed\u30bb\u30c3\u30b5\u304c\u52b9\u7387\u3088\u304f\u51e6\u7406\u3092\u884c\u3046\u306e\u3068\u540c\u69d8\u306b\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u3084\u30e1\u30e2\u30ea\u304b\u3089\u30d7\u30ed\u30bb\u30c3\u30b5\u3078\u9ad8\u901f\u306b\u30c7\u30fc\u30bf\u3092\u4f9b\u7d66\u3059\u308b\u4e8b\u304c\u91cd\u8981\u3067\u3059\u3002\u51e6\u7406\u3059\u3079\u304d\u30c7\u30fc\u30bf\u304c\u30d7\u30ed\u30bb\u30c3\u30b5\u306b\u5c4a\u3044\u3066\u3044\u306a\u3051\u308c\u3070\u3001\u30d7\u30ed\u30bb\u30c3\u30b5\u306f\u624b\u6301\u3061\u7121\u6c99\u6c70\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u6a5f\u80fd\u306f\u3001PCIe\u30d0\u30b9\u306b\u76f4\u7d50\u3059\u308b\u4e8b\u3067\u9ad8\u901f\u306aI/O\u51e6\u7406\u3092\u5b9f\u73fe\u3059\u308bNVMe-SSD\u3068\u3001\u540c\u3058PCIe\u30d0\u30b9\u4e0a\u306b\u63a5\u7d9a\u3055\u308c\u305fGPU\u3092\u30c0\u30a4\u30ec\u30af\u30c8\u306b\u63a5\u7d9a\u3057\u3001\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u9650\u754c\u306b\u8fd1\u3044\u901f\u5ea6\u3067\u30c7\u30fc\u30bf\u3092\u30d7\u30ed\u30bb\u30c3\u30b5\u306b\u4f9b\u7d66\u3059\u308b\u4e8b\u3067SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u9ad8\u901f\u306b\u51e6\u7406\u3059\u308b\u305f\u3081\u306e\u6a5f\u80fd\u3067\u3059\u3002 \u901a\u5e38\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u4e0a\u306b\u683c\u7d0d\u3055\u308c\u305fPostgreSQL\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u306f\u3001PCIe\u30d0\u30b9\u3092\u901a\u3057\u3066\u3044\u3063\u305f\u3093CPU/RAM\u3078\u3068\u30ed\u30fc\u30c9\u3055\u308c\u307e\u3059\u3002\u305d\u306e\u5f8c\u3001\u30af\u30a8\u30ea\u5b9f\u884c\u8a08\u753b\u306b\u3057\u305f\u304c\u3063\u3066WHERE\u53e5\u306b\u3088\u308b\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3084JOIN/GROUP BY\u3068\u3044\u3063\u305f\u51e6\u7406\u3092\u884c\u3046\u308f\u3051\u3067\u3059\u304c\u3001\u96c6\u8a08\u7cfb\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u7279\u6027\u4e0a\u3001\u5165\u529b\u3059\u308b\u30c7\u30fc\u30bf\u4ef6\u6570\u3088\u308a\u51fa\u529b\u3059\u308b\u30c7\u30fc\u30bf\u4ef6\u6570\u306e\u65b9\u304c\u306f\u308b\u304b\u306b\u5c11\u306a\u3044\u4ef6\u6570\u3068\u306a\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070\u6570\u5341\u5104\u884c\u3092\u8aad\u307f\u51fa\u3057\u305f\u7d50\u679c\u3092GROUP BY\u3067\u96c6\u7d04\u3057\u305f\u7d50\u679c\u304c\u9ad8\u3005\u6570\u767e\u884c\u3068\u3044\u3046\u4e8b\u3082\u73cd\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002 \u8a00\u3044\u63db\u3048\u308c\u3070\u3001\u6211\u3005\u306f\u30b4\u30df\u30c7\u30fc\u30bf\u3092\u904b\u3076\u305f\u3081\u306bPCIe\u30d0\u30b9\u4e0a\u306e\u5e2f\u57df\u3092\u6d88\u8cbb\u3057\u3066\u3044\u308b\u3068\u3082\u8a00\u3048\u307e\u3059\u304c\u3001CPU\u304c\u30ec\u30b3\u30fc\u30c9\u306e\u4e2d\u8eab\u3092\u8abf\u3079\u308b\u307e\u3067\u306f\u3001\u305d\u306e\u8981\u4e0d\u8981\u3092\u5224\u65ad\u3067\u304d\u306a\u3044\u305f\u3081\u3001\u4e00\u822c\u7684\u306a\u5b9f\u88c5\u3067\u306f\u3053\u308c\u306f\u4e0d\u53ef\u907f\u3068\u8a00\u3048\u307e\u3059\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306f\u30c7\u30fc\u30bf\u306e\u6d41\u308c\u3092\u5909\u3048\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u4e0a\u306e\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u3092PCIe\u30d0\u30b9\u4e0a\u306eP2P DMA\u3092\u7528\u3044\u3066GPU\u306b\u76f4\u63a5\u8ee2\u9001\u3057\u3001GPU\u3067SQL\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u51e6\u7406\u3059\u308b\u4e8b\u3067CPU\u304c\u51e6\u7406\u3059\u3079\u304d\u30ec\u30b3\u30fc\u30c9\u6570\u3092\u6e1b\u3089\u3059\u305f\u3081\u306e\u6a5f\u80fd\u3067\u3059\u3002\u3044\u308f\u3070\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u3068CPU/RAM\u306e\u9593\u306b\u4f4d\u7f6e\u3057\u3066SQL\u3092\u51e6\u7406\u3059\u308b\u305f\u3081\u306e\u30d7\u30ea\u30d7\u30ed\u30bb\u30c3\u30b5\u3068\u3057\u3066GPU\u3092\u6d3b\u7528\u3057\u3001\u7d50\u679c\u3068\u3057\u3066I/O\u51e6\u7406\u3092\u9ad8\u901f\u5316\u3059\u308b\u305f\u3081\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u3067\u3059\u3002 \u672c\u6a5f\u80fd\u306f\u3001\u5185\u90e8\u7684\u306bNVIDIA GPUDirect Storage\u30e2\u30b8\u30e5\u30fc\u30eb\uff08 nvidia-fs \uff09\u3092\u4f7f\u7528\u3057\u3066\u3001GPU\u30c7\u30d0\u30a4\u30b9\u30e1\u30e2\u30ea\u3068NVME\u30b9\u30c8\u30ec\u30fc\u30b8\u3068\u306e\u9593\u3067P2P\u306e\u30c7\u30fc\u30bf\u8ee2\u9001\u3092\u884c\u3044\u307e\u3059\u3002 \u3057\u305f\u304c\u3063\u3066\u3001\u672c\u6a5f\u80fd\u3092\u5229\u7528\u3059\u308b\u306b\u306f\u3001PostgreSQL\u306e\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3042\u308bPG-Strom\u3060\u3051\u3067\u306f\u306a\u304f\u3001\u4e0a\u8a18\u306eLinux kernel\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u3002 \u307e\u305f\u3001\u672c\u6a5f\u80fd\u304c\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u306e\u306fNVME\u4ed5\u69d8\u306eSSD\u3084\u3001NVME-oF\u3067\u63a5\u7d9a\u3055\u308c\u305f\u30ea\u30e2\u30fc\u30c8\u30c7\u30d0\u30a4\u30b9\u306e\u307f\u3067\u3059\u3002 SAS\u3084SATA\u3068\u3044\u3063\u305f\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3067\u63a5\u7d9a\u3055\u308c\u305f\u65e7\u5f0f\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u306b\u306f\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u305b\u3093\u3002 \u4eca\u307e\u3067\u306b\u52d5\u4f5c\u5b9f\u7e3e\u306e\u3042\u308bNVME-SSD\u306b\u3064\u3044\u3066\u306f 002: HW Validation List \u304c\u53c2\u8003\u306b\u306a\u308b\u3067\u3057\u3087\u3046\u3002","title":"\u6982\u8981"},{"location":"ssd2gpu/#_2","text":"","title":"\u521d\u671f\u8a2d\u5b9a"},{"location":"ssd2gpu/#_3","text":"\u4ee5\u524d\u306ePG-Strom\u3067\u306f\u3001GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u306e\u5229\u7528\u306b\u306fHeteroDB\u793e\u306e\u958b\u767a\u3057\u305f\u72ec\u81ea\u306eLinux kernel\u30c9\u30e9\u30a4\u30d0\u304c\u5fc5\u8981\u3067\u3057\u305f\u304c\u3001v3.0\u4ee5\u964d\u3067\u306fNVIDIA\u306e\u63d0\u4f9b\u3059\u308bGPUDirect Storage\u3092\u5229\u7528\u3059\u308b\u3088\u3046\u306b\u8a2d\u8a08\u3092\u5909\u66f4\u3057\u3066\u3044\u307e\u3059\u3002GPUDirect Storage\u7528\u306eLinux kernel\u30c9\u30e9\u30a4\u30d0\uff08 nvidia-fs \uff09\u306fCUDA Toolkit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30d7\u30ed\u30bb\u30b9\u306b\u7d71\u5408\u3055\u308c\u3001\u672c\u30de\u30cb\u30e5\u30a2\u30eb\u306e\u300c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u300d\u306e\u7ae0\u306b\u8a18\u8f09\u306e\u624b\u9806\u3067\u30b7\u30b9\u30c6\u30e0\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3057\u305f\u5834\u5408\u3001\u7279\u306b\u8ffd\u52a0\u306e\u8a2d\u5b9a\u306f\u5fc5\u8981\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u5fc5\u8981\u306aLinux kernel\u30c9\u30e9\u30a4\u30d0\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3001 modinfo \u30b3\u30de\u30f3\u30c9\u3084 lsmod \u30b3\u30de\u30f3\u30c9\u3092\u5229\u7528\u3057\u3066\u78ba\u8a8d\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 $ modinfo nvidia-fs filename: /lib/modules/5.14.0-427.18.1.el9_4.x86_64/extra/nvidia-fs.ko.xz description: NVIDIA GPUDirect Storage license: GPL v2 version: 2.20.5 rhelversion: 9.4 srcversion: 096A726CAEC0A059E24049E depends: retpoline: Y name: nvidia_fs vermagic: 5.14.0-427.18.1.el9_4.x86_64 SMP preempt mod_unload modversions sig_id: PKCS#7 signer: DKMS module signing key sig_key: 18:B4:AE:27:B8:7D:74:4F:C2:27:68:2A:EB:E0:6A:F0:84:B2:94:EE sig_hashalgo: sha512 : : $ lsmod | grep nvidia nvidia_fs 323584 32 nvidia_uvm 6877184 4 nvidia 8822784 43 nvidia_uvm,nvidia_fs drm 741376 2 drm_kms_helper,nvidia","title":"\u30c9\u30e9\u30a4\u30d0\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"ssd2gpu/#_4","text":"GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306f\u4ee5\u4e0b\u306e\u6761\u4ef6\u3067\u767a\u52d5\u3057\u307e\u3059\u3002 \u30b9\u30ad\u30e3\u30f3\u5bfe\u8c61\u306e\u30c6\u30fc\u30d6\u30eb\u304cNVMe-SSD\u3067\u69cb\u6210\u3055\u308c\u305f\u533a\u753b\u306b\u914d\u7f6e\u3055\u308c\u3066\u3044\u308b\u3002 /dev/nvmeXXXX \u30d6\u30ed\u30c3\u30af\u30c7\u30d0\u30a4\u30b9\u3001\u307e\u305f\u306f /dev/nvmeXXXX \u30d6\u30ed\u30c3\u30af\u30c7\u30d0\u30a4\u30b9\u306e\u307f\u304b\u3089\u69cb\u6210\u3055\u308c\u305fmd-raid0\u533a\u753b\u304c\u5bfe\u8c61\u3067\u3059\u3002 \u30c6\u30fc\u30d6\u30eb\u30b5\u30a4\u30ba\u304c pg_strom.gpudirect_threshold \u3088\u308a\u3082\u5927\u304d\u3044\u4e8b\u3002 \u3053\u306e\u8a2d\u5b9a\u5024\u306f\u4efb\u610f\u306b\u5909\u66f4\u53ef\u80fd\u3067\u3059\u304c\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306f\u672c\u4f53\u642d\u8f09\u7269\u7406\u30e1\u30e2\u30ea\u306b shared_buffers \u306e\u8a2d\u5b9a\u5024\u306e1/3\u3092\u52a0\u3048\u305f\u5927\u304d\u3055\u3067\u3059\u3002 Note md-raid0\u3092\u7528\u3044\u3066\u8907\u6570\u306eNVMe-SSD\u533a\u753b\u304b\u3089\u30b9\u30c8\u30e9\u30a4\u30d4\u30f3\u30b0\u8aad\u51fa\u3057\u3092\u884c\u3046\u306b\u306f\u3001HeteroDB\u793e\u306e\u63d0\u4f9b\u3059\u308b\u30a8\u30f3\u30bf\u30fc\u30d7\u30e9\u30a4\u30ba\u30b5\u30d6\u30b9\u30af\u30ea\u30d7\u30b7\u30e7\u30f3\u306e\u9069\u7528\u304c\u5fc5\u8981\u3067\u3059\u3002 \u30c6\u30fc\u30d6\u30eb\u3092NVMe-SSD\u3067\u69cb\u6210\u3055\u308c\u305f\u533a\u753b\u306b\u914d\u7f6e\u3059\u308b\u306b\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u5168\u4f53\u3092NVMe-SSD\u30dc\u30ea\u30e5\u30fc\u30e0\u306b\u683c\u7d0d\u3059\u308b\u4ee5\u5916\u306b\u3082\u3001PostgreSQL\u306e\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u6a5f\u80fd\u3092\u7528\u3044\u3066\u7279\u5b9a\u306e\u30c6\u30fc\u30d6\u30eb\u3084\u7279\u5b9a\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u307f\u3092NVMe-SSD\u30dc\u30ea\u30e5\u30fc\u30e0\u306b\u914d\u7f6e\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4f8b\u3048\u3070 /opt/nvme \u306bNVMe-SSD\u30dc\u30ea\u30e5\u30fc\u30e0\u304c\u30de\u30a6\u30f3\u30c8\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u3092\u4f5c\u6210\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 PostgreSQL\u306e\u30b5\u30fc\u30d0\u30d7\u30ed\u30bb\u30b9\u306e\u6a29\u9650\u3067\u5f53\u8a72\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u914d\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u66f8\u304d\u3067\u304d\u308b\u3088\u3046\u30d1\u30fc\u30df\u30c3\u30b7\u30e7\u30f3\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308b\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 CREATE TABLESPACE my_nvme LOCATION '/opt/nvme'; \u3053\u306e\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u4e0a\u306b\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3059\u308b\u306b\u306f\u3001 CREATE TABLE \u69cb\u6587\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u6307\u5b9a\u3057\u307e\u3059\u3002 CREATE TABLE my_table (...) TABLESPACE my_nvme; \u3042\u308b\u3044\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u3092\u5909\u66f4\u3059\u308b\u306b\u306f\u3001 ALTER DATABASE \u69cb\u6587\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u6307\u5b9a\u3057\u307e\u3059\u3002 \u3053\u306e\u5834\u5408\u3001\u65e2\u5b58\u30c6\u30fc\u30d6\u30eb\u306e\u914d\u7f6e\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u306f\u5909\u66f4\u3055\u308c\u306a\u3044\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 ALTER DATABASE my_database SET TABLESPACE my_nvme;","title":"\u30c6\u30fc\u30d6\u30eb\u30b9\u30da\u30fc\u30b9\u306e\u8a2d\u8a08"},{"location":"ssd2gpu/#_5","text":"","title":"\u904b\u7528"},{"location":"ssd2gpu/#gpunvme-ssd","text":"\u30b5\u30fc\u30d0\u306e\u9078\u5b9a\u3068GPU\u304a\u3088\u3073NVME-SSD\u306e\u642d\u8f09\u306b\u3042\u305f\u308a\u3001\u30c7\u30d0\u30a4\u30b9\u306e\u6301\u3064\u6027\u80fd\u3092\u6700\u5927\u9650\u306b\u5f15\u304d\u51fa\u3059\u306b\u306f\u3001\u30c7\u30d0\u30a4\u30b9\u9593\u306e\u8ddd\u96e2\u3092\u610f\u8b58\u3057\u305f\u30b3\u30f3\u30d5\u30a3\u30b0\u304c\u5fc5\u8981\u3067\u3059\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u6a5f\u80fd\u304c\u305d\u306e\u57fa\u76e4\u3068\u3057\u3066\u4f7f\u7528\u3057\u3066\u3044\u308b NVIDIA GPUDirect RDMA \u306f\u3001P2P DMA\u3092\u5b9f\u884c\u3059\u308b\u306b\u306f\u4e92\u3044\u306e\u30c7\u30d0\u30a4\u30b9\u304c\u540c\u3058PCIe root complex\u306e\u914d\u4e0b\u306b\u63a5\u7d9a\u3055\u308c\u3066\u3044\u308b\u4e8b\u3092\u8981\u6c42\u3057\u3066\u3044\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u30c7\u30e5\u30a2\u30ebCPU\u30b7\u30b9\u30c6\u30e0\u3067NVME-SSD\u304cCPU1\u306b\u3001GPU\u304cCPU2\u306b\u63a5\u7d9a\u3055\u308c\u3066\u304a\u308a\u3001P2P DMA\u304cCPU\u9593\u306eQPI\u3092\u6a2a\u5207\u308b\u3088\u3046\u69cb\u6210\u3059\u308b\u4e8b\u306f\u3067\u304d\u307e\u305b\u3093\u3002 \u307e\u305f\u3001\u6027\u80fd\u306e\u89b3\u70b9\u304b\u3089\u306fCPU\u5185\u8535\u306ePCIe\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3088\u308a\u3082\u3001\u5c02\u7528\u306ePCIe\u30b9\u30a4\u30c3\u30c1\u3092\u4ecb\u3057\u3066\u4e92\u3044\u306e\u30c7\u30d0\u30a4\u30b9\u3092\u63a5\u7d9a\u3059\u308b\u65b9\u304c\u63a8\u5968\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u5199\u771f\u306fHPC\u5411\u3051\u30b5\u30fc\u30d0\u306e\u30de\u30b6\u30fc\u30dc\u30fc\u30c9\u3067\u30018\u672c\u306ePCIe x16\u30b9\u30ed\u30c3\u30c8\u304cPCIe\u30b9\u30a4\u30c3\u30c1\u3092\u4ecb\u3057\u3066\u4e92\u3044\u306b\u5bfe\u3068\u306a\u308b\u30b9\u30ed\u30c3\u30c8\u3068\u63a5\u7d9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001\u5199\u771f\u306e\u5de6\u5074\u306e\u30b9\u30ed\u30c3\u30c8\u306fCPU1\u306b\u3001\u53f3\u5074\u306e\u30b9\u30ed\u30c3\u30c8\u306fCPU2\u306b\u63a5\u7d9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u4f8b\u3048\u3070\u3001SSD-2\u4e0a\u306b\u69cb\u7bc9\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u3092GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u3092\u7528\u3044\u3066\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u5834\u5408\u3001\u6700\u9069\u306aGPU\u306e\u9078\u629e\u306fGPU-2\u3067\u3057\u3087\u3046\u3002\u307e\u305fGPU-1\u3092\u4f7f\u7528\u3059\u308b\u4e8b\u3082\u53ef\u80fd\u3067\u3059\u304c\u3001GPUDirect RDMA\u306e\u5236\u7d04\u304b\u3089\u3001GPU-3\u3068GPU-4\u306e\u4f7f\u7528\u306f\u907f\u3051\u306d\u3070\u306a\u308a\u307e\u305b\u3093\u3002 PG-Strom\u306f\u8d77\u52d5\u6642\u306b\u30b7\u30b9\u30c6\u30e0\u306ePCIe\u30d0\u30b9\u30c8\u30dd\u30ed\u30b8\u60c5\u5831\u3092\u53d6\u5f97\u3057\u3001GPU\u3068NVME-SSD\u9593\u306e\u8ad6\u7406\u7684\u306a\u8ddd\u96e2\u3092\u7b97\u51fa\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8d77\u52d5\u6642\u306e\u30ed\u30b0\u306b\u8a18\u9332\u3055\u308c\u3066\u304a\u308a\u3001\u4f8b\u3048\u3070 /dev/nvme2 \u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u6642\u306fGPU1\u3068\u3044\u3063\u305f\u5177\u5408\u306b\u3001\u5404NVME-SSD\u3054\u3068\u306b\u6700\u3082\u8ddd\u96e2\u306e\u8fd1\u3044GPU\u3092\u512a\u5148\u3057\u3066\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 $ pg_ctl restart : LOG: PG-Strom: GPU0 NVIDIA A100-PCIE-40GB (108 SMs; 1410MHz, L2 40960kB), RAM 39.50GB (5120bits, 1.16GHz), PCI-E Bar1 64GB, CC 8.0 LOG: [0000:41:00:0] GPU0 (NVIDIA A100-PCIE-40GB; GPU-13943bfd-5b30-38f5-0473-78> LOG: [0000:81:00:0] nvme0 (NGD-IN2500-080T4-C) --> GPU0 [dist=9] LOG: [0000:82:00:0] nvme2 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] LOG: [0000:c2:00:0] nvme3 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] LOG: [0000:c6:00:0] nvme5 (Corsair MP600 CORE) --> GPU0 [dist=9] LOG: [0000:c3:00:0] nvme4 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] LOG: [0000:c1:00:0] nvme1 (INTEL SSDPF2KX038TZ) --> GPU0 [dist=9] LOG: [0000:c4:00:0] nvme6 (NGD-IN2500-080T4-C) --> GPU0 [dist=9] \u901a\u5e38\u306f\u81ea\u52d5\u8a2d\u5b9a\u3067\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u3002 \u305f\u3060\u3001NVME-over-Fabric(RDMA)\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306fPCIe\u30d0\u30b9\u4e0a\u306envme\u30c7\u30d0\u30a4\u30b9\u306e\u4f4d\u7f6e\u3092\u53d6\u5f97\u3067\u304d\u306a\u3044\u305f\u3081\u3001\u624b\u52d5\u3067NVME-SSD\u3068GPU\u306e\u4f4d\u7f6e\u95a2\u4fc2\u3092\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u4f8b\u3048\u3070 nvme1 \u306b\u306f gpu2 \u3092\u3001 nvme2 \u3068 nvme3 \u306b\u306f gpu1 \u3092\u5272\u308a\u5f53\u3066\u308b\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092 postgresql.conf \u3078\u8a18\u8ff0\u3057\u307e\u3059\u3002\u3053\u306e\u624b\u52d5\u8a2d\u5b9a\u306f\u3001\u81ea\u52d5\u8a2d\u5b9a\u3088\u308a\u3082\u512a\u5148\u3059\u308b\u4e8b\u306b\u7559\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 pg_strom.nvme_distance_map = 'nvme1=gpu2,nvme2=gpu1,nvme3=gpu1' \u30ed\u30fc\u30ab\u30eb\u306eNVME-SSD\u30c7\u30d0\u30a4\u30b9\u4ee5\u5916\u3001\u4f8b\u3048\u3070100Gb\u30a4\u30fc\u30b5\u30cd\u30c3\u30c8\u3067\u63a5\u7d9a\u3055\u308c\u305f\u30b9\u30c8\u30ec\u30fc\u30b8\u30b5\u30fc\u30d0\u304b\u3089GPU-Direct SQL\u3092\u5b9f\u884c\u3059\u308b\u5834\u5408\u306a\u3069\u3001PCI-E\u30d0\u30b9\u4e0a\u306e\u8ddd\u96e2\u306e\u6982\u5ff5\u304c\u5f53\u3066\u306f\u307e\u3089\u306a\u3044\u5834\u5408\u306f\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u304c\u30de\u30a6\u30f3\u30c8\u3055\u308c\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3068\u3001\u305d\u3053\u306b\u95a2\u9023\u4ed8\u3051\u308bGPU\u3092\u6307\u5b9a\u3059\u308b\u4e8b\u3082\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306f\u8a2d\u5b9a\u4f8b\u3067\u3059\u3002 pg_strom.nvme_distance_map = '/mnt/0=gpu0,/mnt/1=gpu1'","title":"GPU\u3068NVME-SSD\u9593\u306e\u8ddd\u96e2"},{"location":"ssd2gpu/#guc","text":"GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306b\u95a2\u9023\u3059\u308bGUC\u30d1\u30e9\u30e1\u30fc\u30bf\u306f2\u3064\u3042\u308a\u307e\u3059\u3002 \u4e00\u3064\u306f pg_strom.gpudirect_enabled \u3067\u3001GPU\u30c0\u30a4\u30ec\u30af\u30c8\u6a5f\u80fd\u306e\u6709\u52b9/\u7121\u52b9\u3092\u5358\u7d14\u306bon/off\u3057\u307e\u3059\u3002 \u672c\u30d1\u30e9\u30e1\u30fc\u30bf\u304c off \u306b\u306a\u3063\u3066\u3044\u308b\u3068\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u30b5\u30a4\u30ba\u3084\u7269\u7406\u914d\u7f6e\u3068\u306f\u7121\u95a2\u4fc2\u306bGPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306f\u4f7f\u7528\u3055\u308c\u307e\u305b\u3093\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306f on \u3067\u3059\u3002 \u3082\u3046\u4e00\u3064\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306f pg_strom.gpudirect_threshold \u3067\u3001GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u304c\u4f7f\u308f\u308c\u308b\u3079\u304d\u6700\u5c0f\u306e\u30c6\u30fc\u30d6\u30eb\u30b5\u30a4\u30ba\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u30c6\u30fc\u30d6\u30eb\u306e\u7269\u7406\u914d\u7f6e\u304cNVME-SSD\u533a\u753b\uff08\u307e\u305f\u306f\u3001NVME-SSD\u306e\u307f\u3067\u69cb\u6210\u3055\u308c\u305fmd-raid0\u533a\u753b\uff09\u4e0a\u306b\u5b58\u5728\u3057\u3001\u304b\u3064\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u30b5\u30a4\u30ba\u304c\u672c\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u6307\u5b9a\u5024\u3088\u308a\u3082\u5927\u304d\u306a\u5834\u5408\u3001PG-Strom\u306fGPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u3092\u9078\u629e\u3057\u307e\u3059\u3002 \u672c\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306f 2GB \u3067\u3059\u3002\u3064\u307e\u308a\u3001\u660e\u3089\u304b\u306b\u5c0f\u3055\u306a\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u306fGPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u3067\u306f\u306a\u304f\u3001PostgreSQL\u306e\u30d0\u30c3\u30d5\u30a1\u304b\u3089\u8aad\u307f\u51fa\u3059\u4e8b\u3092\u512a\u5148\u3057\u307e\u3059\u3002 \u3053\u308c\u306f\u3001\u4e00\u56de\u306e\u8aad\u307f\u51fa\u3057\u3067\u3042\u308c\u3070GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306b\u512a\u4f4d\u6027\u304c\u3042\u3063\u305f\u3068\u3057\u3066\u3082\u3001\u30aa\u30f3\u30e1\u30e2\u30ea\u51e6\u7406\u304c\u3067\u304d\u308b\u7a0b\u5ea6\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3057\u3066\u306f\u3001\u4e8c\u56de\u76ee\u4ee5\u964d\u306e\u30c7\u30a3\u30b9\u30af\u30ad\u30e3\u30c3\u30b7\u30e5\u5229\u7528\u3092\u8003\u616e\u3059\u308b\u3068\u3001\u5fc5\u305a\u3057\u3082\u512a\u4f4d\u3068\u306f\u8a00\u3048\u306a\u3044\u3068\u3044\u3046\u4eee\u5b9a\u306b\u7acb\u3063\u3066\u3044\u308b\u3068\u3044\u3046\u4e8b\u3067\u3059\u3002 \u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u306e\u7279\u6027\u306b\u3088\u3063\u3066\u306f\u5fc5\u305a\u3057\u3082\u3053\u306e\u8a2d\u5b9a\u304c\u6b63\u3057\u3044\u3068\u306f\u9650\u308a\u307e\u305b\u3093\u3002","title":"GUC\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u3088\u308b\u5236\u5fa1"},{"location":"ssd2gpu/#gpusql_1","text":"EXPLAIN \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u5f53\u8a72\u30af\u30a8\u30ea\u3067GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u304c\u5229\u7528\u3055\u308c\u308b\u306e\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u30af\u30a8\u30ea\u306e\u4f8b\u3067\u306f\u3001 Custom Scan (GpuJoin) \u306b\u3088\u308b lineorder \u30c6\u30fc\u30d6\u30eb\u306b\u5bfe\u3059\u308b\u30b9\u30ad\u30e3\u30f3\u306b NVMe-Strom: enabled \u3068\u306e\u8868\u793a\u304c\u51fa\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001 lineorder \u30c6\u30fc\u30d6\u30eb\u304b\u3089\u306e\u8aad\u51fa\u3057\u306b\u306fGPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u304c\u5229\u7528\u3055\u308c\u307e\u3059\u3002 # explain (costs off) select sum(lo_revenue), d_year, p_brand1 from lineorder, date1, part, supplier where lo_orderdate = d_datekey and lo_partkey = p_partkey and lo_suppkey = s_suppkey and p_category = 'MFGR#12' and s_region = 'AMERICA' group by d_year, p_brand1 order by d_year, p_brand1; QUERY PLAN ---------------------------------------------------------------------------------------------- GroupAggregate Group Key: date1.d_year, part.p_brand1 -> Sort Sort Key: date1.d_year, part.p_brand1 -> Custom Scan (GpuPreAgg) Reduction: Local GPU Projection: pgstrom.psum((lo_revenue)::double precision), d_year, p_brand1 Combined GpuJoin: enabled -> Custom Scan (GpuJoin) on lineorder GPU Projection: date1.d_year, part.p_brand1, lineorder.lo_revenue Outer Scan: lineorder Depth 1: GpuHashJoin (nrows 2406009600...97764190) HashKeys: lineorder.lo_partkey JoinQuals: (lineorder.lo_partkey = part.p_partkey) KDS-Hash (size: 10.67MB) Depth 2: GpuHashJoin (nrows 97764190...18544060) HashKeys: lineorder.lo_suppkey JoinQuals: (lineorder.lo_suppkey = supplier.s_suppkey) KDS-Hash (size: 131.59MB) Depth 3: GpuHashJoin (nrows 18544060...18544060) HashKeys: lineorder.lo_orderdate JoinQuals: (lineorder.lo_orderdate = date1.d_datekey) KDS-Hash (size: 461.89KB) NVMe-Strom: enabled -> Custom Scan (GpuScan) on part GPU Projection: p_brand1, p_partkey GPU Filter: (p_category = 'MFGR#12'::bpchar) -> Custom Scan (GpuScan) on supplier GPU Projection: s_suppkey GPU Filter: (s_region = 'AMERICA'::bpchar) -> Seq Scan on date1 (31 rows)","title":"GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306e\u5229\u7528\u3092\u78ba\u8a8d\u3059\u308b"},{"location":"ssd2gpu/#visibility-map","text":"\u73fe\u5728\u306e\u3068\u3053\u308d\u3001PG-Strom\u306eGPU\u5074\u51e6\u7406\u3067\u306f\u884c\u5358\u4f4d\u306eMVCC\u53ef\u8996\u6027\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3046\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3002\u3053\u308c\u306f\u3001\u53ef\u8996\u6027\u30c1\u30a7\u30c3\u30af\u3092\u884c\u3046\u305f\u3081\u306b\u5fc5\u8981\u306a\u30c7\u30fc\u30bf\u69cb\u9020\u304c\u30db\u30b9\u30c8\u5074\u3060\u3051\u306b\u5b58\u5728\u3059\u308b\u305f\u3081\u3067\u3059\u304c\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u4e0a\u306e\u30d6\u30ed\u30c3\u30af\u3092\u76f4\u63a5GPU\u306b\u8ee2\u9001\u3059\u308b\u5834\u5408\u3001\u5c11\u3005\u5384\u4ecb\u306a\u554f\u984c\u304c\u751f\u3058\u307e\u3059\u3002 NVMe-SSD\u306bP2P DMA\u3092\u8981\u6c42\u3059\u308b\u6642\u70b9\u3067\u306f\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u30d6\u30ed\u30c3\u30af\u306e\u5185\u5bb9\u306f\u307e\u3060CPU/RAM\u3078\u3068\u8aad\u307f\u51fa\u3055\u308c\u3066\u3044\u306a\u3044\u305f\u3081\u3001\u5177\u4f53\u7684\u306b\u3069\u306e\u884c\u304c\u53ef\u8996\u3067\u3042\u308b\u306e\u304b\u3001\u3069\u306e\u884c\u304c\u4e0d\u53ef\u8996\u3067\u3042\u308b\u306e\u304b\u3092\u5224\u5225\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u305b\u3093\u3002\u3053\u308c\u306f\u3001PostgreSQL\u304c\u30ec\u30b3\u30fc\u30c9\u3092\u30b9\u30c8\u30ec\u30fc\u30b8\u3078\u66f8\u304d\u51fa\u3059\u969b\u306bMVCC\u95a2\u9023\u306e\u5c5e\u6027\u3068\u5171\u306b\u66f8\u304d\u8fbc\u3093\u3067\u3044\u308b\u305f\u3081\u3067\u3001\u4f3c\u305f\u3088\u3046\u306a\u554f\u984c\u304cIndexOnlyScan\u3092\u5b9f\u88c5\u3059\u308b\u969b\u306b\u8868\u9762\u5316\u3057\u307e\u3057\u305f\u3002 \u3053\u308c\u306b\u5bfe\u51e6\u3059\u308b\u305f\u3081\u3001PostgreSQL\u306fVisibility Map\u3068\u547c\u3070\u308c\u308b\u30a4\u30f3\u30d5\u30e9\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u3042\u308b\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u4e2d\u306b\u5b58\u5728\u3059\u308b\u30ec\u30b3\u30fc\u30c9\u304c\u5168\u3066\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304b\u3089\u53ef\u8996\u3067\u3042\u308b\u4e8b\u304c\u660e\u3089\u304b\u3067\u3042\u308c\u3070\u3001\u8a72\u5f53\u3059\u308b\u30d3\u30c3\u30c8\u3092\u7acb\u3066\u308b\u4e8b\u3067\u3001\u30c7\u30fc\u30bf\u30d6\u30ed\u30c3\u30af\u3092\u8aad\u3080\u3053\u3068\u306a\u304f\u5f53\u8a72\u30d6\u30ed\u30c3\u30af\u306bMVCC\u4e0d\u53ef\u8996\u306a\u30ec\u30b3\u30fc\u30c9\u304c\u5b58\u5728\u3059\u308b\u304b\u5426\u304b\u3092\u5224\u5b9a\u3059\u308b\u4e8b\u3092\u53ef\u80fd\u3068\u3059\u308b\u3082\u306e\u3067\u3059\u3002 GPU\u30c0\u30a4\u30ec\u30af\u30c8SQL\u5b9f\u884c\u306f\u3053\u306e\u30a4\u30f3\u30d5\u30e9\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u3064\u307e\u308a\u3001Visibility Map\u304c\u30bb\u30c3\u30c8\u3055\u308c\u3066\u304a\u308a\u3001\"all-visible\"\u3067\u3042\u308b\u30d6\u30ed\u30c3\u30af\u3060\u3051\u304cP2P DMA\u3067\u8aad\u307f\u51fa\u3059\u3088\u3046\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u9001\u51fa\u3055\u308c\u307e\u3059\u3002 Visibility Map\u306fVACUUM\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u4f5c\u6210\u3055\u308c\u308b\u305f\u3081\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u660e\u793a\u7684\u306bVACUUM\u3092\u5b9f\u884c\u3059\u308b\u4e8b\u3067\u5f37\u5236\u7684\u306bVisibility Map\u3092\u69cb\u7bc9\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 VACUUM ANALYZE linerorder;","title":"Visibility Map\u306b\u95a2\u3059\u308b\u6ce8\u610f\u4e8b\u9805"},{"location":"troubles/","text":"\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0 \u554f\u984c\u306e\u5207\u308a\u5206\u3051 \u7279\u5b9a\u306e\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u5b9f\u884c\u3057\u305f\u969b\u306b\u4f55\u304c\u3057\u304b\u306e\u554f\u984c\u304c\u767a\u751f\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u305d\u308c\u304c\u4f55\u306b\u8d77\u56e0\u3059\u308b\u3082\u306e\u3067\u3042\u308b\u306e\u304b\u3092\u7279\u5b9a\u3059\u308b\u306e\u306f\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u7b2c\u4e00\u6b69\u3067\u3059\u3002 \u6b8b\u5ff5\u306a\u304c\u3089\u3001PostgreSQL\u958b\u767a\u8005\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u3068\u6bd4\u3079PG-Strom\u306e\u958b\u767a\u8005\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u306f\u975e\u5e38\u306b\u5c11\u306a\u3044\u6570\u306e\u958b\u767a\u8005\u306b\u3088\u3063\u3066\u652f\u3048\u3089\u308c\u3066\u3044\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u54c1\u8cea\u3084\u5b9f\u7e3e\u3068\u3044\u3063\u305f\u89b3\u70b9\u304b\u3089\u3001\u307e\u305aPG-Strom\u304c\u60aa\u3055\u3092\u3057\u3066\u3044\u306a\u3044\u304b\u7591\u3046\u306e\u306f\u59a5\u5f53\u306a\u5224\u65ad\u3067\u3059\u3002 PG-Strom\u306e\u5168\u6a5f\u80fd\u3092\u4e00\u5ea6\u306b\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u306b\u306f pg_strom.enabled \u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u4f7f\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092\u884c\u3046\u4e8b\u3067PG-Strom\u306f\u7121\u52b9\u5316\u3055\u308c\u3001\u6a19\u6e96\u306ePostgreSQL\u3068\u5168\u304f\u540c\u4e00\u306e\u72b6\u614b\u3068\u306a\u308a\u307e\u3059\u3002 \u305d\u308c\u3067\u3082\u306a\u304a\u554f\u984c\u304c\u518d\u73fe\u3059\u308b\u304b\u3069\u3046\u304b\u306f\u4e00\u3064\u306e\u5224\u65ad\u6750\u6599\u3068\u306a\u308b\u3067\u3057\u3087\u3046\u3002 # SET pg_strom.enabled = off; \u3053\u306e\u4ed6\u306b\u3082\u3001GpuScan\u3001GpuJoin\u3001GpuPreAgg\u3068\u3044\u3063\u305f\u7279\u5b9a\u306e\u5b9f\u884c\u8a08\u753b\u306e\u307f\u3092\u7121\u52b9\u5316\u3059\u308b\u30d1\u30e9\u30e1\u30fc\u30bf\u3082\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u8a73\u7d30\u306f \u30ea\u30d5\u30a1\u30ec\u30f3\u30b9/GPU\u30d1\u30e9\u30e1\u30fc\u30bf \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u306e\u63a1\u53d6 \u30b7\u30b9\u30c6\u30e0\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u3092\u5f15\u304d\u8d77\u3053\u3059\u3088\u3046\u306a\u91cd\u5927\u306a\u30c8\u30e9\u30d6\u30eb\u306e\u89e3\u6790\u306b\u306f\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u306e\u63a1\u53d6\u304c\u6b20\u304b\u305b\u307e\u305b\u3093\u3002 \u672c\u7bc0\u3067\u306f\u3001PostgreSQL\u3068PG-Strom\u30d7\u30ed\u30bb\u30b9\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7(CPU\u5074)\u3001\u304a\u3088\u3073PG-Strom\u306eGPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7(GPU\u5074)\u3092\u53d6\u5f97\u3057\u3001\u969c\u5bb3\u767a\u751f\u6642\u306e\u30d0\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u3092\u63a1\u53d6\u3059\u308b\u305f\u3081\u306e\u624b\u6bb5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002 PostgreSQL\u8d77\u52d5\u6642\u8a2d\u5b9a\u306e\u8ffd\u52a0 \u30d7\u30ed\u30bb\u30b9\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u6642\u306b\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7(CPU\u5074)\u3092\u751f\u6210\u3059\u308b\u306b\u306f\u3001PostgreSQL\u30b5\u30fc\u30d0\u30d7\u30ed\u30bb\u30b9\u304c\u751f\u6210\u3059\u308b\u4e8b\u306e\u3067\u304d\u308b core \u30d5\u30a1\u30a4\u30eb\u306e\u30b5\u30a4\u30ba\u3092\u7121\u5236\u9650\u306b\u5909\u66f4\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306fPostgreSQL\u30b5\u30fc\u30d0\u30d7\u30ed\u30bb\u30b9\u3092\u8d77\u52d5\u3059\u308b\u30b7\u30a7\u30eb\u4e0a\u3067 ulimit -c \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u5909\u66f4\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 GPU\u30ab\u30fc\u30cd\u30eb\u306e\u30a8\u30e9\u30fc\u6642\u306b\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7(GPU\u5074)\u3092\u751f\u6210\u3059\u308b\u306b\u306f\u3001PostgreSQL\u30b5\u30fc\u30d0\u30d7\u30ed\u30bb\u30b9\u304c\u74b0\u5883\u5909\u6570 CUDA_ENABLE_COREDUMP_ON_EXCEPTION \u306b 1 \u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 systemd\u304b\u3089PostgreSQL\u3092\u8d77\u52d5\u3059\u308b\u5834\u5408\u3001 /etc/systemd/system/postgresql-.service.d/ \u4ee5\u4e0b\u306b\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001\u3053\u308c\u3089\u306e\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 RPM\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u5185\u5bb9\u306e pg_strom.conf \u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002 [Service] LimitNOFILE=65536 LimitCORE=infinity #Environment=CUDA_ENABLE_COREDUMP_ON_EXCEPTION=1 CUDA9.1\u306b\u304a\u3044\u3066\u306f\u3001\u901a\u5e38\u3001GPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u306e\u751f\u6210\u306b\u306f\u6570\u5206\u4ee5\u4e0a\u306e\u6642\u9593\u3092\u8981\u3057\u3001\u305d\u306e\u9593\u3001\u30a8\u30e9\u30fc\u3092\u767a\u751f\u3057\u305fPostgreSQL\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u5fdc\u7b54\u306f\u5b8c\u5168\u306b\u505c\u6b62\u3057\u3066\u3057\u307e\u3057\u307e\u3059\u3002 \u305d\u306e\u305f\u3081\u3001\u306f\u7279\u5b9a\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u306b\u304a\u3044\u3066\u767a\u751f\u3059\u308bGPU\u30ab\u30fc\u30cd\u30eb\u306b\u8d77\u56e0\u3059\u308b\u30a8\u30e9\u30fc\u306e\u539f\u56e0\u8abf\u67fb\u3092\u884c\u3046\u5834\u5408\u306b\u3060\u3051\u3001 CUDA_ENABLE_COREDUMP_ON_EXCEPTION \u74b0\u5883\u5909\u6570\u3092\u8a2d\u5b9a\u3059\u308b\u4e8b\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002 RPM\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u304a\u3051\u308b\u30c7\u30d5\u30a9\u30eb\u30c8\u8a2d\u5b9a\u306f\u3001 CUDA_ENABLE_COREDUMP_ON_EXCEPTION \u74b0\u5883\u5909\u6570\u306e\u884c\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066\u3044\u307e\u3059\u3002 PostgreSQL\u30b5\u30fc\u30d0\u30d7\u30ed\u30bb\u30b9\u3092\u518d\u8d77\u52d5\u3059\u308b\u3068\u3001 Max core file size \u304cunlimited\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u306f\u305a\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u78ba\u8a8d\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 # cat /proc//limits Limit Soft Limit Hard Limit Units : : : : Max core file size unlimited unlimited bytes : : : : debuginfo\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u304b\u3089\u610f\u5473\u306e\u3042\u308b\u60c5\u5831\u3092\u8aad\u307f\u53d6\u308b\u306b\u306f\u30b7\u30f3\u30dc\u30eb\u60c5\u5831\u304c\u5fc5\u8981\u3067\u3059\u3002 \u3053\u308c\u3089\u306f -debuginfo \u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u683c\u7d0d\u3055\u308c\u3066\u304a\u308a\u3001\u30b7\u30b9\u30c6\u30e0\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308bPostgreSQL\u304a\u3088\u3073PG-Strom\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u5fdc\u3058\u3066\u305d\u308c\u305e\u308c\u8ffd\u52a0\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u3002 # yum install postgresql10-debuginfo pg_strom-PG10-debuginfo : ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: pg_strom-PG10-debuginfo x86_64 1.9-180301.el7 heterodb-debuginfo 766 k postgresql10-debuginfo x86_64 10.3-1PGDG.rhel7 pgdg10 9.7 M Transaction Summary ================================================================================ Install 2 Packages : Installed: pg_strom-PG10-debuginfo.x86_64 0:1.9-180301.el7 postgresql10-debuginfo.x86_64 0:10.3-1PGDG.rhel7 Complete! CPU\u5074\u30d0\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u306e\u78ba\u8a8d \u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u306e\u4f5c\u6210\u3055\u308c\u308b\u30d1\u30b9\u306f\u3001\u30ab\u30fc\u30cd\u30eb\u30d1\u30e9\u30e1\u30fc\u30bf kernel.core_pattern \u304a\u3088\u3073 kernel.core_uses_pid \u306e\u5024\u306b\u3088\u3063\u3066\u6c7a\u307e\u308a\u307e\u3059\u3002 \u901a\u5e38\u306f\u30d7\u30ed\u30bb\u30b9\u306e\u30ab\u30ec\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u4f5c\u6210\u3055\u308c\u307e\u3059\u306e\u3067\u3001systemd\u304b\u3089PostgreSQL\u3092\u8d77\u52d5\u3057\u305f\u5834\u5408\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u304c\u69cb\u7bc9\u3055\u308c\u308b /var/lib/pgdata \u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 core. \u30d5\u30a1\u30a4\u30eb\u304c\u751f\u6210\u3055\u308c\u3066\u3044\u308b\u306e\u3092\u78ba\u8a8d\u3057\u305f\u3089\u3001 gdb \u3092\u7528\u3044\u3066\u30af\u30e9\u30c3\u30b7\u30e5\u306b\u81f3\u308b\u30d0\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002 gdb \u306e -c \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u30b3\u30a2\u30d5\u30a1\u30a4\u30eb\u3092\u3001 -f \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u30af\u30e9\u30c3\u30b7\u30e5\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 # gdb -c /var/lib/pgdata/core.134680 -f /usr/pgsql-10/bin/postgres GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-100.el7_4.1 : (gdb) bt #0 0x00007fb942af3903 in __epoll_wait_nocancel () from /lib64/libc.so.6 #1 0x00000000006f71ae in WaitEventSetWaitBlock (nevents=1, occurred_events=0x7ffee51e1d70, cur_timeout=-1, set=0x2833298) at latch.c:1048 #2 WaitEventSetWait (set=0x2833298, timeout=timeout@entry-1, occurred_events=occurred_events@entry0x7ffee51e1d70, nevents=nevents@entry1, wait_event_info=wait_event_info@entry100663296) at latch.c:1000 #3 0x00000000006210fb in secure_read (port=0x2876120, ptr=0xcaa7e0 , len=8192) at be-secure.c:166 #4 0x000000000062b6e8 in pq_recvbuf () at pqcomm.c:963 #5 0x000000000062c345 in pq_getbyte () at pqcomm.c:1006 #6 0x0000000000718682 in SocketBackend (inBuf=0x7ffee51e1ef0) at postgres.c:328 #7 ReadCommand (inBuf=0x7ffee51e1ef0) at postgres.c:501 #8 PostgresMain (argc=, argv=argv@entry0x287bb68, dbname=0x28333f8 \"postgres\", username=) at postgres.c:4030 #9 0x000000000047adbc in BackendRun (port=0x2876120) at postmaster.c:4405 #10 BackendStartup (port=0x2876120) at postmaster.c:4077 #11 ServerLoop () at postmaster.c:1755 #12 0x00000000006afb7f in PostmasterMain (argc=argc@entry3, argv=argv@entry0x2831280) at postmaster.c:1363 #13 0x000000000047bbef in main (argc=3, argv=0x2831280) at main.c:228 gdb\u306e bt \u30b3\u30de\u30f3\u30c9\u3067\u30d0\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002 \u3053\u306e\u30b1\u30fc\u30b9\u3067\u306f\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u306e\u30af\u30a8\u30ea\u3092\u5f85\u3063\u3066\u3044\u308b\u72b6\u614b\u306ePostgreSQL\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306b SIGSEGV \u30b7\u30b0\u30ca\u30eb\u3092\u9001\u51fa\u3057\u3066\u30af\u30e9\u30c3\u30b7\u30e5\u3092\u5f15\u304d\u8d77\u3053\u3057\u305f\u305f\u3081\u3001 WaitEventSetWait \u5ef6\u9577\u4e0a\u306e __epoll_wait_nocancel \u3067\u30d7\u30ed\u30bb\u30b9\u304c\u30af\u30e9\u30c3\u30b7\u30e5\u3057\u3066\u3044\u308b\u4e8b\u304c\u308f\u304b\u308a\u307e\u3059\u3002 GPU\u5074\u30d0\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u306e\u78ba\u8a8d GPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u306f\u3001\uff08 CUDA_COREDUMP_FILE \u74b0\u5883\u5909\u6570\u3092\u7528\u3044\u3066\u660e\u793a\u7684\u306b\u6307\u5b9a\u3057\u306a\u3051\u308c\u3070\uff09PostgreSQL\u30b5\u30fc\u30d0\u30d7\u30ed\u30bb\u30b9\u306e\u30ab\u30ec\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u751f\u6210\u3055\u308c\u307e\u3059\u3002 systemd\u304b\u3089PostgreSQL\u3092\u8d77\u52d5\u3057\u305f\u5834\u5408\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u304c\u69cb\u7bc9\u3055\u308c\u308b /var/lib/pgdata \u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u4ee5\u4e0b\u306e\u540d\u524d\u3067GPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u304c\u751f\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002 core___.nvcudmp \u306a\u304a\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u8a2d\u5b9a\u3067\u306fGPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u306b\u306f\u30b7\u30f3\u30dc\u30eb\u60c5\u5831\u306a\u3069\u306e\u30c7\u30d0\u30c3\u30b0\u60c5\u5831\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u3053\u306e\u72b6\u614b\u3067\u306f\u969c\u5bb3\u89e3\u6790\u3092\u884c\u3046\u4e8b\u306f\u307b\u3068\u3093\u3069\u4e0d\u53ef\u80fd\u3067\u3059\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092\u884c\u3063\u3066PG-Strom\u304c\u751f\u6210\u3059\u308bGPU\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u30c7\u30d0\u30c3\u30b0\u60c5\u5831\u3092\u542b\u3081\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u305f\u3060\u3057\u3001\u3053\u306e\u8a2d\u5b9a\u306f\u5b9f\u884c\u6642\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u4f4e\u4e0b\u3055\u305b\u308b\u305f\u3081\u3001\u6052\u5e38\u7684\u306a\u4f7f\u7528\u306f\u975e\u63a8\u5968\u3067\u3059\u3002 \u30c8\u30e9\u30d6\u30eb\u89e3\u6790\u6642\u306b\u3060\u3051\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 nvme=# set pg_strom.debug_jit_compile_options = on; SET \u751f\u6210\u3055\u308c\u305fGPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306f cuda-gdb \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 # /usr/local/cuda/bin/cuda-gdb NVIDIA (R) CUDA Debugger 9.1 release Portions Copyright (C) 2007-2017 NVIDIA Corporation : For help, type \"help\". Type \"apropos word\" to search for commands related to \"word\". (cuda-gdb) \u5f15\u6570\u306a\u3057\u3067 cuda-gdb \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3001\u30d7\u30ed\u30f3\u30d7\u30c8\u4e0a\u3067 target \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u5148\u307b\u3069\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002 (cuda-gdb) target cudacore /var/lib/pgdata/core_1521131828_magro.heterodb.com_216238.nvcudmp Opening GPU coredump: /var/lib/pgdata/core_1521131828_magro.heterodb.com_216238.nvcudmp [New Thread 216240] CUDA Exception: Warp Illegal Address The exception was triggered at PC 0x7ff4dc82f930 (cuda_gpujoin.h:1159) [Current focus set to CUDA kernel 0, grid 1, block (0,0,0), thread (0,0,0), device 0, sm 0, warp 0, lane 0] #0 0x00007ff4dc82f938 in _INTERNAL_8_pg_strom_0124cb94::gpujoin_exec_hashjoin (kcxt=0x7ff4f7fffbf8, kgjoin=0x7fe9f4800078, kmrels=0x7fe9f8800000, kds_src=0x7fe9f0800030, depth=3, rd_stack=0x7fe9f4806118, wr_stack=0x7fe9f480c118, l_state=0x7ff4f7fffc48, matched=0x7ff4f7fffc7c \"\") at /usr/pgsql-10/share/extension/cuda_gpujoin.h:1159 1159 while (khitem && khitem->hash != hash_value) \u3053\u306e\u72b6\u614b\u3067 bt \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3001\u554f\u984c\u767a\u751f\u500b\u6240\u3078\u306e\u30d0\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u3092\u63a1\u53d6\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 (cuda-gdb) bt #0 0x00007ff4dc82f938 in _INTERNAL_8_pg_strom_0124cb94::gpujoin_exec_hashjoin (kcxt=0x7ff4f7fffbf8, kgjoin=0x7fe9f4800078, kmrels=0x7fe9f8800000, kds_src=0x7fe9f0800030, depth=3, rd_stack=0x7fe9f4806118, wr_stack=0x7fe9f480c118, l_state=0x7ff4f7fffc48, matched=0x7ff4f7fffc7c \"\") at /usr/pgsql-10/share/extension/cuda_gpujoin.h:1159 #1 0x00007ff4dc9428f0 in gpujoin_main<<<(30,1,1),(256,1,1)>>> (kgjoin=0x7fe9f4800078, kmrels=0x7fe9f8800000, kds_src=0x7fe9f0800030, kds_dst=0x7fe9e8800030, kparams_gpreagg=0x0) at /usr/pgsql-10/share/extension/cuda_gpujoin.h:1347 \u3088\u308a\u8a73\u7d30\u306a cuda-gdb \u30b3\u30de\u30f3\u30c9\u306e\u5229\u7528\u6cd5\u306f CUDA Toolkit Documentation - CUDA-GDB \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002","title":"\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0"},{"location":"troubles/#_1","text":"","title":"\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0"},{"location":"troubles/#_2","text":"\u7279\u5b9a\u306e\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u3092\u5b9f\u884c\u3057\u305f\u969b\u306b\u4f55\u304c\u3057\u304b\u306e\u554f\u984c\u304c\u767a\u751f\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u305d\u308c\u304c\u4f55\u306b\u8d77\u56e0\u3059\u308b\u3082\u306e\u3067\u3042\u308b\u306e\u304b\u3092\u7279\u5b9a\u3059\u308b\u306e\u306f\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u7b2c\u4e00\u6b69\u3067\u3059\u3002 \u6b8b\u5ff5\u306a\u304c\u3089\u3001PostgreSQL\u958b\u767a\u8005\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u3068\u6bd4\u3079PG-Strom\u306e\u958b\u767a\u8005\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u306f\u975e\u5e38\u306b\u5c11\u306a\u3044\u6570\u306e\u958b\u767a\u8005\u306b\u3088\u3063\u3066\u652f\u3048\u3089\u308c\u3066\u3044\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u54c1\u8cea\u3084\u5b9f\u7e3e\u3068\u3044\u3063\u305f\u89b3\u70b9\u304b\u3089\u3001\u307e\u305aPG-Strom\u304c\u60aa\u3055\u3092\u3057\u3066\u3044\u306a\u3044\u304b\u7591\u3046\u306e\u306f\u59a5\u5f53\u306a\u5224\u65ad\u3067\u3059\u3002 PG-Strom\u306e\u5168\u6a5f\u80fd\u3092\u4e00\u5ea6\u306b\u6709\u52b9\u5316/\u7121\u52b9\u5316\u3059\u308b\u306b\u306f pg_strom.enabled \u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u4f7f\u7528\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092\u884c\u3046\u4e8b\u3067PG-Strom\u306f\u7121\u52b9\u5316\u3055\u308c\u3001\u6a19\u6e96\u306ePostgreSQL\u3068\u5168\u304f\u540c\u4e00\u306e\u72b6\u614b\u3068\u306a\u308a\u307e\u3059\u3002 \u305d\u308c\u3067\u3082\u306a\u304a\u554f\u984c\u304c\u518d\u73fe\u3059\u308b\u304b\u3069\u3046\u304b\u306f\u4e00\u3064\u306e\u5224\u65ad\u6750\u6599\u3068\u306a\u308b\u3067\u3057\u3087\u3046\u3002 # SET pg_strom.enabled = off; \u3053\u306e\u4ed6\u306b\u3082\u3001GpuScan\u3001GpuJoin\u3001GpuPreAgg\u3068\u3044\u3063\u305f\u7279\u5b9a\u306e\u5b9f\u884c\u8a08\u753b\u306e\u307f\u3092\u7121\u52b9\u5316\u3059\u308b\u30d1\u30e9\u30e1\u30fc\u30bf\u3082\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u8a73\u7d30\u306f \u30ea\u30d5\u30a1\u30ec\u30f3\u30b9/GPU\u30d1\u30e9\u30e1\u30fc\u30bf \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002","title":"\u554f\u984c\u306e\u5207\u308a\u5206\u3051"},{"location":"troubles/#_3","text":"\u30b7\u30b9\u30c6\u30e0\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u3092\u5f15\u304d\u8d77\u3053\u3059\u3088\u3046\u306a\u91cd\u5927\u306a\u30c8\u30e9\u30d6\u30eb\u306e\u89e3\u6790\u306b\u306f\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u306e\u63a1\u53d6\u304c\u6b20\u304b\u305b\u307e\u305b\u3093\u3002 \u672c\u7bc0\u3067\u306f\u3001PostgreSQL\u3068PG-Strom\u30d7\u30ed\u30bb\u30b9\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7(CPU\u5074)\u3001\u304a\u3088\u3073PG-Strom\u306eGPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7(GPU\u5074)\u3092\u53d6\u5f97\u3057\u3001\u969c\u5bb3\u767a\u751f\u6642\u306e\u30d0\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u3092\u63a1\u53d6\u3059\u308b\u305f\u3081\u306e\u624b\u6bb5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002","title":"\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u306e\u63a1\u53d6"},{"location":"troubles/#postgresql","text":"\u30d7\u30ed\u30bb\u30b9\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u6642\u306b\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7(CPU\u5074)\u3092\u751f\u6210\u3059\u308b\u306b\u306f\u3001PostgreSQL\u30b5\u30fc\u30d0\u30d7\u30ed\u30bb\u30b9\u304c\u751f\u6210\u3059\u308b\u4e8b\u306e\u3067\u304d\u308b core \u30d5\u30a1\u30a4\u30eb\u306e\u30b5\u30a4\u30ba\u3092\u7121\u5236\u9650\u306b\u5909\u66f4\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306fPostgreSQL\u30b5\u30fc\u30d0\u30d7\u30ed\u30bb\u30b9\u3092\u8d77\u52d5\u3059\u308b\u30b7\u30a7\u30eb\u4e0a\u3067 ulimit -c \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u5909\u66f4\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 GPU\u30ab\u30fc\u30cd\u30eb\u306e\u30a8\u30e9\u30fc\u6642\u306b\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7(GPU\u5074)\u3092\u751f\u6210\u3059\u308b\u306b\u306f\u3001PostgreSQL\u30b5\u30fc\u30d0\u30d7\u30ed\u30bb\u30b9\u304c\u74b0\u5883\u5909\u6570 CUDA_ENABLE_COREDUMP_ON_EXCEPTION \u306b 1 \u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 systemd\u304b\u3089PostgreSQL\u3092\u8d77\u52d5\u3059\u308b\u5834\u5408\u3001 /etc/systemd/system/postgresql-.service.d/ \u4ee5\u4e0b\u306b\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001\u3053\u308c\u3089\u306e\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 RPM\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u5185\u5bb9\u306e pg_strom.conf \u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002 [Service] LimitNOFILE=65536 LimitCORE=infinity #Environment=CUDA_ENABLE_COREDUMP_ON_EXCEPTION=1 CUDA9.1\u306b\u304a\u3044\u3066\u306f\u3001\u901a\u5e38\u3001GPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u306e\u751f\u6210\u306b\u306f\u6570\u5206\u4ee5\u4e0a\u306e\u6642\u9593\u3092\u8981\u3057\u3001\u305d\u306e\u9593\u3001\u30a8\u30e9\u30fc\u3092\u767a\u751f\u3057\u305fPostgreSQL\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u5fdc\u7b54\u306f\u5b8c\u5168\u306b\u505c\u6b62\u3057\u3066\u3057\u307e\u3057\u307e\u3059\u3002 \u305d\u306e\u305f\u3081\u3001\u306f\u7279\u5b9a\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u306b\u304a\u3044\u3066\u767a\u751f\u3059\u308bGPU\u30ab\u30fc\u30cd\u30eb\u306b\u8d77\u56e0\u3059\u308b\u30a8\u30e9\u30fc\u306e\u539f\u56e0\u8abf\u67fb\u3092\u884c\u3046\u5834\u5408\u306b\u3060\u3051\u3001 CUDA_ENABLE_COREDUMP_ON_EXCEPTION \u74b0\u5883\u5909\u6570\u3092\u8a2d\u5b9a\u3059\u308b\u4e8b\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002 RPM\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u304a\u3051\u308b\u30c7\u30d5\u30a9\u30eb\u30c8\u8a2d\u5b9a\u306f\u3001 CUDA_ENABLE_COREDUMP_ON_EXCEPTION \u74b0\u5883\u5909\u6570\u306e\u884c\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066\u3044\u307e\u3059\u3002 PostgreSQL\u30b5\u30fc\u30d0\u30d7\u30ed\u30bb\u30b9\u3092\u518d\u8d77\u52d5\u3059\u308b\u3068\u3001 Max core file size \u304cunlimited\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u306f\u305a\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u78ba\u8a8d\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 # cat /proc//limits Limit Soft Limit Hard Limit Units : : : : Max core file size unlimited unlimited bytes : : : :","title":"PostgreSQL\u8d77\u52d5\u6642\u8a2d\u5b9a\u306e\u8ffd\u52a0"},{"location":"troubles/#debuginfo","text":"\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u304b\u3089\u610f\u5473\u306e\u3042\u308b\u60c5\u5831\u3092\u8aad\u307f\u53d6\u308b\u306b\u306f\u30b7\u30f3\u30dc\u30eb\u60c5\u5831\u304c\u5fc5\u8981\u3067\u3059\u3002 \u3053\u308c\u3089\u306f -debuginfo \u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u683c\u7d0d\u3055\u308c\u3066\u304a\u308a\u3001\u30b7\u30b9\u30c6\u30e0\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308bPostgreSQL\u304a\u3088\u3073PG-Strom\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u5fdc\u3058\u3066\u305d\u308c\u305e\u308c\u8ffd\u52a0\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u3002 # yum install postgresql10-debuginfo pg_strom-PG10-debuginfo : ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: pg_strom-PG10-debuginfo x86_64 1.9-180301.el7 heterodb-debuginfo 766 k postgresql10-debuginfo x86_64 10.3-1PGDG.rhel7 pgdg10 9.7 M Transaction Summary ================================================================================ Install 2 Packages : Installed: pg_strom-PG10-debuginfo.x86_64 0:1.9-180301.el7 postgresql10-debuginfo.x86_64 0:10.3-1PGDG.rhel7 Complete!","title":"debuginfo\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},{"location":"troubles/#cpu","text":"\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u306e\u4f5c\u6210\u3055\u308c\u308b\u30d1\u30b9\u306f\u3001\u30ab\u30fc\u30cd\u30eb\u30d1\u30e9\u30e1\u30fc\u30bf kernel.core_pattern \u304a\u3088\u3073 kernel.core_uses_pid \u306e\u5024\u306b\u3088\u3063\u3066\u6c7a\u307e\u308a\u307e\u3059\u3002 \u901a\u5e38\u306f\u30d7\u30ed\u30bb\u30b9\u306e\u30ab\u30ec\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u4f5c\u6210\u3055\u308c\u307e\u3059\u306e\u3067\u3001systemd\u304b\u3089PostgreSQL\u3092\u8d77\u52d5\u3057\u305f\u5834\u5408\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u304c\u69cb\u7bc9\u3055\u308c\u308b /var/lib/pgdata \u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002 core. \u30d5\u30a1\u30a4\u30eb\u304c\u751f\u6210\u3055\u308c\u3066\u3044\u308b\u306e\u3092\u78ba\u8a8d\u3057\u305f\u3089\u3001 gdb \u3092\u7528\u3044\u3066\u30af\u30e9\u30c3\u30b7\u30e5\u306b\u81f3\u308b\u30d0\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002 gdb \u306e -c \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u30b3\u30a2\u30d5\u30a1\u30a4\u30eb\u3092\u3001 -f \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u30af\u30e9\u30c3\u30b7\u30e5\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 # gdb -c /var/lib/pgdata/core.134680 -f /usr/pgsql-10/bin/postgres GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-100.el7_4.1 : (gdb) bt #0 0x00007fb942af3903 in __epoll_wait_nocancel () from /lib64/libc.so.6 #1 0x00000000006f71ae in WaitEventSetWaitBlock (nevents=1, occurred_events=0x7ffee51e1d70, cur_timeout=-1, set=0x2833298) at latch.c:1048 #2 WaitEventSetWait (set=0x2833298, timeout=timeout@entry-1, occurred_events=occurred_events@entry0x7ffee51e1d70, nevents=nevents@entry1, wait_event_info=wait_event_info@entry100663296) at latch.c:1000 #3 0x00000000006210fb in secure_read (port=0x2876120, ptr=0xcaa7e0 , len=8192) at be-secure.c:166 #4 0x000000000062b6e8 in pq_recvbuf () at pqcomm.c:963 #5 0x000000000062c345 in pq_getbyte () at pqcomm.c:1006 #6 0x0000000000718682 in SocketBackend (inBuf=0x7ffee51e1ef0) at postgres.c:328 #7 ReadCommand (inBuf=0x7ffee51e1ef0) at postgres.c:501 #8 PostgresMain (argc=, argv=argv@entry0x287bb68, dbname=0x28333f8 \"postgres\", username=) at postgres.c:4030 #9 0x000000000047adbc in BackendRun (port=0x2876120) at postmaster.c:4405 #10 BackendStartup (port=0x2876120) at postmaster.c:4077 #11 ServerLoop () at postmaster.c:1755 #12 0x00000000006afb7f in PostmasterMain (argc=argc@entry3, argv=argv@entry0x2831280) at postmaster.c:1363 #13 0x000000000047bbef in main (argc=3, argv=0x2831280) at main.c:228 gdb\u306e bt \u30b3\u30de\u30f3\u30c9\u3067\u30d0\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002 \u3053\u306e\u30b1\u30fc\u30b9\u3067\u306f\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u306e\u30af\u30a8\u30ea\u3092\u5f85\u3063\u3066\u3044\u308b\u72b6\u614b\u306ePostgreSQL\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306b SIGSEGV \u30b7\u30b0\u30ca\u30eb\u3092\u9001\u51fa\u3057\u3066\u30af\u30e9\u30c3\u30b7\u30e5\u3092\u5f15\u304d\u8d77\u3053\u3057\u305f\u305f\u3081\u3001 WaitEventSetWait \u5ef6\u9577\u4e0a\u306e __epoll_wait_nocancel \u3067\u30d7\u30ed\u30bb\u30b9\u304c\u30af\u30e9\u30c3\u30b7\u30e5\u3057\u3066\u3044\u308b\u4e8b\u304c\u308f\u304b\u308a\u307e\u3059\u3002","title":"CPU\u5074\u30d0\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u306e\u78ba\u8a8d"},{"location":"troubles/#gpu","text":"GPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u306f\u3001\uff08 CUDA_COREDUMP_FILE \u74b0\u5883\u5909\u6570\u3092\u7528\u3044\u3066\u660e\u793a\u7684\u306b\u6307\u5b9a\u3057\u306a\u3051\u308c\u3070\uff09PostgreSQL\u30b5\u30fc\u30d0\u30d7\u30ed\u30bb\u30b9\u306e\u30ab\u30ec\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u751f\u6210\u3055\u308c\u307e\u3059\u3002 systemd\u304b\u3089PostgreSQL\u3092\u8d77\u52d5\u3057\u305f\u5834\u5408\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30af\u30e9\u30b9\u30bf\u304c\u69cb\u7bc9\u3055\u308c\u308b /var/lib/pgdata \u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u4ee5\u4e0b\u306e\u540d\u524d\u3067GPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u304c\u751f\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002 core___.nvcudmp \u306a\u304a\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u8a2d\u5b9a\u3067\u306fGPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u306b\u306f\u30b7\u30f3\u30dc\u30eb\u60c5\u5831\u306a\u3069\u306e\u30c7\u30d0\u30c3\u30b0\u60c5\u5831\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u3053\u306e\u72b6\u614b\u3067\u306f\u969c\u5bb3\u89e3\u6790\u3092\u884c\u3046\u4e8b\u306f\u307b\u3068\u3093\u3069\u4e0d\u53ef\u80fd\u3067\u3059\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3092\u884c\u3063\u3066PG-Strom\u304c\u751f\u6210\u3059\u308bGPU\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u30c7\u30d0\u30c3\u30b0\u60c5\u5831\u3092\u542b\u3081\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u305f\u3060\u3057\u3001\u3053\u306e\u8a2d\u5b9a\u306f\u5b9f\u884c\u6642\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u4f4e\u4e0b\u3055\u305b\u308b\u305f\u3081\u3001\u6052\u5e38\u7684\u306a\u4f7f\u7528\u306f\u975e\u63a8\u5968\u3067\u3059\u3002 \u30c8\u30e9\u30d6\u30eb\u89e3\u6790\u6642\u306b\u3060\u3051\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002 nvme=# set pg_strom.debug_jit_compile_options = on; SET \u751f\u6210\u3055\u308c\u305fGPU\u30ab\u30fc\u30cd\u30eb\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306f cuda-gdb \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 # /usr/local/cuda/bin/cuda-gdb NVIDIA (R) CUDA Debugger 9.1 release Portions Copyright (C) 2007-2017 NVIDIA Corporation : For help, type \"help\". Type \"apropos word\" to search for commands related to \"word\". (cuda-gdb) \u5f15\u6570\u306a\u3057\u3067 cuda-gdb \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3001\u30d7\u30ed\u30f3\u30d7\u30c8\u4e0a\u3067 target \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u5148\u307b\u3069\u306e\u30af\u30e9\u30c3\u30b7\u30e5\u30c0\u30f3\u30d7\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002 (cuda-gdb) target cudacore /var/lib/pgdata/core_1521131828_magro.heterodb.com_216238.nvcudmp Opening GPU coredump: /var/lib/pgdata/core_1521131828_magro.heterodb.com_216238.nvcudmp [New Thread 216240] CUDA Exception: Warp Illegal Address The exception was triggered at PC 0x7ff4dc82f930 (cuda_gpujoin.h:1159) [Current focus set to CUDA kernel 0, grid 1, block (0,0,0), thread (0,0,0), device 0, sm 0, warp 0, lane 0] #0 0x00007ff4dc82f938 in _INTERNAL_8_pg_strom_0124cb94::gpujoin_exec_hashjoin (kcxt=0x7ff4f7fffbf8, kgjoin=0x7fe9f4800078, kmrels=0x7fe9f8800000, kds_src=0x7fe9f0800030, depth=3, rd_stack=0x7fe9f4806118, wr_stack=0x7fe9f480c118, l_state=0x7ff4f7fffc48, matched=0x7ff4f7fffc7c \"\") at /usr/pgsql-10/share/extension/cuda_gpujoin.h:1159 1159 while (khitem && khitem->hash != hash_value) \u3053\u306e\u72b6\u614b\u3067 bt \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3001\u554f\u984c\u767a\u751f\u500b\u6240\u3078\u306e\u30d0\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u3092\u63a1\u53d6\u3059\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002 (cuda-gdb) bt #0 0x00007ff4dc82f938 in _INTERNAL_8_pg_strom_0124cb94::gpujoin_exec_hashjoin (kcxt=0x7ff4f7fffbf8, kgjoin=0x7fe9f4800078, kmrels=0x7fe9f8800000, kds_src=0x7fe9f0800030, depth=3, rd_stack=0x7fe9f4806118, wr_stack=0x7fe9f480c118, l_state=0x7ff4f7fffc48, matched=0x7ff4f7fffc7c \"\") at /usr/pgsql-10/share/extension/cuda_gpujoin.h:1159 #1 0x00007ff4dc9428f0 in gpujoin_main<<<(30,1,1),(256,1,1)>>> (kgjoin=0x7fe9f4800078, kmrels=0x7fe9f8800000, kds_src=0x7fe9f0800030, kds_dst=0x7fe9e8800030, kparams_gpreagg=0x0) at /usr/pgsql-10/share/extension/cuda_gpujoin.h:1347 \u3088\u308a\u8a73\u7d30\u306a cuda-gdb \u30b3\u30de\u30f3\u30c9\u306e\u5229\u7528\u6cd5\u306f CUDA Toolkit Documentation - CUDA-GDB \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002","title":"GPU\u5074\u30d0\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u306e\u78ba\u8a8d"}]}
\ No newline at end of file
diff --git a/docs/search/search_index.json b/docs/search/search_index.json
index 83ab2217..2fe48b24 100644
--- a/docs/search/search_index.json
+++ b/docs/search/search_index.json
@@ -1 +1 @@
-{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Home This chapter introduces the overview of PG-Strom, and developer's community. What is PG-Strom? PG-Strom is an extension module of PostgreSQL designed for version 15 or later. By utilization of GPU (Graphic Processor Unit) device which has thousands cores per chip, it enables to accelerate SQL workloads for data analytics or batch processing to big data set. Its core features are GPU code generator that automatically generates GPU program according to the SQL commands and asynchronous parallel execution engine to run SQL workloads on GPU device. The latest version supports SCAN (evaluation of WHERE-clause), JOIN and GROUP BY workloads. In the case when GPU-processing has advantage, PG-Strom replaces the vanilla implementation of PostgreSQL and transparentlly works from users and applications. PG-Strom has two storage options. The first one is the heap storage system of PostgreSQL. It is not always optimal for aggregation / analysis workloads because of its row data format, on the other hands, it has an advantage to run aggregation workloads without data transfer from the transactional database. The other one is Apache Arrow files, that have structured columnar format. Even though it is not suitable for update per row basis, it enables to import large amount of data efficiently, and efficiently search / aggregate the data through foreign data wrapper (FDW). One of the characteristic feature of PG-Strom is GPUDirect SQL that bypasses the CPU/RAM to read the data from NVME / NVME-oF to the GPU directly. SQL processing on the GPU maximizes the bandwidth of these devices. PG-Strom v3.0 newly supports NVIDIA GPUDirect Storage, it allows to support SDS (Software Defined Storage) over the NVME-oF protocol and shared filesystems. The v3.0 newly supports execution of some PostGIS function and GiST index search on the GPU side. Along with the GPU cache, that duplicates the table contents often updated very frequently, it enables search / analysis processing based on the real-time locational information. The v5.0 entirely revised the software architecture design, like update of the process model (multi-process to multi-thread), or switch from the CUDA C++ native code to the portable pseudo code. It improves overall performance and stability. License and Copyright PG-Strom is an open source software distributed under the PostgreSQL License. See LICENSE for the license details. Community Please post your questions, requests and trouble reports to the Discussion of GitHub\u306e . Please pay attention it is a public board for world wide. So, it is your own responsibility not to disclose confidential information. The primary language of the discussion board is English. On the other hands, we know major portion of PG-Strom users are Japanese because of its development history, so we admit to have a discussion on the list in Japanese language. In this case, please don't forget to attach (JP) prefix on the subject like, for non-Japanese speakers to skip messages. Bug or troubles report If you got troubles like incorrect results, system crash / lockup, or something strange behavior, please open a new issue at the PG-Strom Issue Tracker . Please ensure the items below on bug reports. Whether you can reproduce the same problem on the latest revision? Hopefully, we recommend to test on the latest OS, CUDA, PostgreSQL and related software. Whether you can reproduce the same problem if PG-Strom is disabled? GUC option pg_strom.enabled can turn on/off PG-Strom. Is there any known issues on the issue tracker of GitHub? Please don't forget to search closed issues The information below are helpful for bug-reports. Steps to reproduce the problem (Data and Query) Output of EXPLAIN VERBOSE for the queries in trouble. Data structure of the tables involved with \\d+ on psql command. Log messages (verbose messages are more helpful) Status of GUC options you modified from the default configurations. Hardware configuration - GPU model and host RAM size especially. If you are not certain whether the strange behavior on your site is bug or not, please report it to the discussion board prior to the open a new issue ticket. Developers may be able to suggest you next action - like a request for extra information. New features proposition If you have any ideas of new features, please open a new issue with feature tag at the PG-Strom Issue Tracker , then have a discussion with other developers. A preferable design proposal will contain the items below. What is your problem to solve / improve? How much serious is it on your workloads / user case? Way to implement your idea? Expected downside, if any. Once we could make a consensus about its necessity, coordinator will attach accepted tag and the issue ticket is used to track rest of the development. Elsewhere, the issue ticket got rejected tag and closed. Once a proposal got rejected, we may have different decision in the future. If comprehensive circumstance would be changed, you don't need to hesitate revised proposition again. On the development stage, please attach patch file on the issue ticket. We don't use pull request. Support Policy The PG-Strom development team will support the latest release which are distributed from the HeteroDB Software Distribution Center only. So, people who met troubles needs to ensure the problems can be reproduced with the latest release. Please note that it is volunteer based community support policy, so our support is best effort and no SLA definition. If you need commercial support, contact to HeteroDB,Inc (contact@heterodbcom).","title":"Home"},{"location":"#home","text":"This chapter introduces the overview of PG-Strom, and developer's community.","title":"Home"},{"location":"#what-is-pg-strom","text":"PG-Strom is an extension module of PostgreSQL designed for version 15 or later. By utilization of GPU (Graphic Processor Unit) device which has thousands cores per chip, it enables to accelerate SQL workloads for data analytics or batch processing to big data set. Its core features are GPU code generator that automatically generates GPU program according to the SQL commands and asynchronous parallel execution engine to run SQL workloads on GPU device. The latest version supports SCAN (evaluation of WHERE-clause), JOIN and GROUP BY workloads. In the case when GPU-processing has advantage, PG-Strom replaces the vanilla implementation of PostgreSQL and transparentlly works from users and applications. PG-Strom has two storage options. The first one is the heap storage system of PostgreSQL. It is not always optimal for aggregation / analysis workloads because of its row data format, on the other hands, it has an advantage to run aggregation workloads without data transfer from the transactional database. The other one is Apache Arrow files, that have structured columnar format. Even though it is not suitable for update per row basis, it enables to import large amount of data efficiently, and efficiently search / aggregate the data through foreign data wrapper (FDW). One of the characteristic feature of PG-Strom is GPUDirect SQL that bypasses the CPU/RAM to read the data from NVME / NVME-oF to the GPU directly. SQL processing on the GPU maximizes the bandwidth of these devices. PG-Strom v3.0 newly supports NVIDIA GPUDirect Storage, it allows to support SDS (Software Defined Storage) over the NVME-oF protocol and shared filesystems. The v3.0 newly supports execution of some PostGIS function and GiST index search on the GPU side. Along with the GPU cache, that duplicates the table contents often updated very frequently, it enables search / analysis processing based on the real-time locational information. The v5.0 entirely revised the software architecture design, like update of the process model (multi-process to multi-thread), or switch from the CUDA C++ native code to the portable pseudo code. It improves overall performance and stability.","title":"What is PG-Strom?"},{"location":"#license-and-copyright","text":"PG-Strom is an open source software distributed under the PostgreSQL License. See LICENSE for the license details.","title":"License and Copyright"},{"location":"#community","text":"Please post your questions, requests and trouble reports to the Discussion of GitHub\u306e . Please pay attention it is a public board for world wide. So, it is your own responsibility not to disclose confidential information. The primary language of the discussion board is English. On the other hands, we know major portion of PG-Strom users are Japanese because of its development history, so we admit to have a discussion on the list in Japanese language. In this case, please don't forget to attach (JP) prefix on the subject like, for non-Japanese speakers to skip messages.","title":"Community"},{"location":"#bug-or-troubles-report","text":"If you got troubles like incorrect results, system crash / lockup, or something strange behavior, please open a new issue at the PG-Strom Issue Tracker . Please ensure the items below on bug reports. Whether you can reproduce the same problem on the latest revision? Hopefully, we recommend to test on the latest OS, CUDA, PostgreSQL and related software. Whether you can reproduce the same problem if PG-Strom is disabled? GUC option pg_strom.enabled can turn on/off PG-Strom. Is there any known issues on the issue tracker of GitHub? Please don't forget to search closed issues The information below are helpful for bug-reports. Steps to reproduce the problem (Data and Query) Output of EXPLAIN VERBOSE for the queries in trouble. Data structure of the tables involved with \\d+ on psql command. Log messages (verbose messages are more helpful) Status of GUC options you modified from the default configurations. Hardware configuration - GPU model and host RAM size especially. If you are not certain whether the strange behavior on your site is bug or not, please report it to the discussion board prior to the open a new issue ticket. Developers may be able to suggest you next action - like a request for extra information.","title":"Bug or troubles report"},{"location":"#new-features-proposition","text":"If you have any ideas of new features, please open a new issue with feature tag at the PG-Strom Issue Tracker , then have a discussion with other developers. A preferable design proposal will contain the items below. What is your problem to solve / improve? How much serious is it on your workloads / user case? Way to implement your idea? Expected downside, if any. Once we could make a consensus about its necessity, coordinator will attach accepted tag and the issue ticket is used to track rest of the development. Elsewhere, the issue ticket got rejected tag and closed. Once a proposal got rejected, we may have different decision in the future. If comprehensive circumstance would be changed, you don't need to hesitate revised proposition again. On the development stage, please attach patch file on the issue ticket. We don't use pull request.","title":"New features proposition"},{"location":"#support-policy","text":"The PG-Strom development team will support the latest release which are distributed from the HeteroDB Software Distribution Center only. So, people who met troubles needs to ensure the problems can be reproduced with the latest release. Please note that it is volunteer based community support policy, so our support is best effort and no SLA definition. If you need commercial support, contact to HeteroDB,Inc (contact@heterodbcom).","title":"Support Policy"},{"location":"arrow_fdw/","text":"Apache Arrow (Columnar Store) Overview PostgreSQL tables internally consist of 8KB blocks 1 , and block contains tuples which is a data structure of all the attributes and metadata per row. It collocates date of a row closely, so it works effectively for INSERT/UPDATE-major workloads, but not suitable for summarizing or analytics of mass-data. It is not usual to reference all the columns in a table on mass-data processing, and we tend to reference a part of columns in most cases. In this case, the storage I/O bandwidth consumed by unreferenced columns are waste, however, we have no easy way to fetch only particular columns referenced from the row-oriented data structure. In case of column oriented data structure, in an opposite manner, it has extreme disadvantage on INSERT/UPDATE-major workloads, however, it can pull out maximum performance of storage I/O on mass-data processing workloads because it can loads only referenced columns. From the standpoint of processor efficiency also, column-oriented data structure looks like a flat array that pulls out maximum bandwidth of memory subsystem for GPU, by special memory access pattern called Coalesced Memory Access. What is Apache Arrow? Apache Arrow is a data format of structured data to save in columnar-form and to exchange other applications. Some applications for big-data processing support the format, and it is easy for self-developed applications to use Apache Arrow format since they provides libraries for major programming languages like C,C++ or Python. Apache Arrow format file internally contains Schema portion to define data structure, and one or more RecordBatch to save columnar-data based on the schema definition. For data types, it supports integers, strint (variable-length), date/time types and so on. Indivisual columnar data has its internal representation according to the data types. Data representation in Apache Arrow is not identical with the representation in PostgreSQL. For example, epoch of timestamp in Arrow is 1970-01-01 and it supports multiple precision. In contrast, epoch of timestamp in PostgreSQL is 2001-01-01 and it has microseconds accuracy. Arrow_Fdw allows to read Apache Arrow files on PostgreSQL using foreign table mechanism. If an Arrow file contains 8 of record batches that has million items for each column data, for example, we can access 8 million rows on the Arrow files through the foreign table. Operations Creation of foreign tables Usually it takes the 3 steps below to create a foreign table. Define a foreign-data-wrapper using CREATE FOREIGN DATA WRAPPER command Define a foreign server using CREATE SERVER command Define a foreign table using CREATE FOREIGN TABLE command The first 2 steps above are included in the CREATE EXTENSION pg_strom command. All you need to run individually is CREATE FOREIGN TABLE command last. CREATE FOREIGN TABLE flogdata ( ts timestamp, sensor_id int, signal1 smallint, signal2 smallint, signal3 smallint, signal4 smallint, ) SERVER arrow_fdw OPTIONS (file '/path/to/logdata.arrow'); Data type of columns specified by the CREATE FOREIGN TABLE command must be matched to schema definition of the Arrow files to be mapped. Arrow_Fdw also supports a useful manner using IMPORT FOREIGN SCHEMA statement. It automatically generates a foreign table definition using schema definition of the Arrow files. It specifies the foreign table name, schema name to import, and path name of the Arrow files using OPTION-clause. Schema definition of Arrow files contains data types and optional column name for each column. It declares a new foreign table using these information. IMPORT FOREIGN SCHEMA flogdata FROM SERVER arrow_fdw INTO public OPTIONS (file '/path/to/logdata.arrow'); Foreign table options Arrow_Fdw supports the options below. Right now, all the options are for foreign tables. file=PATHNAME It maps an Arrow file specified on the foreign table. files=PATHNAME1[,PATHNAME2...] It maps multiple Arrow files specified by comma (,) separated files list on the foreign table. dir=DIRNAME It maps all the Arrow files in the directory specified on the foreign table. suffix=SUFFIX When dir option is given, it maps only files with the specified suffix, like .arrow` for example. parallel_workers=N_WORKERS It tells the number of workers that should be used to assist a parallel scan of this foreign table; equivalent to parallel_workers storage parameter at normal tables. writable=(true|false) It allows execution of INSERT command on the foreign table. See the section of \"Writable Arrow_Fdw\" Data type mapping Arrow data types are mapped on PostgreSQL data types as follows. Int mapped to either of int1 , int2 , int4 or int8 according to the bitWidth attribute. is_signed attribute shall be ignored. int1 is an enhanced data type by PG-Strom. FloatingPoint mapped to either of float2 , float4 or float8 according to the precision attribute. float2 is an enhanced data type by PG-Strom. Binary mapped to bytea data type Decimal mapped to numeric data type Date mapped to date data type; to be adjusted as if it has unit=Day precision. Time mapped to time data type; to be adjusted as if it has unit=MicroSecond precision. Timestamp mapped to timestamp data type; to be adjusted as if it has unit=MicroSecond precision. Interval mapped to interval data type. List mapped to 1-dimensional array of the element data type. Struct mapped to compatible composite data type; that shall be defined preliminary. FixedSizeBinary mapped to char(n) data type according to the byteWidth attribute. If pg_type=TYPENAME is configured, PG-Strom may assign the configured data type. Right now, inet and macaddr are supported. Union , Map , Duration , LargeBinary , LargeUtf8 , LargeList Right now, PG-Strom cannot map these Arrow data types onto any of PostgreSQL data types. How to read EXPLAIN EXPLAIN command show us information about Arrow files reading. The example below is an output of query execution plan that includes f_lineorder foreign table that mapps an Arrow file of 503GB. =# EXPLAIN SELECT sum(lo_extendedprice*lo_discount) as revenue FROM f_lineorder,date1 WHERE lo_orderdate = d_datekey AND d_year = 1993 AND lo_discount between 1 and 3 AND lo_quantity < 25; QUERY PLAN -------------------------------------------------------------------------------- Aggregate (cost=14535261.08..14535261.09 rows=1 width=8) -> Custom Scan (GpuPreAgg) on f_lineorder (cost=14535261.06..14535261.07 rows=1 width=32) GPU Projection: pgstrom.psum(((f_lineorder.lo_extendedprice * f_lineorder.lo_discount))::bigint) GPU Scan Quals: ((f_lineorder.lo_discount >= 1) AND (f_lineorder.lo_discount <= 3) AND (f_lineorder.lo_quantity < 25)) [rows: 5999990000 -> 9999983] GPU Join Quals [1]: (f_lineorder.lo_orderdate = date1.d_datekey) ... [nrows: 9999983 -> 1428010] GPU Outer Hash [1]: f_lineorder.lo_orderdate GPU Inner Hash [1]: date1.d_datekey referenced: lo_orderdate, lo_quantity, lo_extendedprice, lo_discount file0: /opt/nvme/f_lineorder_s999.arrow (read: 89.41GB, size: 502.92GB) GPU-Direct SQL: enabled (GPU-0) -> Seq Scan on date1 (cost=0.00..78.95 rows=365 width=4) Filter: (d_year = 1993) (12 rows) According to the EXPLAIN output, we can see Custom Scan (GpuPreAgg) scans f_lineorder foreign table. file0 item shows the filename ( /opt/nvme/lineorder_s999.arrow ) on behalf of the foreign table and its size. If multiple files are mapped, any files are individually shown, like file1 , file2 , ... The referenced item shows the list of referenced columns. We can see this query touches lo_orderdate , lo_quantity , lo_extendedprice and lo_discount columns. In addition, GPU-Direct SQL: enabled (GPU-0) shows us the scan on f_lineorder uses GPU-Direct SQL mechanism. VERBOSE option outputs more detailed information. =# EXPLAIN VERBOSE SELECT sum(lo_extendedprice*lo_discount) as revenue FROM f_lineorder,date1 WHERE lo_orderdate = d_datekey AND d_year = 1993 AND lo_discount between 1 and 3 AND lo_quantity < 25; QUERY PLAN -------------------------------------------------------------------------------- Aggregate (cost=14535261.08..14535261.09 rows=1 width=8) Output: pgstrom.sum_int((pgstrom.psum(((f_lineorder.lo_extendedprice * f_lineorder.lo_discount))::bigint))) -> Custom Scan (GpuPreAgg) on public.f_lineorder (cost=14535261.06..14535261.07 rows=1 width=32) Output: (pgstrom.psum(((f_lineorder.lo_extendedprice * f_lineorder.lo_discount))::bigint)) GPU Projection: pgstrom.psum(((f_lineorder.lo_extendedprice * f_lineorder.lo_discount))::bigint) GPU Scan Quals: ((f_lineorder.lo_discount >= 1) AND (f_lineorder.lo_discount <= 3) AND (f_lineorder.lo_quantity < 25)) [rows: 5999990000 -> 9999983] GPU Join Quals [1]: (f_lineorder.lo_orderdate = date1.d_datekey) ... [nrows: 9999983 -> 1428010] GPU Outer Hash [1]: f_lineorder.lo_orderdate GPU Inner Hash [1]: date1.d_datekey referenced: lo_orderdate, lo_quantity, lo_extendedprice, lo_discount file0: /opt/nvme/f_lineorder_s999.arrow (read: 89.41GB, size: 502.92GB) lo_orderdate: 22.35GB lo_quantity: 22.35GB lo_extendedprice: 22.35GB lo_discount: 22.35GB GPU-Direct SQL: enabled (GPU-0) KVars-Slot: , , , , , KVecs-Buffer: nbytes: 51200, ndims: 3, items=[kvec0=<0x0000-27ff, type='int4', expr='lo_discount'>, kvec1=<0x2800-4fff, type='int4', expr='lo_quantity'>, kvec2=<0x5000-77ff, type='int4', expr='lo_extendedprice'>, kvec3=<0x7800-9fff, type='int4', expr='lo_orderdate'>, kvec4=<0xa000-c7ff, type='int4', expr='d_datekey'>] LoadVars OpCode: {Packed items[0]={LoadVars(depth=0): kvars=[, , , ]}, items[1]={LoadVars(depth=1): kvars=[]}} MoveVars OpCode: {Packed items[0]={MoveVars(depth=0): items=[, , ]}}, items[1]={MoveVars(depth=1): items=[, ]}}} Scan Quals OpCode: {Bool::AND args=[{Func(bool)::int4ge args=[{Var(int4): slot=0, expr='lo_discount'}, {Const(int4): value='1'}]}, {Func(bool)::int4le args=[{Var(int4): slot=0, expr='lo_discount'}, {Const(int4): value='3'}]}, {Func(bool)::int4lt args=[{Var(int4): slot=1, expr='lo_quantity'}, {Const(int4): value='25'}]}]} Join Quals OpCode: {Packed items[1]={JoinQuals: {Func(bool)::int4eq args=[{Var(int4): kvec=0x7800-a000, expr='lo_orderdate'}, {Var(int4): slot=5, expr='d_datekey'}]}}} Join HashValue OpCode: {Packed items[1]={HashValue arg={Var(int4): kvec=0x7800-a000, expr='lo_orderdate'}}} Partial Aggregation OpCode: {AggFuncs arg={SaveExpr: arg={Func(int8)::int8 arg={Func(int4)::int4mul args=[{Var(int4): kvec=0x5000-7800, expr='lo_extendedprice'}, {Var(int4): kvec=0x0000-2800, expr='lo_discount'}]}}}} Partial Function BufSz: 16 -> Seq Scan on public.date1 (cost=0.00..78.95 rows=365 width=4) Output: date1.d_datekey Filter: (date1.d_year = 1993) (28 rows) The verbose output additionally displays amount of column-data to be loaded on reference of columns. The load of lo_orderdate , lo_quantity , lo_extendedprice and lo_discount columns needs to read 89.41GB in total. It is 17.8% towards the filesize (502.93GB). How to make Arrow files This section introduces the way to transform dataset already stored in PostgreSQL database system into Apache Arrow file. Using PyArrow+Pandas A pair of PyArrow module, developed by Arrow developers community, and Pandas data frame can dump PostgreSQL database into an Arrow file. The example below reads all the data in table t0 , then write out them into /tmp/t0.arrow . import pyarrow as pa import pandas as pd X = pd.read_sql(sql=\"SELECT * FROM t0\", con=\"postgresql://localhost/postgres\") Y = pa.Table.from_pandas(X) f = pa.RecordBatchFileWriter('/tmp/t0.arrow', Y.schema) f.write_table(Y,1000000) # RecordBatch for each million rows f.close() Please note that the above operation once keeps query result of the SQL on memory, so should pay attention on memory consumption if you want to transfer massive rows at once. Using Pg2Arrow On the other hand, pg2arrow command, developed by PG-Strom Development Team, enables us to write out query result into Arrow file. This tool is designed to write out massive amount of data into storage device like NVME-SSD. It fetch query results from PostgreSQL database system, and write out Record Batches of Arrow format for each data size specified by the -s|--segment-size option. Thus, its memory consumption is relatively reasonable. pg2arrow command is distributed with PG-Strom. It shall be installed on the bin directory of PostgreSQL related utilities. $ pg2arrow --help Usage: pg2arrow [OPTION] [database] [username] General options: -d, --dbname=DBNAME Database name to connect to -c, --command=COMMAND SQL command to run -t, --table=TABLENAME Equivalent to '-c SELECT * FROM TABLENAME' (-c and -t are exclusive, either of them must be given) --inner-join=SUB_COMMAND --outer-join=SUB_COMMAND -o, --output=FILENAME result file in Apache Arrow format --append=FILENAME result Apache Arrow file to be appended (--output and --append are exclusive. If neither of them are given, it creates a temporary file.) -S, --stat[=COLUMNS] embeds min/max statistics for each record batch COLUMNS is a comma-separated list of the target columns if partially enabled. Arrow format options: -s, --segment-size=SIZE size of record batch for each Connection options: -h, --host=HOSTNAME database server host -p, --port=PORT database server port -u, --user=USERNAME database user name -w, --no-password never prompt for password -W, --password force password prompt Other options: --dump=FILENAME dump information of arrow file --progress shows progress of the job --set=NAME:VALUE config option to set before SQL execution --help shows this message Report bugs to . The -h or -U option specifies the connection parameters of PostgreSQL, like psql or pg_dump . The simplest usage of this command is running a SQL command specified by -c|--command option on PostgreSQL server, then write out results into the file specified by -o|--output option in Arrow format. --append option is available, instead of -o|--output option. It means appending data to existing Apache Arrow file. In this case, the target Apache Arrow file must have fully identical schema definition towards the specified SQL command. The example below reads all the data in table t0 , then write out them into the file /tmp/t0.arrow . $ pg2arrow -U kaigai -d postgres -c \"SELECT * FROM t0\" -o /tmp/t0.arrow Although it is an option for developers, --dump