mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-28 07:50:44 +01:00
Update P2P-reading-in-weed-mount.md
1 parent
99ac64d9e6
commit
69d3d99648
1 file changed
+4
-13
+4
-13
@@ -2,7 +2,7 @@
|
||||
|
||||
When a fleet of GPU hosts loads the same model file through `weed mount`, every client pulls bytes from the volume tier. Even with [`fs.distributeChunks`](Distributing-AI-Model-Files-for-Multi-GPU-Loading) spreading the chunks evenly across every volume server, the volume tier's total NIC bandwidth caps how fast the read burst can complete. Peer chunk sharing lets mounts fetch chunks from each other instead, so after the first wave seeds a handful of mounts, subsequent reads fan out across the whole fleet.
|
||||
|
||||
This feature is opt-in via `-peer.enable=true` on `weed mount`. On the filer side it is enabled by default via `-mount.p2p=true` (idle cost is negligible). When the mount flag is off — the default for `weed mount` — reads behave exactly as they do today.
|
||||
This feature is opt-in via `-peer.enable=true` on `weed mount`. The filer side is always on — the registry's idle cost is negligible, so there is no flag to toggle it. When the mount flag is off — the default for `weed mount` — reads behave exactly as they do today.
|
||||
|
||||
The design is documented in [design-weed-mount-peer-chunk-sharing.md](https://github.com/seaweedfs/seaweedfs/blob/master/design-weed-mount-peer-chunk-sharing.md). This page is the operator-facing summary.
|
||||
|
||||
@@ -55,16 +55,13 @@ sequenceDiagram
|
||||
|
||||
### On the filer
|
||||
|
||||
The filer accepts `MountRegister` / `MountList` RPCs by default. The knob is `-mount.p2p` (default `true`); set it to `false` if you want to opt out, or if you're running an older mount fleet that shouldn't be discoverable yet.
|
||||
The filer accepts `MountRegister` / `MountList` RPCs unconditionally — the registry is a tiny in-memory map with negligible idle cost, so there is no flag to disable it. Nothing to configure on the filer side.
|
||||
|
||||
```bash
|
||||
weed filer -mount.p2p=true \
|
||||
-master=master1:9333,master2:9333,master3:9333 \
|
||||
weed filer -master=master1:9333,master2:9333,master3:9333 \
|
||||
-ip=filer1 -port=8888
|
||||
```
|
||||
|
||||
The same flag is available as `-filer.mount.p2p` on `weed mini` and `weed server`.
|
||||
|
||||
### On each mount
|
||||
|
||||
```bash
|
||||
@@ -103,11 +100,7 @@ Set `-peer.enable=false` (or omit the flag) on a rolling restart. The feature di
|
||||
|
||||
### `weed filer`
|
||||
|
||||
| Flag | Default | Meaning |
|
||||
|------|---------|---------|
|
||||
| `-mount.p2p` | `true` | Accept `MountRegister` / `MountList` from mount clients. |
|
||||
|
||||
Same flag on `weed mini` and `weed server` is namespaced as `-filer.mount.p2p`.
|
||||
No flags. The mount registry is always on.
|
||||
|
||||
## When it helps
|
||||
|
||||
@@ -159,8 +152,6 @@ The registrar broadcasts `MountRegister` to every filer listed in `-filer=` and
|
||||
|
||||
If peer sharing misbehaves in production, the kill switch is a rolling restart with `-peer.enable=false` on the mounts. Because the read path falls through to the volume tier on every failure mode, you should not observe read errors during the restart — just a gradual transfer of load back to the volume servers.
|
||||
|
||||
If needed, the filer side can be disabled by setting `-mount.p2p=false`. Existing mounts' heartbeats become no-ops and the peer-fetch path's `ChunkLookup` calls return empty within seconds (still falling through cleanly).
|
||||
|
||||
## Limitations
|
||||
|
||||
- **No write-path announce**: mounts don't advertise chunks they just uploaded. Same-host write-then-read still works (local cache), but cross-mount discovery of freshly-written chunks waits until another mount reads them first.
|
||||
|
||||
Reference in new issue
Block a user