測試目的及重點
本測(ce)(ce)(ce)試(shi)旨在測(ce)(ce)(ce)試(shi)天(tian)翼(yi)云翼(yi)MapReduce服務下Doris引擎(qing)的(de)SQL性能,對比翼(yi)MapReduce中Doris基于ARM架構下的(de)優化(hua)版本和開(kai)源社區2.1.2版本的(de)性能。重點為運行TPC-H測(ce)(ce)(ce)試(shi)的(de)22個Query,獲取(qu)運行時(shi)間,時(shi)間越少,性能越好。
Doris主要兩(liang)類進程(cheng):
Frontend(FE):主要負責用(yong)戶(hu)請(qing)求的(de)接入、查詢解析規劃、元數據的(de)管理、節點(dian)管理相(xiang)關(guan)工作。以下統稱Doris FE。
Backend(BE):主(zhu)要負責數據存(cun)儲、查詢(xun)計劃的執行。以下統稱Doris BE。
集群環境
服務器規格:
Processors: HiSilicon Kunpeng-920 aarch64 2.6 GHz*96
Memory: 128GB(32GB*4)
Storage Device:
446GB * 1(Boot Disk)
7.3TB * 10(Data Disk)
集群規模:
服務器 * 4 (Doris FE:1臺(tai)(tai)、Doris BE:3臺(tai)(tai))
Doris配置及使用資源
本次測試Doris配置(zhi)與開源社區2.1.2保持(chi)一致。以下表(biao)格為部分關鍵配置(zhi)。
| Doris FE | Doris BE |
|---|---|
| JAVA_OPTS=-Xss4m -Xmx8192m experimental_enable_nereids_planner =true experimental_enable_pipeline_engine=true experimental_enable_pipeline_x_engine=true |
JAVA_OPTS=-Xmx8192m disable_storage_page_cache=true enable_feature_binlog = true |
測試步驟
整(zheng)體測(ce)(ce)試(shi)步驟,包括:準備測(ce)(ce)試(shi)工具、生成(cheng)數據與測(ce)(ce)試(shi)語句、導入Doris中(zhong)的(de)tpch數據庫并驗(yan)證數據量(liang)、執行測(ce)(ce)試(shi)。相關測(ce)(ce)試(shi)命(ming)(ming)令(ling)已集成(cheng)在腳(jiao)本中(zhong),以(yi)下(xia)介紹測(ce)(ce)試(shi)步驟中(zhong)出現的(de)命(ming)(ming)令(ling),是從腳(jiao)本中(zhong)提取的(de)部(bu)分核心命(ming)(ming)令(ling)。
準備測試工具
上傳CPU架構對應版(ban)本的tools.tar。tools.tar為(wei)Doirs官(guan)網Benchmark測試(shi)工具(ju)集,集成了TPC-H測試(shi)工具(ju),本測試(shi)的版(ban)本為(wei):TPC-H_Tools_v3.0.0。 Tools需要在(zai)Doris FE所(suo)在(zai)機器使用,并已配置環境變量。
生成數據與測試語句
解壓(ya)tar包(bao),進入tpch目(mu)錄,生成500G數(shu)據。本測試(shi)所有操作都在tpch-tools目(mu)錄下,相關(guan)的腳步在bin目(mu)錄下,運行(xing)gen-tpch-data.sh可以生成測試(shi)數(shu)據及語句。
tar -xvf tools.tar
cd tools/tpch-tools
nohup sh bin/gen-tpch-data.sh -s 500 > output.generate.500G.log 2>&1 &
生成的22條(tiao)Query語(yu)句(ju)在如下(xia)目錄:

導入Doris tpch庫并驗證數據量
通過腳本將生成的(de)數據(ju)導入到Doris tpch的(de)庫中(zhong)。測試庫中(zhong)有表8張(zhang)(zhang): customer、lineitem nation orders part partsupp region revenue0 supplier 和視圖(tu)一(yi)張(zhang)(zhang): revenue0。
-
創建tpch庫和表
sh bin/create-tpch-tables.sh -
導入tpch數據
nohup /bin/bash bin/load-tpch-data.sh > output.load.500G.log 2>&1 & -
查看相關表的狀態
執行測試腳本
運(yun)行數據量為500GB的(de)tpch查詢測試。
bin/bash bin/run-tpch-queries.sh
測試結果
| 查詢名 | 開源版本(單位:毫秒) | 天翼云翼MapReduce版本(單位:毫秒) |
|---|---|---|
| q1 | 6239 | 5278 |
| q2 | 575 | 418 |
| q3 | 5780 | 4079 |
| q4 | 3502 | 2519 |
| q5 | 8456 | 6938 |
| q6 | 916 | 352 |
| q7 | 4347 | 3439 |
| q8 | 4326 | 2230 |
| q9 | 15572 | 12559 |
| q10 | 6642 | 5327 |
| q11 | 745 | 524 |
| q12 | 1482 | 800 |
| q13 | 6297 | 5160 |
| q14 | 591 | 551 |
| q15 | 988 | 942 |
| q16 | 1146 | 1072 |
| q17 | 2316 | 1106 |
| q18 | 16009 | 15025 |
| q19 | 3839 | 1653 |
| q20 | 1912 | 1379 |
| q21 | 9592 | 6986 |
| q22 | 1444 | 1266 |
| 總耗時 | 102716 | 79603 |
測試結論
通過(guo)在500GB數(shu)據(ju)量的TPC-H的對比測(ce)試,翼MapReduce中Doris基于ARM架(jia)構下的優化版(ban)(ban)本(ben)(ben)耗(hao)時79603毫秒,Doris開源社區(qu)2.1.2版(ban)(ban)本(ben)(ben)耗(hao)時102716毫秒。翼MapReduce中Doris基于ARM架(jia)構下的優化版(ban)(ban)本(ben)(ben)相比于Doris開源社區(qu)2.1.2版(ban)(ban)本(ben)(ben)性能提(ti)升1.29倍。