Skip to content

Conversation

gangj
Copy link
Contributor

@gangj gangj commented Aug 6, 2025

Squashed the history in PR #6612 together with the history in feature/vcpu-runnable.

@last-genius
Copy link
Contributor

Please squash some of the commits to include fixes and right metric names in the initial commit introducing them

@gangj gangj force-pushed the private/gangj/CP-308857 branch from 32c1fd5 to ec0b510 Compare August 6, 2025 07:46
@gangj
Copy link
Contributor Author

gangj commented Aug 6, 2025

We need to wait for the new release of xen containing the new(Runstateinfo.V2) API for both XS8 and XS9 to merge and release the changes in xapi.

@edwintorok
Copy link
Contributor

The first commit has some changes that don't belong there c2663f2, that should probably be moved to a commit of its own (cleaning up vcpu vs VCPU vs vCPU naming).
Then that commit can become much smaller.

Overall the diff looks OK though, just small change to how the commits are structured.

@andyhhp
Copy link
Collaborator

andyhhp commented Aug 6, 2025

You really need to delete the names RRD1 and RRD2 from the commit messages. They're internal codenames, and will specifically be meaningless to people in public.

gangj and others added 4 commits August 6, 2025 18:19
"vcpu", "VCPU" unified to "vCPU".

Signed-off-by: Gang Ji <[email protected]>
Adding a new metric 'runnable_any' as % of time that at least one vCPU
of the domain is in the runnable state. It is the sum of the following 3
metrics:
- runstate_full_contention
- runstate_concurrency_hazard
- runstate_partial_contention

Naming it 'runnable_any' instead of 'runnable' is to resolve one problem
with rrd2csv: if we name it 'runnable', rrd2csv will select both
"runnable" and "runnable_vcpus" when the 'runnable' is used:

> rrd2csv AVERAGE:vm:<vm-uuid>:runnable
> timestamp, AVERAGE:vm:<vm-uuid>:runnable, AVERAGE:vm:<vm-uuid>:runnable_vcpus

This is because "runnable" is a prefix of "runnable_vcpus".

Naming it 'runnable_any', with rrd2csv:
* can select only 'runnable_any' if we use:
  rrd2csv AVERAGE:vm:<vm-uuid>:runnable_any
* can select only 'runnable_vcpus' if we use:
  rrd2csv AVERAGE:vm:<vm-uuid>:runnable_vcpus
* can select both 'runnable_any' and 'runnable_vcpus' if we use:
  rrd2csv AVERAGE:vm:<vm-uuid>:runnable

Naming it 'runnable_any' also makes it clearer as the metric is % of
time that at least one vCPU of the domain is in the runnable state.

Add max to "runnable_any" metric to follow the fix here:

Signed-off-by: Bengang Yuan <[email protected]>
[Rebase with metric renaming and some fixes]
Signed-off-by: Gang Ji <[email protected]>
Adding a new CPU ready RRD metric: "runnable_vcpus" per domain as time %
of vCPUs of the domain that are in the runnable state.

Signed-off-by: Gang Ji <[email protected]>
Query runstate with the new API: Xenctrl.Runstateinfo.V2.domain_get

Signed-off-by: Marcus Granado <[email protected]>
@gangj gangj force-pushed the private/gangj/CP-308857 branch from ec0b510 to d355725 Compare August 6, 2025 10:30
@gangj gangj changed the title RRD1 "runnable_any" and RRD2 "runnable_vcpus" RRD metrics: "runnable_any" and "runnable_vcpus" Aug 6, 2025
@gangj gangj added this pull request to the merge queue Aug 7, 2025
Merged via the queue into xapi-project:master with commit 0ddcfe0 Aug 7, 2025
15 checks passed
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.

5 participants