Skip to content

Conversation

@gavinchou
Copy link
Contributor

Session variable disable_file_cache is processed as "disposable file cache" in beta_rowset_reader.cpp.

if (_read_context->runtime_state != nullptr) {
    _read_options.io_ctx.query_id = &_read_context->runtime_state->query_id();
    _read_options.io_ctx.read_file_cache =
            _read_context->runtime_state->query_options().enable_file_cache;
    _read_options.io_ctx.is_disposable =
            _read_context->runtime_state->query_options().disable_file_cache;
}

We use disposable cache to avoid IO amp and avoid large amount of eviction from the cached data ("normal cache").

We cannot set the read option cache policy to "no cache" because it may cause IO amp: every page IO will cause a remote IO, which is a performance disaster.

…apache#37141

Session variable `disable_file_cache` is processed as "disposable file cache"
in beta_rowset_reader.cpp.

```
if (_read_context->runtime_state != nullptr) {
    _read_options.io_ctx.query_id = &_read_context->runtime_state->query_id();
    _read_options.io_ctx.read_file_cache =
            _read_context->runtime_state->query_options().enable_file_cache;
    _read_options.io_ctx.is_disposable =
            _read_context->runtime_state->query_options().disable_file_cache;
}
```

We use disposable cache to avoid IO amp and avoid large amount of
eviction from the cached data ("normal cache").

We cannot set the read option cache policy to "no cache" because it may
cause IO amp: every page IO will cause a remote IO, which is a
performance disaster.
@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.

@gavinchou
Copy link
Contributor Author

run buildall

@github-actions github-actions bot added the doing label Aug 8, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2024

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

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	18042	4611	4486	4486
q2	2665	188	178	178
q3	11657	1184	1146	1146
q4	10218	755	790	755
q5	8025	2609	2575	2575
q6	231	148	150	148
q7	989	624	605	605
q8	9215	1956	1940	1940
q9	8708	6580	6595	6580
q10	7075	2154	2234	2154
q11	480	251	260	251
q12	402	237	226	226
q13	17977	3023	3050	3023
q14	277	230	240	230
q15	526	490	486	486
q16	503	415	401	401
q17	996	687	788	687
q18	8079	7504	7449	7449
q19	5310	1114	991	991
q20	700	348	334	334
q21	5336	4430	4476	4430
q22	1073	1007	1010	1007
Total cold run time: 118484 ms
Total hot run time: 40082 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4477	4351	4338	4338
q2	391	277	270	270
q3	2907	2670	2616	2616
q4	1901	1624	1647	1624
q5	5322	5328	5265	5265
q6	226	137	138	137
q7	2104	1670	1691	1670
q8	3178	3359	3373	3359
q9	8458	8370	8335	8335
q10	3369	3176	3154	3154
q11	592	485	474	474
q12	783	599	604	599
q13	17459	2987	2987	2987
q14	296	282	276	276
q15	522	476	486	476
q16	470	418	413	413
q17	1778	1471	1482	1471
q18	7713	7503	7354	7354
q19	1705	1544	1674	1544
q20	2003	1835	1780	1780
q21	5314	4967	5120	4967
q22	1090	993	999	993
Total cold run time: 72058 ms
Total hot run time: 54102 ms

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	18265	4470	4381	4381
q2	2021	180	172	172
q3	10494	1205	1034	1034
q4	10146	780	672	672
q5	7489	2509	2475	2475
q6	221	140	141	140
q7	961	613	600	600
q8	9231	1928	1896	1896
q9	8844	6512	6541	6512
q10	7045	2169	2134	2134
q11	438	251	246	246
q12	406	227	234	227
q13	17761	2986	2991	2986
q14	284	251	231	231
q15	528	485	487	485
q16	487	401	396	396
q17	954	686	688	686
q18	8188	7490	7499	7490
q19	5427	1100	1068	1068
q20	697	341	325	325
q21	5424	4378	4454	4378
q22	1077	994	988	988
Total cold run time: 116388 ms
Total hot run time: 39522 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4458	4232	4245	4232
q2	386	274	268	268
q3	2802	2609	2654	2609
q4	1894	1625	1605	1605
q5	5255	5245	5241	5241
q6	222	135	136	135
q7	2050	1684	1681	1681
q8	3211	3367	3376	3367
q9	8424	8409	8439	8409
q10	3358	3143	3111	3111
q11	594	534	478	478
q12	776	611	611	611
q13	16331	3013	3032	3013
q14	321	279	274	274
q15	524	476	480	476
q16	476	416	410	410
q17	1772	1504	1469	1469
q18	7716	7460	7228	7228
q19	1669	1505	1476	1476
q20	2005	1768	1777	1768
q21	5327	5113	5299	5113
q22	1094	1011	987	987
Total cold run time: 70665 ms
Total hot run time: 53961 ms

@doris-robot
Copy link

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

query1	964	404	399	399
query2	6449	2010	1931	1931
query3	6655	207	212	207
query4	33680	23220	23104	23104
query5	4223	508	517	508
query6	273	190	173	173
query7	4578	299	292	292
query8	242	195	195	195
query9	8425	2471	2445	2445
query10	922	892	905	892
query11	17281	15041	15039	15039
query12	142	95	99	95
query13	1641	396	372	372
query14	9791	7958	7423	7423
query15	342	353	338	338
query16	7749	457	471	457
query17	1756	581	571	571
query18	2052	396	382	382
query19	262	227	202	202
query20	116	108	107	107
query21	207	107	106	106
query22	4173	3996	3939	3939
query23	33754	32998	33258	32998
query24	12193	2978	2857	2857
query25	670	390	391	390
query26	1794	162	160	160
query27	3018	289	294	289
query28	7803	2029	2015	2015
query29	1174	443	431	431
query30	306	152	150	150
query31	958	756	750	750
query32	99	56	56	56
query33	742	306	297	297
query34	954	480	492	480
query35	965	853	874	853
query36	1076	933	927	927
query37	297	84	82	82
query38	4284	4138	4132	4132
query39	1412	1339	1395	1339
query40	296	130	124	124
query41	52	52	51	51
query42	124	108	101	101
query43	531	477	481	477
query44	1235	753	727	727
query45	385	360	363	360
query46	1135	794	836	794
query47	1822	1736	1782	1736
query48	375	298	303	298
query49	1237	441	448	441
query50	849	416	419	416
query51	6836	6784	6681	6681
query52	103	98	93	93
query53	267	192	185	185
query54	967	468	493	468
query55	79	78	79	78
query56	280	269	283	269
query57	1132	1046	1067	1046
query58	245	234	235	234
query59	3283	2874	2809	2809
query60	305	278	276	276
query61	116	115	115	115
query62	854	663	651	651
query63	226	190	189	189
query64	10674	2456	1932	1932
query65	3230	3133	3161	3133
query66	1373	347	344	344
query67	15384	14622	14715	14622
query68	9408	582	583	582
query69	517	429	464	429
query70	1398	1102	1102	1102
query71	605	278	273	273
query72	21384	17741	17818	17741
query73	2221	335	332	332
query74	9022	8653	8643	8643
query75	6405	2646	2664	2646
query76	5715	1006	979	979
query77	796	340	340	340
query78	10743	8960	12429	8960
query79	7988	529	529	529
query80	933	510	499	499
query81	608	242	229	229
query82	295	137	137	137
query83	336	156	154	154
query84	277	80	81	80
query85	964	309	305	305
query86	300	310	287	287
query87	4699	4608	4532	4532
query88	3902	2486	2499	2486
query89	398	289	285	285
query90	2095	199	200	199
query91	156	122	118	118
query92	62	49	50	49
query93	1353	548	536	536
query94	763	304	293	293
query95	357	267	265	265
query96	606	289	276	276
query97	3224	3017	3065	3017
query98	214	203	198	198
query99	1545	1258	1247	1247
Total cold run time: 336106 ms
Total hot run time: 203781 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.04
query2	0.08	0.04	0.04
query3	0.23	0.05	0.05
query4	1.67	0.09	0.10
query5	0.50	0.48	0.47
query6	1.13	0.73	0.72
query7	0.02	0.01	0.01
query8	0.05	0.04	0.05
query9	0.55	0.49	0.49
query10	0.54	0.54	0.55
query11	0.16	0.12	0.11
query12	0.14	0.12	0.12
query13	0.60	0.59	0.58
query14	0.76	0.80	0.80
query15	0.86	0.82	0.82
query16	0.38	0.38	0.37
query17	1.01	0.99	1.00
query18	0.23	0.22	0.21
query19	1.86	1.69	1.75
query20	0.01	0.01	0.01
query21	15.43	0.73	0.66
query22	3.99	6.57	2.60
query23	18.26	1.38	1.32
query24	2.06	0.23	0.22
query25	0.15	0.08	0.08
query26	0.30	0.21	0.20
query27	0.46	0.22	0.22
query28	13.31	1.02	1.00
query29	12.59	3.30	3.31
query30	0.24	0.05	0.05
query31	2.91	0.41	0.39
query32	3.24	0.47	0.47
query33	2.92	2.96	2.90
query34	16.99	4.33	4.40
query35	4.43	4.38	4.39
query36	0.65	0.46	0.50
query37	0.19	0.16	0.15
query38	0.15	0.14	0.15
query39	0.05	0.04	0.04
query40	0.16	0.12	0.12
query41	0.09	0.04	0.04
query42	0.06	0.06	0.05
query43	0.04	0.04	0.04
Total cold run time: 109.49 s
Total hot run time: 31.35 s

Copy link
Contributor

@deardeng deardeng 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
Copy link
Contributor

github-actions bot commented Aug 9, 2024

PR approved by anyone and no changes requested.

Copy link
Contributor

@liaoxin01 liaoxin01 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 Aug 9, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2024

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

Copy link
Contributor

@wangshuo128 wangshuo128 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 eea9446 into apache:master Aug 9, 2024
wyxxxcat pushed a commit to wyxxxcat/doris that referenced this pull request Aug 14, 2024
…apache#37141 (apache#39123)

Session variable `disable_file_cache` is processed as "disposable file
cache" in beta_rowset_reader.cpp.

```
if (_read_context->runtime_state != nullptr) {
    _read_options.io_ctx.query_id = &_read_context->runtime_state->query_id();
    _read_options.io_ctx.read_file_cache =
            _read_context->runtime_state->query_options().enable_file_cache;
    _read_options.io_ctx.is_disposable =
            _read_context->runtime_state->query_options().disable_file_cache;
}
```

We use disposable cache to avoid IO amp and avoid large amount of
eviction from the cached data ("normal cache").

We cannot set the read option cache policy to "no cache" because it may
cause IO amp: every page IO will cause a remote IO, which is a
performance disaster.
gavinchou added a commit that referenced this pull request Aug 16, 2024
…#37141 (#39123)

Session variable `disable_file_cache` is processed as "disposable file
cache" in beta_rowset_reader.cpp.

```
if (_read_context->runtime_state != nullptr) {
    _read_options.io_ctx.query_id = &_read_context->runtime_state->query_id();
    _read_options.io_ctx.read_file_cache =
            _read_context->runtime_state->query_options().enable_file_cache;
    _read_options.io_ctx.is_disposable =
            _read_context->runtime_state->query_options().disable_file_cache;
}
```

We use disposable cache to avoid IO amp and avoid large amount of
eviction from the cached data ("normal cache").

We cannot set the read option cache policy to "no cache" because it may
cause IO amp: every page IO will cause a remote IO, which is a
performance disaster.
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.2-merged doing reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants