SlideShare a Scribd company logo
An Analysis and Empirical Study of Docker Networking
Yusuf HARUNA
University of Nice Sophia Antipolis/UCA, France
3 July 2019
Master II IFI - UBINET Internship Oral Defence
Supervisors: Guillaume Urvoy-Keller & Dino Lopez-Pacheco, i3s Laboratory
Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 1 / 20
Outline
1 Introduction
2 Three popular cloud Applications
3 Benchmarks
4 Container Networking modes
5 Experimental Results
6 RSS/RPS
7 Conclusion
Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 2 / 20
Introduction
Traditional Virtualization Vs Lightweight Virtualization
Source: https://www.docker.com/
Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 3 / 20
Introduction
Motivations
High use of container-based virtualization in the cloud and search engines e.g
google launches about 7,000 containers every second.
Objectives
Understand the performance of different Docker Networking solutions,
Build a realistic testbed: select some applications + benchmarks,
Obtain some results by testing our testbed and monitor system level performance,
Check if we can reduce the overhead of the overlay Networks using OS/hardware
support.
Challenges
Tune the testbed and do some tests with RSS/RPS
Hardware dependency
Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 4 / 20
Three popular cloud Applications + iperf3
An in-memory key-value store: Memcached, stress more memory +
a bit of network
A web server: Nginx, stress more network
A Relational Database server: PostgreSQL, stress more network
depending on the quarry + more I/O
Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 5 / 20
Benchmarks
iperf3: to test maximum achievable throughput on IP networks.
∗ TCP throughput
∗ UDP throughput
memtier benchmark: to measure the performance of memcached.
∗ Spawns 4 threads
∗ Each thread creates 50 TCP connections
∗ Reports the average number of responses/second, the average latency
to respond to a memcached command + SET/GET latency
Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 6 / 20
Benchmarks
wrk2: to measure the performance of nginx server.
∗ Spawns two threads
∗ Creates a total of 100 TCP connections to make a request to the server
∗ The throughput in requests/second can be set in the tool
∗ Outputs latency
pgbench: to measure the performance of PostgreSQL server.
∗ Creates a database of one million banking accounts
∗ Executes transactions with a total of 100 connections with 4 threads
∗ Outputs latency
Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 7 / 20
Container Networking modes
Figure 1: Experimental setup
Two ways to deploy containers: on VMs b/c of security (e.g cloud provider) or on a PM e.g google
Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 8 / 20
Container Networking modes on multiple hosts
Host mode: In this mode, containers share the namespace of the
host OS.
Source: https://www.onug.net/blog/
container-networking-easy-button-for-app-teams-heartburn-for-networking-and-security-teams/
Namespace is a way of logically separating processes along different dimensions;
Network, IPC, User, PID, Mount or UTS namespace.
Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 9 / 20
Container Networking modes
NAT (Network Address Translation):
∗ Allows containers to communicate using the public IP address of their
host machine + port number of the container
∗ Maps the private address of a container to its port number in a NAT
table
Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 10 / 20
Container Networking modes
Docker default overlay Network: It uses Virtual Extensible LAN to
connect containers on multiple hosts.
Source: https://www.youtube.com/watch?v=Jqm_4TMmQz8
Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 11 / 20
Container Networking modes
Weave: Is another implementation of overlay network, it uses a
weave router container on each Docker host and the network is made
from these connected weave routers.
Source: https://sreeninet.wordpress.com/2015/01/18/docker-networking-weave/
Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 12 / 20
Experimental Results
iperf3 throughput
(a) TCP (b) UDP
Figure 2: iperf3 TCP and UDP throughput
Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 13 / 20
Experimental Results
Memcached throughput and latency
(a) Throughput (b) Latency
Figure 3: memcached throughput and latency
Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 14 / 20
Experimental Results
Latency of Nginx server
Figure 4: Nginx 1MB html file latency on 3K reqs/sec
Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 15 / 20
Experimental Results
PostgreSQL latency
Figure 5: PostgreSQL latency on 500 trans/sec
Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 16 / 20
Experimental Results
(a) iperf3 (b) PostgreSQL
Figure 6: CPU utilization of iperf3 and PostgreSQL servers
Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 17 / 20
RSS/RPS - A Linux kernel support
RSS: Receive Side Scaling
∗ A complementary technique in the Linux networking stack to increase
parallelism and improve performance for multi-processor systems
∗ Contemporary NICs support multi-queue for receiving and forwarding
packets
∗ Upon reception, a NIC can send different packets to different queues to
distribute processing among CPUs
∗ RPS (Receive Packet Steering) is logically a software implementation
of RSS
Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 18 / 20
Conclusion
Host mode has the best performance among all the 4 modes followed by
NAT with few performance drop, while the two overlay networks (VXLAN
and weave) have more performance drop because of the double
encapsulation.
The overlay networks consume more system resources.
We would like to reduce the overhead of the overlay networks using
OS/hardware kernel support. We started collecting some results but there
are some questions on it, e.g. in memcached, the throughput improved but
the latency increase a bit, hence, we would like to check why.
The shell scripts of our testbed is open sourced at https://github.com/
Yusuf-Haruna/Analysis-of-Docker-Networking-Shell-scripts.
Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 19 / 20
Thanks for your attention
Yusuf Haruna
yusuf.haruna@etu.univ-cotedazur.fr
Questions?
Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 20 / 20

More Related Content

PDF
Cilium - API-aware Networking and Security for Containers based on BPF
PDF
Kernel Recipes 2017 - EBPF and XDP - Eric Leblond
PDF
LinuxCon 2015 Stateful NAT with OVS
PDF
Cilium - BPF & XDP for containers
PDF
The Next Generation Firewall for Red Hat Enterprise Linux 7 RC
PDF
BPF & Cilium - Turning Linux into a Microservices-aware Operating System
PDF
LinuxCon 2015 Linux Kernel Networking Walkthrough
PDF
Ebpf ovsconf-2016
Cilium - API-aware Networking and Security for Containers based on BPF
Kernel Recipes 2017 - EBPF and XDP - Eric Leblond
LinuxCon 2015 Stateful NAT with OVS
Cilium - BPF & XDP for containers
The Next Generation Firewall for Red Hat Enterprise Linux 7 RC
BPF & Cilium - Turning Linux into a Microservices-aware Operating System
LinuxCon 2015 Linux Kernel Networking Walkthrough
Ebpf ovsconf-2016

What's hot (20)

PDF
BPF: Next Generation of Programmable Datapath
PDF
Kernel Recipes 2013 - Nftables, what motivations and what solutions
PDF
2015 FOSDEM - OVS Stateful Services
PDF
Kernel Recipes 2014 - What’s new in nftables?
PDF
Socket programming
PPTX
PPTX
Beyond TCP: The evolution of Internet transport protocols
PDF
DevConf 2014 Kernel Networking Walkthrough
PDF
Open vSwitch - Stateful Connection Tracking & Stateful NAT
PDF
ns-3 Tutorial
PPTX
Ground to ns3 - Basic wireless topology implementation
PDF
Building Topology in NS3
PPTX
Introduction to ns3
PDF
Tutorial ns 3-tutorial-slides
PDF
introduction to linux kernel tcp/ip ptocotol stack
PPTX
Polyraptor
PPTX
Compiling P4 to XDP, IOVISOR Summit 2017
PDF
Ns2pre
PDF
LF_DPDK17_Lagopus Router
PDF
Assignment cn tl
 
BPF: Next Generation of Programmable Datapath
Kernel Recipes 2013 - Nftables, what motivations and what solutions
2015 FOSDEM - OVS Stateful Services
Kernel Recipes 2014 - What’s new in nftables?
Socket programming
Beyond TCP: The evolution of Internet transport protocols
DevConf 2014 Kernel Networking Walkthrough
Open vSwitch - Stateful Connection Tracking & Stateful NAT
ns-3 Tutorial
Ground to ns3 - Basic wireless topology implementation
Building Topology in NS3
Introduction to ns3
Tutorial ns 3-tutorial-slides
introduction to linux kernel tcp/ip ptocotol stack
Polyraptor
Compiling P4 to XDP, IOVISOR Summit 2017
Ns2pre
LF_DPDK17_Lagopus Router
Assignment cn tl
 
Ad

Similar to Yusuf Haruna Docker internship slides (20)

PDF
Building a sdn solution for the deployment of web application stacks in docker
PDF
Docker Online Meetup #22: Docker Networking
PDF
DockerCon SF 2015: Networking Breakout
PDF
Collabnix Online Webinar - Demystifying Docker & Kubernetes Networking by Bal...
PPTX
DockerCon SF 2015: Networking Breakout
PDF
Demystfying container-networking
PDF
Docker Networking Deep Dive
PDF
Docker 1.12 networking deep dive
PPTX
Docker Networking - Current Status and goals of Experimental Networking
PPTX
DockerCon EU 2018 Workshop: Container Networking for Swarm and Kubernetes in ...
PPTX
Docker for Ops: Docker Networking Deep Dive, Considerations and Troubleshooti...
PPTX
DockerCon US 2016 - Docker Networking deep dive
PPTX
Docker Networking : 0 to 60mph slides
PDF
KubernetesNetworkingAndImplementation-Lecture.pdf
PDF
Janus & docker: friends or foe
PDF
Container Networking Deep Dive
PDF
Docker network performance in the public cloud
PDF
Docker network performance in the public cloud
PDF
Practical Design Patterns in Docker Networking
PPTX
Docker Networking (Libnetwork) - Lakshman Kumar
Building a sdn solution for the deployment of web application stacks in docker
Docker Online Meetup #22: Docker Networking
DockerCon SF 2015: Networking Breakout
Collabnix Online Webinar - Demystifying Docker & Kubernetes Networking by Bal...
DockerCon SF 2015: Networking Breakout
Demystfying container-networking
Docker Networking Deep Dive
Docker 1.12 networking deep dive
Docker Networking - Current Status and goals of Experimental Networking
DockerCon EU 2018 Workshop: Container Networking for Swarm and Kubernetes in ...
Docker for Ops: Docker Networking Deep Dive, Considerations and Troubleshooti...
DockerCon US 2016 - Docker Networking deep dive
Docker Networking : 0 to 60mph slides
KubernetesNetworkingAndImplementation-Lecture.pdf
Janus & docker: friends or foe
Container Networking Deep Dive
Docker network performance in the public cloud
Docker network performance in the public cloud
Practical Design Patterns in Docker Networking
Docker Networking (Libnetwork) - Lakshman Kumar
Ad

Recently uploaded (20)

PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
composite construction of structures.pdf
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
Well-logging-methods_new................
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
Construction Project Organization Group 2.pptx
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PDF
PPT on Performance Review to get promotions
PPTX
Geodesy 1.pptx...............................................
PPT
Mechanical Engineering MATERIALS Selection
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPT
Project quality management in manufacturing
DOCX
573137875-Attendance-Management-System-original
PPTX
UNIT 4 Total Quality Management .pptx
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
bas. eng. economics group 4 presentation 1.pptx
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
composite construction of structures.pdf
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Well-logging-methods_new................
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Lecture Notes Electrical Wiring System Components
Construction Project Organization Group 2.pptx
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPT on Performance Review to get promotions
Geodesy 1.pptx...............................................
Mechanical Engineering MATERIALS Selection
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Project quality management in manufacturing
573137875-Attendance-Management-System-original
UNIT 4 Total Quality Management .pptx
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx

Yusuf Haruna Docker internship slides

  • 1. An Analysis and Empirical Study of Docker Networking Yusuf HARUNA University of Nice Sophia Antipolis/UCA, France 3 July 2019 Master II IFI - UBINET Internship Oral Defence Supervisors: Guillaume Urvoy-Keller & Dino Lopez-Pacheco, i3s Laboratory Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 1 / 20
  • 2. Outline 1 Introduction 2 Three popular cloud Applications 3 Benchmarks 4 Container Networking modes 5 Experimental Results 6 RSS/RPS 7 Conclusion Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 2 / 20
  • 3. Introduction Traditional Virtualization Vs Lightweight Virtualization Source: https://www.docker.com/ Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 3 / 20
  • 4. Introduction Motivations High use of container-based virtualization in the cloud and search engines e.g google launches about 7,000 containers every second. Objectives Understand the performance of different Docker Networking solutions, Build a realistic testbed: select some applications + benchmarks, Obtain some results by testing our testbed and monitor system level performance, Check if we can reduce the overhead of the overlay Networks using OS/hardware support. Challenges Tune the testbed and do some tests with RSS/RPS Hardware dependency Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 4 / 20
  • 5. Three popular cloud Applications + iperf3 An in-memory key-value store: Memcached, stress more memory + a bit of network A web server: Nginx, stress more network A Relational Database server: PostgreSQL, stress more network depending on the quarry + more I/O Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 5 / 20
  • 6. Benchmarks iperf3: to test maximum achievable throughput on IP networks. ∗ TCP throughput ∗ UDP throughput memtier benchmark: to measure the performance of memcached. ∗ Spawns 4 threads ∗ Each thread creates 50 TCP connections ∗ Reports the average number of responses/second, the average latency to respond to a memcached command + SET/GET latency Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 6 / 20
  • 7. Benchmarks wrk2: to measure the performance of nginx server. ∗ Spawns two threads ∗ Creates a total of 100 TCP connections to make a request to the server ∗ The throughput in requests/second can be set in the tool ∗ Outputs latency pgbench: to measure the performance of PostgreSQL server. ∗ Creates a database of one million banking accounts ∗ Executes transactions with a total of 100 connections with 4 threads ∗ Outputs latency Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 7 / 20
  • 8. Container Networking modes Figure 1: Experimental setup Two ways to deploy containers: on VMs b/c of security (e.g cloud provider) or on a PM e.g google Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 8 / 20
  • 9. Container Networking modes on multiple hosts Host mode: In this mode, containers share the namespace of the host OS. Source: https://www.onug.net/blog/ container-networking-easy-button-for-app-teams-heartburn-for-networking-and-security-teams/ Namespace is a way of logically separating processes along different dimensions; Network, IPC, User, PID, Mount or UTS namespace. Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 9 / 20
  • 10. Container Networking modes NAT (Network Address Translation): ∗ Allows containers to communicate using the public IP address of their host machine + port number of the container ∗ Maps the private address of a container to its port number in a NAT table Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 10 / 20
  • 11. Container Networking modes Docker default overlay Network: It uses Virtual Extensible LAN to connect containers on multiple hosts. Source: https://www.youtube.com/watch?v=Jqm_4TMmQz8 Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 11 / 20
  • 12. Container Networking modes Weave: Is another implementation of overlay network, it uses a weave router container on each Docker host and the network is made from these connected weave routers. Source: https://sreeninet.wordpress.com/2015/01/18/docker-networking-weave/ Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 12 / 20
  • 13. Experimental Results iperf3 throughput (a) TCP (b) UDP Figure 2: iperf3 TCP and UDP throughput Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 13 / 20
  • 14. Experimental Results Memcached throughput and latency (a) Throughput (b) Latency Figure 3: memcached throughput and latency Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 14 / 20
  • 15. Experimental Results Latency of Nginx server Figure 4: Nginx 1MB html file latency on 3K reqs/sec Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 15 / 20
  • 16. Experimental Results PostgreSQL latency Figure 5: PostgreSQL latency on 500 trans/sec Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 16 / 20
  • 17. Experimental Results (a) iperf3 (b) PostgreSQL Figure 6: CPU utilization of iperf3 and PostgreSQL servers Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 17 / 20
  • 18. RSS/RPS - A Linux kernel support RSS: Receive Side Scaling ∗ A complementary technique in the Linux networking stack to increase parallelism and improve performance for multi-processor systems ∗ Contemporary NICs support multi-queue for receiving and forwarding packets ∗ Upon reception, a NIC can send different packets to different queues to distribute processing among CPUs ∗ RPS (Receive Packet Steering) is logically a software implementation of RSS Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 18 / 20
  • 19. Conclusion Host mode has the best performance among all the 4 modes followed by NAT with few performance drop, while the two overlay networks (VXLAN and weave) have more performance drop because of the double encapsulation. The overlay networks consume more system resources. We would like to reduce the overhead of the overlay networks using OS/hardware kernel support. We started collecting some results but there are some questions on it, e.g. in memcached, the throughput improved but the latency increase a bit, hence, we would like to check why. The shell scripts of our testbed is open sourced at https://github.com/ Yusuf-Haruna/Analysis-of-Docker-Networking-Shell-scripts. Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 19 / 20
  • 20. Thanks for your attention Yusuf Haruna yusuf.haruna@etu.univ-cotedazur.fr Questions? Y. Haruna (Ubinet Master) An Analysis and Emp. Study of Docker Net. 3 July 2019 20 / 20