2013年4月15日 星期一

How to use iperf for Linux platform stress


How to user iperf for Linux platform stress
(P可以設10, -l可以刪除)

#For 10G:

iperf -c 192.1.1.200 -w 512K -l 64K -t 259200 -p 2001 -i 10 -P 4 >> iperf_2001.log

If –P 4 not enough for your stress loading, please try use 8 / 16  to replace 4.

@ rem 3 days - Client side for 1GB NIC Port

iperf -c 192.1.1.200 -w 512K -l 64K -t 259200 -i 10 -p 2001 >> iperf_2001.log

iperf -c 192.2.1.200 -w 512K -l 64K -t 259200 -i 10 -p 2002 >> iperf_2002.log


=======================================================

#For IPv6  - Client side for 1GB NIC Port

iperf -c 3ffe:501:ffff::200 -w 512K -l 64K -t 259200 -p 2008 -V >> iperf_2008.log
PS. -V is iPv6 required parameter.

=======================================================
@rem 3days - Client side  - Client side for 1GB NIC Port

iperf -c 192.1.1.200 -w 512K -l 64K -t 259200 -P 4 -i 10 -p 2001 >> iperf_2001.log

iperf -c 192.2.1.200 -w 512K -l 64K -t 259200 -P 4 -i 10 -p 2002 >> iperf_2002.log





@ rem Server side  - Client side for 1GB NIC Port

iperf -s -w 512K -l 64K -p 2001

iperf -s -w 512K -l 64K -p 2002





@ rem Server side  - Client side for 1GB NIC Port

#For IPv4

iperf -s -w 512K -l 64K -p 2001


#For IPv6

iperf -s -w 512K -l 64K -V -p 2001



--HELP----

C:\Users\Mark>iperf --help

Usage: iperf [-s|-c host] [options]

       iperf [-h|--help] [-v|--version]



Client/Server:

  -f, --format    [kmKM]   format to report: Kbits, Mbits, KBytes, MBytes

  -i, --interval  #        seconds between periodic bandwidth reports

  -l, --len       #[KM]    length of buffer to read or write (default 8 KB)

  -m, --print_mss          print TCP maximum segment size (MTU - TCP/IP header)

  -o, --output    <filename> output the report or error message to this specifie

d file

  -p, --port      #        server port to listen on/connect to

  -u, --udp                use UDP rather than TCP

  -w, --window    #[KM]    TCP window size (socket buffer size)

  -B, --bind      <host>   bind to <host>, an interface or multicast address

  -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

  -V, --IPv6Version        Set the domain to IPv6



Server specific:

  -s, --server             run in server mode

  -U, --single_udp         run in single threaded UDP mode

  -D, --daemon             run the server as a daemon



Client specific:

  -b, --bandwidth #[KM]    for UDP, bandwidth to send at in bits/sec

                           (default 1 Mbit/sec, implies -u)

  -c, --client    <host>   run in client mode, connecting to <host>

  -d, --dualtest           Do a bidirectional test simultaneously

  -n, --num       #[KM]    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)

  -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

  -T, --ttl       #        time-to-live, for multicast (default 1)

  -Z, --linux-congestion <algo>  set TCP congestion control algorithm (Linux only)
=======================================================
[User Experience]
iperf performance linux OS better than Windows OS.
Suggest Use Linux Client for platform Stress.

2 則留言:

  1. 您好:
    可以請教一個關於Iperf的問題嗎?
    我有兩台具有10GbE x2的server
    兩台10GbE LAN對接互測iperf 發現Bandwidth 的值都低於8G,如果只測試一方的話值都可以到達9G以上,我設定的參數如下。請問是不是我設定有誤導致Bandwidth 數值過低。
    server:iperf -s
    Client:iperf -c ip address -w 128k -l 24k -i 10 -t 999999

    回覆刪除
    回覆
    1. 你是不是4個port都接 兩個對兩個
      只接兩個port 1對1 效能才正常
      這問題我有遇過
      可能是網卡fw問題

      刪除