From 02869a16781760cfee973409380623b9f9420190 Mon Sep 17 00:00:00 2001 From: sgt Date: Wed, 20 Aug 2025 10:47:17 +0800 Subject: [PATCH] fix 3fs doc link problem --- doc/en/mooncake-store-preview.md | 2 +- doc/zh/mooncake-store-preview.md | 2 +- docs/source/design/mooncake-store-preview.md | 2 +- docs/source/plugin-usage/3FS-USRBIO-Plugin.md | 43 +++++++++++++++++++ 4 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 docs/source/plugin-usage/3FS-USRBIO-Plugin.md diff --git a/doc/en/mooncake-store-preview.md b/doc/en/mooncake-store-preview.md index 0de0fe958..f00bd3f13 100644 --- a/doc/en/mooncake-store-preview.md +++ b/doc/en/mooncake-store-preview.md @@ -469,7 +469,7 @@ After enabling the persistence feature: - For each `Get` or `BatchGet` operation, if the corresponding kvcache is not found in the memory pool, the system will attempt to read the file data from DFS and return it to the user. #### 3FS USRBIO Plugin -If you need to use 3FS's native API (USRBIO) to achieve high-performance persistent file reads and writes, you can refer to the configuration instructions in this document [3FS USRBIO Plugin](/mooncake-store/src/hf3fs/READMD.md). +If you need to use 3FS's native API (USRBIO) to achieve high-performance persistent file reads and writes, you can refer to the configuration instructions in this document [3FS USRBIO Plugin](/mooncake-store/src/hf3fs/README.md). ## Mooncake Store Python API diff --git a/doc/zh/mooncake-store-preview.md b/doc/zh/mooncake-store-preview.md index f74f02333..e8eb97955 100644 --- a/doc/zh/mooncake-store-preview.md +++ b/doc/zh/mooncake-store-preview.md @@ -472,7 +472,7 @@ struct ReplicateConfig { 启用持久化功能后,对于每次 `Put`或`BatchPut` 操作,都会发起一次同步的memory pool写入操作和一次异步的DFS持久化操作。之后执行 `Get`或 `BatchGet` 时,如果在memory pool中没有找到对应的kvcache,则会尝试从DFS中读取该文件数据,并返回给用户。 #### 3FS USRBIO 插件 -如需通过3FS原生接口(USRBIO)实现高性能持久化文件读写,请参阅本文档的配置说明。[3FS USRBIO 插件配置](/mooncake-store/src/hf3fs/READMD.md)。 +如需通过3FS原生接口(USRBIO)实现高性能持久化文件读写,请参阅本文档的配置说明。[3FS USRBIO 插件配置](/mooncake-store/src/hf3fs/README.md)。 ## Mooncake Store Python API diff --git a/docs/source/design/mooncake-store-preview.md b/docs/source/design/mooncake-store-preview.md index 5a4fcaf86..778a4d3a8 100644 --- a/docs/source/design/mooncake-store-preview.md +++ b/docs/source/design/mooncake-store-preview.md @@ -469,7 +469,7 @@ After enabling the persistence feature: - For each `Get` or `BatchGet` operation, if the corresponding kvcache is not found in the memory pool, the system will attempt to read the file data from DFS and return it to the user. #### 3FS USRBIO Plugin -If you need to use 3FS's native API (USRBIO) to achieve high-performance persistent file reads and writes, you can refer to the configuration instructions in this document [3FS USRBIO Plugin](/mooncake-store/src/hf3fs/READMD.md). +If you need to use 3FS's native API (USRBIO) to achieve high-performance persistent file reads and writes, you can refer to the configuration instructions in this document [3FS USRBIO Plugin](https://kvcache-ai.github.io/Mooncake/plugin-usage/3FS-USRBIO-Plugin.html). ## Mooncake Store Python API diff --git a/docs/source/plugin-usage/3FS-USRBIO-Plugin.md b/docs/source/plugin-usage/3FS-USRBIO-Plugin.md new file mode 100644 index 000000000..a542b05a9 --- /dev/null +++ b/docs/source/plugin-usage/3FS-USRBIO-Plugin.md @@ -0,0 +1,43 @@ +# Mooncake HF3FS Plugin + +This plugin implements 3FS native API (USRBIO) as a high-performance storage backend for Mooncake. + +## Prerequisites + +### 1. 3FS Installation +- Build and install [3FS](https://github.com/deepseek-ai/3FS/) +- Required library: `libhf3fs_api_shared.so` (Default location: `3FS_PATH/build/src/lib/api`) + → Install to: `/usr/lib/` +- Required header: `hf3fs_usrbio.h` (Default location: `3FS_PATH/src/lib/api`) + → Install to: `/usr/include/` + +### 2. Mooncake Configuration +- Enable 3FS support during CMake configuration: +```bash + +cmake -DUSE_3FS=ON ... +``` + +- Build and install Mooncake as usual. + +## Usage + +### Basic Operation +Start master server and specify the 3FS mount point: +```bash + +./build/mooncake-store/src/mooncake_master \ + --root_fs_dir=/path/to/3fs_mount_point +``` +### Important Notes +1. The specified directory **must** be a 3FS mount point + - If not, the system will automatically fall back to POSIX API +2. For optimal performance: + - Ensure proper permissions on the 3FS mount point + - Verify 3FS service is running before execution + +### Example +```bash + +ROLE=prefill MOONCAKE_STORAGE_ROOT_DIR=/mnt/3fs python3 ./stress_cluster_benchmark.py +``` \ No newline at end of file