MoonGen. A Scriptable High-Speed Packet Generator Design and Implementation. Paul Emmerich. January 30th, 2016 FOSDEM 2016

Similar documents
MoonGen: A Scriptable High-Speed Packet Generator

Lua as a business logic language in high load application. Ilya Martynov ilya@iponweb.net CTO at IPONWEB

MoonGen: A Scriptable High-Speed Packet Generator

The Lagopus SDN Software Switch. 3.1 SDN and OpenFlow. 3. Cloud Computing Technology

I/O virtualization. Jussi Hanhirova Aalto University, Helsinki, Finland Hanhirova CS/Aalto

Wire-speed Packet Capture and Transmission

High-performance vnic framework for hypervisor-based NFV with userspace vswitch Yoshihiro Nakajima, Hitoshi Masutani, Hirokazu Takahashi NTT Labs.

OpenFlow with Intel Voravit Tanyingyong, Markus Hidell, Peter Sjödin

Intel DPDK Boosts Server Appliance Performance White Paper

High-Density Network Flow Monitoring

Where IT perceptions are reality. Test Report. OCe14000 Performance. Featuring Emulex OCe14102 Network Adapters Emulex XE100 Offload Engine

Multi-core Programming System Overview

The new frontier of the DATA acquisition using 1 and 10 Gb/s Ethernet links. Filippo Costa on behalf of the ALICE DAQ group

Leveraging NIC Technology to Improve Network Performance in VMware vsphere

I3: Maximizing Packet Capture Performance. Andrew Brown

HANIC 100G: Hardware accelerator for 100 Gbps network traffic monitoring

IxChariot Virtualization Performance Test Plan

Enabling Technologies for Distributed Computing

HPC performance applications on Virtual Clusters

Wireshark in a Multi-Core Environment Using Hardware Acceleration Presenter: Pete Sanders, Napatech Inc. Sharkfest 2009 Stanford University

Hardware acceleration enhancing network security

10 Gbit Hardware Packet Filtering Using Commodity Network Adapters. Luca Deri Joseph Gasparakis

Enabling Technologies for Distributed and Cloud Computing

Towards 100 Gbit Flow-Based Network Monitoring. Luca Deri Alfredo Cardigliano

White Paper. Advanced Server Network Virtualization (NV) Acceleration for VXLAN

Datacenter Operating Systems

Boosting Data Transfer with TCP Offload Engine Technology

Big Data Technologies for Ultra-High-Speed Data Transfer and Processing

DPDK Summit 2014 DPDK in a Virtual World

High-Density Network Flow Monitoring

Cloud Networking Disruption with Software Defined Network Virtualization. Ali Khayam

ncap: Wire-speed Packet Capture and Transmission

Monitoring high-speed networks using ntop. Luca Deri

How Linux kernel enables MidoNet s overlay networks for virtualized environments. LinuxTag Berlin, May 2014

Performance Guideline for syslog-ng Premium Edition 5 LTS

Assessing the Performance of Virtualization Technologies for NFV: a Preliminary Benchmarking

ntopng: Realtime Network Traffic View

50. DFN Betriebstagung

High-performance vswitch of the user, by the user, for the user

WireCAP: a Novel Packet Capture Engine for Commodity NICs in High-speed Networks

Accelerating Network Virtualization Overlays with QLogic Intelligent Ethernet Adapters

Best Practices for Monitoring Databases on VMware. Dean Richards Senior DBA, Confio Software

RoCE vs. iwarp Competitive Analysis

COLO: COarse-grain LOck-stepping Virtual Machine for Non-stop Service

Quantum Hyper- V plugin

ODP Application proof point: OpenFastPath. ODP mini-summit

New Obvious and Obscure MikroTik RouterOS v5 features. Budapest, Hungary MUM Europe 2011

Evaluation and Characterization of NFV Infrastructure Solutions on HP Server Platforms

Cisco Integrated Services Routers Performance Overview

Accelerating High-Speed Networking with Intel I/O Acceleration Technology

Chapter 14 Virtual Machines

Optimizing Data Center Networks for Cloud Computing

VMWARE WHITE PAPER 1

Harmonizing policy management with Murphy in GENIVI, AGL and TIZEN IVI

Multi-Threading Performance on Commodity Multi-Core Processors

Achieving Nanosecond Latency Between Applications with IPC Shared Memory Messaging

Resource Utilization of Middleware Components in Embedded Systems

Network Function Virtualization: Virtualized BRAS with Linux* and Intel Architecture

VI Performance Monitoring

Brocade and EMC Solution for Microsoft Hyper-V and SharePoint Clusters

Cray Gemini Interconnect. Technical University of Munich Parallel Programming Class of SS14 Denys Sobchyshak

Balancing CPU, Storage

An Oracle Technical White Paper November Oracle Solaris 11 Network Virtualization and Network Resource Management

1-Gigabit TCP Offload Engine

Benchmarking Virtual Switches in OPNFV draft-vsperf-bmwg-vswitch-opnfv-00. Maryam Tahhan Al Morton

SDN software switch Lagopus and NFV enabled software node

LOAD BALANCING IN THE MODERN DATA CENTER WITH BARRACUDA LOAD BALANCER FDC T740

SDN and NFV Open Source Initiatives. Systematic SDN and NFV Workshop Challenges, Opportunities and Potential Impact

Stateless Packet Filtering Firewall on the NIC & Address Based Filtering

Software Defined Networking (SDN) - Open Flow

Informatica Ultra Messaging SMX Shared-Memory Transport

Brocade Solution for EMC VSPEX Server Virtualization

A Reliable and Fast Data Transfer for Grid Systems Using a Dynamic Firewall Configuration

Programmable Networking with Open vswitch

Performance Analysis of Large Receive Offload in a Xen Virtualized System

PCI Express IO Virtualization Overview

VXLAN Overlay Networks: Enabling Network Scalability for a Cloud Infrastructure

Enhancing Hypervisor and Cloud Solutions Using Embedded Linux Iisko Lappalainen MontaVista

Cloud Storage. Parallels. Performance Benchmark Results. White Paper.

Managing your Domino Clusters

A way towards Lower Latency and Jitter

Windows Server 2008 R2 Hyper-V Live Migration

Control and forwarding plane separation on an open source router. Linux Kongress in Nürnberg

Networking Virtualization Using FPGAs

Securing the Intelligent Network

Telecom - The technology behind

Deeply Embedded Real-Time Hypervisors for the Automotive Domain Dr. Gary Morgan, ETAS/ESC

Infrastructure for active and passive measurements at 10Gbps and beyond

Gigabit Ethernet Packet Capture. User s Guide

Enea Hypervisor : Facilitating Multicore Migration with the Enea Hypervisor

Communication Protocol

Impact of Virtualization on Cloud Networking Arista Networks Whitepaper

Intel Ethernet Switch Load Balancing System Design Using Advanced Features in Intel Ethernet Switch Family

Evaluation Report: Emulex OCe GbE and OCe GbE Adapter Comparison with Intel X710 10GbE and XL710 40GbE Adapters

Transcription:

MoonGen A Scriptable High-Speed Packet Generator Design and Implementation Paul Emmerich January 30th, 2016 FOSDEM 2016 Chair for Network Architectures and Services Department of Informatics Paul Emmerich MoonGen: A Scriptable High-Speed Packet Generator 1

Chair for Network Architectures and Services Source: www.spirent.com Paul Emmerich MoonGen: A Scriptable High-Speed Packet Generator 2

MoonGen MoonGen is a software packet generator Cheaper than hardware boxes More flexible Key features Fast: LuaJIT, DPDK 1, explicit multi-core support Flexible: Craft packets in real-time in user-defined Lua scripts Timestamping: Utilize hardware features found on modern commodity NICs 1 Intel Dataplane Development Kit, http://www.dpdk.org Paul Emmerich MoonGen: A Scriptable High-Speed Packet Generator 3

Multi-threading in Lua No native support, some libraries exist Our solution: multiple independent LuaJIT VMs Maps to our problem domain Generate different traffic flows in different threads Inter-thread communication rarely needed Modern NICs support multiple independent queues natively Serialization (via Serpent 2 ) and C functions for (slow) inter-vm communication 2 https://github.com/pkulchenko/serpent Paul Emmerich MoonGen: A Scriptable High-Speed Packet Generator 4

Architecture Userscript Lua VM Userscript master spawn Lua VM Lua VM Userscript Userscript slave config API data API MoonGen MoonGen Core config API data API DPDK HW NIC Q 0... Q n NIC Port Paul Emmerich MoonGen: A Scriptable High-Speed Packet Generator 5

Example: Generating Load 1 function loadslave(queue) 2 local mempool = memory.createmempool(function(buf) 3 buf:getudppacket():fill() 4 end) 5 local bufs = mempool:bufarray() 6 while mg.running() do 7 bufs:alloc(60) 8 for i, buf in ipairs(bufs) do 9 local pkt = buf:getudppacket() 10 pkt.ip4.src:set(math.random(0, 2^32-1)) 11 pkt.udp.src:set(math.random(0, 2^16-1)) 12 end 13 bufs:offloadudpchecksums() 14 queue:send(bufs) 15 end Paul Emmerich MoonGen: A Scriptable High-Speed Packet Generator 6

Packet data in Lua Different protocols are combined to build protocol stacks Endless combinations (e.g., tunnels in tunnels...) Efficient access to all protocol header fields required Paul Emmerich MoonGen: A Scriptable High-Speed Packet Generator 7

Packet data in Lua Different protocols are combined to build protocol stacks Endless combinations (e.g., tunnels in tunnels...) Efficient access to all protocol header fields required Dynamically build LuaJIT FFI cdata structs 1 vxlanpkt = createpacket("eth", "ip4", "udp", 2 "vxlan", {"eth", "innereth"}, {"ip4", "innerip4"}) 3 local pkt = vxlanpkt(buf) 4 pkt.innerip4:setsrc("10.0.0.1") Dynamically create class for the whole protocol stack Extremely fast modification operations Memory layout defined by cdata struct (can be sent out directly) Paul Emmerich MoonGen: A Scriptable High-Speed Packet Generator 7

Summary User-defined Lua scripts instead of configuration or DSLs LuaJIT is really really fast LuaJIT FFI cdata for packet structs 10 Gbit/s per CPU core ( 15 million packets per second) Execute user-defined script code for each packet LuaJIT FFI and C libraries for low-level stuff (drivers) Paul Emmerich MoonGen: A Scriptable High-Speed Packet Generator 8

Q & A Try MoonGen yourself! https://github.com/emmericp/moongen Questions? Paul Emmerich MoonGen: A Scriptable High-Speed Packet Generator 9

[Backup slide] Performance I: Lua can be faster than C UDP packets from varying source IP addresses Packet rate [Mpps] 15 10 5 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2 CPU frequency [GHz] MoonGen Pktgen-DPDK Pktgen-DPDK needs a complicated main loop that covers all possibilites MoonGen can use a tight inner loop Paul Emmerich MoonGen: A Scriptable High-Speed Packet Generator 10

[Backup slide] Performance II: heavy workload and multi-core scaling Generate random UDP packets on 2 10 Gbit NICs 8 calls to Lua s standard math.random per packet CPUs artificially clocked down to 1.2 GHz Packet rate [Mpps] 30 20 10 0 1 2 3 4 5 6 7 8 Number of 1.2 GHz CPU cores Paul Emmerich MoonGen: A Scriptable High-Speed Packet Generator 11

[Backup slide] Performance III: 40 GbE Generate random UDP packets on 2 10 Gbit NICs 8 calls to Lua s standard math.random per packet CPUs artificially clocked down to 1.2 GHz Rate [Gbit/s] 50 40 30 20 10 0 1 core 2 cores 3 cores 64 96 128 160 192 224 256 Packet size [byte] Paul Emmerich MoonGen: A Scriptable High-Speed Packet Generator 12