mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 18:17:16 +01:00
docs: close phase167 execution evidence
This commit is contained in:
1 parent
c789e46c6b
commit
f6159b9dce
3 files changed
+151
-11
No files matched your search
@@ -64,8 +64,9 @@ fails with typed `storage.ErrWALIntegrityFault`.
|
||||
The store allocates global LSN and lane sequence under one short metadata lock.
|
||||
Execution then moves to the LBA's lane:
|
||||
|
||||
1. same-lane requests wait for their exact lane sequence;
|
||||
2. the owner writes the record to that lane's region;
|
||||
1. same-lane requests enter one bounded, sequence-ordered queue;
|
||||
2. one drainer combines adjacent physical ring slots into positioned writes
|
||||
no larger than 1 MiB, splitting at ring wrap;
|
||||
3. completion enters the global ledger;
|
||||
4. the ledger publishes consecutive completed LSNs from `H+1`;
|
||||
5. the caller returns only after its LSN is published.
|
||||
@@ -73,9 +74,11 @@ Execution then moves to the LBA's lane:
|
||||
If LSN `N` fails, the store enters a terminal error state. A physically
|
||||
completed `N+1` cannot return success or advance `H`.
|
||||
|
||||
`WriteBatch` reserves one contiguous global LSN range, groups requests by lane,
|
||||
and uses at most one dispatcher per active lane. Same-LBA writes always map to
|
||||
the same lane and remain ordered.
|
||||
`WriteBatch` reserves one contiguous global LSN range and queues requests by
|
||||
lane. Same-LBA writes always map to the same lane and remain ordered. A failed
|
||||
later ring chunk terminal-faults the store: an earlier physical chunk may be
|
||||
reported as a partial in-process result, but it cannot become durable because
|
||||
the covering `Sync` fails and the durable header does not advance.
|
||||
|
||||
## Sync And Checkpoint
|
||||
|
||||
@@ -97,6 +100,11 @@ When a lane exceeds its retained-slot threshold, `Sync` additionally:
|
||||
4. fsyncs that header;
|
||||
5. advances `S` to the first LSN still honestly scannable.
|
||||
|
||||
Before advancing a lane tail, recycle verification reads adjacent WAL records
|
||||
in bounded 1 MiB chunks. Every record is still decoded and CRC checked; the
|
||||
optimization removes one-`pread`-per-record amplification, not integrity
|
||||
validation.
|
||||
|
||||
No unstable record is copied into the checkpoint. No slot is reused before
|
||||
the extent is durable and both header slots have been sealed with the recycled
|
||||
tails, so fallback cannot scan a physical slot after it has been reused.
|
||||
@@ -171,8 +179,15 @@ BASE-stage reset, direct-frontier retention, and adapter integration. It also
|
||||
runs the canonical `LogicalStorage` contract and compares 1/2/4/8-writer
|
||||
throughput against legacy `walstore`.
|
||||
|
||||
The current Windows positioned-I/O result does not meet the Phase 167
|
||||
promotion thresholds. Multiple lanes are active and correctness gates pass,
|
||||
but `performance_claim_allowed=false`. Do not describe this package as a
|
||||
performance improvement until the same-run Linux/device gate meets the
|
||||
single-writer and four-writer acceptance ratios.
|
||||
The exact-commit Linux gate at `a5b687f` passed race, recovery stress, and
|
||||
external syscall validation. The deterministic syscall probes observed five
|
||||
`pwrite64` calls for eight concurrent same-lane writes and three `pread64`
|
||||
calls while recycling 224 records. In the same 3000-iteration run, four-writer
|
||||
16-block batches reached `116.95 MiB/s` versus legacy `80.00 MiB/s`, but 4 KiB
|
||||
writes reached only `49.79 MiB/s` for one writer and `39.25 MiB/s` for four,
|
||||
versus legacy `107.85 MiB/s` and `104.08 MiB/s`.
|
||||
|
||||
The batch path therefore improved, but the candidate did not meet the
|
||||
single-writer or four-writer scaling thresholds:
|
||||
`performance_claim_allowed=false`. `parallel-walstore` remains opt-in and must
|
||||
not be described as a default-backend or general performance improvement.
|
||||
@@ -1,6 +1,6 @@
|
||||
# Current Plan: Phase 167 Parallel Write Engine Milestone
|
||||
|
||||
Status: active design and implementation milestone.
|
||||
Status: closed as an opt-in experimental backend; not promoted to default.
|
||||
|
||||
Phase 166 NVMe/RDMA multipath reconnect is implemented but remains open because
|
||||
its honest live gate needs a third RoCE-capable Kubernetes initiator. That
|
||||
@@ -151,6 +151,37 @@ into bounded 1 MiB positioned writes. This is simpler than a new Linux-only
|
||||
backend, preserves the established WAL/header protocol, and gives a direct
|
||||
gate metric (`checkpoint_write_ops`) before any `io_uring` decision.
|
||||
|
||||
The final D4 execution slice at exact commit `a5b687f` also:
|
||||
|
||||
- queues same-lane appends behind one ordered drainer and combines adjacent
|
||||
physical ring slots into bounded positioned writes;
|
||||
- splits batches at ring wrap and proves both crash/reopen success and
|
||||
fail-closed behavior when the second physical chunk fails;
|
||||
- combines recycle verification reads into bounded chunks while still
|
||||
decoding and CRC-checking every record;
|
||||
- validates the syscall reductions independently with Linux `strace`, not
|
||||
only product counters.
|
||||
|
||||
The exact m02 gate passed Linux race, the 50x recovery/corruption matrix, Helm
|
||||
lint, and external syscall checks. The deterministic probes observed
|
||||
`5 pwrite64` calls for eight concurrent same-lane writes and `3 pread64` calls
|
||||
while recycling 224 records. The same-run performance result was:
|
||||
|
||||
| Shape | Candidate | Legacy | Decision |
|
||||
|---|---:|---:|---|
|
||||
| 4 KiB, 1 writer | 49.79 MiB/s | 107.85 MiB/s | reject promotion |
|
||||
| 4 KiB, 4 writers | 39.25 MiB/s | 104.08 MiB/s | reject promotion |
|
||||
| 16-block batch, 4 writers | 116.95 MiB/s | 80.00 MiB/s | useful opt-in gain |
|
||||
|
||||
The ordinary-write single-writer ratio was `0.462` and four-writer scaling was
|
||||
`0.788`, so `performance_claim_allowed=false`. D5/D6 RF3 and mounted promotion
|
||||
gates were intentionally not claimed: running them cannot repair a candidate
|
||||
that already fails its local admission threshold. The implemented backend and
|
||||
ordered replication work remain opt-in research foundations. The next engine
|
||||
milestone may prototype Linux native asynchronous submission now that
|
||||
checkpoint and recycle syscall amplification have been removed, but it must
|
||||
retain the positioned-I/O fallback and the same correctness gates.
|
||||
|
||||
## Assumptions And Boundaries
|
||||
|
||||
- `walstore` remains the default backend until the candidate passes the full
|
||||
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
# Phase 167 D4 Linux WAL Execution QA Sign-off
|
||||
|
||||
Status: PASS for correctness and evidence; NOT PROMOTED for performance.
|
||||
|
||||
Source commit: `a5b687f`
|
||||
|
||||
Host: m02, Linux amd64, Go 1.25, 13th Gen Intel Core i5-13400.
|
||||
|
||||
## Scope
|
||||
|
||||
This gate validates the opt-in `parallel-walstore` execution changes:
|
||||
|
||||
- bounded checkpoint writes;
|
||||
- ordered same-lane WAL append batching;
|
||||
- ring-wrap split and failure behavior;
|
||||
- bounded WAL recycle reads with per-record CRC validation;
|
||||
- same-run candidate and legacy performance evidence.
|
||||
|
||||
It does not change the default backend and does not make an RF3 or mounted
|
||||
performance claim.
|
||||
|
||||
## Correctness
|
||||
|
||||
The exact-commit Linux race run passed:
|
||||
|
||||
```text
|
||||
core/storage/parallelwal PASS
|
||||
core/storage PASS
|
||||
core/recovery PASS
|
||||
core/transport PASS
|
||||
```
|
||||
|
||||
The product gate passed affected packages, Helm lint, and the 50x focused
|
||||
matrix. The focused matrix includes:
|
||||
|
||||
- contiguous global LSN publication across lanes;
|
||||
- Sync admission fencing;
|
||||
- lower-LSN failure and terminal append drain;
|
||||
- same-lane append coalescing;
|
||||
- ring-wrap batch crash/reopen;
|
||||
- second ring chunk failure remaining non-durable;
|
||||
- recycle-time CRC corruption rejection;
|
||||
- dual-header fallback and recycled-slot fallback;
|
||||
- rebuild COW extent commit and rollback.
|
||||
|
||||
Independent review verdict: ACCEPT, no ordering, lock, close/recovery, or ring
|
||||
accounting blocker.
|
||||
|
||||
## Independent Syscall Evidence
|
||||
|
||||
The gate compiles a test binary and runs deterministic tests under Linux
|
||||
`strace`:
|
||||
|
||||
```text
|
||||
external_syscall_validation=strace
|
||||
external_append_pwrite_calls=5
|
||||
external_recycle_pread_calls=3
|
||||
```
|
||||
|
||||
The append probe submits eight concurrent same-lane writes. The recycle probe
|
||||
recycles 224 records while still decoding and CRC-checking each record. These
|
||||
counts independently corroborate the internal `wal_write_ops` and
|
||||
`recycle_read_ops` diagnostics.
|
||||
|
||||
An additional 48000-record batch profile observed about 7900 `pwrite64` calls
|
||||
and 190 `pread64` calls. Before recycle-read coalescing, the same shape issued
|
||||
about 47746 `pread64` calls.
|
||||
|
||||
## Same-run Performance
|
||||
|
||||
The exact 3000-iteration release gate reported:
|
||||
|
||||
| Workload | Candidate | Legacy | Ratio |
|
||||
|---|---:|---:|---:|
|
||||
| 4 KiB, 1 writer | 49.79 MiB/s | 107.85 MiB/s | 0.462 |
|
||||
| 4 KiB, 4 writers | 39.25 MiB/s | 104.08 MiB/s | 0.377 |
|
||||
| 16-block batch, 4 writers | 116.95 MiB/s | 80.00 MiB/s | 1.462 |
|
||||
|
||||
Candidate four-writer scaling for 4 KiB writes was `0.788x`. The batch run
|
||||
combined 48000 records into 8281 WAL writes and 188 recycle reads.
|
||||
|
||||
## Verdict
|
||||
|
||||
The execution changes are correct and materially reduce checkpoint, append,
|
||||
and recycle syscall amplification for batched writes. They do not establish a
|
||||
general throughput improvement: the 4 KiB path fails both the single-writer
|
||||
regression limit and the four-writer scaling requirement.
|
||||
|
||||
`parallel-walstore` remains opt-in. `walstore` remains the default. RF3 and
|
||||
mounted promotion claims are withheld. The next eligible experiment is a
|
||||
Linux native asynchronous submission backend with a tested positioned-I/O
|
||||
fallback; it must beat this exact same-run control before retention.
|
||||
|
||||
The gate did not deploy Kubernetes resources or modify the k3s lab.
|
||||
Reference in new issue
Block a user