phase139: classify wal append batch shape

This commit is contained in:
pingqiu committed 2026-07-06 13:55:11 -07:00
1 parent 0c974eb30b
commit f18e0b6536
13 files changed
+662 -60

No files matched your search

@@ -422,6 +422,12 @@ func TestDurableProvider_DurableStatuses_ReportWriteBatchProfile(t *testing.T) {
if prof.BackendStorageBatchCalls != 1 || prof.BackendStorageBatchBlocks != 2 {
t.Fatalf("backend batch profile mismatch: %+v", prof)
}
if prof.BackendWriteRequestOps == 0 || prof.BackendWriteRequestMaxBytes == 0 {
t.Fatalf("backend write request profile missing: %+v", prof)
}
if prof.BackendFullBlockBatchCalls != 1 || prof.BackendFullBlockBatchBlocks != 2 || prof.BackendFullBlockBatchMax != 2 {
t.Fatalf("backend full-block batch shape profile mismatch: %+v", prof)
}
if impl == durable.ImplWALStore {
if prof.WALCopyOps == 0 || prof.WALCopyBytes == 0 || prof.WALCopyDurationNanos == 0 {
t.Fatalf("WAL copy profile missing: %+v", prof)
@@ -405,6 +405,7 @@ func (b *StorageBackend) Write(ctx context.Context, offset int64, p []byte) (int
if len(p) == 0 {
return 0, nil
}
b.profile.recordBackendWriteRequest(len(p))
start := time.Now()
n, err := b.writeBytes(ctx, offset, p)
if n > 0 {
@@ -594,6 +595,7 @@ func (b *StorageBackend) writeFullBlockBatch(ctx context.Context, startLBA uint3
lsns, err := batcher.WriteBatch(startLBA, blocks)
if len(lsns) > 0 {
b.profile.recordBackendStorageWrite(len(lsns), true)
b.profile.recordBackendFullBlockBatch(len(lsns))
}
for i, lsn := range lsns {
block := blocks[i]
@@ -12,6 +12,9 @@ type WriteProfileStatus struct {
TargetWriteOps uint64
TargetWriteBytes uint64
TargetWriteDurationNanos uint64
BackendWriteRequestOps uint64
BackendWriteRequestBytes uint64
BackendWriteRequestMaxBytes uint64
BackendWriteOps uint64
BackendWriteBytes uint64
BackendWriteDurationNanos uint64
@@ -19,6 +22,9 @@ type WriteProfileStatus struct {
BackendStorageWriteBlocks uint64
BackendStorageBatchCalls uint64
BackendStorageBatchBlocks uint64
BackendFullBlockBatchCalls uint64
BackendFullBlockBatchBlocks uint64
BackendFullBlockBatchMax uint64
WALCopyOps uint64
WALCopyBytes uint64
WALCopyDurationNanos uint64
@@ -46,6 +52,9 @@ type writeProfile struct {
targetWriteOps atomic.Uint64
targetWriteBytes atomic.Uint64
targetWriteDurationNanos atomic.Uint64
backendWriteRequestOps atomic.Uint64
backendWriteRequestBytes atomic.Uint64
backendWriteRequestMax atomic.Uint64
backendWriteOps atomic.Uint64
backendWriteBytes atomic.Uint64
backendWriteDurationNanos atomic.Uint64
@@ -53,6 +62,9 @@ type writeProfile struct {
backendStorageWriteBlocks atomic.Uint64
backendStorageBatchCalls atomic.Uint64
backendStorageBatchBlocks atomic.Uint64
backendFullBatchCalls atomic.Uint64
backendFullBatchBlocks atomic.Uint64
backendFullBatchMax atomic.Uint64
backendSyncOps atomic.Uint64
backendSyncDurationNanos atomic.Uint64
}
@@ -75,6 +87,16 @@ func (p *writeProfile) recordBackendWrite(bytes int, d time.Duration) {
p.backendWriteDurationNanos.Add(durationNanos(d))
}
func (p *writeProfile) recordBackendWriteRequest(bytes int) {
if bytes <= 0 {
return
}
v := uint64(bytes)
p.backendWriteRequestOps.Add(1)
p.backendWriteRequestBytes.Add(v)
updateMax(&p.backendWriteRequestMax, v)
}
func (p *writeProfile) recordBackendStorageWrite(blocks int, batched bool) {
if blocks <= 0 {
return
@@ -87,11 +109,30 @@ func (p *writeProfile) recordBackendStorageWrite(blocks int, batched bool) {
}
}
func (p *writeProfile) recordBackendFullBlockBatch(blocks int) {
if blocks <= 0 {
return
}
v := uint64(blocks)
p.backendFullBatchCalls.Add(1)
p.backendFullBatchBlocks.Add(v)
updateMax(&p.backendFullBatchMax, v)
}
func (p *writeProfile) recordBackendSync(d time.Duration) {
p.backendSyncOps.Add(1)
p.backendSyncDurationNanos.Add(durationNanos(d))
}
func updateMax(dst *atomic.Uint64, v uint64) {
for {
old := dst.Load()
if v <= old || dst.CompareAndSwap(old, v) {
return
}
}
}
func durationNanos(d time.Duration) uint64 {
if d <= 0 {
return 1
@@ -104,17 +145,23 @@ func (p *writeProfile) snapshot() WriteProfileStatus {
return WriteProfileStatus{}
}
return WriteProfileStatus{
TargetWriteOps: p.targetWriteOps.Load(),
TargetWriteBytes: p.targetWriteBytes.Load(),
TargetWriteDurationNanos: p.targetWriteDurationNanos.Load(),
BackendWriteOps: p.backendWriteOps.Load(),
BackendWriteBytes: p.backendWriteBytes.Load(),
BackendWriteDurationNanos: p.backendWriteDurationNanos.Load(),
BackendStorageWriteCalls: p.backendStorageWriteCalls.Load(),
BackendStorageWriteBlocks: p.backendStorageWriteBlocks.Load(),
BackendStorageBatchCalls: p.backendStorageBatchCalls.Load(),
BackendStorageBatchBlocks: p.backendStorageBatchBlocks.Load(),
BackendSyncOps: p.backendSyncOps.Load(),
BackendSyncDurationNanos: p.backendSyncDurationNanos.Load(),
TargetWriteOps: p.targetWriteOps.Load(),
TargetWriteBytes: p.targetWriteBytes.Load(),
TargetWriteDurationNanos: p.targetWriteDurationNanos.Load(),
BackendWriteRequestOps: p.backendWriteRequestOps.Load(),
BackendWriteRequestBytes: p.backendWriteRequestBytes.Load(),
BackendWriteRequestMaxBytes: p.backendWriteRequestMax.Load(),
BackendWriteOps: p.backendWriteOps.Load(),
BackendWriteBytes: p.backendWriteBytes.Load(),
BackendWriteDurationNanos: p.backendWriteDurationNanos.Load(),
BackendStorageWriteCalls: p.backendStorageWriteCalls.Load(),
BackendStorageWriteBlocks: p.backendStorageWriteBlocks.Load(),
BackendStorageBatchCalls: p.backendStorageBatchCalls.Load(),
BackendStorageBatchBlocks: p.backendStorageBatchBlocks.Load(),
BackendFullBlockBatchCalls: p.backendFullBatchCalls.Load(),
BackendFullBlockBatchBlocks: p.backendFullBatchBlocks.Load(),
BackendFullBlockBatchMax: p.backendFullBatchMax.Load(),
BackendSyncOps: p.backendSyncOps.Load(),
BackendSyncDurationNanos: p.backendSyncDurationNanos.Load(),
}
}
@@ -80,6 +80,7 @@ The supported-lab claim is intentionally narrow:
| 136 | WAL append/copy/checksum profile and backend-internal bottleneck classification | PASS |
| 137 | WAL record encode/copy reduction and next append-shape bottleneck classification | PASS |
| 138 | WAL append write-at shape profile and small-write classification | PASS |
| 139 | WAL append batch-shape analysis and frontend-request-limited classification | PASS |
Key QA sign-offs:
@@ -102,6 +103,7 @@ Key QA sign-offs:
- `internal/docs/qa-assignments/phase136-wal-append-copy-checksum-profile-qa-signoff.md`
- `internal/docs/qa-assignments/phase137-reduce-wal-record-encode-copy-qa-signoff.md`
- `internal/docs/qa-assignments/phase138-wal-writeat-shape-profile-qa-signoff.md`
- `internal/docs/qa-assignments/phase139-wal-append-batch-shape-coalescing-qa-signoff.md`
## Performance Baseline
@@ -340,6 +342,25 @@ The write-at shape is many small writes of about 33KB, with negligible
wrap/padding. This keeps the next work inside WAL batching/coalescing rather
than transport work.
Phase 139 proved that the 33KB shape is coming from the frontend request path:
```text
phase139_wal_append_batch_shape_coalescing_status=ok
backend_write_request_max_bytes=32768
backend_write_request_avg_bytes=32723
backend_full_block_batch_max=8
backend_full_block_batch_avg=7
wal_append_writeat_max_bytes=33072
wal_append_writeat_avg_bytes=33012
phase139_shape_result=frontend_request_limited
post_phase139_bottleneck=wal_append_small_writes
next_recommendation=phase140_frontend_request_size_profile
cleanup_status=ok
```
This keeps the next experiment at the frontend/NVMe request-size seam. It is
still not a transport, RoCE, NVMe/RDMA, or production throughput/SLO claim.
Phase 127 closes the source/component side of the ANA Change Notice gap:
```text
+8
View File
@@ -786,6 +786,14 @@ Recommended order from here:
`wal_append_writeat_max_bytes=33072`, with only 8 wraps and 13KB padding.
The append bottleneck is therefore small-write/coalescing shape, not
wrap/padding or NVMe/RDMA.
97. Phase 139: WAL Append Batch Shape Coalescing. **Closed 2026-07-06,
runner PASS**
Added upstream write-shape counters and proved the 33KB WAL write-at shape
is frontend-request-limited: `backend_write_request_max_bytes=32768`,
`backend_full_block_batch_max=8`, and
`wal_append_writeat_max_bytes=33072`. The WAL writer is coalescing the
batch it receives; the next evidence-backed phase is frontend/NVMe request
size profiling rather than speculative cross-request WAL buffering.
The internal release-train contract is
`internal/docs/ref/operation-layer-v0.5-release-train.md`. Phases 41-44 close
+41 -48
View File
@@ -1,39 +1,40 @@
# Current Plan: Phase 139 WAL Append Batch Shape Coalescing
# Current Plan: Phase 140 Frontend Request Size Profile
Status: planning.
Phase 138 split the WAL append/write-at shape:
Phase 139 proved the WAL append small-write shape is imposed by the frontend
request size:
```text
phase138_wal_writeat_shape_profile_status=ok
phase139_wal_append_batch_shape_coalescing_status=ok
target_write_observed=true
backend_write_bytes=588075008
backend_storage_batch_calls=17953
backend_storage_batch_blocks=143555
backend_write_request_max_bytes=32768
backend_write_request_avg_bytes=32723
backend_full_block_batch_max=8
backend_full_block_batch_avg=7
backend_storage_batching_effective=true
wal_append_duration_ms=380
wal_append_writeat_calls=17979
wal_append_writeat_bytes=593543918
wal_append_writeat_max_bytes=33072
wal_append_writeat_avg_bytes=33013
wal_append_wrap_count=8
wal_append_padding_bytes=13136
post_phase138_bottleneck=wal_append_small_writes
next_recommendation=phase139_wal_append_batch_shape_coalescing
wal_append_writeat_avg_bytes=33012
phase139_shape_result=frontend_request_limited
post_phase139_bottleneck=wal_append_small_writes
next_recommendation=phase140_frontend_request_size_profile
cleanup_status=ok
```
This means the next useful work is still not NVMe/RDMA. The WAL writer is
issuing many small pwrite calls around 33KB; the next phase should explain or
improve the batch/coalescing shape feeding `walWriter.appendBatch`.
coalescing the 8-block batch it receives; the next phase should inspect why the
frontend/NVMe path is delivering 32KB requests and whether that request size is
configurable, host-driven, or product-limited.
## Goal
```text
mounted NVMe/TCP write still reaches durable backend
-> backend batching remains active
-> WAL append write-at average/max size improves or the upstream request shape is named
-> write-at calls per MiB decrease or are explained by frontend request shape
-> frontend target write request size is visible
-> StorageBackend write request size is visible
-> NVMe command / host request shape is visible or explicitly unavailable
-> request-size owner is named
-> no WAL recovery semantics are weakened
-> next bottleneck is named from counters after the change
-> cleanup remains clean
@@ -42,25 +43,20 @@ mounted NVMe/TCP write still reaches durable backend
## Required Evidence
```text
phase139_wal_append_batch_shape_coalescing_status=ok
phase140_frontend_request_size_profile_status=ok
frontend_transport=tcp
roce_claim_allowed=false
nvme_rdma_claim_allowed=false
performance_slo_claim_allowed=false
target_write_observed=true
backend_storage_batching_effective=true
wal_append_ops=<count>
wal_append_bytes=<bytes>
wal_append_duration_ms=<duration>
wal_append_writeat_calls=<count>
wal_append_writeat_bytes=<bytes>
wal_append_writeat_max_bytes=<bytes>
wal_append_writeat_avg_bytes=<bytes>
phase138_wal_append_writeat_avg_bytes=33013
phase138_wal_append_writeat_max_bytes=33072
phase138_wal_append_writeat_calls=17979
phase139_shape_result=<improved|frontend_request_limited|blocked>
post_phase139_bottleneck=<wal_append_small_writes|wal_append_syscall|wal_encode|wal_checksum|dirty_map|unknown>
target_write_request_max_bytes=<bytes>
target_write_request_avg_bytes=<bytes>
backend_write_request_max_bytes=32768
backend_full_block_batch_max=8
frontend_request_size_owner=<host_nvme|target_limit|backend_limit|unknown>
phase140_shape_result=<host_limited|target_limited|backend_limited|tunable|unknown>
post_phase140_bottleneck=<frontend_request_size|wal_append_small_writes|wal_append_syscall|wal_encode|unknown>
next_recommendation=<specific next phase>
cleanup_status=ok
```
@@ -74,26 +70,23 @@ cleanup_status=ok
cuFile/cuObject, or NIXL.
- Do not weaken WAL recovery semantics: every write still needs an LSN and a
recoverable record.
- Keep the scope inside WAL batch/coalescing shape and the upstream full-block
write run shape.
- Keep the scope to request-size evidence unless a one-line product limit is
found.
## Candidate Work
1. Inspect the upstream write request size reaching `StorageBackend.writeBytes`
and `WriteBatch`.
2. If the frontend/request shape only feeds 8 full blocks at a time, surface
that as the limiting shape instead of guessing in `walWriter`.
3. If the backend can safely coalesce multiple adjacent batches without
changing ack/recovery semantics, implement the smallest bounded coalescing
step and gate it.
4. Add a Phase 139 wrapper/scenario that compares write-at average/max size and
calls against Phase 138.
5. If coalescing is blocked by frontend request shape, close with an explicit
`frontend_request_limited` result and a concrete next phase.
1. Add target-side request-size counters if they are missing before
`StorageBackend.Write`.
2. Compare target request size with backend request size.
3. Inspect the NVMe command/request shape the target receives, if available.
4. If a product-side cap causes 32KB requests, make it explicit and gate any
safe increase.
5. If the host/NVMe initiator chooses 32KB, close with `host_limited` and stop
optimizing WAL coalescing for this benchmark shape.
## Exit Criteria
Phase 139 can close when the live supported-lab gate either improves the
write-at shape or proves the current 33KB shape is imposed by frontend request
size. The close report must name the next bottleneck from product-owned
counters and keep cleanup clean.
Phase 140 can close when the live supported-lab gate names the owner of the
32KB frontend request shape and cleanup is clean. If the shape is host-driven,
the close report should stop this WAL coalescing thread and recommend either a
host/request-size experiment or a different backend bottleneck.
@@ -0,0 +1,64 @@
# Phase 139 Finished Plan: WAL Append Batch Shape Coalescing
Status: **closed 2026-07-06, live gate PASS**.
## Problem
Phase 138 showed WAL append/write-at calls were small: about 33KB average and
max write size. The open question was whether this was a WAL writer coalescing
gap or whether the frontend only delivered small write requests to the durable
backend.
## Work
Phase 139 added product-owned upstream write-shape counters:
- backend write request ops/bytes/max/average bytes;
- full-block batch calls/blocks/max/average blocks.
It did not add cross-request buffering or delayed ACK behavior. That would be a
semantic change because each frontend `Write` currently returns after its WAL
append and observer path.
## Gate
Phase 139 added:
- `scripts/run-phase139-wal-append-batch-shape-coalescing-gate.sh`
- `testops/scenarios/nvme-tcp-wal-append-batch-shape-coalescing-chain.yaml`
The gate reruns the 512MiB mounted NVMe/TCP profile, requires active backend
batching, compares the Phase 138 WAL write-at shape, and classifies whether the
shape improved, is frontend-request-limited, or is blocked.
## Evidence
```text
phase139_wal_append_batch_shape_coalescing_status=ok
backend_write_request_max_bytes=32768
backend_write_request_avg_bytes=32723
backend_full_block_batch_max=8
backend_full_block_batch_avg=7
wal_append_writeat_max_bytes=33072
wal_append_writeat_avg_bytes=33012
wal_append_writeat_calls=17979
phase139_shape_result=frontend_request_limited
post_phase139_bottleneck=wal_append_small_writes
next_recommendation=phase140_frontend_request_size_profile
cleanup_status=ok
```
Run bundle:
```text
results\20260706-134824-6806
22 actions: 22 passed, 0 failed
```
## Conclusion
The WAL writer is not failing to coalesce a larger available run; it receives
8-block / 32KB backend requests from the frontend path. Phase 140 should inspect
the frontend/NVMe request-size shape before changing WAL append semantics. This
remains source/lab evidence, not a published performance, RoCE, or NVMe/RDMA
claim.
@@ -435,6 +435,12 @@ rebuild, delete safety, or cleanup must start as a separate gated phase.
`wal_append_writeat_avg_bytes=33013`, and
`wal_append_writeat_max_bytes=33072`, while wrap/padding was negligible. The
next backend work should inspect batch/coalescing shape.
- Phase 139 is closed for WAL append batch-shape coalescing analysis. The live
gate proved the 33KB write-at shape is imposed upstream:
`backend_write_request_max_bytes=32768`,
`backend_full_block_batch_max=8`, and
`wal_append_writeat_max_bytes=33072`. The next work should inspect frontend
request size before changing WAL append semantics.
- Later protocol candidates: complete a real NVMe/RDMA target, characterize
NVMe/TCP performance, or bridge to object/NIXL acceleration where the product
surface is object/storage rather than block PVC. Keep these separate so
@@ -1054,6 +1060,8 @@ Approximate engineering effort if scope remains tight:
`wal_append` / write-at shape as the next backend step.
- Phase 138 is closed for WAL write-at shape profiling and names small
write/coalescing shape as the next backend step.
- Phase 139 is closed for WAL append batch-shape analysis and names frontend
request size as the next backend/frontend seam to inspect.
- Phase 41-44 are the Operation Layer v0.5 release train: lifecycle-owner
foundation, real API/admission proof, first bounded finalizer mutation, and
delete lifecycle close gate.
@@ -0,0 +1,91 @@
# Phase 139 WAL Append Batch Shape Coalescing QA Sign-Off
Verdict: **PASS**.
Validated source tree: local `phase139-wal-append-batch-shape` working tree,
synced to `m02:/tmp/seaweed_block` as clean `HEAD` plus Phase 139 overlay only.
The known unrelated dirty NVMe files were not copied into the lab tree.
Run:
```powershell
C:\work\swblock.exe run testops/scenarios/nvme-tcp-wal-append-batch-shape-coalescing-chain.yaml `
-output results\phase139-batch-shape-run1.json `
-html results\phase139-batch-shape-run1.html
```
Run bundle:
```text
results\20260706-134824-6806
22 actions: 22 passed, 0 failed
```
## Evidence
```text
phase139_wal_append_batch_shape_coalescing_status=ok
frontend_transport=tcp
roce_claim_allowed=false
nvme_rdma_claim_allowed=false
performance_slo_claim_allowed=false
profile_size_mib=512
phase138_wal_append_writeat_avg_bytes=33013
phase138_wal_append_writeat_max_bytes=33072
phase138_wal_append_writeat_calls=17979
unit_batch_shape_regression_passed=true
target_write_observed=true
target_write_bytes=588066816
backend_write_bytes=588066816
backend_write_request_ops=17971
backend_write_request_bytes=588066816
backend_write_request_max_bytes=32768
backend_write_request_avg_bytes=32723
backend_storage_batch_calls=17952
backend_storage_batch_blocks=143552
backend_full_block_batch_calls=17952
backend_full_block_batch_blocks=143552
backend_full_block_batch_max=8
backend_full_block_batch_avg=7
wal_append_ops=17979
wal_append_bytes=593535650
wal_append_duration_ms=379
wal_append_writeat_calls=17979
wal_append_writeat_bytes=593535650
wal_append_writeat_max_bytes=33072
wal_append_writeat_avg_bytes=33012
wal_copy_duration_ms=93
wal_encode_duration_ms=269
wal_checksum_duration_ms=110
dirty_map_update_duration_ms=76
backend_storage_batching_effective=true
phase139_shape_result=frontend_request_limited
post_phase139_bottleneck=wal_append_small_writes
next_recommendation=phase140_frontend_request_size_profile
cleanup_status=ok
```
## Finding
The 33KB WAL write-at shape is imposed by the frontend request shape:
- `backend_write_request_max_bytes=32768`.
- `backend_full_block_batch_max=8`.
- `wal_append_writeat_max_bytes=33072`, which is 8 WAL records with fixed
per-record overhead.
The WAL writer is coalescing each received batch correctly. Larger coalescing
inside the WAL writer would require holding multiple frontend `Write` calls
open or changing ACK timing, so this phase correctly closes as
`frontend_request_limited` rather than forcing a speculative backend buffer.
The next phase should profile or adjust frontend request size. This phase does
not claim a performance SLO, RoCE, or NVMe/RDMA.
## Cleanup
The gate reused the Phase 126 cleanup verifier and finished clean:
```text
cleanup_status=ok
```
@@ -189,6 +189,10 @@ profile = field(vols[0], "WriteProfile", "writeProfile", default={}) or {}
target_ops = int(field(profile, "TargetWriteOps", "targetWriteOps", default=0) or 0)
target_bytes = int(field(profile, "TargetWriteBytes", "targetWriteBytes", default=0) or 0)
target_ns = int(field(profile, "TargetWriteDurationNanos", "targetWriteDurationNanos", default=0) or 0)
backend_write_request_ops = int(field(profile, "BackendWriteRequestOps", "backendWriteRequestOps", default=0) or 0)
backend_write_request_bytes = int(field(profile, "BackendWriteRequestBytes", "backendWriteRequestBytes", default=0) or 0)
backend_write_request_max_bytes = int(field(profile, "BackendWriteRequestMaxBytes", "backendWriteRequestMaxBytes", default=0) or 0)
backend_write_request_avg_bytes = int(backend_write_request_bytes / backend_write_request_ops) if backend_write_request_ops else 0
backend_ops = int(field(profile, "BackendWriteOps", "backendWriteOps", default=0) or 0)
backend_bytes = int(field(profile, "BackendWriteBytes", "backendWriteBytes", default=0) or 0)
backend_ns = int(field(profile, "BackendWriteDurationNanos", "backendWriteDurationNanos", default=0) or 0)
@@ -196,6 +200,10 @@ backend_storage_write_calls = int(field(profile, "BackendStorageWriteCalls", "ba
backend_storage_write_blocks = int(field(profile, "BackendStorageWriteBlocks", "backendStorageWriteBlocks", default=0) or 0)
backend_storage_batch_calls = int(field(profile, "BackendStorageBatchCalls", "backendStorageBatchCalls", default=0) or 0)
backend_storage_batch_blocks = int(field(profile, "BackendStorageBatchBlocks", "backendStorageBatchBlocks", default=0) or 0)
backend_full_block_batch_calls = int(field(profile, "BackendFullBlockBatchCalls", "backendFullBlockBatchCalls", default=0) or 0)
backend_full_block_batch_blocks = int(field(profile, "BackendFullBlockBatchBlocks", "backendFullBlockBatchBlocks", default=0) or 0)
backend_full_block_batch_max = int(field(profile, "BackendFullBlockBatchMax", "backendFullBlockBatchMax", default=0) or 0)
backend_full_block_batch_avg = int(backend_full_block_batch_blocks / backend_full_block_batch_calls) if backend_full_block_batch_calls else 0
wal_copy_ops = int(field(profile, "WALCopyOps", "walCopyOps", default=0) or 0)
wal_copy_bytes = int(field(profile, "WALCopyBytes", "walCopyBytes", default=0) or 0)
wal_copy_ns = int(field(profile, "WALCopyDurationNanos", "walCopyDurationNanos", default=0) or 0)
@@ -228,6 +236,10 @@ with open(summary_out, "w") as f:
f.write(f"target_write_ops={target_ops}\n")
f.write(f"target_write_bytes={target_bytes}\n")
f.write(f"target_write_duration_ms={ms(target_ns)}\n")
f.write(f"backend_write_request_ops={backend_write_request_ops}\n")
f.write(f"backend_write_request_bytes={backend_write_request_bytes}\n")
f.write(f"backend_write_request_max_bytes={backend_write_request_max_bytes}\n")
f.write(f"backend_write_request_avg_bytes={backend_write_request_avg_bytes}\n")
f.write(f"backend_write_ops={backend_ops}\n")
f.write(f"backend_write_bytes={backend_bytes}\n")
f.write(f"backend_write_duration_ms={ms(backend_ns)}\n")
@@ -235,6 +247,10 @@ with open(summary_out, "w") as f:
f.write(f"backend_storage_write_blocks={backend_storage_write_blocks}\n")
f.write(f"backend_storage_batch_calls={backend_storage_batch_calls}\n")
f.write(f"backend_storage_batch_blocks={backend_storage_batch_blocks}\n")
f.write(f"backend_full_block_batch_calls={backend_full_block_batch_calls}\n")
f.write(f"backend_full_block_batch_blocks={backend_full_block_batch_blocks}\n")
f.write(f"backend_full_block_batch_max={backend_full_block_batch_max}\n")
f.write(f"backend_full_block_batch_avg={backend_full_block_batch_avg}\n")
f.write(f"wal_copy_ops={wal_copy_ops}\n")
f.write(f"wal_copy_bytes={wal_copy_bytes}\n")
f.write(f"wal_copy_duration_ms={ms(wal_copy_ns)}\n")
@@ -124,6 +124,10 @@ TARGET_OBSERVED="$(require_summary_value "${BLOCK_SUMMARY}" target_write_observe
TARGET_OPS="$(require_summary_value "${BLOCK_SUMMARY}" target_write_ops)"
TARGET_BYTES="$(require_summary_value "${BLOCK_SUMMARY}" target_write_bytes)"
TARGET_MS="$(require_summary_value "${BLOCK_SUMMARY}" target_write_duration_ms)"
BACKEND_WRITE_REQUEST_OPS="$(require_summary_value "${BLOCK_SUMMARY}" backend_write_request_ops)"
BACKEND_WRITE_REQUEST_BYTES="$(require_summary_value "${BLOCK_SUMMARY}" backend_write_request_bytes)"
BACKEND_WRITE_REQUEST_MAX_BYTES="$(require_summary_value "${BLOCK_SUMMARY}" backend_write_request_max_bytes)"
BACKEND_WRITE_REQUEST_AVG_BYTES="$(require_summary_value "${BLOCK_SUMMARY}" backend_write_request_avg_bytes)"
BACKEND_OPS="$(require_summary_value "${BLOCK_SUMMARY}" backend_write_ops)"
BACKEND_BYTES="$(require_summary_value "${BLOCK_SUMMARY}" backend_write_bytes)"
BACKEND_MS="$(require_summary_value "${BLOCK_SUMMARY}" backend_write_duration_ms)"
@@ -131,6 +135,10 @@ BACKEND_STORAGE_WRITE_CALLS="$(require_summary_value "${BLOCK_SUMMARY}" backend_
BACKEND_STORAGE_WRITE_BLOCKS="$(require_summary_value "${BLOCK_SUMMARY}" backend_storage_write_blocks)"
BACKEND_STORAGE_BATCH_CALLS="$(require_summary_value "${BLOCK_SUMMARY}" backend_storage_batch_calls)"
BACKEND_STORAGE_BATCH_BLOCKS="$(require_summary_value "${BLOCK_SUMMARY}" backend_storage_batch_blocks)"
BACKEND_FULL_BLOCK_BATCH_CALLS="$(require_summary_value "${BLOCK_SUMMARY}" backend_full_block_batch_calls)"
BACKEND_FULL_BLOCK_BATCH_BLOCKS="$(require_summary_value "${BLOCK_SUMMARY}" backend_full_block_batch_blocks)"
BACKEND_FULL_BLOCK_BATCH_MAX="$(require_summary_value "${BLOCK_SUMMARY}" backend_full_block_batch_max)"
BACKEND_FULL_BLOCK_BATCH_AVG="$(require_summary_value "${BLOCK_SUMMARY}" backend_full_block_batch_avg)"
WAL_COPY_OPS="$(require_summary_value "${BLOCK_SUMMARY}" wal_copy_ops)"
WAL_COPY_BYTES="$(require_summary_value "${BLOCK_SUMMARY}" wal_copy_bytes)"
WAL_COPY_MS="$(require_summary_value "${BLOCK_SUMMARY}" wal_copy_duration_ms)"
@@ -161,9 +169,15 @@ fi
assert_int_ge "${TARGET_OPS}" 1 "target_write_ops"
assert_int_ge "${BACKEND_OPS}" 1 "backend_write_ops"
assert_int_ge "${TARGET_BYTES}" "${SEQ_BYTES}" "target_write_bytes"
assert_int_ge "${BACKEND_WRITE_REQUEST_OPS}" 1 "backend_write_request_ops"
assert_int_ge "${BACKEND_WRITE_REQUEST_BYTES}" "${SEQ_BYTES}" "backend_write_request_bytes"
assert_int_ge "${BACKEND_WRITE_REQUEST_MAX_BYTES}" 1 "backend_write_request_max_bytes"
assert_int_ge "${BACKEND_BYTES}" "${SEQ_BYTES}" "backend_write_bytes"
assert_int_ge "${BACKEND_STORAGE_WRITE_CALLS}" 1 "backend_storage_write_calls"
assert_int_ge "${BACKEND_STORAGE_WRITE_BLOCKS}" 1 "backend_storage_write_blocks"
assert_int_ge "${BACKEND_FULL_BLOCK_BATCH_CALLS}" 1 "backend_full_block_batch_calls"
assert_int_ge "${BACKEND_FULL_BLOCK_BATCH_BLOCKS}" 1 "backend_full_block_batch_blocks"
assert_int_ge "${BACKEND_FULL_BLOCK_BATCH_MAX}" 1 "backend_full_block_batch_max"
assert_int_ge "${WAL_COPY_OPS}" 1 "wal_copy_ops"
assert_int_ge "${WAL_ENCODE_OPS}" 1 "wal_encode_ops"
assert_int_ge "${WAL_CHECKSUM_OPS}" 1 "wal_checksum_ops"
@@ -188,6 +202,10 @@ write_summary "target_write_observed=${TARGET_OBSERVED}"
write_summary "target_write_bytes=${TARGET_BYTES}"
write_summary "target_write_ops=${TARGET_OPS}"
write_summary "target_write_duration_ms=${TARGET_MS}"
write_summary "backend_write_request_ops=${BACKEND_WRITE_REQUEST_OPS}"
write_summary "backend_write_request_bytes=${BACKEND_WRITE_REQUEST_BYTES}"
write_summary "backend_write_request_max_bytes=${BACKEND_WRITE_REQUEST_MAX_BYTES}"
write_summary "backend_write_request_avg_bytes=${BACKEND_WRITE_REQUEST_AVG_BYTES}"
write_summary "backend_write_bytes=${BACKEND_BYTES}"
write_summary "backend_write_ops=${BACKEND_OPS}"
write_summary "backend_write_duration_ms=${BACKEND_MS}"
@@ -195,6 +213,10 @@ write_summary "backend_storage_write_calls=${BACKEND_STORAGE_WRITE_CALLS}"
write_summary "backend_storage_write_blocks=${BACKEND_STORAGE_WRITE_BLOCKS}"
write_summary "backend_storage_batch_calls=${BACKEND_STORAGE_BATCH_CALLS}"
write_summary "backend_storage_batch_blocks=${BACKEND_STORAGE_BATCH_BLOCKS}"
write_summary "backend_full_block_batch_calls=${BACKEND_FULL_BLOCK_BATCH_CALLS}"
write_summary "backend_full_block_batch_blocks=${BACKEND_FULL_BLOCK_BATCH_BLOCKS}"
write_summary "backend_full_block_batch_max=${BACKEND_FULL_BLOCK_BATCH_MAX}"
write_summary "backend_full_block_batch_avg=${BACKEND_FULL_BLOCK_BATCH_AVG}"
write_summary "wal_copy_ops=${WAL_COPY_OPS}"
write_summary "wal_copy_bytes=${WAL_COPY_BYTES}"
write_summary "wal_copy_duration_ms=${WAL_COPY_MS}"
@@ -0,0 +1,205 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="${1:-$(pwd)}"
ARTIFACT_DIR="${SW_BLOCK_ARTIFACT_DIR:-${ROOT}/results/phase139-wal-append-batch-shape-coalescing-gate}"
SUMMARY="${ARTIFACT_DIR}/phase139-wal-append-batch-shape-coalescing-summary.txt"
PHASE126_DIR="${ARTIFACT_DIR}/phase126-profile"
SEQ_MIB="${SW_BLOCK_PHASE139_SEQ_MIB:-512}"
PHASE138_WRITEAT_AVG_BYTES="${SW_BLOCK_PHASE138_WAL_APPEND_WRITEAT_AVG_BYTES:-33013}"
PHASE138_WRITEAT_MAX_BYTES="${SW_BLOCK_PHASE138_WAL_APPEND_WRITEAT_MAX_BYTES:-33072}"
PHASE138_WRITEAT_CALLS="${SW_BLOCK_PHASE138_WAL_APPEND_WRITEAT_CALLS:-17979}"
mkdir -p "${ARTIFACT_DIR}" "${PHASE126_DIR}"
: >"${SUMMARY}"
write_summary() {
echo "$*" | tee -a "${SUMMARY}" >/dev/null
}
summary_value() {
local file="$1"
local key="$2"
awk -F= -v key="$key" '$1 == key {value = substr($0, length(key) + 2)} END {if (value != "") print value}' "$file"
}
require_summary_value() {
local file="$1"
local key="$2"
local value
value="$(summary_value "$file" "$key")"
if [[ -z "${value}" ]]; then
echo "missing summary key ${key} in ${file}" >&2
exit 1
fi
printf '%s' "${value}"
}
assert_int_ge() {
local actual="$1"
local want="$2"
local label="$3"
python3 - "$actual" "$want" "$label" <<'PY'
import sys
actual = int(sys.argv[1])
want = int(sys.argv[2])
label = sys.argv[3]
if actual < want:
raise SystemExit(f"{label}={actual}, want >= {want}")
PY
}
classify_shape_result() {
python3 - "$@" <<'PY'
import sys
writeat_avg = int(sys.argv[1])
writeat_max = int(sys.argv[2])
writeat_calls = int(sys.argv[3])
phase138_avg = int(sys.argv[4])
phase138_max = int(sys.argv[5])
phase138_calls = int(sys.argv[6])
request_max = int(sys.argv[7])
batch_max = int(sys.argv[8])
if request_max <= 32768 and batch_max <= 8:
print("frontend_request_limited")
elif writeat_avg > phase138_avg or writeat_max > phase138_max or writeat_calls < phase138_calls:
print("improved")
else:
print("blocked")
PY
}
classify_next_bottleneck() {
python3 - "$@" <<'PY'
import sys
items = {
"wal_copy": int(sys.argv[1]),
"wal_encode": int(sys.argv[2]),
"wal_checksum": int(sys.argv[3]),
"wal_append_small_writes": int(sys.argv[4]),
"dirty_map": int(sys.argv[5]),
}
name, value = max(items.items(), key=lambda kv: kv[1])
print(name if value > 0 else "unknown")
PY
}
recommendation_for_shape() {
case "$1" in
frontend_request_limited)
printf '%s' "phase140_frontend_request_size_profile"
;;
improved)
printf '%s' "phase140_post_coalescing_retriage"
;;
*)
printf '%s' "phase140_wal_append_coalescing_design"
;;
esac
}
write_summary "phase139_wal_append_batch_shape_coalescing_status=running"
write_summary "frontend_transport=tcp"
write_summary "roce_claim_allowed=false"
write_summary "nvme_rdma_claim_allowed=false"
write_summary "performance_slo_claim_allowed=false"
write_summary "profile_size_mib=${SEQ_MIB}"
write_summary "phase138_wal_append_writeat_avg_bytes=${PHASE138_WRITEAT_AVG_BYTES}"
write_summary "phase138_wal_append_writeat_max_bytes=${PHASE138_WRITEAT_MAX_BYTES}"
write_summary "phase138_wal_append_writeat_calls=${PHASE138_WRITEAT_CALLS}"
cd "${ROOT}"
go test ./core/storage ./core/frontend/durable \
>"${ARTIFACT_DIR}/go-test-storage-durable.log" \
2>&1
write_summary "unit_batch_shape_regression_passed=true"
SW_BLOCK_ARTIFACT_DIR="${PHASE126_DIR}" \
SW_BLOCK_PHASE126_SEQ_MIB="${SEQ_MIB}" \
bash "${ROOT}/scripts/run-phase126-block-nvme-tcp-backend-write-instrumentation-gate.sh" "${ROOT}" \
>"${ARTIFACT_DIR}/phase126-profile.stdout.txt" \
2>"${ARTIFACT_DIR}/phase126-profile.stderr.txt"
PHASE126_SUMMARY="${PHASE126_DIR}/phase126-block-nvme-tcp-backend-write-instrumentation-summary.txt"
if [[ "$(require_summary_value "${PHASE126_SUMMARY}" phase126_block_nvme_tcp_backend_write_instrumentation_status)" != "ok" ]]; then
echo "phase126 profile dependency did not finish ok" >&2
exit 1
fi
TARGET_OBSERVED="$(require_summary_value "${PHASE126_SUMMARY}" target_write_observed)"
BACKEND_STORAGE_BATCH_CALLS="$(require_summary_value "${PHASE126_SUMMARY}" backend_storage_batch_calls)"
BACKEND_WRITE_REQUEST_MAX_BYTES="$(require_summary_value "${PHASE126_SUMMARY}" backend_write_request_max_bytes)"
BACKEND_WRITE_REQUEST_AVG_BYTES="$(require_summary_value "${PHASE126_SUMMARY}" backend_write_request_avg_bytes)"
BACKEND_FULL_BLOCK_BATCH_MAX="$(require_summary_value "${PHASE126_SUMMARY}" backend_full_block_batch_max)"
BACKEND_FULL_BLOCK_BATCH_AVG="$(require_summary_value "${PHASE126_SUMMARY}" backend_full_block_batch_avg)"
WAL_COPY_MS="$(require_summary_value "${PHASE126_SUMMARY}" wal_copy_duration_ms)"
WAL_ENCODE_MS="$(require_summary_value "${PHASE126_SUMMARY}" wal_encode_duration_ms)"
WAL_CHECKSUM_MS="$(require_summary_value "${PHASE126_SUMMARY}" wal_checksum_duration_ms)"
WAL_APPEND_MS="$(require_summary_value "${PHASE126_SUMMARY}" wal_append_duration_ms)"
WAL_APPEND_WRITEAT_CALLS="$(require_summary_value "${PHASE126_SUMMARY}" wal_append_writeat_calls)"
WAL_APPEND_WRITEAT_AVG_BYTES="$(require_summary_value "${PHASE126_SUMMARY}" wal_append_writeat_avg_bytes)"
WAL_APPEND_WRITEAT_MAX_BYTES="$(require_summary_value "${PHASE126_SUMMARY}" wal_append_writeat_max_bytes)"
DIRTY_MAP_UPDATE_MS="$(require_summary_value "${PHASE126_SUMMARY}" dirty_map_update_duration_ms)"
CLEANUP_STATUS="$(require_summary_value "${PHASE126_SUMMARY}" cleanup_status)"
if [[ "${TARGET_OBSERVED}" != "true" ]]; then
echo "target_write_observed=${TARGET_OBSERVED}, want true" >&2
exit 1
fi
assert_int_ge "${BACKEND_STORAGE_BATCH_CALLS}" 1 "backend_storage_batch_calls"
assert_int_ge "${BACKEND_WRITE_REQUEST_MAX_BYTES}" 1 "backend_write_request_max_bytes"
assert_int_ge "${BACKEND_FULL_BLOCK_BATCH_MAX}" 1 "backend_full_block_batch_max"
assert_int_ge "${WAL_APPEND_WRITEAT_CALLS}" 1 "wal_append_writeat_calls"
assert_int_ge "${WAL_APPEND_WRITEAT_AVG_BYTES}" 1 "wal_append_writeat_avg_bytes"
assert_int_ge "${WAL_APPEND_WRITEAT_MAX_BYTES}" 1 "wal_append_writeat_max_bytes"
if [[ "${CLEANUP_STATUS}" != "ok" ]]; then
echo "cleanup_status=${CLEANUP_STATUS}, want ok" >&2
exit 1
fi
PHASE139_SHAPE_RESULT="$(classify_shape_result \
"${WAL_APPEND_WRITEAT_AVG_BYTES}" \
"${WAL_APPEND_WRITEAT_MAX_BYTES}" \
"${WAL_APPEND_WRITEAT_CALLS}" \
"${PHASE138_WRITEAT_AVG_BYTES}" \
"${PHASE138_WRITEAT_MAX_BYTES}" \
"${PHASE138_WRITEAT_CALLS}" \
"${BACKEND_WRITE_REQUEST_MAX_BYTES}" \
"${BACKEND_FULL_BLOCK_BATCH_MAX}")"
POST_PHASE139_BOTTLENECK="$(classify_next_bottleneck "${WAL_COPY_MS}" "${WAL_ENCODE_MS}" "${WAL_CHECKSUM_MS}" "${WAL_APPEND_MS}" "${DIRTY_MAP_UPDATE_MS}")"
NEXT_RECOMMENDATION="$(recommendation_for_shape "${PHASE139_SHAPE_RESULT}")"
for key in \
target_write_observed \
target_write_bytes \
backend_write_bytes \
backend_write_request_ops \
backend_write_request_bytes \
backend_write_request_max_bytes \
backend_write_request_avg_bytes \
backend_storage_batch_calls \
backend_storage_batch_blocks \
backend_full_block_batch_calls \
backend_full_block_batch_blocks \
backend_full_block_batch_max \
backend_full_block_batch_avg \
wal_append_ops \
wal_append_bytes \
wal_append_duration_ms \
wal_append_writeat_calls \
wal_append_writeat_bytes \
wal_append_writeat_max_bytes \
wal_append_writeat_avg_bytes \
wal_copy_duration_ms \
wal_encode_duration_ms \
wal_checksum_duration_ms \
dirty_map_update_duration_ms; do
write_summary "${key}=$(require_summary_value "${PHASE126_SUMMARY}" "${key}")"
done
write_summary "backend_storage_batching_effective=true"
write_summary "phase139_shape_result=${PHASE139_SHAPE_RESULT}"
write_summary "post_phase139_bottleneck=${POST_PHASE139_BOTTLENECK}"
write_summary "next_recommendation=${NEXT_RECOMMENDATION}"
write_summary "cleanup_status=${CLEANUP_STATUS}"
write_summary "phase139_wal_append_batch_shape_coalescing_status=ok"
@@ -0,0 +1,119 @@
name: nvme-tcp-wal-append-batch-shape-coalescing-chain
timeout: 90m
env:
product_root: "/tmp/seaweed_block"
ssh_key: "C:\\work\\dev_server\\testdev_key"
topology:
nodes:
m02:
host: 192.168.1.184
user: testdev
key: "{{ ssh_key }}"
phases:
- name: pre_clean
actions:
- action: pre_run_cleanup
node: m02
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
nvme_disconnect: "true"
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
- action: exec
node: m02
timeout: 5m
cmd: "helm status sw-block --namespace kube-system >/dev/null 2>&1 && helm uninstall sw-block --namespace kube-system --wait --timeout 240s || true; kubectl -n default delete pod sw-block-phase126-block-perf sw-block-phase126-local-perf --ignore-not-found=true --wait=true --timeout=60s || true; kubectl -n default delete pvc sw-block-phase126-block-pvc sw-block-phase126-local-pvc --ignore-not-found=true --wait=true --timeout=60s || true; kubectl delete storageclass sw-block-phase126-block --ignore-not-found=true --wait=true --timeout=60s || true; kubectl get pv --no-headers | awk '/sw-block-phase126/ {print $1}' | xargs -r -n1 kubectl patch pv --type=merge -p '{\"metadata\":{\"finalizers\":[]}}' >/dev/null 2>&1 || true; kubectl get pv --no-headers | awk '/sw-block-phase126/ {print $1}' | xargs -r kubectl delete pv --wait=false >/dev/null 2>&1 || true; kubectl -n kube-system get swblockvolumes.block.seaweedfs.com -o name 2>/dev/null | xargs -r -n1 kubectl -n kube-system patch --type=merge -p '{\"metadata\":{\"finalizers\":[]}}' >/dev/null 2>&1 || true; kubectl -n kube-system delete swblockvolumes.block.seaweedfs.com --all --ignore-not-found=true --wait=true --timeout=60s >/dev/null 2>&1 || true; kubectl -n kube-system delete swblockclusters.block.seaweedfs.com --all --ignore-not-found=true --wait=true --timeout=60s >/dev/null 2>&1 || true; kubectl delete validatingadmissionpolicy,validatingadmissionpolicybinding -l app.kubernetes.io/instance=sw-block --ignore-not-found=true >/dev/null 2>&1 || true; kubectl delete crd swblockclusters.block.seaweedfs.com swblockvolumes.block.seaweedfs.com swblockreplicaeligibilities.block.seaweedfs.com swblockreplicarebuilds.block.seaweedfs.com swblockreplicafailbacks.block.seaweedfs.com swblockfrontendpublications.block.seaweedfs.com --ignore-not-found=true --wait=true --timeout=60s >/dev/null 2>&1 || true; sudo -n nvme disconnect-all >/dev/null 2>&1 || true; rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase139-batch-shape && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase139-batch-shape"
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
- name: run_gate
actions:
- action: exec
node: m02
timeout: 82m
cmd: "cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase139-batch-shape SW_BLOCK_PHASE139_SEQ_MIB=512 SW_BLOCK_PHASE125_FRONTEND_IP_MAP=m01=10.0.0.1,m02=10.0.0.3 SW_BLOCK_PHASE125_EXPECTED_ROUTE_DEV=enp1s0np0 SW_BLOCK_IMPORT_K3S_SSH_KEY=/opt/work/testdev_key bash scripts/run-phase139-wal-append-batch-shape-coalescing-gate.sh {{ product_root }}"
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
- name: assert_summary
actions:
- action: grep_log
node: m02
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase139-batch-shape/phase139-wal-append-batch-shape-coalescing-summary.txt"
pattern: "^phase139_wal_append_batch_shape_coalescing_status=ok$"
save_as: phase139_status_ok
- action: assert_greater
actual: "{{ phase139_status_ok }}"
threshold: "0"
- action: grep_log
node: m02
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase139-batch-shape/phase139-wal-append-batch-shape-coalescing-summary.txt"
pattern: "^unit_batch_shape_regression_passed=true$"
save_as: unit_passed
- action: assert_greater
actual: "{{ unit_passed }}"
threshold: "0"
- action: grep_log
node: m02
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase139-batch-shape/phase139-wal-append-batch-shape-coalescing-summary.txt"
pattern: "^target_write_observed=true$"
save_as: target_observed
- action: assert_greater
actual: "{{ target_observed }}"
threshold: "0"
- action: grep_log
node: m02
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase139-batch-shape/phase139-wal-append-batch-shape-coalescing-summary.txt"
pattern: "^backend_storage_batching_effective=true$"
save_as: batch_effective
- action: assert_greater
actual: "{{ batch_effective }}"
threshold: "0"
- action: grep_log
node: m02
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase139-batch-shape/phase139-wal-append-batch-shape-coalescing-summary.txt"
pattern: "^backend_write_request_max_bytes=[1-9][0-9]*$"
save_as: request_max
- action: assert_greater
actual: "{{ request_max }}"
threshold: "0"
- action: grep_log
node: m02
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase139-batch-shape/phase139-wal-append-batch-shape-coalescing-summary.txt"
pattern: "^backend_full_block_batch_max=[1-9][0-9]*$"
save_as: batch_max
- action: assert_greater
actual: "{{ batch_max }}"
threshold: "0"
- action: grep_log
node: m02
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase139-batch-shape/phase139-wal-append-batch-shape-coalescing-summary.txt"
pattern: "^phase139_shape_result=\\(improved\\|frontend_request_limited\\|blocked\\)$"
save_as: shape_result
- action: assert_greater
actual: "{{ shape_result }}"
threshold: "0"
- action: grep_log
node: m02
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase139-batch-shape/phase139-wal-append-batch-shape-coalescing-summary.txt"
pattern: "^next_recommendation=phase140_"
save_as: recommendation_named
- action: assert_greater
actual: "{{ recommendation_named }}"
threshold: "0"
- action: grep_log
node: m02
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase139-batch-shape/phase139-wal-append-batch-shape-coalescing-summary.txt"
pattern: "^cleanup_status=ok$"
save_as: cleanup_ok
- action: assert_greater
actual: "{{ cleanup_ok }}"
threshold: "0"
- name: collect
always: true
actions:
- action: collect_path
node: m02
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase139-batch-shape"
name: "remote-phases"
ignore_error: true