Skip to content

[improvement](be) Add CPU-aware S3 rate limiter#65420

Open
0AyanamiRei wants to merge 59 commits into
apache:masterfrom
0AyanamiRei:feature/cpu-aware-s3-limiter
Open

[improvement](be) Add CPU-aware S3 rate limiter#65420
0AyanamiRei wants to merge 59 commits into
apache:masterfrom
0AyanamiRei:feature/cpu-aware-s3-limiter

Conversation

@0AyanamiRei

@0AyanamiRei 0AyanamiRei commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary:

The existing S3 GET/PUT token bucket rate limiter uses fixed per-BE QPS settings. This is not suitable for heterogeneous deployments because a BE with many CPU cores and a BE with few CPU cores receive the same S3 request budget.

This PR adds CPU-aware S3 rate limiter settings for GET and PUT requests. When the new per-core settings are left as 0, Doris keeps the existing absolute limiter behavior. When a per-core setting is positive, Doris derives the effective per-BE S3 QPS from BE CPU cores and caps it with s3_token_per_second_max when configured.

The PR also centralizes effective limiter config calculation, reuses it for initialization and dynamic rebuild, and guards CPU-derived QPS calculation from overflow before applying the max cap.

Release note

Add BE configs to support CPU-aware S3 GET/PUT request rate limiting.

Check List (For Author)

  • 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 code files have been changed.
      • Other reason
  • Behavior changed:

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

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

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

0AyanamiRei and others added 9 commits July 9, 2026 15:14
Add three new CPU-aware S3 limiter configs:
- s3_get_token_per_second_per_core: GET QPS per CPU core (0 to disable)
- s3_put_token_per_second_per_core: PUT QPS per CPU core (0 to disable)
- token_per_second_max: Hard cap on derived QPS (0 means no cap)

When per-core values are > 0, effective QPS = per_core_value * CpuInfo::num_cores()
When per-core values are = 0, existing absolute configs are used (preserving backward compatibility).

All new configs default to 0, maintaining existing behavior.

Affected files:
- be/src/common/config.h: Added DECLARE statements
- be/src/common/config.cpp: Added DEFINE statements with validators

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fix naming inconsistency: all other S3 rate-limiter config options carry the
s3_ prefix. This public API change must be fixed now before downstream code
starts using these configs.

- DECLARE_mInt64(s3_token_per_second_max) in config.h
- DEFINE_mInt64(s3_token_per_second_max) in config.cpp
- DEFINE_Validator(s3_token_per_second_max) in config.cpp

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add S3RateLimiterConfig struct and get_effective_s3_rate_limiter_config()
to centralize the logic for computing effective rate limiter parameters
from both legacy configs and new per-core configs.

Changes:
- Add S3RateLimiterConfig struct in s3_util.h
- Add get_effective_s3_rate_limiter_config() declaration and implementation
- Add helper functions checked_positive_product() and apply_s3_token_per_second_max()
- Add required includes: <limits> and util/cpu_info.h

This is Task 2 of the S3 rate limiter refactoring.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…n and dynamic reset

Replace raw config::s3_{get,put}_* accesses with get_effective_s3_rate_limiter_config()
in both S3ClientFactory constructor (initialization) and check_s3_rate_limiter_config_changed()
(dynamic reset). This ensures per-core QPS scaling and the s3_token_per_second_max cap are
applied consistently at startup and on every dynamic config check.

Also add an INFO log on successful limiter reset to make config changes observable in logs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Cover four scenarios: absolute GET config, per-core GET without cap,
per-core GET with cap, and per-core PUT with cap. Add
S3RateLimiterConfigGuard RAII helper to save/restore all nine related
configs after each test.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replace manual save/restore of 3 config values with S3RateLimiterConfigGuard
that handles all 9 relevant S3 rate limiter configs. This prevents state
contamination between tests.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@hello-stephen

Copy link
Copy Markdown
Contributor

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

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@0AyanamiRei 0AyanamiRei changed the title [feature](be) Add CPU-aware S3 rate limiter [improvement](be) Add CPU-aware S3 rate limiter Jul 9, 2026
### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: CPU-aware S3 rate limiter calculation multiplied per-core QPS by BE CPU cores before applying s3_token_per_second_max. Extremely large mutable per-core settings could overflow int64 and trigger a CHECK even when a valid max cap was configured. This change computes the CPU-derived QPS with a wider intermediate value and applies the configured cap safely. It also adds unit coverage for the overflow-with-cap case and PUT limiter rebuild when the max cap changes.

### Release note

None

### Check List (For Author)

- Test: Unit Test

    - ./run-be-ut.sh --run --filter=S3UTILTest.effective_s3_rate_limiter_config_caps_overflowing_per_core_get_config

    - ./run-be-ut.sh --run --filter='S3UTILTest.*'

- Behavior changed: No

- Does this need documentation: No
@0AyanamiRei
0AyanamiRei force-pushed the feature/cpu-aware-s3-limiter branch from 5287ce9 to a4effbe Compare July 9, 2026 11:24
### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: The S3 bytes limiter ignored the result of add(), unlike the request QPS limiter, and the per-core bandwidth configs defaulted to disabled. Check the bytes limiter result consistently and set GET/PUT per-core defaults to 100 MiB/s.

### Release note

Set default per-core S3 GET/PUT bandwidth limits to 100 MiB/s and consistently handle limiter failures.

### Check List (For Author)

- Test: No need to test (per user request; format checks only)
- Behavior changed: Yes (S3 bandwidth limiting defaults to 100 MiB/s per CPU core)
- Does this need documentation: No
@sollhui

sollhui commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Found one blocking issue in the S3 bandwidth limiter propagation.

Critical checkpoint conclusions:

  • Goal/test coverage: The PR adds CPU-aware S3 request and byte limiters and BE unit tests for config calculation and dynamic rebuild. It does not fully apply the new byte limiter to every object-storage path that already shares the S3 rate-limiter contract.
  • Scope/focus: The core PR scope is focused on S3 limiter config, S3 client enforcement, and tests.
  • Concurrency/lifecycle: Limiter reset keeps the existing holder locking and atomic update guards; I did not find a separate concurrency issue in the authoritative PR file set.
  • Config/compatibility: The new mutable BE configs are dynamically observed through the existing checker, but the shared Azure path is left incompatible with the new bandwidth limiter behavior.
  • Parallel paths: Native S3 charges bytes for PUT/UploadPart/GetObject; Azure still charges only request count through the same shared limiter gate.
  • Tests/CI: The added unit tests cover S3 effective config and rebuild behavior, but not the Azure parallel path. I could not run BE UTs in this runner because the checkout lacks thirdparty/installed and protoc. git diff --check was clean for the GitHub PR files; check-format.sh could not run because clang-format 16 is unavailable.

User focus: no additional user-provided review focus was supplied.

Comment thread be/src/io/fs/s3_obj_storage_client.cpp Outdated
### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#65420

Problem Summary: The CPU-aware S3 bandwidth limiter was applied only to the native S3 client. Azure shared the request limiter but did not charge bytes for uploads or downloads, so enabling the limiter produced inconsistent behavior. Centralize request and byte limiter acquisition and pass payload sizes from Azure put, multipart upload, and get operations.

### Release note

Apply object-storage bandwidth limits consistently to native S3 and Azure Blob Storage.

### Check List (For Author)

- Test: Unit Test
    - `S3UTILTest.*`
- Behavior changed: Yes. Azure Blob Storage data transfers now consume the shared byte-rate limiter when S3 rate limiting is enabled.
- Does this need documentation: No
@0AyanamiRei

Copy link
Copy Markdown
Contributor Author

run buildall

@sollhui

sollhui commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

/review

@hello-stephen

Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 77.39% (1896/2450)
Line Coverage 64.44% (34064/52862)
Region Coverage 64.87% (17536/27032)
Branch Coverage 54.08% (9404/17390)

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated review completed for PR #65420.

I did not find a new blocking issue to submit as an inline comment. The earlier Azure byte-accounting gap is already covered by the existing inline thread discussion_r3557395816, and the current head now routes Azure put_object, upload_part, and get_object payload sizes through the shared acquire_s3_rate_limit path.

Critical checkpoint conclusions:

  • Goal/test proof: the PR adds CPU-aware S3 request limits plus byte-rate limiting and centralizes effective limiter calculation. The added BE unit tests cover absolute/per-core/cap/dynamic-reset cases; I could not complete a local BE UT run in this checkout.
  • Scope: the BE changes are focused around S3/Azure object-storage limiter config, helper propagation, and tests.
  • Concurrency/lifecycle: limiter reset continues to use TokenBucketRateLimiterHolder locks; startup use of CpuInfo::num_cores() is after BE CpuInfo::init(), and the BE test harness also initializes CpuInfo.
  • Config/dynamic behavior: new mutable configs have non-negative validators, and check_s3_rate_limiter_config_changed() observes request and byte limiter changes.
  • Compatibility/parallel paths: native S3 and Azure transfer paths now both use the shared request+byte limiter helper. Cloud recycler has its own config surface and was not changed by this BE-scoped PR.
  • Tests/style: git diff --check is clean. I attempted ./run-be-ut.sh --run --filter='S3UTILTest.*', but interrupted it while it was still bootstrapping dependencies/submodules before reaching test execution.
  • User focus: no additional user-provided focus points.

Subagent conclusions:

  • optimizer-rewrite: no optimizer/Nereids surface and no indirect semantic issue found.
  • tests-session-config: no new tests/config/CI candidate found; existing Azure byte-accounting concern is duplicate-covered and fixed in head.
  • Convergence round 1 ended with both live subagents replying NO_NEW_VALUABLE_FINDINGS for the same final ledger/comment set.

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17576	4019	3980	3980
q2	1993	321	203	203
q3	10286	1412	813	813
q4	4722	464	339	339
q5	7739	866	559	559
q6	261	170	135	135
q7	784	839	615	615
q8	10719	1620	1522	1522
q9	6022	4393	4404	4393
q10	6798	1817	1520	1520
q11	506	351	314	314
q12	696	543	421	421
q13	18109	3408	2759	2759
q14	264	264	244	244
q15	q16	781	776	713	713
q17	961	961	945	945
q18	6939	5829	5539	5539
q19	1190	1279	1031	1031
q20	756	664	538	538
q21	5658	2631	2457	2457
q22	414	362	292	292
Total cold run time: 103174 ms
Total hot run time: 29332 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4315	4263	4222	4222
q2	287	310	230	230
q3	4571	4915	4389	4389
q4	2052	2099	1371	1371
q5	4389	4263	4334	4263
q6	221	173	127	127
q7	1730	2118	1667	1667
q8	2396	2165	2056	2056
q9	7856	7747	7755	7747
q10	4719	4696	4260	4260
q11	548	411	380	380
q12	729	832	540	540
q13	3481	3547	3030	3030
q14	315	300	278	278
q15	q16	706	734	654	654
q17	1336	1310	1308	1308
q18	7992	7435	6863	6863
q19	1085	1044	1109	1044
q20	2202	2198	1932	1932
q21	5156	4512	4729	4512
q22	526	463	400	400
Total cold run time: 56612 ms
Total hot run time: 51273 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 180020 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 3a87925f6a625fd828c100113a1d320b1f3f8102, data reload: false

query5	4318	681	496	496
query6	463	229	186	186
query7	4898	592	347	347
query8	334	191	173	173
query9	8767	4106	4108	4106
query10	469	342	322	322
query11	5857	2333	2150	2150
query12	162	115	107	107
query13	1249	623	441	441
query14	6283	5322	4970	4970
query14_1	4314	4306	4325	4306
query15	217	203	184	184
query16	1077	466	444	444
query17	1147	749	595	595
query18	2579	476	360	360
query19	205	189	155	155
query20	110	108	122	108
query21	236	159	134	134
query22	13680	13599	13361	13361
query23	17397	16587	16084	16084
query23_1	16318	16249	16285	16249
query24	7587	1715	1304	1304
query24_1	1321	1289	1284	1284
query25	548	439	367	367
query26	1325	371	205	205
query27	2631	556	370	370
query28	4408	2030	2004	2004
query29	1045	627	481	481
query30	336	253	217	217
query31	1111	1086	982	982
query32	101	60	60	60
query33	507	314	251	251
query34	1162	1202	644	644
query35	768	778	666	666
query36	1404	1405	1268	1268
query37	150	108	89	89
query38	1872	1678	1651	1651
query39	921	926	893	893
query39_1	898	886	890	886
query40	236	158	142	142
query41	67	62	61	61
query42	94	94	95	94
query43	332	323	278	278
query44	1470	778	781	778
query45	195	185	176	176
query46	1039	1219	755	755
query47	2336	2305	2280	2280
query48	414	401	305	305
query49	570	424	313	313
query50	1054	423	328	328
query51	11031	11028	10846	10846
query52	82	90	72	72
query53	256	276	203	203
query54	283	227	248	227
query55	74	73	65	65
query56	300	279	285	279
query57	1423	1425	1316	1316
query58	291	277	246	246
query59	1583	1606	1399	1399
query60	321	279	265	265
query61	172	168	172	168
query62	702	656	578	578
query63	247	208	209	208
query64	2942	1146	963	963
query65	4857	4804	4782	4782
query66	1860	505	390	390
query67	29593	29402	29429	29402
query68	3160	1607	945	945
query69	396	302	275	275
query70	1057	981	1027	981
query71	366	320	313	313
query72	3111	2476	2362	2362
query73	838	749	407	407
query74	5083	4967	4749	4749
query75	2594	2587	2207	2207
query76	2335	1195	816	816
query77	359	390	277	277
query78	12337	12430	11694	11694
query79	1413	1132	802	802
query80	1297	526	468	468
query81	554	314	286	286
query82	602	153	119	119
query83	362	325	292	292
query84	283	163	133	133
query85	945	575	506	506
query86	423	300	290	290
query87	1823	1830	1733	1733
query88	3825	2812	2804	2804
query89	450	401	366	366
query90	1893	210	192	192
query91	204	189	164	164
query92	63	61	60	60
query93	1721	1555	990	990
query94	715	349	321	321
query95	779	498	548	498
query96	1058	794	370	370
query97	2689	2674	2566	2566
query98	208	210	220	210
query99	1134	1181	1063	1063
Total cold run time: 266118 ms
Total hot run time: 180020 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 177199 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 f7c82608f72f44a690332ca4906caf34e1c45a2e, data reload: false

query5	4303	642	486	486
query6	495	220	217	217
query7	4850	555	363	363
query8	341	180	164	164
query9	8776	4027	4082	4027
query10	476	355	294	294
query11	5920	2346	2126	2126
query12	158	99	98	98
query13	1262	551	433	433
query14	6178	5220	4858	4858
query14_1	4246	4237	4228	4228
query15	218	201	184	184
query16	1101	502	438	438
query17	1100	706	571	571
query18	2420	465	332	332
query19	222	193	139	139
query20	139	109	105	105
query21	240	156	135	135
query22	13576	13566	13317	13317
query23	17415	16491	16118	16118
query23_1	16228	16204	16283	16204
query24	7756	1763	1268	1268
query24_1	1274	1297	1302	1297
query25	602	456	396	396
query26	1366	354	212	212
query27	2579	605	387	387
query28	4439	1989	2027	1989
query29	1103	625	510	510
query30	342	269	227	227
query31	1119	1095	991	991
query32	135	62	61	61
query33	540	331	259	259
query34	1157	1129	673	673
query35	748	779	669	669
query36	1170	1195	1027	1027
query37	158	110	93	93
query38	1890	1716	1665	1665
query39	884	859	867	859
query39_1	841	828	825	825
query40	273	163	156	156
query41	73	68	70	68
query42	96	96	95	95
query43	321	325	278	278
query44	1404	798	747	747
query45	194	181	171	171
query46	1053	1154	726	726
query47	2131	2096	1979	1979
query48	395	408	299	299
query49	577	408	304	304
query50	1052	440	327	327
query51	10611	10676	10600	10600
query52	85	84	74	74
query53	257	278	196	196
query54	275	224	218	218
query55	75	69	65	65
query56	293	302	302	302
query57	1294	1272	1187	1187
query58	294	272	262	262
query59	1589	1644	1447	1447
query60	299	271	236	236
query61	148	144	149	144
query62	539	485	431	431
query63	240	201	199	199
query64	2804	1027	855	855
query65	4713	4627	4610	4610
query66	1855	569	366	366
query67	29271	29227	29006	29006
query68	3208	1625	960	960
query69	407	303	261	261
query70	1062	963	948	948
query71	368	336	312	312
query72	3039	2727	2388	2388
query73	821	817	427	427
query74	5012	4907	4696	4696
query75	2523	2479	2127	2127
query76	2326	1204	780	780
query77	346	370	265	265
query78	11821	11819	11321	11321
query79	1425	1174	749	749
query80	640	545	468	468
query81	458	332	288	288
query82	868	159	124	124
query83	404	328	299	299
query84	280	158	128	128
query85	973	609	523	523
query86	354	277	270	270
query87	1814	1812	1734	1734
query88	3687	2769	2750	2750
query89	432	375	322	322
query90	1951	203	195	195
query91	200	190	168	168
query92	64	58	52	52
query93	1551	1483	1016	1016
query94	565	362	284	284
query95	796	580	491	491
query96	1099	791	333	333
query97	2641	2627	2528	2528
query98	212	225	203	203
query99	1083	1102	984	984
Total cold run time: 262888 ms
Total hot run time: 177199 ms

@hello-stephen

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

query1	0.01	0.00	0.01
query2	0.09	0.05	0.05
query3	0.25	0.13	0.14
query4	1.61	0.13	0.14
query5	0.28	0.23	0.22
query6	1.24	1.02	1.05
query7	0.04	0.01	0.00
query8	0.06	0.04	0.04
query9	0.37	0.31	0.31
query10	0.55	0.55	0.53
query11	0.19	0.14	0.14
query12	0.18	0.14	0.14
query13	0.47	0.46	0.47
query14	1.04	1.02	1.02
query15	0.62	0.59	0.58
query16	0.30	0.31	0.31
query17	1.08	1.09	1.03
query18	0.23	0.21	0.21
query19	2.04	1.92	1.93
query20	0.02	0.01	0.01
query21	15.46	0.21	0.13
query22	4.94	0.05	0.05
query23	16.13	0.31	0.12
query24	2.97	0.42	0.33
query25	0.11	0.05	0.05
query26	0.73	0.21	0.15
query27	0.03	0.04	0.03
query28	3.47	0.89	0.53
query29	12.50	3.89	3.14
query30	0.27	0.14	0.15
query31	2.77	0.60	0.30
query32	3.22	0.59	0.49
query33	3.24	3.18	3.28
query34	15.58	4.24	3.49
query35	3.44	3.48	3.49
query36	0.56	0.43	0.43
query37	0.09	0.07	0.06
query38	0.05	0.04	0.03
query39	0.04	0.04	0.03
query40	0.18	0.16	0.16
query41	0.08	0.03	0.04
query42	0.03	0.03	0.03
query43	0.04	0.04	0.04
Total cold run time: 96.6 s
Total hot run time: 24.67 s

### What problem does this PR solve?

Issue Number: None

Related PR: apache#65420

Problem Summary: Azure per-retry byte accounting requires interpreting Azure HTTP request bodies and range headers. Keeping that SDK-specific policy and parsing in the generic S3 utility made the abstraction unnatural. Move the Azure request-byte extraction, context key, and per-retry policy into the Azure object-storage client module while preserving the existing retry-attempt accounting behavior.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./build.sh --be -j48
    - ./run-be-ut.sh --run --filter='S3ObjStorageClientMockTest.*:AzureObjStorageClientRateLimiterTest.*:S3UTILTest.*' -j48
- Behavior changed: No
- Does this need documentation: No
@0AyanamiRei

Copy link
Copy Markdown
Contributor Author

run buildall

@sollhui

sollhui commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

/review

…tion

### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#65420

Problem Summary: Object-store SDK retry hooks treated a bytes rate-limiter rejection as an invariant violation and aborted the BE. Log the rejection as a warning and continue the Native S3 or Azure request instead. Clarify that S3 client reset must compare complete effective configurations because distinct configurations can have the same hash. Also document why configuration validators must validate their own candidate before publication, avoiding stale or concurrently published values.

### Release note

Object-store requests no longer abort the BE when a bytes rate limiter rejects an SDK attempt; the rejection is logged as a warning and the request continues.

### Check List (For Author)

- Test: Unit Test
    - `./run-be-ut.sh --run --filter=S3ClientFactoryTest.ObjClientHolderResetDistinguishesHashCollisions:S3ObjStorageClientMockTest.*:AzureObjStorageClientRateLimiterTest.*:ConfigConcurrencyTest.*:ConfigTest.*:S3UTILTest.* -j48`
    - `./build.sh --be -j48`
    - `build-support/check-format.sh`
- Behavior changed: Yes. Bytes limiter rejection now warns and allows the SDK request to continue instead of aborting the BE.
- Does this need documentation: No
Comment thread be/src/io/fs/s3_obj_storage_client.cpp Outdated
{
std::unique_lock write {rate_limiter_rw_lock};
rate_limiter = std::make_unique<TokenBucketRateLimiter>(max_speed, max_burst, limit);
rate_limiter = std::move(new_rate_limiter);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P1] Preserve outstanding rate/debt across reset. add_with_config() snapshots the old limiter and releases the holder lock before limiter->add() sleeps, while reset() immediately publishes a fresh full bucket. If the rate is lowered during an old-generation sleep, retired requests still wake on the old schedule while new requests consume the new bucket, so traffic can exceed the newly configured cap. Please carry debt/reservations into the new generation or gate new admissions until retired waiters drain, and add a barrier-based reset-with-waiters test.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

maybe we dont need to care this problem?

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated review completed for 97e1688bbf5572e60e15508aeb4eb76d3c92d1f1 against a6745ebc5cbcaa2e2304653494211bf15747cee8.

I found one remaining P1 in the Azure retry path: byte admission can sleep after x-ms-date is created and before Shared Key signing, so a valid low rate can make every attempt expire before transmission. The inline comment explains the reachable interleaving and fix direction. The current AWS-only sibling is already covered by discussion_r3596869021, and the outstanding limiter reset/debt issue is already covered by discussion_r3596869274 / discussion_r3595014308; I did not duplicate those threads.

Critical checkpoint conclusions:

  • Goal and scope: The PR implements CPU-aware GET/PUT QPS and byte limiting, cloud-internal classification, dynamic cloud refresh, retry-attempt byte accounting, exact client-cache keys, and candidate-before-publication config validation. The changes are generally focused and extensively unit-tested, but the Azure authentication ordering means the bandwidth-limiter goal is not yet correct end to end.
  • Concurrency: Config mutation/publication is serialized and the checked callbacks do not create a concrete lock cycle. Holder/factory state uses the expected locks and shared ownership. The remaining old-generation debt problem is already reported in the live threads; the separate disabled fast-path read is a linearizable in-flight admission, not a new defect.
  • Lifecycle and configuration: CpuInfo is initialized before factory construction, cloud refresh compares independent QPS/byte snapshots, and -1/0/max compatibility is symmetric. The existing classic-BE refresh concern is already covered by discussion_r3592467477.
  • Parallel paths and conditions: Internal/external bucket classification survives construction, refresh, reset, and full-key cache lookup. AWS and Azure charge once per SDK attempt with the expected body/range shapes, but Azure's service/client policy order creates the reported timestamp-expiry failure. Production byte limiters have no hard rejection cap, so the log-and-continue rejection branch is not otherwise reachable.
  • Tests and results: Added BE tests cover effective-limit arithmetic, compatibility values, refresh, config concurrency, classification/cache behavior, disabled fast paths, and retry charging. They do not exercise Azure's real policy order across a long admission delay, and the existing reset/debt thread still needs a barrier-based test. No result files are involved.
  • Error handling, observability, and performance: Existing logs and bvars are adequate, disabled-holder fast paths avoid the prior no-op synchronization, and no additional silent error, allocation, or hot-path issue was substantiated.
  • Compatibility and persistence: No storage format, wire protocol, FE/BE transmission, transaction, data-write, or EditLog behavior changes are involved.

User focus: no additional user-provided focus was supplied; the complete PR was reviewed.

Validation was static only, as required by the review runner. I did not build or run tests. The current large-file, formatter, license, and review-status checks pass; compile and unit-test checks were still pending when reviewed.

Comment thread be/src/io/fs/azure_obj_storage_client.cpp Outdated
@github-actions

Copy link
Copy Markdown
Contributor

Codex automated review failed and did not complete.

Error: Codex completed, but no new pull request review was submitted for the current head SHA.
Workflow run: https://github.com/apache/doris/actions/runs/29508913675

Please inspect the workflow logs and rerun the review after the underlying issue is resolved.

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17682	4083	4116	4083
q2	2023	340	212	212
q3	10287	1558	884	884
q4	4694	482	342	342
q5	7507	878	566	566
q6	190	173	142	142
q7	804	817	628	628
q8	9343	1532	1627	1532
q9	5646	4436	4426	4426
q10	6753	1761	1485	1485
q11	512	358	333	333
q12	756	581	472	472
q13	18063	3676	2816	2816
q14	270	279	246	246
q15	q16	812	773	710	710
q17	1046	967	1148	967
q18	7124	5709	5524	5524
q19	1311	1368	1157	1157
q20	816	696	611	611
q21	5975	2665	2603	2603
q22	432	360	302	302
Total cold run time: 102046 ms
Total hot run time: 30041 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4557	4463	4349	4349
q2	298	326	214	214
q3	4594	4923	4420	4420
q4	2116	2178	1386	1386
q5	4492	4401	4351	4351
q6	232	174	128	128
q7	2311	2074	1735	1735
q8	2662	2399	2350	2350
q9	8187	7899	7922	7899
q10	4719	4645	4199	4199
q11	592	462	412	412
q12	752	761	578	578
q13	3381	3725	2935	2935
q14	316	310	294	294
q15	q16	746	762	648	648
q17	1401	1393	1360	1360
q18	8008	7304	7242	7242
q19	1165	1162	1126	1126
q20	2285	2209	1956	1956
q21	5374	4725	4583	4583
q22	531	452	412	412
Total cold run time: 58719 ms
Total hot run time: 52577 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 178547 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 97e1688bbf5572e60e15508aeb4eb76d3c92d1f1, data reload: false

query5	4338	678	497	497
query6	496	237	217	217
query7	4862	603	347	347
query8	347	206	181	181
query9	8829	4159	4107	4107
query10	476	363	292	292
query11	5922	2348	2158	2158
query12	156	104	112	104
query13	1264	599	440	440
query14	6115	5297	4900	4900
query14_1	4319	4272	4273	4272
query15	217	205	176	176
query16	1003	507	477	477
query17	1001	743	586	586
query18	2454	495	353	353
query19	214	210	162	162
query20	119	110	109	109
query21	249	164	139	139
query22	13612	13490	13276	13276
query23	17462	16414	16135	16135
query23_1	16124	16327	16332	16327
query24	7404	1807	1317	1317
query24_1	1315	1308	1290	1290
query25	548	452	360	360
query26	1330	361	217	217
query27	2623	599	371	371
query28	4414	1999	1996	1996
query29	1068	599	462	462
query30	352	261	224	224
query31	1135	1098	975	975
query32	141	59	60	59
query33	536	336	260	260
query34	1191	1160	632	632
query35	784	809	653	653
query36	1190	1142	1024	1024
query37	159	112	94	94
query38	1888	1698	1639	1639
query39	881	861	840	840
query39_1	848	832	839	832
query40	250	163	142	142
query41	65	62	64	62
query42	94	91	91	91
query43	324	329	274	274
query44	1477	771	746	746
query45	205	189	176	176
query46	1100	1195	718	718
query47	2093	2130	2002	2002
query48	399	421	285	285
query49	583	432	333	333
query50	1106	434	332	332
query51	10779	10733	10424	10424
query52	86	88	76	76
query53	275	281	209	209
query54	310	236	221	221
query55	74	78	66	66
query56	295	291	289	289
query57	1312	1273	1165	1165
query58	285	267	258	258
query59	1616	1698	1419	1419
query60	311	277	256	256
query61	154	150	149	149
query62	549	502	429	429
query63	241	201	201	201
query64	2874	1064	853	853
query65	4723	4560	4592	4560
query66	1857	516	384	384
query67	29221	29203	29067	29067
query68	3290	1523	963	963
query69	421	299	270	270
query70	1107	922	952	922
query71	359	360	300	300
query72	3094	2427	2473	2427
query73	873	811	428	428
query74	5104	4953	4759	4759
query75	2660	2573	2132	2132
query76	2329	1298	813	813
query77	370	404	290	290
query78	11871	11963	11270	11270
query79	1385	1251	763	763
query80	673	591	468	468
query81	457	341	289	289
query82	895	162	126	126
query83	402	330	299	299
query84	313	168	132	132
query85	997	599	522	522
query86	364	287	273	273
query87	1842	1825	1764	1764
query88	3798	2773	2733	2733
query89	445	371	327	327
query90	1904	203	200	200
query91	203	192	168	168
query92	65	66	59	59
query93	1597	1498	989	989
query94	541	360	318	318
query95	826	509	469	469
query96	1038	864	334	334
query97	2671	2608	2485	2485
query98	230	205	197	197
query99	1098	1131	1005	1005
Total cold run time: 263590 ms
Total hot run time: 178547 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 25.11 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 97e1688bbf5572e60e15508aeb4eb76d3c92d1f1, data reload: false

query1	0.01	0.00	0.00
query2	0.10	0.05	0.04
query3	0.26	0.14	0.13
query4	1.62	0.14	0.14
query5	0.24	0.26	0.22
query6	1.29	1.05	1.07
query7	0.04	0.01	0.01
query8	0.05	0.04	0.03
query9	0.39	0.32	0.34
query10	0.57	0.57	0.55
query11	0.20	0.14	0.14
query12	0.18	0.14	0.14
query13	0.47	0.49	0.48
query14	1.03	1.02	0.99
query15	0.61	0.61	0.60
query16	0.32	0.34	0.31
query17	1.11	1.10	1.08
query18	0.22	0.21	0.22
query19	2.08	1.92	2.01
query20	0.02	0.02	0.02
query21	15.44	0.20	0.14
query22	4.94	0.05	0.05
query23	16.15	0.31	0.12
query24	2.90	0.45	0.35
query25	0.12	0.04	0.04
query26	0.75	0.22	0.16
query27	0.03	0.04	0.03
query28	3.50	0.92	0.52
query29	12.49	4.22	3.32
query30	0.28	0.14	0.16
query31	2.77	0.60	0.31
query32	3.23	0.60	0.48
query33	3.12	3.21	3.26
query34	15.53	4.18	3.52
query35	3.51	3.54	3.56
query36	0.55	0.45	0.43
query37	0.09	0.06	0.07
query38	0.05	0.04	0.03
query39	0.03	0.03	0.03
query40	0.18	0.17	0.16
query41	0.09	0.03	0.03
query42	0.04	0.03	0.03
query43	0.05	0.03	0.03
Total cold run time: 96.65 s
Total hot run time: 25.11 s

### What problem does this PR solve?

Issue Number: None

Related PR: apache#65420

Problem Summary: S3 bytes throttling used RequestSignedHandler, so a long limiter wait could leave the already-signed request with a stale SigV4 timestamp. Charge the first attempt after QPS admission and immediately before entering the SDK, then use RequestRetryHandler to charge retry attempts before the SDK signs the next request. Replace the manually invoked callback test with a real AWS SDK retry loop.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-be-ut.sh --run --filter=S3ObjStorageClientMockTest.* -j48
    - ./build.sh --be -j48
- Behavior changed: Yes. S3 byte throttling now occurs before SigV4 signing for every SDK attempt.
- Does this need documentation: No
@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 84.31% (360/427) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 57.50% (23977/41702)
Line Coverage 41.19% (235616/571997)
Region Coverage 37.02% (186229/503103)
Branch Coverage 38.16% (83454/218689)

@0AyanamiRei

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 77.59% (1908/2459)
Line Coverage 64.46% (34147/52971)
Region Coverage 64.88% (17570/27079)
Branch Coverage 54.04% (9418/17428)

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17803	4316	4214	4214
q2	1998	325	194	194
q3	10334	1428	856	856
q4	4688	471	352	352
q5	7495	850	551	551
q6	186	177	141	141
q7	759	811	611	611
q8	9683	1480	1638	1480
q9	5786	4297	4264	4264
q10	6823	1724	1478	1478
q11	510	360	317	317
q12	778	579	471	471
q13	18063	3337	2746	2746
q14	268	274	243	243
q15	q16	786	769	714	714
q17	1033	991	1040	991
q18	6962	5790	5538	5538
q19	1288	1238	1035	1035
q20	791	708	582	582
q21	5695	2652	2292	2292
q22	448	366	305	305
Total cold run time: 102177 ms
Total hot run time: 29375 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4493	4408	4447	4408
q2	297	354	225	225
q3	4642	5058	4426	4426
q4	2282	2365	1541	1541
q5	4476	4379	4365	4365
q6	228	174	131	131
q7	2229	2047	1649	1649
q8	2707	2304	2299	2299
q9	7874	7952	7793	7793
q10	4697	4649	4179	4179
q11	646	448	420	420
q12	977	810	585	585
q13	3387	3664	3065	3065
q14	321	318	286	286
q15	q16	745	770	676	676
q17	1390	1386	1401	1386
q18	8241	7536	7108	7108
q19	1085	1060	1057	1057
q20	2220	2231	1949	1949
q21	5432	4789	4750	4750
q22	532	479	411	411
Total cold run time: 58901 ms
Total hot run time: 52709 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 177484 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 411f4d2729844f112c5081047a1593d03c6a9952, data reload: false

query5	4318	638	484	484
query6	460	219	198	198
query7	4846	582	331	331
query8	335	187	174	174
query9	8843	4078	4105	4078
query10	481	361	286	286
query11	5886	2306	2130	2130
query12	153	100	98	98
query13	1276	603	456	456
query14	6422	5284	4949	4949
query14_1	4353	4233	4282	4233
query15	218	201	176	176
query16	1025	444	431	431
query17	1114	673	539	539
query18	2623	452	339	339
query19	201	190	143	143
query20	109	105	107	105
query21	230	167	133	133
query22	13504	13623	13655	13623
query23	17320	16529	15993	15993
query23_1	16106	16155	16177	16155
query24	8113	1739	1297	1297
query24_1	1334	1281	1306	1281
query25	545	446	367	367
query26	1391	343	213	213
query27	2553	579	383	383
query28	4423	1990	1978	1978
query29	1095	601	494	494
query30	329	271	227	227
query31	1114	1095	991	991
query32	102	69	59	59
query33	535	341	262	262
query34	1185	1197	632	632
query35	776	789	735	735
query36	1193	1203	1092	1092
query37	158	113	96	96
query38	1874	1701	1661	1661
query39	872	866	837	837
query39_1	827	831	840	831
query40	249	171	147	147
query41	72	68	68	68
query42	94	92	92	92
query43	320	334	298	298
query44	1448	779	773	773
query45	200	185	176	176
query46	1047	1256	740	740
query47	2078	2064	2006	2006
query48	418	410	293	293
query49	573	404	296	296
query50	1029	421	350	350
query51	10707	10628	10507	10507
query52	86	88	72	72
query53	271	276	197	197
query54	271	227	232	227
query55	74	71	66	66
query56	301	297	275	275
query57	1308	1264	1185	1185
query58	283	267	292	267
query59	1567	1685	1428	1428
query60	305	267	257	257
query61	159	151	148	148
query62	537	485	431	431
query63	249	199	206	199
query64	2761	1043	854	854
query65	4720	4627	4632	4627
query66	1774	483	368	368
query67	29451	29201	29072	29072
query68	3261	1554	996	996
query69	410	315	265	265
query70	1088	993	962	962
query71	356	339	313	313
query72	3051	2716	2389	2389
query73	861	782	430	430
query74	5065	4930	4704	4704
query75	2526	2483	2157	2157
query76	2313	1172	801	801
query77	355	372	292	292
query78	11725	11896	11214	11214
query79	1255	1131	735	735
query80	614	558	460	460
query81	449	338	285	285
query82	235	160	122	122
query83	325	331	297	297
query84	284	160	125	125
query85	891	598	514	514
query86	330	301	272	272
query87	1818	1817	1766	1766
query88	3707	2809	2767	2767
query89	414	387	331	331
query90	2198	204	202	202
query91	196	190	164	164
query92	61	58	55	55
query93	1508	1575	941	941
query94	540	345	313	313
query95	797	487	543	487
query96	1101	822	347	347
query97	2610	2610	2498	2498
query98	209	221	201	201
query99	1084	1122	960	960
Total cold run time: 262449 ms
Total hot run time: 177484 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 24.94 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 411f4d2729844f112c5081047a1593d03c6a9952, data reload: false

query1	0.01	0.00	0.01
query2	0.12	0.05	0.05
query3	0.26	0.13	0.13
query4	1.61	0.14	0.13
query5	0.25	0.22	0.23
query6	1.23	1.06	1.06
query7	0.03	0.01	0.00
query8	0.06	0.04	0.04
query9	0.40	0.33	0.34
query10	0.57	0.54	0.54
query11	0.18	0.13	0.13
query12	0.18	0.14	0.14
query13	0.47	0.47	0.48
query14	1.01	1.01	1.02
query15	0.62	0.59	0.60
query16	0.32	0.34	0.33
query17	1.08	1.14	1.12
query18	0.23	0.21	0.21
query19	2.11	1.94	1.90
query20	0.02	0.02	0.01
query21	15.43	0.22	0.15
query22	4.90	0.05	0.05
query23	16.14	0.32	0.12
query24	2.96	0.43	0.31
query25	0.11	0.06	0.05
query26	0.72	0.21	0.14
query27	0.03	0.05	0.04
query28	3.53	0.93	0.55
query29	12.51	4.11	3.30
query30	0.28	0.15	0.16
query31	2.76	0.62	0.31
query32	3.21	0.61	0.48
query33	3.22	3.20	3.12
query34	15.47	4.25	3.49
query35	3.56	3.50	3.52
query36	0.56	0.43	0.43
query37	0.09	0.07	0.06
query38	0.05	0.04	0.05
query39	0.04	0.03	0.03
query40	0.18	0.17	0.14
query41	0.08	0.03	0.02
query42	0.03	0.03	0.02
query43	0.04	0.04	0.03
Total cold run time: 96.66 s
Total hot run time: 24.94 s

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 83.71% (370/442) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 57.47% (23967/41707)
Line Coverage 41.17% (235486/572013)
Region Coverage 36.98% (186071/503108)
Branch Coverage 38.14% (83412/218689)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 85.50% (342/400) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 75.00% (30510/40681)
Line Coverage 59.13% (336139/568445)
Region Coverage 55.84% (281970/504983)
Branch Coverage 57.09% (124918/218821)

### What problem does this PR solve?

Issue Number: None

Related PR: apache#65420

Problem Summary: The PR had expanded into a generic runtime config validator redesign and AWS SDK retry-boundary throttling. Keep this PR scoped to the CPU-aware object-storage limiter by restoring the existing config framework and signed-handler behavior, documenting the runtime validator limitation for a separate PR, and keeping limiter tests independent of generic set_config validation.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-be-ut.sh --run --filter=ConfigTest.*:S3UTILTest.*:S3ObjStorageClientMockTest.* -j8
    - ./build.sh --be -j64
    - ./build-support/check-format.sh
- Behavior changed: Yes. Revert the out-of-scope config framework and retry-boundary changes.
- Does this need documentation: No
@0AyanamiRei

Copy link
Copy Markdown
Contributor Author

run buildall

### What problem does this PR solve?

Issue Number: None

Related PR: apache#65420

Problem Summary: The previous rollback removed the AWS pre-sign retry hook but left per-attempt byte accounting in both Native S3 and Azure. Restore the pre-retry design so each Doris logical GET or PUT request acquires QPS and bytes once before entering the SDK. Remove AWS signed handlers, Azure per-retry policies, SDK request parsing, split limiter acquisition APIs, and per-attempt tests. Add focused tests for the logical-request boundary.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - ./run-be-ut.sh --run --filter=S3ObjStorageClientMockTest.*:AzureObjStorageClientRateLimiterTest.*:S3UTILTest.* -j64
    - ./build.sh --be -j64
    - ./build-support/check-format.sh
- Behavior changed: Yes. Object-storage bytes are charged once per Doris logical request instead of once per SDK retry attempt.
- Does this need documentation: No
@0AyanamiRei

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 77.59% (1908/2459)
Line Coverage 64.48% (34155/52971)
Region Coverage 64.91% (17576/27079)
Branch Coverage 54.05% (9420/17428)

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	18002	4209	4067	4067
q2	2039	326	207	207
q3	10275	1415	829	829
q4	4711	472	338	338
q5	7770	900	574	574
q6	275	184	146	146
q7	794	839	614	614
q8	10457	1606	1568	1568
q9	5911	4357	4358	4357
q10	6744	1784	1495	1495
q11	516	377	322	322
q12	751	573	454	454
q13	18131	3426	2772	2772
q14	267	260	236	236
q15	q16	784	774	712	712
q17	1006	919	860	860
q18	6884	5755	5488	5488
q19	1163	1336	1114	1114
q20	822	671	575	575
q21	5653	2630	2251	2251
q22	441	353	303	303
Total cold run time: 103396 ms
Total hot run time: 29282 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4440	4438	4442	4438
q2	307	323	218	218
q3	4643	4971	4429	4429
q4	2088	2152	1375	1375
q5	4444	4333	4278	4278
q6	226	177	131	131
q7	2175	1850	1633	1633
q8	2675	2275	2228	2228
q9	7856	7829	7800	7800
q10	4712	4613	4189	4189
q11	773	427	412	412
q12	750	744	548	548
q13	3295	3688	2973	2973
q14	316	302	272	272
q15	q16	702	749	667	667
q17	1382	1389	1380	1380
q18	8094	7363	7035	7035
q19	1118	1091	1111	1091
q20	2236	2192	1946	1946
q21	5322	4687	4531	4531
q22	519	465	412	412
Total cold run time: 58073 ms
Total hot run time: 51986 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 176978 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 d538f615395f32a065cc15bc5c7de0515b8f2543, data reload: false

query5	4337	630	476	476
query6	478	214	205	205
query7	4841	580	348	348
query8	340	200	173	173
query9	8785	4059	4047	4047
query10	477	361	314	314
query11	5923	2338	2145	2145
query12	157	104	105	104
query13	1250	617	412	412
query14	6361	5271	4878	4878
query14_1	4236	4241	4223	4223
query15	225	208	179	179
query16	1052	500	454	454
query17	1133	718	590	590
query18	2731	474	352	352
query19	221	196	150	150
query20	116	107	112	107
query21	245	162	141	141
query22	13594	13564	13351	13351
query23	17323	16353	16097	16097
query23_1	16235	16177	16153	16153
query24	7513	1787	1279	1279
query24_1	1324	1247	1274	1247
query25	565	457	399	399
query26	1093	356	207	207
query27	2589	638	370	370
query28	4409	1979	1965	1965
query29	1094	632	488	488
query30	344	265	229	229
query31	1125	1098	972	972
query32	111	64	61	61
query33	536	330	255	255
query34	1169	1126	635	635
query35	776	782	682	682
query36	1206	1227	1055	1055
query37	155	114	93	93
query38	1873	1689	1686	1686
query39	885	885	845	845
query39_1	859	845	844	844
query40	253	167	153	153
query41	72	70	68	68
query42	138	92	91	91
query43	321	327	280	280
query44	1413	770	750	750
query45	197	181	181	181
query46	1074	1191	720	720
query47	2157	2129	1997	1997
query48	414	423	294	294
query49	570	423	321	321
query50	1033	431	350	350
query51	10519	10736	10532	10532
query52	92	86	72	72
query53	257	282	204	204
query54	291	228	222	222
query55	75	77	69	69
query56	294	288	280	280
query57	1322	1293	1190	1190
query58	282	274	280	274
query59	1587	1665	1396	1396
query60	306	271	252	252
query61	145	148	153	148
query62	554	491	427	427
query63	233	199	196	196
query64	2628	1049	830	830
query65	4597	4632	4619	4619
query66	1760	509	387	387
query67	29219	29107	29093	29093
query68	3285	1677	916	916
query69	402	312	272	272
query70	1044	948	957	948
query71	365	342	303	303
query72	3099	2749	2382	2382
query73	843	722	444	444
query74	5094	4928	4731	4731
query75	2525	2492	2150	2150
query76	2338	1147	754	754
query77	344	366	278	278
query78	11895	11881	11235	11235
query79	1398	1108	725	725
query80	1231	542	477	477
query81	517	344	290	290
query82	621	155	119	119
query83	362	323	298	298
query84	287	162	133	133
query85	993	593	517	517
query86	447	314	275	275
query87	1822	1809	1773	1773
query88	3701	2775	2726	2726
query89	435	377	326	326
query90	1899	196	192	192
query91	204	193	159	159
query92	67	59	54	54
query93	1721	1499	1047	1047
query94	737	353	333	333
query95	788	586	473	473
query96	1136	767	328	328
query97	2610	2628	2493	2493
query98	220	206	202	202
query99	1093	1109	981	981
Total cold run time: 263422 ms
Total hot run time: 176978 ms

@hello-stephen

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

query1	0.00	0.00	0.01
query2	0.10	0.05	0.04
query3	0.26	0.16	0.14
query4	1.60	0.14	0.14
query5	0.24	0.22	0.24
query6	1.28	1.04	1.08
query7	0.04	0.01	0.00
query8	0.06	0.03	0.03
query9	0.37	0.31	0.33
query10	0.56	0.57	0.57
query11	0.20	0.14	0.14
query12	0.18	0.14	0.14
query13	0.47	0.47	0.48
query14	1.00	1.03	0.99
query15	0.62	0.60	0.58
query16	0.31	0.32	0.30
query17	1.12	1.11	1.08
query18	0.22	0.21	0.22
query19	2.06	1.92	1.97
query20	0.01	0.01	0.01
query21	15.43	0.24	0.14
query22	4.73	0.06	0.05
query23	16.11	0.30	0.12
query24	2.95	0.40	0.35
query25	0.09	0.05	0.05
query26	0.76	0.20	0.16
query27	0.05	0.03	0.04
query28	3.51	0.97	0.54
query29	12.57	3.97	3.17
query30	0.27	0.16	0.15
query31	2.77	0.61	0.30
query32	3.23	0.60	0.48
query33	3.15	3.20	3.20
query34	15.63	4.21	3.47
query35	3.46	3.49	3.51
query36	0.55	0.46	0.43
query37	0.09	0.07	0.07
query38	0.06	0.04	0.04
query39	0.04	0.03	0.03
query40	0.19	0.16	0.15
query41	0.08	0.03	0.03
query42	0.04	0.03	0.03
query43	0.05	0.04	0.04
Total cold run time: 96.51 s
Total hot run time: 24.85 s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants