You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "nzw921rx (via GitHub)" <gi...@apache.org> on 2026/09/03 12:10:44 UTC
[I] [Improve][Zeta] Investigate and improve finished JobDAG store benchmark stability [seatunnel]
nzw921rx opened a new issue, #12060:
URL: https://github.com/apache/seatunnel/issues/12060
## Description
This is a focused investigation and improvement task for the latency variance observed when storing finished JobDAG information.
It is not a performance regression report and does not attempt to compare the performance of Java 8 with Java 11.
The `finishedJobDagStore` benchmark shows high sample-to-sample variance across every tested parameter combination:
- Java 8 CV: approximately `15.97%–60.53%`
- Java 11 CV: approximately `10.88%–35.77%`
| Parameters | Java 8 Error / CV | Java 11 Error / CV |
| --- | ---: | ---: |
| `pipelineCount=1, storedDagCount=0` | 37.02% / 34.63% | 38.24% / 35.77% |
| `pipelineCount=1, storedDagCount=100` | 64.71% / 60.53% | 28.26% / 26.44% |
| `pipelineCount=10, storedDagCount=0` | 25.88% / 24.20% | 34.14% / 31.94% |
| `pipelineCount=10, storedDagCount=100` | 27.86% / 26.06% | 26.54% / 24.83% |
| `pipelineCount=100, storedDagCount=0` | 19.40% / 18.15% | 11.63% / 10.88% |
| `pipelineCount=100, storedDagCount=100` | 17.08% / 15.97% | 20.70% / 19.37% |
Benchmark run:
https://github.com/apache/seatunnel/actions/runs/33723940255
Other benchmarks executed by the same workflow were substantially more stable. The repeated variance across the complete parameter matrix is therefore worth investigating.
The goals of this issue are to:
1. Identify whether the variance comes from the benchmark fixture, JobDAG serialization, Hazelcast IMap operations, WAL/FileMapStore persistence, or the execution environment.
2. Improve the benchmark fixture or methodology if it causes the instability.
3. Optimize the production storage path if profiling confirms an implementation bottleneck.
4. Preserve finished-job state correctness and durability.
## Relevant benchmark
```text
IMapDagStorageBenchmark.finishedJobDagStore
```
## Profiling tools
For an overview of the Zeta benchmark suite and usage, see the [SeaTunnel Zeta Benchmark Guide](https://seatunnel.apache.org/docs/engines/zeta/benchmark).
SeaTunnel provides the `Benchmarks Diagnostics` workflow for running one exact benchmark method with CPU, wall-clock, lock, GC, or JFR profiling:
https://github.com/apache/seatunnel/actions/workflows/benchmarks_diagnostics.yml
The benchmark can also be run directly from the GitHub Actions page by selecting **Benchmarks Diagnostics**, clicking **Run workflow**, and providing the target branch, tag, commit SHA, or trusted PR number together with the exact benchmark method.
## Local profiling
Build the benchmark module:
```bash
./mvnw -Pbenchmark -pl seatunnel-benchmarks -am -DskipTests package
```
Run a profiler locally:
```bash
bash tools/benchmarks/profile_benchmarks.sh profile cpu \
--repository . \
--benchmark 'IMapDagStorageBenchmark.finishedJobDagStore$'
```
Replace `cpu` with `wall`, `lock`, or `gc` as needed.
Capture a JFR recording:
```bash
bash tools/benchmarks/profile_benchmarks.sh capture jfr \
--repository . \
--benchmark 'IMapDagStorageBenchmark.finishedJobDagStore$'
```
CPU, wall-clock, and lock profiling require `ASYNC_PROFILER_HOME`. The GitHub Actions workflow installs the required profiler automatically.
## Expected outcome
This issue should result in both root-cause analysis and a focused improvement:
- Identify and explain the primary source of the latency variance.
- Improve the benchmark when the fixture or methodology is responsible.
- Optimize the production storage path when an implementation problem is confirmed.
- Add or update benchmark coverage to validate the improvement.
- Provide before-and-after results collected with the same JDK, runner, benchmark arguments, and storage configuration.
- Compare both operation latency and variance before and after the change.
- Add appropriate tests and confirm that finished-job state correctness and durability remain unchanged.
The implementation should focus on the confirmed source and avoid unrelated, broad state-store refactoring.
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Improve][Zeta] Investigate and improve finished JobDAG store benchmark stability [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #12060:
URL: https://github.com/apache/seatunnel/issues/12060#issuecomment-5551704651
Thanks @goutamadwant. The reported measurements correctly separate cheaper untimed fixture cleanup from production write latency, and they do not establish a variance or throughput improvement. Please do not submit a production optimization from this evidence.
For the next agreed protocol, keep two separately named measurements: startup-sensitive end-to-end storage behavior and steady-state store behavior after a defined readiness boundary. They must use the same JDK, Linux runner class, heap, storage configuration, warmup, measurement count, and reporting rule for baseline and candidate. Do not tune warmup, sleeps, or the fixture only to lower CV. If fixture cleanup is later changed, review it as a benchmark-fixture correctness change with its own tests and report it separately from any production claim. The current no-production-change conclusion is the right outcome until a matched CI measurement identifies a reproducible bottleneck.
--
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: [I] [Improve][Zeta] Investigate and improve finished JobDAG store benchmark stability [seatunnel]
Posted by "goutamadwant (via GitHub)" <gi...@apache.org>.
goutamadwant commented on issue #12060:
URL: https://github.com/apache/seatunnel/issues/12060#issuecomment-5554857608
@DanielLeens @nzw921rx completed the benchmark-only changes and matched Linux A/A calibration
- separated startup-inclusive timing from writes after coordinator activation and storage read-back
- Java 8 and Java 11 each completed 96 fresh JVMs using identical artifacts for both comparison roles
- verified raw results, log hashes and settings across 57,600 measured writes, with each JDK and timing contract analyzed separately
- identical-code post-readiness ratios ranged from 0.951 to 1.216 on Java 8 and 0.921 to 1.046 on Java 11, so these results do not support a production speedup claim or a small regression threshold yet
- production storage and cleanup are unchanged, and the full Build now passes
The next step is to agree on the readiness boundary and confirmation budget before evaluating a production optimization. Coordinator activation and read-back do not mean all background startup or JIT activity has settled.
[Java 8 calibration](https://github.com/goutamadwant/seatunnel/actions/runs/33983362872)
[Java 11 calibration](https://github.com/goutamadwant/seatunnel/actions/runs/33983358973)
[Passing Build](https://github.com/goutamadwant/seatunnel/actions/runs/33984408660)
--
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: [I] [Improve][Zeta] Investigate and improve finished JobDAG store benchmark stability [seatunnel]
Posted by "goutamadwant (via GitHub)" <gi...@apache.org>.
goutamadwant commented on issue #12060:
URL: https://github.com/apache/seatunnel/issues/12060#issuecomment-5549588018
@nzw921rx I completed the local comparisons and startup/cadence checks. Sharing the setup and results before proposing a change.
### What I ran
- Native ARM Java 11 on macOS, fixed 4 GiB heap, G1 and `ActiveProcessorCount=4`.
- Six combinations: `pipelineCount=1/10/100` and `storedDagCount=0/100`.
- Each store measurement performs 100 sequential production `IMap.put` calls, reported as microseconds per DAG.
- Initial comparison: 48 fresh JVM forks with 10 warmup and 10 measured batches, plus a separate 24-fork comparison using the current 3-warmup/5-measurement settings.
- Readiness comparison: another 48 forks covering original/candidate fixtures with and without the same coordinator startup guard, across two reversed-order blocks.
- Separate cadence and JFR probes, plus CPU, allocation, GC, wall-time and lock profiling. Profiled scores were not pooled with unprofiled timings.
The three valid JMH matrices contain 120 forks and 84,000 measured writes. Results remain separate because the protocols differ. An earlier readiness experiment had artifact-packaging defects and was excluded entirely before repeating it with corrected, verified binaries.
### What the measurements show
The current store fixture replays the full WAL three times between batches. The candidate replays once and validates all 100 DAGs.
In the separate 100-pipeline cleanup probe:
- Median verification/cleanup time: **2,025.11 ms → 60.16 ms**.
- Full WAL reads per cleanup: **3 → 1**.
- Total cleanup WAL-read bytes across 12 batches: **450,816,984 → 150,272,328**.
- WAL bytes appended per write batch were unchanged.
This is cheaper untimed fixture work, not a production write speedup. Removing that work also moves subsequent batches earlier in startup and JVM warmup.
With the startup guard applied to both fixtures:
- Candidate mean latency was over 5% higher in **9 of 12** parameter/block comparisons.
- Absolute standard deviation improved in **4 of 12** comparisons; CV also improved in **4 of 12**.
- None of the six parameter combinations met the predeclared mean/dispersion screen in both blocks.
These are descriptive local results, not statistical non-regression bounds. The guard observes coordinator activation, not completion of all background startup or JVM warmup.
### Validation and next step
All 38 benchmark-module tests passed on Java 8 and Java 11, along with all 12 packaged store/load smoke cases. No production storage behavior changed.
I don’t think this establishes a variance fix for #12060. Could we agree whether the benchmark should measure startup-sensitive writes or steady-state storage, and which background services should remain active? We can then validate an agreed protocol on Linux matching CI, rather than adding arbitrary sleeps or tuning warmup until CV looks better.
The local filesystem read-back checks establish visible WAL contents, not real HDFS sync latency or crash durability.
--
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: [I] [Improve][Zeta] Investigate and improve finished JobDAG store benchmark stability [seatunnel]
Posted by "nzw921rx (via GitHub)" <gi...@apache.org>.
nzw921rx commented on issue #12060:
URL: https://github.com/apache/seatunnel/issues/12060#issuecomment-5601236172
> [@nzw921rx](https://github.com/nzw921rx) the independent fixture correction is ready on this [#12188](https://github.com/apache/seatunnel/pull/12188)
>
> Intermediate teardown no longer replays the WAL. Final-measurement teardown still evicts and reloads three samples before deletion. Timed writes, TTL and deletion behavior are unchanged.
>
> All 51 benchmark tests passed on each JDK. Native Linux confirmation also passed on [Java 11](https://github.com/goutamadwant/seatunnel/actions/runs/34151236677) and [Java 8](https://github.com/goutamadwant/seatunnel/actions/runs/34151242011): 36 fresh JVMs, 180 measured batches and 18,000 writes under the original settings, with no detected swapping. Raw evidence is attached to both runs.
>
> The corrected baseline still shows variability, so this is not a complete variance fix or production speedup. Next I will correlate the remaining waits with serialization, queueing, WAL write/flush and thread wakeup in separate diagnostic runs. [#12135](https://github.com/apache/seatunnel/pull/12135) remains on hold.
thansk, merged i think We can continue now🚀
--
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: [I] [Improve][Zeta] Investigate and improve finished JobDAG store benchmark stability [seatunnel]
Posted by "nzw921rx (via GitHub)" <gi...@apache.org>.
nzw921rx commented on issue #12060:
URL: https://github.com/apache/seatunnel/issues/12060#issuecomment-5557351828
@goutamadwant Thanks for the detailed investigation. The fixture is confirmed to affect subsequent measurements. Please fix it independently, establish a new baseline, and then continue investigating the remaining variance and non-GC waits.🚀
--
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: [I] [Improve][Zeta] Investigate and improve finished JobDAG store benchmark stability [seatunnel]
Posted by "goutamadwant (via GitHub)" <gi...@apache.org>.
goutamadwant commented on issue #12060:
URL: https://github.com/apache/seatunnel/issues/12060#issuecomment-5527129510
> @goutamadwant Would you be willing to try this task?
Sure @nzw921rx assign it to me.
--
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: [I] [Improve][Zeta] Investigate and improve finished JobDAG store benchmark stability [seatunnel]
Posted by "nzw921rx (via GitHub)" <gi...@apache.org>.
nzw921rx commented on issue #12060:
URL: https://github.com/apache/seatunnel/issues/12060#issuecomment-5526406751
@goutamadwant Would you be willing to try this task?
--
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: [I] [Improve][Zeta] Investigate and improve finished JobDAG store benchmark stability [seatunnel]
Posted by "goutamadwant (via GitHub)" <gi...@apache.org>.
goutamadwant commented on issue #12060:
URL: https://github.com/apache/seatunnel/issues/12060#issuecomment-5557301528
@nzw921rx thanks for clarifying. I went back to the original finishedJobDagStore and reproduced the variation locally before using separate diagnostic experiments.
Setup: original artifact from f6f18be7, macOS ARM, Temurin 11.0.32.1+1, local file storage, 4 GiB heap, G1, AlwaysPreTouch, DisableExplicitGC, ActiveProcessorCount=4 and preferIPv4Stack=true. ActiveProcessorCount controls JVM ergonomics, not CPU affinity.
For pipelineCount=1 and storedDagCount=100, I retained 3 forks, 3 single-shot warmups and 5 measurements, with 100 writes per batch.
All measured samples below are us/DAG, in iteration order:
- Fork 1: 211.88750, 174.54000, 177.11208, 150.49709, 123.12500
- Fork 2: 181.67375, 160.18583, 155.25875, 163.31625, 127.75667
- Fork 3: 189.42084, 159.59458, 132.79375, 147.09708, 108.95291
Separate batch-level recordings still show declining measurements with the coordinator active and no overlapping GC pauses in those small-DAG batches. That weakens coordinator readiness as a sufficient explanation, but does not rule out all background activity.
Further diagnostic runs found:
- serialization CPU cost falls during measurement, and exercising the actual write path changes the pattern beyond simply waiting
- teardown reloads three sampled values through full-WAL scans; deletes append tombstones, so verification work grows between iterations
- with 100 pipelines, allocation across those three reads grows from about 70 MB after the first measured batch to 140 MB after the last
- some large-DAG stalls overlap recorded G1 pauses, while other non-GC waits remain unresolved
The verification allocations are outside the write timer. They change conditions for later samples rather than directly contributing to the current Score.
I also tested isolated WAL state. It bounds verification work but did not consistently improve latency, so I am not treating it as a variance fix. Diagnostic scores remain separate from the unchanged reproduction.
These findings do not establish a production defect or explain every historical CI outlier. I will keep the proposed framework additions on hold. Does investigating the remaining non-GC waits look like the most useful next step, or should we first discuss the fixture-history effect?
--
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: [I] [Improve][Zeta] Investigate and improve finished JobDAG store benchmark stability [seatunnel]
Posted by "nzw921rx (via GitHub)" <gi...@apache.org>.
nzw921rx commented on issue #12060:
URL: https://github.com/apache/seatunnel/issues/12060#issuecomment-5557079719
Thanks for the investigation work so far. I have expanded #12086 with a step-by-step investigation methodology:
https://github.com/apache/seatunnel/issues/12086#investigation-methodology
To clarify the expectations for this issue: the immediate goal is to explain the reported variance through reproducible evidence. There is no expectation to submit a code change or PR immediately.
Please start with one affected parameter combination from the existing benchmark, retain its measurement settings, and investigate how the anomalous iterations relate to specific runtime behavior. A consistent local environment is sufficient for initial reproduction and controlled experiments.
Reproduction results, runtime observations, ruled-out hypotheses, and questions are all welcome here before a PR is ready. Existing experiments remain useful inputs; there is no need to restart work that already provides relevant evidence.
We can discuss those findings first, then decide whether a benchmark correction, production change, or additional diagnostic capability is needed. Any proposed change should explain how it addresses the original symptom and preserve the relevant runtime guarantees.
--
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: [I] [Improve][Zeta] Investigate and improve finished JobDAG store benchmark stability [seatunnel]
Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on issue #12060:
URL: https://github.com/apache/seatunnel/issues/12060#issuecomment-5564633681
@goutamadwant thanks for the calibration and the follow-up reproduction.
On the A/A calibration: agreed that identical-code post-readiness ratios of 0.951–1.216 on Java 8 and 0.921–1.046 on Java 11 do not support a production speedup claim or a small regression threshold yet. Separating startup-inclusive timing from writes after coordinator activation and read-back was the right change, and keeping production storage and cleanup untouched is correct. I also agree with your caveat that activation plus read-back does not mean background startup or JIT activity has settled, so I would not lock in a readiness boundary from those runs alone.
Your local reproduction on the f6f18be7 artifact (pipelineCount=1, storedDagCount=100, 3 forks, 3 warmups, 5 measurements) shows declining samples within each fork with no overlapping GC pauses in those small-DAG batches, and the teardown behavior you describe (three sampled values reloaded through full-WAL scans, tombstone appends, allocation across those reads growing from about 70 MB to 140 MB with 100 pipelines) means later samples run under different conditions than earlier ones. That fixture-history effect needs to be removed before the readiness boundary or confirmation budget can be decided, otherwise the A/A spread is partly measuring the fixture.
Suggested order, in line with the previous comment:
1. Fix the fixture independently: bound the teardown verification so it no longer does full-WAL scans and does not grow work across iterations. Keep this benchmark-only and separate from the framework additions, which stay on hold as you proposed.
2. Re-run the same parameter combination with identical settings (forks, warmups, measurements, writes per batch, JVM flags) on the corrected fixture and post the per-fork samples in the same format for comparison.
3. Repeat the Java 8 and Java 11 A/A calibration on the corrected fixture. If the identical-code ratios tighten, that spread can inform the readiness boundary and confirmation budget; if not, the remaining variance is not fixture-driven.
4. Once that new baseline exists, continue with the remaining non-GC waits and the large-DAG stalls that overlap G1 pauses.
A benchmark-only PR for the fixture fix is welcome whenever it is ready, and reproduction results, ruled-out hypotheses and open questions are welcome here as you go.
<!-- streview-comment:867 -->
--
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: [I] [Improve][Zeta] Investigate and improve finished JobDAG store benchmark stability [seatunnel]
Posted by "goutamadwant (via GitHub)" <gi...@apache.org>.
goutamadwant commented on issue #12060:
URL: https://github.com/apache/seatunnel/issues/12060#issuecomment-5575511278
@nzw921rx the independent fixture correction is ready on this #12188
Intermediate teardown no longer replays the WAL. Final-measurement teardown still evicts and reloads three samples before deletion. Timed writes, TTL and deletion behavior are unchanged.
All 51 benchmark tests passed on each JDK. Native Linux confirmation also passed on [Java 11](https://github.com/goutamadwant/seatunnel/actions/runs/34151236677) and [Java 8](https://github.com/goutamadwant/seatunnel/actions/runs/34151242011): 36 fresh JVMs, 180 measured batches and 18,000 writes under the original settings, with no detected swapping. Raw evidence is attached to both runs.
The corrected baseline still shows variability, so this is not a complete variance fix or production speedup. Next I will correlate the remaining waits with serialization, queueing, WAL write/flush and thread wakeup in separate diagnostic runs. #12135 remains on hold.
--
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