Upgrading Multicore vSRX with Contrail
Starting in Junos OS Release 15.1X49-D70 and Junos OS Release 17.3R1, you can scale up the number of vCPUs or vRAM for a vSRX VM. You must gracefully power off the vSRX VM before you can scale up vSRX. See Managing the vSRX VM for details.
You can modify an existing flavor with the OpenStack Dashboard (Horizon). You cannot use the OpenStack CLI (nova flavor) commands to modify the CPU or RAM settings on an existing flavor. Instead, create a new flavor and modify the vSRX service template in Contrail to use this new flavor. See the Creating an Image Flavor with OpenStack for details.
You cannot scale down the number of vCPUs or vRAM for an existing vSRX VM.
Configuring Multi-queue Virtio Interface for vSRX VM with OpenStack
Before you plan to scale up vSRX performance, enable network multi-queuing as a means to support an increased number of dataplane vCPUs for the vSRX VM. The default for vSRX in Contrail is 2 dataplane vCPUs, but you can scale that number to 4 vCPUs.
OpenStack Liberty supports the ability to create VMs with multiple queues on their virtio interfaces. Virtio is a Linux platform for I/O virtualization, providing a common set of I/O virtualization drivers. Multiqueue virtio is an approach that enables the processing of packet sending and receiving to be scaled to the number of available virtual CPUs (vCPUs) of a guest, through the use of multiple queues
To use multiqueue virtio interfaces, ensure your system meets the following requirements:
The OpenStack version must be Liberty or greater.
The maximum number of queues in the vSRX VM interface is set to the same value as the number of vCPUs in the guest.
The vSRX VM image metadata property is set to enable multiple queues inside the VM.
Use the following command on the OpenStack node to enable multiple queues on a vSRX VM in Contrail:
nova image-meta <image_name> set hw_vif_multiqueue_enabled="true"
After the vSRX VM is spawned, use the following command on the virtio interface in the guest to enable multiple queues inside the vSRX VM:
ethtool –L <interface_name> combined <#queues>
Modifying an Image Flavor for vSRX with the Dashboard
OpenStack uses VM templates, or flavors, to set the memory, vCPU, and storage requirements for an image.
To Modify an image flavor for vSRX with the OpenStack dashboard:
- From the dashboard select your project, and select Admin>System Panel>Flavors. The list of existing image flavors appears, as shown in Figure 1.
- Select the vSRX flavor and click Edit Flavor. The Edit Flavor dialog box appears.
- Increase the number of vCPUs for your configuration. The minimum required for vSRX is 2 vCPUs.
- Increase the RAM MB value. The minimum required for vSRX is 4096 MB.
- Click Create Flavor. The flavor appears on the Flavors tab.
Updating a Service Template
If you created a new image flavor for an existing vSRx instance, you need to update the service template to use this new image flavor before you relaunch the vSRX instance.
To update a service template:
- From Contrail, select Configure>Services>Service Templates. The list of existing service templates appears.
- Click on the vSRX service template and select edit.
- Expand Advanced Options and select the new instance flavor from the Instance Flavor list.
- Click Save to update this service template.
- Power on the vSRX VM. See Managing the vSRX VM for details.