SlideShare a Scribd company logo
Automating
Linux Network Performance
Testing
Antonio Ojea, SUSE, Team Lead Openstack aojeagarcia@suse.com
Who am I
aojeagarcia@suse.com https://github.com/aojea
Link Layer
Internet Layer
Transport Layer
Application
Link Layer
Internet Layer
Transport Layer
ApplicationData
Data
Data
Data
Transport
Header
Transport
Header
Transport
Header
Internet
Header
Internet
Header
Link
Layer
Header
GET / HTTP/1.1 Host: www.opensuse.org ...
HTTP/1.1 200 OK … Content-Type: text/html
How networks works: TCP/IP Model
GET / HTTP/1.1 Host: www.opensuse.org ...
HTTP/1.1 200 OK … Content-Type: text/html
How networks works: pre-virtualization era
GET / HTTP/1.1 Host: www.opensuse.org ...
HTTP/1.1 200 OK … Content-Type: text/html
How networks works: virtualization era
GET / HTTP/1.1 Host: www.opensuse.org ...
HTTP/1.1 200 OK … Content-Type: text/html
How networks works: container era
Performance
The word performance in computer performance means the same thing that
performance means in other contexts, that is, it means
"How well is the computer doing the work it is supposed to do?"
1 Computer Performance Analysis with Mathematica by Arnold O. Allen, Academic Press, 1994. $1.1 Introduction, pg 1.
COMPUTER PERFORMANCE NETWORK PERFORMANCE
Systems Performance
Traffic
Generator
DATAPLANE
CONTROL
PLANE
MANAGEMENT
PLANE
● Packets per
second
● Connections per
second
● Maximum
concurrent
connections per
second
● ...
● Throughput
● Latency
● Frame Loss
Rate
● Back to Back
frames
● System
Recovery
● Reset
Network PerformanceRFC 2544
Linux Networking Performance: 10 Gbps maths
Inter-frame
gap
12 bytes
MAC
Preamble
8 bytes
MAC header
14 bytes
Min
Payload Size
46 bytes
CRC
4 bytes
- Memory access: 70 nsec
- Cache miss takes 32 nsec
- L2 cache access: 4.3 nsec
- L3 cache access: 7.9 nsec
- 3 Ghz CPU ~ 3 nsec/inst *
Ethernet frame size Transmission delay
((frame size+20)*8)/
((10000*10^6))*10^9
Peak packet rate
(10*10^9) bits/sec /
(frame size + 20* 8)
64 bytes (minimum
size) 67.2 ns 14,880,952 pps
1514 bytes
1227.2 ns 812,744 pps
http://netoptimizer.blogspot.com/2014/05/the-calculations-10gbits-wirespeed.html?q=cycles
Minimum ethernet size
Network Performance: Applications (UDP and TCP)
● UDP Throughput is Not Impacted by Latency
○ UDP fires and forget
○ This lack of control causes that packet loss impacts the
application
● TCP is directly impacted by latency
○ When latency is high, it means that the sender spends
more time idle (not sending any new packets), which
reduces how fast throughput grows.
● TCP is Impacted by Retransmission and Packet Loss
○ Packets will need to be retransmitted (even if only the
acknowledgment packet got lost and the packets got
delivered)
○ The TCP congestion window size will not permit an optimal
throughput
http://smutz.us/techtips/NetworkLatency.html
Round
trip
latency
TCP throughput
with no packet
loss Round trip
latency
TCP
throughpu
t with 2%
packet
loss
0 ms 93.5 Mbps 3.72 Mbps
30 ms 16.2 Mbps 1.63 Mbps
60 ms 8.7 Mbps 1.33 Mbps
90 ms 5.32 Mbps 0.85 Mbps
Network Performance: Distributed systems
The fallacies of distributed computing are a set of
assertions made by L Peter Deutsch and others at Sun
Microsystems describing false assumptions that programmers
new to distributed applications invariably make.
● The network is reliable
● Latency is zero
● Bandwidth is infinite
● The network is secure
● Topology doesn't change
● There is one administrator
● Transport cost is zero
● The network is homogeneous
COMPUTER NETWORK
DISTRIBUTED
SYSTEM
https://en.wikipedia.org/wiki/Fallacies_of_distributed_computing
Network Performance Testing: A Different Approach
The word performance in computer performance means the same thing that
performance means in other contexts, that is, it means
"How well is the computer doing the work it is supposed to do?"
1 Computer Performance Analysis with Mathematica by Arnold O. Allen, Academic Press, 1994. $1.1 Introduction, pg 1.
Let’s test how well is doing what it
is supposed to do
We need realistic scenarios
The tool: T-Rex (Realistic) Traffic Generator
● TRex is an open source, low cost, stateful and stateless traffic generator fuelled by DPDK.
● It generates L4-7 traffic based on pre-processing and smart replay of real traffic templates.
● TRex amplifies both client and server side traffic and can scale up to 200Gb/sec.
● TRex Stateless functionality includes support for multiple streams, the ability to change any packet
field and provides per stream statistics, latency and jitter.
● New Advanced Stateful functionality includes support for emulating L7 traffic with fully-featured
scalable TCP layer.
● Support testing clusters and complex network scenario
https://github.com/cisco-system-traffic-generator/trex-core
Testbed
Albali Marfak
eth1
eth3 eth1
eth4
1.1.1.2
2.2.2.2
1.1.1.1
2.2.2.1
16.0.0.0/16
48.0.0.0/16
Marfak eth1eth4
REALITY
MARFAK’s
”REALITY”
Thanks @mkubecek
DEMO: Saturate 10 Gbps with http traffic
Albali Marfak
eth1
eth3 eth1
eth4
1.1.1.2
2.2.2.2
1.1.1.1
2.2.2.1
16.0.0.0/16
48.0.0.0/16
https://asciinema.org/a/yKc3063byjyC6J7uVdhJ5LqOl
The testing framework: Pytest
● Trex has a Python API
https://trex-tgn.cisco.com/trex/doc/cp_stl_docs/#how-to-use
● … and lot of examples on how to use it
https://trex-tgn.cisco.com/trex/doc/trex_cookbook/index.html
● Pytest is easy to use and I was used to it, but any other framework can be used
https://github.com/aojea/pytest-trex
DEMO: A simple pytest example
https://github.com/aojea/network-performance-automation/blob
/master/labs/tests/test_simple_service.py https://asciinema.org/a/269496
Performance Testing
Continuous Integration
Unit,
Functional, …
Deploy
Environment
Run
Performance
Tests
Check for
regressions
Performance
Results
Lessons learned
● Don’t trust benchmarks blindly
○ Understand if the benchmark adds any value and what’s really benchmarking
● Test performance as close as possible to production
○ virtual = mock != real HW
● Treat your testing code as your normal code
○ Having tests on tree improves coordination and supportability
● Test performance periodically and don’t allow regressions
○ Use a subset of tests for gating and run the full suite nightly
● Iterate, review, measure and adjust
○ Review periodically your thresholds
○ Add policies to implement tests with bugfixes and features affecting performance
● Test need to be reproducible
○ Don’t make assumptions, verify everything
○ (A ~=B ) != (A == B)
Q&A
Marfak
BONUS DEMO: A Microservice application using Linkerd (Service Mesh) on
Kubernetes
Thanks Rafael @ereslibre
K8s node1 K8s node2
Ref: https://trex-tgn.cisco.com/trex/doc/trex_astf_vs_nginx.html
Testbed
Traffic Generator
DUT
eth1
eth3 eth1
eth4
1.1.1.2 1.1.1.1
16.0.0.0/16
dummy
1
7
2
.
1
6
.
0
.
0
/
2
4
10.96.0.0/16
https://github.com/GoogleCloudPlatform/microservices-demo
BONUS DEMO: A Microservice application using Linkerd (Service Mesh) on
Kubernetes
BONUS DEMO: A Microservice application using Linkerd (Service Mesh) on
Kubernetes
Property Values
HTTP request size 100B
HTTP response
size
32KB
Request/Response
per TCP
connection
1
Average number
of packets per TCP
connection
32
Number of clients 200
Number of servers 1
initwnd 2
delay-ack 100msec
https://youtu.be/_n8YNiYx4HU

More Related Content

What's hot

Xdp and ebpf_maps
Xdp and ebpf_mapsXdp and ebpf_maps
Xdp and ebpf_maps
lcplcp1
 
Virtualized network with openvswitch
Virtualized network with openvswitchVirtualized network with openvswitch
Virtualized network with openvswitch
Sim Janghoon
 
Intro to Linux Shell Scripting
Intro to Linux Shell ScriptingIntro to Linux Shell Scripting
Intro to Linux Shell Scripting
vceder
 
Linux Linux Traffic Control
Linux Linux Traffic ControlLinux Linux Traffic Control
Linux Linux Traffic Control
SUSE Labs Taipei
 
Dpdk performance
Dpdk performanceDpdk performance
Dpdk performance
Stephen Hemminger
 
eBPF - Rethinking the Linux Kernel
eBPF - Rethinking the Linux KerneleBPF - Rethinking the Linux Kernel
eBPF - Rethinking the Linux Kernel
Thomas Graf
 
Ccnp workbook network bulls
Ccnp workbook network bullsCcnp workbook network bulls
Ccnp workbook network bulls
Swapnil Kapate
 
makefiles tutorial
makefiles tutorialmakefiles tutorial
makefiles tutorial
vsubhashini
 
Open vSwitch 패킷 처리 구조
Open vSwitch 패킷 처리 구조Open vSwitch 패킷 처리 구조
Open vSwitch 패킷 처리 구조
Seung-Hoon Baek
 
Intel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsIntel DPDK Step by Step instructions
Intel DPDK Step by Step instructions
Hisaki Ohara
 
Meet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracingMeet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracing
Viller Hsiao
 
eBPF/XDP
eBPF/XDP eBPF/XDP
eBPF/XDP
Netronome
 
DevConf 2014 Kernel Networking Walkthrough
DevConf 2014   Kernel Networking WalkthroughDevConf 2014   Kernel Networking Walkthrough
DevConf 2014 Kernel Networking Walkthrough
Thomas Graf
 
DPDK In Depth
DPDK In DepthDPDK In Depth
DPDK In Depth
Kernel TLV
 
Linux System Monitoring basic commands
Linux System Monitoring basic commandsLinux System Monitoring basic commands
Linux System Monitoring basic commands
Mohammad Rafiee
 
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDPDockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
Thomas Graf
 
CCNAv5 - S3: Chapter2 Lan Redundancy
CCNAv5 - S3: Chapter2 Lan RedundancyCCNAv5 - S3: Chapter2 Lan Redundancy
CCNAv5 - S3: Chapter2 Lan Redundancy
Vuz Dở Hơi
 
Dynamic Routing IGRP
Dynamic Routing IGRPDynamic Routing IGRP
Dynamic Routing IGRP
Kishore Kumar
 
BPF Internals (eBPF)
BPF Internals (eBPF)BPF Internals (eBPF)
BPF Internals (eBPF)
Brendan Gregg
 
Who carries your container? Zun or Magnum?
Who carries your container? Zun or Magnum?Who carries your container? Zun or Magnum?
Who carries your container? Zun or Magnum?
Madhuri Kumari
 

What's hot (20)

Xdp and ebpf_maps
Xdp and ebpf_mapsXdp and ebpf_maps
Xdp and ebpf_maps
 
Virtualized network with openvswitch
Virtualized network with openvswitchVirtualized network with openvswitch
Virtualized network with openvswitch
 
Intro to Linux Shell Scripting
Intro to Linux Shell ScriptingIntro to Linux Shell Scripting
Intro to Linux Shell Scripting
 
Linux Linux Traffic Control
Linux Linux Traffic ControlLinux Linux Traffic Control
Linux Linux Traffic Control
 
Dpdk performance
Dpdk performanceDpdk performance
Dpdk performance
 
eBPF - Rethinking the Linux Kernel
eBPF - Rethinking the Linux KerneleBPF - Rethinking the Linux Kernel
eBPF - Rethinking the Linux Kernel
 
Ccnp workbook network bulls
Ccnp workbook network bullsCcnp workbook network bulls
Ccnp workbook network bulls
 
makefiles tutorial
makefiles tutorialmakefiles tutorial
makefiles tutorial
 
Open vSwitch 패킷 처리 구조
Open vSwitch 패킷 처리 구조Open vSwitch 패킷 처리 구조
Open vSwitch 패킷 처리 구조
 
Intel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsIntel DPDK Step by Step instructions
Intel DPDK Step by Step instructions
 
Meet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracingMeet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracing
 
eBPF/XDP
eBPF/XDP eBPF/XDP
eBPF/XDP
 
DevConf 2014 Kernel Networking Walkthrough
DevConf 2014   Kernel Networking WalkthroughDevConf 2014   Kernel Networking Walkthrough
DevConf 2014 Kernel Networking Walkthrough
 
DPDK In Depth
DPDK In DepthDPDK In Depth
DPDK In Depth
 
Linux System Monitoring basic commands
Linux System Monitoring basic commandsLinux System Monitoring basic commands
Linux System Monitoring basic commands
 
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDPDockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
 
CCNAv5 - S3: Chapter2 Lan Redundancy
CCNAv5 - S3: Chapter2 Lan RedundancyCCNAv5 - S3: Chapter2 Lan Redundancy
CCNAv5 - S3: Chapter2 Lan Redundancy
 
Dynamic Routing IGRP
Dynamic Routing IGRPDynamic Routing IGRP
Dynamic Routing IGRP
 
BPF Internals (eBPF)
BPF Internals (eBPF)BPF Internals (eBPF)
BPF Internals (eBPF)
 
Who carries your container? Zun or Magnum?
Who carries your container? Zun or Magnum?Who carries your container? Zun or Magnum?
Who carries your container? Zun or Magnum?
 

Similar to Automating linux network performance testing

Communication Performance Over A Gigabit Ethernet Network
Communication Performance Over A Gigabit Ethernet NetworkCommunication Performance Over A Gigabit Ethernet Network
Communication Performance Over A Gigabit Ethernet Network
IJERA Editor
 
Network Bottleneck Avoidance Using Edge Routers
Network Bottleneck Avoidance Using Edge RoutersNetwork Bottleneck Avoidance Using Edge Routers
Network Bottleneck Avoidance Using Edge Routers
Ankur Singhal
 
Sky x technology
Sky x technologySky x technology
Sky x technology
Hafsa Hayath
 
Primer to Browser Netwroking
Primer to Browser NetwrokingPrimer to Browser Netwroking
Primer to Browser Netwroking
Shuya Osaki
 
UDT
UDTUDT
UDT
xlight
 
UDT
UDTUDT
UDT
lilyco
 
Module 1 slides
Module 1 slidesModule 1 slides
Module 1 slides
AnaniaKapala
 
An FPGA for high end Open Networking
An FPGA for high end Open NetworkingAn FPGA for high end Open Networking
An FPGA for high end Open Networking
rinnocente
 
TCP Performance analysis Wireless Multihop Networks
TCP Performance analysis Wireless Multihop NetworksTCP Performance analysis Wireless Multihop Networks
TCP Performance analysis Wireless Multihop Networks
Abhishek Kona
 
Analytical Modeling of End-to-End Delay in OpenFlow Based Networks
Analytical Modeling of End-to-End Delay in OpenFlow Based NetworksAnalytical Modeling of End-to-End Delay in OpenFlow Based Networks
Analytical Modeling of End-to-End Delay in OpenFlow Based Networks
Azeem Iqbal
 
TCP Over Wireless
TCP Over WirelessTCP Over Wireless
TCP Over Wireless
Farooq Khan
 
OpenFlow tutorial
OpenFlow tutorialOpenFlow tutorial
OpenFlow tutorial
openflow
 
IEEE 2014 JAVA NETWORKING PROJECTS Receiver based flow control for networks i...
IEEE 2014 JAVA NETWORKING PROJECTS Receiver based flow control for networks i...IEEE 2014 JAVA NETWORKING PROJECTS Receiver based flow control for networks i...
IEEE 2014 JAVA NETWORKING PROJECTS Receiver based flow control for networks i...
IEEEGLOBALSOFTSTUDENTPROJECTS
 
2014 IEEE JAVA NETWORKING PROJECT Receiver based flow control for networks in...
2014 IEEE JAVA NETWORKING PROJECT Receiver based flow control for networks in...2014 IEEE JAVA NETWORKING PROJECT Receiver based flow control for networks in...
2014 IEEE JAVA NETWORKING PROJECT Receiver based flow control for networks in...
IEEEFINALSEMSTUDENTSPROJECTS
 
Master Class : TCP/IP Mechanics from Scratch to Expert
Master Class : TCP/IP Mechanics from Scratch to ExpertMaster Class : TCP/IP Mechanics from Scratch to Expert
Master Class : TCP/IP Mechanics from Scratch to Expert
Abhishek Sagar
 
netty_qcon_v4
netty_qcon_v4netty_qcon_v4
netty_qcon_v4
Norman Maurer
 
N017147679
N017147679N017147679
N017147679
IOSR Journals
 
Performance Evaluation of Ipv4, Ipv6 Migration Techniques
Performance Evaluation of Ipv4, Ipv6 Migration TechniquesPerformance Evaluation of Ipv4, Ipv6 Migration Techniques
Performance Evaluation of Ipv4, Ipv6 Migration Techniques
IOSR Journals
 
Securing & Enforcing Network Policy and Encryption with Weave Net
Securing & Enforcing Network Policy and Encryption with Weave NetSecuring & Enforcing Network Policy and Encryption with Weave Net
Securing & Enforcing Network Policy and Encryption with Weave Net
Luke Marsden
 
lecciones ccna3
lecciones ccna3lecciones ccna3
lecciones ccna3
luisalfredoa9
 

Similar to Automating linux network performance testing (20)

Communication Performance Over A Gigabit Ethernet Network
Communication Performance Over A Gigabit Ethernet NetworkCommunication Performance Over A Gigabit Ethernet Network
Communication Performance Over A Gigabit Ethernet Network
 
Network Bottleneck Avoidance Using Edge Routers
Network Bottleneck Avoidance Using Edge RoutersNetwork Bottleneck Avoidance Using Edge Routers
Network Bottleneck Avoidance Using Edge Routers
 
Sky x technology
Sky x technologySky x technology
Sky x technology
 
Primer to Browser Netwroking
Primer to Browser NetwrokingPrimer to Browser Netwroking
Primer to Browser Netwroking
 
UDT
UDTUDT
UDT
 
UDT
UDTUDT
UDT
 
Module 1 slides
Module 1 slidesModule 1 slides
Module 1 slides
 
An FPGA for high end Open Networking
An FPGA for high end Open NetworkingAn FPGA for high end Open Networking
An FPGA for high end Open Networking
 
TCP Performance analysis Wireless Multihop Networks
TCP Performance analysis Wireless Multihop NetworksTCP Performance analysis Wireless Multihop Networks
TCP Performance analysis Wireless Multihop Networks
 
Analytical Modeling of End-to-End Delay in OpenFlow Based Networks
Analytical Modeling of End-to-End Delay in OpenFlow Based NetworksAnalytical Modeling of End-to-End Delay in OpenFlow Based Networks
Analytical Modeling of End-to-End Delay in OpenFlow Based Networks
 
TCP Over Wireless
TCP Over WirelessTCP Over Wireless
TCP Over Wireless
 
OpenFlow tutorial
OpenFlow tutorialOpenFlow tutorial
OpenFlow tutorial
 
IEEE 2014 JAVA NETWORKING PROJECTS Receiver based flow control for networks i...
IEEE 2014 JAVA NETWORKING PROJECTS Receiver based flow control for networks i...IEEE 2014 JAVA NETWORKING PROJECTS Receiver based flow control for networks i...
IEEE 2014 JAVA NETWORKING PROJECTS Receiver based flow control for networks i...
 
2014 IEEE JAVA NETWORKING PROJECT Receiver based flow control for networks in...
2014 IEEE JAVA NETWORKING PROJECT Receiver based flow control for networks in...2014 IEEE JAVA NETWORKING PROJECT Receiver based flow control for networks in...
2014 IEEE JAVA NETWORKING PROJECT Receiver based flow control for networks in...
 
Master Class : TCP/IP Mechanics from Scratch to Expert
Master Class : TCP/IP Mechanics from Scratch to ExpertMaster Class : TCP/IP Mechanics from Scratch to Expert
Master Class : TCP/IP Mechanics from Scratch to Expert
 
netty_qcon_v4
netty_qcon_v4netty_qcon_v4
netty_qcon_v4
 
N017147679
N017147679N017147679
N017147679
 
Performance Evaluation of Ipv4, Ipv6 Migration Techniques
Performance Evaluation of Ipv4, Ipv6 Migration TechniquesPerformance Evaluation of Ipv4, Ipv6 Migration Techniques
Performance Evaluation of Ipv4, Ipv6 Migration Techniques
 
Securing & Enforcing Network Policy and Encryption with Weave Net
Securing & Enforcing Network Policy and Encryption with Weave NetSecuring & Enforcing Network Policy and Encryption with Weave Net
Securing & Enforcing Network Policy and Encryption with Weave Net
 
lecciones ccna3
lecciones ccna3lecciones ccna3
lecciones ccna3
 

Recently uploaded

J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
Bert Jan Schrijver
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
Alina Yurenko
 
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Paul Brebner
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
Reetu63
 
Project Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdfProject Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdf
Karya Keeper
 
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
kalichargn70th171
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
Sven Peters
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
Marcin Chrost
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
gapen1
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
ShulagnaSarkar2
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
Patrick Weigel
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
dakas1
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
Tier1 app
 
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
kalichargn70th171
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
dakas1
 
ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.
Maitrey Patel
 

Recently uploaded (20)

J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
 
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
 
Project Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdfProject Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdf
 
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
 
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
 
ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.
 

Automating linux network performance testing

  • 1. Automating Linux Network Performance Testing Antonio Ojea, SUSE, Team Lead Openstack aojeagarcia@suse.com
  • 2. Who am I aojeagarcia@suse.com https://github.com/aojea
  • 3.
  • 4. Link Layer Internet Layer Transport Layer Application Link Layer Internet Layer Transport Layer ApplicationData Data Data Data Transport Header Transport Header Transport Header Internet Header Internet Header Link Layer Header GET / HTTP/1.1 Host: www.opensuse.org ... HTTP/1.1 200 OK … Content-Type: text/html How networks works: TCP/IP Model
  • 5. GET / HTTP/1.1 Host: www.opensuse.org ... HTTP/1.1 200 OK … Content-Type: text/html How networks works: pre-virtualization era
  • 6. GET / HTTP/1.1 Host: www.opensuse.org ... HTTP/1.1 200 OK … Content-Type: text/html How networks works: virtualization era
  • 7. GET / HTTP/1.1 Host: www.opensuse.org ... HTTP/1.1 200 OK … Content-Type: text/html How networks works: container era
  • 8. Performance The word performance in computer performance means the same thing that performance means in other contexts, that is, it means "How well is the computer doing the work it is supposed to do?" 1 Computer Performance Analysis with Mathematica by Arnold O. Allen, Academic Press, 1994. $1.1 Introduction, pg 1. COMPUTER PERFORMANCE NETWORK PERFORMANCE
  • 10. Traffic Generator DATAPLANE CONTROL PLANE MANAGEMENT PLANE ● Packets per second ● Connections per second ● Maximum concurrent connections per second ● ... ● Throughput ● Latency ● Frame Loss Rate ● Back to Back frames ● System Recovery ● Reset Network PerformanceRFC 2544
  • 11. Linux Networking Performance: 10 Gbps maths Inter-frame gap 12 bytes MAC Preamble 8 bytes MAC header 14 bytes Min Payload Size 46 bytes CRC 4 bytes - Memory access: 70 nsec - Cache miss takes 32 nsec - L2 cache access: 4.3 nsec - L3 cache access: 7.9 nsec - 3 Ghz CPU ~ 3 nsec/inst * Ethernet frame size Transmission delay ((frame size+20)*8)/ ((10000*10^6))*10^9 Peak packet rate (10*10^9) bits/sec / (frame size + 20* 8) 64 bytes (minimum size) 67.2 ns 14,880,952 pps 1514 bytes 1227.2 ns 812,744 pps http://netoptimizer.blogspot.com/2014/05/the-calculations-10gbits-wirespeed.html?q=cycles Minimum ethernet size
  • 12. Network Performance: Applications (UDP and TCP) ● UDP Throughput is Not Impacted by Latency ○ UDP fires and forget ○ This lack of control causes that packet loss impacts the application ● TCP is directly impacted by latency ○ When latency is high, it means that the sender spends more time idle (not sending any new packets), which reduces how fast throughput grows. ● TCP is Impacted by Retransmission and Packet Loss ○ Packets will need to be retransmitted (even if only the acknowledgment packet got lost and the packets got delivered) ○ The TCP congestion window size will not permit an optimal throughput http://smutz.us/techtips/NetworkLatency.html Round trip latency TCP throughput with no packet loss Round trip latency TCP throughpu t with 2% packet loss 0 ms 93.5 Mbps 3.72 Mbps 30 ms 16.2 Mbps 1.63 Mbps 60 ms 8.7 Mbps 1.33 Mbps 90 ms 5.32 Mbps 0.85 Mbps
  • 13. Network Performance: Distributed systems The fallacies of distributed computing are a set of assertions made by L Peter Deutsch and others at Sun Microsystems describing false assumptions that programmers new to distributed applications invariably make. ● The network is reliable ● Latency is zero ● Bandwidth is infinite ● The network is secure ● Topology doesn't change ● There is one administrator ● Transport cost is zero ● The network is homogeneous COMPUTER NETWORK DISTRIBUTED SYSTEM https://en.wikipedia.org/wiki/Fallacies_of_distributed_computing
  • 14.
  • 15.
  • 16. Network Performance Testing: A Different Approach The word performance in computer performance means the same thing that performance means in other contexts, that is, it means "How well is the computer doing the work it is supposed to do?" 1 Computer Performance Analysis with Mathematica by Arnold O. Allen, Academic Press, 1994. $1.1 Introduction, pg 1. Let’s test how well is doing what it is supposed to do We need realistic scenarios
  • 17. The tool: T-Rex (Realistic) Traffic Generator ● TRex is an open source, low cost, stateful and stateless traffic generator fuelled by DPDK. ● It generates L4-7 traffic based on pre-processing and smart replay of real traffic templates. ● TRex amplifies both client and server side traffic and can scale up to 200Gb/sec. ● TRex Stateless functionality includes support for multiple streams, the ability to change any packet field and provides per stream statistics, latency and jitter. ● New Advanced Stateful functionality includes support for emulating L7 traffic with fully-featured scalable TCP layer. ● Support testing clusters and complex network scenario https://github.com/cisco-system-traffic-generator/trex-core
  • 19. DEMO: Saturate 10 Gbps with http traffic Albali Marfak eth1 eth3 eth1 eth4 1.1.1.2 2.2.2.2 1.1.1.1 2.2.2.1 16.0.0.0/16 48.0.0.0/16 https://asciinema.org/a/yKc3063byjyC6J7uVdhJ5LqOl
  • 20. The testing framework: Pytest ● Trex has a Python API https://trex-tgn.cisco.com/trex/doc/cp_stl_docs/#how-to-use ● … and lot of examples on how to use it https://trex-tgn.cisco.com/trex/doc/trex_cookbook/index.html ● Pytest is easy to use and I was used to it, but any other framework can be used https://github.com/aojea/pytest-trex
  • 21. DEMO: A simple pytest example https://github.com/aojea/network-performance-automation/blob /master/labs/tests/test_simple_service.py https://asciinema.org/a/269496
  • 22. Performance Testing Continuous Integration Unit, Functional, … Deploy Environment Run Performance Tests Check for regressions Performance Results
  • 23. Lessons learned ● Don’t trust benchmarks blindly ○ Understand if the benchmark adds any value and what’s really benchmarking ● Test performance as close as possible to production ○ virtual = mock != real HW ● Treat your testing code as your normal code ○ Having tests on tree improves coordination and supportability ● Test performance periodically and don’t allow regressions ○ Use a subset of tests for gating and run the full suite nightly ● Iterate, review, measure and adjust ○ Review periodically your thresholds ○ Add policies to implement tests with bugfixes and features affecting performance ● Test need to be reproducible ○ Don’t make assumptions, verify everything ○ (A ~=B ) != (A == B)
  • 24. Q&A
  • 25. Marfak BONUS DEMO: A Microservice application using Linkerd (Service Mesh) on Kubernetes Thanks Rafael @ereslibre K8s node1 K8s node2 Ref: https://trex-tgn.cisco.com/trex/doc/trex_astf_vs_nginx.html
  • 26. Testbed Traffic Generator DUT eth1 eth3 eth1 eth4 1.1.1.2 1.1.1.1 16.0.0.0/16 dummy 1 7 2 . 1 6 . 0 . 0 / 2 4 10.96.0.0/16 https://github.com/GoogleCloudPlatform/microservices-demo BONUS DEMO: A Microservice application using Linkerd (Service Mesh) on Kubernetes
  • 27. BONUS DEMO: A Microservice application using Linkerd (Service Mesh) on Kubernetes Property Values HTTP request size 100B HTTP response size 32KB Request/Response per TCP connection 1 Average number of packets per TCP connection 32 Number of clients 200 Number of servers 1 initwnd 2 delay-ack 100msec https://youtu.be/_n8YNiYx4HU