You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "cxzl25 (via GitHub)" <gi...@apache.org> on 2024/08/13 04:48:31 UTC
[PR] [SPARK-49217][CORE] Support separate buffer size configuration in UnsafeShuffleWriter [spark]
cxzl25 opened a new pull request, #47733:
URL: https://github.com/apache/spark/pull/47733
### What changes were proposed in this pull request?
This PR aims to support separate buffer size configuration in UnsafeShuffleWriter.
Introduce `spark.shuffle.file.merge.buffer` configuration.
### Why are the changes needed?
`UnsafeShuffleWriter#mergeSpillsWithFileStream`使用`spark.shuffle.file.buffer`作为读取spill的文件的buffer,并且这个buffer是堆外buffer
`UnsafeShuffleWriter#mergeSpillsWithFileStream` uses `spark.shuffle.file.buffer` as the buffer for reading spill files, and this buffer is an off-heap buffer.
In the spill process, we hope that the buffer size is larger, but once there are too many files in the spill, `UnsafeShuffleWriter#mergeSpillsWithFileStream` needs to create a lot of off-heap memory, which makes the executor easily killed by YARN.
https://github.com/apache/spark/blob/e72d21c299a450e48b3cf6e5d36b8f3e9a568088/core/src/main/java/org/apache/spark/shuffle/sort/UnsafeShuffleWriter.java#L372-L375
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Production environment verification
### Was this patch authored or co-authored using generative AI tooling?
No
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-49217][CORE] Support separate buffer size configuration in UnsafeShuffleWriter [spark]
Posted by "cxzl25 (via GitHub)" <gi...@apache.org>.
cxzl25 commented on PR #47733:
URL: https://github.com/apache/spark/pull/47733#issuecomment-2303618502
I also found another one, which uses `Platform.allocateDirectBuffer` when initializing, but uses `ByteBuffer.allocateDirect` when growing.
We can do this in another PR.
https://github.com/apache/spark/blob/4ceacbe862dd17786bd21a583ca02e804f13cb1d/core/src/main/scala/org/apache/spark/util/DirectByteBufferOutputStream.scala#L31-L32
https://github.com/apache/spark/blob/4ceacbe862dd17786bd21a583ca02e804f13cb1d/core/src/main/scala/org/apache/spark/util/DirectByteBufferOutputStream.scala#L60-L63
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-49217][CORE] Support separate buffer size configuration in UnsafeShuffleWriter [spark]
Posted by "mridulm (via GitHub)" <gi...@apache.org>.
mridulm commented on PR #47733:
URL: https://github.com/apache/spark/pull/47733#issuecomment-2306479774
Merged to master.
Thanks for fixing this @cxzl25 !
Thanks for the review @JoshRosen :-)
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-49217][CORE] Support separate buffer size configuration in UnsafeShuffleWriter [spark]
Posted by "mridulm (via GitHub)" <gi...@apache.org>.
mridulm commented on PR #47733:
URL: https://github.com/apache/spark/pull/47733#issuecomment-2306480259
@cxzl25, please do verify if the jira has been updated correctly - thanks !
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-49217][CORE] Support separate buffer size configuration in UnsafeShuffleWriter [spark]
Posted by "mridulm (via GitHub)" <gi...@apache.org>.
mridulm closed pull request #47733: [SPARK-49217][CORE] Support separate buffer size configuration in UnsafeShuffleWriter
URL: https://github.com/apache/spark/pull/47733
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org