bernardodemarco opened a new pull request, #14378: URL: https://github.com/apache/cloudstack/pull/14378
### Description By default, `virtio-net` network adapters of VMs created on KVM provide only one transmit (TX) queue and one receive (RX) queue for network packets. However, it is possible to scale network performance on VMs with multiple vCPUs by leveraging the _multi-queue_ feature. With _multi-queue_, multiple queue pairs can be configured to enable parallel packet processing, potentially increasing network performance depending on the characteristics of the workloads running on the VM. Currently, ACS supports _multi-queue_ configuration for end-user VMs. However, this configuration cannot be defined for VRs. Therefore, ACS has been extended to support granular _multi-queue_ configuration for the different NIC types of VRs in guest networks and VPCs. To achieve this, new parameters have been added to the `createVPCOffering`, `createNetworkOffering`, `cloneNetworkOffering` and `cloneVPCOffering` APIs, as described below: <details> <summary>New <code>createVPCOffering</code> and <code>cloneVPCOffering</code> API parameters</summary> | Parameter | Description | | --------- | ----------- | | `publicmultiqueuenumber` | The number of queues for the public NIC of VRs belonging to VPCs. | | `privategatewaymultiqueuenumber` | The number of queues for the private gateway NIC of VRs belonging to VPCs. | </details> <details> <summary>New <code>createNetworkOffering</code> and <code>cloneNetworkOffering</code> API parameters</summary> | Parameter | Description | | --------- | ----------- | | `publicmultiqueuenumber` | The number of queues for the public NIC of VRs belonging to _guest_ networks. This parameter is not allowed for L2 network and VPC tier offerings. | | `privatemultiqueuenumber` | The number of queues for the private NIC of VRs belonging to _guest_ networks and VPC tiers. This parameter is not allowed for L2 network offerings. | </details> Similarly to _multi-queue_ support for end-user VMs, if these parameters are set to `-1`, ACS automatically configures the number of queues to match the number of vCPUs assigned to the VR. Non-positive values other than `-1` are not allowed. The ACS UI has also been extended to support configuring these parameters in the VPC and network offering creation/clone forms. ### Types of changes - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [X] New feature (non-breaking change which adds functionality) - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] Enhancement (improves an existing feature and functionality) - [ ] Cleanup (Code refactoring and cleanup, that may add test cases) - [ ] Build/CI - [ ] Test (unit or integration test code) ### Feature/Enhancement Scale or Bug Severity #### Feature/Enhancement Scale - [X] Major - [ ] Minor ### Screenshots (if appropriate): <details> <summary>VPC offering creation form</summary> <img width="547" height="1236" alt="image" src="https://github.com/user-attachments/assets/af23d324-8d50-4f60-a874-297c77d479af" /> </details> <details> <summary>Clone VPC offering form</summary> <img width="548" height="1160" alt="Image" src="https://github.com/user-attachments/assets/d3a67434-c0a5-4c26-b625-e5d54d9f732b" /> </details> <details> <summary>Network offering creation form</summary> <img width="642" height="1002" alt="image" src="https://github.com/user-attachments/assets/f121e84c-1687-404a-8c94-64320e53cdcf" /> </details> <details> <summary>Clone network offering form</summary> <img width="593" height="1214" alt="Image" src="https://github.com/user-attachments/assets/f74e830e-ce12-42a2-86c4-d2a44ed0e7c7" /> </details> ### How Has This Been Tested? #### Regression Tests - Verified the creation of end-user VMs without multi-queue - Verified the creation of end-user VMs with multi-queue - Verified the possibility of unplugging NICs for end-user VMs #### Validations for the multi-queue parameters - Verified new validations added for the `createNetworkOffering` and `cloneNetworkOffering` commands, including: - When multi-queue parameters are informed for L2 network offerings - When the `publicmultiqueuenumber` parameter is informed for tier offerings - When non-positive values different than `-1` are informed for multi-queue parameters - Verified new validations added for the `createVpcOffering` and `cloneVpcOffering` commands, including: - When invalid values are specified for the `publicmultiqueuenumber` and `privategatewaymultiqueuenumber` parameters #### Multi-queue for isolated networks VRs - Created a network offering with private multi-queue equal to 2 and public multi-queue equal to 5 - Created a network with this offering - Verified that multi-queue was correctly applied for the VR NICs - Cleaned up the network and verified that multi-queue was applied correctly for the new VR - Created a system offering for VRs with 2 vCPUs - Created a network offering with private and public multi-queue equal to -1 and associated the offering with the VR offering - Created a network with this offering - Verified that the multi-queue applied to the VR's NICs was equal to 2 - Cleaned up the network and verified that multi-queue was applied correctly for the new VR #### Multi-queue for shared networks - Created a shared network with the built-in ACS offering - Verified that multi-queue was not applied for the VRs NICs - Created a shared network offering with NAT, public multi-queue equal to -1 and private multi-queue equal to 3 - Created a network with this offering - Verified that multi-queue was correctly applied for the VR's NICs - Cleaned up the network and verified that multi-queue was applied correctly for the new VR #### Multi-queue for VPCs - Created a VPC with the built-in ACS offering - Verified the creation of tiers - Verified the creation of private gateways - Created a VPC offering with public multi-queue equal to -1 and private gateway multi-queue equal to 6 - Created a VPC with this offering - Verified the multi-queue value applied to the public NIC - Added a private gateway and verified the applied multi-queue NIC - Created a tier offering with multi-queue equal to 3 - Verified that the VR's NIC corresponding to the tier had the correct multi-queue value - Cleaned up the VPC and verified that multi-queue was applied correctly - Created another tier offering with multi-queue equal to -1 - Verified the multi-queue value applied to the NIC corresponding to the new tier -- 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]
