GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - telnet193/3FS: A high-performance distributed file system designed to address the challenges of AI training and inference workloads.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

58 Commits
58 Commits

Folders and files

NameName
Last commit message
Last commit date
.cargo
.cargo
 
 
.github/workflows
.github/workflows
 
 
MLWorkloadAnalyticsTest.dSYM/Contents
MLWorkloadAnalyticsTest.dSYM/Contents
 
 
benchmarks
benchmarks
 
 
cmake
cmake
 
 
configs
configs
 
 
deploy
deploy
 
 
dockerfile
dockerfile
 
 
docs
docs
 
 
gtest_ml_workload_analytics.dSYM/Contents
gtest_ml_workload_analytics.dSYM/Contents
 
 
hf3fs
hf3fs
 
 
hf3fs_fuse
hf3fs_fuse
 
 
hf3fs_utils
hf3fs_utils
 
 
licenses
licenses
 
 
patches
patches
 
 
specs
specs
 
 
src
src
 
 
standalone_test.dSYM/Contents
standalone_test.dSYM/Contents
 
 
test_ml_workload_analytics.dSYM/Contents
test_ml_workload_analytics.dSYM/Contents
 
 
tests
tests
 
 
third_party
third_party
 
 
.clang-format
.clang-format
 
 
.clang-tidy
.clang-tidy
 
 
.clangd
.clangd
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
CMakeLists.txt
CMakeLists.txt
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
MLWorkloadAnalyticsTest
MLWorkloadAnalyticsTest
 
 
Makefile.simple
Makefile.simple
 
 
README.md
README.md
 
 
build_gtest.sh
build_gtest.sh
 
 
gtest_ml_workload_analytics
gtest_ml_workload_analytics
 
 
setup.py
setup.py
 
 
setup_hf3fs_utils.py
setup_hf3fs_utils.py
 
 
standalone_test
standalone_test
 
 
standalone_test.cc
standalone_test.cc
 
 
test_ml_workload_analytics
test_ml_workload_analytics
 
 
test_ml_workload_analytics.cc
test_ml_workload_analytics.cc
 
 
tsan_ignore.txt
tsan_ignore.txt
 
 
tsan_suppressions.txt
tsan_suppressions.txt
 
 

Repository files navigation

Fire-Flyer File System

Build License

The Fire-Flyer File System (3FS) is a high-performance distributed file system designed to address the challenges of AI training and inference workloads. It leverages modern SSDs and RDMA networks to provide a shared storage layer that simplifies development of distributed applications. Key features and benefits of 3FS include:

  • Performance and Usability

    • Disaggregated Architecture Combines the throughput of thousands of SSDs and the network bandwidth of hundreds of storage nodes, enabling applications to access storage resource in a locality-oblivious manner.
    • Strong Consistency Implements Chain Replication with Apportioned Queries (CRAQ) for strong consistency, making application code simple and easy to reason about.
    • File Interfaces Develops stateless metadata services backed by a transactional key-value store (e.g., FoundationDB). The file interface is well known and used everywhere. There is no need to learn a new storage API.
  • Diverse Workloads

    • Data Preparation Organizes outputs of data analytics pipelines into hierarchical directory structures and manages a large volume of intermediate outputs efficiently.
    • Dataloaders Eliminates the need for prefetching or shuffling datasets by enabling random access to training samples across compute nodes.
    • Checkpointing Supports high-throughput parallel checkpointing for large-scale training.
    • KVCache for Inference Provides a cost-effective alternative to DRAM-based caching, offering high throughput and significantly larger capacity.

Documentation

  • Design Notes
  • Setup Guide
  • USRBIO API Reference
  • P Specifications

Performance

1. Peak throughput

The following figure demonstrates the throughput of read stress test on a large 3FS cluster. This cluster consists of 180 storage nodes, each equipped with 2×200Gbps InfiniBand NICs and sixteen 14TiB NVMe SSDs. Approximately 500+ client nodes were used for the read stress test, with each client node configured with 1x200Gbps InfiniBand NIC. The final aggregate read throughput reached approximately 6.6 TiB/s with background traffic from training jobs.

Large block read throughput under stress test on a 180-node cluster

To benchmark 3FS, please use our fio engine for USRBIO.

2. GraySort

We evaluated smallpond using the GraySort benchmark, which measures sort performance on large-scale datasets. Our implementation adopts a two-phase approach: (1) partitioning data via shuffle using the prefix bits of keys, and (2) in-partition sorting. Both phases read/write data from/to 3FS.

The test cluster comprised 25 storage nodes (2 NUMA domains/node, 1 storage service/NUMA, 2×400Gbps NICs/node) and 50 compute nodes (2 NUMA domains, 192 physical cores, 2.2 TiB RAM, and 1×200 Gbps NIC/node). Sorting 110.5 TiB of data across 8,192 partitions completed in 30 minutes and 14 seconds, achieving an average throughput of 3.66 TiB/min.

3. KVCache

KVCache is a technique used to optimize the LLM inference process. It avoids redundant computations by caching the key and value vectors of previous tokens in the decoder layers. The top figure demonstrates the read throughput of all KVCache clients (1×400Gbps NIC/node), highlighting both peak and average values, with peak throughput reaching up to 40 GiB/s. The bottom figure presents the IOPS of removing ops from garbage collection (GC) during the same time period.

KVCache Read Throughput KVCache GC IOPS

Check out source code

Clone 3FS repository from GitHub:

git clone https://github.com/deepseek-ai/3fs

When deepseek-ai/3fs has been cloned to a local file system, run the following commands to check out the submodules:

cd 3fs
git submodule update --init --recursive
./patches/apply.sh

Install dependencies

Install dependencies:

# for Ubuntu 20.04.
apt install cmake libuv1-dev liblz4-dev liblzma-dev libdouble-conversion-dev libdwarf-dev libunwind-dev \
  libaio-dev libgflags-dev libgoogle-glog-dev libgtest-dev libgmock-dev clang-format-14 clang-14 clang-tidy-14 lld-14 \
  libgoogle-perftools-dev google-perftools libssl-dev libclang-rt-14-dev gcc-10 g++-10 libboost1.71-all-dev

# for Ubuntu 22.04.
apt install cmake libuv1-dev liblz4-dev liblzma-dev libdouble-conversion-dev libdwarf-dev libunwind-dev \
  libaio-dev libgflags-dev libgoogle-glog-dev libgtest-dev libgmock-dev clang-format-14 clang-14 clang-tidy-14 lld-14 \
  libgoogle-perftools-dev google-perftools libssl-dev gcc-12 g++-12 libboost-all-dev

# for openEuler 2403sp1
yum install cmake libuv-devel lz4-devel xz-devel double-conversion-devel libdwarf-devel libunwind-devel \
    libaio-devel gflags-devel glog-devel gtest-devel gmock-devel clang-tools-extra clang lld \
    gperftools-devel gperftools openssl-devel gcc gcc-c++ boost-devel

Install other build prerequisites:

  • libfuse 3.16.1 or newer version
  • FoundationDB 7.1 or newer version
  • Rust toolchain: minimal 1.75.0, recommended 1.85.0 or newer version (latest stable version)

Build 3FS

Build 3FS in build folder:

cmake -S . -B build -DCMAKE_CXX_COMPILER=clang++-14 -DCMAKE_C_COMPILER=clang-14 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake --build build -j 32

Run a test cluster

Follow instructions in setup guide to run a test cluster.

Report Issues

Please visit https://github.com/deepseek-ai/3fs/issues to report issues.

ML Workload Analytics for 3FS

This repository contains an implementation of the ML Workload Analytics module for the Fire-Flyer File System (3FS).

Features

The ML Workload Analytics service provides real-time monitoring and analysis of machine learning workloads interacting with the file system. Key features include:

  1. Workload Type Detection: Automatically classifies workloads as training, inference, data preparation, evaluation, or checkpoint operations.

  2. Access Pattern Analysis: Identifies sequential, random, batch, and checkpoint-specific access patterns to optimize storage management.

  3. ML Framework Detection: Detects the machine learning framework being used (PyTorch, TensorFlow, JAX, MXNet, etc.) based on file access patterns.

  4. Historical Analysis: Maintains historical records of workload activity for trend analysis.

  5. Reporting: Generates detailed reports on workload characteristics and performance metrics.

Implementation

The implementation consists of:

  • MLWorkloadAnalytics.h: Header file defining the service interface and data structures.
  • MLWorkloadAnalytics.cc: Service implementation file with analysis algorithms.
  • Test files:
    • test_ml_workload_analytics.cc: Basic test program
    • standalone_test.cc: Comprehensive test suite

Testing

The standalone test suite includes tests for:

  1. Sequential access pattern detection
  2. Workload type detection (training, inference, etc.)
  3. ML framework detection (PyTorch, TensorFlow)

To build and run the tests:

make -f Makefile.simple run_standalone

Integration with 3FS

The ML Workload Analytics service is integrated with the 3FS storage layer through the StorageOperator class, which records file system operations and passes them to the analytics service. The service then analyzes these operations to identify patterns and provide insights.

Future Enhancements

Potential future enhancements include:

  1. Improved framework detection using more sophisticated heuristics
  2. Integration with the prefetching mechanism to optimize data access
  3. ML-based prediction of access patterns
  4. Dashboard visualization of workload analytics
  5. Integration with autoscaling systems to optimize resource allocation

About

A high-performance distributed file system designed to address the challenges of AI training and inference workloads.

Resources

Readme
License
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.