Skip to content

Conversation

cmelone
Copy link
Member

@cmelone cmelone commented 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

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
@cmelone cmelone requested a review from alecbcs November 12, 2024 22:53
@cmelone cmelone self-assigned this Nov 12, 2024
@alecbcs
Copy link
Member

alecbcs commented Feb 10, 2025

This PR looks good to me. Do we need to store the cost of the node in the job? Or could we store the cost of the node in the node object and then calculate that later on for jobs based on their duration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants