You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by GitBox <gi...@apache.org> on 2022/12/27 10:58:16 UTC
[GitHub] [incubator-celeborn] boneanxs opened a new pull request, #1119: [CELEBORN-61][CELEBORN-62][FOLLOW_UP] Fix some issues for slow start
boneanxs opened a new pull request, #1119:
URL: https://github.com/apache/incubator-celeborn/pull/1119
<!--
Thanks for sending a pull request! Here are some tips for you:
- Make sure the PR title start w/ a JIRA ticket, e.g. '[CELEBORN-XXXX] Your PR title ...'.
- Be sure to keep the PR description updated to reflect all changes.
- Please write your PR title to summarize what this PR proposes.
- If possible, provide a concise example to reproduce the issue for a faster review.
-->
### What changes were proposed in this pull request?
1. If the worker side doesn't enable rate limit, the client side maxReqs value will always increase. So here add a new param to control this behavior.
2. Fix the concurrent issue of currentMaxReqsInFlight(it could be accessed(limitMaxInFlight) when is modified by other threads(slowStart and congestionControl))
### Why are the changes needed?
### Does this PR introduce _any_ user-facing change?
### How was this patch tested?
--
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@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] boneanxs commented on a diff in pull request #1119: [CELEBORN-61][CELEBORN-62][FOLLOW_UP] Fix some issues for slow start
Posted by GitBox <gi...@apache.org>.
boneanxs commented on code in PR #1119:
URL: https://github.com/apache/incubator-celeborn/pull/1119#discussion_r1058083384
##########
client/src/main/java/org/apache/celeborn/client/ShuffleClientImpl.java:
##########
@@ -1268,29 +1276,37 @@ public void setupMetaServiceRef(RpcEndpointRef endpointRef) {
}
private void slowStart() {
- synchronized (currentMaxReqsInFlight) {
- if (currentMaxReqsInFlight > maxInFlight) {
- // Congestion avoidance
- congestionAvoidanceFlag++;
- if (congestionAvoidanceFlag >= currentMaxReqsInFlight) {
- currentMaxReqsInFlight++;
- congestionAvoidanceFlag = 0;
+ if (conf.pushDataSlowStart()) {
Review Comment:
done
--
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@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] waitinfuture merged pull request #1119: [CELEBORN-61][CELEBORN-62][FOLLOW_UP] Fix some issues for slow start
Posted by GitBox <gi...@apache.org>.
waitinfuture merged PR #1119:
URL: https://github.com/apache/incubator-celeborn/pull/1119
--
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@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] codecov[bot] commented on pull request #1119: [CELEBORN-61][CELEBORN-62][FOLLOW_UP] Fix some issues for slow start
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #1119:
URL: https://github.com/apache/incubator-celeborn/pull/1119#issuecomment-1366327185
# [Codecov](https://codecov.io/gh/apache/incubator-celeborn/pull/1119?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 [#1119](https://codecov.io/gh/apache/incubator-celeborn/pull/1119?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0039f12) into [main](https://codecov.io/gh/apache/incubator-celeborn/commit/5603e62e9596d769a3038a17c57e84c4d1dc2974?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5603e62) will **increase** coverage by `0.02%`.
> The diff coverage is `31.04%`.
```diff
@@ Coverage Diff @@
## main #1119 +/- ##
============================================
+ Coverage 26.95% 26.96% +0.02%
Complexity 747 747
============================================
Files 195 195
Lines 16785 16798 +13
Branches 1814 1814
============================================
+ Hits 4522 4528 +6
- Misses 11966 11972 +6
- Partials 297 298 +1
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-celeborn/pull/1119?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [.../org/apache/celeborn/client/ShuffleClientImpl.java](https://codecov.io/gh/apache/incubator-celeborn/pull/1119/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-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9jZWxlYm9ybi9jbGllbnQvU2h1ZmZsZUNsaWVudEltcGwuamF2YQ==) | `19.39% <13.64%> (-0.14%)` | :arrow_down: |
| [...cala/org/apache/celeborn/common/CelebornConf.scala](https://codecov.io/gh/apache/incubator-celeborn/pull/1119/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-Y29tbW9uL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvY2VsZWJvcm4vY29tbW9uL0NlbGVib3JuQ29uZi5zY2FsYQ==) | `80.58% <85.72%> (+0.03%)` | :arrow_up: |
: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@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] boneanxs commented on a diff in pull request #1119: [CELEBORN-61][CELEBORN-62][FOLLOW_UP] Fix some issues for slow start
Posted by GitBox <gi...@apache.org>.
boneanxs commented on code in PR #1119:
URL: https://github.com/apache/incubator-celeborn/pull/1119#discussion_r1058017054
##########
client/src/main/java/org/apache/celeborn/client/ShuffleClientImpl.java:
##########
@@ -1268,29 +1276,37 @@ public void setupMetaServiceRef(RpcEndpointRef endpointRef) {
}
private void slowStart() {
- synchronized (currentMaxReqsInFlight) {
- if (currentMaxReqsInFlight > maxInFlight) {
- // Congestion avoidance
- congestionAvoidanceFlag++;
- if (congestionAvoidanceFlag >= currentMaxReqsInFlight) {
- currentMaxReqsInFlight++;
- congestionAvoidanceFlag = 0;
+ if (conf.pushDataSlowStart()) {
Review Comment:
As currentMaxReqsInFlight is already atomicInteger, maybe use atomic to update its value is better?
--
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@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] AngersZhuuuu commented on a diff in pull request #1119: [CELEBORN-61][CELEBORN-62][FOLLOW_UP] Fix some issues for slow start
Posted by GitBox <gi...@apache.org>.
AngersZhuuuu commented on code in PR #1119:
URL: https://github.com/apache/incubator-celeborn/pull/1119#discussion_r1058029003
##########
client/src/main/java/org/apache/celeborn/client/ShuffleClientImpl.java:
##########
@@ -1267,30 +1275,48 @@ public void setupMetaServiceRef(RpcEndpointRef endpointRef) {
driverRssMetaService = endpointRef;
}
+ /**
+ * If `pushDataSlowStart` is enabled, will increase `currentMaxReqsInFlight` gradually to meet the
+ * max push speed.
+ *
+ * <p>1. slow start period: every RTT period, `currentMaxReqsInFlight` is multiplied. 2.congestion
+ * avoidance: every RTT period, `currentMaxReqsInFlight` plus 1.
+ *
+ * <p>Note that here we define one RTT period: one batch(currentMaxReqsInFlight) of push data
+ * requests.
+ */
private void slowStart() {
- synchronized (currentMaxReqsInFlight) {
- if (currentMaxReqsInFlight > maxInFlight) {
- // Congestion avoidance
- congestionAvoidanceFlag++;
- if (congestionAvoidanceFlag >= currentMaxReqsInFlight) {
- currentMaxReqsInFlight++;
- congestionAvoidanceFlag = 0;
+ if (conf.pushDataSlowStart()) {
+ synchronized (congestionAvoidanceFlag) {
+ int pre = currentMaxReqsInFlight.get();
+ if (pre > maxInFlight) {
+ // Congestion avoidance
+ congestionAvoidanceFlag++;
+ if (congestionAvoidanceFlag >= pre) {
+ currentMaxReqsInFlight.set(pre + 1);
+ congestionAvoidanceFlag = 0;
+ }
+ } else {
+ // Slow start
+ currentMaxReqsInFlight.set(pre + 1);
}
- } else {
- // Slow start
- currentMaxReqsInFlight++;
}
}
}
private void congestionControl() {
- synchronized (currentMaxReqsInFlight) {
- if (currentMaxReqsInFlight <= 1) {
- currentMaxReqsInFlight = 1;
- } else {
- currentMaxReqsInFlight = currentMaxReqsInFlight / 2;
- }
- maxInFlight = currentMaxReqsInFlight;
+ maxInFlight =
+ currentMaxReqsInFlight.getAndUpdate(
+ pre -> {
+ if (pre <= 1) {
+ return 1;
+ } else {
+ return pre / 2;
+ }
+ });
+
+ synchronized (congestionAvoidanceFlag) {
+ congestionAvoidanceFlag = 0;
Review Comment:
Nice catch!
##########
client/src/main/java/org/apache/celeborn/client/ShuffleClientImpl.java:
##########
@@ -1267,30 +1275,48 @@ public void setupMetaServiceRef(RpcEndpointRef endpointRef) {
driverRssMetaService = endpointRef;
}
+ /**
+ * If `pushDataSlowStart` is enabled, will increase `currentMaxReqsInFlight` gradually to meet the
+ * max push speed.
+ *
+ * <p>1. slow start period: every RTT period, `currentMaxReqsInFlight` is multiplied. 2.congestion
+ * avoidance: every RTT period, `currentMaxReqsInFlight` plus 1.
Review Comment:
```
* <p>1. slow start period: every RTT period, `currentMaxReqsInFlight` is multiplied.
* <p>2. congestion avoidance: every RTT period, `currentMaxReqsInFlight` plus 1.
```
--
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@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] AngersZhuuuu commented on a diff in pull request #1119: [CELEBORN-61][CELEBORN-62][FOLLOW_UP] Fix some issues for slow start
Posted by GitBox <gi...@apache.org>.
AngersZhuuuu commented on code in PR #1119:
URL: https://github.com/apache/incubator-celeborn/pull/1119#discussion_r1058085554
##########
client/src/main/java/org/apache/celeborn/client/ShuffleClientImpl.java:
##########
@@ -1267,30 +1275,44 @@ public void setupMetaServiceRef(RpcEndpointRef endpointRef) {
driverRssMetaService = endpointRef;
}
+ /**
+ * If `pushDataSlowStart` is enabled, will increase `currentMaxReqsInFlight` gradually to meet the
+ * max push speed.
+ *
+ * <p>1. slow start period: every RTT period, `currentMaxReqsInFlight` is multiplied.
+ *
+ * <p>2.congestion avoidance: every RTT period, `currentMaxReqsInFlight` plus 1.
Review Comment:
add a blank in `.` and `congestion`
--
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@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] boneanxs commented on a diff in pull request #1119: [CELEBORN-61][CELEBORN-62][FOLLOW_UP] Fix some issues for slow start
Posted by GitBox <gi...@apache.org>.
boneanxs commented on code in PR #1119:
URL: https://github.com/apache/incubator-celeborn/pull/1119#discussion_r1058254981
##########
client/src/main/java/org/apache/celeborn/client/ShuffleClientImpl.java:
##########
@@ -1267,30 +1275,44 @@ public void setupMetaServiceRef(RpcEndpointRef endpointRef) {
driverRssMetaService = endpointRef;
}
+ /**
+ * If `pushDataSlowStart` is enabled, will increase `currentMaxReqsInFlight` gradually to meet the
+ * max push speed.
+ *
+ * <p>1. slow start period: every RTT period, `currentMaxReqsInFlight` is multiplied.
+ *
+ * <p>2.congestion avoidance: every RTT period, `currentMaxReqsInFlight` plus 1.
Review Comment:
done
--
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@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] waitinfuture commented on a diff in pull request #1119: [CELEBORN-61][CELEBORN-62][FOLLOW_UP] Fix some issues for slow start
Posted by GitBox <gi...@apache.org>.
waitinfuture commented on code in PR #1119:
URL: https://github.com/apache/incubator-celeborn/pull/1119#discussion_r1057650727
##########
client/src/main/java/org/apache/celeborn/client/ShuffleClientImpl.java:
##########
@@ -1268,29 +1276,37 @@ public void setupMetaServiceRef(RpcEndpointRef endpointRef) {
}
private void slowStart() {
- synchronized (currentMaxReqsInFlight) {
- if (currentMaxReqsInFlight > maxInFlight) {
- // Congestion avoidance
- congestionAvoidanceFlag++;
- if (congestionAvoidanceFlag >= currentMaxReqsInFlight) {
- currentMaxReqsInFlight++;
- congestionAvoidanceFlag = 0;
+ if (conf.pushDataSlowStart()) {
Review Comment:
I think changing currentMaxReqsInFlight to AtomicInteger is enough, no need to change here.
##########
client/src/main/java/org/apache/celeborn/client/ShuffleClientImpl.java:
##########
@@ -1268,29 +1276,37 @@ public void setupMetaServiceRef(RpcEndpointRef endpointRef) {
}
private void slowStart() {
- synchronized (currentMaxReqsInFlight) {
- if (currentMaxReqsInFlight > maxInFlight) {
- // Congestion avoidance
- congestionAvoidanceFlag++;
- if (congestionAvoidanceFlag >= currentMaxReqsInFlight) {
- currentMaxReqsInFlight++;
- congestionAvoidanceFlag = 0;
+ if (conf.pushDataSlowStart()) {
+ synchronized (congestionAvoidanceFlag) {
+ int pre = currentMaxReqsInFlight.get();
+ if (pre > maxInFlight) {
+ // Congestion avoidance
+ congestionAvoidanceFlag++;
+ if (congestionAvoidanceFlag >= pre) {
+ currentMaxReqsInFlight.set(pre + 1);
+ congestionAvoidanceFlag = 0;
+ }
+ } else {
+ // Slow start
+ currentMaxReqsInFlight.set(pre + 1);
}
- } else {
- // Slow start
- currentMaxReqsInFlight++;
}
}
}
private void congestionControl() {
- synchronized (currentMaxReqsInFlight) {
- if (currentMaxReqsInFlight <= 1) {
- currentMaxReqsInFlight = 1;
- } else {
- currentMaxReqsInFlight = currentMaxReqsInFlight / 2;
- }
- maxInFlight = currentMaxReqsInFlight;
+ maxInFlight =
Review Comment:
ditto
--
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@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] waitinfuture commented on pull request #1119: [CELEBORN-61][CELEBORN-62][FOLLOW_UP] Fix some issues for slow start
Posted by GitBox <gi...@apache.org>.
waitinfuture commented on PR #1119:
URL: https://github.com/apache/incubator-celeborn/pull/1119#issuecomment-1365866203
Plz update doc by
```
UPDATE=1 build/mvn clean test -pl common -am -Pspark-3.3 -Dtest=none -DwildcardSuites=org.apache.celeborn.ConfigurationSuite
```
--
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@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-celeborn] waitinfuture commented on a diff in pull request #1119: [CELEBORN-61][CELEBORN-62][FOLLOW_UP] Fix some issues for slow start
Posted by GitBox <gi...@apache.org>.
waitinfuture commented on code in PR #1119:
URL: https://github.com/apache/incubator-celeborn/pull/1119#discussion_r1058030375
##########
client/src/main/java/org/apache/celeborn/client/ShuffleClientImpl.java:
##########
@@ -1268,29 +1276,37 @@ public void setupMetaServiceRef(RpcEndpointRef endpointRef) {
}
private void slowStart() {
- synchronized (currentMaxReqsInFlight) {
- if (currentMaxReqsInFlight > maxInFlight) {
- // Congestion avoidance
- congestionAvoidanceFlag++;
- if (congestionAvoidanceFlag >= currentMaxReqsInFlight) {
- currentMaxReqsInFlight++;
- congestionAvoidanceFlag = 0;
+ if (conf.pushDataSlowStart()) {
Review Comment:
I mean we can remain the original code structure on the left, no need to change, since slowStart and congestionControl are protected by locking currentMaxReqsInFlight.
--
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@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org