SW/ 개발팁 / 추천프로그램, 꿀팁 공유
  • 돌아가기
  • 아래로
  • 위로
  • 목록
  • 댓글
정보

네트워크 성능&대역폭 측정 툴 iPerf

달소 달소 1104

1

4

 

안녕하세요. 달소입니다.

 

오늘은 사용하고 계신 내부/외부망 네트워크의 성능&대역폭 측정을 도와주는 iperf 를소개해드리고자합니다.

 

iPerf는 네트워크 환경에서 최대 대역폭을 측정하기 위한 툴 입니다. 크로스 플랫폼 지원을 통해 서로 다른 OS에서도 버전만 맞으면 대역폭을 측정할 수 있으며TCP,UDP, SCTP등을 지원합니다.

 

iPerf 기능

  • TCP 및 SCTP
    • 대역폭 측정
    • MSS / MTU 크기 및 관찰 된 읽기 크기를보고합니다.
    • 소켓 버퍼를 통한 TCP 창 크기 지원.
  • UDP
    • 클라이언트는 지정된 대역폭의 UDP 스트림을 생성 할 수 있습니다.
    • 패킷 손실 측정
    • 지연 지터 측정
    • 멀티 캐스트 가능
  • 크로스 플랫폼 : Windows, Linux, Android, MacOS X, FreeBSD, OpenBSD, NetBSD, VxWorks , Solaris, ...
  • 클라이언트와 서버는 여러 개의 동시 연결을 가질 수 있습니다 (-P 옵션).
  • 서버는 단일 테스트 후 종료하지 않고 여러 연결을 처리합니다.
  • 전송할 데이터 양이 아닌 지정된 시간 (-t 옵션) 동안 실행할 수 있습니다 (-n 또는 -k 옵션).
  • 지정된 간격으로 주기적, 중간 대역폭, 지터 및 손실 보고서를 인쇄합니다 (-i 옵션).
  • 서버를 데몬으로 실행 (-D 옵션)
  • 대표 스트림을 사용하여 링크 레이어 압축이 달성 가능한 대역폭 (-F 옵션)에 미치는 영향을 테스트합니다.
  • 서버는 단일 클라이언트를 동시에 수락 (iPerf3) 여러 클라이언트를 동시에 수락 (iPerf2)
  • 신규 : TCP 느린 시작 무시 (-O 옵션).
  • 신규 : UDP 및 (신규) TCP에 대한 대상 대역폭을 설정합니다 (-b 옵션).
  • 신규 : IPv6 흐름 레이블 설정 (-L 옵션)
  • 신규 : 혼잡 제어 알고리즘 설정 (-C 옵션)
  • 신규 : TCP 대신 SCTP 사용 (--sctp 옵션)
  • 신규 : JSON 형식으로 출력 (-J 옵션).
  • 신규 : 디스크 읽기 테스트 (서버 : iperf3 -s / 클라이언트 : iperf3 -c testhost -i1 -F 파일 이름)
  • 신규 : 디스크 쓰기 테스트 (서버 : iperf3 -s -F 파일 이름 / 클라이언트 : iperf3 -c testhost -i1)

 

다운로드 및 설치하기

https://iperf.fr/iperf-download.php

 

윈도우는 위 링크로 들어가서 윈도우용 다운로드 링크로 설치해주시고

 

Cent OS 는 yum install epel-release 후 yum install iperf
Ubuntu 는 apt install iperf

 

위 명령어들로 설치가능합니다.

image.png.jpg

 

iPerf 사용하기

사용법은 아래와 같지만 자주사용하는것 위주로 작성해보겠습니다.

 

iPerf 는 서버 / 클라이언트 구조로 테스트가 가능합니다.

2대의 리눅스 서버로 테스트를 진행한다면 

 

1대는 iperf -s 로 서버 역할

1대는 iperf -c  [서버ip]로 클라이언트 역할을 해줍니다.

image.png.jpg

 

image.png.jpg

-p 옵션은 포트설정(기본포트는 5001)
-t 옵션은 테스트 타임 설정 등 

 

Usage: iperf [-s|-c host] [options]
       iperf [-h|--help] [-v|--version]

 

Client/Server:
  -b, --bandwidth #[kmgKMG | pps]  bandwidth to send at in bits/sec or packets per second
  -e, --enhancedreports    use enhanced reporting giving more tcp/udp and traffic information
  -f, --format    [kmgKMG]   format to report: Kbits, Mbits, KBytes, MBytes
  -i, --interval  #        seconds between periodic bandwidth reports
  -l, --len       #[kmKM]    length of buffer in bytes to read or write (Defaults: TCP=128K, v4 UDP=1470, v6 UDP=1450)
  -m, --print_mss          print TCP maximum segment size (MTU - TCP/IP header)
  -o, --output    <filename> output the report or error message to this specified file
  -p, --port      #        server port to listen on/connect to
  -u, --udp                use UDP rather than TCP
      --udp-counters-64bit use 64 bit sequence numbers with UDP
  -w, --window    #[KM]    TCP window size (socket buffer size)
  -z, --realtime           request realtime scheduler
  -B, --bind <host>[:<port>][%<dev>] bind to <host>, ip addr (including multicast address) and optional port and device
  -C, --compatibility      for use with older versions does not sent extra msgs
  -M, --mss       #        set TCP maximum segment size (MTU - 40 bytes)
  -N, --nodelay            set TCP no delay, disabling Nagle's Algorithm
  -S, --tos       #        set the socket's IP_TOS (byte) field

Server specific:
  -s, --server             run in server mode
  -t, --time      #        time in seconds to listen for new connections as well as to receive traffic (default not set)
      --udp-histogram #,#  enable UDP latency histogram(s) with bin width and count, e.g. 1,1000=1(ms),1000(bins)
  -B, --bind <ip>[%<dev>]  bind to multicast address and optional device
  -H, --ssm-host <ip>      set the SSM source, use with -B for (S,G)
  -U, --single_udp         run in single threaded UDP mode
  -D, --daemon             run the server as a daemon
  -V, --ipv6_domain        Enable IPv6 reception by setting the domain and socket to AF_INET6 (Can receive on both IPv4 and IPv6)

Client specific:
  -c, --client    <host>   run in client mode, connecting to <host>
  -d, --dualtest           Do a bidirectional test simultaneously
      --ipg                set the the interpacket gap (milliseconds) for packets within an isochronous frame
      --isochronous <frames-per-second>:<mean>,<stddev> send traffic in bursts (frames - emulate video traffic)
  -n, --num       #[kmgKMG]    number of bytes to transmit (instead of -t)
  -r, --tradeoff           Do a bidirectional test individually
  -t, --time      #        time in seconds to transmit for (default 10 secs)
  -B, --bind [<ip> | <ip:port>] bind ip (and optional port) from which to source traffic
  -F, --fileinput <name>   input the data to be transmitted from a file
  -I, --stdin              input the data to be transmitted from stdin
  -L, --listenport #       port to receive bidirectional tests back on
  -P, --parallel  #        number of parallel client threads to run
  -R, --reverse            reverse the test (client receives, server sends)
  -T, --ttl       #        time-to-live, for multicast (default 1)
  -V, --ipv6_domain        Set the domain to IPv6 (send packets over IPv6)
  -X, --peer-detect        perform server version detection and version exchange
  -Z, --linux-congestion <algo>  set TCP congestion control algorithm (Linux only)

Miscellaneous:
  -x, --reportexclude [CDMSV]   exclude C(connection) D(data) M(multicast) S(settings) V(server) reports
  -y, --reportstyle C      report as a Comma-Separated Values
  -h, --help               print this message and quit
  -v, --version            print version information and quit

[kmgKMG] Indicates options that support a k,m,g,K,M or G suffix
Lowercase format characters are 10^3 based and uppercase are 2^n based
(e.g. 1k = 1000, 1K = 1024, 1m = 1,000,000 and 1M = 1,048,576)

The TCP window size option can be set by the environment variable
TCP_WINDOW_SIZE. Most other options can be set by an environment variable
IPERF_<long option name>, such as IPERF_BANDWIDTH.

Source at <http://sourceforge.net/projects/iperf2/>
Report bugs to <iperf-users@lists.sourceforge.net>
 

신고공유스크랩
4

달소 달소
96Lv. 186263P
다음 레벨까지 1917P


메인서버 - Ryzen 5700G / Proxmox 7.2 / Ubuntu / Xpenology / 기타 VM 등등
보조서버 - Intel i9-9900ES(QQC0) / H370M / Proxmox 7.1 / 아직개발용서버로 사용중
백업스토리지서버 - DS920+ 
하드웨어,가상화 등등 여러 IT분야에 관심이 두루두루많습니다만 깊게알고있는건 없습니다 하하하

profile image 1등
화정큐삼 2023.02.11. 16:39
맥OS 는 iperf3 가 기본내장되어 있어서 좋네요.
VMWARE Fusion 에 설치된 시놀로지와 테스트 해봤는데, 이정도 속도가 나오네요. 10G 붙이기 전에 연습해 봤습니다.^^

Connecting to host 192.168.35.150, port 5201
[ 5] local 192.168.35.27 port 40986 connected to 192.168.35.150 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 195 MBytes 1.63 Gbits/sec 0 568 KBytes
[ 5] 1.00-2.00 sec 185 MBytes 1.56 Gbits/sec 0 568 KBytes
[ 5] 2.00-3.00 sec 189 MBytes 1.58 Gbits/sec 0 568 KBytes
[ 5] 3.00-4.00 sec 186 MBytes 1.56 Gbits/sec 0 568 KBytes
[ 5] 4.00-5.00 sec 188 MBytes 1.57 Gbits/sec 0 568 KBytes
[ 5] 5.00-6.00 sec 199 MBytes 1.67 Gbits/sec 0 568 KBytes
[ 5] 6.00-7.00 sec 208 MBytes 1.74 Gbits/sec 0 597 KBytes
[ 5] 7.00-8.00 sec 207 MBytes 1.73 Gbits/sec 0 796 KBytes
[ 5] 8.00-9.01 sec 208 MBytes 1.74 Gbits/sec 0 796 KBytes
[ 5] 9.01-10.01 sec 205 MBytes 1.72 Gbits/sec 0 846 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.01 sec 1.92 GBytes 1.65 Gbits/sec 0 sender
[ 5] 0.00-10.05 sec 1.92 GBytes 1.64 Gbits/sec receiver

iperf Done.
profile image
달소 글쓴이 2023.02.11. 21:01
화정큐삼
크,,, 기본내장 좋네요
10g도 무사히 되셔야할텐데요ㅎ
profile image
화정큐삼 2023.02.11. 21:57
달소

X540-AT2 10G 제 최근에 리퍼보드로 구입한 Asrock Z490M Itx/ax 메인컴에 한번 붙여봤다가 시껍했습니다. 갑자기 부팅이 안되는...
랜카드 문제는 아니고 제가 BIOS 에 스마트플러그가 켜지도록 셋팅한것과 충돌이 되는건지 일단은 이 보드는 테스트에서 제외했습니다.
8배속 슬롯이 여러개 있는 Asrock 웍스보드에 붙여서 지금 시험을 계속 진행중입니다.
Asrock Z490M Itx/ax 의 리얼텍 2.5G 와 직결을 시켰는데 1G 속도로 밖에 안붙는것 같습니다.
지금 나머지 10G 카드 붙일 PC를 구성중입니다.

M.2 형 6Port 확장 컨트롤러도 도착했는데, 제 메인헤놀에 붙이려다가 실패했습니다.
JONSBO N1 의 구조에서 후면 M.2슬롯에 이 컨트롤러를 붙이는건 무리입니다.
파워와 맞붙어 있어서 Sata 케이블과 간섭이 생겨서 케이블 장착 자체가 불가능합니다.
이걸 생각을 못했네요.
아무래도 추가구입이 필요할것 같습니다. M.2 연장 케이블이란게 있는데, 이것마져 구입하려고 알아보는 중입니다.

모델중엔 R44SF 4.0 정도가 케이블 길이도 다양하고 알맞는것 같아 보입니다.

 

https://www.aliexpress.com/af/R44SF-4.0.html?SearchText=R44SF+4.0&catId=0&initiative_id=SB_20230211044737&spm=a2g0o.productlist.1000002.0&trafficChannel=af&g=y&sortType=price_asc

댓글 쓰기 권한이 없습니다. 로그인

취소 댓글 등록

cmt alert

신고

"님의 댓글"

이 댓글을 신고하시겠습니까?

댓글 삭제

"님의 댓글"

삭제하시겠습니까?


목록

공유

facebooktwitterpinterestbandkakao story