Sunday, July 21, 2024

Mastering Custom Queues for Compute Engine VM Performance

Making Use of Custom Queues for Each vNIC on the Compute Engine

When companies are using network virtual appliances (NVAs), traffic-intensive AI/ML workloads, or high-bandwidth apps, it is critical to make sure your virtual machines (VMs) can support the demand. But your virtual machines might not be operating at their maximum capacity and satisfying the demands of the moment with the default queue allocation. Currently, Google examine a novel feature that optimizes network performance on Compute Engine virtual machines (VMs) through the assignment of unique queues to each virtual network interface card (vNIC).

The Problem: Insufficient Queue Allocation

Traffic congestion can be reduced in a crowded city with high traffic needs by adding lanes to a busy road. Queues on a vNIC may also become crowded in a similar manner. Before, a Compute Engine virtual machine’s vNICs were each given a set amount of network queues according to the default queue allocation. This implied that each vNIC could only use a certain amount of queues, which could impair performance under heavy workloads.

An example of this would be a n2-standard-128 VM with 8 vNICs; this would only produce 8 queues per vNIC (Tx/Rx), or half of the total amount of queues on the VM. Due to this, you were forced to choose between lowering the number of vNICs to guarantee that each vNIC has enough queues or vertically scaling up to a larger VM. Suboptimal scaling and higher expenses resulted from both strategies.

Custom Queues for Each vNIC is the Solution

Custom queues for each vNIC are now usable. You can manually assign each virtual network interface (vNIC) up to the number of network queues that the driver type can support thanks to this capability. The maximum queue count with gVNIC is 16, whereas with virtIO it is 32.

Which People Ought to Mind?

Those that run will especially benefit from this feature:

  • High-bandwidth applications: Custom queues can greatly enhance performance by enabling each vNIC to handle more traffic if your applications require a high throughput.
  • AI/ML workloads with high traffic: These workloads frequently produce enormous volumes of data, which custom queues can help to ensure that your virtual machines (VMs) can handle and transport without experiencing any delays.
  • Network virtual appliances (NVAs): NVAs typically consist of several network interfaces, and custom queues can guarantee that each interface has the resources required for optimal performance.

Custom Queues’ Advantages

  • Optimize network performance: You can dramatically raise your virtual machines’ (VMs’) total performance by making use of all available network queues.
  • Optimise resource usage: With custom queues, you may adjust the network resources in your virtual machine (VM) to your own requirements, making sure that resources are used effectively and preventing waste.
  • Scale seamlessly: Custom queues allow you to increase the number of virtual machines (VMs) without sacrificing network performance.
  • Economical solution: Gen 2 GCE virtual machines and Tier 1 high-bandwidth networking come with custom queues, thus utilizing this potent feature doesn’t cost extra.

Oversubscription and Custom Queues

  • You could allocate up to 16 queues per vNIC using custom queue allocation for gVNIC, as was previously indicated. The number of vCPUs on the VM cannot be greater than the total number of queues on all vNICs.
  • Nevertheless, queue oversubscription is possible if you are running N2, N2D, C2, or C2D virtual machines with the gVNIC driver installed and Tier_1 networking turned on. This implies that each vNIC may have up to 16 network queues assigned to it, hence the total number of queues across all vNICs may be greater than the total number of vCPUs.
  • The total number of queues per VM is 16 times the number of vNICs when there is queue oversubscription.
  • In order to quantify the aggregate throughput delivered by the inline NVA, Google set up their benchmarking tests using a multi-nic virtual machine (VM) configured as an NVA linking eight separate VPC networks.
  • Google were able to push an aggregate throughput of about 50% of the NVA VM’s stated throughput using the usual queue allocation, but with queue oversubscription, this nearly reached 99% of the NVA VM’s stated throughput. Naturally, throughput results will differ, so experiment to determine what your network can handle.

Put Custom Queues to Use Right Now

One major improvement that satisfies the network performance requirements of contemporary applications is the use of custom queues per virtual network interface card on Compute Engine virtual machines (VMs). You can get noticeable performance gains without spending extra money by turning on bespoke queue allocation. This functionality is especially beneficial for traffic-intensive AI/ML workloads, high-bandwidth apps, and enterprises looking to optimize network efficiency and reduce expenses. Use Terraform, gcloud, or REST API to get started right now.


Recent Posts

Popular Post Would you like to receive notifications on latest updates? No Yes