From c380bf09839e1dec90388c131cb0e7f2d1ab2b54 Mon Sep 17 00:00:00 2001 From: pingqiu Date: Mon, 16 Nov 2026 19:15:17 -0800 Subject: [PATCH] docs(design): update the fsync figures after the group-commit fix (#173) agent-workspace-design.md (measured results) adds the post-#173 guest fsync medians; block-design.md's known-issues entry says #173 removed the idle group-commit wait (about 5.5 ms to 3.23 ms against 2.74 ms local) and keeps the remaining lead (the checkpoint superblock fsync under the store lock). Co-Authored-By: Claude Opus 5.5 --- seaweed-block/docs/design/agent-workspace-design.md | 2 +- seaweed-block/docs/design/block-design.md | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/seaweed-block/docs/design/agent-workspace-design.md b/seaweed-block/docs/design/agent-workspace-design.md index ca073faaa3..f3e9cbfcdd 100644 --- a/seaweed-block/docs/design/agent-workspace-design.md +++ b/seaweed-block/docs/design/agent-workspace-design.md @@ -307,7 +307,7 @@ Not done yet: Measurements, not SLOs; each is the median of 3 runs. [Workspace measurements](../workspace-measurements.md) has every number and how it was measured. -- **Workloads** (Firecracker microVMs, 4 vCPU, 4 GiB, one bare-metal host, NVMe/TCP loopback): metadata-heavy agent workloads (`npm ci`, `git clone`, untar, `find` + `stat`) ran at local-disk speed. The cost is `fsync` latency: 2,000 × create + write + `fsync` took 14.33 s against 6.09 s on a local disk, about 7 ms against 3 ms per `fsync`. Reducing it is in progress; the per-stage histograms are described in [fsync latency](../fsync-latency.md). +- **Workloads** (Firecracker microVMs, 4 vCPU, 4 GiB, one bare-metal host, NVMe/TCP loopback): metadata-heavy agent workloads (`npm ci`, `git clone`, untar, `find` + `stat`) ran at local-disk speed. The cost was `fsync` latency: 2,000 × create + write + `fsync` took 14.33 s against 6.09 s on a local disk, about 7 ms against 3 ms per `fsync`. After the group-commit fix (#173), guest `fsync` is a median of 3.23 ms against 2.74 ms local with the ublk frontend (3.59 ms over NVMe/TCP loopback); [workspace measurements](../workspace-measurements.md) has both rounds. The per-stage histograms are described in [fsync latency](../fsync-latency.md). - **Snapshot and fork** (host-side proxy, a 10 GiB volume of 2,560 chunks, no network latency, guest `fsync` or block frontend): HEAD root 2,172 bytes; snapshot 0.18 ms; fork 0.29 ms (flat manifest: 261,531 bytes, 5.79 ms, 10.67 ms). - **Cut upload** (same proxy): 64 dirty chunks (256 MiB) in 624 ms with one upload at a time, 434 ms with 8 in parallel. - **Two-host lifecycle** (Firecracker VMs, SeaweedFS chunk backend): create, write, two snapshots, fork, clean move, stale-holder replay refused, delete, GC; 35 of 35 checks passed, GC reclaimed 38 of 38 candidates and every reclaimed chunk returned 404. diff --git a/seaweed-block/docs/design/block-design.md b/seaweed-block/docs/design/block-design.md index 21912bbebc..f9ffb3eef3 100644 --- a/seaweed-block/docs/design/block-design.md +++ b/seaweed-block/docs/design/block-design.md @@ -377,9 +377,7 @@ These are tracked for fixes. Most were raised by an independent review of this r - **NVMe/TCP H2CData offset overflow.** The `DATAO + length` bound check is done in 32-bit arithmetic and can wrap, so one malformed PDU can panic the process (`core/frontend/nvme/session.go` `recvH2CData`). Reachable from loopback by default. **Planned fix:** 64-bit arithmetic, offset and R2T consistency checks, and bounds on wire-supplied allocations. - **Process notes in source comments.** #162 removed reviewer names and decision timestamps from code comments. A few comments still cite internal review labels (for example "ruling F1") where a neutral design rationale would be clearer. -- **fsync latency (about 7 ms against 3 ms local).** Leads to measure with the `/status/durable` histograms: - - the group committer waits a full 1 ms unless 64 waiters are queued, so at queue depth 1 every `fsync` pays at least 1 ms; - - the checkpoint superblock `fsync` runs under the exclusive store lock, stalling reads and writes each flush cycle. +- **fsync latency.** #173 removed the idle group-commit wait: a lone `Sync` no longer waits out the collection delay, and guest `fsync` fell from about 5.5 ms to a median of 3.23 ms against 2.74 ms local (ublk; see [workspace measurements](../workspace-measurements.md)). Remaining lead: the checkpoint superblock `fsync` runs under the exclusive store lock, stalling reads and writes each flush cycle. - **smartwal crash window.** A crash between the in-place write and the ring append can leave the volume unopenable (§1.3). smartwal is experimental and not a default: standalone `blockvolume` creates new volumes as walstore (auto), and Kubernetes and workspaces use walstore. **Planned:** fix the ordering. - **Forged records in user data.** WAL records are not bound to a store incarnation or lap, so bytes inside user data that happen to decode as a valid record could be replayed by the defensive scan. **Planned:** an incarnation nonce and lap in the next format, plus a clean-shutdown marker in the meantime. - **Mid-history WAL corruption only warns** (§1.2 step 2). Fixing it needs the synced watermark in the next format.