Skip to content

CapacityWithGroupPresence: only apply continuous penalty above the presence floor (#44) - #44

Open
yangneu2015 wants to merge 2 commits into
mainfrom
export-D109896755
Open

CapacityWithGroupPresence: only apply continuous penalty above the presence floor (#44)#44
yangneu2015 wants to merge 2 commits into
mainfrom
export-D109896755

Conversation

@yangneu2015

@yangneu2015 yangneu2015 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary:

The Problem

Continuous penalty is applied unconditionally so it also fired while a group was pinned at its presence-weight floor. This means reducing utilization cannot improve the constraint violation when presence weight is higher than limit, so it drove large numbers of futile moves.

The Fix

  • Make the penalty to be applied only while the actual utilization exceeds the presence-weight.
  • To avoid surprising behavior changes to clients, this change is only enabled when forcePresent feature (newly introduced in D109896725) is used.
  • MIN bounds are not impacted by this change, only MAX.

Differential Revision: D109896755

@meta-cla meta-cla Bot added the cla signed label Jul 2, 2026
@meta-codesync

meta-codesync Bot commented Jul 2, 2026

Copy link
Copy Markdown

@yangneu2015 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D109896755.

@meta-codesync meta-codesync Bot changed the title CapacityWithGroupPresence: only apply continuous penalty above the presence floor CapacityWithGroupPresence: only apply continuous penalty above the presence floor (#44) Jul 2, 2026
meta-codesync Bot pushed a commit that referenced this pull request Jul 2, 2026
…esence floor (#44)

Summary:

### The Problem
Continuous penalty is applied unconditionally so it also fired while a group was pinned at its presence-weight floor. This means reducing utilization cannot improve the constraint violation when presence weight is higher than limit, so it drove large numbers of futile moves.

### The Fix
* Make the penalty to be applied only while the actual utilization exceeds the presence-weight.
* To avoid surprising behavior changes to clients, this change is only enabled when `forcePresent` feature (newly introduced in D109896725) is used.
* `MIN` bounds are not impacted by this change, only `MAX`.

Differential Revision: D109896755
@meta-codesync
meta-codesync Bot force-pushed the export-D109896755 branch from 45eddd3 to 01db22a Compare July 2, 2026 18:04
Summary:

Adds an optional `forcePresent` field to `CapacityWithGroupPresenceSpec`: a `Map<ScopeItem, List<Group>>`, for all the given scopeItem and group pair, presence-weight will always be honored even at zero utilization. This lets a caller declare exactly which pairs need presence honored, replacing the legacy frozen dummy-object pattern used in GSP IPNext.

Reviewed By: vj-menon

Differential Revision: D109896725
…esence floor (#44)

Summary:

### The Problem
Continuous penalty is applied unconditionally so it also fired while a group was pinned at its presence-weight floor. This means reducing utilization cannot improve the constraint violation when presence weight is higher than limit, so it drove large numbers of futile moves.

### The Fix
* Make the penalty to be applied only while the actual utilization exceeds the presence-weight.
* To avoid surprising behavior changes to clients, this change is only enabled when `forcePresent` feature (newly introduced in D109896725) is used.
* `MIN` bounds are not impacted by this change, only `MAX`.

Differential Revision: D109896755
@meta-codesync
meta-codesync Bot force-pushed the export-D109896755 branch from 01db22a to de30226 Compare July 2, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant