+ All Categories
Home > Documents > NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity...

NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity...

Date post: 05-Oct-2020
Category:
Upload: others
View: 3 times
Download: 0 times
Share this document with a friend
24
NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity Hardware Junxiao Shi, Davide Pesavento, Lotfi Benmohamed Advanced Network Technologies Division National Institute of Standards and Technology 1
Transcript
Page 1: NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity …conferences.sigcomm.org/acm-icn/2020/assets/2-1...output1 input stage forwarding stage output stage fwd0 PIT+CS FIB fwd1 PIT+CS

NDN-DPDK:NDN Forwarding at 100 Gbps

on Commodity HardwareJunxiao Shi, Davide Pesavento, Lotfi Benmohamed

Advanced Network Technologies Division

National Institute of Standards and Technology

1

Page 2: NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity …conferences.sigcomm.org/acm-icn/2020/assets/2-1...output1 input stage forwarding stage output stage fwd0 PIT+CS FIB fwd1 PIT+CS

Introduction

• NDN needs a high-speed forwarder:• Use case: data intensive science, live video streaming, …

• Goal: line speed on commodity hardware.

How to get there?

➢Adopt better algorithms and data structures.

➢Reduce overhead in library and kernel.

2

Page 3: NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity …conferences.sigcomm.org/acm-icn/2020/assets/2-1...output1 input stage forwarding stage output stage fwd0 PIT+CS FIB fwd1 PIT+CS

Data Plane Development Kit (DPDK)

• DPDK: libraries to accelerate packet processing workloads.

Main DPDK features:

➢Multi-threading: use all available CPU cores.

➢Ring buffer queue: transfer packets between threads.

➢Hugepage-backed memory pools: no malloc() in data path.

➢User-space NIC drivers: bypass the kernel.

3

Page 4: NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity …conferences.sigcomm.org/acm-icn/2020/assets/2-1...output1 input stage forwarding stage output stage fwd0 PIT+CS FIB fwd1 PIT+CS

Our Contributions

• NDN-DPDK:✓Complete implementation.

✓Running on real hardware.

✓Support full NDN protocol and name matching semantics.

• Prior works:❑Focus on a subset of data plane: Mansilha et al (ICN'15), …

❑Rely on simulations: Song et al (ICN'15), …

❑Lack support for Interest-Data prefix match: So et al (ANCS'13), Caesar (ANCS'14), Augustus (ICN'16), …

4

Page 5: NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity …conferences.sigcomm.org/acm-icn/2020/assets/2-1...output1 input stage forwarding stage output stage fwd0 PIT+CS FIB fwd1 PIT+CS

Forwarder Architecture

input0

input1

Name Dispatch

Table FIB mgmt

output0

output1

input stage forwarding stage output stage

fwd0PIT+CS FIB

fwd1PIT+CS FIB

5

Page 6: NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity …conferences.sigcomm.org/acm-icn/2020/assets/2-1...output1 input stage forwarding stage output stage fwd0 PIT+CS FIB fwd1 PIT+CS

FIB Design

• 2-stage Longest Prefix Match algorithm.• So et al, Named data networking on a router: Fast and DoS-resistant

forwarding with hash tables (ANCS'13).

6

name

nexthops

strategy scratch area

strategy pointer

counters

name

LPM max depth

real entry pointer

virtual FIB entry(at LPM start depth only)

normal FIB entry strategy program

BPF instructions

JIT'ed programRC

U p

rote

cted

up

dat

able

wit

ho

ut

RC

U

FIB hash table

Page 7: NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity …conferences.sigcomm.org/acm-icn/2020/assets/2-1...output1 input stage forwarding stage output stage fwd0 PIT+CS FIB fwd1 PIT+CS

FIB Replication on NUMA Sockets

• NUMA: Non-Uniform Memory Access.• Hardware in a multi-CPU server is organized in NUMA sockets.

• Nonlocal memory access incurs higher latency.

• Each NUMA socket has a copy of FIB.• Forwarding threads can avoid nonlocal memory access during FIB lookups.

7

NUMA#0

CPU

RAM

PCI

NUMA#1

CPU

RAM

PCI

NUMA#0 NUMA#1

NUMA#2 NUMA#3

Page 8: NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity …conferences.sigcomm.org/acm-icn/2020/assets/2-1...output1 input stage forwarding stage output stage fwd0 PIT+CS FIB fwd1 PIT+CS

PIT Sharding

• Each forwarding thread has a private PIT.• Non-thread-safe. No RCU.

Requirements on packet dispatching:

1) Same Interest name => same forwarding thread.• Required by Interest aggregation and loop prevention.

2) Common Interest prefix => same forwarding thread.• Make forwarding strategy effective.

3) Data/Nack => forwarding thread that processed the Interest.• So that they can go back to the downstream.

8

Page 9: NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity …conferences.sigcomm.org/acm-icn/2020/assets/2-1...output1 input stage forwarding stage output stage fwd0 PIT+CS FIB fwd1 PIT+CS

Dispatch Interest by Name

• Name Dispatch Table (NDT)• Map: hash of name prefix => forwarding thread ID

• Thread safe: NDT is an array of atomic_int.

• Many name prefixes share the same entry.

• In input threads:

Interest

0

1

0

0

1

1

0

1

compute hash of first two name components

(configurable)

choose NDT entry:hash % NDT.size()

dispatch to forwarding thread

fwd1

PIT+CS

fwd0

PIT+CS

9

Page 10: NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity …conferences.sigcomm.org/acm-icn/2020/assets/2-1...output1 input stage forwarding stage output stage fwd0 PIT+CS FIB fwd1 PIT+CS

PIT Token

• Data packet: name dispatching works most of the time, except:• Interest /A CanBePrefix=1 goes to NDT[SipHash(/A)].

• Data /A/B/1 goes to NDT[SipHash(/A/B)].

• Solution: use PIT token to associate Interest and Data.

• PIT token is an opaque token carried in a hop-by-hop field.• Every outgoing Interest carries a PIT token.

• Data/Nack must carry the same PIT token.

10

Page 11: NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity …conferences.sigcomm.org/acm-icn/2020/assets/2-1...output1 input stage forwarding stage output stage fwd0 PIT+CS FIB fwd1 PIT+CS

Dispatch Data/Nack by PIT Token

• NDN-DPDK's PIT token contains:a) Forwarding thread ID (8 bits), to dispatch Data/Nack correctly.

b) PIT entry index (48 bits), to accelerate PIT lookups.

11

Interest0xBEEF

input

NDT fwd0

fwd1

Interest0x01 C001

C

inputData

0x01 C001Data

0xBEEF

P

output

output

face Aface B

fwd2

Page 12: NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity …conferences.sigcomm.org/acm-icn/2020/assets/2-1...output1 input stage forwarding stage output stage fwd0 PIT+CS FIB fwd1 PIT+CS

Prefix Match in CS

• In-Network Name Discovery:• Interests should be able to use incomplete names to retrieve Data packets.

• CS is a hash table, which only supports exact match.

• Solution: indirect entries.

/A/B/C/1direct entrywith Data packet

/A/Bindirect entry

Prefix-name Interest /A/B can be satisfied by the indirect entry.

Exact-name Interest /A/B/C/1 can be satisfied by the direct entry.

/A/B/Cindirect entry

Consumer normally uses a consistent name for name discovery.If a different name is used, the Interest must be satisfied by the producer, and then it gets another indirect entry.

12

Page 13: NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity …conferences.sigcomm.org/acm-icn/2020/assets/2-1...output1 input stage forwarding stage output stage fwd0 PIT+CS FIB fwd1 PIT+CS

PIT-CS Composite Table (PCCT)

13

PIT entry

downstream faces

upstream faces

strategy scratch area

copy of Interest

direct CS entry

Data packet

indirect entries list

ARC linked list nodes

indirect CS entry

direct entry pointer

LRU linked list node

token hash table

name hash table

name chosen FH

48-bit token

Page 14: NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity …conferences.sigcomm.org/acm-icn/2020/assets/2-1...output1 input stage forwarding stage output stage fwd0 PIT+CS FIB fwd1 PIT+CS

BenchmarksSpoiler alert: we made it to 100 Gbps

14

Page 15: NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity …conferences.sigcomm.org/acm-icn/2020/assets/2-1...output1 input stage forwarding stage output stage fwd0 PIT+CS FIB fwd1 PIT+CS

Benchmark Topology

Two physical machines:

• Forwarder.

• Traffic generators: (logically independent)• Fetch Data from each other.

• CUBIC-like congestion control.

• CPU: dual Intel Xeon Gold 6240.• 18 cores at 2.60 GHz, Hyper Threading disabled.

• Memory: 256 GB, 2933 MHz, four channels.• 64x 1GB hugepages per NUMA socket.

• NIC: Mellanox ConnectX-5 100 Gbps.

forwarder

producer /Aconsumer /B

producer /Bconsumer /A

15

Page 16: NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity …conferences.sigcomm.org/acm-icn/2020/assets/2-1...output1 input stage forwarding stage output stage fwd0 PIT+CS FIB fwd1 PIT+CS

We Made It to 100 Gbps108 Gbps

Measured from consumers.Data packets only.Not counting retransmissions.

Data payload only.

8 forwarding threads.

16

Page 17: NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity …conferences.sigcomm.org/acm-icn/2020/assets/2-1...output1 input stage forwarding stage output stage fwd0 PIT+CS FIB fwd1 PIT+CS

Input Thread Bottleneck

• Expectation:↑ # forwarding threads

↑ Data forwarding rate (pps)

• Reality:• Data forwarding rate plateaus at 8

forwarding threads.

• Bottleneck: input thread.• Current architecture only allows

one input thread per face.

peak: 1.84 Mpps

linear growth no improvement17

Page 18: NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity …conferences.sigcomm.org/acm-icn/2020/assets/2-1...output1 input stage forwarding stage output stage fwd0 PIT+CS FIB fwd1 PIT+CS

Effect of Nonlocal Memory Access

NUMA#0

gen

gen

NUMA#1

NUMA#0

gen

gen

NUMA#1

same NUMA cross NUMA: higher memory access latency

up to 20% slower

18

Page 19: NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity …conferences.sigcomm.org/acm-icn/2020/assets/2-1...output1 input stage forwarding stage output stage fwd0 PIT+CS FIB fwd1 PIT+CS

Performance with Large FIB

FIB entriesforwarding rate (kpps) Interest latency (μs)

mean stdev median 95th percentile

104 1840 5.59 90 227

105 1835 4.92 92 234

106 1839 4.42 97 249

19

Page 20: NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity …conferences.sigcomm.org/acm-icn/2020/assets/2-1...output1 input stage forwarding stage output stage fwd0 PIT+CS FIB fwd1 PIT+CS

Forwarding Rate with Large CS

20

producer

consumer

forwarder

consumer

Page 21: NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity …conferences.sigcomm.org/acm-icn/2020/assets/2-1...output1 input stage forwarding stage output stage fwd0 PIT+CS FIB fwd1 PIT+CS

Latency with Large CS

Exact Match Prefix Match

21

90th percentile

Interest 4875 μs

Data 456 μs

Page 22: NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity …conferences.sigcomm.org/acm-icn/2020/assets/2-1...output1 input stage forwarding stage output stage fwd0 PIT+CS FIB fwd1 PIT+CS

Future Work

• Remove the input thread bottleneck:• Design changes to allow multiple input threads per face.

• Dispatch Data/Nack via Receive Size Scaling (RSS).

• Dispatch Interest (NDT) using eBPF or FPGA hardware.

• Expand Content Store to NVMe disk storage.

• Load balancing by adjusting NDT entries.

• Performance profiling and improvement toward 200 Gbps.

22

Page 23: NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity …conferences.sigcomm.org/acm-icn/2020/assets/2-1...output1 input stage forwarding stage output stage fwd0 PIT+CS FIB fwd1 PIT+CS

NDN-DPDK Codebase

• https://github.com/usnistgov/ndn-dpdk• Forwarder

• Traffic Generator

• GraphQL-based management tools

• NDNgo library for application development

• Dedicated to public domain

Go65.2%

C29.7%

TypeScript2.3%

other2.8%

Programming Languages (2020)

23

Page 24: NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity …conferences.sigcomm.org/acm-icn/2020/assets/2-1...output1 input stage forwarding stage output stage fwd0 PIT+CS FIB fwd1 PIT+CS

Thank You

Junxiao Shi, Davide Pesavento, Lotfi Benmohamed

NDN-DPDK: NDN Forwarding at 100 Gbps on Commodity Hardware

7th ACM Conference on Information-Centric Networking (ICN 2020)

24


Recommended