Ngone51 commented on a change in pull request #27831: [SPARK-31069][CORE] high
cpu caused by chunksBeingTransferred in external shuffle service
URL: https://github.com/apache/spark/pull/27831#discussion_r389651115
##########
File path:
common/network-common/src/main/java/org/apache/spark/network/server/OneForOneStreamManager.java
##########
@@ -124,6 +125,7 @@ public void connectionTerminated(Channel channel) {
StreamState state = entry.getValue();
if (state.associatedChannel == channel) {
streams.remove(entry.getKey());
+
totalChunksBeingTransferred.addAndGet((-state.chunksBeingTransferred.get()));
Review comment:
Maybe we can track transferring chunks by channel, e.g. `Map[Channel,
Count]`? The number of channels should be less than `streams`.
And, if we can not get rid of `state.chunksBeingTransferred`,
`connectionTerminated` could also be somewhat time consuming as it also
traverse all `streams`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]