-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Externalize config to enable manually setting CPU topology on KVM VM #5273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Externalize config to enable manually setting CPU topology on KVM VM #5273
Conversation
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
|
@blueorangutan package |
|
@weizhouapache a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 745 |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 747 |
|
@blueorangutan test |
|
@weizhouapache a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
...ypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
Outdated
Show resolved
Hide resolved
|
Trillian test result (tid-1470)
|
GabrielBrascher
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 777 |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 778 |
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian Build Failed (tid-1516) |
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian Build Failed (tid-1530) |
|
Trillian Build Failed (tid-1542) |
|
Not all of the el7 packages were built, retrying |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 826 |
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1591)
|
|
@blueorangutan test |
|
@nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1631)
|
Description
When starting a VM on KVM, ACS sets VM's CPU topology through a calculation of CPU sockets and CPU cores per socket on VM's XML. Along the calculation, for instance, it assumes that a VM that use 12 vCPUs automatically works with 2 sockets and 6 cores, or a VM that use 16 vCPUs automatically works 4 sockets and 4 cores:
cloudstack/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
Lines 4504 to 4524 in d6a77a7
This behavior is arbitrary and operators cannot choose to use it or not.
By default (fedora - Setting KVM processor affinities), if we not determine the CPU topology, the hypervisor will alloc the VM on any available CPU; Therefore, this PR intends to externalize a property (
enable.manually.setting.cpu.topology.on.kvm.vm) onagent.propertiesto allow the operators to decide if they want to do the calculation or not. The default behavior still will be to do the calculation.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
How Has This Been Tested?
It was tested on a local lab.
<topology sockets='2' cores='4' threads='1'/>;false, the topology is not set;