Repository navigation
microVM: restore and snapshot no longer run under the actor's CPU limit - #3802
Draft
Ridwan Hoq (ridhoq) wants to merge 1 commit into
Draft
Ridwan Hoq (ridhoq) wants to merge 1 commit into
Ridwan Hoq (ridhoq) wants to merge 1 commit into
Conversation
Signed-off-by: Ridwan Hoq <943533+ridhoq@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3801
On microVM, the worker restores and snapshots an actor inside the actor's cgroup leaf, under the actor's CPU limit. Small actors resume and suspend slowly as a result. This runs that work at
max(4x,1000m), like gVisor's default--sandbox-lifecycle-cpu-policy:OpenActorLeafgets the lifecycle limit on restore and cold boot.wakeupprobe.WaitAll. The actor decides when its probe passes, so the probe runs under the actor's limit.CheckpointWorkloadraises the limit aftervm.pause, and puts the actor's limit back if the checkpoint fails.I measured an earlier version of this change on v1.0.0. It also refused to reuse a leftover leaf that still held processes, and lifted the cap in
KillLeafUnder. I dropped both because neither triggered in these runs. AKS, 4 × Standard_D16ds_v7, kernel 6.8.0-1073-azure, 256 MiB glutton, 16 actors woken at 4/s in total, about 960 resumes per row. p50 / p95 in ms:At 100m some throttling is left. Checkpoint runs under the actor's limit until
vm.pausereturns, and the wakeup probe runs under it by design (p95 115 ms against 39 ms at 1000m).Draft until #3801 settles the approach. I think this fits v1.1.
AI use: AI-assisted (GitHub Copilot CLI). It read the code, wrote the change and the benchmark harness, and drafted this description. I reviewed the change and checked the numbers.