SlideShare a Scribd company logo
1 of 14
Download to read offline
1
Using Iperf
Jon M. Dugan
<jdugan@es.net>
NANOG 43, Brooklyn, NY
June 1, 2008
Energy Sciences Network
Lawrence Berkeley National Laboratory
Networking for the Future of Science
2
Outline
• TCP Measurements
• UDP Measurements
• Useful tricks
3
Iperf’s notion of clients and servers
Client is the sender
Server is the receiver
(discard server)
4
TCP Measurements
• Measures TCP Achievable Bandwidth
– Measurement includes the end system
– Sometimes called “memory-to-memory” tests
• Limits of what we can measure
– TCP is a largely a black box
• Many things can limit TCP throughput
– Loss
– Congestion
– Buffer Starvation
– Out of order delivery
5
Example Iperf TCP Invocation
Server (receiver):
$ iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[ 4] local 10.0.1.5 port 5001 connected with 10.0.1.10 port 60830
[ 4] 0.0-10.0 sec 1.09 GBytes 933 Mbits/sec
[ 4] local 10.0.1.5 port 5001 connected with 10.0.1.10 port 60831
[ 4] 0.0-10.0 sec 1.08 GBytes 931 Mbits/sec
Client (sender):
$ iperf -c 10.0.1.5
------------------------------------------------------------
Client connecting to 10.0.1.5, TCP port 5001
TCP window size: 129 KByte (default)
------------------------------------------------------------
[ 3] local 10.0.1.10 port 60830 connected with 10.0.1.5 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.2 sec 1.09 GBytes 913 Mbits/sec
6
Bandwidth Delay Product
• The amount of “in flight” data allowed for a TCP
connection
• BDP = bandwidth * round trip time
• Example: 1Gb/s cross country, ~100ms
1,000,000,000 b/s * .1 s = 100,000,000 bits
100,000,000 / 8 = 12,500,000 bytes
12,500,000 bytes / (1024*1024) ~ 12MB
• To get full TCP performance the TCP window needs to be
large enough to accommodate the Bandwidth Delay
Product
7
UDP Measurements
• UDP provides greater transparency
• We can directly measure some additional things:
– Loss
– Jitter
– Out of order delivery
8
Example Iperf UDP Invocation
Server (receiver):
$ iperf -u -s
------------------------------------------------------------
Server listening on UDP port 5001
Receiving 1470 byte datagrams
UDP buffer size: 107 KByte (default)
------------------------------------------------------------
[ 3] local 10.0.1.5 port 5001 connected with 10.0.1.10 port 65299
[ 3] 0.0-10.0 sec 1.25 MBytes 1.05 Mbits/sec 0.008 ms 0/ 893 (0%)
Client (sender):
$ iperf -u -c 10.0.1.5 -b 1M
------------------------------------------------------------
Client connecting to 10.0.1.5, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size: 9.00 KByte (default)
------------------------------------------------------------
[ 3] local 10.0.1.10 port 65300 connected with 10.0.1.5 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 1.25 MBytes 1.05 Mbits/sec
[ 3] Server Report:
[ 3] 0.0-10.0 sec 1.25 MBytes 1.05 Mbits/sec 0.003 ms 0/ 893 (0%)
[ 3] Sent 893 datagrams
9
Adjusting Iperf for performance
• The –w option for Iperf can be used to request a particular
buffer size. This sets both send and receive buffer size.
– The OS may need to be tweaked to allow buffers of sufficient
size.
– See http://dsd.lbl.gov/TCP-tuning/ and
http://www.psc.edu/networking/perf_tune.html
• Parallel transfers may help as well, the –P option can be
used for this
10
Useful Iperf Invocations
• UDP and TCP:
• -i n report status every n seconds
• -d do bidirectional test simultaneously
• -r do bidirectional test one after another
11
Using Iperf to generate high rate streams
• UDP doesn’t require a receiver
• If you have good counters on your switches & routers
those can be used to measure
• Turns out UDP reception can be very resource intensive
resulting in drops at the NIC at high rates (8-9 Gb/s)
12
Never do this
• Need to generate 10 Gb/s but only have a 1 Gb/s host?
Iperf UDP
1 Gb/s
Destined for
10.1.1.1
Use the –T option to Iperf to control
the number of times the traffic loops
Can also use firewall filters to discard a certain TTL range.
Other filters may be prudent as well.
10.0.1.1 10.0.1.2
Static route:
10.1.1.1/32 10.0.1.2
Static route:
10.1.1.1/32 10.0.1.1
13
Iperf Development
• Primarily in maintenance mode
– Accepting and apply patches
– Fixing bugs and documentation as time allows
• Future Directions
– libiperf
14
More Information
http://iperf.sourceforge.net
iperf-users@lists.sourceforge.net
You can reach me at:
Jon Dugan <jdugan@es.net>

More Related Content

What's hot

Dhcp Server Linux Server
Dhcp Server Linux ServerDhcp Server Linux Server
Dhcp Server Linux Server
muh kemal
 

What's hot (20)

Ping
PingPing
Ping
 
F5 tcpdump
F5 tcpdumpF5 tcpdump
F5 tcpdump
 
IPTABLES
IPTABLESIPTABLES
IPTABLES
 
RTSP Analysis Wireshark
RTSP Analysis WiresharkRTSP Analysis Wireshark
RTSP Analysis Wireshark
 
(NET404) Making Every Packet Count
(NET404) Making Every Packet Count(NET404) Making Every Packet Count
(NET404) Making Every Packet Count
 
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
 
NAT and firewall presentation - how setup a nice firewall
NAT and firewall presentation - how setup a nice firewallNAT and firewall presentation - how setup a nice firewall
NAT and firewall presentation - how setup a nice firewall
 
0-RTT TCP converters
0-RTT TCP converters0-RTT TCP converters
0-RTT TCP converters
 
Hunt For Blue Leader
Hunt For Blue LeaderHunt For Blue Leader
Hunt For Blue Leader
 
Lect9
Lect9Lect9
Lect9
 
Seminar
SeminarSeminar
Seminar
 
Dhcp Server Linux Server
Dhcp Server Linux ServerDhcp Server Linux Server
Dhcp Server Linux Server
 
Dhcp confg
Dhcp confgDhcp confg
Dhcp confg
 
ACI DHCP Config Guide
ACI DHCP Config GuideACI DHCP Config Guide
ACI DHCP Config Guide
 
ACI DHCP 구성 가이드
ACI DHCP 구성 가이드ACI DHCP 구성 가이드
ACI DHCP 구성 가이드
 
TCPLS presentation @ietf 109
TCPLS presentation @ietf 109TCPLS presentation @ietf 109
TCPLS presentation @ietf 109
 
IMS MO SIP Signaling Flow with QoS
IMS MO SIP Signaling Flow with QoSIMS MO SIP Signaling Flow with QoS
IMS MO SIP Signaling Flow with QoS
 
Building the Internet of Things with Thingsquare and Contiki - day 2 part 2
Building the Internet of Things with Thingsquare and Contiki - day 2 part 2Building the Internet of Things with Thingsquare and Contiki - day 2 part 2
Building the Internet of Things with Thingsquare and Contiki - day 2 part 2
 
Tcp congestion avoidance algorithm identification
Tcp congestion avoidance algorithm identificationTcp congestion avoidance algorithm identification
Tcp congestion avoidance algorithm identification
 
6 app-tcp
6 app-tcp6 app-tcp
6 app-tcp
 

Similar to Duganiperfn43 120911020533-phpapp02

Dccp evaluation for sip signaling ict4 m
Dccp evaluation for sip signaling   ict4 m Dccp evaluation for sip signaling   ict4 m
Dccp evaluation for sip signaling ict4 m
Agus Awaludin
 
Performance & Monitoring Performance.pdf
Performance & Monitoring Performance.pdfPerformance & Monitoring Performance.pdf
Performance & Monitoring Performance.pdf
Phcng785014
 

Similar to Duganiperfn43 120911020533-phpapp02 (20)

Janet-hosted test tools
Janet-hosted test toolsJanet-hosted test tools
Janet-hosted test tools
 
High performance browser networking ch1,2,3
High performance browser networking ch1,2,3High performance browser networking ch1,2,3
High performance browser networking ch1,2,3
 
User Datagram Protocol
User Datagram ProtocolUser Datagram Protocol
User Datagram Protocol
 
AWS re:Invent 2016: Making Every Packet Count (NET404)
AWS re:Invent 2016: Making Every Packet Count (NET404)AWS re:Invent 2016: Making Every Packet Count (NET404)
AWS re:Invent 2016: Making Every Packet Count (NET404)
 
LF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecases
LF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecasesLF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecases
LF_OVS_17_OVS/OVS-DPDK connection tracking for Mobile usecases
 
Dccp evaluation for sip signaling ict4 m
Dccp evaluation for sip signaling   ict4 m Dccp evaluation for sip signaling   ict4 m
Dccp evaluation for sip signaling ict4 m
 
TCP-IP PROTOCOL
TCP-IP PROTOCOLTCP-IP PROTOCOL
TCP-IP PROTOCOL
 
Part9-congestion.pptx
Part9-congestion.pptxPart9-congestion.pptx
Part9-congestion.pptx
 
Itep
ItepItep
Itep
 
Wireshark, Tcpdump and Network Performance tools
Wireshark, Tcpdump and Network Performance toolsWireshark, Tcpdump and Network Performance tools
Wireshark, Tcpdump and Network Performance tools
 
Performance & Monitoring Performance.pdf
Performance & Monitoring Performance.pdfPerformance & Monitoring Performance.pdf
Performance & Monitoring Performance.pdf
 
A Study on MPTCP for Tolerating Packet Reordering and Path Heterogeneity in W...
A Study on MPTCP for Tolerating Packet Reordering and Path Heterogeneity in W...A Study on MPTCP for Tolerating Packet Reordering and Path Heterogeneity in W...
A Study on MPTCP for Tolerating Packet Reordering and Path Heterogeneity in W...
 
Part 9 : Congestion control and IPv6
Part 9 : Congestion control and IPv6Part 9 : Congestion control and IPv6
Part 9 : Congestion control and IPv6
 
The Next Generation Firewall for Red Hat Enterprise Linux 7 RC
The Next Generation Firewall for Red Hat Enterprise Linux 7 RCThe Next Generation Firewall for Red Hat Enterprise Linux 7 RC
The Next Generation Firewall for Red Hat Enterprise Linux 7 RC
 
Transport layer
Transport layerTransport layer
Transport layer
 
Distributed IP-PBX
Distributed IP-PBX Distributed IP-PBX
Distributed IP-PBX
 
cFrame framework slides
cFrame framework slidescFrame framework slides
cFrame framework slides
 
Fast Convergence in IP Network
Fast Convergence in IP Network Fast Convergence in IP Network
Fast Convergence in IP Network
 
Network protocols and vulnerabilities
Network protocols and vulnerabilitiesNetwork protocols and vulnerabilities
Network protocols and vulnerabilities
 
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitchDPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
 

More from Jamil Jamil

Skripsi perancangan-sistem-informasi-pendataan-biodata-mahasiswa-pada-fakulta...
Skripsi perancangan-sistem-informasi-pendataan-biodata-mahasiswa-pada-fakulta...Skripsi perancangan-sistem-informasi-pendataan-biodata-mahasiswa-pada-fakulta...
Skripsi perancangan-sistem-informasi-pendataan-biodata-mahasiswa-pada-fakulta...
Jamil Jamil
 
Skripsi perancangan-sistem-informasi-pendataan-biodata-mahasiswa-pada-fakulta...
Skripsi perancangan-sistem-informasi-pendataan-biodata-mahasiswa-pada-fakulta...Skripsi perancangan-sistem-informasi-pendataan-biodata-mahasiswa-pada-fakulta...
Skripsi perancangan-sistem-informasi-pendataan-biodata-mahasiswa-pada-fakulta...
Jamil Jamil
 
Skripsi universitas paramadina_jakarta_fitriyani_kepemimpinan_perempuan_dalam...
Skripsi universitas paramadina_jakarta_fitriyani_kepemimpinan_perempuan_dalam...Skripsi universitas paramadina_jakarta_fitriyani_kepemimpinan_perempuan_dalam...
Skripsi universitas paramadina_jakarta_fitriyani_kepemimpinan_perempuan_dalam...
Jamil Jamil
 
Silabus disain pemrogramanberorientasiobjek_iki10830
Silabus disain pemrogramanberorientasiobjek_iki10830Silabus disain pemrogramanberorientasiobjek_iki10830
Silabus disain pemrogramanberorientasiobjek_iki10830
Jamil Jamil
 
Publikasi 09.22.1115
Publikasi 09.22.1115Publikasi 09.22.1115
Publikasi 09.22.1115
Jamil Jamil
 
Publikasi 08.12.3175 2
Publikasi 08.12.3175 2Publikasi 08.12.3175 2
Publikasi 08.12.3175 2
Jamil Jamil
 
Publikasi 08.12.3175
Publikasi 08.12.3175Publikasi 08.12.3175
Publikasi 08.12.3175
Jamil Jamil
 
Naskah publikasi 09.11.2727
Naskah publikasi 09.11.2727Naskah publikasi 09.11.2727
Naskah publikasi 09.11.2727
Jamil Jamil
 
Modul training-php-rc1-u3
Modul training-php-rc1-u3Modul training-php-rc1-u3
Modul training-php-rc1-u3
Jamil Jamil
 
M odul 5 komponen dasar visual basic 2
M odul 5 komponen dasar visual basic 2M odul 5 komponen dasar visual basic 2
M odul 5 komponen dasar visual basic 2
Jamil Jamil
 
M odul 5 komponen dasar visual basic
M odul 5 komponen dasar visual basicM odul 5 komponen dasar visual basic
M odul 5 komponen dasar visual basic
Jamil Jamil
 
Membuat laporan berbentuk khs 2
Membuat laporan berbentuk khs 2Membuat laporan berbentuk khs 2
Membuat laporan berbentuk khs 2
Jamil Jamil
 
Membuat laporan berbentuk khs
Membuat laporan berbentuk khsMembuat laporan berbentuk khs
Membuat laporan berbentuk khs
Jamil Jamil
 
Junipermplsbestpractice part1-100717041724-phpapp02
Junipermplsbestpractice part1-100717041724-phpapp02Junipermplsbestpractice part1-100717041724-phpapp02
Junipermplsbestpractice part1-100717041724-phpapp02
Jamil Jamil
 

More from Jamil Jamil (20)

Skripsi perancangan-sistem-informasi-pendataan-biodata-mahasiswa-pada-fakulta...
Skripsi perancangan-sistem-informasi-pendataan-biodata-mahasiswa-pada-fakulta...Skripsi perancangan-sistem-informasi-pendataan-biodata-mahasiswa-pada-fakulta...
Skripsi perancangan-sistem-informasi-pendataan-biodata-mahasiswa-pada-fakulta...
 
Skripsi perancangan-sistem-informasi-pendataan-biodata-mahasiswa-pada-fakulta...
Skripsi perancangan-sistem-informasi-pendataan-biodata-mahasiswa-pada-fakulta...Skripsi perancangan-sistem-informasi-pendataan-biodata-mahasiswa-pada-fakulta...
Skripsi perancangan-sistem-informasi-pendataan-biodata-mahasiswa-pada-fakulta...
 
Skripsi universitas paramadina_jakarta_fitriyani_kepemimpinan_perempuan_dalam...
Skripsi universitas paramadina_jakarta_fitriyani_kepemimpinan_perempuan_dalam...Skripsi universitas paramadina_jakarta_fitriyani_kepemimpinan_perempuan_dalam...
Skripsi universitas paramadina_jakarta_fitriyani_kepemimpinan_perempuan_dalam...
 
Silabus disain pemrogramanberorientasiobjek_iki10830
Silabus disain pemrogramanberorientasiobjek_iki10830Silabus disain pemrogramanberorientasiobjek_iki10830
Silabus disain pemrogramanberorientasiobjek_iki10830
 
Publikasi 09.22.1115
Publikasi 09.22.1115Publikasi 09.22.1115
Publikasi 09.22.1115
 
Publikasi 08.12.3175 2
Publikasi 08.12.3175 2Publikasi 08.12.3175 2
Publikasi 08.12.3175 2
 
Publikasi 08.12.3175
Publikasi 08.12.3175Publikasi 08.12.3175
Publikasi 08.12.3175
 
Prak 1
Prak 1Prak 1
Prak 1
 
Paper ta
Paper taPaper ta
Paper ta
 
Naskah publikasi 09.11.2727
Naskah publikasi 09.11.2727Naskah publikasi 09.11.2727
Naskah publikasi 09.11.2727
 
Modul training-php-rc1-u3
Modul training-php-rc1-u3Modul training-php-rc1-u3
Modul training-php-rc1-u3
 
Modul 2
Modul 2Modul 2
Modul 2
 
Modul pbo
Modul pboModul pbo
Modul pbo
 
M odul 5 komponen dasar visual basic 2
M odul 5 komponen dasar visual basic 2M odul 5 komponen dasar visual basic 2
M odul 5 komponen dasar visual basic 2
 
M odul 5 komponen dasar visual basic
M odul 5 komponen dasar visual basicM odul 5 komponen dasar visual basic
M odul 5 komponen dasar visual basic
 
Membuat laporan berbentuk khs 2
Membuat laporan berbentuk khs 2Membuat laporan berbentuk khs 2
Membuat laporan berbentuk khs 2
 
Membuat laporan berbentuk khs
Membuat laporan berbentuk khsMembuat laporan berbentuk khs
Membuat laporan berbentuk khs
 
Makalah seminar
Makalah seminarMakalah seminar
Makalah seminar
 
Jurnaltoninetti
JurnaltoninettiJurnaltoninetti
Jurnaltoninetti
 
Junipermplsbestpractice part1-100717041724-phpapp02
Junipermplsbestpractice part1-100717041724-phpapp02Junipermplsbestpractice part1-100717041724-phpapp02
Junipermplsbestpractice part1-100717041724-phpapp02
 

Duganiperfn43 120911020533-phpapp02

  • 1. 1 Using Iperf Jon M. Dugan <jdugan@es.net> NANOG 43, Brooklyn, NY June 1, 2008 Energy Sciences Network Lawrence Berkeley National Laboratory Networking for the Future of Science
  • 2. 2 Outline • TCP Measurements • UDP Measurements • Useful tricks
  • 3. 3 Iperf’s notion of clients and servers Client is the sender Server is the receiver (discard server)
  • 4. 4 TCP Measurements • Measures TCP Achievable Bandwidth – Measurement includes the end system – Sometimes called “memory-to-memory” tests • Limits of what we can measure – TCP is a largely a black box • Many things can limit TCP throughput – Loss – Congestion – Buffer Starvation – Out of order delivery
  • 5. 5 Example Iperf TCP Invocation Server (receiver): $ iperf -s ------------------------------------------------------------ Server listening on TCP port 5001 TCP window size: 85.3 KByte (default) ------------------------------------------------------------ [ 4] local 10.0.1.5 port 5001 connected with 10.0.1.10 port 60830 [ 4] 0.0-10.0 sec 1.09 GBytes 933 Mbits/sec [ 4] local 10.0.1.5 port 5001 connected with 10.0.1.10 port 60831 [ 4] 0.0-10.0 sec 1.08 GBytes 931 Mbits/sec Client (sender): $ iperf -c 10.0.1.5 ------------------------------------------------------------ Client connecting to 10.0.1.5, TCP port 5001 TCP window size: 129 KByte (default) ------------------------------------------------------------ [ 3] local 10.0.1.10 port 60830 connected with 10.0.1.5 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-10.2 sec 1.09 GBytes 913 Mbits/sec
  • 6. 6 Bandwidth Delay Product • The amount of “in flight” data allowed for a TCP connection • BDP = bandwidth * round trip time • Example: 1Gb/s cross country, ~100ms 1,000,000,000 b/s * .1 s = 100,000,000 bits 100,000,000 / 8 = 12,500,000 bytes 12,500,000 bytes / (1024*1024) ~ 12MB • To get full TCP performance the TCP window needs to be large enough to accommodate the Bandwidth Delay Product
  • 7. 7 UDP Measurements • UDP provides greater transparency • We can directly measure some additional things: – Loss – Jitter – Out of order delivery
  • 8. 8 Example Iperf UDP Invocation Server (receiver): $ iperf -u -s ------------------------------------------------------------ Server listening on UDP port 5001 Receiving 1470 byte datagrams UDP buffer size: 107 KByte (default) ------------------------------------------------------------ [ 3] local 10.0.1.5 port 5001 connected with 10.0.1.10 port 65299 [ 3] 0.0-10.0 sec 1.25 MBytes 1.05 Mbits/sec 0.008 ms 0/ 893 (0%) Client (sender): $ iperf -u -c 10.0.1.5 -b 1M ------------------------------------------------------------ Client connecting to 10.0.1.5, UDP port 5001 Sending 1470 byte datagrams UDP buffer size: 9.00 KByte (default) ------------------------------------------------------------ [ 3] local 10.0.1.10 port 65300 connected with 10.0.1.5 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 1.25 MBytes 1.05 Mbits/sec [ 3] Server Report: [ 3] 0.0-10.0 sec 1.25 MBytes 1.05 Mbits/sec 0.003 ms 0/ 893 (0%) [ 3] Sent 893 datagrams
  • 9. 9 Adjusting Iperf for performance • The –w option for Iperf can be used to request a particular buffer size. This sets both send and receive buffer size. – The OS may need to be tweaked to allow buffers of sufficient size. – See http://dsd.lbl.gov/TCP-tuning/ and http://www.psc.edu/networking/perf_tune.html • Parallel transfers may help as well, the –P option can be used for this
  • 10. 10 Useful Iperf Invocations • UDP and TCP: • -i n report status every n seconds • -d do bidirectional test simultaneously • -r do bidirectional test one after another
  • 11. 11 Using Iperf to generate high rate streams • UDP doesn’t require a receiver • If you have good counters on your switches & routers those can be used to measure • Turns out UDP reception can be very resource intensive resulting in drops at the NIC at high rates (8-9 Gb/s)
  • 12. 12 Never do this • Need to generate 10 Gb/s but only have a 1 Gb/s host? Iperf UDP 1 Gb/s Destined for 10.1.1.1 Use the –T option to Iperf to control the number of times the traffic loops Can also use firewall filters to discard a certain TTL range. Other filters may be prudent as well. 10.0.1.1 10.0.1.2 Static route: 10.1.1.1/32 10.0.1.2 Static route: 10.1.1.1/32 10.0.1.1
  • 13. 13 Iperf Development • Primarily in maintenance mode – Accepting and apply patches – Fixing bugs and documentation as time allows • Future Directions – libiperf