You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by "CodingCat (via GitHub)" <gi...@apache.org> on 2024/03/13 19:05:16 UTC

[PR] [CELEBORN-1309]cap the max memory can be used for sort buffer [incubator-celeborn]

CodingCat opened a new pull request, #2388:
URL: https://github.com/apache/incubator-celeborn/pull/2388

   <!--
   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?
   
   add a new parameter to cap the max memory can be used for sort writer buffer
   
   ### Why are the changes needed?
   
   with a huge number of partitions, the threshold based on buffer size * number of partitions without this cap can be too large, e.g. 64K * 100000 = 6G
   
   ### Does this PR introduce _any_ user-facing change?
   
   a new parameter
   
   ### 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@celeborn.apache.org

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


Re: [PR] [CELEBORN-1309][FOLLOWUP]cap the max memory can be used for sort buffer [incubator-celeborn]

Posted by "cfmcgrady (via GitHub)" <gi...@apache.org>.
cfmcgrady commented on code in PR #2388:
URL: https://github.com/apache/incubator-celeborn/pull/2388#discussion_r1524715295


##########
common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala:
##########
@@ -4055,6 +4057,17 @@ object CelebornConf extends Logging {
       .checkValue(v => v >= 0.0, "Value must be no less than 0")
       .createWithDefault(0.2)
 
+  val CLIENT_PUSH_SORT_MAX_MEMORY_FACTOR: ConfigEntry[Double] =
+    buildConf("celeborn.client.spark.push.sort.memory.maxMemoryFactor")
+      .withAlternative("celeborn.push.sortMemory.maxMemoryFactor")
+      .categories("client")
+      .doc("the max portion of executor memory which can be used for SortBasedWriter buffer (only" +
+        " valid when celeborn.client.spark.push.sort.memory.useAdaptiveThreshold is enabled")
+      .version("0.5.0")
+      .doubleConf
+      .checkValue(v => v >= 0.0 && v <= 1.0, "Value must be no less than 0 and no larger than 1")

Review Comment:
   ```suggestion
         .checkValue(v => v > 0.0 && v <= 1.0, "Value must be between 0 and 1 (inclusive)")
   ```



-- 
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


Re: [PR] [CELEBORN-1309][FOLLOWUP] Cap the max memory can be used for sort buffer [incubator-celeborn]

Posted by "CodingCat (via GitHub)" <gi...@apache.org>.
CodingCat commented on code in PR #2388:
URL: https://github.com/apache/incubator-celeborn/pull/2388#discussion_r1525048752


##########
common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala:
##########
@@ -4055,6 +4057,17 @@ object CelebornConf extends Logging {
       .checkValue(v => v >= 0.0, "Value must be no less than 0")
       .createWithDefault(0.2)
 
+  val CLIENT_PUSH_SORT_MAX_MEMORY_FACTOR: ConfigEntry[Double] =
+    buildConf("celeborn.client.spark.push.sort.memory.maxMemoryFactor")
+      .withAlternative("celeborn.push.sortMemory.maxMemoryFactor")
+      .categories("client")
+      .doc("the max portion of executor memory which can be used for SortBasedWriter buffer (only" +
+        " valid when celeborn.client.spark.push.sort.memory.useAdaptiveThreshold is enabled")
+      .version("0.5.0")
+      .doubleConf
+      .checkValue(v => v >= 0.0 && v <= 1.0, "Value must be no less than 0 and no larger than 1")

Review Comment:
   updated



-- 
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


Re: [PR] [CELEBORN-1309][FOLLOWUP] Cap the max memory can be used for sort buffer [incubator-celeborn]

Posted by "CodingCat (via GitHub)" <gi...@apache.org>.
CodingCat commented on PR #2388:
URL: https://github.com/apache/incubator-celeborn/pull/2388#issuecomment-2004138514

   @waitinfuture ping for review


-- 
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


Re: [PR] [CELEBORN-1309][FOLLOWUP] Cap the max memory can be used for sort buffer [incubator-celeborn]

Posted by "CodingCat (via GitHub)" <gi...@apache.org>.
CodingCat commented on code in PR #2388:
URL: https://github.com/apache/incubator-celeborn/pull/2388#discussion_r1525048289


##########
common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala:
##########
@@ -4040,8 +4042,8 @@ object CelebornConf extends Logging {
       .createWithDefault(false)
 
   val CLIENT_PUSH_SORT_SMALL_PUSH_TOLERATE_FACTOR: ConfigEntry[Double] =
-    buildConf("celeborn.client.spark.push.sort.smallPushTolerateFactor")
-      .withAlternative("celeborn.push.sortMemory.adaptiveThreshold")
+    buildConf("celeborn.client.spark.push.sort.memory.smallPushTolerateFactor")
+      .withAlternative("celeborn.push.sortMemory.smallPushTolerateFactor")

Review Comment:
   updated



##########
common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala:
##########
@@ -4055,6 +4057,17 @@ object CelebornConf extends Logging {
       .checkValue(v => v >= 0.0, "Value must be no less than 0")
       .createWithDefault(0.2)
 
+  val CLIENT_PUSH_SORT_MAX_MEMORY_FACTOR: ConfigEntry[Double] =
+    buildConf("celeborn.client.spark.push.sort.memory.maxMemoryFactor")
+      .withAlternative("celeborn.push.sortMemory.maxMemoryFactor")

Review Comment:
   updated



-- 
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


Re: [PR] [CELEBORN-1309][FOLLOWUP] Cap the max memory can be used for sort buffer [incubator-celeborn]

Posted by "RexXiong (via GitHub)" <gi...@apache.org>.
RexXiong commented on code in PR #2388:
URL: https://github.com/apache/incubator-celeborn/pull/2388#discussion_r1531473681


##########
common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala:
##########
@@ -4055,6 +4055,16 @@ object CelebornConf extends Logging {
       .checkValue(v => v >= 0.0, "Value must be no less than 0")
       .createWithDefault(0.2)
 
+  val CLIENT_PUSH_SORT_MAX_MEMORY_FACTOR: ConfigEntry[Double] =
+    buildConf("celeborn.client.spark.push.sort.memory.maxMemoryFactor")
+      .categories("client")
+      .doc("the max portion of executor memory which can be used for SortBasedWriter buffer (only" +
+        " valid when celeborn.client.spark.push.sort.memory.useAdaptiveThreshold is enabled")

Review Comment:
   Maybe you can use ${CLIENT_PUSH_SORT_USE_ADAPTIVE_MEMORY_THRESHOLD.key} instead of hardcodig



-- 
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


Re: [PR] [CELEBORN-1309][FOLLOWUP]cap the max memory can be used for sort buffer [incubator-celeborn]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #2388:
URL: https://github.com/apache/incubator-celeborn/pull/2388#issuecomment-1995681117

   ## [Codecov](https://app.codecov.io/gh/apache/incubator-celeborn/pull/2388?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   Attention: Patch coverage is `81.81818%` with `2 lines` in your changes are missing coverage. Please review.
   > Project coverage is 48.88%. Comparing base [(`23269d7`)](https://app.codecov.io/gh/apache/incubator-celeborn/commit/23269d77e97001321bf8371b769192f33e0acffb?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`4ffcc78`)](https://app.codecov.io/gh/apache/incubator-celeborn/pull/2388?dropdown=coverage&src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   
   | [Files](https://app.codecov.io/gh/apache/incubator-celeborn/pull/2388?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...cala/org/apache/celeborn/common/CelebornConf.scala](https://app.codecov.io/gh/apache/incubator-celeborn/pull/2388?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29tbW9uL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvY2VsZWJvcm4vY29tbW9uL0NlbGVib3JuQ29uZi5zY2FsYQ==) | 81.82% | [1 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/incubator-celeborn/pull/2388?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@            Coverage Diff             @@
   ##             main    #2388      +/-   ##
   ==========================================
   + Coverage   48.86%   48.88%   +0.03%     
   ==========================================
     Files         209      209              
     Lines       13109    13118       +9     
     Branches     1134     1135       +1     
   ==========================================
   + Hits         6404     6412       +8     
   - Misses       6283     6284       +1     
     Partials      422      422              
   ```
   
   
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/incubator-celeborn/pull/2388?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   


-- 
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


Re: [PR] [CELEBORN-1309][FOLLOWUP]cap the max memory can be used for sort buffer [incubator-celeborn]

Posted by "cfmcgrady (via GitHub)" <gi...@apache.org>.
cfmcgrady commented on code in PR #2388:
URL: https://github.com/apache/incubator-celeborn/pull/2388#discussion_r1524715295


##########
common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala:
##########
@@ -4055,6 +4057,17 @@ object CelebornConf extends Logging {
       .checkValue(v => v >= 0.0, "Value must be no less than 0")
       .createWithDefault(0.2)
 
+  val CLIENT_PUSH_SORT_MAX_MEMORY_FACTOR: ConfigEntry[Double] =
+    buildConf("celeborn.client.spark.push.sort.memory.maxMemoryFactor")
+      .withAlternative("celeborn.push.sortMemory.maxMemoryFactor")
+      .categories("client")
+      .doc("the max portion of executor memory which can be used for SortBasedWriter buffer (only" +
+        " valid when celeborn.client.spark.push.sort.memory.useAdaptiveThreshold is enabled")
+      .version("0.5.0")
+      .doubleConf
+      .checkValue(v => v >= 0.0 && v <= 1.0, "Value must be no less than 0 and no larger than 1")

Review Comment:
   ```suggestion
         .checkValue(v => v > 0.0 && v <= 1.0, "Value must be no less than 0 and no larger than 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


Re: [PR] [CELEBORN-1309][FOLLOWUP]cap the max memory can be used for sort buffer [incubator-celeborn]

Posted by "cfmcgrady (via GitHub)" <gi...@apache.org>.
cfmcgrady commented on code in PR #2388:
URL: https://github.com/apache/incubator-celeborn/pull/2388#discussion_r1524712014


##########
common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala:
##########
@@ -4040,8 +4042,8 @@ object CelebornConf extends Logging {
       .createWithDefault(false)
 
   val CLIENT_PUSH_SORT_SMALL_PUSH_TOLERATE_FACTOR: ConfigEntry[Double] =
-    buildConf("celeborn.client.spark.push.sort.smallPushTolerateFactor")
-      .withAlternative("celeborn.push.sortMemory.adaptiveThreshold")
+    buildConf("celeborn.client.spark.push.sort.memory.smallPushTolerateFactor")
+      .withAlternative("celeborn.push.sortMemory.smallPushTolerateFactor")

Review Comment:
   the alternative conf key is unnecessary.



-- 
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


Re: [PR] [CELEBORN-1309][FOLLOWUP]cap the max memory can be used for sort buffer [incubator-celeborn]

Posted by "cfmcgrady (via GitHub)" <gi...@apache.org>.
cfmcgrady commented on code in PR #2388:
URL: https://github.com/apache/incubator-celeborn/pull/2388#discussion_r1524712556


##########
common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala:
##########
@@ -4055,6 +4057,17 @@ object CelebornConf extends Logging {
       .checkValue(v => v >= 0.0, "Value must be no less than 0")
       .createWithDefault(0.2)
 
+  val CLIENT_PUSH_SORT_MAX_MEMORY_FACTOR: ConfigEntry[Double] =
+    buildConf("celeborn.client.spark.push.sort.memory.maxMemoryFactor")
+      .withAlternative("celeborn.push.sortMemory.maxMemoryFactor")

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


Re: [PR] [CELEBORN-1309][FOLLOWUP] Cap the max memory can be used for sort buffer [incubator-celeborn]

Posted by "waitinfuture (via GitHub)" <gi...@apache.org>.
waitinfuture closed pull request #2388: [CELEBORN-1309][FOLLOWUP] Cap the max memory can be used for sort buffer
URL: https://github.com/apache/incubator-celeborn/pull/2388


-- 
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