Skip to content
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

Account for multiple nodes in optimizer cost #277

Merged
merged 5 commits into from
Feb 11, 2022

Conversation

gmittal
Copy link
Collaborator

@gmittal gmittal commented Feb 8, 2022

Fixes #28.

Tested

sky cpunode (expect 1 node AWS m4.2xlarge):

I 02-07 21:07:17 optimizer.py:211] Defaulting estimated time to 1 hr. Call Task.set_time_estimator() to override.
I 02-07 21:07:17 optimizer.py:316] Optimizer - plan minimizing cost (~$0.4):
I 02-07 21:07:17 optimizer.py:330]
I 02-07 21:07:17 optimizer.py:330] TASK     BEST_RESOURCE
I 02-07 21:07:17 optimizer.py:330] cpunode  AWS(m4.2xlarge)
I 02-07 21:07:17 optimizer.py:330]
I 02-07 21:07:17 optimizer.py:284] Considered resources -> cost
I 02-07 21:07:17 optimizer.py:285] {AWS(m4.2xlarge): 0.4, GCP(n1-highmem-8): 0.473212}
I 02-07 21:07:17 optimizer.py:285]

python examples/multi_hostname.py (expect 2 node AWS m4.2xlarge)

I 02-10 17:15:20 optimizer.py:211] Defaulting estimated time to 1 hr. Call Task.set_time_estimator() to override.
I 02-10 17:15:20 optimizer.py:317] Optimizer - plan minimizing cost (~$0.8):
I 02-10 17:15:20 optimizer.py:332]
I 02-10 17:15:20 optimizer.py:332] TASK                      BEST_RESOURCE
I 02-10 17:15:20 optimizer.py:332] Task(run=<fn>)            2x AWS(m4.2xlarge)
I 02-10 17:15:20 optimizer.py:332]   nodes: 2
I 02-10 17:15:20 optimizer.py:332]   resources: {AWS(None)}
I 02-10 17:15:20 optimizer.py:332]

@gmittal
Copy link
Collaborator Author

gmittal commented Feb 8, 2022

Question: should the egress cost also be multiplied by num nodes?

I assume we usually transfer to the head node and then copy from head node -> workers rather than from previous node in the DAG to all the worker nodes.

EDIT: Added FIXME for now.

@concretevitamin
Copy link
Member

From a quick look, BEST_RESOURCE should show <n>x <resource str>.

@gmittal gmittal merged commit f1d93c5 into master Feb 11, 2022
@gmittal gmittal deleted the user/gmittal/optimizer-nodes branch February 11, 2022 07:38
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.

Optimizer should take num_nodes into account
3 participants