mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
feat(docs): add docs about 3.5.1
Signed-off-by: clinx <chenlin1@oppo.com>
This commit is contained in:
parent
4f0935dccb
commit
432ae228b6
@ -14,3 +14,37 @@ CubeFS的分布式缓存由多个FlashGroup组成,每个FlashGroup负责管理
|
||||
|
||||
FlashGroup由缓存节点FlashNode组成,可以分布在不同的zone中。客户端读取缓存数据时,则会通过对FlashNode进行延时分析,选择访问延时最低的FlashNode进行读取。
|
||||
|
||||
**FlashNode**
|
||||
|
||||
下面为 FlashNode 进程启动所需的配置文件示例:
|
||||
|
||||
```text
|
||||
{
|
||||
"role": "flashnode",
|
||||
"listen": "18510",
|
||||
"prof": "18511",
|
||||
"logDir": "./logs",
|
||||
"masterAddr": [
|
||||
"xxx",
|
||||
"xxx",
|
||||
"xxx"
|
||||
],
|
||||
"memTotal": 0,
|
||||
"cachePercent": 0.8,
|
||||
"readRps": 100000,
|
||||
"disableTmpfs": true,
|
||||
"diskDataPath": [
|
||||
"/path/data1:0",
|
||||
"/path/data2:0"
|
||||
],
|
||||
"zoneName":"default"
|
||||
}
|
||||
```
|
||||
|
||||
**Master**
|
||||
|
||||
Master 负责对整个集群中所有分布式缓存的拓扑信息进行持久化存储与统一管理。它接收 FlashNode 的注册信息和心跳消息,以此判断各个 FlashNode 节点的存活状态。master接受cli命令对FlashGroup的slot分配,客户端在读取数据时,会向 Master 请求获取最新的分布式缓存拓扑结构,用于实现数据读取的正确路由。
|
||||
|
||||
**Client**
|
||||
|
||||
为支持文件缓存读取,客户端将结合卷级别的缓存开关和集群缓存功能状态,决定是否从分布式缓存中获取数据。
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
./cfs-cli flashnode list
|
||||
```
|
||||
|
||||
## 查询flashnode 缓存状态信息
|
||||
查询flashnode 缓存状态信息
|
||||
|
||||
```bash
|
||||
// 查询flashnode状态的key值不带过期时间
|
||||
@ -17,51 +17,51 @@
|
||||
./cfs-cli flashnode httpStatAll 127.0.0.1:17510
|
||||
```
|
||||
|
||||
## 清除指定flashnode中某个卷的缓存
|
||||
清除指定flashnode中某个卷的缓存
|
||||
|
||||
```bash
|
||||
./cfs-cli flashnode httpEvict 127.0.0.1:17510 flash_cache
|
||||
```
|
||||
|
||||
|
||||
## 启用/禁用flashnode
|
||||
启用/禁用flashnode
|
||||
|
||||
```bash
|
||||
./cfs-cli flashnode set 127.0.0.1:17510 true
|
||||
./cfs-cli flashnode set 127.0.0.1:17510 false
|
||||
```
|
||||
|
||||
## 删除flashnode
|
||||
删除flashnode
|
||||
|
||||
```bash
|
||||
./cfs-cli flashnode remove 127.0.0.1:17510
|
||||
```
|
||||
|
||||
## 创建fg
|
||||
创建fg
|
||||
|
||||
```bash
|
||||
./cfs-cli flashgroup create
|
||||
```
|
||||
|
||||
## 设置flashgroup active
|
||||
设置flashgroup active
|
||||
|
||||
```bash
|
||||
./cfs-cli flashgroup set 25 true
|
||||
```
|
||||
|
||||
## flashgroup添加flashnode
|
||||
flashgroup添加flashnode
|
||||
|
||||
```bash
|
||||
./cfs-cli flashgroup nodeAdd 13 --zone-name=flashcache --addr="127.0.0.1:17510"
|
||||
```
|
||||
|
||||
## 查看flashgroup列表
|
||||
查看flashgroup列表
|
||||
|
||||
```bash
|
||||
./cfs-cli flashgroup list
|
||||
```
|
||||
|
||||
## 查看flashgroup关系表
|
||||
查看flashgroup关系表
|
||||
|
||||
```bash
|
||||
./cfs-cli flashgroup graph
|
||||
|
||||
@ -42,18 +42,18 @@ $ make server
|
||||
## 分布式缓存配置
|
||||
|
||||
### 创建并启用flashGroup
|
||||
通过cli工具的flashgroup create命令创建缓存组flashgroup,并分配到唯一识别该flashgroup的ID。
|
||||
通过cli工具的flashGroup create命令创建缓存组flashGroup,并分配到唯一识别该flashGroup的ID。
|
||||
|
||||
```bash
|
||||
// fg的slot数量默认为32
|
||||
./cfs-cli flashgroup create
|
||||
./cfs-cli flashGroup create
|
||||
```
|
||||
|
||||
通过cli工具的flashgroup set命令启用flashGroup,参数为上一步被分配的ID。
|
||||
通过cli工具的flashGroup set命令启用flashGroup,参数为上一步被分配的ID。
|
||||
|
||||
```bash
|
||||
// 创建后的flashGroup状态默认是inactive状态,需要设置成active状态
|
||||
./cfs-cli flashgroup set 13 true
|
||||
./cfs-cli flashGroup set 13 true
|
||||
```
|
||||
|
||||
### flashGroup添加flashNode
|
||||
|
||||
@ -6,10 +6,45 @@ In the context of modern large AI model training, the scale of datasets and mode
|
||||
|
||||

|
||||
|
||||
## Data Access Flow
|
||||
**Data Access Flow**
|
||||
|
||||
CubeFS's distributed cache is composed of multiple FlashGroups, each responsible for managing a set of slot values on the consistent hashing ring.
|
||||
|
||||
Clients calculate a unique value corresponding to the consistent hashing ring based on the volume ID, inode, and offset information of the data block to be cached. The distributed cache's routing algorithm then finds the first slot value on the ring that is greater than or equal to this calculated value. The FlashGroup owning that slot is responsible for persisting the data block and providing caching and read services for it.
|
||||
|
||||
A FlashGroup consists of cache nodes called FlashNodes, which can be deployed across different zones. When a client reads cached data, it performs latency analysis across the available FlashNodes and selects the one with the lowest access latency for the read operation.
|
||||
|
||||
**FlashNode**
|
||||
|
||||
The following shows an example of the configuration file used to launch the FlashNode process:
|
||||
|
||||
```text
|
||||
{
|
||||
"role": "flashnode",
|
||||
"listen": "18510",
|
||||
"prof": "18511",
|
||||
"logDir": "./logs",
|
||||
"masterAddr": [
|
||||
"xxx",
|
||||
"xxx",
|
||||
"xxx"
|
||||
],
|
||||
"memTotal": 0,
|
||||
"cachePercent": 0.8,
|
||||
"readRps": 100000,
|
||||
"disableTmpfs": true,
|
||||
"diskDataPath": [
|
||||
"/path/data1:0",
|
||||
"/path/data2:0"
|
||||
],
|
||||
"zoneName":"default"
|
||||
}
|
||||
```
|
||||
|
||||
**Master**
|
||||
|
||||
The Master manages the global topology of the distributed cache across the cluster, including persistent storage and centralized control. It monitors the status of each FlashNode by receiving registration and heartbeat messages. Furthermore, the Master supports slot assignment to FlashGroups via CLI commands. Clients retrieve the most up-to-date topology information from the Master to enable accurate routing of data read operations.
|
||||
|
||||
**Client**
|
||||
|
||||
In order to support file cache retrieval, the client evaluates both the per-volume cache configuration and the global caching state of the cluster before deciding to fetch data from the distributed cache.
|
||||
|
||||
@ -17,51 +17,51 @@ Obtain detailed information about each cache node in the system, including its u
|
||||
./cfs-cli flashnode httpStatAll 127.0.0.1:17510
|
||||
```
|
||||
|
||||
## Evict the volume flash_cache from a specific FlashNode
|
||||
Evict the volume flash_cache from a specific FlashNode
|
||||
|
||||
```bash
|
||||
./cfs-cli flashnode httpEvict 127.0.0.1:17510 flash_cache
|
||||
```
|
||||
|
||||
|
||||
## Enable/Disable flashnode
|
||||
Enable/Disable flashnode
|
||||
|
||||
```bash
|
||||
./cfs-cli flashnode set 127.0.0.1:17510 true
|
||||
./cfs-cli flashnode set 127.0.0.1:17510 false
|
||||
```
|
||||
|
||||
## Remove flashnode
|
||||
remove flashnode
|
||||
|
||||
```bash
|
||||
./cfs-cli flashnode remove 127.0.0.1:17510
|
||||
```
|
||||
|
||||
## Create fg
|
||||
create fg
|
||||
|
||||
```bash
|
||||
./cfs-cli flashgroup create
|
||||
```
|
||||
|
||||
## Set flashgroup active
|
||||
set flashgroup active
|
||||
|
||||
```bash
|
||||
./cfs-cli flashgroup set 25 true
|
||||
```
|
||||
|
||||
## Flashgroup add flashnode
|
||||
flashgroup add flashnode
|
||||
|
||||
```bash
|
||||
./cfs-cli flashgroup nodeAdd 13 --zone-name=flashcache --addr="127.0.0.1:17510"
|
||||
```
|
||||
|
||||
## List flashgroup
|
||||
list flashgroup
|
||||
|
||||
```bash
|
||||
./cfs-cli flashgroup list
|
||||
```
|
||||
|
||||
## Show flashgroup graph
|
||||
show flashgroup group
|
||||
|
||||
```bash
|
||||
./cfs-cli flashgroup graph
|
||||
|
||||
@ -46,14 +46,14 @@ Use the following command to create a new FlashGroup. The system automatically g
|
||||
|
||||
```bash
|
||||
// The default number of slots for a FlashGroup (FG) is 32.
|
||||
./cfs-cli flashgroup create
|
||||
./cfs-cli flashGroup create
|
||||
```
|
||||
|
||||
Use the flashgroup set command in the CLI tool to enable the FlashGroup, specifying the unique ID that was assigned during its creation.
|
||||
|
||||
```bash
|
||||
// After creation, the FlashGroup status is inactive. You must activate it explicitly.
|
||||
./cfs-cli flashgroup set 13 true
|
||||
./cfs-cli flashGroup set 13 true
|
||||
```
|
||||
|
||||
### flashGroup add flashNode
|
||||
@ -62,7 +62,7 @@ To associate cache nodes with a newly created FlashGroup, use the flashgroup nod
|
||||
|
||||
```bash
|
||||
// To add a FlashNode to a FlashGroup, specify the unique ID of the FlashGroup and the identifier of the FlashNode that you want to associate with the group.
|
||||
./cfs-cli flashgroup nodeAdd 13 --zone-name=default --addr="*.*.*.*:18510"
|
||||
./cfs-cli flashGroup nodeAdd 13 --zone-name=default --addr="*.*.*.*:18510"
|
||||
```
|
||||
|
||||
After adding a FlashNode to the FlashGroup, use the flashnode list command to confirm that the node appears in the list. By default, a newly added FlashNode is enabled and active, with both the active and enable flags set to true.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user