Iperf tests the bandwidth of the two servers

Source: Internet
Author: User

Iperf usage Summary

Iperf is a performance measurement tool for TCP/IP and UDP/IP. It provides network throughput information, as well as statistics such as vibration, packet loss rate, maximum segment, and maximum transmission unit size; this helps us test network performance and locate network bottlenecks.

Iperf is the client that sends data to the server.
The server displays the receiving rate. It is best to add the I parameter for Rate Tracking.
The client displays the sending rate.
Server display receiving rate
-S starts in server mode. For example: iperf-s
-C is started in client mode. The host is the server address, for example, iperf-c Server-IP.
Iperf-c 173.16.0.81-w 102400000-t 200-P 3
Description: data is transmitted from a client to 173.16.0.81 on the server. The three processes are processed in 200 seconds,
-W 102400000, I haven't figured out what it means.

 

Start the server on one machine:
[Root @ gluster01 ~] #./Iperf-s-w 102400000
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 195 MByte (WARNING: requested 97.7 MByte)
------------------------------------------------------------
[4] local 173.16.0.81 port 5001 connected with 173.16.0.80 port 39372
[5] local 173.16.0.81 port 5001 connected with 173.16.0.80 port 39371
[6] local 173.16.0.81 port 5001 connected with 173.16.0.80 port 39374
[ID] Interval Transfer Bandwidth
[4] 0.0-203.3 sec 8.55 GBytes 361 Mbits/sec
[5] 0.0-203.4 sec 9.34 GBytes 394 Mbits/sec
[6] 0.0-203.5 sec 8.42 GBytes 355 Mbits/sec
[SUM] 0.0-203.5 sec 26.3 GBytes 1.11 Gbits/sec
Start the client on another machine

Node2 #./iperf-c 173.16.0.81-w 102400000-t 200-P 3
------------------------------------------------------------
Client connecting to 173.16.0.81, TCP port 5001
TCP window size: 195 MByte (WARNING: requested 97.7 MByte)
------------------------------------------------------------
[5] local 173.16.0.80 port 39374 connected with 173.16.0.81 port 5001
[3] local 173.16.0.80 port 39371 connected with 173.16.0.81 port 5001
[4] local 173.16.0.80 port 39372 connected with 173.16.0.81 port 5001
[ID] Interval Transfer Bandwidth
[5] 0.0-200.4 sec 8.42 GBytes 361 Mbits/sec
[4] 0.0-200.5 sec 8.55 GBytes 366 Mbits/sec
[3] 0.0-200.5 sec 9.34 GBytes 400 Mbits/sec
[SUM] 0.0-200.5 sec 26.3 GBytes 1.13 Gbits/sec


LTCP
N measuring network bandwidth
N reports the size and observations of MSS/MTU values
N supports TCP Window value buffering through socket
N multithreading is supported when the P thread or Win32 thread is available. The client and server support multiple connections at the same time
LUDP
N the client can create a UDP stream with the specified bandwidth
N measurement packet loss
N measurement Delay
N supports multicast
N multithreading is supported when P threads are available. The client and server support multiple connections at the same time (Windows is not supported)
L where appropriate, K (kilo-) and M (mega-) can be used in the options -). For example, 131072 bytes can be replaced by kb.
L you can specify the total running time or even set the total amount of transmitted data.
L select the most appropriate unit for data in the report.
L The server supports multiple connections, instead of waiting for a Single-thread test.
L repeatedly display network bandwidth, fluctuations, and packet loss at a specified interval.
L the server can be run as a background program.
L the server can run as a Windows service.
L use typical data streams to test the effect of link layer compression on available bandwidth.
Parameters and descriptions


Command line options
Environment Variable options
Description
Client and server options
-F, -- format [bkmaBKMA]
$ IPERF_FORMAT
Format the bandwidth output. Supported formats include:
'B' = bits/sec 'B' = Bytes/sec
'K' = Kbits/sec 'K' = KBytes/sec
'M' = Mbits/sec 'M' = MBytes/sec
'G' = Gbits/sec 'G' = GBytes/sec
'A' = adaptive bits/sec 'A' = adaptive Bytes/sec
The adaptive format is one of kilo-and mega. All fields except bandwidth are output as bytes. Unless the output format is specified, the default parameter is.
Note: When calculating byte, Kilo = 1024, Mega = 1024 ^ 2, Giga = 1024 ^ 3. Generally, in the network, Kilo = 1000, Mega = 1000 ^ 2, and Giga = 1000 ^ 3. Therefore, Iperf also calculates bits (BITs) based on this ). If these problems affect you, use the-f B parameter and calculate it in person.
-I, -- interval #
$ IPERF_INTERVAL
Set the interval between each report, in seconds. If it is set to a non-zero value, the test report is output at this interval. The default value is zero.
-L, -- len # [KM]
$ IPERF_LEN
Set the length of the read/write buffer. The default TCP mode is 8 KB, and the default UDP mode is 1470 bytes.


-M, -- print_mss
$ IPERF_PRINT_MSS
Output tcp mss value (supported by TCP_MAXSEG ). The MSS value is generally 40 bytes smaller than the MTU value. General situation


-P, -- port #
$ IPERF_PORT
Set the port, which is consistent with the listening port on the server. The default port is port 5001, which is the same as that of ttcp.
-U, -- udp
$ IPERF_UDP
Use UDP instead of TCP. See the-B option.
-W, -- window # [KM]
$ TCP_WINDOW_SIZE
Set the socket buffer to the specified size. For TCP mode, this parameter is set to the TCP window size. For UDP mode, this parameter is set to accept the buffer size of UDP data packets and limit the maximum value of acceptable data packets.
-B, -- bind host
$ IPERF_BIND
One of the multiple addresses bound to the host. For the client, this parameter sets the output stack interface. For the server side, this parameter sets the inbound interface. This parameter is only used for hosts with multiple network interfaces. In Iperf UDP mode, this parameter is used to bind and join a multicast group. Use a multicast address ranging from 224.0.0.0 to 239.255.255.255. Refer to-T parameters.
-C, -- compatibility
$ IPERF_COMPAT
Compatible with earlier versions of Iperf. You do not need to use the compatibility mode at both ends. However, we strongly recommend that you use the compatibility mode at both ends. In some cases, using certain data streams can cause a server crash of version 1.7 or unexpected connection attempts.
-M, -- mss # [KM}
$ IPERF_MSS
Use the TCP_MAXSEG option to set the maximum TCP information segment value. The size of the MSS value is usually the size of the TCP/IP Header minus 40 bytes. In Ethernet, the MSS value is 1460 bytes (MTU1500 bytes ). Many operating systems do not support this option.
-N, -- nodelay
$ IPERF_NODELAY
Disable the Nagle's algorithm by setting the tcp no-delay option. This option is usually disabled for interactive programs, such as telnet.
-V (from v1.6 or higher)


Bind an IPv6 address.
Server: $ iperf-s-V
Client: $ iperf-c <Server IPv6 Address>-V
Note: In version 1.6.3 or later, you do not need to use the-B parameter to bind the specified IPv6 address. In version earlier than version 1.6, you must use the-B parameter. In most operating systems, the IPv4 address mapped to the IPv4 client is returned.

  • 1
  • 2
  • Next Page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.