3FS is a high-performance distributed file system developed by DeepSeek. It is designed and optimized for AI large model training, data analytics, and high-performance computing (HPC) scenarios. 3FS integrates modern SSD storage with Remote Direct Memory Access (RDMA) network technology to overcome the performance bottlenecks of traditional networks. This topic describes how to quickly deploy 3FS using a Container Service for Kubernetes (ACK) managed cluster and Alibaba Cloud's proprietary Elastic RDMA network.
Deployment solution
You can build a 3FS cluster using Alibaba Cloud's high-performance eRDMA network and elastic ephemeral disks. An Alibaba Cloud managed ACK cluster allows for rapid deployment and helps you easily set up a cluster service that spans multiple nodes.
Alibaba Cloud does not provide technical support or performance guarantees for 3FS. If you encounter issues, contact us on GitHub or join DingTalk group 35532895.
eRDMA is an elastic Remote Direct Memory Access (RDMA) network developed by Alibaba Cloud for the cloud. eRDMA reuses virtual private clouds (VPCs) as the underlying link and uses a congestion control (CC) algorithm that is developed by Alibaba Cloud. eRDMA features high throughput and low latency based on RDMA supports. Compared with RDMA, eRDMA implements large-scale RDMA networking within seconds. eRDMA supports traditional HPC applications, AI applications, and Transmission Control Protocol/Internet Protocol (TCP/IP) applications.
For more information, see Elastic RDMA (eRDMA).
An elastic ephemeral disk is a block storage device that you can create with an instance or create separately, and whose capacity you can customize. It provides temporary, high-performance, and cost-effective data storage for ECS instances. For more information, see Elastic ephemeral disks.
Container Service for Kubernetes (ACK) is one of the first container service platforms in the world to pass the Kubernetes Certified Conformance Program. It provides high-performance services for managing containerized applications and supports the full lifecycle management of enterprise-grade Kubernetes containerized applications. This lets you easily and efficiently run Kubernetes containerized applications in the cloud.
For more information, see Container Service for Kubernetes (ACK managed clusters).
Key 3FS components
The following information describes the key components of 3FS and their functions:
Metadata service (meta): A stateless service that handles file system metadata requests. It implements atomic operations by using FoundationDB at the underlying layer.
Storage service (storage): runs on storage nodes, with data stored in blocks on high-performance NVMe SSDs. It uses the Chain Replication with Apportioned Queries (CRAQ) protocol to manage replicas and provides write-all-read-any semantics.
Cluster manager (mgmtd): manages cluster configuration information and storage node status, and is responsible for electing the primary node and synchronizing updates to other components.
Client: 3FS provides two types of clients. You can use the Filesystem in Userspace (FUSE) client to implement standard access and the User Space Block I/O (USRBIO) client to implement high-performance transmission. This balances compatibility and efficiency and makes 3FS an ideal storage interface for AI and big data scenarios.
FUSE client: mounts the storage cluster as a local directory by using the user-space file system interface. It provides file operation interfaces (
read,write, andmkdir) compatible with Portable Operating System Interface (POSIX), without the need to modify the application code.USRBIO client: achieves microsecond-level latency and ultra-high throughput by using the user-space I/O stack and RDMA, meeting AI and HPC requirements.
All components communicate with each other over RDMA, bypassing the kernel protocol stack. This significantly reduces the CPU load and network latency.
Preparations
You must prepare an ECS instance with Internet access to use as a client for creating and managing the ACK cluster. If you already have an instance with the Alibaba Cloud command-line interface (CLI) installed and configured, you can skip this section and proceed to Set up an ACK cluster using the Alibaba Cloud CLI.
All operations in this topic are performed on this client instance.
Prepare a client ECS instance
Install and configure the Alibaba Cloud CLI on the client instance
Set up an ACK cluster using the Alibaba Cloud CLI
You can use the CLI to create an ACK cluster based on Alibaba Cloud's managed Kubernetes service. This cluster uses the Terway Elastic Network Interface (ENI) network mode to connect containers directly to ENIs. It is equipped with accelerated instances that support eRDMA and enterprise SSDs (ESSDs) to optimize storage performance. The containerd runtime and a pre-configured image accelerator ensure container efficiency. Enterprise-grade security group rules are enabled to enhance network isolation.
This topic describes how to use the automatic VPC creation method to set up an ACK cluster. This method simultaneously creates related resources for the cluster, such as ECS instances, a VPC, vSwitches, security groups, a CLB instance, an Internet NAT gateway, and EIPs. You may be charged for these resources. For more information, see Billing of ACK managed and dedicated clusters.
This topic provides only example operations. In a production environment, you must plan the cluster scale, network feature requirements, VPC-related configurations (such as the VPC and vSwitches), and cluster network-related configurations (such as the container network plugin, container CIDR block, and service CIDR block) in advance. This ensures efficient use of network resources and reserves sufficient space for future business expansion. For more information, see Network planning for ACK managed clusters.
The parameters in the command describe the configuration of the ACK cluster. For more information about the parameters, see Create a cluster.
If you want to create an ACK cluster using an existing VPC, you must configure resources such as vSwitches and security groups in the VPC.
Cluster initialization may take some time. You can wait for the process to complete.
Connect to the client instance and run the following command to create the cluster.
The cluster is configured as follows:
The cluster ID is returned in the command output:

After the cluster is created, run the following command to view the cluster instance.
aliyun cs GET /clusters/cluster_idReplace cluster_id with the cluster ID from the output of the previous step. The returned information shows the detailed configuration of the cluster.

You can also log on to the ACK console to view the created cluster in the cluster list:

Install kubectl to manage the cluster and its applications. For more information, see Obtain the kubeconfig file of a cluster and use kubectl to connect to the cluster.
ImportantIn this example, you connect to the ACK cluster over the internal network. Make sure that the client instance where kubectl is installed and the ACK cluster are in the same VPC and can communicate with each other.
If the client instance and the ACK cluster are not in the same VPC, you can change the VPC of the client instance to the VPC of the ACK cluster. For more information, see Change the VPC for an ECS instance.
After the configuration is successful, run the following command to list all namespaces in the Kubernetes cluster.
kubectl get namespace
Install Helm v3.
Helm is an open source tool used to manage applications in Kubernetes clusters. It provides a unified way to package applications and supports versioning, which reduces the complexity of application distribution and deployment. In this topic, you will use Helm to deploy the 3FS cluster. For more information about Helm, see Simplify application deployment using Helm.
wget https://get.helm.sh/helm-v3.3.0-linux-amd64.tar.gz tar -xzvf helm-v3.3.0-linux-amd64.tar.gz mv linux-amd64/helm /usr/local/bin/helm helm versionThe following output indicates that the installation is successful.

Deploy 3FS on an ACK cluster
Alibaba Cloud adapted the open source 3FS file system, packaged it into a standardized container image, and provided an out-of-the-box Helm Chart for automated deployment in a Kubernetes environment. The customized code, deployment manifests, and continuous integration configurations are open source and hosted in a GitHub repository. This allows developers to complete the deployment using a single command.
This example uses Helm to deploy a 3FS cluster on an ACK cluster. The 3FS cluster contains two meta nodes, two mgmtd nodes, one FUSE client, and three storage nodes.
Connect to the client instance. Run the following commands to obtain the code repository and switch to the deployment directory.
git clone https://github.com/AliyunContainerService/alibabacloud-3FS.git cd alibabacloud-3FS/deploy/containerRun the following commands to deploy the FoundationDB Operator.
3FS builds its storage engine on FoundationDB. Before you can deploy 3FS, you must set up an FDB cluster. You can use the Kubernetes Operator to deploy the cluster.
kubectl create ns fdb kubectl apply -n fdb -f ./fdb-operator
Run the following command to use the Helm chart in the code repository to deploy 3FS and the required FDB cluster in one step.
helm install 3fs ./chart -n 3fs --create-namespace --timeout 10mNoteDuring the deployment, the system automatically creates elastic ephemeral disks for the ECS instances where the storage nodes reside and attaches the disks to the instances based on the Helm pod YAML configuration.
The deployment may take several minutes. During initialization, some containers may crash multiple times. This is normal. You can wait for the process to complete.
After the deployment is complete, the following output is displayed:

After the deployment is complete, you will have a high-performance distributed file system that is based on 3FS and deployed using ACK. The file system uses eRDMA for communication between nodes.
Run the following command to view all pods in the 3fs namespace.
kubectl get pods -o wide -n 3fs
Run the following command to access the 3FS cluster management console.
kubectl attach -n 3fs admin-cli-3fs -itPress Ctrl+D to display the prompt. Then, enter
list-nodesto view the information about each node in the 3FS cluster. Press Ctrl+D to exit.
Run the following command to check the FUSE client.
kubectl exec -n 3fs fuse-3fs -it -- ls /mnt/3fs
The output includes
3fs-virt, which is a special folder for the 3FS FUSE client.The /mnt/3fs directory is also mounted to the ECS instance. You can run tools, such as fio, on the instance to test performance.











