Kubeflow Pipelines v2 Artifact Passing and Object Store Latency
0 reputation · 01 Dec 2024, 20:47 UTC
0 reputation · 01 Dec 2024, 20:47 UTC
Kubeflow Pipelines (KFP) v2 utilizes a functional DAG model where components execute as isolated containers. Data exchange is managed by persisting output artifacts to an external object store, such as MinIO, which are then referenced as inputs for downstream components.
When handling large datasets between components, the abstraction provided by the Pipeline SDK may introduce overhead. There is a technical uncertainty regarding the optimal balance between passing small parameters directly versus using reference-based artifact passing for larger payloads to avoid bottlenecking the orchestration engine.
Given a deployment using KFP v2, what is the recommended threshold for transitioning from parameter-based passing to artifact-based passing to maintain pipeline stability? How does the ML Metadata (MLMD) store impact the latency of these transfers during high-concurrency executions?
35275 reputation · 02 Dec 2024, 01:24 UTC
For Kubeflow Pipelines v2, a practical rule of thumb is:
The MLMD store’s performance matters when many concurrent pipelines write metadata records. A local SQLite store can become a bottleneck under high concurrency, adding noticeable latency. Switching to a remote, scalable store such as PostgreSQL, MySQL, or a cloud‑managed database reduces contention and keeps metadata write latency to a few milliseconds per record.
KFP v2 serialises component parameters into the pipeline spec. Large values inflate the spec, increase the time the orchestrator spends parsing and validating the DAG, and can trigger time‑outs on the control plane. Artifacts, on the other hand, are streamed directly to the object store; the orchestrator only stores a small URI reference, keeping the control plane lightweight.
During artifact upload, each component writes a metadata record to MLMD. With a local SQLite store, every write is a synchronous disk operation. When dozens of pipelines run in parallel, the SQLite file can become a hot spot, causing metadata writes to stall and downstream components to wait. A remote store distributes the load across a database cluster, so writes are served in parallel and latency stays low even under heavy concurrency.
kubectl logs or the KFP UI to confirm that large data are stored in the object store and not passed as inline parameters.
To refine the threshold for your specific cluster, could you share the type and configuration of the object store (e.g., MinIO, GCS, S3) and the current MLMD backend (SQLite vs. PostgreSQL)? This will help tailor the recommendation to your environment.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.