-
Notifications
You must be signed in to change notification settings - Fork 0
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
Cost per job #93
Open
cmelone
wants to merge
3
commits into
develop
Choose a base branch
from
add/collect-cost
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Cost per job #93
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmelone
force-pushed
the
add/collect-cost
branch
from
October 10, 2024 18:44
0c534d6
to
c8b4484
Compare
cmelone
force-pushed
the
add/collect-cost
branch
2 times, most recently
from
October 10, 2024 20:19
4016e90
to
b3c5b7b
Compare
requesting @tgamblin review of cost formula not code |
Closes #75 Computes and stores the following metrics: - cpu_cost: cost of using CPU resources on the node, based on the CPU request of the job - mem_cost - cpu_penalty: penalty factor that represents the over or under allocation of CPU resources - mem_penalty
if in the future we'd like to make modifications with this cost analysis it'd be useful to have these metrics as the basis of the calculation
cmelone
force-pushed
the
add/collect-cost
branch
from
October 23, 2024 21:51
076aab6
to
9672ac8
Compare
cmelone
added a commit
that referenced
this pull request
Nov 12, 2024
Pulled from #93 to collect data before deciding on final cost formula. Adds the following columns: - nodes: AWS zone (`zone`) - nodes: Instance capacity type (`capacity_type`) - jobs: Cost of the instance during the lifetime of the job (`job_cost_instance`) The `job_cost_instance` calculation is made by averaging the value of `karpenter_cloudprovider_instance_type_offering_price_estimate` during the lifetime of the node and multiplying by the duration of the build job. **This is not a cost per job metric.** Use information like cpu_mean, mem_mean, etc to calculate the cost of the job in combination with `job_cost_instance`. tested with `dev/bulk_collect.py` and verified that large migrations work correctly on the prod and staging db
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: