-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-54536][CORE] Shuffle FetchWaitTime missing collect create client/wait cost #53245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…MaxBytes() open block rpc response time
|
gentle ping @cloud-fan @holdenk Could you take a look? |
| fetchAllHostLocalBlocks(hostLocalBlocksByExecutor) | ||
| pushBasedFetchHelper.fetchAllPushMergedLocalBlocks(pushMergedLocalBlocks) | ||
| val fetchWaitTime = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startFetchWait) | ||
| shuffleMetrics.incFetchWaitTime(fetchWaitTime) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this metric is never updated before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discuss, change to like this.
|
Please clearly describe the problem. How is shuffle fetch wait time calculated today and why it's inaccurate. |
Add more explain in the pr desc, pls take a look |
|
|
||
| initialize() | ||
|
|
||
| private def incFetchWaitTime[T](f: () => T): Unit = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| private def incFetchWaitTime[T](f: () => T): Unit = { | |
| private def withFetchWaitTimeTracked[T](f: => T): Unit = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| val t = f() | ||
| val fetchWaitTime = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startFetchWait) | ||
| shuffleMetrics.incFetchWaitTime(fetchWaitTime) | ||
| return t |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| return t | |
| t |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
|
||
| private def incFetchWaitTime[T](f: () => T): Unit = { | ||
| val startFetchWait = System.nanoTime() | ||
| val t = f() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| val t = f() | |
| val res = f() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
What changes were proposed in this pull request?
When ShuffleBlockFetcherIterator fetch data, two shuffle cost not calculated.
fetchUpToMaxBytesandfetchAllHostLocalBlocks;fetchUpToMaxBytesandfetchAllHostLocalBlockssend request, create client may be congestionWhy are the changes needed?
Make shuffle fetch wait time request time more accurate.
Does this PR introduce any user-facing change?
No
How was this patch tested?
For open block request add a Thread.sleep(3000) latency, shuffle read metrics like below
Was this patch authored or co-authored using generative AI tooling?
No