Repository navigation
[Nebius] Add opt-in capacity advisor - #4430
Conversation
|
Made capacity advisor opt-in via Enabling it shows quota/availability statuses and applies advice to provisioning and fabric selection, with a 10-minute advice cache. The PR body now includes an AWS latency comparison with the option disabled and enabled. |
|
Measured impact on total offer-response time: cached requests stayed around 45 ms with the advisor enabled. When only Nebius needed fresh advice, the total response increased from about 45 ms to 0.9 s. November 25 local measurements using Sky’s six configured provider accounts and the shared-cache change in dstackai/dstack-factory#22:
Rounded medians of 5 runs per condition, or 15 cached requests. The first row models fresh provider clients and empty caches, as after a server restart; pricing was already loaded. Its observed ranges were 3.29–4.33 s off and 3.63–3.76 s on: no speedup is established. AWS or GCP finished last in every first-request/all-expired run; the small differences there do not establish an advisor-caused change. Sky collects providers concurrently, so the response waits for the slowest provider. The significant added wait occurs when Nebius needs fresh advice and other providers are cached. Shared caching reduces how often this happens, but the caller still waits on a cache miss. Production, as checked November 25, has the advisor disabled and has not deployed #22. Offers are cached for 3 minutes, advice for 10 minutes per process; Sky’s two replicas have independent caches. Scope: complete GPU-list API via local ASGI, isolated SQLite, live provider APIs. Production network/load and cache-miss frequency were not measured. Keep the advisor disabled if avoiding new latency spikes is a requirement. |
Nebius GPU offers currently report
unknownavailability, so users cannot see quota or capacity restrictions and dstack may attempt configurations that cannot be provisioned.Add opt-in checks through
capacity_advisor: trueto show these statuses and guide provisioning and fabric selection. The option defaults tofalsebecause checking adds latency and requires caching quota and capacity data.Match advice by region, platform, preset, spot mode and fabric. Catalog fabric compatibility and configured allowlists remain enforced in both modes. Missing, stale or failed advice stays
unknownand eligible.Notes
unknown, since tenant-wide advice does not check project reservation limits. Spot offers use only preemptible advice.Getting offers
Local backend-collection medians on November 5, with pricing already loaded; 3 cold/new-backend runs and 9 refreshes. Cold ranges are in parentheses. AWS: 11 regions / 2,049 offers. Nebius: 9 regions / 169 offers. HTTP overhead is excluded.
capacity_advisor: trueThe shared-cache row uses Factory's cache-injection pattern. Nebius still performs tenant/project discovery for each new backend. AWS checks quotas and zones, without querying live free capacity for ordinary offers.