Enable DPDK and SR-IOV for containerized virtual network functions with zun
1. Enabling DPDK/SR-IOV for
containerized Virtual Network
Functions with Zun
Bin Zhou [NFV Researcher, Lenovo]
Hongbin Lu [Zun PTL,Huawei]
Yaguang Tang [NFV Researcher, Lenovo]
Shunli Zhou [Zun Core, Fiberhome]
November 2017
2. ➡Introduction to Zun
➡Zun Container for NFV
• Challenges & Gaps
• SR-IOV support in Zun
• Container with DPDK
➡Performance Benchmark Testing
• Setup
• Results
➡Demo
➡Conclusion
Agenda
3. Which Emerging Technologies Interest
OpenStack Users?
● Containers are the
most interesting
emerging
technologies.
● 75% of OpenStack
users interests in
containers.
4. ➡How to use containers on OpenStack?
➡Existing solutions
• Integrate containers into Nova
• Example: Nova-docker, Nova-lxd
• Install Container Orchestration Engine (COEs) on VMs.
• Example: Magnum, Kubespray
• OpenStack Container service: Zun
Introduce Zun
5. ● OpenStack Container service
● Provide API for provisioning and
managing containers without VMs
○ Speed
○ Simplicity
● Arbitrary memory and vCPUs
● Containers as first class resource
○ Keystone RBAC for individual
container
○ Neutron port(s) for each container
○ Cinder volume(s) bind-mount
Introduce Zun
7. Baremetal
Tenant 1
Virtualization
Tenant 2 Tenant 3
COE
Baremetal
Tenant 1
Virtualization (optional)
Tenant 2 Tenant 3
Contain
ers
ZunCOE COE
Contain
ers
Contain
ers
Contain
ers
Contain
ers
Contain
ers
Magnum Zun
➡Magnum
• Provision Nova instances
• Install a COE
• Run containers on the
COE
➡Pros:
• Strong Isolation
➡Cons:
• Low resource utilization
• Virtualization penalty
Introduce Zun
8. ➡Concepts:
• Container: A single container
• create, update, delete, start, stop, kill, …
• network-attach, add-security-group, …
• attach, exec, commit, log, ...
• Capsule (Experimental): A group of containers that are co-
located, have shared network and volumes.
• create, list, delete, …
Introduce Zun
9. Introduce Zun
➡Zun API
• Provide REST APIs
• Manage all compute nodes
• Scheduling containers
➡Zun Compute
• Compute node agent
• Manage local containers
• Track compute resources
➡Kuryr
• Bind neutron ports to
containers
Zun API Zun Compute Docker
Keystone
KuryrNeutron
Cinder
10. ➡Introduction to Zun
➡Zun Container for NFV
• Challenges & Gaps
• SR-IOV support in Zun
• Container with DPDK
➡Performance Benchmark Testing
• Setup
• Results
➡Demo
➡Conclusion
Agenda
11. ➡What is NFV
• A new way to design, deploy and manage network services
• Replace hardware with software
• Move network functions to commodity hardware
➡Benefits of NFV
• Fast provisioning
• Quick scale up and down
• Easy upgrade and relocate
• Reduce cost
• No vendor hardware locked-in
Container for NFV
12. ➡VM or Containers?
• Time to provision: container boots faster
• Resource consumption: container has less memory footprint
• Package management: Docker makes it easy
• Configurability: container is better
• Portability: container image is smaller
• Security: VM provides better isolation
• Use Clear Container to improve security
Container for NFV
13. Challenges & Gaps of using containers
NFV Req features VM Container
SR-IOV Yes Weak
DPDK Yes Weak
CPU pinning Yes Weak
NUMA Yes Weak
Hugepage Yes Weak
➡Lack of supports of NFV
required features in container
ecosystem
• Container runtime
• Container orchestration
• OpenStack integration
➡Use Zun to reduce the gaps
14. Enable SR-IOV in Zun
➡What is SR-IOV?
• A standardized mechanism to virtualize PCIe devices
• Make a single PCIe Ethernet controller (PF) to appear as multiple PCIe
devices (VF)
• PF: Physical Function
• VF: Virtual Function
• Passthrough VF to container
• Bypass virtual switch layer
16. Enable SR-IOV in Zun
1.Create a SR-IOV port
2.Create a container
3.Pick a host that has available
VFs
4.Assign a VF to the port
5.Create a container
6.Docker calls its network plugin
(Kuryr) to setup the network
7.Kuryr retrieve VF’s information
from the neutron port and
perform port binding
Zun API
Zun Compute
Kuryr
Neutron
Docker
User
1
2
3
5
6
7
4
30. ➡Introduction to Zun
➡Zun Container for NFV
• Challenges & Gaps
• SR-IOV support in Zun
• Container with DPDK
➡Performance Benchmark Testing
• Setup
• Results
➡Demo
➡Conclusion
Agenda
31. SR-IOV & DPDK can accelerate container networking performance
Benefits
High throughput Low latency Deterministic networking
Conclusion
● DPDK & SR-IOV for container user land
approaching physical
server performance
● multi-tenancy issue
● security issue
● Container with SR-IOV for
high throughput non DPDK
application
● unified management of VF