GPDB 並行載入測試,gpdb並行載入

來源:互聯網
上載者:User

GPDB 並行載入測試,gpdb並行載入
測試檔案資訊

10G Dec 12 14:10 A111G Dec 12 14:32 A210G Dec 12 14:10 B111G Dec 12 14:35 B2
GPFDIST方案一 單台伺服器
drop table if exists host_1;drop EXTERNAL TABLE if exists exttable_ext_1_host;drop table if exists host_1_err;create table host_1 (like sourcetable) distributed randomly;CREATE EXTERNAL TABLE exttable_ext_1_host (like sourcetable) LOCATION ('gpfdist://10.2.22.81:9999/A*') FORMAT 'text' (delimiter as ',' null as '' escape 'OFF') ENCODING 'UTF8' LOG ERRORS INTO host_1_err SEGMENT REJECT LIMIT 100 PERCENT;insert into host_1 select * from exttable_ext_1_host;
方案二 兩台伺服器
drop table if exists host_2;drop EXTERNAL TABLE if exists exttable_ext_2_host;drop table if exists host_2_err;create table host_2 (like sourcetable) distributed randomly;CREATE EXTERNAL TABLE exttable_ext_2_host (like sourcetable) LOCATION ('gpfdist://10.2.22.81:9999/B1','gpfdist://10.2.22.82:9999/B2') FORMAT 'text' (delimiter as ',' null as '' escape 'OFF') ENCODING 'UTF8' LOG ERRORS INTO host_2_err SEGMENT REJECT LIMIT 100 PERCENT;insert into host_2 select * from exttable_ext_2_host;
GPLOAD方案三

gpload單台

---VERSION: 1.0.0.1DATABASE: gpdbUSER: gpadminHOST: 10.4.2.4PORT: 5432GPLOAD:  INPUT:    - SOURCE:        LOCAL_HOSTNAME:          - 10.2.22.81        PORT: 9999        FILE:          - /data/ptest/A*    - FORMAT: text    - DELIMITER: ','    - ESCAPE: 'OFF'    - NULL_AS: ''    - ENCODING: UTF8    - ERROR_LIMIT: 10000    - ERROR_TABLE: host_1_err  OUTPUT:    - TABLE: host_1    - MODE: insert
方案四

gpload兩台

測試結果

為了防止緩衝幹擾測試,經過多次測試結果如下,可以發現方案二明顯優於方案一

. 檔案資訊s檔案 | 檔案大小 | 入庫大小 | 插入記錄數量 | 異常記錄數量------| --------------------------------------------方案一 | 21GB | 25GB |49826141 |2199方案二 | 21GB | 25GB | 52108083| 1867

. 載入耗時

不清楚為什麼第1次讀取的時候(測試序列一的方案一/二)和之後的差別這麼大可能與gpfs有關係

方案四的B機檔案讀取失敗,而且整個測試過程中方案三/四感覺並不是非常穩定(hang住),鑒於方案三對比方案一併沒有太大優勢,而且通過觀察方案四可以發現A機載入的時間已經達到22.24s,對比方案二可能並不會有優勢,因此未完成測試

測試次序 方案一 方案二 方案三 方案四
測試次序一 440403.263 ms 204201.096 ms 36.41 seconds 22.24 seconds+B?
測試次序二 35854.612 ms 26303.240 ms 方案三 方案四
測試次序三 42007.990 ms 25593.730 ms 方案三 方案四
測試次序四 43795.502 ms 25706.479 ms 方案三 方案四
測試次序五 36576.681 ms 26405.977 ms 方案三 方案四

-EOF-

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.