Skip to content

feat: overcommit suspended VMs' freed capacity (Phase 2 Task 4) - #25

Merged
syscod3 merged 1 commit into
mainfrom
feat/phase2-overcommit-scheduler
Jul 5, 2026
Merged

feat: overcommit suspended VMs' freed capacity (Phase 2 Task 4)#25
syscod3 merged 1 commit into
mainfrom
feat/phase2-overcommit-scheduler

Conversation

@syscod3

@syscod3 syscod3 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Completes the Phase 2 density story: now that VMs can suspend (#24), the scheduler should reclaim their freed resources.

Suspended VMs free their memory to node-local disk, so they no longer consume schedulable capacity. This excludes VMPhaseSuspended from sumUsedResources and countRunningVMs, so the scheduler packs new VMs into the vCPU/RAM freed by suspension — the overcommit that turns "N running VMs" into "N reserved, k resident, k ≪ N".

  • Suspending/Resuming still count (memory is resident during the transition — conservative, avoids OOM).
  • Backward-compatible: with no suspended VMs, resident == reserved and accounting is unchanged.
  • Accepted tradeoff (documented): if many suspended VMs resume at once a node can be oversubscribed; resume may fail rather than corrupt. Node-local-snapshot node-loss is handled in feat: Phase 2 — suspend-on-idle for ImpVM #24.

Test: countRunningVMs excludes Suspended while counting Suspending/Resuming.

…sk 4)

Suspended VMs free their memory to node-local disk, so they no longer occupy
schedulable capacity. Exclude VMPhaseSuspended from sumUsedResources and
countRunningVMs so the scheduler packs new VMs into the vCPU/RAM freed by
suspension. Suspending/Resuming still count (memory resident during transition).
Backward-compatible: with no suspended VMs, accounting is unchanged.
@syscod3
syscod3 merged commit 086a928 into main Jul 5, 2026
17 checks passed
@syscod3
syscod3 deleted the feat/phase2-overcommit-scheduler branch July 5, 2026 22:48
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.

1 participant