ç§éã§10åã¬ã³ã¼ããå¦çãã話
ããã¾ã§ã®PG-Stromã®æ§è½æ¸¬å®ã¨ããã°ãèªç¤¾ä¿ææ©æã®é¢ä¿ããããåºæ¬çã«ã¯1Uã©ãã¯ãµã¼ãã«1CPUã1GPUã3ï½4å°ã®NVME-SSDãè¼ããæ§æã®ãã¼ãã¦ã§ã¢ãä¸å¿ã ã£ãã*1
ãã ã½ããã¦ã§ã¢çã«ã¯ãã«ãGPUãNVME-SSDã®ã¹ãã©ã¤ãã³ã°ã«å¯¾å¿ãã¦ãããè½åçã«ã©ãã¾ã§ä¼¸ã°ããã®ãã¨ããã®ã¯æ°ã«ãªãã¨ããã§ããã
ããã§ãæ¹ã
ã«æãå°½ããã¦ã次ã®ãããªãã³ããã¼ã¯ç°å¢ãæ´åãã¦ã¿ãã
ï¼æ©æãã貸ãé ãããã¼ããã¼æ§ã«ã¯æè¬ææ¿é¨ãããã§ããï¼
4Uãµã¼ãã®SYS-4029GP-TRTã¨ããã¢ãã«ã¯ãGPUãããããä¹ã£ããããã«PCIeã¹ã¤ãããç¨ãã¦PCIeã¹ããããåå²ãã¦ãããã¡ããã©ãPCIeã¹ã¤ãã1åããã2åã®PCIe x16ã¹ããããç¨æããã¦ãããåãPCIeã¹ã¤ããé ä¸ã®ããã¤ã¹å士ã§ããã°ãå®å ¨ã«CPUããã¤ãã¹ãã¦Peer-to-Peerã®ãã¼ã¿è»¢éãã§ãããSupermicroèªèº«ãããã®ãµã¼ãã"GPUDirect RDMAã«æé©å"ããã¢ãã«ã¨ãã¦å£²ã£ã¦ããã
ããããæ§é ã®ãµã¼ãã§ããã®ã§ãP2P DMAãç¨ãã¦SSDããGPUã¸ãã¼ã¿ã転éããå ´åãPCIeã¹ã¤ããã®é ä¸ã«ãã2æ¬ã®PCIeã¹ãããã«ããããSSDã¨GPUããã¢ã«ãã¦è£ çããã¨ããã¼ã¿è»¢éã®æã«å¹çãè¯ãã
U.2ã®NVME-SSDãè£ çããã«ã¯å¤é¨ã®ã¨ã³ã¯ãã¼ã¸ã£ãå¿ è¦ã§ãä»åã¯ï¼è²ã ãã£ã¦ï¼SerialCables社ã®PCI-ENC8G-08Aã¨ãã製åã使ç¨ãããããã¯ã¨ã³ã¯ãã¼ã¸ã£ããã8æ¬ã®U.2 NVME-SSDãè£ çããäºãã§ãããã¤ã¬ã¯ãã¢ã¿ããã±ã¼ãã«ã使ç¨ãã¦å2æã®PCIeãã¹ãã«ã¼ãï¼PCI-AD-x16HE-Mï¼ã¨æ¥ç¶ããã
ããããã¨ãGPU 1å°ãããU.2 NVME-SSDã4å°ã®ãã¢ãæ§æããäºãã§ããããããPCIe Gen3.0 x16ã¬ã¼ã³å¹
ã®å¸¯åã§CPUããã¤ãã¹ãã¦ç´çµã§ããããã«ãªãã
ãããã¯ãã¤ã¢ã°ã©ã ã«ãã¦æ¸ãç´ãã¨ä»¥ä¸ã®éãã
Star Schema Benchmarkã¨ãã¼ã¿ã»ãã
æ§è½è©ä¾¡ã«ä½¿ã£ãã®ã¯ãã¤ãã® Star Schema Benchmark(SSBM) ã§ãSF=4000ã§ä½ã£ããã¼ã¿ã»ãããPostgreSQLã®Hashãã¼ãã£ã·ã§ãã³ã°æ©è½ã使ã£ã¦4ã¤ã®ã¦ãããã«ãã¼ã¿ãåæ£ããããã¤ã¾ããU.2 NVME-SSDã4å°ãããSF=1000ç¸å½ã®è¦æ¨¡ã®ãã¼ã¿ï¼60å件ã879GBï¼ãæã¤ãã¨ã«ãªãã
ããã«ãã¼ã¿ã®æã¡æ¹ããPostgreSQLã®è¡å½¢å¼ã«å ãã¦ãPG-Stromã®åã¹ãã¢ã§ããApache Arrowå½¢å¼ã§å ¨ãåãå 容ã®ãã¡ã¤ã«ãç¨æãã¦ãåãã¼ãã£ã·ã§ã³ã¸é ç½®ããã
Apache Arrowå½¢å¼ã¨ããã®ã¯æ§é åãã¼ã¿ãåå½¢å¼ã§ä¿åã»äº¤æããããã®ãã©ã¼ãããã§ãPG-Stromã«ããã¦ã¯Arrow_Fdwæ©è½ãç¨ãã¦ã®ç´æ¥èªã¿åºãï¼SSD-to-GPU Direct SQLãå«ãï¼ã«å¯¾å¿ãã¦ããã詳ããã¯ãã¡ãã®ã¨ã³ããªã¼ãªã©ã
SSBMã«ã¯å
¨é¨ã§13種é¡ã®ã¯ã¨ãªãå«ã¾ãã¦ãããä¾ãã°ãQ2_3ã®ã¯ã¨ãªã¯ä»¥ä¸ã®éãã
ãã¼ã¿éã®å¤ãlineorderã®ã¹ãã£ã³ã¨åæã«ãä»ã®ãã¼ãã«ã¨ã®JOINãGROUP BYãå«ãã¯ã¼ã¯ãã¼ãã§ããã
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 = 'MFGR#2221' and s_region = 'EUROPE' group by d_year, p_brand1 order by d_year, p_brand1;
ãã³ããã¼ã¯çµæ
ã¨ãã訳ã§ãæ©éãã³ããã¼ã¯çµæã以ä¸ã«ã
縦軸ã¯åä½æéãããã®å¦çè¡æ°ã§ãï¼lineorderã®è¡æ°ï¼240åè¡ï¼Ã·ï¼SQLå¿çæéï¼ã§è¨ç®ãã¦ãããä¾ãã° PG-Strom 2.2 + Arrow_Fdw ã«ããã Q1_2 ã®å¿çæé㯠14.0s ãªã®ã§ãæ¯ç§17.1åè¡ãå¦çãã¦ããã¨ãããã¨ã«ãªãã
é軸㯠PostgreSQL v11.5 ã§ã並åã¯ã¨ãªæ°ã24ã«å¼ãä¸ããã¨ãããã¥ã¼ãã³ã°*2ãè¡ã£ã¦ãããæ§è½å¤ã¨ãã¦ã¯ãæ¯ç§50ï½60ç¾ä¸è¡ã®æ°´æºã
ãªã¬ã³ã¸ã®è»¸ã¯ãPostgreSQLã®è¡ãã¼ã¿ã«å¯¾ã㦠PG-Strom v2.2 ã®SSD-to-GPU Direct SQLã使ç¨ãã¦ã¯ã¨ãªãå®è¡ãããã®ãæ§è½å¤ã¨ãã¦ã¯ãæ¯ç§250ç¾ä¸è¡åå¾ã®æ°´æºã
ãã®äºã¤ã«é¢ãã¦ã¯ã13åã®ã¯ã¨ãªã®éã§æ§è½å¤ã«å¤§ããªå¾åã®å·®ããªããããã¯ãJOIN/GROUP BYã®å¦çè² è·ããããã¾ãI/Oã®è² è·ãæ¯é é ã«ãªã£ã¦ãããè¡ãã¼ã¿ã§ããéãã¯åç §ããã¦ããªãåãå«ãã¦ã¹ãã¬ã¼ã¸ããèªã¿åºããã°ãªããªãããã ã¨èããããã
ç·ã®è»¸ãçæã§ãPG-Strom v2.2ã®SSD-to-GPU Direct SQLãArrow_Fdw管çä¸ã®åã¹ãã¢ã«å¯¾ãã¦å®è¡ãããã®ã
ããã¯åãã¼ã¿ãªã®ã§ãåç
§ããã«ã©ã ã®æ°ã«ãã£ã¦å¤§ããæ§è½å¤ã®å¾åãéã£ã¦ããæ§åãè¦ããããQ1_*ã®ã°ã«ã¼ããQ2_*ã®ã°ã«ã¼ãã«é¢ãã¦ã¯ãç®æ¨ã¨ãã¦ããæ¯ç§10åè¡ã®å¦çè½åãå®è¨¼ã§ãããã¨ã«ãªãã
ä¸å¿ã4xGPU + 16xNVME-SSD ã§ãã¡ãã¨I/Oã®æ§è½ãåºã¦ããã¨ããäºã確èªããããã«ãã¯ã¨ãªå®è¡ä¸ã® iostat ã®çµæãç©ã¿ä¸ãã°ã©ãã«ãã¦ã¿ããå±±ã13åããã®ã¯ã¯ã¨ãªã13åå®è¡ããã¨ããäºã§ãç©ççã«ã¯æ¦ã40GB/sã®SeqReadæ§è½ãåºã¦ããäºãããããï¼ã¤ã¾ããã¯ã¨ãªå¿çæ§è½ã®éãã¯åç §ãã¦ããåã®æ°ã«ãããã¨ããäºã§ãããï¼
åèã¾ã§ã«ãä»åã®æ§æã¯ä»¥ä¸ã®éãã
åçª | æ°é | |
model | Supermicro SYS-4029GP-TRT | 1 |
---|---|---|
CPU | Intel Xeon Gold 6226 (12C, 2.7GHz) | 2 |
RAM | 16GB (DDR4-2933; ECC) | 12 |
GPU | NVIDIA Tesla V100 (PCI-E; 16GB) | 2 |
GPU | NVIDIA Tesla V100 (PCI-E; 32GB) | 2 |
HDD | Seagate 2.5inch 1.0TB/2.0TB | 4 |
JBOF | SerialCables PCI-ENC8G-08A | 2 |
SSD | Intel DC P4510 (U.2; 1.0TB) | 16 |
HBA | SerialCables PCI-AD-x16HE-M | 4 |
ãèªåã§ãç°å¢ãä½ã£ã¦ã¿ããã¨ããæ¹ã¯ãåèã«ã
PostgreSQL Conference Japan 2019
ä»åã®ä¸é£ã®æ¤è¨¼çµæã«é¢ãã¦ã¯ãæ¥ã11æ15æ¥(é)ã«åå·é§
åï¼APåå·ï¼ã§éå¬äºå®ã® PostgreSQL Conference Japan 2019 ã«ã¦ãPostgreSQLã ã£ã¦ããã°ãã¼ã¿å¦çãããï¼ï¼ ï½GPUã¨NVMEãé§ä½¿ãã¦æ¯ç§10åã¬ã³ã¼ããå¦çããæè¡ï½ãã¨é¡ãã¦çºè¡¨ãè¡ãã¾ãã
æåã§ã®ã«ã³ãã¡ã¬ã³ã¹ã§ã¯ããã¾ãããç§ã®çºè¡¨ã®ä»ã«ããçµé¨è±å¯ãªPostgreSQLã¨ã³ã¸ãã¢ã«ãã14ã®ã»ãã·ã§ã³ï¼ãã¥ã¼ããªã¢ã«ãäºå®ããã¦ããããã²ãåå ããã ããã°ã¨æãã¾ãã
*1:ä¾å¤ã¨ãã¦ã¯ãPGconf.ASIA 2018ãªã©ã«åãã¦ãNEC様の協力でExpEtherを3台、3xGPU + 6xSSDの構成を作って13.5GB/sを記録ãããã®ã
*2:ããã©ã«ãã ã¨nworkers=10ç¨åº¦ãããªãã¡ãã¼ãã£ã·ã§ã³ããã2ï½3ã®ã¯ã¼ã«ã¼ã¨ãªããCPU100%ã§è²¼ãä»ãã¦ãã¾ããã