You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "kaka11chen (via GitHub)" <gi...@apache.org> on 2026/05/28 16:37:05 UTC
[PR] [fix](be) Bound ANN build chunk buffer by bytes [doris]
kaka11chen opened a new pull request, #63861:
URL: https://github.com/apache/doris/pull/63861
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: ANN index writer used to reserve ann_index_build_chunk_size * dimension floats during init. For high-dimensional vectors such as 3072 dimensions, the default 1,000,000-row chunk eagerly requests multi-GB memory before any rows are added. This change removes the init-time reserve and adds ann_index_build_chunk_bytes as a target byte bound when choosing the effective build chunk. The effective chunk still keeps at least one row and the index-required minimum training rows, so IVF/PQ/SQ training is not split below FAISS requirements.
### Release note
Add BE config ann_index_build_chunk_bytes to bound ANN index build chunk buffering by bytes.
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] 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 <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [x] Yes. ANN index build buffering now respects ann_index_build_chunk_bytes and no longer preallocates the full row-count chunk in init.
- Does this need documentation?
- [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg: https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](be) Bound ANN build chunk buffer by bytes [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63861:
URL: https://github.com/apache/doris/pull/63861#issuecomment-4567618505
# BE UT Coverage Report
Increment line coverage `100.00% (31/31)` :tada:
[Increment coverage report](http://coverage.selectdb-in.cc/coverage/bdba3d1f43751b08d08ff98a7c3b8b9b23d29f03_bdba3d1f43751b08d08ff98a7c3b8b9b23d29f03/increment_report/index.html)
[Complete coverage report](http://coverage.selectdb-in.cc/coverage/bdba3d1f43751b08d08ff98a7c3b8b9b23d29f03_bdba3d1f43751b08d08ff98a7c3b8b9b23d29f03/report/index.html)
| Category | Coverage |
|-------------------|--------------------|
| Function Coverage | 54.00% (20987/38863) |
| Line Coverage | 37.58% (199108/529822) |
| Region Coverage | 33.86% (156051/460907) |
| Branch Coverage | 34.84% (67920/194928) |
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](be) Bound ANN build chunk buffer by bytes [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63861:
URL: https://github.com/apache/doris/pull/63861#issuecomment-4566221674
Thank you for your contribution to Apache Doris.
Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/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?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](be) Bound ANN build chunk buffer by bytes [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63861:
URL: https://github.com/apache/doris/pull/63861#issuecomment-4569786555
<details>
<summary>TPC-DS: <b>Total hot run time: 172220 ms</b></summary>
```
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 5c6937e8b5467603ae3d2b3202bdc8b91892e33a, data reload: false
query5 4335 655 520 520
query6 338 234 205 205
query7 4287 564 306 306
query8 334 224 225 224
query9 8793 4076 3982 3982
query10 446 343 298 298
query11 5759 2579 2215 2215
query12 181 128 128 128
query13 1302 653 424 424
query14 6157 5511 5169 5169
query14_1 4560 4505 4485 4485
query15 210 210 184 184
query16 1011 482 521 482
query17 1148 764 618 618
query18 2731 501 371 371
query19 225 208 168 168
query20 143 131 133 131
query21 218 140 117 117
query22 13567 13490 13331 13331
query23 17263 16485 16299 16299
query23_1 16374 16474 16344 16344
query24 7512 1780 1309 1309
query24_1 1354 1320 1332 1320
query25 577 501 446 446
query26 1313 324 174 174
query27 2677 538 359 359
query28 4395 2003 2026 2003
query29 1002 638 523 523
query30 297 237 195 195
query31 1136 1091 945 945
query32 91 81 75 75
query33 574 371 315 315
query34 1189 1162 675 675
query35 777 812 752 752
query36 1394 1371 1264 1264
query37 146 104 87 87
query38 3217 3159 3077 3077
query39 926 907 882 882
query39_1 878 888 886 886
query40 236 142 123 123
query41 64 61 62 61
query42 108 107 108 107
query43 330 325 298 298
query44
query45 217 202 202 202
query46 1123 1196 734 734
query47 2375 2413 2305 2305
query48 412 412 301 301
query49 636 496 384 384
query50 972 348 254 254
query51 4367 4319 4241 4241
query52 105 105 93 93
query53 256 277 204 204
query54 306 263 248 248
query55 91 88 84 84
query56 309 295 301 295
query57 1427 1462 1346 1346
query58 293 273 266 266
query59 1579 1689 1404 1404
query60 318 324 309 309
query61 196 153 152 152
query62 703 652 586 586
query63 249 201 206 201
query64 2348 795 637 637
query65
query66 1678 499 355 355
query67 29708 29728 29521 29521
query68
query69 460 347 305 305
query70 1006 979 944 944
query71 313 275 265 265
query72 3006 2740 2414 2414
query73 828 790 427 427
query74 5142 4939 4825 4825
query75 2673 2597 2258 2258
query76 2320 1149 756 756
query77 394 412 325 325
query78 12428 12564 11836 11836
query79 1456 1035 748 748
query80 655 561 447 447
query81 453 284 235 235
query82 1372 164 123 123
query83 365 289 251 251
query84 260 144 110 110
query85 868 548 456 456
query86 397 373 313 313
query87 3444 3385 3229 3229
query88 3595 2705 2733 2705
query89 448 400 356 356
query90 2006 179 178 178
query91 178 165 153 153
query92 80 76 75 75
query93 1486 1443 820 820
query94 543 364 299 299
query95 672 458 344 344
query96 1111 763 334 334
query97 2741 2753 2675 2675
query98 236 229 228 228
query99 1180 1151 1033 1033
Total cold run time: 254338 ms
Total hot run time: 172220 ms
```
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](be) Bound ANN build chunk buffer by bytes [doris]
Posted by "kaka11chen (via GitHub)" <gi...@apache.org>.
kaka11chen closed pull request #63861: [fix](be) Bound ANN build chunk buffer by bytes
URL: https://github.com/apache/doris/pull/63861
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](be) Bound ANN build chunk buffer by bytes [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63861:
URL: https://github.com/apache/doris/pull/63861#issuecomment-4569730593
<details>
<summary>TPC-H: <b>Total hot run time: 31447 ms</b></summary>
```
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 5c6937e8b5467603ae3d2b3202bdc8b91892e33a, 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 17798 4044 4005 4005
q2 q3 10793 1401 817 817
q4 4684 468 346 346
q5 7650 2249 2109 2109
q6 234 174 137 137
q7 969 785 681 681
q8 9365 1874 1569 1569
q9 5396 4997 4972 4972
q10 6389 2213 1887 1887
q11 448 273 249 249
q12 636 430 286 286
q13 18152 3428 2833 2833
q14 267 250 239 239
q15 q16 823 777 699 699
q17 892 987 930 930
q18 6724 5698 5591 5591
q19 1164 1356 1125 1125
q20 513 400 258 258
q21 5637 2529 2417 2417
q22 445 351 297 297
Total cold run time: 98979 ms
Total hot run time: 31447 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 4319 4268 4251 4251
q2 q3 4569 4982 4320 4320
q4 2095 2257 1389 1389
q5 4437 4295 4365 4295
q6 231 170 126 126
q7 2305 1979 1730 1730
q8 2912 2178 2130 2130
q9 8200 7941 8088 7941
q10 4798 4773 4339 4339
q11 580 432 385 385
q12 763 749 540 540
q13 3331 3557 3003 3003
q14 309 323 264 264
q15 q16 703 728 640 640
q17 1357 1311 1506 1311
q18 8005 7378 7275 7275
q19 1199 1104 1143 1104
q20 2214 2247 1936 1936
q21 5248 4590 4476 4476
q22 506 448 437 437
Total cold run time: 58081 ms
Total hot run time: 51892 ms
```
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](be) Bound ANN build chunk buffer by bytes [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63861:
URL: https://github.com/apache/doris/pull/63861#issuecomment-4567165532
<details>
<summary>TPC-DS: <b>Total hot run time: 172337 ms</b></summary>
```
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit bdba3d1f43751b08d08ff98a7c3b8b9b23d29f03, data reload: false
query5 4326 673 518 518
query6 356 215 186 186
query7 4214 568 319 319
query8 326 236 235 235
query9 8764 4012 4030 4012
query10 449 347 307 307
query11 5753 2658 2264 2264
query12 191 130 127 127
query13 1302 609 412 412
query14 6059 5470 5176 5176
query14_1 4424 4446 4410 4410
query15 212 207 188 188
query16 999 452 417 417
query17 1079 742 600 600
query18 2451 474 346 346
query19 214 202 155 155
query20 142 132 128 128
query21 213 135 116 116
query22 13540 13629 13450 13450
query23 17401 16607 16265 16265
query23_1 16289 16432 16329 16329
query24 7593 1781 1319 1319
query24_1 1321 1333 1328 1328
query25 551 466 439 439
query26 1303 315 180 180
query27 2691 575 361 361
query28 4497 2002 2001 2001
query29 986 651 527 527
query30 302 246 203 203
query31 1128 1097 956 956
query32 102 79 77 77
query33 555 357 304 304
query34 1198 1179 653 653
query35 779 801 717 717
query36 1416 1431 1291 1291
query37 153 109 97 97
query38 3243 3168 3084 3084
query39 927 929 933 929
query39_1 870 888 869 869
query40 238 152 134 134
query41 70 68 68 68
query42 113 111 110 110
query43 324 331 304 304
query44
query45 223 214 203 203
query46 1114 1205 739 739
query47 2422 2341 2306 2306
query48 409 405 298 298
query49 650 514 427 427
query50 989 343 261 261
query51 4337 4319 4321 4319
query52 107 109 98 98
query53 267 282 207 207
query54 330 282 264 264
query55 95 92 86 86
query56 332 320 319 319
query57 1457 1437 1315 1315
query58 311 282 275 275
query59 1575 1656 1442 1442
query60 339 342 323 323
query61 206 150 154 150
query62 676 647 574 574
query63 251 204 208 204
query64 2396 809 614 614
query65
query66 1707 468 359 359
query67 29800 29707 29572 29572
query68
query69 474 341 305 305
query70 1048 970 979 970
query71 305 271 264 264
query72 3097 2733 2406 2406
query73 843 780 414 414
query74 5065 4950 4791 4791
query75 2714 2623 2268 2268
query76 2288 1134 760 760
query77 409 407 322 322
query78 12461 12494 11955 11955
query79 1483 1073 751 751
query80 1304 555 458 458
query81 497 282 248 248
query82 1339 160 126 126
query83 363 282 248 248
query84 293 140 115 115
query85 938 535 440 440
query86 438 342 329 329
query87 3443 3360 3228 3228
query88 3627 2728 2692 2692
query89 447 389 342 342
query90 1780 180 185 180
query91 185 170 142 142
query92 80 81 75 75
query93 1450 1426 877 877
query94 672 381 299 299
query95 671 380 459 380
query96 1048 786 363 363
query97 2749 2752 2583 2583
query98 240 235 230 230
query99 1181 1148 1025 1025
Total cold run time: 254630 ms
Total hot run time: 172337 ms
```
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](be) Bound ANN build chunk buffer by bytes [doris]
Posted by "kaka11chen (via GitHub)" <gi...@apache.org>.
kaka11chen commented on PR #63861:
URL: https://github.com/apache/doris/pull/63861#issuecomment-4569609929
run buildall
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](be) Bound ANN build chunk buffer by bytes [doris]
Posted by "kaka11chen (via GitHub)" <gi...@apache.org>.
kaka11chen commented on PR #63861:
URL: https://github.com/apache/doris/pull/63861#issuecomment-4566223401
run buildall
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](be) Bound ANN build chunk buffer by bytes [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63861:
URL: https://github.com/apache/doris/pull/63861#issuecomment-4567080112
<details>
<summary>TPC-H: <b>Total hot run time: 31809 ms</b></summary>
```
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit bdba3d1f43751b08d08ff98a7c3b8b9b23d29f03, 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 17760 4164 4056 4056
q2 q3 10783 1394 839 839
q4 4708 478 350 350
q5 8077 2257 2186 2186
q6 395 177 135 135
q7 947 808 628 628
q8 9394 1625 1649 1625
q9 7082 4987 4923 4923
q10 6447 2189 2032 2032
q11 436 272 244 244
q12 691 428 295 295
q13 18188 3541 2772 2772
q14 269 259 245 245
q15 q16 824 776 710 710
q17 1007 857 908 857
q18 7249 5886 5562 5562
q19 1270 1266 1110 1110
q20 539 418 266 266
q21 6292 2815 2662 2662
q22 461 375 312 312
Total cold run time: 102819 ms
Total hot run time: 31809 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 4934 5007 4821 4821
q2 q3 4970 5247 4657 4657
q4 2174 2251 1426 1426
q5 5004 4822 4683 4683
q6 230 177 132 132
q7 1921 1819 1540 1540
q8 2239 1950 1932 1932
q9 7477 7441 7477 7441
q10 4722 4671 4205 4205
q11 576 387 359 359
q12 741 754 526 526
q13 3106 3398 2843 2843
q14 273 275 267 267
q15 q16 675 705 615 615
q17 1298 1277 1280 1277
q18 7443 7000 6917 6917
q19 1118 1124 1111 1111
q20 2243 2237 1928 1928
q21 5303 4621 4518 4518
q22 548 471 406 406
Total cold run time: 56995 ms
Total hot run time: 51604 ms
```
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](be) Bound ANN build chunk buffer by bytes [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63861:
URL: https://github.com/apache/doris/pull/63861#issuecomment-4572195954
# BE Regression && UT Coverage Report
Increment line coverage `100.00% (31/31)` :tada:
[Increment coverage report](http://coverage.selectdb-in.cc/coverage/63861_5c6937e8b5467603ae3d2b3202bdc8b91892e33a_merge/increment_report/index.html)
[Complete coverage report](http://coverage.selectdb-in.cc/coverage/63861_5c6937e8b5467603ae3d2b3202bdc8b91892e33a_merge/report/index.html)
| Category | Coverage |
|-------------------|--------------------|
| Function Coverage | 72.07% (27430/38061) |
| Line Coverage | 55.37% (292598/528465) |
| Region Coverage | 52.30% (243355/465321) |
| Branch Coverage | 53.64% (104950/195654) |
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [fix](be) Bound ANN build chunk buffer by bytes [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #63861:
URL: https://github.com/apache/doris/pull/63861#issuecomment-4568065038
# BE Regression && UT Coverage Report
Increment line coverage `100.00% (31/31)` :tada:
[Increment coverage report](http://coverage.selectdb-in.cc/coverage/63861_bdba3d1f43751b08d08ff98a7c3b8b9b23d29f03_merge/increment_report/index.html)
[Complete coverage report](http://coverage.selectdb-in.cc/coverage/63861_bdba3d1f43751b08d08ff98a7c3b8b9b23d29f03_merge/report/index.html)
| Category | Coverage |
|-------------------|--------------------|
| Function Coverage | 73.84% (28105/38061) |
| Line Coverage | 57.77% (305317/528465) |
| Region Coverage | 54.96% (255731/465321) |
| Branch Coverage | 56.49% (110533/195654) |
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org