You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@celeborn.apache.org by GitBox <gi...@apache.org> on 2022/12/01 04:36:53 UTC

[GitHub] [incubator-celeborn] FMX opened a new pull request, #1038: [CELEBORN-91] Refactor memory tracker to support read buffer.

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

   # [CELEBORN-91] Refactor memory tracker to support read buffer.
   
   ### What changes were proposed in this pull request?
   
   
   ### Why are the changes needed?
   
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   ### What are the items that need reviewer attention?
   
   
   ### Related issues.
   
   
   ### Related pull requests.
   
   
   ### How was this patch tested?
   
   
   /cc @related-reviewer
   
   /assign @main-reviewer
   


-- 
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: dev-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 #1038: [CELEBORN-91] Refactor memory tracker to support read buffer.

Posted by GitBox <gi...@apache.org>.
AngersZhuuuu commented on code in PR #1038:
URL: https://github.com/apache/incubator-celeborn/pull/1038#discussion_r1039090858


##########
common/src/main/java/org/apache/celeborn/common/network/server/memory/MemoryManager.java:
##########
@@ -38,69 +39,85 @@
 import org.apache.celeborn.common.util.ThreadUtils;
 import org.apache.celeborn.common.util.Utils;
 
-public class MemoryTracker {
-  private static final Logger logger = LoggerFactory.getLogger(MemoryTracker.class);
-  private static volatile MemoryTracker _INSTANCE = null;
+public class MemoryManager {
+  private static final Logger logger = LoggerFactory.getLogger(MemoryManager.class);
+  private static volatile MemoryManager _INSTANCE = null;
   private long maxDirectorMemory = 0;
   private final long pausePushDataThreshold;
   private final long pauseReplicateThreshold;
   private final long resumeThreshold;
   private final long maxSortMemory;
-  private final List<MemoryTrackerListener> memoryTrackerListeners = new ArrayList<>();
+  private final List<MemoryPressureListener> memoryPressureListeners = new ArrayList<>();
 
   private final ScheduledExecutorService checkService =
-      ThreadUtils.newDaemonSingleThreadScheduledExecutor("memory-tracker-check");
+      ThreadUtils.newDaemonSingleThreadScheduledExecutor("memory-manager-check");

Review Comment:
   `memory-manager-checker`?



##########
common/src/main/java/org/apache/celeborn/common/network/server/memory/MemoryManager.java:
##########
@@ -38,69 +39,85 @@
 import org.apache.celeborn.common.util.ThreadUtils;
 import org.apache.celeborn.common.util.Utils;
 
-public class MemoryTracker {
-  private static final Logger logger = LoggerFactory.getLogger(MemoryTracker.class);
-  private static volatile MemoryTracker _INSTANCE = null;
+public class MemoryManager {
+  private static final Logger logger = LoggerFactory.getLogger(MemoryManager.class);
+  private static volatile MemoryManager _INSTANCE = null;
   private long maxDirectorMemory = 0;
   private final long pausePushDataThreshold;
   private final long pauseReplicateThreshold;
   private final long resumeThreshold;
   private final long maxSortMemory;
-  private final List<MemoryTrackerListener> memoryTrackerListeners = new ArrayList<>();
+  private final List<MemoryPressureListener> memoryPressureListeners = new ArrayList<>();
 
   private final ScheduledExecutorService checkService =
-      ThreadUtils.newDaemonSingleThreadScheduledExecutor("memory-tracker-check");
+      ThreadUtils.newDaemonSingleThreadScheduledExecutor("memory-manager-check");
 
   private final ScheduledExecutorService reportService =
-      ThreadUtils.newDaemonSingleThreadScheduledExecutor("memory-tracker-report");
+      ThreadUtils.newDaemonSingleThreadScheduledExecutor("memory-manager-reporter");
 
   private final ExecutorService actionService =
-      ThreadUtils.newDaemonSingleThreadExecutor("memory-tracker-action");
+      ThreadUtils.newDaemonSingleThreadExecutor("memory-manager-action");

Review Comment:
   `memory-manager-actor`?



-- 
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] FMX commented on a diff in pull request #1038: [CELEBORN-91] Refactor memory tracker to support read buffer.

Posted by GitBox <gi...@apache.org>.
FMX commented on code in PR #1038:
URL: https://github.com/apache/incubator-celeborn/pull/1038#discussion_r1039093734


##########
common/src/main/java/org/apache/celeborn/common/network/server/memory/MemoryManager.java:
##########
@@ -38,69 +39,85 @@
 import org.apache.celeborn.common.util.ThreadUtils;
 import org.apache.celeborn.common.util.Utils;
 
-public class MemoryTracker {
-  private static final Logger logger = LoggerFactory.getLogger(MemoryTracker.class);
-  private static volatile MemoryTracker _INSTANCE = null;
+public class MemoryManager {
+  private static final Logger logger = LoggerFactory.getLogger(MemoryManager.class);
+  private static volatile MemoryManager _INSTANCE = null;
   private long maxDirectorMemory = 0;
   private final long pausePushDataThreshold;
   private final long pauseReplicateThreshold;
   private final long resumeThreshold;
   private final long maxSortMemory;
-  private final List<MemoryTrackerListener> memoryTrackerListeners = new ArrayList<>();
+  private final List<MemoryPressureListener> memoryPressureListeners = new ArrayList<>();
 
   private final ScheduledExecutorService checkService =
-      ThreadUtils.newDaemonSingleThreadScheduledExecutor("memory-tracker-check");
+      ThreadUtils.newDaemonSingleThreadScheduledExecutor("memory-manager-check");

Review Comment:
   Yes, it should because the memory tracker will have to manage the read buffer and memory stored shuffle data. So it is renamed now.



-- 
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] FMX commented on a diff in pull request #1038: [CELEBORN-91] Refactor memory tracker to support read buffer.

Posted by GitBox <gi...@apache.org>.
FMX commented on code in PR #1038:
URL: https://github.com/apache/incubator-celeborn/pull/1038#discussion_r1039105983


##########
common/src/main/java/org/apache/celeborn/common/network/server/memory/MemoryManager.java:
##########
@@ -38,69 +39,85 @@
 import org.apache.celeborn.common.util.ThreadUtils;
 import org.apache.celeborn.common.util.Utils;
 
-public class MemoryTracker {
-  private static final Logger logger = LoggerFactory.getLogger(MemoryTracker.class);
-  private static volatile MemoryTracker _INSTANCE = null;
+public class MemoryManager {
+  private static final Logger logger = LoggerFactory.getLogger(MemoryManager.class);
+  private static volatile MemoryManager _INSTANCE = null;
   private long maxDirectorMemory = 0;
   private final long pausePushDataThreshold;
   private final long pauseReplicateThreshold;
   private final long resumeThreshold;
   private final long maxSortMemory;
-  private final List<MemoryTrackerListener> memoryTrackerListeners = new ArrayList<>();
+  private final List<MemoryPressureListener> memoryPressureListeners = new ArrayList<>();
 
   private final ScheduledExecutorService checkService =
-      ThreadUtils.newDaemonSingleThreadScheduledExecutor("memory-tracker-check");
+      ThreadUtils.newDaemonSingleThreadScheduledExecutor("memory-manager-check");

Review Comment:
   OK, updated.



##########
common/src/main/java/org/apache/celeborn/common/network/server/memory/MemoryManager.java:
##########
@@ -38,69 +39,85 @@
 import org.apache.celeborn.common.util.ThreadUtils;
 import org.apache.celeborn.common.util.Utils;
 
-public class MemoryTracker {
-  private static final Logger logger = LoggerFactory.getLogger(MemoryTracker.class);
-  private static volatile MemoryTracker _INSTANCE = null;
+public class MemoryManager {
+  private static final Logger logger = LoggerFactory.getLogger(MemoryManager.class);
+  private static volatile MemoryManager _INSTANCE = null;
   private long maxDirectorMemory = 0;
   private final long pausePushDataThreshold;
   private final long pauseReplicateThreshold;
   private final long resumeThreshold;
   private final long maxSortMemory;
-  private final List<MemoryTrackerListener> memoryTrackerListeners = new ArrayList<>();
+  private final List<MemoryPressureListener> memoryPressureListeners = new ArrayList<>();
 
   private final ScheduledExecutorService checkService =
-      ThreadUtils.newDaemonSingleThreadScheduledExecutor("memory-tracker-check");
+      ThreadUtils.newDaemonSingleThreadScheduledExecutor("memory-manager-check");
 
   private final ScheduledExecutorService reportService =
-      ThreadUtils.newDaemonSingleThreadScheduledExecutor("memory-tracker-report");
+      ThreadUtils.newDaemonSingleThreadScheduledExecutor("memory-manager-reporter");
 
   private final ExecutorService actionService =
-      ThreadUtils.newDaemonSingleThreadExecutor("memory-tracker-action");
+      ThreadUtils.newDaemonSingleThreadExecutor("memory-manager-action");

Review Comment:
   OK, 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


[GitHub] [incubator-celeborn] AngersZhuuuu commented on a diff in pull request #1038: [CELEBORN-91] Refactor memory tracker to support read buffer.

Posted by GitBox <gi...@apache.org>.
AngersZhuuuu commented on code in PR #1038:
URL: https://github.com/apache/incubator-celeborn/pull/1038#discussion_r1039104580


##########
common/src/main/java/org/apache/celeborn/common/network/server/memory/MemoryManager.java:
##########
@@ -38,69 +39,85 @@
 import org.apache.celeborn.common.util.ThreadUtils;
 import org.apache.celeborn.common.util.Utils;
 
-public class MemoryTracker {
-  private static final Logger logger = LoggerFactory.getLogger(MemoryTracker.class);
-  private static volatile MemoryTracker _INSTANCE = null;
+public class MemoryManager {
+  private static final Logger logger = LoggerFactory.getLogger(MemoryManager.class);
+  private static volatile MemoryManager _INSTANCE = null;
   private long maxDirectorMemory = 0;
   private final long pausePushDataThreshold;
   private final long pauseReplicateThreshold;
   private final long resumeThreshold;
   private final long maxSortMemory;
-  private final List<MemoryTrackerListener> memoryTrackerListeners = new ArrayList<>();
+  private final List<MemoryPressureListener> memoryPressureListeners = new ArrayList<>();
 
   private final ScheduledExecutorService checkService =
-      ThreadUtils.newDaemonSingleThreadScheduledExecutor("memory-tracker-check");
+      ThreadUtils.newDaemonSingleThreadScheduledExecutor("memory-manager-check");

Review Comment:
   I mean should use `checker`?



-- 
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 pull request #1038: [CELEBORN-91] Refactor memory tracker to support read buffer.

Posted by GitBox <gi...@apache.org>.
AngersZhuuuu commented on PR #1038:
URL: https://github.com/apache/incubator-celeborn/pull/1038#issuecomment-1336824350

   Need resolve conflicts


-- 
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 merged pull request #1038: [CELEBORN-91] Refactor memory tracker to support read buffer.

Posted by GitBox <gi...@apache.org>.
AngersZhuuuu merged PR #1038:
URL: https://github.com/apache/incubator-celeborn/pull/1038


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