perf(amber): replace SyncExecutionResource sleeps with bounded result poll#5714
Open
Ma77Ball wants to merge 14 commits into
Open
perf(amber): replace SyncExecutionResource sleeps with bounded result poll#5714Ma77Ball wants to merge 14 commits into
Ma77Ball wants to merge 14 commits into
Conversation
…late in issues or prs
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5714 +/- ##
============================================
- Coverage 53.17% 53.05% -0.13%
Complexity 2660 2660
============================================
Files 1094 1094
Lines 42363 42350 -13
Branches 4556 4554 -2
============================================
- Hits 22528 22469 -59
- Misses 18507 18554 +47
+ Partials 1328 1327 -1
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 437 | 0.267 | 21,821/30,886/30,886 us | 🔴 -6.6% / 🟢 -11.7% |
| 🟢 | bs=100 sw=10 sl=64 | 938 | 0.572 | 103,720/126,469/126,469 us | 🟢 -16.7% / 🟢 -9.5% |
| ⚪ | bs=1000 sw=10 sl=64 | 1,095 | 0.669 | 907,927/970,259/970,259 us | ⚪ within ±5% / 🟢 -6.7% |
Baseline details
Latest main 5869492 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 437 tuples/sec | 468 tuples/sec | 410.82 tuples/sec | -6.6% | +6.4% |
| bs=10 sw=10 sl=64 | MB/s | 0.267 MB/s | 0.285 MB/s | 0.251 MB/s | -6.3% | +6.5% |
| bs=10 sw=10 sl=64 | p50 | 21,821 us | 21,332 us | 23,785 us | +2.3% | -8.3% |
| bs=10 sw=10 sl=64 | p95 | 30,886 us | 30,180 us | 34,980 us | +2.3% | -11.7% |
| bs=10 sw=10 sl=64 | p99 | 30,886 us | 30,180 us | 34,980 us | +2.3% | -11.7% |
| bs=100 sw=10 sl=64 | throughput | 938 tuples/sec | 947 tuples/sec | 891.94 tuples/sec | -1.0% | +5.2% |
| bs=100 sw=10 sl=64 | MB/s | 0.572 MB/s | 0.578 MB/s | 0.544 MB/s | -1.0% | +5.1% |
| bs=100 sw=10 sl=64 | p50 | 103,720 us | 105,540 us | 112,277 us | -1.7% | -7.6% |
| bs=100 sw=10 sl=64 | p95 | 126,469 us | 151,831 us | 139,802 us | -16.7% | -9.5% |
| bs=100 sw=10 sl=64 | p99 | 126,469 us | 151,831 us | 139,802 us | -16.7% | -9.5% |
| bs=1000 sw=10 sl=64 | throughput | 1,095 tuples/sec | 1,090 tuples/sec | 1,041 tuples/sec | +0.5% | +5.2% |
| bs=1000 sw=10 sl=64 | MB/s | 0.669 MB/s | 0.665 MB/s | 0.635 MB/s | +0.6% | +5.3% |
| bs=1000 sw=10 sl=64 | p50 | 907,927 us | 920,944 us | 972,714 us | -1.4% | -6.7% |
| bs=1000 sw=10 sl=64 | p95 | 970,259 us | 979,192 us | 1,023,057 us | -0.9% | -5.2% |
| bs=1000 sw=10 sl=64 | p99 | 970,259 us | 979,192 us | 1,023,057 us | -0.9% | -5.2% |
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,457.55,200,128000,437,0.267,21820.91,30886.37,30886.37
1,100,10,64,20,2132.83,2000,1280000,938,0.572,103720.49,126468.68,126468.68
2,1000,10,64,20,18258.70,20000,12800000,1095,0.669,907926.61,970258.95,970258.95
Contributor
Author
|
/request-review @Yicong-Huang |
…m:Ma77Ball/texera into perf/sync-execution-result-readiness-poll
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
Thread.sleep(500)calls inSyncExecutionResource::executeWorkflowSyncwith a bounded readiness-poll (awaitResultsPersisted) that, per target operator, compares the expected output count from the in-memory stats store against the count committed to result storage (document.getCount), polling at 25ms with a 2s cap and early-exit.TargetResultsReadybefore client shutdown,TerminalStateReached(COMPLETED)before reading storage); error, console-error, and timeout paths no longer wait.awaitUntil(targetIds, expectedCountOf, committedCountOf, timeout, interval, now, sleep)so the timeout and early-exit behavior is unit-testable with a fake clock.COMPLETEDis observable, so the poll returns on its first check in the normal case, and the cap is defensive insurance for storage lag.Any related issues, documentation, discussions?
Closes: #5713
How was this PR tested?
sbt "WorkflowExecutionService/testOnly org.apache.texera.web.resource.SyncExecutionResourceSpec", expectingsucceeded 7, failed 0(run under JDK 21 as CI does; the repo's JaCoCo 0.8.11 cannot instrument JDK 25 bytecode).Was this PR authored or co-authored using generative AI tooling?
Co-authored with Claude Opus 4.8 in compliance with ASF