Skip to content

Conversation

@cplaursen
Copy link
Contributor

This pull request adds three fields to the datamodel, as per the NUMA design sketch:

  • RO VM_metrics.numa_optimised: boolean: if the VM is
    optimised for NUMA
  • RO VM_metrics.numa_nodes: integer: number of NUMA nodes of the host
    the VM is using
  • MRO VM_metrics.numa_node_memory: int -> int map; mapping a NUMA node
    (int) to an amount of memory (bytes) in that node.

There are also updates to the CLI to expose these under xe vm-param-get param-name={numa-optimised, numa-nodes, numa-node-memory}.

Signed-off-by: Christian Lindig <christian.lindig@citrix.com>
| Some x ->
List.assoc "featureset" x.VmExtra.persistent.platformdata
)
; numa_optimised= false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the place where we would pick up the actual values from Xen.

@lindig
Copy link
Contributor

lindig commented Oct 31, 2025

Is VM_metrics.numa_nodes different from the size of the map VM_metrics.numa_node_memory? If not, why would we need both or is this just convenient to have? @mg12 @edwintorok?

This commit adds three fields to VM_metrics:
- numa_optimised: bool - whether a VM is optimised for NUMA
- numa_nodes: int - number of NUMA nodes associated with VM
- numa_node_memory: Map(int, int) - amount of VM memory in NUMA node X

Signed-off-by: Christian Pardillo Laursen <christian.pardillolaursen@citrix.com>
Signed-off-by: Christian Pardillo Laursen <christian.pardillolaursen@citrix.com>
Signed-off-by: Christian Pardillo Laursen <christian.pardillolaursen@citrix.com>
@cplaursen
Copy link
Contributor Author

Forgot to bump schema minor version

@mg12
Copy link
Member

mg12 commented Oct 31, 2025

VM.numa_nodes can be less than length(VM_metrics.numa_node_memory) when the VM memory is optimised. For instance, in a host with 2 numa nodes, if VM.numa_nodes=1 then the VM memory is optimised to use 1 numa node of the host. It's convenient for the API client to have this number in a field instead of having to figure out how to calculate it from the contents of VM_metrics.numa_node_memory.

@lindig
Copy link
Contributor

lindig commented Nov 3, 2025

Would suggest to merge this; given that it's a feature branch we need to look after it and rebase frequently.

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.

4 participants