You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@uniffle.apache.org by GitBox <gi...@apache.org> on 2022/11/07 12:20:52 UTC

[GitHub] [incubator-uniffle] leixm opened a new pull request, #307: [Improvement][AQE] Assign adjacent partitions to the same ShuffleServer.

leixm opened a new pull request, #307:
URL: https://github.com/apache/incubator-uniffle/pull/307

   ### What changes were proposed in this pull request?
   Follow issue#136, allocate adjacent partitions to the same ShuffleServer. When the client calls getShuffleResultForMultiPart, the number of ShuffleServer requests is minimized
   
   
   ### Why are the changes needed?
   Bring some performance improvement
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   UT
   


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #307: [Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307#discussion_r1019787970


##########
coordinator/src/main/java/org/apache/uniffle/coordinator/CoordinatorUtils.java:
##########
@@ -53,6 +54,59 @@ public static int nextIdx(int idx, int size) {
     return idx;
   }
 
+  /**
+   * Assign multiple adjacent partitionRanges to several servers
+   * Suppose totalPartitionNum=52, partitionNumPerRange=2, serverNum=5, estimateTaskConcurrency=20

Review Comment:
   `partitionNumPerRange` should be 1. We will remove range partition in the future.. We can use this to simplify the logic. Current implement is ok for me, too.



##########
coordinator/src/main/java/org/apache/uniffle/coordinator/CoordinatorGrpcService.java:
##########
@@ -110,6 +110,7 @@ public void getShuffleAssignments(
     final int replica = request.getDataReplica();
     final Set<String> requiredTags = Sets.newHashSet(request.getRequireTagsList());
     final int requiredShuffleServerNumber = request.getAssignmentShuffleServerNumber();
+    final int estimateTaskConcurrency = request.getEstimateTaskConcurrency();

Review Comment:
   What will the value be if the old client request the server?



-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #307: [Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307#discussion_r1019797047


##########
coordinator/src/main/java/org/apache/uniffle/coordinator/CoordinatorGrpcService.java:
##########
@@ -110,6 +110,7 @@ public void getShuffleAssignments(
     final int replica = request.getDataReplica();
     final Set<String> requiredTags = Sets.newHashSet(request.getRequireTagsList());
     final int requiredShuffleServerNumber = request.getAssignmentShuffleServerNumber();
+    final int estimateTaskConcurrency = request.getEstimateTaskConcurrency();

Review Comment:
   Will it cause an unexpected result? If not, this feature will be compatible feature.



-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on pull request #307: [Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
jerqi commented on PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307#issuecomment-1308303446

   > Like the above example, if assigning 7 consecutive partitions is the best, for example [0,6] is assigned to server1, [7,12] is assigned to server2, but we do not know the number of concurrent tasks.
   
   Maybe there are no difference between 7 and 10. We should need some performance tests here.


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] leixm commented on pull request #307: [Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
leixm commented on PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307#issuecomment-1308297532

   We can read the executor configuration of spark through configuration, but the actual app running process may not be able to allocate so many resources.


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] leixm commented on pull request #307: [Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
leixm commented on PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307#issuecomment-1310032786

   > > Like the above example, if assigning 7 consecutive partitions is the best, for example [0,6] is assigned to server1, [7,12] is assigned to server2, but we do not know the number of concurrent tasks.
   > 
   > Maybe there are no difference between 7 and 10. We should need some performance tests here.
   
   I will make some  performance tests later.


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on pull request #307: [Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
jerqi commented on PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307#issuecomment-1306507791

   We should allocate continuous n reduce partitions to one shuffle server to avoid that too many task read the same    shuffle server.  If we have 700 reduce tasks,  our concurrency is 100, we usually start 0 - 99 task first. if we allocate 10 continuous reduce partitions to one shuffle server, shuffle server 0 will have [0, 9] [80, 89] reduce partitions, shuffle server 1 will have [ 10, 19], [90, 99] reduce partition, shuffle server 3 will have [20, 29],[100, 109] reduce partition ....
   We also need some performance test.


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] leixm commented on pull request #307: [Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
leixm commented on PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307#issuecomment-1308294460

   > We should allocate continuous n reduce partitions to one shuffle server to avoid that too many task read the same shuffle server. If we have 700 reduce tasks, our concurrency is 100, we usually start 0 - 99 task first. if we allocate 10 continuous reduce partitions to one shuffle server, shuffle server 0 will have [0, 9] [80, 89] reduce partitions, shuffle server 1 will have [ 10, 19], [90, 99] reduce partition, shuffle server 3 will have [20, 29],[100, 109] reduce partition .... We also need some performance test.
   
   How to decide how many contiguous partitions need to be allocated, like `10` mentioned above.


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] leixm commented on pull request #307: [Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
leixm commented on PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307#issuecomment-1308295772

   Like the above example, if assigning 7 consecutive partitions is the best, for example [0,6] is assigned to server1, [7,12] is assigned to server2, but we do not know the number of concurrent tasks.


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] leixm commented on a diff in pull request #307: [Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
leixm commented on code in PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307#discussion_r1019796289


##########
coordinator/src/main/java/org/apache/uniffle/coordinator/CoordinatorGrpcService.java:
##########
@@ -110,6 +110,7 @@ public void getShuffleAssignments(
     final int replica = request.getDataReplica();
     final Set<String> requiredTags = Sets.newHashSet(request.getRequireTagsList());
     final int requiredShuffleServerNumber = request.getAssignmentShuffleServerNumber();
+    final int estimateTaskConcurrency = request.getEstimateTaskConcurrency();

Review Comment:
   The value will be 0.



-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] leixm commented on pull request #307: [Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
leixm commented on PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307#issuecomment-1311163364

   > > > We can read the executor configuration of spark through configuration, but the actual app running process may not be able to allocate so many resources.
   > > 
   > > 
   > > If we use dynamic allocation, we can't know the number of executors. So I think we can give a configuration first, user can set that value. Similarly ByteDance Shuffle Service give the concurrency tasks through an experience formula, you can see https://github.com/bytedance/CloudShuffleService/blob/ef0ffb3f43f9f6e96af49629aed2a6ce61a6a2ab/spark-shuffle-manager-2/src/main/scala/org/apache/spark/shuffle/css/CssShuffleManager.scala#L64
   > 
   > Yes. This optimization has been applied in our internal uniffle, it works well.
   
   Maybe this feature can also be applied to the community, I think it's a good feature.


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on pull request #307: [Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
jerqi commented on PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307#issuecomment-1308301154

   > We can read the executor configuration of spark through configuration, but the actual app running process may not be able to allocate so many resources.
   
   If we use dynamic allocation, we can't know the number of executors. So I think we can give a configuration first, user can set that value. Similarly ByteDance Shuffle Service give the concurrency tasks through an experience formula, you can see https://github.com/bytedance/CloudShuffleService/blob/ef0ffb3f43f9f6e96af49629aed2a6ce61a6a2ab/spark-shuffle-manager-2/src/main/scala/org/apache/spark/shuffle/css/CssShuffleManager.scala#L64


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] codecov-commenter commented on pull request #307: [Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307#issuecomment-1309968907

   # [Codecov](https://codecov.io/gh/apache/incubator-uniffle/pull/307?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#307](https://codecov.io/gh/apache/incubator-uniffle/pull/307?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (edf838f) into [master](https://codecov.io/gh/apache/incubator-uniffle/commit/cf63eae4539264f694760fdf48d882d931ac8e20?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cf63eae) will **increase** coverage by `0.26%`.
   > The diff coverage is `87.41%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master     #307      +/-   ##
   ============================================
   + Coverage     60.73%   60.99%   +0.26%     
   - Complexity     1462     1490      +28     
   ============================================
     Files           180      185       +5     
     Lines          9229     9315      +86     
     Branches        887      901      +14     
   ============================================
   + Hits           5605     5682      +77     
   - Misses         3325     3329       +4     
   - Partials        299      304       +5     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-uniffle/pull/307?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...apache/hadoop/mapreduce/v2/app/RssMRAppMaster.java](https://codecov.io/gh/apache/incubator-uniffle/pull/307/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50LW1yL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9oYWRvb3AvbWFwcmVkdWNlL3YyL2FwcC9Sc3NNUkFwcE1hc3Rlci5qYXZh) | `0.00% <ø> (ø)` | |
   | [...he/uniffle/client/impl/ShuffleWriteClientImpl.java](https://codecov.io/gh/apache/incubator-uniffle/pull/307/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS91bmlmZmxlL2NsaWVudC9pbXBsL1NodWZmbGVXcml0ZUNsaWVudEltcGwuamF2YQ==) | `21.23% <ø> (ø)` | |
   | [...rg/apache/uniffle/client/util/RssClientConfig.java](https://codecov.io/gh/apache/incubator-uniffle/pull/307/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS91bmlmZmxlL2NsaWVudC91dGlsL1Jzc0NsaWVudENvbmZpZy5qYXZh) | `0.00% <ø> (ø)` | |
   | [...java/org/apache/uniffle/common/util/Constants.java](https://codecov.io/gh/apache/incubator-uniffle/pull/307/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS91bmlmZmxlL2NvbW1vbi91dGlsL0NvbnN0YW50cy5qYXZh) | `0.00% <ø> (ø)` | |
   | [...he/uniffle/coordinator/CoordinatorGrpcService.java](https://codecov.io/gh/apache/incubator-uniffle/pull/307/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29vcmRpbmF0b3Ivc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3VuaWZmbGUvY29vcmRpbmF0b3IvQ29vcmRpbmF0b3JHcnBjU2VydmljZS5qYXZh) | `2.29% <0.00%> (-0.02%)` | :arrow_down: |
   | [...oordinator/PartitionBalanceAssignmentStrategy.java](https://codecov.io/gh/apache/incubator-uniffle/pull/307/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29vcmRpbmF0b3Ivc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3VuaWZmbGUvY29vcmRpbmF0b3IvUGFydGl0aW9uQmFsYW5jZUFzc2lnbm1lbnRTdHJhdGVneS5qYXZh) | `94.82% <60.00%> (-3.64%)` | :arrow_down: |
   | [...org/apache/spark/shuffle/RssSparkShuffleUtils.java](https://codecov.io/gh/apache/incubator-uniffle/pull/307/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50LXNwYXJrL2NvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc3Bhcmsvc2h1ZmZsZS9Sc3NTcGFya1NodWZmbGVVdGlscy5qYXZh) | `54.54% <78.57%> (+5.33%)` | :arrow_up: |
   | [...g/apache/uniffle/coordinator/CoordinatorUtils.java](https://codecov.io/gh/apache/incubator-uniffle/pull/307/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29vcmRpbmF0b3Ivc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3VuaWZmbGUvY29vcmRpbmF0b3IvQ29vcmRpbmF0b3JVdGlscy5qYXZh) | `72.60% <79.31%> (+7.38%)` | :arrow_up: |
   | [...niffle/coordinator/AbstractAssignmentStrategy.java](https://codecov.io/gh/apache/incubator-uniffle/pull/307/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29vcmRpbmF0b3Ivc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3VuaWZmbGUvY29vcmRpbmF0b3IvQWJzdHJhY3RBc3NpZ25tZW50U3RyYXRlZ3kuamF2YQ==) | `87.09% <82.60%> (-4.34%)` | :arrow_down: |
   | [.../coordinator/PerferDiffHostAssignmentStrategy.java](https://codecov.io/gh/apache/incubator-uniffle/pull/307/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29vcmRpbmF0b3Ivc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3VuaWZmbGUvY29vcmRpbmF0b3IvUGVyZmVyRGlmZkhvc3RBc3NpZ25tZW50U3RyYXRlZ3kuamF2YQ==) | `92.85% <92.85%> (ø)` | |
   | ... and [9 more](https://codecov.io/gh/apache/incubator-uniffle/pull/307/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on pull request #307: [Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
jerqi commented on PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307#issuecomment-1305666436

   Spark usually start the task one by one, If we have 700 reduce tasks, 7 shuffle server, we usually start 0 - 99 task first. 0 - 99 reduce will be allocated to shuffle server 0. Will it increase too much pressure for shuffle server 0?
   So I think origin implement may be useful for some situation. It's better to let users to choose which strategy is most suitable. We should separate the mechanism from strategy, let configuration to decide which way we want.
   It's ok for me about server's configuration or client's configuration. 


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] leixm commented on a diff in pull request #307: [Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
leixm commented on code in PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307#discussion_r1019807419


##########
coordinator/src/main/java/org/apache/uniffle/coordinator/CoordinatorGrpcService.java:
##########
@@ -110,6 +110,7 @@ public void getShuffleAssignments(
     final int replica = request.getDataReplica();
     final Set<String> requiredTags = Sets.newHashSet(request.getRequireTagsList());
     final int requiredShuffleServerNumber = request.getAssignmentShuffleServerNumber();
+    final int estimateTaskConcurrency = request.getEstimateTaskConcurrency();

Review Comment:
   If the estimateTaskConcurrency value is 0, and rss.coordinator.select.partition.strategy=CONTINUOUS, the assignment will be similar to ROUND strategy, you can check CoordinatorUtils#generateRangesGroup.



-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] leixm commented on pull request #307: [ISSUE-135][FOLLOWUP][Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
leixm commented on PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307#issuecomment-1311273243

   > > > We can read the executor configuration of spark through configuration, but the actual app running process may not be able to allocate so many resources.
   > > 
   > > 
   > > If we use dynamic allocation, we can't know the number of executors. So I think we can give a configuration first, user can set that value. Similarly ByteDance Shuffle Service give the concurrency tasks through an experience formula, you can see https://github.com/bytedance/CloudShuffleService/blob/ef0ffb3f43f9f6e96af49629aed2a6ce61a6a2ab/spark-shuffle-manager-2/src/main/scala/org/apache/spark/shuffle/css/CssShuffleManager.scala#L64
   > 
   > Yes. This optimization has been applied in our internal uniffle, it works well.
   
   Maybe we can apply this feature to our community and estimate the number of ShuffleServers needed according to the number of concurrent tasks.


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] leixm commented on pull request #307: [Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
leixm commented on PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307#issuecomment-1311162922

   I reused the environment in https://github.com/apache/incubator-uniffle/pull/190 to compare the performance before and after issue#136, and the performance improvement after merging the PR
   ### Environment
   
   Shuffle Server Num : 5
   Shuffle Write: 48G
   Configuration: --conf spark.sql.shuffle.partitions=5000 --conf spark.sql.adaptive.enabled=true --conf spark.sql.adaptive.shuffle.targetPostShuffleInputSize=64MB --conf spark.dynamicAllocation.maxExecutors=200 --conf spark.executor.cores=6
   
   We measure the performance of get_shuffle_result by the following metrics:
   
   - get_shuffle_result_times: The number of calls of the get_shuffle_result interface
   - get_shuffle_result_cost: Time consumption of get_shuffle_result interface
   - get_shuffle_result_for_multi_part_times:The number of calls of the get_shuffle_result_for_multi_part interface
   - get_shuffle_result_for_multi_part_cost: Time consumption of get_shuffle_result_for_multi_part interface
   
   ### Test Results
   
   Before issue_136
   
   | serverId | get_shuffle_result_times | get_shuffle_result_cost(ms) |
   | -------- | ------------------------ | --------------------------- |
   | Server1  | 1000                     | 157614                      |
   | Server2  | 1000                     | 426897                      |
   | Server3  | 1000                     | 269488                      |
   | Server4  | 1000                     | 906758                      |
   | Server5  | 1001                     | 123217                      |
   | sum      | 5001                     | 1883974                     |
   
   After issue_136
   
   | serverId | get_shuffle_result_for_multi_part_times | get_shuffle_result_for_multi_part_cost(ms) |
   | -------- | --------------------------------------- | ------------------------------------------ |
   | Server1  | 833                                     | 870720                                     |
   | Server2  | 833                                     | 260865                                     |
   | Server3  | 834                                     | 333202                                     |
   | Server4  | 833                                     | 90277                                      |
   | Server5  | 835                                     | 94113                                      |
   | sum      | 4168                                    | 1649177                                    |
   
   After this pr
   
   | serverId | get_shuffle_result_for_multi_part_times | get_shuffle_result_for_multi_part_cost(ms) |
   | -------- | --------------------------------------- | ------------------------------------------ |
   | Server1  | 168                                     | 40355                                      |
   | Server2  | 167                                     | 43852                                      |
   | Server3  | 167                                     | 98452                                      |
   | Server4  | 167                                     | 91838                                      |
   | Server5  | 168                                     | 25479                                      |
   | sum      | 837                                     | 299976                                     |
   
   
   
   
   
   ### Summarize
   
   After this pr, the number of interface requests is reduced by 79.9%, and the total time is reduced by 81.8%.
   
   


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] leixm commented on pull request #307: [Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
leixm commented on PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307#issuecomment-1305680815

   > Spark usually start the task one by one, If we have 700 reduce tasks, 7 shuffle server, we usually start 0 - 99 task first. 0 - 99 reduce will be allocated to shuffle server 0. Will it increase too much pressure for shuffle server 0? So I think origin implement may be useful for some situation. It's better to let users to choose which strategy is most suitable. We should separate the mechanism from strategy, let configuration to decide which way we want. It's ok for me about server's configuration or client's configuration.
   
   Good idea.


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #307: [Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307#discussion_r1018971082


##########
docs/coordinator_guide.md:
##########
@@ -101,6 +101,7 @@ This document will introduce how to deploy Uniffle coordinators.
 |rss.coordinator.remote.storage.io.sample.access.times|3|The number of times to read and write HDFS files|
 |rss.coordinator.startup-silent-period.enabled|false|Enable the startup-silent-period to reject the assignment requests for avoiding partial assignments. To avoid service interruption, this mechanism is disabled by default. Especially it's recommended to use in coordinator HA mode when restarting single coordinator.|
 |rss.coordinator.startup-silent-period.duration|20000|The waiting duration(ms) when conf of rss.coordinator.startup-silent-period.enabled is enabled.|
+|rss.coordinator.select.partition.strategy|AbstractAssignmentStrategy.SelectPartitionStrategyName.ROUND|There are two strategies for selecting partitions: ROUND and CONTINUOUS. ROUND will poll to allocate partitions to ShuffleServer, and CONTINUOUS will try to allocate consecutive partitions to ShuffleServer.|

Review Comment:
   Could we tell users that this config option can optimize the performance of AQE?



-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #307: [Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307#discussion_r1018971368


##########
docs/client_guide.md:
##########
@@ -103,6 +103,8 @@ These configurations are shared by all types of clients.
 |<client_type>.rss.client.io.compression.codec|lz4|The compression codec is used to compress the shuffle data. Default codec is `lz4`. Other options are`ZSTD` and `SNAPPY`.|
 |<client_type>.rss.client.io.compression.zstd.level|3|The zstd compression level, the default level is 3|
 |<client_type>.rss.client.shuffle.data.distribution.type|NORMAL|The type of partition shuffle data distribution, including normal and local_order. The default value is normal. Now this config is only valid in Spark3.x|

Review Comment:
   Could we tell users that this config option can optimize the performance of AQE?



-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi merged pull request #307: [ISSUE-135][FOLLOWUP][Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
jerqi merged PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on pull request #307: [ISSUE-135][FOLLOWUP][Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
jerqi commented on PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307#issuecomment-1311551218

   > > > > We can read the executor configuration of spark through configuration, but the actual app running process may not be able to allocate so many resources.
   > > > 
   > > > 
   > > > If we use dynamic allocation, we can't know the number of executors. So I think we can give a configuration first, user can set that value. Similarly ByteDance Shuffle Service give the concurrency tasks through an experience formula, you can see https://github.com/bytedance/CloudShuffleService/blob/ef0ffb3f43f9f6e96af49629aed2a6ce61a6a2ab/spark-shuffle-manager-2/src/main/scala/org/apache/spark/shuffle/css/CssShuffleManager.scala#L64
   > > 
   > > 
   > > Yes. This optimization has been applied in our internal uniffle, it works well.
   > 
   > Maybe we can apply this feature to our community and estimate the number of ShuffleServers needed according to the number of concurrent tasks.
   
   Would you contribute this feature and let the @zuston help you review this feature?


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] leixm commented on pull request #307: [ISSUE-135][FOLLOWUP][Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
leixm commented on PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307#issuecomment-1312751934

   > I'm grad to review this feature if you want @leixm
   
   Thank you, i will raise a pr for this feature.


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #307: [Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
jerqi commented on code in PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307#discussion_r1019808513


##########
coordinator/src/main/java/org/apache/uniffle/coordinator/CoordinatorGrpcService.java:
##########
@@ -110,6 +110,7 @@ public void getShuffleAssignments(
     final int replica = request.getDataReplica();
     final Set<String> requiredTags = Sets.newHashSet(request.getRequireTagsList());
     final int requiredShuffleServerNumber = request.getAssignmentShuffleServerNumber();
+    final int estimateTaskConcurrency = request.getEstimateTaskConcurrency();

Review Comment:
   OK.



-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] zuston commented on pull request #307: [Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
zuston commented on PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307#issuecomment-1310070482

   > > We can read the executor configuration of spark through configuration, but the actual app running process may not be able to allocate so many resources.
   > 
   > If we use dynamic allocation, we can't know the number of executors. So I think we can give a configuration first, user can set that value. Similarly ByteDance Shuffle Service give the concurrency tasks through an experience formula, you can see https://github.com/bytedance/CloudShuffleService/blob/ef0ffb3f43f9f6e96af49629aed2a6ce61a6a2ab/spark-shuffle-manager-2/src/main/scala/org/apache/spark/shuffle/css/CssShuffleManager.scala#L64
   
   Yes. This optimization has been applied in our internal uniffle, it works well.


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on pull request #307: [Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
jerqi commented on PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307#issuecomment-1311151201

   We would better modify the document https://github.com/apache/incubator-uniffle/blob/master/docs/client_guide.md#support-spark-aqe , too.


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] zuston commented on pull request #307: [ISSUE-135][FOLLOWUP][Improvement][AQE] Assign adjacent partitions to the same ShuffleServer

Posted by GitBox <gi...@apache.org>.
zuston commented on PR #307:
URL: https://github.com/apache/incubator-uniffle/pull/307#issuecomment-1311627665

   I'm grad to review this feature if you want  @leixm 


-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org