You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "goutamadwant (via GitHub)" <gi...@apache.org> on 2026/09/05 21:18:47 UTC

[PR] [Test][Zeta] Separate startup and post-readiness storage benchmarks [seatunnel]

goutamadwant opened a new pull request, #12135:
URL: https://github.com/apache/seatunnel/pull/12135

   ### Purpose of this pull request
   
   Related to #12060.
   
   Separate startup-sensitive storage measurements from writes after a defined readiness boundary. This is a benchmark-only change, not a production optimization or a fix for the reported variance.
   
   - Add startup-inclusive and post-readiness benchmarks with explicit timing boundaries and operation normalization.
   - Preserve existing store/load benchmarks, sequential writes, production storage behavior and sampled WAL cleanup.
   - Verify stored values outside the measured interval and clean up after setup or verification failures.
   - Add a comparison collector that preserves raw fork samples, commands, checksums, JVM details and failed collections.
   - Add a manual Linux comparison workflow and dedicated lifecycle smoke validation.
   - Document the measurement contracts and limitations in English and Chinese.
   
   The readiness boundary checks coordinator activation and successful storage read-back. It does not guarantee that every background service or JIT activity has settled. The earlier one-pass cleanup candidate is not included.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes, for benchmark users and documentation only.
   
   `finishedJobDagStartupEndToEnd` measures engine/client startup, fixture seeding and the first 100 writes together in milliseconds, excluding JVM launch and teardown. It uses zero warmup and one measurement per fresh JVM.
   
   `finishedJobDagStoreAfterReadiness` measures microseconds per DAG from a 100-write batch after the readiness boundary. Normal comparisons use three warmup and five measurement batches.
   
   Invalid timing overrides fail before engine startup. Production APIs, connector configuration and storage behavior remain unchanged.
   
   ### How was this patch tested?
   
   - Packaged the 42-module benchmark reactor, including test-source compilation.
   - All 46 benchmark-module tests passed on Java 8 and Java 11 locally and in Linux CI.
   - All 42 Python benchmark-tool tests passed.
   - All 12 packaged Linux lifecycle smoke cases passed.
   - The corrected CI benchmark sweep and dedicated lifecycle smoke checks passed locally on Java 11 and Temurin 8u504.
   - Negative checks reject startup warmup, repeated startup measurements and overridden operation normalization.
   - Workflow actionlint, shell syntax and whitespace checks passed.
   
   Local verification commands:
   
   ```bash
   ./mvnw -B -Pbenchmark -pl seatunnel-benchmarks -am -DskipTests -Dskip.ui=true -Dlicense.skipAddThirdParty=true install
   ./mvnw -B -Pbenchmark -pl seatunnel-benchmarks -Dlicense.skipAddThirdParty=true test
   python3 -m unittest discover -s tools/benchmarks -p 'test_*.py'
   python3 tools/benchmarks/storage_lifecycle_matrix.py --purpose smoke --baseline seatunnel-benchmarks/target/benchmarks.jar --candidate seatunnel-benchmarks/target/benchmarks.jar --output storage-smoke
   ```
   
   Matched Linux A/A calibration completed with identical baseline and candidate artifacts from `00ad85c56`:
   
   - [Java 11 calibration](https://github.com/goutamadwant/seatunnel/actions/runs/33983358973)
   - [Java 8 calibration](https://github.com/goutamadwant/seatunnel/actions/runs/33983362872)
   
   Each JDK completed 96 fresh JVMs across six parameter combinations. Across both runs, 192 forks, 576 measured batches and 57,600 measured writes passed the independent raw-result, log-integrity and protocol audit. Each JDK and timing contract is analyzed separately.
   
   Identical-code post-readiness mean ratios ranged from 0.951 to 1.216 on Java 8 and 0.921 to 1.046 on Java 11 across parameter/block comparisons. These are descriptive A/A differences, not speedups or statistical non-regression bounds. They do not justify a blanket 5% regression threshold.
   
   [Full CI passed](https://github.com/goutamadwant/seatunnel/actions/runs/33984408660) at `043a82cd6`, including Java 8/11 benchmark validation, benchmark-tool tests, code style, licenses and the website build. The follow-up commit corrected generic CI smoke integration; benchmark Java code and the calibration collector are unchanged from the calibrated commit.
   
   ### Check list
   
   * [ ] If any new Jar binary package adding in your PR, please add License Notice according
     [New License Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/developer/new-license.md)
   * [x] If necessary, please update the documentation to describe the new feature. https://github.com/apache/seatunnel/tree/dev/docs
   * [ ] If necessary, please update `incompatible-changes.md` to describe the incompatibility caused by this PR.
   * [ ] If you are contributing the connector code, please check that the following files are updated:
     1. Update [plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties) and add new connector information in it
     2. Update the pom file of [seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
     3. Add ci label in [label-scope-conf](https://github.com/apache/seatunnel/blob/dev/.github/workflows/labeler/label-scope-conf.yml)
     4. Add e2e testcase in [seatunnel-e2e](https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/)
     5. Update connector [plugin_config](https://github.com/apache/seatunnel/blob/dev/config/plugin_config)
   
   No new dependencies, incompatible production changes or connector changes are included. The unchecked conditional items are not applicable.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Test][Zeta] Separate startup and post-readiness storage benchmarks [seatunnel]

Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #12135:
URL: https://github.com/apache/seatunnel/pull/12135#issuecomment-5569402613

   @nzw921rx Thanks for the concrete proposal — noting these landed as two near-identical posts a few seconds apart, so replying once here to keep the thread in one place.
   
   Agreed on both points, and this folds into the walkback I already posted above: my original review verified `IMapDagStorageLifecycleBenchmark`'s internal correctness (contract separation, `validateSingleShot`, deterministic test suite) but never established that it actually explains the #12060 variance — that's a different claim, and you and @goutamadwant were right to press on it. I'd already revised my own recommendation off "ready to merge" for exactly that reason.
   
   On the scope-reduction point specifically: I checked the current diff, and `.github/workflows/benchmarks_storage_comparison.yml` is in fact a whole new standalone workflow file this PR adds, on top of the `backend.yml` smoke-sweep changes — so the maintenance-cost concern isn't hypothetical, it's already present here as written. Narrowing this to the fixture fix plus a new baseline, with the readiness-vs-no-readiness comparison done ad hoc per your step-2 methodology rather than as a standing CI workflow, is a materially smaller and easier-to-maintain surface, and it doesn't foreclose a proper core/non-core benchmark split later once that's actually needed.
   
   I'll hold my own re-review until @goutamadwant has had a chance to act on the scope reduction — happy to take a fresh pass on the narrower version once it's up.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Test][Zeta] Separate startup and post-readiness storage benchmarks [seatunnel]

Posted by "goutamadwant (via GitHub)" <gi...@apache.org>.
goutamadwant commented on PR #12135:
URL: https://github.com/apache/seatunnel/pull/12135#issuecomment-5557306190

   @nzw921rx I shared the original benchmark reproduction and runtime findings on #12060.
   
   I will hold further changes here until we discuss those findings and agree whether a benchmark correction or additional diagnostics are needed. The current evidence does not justify a production optimization. Let me know your thoughts. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Test][Zeta] Separate startup and post-readiness storage benchmarks [seatunnel]

Posted by "nzw921rx (via GitHub)" <gi...@apache.org>.
nzw921rx commented on PR #12135:
URL: https://github.com/apache/seatunnel/pull/12135#issuecomment-5579704267

   @goutamadwant Can this PR be closed or changed to a draft? I think this is an experimental model that allows him to stay locally.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Test][Zeta] Separate startup and post-readiness storage benchmarks [seatunnel]

Posted by "nzw921rx (via GitHub)" <gi...@apache.org>.
nzw921rx commented on PR #12135:
URL: https://github.com/apache/seatunnel/pull/12135#issuecomment-5595846790

   The benchmark bug has been adjusted through another PR 
   https://github.com/apache/seatunnel/pull/12188


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Test][Zeta] Separate startup and post-readiness storage benchmarks [seatunnel]

Posted by "nzw921rx (via GitHub)" <gi...@apache.org>.
nzw921rx closed pull request #12135: [Test][Zeta] Separate startup and post-readiness storage benchmarks
URL: https://github.com/apache/seatunnel/pull/12135


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Test][Zeta] Separate startup and post-readiness storage benchmarks [seatunnel]

Posted by "nzw921rx (via GitHub)" <gi...@apache.org>.
nzw921rx commented on PR #12135:
URL: https://github.com/apache/seatunnel/pull/12135#issuecomment-5556737642

   Thanks for the work and for documenting the measurement boundaries and limitations. My main question is how these additions help explain the high variance in the existing finishedJobDagStore benchmark reported in #12060.
   
   The startup benchmark combines engine/client startup, fixture preparation, and the first 100 writes without warmup. This may be useful for studying startup behavior, but the connection to the write variance under investigation is not yet clear. For the post-readiness measurement, we would first need to establish whether background startup activity still interferes with the original benchmark after warmup, and whether the proposed readiness check addresses that interference.
   
   At this stage, there is no need to compare different environments or introduce a dedicated comparison workflow. We can start with the existing benchmark and profiling tools, attempt to reproduce the variance locally, and correlate slower iterations with runtime evidence such as GC, thread scheduling, and storage calls. If readiness is a suspected factor, a controlled local comparison with and without the check, keeping other settings unchanged and sharing the raw samples, would help test that hypothesis.
   
   Even without finding the root cause immediately, reproducing the issue, ruling out a hypothesis, or documenting the conditions under which it cannot be reproduced would all be useful progress. The A/A calibration describes variability in the new scenarios, but does not yet explain why the original benchmark has high variance.
   
   Could we focus on that investigation first? Adding more benchmarks, collectors, and workflows introduces ongoing maintenance costs while their contribution to the original investigation remains unclear. Once the evidence identifies a specific gap in the existing tools or measurement boundary, we can add the capability needed to address it. That would make the need for the change easier to assess and help keep the framework focused.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Test][Zeta] Separate startup and post-readiness storage benchmarks [seatunnel]

Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #12135:
URL: https://github.com/apache/seatunnel/pull/12135#issuecomment-5558577631

   @nzw921rx @goutamadwant catching up on both the review and the comment — I want to be upfront about a gap in my own earlier pass rather than just add a third voice.
   
   My review verified that `IMapDagStorageLifecycleBenchmark` is internally correct: the two timing contracts are cleanly separated, `validateSingleShot` genuinely prevents them from being silently re-blended, the CI wiring is consistent, and the test suite around it is deterministic. What I did not do — and what your review is right to press on — is verify that separating these contracts actually *explains* the variance reported in #12060, as opposed to just being a plausible-sounding hypothesis. Those are different claims, and I only substantiated the first one.
   
   Concretely, the gap in my review: I read `isCoordinatorActive()` + Hazelcast `isRunning()` as "a deterministic, non-flaky readiness boundary" and treated that as sufficient — but a deterministic check can still be gating the wrong thing. Whether background startup/coordinator activity is actually what's polluting `finishedJobDagStore`'s post-warmup iterations is exactly the question your step 2/4/5 process would answer (reproduce locally, correlate slower iterations with GC/thread/storage evidence, predict-then-test with the readiness check on vs. off), and nothing in this PR or my review does that. The docs are honest that the boundary doesn't guarantee scheduler/JIT quiescence, but "honestly disclosed" isn't the same as "shown to be the relevant boundary."
   
   Given @goutamadwant's response that the current evidence doesn't yet justify a production optimization and that further changes here are on hold pending the #12060 discussion, I'd update my own recommendation accordingly: I no longer think "ready to merge after fixes" is the right framing for this PR as it stands. Since it adds no production code, there's no correctness/durability risk in leaving it open, but I agree it makes sense to hold it until the investigation on #12060 either confirms readiness-gating as a real factor (in which case this scaffolding has a proven purpose) or rules it out (in which case a narrower or different fix, or no fix at all, is more appropriate than carrying this maintenance surface). Happy to take another full pass once that investigation lands.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org