This blog describes a new feature to be introduced in the CloudStack 4.12 release (already in the current master branch of the CloudStack repository). This feature will provide support for the Data Plane Development Kit (DPDK) in conjunction with Open vSwitch (OVS) for guest VMs and is targeted at the KVM hypervisor.
The Data Plane Development Kit (https://www.dpdk.org/) is a set of libraries and NIC drivers for fast package processing in userspace. Using DPDK along with OVS brings benefits to networking performance on VMs and networking appliances. In this blog, we will introduce how DPDK can be used on on guest VMs once the feature is released.
Please note – DPDK support in CloudStack requires that the KVM hypervisor is running on DPDK compatible hardware.
Enable DPDK support
This feature extends the Open vSwitch feature in CloudStack with DPDK integration. As a prerequisite, Open vSwitch needs to be installed on KVM hosts and enabled in CloudStack. In addition, administrators need to install DPDK libraries on KVM hosts before configuring the CloudStack agents, and I will go into the configuration in detail.
KVM Agent Configuration
An administrator can follow this guide to enable DPDK on a KVM host:
Install OVS on the target KVM host
Configure CloudStack agent by editing the /etc/cloudstack/agent/agent.properties file:
Restart CloudStack agent so that changes take effect:
# systemctl restart cloudstack-agent
DPDK inside guest VMs
Now that CloudStack agents have been configured, users are able to deploy their guest VMs using DPDK. In order to achieve this, they will need to pass extra configurations to enable DPDK:
Enable “HugePages” on the VM
NUMA node configuration
As of 4.12, passing extra configurations to VM deployments will be allowed. In the case of KVM, the extra configurations are added to the VM XML domain. The CloudStack API methods deployVirtualMachine and updateVirtualMachinewill support the new optional parameter extraconfigand will work in the following way:
CloudStack will expect a URL UTF-8 encoded string which can support multiple extra configurations. For example, if a user wants to enable DPDK, they will need to pass two extra configurations as we have mentioned above. An example of both configurations are the following:
Administrators can verify how OVS ports are created with DPDK support on DPDK enabled hosts, in which users have deployed DPDK enabled guest VMs. These port names start with “csdpdk”:
# ovs-vsctl show
About the author
Nicolas Vazquez is a Senior Software Engineer at ShapeBlue, the Cloud Specialists, and is a committer in the Apache CloudStack project. Nicolas spends his time designing and implementing features in Apache CloudStack.
https://www.shapeblue.com/wp-content/uploads/2018/11/DPDK-logo.jpg446600Nicolas Vazquezhttps://www.shapeblue.com/wp-content/uploads/2017/06/logo-340x156.pngNicolas Vazquez2018-12-03 10:00:472018-12-03 10:00:47Openvswitch with DPDK support on CloudStack