Skip to content

[improvement] Control HNSW build chunk memory#62869

Open
yx-keith wants to merge 7 commits into
apache:masterfrom
yx-keith:optimize-HNSW-build
Open

[improvement] Control HNSW build chunk memory#62869
yx-keith wants to merge 7 commits into
apache:masterfrom
yx-keith:optimize-HNSW-build

Conversation

@yx-keith
Copy link
Copy Markdown
Contributor

@yx-keith yx-keith commented Apr 27, 2026

What problem does this PR solve?

Building HNSW / ANN (vector) indexes had several memory and correctness issues:

  1. Oversized input buffer at init. The writer pre-reserved a buffer sized at 1,000,000 rows × dim. For dim=512 that is ~2GB reserved up front, even for a segment with only a few thousand rows.
  2. IVF re-trained on every chunk. train() was called once per buffered chunk. For IVF this re-runs k-means and invalidates vectors already added in earlier chunks (a correctness bug), and for HNSW it needlessly acquires the build lock.
  3. In-memory graph / store growth was unbounded across concurrent builds. The HNSW graph, the quantized vector store, and per-thread workspaces are not capped, so concurrent loads / compactions / schema-change builds can stack peak usage and OOM the BE.

What this PR does

1. Byte-budgeted chunking (ann_index_build_chunk_bytes, default 128MB).
The effective per-batch row count is min(ann_index_build_chunk_size, chunk_bytes / row_bytes). The init-time full reserve is removed, and the input buffer is freed before save() so the serialization workspace does not overlap a stale chunk allocation.

2. Train once per build.
Adds VectorIndex::needs_training() (HNSW+FLAT → false; IVF / SQ / PQ → true) and drives training through a single _train_once_if_needed() guarded by a _trained flag, so train() runs at most once. Fixes the IVF re-cluster bug and removes pointless lock acquisition for HNSW.

3. Global build-memory admission control (new ann_build_memory_budget.{h,cpp}).
A process-wide AnnBuildMemoryBudget singleton pairs with the existing ScopedOmpThreadBudget (which caps CPU): a build must reserve its estimated memory peak before train/add and releases it on finish (RAII). The reservation grows incrementally with the real accumulated row count, so the global budget reflects actual memory rather than just a per-chunk floor. On budget exhaustion the behavior is configurable via ann_index_build_on_oom_action:

  • wait — block up to ann_index_build_memory_wait_timeout_ms, then fail;
  • skip — delete the index entry and let the segment write succeed (queries fall back to brute force);
  • fail — return immediately without waiting.

A single oversized build is admitted when nothing else is in flight, so it cannot deadlock against itself.

New configs (all default to a no-op so existing deployments are unaffected):

  • ann_index_build_chunk_bytes = 134217728
  • ann_index_build_memory_budget_bytes = 0 (0 disables admission control)
  • ann_index_build_memory_wait_timeout_ms = 30000
  • ann_index_build_on_oom_action = "wait"

Implementation note: the budget module is intentionally FAISS-free. It uses a lightweight AnnBuildMemoryParams POD (mirroring only the fields the estimator needs) instead of FaissBuildParameter, so ann_index_writer.h does not leak <faiss/*> into the many non-ANN translation units that include column_writer.h.

Release note

Add memory control for ANN/HNSW index building: byte-budgeted input chunks and an optional global build-memory admission control to bound peak memory across concurrent index builds. Disabled by default (ann_index_build_memory_budget_bytes=0).

Check List (For Author)

  • Test
    • Unit Test: added ann_build_memory_budget_test.cpp (budget reserve/release/grow paths, estimator monotonicity, writer skip/fail/disabled paths) and extended ann_index_writer_test.cpp (train-once for IVF/PQ/SQ, HNSW skips train).
  • Behavior changed:
    • New configs, all defaulting to existing behavior (admission control off by default).
  • Does this need documentation?
    • The new BE configs should be documented.

Release note

None

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

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

### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: Reduce ANN/HNSW index build input-buffer memory spikes by sizing build chunks with a byte budget, removing the initialization-time full chunk reserve, and releasing temporary vector buffers at index finish.

### Release note

None

### Check List (For Author)

- Test: Partial
    - Unit Test: Added/updated BE unit tests in ann_index_writer_test.cpp
    - Manual test: git diff --check passed for modified files
    - Not run: build-support/clang-format.sh could not run because llvm@16 is not installed locally
    - Not run: ./run-be-ut.sh --run --filter=AnnIndexWriterTest failed because JAVA_HOME points to JDK 8 and JDK_17 is not set
- Behavior changed: No
- Does this need documentation: No
@yx-keith yx-keith force-pushed the optimize-HNSW-build branch from 82aab7e to 0fb16c7 Compare May 15, 2026 16:16
yaoxiao and others added 4 commits May 16, 2026 11:30
…order

Follow-up to 0fb16c7 ("Control HNSW build chunk memory"). The first
commit reduced input-buffer spikes but left a few correctness and memory
issues in AnnIndexColumnWriter.

What changes:

- Introduce VectorIndex::needs_training() and FaissVectorIndex override
  so HNSW+FLAT reports false (no training required) while IVF and any
  scalar/product quantizer reports true.
- Drive train() from a single _train_once_if_needed() helper guarded by
  a _trained flag. Previously every full chunk re-invoked train(),
  which for IVF re-ran k-means and invalidated vectors already added,
  and for HNSW pointlessly acquired the OpenMP build budget mutex.
- Move _reset_chunk_buffer(true) before save() in finish() so the
  serialization workspace does not coexist with a stale chunk-bytes
  allocation (peak shaved by up to ann_index_build_chunk_bytes).
- Harden _reset_chunk_buffer(false): when chunk_rows or dimension is
  unset, target * 2 is zero and the previous predicate degenerated to
  "free on every batch". Now we short-circuit when target == 0.
- Drop the dead "if (_chunk_rows == 0)" branch in add_array_values;
  init() always populates it, replaced by DCHECK.
- Log the index id on every ANN-writer log line so operators can
  attribute OOM and skip events to a specific tablet index.

Tests:

- MockVectorIndex grows a needs_training() mock; existing IVF/PQ/SQ
  tests now assert train() is invoked exactly once (not per chunk).
- New TestHnswSkipsTrainCall verifies HNSW pushes multiple chunks
  through add() with zero train() invocations.
- New TestComputeChunkRows* cover dim==0, byte budget smaller than a
  row, and the chunk_size upper bound.
- New TestResetChunkBufferKeepsCapacityWhenTargetUnknown regresses the
  shrink-bug fix by exercising the protected helper directly.
The chunk-bytes changes in 0fb16c7 and f3afb2a9 only bounded the input
buffer. The in-memory HNSW graph, the quantized vector store, and the
per-thread workspace are still uncontrolled, so concurrent loads /
compactions / schema-change builds can stack peak usage and OOM the BE.

This commit adds a global admission-control layer pairing with the
existing ScopedOmpThreadBudget (which caps CPU): a build now also has to
reserve its estimated memory peak before train/add.

New module storage/index/ann/ann_build_memory_budget.{h,cpp}:

- AnnBuildMemoryBudget singleton with try_reserve(bytes, timeout_ms),
  release(bytes), reserved_bytes(). Waiters block on a condition
  variable and are notified on every release. A single oversized build
  is allowed when nothing else is in flight, so it cannot self-deadlock.
- AnnBuildMemoryReservation RAII handle. Move-only; releases bytes on
  destruction. try_acquire() returns an inactive handle on failure.
- estimate_ann_build_memory(): conservative model covering input chunk
  buffer, quantizer-aware vector store (FLAT/SQ8/SQ4/PQ),
  HNSW graph (rows * max_degree * 8 * 2.0) or IVF centroid overhead,
  plus per-thread workspace (omp_threads * 4 MiB). When expected_rows
  is unknown (the writer does not know segment size at init() time) it
  falls back to chunk_rows, giving at least a single-chunk reservation.

AnnIndexColumnWriter integration:

- init() reserves the estimated peak via AnnBuildMemoryReservation.
  Failure routes through _apply_oom_action:
    * "skip"  -> writer enters _skip_due_to_oom mode, add_array_values
                 becomes a no-op, finish() deletes the index entry so
                 the surrounding segment write still succeeds (warning
                 logged).
    * "wait"  -> try_reserve has already waited the configured timeout;
                 treated as failure (RuntimeError with diagnostics).
    * "fail"  -> same RuntimeError path without waiting.
- The reservation is held in a writer member and released by RAII when
  the writer is destroyed, after save()/delete_index has completed.

New mutable configs (default disabled to keep existing deployments
unaffected):
- ann_index_build_memory_budget_bytes      (default 0 = disabled)
- ann_index_build_memory_wait_timeout_ms   (default 30000)
- ann_index_build_on_oom_action            (default "wait", validated)

Tests (new ann_build_memory_budget_test.cpp):

- Budget primitives: reserve/release accounting, timeout when starved,
  oversized single build allowed, waiter wakes on release, RAII handle
  releases on destruction, failed acquisition yields inactive handle.
- Estimator: grows with rows, dim=0 returns 0, unknown rows fall back
  to chunk-size, FLAT > SQ8 > SQ4 > PQ store footprint.
- Writer integration: skip mode deletes index entry and swallows rows,
  fail mode returns RuntimeError from init(), disabled budget is a
  complete no-op (reserved_bytes stays 0).
Follow-up to the ANN build admission control. Two issues:

- on_oom_action="fail" still waited the full ann_index_build_memory_wait_timeout_ms
  before failing, contradicting its "fail immediately" contract. init() now passes
  timeout 0 for "fail" via _oom_wait_timeout_ms().
- The admission reservation only ever covered one chunk (expected_rows was always 0
  at init time), so the HNSW graph / vector store of a full segment were never
  accounted and the global budget could not bound real memory. The reservation now
  grows incrementally as rows accumulate:
    * AnnBuildMemoryBudget::try_reserve gains a caller_held argument so a build can
      grow its own reservation without deadlocking against itself; a grow only
      blocks on *other* concurrent builds.
    * AnnBuildMemoryReservation::grow() tops up the handle.
    * The writer tracks _added_rows and calls _ensure_reservation_for_rows() before
      each streaming add() (backpressure via on_oom_action on contention) and a
      best-effort grow at finish() for the last partial chunk.

Tests: grow sole-build/contended/wakeup paths, fail-action returns without waiting
despite a large timeout, and the reservation grows with accumulated rows.
# Conflicts:
#	be/src/storage/index/ann/ann_index_writer.h
@yx-keith
Copy link
Copy Markdown
Contributor Author

run buildall

@yx-keith
Copy link
Copy Markdown
Contributor Author

run buildall

The admission-control header chain leaked <faiss/*> into every translation
unit that includes column_writer.h (via ann_index_writer.h ->
ann_build_memory_budget.h -> faiss_ann_index.h), breaking the build with
"fatal error: 'faiss/Index.h' file not found" because those units do not have
the FAISS include path.

Decouple the budget module from FAISS:
- Add AnnBuildMemoryParams, a FAISS-free POD mirroring the few build fields the
  estimator needs (index kind, quantizer, dim, max_degree, ivf_nlist, pq_m).
- estimate_ann_build_memory() now takes AnnBuildMemoryParams; the budget header
  no longer includes faiss_ann_index.h.
- AnnIndexColumnWriter stores AnnBuildMemoryParams instead of FaissBuildParameter
  and drops the faiss_ann_index.h include; init() projects FaissBuildParameter
  via to_memory_params(), so ann_index_writer.h stays FAISS-free.
- Update the estimator unit tests to build AnnBuildMemoryParams.

No behavior change: the estimate values and admission logic are identical.
@yx-keith
Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

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

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17589	3984	3951	3951
q2	q3	10768	1401	813	813
q4	4685	479	350	350
q5	7747	2309	2116	2116
q6	250	181	137	137
q7	941	781	637	637
q8	9403	1725	1597	1597
q9	5719	4978	4977	4977
q10	6481	2236	1890	1890
q11	458	278	249	249
q12	677	432	293	293
q13	18231	3474	2845	2845
q14	267	259	232	232
q15	q16	828	775	715	715
q17	935	967	968	967
q18	7043	5741	5602	5602
q19	1289	1261	1071	1071
q20	533	414	272	272
q21	5647	2533	2429	2429
q22	442	357	306	306
Total cold run time: 99933 ms
Total hot run time: 31449 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4327	4242	4253	4242
q2	q3	4521	5013	4354	4354
q4	2102	2203	1388	1388
q5	4450	4310	4298	4298
q6	311	300	150	150
q7	2183	1930	1673	1673
q8	2528	2182	2191	2182
q9	8359	7964	7922	7922
q10	4832	4761	4349	4349
q11	588	435	368	368
q12	775	756	534	534
q13	3411	3631	2987	2987
q14	288	306	288	288
q15	q16	729	726	651	651
q17	1356	1392	1415	1392
q18	7741	7215	7282	7215
q19	1198	1095	1078	1078
q20	2208	2200	1953	1953
q21	5261	4584	4433	4433
q22	518	475	404	404
Total cold run time: 57686 ms
Total hot run time: 51861 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

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

query5	4319	660	524	524
query6	335	221	205	205
query7	4227	567	323	323
query8	333	241	236	236
query9	8809	4067	4091	4067
query10	463	348	326	326
query11	5824	2391	2281	2281
query12	181	132	124	124
query13	1319	611	451	451
query14	6082	5469	5164	5164
query14_1	4506	4518	4472	4472
query15	214	209	200	200
query16	1045	466	445	445
query17	1156	753	647	647
query18	2726	482	354	354
query19	214	191	156	156
query20	137	134	127	127
query21	214	139	125	125
query22	13624	13535	13439	13439
query23	17360	16510	16074	16074
query23_1	16261	16246	16339	16246
query24	7371	1766	1339	1339
query24_1	1330	1310	1335	1310
query25	540	481	418	418
query26	1297	331	176	176
query27	2680	549	364	364
query28	4404	2028	2010	2010
query29	1011	608	497	497
query30	312	236	196	196
query31	1126	1076	953	953
query32	89	86	73	73
query33	533	342	287	287
query34	1195	1141	665	665
query35	779	815	706	706
query36	1376	1445	1284	1284
query37	153	104	91	91
query38	3222	3205	3063	3063
query39	926	923	893	893
query39_1	895	911	876	876
query40	223	149	131	131
query41	65	64	63	63
query42	110	108	106	106
query43	329	330	294	294
query44	
query45	214	202	198	198
query46	1123	1312	762	762
query47	2423	2374	2302	2302
query48	419	395	315	315
query49	633	482	389	389
query50	975	364	248	248
query51	4340	4387	4270	4270
query52	104	105	92	92
query53	254	281	203	203
query54	322	274	261	261
query55	94	90	91	90
query56	291	306	307	306
query57	1439	1428	1333	1333
query58	293	266	269	266
query59	1569	1668	1434	1434
query60	324	319	313	313
query61	155	152	160	152
query62	717	684	572	572
query63	249	209	202	202
query64	2374	806	632	632
query65	
query66	1647	476	361	361
query67	29888	29744	29556	29556
query68	
query69	471	360	313	313
query70	1020	1023	987	987
query71	335	276	257	257
query72	2968	2687	2423	2423
query73	837	753	431	431
query74	5097	4957	4770	4770
query75	2711	2587	2290	2290
query76	2281	1147	768	768
query77	396	393	334	334
query78	12332	12335	12034	12034
query79	1260	1006	730	730
query80	589	541	467	467
query81	446	278	242	242
query82	242	162	121	121
query83	273	277	253	253
query84	257	142	112	112
query85	896	545	454	454
query86	356	335	303	303
query87	3434	3391	3220	3220
query88	3610	2769	2764	2764
query89	429	399	339	339
query90	2173	183	181	181
query91	181	172	136	136
query92	84	80	75	75
query93	1459	1473	866	866
query94	560	348	318	318
query95	677	389	344	344
query96	1115	881	373	373
query97	2722	2714	2615	2615
query98	233	231	226	226
query99	1214	1148	1044	1044
Total cold run time: 252915 ms
Total hot run time: 171557 ms

…ntrol

WriterAdmissionTest.SkipModeDeletesIndexAndSwallowsRows and
FailModeReturnsErrorFromInit set a tiny budget (1 byte) expecting the writer to
hit skip / fail. But AnnBuildMemoryBudget deliberately lets a single oversized
build through when nothing else is in flight (so it cannot deadlock against
itself), so with no other reservation the writer was admitted and neither skip
nor fail fired.

Pre-occupy the budget with try_reserve(1) before init() in both tests, mirroring
FailModeDoesNotWaitDespiteLargeTimeout, so the writer is no longer the sole build
and admission control correctly rejects it. No production code change.
@yx-keith
Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

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

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17676	4034	4041	4034
q2	q3	10749	1421	818	818
q4	4685	484	351	351
q5	7573	2275	2141	2141
q6	337	174	136	136
q7	997	770	646	646
q8	9374	1797	1619	1619
q9	7060	4974	4958	4958
q10	6463	2319	1882	1882
q11	442	271	257	257
q12	693	435	301	301
q13	18184	3406	2782	2782
q14	264	261	242	242
q15	q16	826	777	708	708
q17	908	977	884	884
q18	6964	5789	5563	5563
q19	1163	1300	1096	1096
q20	508	398	261	261
q21	5659	2676	2396	2396
q22	431	355	297	297
Total cold run time: 100956 ms
Total hot run time: 31372 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4402	4304	4294	4294
q2	q3	4585	5048	4372	4372
q4	2101	2205	1385	1385
q5	4478	4338	4840	4338
q6	254	200	140	140
q7	2044	1786	1624	1624
q8	2483	2138	2285	2138
q9	8010	8127	7984	7984
q10	4855	4790	4577	4577
q11	578	420	394	394
q12	735	766	540	540
q13	3366	3576	3011	3011
q14	301	307	264	264
q15	q16	715	756	665	665
q17	1377	1343	1369	1343
q18	7891	7355	7090	7090
q19	1117	1115	1111	1111
q20	2231	2217	1945	1945
q21	5294	4605	4520	4520
q22	543	473	407	407
Total cold run time: 57360 ms
Total hot run time: 52142 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

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

query5	4329	655	541	541
query6	329	219	200	200
query7	4257	557	309	309
query8	336	228	231	228
query9	8779	4049	4117	4049
query10	456	346	334	334
query11	5817	2465	2272	2272
query12	197	135	130	130
query13	1315	631	432	432
query14	6219	5471	5173	5173
query14_1	4523	4524	4538	4524
query15	217	207	190	190
query16	1013	473	478	473
query17	1145	722	590	590
query18	2712	494	361	361
query19	217	204	165	165
query20	135	131	128	128
query21	216	142	120	120
query22	13677	13519	13460	13460
query23	17437	16594	16351	16351
query23_1	16464	16340	16302	16302
query24	7466	1790	1344	1344
query24_1	1344	1340	1332	1332
query25	556	483	427	427
query26	1298	310	179	179
query27	2693	592	353	353
query28	4445	2027	1978	1978
query29	967	621	495	495
query30	312	248	198	198
query31	1155	1083	945	945
query32	92	87	76	76
query33	550	354	298	298
query34	1193	1172	660	660
query35	778	792	703	703
query36	1405	1432	1275	1275
query37	155	106	96	96
query38	3203	3208	3100	3100
query39	940	953	901	901
query39_1	888	885	883	883
query40	236	150	129	129
query41	74	69	68	68
query42	115	115	113	113
query43	336	343	303	303
query44	
query45	221	209	207	207
query46	1105	1198	760	760
query47	2411	2386	2228	2228
query48	421	409	309	309
query49	655	525	415	415
query50	1116	348	257	257
query51	4415	4423	4209	4209
query52	108	112	99	99
query53	261	281	213	213
query54	349	288	272	272
query55	100	97	90	90
query56	324	326	322	322
query57	1466	1431	1315	1315
query58	316	289	282	282
query59	1600	1694	1487	1487
query60	333	347	332	332
query61	186	183	181	181
query62	703	654	599	599
query63	255	206	206	206
query64	2422	873	739	739
query65	
query66	1641	487	349	349
query67	29900	29708	29587	29587
query68	
query69	458	353	313	313
query70	1059	1052	1014	1014
query71	312	280	270	270
query72	3063	2703	2471	2471
query73	822	810	440	440
query74	5118	4951	4829	4829
query75	2688	2621	2258	2258
query76	2311	1174	772	772
query77	404	427	330	330
query78	12365	12535	11902	11902
query79	1459	1060	780	780
query80	808	568	465	465
query81	491	281	245	245
query82	1246	158	124	124
query83	362	282	258	258
query84	259	140	117	117
query85	931	543	459	459
query86	444	360	316	316
query87	3452	3394	3260	3260
query88	3670	2765	2757	2757
query89	456	396	344	344
query90	1869	181	190	181
query91	185	172	143	143
query92	77	85	75	75
query93	1571	1395	897	897
query94	635	348	312	312
query95	668	381	357	357
query96	1066	798	361	361
query97	2767	2782	2616	2616
query98	245	239	225	225
query99	1175	1164	1005	1005
Total cold run time: 255778 ms
Total hot run time: 172815 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 83.82% (290/346) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 54.03% (21031/38923)
Line Coverage 37.61% (199540/530597)
Region Coverage 33.88% (156324/461468)
Branch Coverage 34.85% (68040/195209)

@hello-stephen
Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 86.13% (298/346) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 73.87% (28160/38121)
Line Coverage 57.82% (306026/529249)
Region Coverage 55.04% (256409/465888)
Branch Coverage 56.49% (110684/195939)

@hello-stephen
Copy link
Copy Markdown
Contributor

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

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17654	4038	4123	4038
q2	q3	10763	1425	844	844
q4	4685	483	344	344
q5	7579	2293	2188	2188
q6	246	188	140	140
q7	944	797	626	626
q8	9453	1734	1675	1675
q9	5850	4984	4984	4984
q10	6459	2286	1947	1947
q11	445	284	260	260
q12	689	424	290	290
q13	18204	3377	2751	2751
q14	262	261	237	237
q15	q16	823	776	716	716
q17	981	920	994	920
q18	7204	5833	5707	5707
q19	1199	1410	1215	1215
q20	528	468	291	291
q21	6098	2879	2709	2709
q22	447	381	308	308
Total cold run time: 100513 ms
Total hot run time: 32190 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4886	4934	4772	4772
q2	q3	4897	5241	4662	4662
q4	2078	2210	1392	1392
q5	5038	4800	4761	4761
q6	246	193	140	140
q7	1969	1758	1547	1547
q8	2520	2315	2271	2271
q9	7919	7420	7575	7420
q10	4760	4672	4196	4196
q11	542	418	359	359
q12	726	734	521	521
q13	3082	3379	2809	2809
q14	277	272	264	264
q15	q16	683	692	625	625
q17	1316	1282	1279	1279
q18	7413	6955	6896	6896
q19	1120	1094	1132	1094
q20	2218	2207	1966	1966
q21	5296	4509	4520	4509
q22	531	447	437	437
Total cold run time: 57517 ms
Total hot run time: 51920 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

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

query5	4302	664	547	547
query6	326	240	227	227
query7	4245	568	315	315
query8	329	235	215	215
query9	8798	4036	4024	4024
query10	453	358	300	300
query11	5799	2425	2258	2258
query12	194	132	127	127
query13	1283	582	458	458
query14	6021	5444	5145	5145
query14_1	4468	4486	4484	4484
query15	213	207	191	191
query16	980	431	410	410
query17	936	717	578	578
query18	2429	512	343	343
query19	214	197	155	155
query20	142	137	132	132
query21	212	138	117	117
query22	13643	13660	13407	13407
query23	17458	16740	16145	16145
query23_1	16367	16304	16191	16191
query24	7450	1782	1325	1325
query24_1	1306	1292	1313	1292
query25	558	478	413	413
query26	1306	318	175	175
query27	2722	565	338	338
query28	4489	2032	1991	1991
query29	968	613	489	489
query30	302	235	202	202
query31	1129	1103	947	947
query32	89	74	74	74
query33	527	351	288	288
query34	1184	1140	642	642
query35	777	821	705	705
query36	1405	1381	1267	1267
query37	161	108	96	96
query38	3220	3190	3059	3059
query39	939	950	894	894
query39_1	890	875	882	875
query40	241	154	131	131
query41	72	68	69	68
query42	113	108	111	108
query43	333	331	293	293
query44	
query45	222	207	204	204
query46	1121	1220	736	736
query47	2399	2401	2282	2282
query48	408	432	300	300
query49	650	511	403	403
query50	994	355	266	266
query51	4481	4470	4318	4318
query52	110	110	95	95
query53	263	288	207	207
query54	342	281	286	281
query55	101	93	90	90
query56	309	319	323	319
query57	1427	1422	1346	1346
query58	314	288	277	277
query59	1645	1690	1499	1499
query60	342	337	320	320
query61	185	184	179	179
query62	706	647	590	590
query63	246	206	212	206
query64	2503	878	614	614
query65	
query66	1721	480	369	369
query67	29775	29755	29554	29554
query68	
query69	469	340	301	301
query70	1001	946	1000	946
query71	302	268	265	265
query72	3016	2703	2493	2493
query73	854	772	457	457
query74	5118	4957	4768	4768
query75	2672	2614	2273	2273
query76	2308	1143	772	772
query77	401	404	329	329
query78	12566	12539	11961	11961
query79	1423	1077	756	756
query80	664	526	487	487
query81	470	279	244	244
query82	1480	160	122	122
query83	353	283	251	251
query84	298	136	117	117
query85	914	545	442	442
query86	396	368	309	309
query87	3420	3387	3271	3271
query88	3606	2728	2698	2698
query89	456	392	340	340
query90	1832	185	183	183
query91	192	175	143	143
query92	80	75	74	74
query93	1472	1408	881	881
query94	536	369	325	325
query95	687	370	350	350
query96	1101	806	360	360
query97	2765	2750	2587	2587
query98	235	232	229	229
query99	1187	1137	1035	1035
Total cold run time: 254491 ms
Total hot run time: 171717 ms

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.

2 participants