sun-9545sunoj commented on issue #13360:
URL: https://github.com/apache/seatunnel/issues/13360#issuecomment-7044061004

   Thanks @SEZ9. I ran a baseline on current `dev` code. #13374 doesn't change 
the write path; it only makes `stateSize` report bytes, which is what made 
these measurements possible from the REST API.
   
   **Setup:** MySQL 8 (Docker), 32 tables × 500k rows (16M rows); Zeta split 
cluster with 1 master + 2 workers, separate JVMs, `-Xmx2g` G1 (1 MB regions); 
MySQL-CDC `startup.mode=initial`, parallelism 4, checkpoint interval 10s, 
default storage.
   
   | | `snapshot.split.size` 8096 (default), 3 runs | `snapshot.split.size` 
1000 |
   |---|---|---|
   | Snapshot splits | ≈ 2,000 | ≈ 16,000 |
   | Peak checkpoint state | 846–852 KB | 6.85 MB |
   | Held by the enumerator | 99.8%, a single `byte[]` | 99.9%, a single 6.8 MB 
`byte[]` |
   | Reader subtask state | 0 B | 0 B |
   | Checkpoint duration median / p95 | 13–17 / 27–37 ms | 58 / 94 ms |
   | Master: max heap after GC | ≈ 111 MB | 212 MB |
   | Master: max humongous regions | 194 (mostly startup) | 813 |
   | Failed checkpoints / full GCs | 0 / 0 | 0 / 0 |
   
   **Takeaways**
   - Checkpoint state is almost entirely the enumerator state, and it grows 
**linearly with split count, at about 428 bytes per split**. It travels to the 
master as a single array, which is a G1 humongous allocation from about 1,200 
splits on a default heap.
   - At this scale nothing breaks: no failed checkpoints and no full GCs. By 
the same ratio, the "10–500 MB" range in the proposal corresponds to roughly 
23k to 1.2M splits (the upper end is about 10B rows at the default split size), 
so the gains should be measured at that scale.
   - The worker running the enumerator allocates the same array, so phase 3 
shortens how long the bytes are held there rather than eliminating the 
allocation.
   
   **Plan for phase 3:** the same harness at ≈ 25k and ≈ 100k+ splits, 
comparing `dev`, `state-write-mode=worker` and `state-write-mode=master`, with 
3 runs each. Metrics: peak checkpoint state, master post-GC heap, humongous 
regions and GC pauses (from `-Xlog:gc*`), and checkpoint duration. The harness 
(seed script, job config, cluster scripts, blob analyzer) will be committed 
with the phase 3 PR so anyone can rerun it.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to