GutoVeronezi opened a new pull request #5273: URL: https://github.com/apache/cloudstack/pull/5273
### 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: https://github.com/apache/cloudstack/blob/d6a77a72f00d01e82b536c2b9d43c00690ee96fd/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java#L4504-L4524 This behavior is arbitrary and operators cannot choose to use it or not. By default ([fedora - Setting KVM processor affinities](https://docs.fedoraproject.org/en-US/Fedora/13/html/Virtualization_Guide/ch25s06.html)), 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`) on `agent.properties` to 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 - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] New feature (non-breaking change which adds functionality) - [ ] Bug fix (non-breaking change which fixes an issue) - [x] Enhancement (improves an existing feature and functionality) - [ ] Cleanup (Code refactoring and cleanup, that may add test cases) ### Feature/Enhancement Scale or Bug Severity #### Feature/Enhancement Scale - [ ] Major - [x] Minor ### How Has This Been Tested? It was tested on a local lab. - I created a host with 1 socket and 8 cores; - I created a VM with 8 vCPUs; - When the property doesn't exist in the file or when it is true, the topology is set: - `<topology sockets='2' cores='4' threads='1'/>`; - When the property is set to `false`, the topology is not set; -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
