You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by "FMX (via GitHub)" <gi...@apache.org> on 2025/02/05 06:29:58 UTC
[PR] [CELEBORN-1792][FOLLOWUP] Skip unnecessary checks when there is no memory pressure [celeborn]
FMX opened a new pull request, #3084:
URL: https://github.com/apache/celeborn/pull/3084
### What changes were proposed in this pull request?
Remove unnecessary logs.
<img width="921" alt="截屏2025-02-05 14 29 43" src="https://github.com/user-attachments/assets/ab05f96b-abc0-4d68-a416-82655cd7cd13" />
### Why are the changes needed?
Do not need to log the memory state when there is no memory pressure.
### Does this PR introduce _any_ user-facing change?
NO.
### How was this patch tested?
GA and cluster tests.
--
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-1792][FOLLOWUP] Skip unnecessary checks when there is no memory pressure [celeborn]
Posted by "FMX (via GitHub)" <gi...@apache.org>.
FMX commented on code in PR #3084:
URL: https://github.com/apache/celeborn/pull/3084#discussion_r1944277367
##########
worker/src/main/java/org/apache/celeborn/service/deploy/worker/memory/MemoryManager.java:
##########
@@ -330,6 +330,11 @@ public ServingState currentServingState() {
public void switchServingState() {
ServingState lastState = servingState;
servingState = currentServingState();
+ if (servingState == lastState && servingState == ServingState.NONE_PAUSED) {
+ // this means that there is no memory pressure here
+ // skip the rest check logic of memory checker
+ return;
+ }
logger.info("Serving state transformed from {} to {}", lastState, servingState);
Review Comment:
Sounds good to me. I'll update this PR.
--
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-1792][FOLLOWUP] Skip unnecessary checks when there is no memory pressure [celeborn]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #3084:
URL: https://github.com/apache/celeborn/pull/3084#discussion_r1944054470
##########
worker/src/main/java/org/apache/celeborn/service/deploy/worker/memory/MemoryManager.java:
##########
@@ -330,6 +330,11 @@ public ServingState currentServingState() {
public void switchServingState() {
ServingState lastState = servingState;
servingState = currentServingState();
+ if (servingState == lastState && servingState == ServingState.NONE_PAUSED) {
+ // this means that there is no memory pressure here
+ // skip the rest check logic of memory checker
+ return;
+ }
logger.info("Serving state transformed from {} to {}", lastState, servingState);
Review Comment:
how about simply wrapping the logging stmt with `if (servingState != lastState)`?
this is not the perf-sensitive code path, better to avoid introducing additional control flow
--
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-1792][FOLLOWUP] Skip unnecessary checks when there is no memory pressure [celeborn]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #3084:
URL: https://github.com/apache/celeborn/pull/3084#discussion_r1944054470
##########
worker/src/main/java/org/apache/celeborn/service/deploy/worker/memory/MemoryManager.java:
##########
@@ -330,6 +330,11 @@ public ServingState currentServingState() {
public void switchServingState() {
ServingState lastState = servingState;
servingState = currentServingState();
+ if (servingState == lastState && servingState == ServingState.NONE_PAUSED) {
+ // this means that there is no memory pressure here
+ // skip the rest check logic of memory checker
+ return;
+ }
logger.info("Serving state transformed from {} to {}", lastState, servingState);
Review Comment:
how about simply wrapping the logging stmt with `if (servingState != lastState)`?
if this is not the perf-sensitive code path, better to avoid introducing additional control flow
--
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-1792][FOLLOWUP] Suppress noisy logs when there is no memory pressure [celeborn]
Posted by "RexXiong (via GitHub)" <gi...@apache.org>.
RexXiong closed pull request #3084: [CELEBORN-1792][FOLLOWUP] Suppress noisy logs when there is no memory pressure
URL: https://github.com/apache/celeborn/pull/3084
--
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