Bulk-inserting 4 Parquet files (~2.47 GB, 641k rows) into a 2-DataNode cluster took 759 s (~12.7 min), with ~90% of that time (~681 s) spent inside a single DataNode pod. #50872
Replies: 4 comments 4 replies
-
|
We can treat 4 parquet files as one import request like this: We can also call bulk_import() 4 times to create 4 import requests: For each import request, Milvus does two phases:
Two phases group files differently.
So with 4 files in one import request, PreImport usually becomes:
If 4 import requests, each request has one file, Preimport becomes:
Different Preimport tasks can be scheduled to different DataNodes.
or diskSegmentMaxSize if DiskIndex is enabled: The regrouping rule is based on total estimated memory size per task, not “number of files per DataNode”. If you could provide the runtime log for the milvus cluster, we can get more information. You can search for the keywords "add new import task" in the log to observe how many import tasks were created. A quick workaround: call bulk_import() 4 times to create 4 import requests. |
Beta Was this translation helpful? Give feedback.
-
|
I think this is a issue. might be able to fix this. |
Beta Was this translation helpful? Give feedback.
-
|
@xiaocai2333 is working on it. We won't fix this in 2.5. in 2.6 and master we can round robin assign import task. |
Beta Was this translation helpful? Give feedback.
-
|
The maintainer replies explained what happens but not how to tune it. Here are the specific knobs. ** Why all 4 tasks land on one DataNode (first-fit scheduling)** The current Forcing spillover in 2.5.x — the effective knobs:
This is the most reliable immediate workaround. Each call creates an independent import job; the scheduler assigns them one at a time, and with 4 sequential assignments the first-fit scheduler will fill DataNode-1's slots and spill to DataNode-2.
This is the direct lever on how many import tasks a single DataNode accepts simultaneously. Default is typically With this set to 2, a 4-task batch will split 2/2 across your two DataNodes.
Your 4 files total ~2.47 GB. With maxSize at 2 GB (default), This also benefits from creating more parallel flush segments, which reduces per-task flush latency.
Why your 20-task run was slower: Recommended config for your setup today (2.5.x): Then call |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Observed Latency
Run Tasks Wall-clock Bottleneck
Baseline 4 tasks (4 files) 759.4 s (~12.7 min) All 4 tasks → 1 pod, 2nd pod idle
Scale-up 20 tasks (same files) 1057.5 s (~17.6 min) 15/5 split across 2 pods; heavier pod drives time
Beta Was this translation helpful? Give feedback.
All reactions