a look at intel's dataplane development kit
TRANSCRIPT
![Page 1: A Look at Intel's Dataplane Development Kit](https://reader034.vdocuments.mx/reader034/viewer/2022051521/5849598b1a28aba93a8dd1eb/html5/thumbnails/1.jpg)
A Look at Intel’s Dataplane Development Kit
Dominik Scholz
Chair for Network Architectures and Services
Department for Computer ScienceTechnische Universitat Munchen
June 13, 2014
Dominik Scholz: A Look at Intel’s Dataplane Development Kit 1
![Page 2: A Look at Intel's Dataplane Development Kit](https://reader034.vdocuments.mx/reader034/viewer/2022051521/5849598b1a28aba93a8dd1eb/html5/thumbnails/2.jpg)
Outline
1 Packet Processing using Commodity Hardware
2 Intel’s Dataplane Development Kit
3 Comparison: Intel’s DPDK, netmap, PF RING DNA
Dominik Scholz: A Look at Intel’s Dataplane Development Kit 2
![Page 3: A Look at Intel's Dataplane Development Kit](https://reader034.vdocuments.mx/reader034/viewer/2022051521/5849598b1a28aba93a8dd1eb/html5/thumbnails/3.jpg)
Motivation
Why use commodity hardware and do packet processing insoftware?
Advantages:Flexibility: software can be modifiedIncreased performance and reduced costs of(multicore) CPU’s and NIC’s over the last yearsOpen source
But: existing dataplane software not designed for high-speedpacket processing (up to 10 Gbit/s)→ specialized frameworks implement different techniques toachieve significant performance speed-ups
Dominik Scholz: A Look at Intel’s Dataplane Development Kit 3
![Page 4: A Look at Intel's Dataplane Development Kit](https://reader034.vdocuments.mx/reader034/viewer/2022051521/5849598b1a28aba93a8dd1eb/html5/thumbnails/4.jpg)
Use Case: Linux Network Stack
Ingress Network Board Egress Network BoardMemory
Operating System
Buffer Buffer
1
9
Routing Table
2
3
4 5
78
10
11
Kernel Mode
User ModeApplikation
6
7
Applikation
Dominik Scholz: A Look at Intel’s Dataplane Development Kit 4
![Page 5: A Look at Intel's Dataplane Development Kit](https://reader034.vdocuments.mx/reader034/viewer/2022051521/5849598b1a28aba93a8dd1eb/html5/thumbnails/5.jpg)
Performance Limitating Factors
Bottleneck CPUBottleneck memory:
1 per packet allocation and deallocation2 multiple copy operations per packet3 complex sk buff structure
Parallelism: spinlocks (active waiting)Context switches
Conclusion: standard dataplane only for general purpose
Dominik Scholz: A Look at Intel’s Dataplane Development Kit 5
![Page 6: A Look at Intel's Dataplane Development Kit](https://reader034.vdocuments.mx/reader034/viewer/2022051521/5849598b1a28aba93a8dd1eb/html5/thumbnails/6.jpg)
Performance Limitating Factors
Bottleneck CPUBottleneck memory:
1 per packet allocation and deallocation2 multiple copy operations per packet3 complex sk buff structure
Parallelism: spinlocks (active waiting)Context switches
Conclusion: standard dataplane only for general purposeDominik Scholz: A Look at Intel’s Dataplane Development Kit 5
![Page 7: A Look at Intel's Dataplane Development Kit](https://reader034.vdocuments.mx/reader034/viewer/2022051521/5849598b1a28aba93a8dd1eb/html5/thumbnails/7.jpg)
Performance Limitating Factors
Bottleneck CPUBottleneck memory:
1 per packet allocation and deallocation2 multiple copy operations per packet3 complex sk buff structure
Parallelism: spinlocks (active waiting)Context switches
Conclusion: standard dataplane only for general purpose
Dominik Scholz: A Look at Intel’s Dataplane Development Kit 5
![Page 8: A Look at Intel's Dataplane Development Kit](https://reader034.vdocuments.mx/reader034/viewer/2022051521/5849598b1a28aba93a8dd1eb/html5/thumbnails/8.jpg)
Outline
1 Packet Processing using Commodity Hardware
2 Intel’s Dataplane Development Kit
3 Comparison: Intel’s DPDK, netmap, PF RING DNA
Dominik Scholz: A Look at Intel’s Dataplane Development Kit 6
![Page 9: A Look at Intel's Dataplane Development Kit](https://reader034.vdocuments.mx/reader034/viewer/2022051521/5849598b1a28aba93a8dd1eb/html5/thumbnails/9.jpg)
Intel DPDK
Set of libraries to accelerate basic dataplane functionsReleased in 2012Completely replaces the network stackIntel architecture-based: supporting Intel Atom - Intel XeonOpen SourceBSD-licensed: free and unsupported standalone orcommercial solution
Dominik Scholz: A Look at Intel’s Dataplane Development Kit 7
![Page 10: A Look at Intel's Dataplane Development Kit](https://reader034.vdocuments.mx/reader034/viewer/2022051521/5849598b1a28aba93a8dd1eb/html5/thumbnails/10.jpg)
DPDK Overview
Runtime environment with lowoverhead
Dataplane libraries run inuserspace
1 Memory management2 Buffer management3 Custom driver4 ...
Environment AbstractionLayer (EAL)
”Easy to use.” - Intel
Dominik Scholz: A Look at Intel’s Dataplane Development Kit 8
![Page 11: A Look at Intel's Dataplane Development Kit](https://reader034.vdocuments.mx/reader034/viewer/2022051521/5849598b1a28aba93a8dd1eb/html5/thumbnails/11.jpg)
Queue Manager
Fixed-sized ring implemented as table of pointer to any object
Properties:FIFOLockless (no active waiting)Supports multi consumer/producer enqueue/dequeuescenariosSupports bunch-processing of objects
Dominik Scholz: A Look at Intel’s Dataplane Development Kit 9
![Page 12: A Look at Intel's Dataplane Development Kit](https://reader034.vdocuments.mx/reader034/viewer/2022051521/5849598b1a28aba93a8dd1eb/html5/thumbnails/12.jpg)
Memory Manager
mempool structure:Pool of fixed-sized objectsUses a ring to store free objectsPer core cache (optional)
Dominik Scholz: A Look at Intel’s Dataplane Development Kit 10
![Page 13: A Look at Intel's Dataplane Development Kit](https://reader034.vdocuments.mx/reader034/viewer/2022051521/5849598b1a28aba93a8dd1eb/html5/thumbnails/13.jpg)
Buffer Manager
mbuf structure used to store network packetsCreated before runtime”Allocation”: take a free mbuf from a mempool”Deallocation”: put the mbuf back to the mempoolSmall size to fit in one cache-line (→ mbuf-chaining)
mbuf contains:1 Metadata: control information, e.g. packet length2 Pointer to next mbuf3 Packet data: header and payload
Dominik Scholz: A Look at Intel’s Dataplane Development Kit 11
![Page 14: A Look at Intel's Dataplane Development Kit](https://reader034.vdocuments.mx/reader034/viewer/2022051521/5849598b1a28aba93a8dd1eb/html5/thumbnails/14.jpg)
How to use the DPDK - EAL
The DPDK creates libraries by creating the EAL:Hides environment specificsProvides standard programming interfaceOptimized for the available hardware
But does not provide:Layer-3 forwardingFirewalls...any layer 3 or upper protocol
→Developer has to port his application to the DPDK
Dominik Scholz: A Look at Intel’s Dataplane Development Kit 12
![Page 15: A Look at Intel's Dataplane Development Kit](https://reader034.vdocuments.mx/reader034/viewer/2022051521/5849598b1a28aba93a8dd1eb/html5/thumbnails/15.jpg)
Outline
1 Packet Processing using Commodity Hardware
2 Intel’s Dataplane Development Kit
3 Comparison: Intel’s DPDK, netmap, PF RING DNA
Dominik Scholz: A Look at Intel’s Dataplane Development Kit 13
![Page 16: A Look at Intel's Dataplane Development Kit](https://reader034.vdocuments.mx/reader034/viewer/2022051521/5849598b1a28aba93a8dd1eb/html5/thumbnails/16.jpg)
netmap
A framework for raw packet I/O, developed by Luigi Rizzo(Universita di Pisa)
Feature: works with broad range of soft- and hardware
Linux and FreeBSDIntel 10GbE and 1GbE adapterIntel, RealTek, nVidia
Implemented techniques:Memory pre-allocation and re-useMemory mappingBatch processingParallel direct paths (assign CPU core to receiving queue)
Dominik Scholz: A Look at Intel’s Dataplane Development Kit 14
![Page 17: A Look at Intel's Dataplane Development Kit](https://reader034.vdocuments.mx/reader034/viewer/2022051521/5849598b1a28aba93a8dd1eb/html5/thumbnails/17.jpg)
PF RING Direct NIC Access
A framework to capture packets, developed by ntop.
Feature: zero-copyPF RING DNA maps NIC memory and registers to userland→ only one copy operation per packetBut: weakness to user misbehaviour (system-crashes)
Implemented techniques:Memory pre-allocation and re-useMemory mapping (zero-copy)Parallel direct paths
Dominik Scholz: A Look at Intel’s Dataplane Development Kit 15
![Page 18: A Look at Intel's Dataplane Development Kit](https://reader034.vdocuments.mx/reader034/viewer/2022051521/5849598b1a28aba93a8dd1eb/html5/thumbnails/18.jpg)
Summary
Intel DPDK netmap PF RING DNAMemory Pre-allocation 3 3 3
Memory Mapping 3 3 3
Batch Processing 3 3 7
Parallel Direct Paths 3 3 3
Open Source 3 3 3
”Safety” 3 3 7
Test results show:different frameworks exceed in different use cases [2][4]up to 10 times faster than the linux network stack
Dominik Scholz: A Look at Intel’s Dataplane Development Kit 16
![Page 19: A Look at Intel's Dataplane Development Kit](https://reader034.vdocuments.mx/reader034/viewer/2022051521/5849598b1a28aba93a8dd1eb/html5/thumbnails/19.jpg)
Sources
Intel DPDKProgrammers Guide.January 2014.
Intel DPDKPacket Processing on Intel Architecture.Presentation slides, 2012.
Luigi Rizzonetmap: a novel framework for fast packet I/Oin: Proceedings of the 2012 USENIX Annual Technical Conference,2012.
Jose Luis Garcıa-Dorado et al.High-Performance Network Traffic Processing Systems UsingCommodity Hardwarein: Data Traffic Monitoring and Analysis, Springer Verlag, 2013.
www.dpdk.orgLast visited: 06.06.2014
Dominik Scholz: A Look at Intel’s Dataplane Development Kit 17
![Page 20: A Look at Intel's Dataplane Development Kit](https://reader034.vdocuments.mx/reader034/viewer/2022051521/5849598b1a28aba93a8dd1eb/html5/thumbnails/20.jpg)
Thank you for your attention!Do you have any questions?
Dominik Scholz: A Look at Intel’s Dataplane Development Kit 18