This document serves as a deep-dive into the configuration knobs of Fluid. While Fluid works out-of-the-box with sensible defaults, achieving production-grade performance requires tuning based on your specific storage backend and workload characteristics.
The Dataset resource defines where your data lives and how it should be accessed.
- Mount Point Naming: When mounting multiple sources, use explicit
namefields. Fluid uses these names to create the internal directory structure. Without them, you risk path collisions if two sources have similar root structures. - Read-Only vs. Read-Write: For most AI training workloads, set
readOnly: truein your mounts. This allows the caching engine (like Alluxio) to optimize for read-heavy traffic and avoid the overhead of consistency checks for writes.
| Config Point | Why it matters |
|---|---|
spec.placement: Exclusive |
Performance Isolation. Prevents other datasets from "stealing" cache space on the same node. Essential for low-latency requirements. |
spec.nodeAffinity |
Disk Type Targeting. If your cluster has a mix of HDD and NVMe nodes, use affinity to ensure Fluid only caches data on the high-speed nodes. |
Alluxio is the "engine" for most Fluid deployments. Its configuration determines your data-plane throughput.
For the fastest possible access, use /dev/shm (Ramdisk).
- Best Practice: Ensure your
tieredstorelevels point to a medium of typeMEM. - Gotcha: If your node runs out of RAM, the Alluxio Worker might be OOMKilled. Always set
resources.limits.memoryslightly higher than your totalquota.
Since Alluxio is Java-based, jvmOptions are critical. If you have millions of small files, the Master node needs more heap space to track metadata.
# Example: Increasing Master Heap for large metadata
master:
jvmOptions:
- "-Xms4g"
- "-Xmx4g"JuiceFS is excellent for environments where POSIX compliance is a hard requirement.
JuiceFS separates metadata (Redis/MySQL/TiKV) from data (S3/OSS).
- Optimization: Use the
attr-cacheoption inspec.fuse.options. Setting this to60sor higher can drastically reduce the load on your metadata service during repetitive tasks likels -R. - Worker Caching: Prefer configuring local cache capacity and directories through
spec.tieredstore.levels, which is the recommended way to size JuiceFS worker cache and avoid filling the node's root partition. If you are maintaining an older configuration, note thatspec.worker.optionsuses the keycache-size(no leading dashes), butcache-size/cache-dirthere are deprecated in favor oftieredstore.levels.
If you are running in ACK (Alibaba Cloud Container Service), JindoRuntime provides native optimizations for OSS.
- Credential Management: Avoid hardcoding AK/SK in the YAML. Use
hadoopConfigto reference a ConfigMap containingcore-site.xmlwith your OSS credentials. - Log Bloat: Jindo can be chatty. Set
spec.fuse.logConfigtolevel: warnfor stable production environments to save disk space on logs.
ThinRuntime is intended for storage systems that don't have a dedicated Fluid controller (e.g., NFS, Ceph).
- Standardization: Leverage
ThinRuntimeProfile. It allows you to define the "how-to-mount" logic once and reuse it across multiple datasets. - Health Probes: Since ThinRuntime relies on external FUSE binaries, always define
livenessProbe. This allows Kubernetes to auto-restart the FUSE pod if the mount point becomes "stale" or "transport endpoint is not connected."
- Resource Quotas: Never run workers without
limits. A caching engine will naturally try to consume all available resources. - Pull Secrets: If your images are in a private registry,
imagePullSecretsmust be defined at the spec level so the Master, Worker, and Fuse pods can all pull successfully. - Tiered Locality: Use
storage-networklabels if your storage and compute are on separate network planes to avoid cross-switch bottlenecking.