-
Notifications
You must be signed in to change notification settings - Fork 215
Open
Description
Runs and fleets have non-zero min resources by default, cpu: 2.., memory: 8GB.., disk: 100GB..:
dstack/src/dstack/_internal/core/models/resources.py
Lines 377 to 384 in f7dacf7
| class ResourcesSpec(generate_dual_core_model(ResourcesSpecConfig)): | |
| # TODO: Remove Range[int] in 0.20. Range[int] for backward compatibility only. | |
| cpu: Annotated[Union[CPUSpec, Range[int]], Field(description="The CPU requirements")] = ( | |
| CPUSpec() | |
| ) | |
| memory: Annotated[Range[Memory], Field(description="The RAM size (e.g., `8GB`)")] = ( | |
| DEFAULT_MEMORY_SIZE | |
| ) |
This makes sense for runs to avoid provisioning runs on tiny instances by default and failing, e.g. due to OOM. Having min resources on fleets gets in the way when the instance is provisioned for a run. Consider a case:
- Create a default fleet with no resources.
- Create a k8s cluster with nodes having 100GB disk or 8GB RAM (or less *) and configure a k8s backend.
- You'll get no offers even if specifying lower resources for runs because the fleet min resource filter out the offers.
- You have to recreate the fleet or create a new fleet.
- 100GB disk and 8GB RAM will translate to less available resources on k8s, so the exact lower bound will filter out such nodes.
We may still apply the same min resource to fleets if they are not specified for provisioning instances without run (non-elastic fleets, maintaining nodes.min, etc).
Reactions are currently unavailable