Conversation
A VM process can have less CPU capacity than its vCPU count and host-wide utilisation imply. When its cgroup is being throttled, adding another IO thread cannot create CPU capacity and can instead drive repeated, counterproductive scale-up decisions. Resolve each process's cgroup v2 path, read its `cpu.max` quota and `cpu.stat` throttle counters, and retain the latest sample on the instance. The threshold engine can then hold scale-up whenever `throttled_usec` increased since the preceding sample. The first refresh always establishes an initial sample. The optional `refresh_cgroup_on_each_read` setting refreshes quota and counters on every tick when operators need runtime cgroup changes reflected immediately; leaving it disabled avoids repeated filesystem reads for stable production placement. Component-test configuration explicitly disables both refresh and cgroup-based scale-up blocking where the fake process does not model cgroups. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
tmakatos
added this pull request to stack #43
September 24, 2026 21:44
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.
A VM process can have less CPU capacity than its vCPU count and
host-wide utilisation imply. When its cgroup is being throttled, adding
another IO thread cannot create CPU capacity and can instead drive
repeated, counterproductive scale-up decisions.
Resolve each process's cgroup v2 path, read its
cpu.maxquota andcpu.statthrottle counters, and retain the latest sample on theinstance. The threshold engine can then hold scale-up whenever
throttled_usecincreased since the preceding sample.The first refresh always establishes an initial sample. The optional
refresh_cgroup_on_each_readsetting refreshes quota and counters onevery tick when operators need runtime cgroup changes reflected
immediately; leaving it disabled avoids repeated filesystem reads for
stable production placement. Component-test configuration explicitly
disables both refresh and cgroup-based scale-up blocking where the fake
process does not model cgroups.
Signed-off-by: Thanos Makatos thanos.makatos@nutanix.com
Stack created with GitHub Stacks CLI • Give Feedback 💬