[CCF Archive] Store object type eviction policy submission #3

Closed
kancel wants to merge 382 commits from kancel:ccf-archive-pr2746 into main
19 changed files with 54 additions and 44 deletions
Showing only changes of commit 0fceaee292 - Show all commits

View File

@ -41,7 +41,6 @@ extensions = [
"sphinx.ext.linkcode",
"sphinx.ext.intersphinx",
"sphinx_copybutton",
"autodoc2",
"myst_parser",
"sphinxarg.ext",
"sphinx_design",
@ -53,25 +52,17 @@ myst_enable_extensions = [
"fieldlist",
]
myst_fence_as_directive = ["mermaid"]
autodoc2_packages = [
{
"path": "../../Mooncake",
"exclude_dirs": ["__pycache__", "third_party"],
},
]
autodoc2_output_dir = "api"
autodoc2_render_plugin = "myst"
autodoc2_hidden_objects = ["dunder", "private", "inherited"]
autodoc2_sort_names = True
autodoc2_index_template = None
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns: list[str] = ["**/*.template.md", "**/*.inc.md"]
exclude_patterns: list[str] = [
"**/*.template.md",
"**/*.inc.md",
"zh_archive/**",
]
# Exclude the prompt "$" when copying code
copybutton_prompt_text = r"\$ "

View File

@ -1037,15 +1037,15 @@ Available log levels: trace, debug, info, warn (or warning), error, and critical
## Example Code
#### Python Usage Example
### Python Usage Example
We provide a reference example `distributed_object_store_provider.py`, located in the `mooncake-store/tests` directory. To check if the related components are properly installed, you can run etcd and Master Service (`mooncake_master`) in the background on the same server, and then execute this Python program in the foreground. It should output a successful test result.
#### C++ Usage Example
### C++ Usage Example
The C++ API of Mooncake Store provides more low-level control capabilities. We provide a reference example `client_integration_test`, located in the `mooncake-store/tests` directory. To check if the related components are properly installed, you can run etcd and Master Service (`mooncake_master`) on the same server, and then execute this C++ program (located in the `build/mooncake-store/tests` directory). It should output a successful test result.
## Version Management Policy
The current version of Mooncake Store is defined in [`CMakeLists.txt`](../../mooncake-store/CMakeLists.txt) as `project(MooncakeStore VERSION 2.0.0)`.
The current version of Mooncake Store is defined in [`CMakeLists.txt`](gh-file:mooncake-store/CMakeLists.txt) as `project(MooncakeStore VERSION 2.0.0)`.
When to bump the version:

View File

@ -89,10 +89,26 @@ cpp-api
metrics
:::
## TENT Quality of Service
:::{toctree}
:maxdepth: 1
qos
:::
## TENT Slice Spraying
:::{toctree}
:maxdepth: 1
slice-spraying
:::
## TENT Failover
:::{toctree}
:maxdepth: 1
failover
:::
:::

View File

@ -337,7 +337,7 @@ The HTTP server should implement three following RESTful APIs, while the metadat
2. `PUT /metadata?key=$KEY`: Update the metadata corresponding to `$KEY` to the value of the request body.
3. `DELETE /metadata?key=$KEY`: Delete the metadata corresponding to `$KEY`.
For specific implementation, refer to the demo service implemented in Golang at [mooncake-transfer-engine/example/http-metadata-server](../../../mooncake-transfer-engine/example/http-metadata-server).
For specific implementation, refer to the demo service implemented in Golang at [mooncake-transfer-engine/example/http-metadata-server](gh-dir:mooncake-transfer-engine/example/http-metadata-server).
### Initialization

View File

@ -211,6 +211,7 @@ address shown in the target's startup log (e.g., `ip-172-31-29-226:12345`).
> **Note:** `buffer_size` must be >= `block_size * batch_size * threads`. The benchmark auto-adjusts if too small.
(benchmark-results)=
### Benchmark Results
#### 1. p6-b300.48xlarge (B300, 16 EFA × 400 Gbps)

View File

@ -13,6 +13,7 @@ As shown in the diagram, each specific client corresponds to a `TransferEngine`,
Mooncake Transfer Engine provides interfaces through the `TransferEngine` class (located in `mooncake-transfer-engine/include/transfer_engine.h`), where the specific data transfer functions for different backends are implemented by the `Transport` class, currently supporting `TcpTransport`, `RdmaTransport`, `EfaTransport`, `NVMeoFTransport`, `NvlinkTransport`, `IntraNodeNvlinkTransport`, and `HipTransport`.
(segment)=
### Segment
Segment represents a collection of source address ranges and target address ranges available during the data transfer process in Transfer Engine. That is, all local and remote addresses involved in `BatchTransfer` requests must be within the valid segment range. Transfer Engine supports the following two types of Segments.
@ -28,6 +29,7 @@ In addition, Transfer Engine also supports registering some **local DRAM areas**
#### 2. NVMeof Segment
Transfer Engine also leverages the NVMeof protocol to support direct data transfer from files on NVMe to DRAM/VRAM via PCIe, without going through the CPU and achieving zero-copy. Users need to follow the instructions to mount remote storage nodes locally and use the `openSegment` interface for reference to complete data read/write operations.
(batchtransfer)=
### BatchTransfer
With the help of Transfer Engine, Mooncake Store can achieve local DRAM/VRAM reading and writing of specified parts in valid segments through TCP, (GPUDirect) RDMA, NVMe-of protocols, etc.
@ -148,7 +150,7 @@ After successfully compiling Transfer Engine, the test program `transfer_engine_
The initiator node can also configure the following test parameters: `--operation` (can be `"read"` or `"write"`), `batch_size`, `block_size`, `duration`, `threads`, etc.
> [!NOTE]
> If an exception occurs during execution, it is usually due to incorrect parameter settings. It is recommended to refer to the [troubleshooting document](troubleshooting.md) for preliminary troubleshooting.
> If an exception occurs during execution, it is usually due to incorrect parameter settings. It is recommended to refer to the [troubleshooting document](../../troubleshooting/troubleshooting.md) for preliminary troubleshooting.
### Sample Run
@ -252,7 +254,7 @@ The HTTP server should implement three following RESTful APIs, while the metadat
2. `PUT /metadata?key=$KEY`: Update the metadata corresponding to `$KEY` to the value of the request body.
3. `DELETE /metadata?key=$KEY`: Delete the metadata corresponding to `$KEY`.
For specific implementation, refer to the demo service implemented in Golang at [mooncake-transfer-engine/example/http-metadata-server](../../../mooncake-transfer-engine/example/http-metadata-server).
For specific implementation, refer to the demo service implemented in Golang at [mooncake-transfer-engine/example/http-metadata-server](gh-dir:mooncake-transfer-engine/example/http-metadata-server).
## Using Transfer Engine to Your Projects
@ -265,7 +267,7 @@ To support the operational needs of P2P Store, Transfer Engine provides a Golang
When compiling the project, enable the `-DWITH_P2P_STORE=ON` option to compile the P2P Store example program at the same time.
### Using Rust Interface
Under `mooncake-transfer-engine/rust`, the Rust interface implementation of TransferEngine is provided, and a Rust version of the benchmark is implemented based on the interface, similar to [transfer_engine_bench.cpp](../../../mooncake-transfer-engine/example/transfer_engine_bench.cpp). To compile the rust example, you need to install the Rust SDK and add `-DWITH_RUST_EXAMPLE=ON` in the cmake command.
Under `mooncake-transfer-engine/rust`, the Rust interface implementation of TransferEngine is provided, and a Rust version of the benchmark is implemented based on the interface, similar to [transfer_engine_bench.cpp](gh-file:mooncake-transfer-engine/example/transfer_engine_bench.cpp). To compile the rust example, you need to install the Rust SDK and add `-DWITH_RUST_EXAMPLE=ON` in the cmake command.
## Advanced Runtime Options
For advanced users, TransferEngine provides the following advanced runtime options, all of which can be passed in through **environment variables**.
@ -341,6 +343,7 @@ heterogeneous_ascend
:::{toctree}
:maxdepth: 1
kunpeng_ub_transport
sunrise_link_transport
:::

View File

@ -16,17 +16,17 @@ pip install mooncake-transfer-engine
Note:
- If any `.so` file is missing, uninstall the pip package with `pip3 uninstall mooncake-transfer-engine`, and build the binaries manually from source following the [build instructions](https://github.com/kvcache-ai/Mooncake/blob/main/doc/en/build.md).
- If any `.so` file is missing, uninstall the pip package with `pip3 uninstall mooncake-transfer-engine`, and build the binaries manually from source following the [build instructions](../build.md).
### Install the latest version of LMDeploy
##### 1. Clone LMDeploy from the official repo
#### 1. Clone LMDeploy from the official repo
```bash
git clone https://github.com/InternLM/lmdeploy.git
```
##### 2. Build
#### 2. Build
##### 2.1 Build from source
@ -164,4 +164,4 @@ curl -X POST "http://192.168.0.147:8000/v1/completions" \
- You can specify multiple prefill or decode instances with distinct `--server-port` and different GPUs using `CUDA_VISIBLE_DEVICES`.
- MooncakeTransferEngine supports both intra-node (PCIe) and inter-node (RDMA/CXL) transfer, and device selection is automatic or customizable via config.
- When using HF models that timeout during prefill, consider setting model path to `~/Qwen3-8B` to accelerate loading from localhost.
- Use `--log-level DEBUG` to get detailed runtime logs for troubleshooting.
- Use `--log-level DEBUG` to get detailed runtime logs for troubleshooting.

View File

@ -12,7 +12,7 @@ This is the latest version of the MooncakeTransferEngine integration doc with th
pip3 install mooncake-transfer-engine
```
Note: If you encounter problems such as missing `lib*.so`, you should uninstall this package by `pip3 uninstall mooncake-transfer-engine`, and build the binaries manually according to the [instructions](build.md).
Note: If you encounter problems such as missing `lib*.so`, you should uninstall this package by `pip3 uninstall mooncake-transfer-engine`, and build the binaries manually according to the [instructions](../build.md).
### Install the latest version of SGLang
#### 1. Clone SGLang from official repo

View File

@ -16,7 +16,7 @@ pip3 install mooncake-transfer-engine
```
Note:
- If you encounter problems such as missing `lib*.so`, you should uninstall this package by `pip3 uninstall mooncake-transfer-engine`, and build the binaries manually according to the [instructions](build.md).
- If you encounter problems such as missing `lib*.so`, you should uninstall this package by `pip3 uninstall mooncake-transfer-engine`, and build the binaries manually according to the [instructions](../../build.md).
- For vLLM version <= v0.8.4, it requires mooncake-transfer-engine <= 0.3.3.post2. In the latest release, interface `mooncake_vllm_adaptor` has been deprecated.
### Install the latest version of vLLM

View File

@ -24,7 +24,7 @@ pip3 install mooncake-transfer-engine
```
Note:
- If you encounter problems such as missing `lib*.so`, you should uninstall this package by `pip3 uninstall mooncake-transfer-engine`, and build the binaries manually according to the [instructions](build.md).
- If you encounter problems such as missing `lib*.so`, you should uninstall this package by `pip3 uninstall mooncake-transfer-engine`, and build the binaries manually according to the [instructions](../../build.md).
- For vLLM version <= v0.8.4, it requires mooncake-transfer-engine <= 0.3.3.post2. In the latest release, interface `mooncake_vllm_adaptor` has been deprecated.
### Install the latest version of vLLM

View File

@ -16,7 +16,7 @@ Install mooncake-transfer-engine through pip:
pip install mooncake-transfer-engine
```
Note: If you encounter problems such as missing `lib*.so`, you should uninstall this package by `pip3 uninstall mooncake-transfer-engine`, and build the binaries manually according to the [instructions](../build.md).
Note: If you encounter problems such as missing `lib*.so`, you should uninstall this package by `pip3 uninstall mooncake-transfer-engine`, and build the binaries manually according to the [instructions](../../build.md).
### Install vLLM
@ -118,7 +118,7 @@ The following environment variables can be used to customize Mooncake behavior:
## Performance
For detailed performance benchmarks and results, see the [vLLM Benchmark](../../performance/vllm-v1-support-benchmark.md) documentation.
For detailed performance benchmarks and results, see the [vLLM Benchmark](../../../performance/vllm-v1-support-benchmark.md) documentation.
## Notes

View File

@ -156,7 +156,7 @@ curl http://<master-host>:9003/health
The admin HTTP server is configured in the master config file (`master.json` or `master.yaml`):
```json
```text
{
"enable_metric_reporting": true,
"metrics_port": 9003,

View File

@ -58,7 +58,7 @@ curl "http://localhost:8080/query_key?key=my_object"
```
**Response Format**:
```json
```text
{
"transport_endpoint_": "hostname:port",
"buffer_descriptors": [...]
@ -79,7 +79,7 @@ curl "http://localhost:8080/batch_query_keys?keys=key1,key2,key3"
```
**Response Format**:
```json
```text
{
"success": true,
"data": {

View File

@ -91,6 +91,7 @@ performance/vllm-v1-support-benchmark
performance/allocator-benchmark-result
performance/allocation-strategy-benchmark-result
performance/ssd-offload-benchmark-results
performance/storage-benchmark
:::
% API Documentation
@ -117,6 +118,7 @@ design/p2p-store
design/transfer-engine/index
design/hicache-design
design/engram
design/unified-parallel-tensor-io
design/tent/overview
design/tent/tebench
design/conductor/conductor-architecture-design

View File

@ -3,7 +3,7 @@ Here are some preview mooncake benchmark results on A10 with up to 2 RDMA NICs.
In addition, we are also coordinating resources to integrate some machines with more RDMA NICs and more advanced GPUs. The official benchmark results will be released in due time.
### Varying tp (input length = 1024, qps = 2, output length =6)
## Varying tp (input length = 1024, qps = 2, output length =6)
| Setting | num_rdma_nic | Successful Requests | Duration (s) | Total Input Tokens | Total Generated Tokens | Req Throughput (req/s) | Output Token Throughput (tok/s) | Total Token Throughput (tok/s) | Mean TTFT (ms) | Median TTFT (ms) | P99 TTFT (ms) | Mean TPOT (ms) | Median TPOT (ms) | P99 TPOT (ms) | Mean ITL (ms) | Median ITL (ms) | P99 ITL (ms) |
|-----------------|--------------|---------------------|--------------|--------------------|------------------------|------------------------|---------------------------------|-------------------------------|----------------|-----------------|--------------|---------------|------------------|--------------|--------------|----------------|-------------|
| tp = 1 | 2 | 200 | 99.47 | 201995 | 1200 | 2.01 | 12.06 | 2042.74 | 1056.76 | 635.00 | 4006.59 | 97.08 | 26.94 | 781.91 | 97.01 | 14.05 | 2205.51 |
@ -16,7 +16,7 @@ In addition, we are also coordinating resources to integrate some machines with
| tp = 2 | TCP | 200 | 98.97 | 201995 | 1200 | 2.02 | 12.12 | 2053.03 | 333.74 | 251.32 | 954.63 | 28.74 | 15.49 | 161.24 | 28.70 | 15.35 | 393.52 |
| tp = 4 | TCP | 200 | 98.78 | 201995 | 1200 | 2.02 | 12.15 | 2056.94 | 205.37 | 162.92 | 463.70 | 21.54 | 16.51 | 94.04 | 21.51 | 16.56 | 170.54 |
### Varying qps (length = 1024, tp = 4, output length =6)
## Varying qps (length = 1024, tp = 4, output length =6)
|Setting | num_rdma_nic | Successful Requests | Duration (s) | Total Input Tokens | Total Generated Tokens | Req Throughput (req/s) | Output Token Throughput (tok/s) | Total Token Throughput (tok/s) | Mean TTFT (ms) | Median TTFT (ms) | P99 TTFT (ms) | Mean TPOT (ms) | Median TPOT (ms) | P99 TPOT (ms) | Mean ITL (ms) | Median ITL (ms) | P99 ITL (ms) |
|-----------------|--------------|---------------------|--------------|--------------------|------------------------|------------------------|---------------------------------|-------------------------------|----------------|-----------------|--------------|---------------|------------------|--------------|--------------|----------------|-------------|
| qps = 2 | 2 | 200 | 98.77 | 201995 | 1200 | 2.02 | 12.15 | 2057.33 | 200.64 | 156.62 | 478.22 | 22.63 | 17.35 | 99.61 | 22.60 | 17.08 | 186.25 |
@ -32,7 +32,7 @@ In addition, we are also coordinating resources to integrate some machines with
| qps = 6 | TCP | 200 | 33.49 | 201995 | 1200 | 5.97 | 35.83 | 6067.71 | 907.74 | 514.85 | 3253.93 | 122.75 | 45.51 | 648.40 | 122.56 | 18.09 | 2282.92 |
| qps = 8 | TCP | 200 | 28.39 | 201995 | 1200 | 7.04 | 42.26 | 7156.09 | 6714.57 | 7885.09 | 11787.51 | 1116.06 | 408.32 | 4645.25 | 1114.29 | 46.87 | 21898.03 |
### Varying input length (tp = 4, qps = 2, output length =6)
## Varying input length (tp = 4, qps = 2, output length =6)
| Setting | num_rdma_nic | Successful Requests | Duration (s) | Total Input Tokens | Total Generated Tokens | Req Throughput (req/s) | Output Token Throughput (tok/s) | Total Token Throughput (tok/s) | Mean TTFT (ms) | Median TTFT (ms) | P99 TTFT (ms) | Mean TPOT (ms) | Median TPOT (ms) | P99 TPOT (ms) | Mean ITL (ms) | Median ITL (ms) | P99 ITL (ms) |
|-----------------|--------------|---------------------|--------------|--------------------|------------------------|------------------------|---------------------------------|-------------------------------|----------------|-----------------|--------------|---------------|------------------|--------------|--------------|----------------|-------------|
| 1024 | 2 | 200 | 98.77 | 201995 | 1200 | 2.02 | 12.15 | 2057.32 | 195.47 | 151.55 | 482.84 | 22.83 | 19.27 | 96.55 | 22.81 | 18.12 | 158.16 |

View File

@ -2,7 +2,7 @@
Here are some preview MooncakeStore benchmark results on A10 with "Qwen/Qwen2.5-7B-Instruct-GPTQ-Int4".
### Varying PD ratio (input length = 1024, qps = 2, output length =6, num of requests = 200)
## Varying PD ratio (input length = 1024, qps = 2, output length =6, num of requests = 200)
| Configuration | Backend | Duration (s) | Output Token Throughput (tok/s) | Total Token Throughput (tok/s) | Mean TTFT (ms) | Median TTFT (ms) | P99 TTFT (ms) | Mean TPOT (ms) | Median TPOT (ms) | P99 TPOT (ms) | Mean ITL (ms) | Median ITL (ms) | P99 ITL (ms) |
|----------------------------|----------------------|--------------|---------------------------------|-------------------------------|----------------|-----------------|--------------|---------------|------------------|--------------|--------------|----------------|-------------|
| 2P2D tp = 1 | Redis | 99.47 | 12.06 | 2042.75 | 844.28 | 666.84 | 2270.91 | 16.88 | 11.57 | 104.83 | 16.84 | 11.56 | 239.67 |

View File

@ -2820,8 +2820,6 @@ bind_to_numa_node(0)
---
---
## Error Handling
Most methods return integer status codes:
@ -2844,5 +2842,3 @@ For methods that return data (`get`, `get_batch`, `get_buffer`, `get_tensor`):
4. **Configure replication** appropriately - more replicas provide better availability but use more storage
5. **Use soft pinning** for frequently accessed objects to keep them in memory
6. **Choose RDMA protocol** when available for maximum performance
---

View File

@ -624,6 +624,7 @@ The Transfer Engine respects the following environment variables:
### Basic Setup and Data Transfer
```python
import numpy as np
from mooncake.engine import TransferEngine
import os
@ -650,7 +651,7 @@ data_len = len(data)
engine.register_memory(buffer_data, buffer_data_len)
# Get Remote Addr from ZMQ or upper-layer inference framework
remote_addr = ??
remote_addr = REMOTE_ADDR
# Transfer data to remote node
ret = engine.transfer_sync_write(

View File

@ -5,4 +5,4 @@
## 当前状态
- 已归档,不再活跃维护
- 网站当前只显示英文文档
- 如需查看/编辑最新文档请访问docs目录
- 如需查看/编辑最新文档请访问docs目录