Skip to content

cost calculation wrong if a mix of spot and demand instances is used #2405

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

Closed
tfriedel opened this issue Dec 5, 2021 · 0 comments · Fixed by #2406
Closed

cost calculation wrong if a mix of spot and demand instances is used #2405

tfriedel opened this issue Dec 5, 2021 · 0 comments · Fixed by #2406
Labels
bug Something isn't working
Milestone

Comments

@tfriedel
Copy link

tfriedel commented Dec 5, 2021

Version

master (commit: 0657881)

Description

I have set a node group to include at least one on-demand instance and additional spot instances.
During cost calculation cortex assumes I have only spot instances and thus reports lower costs.

Configuration

relevant part in cluster.yaml:

  - name: gpu
    instance_type: g4dn.xlarge
    min_instances: 0
    max_instances: 5
    priority: 1
    instance_volume_size: 50
    instance_volume_type: gp3
    spot: True
    spot_config:
      on_demand_base_capacity: 1
      on_demand_percentage_above_base_capacity: 0
      instance_distribution: [g4dn.xlarge, g4dn.2xlarge]

Steps to reproduce

Setup cluster to to have a node group configured with "spot: True" and "on_demand_base_capacity: 1".
Deploy an api in this cluster so that at least one pod is deployed. Check price for this instance.

Expected behavior

The price for running one node should be the price listed for an on-demand instance.

Actual behavior

The price is a spot-instance price.

Suggested solution

Presumably during cost calculation only the flag "spot: True" is used. Instead the cost per instance needs to be queried from AWS.

@tfriedel tfriedel added the bug Something isn't working label Dec 5, 2021
@deliahu deliahu added this to the v0.41 milestone Jan 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants