1. Analyzing How Fluid Mounts NFS Storage
- Inspect the Fuse Pod
| |
After it starts, Fuse mounts the storage directory onto the Node; before it stops, it unmounts the storage directory.
- Inspect the configuration files injected by Fluid
| |
| |
Fluid injects the mountPoint configuration from the Dataset into the Fuse by mounting it as a Json file.
- Inspect the Fuse startup script
| |
| |
When the Fuse Pod starts, it parses the config.json file, generates the mount-nfs.sh script, and executes it.
2. Packaging the Fluid Lustre Runtime Image
From the analysis above, we can see that for this kind of mount-based file storage service, all you need is to package a corresponding Fuse image to hook it into Fluid for management.
- Create the fluid_config_init.py script
| |
Only the mount command needs adjusting.
- Create the startup script entrypoint.sh
| |
- Create a Dockerfile to package the image
| |
Build the image and push it
| |
3. Connecting Lustre to Fluid
- Create a Dataset
| |
Note the mountPoint here: if you need to mount the subdirectory subdir, create it in advance. In production, multiple PVCs may share a single Lustre backend.
The format for mounting a subdirectory is: fs-x.fsx.us-west-2.amazonaws.com@tcp:/x/subdir
- Create a Runtime
| |
| |
- Create a Pod
| |
4. Performance Testing
The figure below shows the FSx for Lustre specification we provisioned on AWS.

4.1 Sequential Read Test with a Direct Mount on the Host
- Install lustre-client
Ubuntu 20.04
| |
Ubuntu 24.04
| |
Note that you need to run sudo reboot to restart the machine.
Reference documentation: https://docs.aws.amazon.com/zh_cn/fsx/latest/LustreGuide/install-lustre-client.html
- Run the test
| |
4.2 Sequential Read Test Inside a Pod
- Enter the Pod
| |
- Run the test
| |
In Fluid, the PVC performance of a ThinRuntime loses very little compared with a direct mount on the host. Note here that the blocksize and size heavily affect the test results. If you only read 1g of data, sequential read performance can reach 500+ MB/s; if the blocksize is 128k, sequential read performance drops to only 100+ MB/s. Therefore, adjustments must be made according to the use case in order to get an accurate assessment.
5. Summary
Recently, domestic model inference services needed to be deployed overseas, and we selected AWS FSx for Lustre as the storage backend. But to keep the way the business layer uses storage consistent, we needed to hook Lustre into Fluid.
After a domestic model is uploaded to S3, it is automatically synced to Lustre.
Early versions of Fluid already supported Lustre, but the Fluid community did not provide detailed documentation or a Demo example, so this post mainly records the practice of connecting Lustre using Fluid’s ThinRuntime.
Since we only use it to store inference models, and model data is usually large files, we only tested sequential read speed for performance. Under the specification we chose, the speed inside the PVC can reach 300+ MB/s.
