[ https://issues.apache.org/jira/browse/YUNIKORN-2245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17856836#comment-17856836 ]
Peter Bacsko commented on YUNIKORN-2245: ---------------------------------------- Closing the ticket. Current performance is more than adequate. > Application sorting: improve pending resource filtering > ------------------------------------------------------- > > Key: YUNIKORN-2245 > URL: https://issues.apache.org/jira/browse/YUNIKORN-2245 > Project: Apache YuniKorn > Issue Type: Sub-task > Components: core - scheduler > Reporter: Peter Bacsko > Assignee: Peter Bacsko > Priority: Minor > > When sorting applications, we do a filtering on pending resources: > {noformat} > func filterOnPendingResources(apps map[string]*Application) []*Application { > filteredApps := make([]*Application, 0) > for _, app := range apps { > // Only look at app when pending-res > 0 > if resources.StrictlyGreaterThanZero(app.GetPendingResource()) { > filteredApps = append(filteredApps, app) > } > } > return filteredApps > } > {noformat} > This filtering is relatively expensive, but necessary, because during the > lifecycle of an application, {{sa.pending}} can become 0 and in this case, we > don't want to schedule anything from the app. > Suggested approach is to track total pendingAskRepeats inside the app. That > way we don't need to call {{resources.StrictlyGreaterThanZero()}} and we > perform a simple integer comparison. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@yunikorn.apache.org For additional commands, e-mail: issues-h...@yunikorn.apache.org