dpdk summit china 2017 · pdf filedpdk summit china 2017. ... (corouting,php,python,) app...

16
DPDK Summit China 2017

Upload: lamkhanh

Post on 08-Mar-2018

222 views

Category:

Documents


3 download

TRANSCRIPT

DPDK Summit China 2017

F-Stack - a full user-space network development kitBASED ON DPDK, FREEBSD TCP/IP STACK

2

Fengbo Jiang, Hailong Wang

Network Platforms Group

3

Explosive growth of data services Challenges

service traffic:CDN,live streaming(RTMP),etc. DDoS, CC

Solution NIC: 25GbE40GbE100GbE CPU: 24Cores48Cores56Cores L2/L3: Kernel bapass(DPDK) L4/L7: ?

Network Platforms Group

DPDK China Summit 2017 Shanghai,

4

user space TCP/IP stack Seastar's native stack

problems in WAN incompatible with existing programs

mTCP's user-level stack tcp only. too simple to be a production ready stack

VLAN/VxLAN/Tunnel/Bonding/Network Tools are not supported

Network Platforms Group

DPDK China Summit 2017 Shanghai,

5

What does F-Stack do?

DPDK

FreeBSD TCP/IP stack

SDK(corouting)

APP(nginx, redis, memcache)

Posix API

Network Platforms Group

DPDK China Summit 2017 Shanghai,

6

F-Stack……

……

……

……

……

……

……

……

……

……

DPDK

Posix-like API

SDK(Corouting)

APP(Nginx, Redis)

FreeBSD TCP/IP stack

1、Full user-space No content switch Zero copy No hirqs and sirqs

2、Shared-nothing architecture Linear scalability No schedule No lock No cache locality miss

Network Platforms Group

DPDK China Summit 2017 Shanghai,

7

Why FreeBSD Why full TCP/IP stack?

Advantageous functional, production ready stack, IGMP/IPv6/VLAN/VxLAN/Tunnel/Bonding/Net Tools

Stable.

Why not Linux?

complicated logic. GPL

Network Platforms Group

DPDK China Summit 2017 Shanghai,

8

User space FreeBSD TCP/IP stackphymem

uma_page_slab_hashuma

kmem_malloc malloc

timecountertickshz

timer

memory clock

kernel,irq threading

schedwakeup

sleep

schedule

mtxrwrmsx

cond

locks

mmap/malloc(rte_mempool/rt

e_malloc)

rte_timerticks

timecounter

hook replace

poll

remove &

replace

empty macro

remove

Network Platforms Group

DPDK China Summit 2017 Shanghai,

9

Posix-like API

F-Stack Lib

ff_init(argc, argv)ff_socketff_readff_write……

ff_kqueueff_keventff_epoll_ctlff_epoll_wait

API

ff_run(loop, arg);

Network Platforms Group

DPDK China Summit 2017 Shanghai,

10

Coroutineapp

event

Microthread EventMicrothread EventMicrothread EventMicrothread EventMicrothread Event

Synchronous programming

Asynchronous execution Microthread

Scheduler

Add Event

Get EventExecute Event

Add IO Event

Network Platforms Group

DPDK China Summit 2017 Shanghai,

11

Network tools

sysctl ifconfig route netstat etc..

Network Platforms Group

DPDK China Summit 2017 Shanghai,

12

Nginx_F-Stack

[1]: http://dpdk.org/git/next/dpdk-next-virtio

0.34 0.39 0.42 0.44 0.48 0.47 0.47 0.40 0.77

1.44

2.92

3.94

5.15

5.82

0

200000

400000

600000

800000

1000000

1200000

0.00

1.00

2.00

3.00

4.00

5.00

6.00

7.00

1 2 4 8 12 16 20

RPS

Bandwidth(G)

CPU Cores

cache body RPS test(No Keep Alive)

BW(Nginx) BW(Nginx_FStack) RPS(Nginx) RPS(Nginx_FStack)

Network Platforms Group

DPDK China Summit 2017 Shanghai,

13

F-Stack in Tencent Cloud

2013 UDP DNS server based on DPDK 2014 TCP(user-space TCP/IP stack) DNS server 2015 L4/L7 gateway application 2016 Used on HttpDNS,CDN,COS(Cloud Object Storage) 2017 Port FreeBSD network stack to F-Stack and open

source

Network Platforms Group

DPDK China Summit 2017 Shanghai,

14

Roadmap

Watchdog/tools

DPDK(SPDK)

Posix API(LD_RRELOAD)

SDK(corouting,php,python,……)

APP(nws,nginx,redis,……)

FreeBSD TCP/IP(TCPA,SHELD,Hooks)

Network Platforms Group

DPDK China Summit 2017 Shanghai,

15

http://www.f-stack.org

F-Stack WeChat subscription

Resources

https://github.com/f-stack

Network Platforms Group

DPDK China Summit 2017 Shanghai,

16

Thanks!!

欢迎关注DPDK开源社区