Bug 2109643 - [RFE] Mechanism for determining preferred CPU model [NEEDINFO]
Summary: [RFE] Mechanism for determining preferred CPU model
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: rc
: ---
Assignee: Tim Wiederhake
QA Contact: Luyao Huang
URL:
Whiteboard:
Depends On: 1856522
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-21 16:56 UTC by sgott
Modified: 2023-08-08 12:31 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-12 09:56:24 UTC
Type: Feature Request
Target Upstream Version:
Embargoed:
ailan: needinfo? (twiederh)
ailan: needinfo? (twiederh)
ailan: needinfo? (jsuchane)


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-128662 0 None None None 2022-07-21 17:00:13 UTC

Description sgott 2022-07-21 16:56:44 UTC
Description of problem:

In the context of migration, CNV is trying to determine the best baseline CPU model to use. The idea would be that all nodes could default to this model if one is not otherwise defined for a VM. This would ensure a higher degree of compatibility with respect to migrating VMs between nodes. It's possible with existing APIs to determine the common subset of CPU models that nodes might have, but past that there's no hint to help decide which one might be preferred. For instance, newer CPUs generally have more features than older ones.

While an arbitrary static list of prefered models could be determined at the CNV level, it's going to get out of date over time. It would likely be better if libvirt or qemu were able to provide some mechanism for helping decide which CPU model would be preferred from a group of models.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Tim Wiederhake 2022-10-07 17:52:42 UTC
I am not sure that I understand the question correctly. The nodes' domain capabilities (`virsh domcapabilities > domcap_$HOSTNAME.xml`) can be used to calculate the baseline cpu model that is compatible with all nodes (`cat domcap_*.xml | virsh hypervisor-cpu-baseline /dev/stdin --migratable`). This cpu model enables all features that are present on all nodes and would be the "best".

Comment 4 Fabian Deutsch 2022-10-10 07:52:49 UTC
Hi Tim, a fair point.

Will the baseline CPU recommendation always only be one CPU?
If it might recommend multiple, then we'll need the ability to understand which the most recent one is.

Comment 5 Tim Wiederhake 2022-10-10 17:08:17 UTC
There will always be exactly one baseline (or none, in case there is no cpu model that is compatible with all nodes).

Note that this cpu model might not have a physical counterpart, ie. not be exactly one of the named cpu models. It will most likely be something equivalent to "CPU XYZ plus features A, B, and C". Append "--features" to the call to "virsh hypervisor-cpu-baseline ..." to get a full list of features in the resulting cpu models.

Comment 7 Jaroslav Suchanek 2023-07-12 09:56:24 UTC
There is nothing actionable here, I believe Tim's comment 5 provided the required answer. Please note that the cpu models handling in libvirt is being refactored and will be part of large scale of changes. Related feature requests will be created accordingly.


Note You need to log in before you can comment on or make changes to this bug.