From 205e1c4cbdb6d65c47345a0c85e91962156b79b4 Mon Sep 17 00:00:00 2001 From: Karol Sobczak Date: Mon, 18 Jun 2018 14:19:04 +0200 Subject: [PATCH] Add distributed sort benchto benchmarks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Results: query: sort_query_1_col, schema: tpch_sf300_orc, distributed_sort: false: 19.371 m ± 5.809 s (0.50 %) query: sort_query_1_col, schema: tpch_sf300_orc, distributed_sort: true, local_distributed_sort: false, redistribute_sort: false: 12.566 m ± 2.507 m (19.95 %), query: sort_query_1_col, schema: tpch_sf300_orc, distributed_sort: true, local_distributed_sort: true, redistribute_sort: false: 10.347 m ± 1.475 m (14.26 %) query: sort_query_1_col, schema: tpch_sf300_orc, distributed_sort: true, local_distributed_sort: false, redistribute_sort: true: 11.938 m ± 59.868 s (8.36 %) query: sort_query_1_col, schema: tpch_sf300_orc, distributed_sort: true, local_distributed_sort: true, redistribute_sort: true: 8.383 m query: sort_query_1_col, schema: tpch_sf100_orc, distributed_sort: false: 6.090 m ± 7.173 s (1.96 %), query: sort_query_1_col, schema: tpch_sf100_orc, distributed_sort: true, local_distributed_sort: false, redistribute_sort: false: 3.912 m ± 24.804 s, query: sort_query_1_col, schema: tpch_sf100_orc, distributed_sort: true, local_distributed_sort: true, redistribute_sort: false: 2.837 m ± 7.094 s (4.17 %) query: sort_query_1_col, schema: tpch_sf100_orc, distributed_sort: true, local_distributed_sort: false, redistribute_sort: true: 3.488 m ± 13.714 s, query: sort_query_1_col, schema: tpch_sf100_orc, distributed_sort: true, local_distributed_sort: true, redistribute_sort: true: 2.783 m ± 6.479 s query: sort_query_1_col, schema: tpch_sf1000_orc, distributed_sort: true, local_distributed_sort: true, redistribute_sort: false: 37.995 m ± 15.890 s, query: sort_query_6_cols , schema: tpch_sf100_orc, distributed_sort: false: 6.989 m ± 18.914 s, query: sort_query_6_cols , schema: tpch_sf100_orc, distributed_sort: true, local_distributed_sort: false, redistribute_sort: false: 6.071 m ± 40.359 s query: sort_query_6_cols , schema: tpch_sf100_orc, distributed_sort: true, local_distributed_sort: true, redistribute_sort: false: 5.554 m ± 17.422 s query: sort_query_6_cols , schema: tpch_sf100_orc, distributed_sort: true, local_distributed_sort: false, redistribute_sort: true: 5.495 m ± 986.414 ms (0.30 %) query: sort_query_6_cols , schema: tpch_sf100_orc, distributed_sort: true, local_distributed_sort: true, redistribute_sort: true: 4.854 m ± 19.075 s (6.55 %) query: sort_query_6_cols, schema: tpch_sf300_orc, distributed_sort: true, local_distributed_sort: false, redistribute_sort: false: 19.551 m ± 2.454 m query: sort_query_6_cols, schema: tpch_sf300_orc, distributed_sort: true, local_distributed_sort: true, redistribute_sort: false: 16.786 m ± 22.572 s, query: sort_query_6_cols, schema: tpch_sf300_orc, distributed_sort: true, local_distributed_sort: false, redistribute_sort: true: 17.666 m ± 34.269 s, query: sort_query_6_cols, schema: tpch_sf300_orc, distributed_sort: true, local_distributed_sort: true, redistribute_sort: true: 15.233 m ± 1.879 m, --- .../benchmarks/presto/distributed_sort.yaml | 16 ++++++++++++++++ .../session_set_distributed_sort_flag.sql | 1 + .../presto/distributed_sort/sort_query_1_col.sql | 6 ++++++ .../distributed_sort/sort_query_6_cols.sql | 11 +++++++++++ 4 files changed, 34 insertions(+) create mode 100644 presto-benchto-benchmarks/src/main/resources/benchmarks/presto/distributed_sort.yaml create mode 100644 presto-benchto-benchmarks/src/main/resources/sql/presto/distributed_sort/session_set_distributed_sort_flag.sql create mode 100644 presto-benchto-benchmarks/src/main/resources/sql/presto/distributed_sort/sort_query_1_col.sql create mode 100644 presto-benchto-benchmarks/src/main/resources/sql/presto/distributed_sort/sort_query_6_cols.sql diff --git a/presto-benchto-benchmarks/src/main/resources/benchmarks/presto/distributed_sort.yaml b/presto-benchto-benchmarks/src/main/resources/benchmarks/presto/distributed_sort.yaml new file mode 100644 index 000000000000..35d36fdff45e --- /dev/null +++ b/presto-benchto-benchmarks/src/main/resources/benchmarks/presto/distributed_sort.yaml @@ -0,0 +1,16 @@ +datasource: presto +query-names: presto/distributed_sort/${query}.sql +runs: 2 +prewarm-runs: 1 +before-execution: sleep-4s, presto/distributed_sort/session_set_distributed_sort_flag.sql +frequency: 7 +database: hive +tpch_100: tpch_sf100_orc +tpch_300: tpch_sf300_orc +tpch_1000: tpch_sf1000_orc +tpch_3000: tpch_sf3000_orc +variables: + 1: + query: sort_query_6_cols, sort_query_1_col + schema: ${tpch_100}, ${tpch_300}, ${tpch_1000}, ${tpch_3000} + distributed_sort: true, false diff --git a/presto-benchto-benchmarks/src/main/resources/sql/presto/distributed_sort/session_set_distributed_sort_flag.sql b/presto-benchto-benchmarks/src/main/resources/sql/presto/distributed_sort/session_set_distributed_sort_flag.sql new file mode 100644 index 000000000000..a4cc3b583287 --- /dev/null +++ b/presto-benchto-benchmarks/src/main/resources/sql/presto/distributed_sort/session_set_distributed_sort_flag.sql @@ -0,0 +1 @@ +SET SESSION distributed_sort='${distributed_sort}'; diff --git a/presto-benchto-benchmarks/src/main/resources/sql/presto/distributed_sort/sort_query_1_col.sql b/presto-benchto-benchmarks/src/main/resources/sql/presto/distributed_sort/sort_query_1_col.sql new file mode 100644 index 000000000000..071397a84852 --- /dev/null +++ b/presto-benchto-benchmarks/src/main/resources/sql/presto/distributed_sort/sort_query_1_col.sql @@ -0,0 +1,6 @@ +SELECT + count(orderkey) +FROM ( + SELECT * + FROM ${database}.${schema}.lineitem + ORDER BY orderkey) diff --git a/presto-benchto-benchmarks/src/main/resources/sql/presto/distributed_sort/sort_query_6_cols.sql b/presto-benchto-benchmarks/src/main/resources/sql/presto/distributed_sort/sort_query_6_cols.sql new file mode 100644 index 000000000000..252e5e01aec0 --- /dev/null +++ b/presto-benchto-benchmarks/src/main/resources/sql/presto/distributed_sort/sort_query_6_cols.sql @@ -0,0 +1,11 @@ +SELECT + count(orderkey), + count(partkey), + count(suppkey), + count(linenumber), + count(quantity), + count(extendedprice) +FROM ( + SELECT * + FROM ${database}.${schema}.lineitem + ORDER BY orderkey)