SlideShare a Scribd company logo
HIGH PERFORMANCE
NETWORK
HUNG WEI CHIU
WHO AM I
• Hung-Wei Chiu (邱宏瑋)
• hwchiu@linkernetworks.com
• hwchiu.com
• Experience
• Software Engineer at Linker Netowrks
• Software Engineer at Synology (2014~2017)
• Co-Found of SDNDS-TW
• Open Source experience
• SDN related projects (mininet, ONOS, Floodlight, awesome-sdn)
WHAT WE DISCUSS TODAY
 The Drawback of Current Network Stack.
 High Performance Network Model
 DPDK
 RDMA
 Case Study
DRAWBACK OF CURRENT NETWORK STACK
• Linux Kernel Stack
• TCP Stack
• Packets Processing in Linux Kernel
LINUX KERNEL TCP/IP NETWORK STACK
• Have you imaged how applications communicate by network?
Linux Linux
www-server
Chrome
Network
PACKET
IN YOUR APPLICATION (CHROME).
• Create a Socket
• Connect to Aurora-Server (we use TCP)
• Send/Receives Packets. User-Space
Kernel-Space Copy data from the user-space
 Handle TCP
 Handle IPv4
 Handle Ethernet
 Handle Physical
 Handle Driver/NIC
Had you wrote a socket programming before ?
FOR GO LANGUAGE
FOR PYTHON
FOR C LANGUAGE
Did you image how kernel handle those operations ?
HOW ABOUT THE KERNEL ?
SEND MESSAGE
• User Space -> send(data….)
• SYSCALL_DEFINE3(….)  kernel space.
• vfs_write
• do_sync_write
• sock_aio_write
• do_sock_write
• __sock_sendmsg
• security_socket_sendmsg(…)
• inet_sendmsg
• tcp_sendmsg  finally
TCP …
• __tcp_push_pending_frames
• Tcp_push_one
• tcp_write_xmit
• tcp_transmit_skb
• ip_queue_xmit ---> finally
IP
• ip_route_output_ports
• ip_route_output_flow ->
routing
• xfrm_lookup -> routing
• Ip_local_out
• dst_output
• ip_output
• …...
HOW ABOUT THE KERNEL ?
RECEIVE MESSAGE
• User Space -> read(data….)
• SYSCALL_DEFINE3(….)  Kernel Space
• …..
WHAT IS THE PROBLEM
• TCP
• Linux Kernel Network Stack
• How Linux process packets.
THE PROBLEM OF TCP
• Designed for WAN network environment
• Different hardware between now and then.
• Modify the implementation of TCP to improve its performance
• DCTCP (Data Center TCP)
• MPTCP (Multi Path TCP)
• Google BBR (Modify Congestion Control Algorithm)
• New Protocol
• [論文導讀]
• Re-architecting datacenter networks and stacks for low latency and high performance
THE PROBLEM OF LINUX NETWORK STACK
• Increasing network speeds: 10G  40G  100G
• Time between packets get smaller
• For 1538 bytes.
• 10 Gbis == 1230.4 ns
• 40 Gbis == 307.6 ns
• 100 Gbits == 123.0 ns
• Refer to
http://people.netfilter.org/hawk/presentations/LCA2015/net_stack_challenges_100G_L
CA2015.pdf
• Network stack challenges at increasing speeds The 100Gbit/s challenge
THE PROBLEM OF LINUX NETWORK STACK
• For smallest frame size 84 bytes.
• At 10Gbit/s == 67.2 ns, (14.88 Mpps) (packet per second)
• For 3GHz CPU, 201 CPU cycles for each packet.
• System call overhead
• 75.34 ns (Intel CPU E5-2630 )
• Spinlock + unlock
• 16.1ns
THE PROBLEM OF LINUX NETWORK STACK
• A single cache-miss:
• 32 ns
• Atomic operations
• 8.25 ns
• Basic sync mechanisms
• Spin (16ns)
• IRQ (2 ~ 14 ns)
SO..
• For smallest frame size 84 bytes.
• At 10Gbit/s == 67.2 ns, (14.88 Mpps) (packet per second)
• 75.34+16.1+32+8.25+14 = 145.69
PACKET PROCESSING
• Let we watch the graph again
PACKET PROCESSING
• When a network card receives a packet.
• Sends the packet to its receive queue (RX)
• System (kernel) needs to know the packet is coming and pass the data to a
allocated buffer.
• Polling/Interrupt
• Allocate skb_buff for packet
• Copy the data to user-space
• Free the skb_buff
PACKETS PROCESSING IN LINUX
User Space
Kernel Space
NIC TX/RX Queue
Application
Socket Driver Ring Buffer
PROCESSING MODE
• Polling Mode
• Busy Looping
• CPU overloading
• High Network Performance/Throughput
PROCESSING MODE
• Interrupt Mode
• Read the packet when receives the interrupt
• Reduce CPU overhead.
• We don’t have too many CPU before.
• Worse network performance than polling mode.
MIX MODE
• Polling + Interrupt mode (NAPI) (New API)
• Interrupt first and then polling to fetch packets
• Combine the advantage of both mode.
SUMMARY
• Linux Kernel Overhead (System calls, locking, cache)
• Context switching on blocking I/O
• Interrupt handling in kernel
• Data copy between user space and kernel space.
• Too many unused network stack feature.
• Additional overhead for each packets
HOW TO SOLVE THE PROBLEM
• Out-of-tree network stack bypass solutions
• Netmap
• PF_RING
• DPDK
• RDMA
HOW TO SOLVE THE PROBLEM
• How did those models handle the packet in 62.7ns?
• Batching, preallocation, prefetching,
• Staying cpu/numa local, avoid locking.
• Reduce syscalls,
• Faster cache-optimal data structures
HOW TO SOLVE THE PROBLEM
• How did those models handle the packet in 62.7ns?
• Batching, preallocation, prefetching,
• Staying cpu/numa local, avoid locking.
• Reduce syscalls,
• Faster cache-optimal data structures
HOW TO SOLVE.
• Now. There’re more and more CPU in server.
• We can dedicated some CPU to handle network packets.
• Polling mode
• Zero-Copy
• Copy to the user-space iff the application needs to modify it.
• Sendfile(…)
• UIO (User Space I/O)
• mmap (memory mapping)
HIGH PERFORMANCE NETWORKING
• DPDK (Data Plane Development Kit)
• RDMA (Remote Directly Memory Access)
DPDK
• Supported by Intel
• Only the intel NIC support at first.
• Processor affinity / NUMA
• UIO
• Polling Mode
• Batch packet handling
• Kernel Bypass
• …etc
PACKETS PROCESSING IN DPDK
User Space
Kernel Space
NIC TX/RX Queue
Application DPDK
UIO (User Space IO)
Driver
Ring Buffer
COMPARE
Network Interface Card
Linux Kernel
Network Stack
Network Driver
Application
Network Interface Card
Linux Kernel
Network Stack
Network Driver
Application
Kernel
Space
User Space
WHAT’S THE PROBLEM.
• Without the Linux Kernel Network Stack
• How do we know what kind of the packets we received.
• Layer2 (MAC/Vlan)
• Layer3 (IPv4, IPv6)
• Layer4 (TCP,UDP,ICMP)
USER SPACE NETWORK STACK
• We need to build the user space network stack
• For each applications, we need to handle following issues.
• Parse packets
• Mac/Vlan
• IPv4/IPv6
• TCP/UDP/ICMP
• For TCP, we need to handle three-way handshake
FOR ALL EXISTING NETWORK APPLICATIONS
• Rewrite all socket related API to DPDK API
• DIY
• Find some OSS to help you
• dpdk-ans (c )
• mTCP (c )
• yanff (go)
• Those projects provide BSD-like interface for using.
SUPPORT DPDK?
• Storage
• Ceph
• Software Switch
• BSS
• FD.IO
• Open vSwitch
• ..etc
A USE CASE
• Software switch
• Application
• Combine both of above (Run Application as VM or Container)
Kernel
User
Open vSwitch(DPDK)
NIC(DPDK) NIC(DPDK)
Kernel
User
My Application
NIC(DPDK)
Kernel
User
Open vSwitch(DPDK)
NIC(DPDK) NIC(DPDK)
Container
1
Container
2
How container
connect to the
OpenvSwitch?
PROBLEMS OF CONNECTION
• Use VETH
• Kernel space again.
• Performance downgrade
• Virtio_user
RDMA
• Remote Direct Memory Access
• Original from DMA (Direct Memory Access)
• Access memory without interrupting CPU.
ADVANTAGES
• Zero-Copy
• Kernel bypass
• No CPU involvement
• Message based transactions
• Scatter/Gather entries support.
WHAT IT PROVIDES
• Low CPU usage
• High throughput
• Low-latency
• You can’t have those features in the same time.
• Refer to :Tips and tricks to optimize your RDMA code
SUPPORT RDMA
• Storage
• Ceph
• DRBD (Distributed Replicated Block Device)
• Tensorflow
• Case Study - Towards Zero Copy Dataflows using RDMA
CASE STUDY
• Towards Zero Copy Dataflows using RDMA
• 2017 SICCOM Poster
• Introduction
• What problem?
• How to solve ?
• How to implement ?
• Evaluation
INTRODUCTION
• Based on Tensorflow
• Distributed
• Based on RDMA
• Zero Copy
• Copy problem
• Contribute to Tensorflow (merged)
WHAT PROBLEMS
• Dataflow
• Directed Acyclic Graph
• Large data
• Hundred of MB
• Some data is unmodified.
• Too many copies operation
• User Space <-> User Space
• User Space <-> Kernel Space
• Kernel Space -> Physical devices
WHY DATA COPY IS BOTTLENECK
• Data buffer is bigger than the system L1/L2/L3 cache
• Too many cache miss (increate latency)
• A Single Application unlikely can congest the network bandwidth.
• Authors says.
• 20-30 GBs for data buffer 4KB
• 2-4 GBs for data buffer > 4MB
• Too many cache miss.
HOW TO SOLVE
• Too many data copies operations.
• Same device.
• Use DMA to pass data.
• Different device
• Use RDMA
• In order to read/write the remote GPU
• GPUDirect RDMA (published by Nvidia)
HOW TO IMPLEMENT
• Implement a memory allocator
• Parse the computational graph/distributed graph partition
• Register the memory with RDMA/DMA by the node’s type.
• In Tensorflow
• Replace the original gRPC format by RDMA
EVALUATION (TARGET)
• Tensorflow v1.2
• Basd on gRPC
• RDMA zero copy Tensorflow
• Yahoo open RDMA Tensorflow (still some copy operat Software ions)
EVALUATION (RESULT)
• RDMA (zero copy) v.s gRPC
• 2.43x
• RDMA (zero copy) v.s Yahoo version
• 1.21x
• Number of GPU, 16 v.s 1
• 13.8x
Q&A?
EVALUATION (HARDWARE)
• Server * 4
• DUal6-core Intel Xeon E5-2603v4 CPU
• 4 Nvidia Tesla K40m GPUs
• 256 GB DDR4-2400MHz
• Mellanox MT27500 40GbE NIC
• Switch
• 40Gbe RoCE Switch
• Priority Flow Control
EVALUATION (SOFTWARE)
• VGG16 CNN Model
• Model parameter size is 528 MB
• Synchronous
• Number of PS == Number of Workers
• Workers
• Use CPU+GPU
• Parameter Server
• Only CPU

More Related Content

What's hot

Control Your Network ASICs, What Benefits switchdev Can Bring Us
Control Your Network ASICs, What Benefits switchdev Can Bring UsControl Your Network ASICs, What Benefits switchdev Can Bring Us
Control Your Network ASICs, What Benefits switchdev Can Bring Us
HungWei Chiu
 
K8s storage-glusterfs-20180210
K8s storage-glusterfs-20180210K8s storage-glusterfs-20180210
K8s storage-glusterfs-20180210
Che-Chia Chang
 
Load Balancing 101
Load Balancing 101Load Balancing 101
Load Balancing 101
HungWei Chiu
 
The Open vSwitch and OVN Projects
The Open vSwitch and OVN ProjectsThe Open vSwitch and OVN Projects
The Open vSwitch and OVN Projects
LinuxCon ContainerCon CloudOpen China
 
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
Orchestration tool roundup   kubernetes vs. docker vs. heat vs. terra form vs...Orchestration tool roundup   kubernetes vs. docker vs. heat vs. terra form vs...
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
Nati Shalom
 
OpenDaylight OpenStack Integration
OpenDaylight OpenStack IntegrationOpenDaylight OpenStack Integration
OpenDaylight OpenStack Integration
LinuxCon ContainerCon CloudOpen China
 
How to deal second interface service discovery and load balancer in kubernetes
How to deal second interface  service discovery and load balancer  in kubernetesHow to deal second interface  service discovery and load balancer  in kubernetes
How to deal second interface service discovery and load balancer in kubernetes
Meng-Ze Lee
 
Neutron high availability open stack architecture openstack israel event 2015
Neutron high availability  open stack architecture   openstack israel event 2015Neutron high availability  open stack architecture   openstack israel event 2015
Neutron high availability open stack architecture openstack israel event 2015
Arthur Berezin
 
Can the Open vSwitch (OVS) bottleneck be resolved? - Erez Cohen - OpenStack D...
Can the Open vSwitch (OVS) bottleneck be resolved? - Erez Cohen - OpenStack D...Can the Open vSwitch (OVS) bottleneck be resolved? - Erez Cohen - OpenStack D...
Can the Open vSwitch (OVS) bottleneck be resolved? - Erez Cohen - OpenStack D...
Cloud Native Day Tel Aviv
 
Docker network performance in the public cloud
Docker network performance in the public cloudDocker network performance in the public cloud
Docker network performance in the public cloud
Arjan Schaaf
 
Running Legacy Applications with Containers
Running Legacy Applications with ContainersRunning Legacy Applications with Containers
Running Legacy Applications with Containers
LinuxCon ContainerCon CloudOpen China
 
KubeCon US 2021 - Recap - DCMeetup
KubeCon US 2021 - Recap - DCMeetupKubeCon US 2021 - Recap - DCMeetup
KubeCon US 2021 - Recap - DCMeetup
Faheem Memon
 
Tech Talk by Gal Sagie: Kuryr - Connecting containers networking to OpenStack...
Tech Talk by Gal Sagie: Kuryr - Connecting containers networking to OpenStack...Tech Talk by Gal Sagie: Kuryr - Connecting containers networking to OpenStack...
Tech Talk by Gal Sagie: Kuryr - Connecting containers networking to OpenStack...
nvirters
 
OpenStack Discovery and Networking Assurance - Koren Lev - Meetup
OpenStack Discovery and Networking Assurance - Koren Lev - MeetupOpenStack Discovery and Networking Assurance - Koren Lev - Meetup
OpenStack Discovery and Networking Assurance - Koren Lev - Meetup
Cloud Native Day Tel Aviv
 
Writing the Container Network Interface(CNI) plugin in golang
Writing the Container Network Interface(CNI) plugin in golangWriting the Container Network Interface(CNI) plugin in golang
Writing the Container Network Interface(CNI) plugin in golang
HungWei Chiu
 
Kubernetes Networking - Giragadurai Vallirajan
Kubernetes Networking - Giragadurai VallirajanKubernetes Networking - Giragadurai Vallirajan
Kubernetes Networking - Giragadurai Vallirajan
Neependra Khare
 
Kubernetes networking in AWS
Kubernetes networking in AWSKubernetes networking in AWS
Kubernetes networking in AWS
Zvika Gazit
 
Introduction to OpenNetwork and SDN
Introduction to OpenNetwork and SDNIntroduction to OpenNetwork and SDN
Introduction to OpenNetwork and SDN
HungWei Chiu
 
Integrate Kubernetes into CORD(Central Office Re-architected as a Datacenter)
Integrate Kubernetes into CORD(Central Office Re-architected as a Datacenter)Integrate Kubernetes into CORD(Central Office Re-architected as a Datacenter)
Integrate Kubernetes into CORD(Central Office Re-architected as a Datacenter)
inwin stack
 
OpenStack Israel Meetup - Project Kuryr: Bringing Container Networking to Neu...
OpenStack Israel Meetup - Project Kuryr: Bringing Container Networking to Neu...OpenStack Israel Meetup - Project Kuryr: Bringing Container Networking to Neu...
OpenStack Israel Meetup - Project Kuryr: Bringing Container Networking to Neu...
Cloud Native Day Tel Aviv
 

What's hot (20)

Control Your Network ASICs, What Benefits switchdev Can Bring Us
Control Your Network ASICs, What Benefits switchdev Can Bring UsControl Your Network ASICs, What Benefits switchdev Can Bring Us
Control Your Network ASICs, What Benefits switchdev Can Bring Us
 
K8s storage-glusterfs-20180210
K8s storage-glusterfs-20180210K8s storage-glusterfs-20180210
K8s storage-glusterfs-20180210
 
Load Balancing 101
Load Balancing 101Load Balancing 101
Load Balancing 101
 
The Open vSwitch and OVN Projects
The Open vSwitch and OVN ProjectsThe Open vSwitch and OVN Projects
The Open vSwitch and OVN Projects
 
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
Orchestration tool roundup   kubernetes vs. docker vs. heat vs. terra form vs...Orchestration tool roundup   kubernetes vs. docker vs. heat vs. terra form vs...
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
 
OpenDaylight OpenStack Integration
OpenDaylight OpenStack IntegrationOpenDaylight OpenStack Integration
OpenDaylight OpenStack Integration
 
How to deal second interface service discovery and load balancer in kubernetes
How to deal second interface  service discovery and load balancer  in kubernetesHow to deal second interface  service discovery and load balancer  in kubernetes
How to deal second interface service discovery and load balancer in kubernetes
 
Neutron high availability open stack architecture openstack israel event 2015
Neutron high availability  open stack architecture   openstack israel event 2015Neutron high availability  open stack architecture   openstack israel event 2015
Neutron high availability open stack architecture openstack israel event 2015
 
Can the Open vSwitch (OVS) bottleneck be resolved? - Erez Cohen - OpenStack D...
Can the Open vSwitch (OVS) bottleneck be resolved? - Erez Cohen - OpenStack D...Can the Open vSwitch (OVS) bottleneck be resolved? - Erez Cohen - OpenStack D...
Can the Open vSwitch (OVS) bottleneck be resolved? - Erez Cohen - OpenStack D...
 
Docker network performance in the public cloud
Docker network performance in the public cloudDocker network performance in the public cloud
Docker network performance in the public cloud
 
Running Legacy Applications with Containers
Running Legacy Applications with ContainersRunning Legacy Applications with Containers
Running Legacy Applications with Containers
 
KubeCon US 2021 - Recap - DCMeetup
KubeCon US 2021 - Recap - DCMeetupKubeCon US 2021 - Recap - DCMeetup
KubeCon US 2021 - Recap - DCMeetup
 
Tech Talk by Gal Sagie: Kuryr - Connecting containers networking to OpenStack...
Tech Talk by Gal Sagie: Kuryr - Connecting containers networking to OpenStack...Tech Talk by Gal Sagie: Kuryr - Connecting containers networking to OpenStack...
Tech Talk by Gal Sagie: Kuryr - Connecting containers networking to OpenStack...
 
OpenStack Discovery and Networking Assurance - Koren Lev - Meetup
OpenStack Discovery and Networking Assurance - Koren Lev - MeetupOpenStack Discovery and Networking Assurance - Koren Lev - Meetup
OpenStack Discovery and Networking Assurance - Koren Lev - Meetup
 
Writing the Container Network Interface(CNI) plugin in golang
Writing the Container Network Interface(CNI) plugin in golangWriting the Container Network Interface(CNI) plugin in golang
Writing the Container Network Interface(CNI) plugin in golang
 
Kubernetes Networking - Giragadurai Vallirajan
Kubernetes Networking - Giragadurai VallirajanKubernetes Networking - Giragadurai Vallirajan
Kubernetes Networking - Giragadurai Vallirajan
 
Kubernetes networking in AWS
Kubernetes networking in AWSKubernetes networking in AWS
Kubernetes networking in AWS
 
Introduction to OpenNetwork and SDN
Introduction to OpenNetwork and SDNIntroduction to OpenNetwork and SDN
Introduction to OpenNetwork and SDN
 
Integrate Kubernetes into CORD(Central Office Re-architected as a Datacenter)
Integrate Kubernetes into CORD(Central Office Re-architected as a Datacenter)Integrate Kubernetes into CORD(Central Office Re-architected as a Datacenter)
Integrate Kubernetes into CORD(Central Office Re-architected as a Datacenter)
 
OpenStack Israel Meetup - Project Kuryr: Bringing Container Networking to Neu...
OpenStack Israel Meetup - Project Kuryr: Bringing Container Networking to Neu...OpenStack Israel Meetup - Project Kuryr: Bringing Container Networking to Neu...
OpenStack Israel Meetup - Project Kuryr: Bringing Container Networking to Neu...
 

Similar to High performace network of Cloud Native Taiwan User Group

pps Matters
pps Matterspps Matters
Introduction to DPDK
Introduction to DPDKIntroduction to DPDK
Introduction to DPDK
Kernel TLV
 
100 M pps on PC.
100 M pps on PC.100 M pps on PC.
100 M pps on PC.
Redge Technologies
 
DPDK Summit 2015 - Aspera - Charles Shiflett
DPDK Summit 2015 - Aspera - Charles ShiflettDPDK Summit 2015 - Aspera - Charles Shiflett
DPDK Summit 2015 - Aspera - Charles Shiflett
Jim St. Leger
 
Tối ưu hiệu năng đáp ứng các yêu cầu của hệ thống 4G core
Tối ưu hiệu năng đáp ứng các yêu cầu của hệ thống 4G coreTối ưu hiệu năng đáp ứng các yêu cầu của hệ thống 4G core
Tối ưu hiệu năng đáp ứng các yêu cầu của hệ thống 4G core
Vietnam Open Infrastructure User Group
 
PLNOG16: Obsługa 100M pps na platformie PC , Przemysław Frasunek, Paweł Mała...
PLNOG16: Obsługa 100M pps na platformie PC, Przemysław Frasunek, Paweł Mała...PLNOG16: Obsługa 100M pps na platformie PC, Przemysław Frasunek, Paweł Mała...
PLNOG16: Obsługa 100M pps na platformie PC , Przemysław Frasunek, Paweł Mała...
PROIDEA
 
Memory, Big Data, NoSQL and Virtualization
Memory, Big Data, NoSQL and VirtualizationMemory, Big Data, NoSQL and Virtualization
Memory, Big Data, NoSQL and Virtualization
Bigstep
 
OSDC 2016 - Tuning Linux for your Database by Colin Charles
OSDC 2016 - Tuning Linux for your Database by Colin CharlesOSDC 2016 - Tuning Linux for your Database by Colin Charles
OSDC 2016 - Tuning Linux for your Database by Colin Charles
NETWAYS
 
Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016
Colin Charles
 
HyperLoop: Group-Based NIC-Offloading to Accelerate Replicated Transactions i...
HyperLoop: Group-Based NIC-Offloading to Accelerate Replicated Transactions i...HyperLoop: Group-Based NIC-Offloading to Accelerate Replicated Transactions i...
HyperLoop: Group-Based NIC-Offloading to Accelerate Replicated Transactions i...
Daehyeok Kim
 
OpenPOWER Acceleration of HPCC Systems
OpenPOWER Acceleration of HPCC SystemsOpenPOWER Acceleration of HPCC Systems
OpenPOWER Acceleration of HPCC Systems
HPCC Systems
 
A Dataflow Processing Chip for Training Deep Neural Networks
A Dataflow Processing Chip for Training Deep Neural NetworksA Dataflow Processing Chip for Training Deep Neural Networks
A Dataflow Processing Chip for Training Deep Neural Networks
inside-BigData.com
 
Accelerated dataplanes integration and deployment
Accelerated dataplanes integration and deploymentAccelerated dataplanes integration and deployment
Accelerated dataplanes integration and deployment
OPNFV
 
QCT Ceph Solution - Design Consideration and Reference Architecture
QCT Ceph Solution - Design Consideration and Reference ArchitectureQCT Ceph Solution - Design Consideration and Reference Architecture
QCT Ceph Solution - Design Consideration and Reference Architecture
Ceph Community
 
QCT Ceph Solution - Design Consideration and Reference Architecture
QCT Ceph Solution - Design Consideration and Reference ArchitectureQCT Ceph Solution - Design Consideration and Reference Architecture
QCT Ceph Solution - Design Consideration and Reference Architecture
Patrick McGarry
 
Oow 2008 yahoo_pie-db
Oow 2008 yahoo_pie-dbOow 2008 yahoo_pie-db
Oow 2008 yahoo_pie-db
bohanchen
 
Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)
Hajime Tazaki
 
OGG Architecture Performance
OGG Architecture PerformanceOGG Architecture Performance
OGG Architecture PerformanceEnkitec
 
Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)
Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)
Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)
Bobby Curtis
 
Oracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceOracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceEnkitec
 

Similar to High performace network of Cloud Native Taiwan User Group (20)

pps Matters
pps Matterspps Matters
pps Matters
 
Introduction to DPDK
Introduction to DPDKIntroduction to DPDK
Introduction to DPDK
 
100 M pps on PC.
100 M pps on PC.100 M pps on PC.
100 M pps on PC.
 
DPDK Summit 2015 - Aspera - Charles Shiflett
DPDK Summit 2015 - Aspera - Charles ShiflettDPDK Summit 2015 - Aspera - Charles Shiflett
DPDK Summit 2015 - Aspera - Charles Shiflett
 
Tối ưu hiệu năng đáp ứng các yêu cầu của hệ thống 4G core
Tối ưu hiệu năng đáp ứng các yêu cầu của hệ thống 4G coreTối ưu hiệu năng đáp ứng các yêu cầu của hệ thống 4G core
Tối ưu hiệu năng đáp ứng các yêu cầu của hệ thống 4G core
 
PLNOG16: Obsługa 100M pps na platformie PC , Przemysław Frasunek, Paweł Mała...
PLNOG16: Obsługa 100M pps na platformie PC, Przemysław Frasunek, Paweł Mała...PLNOG16: Obsługa 100M pps na platformie PC, Przemysław Frasunek, Paweł Mała...
PLNOG16: Obsługa 100M pps na platformie PC , Przemysław Frasunek, Paweł Mała...
 
Memory, Big Data, NoSQL and Virtualization
Memory, Big Data, NoSQL and VirtualizationMemory, Big Data, NoSQL and Virtualization
Memory, Big Data, NoSQL and Virtualization
 
OSDC 2016 - Tuning Linux for your Database by Colin Charles
OSDC 2016 - Tuning Linux for your Database by Colin CharlesOSDC 2016 - Tuning Linux for your Database by Colin Charles
OSDC 2016 - Tuning Linux for your Database by Colin Charles
 
Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016
 
HyperLoop: Group-Based NIC-Offloading to Accelerate Replicated Transactions i...
HyperLoop: Group-Based NIC-Offloading to Accelerate Replicated Transactions i...HyperLoop: Group-Based NIC-Offloading to Accelerate Replicated Transactions i...
HyperLoop: Group-Based NIC-Offloading to Accelerate Replicated Transactions i...
 
OpenPOWER Acceleration of HPCC Systems
OpenPOWER Acceleration of HPCC SystemsOpenPOWER Acceleration of HPCC Systems
OpenPOWER Acceleration of HPCC Systems
 
A Dataflow Processing Chip for Training Deep Neural Networks
A Dataflow Processing Chip for Training Deep Neural NetworksA Dataflow Processing Chip for Training Deep Neural Networks
A Dataflow Processing Chip for Training Deep Neural Networks
 
Accelerated dataplanes integration and deployment
Accelerated dataplanes integration and deploymentAccelerated dataplanes integration and deployment
Accelerated dataplanes integration and deployment
 
QCT Ceph Solution - Design Consideration and Reference Architecture
QCT Ceph Solution - Design Consideration and Reference ArchitectureQCT Ceph Solution - Design Consideration and Reference Architecture
QCT Ceph Solution - Design Consideration and Reference Architecture
 
QCT Ceph Solution - Design Consideration and Reference Architecture
QCT Ceph Solution - Design Consideration and Reference ArchitectureQCT Ceph Solution - Design Consideration and Reference Architecture
QCT Ceph Solution - Design Consideration and Reference Architecture
 
Oow 2008 yahoo_pie-db
Oow 2008 yahoo_pie-dbOow 2008 yahoo_pie-db
Oow 2008 yahoo_pie-db
 
Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)
 
OGG Architecture Performance
OGG Architecture PerformanceOGG Architecture Performance
OGG Architecture Performance
 
Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)
Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)
Oracle GoldenGate Presentation from OTN Virtual Technology Summit - 7/9/14 (PDF)
 
Oracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceOracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture Performance
 

More from HungWei Chiu

Learn O11y from Grafana ecosystem.
Learn O11y from Grafana ecosystem.Learn O11y from Grafana ecosystem.
Learn O11y from Grafana ecosystem.
HungWei Chiu
 
Learned from KIND
Learned from KIND Learned from KIND
Learned from KIND
HungWei Chiu
 
Debug Your Kubernetes Network
Debug Your Kubernetes NetworkDebug Your Kubernetes Network
Debug Your Kubernetes Network
HungWei Chiu
 
以 eBPF 構建一個更為堅韌的 Kubernetes 叢集
以 eBPF 構建一個更為堅韌的 Kubernetes 叢集以 eBPF 構建一個更為堅韌的 Kubernetes 叢集
以 eBPF 構建一個更為堅韌的 Kubernetes 叢集
HungWei Chiu
 
Learning how AWS implement AWS VPC CNI
Learning how AWS implement AWS VPC CNILearning how AWS implement AWS VPC CNI
Learning how AWS implement AWS VPC CNI
HungWei Chiu
 
Jenkins & IaC
Jenkins & IaCJenkins & IaC
Jenkins & IaC
HungWei Chiu
 
The relationship between Docker, Kubernetes and CRI
The relationship between Docker, Kubernetes and CRIThe relationship between Docker, Kubernetes and CRI
The relationship between Docker, Kubernetes and CRI
HungWei Chiu
 
Life
LifeLife
Introduction to CRI and OCI
Introduction to CRI and OCIIntroduction to CRI and OCI
Introduction to CRI and OCI
HungWei Chiu
 
IP Virtual Server(IPVS) 101
IP Virtual Server(IPVS) 101IP Virtual Server(IPVS) 101
IP Virtual Server(IPVS) 101
HungWei Chiu
 
Opentracing 101
Opentracing 101Opentracing 101
Opentracing 101
HungWei Chiu
 
iptables and Kubernetes
iptables and Kubernetesiptables and Kubernetes
iptables and Kubernetes
HungWei Chiu
 
IPTABLES Introduction
IPTABLES IntroductionIPTABLES Introduction
IPTABLES Introduction
HungWei Chiu
 
Introduction to CircleCI
Introduction to CircleCIIntroduction to CircleCI
Introduction to CircleCI
HungWei Chiu
 
Head First to Container&Kubernetes
Head First to Container&KubernetesHead First to Container&Kubernetes
Head First to Container&Kubernetes
HungWei Chiu
 
Kubernetes 1001
Kubernetes 1001Kubernetes 1001
Kubernetes 1001
HungWei Chiu
 
Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)
HungWei Chiu
 
Automatically Renew Certificated In Your Kubernetes Cluster
Automatically Renew Certificated In Your Kubernetes ClusterAutomatically Renew Certificated In Your Kubernetes Cluster
Automatically Renew Certificated In Your Kubernetes Cluster
HungWei Chiu
 
Overview of kubernetes network functions
Overview of kubernetes network functionsOverview of kubernetes network functions
Overview of kubernetes network functions
HungWei Chiu
 
Understand the iptables step by step
Understand the iptables step by stepUnderstand the iptables step by step
Understand the iptables step by step
HungWei Chiu
 

More from HungWei Chiu (20)

Learn O11y from Grafana ecosystem.
Learn O11y from Grafana ecosystem.Learn O11y from Grafana ecosystem.
Learn O11y from Grafana ecosystem.
 
Learned from KIND
Learned from KIND Learned from KIND
Learned from KIND
 
Debug Your Kubernetes Network
Debug Your Kubernetes NetworkDebug Your Kubernetes Network
Debug Your Kubernetes Network
 
以 eBPF 構建一個更為堅韌的 Kubernetes 叢集
以 eBPF 構建一個更為堅韌的 Kubernetes 叢集以 eBPF 構建一個更為堅韌的 Kubernetes 叢集
以 eBPF 構建一個更為堅韌的 Kubernetes 叢集
 
Learning how AWS implement AWS VPC CNI
Learning how AWS implement AWS VPC CNILearning how AWS implement AWS VPC CNI
Learning how AWS implement AWS VPC CNI
 
Jenkins & IaC
Jenkins & IaCJenkins & IaC
Jenkins & IaC
 
The relationship between Docker, Kubernetes and CRI
The relationship between Docker, Kubernetes and CRIThe relationship between Docker, Kubernetes and CRI
The relationship between Docker, Kubernetes and CRI
 
Life
LifeLife
Life
 
Introduction to CRI and OCI
Introduction to CRI and OCIIntroduction to CRI and OCI
Introduction to CRI and OCI
 
IP Virtual Server(IPVS) 101
IP Virtual Server(IPVS) 101IP Virtual Server(IPVS) 101
IP Virtual Server(IPVS) 101
 
Opentracing 101
Opentracing 101Opentracing 101
Opentracing 101
 
iptables and Kubernetes
iptables and Kubernetesiptables and Kubernetes
iptables and Kubernetes
 
IPTABLES Introduction
IPTABLES IntroductionIPTABLES Introduction
IPTABLES Introduction
 
Introduction to CircleCI
Introduction to CircleCIIntroduction to CircleCI
Introduction to CircleCI
 
Head First to Container&Kubernetes
Head First to Container&KubernetesHead First to Container&Kubernetes
Head First to Container&Kubernetes
 
Kubernetes 1001
Kubernetes 1001Kubernetes 1001
Kubernetes 1001
 
Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)
 
Automatically Renew Certificated In Your Kubernetes Cluster
Automatically Renew Certificated In Your Kubernetes ClusterAutomatically Renew Certificated In Your Kubernetes Cluster
Automatically Renew Certificated In Your Kubernetes Cluster
 
Overview of kubernetes network functions
Overview of kubernetes network functionsOverview of kubernetes network functions
Overview of kubernetes network functions
 
Understand the iptables step by step
Understand the iptables step by stepUnderstand the iptables step by step
Understand the iptables step by step
 

Recently uploaded

block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
SupreethSP4
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 

Recently uploaded (20)

block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 

High performace network of Cloud Native Taiwan User Group

  • 2. WHO AM I • Hung-Wei Chiu (邱宏瑋) • hwchiu@linkernetworks.com • hwchiu.com • Experience • Software Engineer at Linker Netowrks • Software Engineer at Synology (2014~2017) • Co-Found of SDNDS-TW • Open Source experience • SDN related projects (mininet, ONOS, Floodlight, awesome-sdn)
  • 3. WHAT WE DISCUSS TODAY  The Drawback of Current Network Stack.  High Performance Network Model  DPDK  RDMA  Case Study
  • 4. DRAWBACK OF CURRENT NETWORK STACK • Linux Kernel Stack • TCP Stack • Packets Processing in Linux Kernel
  • 5. LINUX KERNEL TCP/IP NETWORK STACK • Have you imaged how applications communicate by network?
  • 7. IN YOUR APPLICATION (CHROME). • Create a Socket • Connect to Aurora-Server (we use TCP) • Send/Receives Packets. User-Space Kernel-Space Copy data from the user-space  Handle TCP  Handle IPv4  Handle Ethernet  Handle Physical  Handle Driver/NIC
  • 8. Had you wrote a socket programming before ?
  • 12. Did you image how kernel handle those operations ?
  • 13. HOW ABOUT THE KERNEL ? SEND MESSAGE • User Space -> send(data….) • SYSCALL_DEFINE3(….)  kernel space. • vfs_write • do_sync_write • sock_aio_write • do_sock_write • __sock_sendmsg • security_socket_sendmsg(…)
  • 14. • inet_sendmsg • tcp_sendmsg  finally TCP … • __tcp_push_pending_frames • Tcp_push_one • tcp_write_xmit • tcp_transmit_skb • ip_queue_xmit ---> finally IP • ip_route_output_ports • ip_route_output_flow -> routing • xfrm_lookup -> routing • Ip_local_out • dst_output • ip_output • …...
  • 15.
  • 16. HOW ABOUT THE KERNEL ? RECEIVE MESSAGE • User Space -> read(data….) • SYSCALL_DEFINE3(….)  Kernel Space • …..
  • 17.
  • 18. WHAT IS THE PROBLEM • TCP • Linux Kernel Network Stack • How Linux process packets.
  • 19. THE PROBLEM OF TCP • Designed for WAN network environment • Different hardware between now and then. • Modify the implementation of TCP to improve its performance • DCTCP (Data Center TCP) • MPTCP (Multi Path TCP) • Google BBR (Modify Congestion Control Algorithm) • New Protocol • [論文導讀] • Re-architecting datacenter networks and stacks for low latency and high performance
  • 20. THE PROBLEM OF LINUX NETWORK STACK • Increasing network speeds: 10G  40G  100G • Time between packets get smaller • For 1538 bytes. • 10 Gbis == 1230.4 ns • 40 Gbis == 307.6 ns • 100 Gbits == 123.0 ns • Refer to http://people.netfilter.org/hawk/presentations/LCA2015/net_stack_challenges_100G_L CA2015.pdf • Network stack challenges at increasing speeds The 100Gbit/s challenge
  • 21. THE PROBLEM OF LINUX NETWORK STACK • For smallest frame size 84 bytes. • At 10Gbit/s == 67.2 ns, (14.88 Mpps) (packet per second) • For 3GHz CPU, 201 CPU cycles for each packet. • System call overhead • 75.34 ns (Intel CPU E5-2630 ) • Spinlock + unlock • 16.1ns
  • 22. THE PROBLEM OF LINUX NETWORK STACK • A single cache-miss: • 32 ns • Atomic operations • 8.25 ns • Basic sync mechanisms • Spin (16ns) • IRQ (2 ~ 14 ns)
  • 23. SO.. • For smallest frame size 84 bytes. • At 10Gbit/s == 67.2 ns, (14.88 Mpps) (packet per second) • 75.34+16.1+32+8.25+14 = 145.69
  • 24. PACKET PROCESSING • Let we watch the graph again
  • 25.
  • 26.
  • 27. PACKET PROCESSING • When a network card receives a packet. • Sends the packet to its receive queue (RX) • System (kernel) needs to know the packet is coming and pass the data to a allocated buffer. • Polling/Interrupt • Allocate skb_buff for packet • Copy the data to user-space • Free the skb_buff
  • 28. PACKETS PROCESSING IN LINUX User Space Kernel Space NIC TX/RX Queue Application Socket Driver Ring Buffer
  • 29. PROCESSING MODE • Polling Mode • Busy Looping • CPU overloading • High Network Performance/Throughput
  • 30. PROCESSING MODE • Interrupt Mode • Read the packet when receives the interrupt • Reduce CPU overhead. • We don’t have too many CPU before. • Worse network performance than polling mode.
  • 31. MIX MODE • Polling + Interrupt mode (NAPI) (New API) • Interrupt first and then polling to fetch packets • Combine the advantage of both mode.
  • 32. SUMMARY • Linux Kernel Overhead (System calls, locking, cache) • Context switching on blocking I/O • Interrupt handling in kernel • Data copy between user space and kernel space. • Too many unused network stack feature. • Additional overhead for each packets
  • 33. HOW TO SOLVE THE PROBLEM • Out-of-tree network stack bypass solutions • Netmap • PF_RING • DPDK • RDMA
  • 34. HOW TO SOLVE THE PROBLEM • How did those models handle the packet in 62.7ns? • Batching, preallocation, prefetching, • Staying cpu/numa local, avoid locking. • Reduce syscalls, • Faster cache-optimal data structures
  • 35. HOW TO SOLVE THE PROBLEM • How did those models handle the packet in 62.7ns? • Batching, preallocation, prefetching, • Staying cpu/numa local, avoid locking. • Reduce syscalls, • Faster cache-optimal data structures
  • 36. HOW TO SOLVE. • Now. There’re more and more CPU in server. • We can dedicated some CPU to handle network packets. • Polling mode • Zero-Copy • Copy to the user-space iff the application needs to modify it. • Sendfile(…) • UIO (User Space I/O) • mmap (memory mapping)
  • 37. HIGH PERFORMANCE NETWORKING • DPDK (Data Plane Development Kit) • RDMA (Remote Directly Memory Access)
  • 38. DPDK • Supported by Intel • Only the intel NIC support at first. • Processor affinity / NUMA • UIO • Polling Mode • Batch packet handling • Kernel Bypass • …etc
  • 39. PACKETS PROCESSING IN DPDK User Space Kernel Space NIC TX/RX Queue Application DPDK UIO (User Space IO) Driver Ring Buffer
  • 40. COMPARE Network Interface Card Linux Kernel Network Stack Network Driver Application Network Interface Card Linux Kernel Network Stack Network Driver Application Kernel Space User Space
  • 41. WHAT’S THE PROBLEM. • Without the Linux Kernel Network Stack • How do we know what kind of the packets we received. • Layer2 (MAC/Vlan) • Layer3 (IPv4, IPv6) • Layer4 (TCP,UDP,ICMP)
  • 42. USER SPACE NETWORK STACK • We need to build the user space network stack • For each applications, we need to handle following issues. • Parse packets • Mac/Vlan • IPv4/IPv6 • TCP/UDP/ICMP • For TCP, we need to handle three-way handshake
  • 43. FOR ALL EXISTING NETWORK APPLICATIONS • Rewrite all socket related API to DPDK API • DIY • Find some OSS to help you • dpdk-ans (c ) • mTCP (c ) • yanff (go) • Those projects provide BSD-like interface for using.
  • 44. SUPPORT DPDK? • Storage • Ceph • Software Switch • BSS • FD.IO • Open vSwitch • ..etc
  • 45. A USE CASE • Software switch • Application • Combine both of above (Run Application as VM or Container)
  • 48. PROBLEMS OF CONNECTION • Use VETH • Kernel space again. • Performance downgrade • Virtio_user
  • 49. RDMA • Remote Direct Memory Access • Original from DMA (Direct Memory Access) • Access memory without interrupting CPU.
  • 50. ADVANTAGES • Zero-Copy • Kernel bypass • No CPU involvement • Message based transactions • Scatter/Gather entries support.
  • 51. WHAT IT PROVIDES • Low CPU usage • High throughput • Low-latency • You can’t have those features in the same time. • Refer to :Tips and tricks to optimize your RDMA code
  • 52.
  • 53.
  • 54.
  • 55.
  • 56. SUPPORT RDMA • Storage • Ceph • DRBD (Distributed Replicated Block Device) • Tensorflow • Case Study - Towards Zero Copy Dataflows using RDMA
  • 57. CASE STUDY • Towards Zero Copy Dataflows using RDMA • 2017 SICCOM Poster • Introduction • What problem? • How to solve ? • How to implement ? • Evaluation
  • 58. INTRODUCTION • Based on Tensorflow • Distributed • Based on RDMA • Zero Copy • Copy problem • Contribute to Tensorflow (merged)
  • 59. WHAT PROBLEMS • Dataflow • Directed Acyclic Graph • Large data • Hundred of MB • Some data is unmodified. • Too many copies operation • User Space <-> User Space • User Space <-> Kernel Space • Kernel Space -> Physical devices
  • 60. WHY DATA COPY IS BOTTLENECK • Data buffer is bigger than the system L1/L2/L3 cache • Too many cache miss (increate latency) • A Single Application unlikely can congest the network bandwidth. • Authors says. • 20-30 GBs for data buffer 4KB • 2-4 GBs for data buffer > 4MB • Too many cache miss.
  • 61. HOW TO SOLVE • Too many data copies operations. • Same device. • Use DMA to pass data. • Different device • Use RDMA • In order to read/write the remote GPU • GPUDirect RDMA (published by Nvidia)
  • 62.
  • 63. HOW TO IMPLEMENT • Implement a memory allocator • Parse the computational graph/distributed graph partition • Register the memory with RDMA/DMA by the node’s type. • In Tensorflow • Replace the original gRPC format by RDMA
  • 64. EVALUATION (TARGET) • Tensorflow v1.2 • Basd on gRPC • RDMA zero copy Tensorflow • Yahoo open RDMA Tensorflow (still some copy operat Software ions)
  • 65. EVALUATION (RESULT) • RDMA (zero copy) v.s gRPC • 2.43x • RDMA (zero copy) v.s Yahoo version • 1.21x • Number of GPU, 16 v.s 1 • 13.8x
  • 66. Q&A?
  • 67. EVALUATION (HARDWARE) • Server * 4 • DUal6-core Intel Xeon E5-2603v4 CPU • 4 Nvidia Tesla K40m GPUs • 256 GB DDR4-2400MHz • Mellanox MT27500 40GbE NIC • Switch • 40Gbe RoCE Switch • Priority Flow Control
  • 68. EVALUATION (SOFTWARE) • VGG16 CNN Model • Model parameter size is 528 MB • Synchronous • Number of PS == Number of Workers • Workers • Use CPU+GPU • Parameter Server • Only CPU

Editor's Notes

  1. 等一下、~~
  2. DCTCP (Data Center TCP) MPTCP (Multi Path TCP)