diff --git a/seaweed-block/core/storage/walstore_fixed_work_test.go b/seaweed-block/core/storage/walstore_fixed_work_test.go index 615a2efe3a..732ff00094 100644 --- a/seaweed-block/core/storage/walstore_fixed_work_test.go +++ b/seaweed-block/core/storage/walstore_fixed_work_test.go @@ -19,7 +19,7 @@ const ( phase173FixedWorkStoreEnv = "SW_BLOCK_PHASE173_STORE_DIR" phase173FixedWorkBlockSize = 4096 - phase173FixedWorkNumBlocks = 131072 + phase173FixedWorkNumBlocks = 65536 phase173FixedWorkRegionBlocks = phase173FixedWorkNumBlocks / 2 ) @@ -87,11 +87,11 @@ func TestPhase173FixedWorkContract(t *testing.T) { if err != nil { t.Fatalf("shape=%s writers=%d: %v", shape, writers, err) } - if cfg.APILogicalBlocks() < 64000 || cfg.APILogicalBlocks() > 65536 { - t.Fatalf("shape=%s logical blocks=%d want [64000,65536]", shape, cfg.APILogicalBlocks()) + if cfg.APILogicalBlocks() < 16000 || cfg.APILogicalBlocks() > 16384 { + t.Fatalf("shape=%s logical blocks=%d want [16000,16384]", shape, cfg.APILogicalBlocks()) } - if cfg.WarmupLogicalBlocks() < 4000 || cfg.WarmupLogicalBlocks() > 4096 { - t.Fatalf("shape=%s warmup logical blocks=%d want [4000,4096]", shape, cfg.WarmupLogicalBlocks()) + if cfg.WarmupLogicalBlocks() < 1000 || cfg.WarmupLogicalBlocks() > 1024 { + t.Fatalf("shape=%s warmup logical blocks=%d want [1000,1024]", shape, cfg.WarmupLogicalBlocks()) } for index := 0; index < cfg.APIOperations; index++ { start, blocks := cfg.operation(index, 0) @@ -141,15 +141,15 @@ func newPhase173FixedWorkConfig(shape string, writers int) (phase173FixedWorkCon cfg := phase173FixedWorkConfig{Shape: shape, Writers: writers} switch shape { case "sequential_4k", "scattered_4k": - cfg.APIOperations = 65536 - cfg.WarmupAPIOps = 4096 + cfg.APIOperations = 16384 + cfg.WarmupAPIOps = 1024 case "batch_16": - cfg.APIOperations = 4096 - cfg.WarmupAPIOps = 256 + cfg.APIOperations = 1024 + cfg.WarmupAPIOps = 64 case "mounted_mixed": - // 2560 fixed cycles of 4K, 16K, 64K, and 16K requests. - cfg.APIOperations = 10240 - cfg.WarmupAPIOps = 640 + // 640 fixed cycles of 4K, 16K, 64K, and 16K requests. + cfg.APIOperations = 2560 + cfg.WarmupAPIOps = 160 default: return phase173FixedWorkConfig{}, fmt.Errorf("phase173: unsupported shape %q", shape) } diff --git a/seaweed-block/internal/docs/qa-assignments/phase173-d1-fixed-work-baseline-qa.md b/seaweed-block/internal/docs/qa-assignments/phase173-d1-fixed-work-baseline-qa.md index d10af3d563..d20bfcbe6e 100644 --- a/seaweed-block/internal/docs/qa-assignments/phase173-d1-fixed-work-baseline-qa.md +++ b/seaweed-block/internal/docs/qa-assignments/phase173-d1-fixed-work-baseline-qa.md @@ -39,6 +39,8 @@ Do not lower run counts or change the `1.25x` threshold after seeing results. `1.25` - environment evidence identifies kernel, CPU/affinity/scheduler, filesystem, mount options, backing device, free space, load, and available thermal data +- `store_source` is the dedicated local block device under evaluation, not the + OS/root filesystem by convenience and never CIFS/NFS/tmpfs/overlay - the store directory contains no `phase173-*.store` residue after the gate Each JSON result must show one final sync, `dirty_entries=0`, and equal @@ -53,9 +55,11 @@ wrap may add one separately counted padding `WriteAt`; `wal_wraps` and - `PASS`: all required evidence is present and both independent five-run four-writer sets remain within the predeclared range. Each fixed-work sample - writes about 256 MiB so foreground execution crosses multiple 100 ms flusher + writes about 64 MiB so foreground execution crosses multiple 100 ms flusher periods; 1/2/8 writers are diagnostic matrix points, while four writers use - the two independent five-run admission sets. + the two independent five-run admission sets. The second set reverses shape + and writer order; the gate syncs between samples and records each set's + starting device/load evidence. - `FAIL`: a correctness, counter, drain, or residue invariant fails. - `HOLD`: the stability range exceeds `1.25x`; fix the harness or lab before D2/D3 and do not implement an architecture candidate. diff --git a/seaweed-block/scripts/run-phase173-fixed-work-baseline-gate.sh b/seaweed-block/scripts/run-phase173-fixed-work-baseline-gate.sh index 0fc8fdaf22..ff04e69ada 100755 --- a/seaweed-block/scripts/run-phase173-fixed-work-baseline-gate.sh +++ b/seaweed-block/scripts/run-phase173-fixed-work-baseline-gate.sh @@ -7,8 +7,10 @@ STORE_DIR="${SW_BLOCK_PHASE173_STORE_DIR:-${ARTIFACT_DIR}/stores}" SUMMARY="${ARTIFACT_DIR}/phase173-fixed-work-baseline-summary.txt" RESULTS="${ARTIFACT_DIR}/phase173-fixed-work-results.jsonl" TEST_BINARY="${ARTIFACT_DIR}/storage.test" -SHAPES=(sequential_4k scattered_4k batch_16 mounted_mixed) -WRITERS=(1 2 4 8) +SHAPES_FORWARD=(sequential_4k scattered_4k batch_16 mounted_mixed) +SHAPES_REVERSE=(mounted_mixed batch_16 scattered_4k sequential_4k) +WRITERS_FORWARD=(1 2 4 8) +WRITERS_REVERSE=(8 4 2 1) SETS=2 RUNS=5 DIAGNOSTIC_RUNS=1 @@ -39,6 +41,15 @@ write_summary "page_cache_policy=warm_process_and_filesystem_no_drop_caches" write_summary "go_benchmark_autocalibration_allowed=false" write_summary "architecture_candidate_admission_allowed=false" +store_source="$(findmnt -n -T "${STORE_DIR}" -o SOURCE)" +store_filesystem="$(findmnt -n -T "${STORE_DIR}" -o FSTYPE)" +if [[ "${store_source}" != /dev/* ]]; then + echo "store source ${store_source} is not a local block device" >&2 + exit 1 +fi +write_summary "store_source=${store_source}" +write_summary "store_filesystem=${store_filesystem}" + capture kernel uname -a capture go-version go version capture cpu lscpu @@ -67,8 +78,19 @@ go test ./core/storage -run '^TestPhase173FixedWorkContract$' -count=1 \ go test -c -o "${TEST_BINARY}" ./core/storage for set_id in $(seq 1 "${SETS}"); do - for shape in "${SHAPES[@]}"; do - for writers in "${WRITERS[@]}"; do + sync + sleep 5 + capture "set-${set_id}-start-iostat" iostat -xz 1 2 + capture "set-${set_id}-start-load" uptime + if [[ "${set_id}" == "1" ]]; then + shapes=("${SHAPES_FORWARD[@]}") + writers_values=("${WRITERS_FORWARD[@]}") + else + shapes=("${SHAPES_REVERSE[@]}") + writers_values=("${WRITERS_REVERSE[@]}") + fi + for shape in "${shapes[@]}"; do + for writers in "${writers_values[@]}"; do point_runs="${DIAGNOSTIC_RUNS}" if [[ "${writers}" == "4" ]]; then point_runs="${RUNS}" @@ -88,6 +110,8 @@ for set_id in $(seq 1 "${SETS}"); do exit 1 fi printf '%s\n' "${result}" >>"${RESULTS}" + sync + sleep 0.25 done done done