Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #75
Computes and stores the following metrics:
To normalize the cost of resources within instance types, we'll define cost per resource metrics.
Using this base cost per job metric, jobs are rewarded for minimizing usage and wall time. However, it does not penalyze them for disruptions to the cluster caused by misallocation.
Underallocation can potentially slow down other jobs on the same node, and overallocation delays scheduling of other jobs. A penalty factor would be useful for quantifying negative impacts to the CI system and encourage better resource requests.
With the penalty, cost per job would be:
Job cost and$P$ are stored separately as the former represents "true" cost, while the latter can be used to measure the efficiency of its resource requests via an artificial penalty. When analyzing costs, node instance type should be controlled for because cost per job is influenced by $\text{Cost per CPU}_i$ and $\text{Cost per RAM}_i$ , which will vary among instance types.
For example:
therefore,
computing the penalties:
In this case, we penalize the job for using more CPU than it requested, which could have crowded out other jobs. We also penalize the job for using less RAM than requested because when k8s scheduled the job, it blocked those resources from being scheduled for other work.
"total" cost: