Skip to content

Drop default min resources for fleets #3585

Closed

Description

@r4victor

Runs and fleets have non-zero min resources by default, cpu: 2.., memory: 8GB.., disk: 100GB..:

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:

  1. Create a default fleet with no resources.
  2. Create a k8s cluster with nodes having 100GB disk or 8GB RAM (or less *) and configure a k8s backend.
  3. You'll get no offers even if specifying lower resources for runs because the fleet min resource filter out the offers.
  4. 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).

Activity

  1. github-actions commented on Mar 21, 2026

    @github-actions

    This issue is stale because it has been open for 30 days with no activity.

  2. r4victor commented on Apr 14, 2026

    @r4victor
    CollaboratorAuthor

    Analysis: Are min resources needed for fleet offer generation?

    Short answer: No. Backends work fine without min resource constraints. Here's why:

    Offline providers (AWS, GCP, Azure, Lambda, Nebius, OCI, RunPod) — No issue

    dstack backends extend ComputeWithAllOffersCached and call gpuhunt.default_catalog().query(). For offline
    providers, this just filters a pre-fetched catalog.

    Kubernetes — No issue

    K8s backend works fine with no constraints but it won't be used for fleet provisioning anyway.

    Online providers (Cudo, VastAI, etc.) — Minor concern only

    Cudo has a nested loop generating CPU × GPU × memory combinations for API queries. With low minimums and high
    machine capacity, this could create many combinations. But Cudo has its own internal MIN_CPU=2 and MIN_MEMORY=8 fallback defaults when filter values are None.

    VastAI uses filter parameters as API hints. With low minimums, it just fetches a broader set and post-filters locally.

    Disk

    Disk is safe to set to None in fleet resources because there are multiple fallback layers. choose_disk_size_mib() falls back to DEFAULT_DISK.size (100GB) when requirements_disk_size is None.

    Conclusion

    We can safely drop default min resources for fleets entirely — no need to keep them even for non-elastic fleets.

  3. peterschmidt85 commented on Apr 14, 2026

    @peterschmidt85
    Contributor

    But will we require resources if user set nodes>0 in fleet config

  4. self-assigned this
    on Apr 14, 2026
  5. r4victor commented on Apr 14, 2026

    @r4victor
    CollaboratorAuthor

    @peterschmidt85, no, there is no problems with provisioning nodes>0 fleets without resources – dstack will provision the cheapest/smallest offer available. See the example offers in #3776 (comment)

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions