diff --git a/seaweed-block/docs/assets/measured-results-dark.svg b/seaweed-block/docs/assets/measured-results-dark.svg new file mode 100644 index 0000000000..c978e32100 --- /dev/null +++ b/seaweed-block/docs/assets/measured-results-dark.svg @@ -0,0 +1,41 @@ + +Workload time on Seaweed Block relative to a local disk +npm ci (617 packages; offline): 1.00 times local (2.14 s against 2.14 s); git clone (Go 1.23; local): 1.02 times local (7.10 s against 6.99 s); Untar 100,000 files: 1.04 times local (1.10 s against 1.06 s); Cold find + stat over them: 0.97 times local (0.32 s against 0.33 s); 2000 x create + write + fsync: 1.39 times local (8.48 s against 6.11 s); Guest fsync median (fio 4 KiB): 1.18 times local (3.23 ms against 2.74 ms) + +Time on Seaweed Block relative to a local disk (local disk = 1.0) +Lab runs, median of 3, not SLOs. Lower is faster. + +0.0 + +0.5 + +1.0 + +1.5 + +local disk +npm ci (617 packages; offline) +NVMe/TCP loopback +npm ci (617 packages; offline): 1.00 x local (2.14 s against 2.14 s) +1.00x (2.14 s / 2.14 s) +git clone (Go 1.23; local) +NVMe/TCP loopback +git clone (Go 1.23; local): 1.02 x local (7.10 s against 6.99 s) +1.02x (7.10 s / 6.99 s) +Untar 100,000 files +NVMe/TCP loopback +Untar 100,000 files: 1.04 x local (1.10 s against 1.06 s) +1.04x (1.10 s / 1.06 s) +Cold find + stat over them +NVMe/TCP loopback +Cold find + stat over them: 0.97 x local (0.32 s against 0.33 s) +0.97x (0.32 s / 0.33 s) +2000 x create + write + fsync +ublk +2000 x create + write + fsync: 1.39 x local (8.48 s against 6.11 s) +1.39x (8.48 s / 6.11 s) +Guest fsync median (fio 4 KiB) +ublk +Guest fsync median (fio 4 KiB): 1.18 x local (3.23 ms against 2.74 ms) +1.18x (3.23 ms / 2.74 ms) + diff --git a/seaweed-block/docs/assets/measured-results-light.svg b/seaweed-block/docs/assets/measured-results-light.svg new file mode 100644 index 0000000000..760204f6f8 --- /dev/null +++ b/seaweed-block/docs/assets/measured-results-light.svg @@ -0,0 +1,41 @@ + +Workload time on Seaweed Block relative to a local disk +npm ci (617 packages; offline): 1.00 times local (2.14 s against 2.14 s); git clone (Go 1.23; local): 1.02 times local (7.10 s against 6.99 s); Untar 100,000 files: 1.04 times local (1.10 s against 1.06 s); Cold find + stat over them: 0.97 times local (0.32 s against 0.33 s); 2000 x create + write + fsync: 1.39 times local (8.48 s against 6.11 s); Guest fsync median (fio 4 KiB): 1.18 times local (3.23 ms against 2.74 ms) + +Time on Seaweed Block relative to a local disk (local disk = 1.0) +Lab runs, median of 3, not SLOs. Lower is faster. + +0.0 + +0.5 + +1.0 + +1.5 + +local disk +npm ci (617 packages; offline) +NVMe/TCP loopback +npm ci (617 packages; offline): 1.00 x local (2.14 s against 2.14 s) +1.00x (2.14 s / 2.14 s) +git clone (Go 1.23; local) +NVMe/TCP loopback +git clone (Go 1.23; local): 1.02 x local (7.10 s against 6.99 s) +1.02x (7.10 s / 6.99 s) +Untar 100,000 files +NVMe/TCP loopback +Untar 100,000 files: 1.04 x local (1.10 s against 1.06 s) +1.04x (1.10 s / 1.06 s) +Cold find + stat over them +NVMe/TCP loopback +Cold find + stat over them: 0.97 x local (0.32 s against 0.33 s) +0.97x (0.32 s / 0.33 s) +2000 x create + write + fsync +ublk +2000 x create + write + fsync: 1.39 x local (8.48 s against 6.11 s) +1.39x (8.48 s / 6.11 s) +Guest fsync median (fio 4 KiB) +ublk +Guest fsync median (fio 4 KiB): 1.18 x local (3.23 ms against 2.74 ms) +1.18x (3.23 ms / 2.74 ms) + diff --git a/seaweed-block/docs/assets/measured-results.csv b/seaweed-block/docs/assets/measured-results.csv new file mode 100644 index 0000000000..39103d5bc5 --- /dev/null +++ b/seaweed-block/docs/assets/measured-results.csv @@ -0,0 +1,7 @@ +workload,seaweed_block,local_disk,unit,frontend +npm ci (617 packages; offline),2.14,2.14,s,NVMe/TCP loopback +git clone (Go 1.23; local),7.10,6.99,s,NVMe/TCP loopback +"Untar 100,000 files",1.10,1.06,s,NVMe/TCP loopback +Cold find + stat over them,0.32,0.33,s,NVMe/TCP loopback +2000 x create + write + fsync,8.48,6.11,s,ublk +Guest fsync median (fio 4 KiB),3.23,2.74,ms,ublk diff --git a/seaweed-block/docs/assets/seaweed-block-hero.svg b/seaweed-block/docs/assets/seaweed-block-hero.svg index 6c2ba3f7fe..8196437164 100644 --- a/seaweed-block/docs/assets/seaweed-block-hero.svg +++ b/seaweed-block/docs/assets/seaweed-block-hero.svg @@ -1,105 +1,111 @@ - - Seaweed Block: one block service core, two uses - A shared core (blockvolume with ublk, NVMe/TCP and iSCSI frontends, one Read/Write/Sync backend contract and the walstore WAL engine, plus blockmaster as the epoch authority) serves two uses: agent microVM disks that cut changed chunks to SeaweedFS for snapshots, forks and host moves, and Kubernetes PVCs through CSI, RF=1 by default with optional RF=2 or RF=3 replication. + + Seaweed Block: the write path and the background path + Left, the write path: an agent sandbox or microVM writes to a plain virtio block disk; ublk or NVMe/TCP carries the request to blockvolume, which completes the write and fsync on its local WAL and acknowledges. Nothing on this path waits on the network. Right, the background path: a cut, on a schedule, at a snapshot or at detach, uploads only the changed 4 MiB chunks to your SeaweedFS and then updates the volume's HEAD root with a conditional update on generation and epoch. A snapshot names a root and shares its chunks; a restore makes a new volume that reads chunks on first use; a move lets another host take over at a higher epoch, and a stale holder's update is refused. Above both, blockmaster issues epochs and leases. The same core serves Kubernetes volumes through the CSI driver (alpha). + - - - - - - - - - + + + - + + Seaweed Block + Local-disk speed on the write path; snapshots, restore and moves through your SeaweedFS in the background. - Seaweed Block - One block service core · two uses: agent workspace disks and Kubernetes block volumes + + + blockmaster: the epoch authority + assigns each volume's holder · issues epochs and leases - - AGENT WORKSPACE DISKS - · proof of concept - - agent microVM - /dev/vda · ext4 - one local-speed disk per sandbox + + + + + WRITE PATH (synchronous) + + BACKGROUND PATH (cuts) - - KUBERNETES BLOCK VOLUMES - · alpha - - app pod + PVC - blockcsi: provision, attach, mount - Helm chart · read-only status + + + agent sandbox or microVM + a plain virtio block disk + + + ublk or NVMe/TCP + + + blockvolume (one per volume) + + + local WAL + extent + walstore, on the host's disk + + + nothing on this path + waits on the network + ack (left arrow) + write and fsync complete + on the local WAL - - - Shared core + + + cut + on a schedule, at a snapshot, at detach + + + only the changed 4 MiB chunks + + + your SeaweedFS + + + HEAD root (about 2 KB) + conditional update on {gen, epoch} + + snapshot + names a root; chunks are shared + restore + a new volume that reads the + snapshot's chunks on first use + move + another host takes over at a + higher epoch; a stale holder's + HEAD update is refused - - blockvolume - one process per volume replica + + - - ublk - - NVMe/TCP - - iSCSI + + + epoch, lease + + epoch fencing - one Backend contract: Read · Write · Sync - - - local WAL engine: walstore - WAL + extent · group fsync · typed recovery reasons - - - - blockmaster · epoch authority - assignments · epochs · leases · epoch fencing - - - - virtio-blk - - iSCSI or - NVMe/TCP - - - - SeaweedFS - - HEAD root (~2 KB) - conditional update on {gen, epoch} - - - - - - - - - immutable 4 MiB chunks, shared - snapshot / fork = copy the root - resume on another host at epoch + 1 - - - cut - changed - chunks - - - - Optional replicas (RF=2 / 3) - ship by LSN · durable barrier - best_effort · sync_quorum · sync_all - catch-up or rebuild · epoch-fenced - - - replicate - - - Workspace disks run one local replica; durability comes from cuts to SeaweedFS. Kubernetes volumes default to RF=1; synchronous RF=2 or RF=3 is opt-in (supported lab). + + The same core serves Kubernetes volumes through the CSI driver (iSCSI or NVMe/TCP; alpha in v1.0.0). diff --git a/seaweed-block/docs/workspace-measurements.md b/seaweed-block/docs/workspace-measurements.md index 8a532d684d..9c9ed24af9 100644 --- a/seaweed-block/docs/workspace-measurements.md +++ b/seaweed-block/docs/workspace-measurements.md @@ -34,6 +34,23 @@ bare-metal host; NVMe/TCP loopback; seconds): - The same comparison on an Azure `D16s_v5` nested-virtualization host gives the same picture. +**The same workloads against a FUSE file system on the same host** (same run, +`swbd0a-r5`, 2026-11-15; the FUSE file system ran on the same bare-metal host; +seconds, median of 3): + +| Workload | Seaweed Block | FUSE file system | FUSE / Seaweed Block | +|---|---|---|---| +| `npm ci` (617 packages, offline) | 2.14 | 11.81 | 5.5× | +| `git clone` (Go 1.23 repository, local) | 7.10 | 37.09 | 5.2× | +| Untar 5,000 files | 0.31 | 19.28 | 62× | +| Untar a 100,000-file tree | 1.10 | 47.54 | 43× | +| 2,000 × create + write + `fsync` | 14.33 | 14.32 | 1.0× | + +- Metadata-heavy work was 5 to 62 times faster on the block disk; `fsync`-bound + work took the same time on both. +- The cold `find` + `stat` row has no FUSE equivalent in this run (the FUSE + runs measured a first and a second pass instead), so it is left out. + **`fsync` after the group-commit fix** ([#173](https://github.com/seaweedfs/seaweed-block/pull/173); one bare-metal lab host; Firecracker guest; fio 4 KiB random write, one request at a time, `fsync` after every write, 60 s; median of 3 boots per setup): @@ -88,6 +105,18 @@ In the same proxy, a cut that writes 64 dirty chunks (256 MiB) took a median - Everything still referenced read back byte-identical, including the moved workspace's digest before and after GC. -These results cover the chunk path (`walstore-chunk`), which is a proof of -concept: not yet a default, a release claim or a production path. The +**Fault injection on the release candidate** (v1.0.0-rc.3, 2026-11-28; five +runs on one lab host; each run injected a process kill during a snapshot, a +kill during a write, and a pause of the object store during a snapshot): + +- The durability checker judged 253 writes across the five runs: acknowledged + writes lost = 0, and writes of unknown outcome landing after a + later durable write = 0. +- The same night failed other checks of operation outcomes (snapshot, move and + restore results, including one restore whose outcome stayed unresolved). + They are not data loss and are not counted here. + +The lifecycle run above predates v1.0.0. In v1.0.0 the chunk path +(`walstore-chunk`) is the supported single-replica configuration; see the +[v1.0.0 release note](releases/v1.0.0.md). The [agent workspace design](design/agent-workspace-design.md) describes how it works. diff --git a/seaweed-block/scripts/readme-chart.py b/seaweed-block/scripts/readme-chart.py new file mode 100644 index 0000000000..d60e166703 --- /dev/null +++ b/seaweed-block/scripts/readme-chart.py @@ -0,0 +1,119 @@ +#!/usr/bin/env python3 +"""Draw the README's measured-results chart from docs/assets/measured-results.csv. + +Each workload's time on Seaweed Block is shown relative to the same workload on +a local disk (local disk = 1.0), so rows with different units share one axis. +Writes a light and a dark SVG next to the CSV. With --check, it writes nothing +and exits 1 if either SVG differs from what the CSV gives. + +usage: python3 scripts/readme-chart.py [--check] +""" +import csv +import sys +from pathlib import Path +from xml.sax.saxutils import escape + +ROOT = Path(__file__).resolve().parent.parent +CSV = ROOT / "docs" / "assets" / "measured-results.csv" +OUT = {"light": ROOT / "docs" / "assets" / "measured-results-light.svg", + "dark": ROOT / "docs" / "assets" / "measured-results-dark.svg"} + +THEMES = { + "light": {"surface": "#fcfcfb", "ink": "#0b0b0b", "ink2": "#52514e", "grid": "#e4e3df", + "ref": "#52514e", "bar": "#2a78d6"}, + "dark": {"surface": "#1a1a19", "ink": "#f0efec", "ink2": "#c3c2b7", "grid": "#383835", + "ref": "#c3c2b7", "bar": "#3987e5"}, +} + +W, LABEL_W, RIGHT_W = 760, 250, 150 +ROW_H, BAR_H, TOP, BOTTOM = 34, 14, 56, 44 +XMAX = 1.5 +TICKS = [0.0, 0.5, 1.0, 1.5] + + +def rows(): + with CSV.open(encoding="utf-8", newline="") as f: + out = [] + for r in csv.DictReader(f): + sb, local = float(r["seaweed_block"]), float(r["local_disk"]) + out.append((r["workload"], sb, local, r["unit"], r["frontend"])) + return out + + +def fmt(v, unit): + return f"{v:.2f} {unit}" + + +def bar_path(x0, y, w, h, r=4): + """A bar anchored at x0 with a rounded data end (right side only).""" + r = min(r, w, h / 2) + x1 = x0 + w + return (f"M{x0:.1f},{y:.1f} H{x1 - r:.1f} Q{x1:.1f},{y:.1f} {x1:.1f},{y + r:.1f} " + f"V{y + h - r:.1f} Q{x1:.1f},{y + h:.1f} {x1 - r:.1f},{y + h:.1f} H{x0:.1f} Z") + + +def svg(theme): + t = THEMES[theme] + data = rows() + plot_w = W - LABEL_W - RIGHT_W + h = TOP + ROW_H * len(data) + BOTTOM + + def x(v): + return LABEL_W + plot_w * v / XMAX + + parts = [ + f'', + 'Workload time on Seaweed Block relative to a local disk', + '' + escape("; ".join( + f"{w}: {sb / lo:.2f} times local ({fmt(sb, u)} against {fmt(lo, u)})" for w, sb, lo, u, _ in data)) + '', + f'', + f'' + 'Time on Seaweed Block relative to a local disk (local disk = 1.0)', + f'' + 'Lab runs, median of 3, not SLOs. Lower is faster.', + ] + for v in TICKS: + parts.append(f'') + parts.append(f'{v:.1f}') + parts.append(f'') + parts.append(f'local disk') + for i, (w, sb, lo, u, fe) in enumerate(data): + yc = TOP + ROW_H * i + ROW_H / 2 + ratio = sb / lo + parts.append(f'{escape(w)}') + parts.append(f'{escape(fe)}') + parts.append(f'{escape(w)}: {ratio:.2f} x local ' + f'({fmt(sb, u)} against {fmt(lo, u)})') + parts.append(f'' + f'{ratio:.2f}x ' + f'({fmt(sb, u)} / {fmt(lo, u)})') + parts.append("") + return "\n".join(parts) + "\n" + + +def main(): + check = sys.argv[1:] == ["--check"] + stale = [] + for theme, path in OUT.items(): + text = svg(theme) + if check: + if not path.exists() or path.read_text(encoding="utf-8") != text: + stale.append(str(path.relative_to(ROOT))) + else: + path.write_text(text, encoding="utf-8", newline="\n") + if stale: + print("stale, rerun scripts/readme-chart.py: " + ", ".join(stale)) + return 1 + return 0 + + +if __name__ == "__main__": + sys.exit(main())