Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CELEBORN-1792] MemoryManager resume should use pinnedDirectMemory instead of usedDirectMemory #3018

Closed
wants to merge 18 commits into from
Prev Previous commit
Next Next commit
fix
leixm committed Jan 17, 2025
commit 2d5c9b9424e4868e780efe19c1c92b00f145c36d
Original file line number Diff line number Diff line change
@@ -301,14 +301,24 @@ public boolean shouldEvict(boolean aggressiveMemoryFileEvictEnabled, double evic

public ServingState currentServingState() {
long memoryUsage = getMemoryUsage();
boolean resumeByPinnedMemory = canResumeByPinnedMemory();
// pause replicate threshold always greater than pause push data threshold
// so when trigger pause replicate, pause both push and replicate
if (memoryUsage > pauseReplicateThreshold) {
if (resumeByPinnedMemory) {
resumeReplicate();
resumePush();
trimAllListeners();
}
isPaused = true;
return ServingState.PUSH_AND_REPLICATE_PAUSED;
}
// trigger pause only push
if (memoryUsage > pausePushDataThreshold) {
if (resumeByPinnedMemory) {
resumePush();
trimAllListeners();
}
isPaused = true;
return ServingState.PUSH_PAUSED;
}