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

[enhancement](cloud) batching get visible version from MetaService #34615

Merged
merged 3 commits into from
Jun 28, 2024

Conversation

freemandealer
Copy link
Contributor

@freemandealer freemandealer commented May 9, 2024

Get visible versions one by one from MetaService is costly. Batching them into one RPC will not only reduce the workload of RPC service but also reduce the lag.

@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

clang-tidy review says "All clean, LGTM! 👍"

2 similar comments
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@freemandealer freemandealer marked this pull request as ready for review May 14, 2024 08:42
@freemandealer
Copy link
Contributor Author

run buildall

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@gavinchou gavinchou requested a review from 924060929 May 14, 2024 08:54
@@ -253,16 +257,28 @@ private boolean tablesOrDataChanged(Env env, SqlCacheContext sqlCacheContext) {
return true;
}
OlapTable olapTable = (OlapTable) tableIf;
long currentTableTime = olapTable.getVisibleVersionTime();
long cacheTableTime = scanTable.latestTimestamp;
//long currentTableTime = olapTable.getVisibleVersionTime();
Copy link
Collaborator

Choose a reason for hiding this comment

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

revmove unused code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, will do after all these p0 cases passes.

@@ -662,6 +663,7 @@ message CommitTxnResponse {
repeated int64 partition_ids = 4;
repeated int64 versions = 5;
repeated TableStatsPB table_stats = 6;
optional int64 version_update_time = 7;
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is this for? Why is version_update_time related to RecycleTxnPB

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They are for batch and single respectively. What makes you think the relation ever existed?

@@ -759,6 +761,8 @@ message GetVersionResponse {
repeated int64 table_ids = 4;
repeated int64 partition_ids = 5;
repeated int64 versions = 6;
repeated int64 version_update_times = 7;
Copy link
Collaborator

Choose a reason for hiding this comment

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

what's the single and multiple update_time for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ditto

@@ -1043,10 +1043,14 @@ void MetaServiceImpl::commit_txn(::google::protobuf::RpcController* controller,
}

// Save versions
int64_t version_update_time =
Copy link
Collaborator

Choose a reason for hiding this comment

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

add time unit as suffix
e.g. version_update_time_ms

pls. check all the other occurrences

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, will do

Comment on lines 706 to 718
if (Config.isCloudMode()) {
Collection<Long> partitionIds = node.getSelectedPartitionIds();
List<CloudPartition> partitions = partitionIds.stream()
.sorted()
.map(olapTable::getPartition)
.map(partition -> (CloudPartition) partition)
.collect(Collectors.toList());
try {
CloudPartition.getSnapshotVisibleVersion(partitions);
} catch (RpcException e) {
throw new RuntimeException(e);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

add comment to explain it

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@freemandealer
Copy link
Contributor Author

run buildall

@@ -261,6 +261,7 @@ void MetaServiceImpl::get_version(::google::protobuf::RpcController* controller,
return;
}
response->set_version(version);
// TODO response->set_version_update_time_ms();
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// TODO response->set_version_update_time_ms();

@@ -381,6 +383,7 @@ void MetaServiceImpl::batch_get_version(::google::protobuf::RpcController* contr
break;
}
response->add_versions(version);
// TODO response->add_version_update_times_ms();
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// TODO response->add_version_update_times_ms();

scanTables.add(scanTable);
if (Config.isCloudMode()) {
// get version of related partitions in batch
Copy link
Contributor

Choose a reason for hiding this comment

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

How about extracting this operation into OlapTable, just like OlapTable.selectNonEmptyPartitionIds?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about extracting this operation into OlapTable, just like OlapTable.selectNonEmptyPartitionIds?

The one in NereidssqlCacheManager doesn't use OlapTable but ScanTable, I have no handy idea to unify the two.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ops! On second thought, I think can give it a try.

Copy link
Collaborator

@gavinchou gavinchou left a comment

Choose a reason for hiding this comment

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

LGTM\

@gavinchou gavinchou self-requested a review May 15, 2024 07:11
@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17603	4408	4305	4305
q2	2014	198	194	194
q3	10453	1260	1168	1168
q4	10142	865	785	785
q5	7460	2718	2611	2611
q6	217	132	132	132
q7	991	604	582	582
q8	9225	2104	2080	2080
q9	8922	6563	6504	6504
q10	8848	3713	3713	3713
q11	465	243	239	239
q12	420	219	221	219
q13	17764	2972	2995	2972
q14	269	219	242	219
q15	509	479	470	470
q16	496	390	384	384
q17	986	645	693	645
q18	8033	7445	7566	7445
q19	1616	1514	1461	1461
q20	655	307	305	305
q21	5019	3940	3962	3940
q22	347	282	293	282
Total cold run time: 112454 ms
Total hot run time: 40655 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4303	4294	4254	4254
q2	375	263	262	262
q3	3012	2767	2731	2731
q4	1869	1569	1577	1569
q5	5286	5264	5256	5256
q6	216	125	126	125
q7	2241	1888	1948	1888
q8	3193	3384	3320	3320
q9	8401	8355	8405	8355
q10	3878	3752	3712	3712
q11	585	483	478	478
q12	748	556	598	556
q13	16314	2968	2973	2968
q14	269	273	265	265
q15	520	474	470	470
q16	458	411	412	411
q17	1761	1498	1460	1460
q18	7576	7691	7489	7489
q19	2311	1587	1543	1543
q20	1978	1779	1751	1751
q21	4893	4992	4781	4781
q22	590	513	483	483
Total cold run time: 70777 ms
Total hot run time: 54127 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 186606 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 8b9b51a5c491abfe210d116405c0dc5b25edc4f2, data reload: false

query1	925	382	371	371
query2	6482	2466	2316	2316
query3	6654	209	212	209
query4	24198	21243	21457	21243
query5	4181	421	432	421
query6	264	174	176	174
query7	4581	297	296	296
query8	241	189	195	189
query9	8575	2424	2385	2385
query10	458	254	254	254
query11	14776	14232	14283	14232
query12	129	94	87	87
query13	1630	365	363	363
query14	10736	7360	6876	6876
query15	206	170	178	170
query16	7823	263	277	263
query17	1636	543	551	543
query18	1949	288	269	269
query19	205	152	147	147
query20	92	85	90	85
query21	194	125	130	125
query22	4990	4841	4908	4841
query23	34201	33514	33507	33507
query24	11279	2880	2815	2815
query25	612	368	370	368
query26	1037	157	153	153
query27	2339	319	333	319
query28	6743	2074	2073	2073
query29	853	603	605	603
query30	296	169	178	169
query31	988	757	747	747
query32	96	57	53	53
query33	747	254	249	249
query34	1044	475	488	475
query35	821	684	695	684
query36	1075	885	912	885
query37	107	74	73	73
query38	2895	2765	2734	2734
query39	1729	1576	1542	1542
query40	199	128	124	124
query41	48	45	44	44
query42	104	99	103	99
query43	583	555	528	528
query44	1229	720	733	720
query45	271	257	256	256
query46	1096	686	715	686
query47	1926	1876	1868	1868
query48	376	300	293	293
query49	1092	407	428	407
query50	771	387	401	387
query51	6831	6783	6776	6776
query52	107	96	86	86
query53	349	298	294	294
query54	884	426	421	421
query55	75	74	73	73
query56	252	226	224	224
query57	1213	1159	1129	1129
query58	220	216	208	208
query59	3519	3103	3102	3102
query60	254	236	240	236
query61	92	89	87	87
query62	680	508	453	453
query63	309	290	290	290
query64	8743	7408	7421	7408
query65	3172	3087	3104	3087
query66	812	351	338	338
query67	15316	14979	14800	14800
query68	4672	539	535	535
query69	486	306	314	306
query70	1185	1040	1104	1040
query71	441	274	278	274
query72	7816	2696	2476	2476
query73	701	325	329	325
query74	6459	6124	6109	6109
query75	3408	2675	2653	2653
query76	2888	915	931	915
query77	426	272	272	272
query78	10633	10213	10242	10213
query79	2408	519	522	519
query80	1129	456	459	456
query81	548	240	254	240
query82	655	99	99	99
query83	255	171	170	170
query84	248	90	88	88
query85	1619	323	311	311
query86	491	319	305	305
query87	3255	3069	3099	3069
query88	4202	2430	2425	2425
query89	484	377	383	377
query90	1977	190	192	190
query91	155	110	107	107
query92	63	51	50	50
query93	2046	519	500	500
query94	1222	188	188	188
query95	396	312	311	311
query96	595	278	271	271
query97	3169	2978	3015	2978
query98	236	227	218	218
query99	1205	884	909	884
Total cold run time: 283783 ms
Total hot run time: 186606 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.08	0.03	0.04
query3	0.23	0.04	0.04
query4	1.67	0.06	0.07
query5	0.50	0.48	0.50
query6	1.12	0.73	0.73
query7	0.02	0.01	0.01
query8	0.05	0.04	0.04
query9	0.53	0.49	0.48
query10	0.55	0.55	0.54
query11	0.15	0.11	0.12
query12	0.14	0.12	0.12
query13	0.59	0.59	0.59
query14	0.79	0.78	0.78
query15	0.84	0.82	0.80
query16	0.35	0.34	0.35
query17	1.02	0.96	0.96
query18	0.21	0.27	0.23
query19	1.85	1.79	1.74
query20	0.02	0.01	0.02
query21	15.71	0.67	0.65
query22	4.05	7.54	2.25
query23	18.57	1.36	1.29
query24	1.89	0.25	0.21
query25	0.16	0.09	0.09
query26	0.26	0.16	0.16
query27	0.07	0.08	0.08
query28	13.30	1.01	1.01
query29	13.16	3.28	3.24
query30	0.24	0.06	0.06
query31	2.88	0.39	0.39
query32	3.27	0.49	0.48
query33	2.86	2.86	2.87
query34	16.96	4.45	4.45
query35	4.51	4.57	4.51
query36	0.65	0.46	0.46
query37	0.16	0.15	0.16
query38	0.15	0.15	0.14
query39	0.04	0.04	0.03
query40	0.16	0.13	0.14
query41	0.09	0.05	0.04
query42	0.05	0.05	0.05
query43	0.04	0.04	0.04
Total cold run time: 109.98 s
Total hot run time: 30.89 s

w41ter
w41ter previously approved these changes May 15, 2024
@freemandealer
Copy link
Contributor Author

run buildall

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	6121	4274	4233	4233
q2	652	191	192	191
q3	6792	1137	1090	1090
q4	1045	699	743	699
q5	2672	2701	2650	2650
q6	224	134	141	134
q7	1260	701	604	604
q8	1997	2126	2059	2059
q9	6644	6684	6441	6441
q10	3876	3724	3720	3720
q11	361	234	242	234
q12	378	216	216	216
q13	17057	2980	2994	2980
q14	256	220	225	220
q15	501	469	470	469
q16	478	401	391	391
q17	961	728	717	717
q18	7870	7585	7460	7460
q19	1593	1539	1478	1478
q20	507	313	299	299
q21	4992	3957	3833	3833
q22	338	288	288	288
Total cold run time: 66575 ms
Total hot run time: 40406 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4258	4210	4188	4188
q2	376	271	277	271
q3	2993	2770	2762	2762
q4	1850	1555	1555	1555
q5	5243	5255	5253	5253
q6	228	126	127	126
q7	2233	1867	1846	1846
q8	3205	3326	3288	3288
q9	8322	8324	8357	8324
q10	3880	3701	3664	3664
q11	582	492	497	492
q12	740	607	604	604
q13	13065	2992	2991	2991
q14	289	275	266	266
q15	510	478	471	471
q16	451	425	414	414
q17	1771	1465	1473	1465
q18	7680	7580	7573	7573
q19	1686	1560	1613	1560
q20	1949	1783	1756	1756
q21	5014	4880	4755	4755
q22	580	491	507	491
Total cold run time: 66905 ms
Total hot run time: 54115 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 186773 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 6df24c3cd0dfa298f3a64f2447c35c1a8eae9eb9, data reload: false

query1	913	391	370	370
query2	7019	2336	2227	2227
query3	6653	218	220	218
query4	24881	21426	21407	21407
query5	4161	418	434	418
query6	267	172	182	172
query7	4587	293	294	293
query8	248	195	194	194
query9	8558	2411	2384	2384
query10	437	267	253	253
query11	14718	14268	14226	14226
query12	134	94	91	91
query13	1650	374	372	372
query14	10899	7098	7959	7098
query15	214	173	171	171
query16	7871	260	270	260
query17	1864	552	533	533
query18	1977	274	266	266
query19	204	151	151	151
query20	97	86	89	86
query21	197	141	134	134
query22	5025	4859	4839	4839
query23	34086	33366	33662	33366
query24	11832	2886	2850	2850
query25	664	389	365	365
query26	1790	174	162	162
query27	3051	332	336	332
query28	7640	2034	2058	2034
query29	1117	634	606	606
query30	310	176	173	173
query31	948	754	736	736
query32	92	54	56	54
query33	752	259	252	252
query34	1077	481	480	480
query35	803	696	678	678
query36	1092	903	904	903
query37	309	70	72	70
query38	2924	2755	2782	2755
query39	1603	1568	1566	1566
query40	277	132	130	130
query41	48	46	45	45
query42	108	101	96	96
query43	580	542	559	542
query44	1204	728	738	728
query45	265	251	269	251
query46	1080	742	702	702
query47	1950	1834	1869	1834
query48	363	301	294	294
query49	1197	423	419	419
query50	763	385	387	385
query51	6916	6821	6776	6776
query52	114	88	97	88
query53	354	290	288	288
query54	970	441	428	428
query55	74	71	72	71
query56	244	224	255	224
query57	1267	1151	1126	1126
query58	223	210	210	210
query59	3350	3121	3217	3121
query60	261	243	243	243
query61	94	92	99	92
query62	652	476	465	465
query63	312	290	294	290
query64	9717	7461	7352	7352
query65	3196	3123	3096	3096
query66	1399	354	350	350
query67	15151	15284	15027	15027
query68	5277	534	549	534
query69	532	309	311	309
query70	1194	1084	1127	1084
query71	476	282	269	269
query72	7844	2558	2360	2360
query73	716	323	324	323
query74	6513	6105	6227	6105
query75	3801	2694	2665	2665
query76	3657	967	972	967
query77	637	277	264	264
query78	10722	10141	10032	10032
query79	1820	510	506	506
query80	1083	446	449	446
query81	507	241	240	240
query82	852	96	99	96
query83	193	162	169	162
query84	266	86	86	86
query85	1433	271	266	266
query86	458	301	312	301
query87	3282	3110	3043	3043
query88	4047	2433	2423	2423
query89	462	385	389	385
query90	1984	192	192	192
query91	124	98	99	98
query92	63	52	48	48
query93	1784	513	499	499
query94	1158	186	188	186
query95	399	314	307	307
query96	582	275	266	266
query97	3229	2999	2984	2984
query98	243	224	220	220
query99	1268	916	889	889
Total cold run time: 291399 ms
Total hot run time: 186773 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.07	0.04	0.04
query3	0.23	0.05	0.05
query4	1.66	0.08	0.08
query5	0.50	0.48	0.50
query6	1.13	0.73	0.72
query7	0.01	0.01	0.01
query8	0.04	0.04	0.03
query9	0.54	0.49	0.50
query10	0.53	0.56	0.54
query11	0.16	0.11	0.12
query12	0.15	0.12	0.11
query13	0.60	0.59	0.60
query14	0.78	0.81	0.76
query15	0.82	0.80	0.81
query16	0.37	0.37	0.37
query17	1.02	1.04	1.03
query18	0.22	0.27	0.23
query19	1.90	1.82	1.82
query20	0.01	0.01	0.01
query21	15.71	0.66	0.67
query22	4.32	6.36	2.46
query23	18.31	1.24	1.24
query24	1.96	0.22	0.21
query25	0.14	0.09	0.08
query26	0.27	0.17	0.16
query27	0.08	0.09	0.08
query28	13.33	1.02	1.02
query29	13.11	3.24	3.23
query30	0.24	0.06	0.05
query31	2.84	0.39	0.38
query32	3.28	0.47	0.47
query33	2.81	2.85	2.88
query34	17.00	4.40	4.38
query35	4.47	4.51	4.55
query36	0.65	0.46	0.46
query37	0.17	0.14	0.15
query38	0.15	0.14	0.14
query39	0.04	0.03	0.04
query40	0.16	0.13	0.16
query41	0.09	0.05	0.04
query42	0.05	0.05	0.04
query43	0.05	0.03	0.04
Total cold run time: 110.01 s
Total hot run time: 31.09 s

dataroaring
dataroaring previously approved these changes May 27, 2024
Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

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

LGTM

@doris-robot
Copy link

TPC-DS: Total hot run time: 171850 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 5100bef278f57c37ce739a9a4c280bafda8c400f, data reload: false

query1	910	385	395	385
query2	6379	2433	2261	2261
query3	6626	209	215	209
query4	19421	17374	17247	17247
query5	3653	491	485	485
query6	240	164	184	164
query7	4584	305	312	305
query8	311	294	286	286
query9	8551	2469	2431	2431
query10	551	311	275	275
query11	10587	10072	9976	9976
query12	111	87	83	83
query13	1656	375	367	367
query14	9277	7878	7662	7662
query15	238	192	190	190
query16	7702	279	283	279
query17	1377	584	543	543
query18	1960	287	282	282
query19	259	156	152	152
query20	91	84	84	84
query21	211	134	127	127
query22	4412	4192	3976	3976
query23	33822	33700	33591	33591
query24	10586	2921	2834	2834
query25	593	415	379	379
query26	719	163	160	160
query27	2276	328	333	328
query28	6158	2154	2157	2154
query29	906	654	619	619
query30	251	169	156	156
query31	961	779	752	752
query32	94	52	55	52
query33	644	307	307	307
query34	902	493	507	493
query35	750	633	676	633
query36	1137	1002	993	993
query37	138	74	74	74
query38	2962	2809	2768	2768
query39	899	850	856	850
query40	215	131	127	127
query41	49	48	55	48
query42	128	101	102	101
query43	578	562	550	550
query44	1125	751	727	727
query45	189	160	169	160
query46	1056	738	751	738
query47	1868	1776	1782	1776
query48	375	307	311	307
query49	839	417	420	417
query50	779	394	398	394
query51	6966	6755	6632	6632
query52	106	96	89	89
query53	357	294	292	292
query54	882	455	446	446
query55	76	75	76	75
query56	282	263	252	252
query57	1124	1055	1047	1047
query58	268	238	259	238
query59	3491	3121	3203	3121
query60	303	277	276	276
query61	97	89	91	89
query62	594	441	445	441
query63	348	294	293	293
query64	8472	2300	1747	1747
query65	3154	3113	3087	3087
query66	748	327	346	327
query67	15494	15320	14884	14884
query68	4616	527	538	527
query69	515	307	322	307
query70	1178	1148	1114	1114
query71	392	284	282	282
query72	8537	5484	2752	2752
query73	745	329	333	329
query74	5921	5449	5596	5449
query75	3503	2686	2698	2686
query76	2514	1091	1010	1010
query77	573	326	306	306
query78	10489	9780	9793	9780
query79	2137	527	524	524
query80	1150	473	482	473
query81	545	228	224	224
query82	843	104	106	104
query83	316	169	168	168
query84	251	89	89	89
query85	1819	290	277	277
query86	486	289	321	289
query87	3281	3090	3079	3079
query88	3843	2450	2454	2450
query89	502	393	379	379
query90	1772	196	194	194
query91	130	100	103	100
query92	59	51	53	51
query93	2576	519	507	507
query94	1157	196	188	188
query95	405	327	322	322
query96	588	278	269	269
query97	3219	2978	3071	2978
query98	220	210	200	200
query99	1101	850	858	850
Total cold run time: 268251 ms
Total hot run time: 171850 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.08	0.04	0.04
query3	0.22	0.04	0.04
query4	1.69	0.07	0.08
query5	0.49	0.48	0.49
query6	1.14	0.73	0.72
query7	0.02	0.02	0.01
query8	0.04	0.05	0.04
query9	0.55	0.49	0.49
query10	0.54	0.53	0.54
query11	0.15	0.11	0.11
query12	0.14	0.11	0.12
query13	0.59	0.59	0.58
query14	0.76	0.80	0.79
query15	0.82	0.80	0.80
query16	0.37	0.38	0.35
query17	0.95	1.00	0.96
query18	0.22	0.24	0.26
query19	1.75	1.67	1.67
query20	0.02	0.01	0.01
query21	15.42	0.65	0.65
query22	3.93	7.56	1.89
query23	18.32	1.44	1.32
query24	2.17	0.23	0.22
query25	0.16	0.08	0.09
query26	0.27	0.18	0.17
query27	0.07	0.08	0.08
query28	13.26	1.01	1.00
query29	12.62	3.31	3.29
query30	0.26	0.06	0.05
query31	2.86	0.39	0.38
query32	3.30	0.48	0.48
query33	2.90	2.87	2.88
query34	17.06	4.39	4.43
query35	4.49	4.44	4.45
query36	0.66	0.46	0.46
query37	0.18	0.16	0.16
query38	0.16	0.15	0.15
query39	0.05	0.04	0.04
query40	0.19	0.14	0.14
query41	0.09	0.05	0.05
query42	0.06	0.04	0.05
query43	0.04	0.04	0.04
Total cold run time: 109.09 s
Total hot run time: 30.46 s

@gavinchou gavinchou requested a review from w41ter June 27, 2024 02:33
gensrc/proto/cloud.proto Outdated Show resolved Hide resolved
Get visible version one by one from MetaService is costly. Batching them
into one RPC will not only reduce the work load of RPC service but also
reduce the lag.

Signed-off-by: freemandealer <[email protected]>
Signed-off-by: freemandealer <[email protected]>
Signed-off-by: freemandealer <[email protected]>
@freemandealer
Copy link
Contributor Author

run buildall

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	18113	4471	4329	4329
q2	2021	192	208	192
q3	10526	1215	1045	1045
q4	10227	861	713	713
q5	7489	2644	2626	2626
q6	222	138	134	134
q7	954	596	603	596
q8	9230	2076	2077	2076
q9	9058	6501	6469	6469
q10	9015	3779	3724	3724
q11	449	231	232	231
q12	452	227	219	219
q13	17783	2960	2993	2960
q14	262	224	224	224
q15	525	482	492	482
q16	514	374	372	372
q17	962	630	689	630
q18	8035	7510	7363	7363
q19	3963	1471	1493	1471
q20	639	315	331	315
q21	4834	3110	3960	3110
q22	403	336	352	336
Total cold run time: 115676 ms
Total hot run time: 39617 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4362	4223	4260	4223
q2	359	256	266	256
q3	3009	2803	2930	2803
q4	1973	1714	1675	1675
q5	5613	5524	5509	5509
q6	224	133	127	127
q7	2185	1847	1902	1847
q8	3226	3415	3420	3415
q9	8686	8652	8737	8652
q10	4077	3854	3712	3712
q11	597	497	509	497
q12	843	660	627	627
q13	16084	3201	3174	3174
q14	302	273	283	273
q15	527	499	493	493
q16	485	440	426	426
q17	1839	1500	1485	1485
q18	8280	8011	7696	7696
q19	1816	1658	1528	1528
q20	2889	1859	1859	1859
q21	5133	4984	4726	4726
q22	627	539	565	539
Total cold run time: 73136 ms
Total hot run time: 55542 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 173967 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 8a147e6092840d948a679b9f1f2f7a9b3ce887a2, data reload: false

query1	915	378	390	378
query2	6484	2637	2578	2578
query3	6633	210	218	210
query4	18829	17580	17266	17266
query5	3713	482	466	466
query6	255	174	164	164
query7	4588	304	298	298
query8	319	286	274	274
query9	8644	2317	2312	2312
query10	547	288	274	274
query11	10552	10035	10029	10029
query12	111	90	82	82
query13	1633	359	362	359
query14	10060	6496	7653	6496
query15	223	193	183	183
query16	7738	264	261	261
query17	1693	553	512	512
query18	1945	269	263	263
query19	194	148	147	147
query20	90	82	80	80
query21	211	129	126	126
query22	4466	4241	4125	4125
query23	33672	33635	33839	33635
query24	11183	2888	2880	2880
query25	580	381	371	371
query26	708	170	157	157
query27	2341	327	320	320
query28	6184	2106	2087	2087
query29	889	629	618	618
query30	266	163	159	159
query31	967	756	752	752
query32	98	52	52	52
query33	711	309	273	273
query34	884	477	483	477
query35	752	639	631	631
query36	1162	1067	954	954
query37	149	81	79	79
query38	3004	2810	2801	2801
query39	885	850	834	834
query40	216	127	124	124
query41	58	53	54	53
query42	136	99	108	99
query43	604	562	577	562
query44	1181	749	755	749
query45	193	162	161	161
query46	1063	712	721	712
query47	1894	1818	1788	1788
query48	361	304	303	303
query49	835	419	409	409
query50	768	385	385	385
query51	6751	6801	6747	6747
query52	105	93	90	90
query53	353	295	283	283
query54	893	450	437	437
query55	71	74	71	71
query56	281	257	262	257
query57	1135	1051	1074	1051
query58	261	236	252	236
query59	3543	3331	3312	3312
query60	316	276	268	268
query61	96	95	119	95
query62	588	461	438	438
query63	322	296	288	288
query64	8506	2280	1770	1770
query65	3182	3108	3085	3085
query66	752	332	326	326
query67	15275	15075	14983	14983
query68	4464	520	520	520
query69	459	318	312	312
query70	1229	1142	1133	1133
query71	384	280	271	271
query72	6949	5583	5645	5583
query73	757	326	321	321
query74	5881	5494	5476	5476
query75	3366	2641	2678	2641
query76	2564	979	926	926
query77	411	350	290	290
query78	10488	9904	9822	9822
query79	2072	495	507	495
query80	1044	469	464	464
query81	577	219	216	216
query82	692	104	99	99
query83	238	170	167	167
query84	230	87	86	86
query85	1768	279	275	275
query86	503	294	321	294
query87	3271	3056	3089	3056
query88	4057	2444	2427	2427
query89	464	382	378	378
query90	1763	183	185	183
query91	124	100	96	96
query92	64	47	51	47
query93	2472	495	499	495
query94	1113	192	183	183
query95	394	315	311	311
query96	605	265	272	265
query97	3278	3061	3098	3061
query98	228	202	196	196
query99	1237	870	833	833
Total cold run time: 267163 ms
Total hot run time: 173967 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.09	0.04	0.04
query3	0.23	0.05	0.05
query4	1.68	0.07	0.06
query5	0.49	0.47	0.49
query6	1.15	0.74	0.72
query7	0.02	0.01	0.01
query8	0.05	0.04	0.04
query9	0.55	0.51	0.48
query10	0.54	0.55	0.55
query11	0.15	0.12	0.11
query12	0.14	0.12	0.12
query13	0.61	0.59	0.59
query14	0.76	0.77	0.78
query15	0.87	0.81	0.81
query16	0.38	0.37	0.36
query17	0.94	1.01	0.98
query18	0.20	0.24	0.25
query19	1.78	1.72	1.76
query20	0.01	0.01	0.01
query21	15.43	0.77	0.66
query22	4.24	7.80	1.72
query23	18.29	1.39	1.30
query24	2.07	0.23	0.23
query25	0.15	0.09	0.08
query26	0.28	0.17	0.17
query27	0.08	0.08	0.08
query28	13.25	1.03	1.00
query29	12.63	3.27	3.27
query30	0.25	0.06	0.06
query31	2.86	0.39	0.38
query32	3.27	0.47	0.48
query33	2.88	2.93	2.89
query34	17.33	4.43	4.42
query35	4.58	4.48	4.51
query36	0.67	0.45	0.50
query37	0.19	0.16	0.17
query38	0.15	0.14	0.14
query39	0.04	0.04	0.03
query40	0.17	0.14	0.14
query41	0.09	0.05	0.04
query42	0.06	0.05	0.05
query43	0.05	0.04	0.04
Total cold run time: 109.69 s
Total hot run time: 30.42 s

@freemandealer
Copy link
Contributor Author

run p0

2 similar comments
@freemandealer
Copy link
Contributor Author

run p0

@freemandealer
Copy link
Contributor Author

run p0

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jun 28, 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.

Copy link
Contributor

@sollhui sollhui left a comment

Choose a reason for hiding this comment

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

LGTM

@gavinchou gavinchou merged commit 70b816b into apache:master Jun 28, 2024
30 of 34 checks passed
dataroaring pushed a commit that referenced this pull request Jun 30, 2024
…34615)

Get visible versions one by one from MetaService is costly. Batching
them into one RPC will not only reduce the workload of RPC service but
also reduce the lag.
gavinchou added a commit that referenced this pull request Jul 1, 2024
dataroaring pushed a commit that referenced this pull request Jul 2, 2024
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.0-merged meta-change reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants