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-1577][Phase2] QuotaManager should support interrupt shuffle. #2819

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

leixm
Copy link
Contributor

@leixm leixm commented Oct 17, 2024

What changes were proposed in this pull request?

  1. Worker reports resourceConsumption to master
  2. QuotaManager calculates the resourceConsumption of each app and marks the apps that exceed the quota.
    2.1 When the tenant's resourceConsumption exceeds the tenant's quota, select the app with a larger consumption to mark interrupted.
    2.2 When the resourceConsumption of the cluster exceeds the cluster quota, select the app with larger consumption to mark interrupted.
  3. Master returns to Driver through heartbeat, whether app is marked interrupted

Why are the changes needed?

The current storage quota logic can only limit new shuffles, and cannot limit the writing of existing shuffles. In our production environment, there is such an scenario: the cluster is small, but the user's app single shuffle is large which occupied disk resources, we want to interrupt those shuffle.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

UTs.

Copy link
Contributor

@RexXiong RexXiong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls resolve the conficts~

@@ -671,8 +671,14 @@ private[celeborn] class Worker(
val resourceConsumptionSnapshot = storageManager.userResourceConsumptionSnapshot()
val userResourceConsumptions =
workerInfo.updateThenGetUserResourceConsumption(resourceConsumptionSnapshot.asJava)
resourceConsumptionSnapshot.foreach { case (userIdentifier, _) =>
resourceConsumptionSnapshot.foreach { case (userIdentifier, userResourceConsumption) =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better not persist resourceConsumption into ratis When worker heartbeat subResourceConsumption

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense.

masterSource.sample(UPDATE_RESOURCE_CONSUMPTION_TIME, this.getClass.getSimpleName, Map.empty) {
val clusterQuota = getClusterStorageQuota
var clusterResourceConsumption = ResourceConsumption(0, 0, 0, 0)
val userResourceConsumption = statusSystem.workerSnapshot.asScala.flatMap { workerInfo =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lack of tenant-level quota checks.

@@ -504,4 +501,10 @@ public boolean isWorkerAvailable(WorkerInfo workerInfo) {
public void updateApplicationMeta(ApplicationMeta applicationMeta) {
applicationMetas.putIfAbsent(applicationMeta.appId(), applicationMeta);
}

public List<WorkerInfo> workerSnapshot() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not directly use workers for computing resource consumption?

quotaChecker.scheduleWithFixedDelay(
() => {
try {
updateResourceConsumption()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this method not ly update source consumption but also check quota for user-level, app-level, so may use another name or separate the logic

Copy link

This PR is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@leixm
Copy link
Contributor Author

leixm commented Dec 4, 2024

I will fix above problems later.

@github-actions github-actions bot removed the stale label Dec 4, 2024
@leixm leixm changed the title [WIP][CELEBORN-1577][Phase2] QuotaManager should support interrupt shuffle. [CELEBORN-1577][Phase2] QuotaManager should support interrupt shuffle. Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants