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](spill) spill trigger improvement #32641

Merged
merged 4 commits into from
Mar 29, 2024

Conversation

jacktengg
Copy link
Contributor

Proposed changes

Issue Number: close #xxx

Further comments

If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...

@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.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@@ -48,15 +48,25 @@ Status PartitionedHashJoinSinkLocalState::open(RuntimeState* state) {
RETURN_IF_ERROR(PipelineXSinkLocalState::open(state));
return _partitioner->open(state);
}
Status PartitionedHashJoinSinkLocalState::close(RuntimeState* state, Status exec_status) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'close' can be made static [readability-convert-member-functions-to-static]

be/src/pipeline/exec/partitioned_hash_join_sink_operator.h:48:

-     Status close(RuntimeState* state, Status exec_status) override;
+     static Status close(RuntimeState* state, Status exec_status) override;

_weighted_consumption = _consumption->current_value() * ratio;
_weighted_limit = weighted_limit;
}
void get_weighted_mem_info(int64_t& weighted_limit, int64_t& weighted_consumption) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'get_weighted_mem_info' can be made const [readability-make-member-function-const]

Suggested change
void get_weighted_mem_info(int64_t& weighted_limit, int64_t& weighted_consumption) {
void get_weighted_mem_info(int64_t& weighted_limit, int64_t& weighted_consumption) const {

be/src/runtime/workload_group/workload_group.h Outdated Show resolved Hide resolved
bool is_high_wartermark = false;
double mem_used_ratio = 0;
};
void WorkloadGroupMgr::refresh_wg_used_memory() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: method 'refresh_wg_used_memory' can be made static [readability-convert-member-functions-to-static]

be/src/runtime/workload_group/workload_group_manager.h:56:

-     void refresh_wg_used_memory();
+     static void refresh_wg_used_memory();

bool is_high_wartermark = false;
double mem_used_ratio = 0;
};
void WorkloadGroupMgr::refresh_wg_used_memory() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: function 'refresh_wg_used_memory' exceeds recommended size/complexity thresholds [readability-function-size]

void WorkloadGroupMgr::refresh_wg_used_memory() {
                       ^
Additional context

be/src/runtime/workload_group/workload_group_manager.cpp:146: 106 lines including whitespace and comments (threshold 80)

void WorkloadGroupMgr::refresh_wg_used_memory() {
                       ^

@@ -35,13 +35,19 @@ Status SpillWriter::open() {
return Status::OK();
}

SpillWriter::~SpillWriter() {
if (!closed_) {
LOG(WARNING) << "spill writer not closed correctly:\n" << boost::stacktrace::stacktrace();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not use this way, boost has a static global lock.
Using doris::Status wrapped error stack, you could use it.

@@ -97,11 +97,11 @@ TExprNode create_texpr_node_from(const void* data, const PrimitiveType& type, in
break;
}
case TYPE_DATEV2: {
THROW_IF_ERROR(create_texpr_literal_node<TYPE_DATEV2>(data, &node));
THROW_IF_ERROR(create_texpr_literal_node<TYPE_DATEV2>(data, &node, precision, scale));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These code is not related with this PR.

@@ -462,6 +472,10 @@ Status PartitionedHashJoinProbeOperatorX::open(RuntimeState* state) {
Status PartitionedHashJoinProbeOperatorX::push(RuntimeState* state, vectorized::Block* input_block,
bool eos) const {
auto& local_state = get_local_state(state);
if (!local_state._is_running) {
Copy link
Contributor

@yiguolei yiguolei Mar 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could implement 2 method in parent class:
inc_running_big_mem_op_num(){
if (not add) {
get_query_ctx()->inc_running_big_mem_op_num;
not_add=true;
}
}

dec_big_mem_op_num(){
if (not_add) {
log_fatal<<} else if (!_dec) {
query_ctx->dec;
_dec=true;
}
}

then all subclass could use this method.

@jacktengg jacktengg force-pushed the new-spill-to-disk-trigger-improve branch from c893b72 to d29b975 Compare March 25, 2024 09:25
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@jacktengg jacktengg force-pushed the new-spill-to-disk-trigger-improve branch 2 times, most recently from f6e85b1 to 0e279b3 Compare March 25, 2024 09:32
@jacktengg
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17609	4243	4132	4132
q2	2119	165	166	165
q3	10565	1109	1197	1109
q4	10231	748	799	748
q5	7458	2965	2995	2965
q6	204	123	123	123
q7	1037	613	567	567
q8	9333	2032	1950	1950
q9	7469	6644	6598	6598
q10	8487	3430	3593	3430
q11	432	227	214	214
q12	432	204	199	199
q13	17809	2889	2866	2866
q14	231	207	213	207
q15	515	476	460	460
q16	501	379	372	372
q17	963	648	538	538
q18	7175	6607	6545	6545
q19	1542	1446	1468	1446
q20	560	253	240	240
q21	3555	2903	2903	2903
q22	352	296	293	293
Total cold run time: 108579 ms
Total hot run time: 38070 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4107	4089	4099	4089
q2	342	232	233	232
q3	2980	2863	2805	2805
q4	1900	1546	1552	1546
q5	5343	5354	5336	5336
q6	195	115	116	115
q7	2218	1871	1863	1863
q8	3159	3277	3280	3277
q9	8715	8729	8694	8694
q10	3822	3790	3715	3715
q11	555	461	445	445
q12	714	530	548	530
q13	12652	2853	2874	2853
q14	285	273	257	257
q15	502	459	464	459
q16	482	428	421	421
q17	1735	1508	1481	1481
q18	7403	7190	7086	7086
q19	1615	1567	1553	1553
q20	1899	1754	1717	1717
q21	4803	4746	4768	4746
q22	534	454	439	439
Total cold run time: 65960 ms
Total hot run time: 53659 ms

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 35.23% (8733/24790)
Line Coverage: 27.03% (71513/264560)
Region Coverage: 26.28% (37103/141203)
Branch Coverage: 23.17% (18971/81894)
Coverage Report: http://coverage.selectdb-in.cc/coverage/0e279b3fac84fecc43a2e6fc9829bd07ba245b4f_0e279b3fac84fecc43a2e6fc9829bd07ba245b4f/report/index.html

@doris-robot
Copy link

TPC-DS: Total hot run time: 186969 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 0e279b3fac84fecc43a2e6fc9829bd07ba245b4f, data reload: false

query1	936	377	352	352
query2	7359	2040	1915	1915
query3	6702	209	214	209
query4	31799	21232	21659	21232
query5	4343	419	409	409
query6	278	175	181	175
query7	4625	295	301	295
query8	228	169	174	169
query9	9298	2251	2265	2251
query10	576	248	250	248
query11	17279	14404	14418	14404
query12	139	85	87	85
query13	1642	424	425	424
query14	14907	11366	11591	11366
query15	317	194	214	194
query16	8209	263	261	261
query17	2076	595	558	558
query18	2108	289	287	287
query19	368	160	158	158
query20	94	89	90	89
query21	210	130	130	130
query22	4982	4751	4726	4726
query23	33556	32542	32546	32542
query24	10721	2898	2897	2897
query25	632	413	393	393
query26	1386	157	163	157
query27	2949	364	364	364
query28	7430	1914	1885	1885
query29	892	623	640	623
query30	306	155	155	155
query31	954	740	727	727
query32	95	58	58	58
query33	741	329	253	253
query34	910	489	494	489
query35	828	600	618	600
query36	1008	876	916	876
query37	116	78	78	78
query38	3527	3491	3451	3451
query39	1486	1402	1420	1402
query40	224	119	112	112
query41	48	49	47	47
query42	103	96	100	96
query43	470	449	462	449
query44	1154	737	745	737
query45	276	272	265	265
query46	1129	704	700	700
query47	1917	1861	1862	1861
query48	461	356	365	356
query49	1110	361	338	338
query50	776	375	372	372
query51	6803	6748	6758	6748
query52	98	97	90	90
query53	350	275	271	271
query54	324	238	245	238
query55	81	78	80	78
query56	246	229	230	229
query57	1204	1123	1136	1123
query58	226	199	201	199
query59	2855	2653	2596	2596
query60	285	244	253	244
query61	98	107	99	99
query62	670	458	444	444
query63	307	278	283	278
query64	5407	4070	4034	4034
query65	3103	3016	3036	3016
query66	1480	376	355	355
query67	15361	14828	14675	14675
query68	7045	528	515	515
query69	617	380	382	380
query70	1251	1175	1146	1146
query71	531	288	274	274
query72	6248	2720	2542	2542
query73	755	321	311	311
query74	8543	6640	6736	6640
query75	4116	2784	2911	2784
query76	5002	902	884	884
query77	652	300	270	270
query78	10776	10286	10080	10080
query79	6889	521	527	521
query80	1316	422	419	419
query81	514	214	221	214
query82	364	213	208	208
query83	226	150	152	150
query84	298	87	85	85
query85	1142	398	367	367
query86	373	307	306	306
query87	3735	3554	3523	3523
query88	4813	2424	2414	2414
query89	475	376	364	364
query90	2088	178	180	178
query91	172	136	143	136
query92	65	49	47	47
query93	5743	493	483	483
query94	1220	179	176	176
query95	430	324	332	324
query96	620	273	280	273
query97	3059	2901	2872	2872
query98	232	218	222	218
query99	1151	930	928	928
Total cold run time: 313039 ms
Total hot run time: 186969 ms

@doris-robot
Copy link

Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'

Load test result on commit 0e279b3fac84fecc43a2e6fc9829bd07ba245b4f with default session variables
Stream load json:         18 seconds loaded 2358488459 Bytes, about 124 MB/s
Stream load orc:          60 seconds loaded 1101869774 Bytes, about 17 MB/s
Stream load parquet:      32 seconds loaded 861443392 Bytes, about 25 MB/s
Insert into select:       22.0 seconds inserted 10000000 Rows, about 454K ops/s

@jacktengg jacktengg force-pushed the new-spill-to-disk-trigger-improve branch 2 times, most recently from 074178e to e178335 Compare March 27, 2024 03:42
@jacktengg
Copy link
Contributor Author

run buildall

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	18359	4551	4252	4252
q2	2595	166	177	166
q3	11115	1158	1219	1158
q4	10864	825	849	825
q5	7774	3081	3066	3066
q6	218	129	128	128
q7	1078	643	588	588
q8	9590	2073	2042	2042
q9	7348	6672	6573	6573
q10	8380	3424	3574	3424
q11	418	233	217	217
q12	369	211	203	203
q13	17795	2904	2870	2870
q14	241	203	200	200
q15	505	460	454	454
q16	470	381	373	373
q17	967	529	626	529
q18	7174	6528	6574	6528
q19	1560	1434	1492	1434
q20	545	249	247	247
q21	3648	2978	2909	2909
q22	356	284	292	284
Total cold run time: 111369 ms
Total hot run time: 38470 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4114	4084	4107	4084
q2	328	227	231	227
q3	2983	2860	2961	2860
q4	1902	1593	1600	1593
q5	5331	5346	5356	5346
q6	194	115	117	115
q7	2288	1856	1885	1856
q8	3175	3292	3331	3292
q9	8810	8731	8788	8731
q10	3830	3793	3798	3793
q11	543	446	449	446
q12	714	544	541	541
q13	16567	2865	2880	2865
q14	279	248	270	248
q15	499	459	462	459
q16	480	429	430	429
q17	1747	1526	1496	1496
q18	7528	7201	7244	7201
q19	1623	1548	1511	1511
q20	1891	1737	1702	1702
q21	4893	4804	4733	4733
q22	548	430	427	427
Total cold run time: 70267 ms
Total hot run time: 53955 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 181926 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 e1783354448196d335626f926218759a3286ec2e, data reload: false

query1	926	369	352	352
query2	6547	1890	1840	1840
query3	6701	213	215	213
query4	31457	21417	21308	21308
query5	4318	413	400	400
query6	272	181	192	181
query7	4624	288	285	285
query8	229	169	171	169
query9	9277	2307	2277	2277
query10	557	243	249	243
query11	15277	14252	14268	14252
query12	135	90	93	90
query13	1623	415	429	415
query14	10233	7626	8040	7626
query15	243	204	191	191
query16	8233	266	262	262
query17	1960	591	556	556
query18	2104	301	286	286
query19	359	160	161	160
query20	100	89	88	88
query21	204	128	131	128
query22	5101	4849	4798	4798
query23	33344	32743	32746	32743
query24	10814	2879	2875	2875
query25	627	388	385	385
query26	1398	157	161	157
query27	2957	357	357	357
query28	7618	1913	1894	1894
query29	909	642	634	634
query30	302	156	149	149
query31	976	728	752	728
query32	86	57	57	57
query33	770	260	250	250
query34	1049	485	490	485
query35	847	609	605	605
query36	1013	871	887	871
query37	130	64	69	64
query38	3530	3394	3466	3394
query39	1466	1458	1460	1458
query40	205	111	114	111
query41	48	47	46	46
query42	104	95	94	94
query43	485	440	447	440
query44	1203	724	730	724
query45	253	265	264	264
query46	1108	748	711	711
query47	1935	1839	1836	1836
query48	447	387	347	347
query49	1101	330	332	330
query50	764	374	372	372
query51	6699	6631	6595	6595
query52	102	96	91	91
query53	351	272	271	271
query54	289	228	240	228
query55	87	85	83	83
query56	245	222	219	219
query57	1227	1141	1128	1128
query58	235	206	201	201
query59	2698	2567	2639	2567
query60	267	238	242	238
query61	96	91	91	91
query62	658	463	441	441
query63	303	281	274	274
query64	5804	4034	3993	3993
query65	3130	3047	3021	3021
query66	1425	372	347	347
query67	15263	15201	14903	14903
query68	5359	521	525	521
query69	574	374	362	362
query70	1196	1153	1071	1071
query71	405	264	272	264
query72	6343	2885	2675	2675
query73	703	316	320	316
query74	7020	6571	6513	6513
query75	2950	2266	2214	2214
query76	3545	911	908	908
query77	418	271	266	266
query78	10855	10307	10127	10127
query79	8706	527	528	527
query80	2120	400	395	395
query81	560	220	217	217
query82	1385	93	86	86
query83	290	149	149	149
query84	293	84	84	84
query85	2195	323	314	314
query86	502	287	293	287
query87	3702	3572	3548	3548
query88	4931	2322	2314	2314
query89	553	384	373	373
query90	1993	181	179	179
query91	169	140	139	139
query92	66	47	47	47
query93	6534	504	492	492
query94	1243	181	180	180
query95	439	331	334	331
query96	601	274	278	274
query97	2675	2498	2473	2473
query98	239	225	207	207
query99	1240	900	881	881
Total cold run time: 304652 ms
Total hot run time: 181926 ms

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 35.22% (8741/24816)
Line Coverage: 27.01% (71551/264859)
Region Coverage: 26.27% (37132/141340)
Branch Coverage: 23.16% (18982/81952)
Coverage Report: http://coverage.selectdb-in.cc/coverage/e1783354448196d335626f926218759a3286ec2e_e1783354448196d335626f926218759a3286ec2e/report/index.html

@doris-robot
Copy link

Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'

Load test result on commit e1783354448196d335626f926218759a3286ec2e with default session variables
Stream load json:         19 seconds loaded 2358488459 Bytes, about 118 MB/s
Stream load orc:          59 seconds loaded 1101869774 Bytes, about 17 MB/s
Stream load parquet:      31 seconds loaded 861443392 Bytes, about 26 MB/s
Insert into select:       13.7 seconds inserted 10000000 Rows, about 729K ops/s

@jacktengg jacktengg force-pushed the new-spill-to-disk-trigger-improve branch from e178335 to 615fff1 Compare March 28, 2024 02:10
@jacktengg
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17601	4755	4141	4141
q2	2108	154	157	154
q3	10654	1158	1223	1158
q4	10232	829	772	772
q5	7453	3067	2958	2958
q6	200	123	124	123
q7	1101	594	572	572
q8	9355	2018	2030	2018
q9	7370	6689	6609	6609
q10	8462	3488	3563	3488
q11	438	224	213	213
q12	425	193	193	193
q13	17789	2892	2854	2854
q14	241	200	208	200
q15	512	462	465	462
q16	503	378	387	378
q17	959	565	611	565
q18	7086	6574	6358	6358
q19	3989	1378	1430	1378
q20	555	258	262	258
q21	3548	2813	2990	2813
q22	365	293	300	293
Total cold run time: 110946 ms
Total hot run time: 37958 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4147	4124	4041	4041
q2	332	233	227	227
q3	3082	2880	2847	2847
q4	1875	1552	1561	1552
q5	5302	5367	5330	5330
q6	195	117	117	117
q7	2225	1849	1853	1849
q8	3190	3319	3317	3317
q9	8716	8702	8670	8670
q10	3825	3787	3777	3777
q11	530	452	438	438
q12	711	560	550	550
q13	16928	2867	2856	2856
q14	285	249	254	249
q15	501	467	464	464
q16	484	423	419	419
q17	1740	1527	1471	1471
q18	7471	7148	7000	7000
q19	1624	1547	1548	1547
q20	1911	1739	1709	1709
q21	4936	4770	4693	4693
q22	542	427	460	427
Total cold run time: 70552 ms
Total hot run time: 53550 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 181686 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 615fff13fc8d598fd9aad875a0fb730eabc282d0, data reload: false

query1	927	365	355	355
query2	6535	2044	1843	1843
query3	6700	215	207	207
query4	31645	21303	21350	21303
query5	4419	395	400	395
query6	269	188	172	172
query7	4634	297	294	294
query8	227	167	165	165
query9	9350	2287	2275	2275
query10	567	252	246	246
query11	17232	14208	14192	14192
query12	139	94	87	87
query13	1626	414	429	414
query14	9618	7643	7571	7571
query15	243	207	199	199
query16	8158	271	281	271
query17	1938	579	539	539
query18	2103	281	269	269
query19	283	148	147	147
query20	96	83	85	83
query21	199	129	123	123
query22	5141	4820	4812	4812
query23	33463	32680	33122	32680
query24	10744	2839	2819	2819
query25	586	364	357	357
query26	1219	150	151	150
query27	3002	353	356	353
query28	7598	1901	1862	1862
query29	856	614	604	604
query30	293	147	146	146
query31	941	714	737	714
query32	94	56	52	52
query33	760	256	252	252
query34	1062	480	498	480
query35	818	620	604	604
query36	1003	911	901	901
query37	124	66	66	66
query38	3560	3415	3421	3415
query39	1468	1440	1436	1436
query40	227	113	111	111
query41	47	45	45	45
query42	102	92	95	92
query43	492	461	458	458
query44	1206	732	727	727
query45	264	262	273	262
query46	1114	715	694	694
query47	1889	1840	1840	1840
query48	436	359	355	355
query49	1119	328	331	328
query50	753	364	365	364
query51	6662	6619	6597	6597
query52	95	90	89	89
query53	342	270	270	270
query54	284	230	230	230
query55	84	80	78	78
query56	243	216	214	214
query57	1214	1148	1130	1130
query58	227	203	199	199
query59	2800	2548	2591	2548
query60	258	232	239	232
query61	100	95	95	95
query62	655	453	457	453
query63	316	276	276	276
query64	5725	4202	4149	4149
query65	3059	3027	3051	3027
query66	949	386	369	369
query67	15297	14930	14908	14908
query68	5281	520	520	520
query69	568	377	371	371
query70	1246	1161	1177	1161
query71	405	271	266	266
query72	6510	2865	2682	2682
query73	714	316	324	316
query74	7221	6495	6542	6495
query75	2988	2266	2239	2239
query76	3483	847	859	847
query77	389	271	257	257
query78	10964	10142	10146	10142
query79	8327	515	517	515
query80	1896	395	408	395
query81	557	223	222	222
query82	1580	86	89	86
query83	307	155	149	149
query84	293	82	82	82
query85	1731	317	312	312
query86	496	307	289	289
query87	3723	3478	3590	3478
query88	5224	2383	2284	2284
query89	522	362	377	362
query90	1943	176	178	176
query91	171	138	137	137
query92	66	50	47	47
query93	6118	486	485	485
query94	1257	178	174	174
query95	444	333	336	333
query96	587	266	269	266
query97	2689	2497	2473	2473
query98	227	213	208	208
query99	1200	935	924	924
Total cold run time: 304726 ms
Total hot run time: 181686 ms

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 35.22% (8741/24817)
Line Coverage: 27.00% (71549/265007)
Region Coverage: 26.25% (37121/141401)
Branch Coverage: 23.15% (18981/81990)
Coverage Report: http://coverage.selectdb-in.cc/coverage/615fff13fc8d598fd9aad875a0fb730eabc282d0_615fff13fc8d598fd9aad875a0fb730eabc282d0/report/index.html

@doris-robot
Copy link

Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'

Load test result on commit 615fff13fc8d598fd9aad875a0fb730eabc282d0 with default session variables
Stream load json:         18 seconds loaded 2358488459 Bytes, about 124 MB/s
Stream load orc:          59 seconds loaded 1101869774 Bytes, about 17 MB/s
Stream load parquet:      31 seconds loaded 861443392 Bytes, about 26 MB/s
Insert into select:       13.8 seconds inserted 10000000 Rows, about 724K ops/s

@@ -128,6 +129,7 @@ Status PartitionedAggSourceOperatorX::close(RuntimeState* state) {
Status PartitionedAggSourceOperatorX::get_block(RuntimeState* state, vectorized::Block* block,
bool* eos) {
auto& local_state = get_local_state(state);
local_state.inc_running_big_mem_op_num(state);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need check local state's count.
Only operator is ok?


const auto min_revocable_mem_bytes = state->min_revocable_mem();

auto tg = query_ctx->workload_group();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If tg == nullptr then return false; to avoid core when there is no workload group bind to this query. And print log in this case.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not use tg. tg is old name "task group", use wg

yiguolei
yiguolei previously approved these changes Mar 29, 2024
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Mar 29, 2024
Copy link
Contributor

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

Copy link
Contributor

PR approved by anyone and no changes requested.

@jacktengg jacktengg force-pushed the new-spill-to-disk-trigger-improve branch from df0ddde to 243b57b Compare March 29, 2024 04:53
@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Mar 29, 2024
@jacktengg jacktengg force-pushed the new-spill-to-disk-trigger-improve branch from 243b57b to 7943882 Compare March 29, 2024 04:55
@jacktengg jacktengg force-pushed the new-spill-to-disk-trigger-improve branch from 7943882 to 58807ff Compare March 29, 2024 05:00
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@jacktengg jacktengg force-pushed the new-spill-to-disk-trigger-improve branch from 58807ff to c8f6c47 Compare March 29, 2024 05:21
@jacktengg
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17638	4315	4162	4162
q2	2111	155	146	146
q3	10593	1139	1216	1139
q4	10226	786	818	786
q5	7469	2976	2913	2913
q6	205	124	128	124
q7	1038	584	578	578
q8	9328	2024	2028	2024
q9	6977	6395	6364	6364
q10	8422	3461	3549	3461
q11	419	230	218	218
q12	425	205	190	190
q13	17808	2841	2864	2841
q14	227	214	208	208
q15	509	479	461	461
q16	474	363	367	363
q17	954	530	622	530
q18	7192	6663	6546	6546
q19	1659	1462	1430	1430
q20	573	268	266	266
q21	3686	2936	2922	2922
q22	342	298	318	298
Total cold run time: 108275 ms
Total hot run time: 37970 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4169	4110	4098	4098
q2	327	232	226	226
q3	2955	2859	2865	2859
q4	1885	1538	1615	1538
q5	5202	5227	5240	5227
q6	199	119	119	119
q7	2192	1826	1818	1818
q8	3175	3340	3303	3303
q9	8478	8443	8452	8443
q10	3820	3858	3950	3858
q11	586	467	465	465
q12	757	575	579	575
q13	17028	3034	3082	3034
q14	292	270	279	270
q15	540	479	478	478
q16	494	466	449	449
q17	1793	1530	1550	1530
q18	8135	7797	7655	7655
q19	2884	1553	1588	1553
q20	2010	1883	1702	1702
q21	4947	4784	4885	4784
q22	557	476	486	476
Total cold run time: 72425 ms
Total hot run time: 54460 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 182069 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 c8f6c475195c6fa5512777393f6824eb63ce1a44, data reload: false

query1	1199	1112	1096	1096
query2	6352	2065	1975	1975
query3	6696	220	218	218
query4	34666	21377	21436	21377
query5	4268	375	373	373
query6	266	182	181	181
query7	4635	302	291	291
query8	215	181	177	177
query9	9790	2212	2202	2202
query10	447	264	243	243
query11	17133	14228	14228	14228
query12	124	83	85	83
query13	1623	421	416	416
query14	11057	7042	7040	7040
query15	207	170	171	170
query16	6823	250	271	250
query17	1702	592	555	555
query18	1390	292	278	278
query19	244	152	158	152
query20	90	86	84	84
query21	199	129	125	125
query22	4978	4794	4738	4738
query23	33462	32712	33024	32712
query24	11309	2882	2959	2882
query25	646	406	411	406
query26	1155	157	160	157
query27	3318	373	390	373
query28	7946	1878	1942	1878
query29	916	691	652	652
query30	305	152	150	150
query31	1014	756	732	732
query32	85	57	54	54
query33	706	263	248	248
query34	1250	507	516	507
query35	869	728	720	720
query36	1034	924	916	916
query37	110	64	67	64
query38	3701	3644	3634	3634
query39	1675	1588	1566	1566
query40	176	108	112	108
query41	50	57	45	45
query42	109	105	100	100
query43	508	461	471	461
query44	1344	759	757	757
query45	280	254	277	254
query46	1128	734	742	734
query47	2013	1928	1935	1928
query48	471	368	368	368
query49	883	312	344	312
query50	818	410	411	410
query51	6885	6768	6892	6768
query52	106	89	103	89
query53	354	280	282	280
query54	279	234	225	225
query55	88	84	77	77
query56	238	217	213	213
query57	1328	1165	1197	1165
query58	234	201	206	201
query59	2958	2532	2641	2532
query60	239	230	223	223
query61	98	93	104	93
query62	611	446	442	442
query63	305	276	275	275
query64	5684	4076	3984	3984
query65	3088	3003	2985	2985
query66	1182	338	328	328
query67	15545	14738	14806	14738
query68	9838	527	528	527
query69	700	374	371	371
query70	1366	1147	1130	1130
query71	575	268	270	268
query72	7051	2565	2361	2361
query73	1566	326	331	326
query74	8146	6466	6345	6345
query75	5191	2246	2266	2246
query76	6477	903	927	903
query77	575	228	231	228
query78	11800	10480	10189	10189
query79	12092	526	519	519
query80	1889	353	347	347
query81	497	210	205	205
query82	168	82	82	82
query83	228	137	141	137
query84	279	77	77	77
query85	921	325	317	317
query86	353	286	291	286
query87	3654	3487	3502	3487
query88	6185	2314	2306	2306
query89	483	371	360	360
query90	2555	171	167	167
query91	171	153	134	134
query92	60	43	45	43
query93	6036	487	482	482
query94	1616	177	172	172
query95	408	291	303	291
query96	628	277	263	263
query97	2689	2497	2461	2461
query98	222	213	219	213
query99	1043	828	854	828
Total cold run time: 326069 ms
Total hot run time: 182069 ms

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 35.56% (8839/24858)
Line Coverage: 27.29% (72455/265547)
Region Coverage: 26.51% (37528/141569)
Branch Coverage: 23.31% (19129/82066)
Coverage Report: http://coverage.selectdb-in.cc/coverage/c8f6c475195c6fa5512777393f6824eb63ce1a44_c8f6c475195c6fa5512777393f6824eb63ce1a44/report/index.html

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.06	0.02	0.02
query3	0.22	0.06	0.06
query4	1.65	0.09	0.10
query5	0.50	0.48	0.47
query6	1.14	0.66	0.63
query7	0.01	0.01	0.02
query8	0.04	0.02	0.03
query9	0.55	0.50	0.50
query10	0.54	0.54	0.55
query11	0.12	0.09	0.09
query12	0.11	0.09	0.09
query13	0.58	0.58	0.59
query14	0.74	0.76	0.77
query15	0.81	0.78	0.79
query16	0.36	0.40	0.37
query17	0.92	1.04	0.95
query18	0.21	0.22	0.24
query19	1.79	1.75	1.68
query20	0.01	0.02	0.02
query21	15.54	0.57	0.56
query22	2.68	2.73	1.15
query23	17.13	0.84	0.73
query24	3.32	2.16	1.38
query25	0.19	0.14	0.20
query26	0.63	0.14	0.12
query27	0.04	0.03	0.03
query28	10.43	0.86	0.83
query29	12.52	3.24	3.20
query30	0.27	0.09	0.08
query31	2.82	0.36	0.36
query32	3.33	0.43	0.45
query33	2.77	2.78	2.84
query34	16.16	4.38	4.32
query35	4.41	4.43	4.45
query36	0.66	0.47	0.46
query37	0.08	0.06	0.06
query38	0.05	0.03	0.04
query39	0.04	0.02	0.02
query40	0.17	0.13	0.14
query41	0.07	0.02	0.02
query42	0.02	0.02	0.02
query43	0.02	0.02	0.03
Total cold run time: 103.75 s
Total hot run time: 29.21 s

@doris-robot
Copy link

Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'

Load test result on commit c8f6c475195c6fa5512777393f6824eb63ce1a44 with default session variables
Stream load json:         18 seconds loaded 2358488459 Bytes, about 124 MB/s
Stream load orc:          58 seconds loaded 1101869774 Bytes, about 18 MB/s
Stream load parquet:      31 seconds loaded 861443392 Bytes, about 26 MB/s
Insert into select:       13.9 seconds inserted 10000000 Rows, about 719K ops/s

Copy link
Member

@mrhhsg mrhhsg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

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

@yiguolei yiguolei merged commit 8780646 into apache:master Mar 29, 2024
24 of 30 checks passed
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. reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants