SuperAPI AI Directory

3FS - DeepSeek's High-Performance Distributed File System

Author: AI小集 · Original source: AI工具集

What is 3FS

3FS (Fire-Flyer File System) is a high-performance distributed file system launched byDeepSeek, designed specifically for AI training and inference tasks. 3FS uses modern SSD and RDMA network technologies, and based on a disaggregated architecture, aggregates the throughput of thousands of SSDs and the network bandwidth of hundreds of storage nodes, providing read throughput of up to 6.6 TiB/s. 3FS provides strong consistency guarantees and a general file interface, requiring no need to learn a new storage API. 3FS performs excellently in large-scale data processing and inference optimization, achieving a throughput of 3.66 TiB/min in the GraySort test, and KVCache read throughput can reach 40 GiB/s.

3FS

Main Features of 3FS

  • High-Performance Data Access: Aggregates the throughput of thousands of SSDs and the network bandwidth of hundreds of storage nodes, providing read throughput of up to 6.6 TiB/s. Supports high-throughput parallel read/write in large-scale clusters, optimizing data loading efficiency in AI training and inference tasks.
  • Strong Consistency Guarantee: Implements Chain Replication with Apportioned Queries (CRAQ) technology to ensure strong data consistency and simplify application development complexity.
  • General File Interface: Provides a stateless metadata service, supports transactional key-value storage (such as FoundationDB), and users do not need to learn a new storage API.
  • Optimized AI Workloads:
    • Data Preparation: Efficiently manages large amounts of intermediate output and supports hierarchical directory structures.
    • Data Loading: Supports random access across compute nodes, without the need for prefetching or dataset shuffling.
    • Checkpoint Support: Provides high-throughput parallel checkpointing for large-scale training.
    • KVCache: Provides a high-throughput, large-capacity cache alternative for inference tasks, optimizing inference efficiency.
  • High Scalability and Flexibility: Supports large-scale cluster deployment, suitable for diverse application scenarios from a single node to thousands of nodes.

Technical Principles of 3FS

  • Disaggregated Architecture: Based on a design that separates computation and storage, centrally manages storage resources, and uses high-speed networks (such as RDMA) to achieve efficient data transmission. Allows applications to access storage resources in a "location-independent" manner, simplifying resource management.
  • Chain Replication with Apportioned Queries (CRAQ): To achieve strong consistency, 3FS is based on CRAQ technology. Based on chain replication, it ensures data consistency among multiple replicas, and uses apportioned queries to optimize read performance and reduce latency.
  • Stateless Metadata Service: 3FS launches a stateless metadata service, based on transactional key-value storage (such as FoundationDB), improving system scalability and reducing the complexity of metadata management.
  • Direct I/O and RDMA Optimization: Based on Direct I/O, directly accesses SSDs, avoiding the use of file caching, reducing CPU and memory overhead, and using RDMA technology to achieve efficient data transmission, further improving performance.
  • KVCache Technology: In inference tasks, based on KVCache, caches key intermediate results, avoiding repeated computation and significantly improving inference efficiency. KVCache combines the advantages of high throughput and large capacity, and is a low-cost alternative to DRAM caching.
  • Data Locality Optimization: Based on optimizing data layout and access patterns, reduces data transmission latency and bandwidth consumption, and performs excellently especially in large-scale distributed training and inference tasks.

Performance of 3FS

  • Large-Scale Read Throughput: In a cluster consisting of 180 storage nodes, each storage node is equipped with 2×200Gbps InfiniBand NICs and 16 14TiB NVMe SSDs. Approximately 500+ client nodes are used for read stress testing, and each client node is configured with 1x200Gbps InfiniBand NIC. Under the background traffic of training jobs, the final aggregated read throughput reached approximately 6.6 TiB/s.
  • GraySort Performance Test: 3FS performed excellently in the GraySort benchmark test. GraySort is a large-scale data sorting test used to measure the data processing capability of distributed systems. The test cluster includes 25 storage nodes (each node has 2 NUMA domains, each domain has 1 storage service, 2×400Gbps NICs) and 50 compute nodes (each node has 192 physical cores, 2.2 TiB memory, 1×200Gbps NIC). In this test, 3FS successfully completed the sorting task of 110.5 TiB of data, distributed across 8192 partitions, in only 30 minutes and 14 seconds, with an average throughput of 3.66 TiB/min.
  • KVCache Inference Optimization: KVCache is a caching technology designed by 3FS to optimize the LLM (large language model) inference process, based on caching the key vectors and value vectors in the decoding layers to avoid repeated computation. In the performance test of KVCache, the peak read throughput reached 40 GiB/s, significantly improving inference efficiency. KVCache's garbage collection (GC) operation also demonstrates high IOPS performance, ensuring efficient management and updating of the cache.
3FS

3FS Project Address

3FS Application Scenarios

  • Large-Scale AI Training: Efficiently supports fast reading and writing of massive data, improving training speed.
  • Distributed Data Processing: Optimizes data loading and management, supports random access, and requires no prefetching or shuffling.
  • Inference Optimization: Caches intermediate results through KVCache, reducing repeated computation and improving inference efficiency.
  • Checkpoint Support: Provides high-throughput parallel checkpoint functionality, ensuring the stability and recoverability of training tasks.
  • Multi-Node Computing Environment: Seamlessly integrates into large-scale clusters, supports flexible scaling, and meets the needs of AI applications of different scales.