realistic traffic generator - fosdem...hanoch haim –principal engineer realistic traffic generator...

32
Hanoch Haim – Principal Engineer Realistic Traffic Generator

Upload: others

Post on 22-May-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

Hanoch Haim – Principal Engineer

Realistic Traffic Generator

Page 2: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

• Overview

• Stateless

• Advance Stateful

Agenda

2

Page 3: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

TRex – Results

• Open Source

• Cisco Customers

3

Page 4: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

TRex Usage Analytics monthly report (*)

(**) Users are distinct

(*) ~1200 distinct returningusers,

4

Page 5: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

TRex models of operation

5

• L7, DUT terminate TCP/SSL, flow based

• DUT inspect L7. does not change TCP. Flow based

• DUT L2/L3 Switch , packet based

Page 6: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

What Problem is Being Solved?

• Networks include complex L4-7 features, such as• Load Balancer, DPI/AVC, Firewall, NAT

• Requires testing with stateful and realistic traffic mix

6

Firewall, NATDPI/AVCLB

Page 7: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

What Problem is Being Solved?

• Traffic generators for realistic traffic are• Expensive ~$100-500K

• Not scalable for high rates

• Not flexible

• Implication • Limited and late testing

• Different benchmarks and test methodologies

• Real life bottlenecks and design issues

7

Page 8: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

What is TRex?

• Linux user-space application uses DPDK library

• Stateless: Stream based uses Scapy

• Stateful: flow basedGenerates, manipulates and amplifies based on templates of real, captured flows (W/O TCP stack)

• High performance: up to 200 Gb/sec

• Low cost: Standard server hardware

• Flexible and Open Software

• Virtualization

• Easy installation and deployment

8

Page 9: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

9

Page 10: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

Stateless

Page 11: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

Stateless High level functionality • High scale – ~10M-35MPPS/core

• Profile can support multiple streams, scalable to 20K parallel streams

• Interactive support – GUI/TUI

• Statistic per port/ stream (e.g. latency/ Jitter)

• Python automation support

• Multi-user support

• Capture to Wireshark

• Scalable services using plugins (e.g. DHCP,IPv6)

11

Page 12: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

Traffic Profile Example

12

Page 13: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

Control plane High level

13

Page 14: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

One stream with two directions

14

Page 15: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

15

Python Automation example

Page 16: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

link

Performance XL710 MPPS/Core

16

Page 17: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

Advanced Stateful

Page 18: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

User space TCP stack

18

Page 19: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

TRex ASTF features

• High scale • TCP is the core component

• Can be tuned MSS/initwnd/delay-ack• TCP is based on BSD with acceleration • Interactive• Accurate latency measurement – usec • Simulation of latency/jitter/drop in high rate• OpenSSL integration• L7 emulation layer

• Emulate application using “micro-instructions”• Field engine

19

Page 20: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

L7 Emulation layer

Client side

Server side

20

Page 21: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

HTTP simple profile

21

Page 22: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

Client side pseudo code

22

Page 23: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

Server side pseudo code

23

Page 24: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

Profile with two template

24

Page 25: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

Statistic

25

Page 26: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

Under the hood

26

Page 27: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

TCP stack – Flow Scale -TX

10M flows

320GByte

320M mbuf =10GB

0.01GB

27

Page 28: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

TCP stack – Flow Scale issue - RX

10M flows

320GByte

3-50GB for 1% drop rate

0.01GB

28

Page 29: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

TCP stack – Delay/Jitter/Drop simulation

100MPPS *100msec =10MPPS in Queue

100MPPS *100msec =10*16MPPS=0.16GB

29

Page 30: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

TRex vs NGINX

3

0

Page 31: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

Performance setup #2

3

1

Page 32: Realistic Traffic Generator - FOSDEM...Hanoch Haim –Principal Engineer Realistic Traffic Generator •Overview •Stateless •Advance Stateful Agenda 2 TRex –Results • Open

Performance numbers

3

2

https://trex-tgn.cisco.com/trex/doc/trex_astf_vs_nginx.html

x80 faster

x2000 less memory