Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement](shuffle) Use a knob to decide whether a serial exchange should be used #43199

Merged
merged 5 commits into from
Nov 6, 2024

Conversation

Gabriel39
Copy link
Contributor

@Gabriel39 Gabriel39 commented Nov 4, 2024

What problem does this PR solve?

A new knob to control a exchange node should be serial or not.
For example, a partitioned hash join should be executed like below:

┌────────────────────────────┐                  ┌────────────────────────────┐
│                            │                  │                            │
│Exchange(HASH PARTITIONED N)│                  │Exchange(HASH PARTITIONED N)│
│                            │                  │                            │
└────────────────────────────┴─────────┬────────┴────────────────────────────┘
                                       │                                      
                                       │                                      
                                       │                                      
                                       │                                      
                                       │                                      
                                       │                                      
                                ┌──────▼──────┐                               
                                │             │                               
                                │ HASH  JOIN  │                               
                                │             │                               
                                └─────────────┘                               

After turning on this knob, the real plan should be:

  ┌──────────────────────────────┐                        ┌──────────────────────────────┐    
  │                              │                        │                              │    
  │ Exchange (HASH PARTITIONED 1)│                        │ Exchange (HASH PARTITIONED 1)│    
  │                              │                        │                              │    
  └────────────┬─────────────────┘                        └────────────┬─────────────────┘    
               │                                                       │                      
               │                                                       │                      
               │                                                       │                      
               │                                                       │                      
               │                                                       │                      
┌──────────────▼─────────────────────┐                  ┌──────────────▼─────────────────────┐
│                                    │                  │                                    │
│ Local  Exchange(HASH PARTITIONED N)│                  │ Local  Exchange(HASH PARTITIONED N)│
│              1 -> N                │                  │              1 -> N                │
└────────────────────────────────────┴─────────┬────────┴────────────────────────────────────┴
                                               │                                              
                                               │                                              
                                               │                                              
                                               │                                              
                                               │                                              
                                               │                                              
                                        ┌──────▼──────┐                                       
                                        │             │                                       
                                        │ HASH  JOIN  │                                       
                                        │             │                                       
                                        └─────────────┘                                       

For large cluster, X (mappers) * Y (reducers) rpc channels can be reduced to X (mappers) * Z (BEs).

Check List (For Committer)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No colde files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.
  • Release note

    None

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@Gabriel39
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TPC-H: Total hot run time: 41784 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit bc57a7a3a7bfdbb74e6efde6722162d52fbb056a, data reload: false

------ Round 1 ----------------------------------
q1	17645	7534	7361	7361
q2	2062	168	175	168
q3	10527	1140	1204	1140
q4	10226	853	837	837
q5	7739	3171	3116	3116
q6	239	150	144	144
q7	1019	610	601	601
q8	9382	2006	2029	2006
q9	6998	6761	6787	6761
q10	7064	2440	2467	2440
q11	464	257	260	257
q12	400	211	209	209
q13	17749	2999	3033	2999
q14	250	216	217	216
q15	701	621	619	619
q16	641	571	588	571
q17	975	547	592	547
q18	7542	6597	6779	6597
q19	1335	1005	944	944
q20	493	186	179	179
q21	3982	3074	3220	3074
q22	1102	998	1008	998
Total cold run time: 108535 ms
Total hot run time: 41784 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7297	7254	7292	7254
q2	342	245	243	243
q3	2898	2774	2786	2774
q4	1949	1712	1760	1712
q5	5481	5502	5584	5502
q6	220	137	139	137
q7	2125	1711	1701	1701
q8	3285	3447	3436	3436
q9	8885	8995	8967	8967
q10	3515	3433	3456	3433
q11	602	492	504	492
q12	800	581	574	574
q13	9949	3097	3083	3083
q14	294	268	254	254
q15	691	646	612	612
q16	681	623	630	623
q17	2331	2157	2114	2114
q18	7861	7431	7404	7404
q19	1678	1559	1527	1527
q20	2257	1977	1985	1977
q21	5386	5258	5108	5108
q22	1135	996	1019	996
Total cold run time: 69662 ms
Total hot run time: 59923 ms

@Gabriel39
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TPC-H: Total hot run time: 41704 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 62429aa9e74832fef70fb492ed4a713f8d84dd9e, data reload: false

------ Round 1 ----------------------------------
q1	17594	7575	7402	7402
q2	2095	182	180	180
q3	10654	1148	1159	1148
q4	10542	772	805	772
q5	7777	3111	3104	3104
q6	238	152	149	149
q7	1027	627	609	609
q8	9368	2015	2005	2005
q9	6791	6451	6448	6448
q10	7076	2439	2423	2423
q11	472	263	259	259
q12	424	213	213	213
q13	17787	3040	3016	3016
q14	252	216	214	214
q15	586	517	509	509
q16	692	575	591	575
q17	1001	633	555	555
q18	7461	6760	6882	6760
q19	1347	1049	951	951
q20	496	182	187	182
q21	4575	3253	3220	3220
q22	1130	1019	1010	1010
Total cold run time: 109385 ms
Total hot run time: 41704 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7336	7376	7532	7376
q2	352	260	256	256
q3	2972	2797	2845	2797
q4	1963	1730	1757	1730
q5	5503	5563	5481	5481
q6	221	141	143	141
q7	2165	1734	1707	1707
q8	3293	3454	3460	3454
q9	8663	8649	8634	8634
q10	3502	3463	3479	3463
q11	592	514	498	498
q12	770	601	604	601
q13	10111	3043	2993	2993
q14	292	260	258	258
q15	584	547	546	546
q16	673	635	646	635
q17	1827	1594	1573	1573
q18	7838	7447	7361	7361
q19	1683	1538	1645	1538
q20	2070	1855	1858	1855
q21	5466	5248	5160	5160
q22	1141	1027	977	977
Total cold run time: 69017 ms
Total hot run time: 59034 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 192400 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 62429aa9e74832fef70fb492ed4a713f8d84dd9e, data reload: false

query1	977	372	370	370
query2	6490	2038	2083	2038
query3	6396	223	213	213
query4	33477	23609	23810	23609
query5	4318	467	441	441
query6	275	200	194	194
query7	4365	286	288	286
query8	280	224	228	224
query9	9543	2673	2657	2657
query10	448	255	245	245
query11	17812	15336	15357	15336
query12	140	99	99	99
query13	1641	430	405	405
query14	10003	6992	6895	6895
query15	224	175	174	174
query16	7636	416	456	416
query17	1532	561	542	542
query18	2083	598	610	598
query19	281	179	175	175
query20	116	107	111	107
query21	205	102	107	102
query22	4891	4502	4492	4492
query23	34851	33881	33834	33834
query24	11674	3206	3324	3206
query25	654	394	403	394
query26	1429	176	188	176
query27	2805	284	279	279
query28	8079	2439	2425	2425
query29	877	427	421	421
query30	457	319	311	311
query31	1022	816	828	816
query32	99	56	58	56
query33	769	281	286	281
query34	994	498	517	498
query35	908	729	735	729
query36	1112	983	943	943
query37	134	72	72	72
query38	4345	4274	4261	4261
query39	1470	1424	1422	1422
query40	283	103	103	103
query41	51	49	47	47
query42	110	101	93	93
query43	547	503	500	500
query44	1275	810	800	800
query45	183	166	170	166
query46	1154	697	677	677
query47	1990	1859	1858	1858
query48	414	315	322	315
query49	1172	418	433	418
query50	793	380	386	380
query51	7417	7106	7075	7075
query52	96	84	86	84
query53	249	174	172	172
query54	1100	414	407	407
query55	75	70	77	70
query56	257	241	225	225
query57	1289	1202	1174	1174
query58	227	201	202	201
query59	3328	3122	3003	3003
query60	267	243	240	240
query61	106	112	107	107
query62	899	678	678	678
query63	212	187	180	180
query64	5405	674	613	613
query65	3296	3207	3168	3168
query66	1458	317	312	312
query67	16358	15699	15693	15693
query68	4835	579	572	572
query69	427	253	254	253
query70	1200	1143	1133	1133
query71	411	254	248	248
query72	6485	3999	4056	3999
query73	770	357	359	357
query74	10350	8952	8948	8948
query75	3499	2630	2681	2630
query76	2951	1067	1176	1067
query77	378	276	264	264
query78	10174	9424	9332	9332
query79	1145	578	598	578
query80	715	425	423	423
query81	507	240	233	233
query82	730	118	121	118
query83	259	182	164	164
query84	233	68	75	68
query85	1145	300	295	295
query86	335	294	280	280
query87	4855	4731	4670	4670
query88	3400	2193	2164	2164
query89	394	284	290	284
query90	2022	188	187	187
query91	133	102	106	102
query92	64	48	49	48
query93	1050	531	528	528
query94	793	271	287	271
query95	349	249	249	249
query96	621	272	278	272
query97	2880	2679	2719	2679
query98	220	203	199	199
query99	1541	1332	1284	1284
Total cold run time: 299694 ms
Total hot run time: 192400 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 31.8 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 62429aa9e74832fef70fb492ed4a713f8d84dd9e, data reload: false

query1	0.03	0.03	0.03
query2	0.07	0.02	0.03
query3	0.23	0.06	0.06
query4	1.64	0.10	0.10
query5	0.40	0.40	0.40
query6	1.15	0.64	0.65
query7	0.02	0.02	0.01
query8	0.04	0.02	0.03
query9	0.56	0.49	0.50
query10	0.56	0.56	0.55
query11	0.15	0.10	0.10
query12	0.13	0.14	0.11
query13	0.61	0.59	0.60
query14	2.84	2.72	2.81
query15	0.91	0.83	0.81
query16	0.41	0.36	0.40
query17	1.08	1.07	1.07
query18	0.23	0.22	0.22
query19	1.93	1.93	2.08
query20	0.01	0.02	0.01
query21	15.37	0.59	0.59
query22	2.42	2.66	1.28
query23	16.90	1.04	0.80
query24	3.07	0.80	1.47
query25	0.16	0.16	0.13
query26	0.49	0.13	0.13
query27	0.05	0.04	0.04
query28	10.74	1.08	1.06
query29	12.52	3.22	3.19
query30	0.24	0.06	0.06
query31	2.86	0.39	0.37
query32	3.27	0.46	0.46
query33	3.01	2.95	3.05
query34	17.17	4.44	4.44
query35	4.45	4.51	4.48
query36	0.66	0.49	0.48
query37	0.09	0.06	0.06
query38	0.04	0.03	0.03
query39	0.04	0.02	0.03
query40	0.15	0.13	0.13
query41	0.08	0.02	0.02
query42	0.03	0.02	0.03
query43	0.04	0.02	0.02
Total cold run time: 106.85 s
Total hot run time: 31.8 s

@Gabriel39
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TPC-H: Total hot run time: 41205 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 1376874de0598580131891d4f234711f5ff3095c, data reload: false

------ Round 1 ----------------------------------
q1	17589	7403	7274	7274
q2	2044	202	184	184
q3	10578	1102	1160	1102
q4	10565	852	849	849
q5	7781	3058	3077	3058
q6	236	150	146	146
q7	1001	618	625	618
q8	9372	1941	2003	1941
q9	6578	6363	6435	6363
q10	7105	2434	2410	2410
q11	459	257	260	257
q12	404	214	207	207
q13	17826	3040	3021	3021
q14	236	212	213	212
q15	582	524	513	513
q16	673	588	598	588
q17	970	561	496	496
q18	7255	6697	6756	6697
q19	1348	991	966	966
q20	482	178	177	177
q21	3918	3210	3115	3115
q22	1124	1024	1011	1011
Total cold run time: 108126 ms
Total hot run time: 41205 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7397	7190	7240	7190
q2	347	251	251	251
q3	2999	2927	2987	2927
q4	2039	1930	1793	1793
q5	5759	5764	5753	5753
q6	224	141	141	141
q7	2226	1882	1804	1804
q8	3393	3590	3478	3478
q9	8928	8847	8842	8842
q10	3622	3543	3552	3543
q11	605	509	511	509
q12	810	667	579	579
q13	11014	3218	3202	3202
q14	318	270	276	270
q15	627	540	555	540
q16	690	650	642	642
q17	1854	1615	1611	1611
q18	8320	7831	7712	7712
q19	1711	1612	1568	1568
q20	2122	1912	1868	1868
q21	5646	5438	5399	5399
q22	1145	1073	1030	1030
Total cold run time: 71796 ms
Total hot run time: 60652 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 194742 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 1376874de0598580131891d4f234711f5ff3095c, data reload: false

query1	2502	2125	2108	2108
query2	6251	2093	2070	2070
query3	15048	11826	237	237
query4	33151	23715	23559	23559
query5	3545	443	440	440
query6	267	185	181	181
query7	4000	295	295	295
query8	287	232	226	226
query9	9539	2673	2667	2667
query10	461	251	262	251
query11	17804	15249	15348	15249
query12	146	103	96	96
query13	1582	423	423	423
query14	10059	7636	7517	7517
query15	272	184	191	184
query16	8124	486	434	434
query17	1722	594	586	586
query18	2509	638	635	635
query19	399	189	192	189
query20	133	115	114	114
query21	209	122	116	116
query22	4907	4172	4236	4172
query23	34855	33945	34117	33945
query24	11606	3337	3243	3243
query25	598	409	395	395
query26	866	181	178	178
query27	2004	287	289	287
query28	6815	2431	2417	2417
query29	786	431	423	423
query30	398	321	322	321
query31	1127	803	781	781
query32	91	55	59	55
query33	779	283	277	277
query34	908	521	532	521
query35	905	731	735	731
query36	1114	954	958	954
query37	125	76	70	70
query38	4320	4202	4280	4202
query39	1466	1451	1425	1425
query40	203	101	99	99
query41	48	46	46	46
query42	109	99	106	99
query43	538	490	495	490
query44	1265	830	825	825
query45	186	164	172	164
query46	1145	697	703	697
query47	1918	1835	1826	1826
query48	420	317	328	317
query49	900	400	389	389
query50	803	398	406	398
query51	7367	7361	7144	7144
query52	99	88	87	87
query53	251	178	180	178
query54	1247	438	401	401
query55	78	73	76	73
query56	246	226	251	226
query57	1252	1162	1121	1121
query58	225	227	207	207
query59	3244	3096	3187	3096
query60	328	245	253	245
query61	113	117	113	113
query62	847	676	671	671
query63	216	189	183	183
query64	3890	660	618	618
query65	3299	3221	3180	3180
query66	903	298	301	298
query67	16072	15706	15633	15633
query68	4451	607	598	598
query69	432	253	261	253
query70	1177	1151	1107	1107
query71	321	256	254	254
query72	6335	4112	4028	4028
query73	765	360	369	360
query74	10197	8987	9000	8987
query75	3436	2663	2660	2660
query76	2676	1042	1099	1042
query77	373	279	276	276
query78	9921	9236	9198	9198
query79	1380	595	597	595
query80	927	417	431	417
query81	576	232	237	232
query82	732	120	113	113
query83	243	159	158	158
query84	235	75	75	75
query85	1177	316	292	292
query86	397	300	302	300
query87	4891	4626	4679	4626
query88	3486	2244	2160	2160
query89	415	285	289	285
query90	2017	190	188	188
query91	137	105	107	105
query92	58	48	49	48
query93	1777	555	571	555
query94	892	282	297	282
query95	352	248	260	248
query96	615	285	276	276
query97	2858	2717	2746	2717
query98	209	202	194	194
query99	1571	1336	1315	1315
Total cold run time: 303921 ms
Total hot run time: 194742 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 32.17 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 1376874de0598580131891d4f234711f5ff3095c, data reload: false

query1	0.04	0.04	0.03
query2	0.07	0.03	0.03
query3	0.23	0.06	0.06
query4	1.63	0.10	0.10
query5	0.43	0.39	0.40
query6	1.15	0.65	0.64
query7	0.02	0.03	0.01
query8	0.04	0.04	0.03
query9	0.58	0.48	0.50
query10	0.54	0.54	0.53
query11	0.13	0.10	0.10
query12	0.13	0.11	0.12
query13	0.61	0.59	0.60
query14	2.73	2.79	2.74
query15	0.91	0.83	0.83
query16	0.38	0.38	0.38
query17	1.10	1.09	0.96
query18	0.20	0.19	0.20
query19	1.87	1.84	1.86
query20	0.02	0.01	0.02
query21	15.35	0.60	0.57
query22	2.85	2.04	1.68
query23	16.99	0.90	0.81
query24	2.84	1.57	0.72
query25	0.25	0.16	0.26
query26	0.32	0.13	0.14
query27	0.06	0.05	0.04
query28	10.83	1.09	1.07
query29	12.55	3.19	3.20
query30	0.24	0.06	0.06
query31	2.88	0.38	0.38
query32	3.25	0.45	0.45
query33	3.01	3.06	3.06
query34	17.07	4.50	4.50
query35	4.53	4.52	4.52
query36	0.66	0.48	0.48
query37	0.09	0.06	0.06
query38	0.05	0.04	0.03
query39	0.04	0.02	0.03
query40	0.16	0.13	0.12
query41	0.08	0.02	0.02
query42	0.03	0.02	0.02
query43	0.03	0.03	0.03
Total cold run time: 106.97 s
Total hot run time: 32.17 s

@Gabriel39
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TPC-H: Total hot run time: 41838 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 30e9d611aca12e9d3bb369a833455112895e3b3a, data reload: false

------ Round 1 ----------------------------------
q1	17581	7551	7380	7380
q2	2084	178	175	175
q3	10537	1123	1228	1123
q4	10517	876	795	795
q5	7782	3113	3094	3094
q6	243	146	144	144
q7	1031	614	596	596
q8	9365	1997	2059	1997
q9	6615	6453	6525	6453
q10	7077	2432	2443	2432
q11	468	275	258	258
q12	406	213	211	211
q13	17909	2997	3041	2997
q14	238	225	228	225
q15	591	517	520	517
q16	657	598	598	598
q17	987	538	539	538
q18	7428	6796	6854	6796
q19	1337	1056	1066	1056
q20	482	190	180	180
q21	4068	3286	3341	3286
q22	1093	994	987	987
Total cold run time: 108496 ms
Total hot run time: 41838 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7315	7368	7334	7334
q2	355	250	249	249
q3	3156	3023	3004	3004
q4	2155	1817	1831	1817
q5	5882	5855	5857	5855
q6	226	145	143	143
q7	2299	1873	1881	1873
q8	3444	3544	3602	3544
q9	9057	9013	8963	8963
q10	3591	3605	3592	3592
q11	614	500	527	500
q12	864	637	657	637
q13	9603	3228	3264	3228
q14	310	281	290	281
q15	588	544	548	544
q16	709	629	650	629
q17	1866	1676	1629	1629
q18	8353	7747	7741	7741
q19	1770	1416	1594	1416
q20	2156	1877	1897	1877
q21	5753	5507	5487	5487
q22	1165	1065	1029	1029
Total cold run time: 71231 ms
Total hot run time: 61372 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 193966 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 30e9d611aca12e9d3bb369a833455112895e3b3a, data reload: false

query1	1227	763	778	763
query2	6239	2132	2135	2132
query3	15073	11499	225	225
query4	35823	23637	23594	23594
query5	3143	465	453	453
query6	280	199	203	199
query7	3989	299	303	299
query8	293	230	232	230
query9	9568	2682	2679	2679
query10	448	260	253	253
query11	16614	15145	15301	15145
query12	160	103	103	103
query13	1575	439	426	426
query14	8891	6840	7787	6840
query15	251	191	188	188
query16	8154	551	468	468
query17	1698	583	594	583
query18	2492	628	645	628
query19	384	189	188	188
query20	117	110	105	105
query21	201	107	101	101
query22	4605	4410	4385	4385
query23	34947	34402	34417	34402
query24	11521	3313	3357	3313
query25	658	419	404	404
query26	1257	178	179	178
query27	2338	286	282	282
query28	7465	2500	2431	2431
query29	854	438	425	425
query30	406	321	322	321
query31	985	814	818	814
query32	100	55	57	55
query33	749	282	284	282
query34	897	516	517	516
query35	881	775	736	736
query36	1138	955	972	955
query37	145	80	78	78
query38	4351	4305	4411	4305
query39	1487	1414	1418	1414
query40	205	102	100	100
query41	52	49	47	47
query42	107	99	101	99
query43	545	497	504	497
query44	1235	854	834	834
query45	185	167	169	167
query46	1170	715	717	715
query47	1992	1892	1856	1856
query48	411	315	328	315
query49	928	397	407	397
query50	847	383	393	383
query51	7297	7042	7122	7042
query52	100	91	87	87
query53	253	187	180	180
query54	1078	402	404	402
query55	77	75	78	75
query56	264	226	248	226
query57	1264	1153	1146	1146
query58	218	203	204	203
query59	3261	3019	3107	3019
query60	282	243	260	243
query61	114	108	113	108
query62	847	674	677	674
query63	212	187	185	185
query64	4331	682	660	660
query65	3254	3223	3232	3223
query66	770	327	310	310
query67	16130	15931	15847	15847
query68	4632	600	593	593
query69	445	252	264	252
query70	1228	1152	1099	1099
query71	344	258	242	242
query72	6316	4297	3944	3944
query73	763	353	356	353
query74	10351	8992	9066	8992
query75	3435	2690	2681	2681
query76	2385	1071	1021	1021
query77	371	266	270	266
query78	10415	9399	9405	9399
query79	1118	595	599	595
query80	963	439	430	430
query81	562	238	239	238
query82	281	116	118	116
query83	254	156	161	156
query84	242	72	73	72
query85	1335	331	315	315
query86	426	311	305	305
query87	4932	4649	4706	4649
query88	3467	2219	2180	2180
query89	394	291	291	291
query90	1952	186	184	184
query91	140	107	109	107
query92	55	50	49	49
query93	1119	549	544	544
query94	930	272	301	272
query95	355	248	246	246
query96	609	272	274	272
query97	2893	2717	2684	2684
query98	212	204	198	198
query99	1539	1283	1313	1283
Total cold run time: 303296 ms
Total hot run time: 193966 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 32.73 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 30e9d611aca12e9d3bb369a833455112895e3b3a, data reload: false

query1	0.04	0.03	0.03
query2	0.06	0.03	0.03
query3	0.23	0.06	0.06
query4	1.64	0.10	0.10
query5	0.40	0.40	0.41
query6	1.13	0.66	0.65
query7	0.02	0.01	0.03
query8	0.03	0.03	0.03
query9	0.56	0.50	0.50
query10	0.55	0.56	0.54
query11	0.15	0.10	0.10
query12	0.15	0.12	0.12
query13	0.62	0.60	0.60
query14	2.72	2.82	2.74
query15	0.89	0.83	0.83
query16	0.39	0.37	0.39
query17	1.08	1.02	1.10
query18	0.19	0.20	0.20
query19	1.90	1.86	2.00
query20	0.02	0.01	0.01
query21	15.36	0.60	0.59
query22	2.73	2.32	1.93
query23	17.08	0.92	0.80
query24	2.94	1.26	0.98
query25	0.32	0.09	0.08
query26	0.42	0.13	0.14
query27	0.05	0.05	0.03
query28	10.96	1.11	1.08
query29	12.86	3.31	3.29
query30	0.25	0.06	0.06
query31	2.87	0.38	0.38
query32	3.25	0.47	0.46
query33	3.02	3.02	3.04
query34	16.87	4.44	4.50
query35	4.53	4.48	4.54
query36	0.67	0.48	0.48
query37	0.09	0.06	0.07
query38	0.05	0.03	0.04
query39	0.03	0.02	0.03
query40	0.15	0.13	0.12
query41	0.08	0.02	0.02
query42	0.03	0.02	0.02
query43	0.04	0.03	0.03
Total cold run time: 107.42 s
Total hot run time: 32.73 s

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Nov 6, 2024
Copy link
Contributor

github-actions bot commented Nov 6, 2024

PR approved by at least one committer and no changes requested.

Copy link
Contributor

github-actions bot commented Nov 6, 2024

PR approved by anyone and no changes requested.

@Gabriel39 Gabriel39 merged commit b2e1c08 into apache:master Nov 6, 2024
33 of 35 checks passed
Gabriel39 added a commit to Gabriel39/incubator-doris that referenced this pull request Nov 6, 2024
… should be used (apache#43199)

A new knob to control a exchange node should be serial or not.
For example, a partitioned hash join should be executed like below:
```
┌────────────────────────────┐                  ┌────────────────────────────┐
│                            │                  │                            │
│Exchange(HASH PARTITIONED N)│                  │Exchange(HASH PARTITIONED N)│
│                            │                  │                            │
└────────────────────────────┴─────────┬────────┴────────────────────────────┘
                                       │
                                       │
                                       │
                                       │
                                       │
                                       │
                                ┌──────▼──────┐
                                │             │
                                │ HASH  JOIN  │
                                │             │
                                └─────────────┘
```

After turning on this knob, the real plan should be:
```
  ┌──────────────────────────────┐                        ┌──────────────────────────────┐
  │                              │                        │                              │
  │ Exchange (HASH PARTITIONED 1)│                        │ Exchange (HASH PARTITIONED 1)│
  │                              │                        │                              │
  └────────────┬─────────────────┘                        └────────────┬─────────────────┘
               │                                                       │
               │                                                       │
               │                                                       │
               │                                                       │
               │                                                       │
┌──────────────▼─────────────────────┐                  ┌──────────────▼─────────────────────┐
│                                    │                  │                                    │
│ Local  Exchange(HASH PARTITIONED N)│                  │ Local  Exchange(HASH PARTITIONED N)│
│              1 -> N                │                  │              1 -> N                │
└────────────────────────────────────┴─────────┬────────┴────────────────────────────────────┴
                                               │
                                               │
                                               │
                                               │
                                               │
                                               │
                                        ┌──────▼──────┐
                                        │             │
                                        │ HASH  JOIN  │
                                        │             │
                                        └─────────────┘
```

For large cluster, X (mappers) * Y (reducers) rpc channels can be
reduced to X (mappers) * Z (BEs).
Gabriel39 added a commit that referenced this pull request Nov 6, 2024
yiguolei added a commit to yiguolei/incubator-doris that referenced this pull request Nov 16, 2024
yiguolei added a commit to yiguolei/incubator-doris that referenced this pull request Nov 16, 2024
yiguolei added a commit that referenced this pull request Nov 18, 2024
Gabriel39 added a commit that referenced this pull request Nov 28, 2024
#44676)

… should be used

This improvement was completed in #43199 and reverted by #44075 due to performance fallback. After fixing it, this improvement is re-submited.

A new knob to control a exchange node should be serial or not.
For example, a partitioned hash join should be executed like below:
```
┌────────────────────────────┐                  ┌────────────────────────────┐
│                            │                  │                            │
│Exchange(HASH PARTITIONED N)│                  │Exchange(HASH PARTITIONED N)│
│                            │                  │                            │
└────────────────────────────┴─────────┬────────┴────────────────────────────┘
                                       │                                      
                                       │                                      
                                       │                                      
                                       │                                      
                                       │                                      
                                       │                                      
                                ┌──────▼──────┐                               
                                │             │                               
                                │ HASH  JOIN  │                               
                                │             │                               
                                └─────────────┘                               
```          

After turning on this knob, the real plan should be:
```
  ┌──────────────────────────────┐                        ┌──────────────────────────────┐    
  │                              │                        │                              │    
  │ Exchange (HASH PARTITIONED 1)│                        │ Exchange (HASH PARTITIONED 1)│    
  │                              │                        │                              │    
  └────────────┬─────────────────┘                        └────────────┬─────────────────┘    
               │                                                       │                      
               │                                                       │                      
               │                                                       │                      
               │                                                       │                      
               │                                                       │                      
┌──────────────▼─────────────────────┐                  ┌──────────────▼─────────────────────┐
│                                    │                  │                                    │
│ Local  Exchange(HASH PARTITIONED N)│                  │ Local  Exchange(HASH PARTITIONED N)│
│              1 -> N                │                  │              1 -> N                │
└────────────────────────────────────┴─────────┬────────┴────────────────────────────────────┴
                                               │                                              
                                               │                                              
                                               │                                              
                                               │                                              
                                               │                                              
                                               │                                              
                                        ┌──────▼──────┐                                       
                                        │             │                                       
                                        │ HASH  JOIN  │                                       
                                        │             │                                       
                                        └─────────────┘                                       
```

For large cluster, X (mappers) * Y (reducers) rpc channels can be reduced to X (mappers) * Z (BEs).
github-actions bot pushed a commit that referenced this pull request Nov 28, 2024
#44676)

… should be used

This improvement was completed in #43199 and reverted by #44075 due to performance fallback. After fixing it, this improvement is re-submited.

A new knob to control a exchange node should be serial or not.
For example, a partitioned hash join should be executed like below:
```
┌────────────────────────────┐                  ┌────────────────────────────┐
│                            │                  │                            │
│Exchange(HASH PARTITIONED N)│                  │Exchange(HASH PARTITIONED N)│
│                            │                  │                            │
└────────────────────────────┴─────────┬────────┴────────────────────────────┘
                                       │                                      
                                       │                                      
                                       │                                      
                                       │                                      
                                       │                                      
                                       │                                      
                                ┌──────▼──────┐                               
                                │             │                               
                                │ HASH  JOIN  │                               
                                │             │                               
                                └─────────────┘                               
```          

After turning on this knob, the real plan should be:
```
  ┌──────────────────────────────┐                        ┌──────────────────────────────┐    
  │                              │                        │                              │    
  │ Exchange (HASH PARTITIONED 1)│                        │ Exchange (HASH PARTITIONED 1)│    
  │                              │                        │                              │    
  └────────────┬─────────────────┘                        └────────────┬─────────────────┘    
               │                                                       │                      
               │                                                       │                      
               │                                                       │                      
               │                                                       │                      
               │                                                       │                      
┌──────────────▼─────────────────────┐                  ┌──────────────▼─────────────────────┐
│                                    │                  │                                    │
│ Local  Exchange(HASH PARTITIONED N)│                  │ Local  Exchange(HASH PARTITIONED N)│
│              1 -> N                │                  │              1 -> N                │
└────────────────────────────────────┴─────────┬────────┴────────────────────────────────────┴
                                               │                                              
                                               │                                              
                                               │                                              
                                               │                                              
                                               │                                              
                                               │                                              
                                        ┌──────▼──────┐                                       
                                        │             │                                       
                                        │ HASH  JOIN  │                                       
                                        │             │                                       
                                        └─────────────┘                                       
```

For large cluster, X (mappers) * Y (reducers) rpc channels can be reduced to X (mappers) * Z (BEs).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. dev/3.0.3-merged reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants