티스토리 뷰

Network/System&Tools

iperf

Jacob_baek 2018. 11. 7. 13:55

How to use

사전에 firewall 확인 및 buffer size 확인이 필요하다.
만약 client에서 -w option을 사용 하여 socket buffer size를 지정하는 경우
그에 맞는 설정을 서버에 추가해야 한다.

실제 아래와 같은 iperf 를 수행해 볼수 있다.

  1. Server Side
[root@localhost ~] iperf3 -i 10 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.100.100, port 44770  
[ 5] local 192.168.100.201 port 5201 connected to 192.168.100.100 port 44772

[ ID] Interval Transfer Bandwidth  
[ 5] 0.00-10.00 sec 1.09 GBytes 935 Mbits/sec  
[ 5] 10.00-20.00 sec 1.10 GBytes 941 Mbits/sec  
[ 5] 20.00-30.00 sec 1.10 GBytes 941 Mbits/sec  
[ 5] 30.00-40.00 sec 1.10 GBytes 941 Mbits/sec  
[ 5] 40.00-50.00 sec 1.10 GBytes 941 Mbits/sec  
[ 5] 50.00-60.00 sec 1.10 GBytes 941 Mbits/sec  
[ 5] 60.00-60.06 sec 6.78 MBytes 939 Mbits/sec

[ ID] Interval Transfer Bandwidth  
[ 5] 0.00-60.06 sec 0.00 Bytes 0.00 bits/sec sender  
[ 5] 0.00-60.06 sec 6.57 GBytes 940 Mbits/sec receiver
  1. Client Side
[root@localhost ~]# iperf3 -i 10 -t 60 -c 192.168.100.201  
Connecting to host 192.168.100.201, port 5201  
[ 4] local 192.168.100.100 port 44772 connected to 192.168.100.201 port 5201

[ I0] Interval Transfer Bandwidth Retr Cwnd  
[ 4] 0.00-10.00 sec 1.10 GBytes 941 Mbits/sec 18 1.25 MBytes  
[ 4] 10.00-20.00 sec 1.09 GBytes 941 Mbits/sec 11 1.77 MBytes  
[ 4] 20.00-30.00 sec 1.10 GBytes 942 Mbits/sec 7 2.18 MBytes  
[ 4] 30.00-40.00 sec 1.10 GBytes 942 Mbits/sec 2 2.55 MBytes  
[ 4] 40.00-50.00 sec 1.10 GBytes 942 Mbits/sec 1 2.94 MBytes  
[ 4] 50.00-60.00 sec 1.09 GBytes 941 Mbits/sec 1 3.00 MBytes

[ ID] Interval Transfer Bandwidth Retr  
[ 4] 0.00-60.00 sec 6.57 GBytes 941 Mbits/sec 40 sender  
[ 4] 0.00-60.00 sec 6.57 GBytes 941 Mbits/sec receiver

iperf Done.  
[root@localhost ~]#

Tunning

Trouble Shooting

아래와 같은 메세지를 맞닥드렸다면 firewall을 확인해보자.

iperf3: error - unable to connect to server: No route to host

-w option을 사용중이라면 이를 변경하거나 제거한 command를 client에서 수행해보자.

iperf3: error - socket buffer size not set correctly

참고로

SCP를 bandwidth performance check 용도로 사용하는 것은 아래 링크에서 설명되어 있듯이 적절치 않다.
이유는 cpu를 사용하여 single thread encryption을 수행하는데 이는 network 혹은 storage 보다 cpu를 사용하기에 느릴수 밖에 없다.

이외에도 qperf라는 bandwidth 측정 도구가 있다.

참고사이트

'Network > System&Tools' 카테고리의 다른 글

sockperf  (0) 2022.01.05
iptables for NAT loopback  (0) 2020.09.09
How to use a proxy server as a client  (0) 2019.06.12
Cisco IOS SSH Enabling  (0) 2017.09.28
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함