[
https://issues.apache.org/jira/browse/YUNIKORN-1798?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Qi Zhu updated YUNIKORN-1798:
-----------------------------
Description:
The current implementation put *{{PreFilter}}* together with *{{Filter}}* into
{*}Predicates{*}, the {{Predicate}} process each pod-node pair like the
following code:
{code:java}
for pod in pods:
for nodes in nodes:
prePredicate(pod) # prefilters
predicate(pod, node) # filters
{code}
It's functioning well while *{{PreFilter}}* only needs the pod object(no node
required), we don't need to put it in the inner loop. So a promotion of
*{{PreFilter}}* to the outer loop is made in this pr for performance's sake, as
a plugin like *{{inter-pod-afftinity}}* is very time-consuming to prepare the
pod interconnections in {*}{{PreFilter}}{*}. After this proposal, it will be:
{code:java}
for pod in pods:
prePredicate(pod) # prefilters
for nodes in nodes:
predicate(pod, node) # filters {code}
Also for *PreemptionPredicates we also can ahead the* *{{PreFilter!}}*
*cc [~wilfreds] [~ccondit]* *[Peter
Bacsko|https://issues.apache.org/jira/secure/ViewProfile.jspa?name=pbacsko]*
was:
The current implementation put *{{PreFilter}}* together with *{{Filter}}* into
{*}Predicates{*}, the {{Predicate}} process each pod-node pair like the
following code:
{code:java}
for pod in pods:
for nodes in nodes:
prePredicate(pod) # prefilters
predicate(pod, node) # filters
{code}
It's functioning well while *{{PreFilter}}* only needs the pod object(no node
required), we don't need to put it in the inner loop. So a promotion of
*{{PreFilter}}* to the outer loop is made in this pr for performance's sake, as
a plugin like *{{inter-pod-afftinity}}* is very time-consuming to prepare the
pod interconnections in {*}{{PreFilter}}{*}. After this proposal, it will be:
{code:java}
for pod in pods:
prePredicate(pod) # prefilters
for nodes in nodes:
predicate(pod, node) # filters {code}
Also for *PreemptionPredicates we also can ahead the* *{{PreFilter!}}*
*cc [~wilfreds] [~ccondit]* {*}[Peter
Bacsko|https://issues.apache.org/jira/secure/ViewProfile.jspa?name=pbacsko]{*}{*}{{*}}
> Move prefilter plugins out of node predicates to improve performance
> --------------------------------------------------------------------
>
> Key: YUNIKORN-1798
> URL: https://issues.apache.org/jira/browse/YUNIKORN-1798
> Project: Apache YuniKorn
> Issue Type: Sub-task
> Components: core - scheduler, shim - kubernetes
> Reporter: Qi Zhu
> Assignee: Qi Zhu
> Priority: Major
>
> The current implementation put *{{PreFilter}}* together with *{{Filter}}*
> into {*}Predicates{*}, the {{Predicate}} process each pod-node pair like the
> following code:
>
> {code:java}
> for pod in pods:
> for nodes in nodes:
> prePredicate(pod) # prefilters
> predicate(pod, node) # filters
> {code}
>
> It's functioning well while *{{PreFilter}}* only needs the pod object(no node
> required), we don't need to put it in the inner loop. So a promotion of
> *{{PreFilter}}* to the outer loop is made in this pr for performance's sake,
> as a plugin like *{{inter-pod-afftinity}}* is very time-consuming to prepare
> the pod interconnections in {*}{{PreFilter}}{*}. After this proposal, it will
> be:
>
> {code:java}
> for pod in pods:
> prePredicate(pod) # prefilters
> for nodes in nodes:
> predicate(pod, node) # filters {code}
>
> Also for *PreemptionPredicates we also can ahead the* *{{PreFilter!}}*
> *cc [~wilfreds] [~ccondit]* *[Peter
> Bacsko|https://issues.apache.org/jira/secure/ViewProfile.jspa?name=pbacsko]*
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]