SlideShare a Scribd company logo
Userspace 2015 | Dublin
OVS, DPDK and
Software Dataplane Acceleration
Who we are?
•  Thomas	
  F.	
  Herbert	
  	
  
–  Red	
  Hat	
  
–  therbert@redhat.com	
  
•  Kevin	
  Traynor	
  
–  Intel	
  
–  kevin.traynor@intel.com	
  
•  Mark	
  Gray	
  
–  Intel	
  
–  mark.d.gray@intel.com	
  
What is a Virtual Switch?
Architecture
User	
  space	
  
Kernel	
  space	
  
Openflow	
  Processing	
  
NIC	
   NIC	
  NIC	
  
OVS Architectural Evolution
User	
  space	
  
Openflow	
  Processing	
  
Kernel	
  space	
  
Microflow	
  cache	
  
NIC	
   NIC	
  NIC	
  
Netlink	
  
OVS Architectural Evolution
User	
  space	
  
Openflow	
  Processing	
  
Kernel	
  space	
  
NIC	
   NIC	
  NIC	
  
Netlink	
  
Megaflow	
  Cache	
  
Microflow	
  Cache	
  
OVS Architectural Evolution
User	
  space	
  
Openflow	
  Processing	
  
Kernel	
  space	
  
PMD	
   PMD	
  PMD	
  
Megaflow	
  Cache	
  
Microflow	
  Cache	
  
OVS Architectural Evolution
OVS Architecture
Linux	
  User	
  Space	
  
ovs-­‐vswitchd	
  
ofproto	
  
netdev	
  
netdev-­‐dpdk	
  
libdpdk	
  
ofproto-­‐dpif	
  
dpif	
  
dpif-­‐netdev	
  
	
  Linux	
  Kernel	
  Space	
  
Hardware	
  
NianMc	
   Fortville	
  
vfio	
  
uio	
  vfio	
  
rte_ring	
  
vhost	
  
OVS Guest Interfaces
Usability
DPDK – Open vSwitch
•  DPDK	
  -­‐	
  Popular	
  SoPware	
  Accelerated	
  
Data	
  Plane	
  
•  Fast	
  Packet	
  Forwarding	
  for	
  the	
  
Cloud	
  
•  Virtualized	
  Network	
  
FuncMons	
  
•  Use	
  of	
  Commodity	
  Hardware	
  
•  For	
  Basic	
  OpenFlow	
  	
  Switch	
  
FuncMons	
  
•  Behaves	
  IdenMcal	
  to	
  Linux	
  
Kernel	
  
•  Advantages	
  and	
  Disadvantages	
  WRT	
  
Linux	
  Kernel	
  	
  
•  Linux	
  Data	
  Plane	
  Has	
  
•  20	
  years	
  of	
  development	
  
•  Rich	
  Debugging	
  OpMons	
  
•  Packet	
  Dumping	
  
•  Access	
  to	
  Wide	
  Variety	
  of	
  
Network	
  IF’s	
  and	
  VF’s	
  
•  Full	
  set	
  of	
  device	
  staMsMcs	
  
•  More	
  Tunnel	
  Endpoints	
  
•  DPDK	
  Data	
  Plane	
  
•  Much	
  Faster	
  Packet	
  Forwarding	
  
•  Up	
  to	
  12X	
  for	
  small	
  packets	
  
DPDK/OVS User Perspective
•  How	
  About	
  the	
  “User”	
  of	
  OVS/DPDK	
  
•  Controllers	
  using	
  OF	
  and	
  OVSDB	
  protocols	
  
•  People	
  Using	
  OVS	
  CLI	
  Tools	
  
•  Network	
  Engineers	
  	
  building	
  complex	
  topologies	
  
•  Cloud	
  Deployements	
  
•  Programmers	
  -­‐	
  ApplicaMon	
  Developers	
  of	
  
•  Other	
  Packet	
  consumers,	
  DPI,	
  Classifiers	
  
•  Infrastructure	
  –	
  Routers,	
  Firewalls,	
  Services	
  
•  Other	
  Packet	
  consumers,	
  DPI,	
  Classifiers	
  
•  One	
  person’s	
  experience	
  
•  What	
  do	
  user’s	
  want	
  
•  ExpectaMons	
  of	
  DPDK/OVS	
  vs	
  Linux	
  Kernel/OVS	
  
DPDK/OVS Usability Story
•  In	
  the	
  Beginning:	
  My	
  user	
  Story	
  starts	
  in	
  2013	
  
•  Inspired	
  by	
  Intel	
  presentaMon	
  of	
  DPDK	
  
at	
  ONS	
  2013	
  
•  On	
  Team	
  Developing	
  SDN	
  Network	
  Threat	
  
Analyzer	
  controlled	
  
•  Integrated	
  Open	
  vSwitch	
  
•  First	
  with	
  Linux	
  Kernel	
  Data	
  Path	
  
•  Traffic	
  shaping,	
  threat	
  blocking	
  and	
  
miMgaMon	
  
•  Requirement:	
  10Gb	
  without	
  	
  Adding	
  
$10K	
  to	
  $20K	
  on	
  custom	
  HW	
  Switch	
  
Fabric.	
  
•  DPDK	
  is	
  the	
  Answer?	
  
•  How	
  to	
  prove	
  the	
  OVS/DPDK	
  
Claim?	
  
•  At	
  first	
  Started	
  with	
  DPDK	
  1.7.1	
  
•  Scary:	
  poor	
  integraMon	
  -­‐-­‐Not	
  integrated	
  with	
  
OVS	
  
•  CompilaMon	
  issues,	
  conflicMng	
  APIs.	
  
ABIs,	
  OVS	
  Versions	
  
•  Three	
  Confusing	
  Forks:	
  	
  
1.  DPDK.org	
  
2.  DPI	
  Fork	
  with	
  custom	
  API	
  
3.  	
  01.org	
  
•  Then	
  came	
  DPDK	
  1.8	
  
•  Integrated:	
  Master	
  Branch	
  OVS	
  
•  I	
  Ran	
  DPDK	
  on	
  guest	
  with	
  VirtIO/
VMXnet3	
  saw	
  2.5X	
  perf	
  gain	
  
•  Developed	
  App	
  using	
  DPDK-­‐ring	
  to	
  
feed	
  DPI	
  
•  Now	
  we	
  are	
  up	
  to	
  DPDK	
  2.1	
  with	
  OVS.	
  
•  Much	
  much	
  improved!	
  
The Netdev Interface to OVS
•  Transparency	
  of	
  Data	
  Plane	
  
•  Netdev	
  –	
  API	
  Between	
  Data	
  Plane	
  and	
  OVS	
  
•  Generic	
  network	
  device	
  API	
  independent	
  from	
  data	
  plane	
  implementaMon.	
  
•  Similar	
  to	
  network	
  driver	
  interface	
  in	
  BSD	
  
•  Netdev	
  Abstracts	
  forwarding	
  of	
  packets	
  in	
  data	
  plane	
  
•  Conceptually	
  like	
  any	
  Network	
  device	
  driver	
  
•  With	
  Start,	
  Stop,	
  Private	
  Data	
  Area,	
  Queue	
  Management	
  
•  Struct	
  netdev	
  Holds	
  the	
  interface	
  Specific	
  FuncMon	
  Pointers	
  
•  Includes	
  the	
  generic	
  part	
  followed	
  by	
  private	
  part	
  for	
  use	
  by	
  driver.	
  
•  Constructur	
  for	
  netdev	
  provider	
  
•  Dpdk	
  	
  Creates	
  dpdk	
  personality	
  of	
  struct	
  netdev	
  
•  MulMple	
  rx	
  queues	
  Managed	
  by	
  OVS	
  
Improving DPDK/OVS
•  Is	
  DPDK	
  really	
  sMll	
  Experimental?	
  
•  Is	
  it	
  Mme	
  for	
  this	
  patch?	
  
--- a/INSTALL.DPDK.md
+++ a/INSTALL.DPDK.md
@@ -5,8 +5,8 @@ Open vSwitch can use Intel® DPDK lib to operate entirely in
Userspace. This file explains how to install and use Open vSwitch in such a mode.
-The DPDK support of Open vSwitch is considered experimental.
-It has not been thoroughly tested.
This version of Open vSwitch should be built manually with `configure` and `make`.
•  Issues	
  with	
  DPDK:	
  
•  How	
  to	
  Improve?	
  
•  This	
  thread,	
  h"p://openvswitch.org/pipermail/dev/2015-­‐August/058814.html	
  
•  Some	
  SuggesMons	
  from	
  Thread	
  
•  Device	
  management:	
  
•  Udev/systemd	
  –	
  (Flavio	
  Leitner)	
  
•  Device	
  creaMon,	
  binding,	
  destrucMon	
  –	
  handled	
  by	
  Host	
  OS	
  
Improving DPDK/OVS Contd.
•  How	
  to	
  Improve?	
  
•  Debugging?	
  
•  TcpDump	
  like	
  capability	
  
•  	
  Use	
  “Mirroing”	
  of	
  packets	
  to	
  pmd/libpcap	
  or	
  libpcap-­‐ng	
  
•  TesMng	
  
•  Add	
  CI	
  for	
  Data	
  Plane	
  TesMng	
  
•  Vsperf	
  Project	
  –	
  To	
  Test	
  Against	
  Goals	
  
•  Support	
  Only	
  One	
  type	
  of	
  vhost	
  device	
  
•  Drop	
  Vhost	
  -­‐	
  Cuse	
  
•  Vhost-­‐user	
  only	
  
•  Beoer	
  DocumentaMon	
  
•  Recent	
  Patch	
  to	
  INSTALL.DPDK.md	
  
•  Training	
  
•  From	
  lstopo	
  to	
  OpMmized	
  Data	
  Plane	
  
Performance
Tuning - Multiple Threads
VIRTUAL	
  0
VM
Core	
  0
VIRTUAL	
  1
PHY	
  0 PHY	
  1
OS
OVS	
  
VIRTUAL	
  0
VM
Core	
  9
Core	
  1
VIRTUAL	
  1
Core	
  2
PHY	
  0
Core	
  11
PHY	
  1
Core	
  12
OS
Core	
  0
Tuning - Multiple Threads
OVS	
  
VIRTUAL	
  0
PHY	
  0
OS
Core	
  0
VIRTUAL	
  0
PHY	
  1
VIRTUAL	
  1
Core	
  1 Core	
  3 Core	
  2 Core	
  4
Core	
  8
Core	
  9
VIRTUAL	
  0
PHY	
  0
PHY	
  1
PHY	
  1
Core	
  11 Core	
  13 Core	
  12 Core	
  14
VM	
  0
Tuning - Multiple Queues
OVS	
  
Performance Optimizations
Performance Optimizations
Performance Optimizations
rx	
  cost	
  
Performance Optimizations
lookup	
  cost	
  
rx	
  cost	
  
Performance Optimizations
lookup	
  cost	
  
rx	
  cost	
  
acMon	
  cost	
  
Performance Optimizations
lookup	
  cost	
  
rx	
  cost	
  
tx	
  cost	
  
acMon	
  cost	
  
Performance Optimizations
lookup	
  cost	
  
rx	
  cost	
  
tx	
  cost	
  
acMon	
  cost	
  
Performance Optimizations
38x	
   17x	
   1	
  
Performance Optimizations
•  Physical	
  
•  Offload	
  hash	
  to	
  NIC	
  hardware	
  
•  MulMple	
  Rx	
  Queues	
  using	
  RSS	
  
•  DPDK	
  Tx/Rx	
  use	
  of	
  Intel’s	
  Advanced	
  Vector	
  Extensions	
  
•  DPDK	
  Bulk	
  allocaMon	
  and	
  batching	
  
•  Exact	
  Match	
  Cache	
  
•  Increased	
  size	
  
•  DPDK	
  hash	
  integraMon	
  -­‐	
  needs	
  variable	
  key	
  size	
  
•  NaMve	
  EMC	
  opMmizaMon	
  
•  Datapath	
  Classifier	
  
•  InvesMgaMng	
  use	
  of	
  DPDK	
  ACL	
  table	
  
•  Different	
  usage	
  model	
  than	
  OVS	
  datapath	
  classifier	
  
•  Virtual	
  
•  vhost	
  library	
  –	
  prefetching	
  and	
  bulk	
  operaMons	
  
•  virMo	
  pmd	
  vectorizaMon	
  
•  MulMqueue	
  vhost	
  
Performance Results
Performance Results
Date:	
  August	
  2015.	
  Disclaimer:	
  SoPware	
  and	
  workloads	
  used	
  in	
  performance	
  tests	
  may	
  have	
  been	
  opMmized	
  for	
  performance	
  only	
  on	
  Intel	
  microprocessors.	
  Performance	
  tests,	
  such	
  as	
  SYSmark	
  and	
  MobileMark,	
  are	
  measured	
  using	
  specific	
  computer	
  systems,	
  components,	
  soPware,	
  
operaMons	
  and	
  funcMons.	
  Any	
  change	
  to	
  any	
  of	
  those	
  factors	
  may	
  cause	
  the	
  results	
  to	
  vary.	
  You	
  should	
  consult	
  other	
  informaMon	
  and	
  performance	
  tests	
  to	
  assist	
  you	
  in	
  fully	
  evaluaMng	
  your	
  contemplated	
  purchases,	
  including	
  the	
  performance	
  of	
  that	
  product	
  when	
  combined	
  with	
  
other	
  products.	
  Source:	
  Intel	
  internal	
  tesMng	
  as	
  of	
  August,	
  2015.	
  See	
  Linux*	
  Performance	
  Tuning	
  for	
  configuraMon	
  details.	
  For	
  more	
  informaMon	
  go	
  to	
  hop://www.intel.com/performance.	
  Results	
  have	
  been	
  measured	
  	
  by	
  Intel	
  based	
  on	
  soPware,	
  benchmark	
  or	
  other	
  data	
  of	
  third	
  
parMes	
  and	
  are	
  provided	
  for	
  informaMonal	
  purposes	
  only.	
  	
  Any	
  difference	
  in	
  system	
  hardware	
  or	
  soPware	
  design	
  or	
  configuraMon	
  may	
  affect	
  actual	
  performance.	
  	
  Intel	
  does	
  not	
  control	
  or	
  audit	
  the	
  design	
  or	
  implementaMon	
  of	
  third	
  party	
  data	
  referenced	
  in	
  this	
  document.	
  	
  Intel	
  
encourages	
  all	
  of	
  its	
  customers	
  to	
  visit	
  the	
  websites	
  of	
  the	
  referenced	
  third	
  parMes	
  or	
  other	
  sources	
  to	
  confirm	
  whether	
  the	
  referenced	
  data	
  is	
  accurate	
  and	
  reflects	
  performance	
  of	
  systems	
  available	
  for	
  purchase.	
  
E5-­‐2680v2	
  2.8GHz	
  core	
  -­‐	
  64	
  byte	
  packets	
  -­‐	
  OVS	
  commit	
  id	
  f82313	
  -­‐	
  DPDK	
  2.0	
  
1.32	
  
16.52	
  
[CELLREF]	
  
0	
  
5	
  
10	
  
15	
  
20	
  
25	
  
Std.	
  OVS	
   OVS	
  with	
  DPDK	
  
1	
  physical	
  core	
  
Mpps	
  
Phy-­‐Phy	
  
0.8	
  
4.85	
  
9.76	
  
[CELLREF]	
  
[CELLREF]	
  
0	
  
2	
  
4	
  
6	
  
8	
  
10	
  
12	
  
14	
  
Std.	
  OVS	
   OVS	
  with	
  DPDK	
  
1	
  physical	
  core	
  
OVS	
  with	
  DPDK	
  
2	
  physical	
  cores	
  
Mpps	
  
Phy-­‐VM-­‐Phy	
  
Conclusion
“It	
  just	
  works”	
  
“It	
  just	
  works”	
  
Backup
VIRTUAL	
  0
PHY	
  0
OS
Core	
  0
VIRTUAL	
  0
PHY	
  1
VIRTUAL	
  1
Core	
  1 Core	
  3 Core	
  2 Core	
  4
Core	
  8
Core	
  9
VIRTUAL	
  0
PHY	
  0
PHY	
  1
PHY	
  1
Core	
  11 Core	
  13 Core	
  12 Core	
  14
VM	
  0
Tuning - Multiple Queues
VIRTUAL	
  0
PHY	
  0
OS
Core	
  0
VIRTUAL	
  0
PHY	
  1
VIRTUAL	
  1
Core	
  1 Core	
  3 Core	
  2 Core	
  4
Core	
  8
Core	
  9
VIRTUAL	
  0
PHY	
  0
PHY	
  1
PHY	
  1
Core	
  11 Core	
  13 Core	
  12 Core	
  14
VM	
  0
OVS	
  
netdevovs-vswitchd netdev-dpdk
dpif-netdev
(User Space
Forwarding)
Compute Node:
User Space
OpenDaylight
ovsdb OpenFlow
ovsdb server
DPDK
librte_ring
DPDK
librte_vhost
DPDK
librte_eth
dpif-linux
(Kernel
Space
Forwarding –
Control Only)
ofproto
Compute Node:
Kernel Space
openvswitch.ko
netdev_linux
sockets
netdev_vport
Overlays
VNF	
  
VirMo	
  
Qemu	
  
VNF	
  
VirMo	
  
Qemu	
  
VNF	
  
Ivshmem	
  
DPDK	
  
Qemu	
  
OVS Architectural Evolution

More Related Content

PDF
Fun with Network Interfaces
PPTX
Understanding DPDK
PDF
Intel dpdk Tutorial
PPTX
Linux Network Stack
PDF
netfilter and iptables
PDF
Linux Networking Explained
PDF
DPDK in Containers Hands-on Lab
PDF
OFI libfabric Tutorial
Fun with Network Interfaces
Understanding DPDK
Intel dpdk Tutorial
Linux Network Stack
netfilter and iptables
Linux Networking Explained
DPDK in Containers Hands-on Lab
OFI libfabric Tutorial

What's hot (20)

PPTX
The TCP/IP Stack in the Linux Kernel
PDF
Linux 4.x Tracing: Performance Analysis with bcc/BPF
PDF
Intel QLC: Cost-effective Ceph on NVMe
PDF
Introduction to OFI
PDF
Linux-Internals-and-Networking
ODP
eBPF maps 101
PDF
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
PPTX
Introduction to DPDK
PDF
VLANs in the Linux Kernel
PDF
Network Programming: Data Plane Development Kit (DPDK)
PDF
DPDK: Multi Architecture High Performance Packet Processing
PDF
LISA2019 Linux Systems Performance
PPTX
Understanding DPDK algorithmics
PDF
The Container Storage Interface (CSI)
PDF
DPDK In Depth
PDF
Meet cute-between-ebpf-and-tracing
PPTX
Enable DPDK and SR-IOV for containerized virtual network functions with zun
PPSX
FD.IO Vector Packet Processing
PDF
Container Performance Analysis
PDF
The linux networking architecture
The TCP/IP Stack in the Linux Kernel
Linux 4.x Tracing: Performance Analysis with bcc/BPF
Intel QLC: Cost-effective Ceph on NVMe
Introduction to OFI
Linux-Internals-and-Networking
eBPF maps 101
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
Introduction to DPDK
VLANs in the Linux Kernel
Network Programming: Data Plane Development Kit (DPDK)
DPDK: Multi Architecture High Performance Packet Processing
LISA2019 Linux Systems Performance
Understanding DPDK algorithmics
The Container Storage Interface (CSI)
DPDK In Depth
Meet cute-between-ebpf-and-tracing
Enable DPDK and SR-IOV for containerized virtual network functions with zun
FD.IO Vector Packet Processing
Container Performance Analysis
The linux networking architecture
Ad

Viewers also liked (20)

PPTX
Accelerating Neutron with Intel DPDK
PDF
Intel DPDK Step by Step instructions
PPTX
The n00bs guide to ovs dpdk
PDF
OpenStack Kilo with 6Wind VA High-Performance Networking Using DPDK - OpenSta...
PDF
OVS VXLAN Network Accelaration on OpenStack (VXLAN offload and DPDK) - OpenSt...
PPTX
OpenvSwitch Deep Dive
PDF
Devconf2017 - Can VMs networking benefit from DPDK
PDF
Performance challenges in software networking
PPSX
FD.io Vector Packet Processing (VPP)
PDF
The Gnocchi Experiment
PDF
Gnocchi v3
PDF
Ceilometer to Gnocchi
PDF
Disaggregated Junos Software Infrastructure
PPTX
High Performance Networking Leveraging the DPDK and Growing Community
PPTX
Ovs perf
PDF
DPDK Summit 2015 - Intel - Keith Wiles
PDF
Using Agilio SmartNICs for OpenStack Networking Acceleration
PDF
Introduction to OpenDaylight
PDF
1 intro to_dpdk_and_hw
PDF
Accelerate SDN/NFV Network ~ネットワーク高速化のアレコレ~ - OpenStack最新情報セミナー 2016年3月
Accelerating Neutron with Intel DPDK
Intel DPDK Step by Step instructions
The n00bs guide to ovs dpdk
OpenStack Kilo with 6Wind VA High-Performance Networking Using DPDK - OpenSta...
OVS VXLAN Network Accelaration on OpenStack (VXLAN offload and DPDK) - OpenSt...
OpenvSwitch Deep Dive
Devconf2017 - Can VMs networking benefit from DPDK
Performance challenges in software networking
FD.io Vector Packet Processing (VPP)
The Gnocchi Experiment
Gnocchi v3
Ceilometer to Gnocchi
Disaggregated Junos Software Infrastructure
High Performance Networking Leveraging the DPDK and Growing Community
Ovs perf
DPDK Summit 2015 - Intel - Keith Wiles
Using Agilio SmartNICs for OpenStack Networking Acceleration
Introduction to OpenDaylight
1 intro to_dpdk_and_hw
Accelerate SDN/NFV Network ~ネットワーク高速化のアレコレ~ - OpenStack最新情報セミナー 2016年3月
Ad

Similar to OVS and DPDK - T.F. Herbert, K. Traynor, M. Gray (20)

PDF
Accelerate Service Function Chaining Vertical Solution with DPDK
PDF
LF_DPDK17_Integrating and using DPDK with Open vSwitch
ODP
Accelerated dataplanes integration and deployment
PPTX
Week_3.pptxmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
PDF
LF_OVS_17_OVS-DPDK Installation and Gotchas
PDF
DPDK Summit 2015 - RIFT.io - Tim Mortsolf
PDF
DPDK Summit - 08 Sept 2014 - 6WIND - High Perf Networking Leveraging the DPDK...
PDF
DPDK Summit 2015 - HP - Al Sanders
PDF
LF_OVS_17_OvS-CD: Optimizing Flow Classification for OvS using the DPDK Membe...
PDF
Dev Conf 2017 - Meeting nfv networking requirements
PDF
Making Networking Apps Scream on Windows with DPDK
PDF
LF_OVS_17_Enabling hardware acceleration in OVS-DPDK using DPDK Framework.
PDF
Nicolas Vazquez - Open vSwitch with DPDK on CloudStack
PPTX
High performace network of Cloud Native Taiwan User Group
PDF
What are latest new features that DPDK brings into 2018?
PDF
HKG15-301: OVS implemented via ODP & vendor SDKs
PPTX
G rpc talk with intel (3)
PPTX
Tối ưu hiệu năng đáp ứng các yêu cầu của hệ thống 4G core
PPTX
OVS v OVS-DPDK
PPTX
[OpenStack 하반기 스터디] DPDK & OpenStack why?
Accelerate Service Function Chaining Vertical Solution with DPDK
LF_DPDK17_Integrating and using DPDK with Open vSwitch
Accelerated dataplanes integration and deployment
Week_3.pptxmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
LF_OVS_17_OVS-DPDK Installation and Gotchas
DPDK Summit 2015 - RIFT.io - Tim Mortsolf
DPDK Summit - 08 Sept 2014 - 6WIND - High Perf Networking Leveraging the DPDK...
DPDK Summit 2015 - HP - Al Sanders
LF_OVS_17_OvS-CD: Optimizing Flow Classification for OvS using the DPDK Membe...
Dev Conf 2017 - Meeting nfv networking requirements
Making Networking Apps Scream on Windows with DPDK
LF_OVS_17_Enabling hardware acceleration in OVS-DPDK using DPDK Framework.
Nicolas Vazquez - Open vSwitch with DPDK on CloudStack
High performace network of Cloud Native Taiwan User Group
What are latest new features that DPDK brings into 2018?
HKG15-301: OVS implemented via ODP & vendor SDKs
G rpc talk with intel (3)
Tối ưu hiệu năng đáp ứng các yêu cầu của hệ thống 4G core
OVS v OVS-DPDK
[OpenStack 하반기 스터디] DPDK & OpenStack why?

More from harryvanhaaren (13)

PDF
The 7 Deadly Sins of Packet Processing - Venky Venkatesan and Bruce Richardson
PPTX
Symmetric Crypto for DPDK - Declan Doherty
PDF
Performance Lessons learned in vRouter - Stephen Hemminger
PDF
Dpdk Validation - Liu, Yong
PPTX
Packet Framework - Cristian Dumitrescu
PDF
Project growth & Next steps - Thomas monjalon
PDF
Hotplug and Virtio - Tetsuya Mukawa
PDF
Generic Resource Manager - László Vadkerti, András Kovács
PDF
TRex Traffic Generator - Hanoch Haim
PDF
DPDK Architecture Musings - Andy Harvey
PDF
DPDK Integration: A Product's Journey - Roger B. Melton
PDF
OpenDataPlane - Bill Fischofer
PDF
Hyperscan - Mohammad Abdul Awal
The 7 Deadly Sins of Packet Processing - Venky Venkatesan and Bruce Richardson
Symmetric Crypto for DPDK - Declan Doherty
Performance Lessons learned in vRouter - Stephen Hemminger
Dpdk Validation - Liu, Yong
Packet Framework - Cristian Dumitrescu
Project growth & Next steps - Thomas monjalon
Hotplug and Virtio - Tetsuya Mukawa
Generic Resource Manager - László Vadkerti, András Kovács
TRex Traffic Generator - Hanoch Haim
DPDK Architecture Musings - Andy Harvey
DPDK Integration: A Product's Journey - Roger B. Melton
OpenDataPlane - Bill Fischofer
Hyperscan - Mohammad Abdul Awal

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Electronic commerce courselecture one. Pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Modernizing your data center with Dell and AMD
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Encapsulation theory and applications.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
Teaching material agriculture food technology
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
A Presentation on Artificial Intelligence
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Electronic commerce courselecture one. Pdf
Advanced methodologies resolving dimensionality complications for autism neur...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
MYSQL Presentation for SQL database connectivity
Digital-Transformation-Roadmap-for-Companies.pptx
Modernizing your data center with Dell and AMD
Building Integrated photovoltaic BIPV_UPV.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Big Data Technologies - Introduction.pptx
Encapsulation theory and applications.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Chapter 3 Spatial Domain Image Processing.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Understanding_Digital_Forensics_Presentation.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf

OVS and DPDK - T.F. Herbert, K. Traynor, M. Gray

  • 1. Userspace 2015 | Dublin OVS, DPDK and Software Dataplane Acceleration
  • 2. Who we are? •  Thomas  F.  Herbert     –  Red  Hat   –  therbert@redhat.com   •  Kevin  Traynor   –  Intel   –  kevin.traynor@intel.com   •  Mark  Gray   –  Intel   –  mark.d.gray@intel.com  
  • 3. What is a Virtual Switch?
  • 5. User  space   Kernel  space   Openflow  Processing   NIC   NIC  NIC   OVS Architectural Evolution
  • 6. User  space   Openflow  Processing   Kernel  space   Microflow  cache   NIC   NIC  NIC   Netlink   OVS Architectural Evolution
  • 7. User  space   Openflow  Processing   Kernel  space   NIC   NIC  NIC   Netlink   Megaflow  Cache   Microflow  Cache   OVS Architectural Evolution
  • 8. User  space   Openflow  Processing   Kernel  space   PMD   PMD  PMD   Megaflow  Cache   Microflow  Cache   OVS Architectural Evolution
  • 9. OVS Architecture Linux  User  Space   ovs-­‐vswitchd   ofproto   netdev   netdev-­‐dpdk   libdpdk   ofproto-­‐dpif   dpif   dpif-­‐netdev    Linux  Kernel  Space   Hardware   NianMc   Fortville   vfio   uio  vfio   rte_ring   vhost  
  • 12. DPDK – Open vSwitch •  DPDK  -­‐  Popular  SoPware  Accelerated   Data  Plane   •  Fast  Packet  Forwarding  for  the   Cloud   •  Virtualized  Network   FuncMons   •  Use  of  Commodity  Hardware   •  For  Basic  OpenFlow    Switch   FuncMons   •  Behaves  IdenMcal  to  Linux   Kernel   •  Advantages  and  Disadvantages  WRT   Linux  Kernel     •  Linux  Data  Plane  Has   •  20  years  of  development   •  Rich  Debugging  OpMons   •  Packet  Dumping   •  Access  to  Wide  Variety  of   Network  IF’s  and  VF’s   •  Full  set  of  device  staMsMcs   •  More  Tunnel  Endpoints   •  DPDK  Data  Plane   •  Much  Faster  Packet  Forwarding   •  Up  to  12X  for  small  packets  
  • 13. DPDK/OVS User Perspective •  How  About  the  “User”  of  OVS/DPDK   •  Controllers  using  OF  and  OVSDB  protocols   •  People  Using  OVS  CLI  Tools   •  Network  Engineers    building  complex  topologies   •  Cloud  Deployements   •  Programmers  -­‐  ApplicaMon  Developers  of   •  Other  Packet  consumers,  DPI,  Classifiers   •  Infrastructure  –  Routers,  Firewalls,  Services   •  Other  Packet  consumers,  DPI,  Classifiers   •  One  person’s  experience   •  What  do  user’s  want   •  ExpectaMons  of  DPDK/OVS  vs  Linux  Kernel/OVS  
  • 14. DPDK/OVS Usability Story •  In  the  Beginning:  My  user  Story  starts  in  2013   •  Inspired  by  Intel  presentaMon  of  DPDK   at  ONS  2013   •  On  Team  Developing  SDN  Network  Threat   Analyzer  controlled   •  Integrated  Open  vSwitch   •  First  with  Linux  Kernel  Data  Path   •  Traffic  shaping,  threat  blocking  and   miMgaMon   •  Requirement:  10Gb  without    Adding   $10K  to  $20K  on  custom  HW  Switch   Fabric.   •  DPDK  is  the  Answer?   •  How  to  prove  the  OVS/DPDK   Claim?   •  At  first  Started  with  DPDK  1.7.1   •  Scary:  poor  integraMon  -­‐-­‐Not  integrated  with   OVS   •  CompilaMon  issues,  conflicMng  APIs.   ABIs,  OVS  Versions   •  Three  Confusing  Forks:     1.  DPDK.org   2.  DPI  Fork  with  custom  API   3.   01.org   •  Then  came  DPDK  1.8   •  Integrated:  Master  Branch  OVS   •  I  Ran  DPDK  on  guest  with  VirtIO/ VMXnet3  saw  2.5X  perf  gain   •  Developed  App  using  DPDK-­‐ring  to   feed  DPI   •  Now  we  are  up  to  DPDK  2.1  with  OVS.   •  Much  much  improved!  
  • 15. The Netdev Interface to OVS •  Transparency  of  Data  Plane   •  Netdev  –  API  Between  Data  Plane  and  OVS   •  Generic  network  device  API  independent  from  data  plane  implementaMon.   •  Similar  to  network  driver  interface  in  BSD   •  Netdev  Abstracts  forwarding  of  packets  in  data  plane   •  Conceptually  like  any  Network  device  driver   •  With  Start,  Stop,  Private  Data  Area,  Queue  Management   •  Struct  netdev  Holds  the  interface  Specific  FuncMon  Pointers   •  Includes  the  generic  part  followed  by  private  part  for  use  by  driver.   •  Constructur  for  netdev  provider   •  Dpdk    Creates  dpdk  personality  of  struct  netdev   •  MulMple  rx  queues  Managed  by  OVS  
  • 16. Improving DPDK/OVS •  Is  DPDK  really  sMll  Experimental?   •  Is  it  Mme  for  this  patch?   --- a/INSTALL.DPDK.md +++ a/INSTALL.DPDK.md @@ -5,8 +5,8 @@ Open vSwitch can use Intel® DPDK lib to operate entirely in Userspace. This file explains how to install and use Open vSwitch in such a mode. -The DPDK support of Open vSwitch is considered experimental. -It has not been thoroughly tested. This version of Open vSwitch should be built manually with `configure` and `make`. •  Issues  with  DPDK:   •  How  to  Improve?   •  This  thread,  h"p://openvswitch.org/pipermail/dev/2015-­‐August/058814.html   •  Some  SuggesMons  from  Thread   •  Device  management:   •  Udev/systemd  –  (Flavio  Leitner)   •  Device  creaMon,  binding,  destrucMon  –  handled  by  Host  OS  
  • 17. Improving DPDK/OVS Contd. •  How  to  Improve?   •  Debugging?   •  TcpDump  like  capability   •   Use  “Mirroing”  of  packets  to  pmd/libpcap  or  libpcap-­‐ng   •  TesMng   •  Add  CI  for  Data  Plane  TesMng   •  Vsperf  Project  –  To  Test  Against  Goals   •  Support  Only  One  type  of  vhost  device   •  Drop  Vhost  -­‐  Cuse   •  Vhost-­‐user  only   •  Beoer  DocumentaMon   •  Recent  Patch  to  INSTALL.DPDK.md   •  Training   •  From  lstopo  to  OpMmized  Data  Plane  
  • 19. Tuning - Multiple Threads VIRTUAL  0 VM Core  0 VIRTUAL  1 PHY  0 PHY  1 OS OVS  
  • 20. VIRTUAL  0 VM Core  9 Core  1 VIRTUAL  1 Core  2 PHY  0 Core  11 PHY  1 Core  12 OS Core  0 Tuning - Multiple Threads OVS  
  • 21. VIRTUAL  0 PHY  0 OS Core  0 VIRTUAL  0 PHY  1 VIRTUAL  1 Core  1 Core  3 Core  2 Core  4 Core  8 Core  9 VIRTUAL  0 PHY  0 PHY  1 PHY  1 Core  11 Core  13 Core  12 Core  14 VM  0 Tuning - Multiple Queues OVS  
  • 26. Performance Optimizations lookup  cost   rx  cost   acMon  cost  
  • 27. Performance Optimizations lookup  cost   rx  cost   tx  cost   acMon  cost  
  • 28. Performance Optimizations lookup  cost   rx  cost   tx  cost   acMon  cost  
  • 30. Performance Optimizations •  Physical   •  Offload  hash  to  NIC  hardware   •  MulMple  Rx  Queues  using  RSS   •  DPDK  Tx/Rx  use  of  Intel’s  Advanced  Vector  Extensions   •  DPDK  Bulk  allocaMon  and  batching   •  Exact  Match  Cache   •  Increased  size   •  DPDK  hash  integraMon  -­‐  needs  variable  key  size   •  NaMve  EMC  opMmizaMon   •  Datapath  Classifier   •  InvesMgaMng  use  of  DPDK  ACL  table   •  Different  usage  model  than  OVS  datapath  classifier   •  Virtual   •  vhost  library  –  prefetching  and  bulk  operaMons   •  virMo  pmd  vectorizaMon   •  MulMqueue  vhost  
  • 32. Performance Results Date:  August  2015.  Disclaimer:  SoPware  and  workloads  used  in  performance  tests  may  have  been  opMmized  for  performance  only  on  Intel  microprocessors.  Performance  tests,  such  as  SYSmark  and  MobileMark,  are  measured  using  specific  computer  systems,  components,  soPware,   operaMons  and  funcMons.  Any  change  to  any  of  those  factors  may  cause  the  results  to  vary.  You  should  consult  other  informaMon  and  performance  tests  to  assist  you  in  fully  evaluaMng  your  contemplated  purchases,  including  the  performance  of  that  product  when  combined  with   other  products.  Source:  Intel  internal  tesMng  as  of  August,  2015.  See  Linux*  Performance  Tuning  for  configuraMon  details.  For  more  informaMon  go  to  hop://www.intel.com/performance.  Results  have  been  measured    by  Intel  based  on  soPware,  benchmark  or  other  data  of  third   parMes  and  are  provided  for  informaMonal  purposes  only.    Any  difference  in  system  hardware  or  soPware  design  or  configuraMon  may  affect  actual  performance.    Intel  does  not  control  or  audit  the  design  or  implementaMon  of  third  party  data  referenced  in  this  document.    Intel   encourages  all  of  its  customers  to  visit  the  websites  of  the  referenced  third  parMes  or  other  sources  to  confirm  whether  the  referenced  data  is  accurate  and  reflects  performance  of  systems  available  for  purchase.   E5-­‐2680v2  2.8GHz  core  -­‐  64  byte  packets  -­‐  OVS  commit  id  f82313  -­‐  DPDK  2.0   1.32   16.52   [CELLREF]   0   5   10   15   20   25   Std.  OVS   OVS  with  DPDK   1  physical  core   Mpps   Phy-­‐Phy   0.8   4.85   9.76   [CELLREF]   [CELLREF]   0   2   4   6   8   10   12   14   Std.  OVS   OVS  with  DPDK   1  physical  core   OVS  with  DPDK   2  physical  cores   Mpps   Phy-­‐VM-­‐Phy  
  • 37. VIRTUAL  0 PHY  0 OS Core  0 VIRTUAL  0 PHY  1 VIRTUAL  1 Core  1 Core  3 Core  2 Core  4 Core  8 Core  9 VIRTUAL  0 PHY  0 PHY  1 PHY  1 Core  11 Core  13 Core  12 Core  14 VM  0 Tuning - Multiple Queues VIRTUAL  0 PHY  0 OS Core  0 VIRTUAL  0 PHY  1 VIRTUAL  1 Core  1 Core  3 Core  2 Core  4 Core  8 Core  9 VIRTUAL  0 PHY  0 PHY  1 PHY  1 Core  11 Core  13 Core  12 Core  14 VM  0 OVS  
  • 38. netdevovs-vswitchd netdev-dpdk dpif-netdev (User Space Forwarding) Compute Node: User Space OpenDaylight ovsdb OpenFlow ovsdb server DPDK librte_ring DPDK librte_vhost DPDK librte_eth dpif-linux (Kernel Space Forwarding – Control Only) ofproto Compute Node: Kernel Space openvswitch.ko netdev_linux sockets netdev_vport Overlays VNF   VirMo   Qemu   VNF   VirMo   Qemu   VNF   Ivshmem   DPDK   Qemu   OVS Architectural Evolution